// source --> https://mfrash.com/wp-content/plugins/creame-whatsapp-me/public/js/joinchat-lite.min.js?ver=6.2.2 
((c,i,a)=>{a={settings:null,is_mobile:/Mobile|Android|iPhone|iPad/i.test(navigator.userAgent),can_qr:c.QrCreator&&"function"==typeof QrCreator.render,...a},(c.joinchat_obj=a).send_event=function(o){if((o={event_category:this.settings.event_category||"JoinChat",event_label:"",event_action:"",chat_channel:"whatsapp",chat_id:"--",is_mobile:this.is_mobile?"yes":"no",page_location:location.href,page_title:i.title||"no title",...o}).event_label=o.event_label||o.link||"",o.event_action=o.event_action||o.chat_channel+": "+o.chat_id,delete o.link,i.dispatchEvent(new CustomEvent("joinchat:event",{detail:o,cancelable:!0}))){let t=c[this.settings.data_layer]||c[c.gtm4wp_datalayer_name]||c.dataLayer;if("object"==typeof t){let i=c.gtag||function(){t.push(arguments)},s=void 0!==this.settings.ga_event?this.settings.ga_event:"generate_lead";if(s){let e={transport_type:"beacon",...o},n=(Object.keys(e).forEach(t=>{"page_location"===t?e[t]=e[t].substring(0,1e3):"page_referrer"===t?e[t]=e[t].substring(0,420):"page_title"===t?e[t]=e[t].substring(0,300):"string"==typeof e[t]&&(e[t]=e[t].substring(0,100))}),[]),a=t=>{n.includes(t)||(t.startsWith("G-")||t.startsWith("GT-"))&&(n.push(t),i("event",s,{send_to:t,...e}))};if(c.google_tag_data&&google_tag_data.tidr&&google_tag_data.tidr.destination)for(var r in google_tag_data.tidr.destination)a(r);t.forEach(t=>{"config"===t[0]&&t[1]&&a(t[1])})}this.settings.gads&&i("event","conversion",{send_to:this.settings.gads})}var e,n,a=o.event_category;delete o.event_category,"object"==typeof t&&t.push({event:a,...o}),"function"==typeof fbq&&("whatsapp"===o.chat_channel&&(n=""+(e=o.chat_id).substring(0,3)+"X".repeat(e.length-5)+e.substring(e.length-2),o.chat_id=n,o.event_label=o.event_label.replace(e,n),o.event_action=o.event_action.replace(e,n)),fbq("trackCustom",a,o))}},a.get_wa_link=function(t,e,n){e=void 0!==e?e:this.settings.message_send||"",n=void 0!==n?n:this.settings.whatsapp_web&&!this.is_mobile;n=new URL((n?"https://web.whatsapp.com/send?phone=":"https://wa.me/")+(t||this.settings.telephone));return e&&n.searchParams.set("text",e),n.toString()},a.track_click=function(t){var e;this.settings.tracking_url&&(e={trigger:t.trigger||"unknown",chat_channel:t.chat_channel||"",chat_id:t.chat_id||"",is_mobile:this.is_mobile?"1":"0"},i.dispatchEvent(new CustomEvent("joinchat:track",{detail:{params:t,payload:e},cancelable:!0})))&&(t=new URLSearchParams(e),this.settings.tracking_nonce&&t.set("nonce",this.settings.tracking_nonce),"function"==typeof navigator.sendBeacon?navigator.sendBeacon(this.settings.tracking_url,t):fetch(this.settings.tracking_url,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},body:t.toString(),keepalive:!0,credentials:"same-origin"}).catch(()=>{}))},a.open_whatsapp=function(t,e,n="unknown"){t=t||this.settings.telephone,e=void 0!==e?e:this.settings.message_send||"";t={link:this.get_wa_link(t,e),chat_channel:"whatsapp",chat_id:t,chat_message:e,trigger:n};i.dispatchEvent(new CustomEvent("joinchat:open",{detail:t,cancelable:!0}))&&(this.track_click(t),this.send_event(t),c.open(t.link,"joinchat","noopener"))},a.qr=function(t,e){var n=i.createElement("CANVAS");return QrCreator.render(Object.assign({text:t,radius:.4,background:"#FFF",size:200*(c.devicePixelRatio||1)},this.settings.qr||{},e||{}),n),n};var t=()=>{if(i.addEventListener("click",function(t){t.target.closest('.joinchat_open, .joinchat_app, a[href="#joinchat"], a[href="#whatsapp"]')&&(t.preventDefault(),a.open_whatsapp(t.target.dataset.phone,t.target.dataset.message,"trigger"))}),a.can_qr&&!a.is_mobile?i.querySelectorAll(".joinchat-button__qr").forEach(t=>t.appendChild(a.qr(a.get_wa_link(t.dataset.phone,t.dataset.message,!1)))):i.querySelectorAll(".wp-block-joinchat-button figure").forEach(t=>t.remove()),void 0!==a.settings.sku&&"function"==typeof jQuery){let n=a.settings.message_send;jQuery("form.variations_form").on("found_variation reset_data",function(t,e){e=e&&e.sku||a.settings.sku;a.settings.message_send=n.replace(/<jc-sku>.*<\/jc-sku>/g,e)})}};"loading"!==i.readyState?t():i.addEventListener("DOMContentLoaded",t)})(window,document,window.joinchat_obj||{});
// source --> https://mfrash.com/wp-content/plugins/woocommerce/assets/js/sourcebuster/sourcebuster.min.js?ver=10.7.0 
!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)});
// source --> https://mfrash.com/wp-content/plugins/woocommerce/assets/js/frontend/order-attribution.min.js?ver=10.7.0 
!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);
// source --> https://mfrash.com/wp-content/plugins/woo-discount-rules-pro/Assets/Js/awdr_pro.js?ver=2.6.14 
/* global jQuery, ajaxurl, wdr_data */
(function ($) {
    $(document).ready(function () {
        $(document).on("click", ".awdr_change_product", function() {
            var product_id = $(this).attr('data-pid');
            var rule_unique_id = $(this).attr('data-rule_id');
            var parent_id = $(this).attr('data-parent_id');

            var data = {
                action: 'awdr_change_discount_product_in_cart',
                product_id: product_id,
                rule_unique_id: rule_unique_id,
                parent_id: parent_id,
                awdr_nonce: awdr_params.nonce,
            };
            $.ajax({
                url: awdr_params.ajaxurl,
                data: data,
                type: 'POST',
                success: function (response) {
                    if(response.success == true){
                        if(response.data == 1){
                            jQuery("[name='update_cart']").removeAttr('disabled');
                            jQuery("[name='update_cart']").trigger("click");
                        }
                    }
                },
                error: function (response) {
                }
            });
        });

        var acc = document.getElementsByClassName("awdr-select-free-variant-product-toggle");
        var i;

        //for (i = 0; i < acc.length; i++) {
        $(document).on("click",'.awdr-select-free-variant-product-toggle' , function (e) {
                e.preventDefault();
                this.classList.toggle("awdr-select-free-variant-product-toggle-active");
                var panel = this.nextElementSibling;
                if (panel.style.display === "block") {
                    ///  panel.style.display = "none";
                    $(panel).slideUp(1000);
                } else {
                    $(panel).slideDown(1000);
                    ///panel.style.display = "block";
                }
            });
        //}
    });
})(jQuery);
// source --> https://mfrash.com/wp-content/plugins/js_composer/assets/js/dist/js_composer_front.min.js?ver=8.7.2 
document.documentElement.className+=" js_active ",document.documentElement.className+="ontouchstart"in document.documentElement?" vc_mobile ":" vc_desktop ",(()=>{for(var e=["-webkit-","-moz-","-ms-","-o-",""],t=0;t<e.length;t++)e[t]+"transform"in document.documentElement.style&&(document.documentElement.className+=" vc_transform ")})(),(c=>{"function"!=typeof window.vc_js&&(window.vc_js=function(){vc_toggleBehaviour(),vc_tabsBehaviour(),vc_accordionBehaviour(),vc_teaserGrid(),vc_carouselBehaviour(),vc_slidersBehaviour(),vc_prettyPhoto(),vc_pinterest(),vc_progress_bar(),vc_plugin_flexslider(),vc_gridBehaviour(),vc_rowBehaviour(),vc_prepareHoverBox(),vc_googleMapsPointer(),vc_ttaActivation(),vc_ttaToggleBehaviour(),jQuery(document).trigger("vc_js"),window.setTimeout(vc_waypoints,500)}),"function"!=typeof window.vc_plugin_flexslider&&(window.vc_plugin_flexslider=function(e){(e?e.find(".wpb_flexslider"):jQuery(".wpb_flexslider")).each(function(){var e=jQuery(this),t=1e3*parseInt(e.attr("data-interval"),10),i=e.attr("data-flex_fx"),o=0==t?!1:!0;e.is(":visible")&&setTimeout(function(){e.flexslider({animation:i,slideshow:o,slideshowSpeed:t,sliderSpeed:800,smoothHeight:!0})},1)})}),"function"!=typeof window.vc_googleplus&&(window.vc_googleplus=function(){var e,t;0<jQuery(".wpb_googleplus").length&&((e=document.createElement("script")).type="text/javascript",e.async=!0,e.src="https://apis.google.com/js/plusone.js",(t=document.getElementsByTagName("script")[0]).parentNode.insertBefore(e,t))}),"function"!=typeof window.vc_pinterest&&(window.vc_pinterest=function(){var e,t;0<jQuery(".wpb_pinterest").length&&((e=document.createElement("script")).type="text/javascript",e.async=!0,e.src="https://assets.pinterest.com/js/pinit.js",(t=document.getElementsByTagName("script")[0]).parentNode.insertBefore(e,t))}),"function"!=typeof window.vc_progress_bar&&(window.vc_progress_bar=function(){void 0!==jQuery.fn.vcwaypoint&&jQuery(".vc_progress_bar").each(function(){var e=jQuery(this);e.vcwaypoint(function(){e.find(".vc_single_bar").each(function(e){var t=jQuery(this).find(".vc_bar"),i=t.data("percentage-value");setTimeout(function(){t.css({width:i+"%"})},200*e)})},{offset:"85%"})})}),"function"!=typeof window.vc_waypoints&&(window.vc_waypoints=function(){void 0!==jQuery.fn.vcwaypoint&&jQuery(".wpb_animate_when_almost_visible:not(.wpb_start_animation)").each(function(){var e=jQuery(this);e.vcwaypoint(function(){e.addClass("wpb_start_animation animated")},{offset:"85%"})})}),"function"!=typeof window.vc_toggleBehaviour&&(window.vc_toggleBehaviour=function(e){function t(e){e&&e.preventDefault&&e.preventDefault();var t=jQuery(this).closest(".vc_toggle"),e=t.find(".vc_toggle_content");t.hasClass("vc_toggle_active")?e.slideUp({duration:300,complete:function(){t.removeClass("vc_toggle_active")}}):e.slideDown({duration:300,complete:function(){t.addClass("vc_toggle_active")}})}(e?e.hasClass("vc_toggle_title")?e.unbind("click"):e.find(".vc_toggle_title").off("click"):jQuery(".vc_toggle_title").off("click")).on("click",t)}),"function"!=typeof window.vc_ttaToggleBehaviour&&(window.vc_ttaToggleBehaviour=function(e){function t(){var e=jQuery(this);e.toggleClass("wpb-tta-toggle-active"),e.parent().parent().parent().find(".vc_pagination-item").each(function(){if(!c(this).hasClass("vc_active"))return c(this).find("a").click(),!1})}(e?e.find(".wpb-tta-toggle"):jQuery(".wpb-tta-toggle")).off("click").on("click",t),setTimeout(function(){jQuery(".wpb-tta-toggle").each(function(){var e=jQuery(this);e.parent().parent().parent().find(".vc_tta-panels-container .vc_pagination li:first").hasClass("vc_active")||e.addClass("wpb-tta-toggle-active")})},1e3)}),"function"!=typeof window.vc_tabsBehaviour&&(window.vc_tabsBehaviour=function(e){var t,o;jQuery.ui&&(e=e||jQuery(".wpb_tabs, .wpb_tour"),t=jQuery.ui&&jQuery.ui.version?jQuery.ui.version.split("."):"1.10",o=1===parseInt(t[0],10)&&parseInt(t[1],10)<9,e.each(function(){var e=jQuery(this).attr("data-interval"),t=[],i=jQuery(this).find(".wpb_tour_tabs_wrapper").tabs({show:function(e,t){wpb_prepare_tab_content(e,t)},activate:function(e,t){wpb_prepare_tab_content(e,t)}});if(e&&0<e)try{i.tabs("rotate",1e3*e)}catch(e){window.console&&window.console.warn&&console.warn("tabs behaviours error",e)}jQuery(this).find(".wpb_tab").each(function(){t.push(this.id)}),jQuery(this).find(".wpb_tabs_nav li").on("click",function(e){return e&&e.preventDefault&&e.preventDefault(),o?i.tabs("select",jQuery("a",this).attr("href")):i.tabs("option","active",jQuery(this).index()),!1}),jQuery(this).find(".wpb_prev_slide a, .wpb_next_slide a").on("click",function(e){var t;e&&e.preventDefault&&e.preventDefault(),o?(t=i.tabs("option","selected"),jQuery(this).parent().hasClass("wpb_next_slide")?t++:t--,t<0?t=i.tabs("length")-1:t>=i.tabs("length")&&(t=0),i.tabs("select",t)):(t=i.tabs("option","active"),e=i.find(".wpb_tab").length,t=jQuery(this).parent().hasClass("wpb_next_slide")?e<=t+1?0:t+1:t-1<0?e-1:t-1,i.tabs("option","active",t))})}))}),"function"!=typeof window.vc_accordionBehaviour&&(window.vc_accordionBehaviour=function(){jQuery(".wpb_accordion").each(function(){var e=jQuery(this),t=(e.attr("data-interval"),!isNaN(jQuery(this).data("active-tab"))&&0<parseInt(e.data("active-tab"),10)&&parseInt(e.data("active-tab"),10)-1),i=!1===t||"yes"===e.data("collapsible"),t=e.find(".wpb_accordion_wrapper").accordion({header:"> div > h3",autoHeight:!1,heightStyle:"content",active:t,collapsible:i,navigation:!0,activate:vc_accordionActivate,change:function(e,t){void 0!==jQuery.fn.isotope&&t.newContent.find(".isotope").isotope("layout"),vc_carouselBehaviour(t.newPanel)}});!0===e.data("vcDisableKeydown")&&(t.data("uiAccordion")._keydown=function(){})})}),"function"!=typeof window.vc_teaserGrid&&(window.vc_teaserGrid=function(){var o={fitrows:"fitRows",masonry:"masonry"};jQuery(".wpb_grid .teaser_grid_container:not(.wpb_carousel), .wpb_filtered_grid .teaser_grid_container:not(.wpb_carousel)").each(function(){var e=jQuery(this),t=e.find(".wpb_thumbnails"),i=t.attr("data-layout-mode");t.isotope({itemSelector:".isotope-item",layoutMode:void 0===o[i]?"fitRows":o[i]}),e.find(".categories_filter a").data("isotope",t).on("click",function(e){e&&e.preventDefault&&e.preventDefault();e=jQuery(this).data("isotope");jQuery(this).parent().parent().find(".active").removeClass("active"),jQuery(this).parent().addClass("active"),e.isotope({filter:jQuery(this).attr("data-filter")})}),jQuery(window).on("load resize",function(){t.isotope("layout")})})}),"function"!=typeof window.vc_carouselBehaviour&&(window.vc_carouselBehaviour=function(e){(e?e.find(".wpb_carousel"):jQuery(".wpb_carousel")).each(function(){var e=jQuery(this);!0!==e.data("carousel_enabled")&&e.is(":visible")&&(e.data("carousel_enabled",!0),getColumnsCount(jQuery(this)),jQuery(this).hasClass("columns_count_1"),(e=jQuery(this).find(".wpb_thumbnails-fluid li")).css({"margin-right":e.css("margin-left"),"margin-left":0}),(e=jQuery(this).find("ul.wpb_thumbnails-fluid")).width(e.width()+300))})}),"function"!=typeof window.vc_slidersBehaviour&&(window.vc_slidersBehaviour=function(){jQuery(".wpb_gallery_slides").each(function(){var e,t,i=jQuery(this);i.hasClass("wpb_slider_nivo")?(0===(t=1e3*i.attr("data-interval"))&&(t=9999999999),jQuery.fn.nivoSlider&&!i.data("nivo-initialized")&&(i.data("nivo-initialized",!0),i.find(".nivoSlider").nivoSlider({effect:"boxRainGrow,boxRain,boxRainReverse,boxRainGrowReverse",slices:15,boxCols:8,boxRows:4,animSpeed:800,pauseTime:t,startSlide:0,directionNav:!0,directionNavHide:!0,controlNav:!0,keyboardNav:!1,pauseOnHover:!0,manualAdvance:!1,prevText:"Prev",nextText:"Next"}))):i.hasClass("wpb_image_grid")&&i.find(".wpb_image_grid_ul")&&i.find(".wpb_image_grid_ul").isotope&&(jQuery.fn.imagesLoaded?e=i.find(".wpb_image_grid_ul").imagesLoaded(function(){e.isotope({itemSelector:".isotope-item",layoutMode:"fitRows",percentPosition:!0})}):i.find(".wpb_image_grid_ul").isotope({itemSelector:".isotope-item",layoutMode:"fitRows",percentPosition:!0}))})}),"function"!=typeof window.vc_prettyPhoto&&(window.vc_prettyPhoto=function(){try{jQuery&&jQuery.fn&&jQuery.fn.prettyPhoto&&jQuery('a.prettyphoto, .gallery-icon a[href*=".jpg"]').prettyPhoto({animationSpeed:"normal",hook:"data-rel",padding:15,opacity:.7,showTitle:!0,allowresize:!0,counter_separator_label:"/",hideflash:!1,deeplinking:!1,modal:!1,callback:function(){-1<location.href.indexOf("#!prettyPhoto")&&(location.hash="")},social_tools:""})}catch(e){window.console&&window.console.warn&&window.console.warn("vc_prettyPhoto initialize error",e)}}),"function"!=typeof window.vc_google_fonts&&(window.vc_google_fonts=function(){return window.console&&window.console.warn&&window.console.warn("function vc_google_fonts is deprecated, no need to use it"),!1}),window.vcParallaxSkroll=!1,"function"!=typeof window.vc_rowBehaviour&&(window.vc_rowBehaviour=function(){var s=window.jQuery;function e(){var e;void 0!==window.wpb_disable_full_width_row_js&&window.wpb_disable_full_width_row_js||(e=s('[data-vc-full-width="true"]'),s.each(e,function(){var e,t,i,o,n,a,r,c=s(this),d=(c.addClass("vc_hidden"),c.next(".vc_row-full-width"));(d=d.length?d:c.parent().next(".vc_row-full-width")).length&&(c.removeAttr("data-vc-full-width-temp"),e=parseInt(c.css("margin-left"),10),t=parseInt(c.css("margin-right"),10),i=0-d.offset().left-e,o=s(window).width(),n={position:"relative",left:i="rtl"===c.css("direction")?(i=i-d.width()+o)+e+t:i,"box-sizing":"border-box",width:o,"max-width":o},c.css(n),c.data("vcStretchContent")||("rtl"===c.css("direction")?((a=i)<0&&(a=0),(r=i)<0&&(r=0)):(r=o-(a=(a=-1*i)<0?0:a)-d.width()+e+t)<0&&(r=0),c.css({"padding-left":a+"px","padding-right":r+"px"})),c.attr("data-vc-full-width-init","true"),c.removeClass("vc_hidden"),s(document).trigger("vc-full-width-row-single",{el:c,offset:i,marginLeft:e,marginRight:t,elFull:d,width:o,maxWidth:o}))}),s(document).trigger("vc-full-width-row",e))}function t(){var e,t,i=s(".vc_row-o-full-height:first");i.length&&(e=s(window).height(),(t=i.offset().top)<e)&&i.css("min-height",100-t/(e/100)+"vh"),s(document).trigger("vc-full-height-row",i)}s(window).off("resize.vcRowBehaviour").on("resize.vcRowBehaviour",e).on("resize.vcRowBehaviour",t),e(),t(),(0<window.navigator.userAgent.indexOf("MSIE ")||navigator.userAgent.match(/Trident.*rv\:11\./))&&s(".vc_row-o-full-height").each(function(){"flex"===s(this).css("display")&&s(this).wrap('<div class="vc_ie-flexbox-fixer"></div>')}),vc_initVideoBackgrounds();var n=!1;if(window.vcParallaxSkroll&&window.vcParallaxSkroll.destroy(),s(".vc_parallax-inner").remove(),s("[data-5p-top-bottom]").removeAttr("data-5p-top-bottom data-30p-top-bottom"),s("[data-vc-parallax]").each(function(){var e,t,i,o;n=!0,"on"===s(this).data("vcParallaxOFade")&&s(this).children().attr("data-5p-top-bottom","opacity:0;").attr("data-30p-top-bottom","opacity:1;"),e=100*s(this).data("vcParallax"),(t=s("<div />").addClass("vc_parallax-inner").appendTo(s(this))).height(e+"%"),i=s(this).data("vcParallaxImage"),(o=vcExtractYoutubeId(i))?insertYoutubeVideoAsBackground(t,o):void 0!==i&&t.css("background-image","url("+i+")"),t.attr("data-bottom-top","top: "+-(e-100)+"%;").attr("data-top-bottom","top: 0%;")}),n&&window.skrollr)window.vcParallaxSkroll=skrollr.init({forceHeight:!1,smoothScrolling:!1,mobileCheck:function(){return!1}}),window.vcParallaxSkroll}),"function"!=typeof window.vc_gridBehaviour&&(window.vc_gridBehaviour=function(){jQuery.fn.vcGrid&&jQuery("[data-vc-grid]").vcGrid()}),"function"!=typeof window.getColumnsCount&&(window.getColumnsCount=function(e){for(var t=!1,i=1;!1===t;){if(e.hasClass("columns_count_"+i))return t=!0,i;i++}}),"function"!=typeof window.wpb_prepare_tab_content&&(window.wpb_prepare_tab_content=function(e,t){var i=t.panel||t.newPanel,o=i.find(".vc_pie_chart:not(.vc_ready)"),n=i.find(".vc_round-chart"),a=i.find(".vc_line-chart"),r=i.find('[data-ride="vc_carousel"]');vc_carouselBehaviour(),vc_plugin_flexslider(i),t.newPanel.find(".vc_masonry_media_grid, .vc_masonry_grid").length&&t.newPanel.find(".vc_masonry_media_grid, .vc_masonry_grid").each(function(){var e=jQuery(this).data("vcGrid");e&&e.gridBuilder&&e.gridBuilder.setMasonry&&e.gridBuilder.setMasonry()}),i.find(".vc_masonry_media_grid, .vc_masonry_grid").length&&i.find(".vc_masonry_media_grid, .vc_masonry_grid").each(function(){var e=jQuery(this).data("vcGrid");e&&e.gridBuilder&&e.gridBuilder.setMasonry&&e.gridBuilder.setMasonry()}),o.length&&jQuery.fn.vcChat&&o.vcChat(),n.length&&jQuery.fn.vcRoundChart&&n.vcRoundChart({reload:!1}),a.length&&jQuery.fn.vcLineChart&&a.vcLineChart({reload:!1}),r.length&&jQuery.fn.carousel&&r.carousel("resizeAction"),t=i.find(".isotope, .wpb_image_grid_ul"),o=i.find(".wpb_gmaps_widget"),0<t.length&&t.isotope("layout"),o.length&&!o.is(".map_ready")&&((n=o.find("iframe")).attr("src",n.attr("src")),o.addClass("map_ready")),i.parents(".isotope").length&&i.parents(".isotope").each(function(){jQuery(this).isotope("layout")}),c(document).trigger("wpb_prepare_tab_content",i)}),"function"!=typeof window.vc_ttaActivation&&(window.vc_ttaActivation=function(){jQuery("[data-vc-accordion]").on("show.vc.accordion",function(e){var t=window.jQuery,i={};i.newPanel=t(this).data("vc.accordion").getTarget(),window.wpb_prepare_tab_content(e,i)})}),"function"!=typeof window.vc_accordionActivate&&(window.vc_accordionActivate=function(e,t){var i,o,n,a;t.newPanel.length&&t.newHeader.length&&(i=t.newPanel.find(".vc_pie_chart:not(.vc_ready)"),o=t.newPanel.find(".vc_round-chart"),n=t.newPanel.find(".vc_line-chart"),a=t.newPanel.find('[data-ride="vc_carousel"]'),void 0!==jQuery.fn.isotope&&t.newPanel.find(".isotope, .wpb_image_grid_ul").isotope("layout"),t.newPanel.find(".vc_masonry_media_grid, .vc_masonry_grid").length&&t.newPanel.find(".vc_masonry_media_grid, .vc_masonry_grid").each(function(){var e=jQuery(this).data("vcGrid");e&&e.gridBuilder&&e.gridBuilder.setMasonry&&e.gridBuilder.setMasonry()}),vc_carouselBehaviour(t.newPanel),vc_plugin_flexslider(t.newPanel),i.length&&jQuery.fn.vcChat&&i.vcChat(),o.length&&jQuery.fn.vcRoundChart&&o.vcRoundChart({reload:!1}),n.length&&jQuery.fn.vcLineChart&&n.vcLineChart({reload:!1}),a.length&&jQuery.fn.carousel&&a.carousel("resizeAction"),t.newPanel.parents(".isotope").length)&&t.newPanel.parents(".isotope").each(function(){jQuery(this).isotope("layout")})}),"function"!=typeof window.initVideoBackgrounds&&(window.initVideoBackgrounds=function(){return window.console&&window.console.warn&&window.console.warn("this function is deprecated use vc_initVideoBackgrounds"),vc_initVideoBackgrounds()}),"function"!=typeof window.vc_initVideoBackgrounds&&(window.vc_initVideoBackgrounds=function(){c(".vc_video-bg").remove(),c("[data-vc-video-bg]").each(function(){var e,i=jQuery(this);i.data("vcVideoBg")?(e=i.data("vcVideoBg"),(e=vcExtractYoutubeId(e))&&(i.find(".vc_video-bg").remove(),insertYoutubeVideoAsBackground(i,e)),jQuery(window).on("grid:items:added",function(e,t){i.has(t).length&&vcResizeVideoBackground(i)})):i.find(".vc_video-bg").remove()})}),"function"!=typeof window.insertYoutubeVideoAsBackground&&(window.insertYoutubeVideoAsBackground=function(e,t,i){if("undefined"==typeof YT||void 0===YT.Player)return 100<(i=void 0===i?0:i)?void console.warn("Too many attempts to load YouTube api"):void setTimeout(function(){insertYoutubeVideoAsBackground(e,t,i++)},100);var o=e.prepend('<div class="vc_video-bg"><div class="inner"></div></div>').find(".inner");new YT.Player(o[0],{width:"100%",height:"100%",videoId:t,playerVars:{playlist:t,iv_load_policy:3,enablejsapi:1,disablekb:1,autoplay:1,controls:0,showinfo:0,rel:0,loop:1,mute:1,wmode:"transparent"},events:{onReady:function(e){e.target.mute().setLoop(!0)}}}),vcResizeVideoBackground(e),jQuery(window).on("resize",function(){vcResizeVideoBackground(e)})}),"function"!=typeof window.vcResizeVideoBackground&&(window.vcResizeVideoBackground=function(e){var t,i,o,n,a=e.innerWidth(),r=e.innerHeight();a/r<16/9?(t=r*(16/9),i=r,o=-Math.round((t-a)/2)+"px",n=-Math.round((i-r)/2)+"px"):(i=(t=a)*(9/16),n=-Math.round((i-r)/2)+"px",o=-Math.round((t-a)/2)+"px"),t+="px",i+="px",e.find(".vc_video-bg iframe").css({maxWidth:"1000%",marginLeft:o,marginTop:n,width:t,height:i})}),"function"!=typeof window.vcExtractYoutubeId&&(window.vcExtractYoutubeId=function(e){return void 0!==e&&null!==(e=e.match(/(?:https?:\/{2})?(?:w{3}\.)?youtu(?:be)?\.(?:com|be)(?:\/watch\?v=|\/)([^\s&]+)/))&&e[1]}),"function"!=typeof window.vc_googleMapsPointer&&(window.vc_googleMapsPointer=function(){var e=window.jQuery,t=e(".wpb_gmaps_widget");t.on("click",function(){e("iframe",this).css("pointer-events","auto")}),t.on("mouseleave",function(){e("iframe",this).css("pointer-events","none")}),e(".wpb_gmaps_widget iframe").css("pointer-events","none")}),"function"!=typeof window.vc_setHoverBoxPerspective&&(window.vc_setHoverBoxPerspective=function(e){e.each(function(){var e=jQuery(this),t=e.width();e.css("perspective",4*t+"px")})}),"function"!=typeof window.vc_setHoverBoxHeight&&(window.vc_setHoverBoxHeight=function(e){e.each(function(){var e=jQuery(this),t=e.find(".vc-hoverbox-inner"),i=(t.css("min-height",0),e.find(".vc-hoverbox-front-inner").outerHeight()),e=e.find(".vc-hoverbox-back-inner").outerHeight(),i=e<i?i:e;t.css("min-height",(i=i<250?250:i)+"px")})}),"function"!=typeof window.vc_prepareHoverBox&&(window.vc_prepareHoverBox=function(){var e=jQuery(".vc-hoverbox");vc_setHoverBoxHeight(e),vc_setHoverBoxPerspective(e)}),jQuery(document).ready(window.vc_prepareHoverBox),jQuery(window).on("resize",window.vc_prepareHoverBox),jQuery(document).ready(function(){window.vc_js()})})(window.jQuery);
// source --> https://mfrash.com/wp-content/themes/porto/js/bootstrap.js?ver=5.0.1 
/*!
  * Bootstrap v5.0.1 (https://getbootstrap.com/)
  * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
  */
(function (global, factory) {
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
  typeof define === 'function' && define.amd ? define(factory) :
  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.bootstrap = factory());
}(this, (function () { 'use strict';

  /**
   * --------------------------------------------------------------------------
   * Bootstrap (v5.0.1): dom/selector-engine.js
   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
   * --------------------------------------------------------------------------
   */

  /**
   * ------------------------------------------------------------------------
   * Constants
   * ------------------------------------------------------------------------
   */
  const NODE_TEXT = 3;
  const SelectorEngine = {
    find(selector, element = document.documentElement) {
      return [].concat(...Element.prototype.querySelectorAll.call(element, selector));
    },

    findOne(selector, element = document.documentElement) {
      return Element.prototype.querySelector.call(element, selector);
    },

    children(element, selector) {
      return [].concat(...element.children).filter(child => child.matches(selector));
    },

    parents(element, selector) {
      const parents = [];
      let ancestor = element.parentNode;

      while (ancestor && ancestor.nodeType === Node.ELEMENT_NODE && ancestor.nodeType !== NODE_TEXT) {
        if (ancestor.matches(selector)) {
          parents.push(ancestor);
        }

        ancestor = ancestor.parentNode;
      }

      return parents;
    },

    prev(element, selector) {
      let previous = element.previousElementSibling;

      while (previous) {
        if (previous.matches(selector)) {
          return [previous];
        }

        previous = previous.previousElementSibling;
      }

      return [];
    },

    next(element, selector) {
      let next = element.nextElementSibling;

      while (next) {
        if (next.matches(selector)) {
          return [next];
        }

        next = next.nextElementSibling;
      }

      return [];
    }

  };

  /**
   * --------------------------------------------------------------------------
   * Bootstrap (v5.0.1): util/index.js
   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
   * --------------------------------------------------------------------------
   */

  const MAX_UID = 1000000;
  const MILLISECONDS_MULTIPLIER = 1000;
  const TRANSITION_END = 'transitionend'; // Shoutout AngusCroll (https://goo.gl/pxwQGp)

  const toType = obj => {
    if (obj === null || obj === undefined) {
      return `${obj}`;
    }

    return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
  };
  /**
   * --------------------------------------------------------------------------
   * Public Util Api
   * --------------------------------------------------------------------------
   */


  const getUID = prefix => {
    do {
      prefix += Math.floor(Math.random() * MAX_UID);
    } while (document.getElementById(prefix));

    return prefix;
  };

  const getSelector = element => {
    let selector = element.getAttribute('data-bs-target');

    if (!selector || selector === '#') {
      let hrefAttr = element.getAttribute('href'); // The only valid content that could double as a selector are IDs or classes,
      // so everything starting with `#` or `.`. If a "real" URL is used as the selector,
      // `document.querySelector` will rightfully complain it is invalid.
      // See https://github.com/twbs/bootstrap/issues/32273

      if (!hrefAttr || !hrefAttr.includes('#') && !hrefAttr.startsWith('.')) {
        return null;
      } // Just in case some CMS puts out a full URL with the anchor appended


      if (hrefAttr.includes('#') && !hrefAttr.startsWith('#')) {
        hrefAttr = `#${hrefAttr.split('#')[1]}`;
      }

      selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null;
    }

    return selector;
  };

  const getSelectorFromElement = element => {
    const selector = getSelector(element);

    if (selector) {
      return document.querySelector(selector) ? selector : null;
    }

    return null;
  };

  const getElementFromSelector = element => {
    const selector = getSelector(element);
    return selector ? document.querySelector(selector) : null;
  };

  const getTransitionDurationFromElement = element => {
    if (!element) {
      return 0;
    } // Get transition-duration of the element


    let {
      transitionDuration,
      transitionDelay
    } = window.getComputedStyle(element);
    const floatTransitionDuration = Number.parseFloat(transitionDuration);
    const floatTransitionDelay = Number.parseFloat(transitionDelay); // Return 0 if element or transition duration is not found

    if (!floatTransitionDuration && !floatTransitionDelay) {
      return 0;
    } // If multiple durations are defined, take the first


    transitionDuration = transitionDuration.split(',')[0];
    transitionDelay = transitionDelay.split(',')[0];
    return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER;
  };

  const triggerTransitionEnd = element => {
    element.dispatchEvent(new Event(TRANSITION_END));
  };

  const isElement$1 = obj => {
    if (!obj || typeof obj !== 'object') {
      return false;
    }

    if (typeof obj.jquery !== 'undefined') {
      obj = obj[0];
    }

    return typeof obj.nodeType !== 'undefined';
  };

  const getElement = obj => {
    if (isElement$1(obj)) {
      // it's a jQuery object or a node element
      return obj.jquery ? obj[0] : obj;
    }

    if (typeof obj === 'string' && obj.length > 0) {
      return SelectorEngine.findOne(obj);
    }

    return null;
  };

  const emulateTransitionEnd = (element, duration) => {
    let called = false;
    const durationPadding = 5;
    const emulatedDuration = duration + durationPadding;

    function listener() {
      called = true;
      element.removeEventListener(TRANSITION_END, listener);
    }

    element.addEventListener(TRANSITION_END, listener);
    setTimeout(() => {
      if (!called) {
        triggerTransitionEnd(element);
      }
    }, emulatedDuration);
  };

  const typeCheckConfig = (componentName, config, configTypes) => {
    Object.keys(configTypes).forEach(property => {
      const expectedTypes = configTypes[property];
      const value = config[property];
      const valueType = value && isElement$1(value) ? 'element' : toType(value);

      if (!new RegExp(expectedTypes).test(valueType)) {
        throw new TypeError(`${componentName.toUpperCase()}: Option "${property}" provided type "${valueType}" but expected type "${expectedTypes}".`);
      }
    });
  };

  const isVisible = element => {
    if (!element) {
      return false;
    }

    if (element.style && element.parentNode && element.parentNode.style) {
      const elementStyle = getComputedStyle(element);
      const parentNodeStyle = getComputedStyle(element.parentNode);
      return elementStyle.display !== 'none' && parentNodeStyle.display !== 'none' && elementStyle.visibility !== 'hidden';
    }

    return false;
  };

  const isDisabled = element => {
    if (!element || element.nodeType !== Node.ELEMENT_NODE) {
      return true;
    }

    if (element.classList.contains('disabled')) {
      return true;
    }

    if (typeof element.disabled !== 'undefined') {
      return element.disabled;
    }

    return element.hasAttribute('disabled') && element.getAttribute('disabled') !== 'false';
  };

  const findShadowRoot = element => {
    if (!document.documentElement.attachShadow) {
      return null;
    } // Can find the shadow root otherwise it'll return the document


    if (typeof element.getRootNode === 'function') {
      const root = element.getRootNode();
      return root instanceof ShadowRoot ? root : null;
    }

    if (element instanceof ShadowRoot) {
      return element;
    } // when we don't find a shadow root


    if (!element.parentNode) {
      return null;
    }

    return findShadowRoot(element.parentNode);
  };

  const noop = () => {};

  const reflow = element => element.offsetHeight;

  const getjQuery = () => {
    const {
      jQuery
    } = window;

    if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {
      return jQuery;
    }

    return null;
  };

  const onDOMContentLoaded = callback => {
    if (document.readyState === 'loading') {
      document.addEventListener('DOMContentLoaded', callback);
    } else {
      callback();
    }
  };

  const isRTL = () => document.documentElement.dir === 'rtl';

  const defineJQueryPlugin = plugin => {
    onDOMContentLoaded(() => {
      const $ = getjQuery();
      /* istanbul ignore if */

      if ($) {
        const name = plugin.NAME;
        const JQUERY_NO_CONFLICT = $.fn[name];
        $.fn[name] = plugin.jQueryInterface;
        $.fn[name].Constructor = plugin;

        $.fn[name].noConflict = () => {
          $.fn[name] = JQUERY_NO_CONFLICT;
          return plugin.jQueryInterface;
        };
      }
    });
  };

  const execute = callback => {
    if (typeof callback === 'function') {
      callback();
    }
  };

  /**
   * --------------------------------------------------------------------------
   * Bootstrap (v5.0.1): dom/data.js
   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
   * --------------------------------------------------------------------------
   */

  /**
   * ------------------------------------------------------------------------
   * Constants
   * ------------------------------------------------------------------------
   */
  const elementMap = new Map();
  var Data = {
    set(element, key, instance) {
      if (!elementMap.has(element)) {
        elementMap.set(element, new Map());
      }

      const instanceMap = elementMap.get(element); // make it clear we only want one instance per element
      // can be removed later when multiple key/instances are fine to be used

      if (!instanceMap.has(key) && instanceMap.size !== 0) {
        // eslint-disable-next-line no-console
        console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(instanceMap.keys())[0]}.`);
        return;
      }

      instanceMap.set(key, instance);
    },

    get(element, key) {
      if (elementMap.has(element)) {
        return elementMap.get(element).get(key) || null;
      }

      return null;
    },

    remove(element, key) {
      if (!elementMap.has(element)) {
        return;
      }

      const instanceMap = elementMap.get(element);
      instanceMap.delete(key); // free up element references if there are no instances left for an element

      if (instanceMap.size === 0) {
        elementMap.delete(element);
      }
    }

  };

  /**
   * --------------------------------------------------------------------------
   * Bootstrap (v5.0.1): dom/event-handler.js
   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
   * --------------------------------------------------------------------------
   */
  /**
   * ------------------------------------------------------------------------
   * Constants
   * ------------------------------------------------------------------------
   */

  const namespaceRegex = /[^.]*(?=\..*)\.|.*/;
  const stripNameRegex = /\..*/;
  const stripUidRegex = /::\d+$/;
  const eventRegistry = {}; // Events storage

  let uidEvent = 1;
  const customEvents = {
    mouseenter: 'mouseover',
    mouseleave: 'mouseout'
  };
  const customEventsRegex = /^(mouseenter|mouseleave)/i;
  const nativeEvents = new Set(['click', 'dblclick', 'mouseup', 'mousedown', 'contextmenu', 'mousewheel', 'DOMMouseScroll', 'mouseover', 'mouseout', 'mousemove', 'selectstart', 'selectend', 'keydown', 'keypress', 'keyup', 'orientationchange', 'touchstart', 'touchmove', 'touchend', 'touchcancel', 'pointerdown', 'pointermove', 'pointerup', 'pointerleave', 'pointercancel', 'gesturestart', 'gesturechange', 'gestureend', 'focus', 'blur', 'change', 'reset', 'select', 'submit', 'focusin', 'focusout', 'load', 'unload', 'beforeunload', 'resize', 'move', 'DOMContentLoaded', 'readystatechange', 'error', 'abort', 'scroll']);
  /**
   * ------------------------------------------------------------------------
   * Private methods
   * ------------------------------------------------------------------------
   */

  function getUidEvent(element, uid) {
    return uid && `${uid}::${uidEvent++}` || element.uidEvent || uidEvent++;
  }

  function getEvent(element) {
    const uid = getUidEvent(element);
    element.uidEvent = uid;
    eventRegistry[uid] = eventRegistry[uid] || {};
    return eventRegistry[uid];
  }

  function bootstrapHandler(element, fn) {
    return function handler(event) {
      event.delegateTarget = element;

      if (handler.oneOff) {
        EventHandler.off(element, event.type, fn);
      }

      return fn.apply(element, [event]);
    };
  }

  function bootstrapDelegationHandler(element, selector, fn) {
    return function handler(event) {
      const domElements = element.querySelectorAll(selector);

      for (let {
        target
      } = event; target && target !== this; target = target.parentNode) {
        for (let i = domElements.length; i--;) {
          if (domElements[i] === target) {
            event.delegateTarget = target;

            if (handler.oneOff) {
              // eslint-disable-next-line unicorn/consistent-destructuring
              EventHandler.off(element, event.type, selector, fn);
            }

            return fn.apply(target, [event]);
          }
        }
      } // To please ESLint


      return null;
    };
  }

  function findHandler(events, handler, delegationSelector = null) {
    const uidEventList = Object.keys(events);

    for (let i = 0, len = uidEventList.length; i < len; i++) {
      const event = events[uidEventList[i]];

      if (event.originalHandler === handler && event.delegationSelector === delegationSelector) {
        return event;
      }
    }

    return null;
  }

  function normalizeParams(originalTypeEvent, handler, delegationFn) {
    const delegation = typeof handler === 'string';
    const originalHandler = delegation ? delegationFn : handler;
    let typeEvent = getTypeEvent(originalTypeEvent);
    const isNative = nativeEvents.has(typeEvent);

    if (!isNative) {
      typeEvent = originalTypeEvent;
    }

    return [delegation, originalHandler, typeEvent];
  }

  function addHandler(element, originalTypeEvent, handler, delegationFn, oneOff) {
    if (typeof originalTypeEvent !== 'string' || !element) {
      return;
    }

    if (!handler) {
      handler = delegationFn;
      delegationFn = null;
    } // in case of mouseenter or mouseleave wrap the handler within a function that checks for its DOM position
    // this prevents the handler from being dispatched the same way as mouseover or mouseout does


    if (customEventsRegex.test(originalTypeEvent)) {
      const wrapFn = fn => {
        return function (event) {
          if (!event.relatedTarget || event.relatedTarget !== event.delegateTarget && !event.delegateTarget.contains(event.relatedTarget)) {
            return fn.call(this, event);
          }
        };
      };

      if (delegationFn) {
        delegationFn = wrapFn(delegationFn);
      } else {
        handler = wrapFn(handler);
      }
    }

    const [delegation, originalHandler, typeEvent] = normalizeParams(originalTypeEvent, handler, delegationFn);
    const events = getEvent(element);
    const handlers = events[typeEvent] || (events[typeEvent] = {});
    const previousFn = findHandler(handlers, originalHandler, delegation ? handler : null);

    if (previousFn) {
      previousFn.oneOff = previousFn.oneOff && oneOff;
      return;
    }

    const uid = getUidEvent(originalHandler, originalTypeEvent.replace(namespaceRegex, ''));
    const fn = delegation ? bootstrapDelegationHandler(element, handler, delegationFn) : bootstrapHandler(element, handler);
    fn.delegationSelector = delegation ? handler : null;
    fn.originalHandler = originalHandler;
    fn.oneOff = oneOff;
    fn.uidEvent = uid;
    handlers[uid] = fn;
    element.addEventListener(typeEvent, fn, delegation);
  }

  function removeHandler(element, events, typeEvent, handler, delegationSelector) {
    const fn = findHandler(events[typeEvent], handler, delegationSelector);

    if (!fn) {
      return;
    }

    element.removeEventListener(typeEvent, fn, Boolean(delegationSelector));
    delete events[typeEvent][fn.uidEvent];
  }

  function removeNamespacedHandlers(element, events, typeEvent, namespace) {
    const storeElementEvent = events[typeEvent] || {};
    Object.keys(storeElementEvent).forEach(handlerKey => {
      if (handlerKey.includes(namespace)) {
        const event = storeElementEvent[handlerKey];
        removeHandler(element, events, typeEvent, event.originalHandler, event.delegationSelector);
      }
    });
  }

  function getTypeEvent(event) {
    // allow to get the native events from namespaced events ('click.bs.button' --> 'click')
    event = event.replace(stripNameRegex, '');
    return customEvents[event] || event;
  }

  const EventHandler = {
    on(element, event, handler, delegationFn) {
      addHandler(element, event, handler, delegationFn, false);
    },

    one(element, event, handler, delegationFn) {
      addHandler(element, event, handler, delegationFn, true);
    },

    off(element, originalTypeEvent, handler, delegationFn) {
      if (typeof originalTypeEvent !== 'string' || !element) {
        return;
      }

      const [delegation, originalHandler, typeEvent] = normalizeParams(originalTypeEvent, handler, delegationFn);
      const inNamespace = typeEvent !== originalTypeEvent;
      const events = getEvent(element);
      const isNamespace = originalTypeEvent.startsWith('.');

      if (typeof originalHandler !== 'undefined') {
        // Simplest case: handler is passed, remove that listener ONLY.
        if (!events || !events[typeEvent]) {
          return;
        }

        removeHandler(element, events, typeEvent, originalHandler, delegation ? handler : null);
        return;
      }

      if (isNamespace) {
        Object.keys(events).forEach(elementEvent => {
          removeNamespacedHandlers(element, events, elementEvent, originalTypeEvent.slice(1));
        });
      }

      const storeElementEvent = events[typeEvent] || {};
      Object.keys(storeElementEvent).forEach(keyHandlers => {
        const handlerKey = keyHandlers.replace(stripUidRegex, '');

        if (!inNamespace || originalTypeEvent.includes(handlerKey)) {
          const event = storeElementEvent[keyHandlers];
          removeHandler(element, events, typeEvent, event.originalHandler, event.delegationSelector);
        }
      });
    },

    trigger(element, event, args) {
      if (typeof event !== 'string' || !element) {
        return null;
      }

      const $ = getjQuery();
      const typeEvent = getTypeEvent(event);
      const inNamespace = event !== typeEvent;
      const isNative = nativeEvents.has(typeEvent);
      let jQueryEvent;
      let bubbles = true;
      let nativeDispatch = true;
      let defaultPrevented = false;
      let evt = null;

      if (inNamespace && $) {
        jQueryEvent = $.Event(event, args);
        $(element).trigger(jQueryEvent);
        bubbles = !jQueryEvent.isPropagationStopped();
        nativeDispatch = !jQueryEvent.isImmediatePropagationStopped();
        defaultPrevented = jQueryEvent.isDefaultPrevented();
      }

      if (isNative) {
        evt = document.createEvent('HTMLEvents');
        evt.initEvent(typeEvent, bubbles, true);
      } else {
        evt = new CustomEvent(event, {
          bubbles,
          cancelable: true
        });
      } // merge custom information in our event


      if (typeof args !== 'undefined') {
        Object.keys(args).forEach(key => {
          Object.defineProperty(evt, key, {
            get() {
              return args[key];
            }

          });
        });
      }

      if (defaultPrevented) {
        evt.preventDefault();
      }

      if (nativeDispatch) {
        element.dispatchEvent(evt);
      }

      if (evt.defaultPrevented && typeof jQueryEvent !== 'undefined') {
        jQueryEvent.preventDefault();
      }

      return evt;
    }

  };

  /**
   * --------------------------------------------------------------------------
   * Bootstrap (v5.0.1): base-component.js
   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
   * --------------------------------------------------------------------------
   */
  /**
   * ------------------------------------------------------------------------
   * Constants
   * ------------------------------------------------------------------------
   */

  const VERSION = '5.0.1';

  class BaseComponent {
    constructor(element) {
      element = getElement(element);

      if (!element) {
        return;
      }

      this._element = element;
      Data.set(this._element, this.constructor.DATA_KEY, this);
    }

    dispose() {
      Data.remove(this._element, this.constructor.DATA_KEY);
      EventHandler.off(this._element, this.constructor.EVENT_KEY);
      Object.getOwnPropertyNames(this).forEach(propertyName => {
        this[propertyName] = null;
      });
    }

    _queueCallback(callback, element, isAnimated = true) {
      if (!isAnimated) {
        execute(callback);
        return;
      }

      const transitionDuration = getTransitionDurationFromElement(element);
      EventHandler.one(element, 'transitionend', () => execute(callback));
      emulateTransitionEnd(element, transitionDuration);
    }
    /** Static */


    static getInstance(element) {
      return Data.get(element, this.DATA_KEY);
    }

    static get VERSION() {
      return VERSION;
    }

    static get NAME() {
      throw new Error('You have to implement the static method "NAME", for each component!');
    }

    static get DATA_KEY() {
      return `bs.${this.NAME}`;
    }

    static get EVENT_KEY() {
      return `.${this.DATA_KEY}`;
    }

  }

  /**
   * --------------------------------------------------------------------------
   * Bootstrap (v5.0.1): alert.js
   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
   * --------------------------------------------------------------------------
   */
  /**
   * ------------------------------------------------------------------------
   * Constants
   * ------------------------------------------------------------------------
   */

  const NAME$c = 'alert';
  const DATA_KEY$b = 'bs.alert';
  const EVENT_KEY$b = `.${DATA_KEY$b}`;
  const DATA_API_KEY$8 = '.data-api';
  const SELECTOR_DISMISS = '[data-bs-dismiss="alert"]';
  const EVENT_CLOSE = `close${EVENT_KEY$b}`;
  const EVENT_CLOSED = `closed${EVENT_KEY$b}`;
  const EVENT_CLICK_DATA_API$7 = `click${EVENT_KEY$b}${DATA_API_KEY$8}`;
  const CLASS_NAME_ALERT = 'alert';
  const CLASS_NAME_FADE$6 = 'fade';
  const CLASS_NAME_SHOW$9 = 'show';
  /**
   * ------------------------------------------------------------------------
   * Class Definition
   * ------------------------------------------------------------------------
   */

  class Alert extends BaseComponent {
    // Getters
    static get NAME() {
      return NAME$c;
    } // Public


    close(element) {
      const rootElement = element ? this._getRootElement(element) : this._element;

      const customEvent = this._triggerCloseEvent(rootElement);

      if (customEvent === null || customEvent.defaultPrevented) {
        return;
      }

      this._removeElement(rootElement);
    } // Private


    _getRootElement(element) {
      return getElementFromSelector(element) || element.closest(`.${CLASS_NAME_ALERT}`);
    }

    _triggerCloseEvent(element) {
      return EventHandler.trigger(element, EVENT_CLOSE);
    }

    _removeElement(element) {
      element.classList.remove(CLASS_NAME_SHOW$9);
      const isAnimated = element.classList.contains(CLASS_NAME_FADE$6);

      this._queueCallback(() => this._destroyElement(element), element, isAnimated);
    }

    _destroyElement(element) {
      if (element.parentNode) {
        element.parentNode.removeChild(element);
      }

      EventHandler.trigger(element, EVENT_CLOSED);
    } // Static


    static jQueryInterface(config) {
      return this.each(function () {
        let data = Data.get(this, DATA_KEY$b);

        if (!data) {
          data = new Alert(this);
        }

        if (config === 'close') {
          data[config](this);
        }
      });
    }

    static handleDismiss(alertInstance) {
      return function (event) {
        if (event) {
          event.preventDefault();
        }

        alertInstance.close(this);
      };
    }

  }
  /**
   * ------------------------------------------------------------------------
   * Data Api implementation
   * ------------------------------------------------------------------------
   */


  EventHandler.on(document, EVENT_CLICK_DATA_API$7, SELECTOR_DISMISS, Alert.handleDismiss(new Alert()));
  /**
   * ------------------------------------------------------------------------
   * jQuery
   * ------------------------------------------------------------------------
   * add .Alert to jQuery only if jQuery is present
   */

  defineJQueryPlugin(Alert);

  /**
   * --------------------------------------------------------------------------
   * Bootstrap (v5.0.1): button.js
   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
   * --------------------------------------------------------------------------
   */
  /**
   * ------------------------------------------------------------------------
   * Constants
   * ------------------------------------------------------------------------
   */

  const NAME$b = 'button';
  const DATA_KEY$a = 'bs.button';
  const EVENT_KEY$a = `.${DATA_KEY$a}`;
  const DATA_API_KEY$7 = '.data-api';
  const CLASS_NAME_ACTIVE$3 = 'active';
  const SELECTOR_DATA_TOGGLE$5 = '[data-bs-toggle="button"]';
  const EVENT_CLICK_DATA_API$6 = `click${EVENT_KEY$a}${DATA_API_KEY$7}`;
  /**
   * ------------------------------------------------------------------------
   * Class Definition
   * ------------------------------------------------------------------------
   */

  class Button extends BaseComponent {
    // Getters
    static get NAME() {
      return NAME$b;
    } // Public


    toggle() {
      // Toggle class and sync the `aria-pressed` attribute with the return value of the `.toggle()` method
      this._element.setAttribute('aria-pressed', this._element.classList.toggle(CLASS_NAME_ACTIVE$3));
    } // Static


    static jQueryInterface(config) {
      return this.each(function () {
        let data = Data.get(this, DATA_KEY$a);

        if (!data) {
          data = new Button(this);
        }

        if (config === 'toggle') {
          data[config]();
        }
      });
    }

  }
  /**
   * ------------------------------------------------------------------------
   * Data Api implementation
   * ------------------------------------------------------------------------
   */


  EventHandler.on(document, EVENT_CLICK_DATA_API$6, SELECTOR_DATA_TOGGLE$5, event => {
    event.preventDefault();
    const button = event.target.closest(SELECTOR_DATA_TOGGLE$5);
    let data = Data.get(button, DATA_KEY$a);

    if (!data) {
      data = new Button(button);
    }

    data.toggle();
  });
  /**
   * ------------------------------------------------------------------------
   * jQuery
   * ------------------------------------------------------------------------
   * add .Button to jQuery only if jQuery is present
   */

  defineJQueryPlugin(Button);

  /**
   * --------------------------------------------------------------------------
   * Bootstrap (v5.0.1): dom/manipulator.js
   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
   * --------------------------------------------------------------------------
   */
  function normalizeData(val) {
    if (val === 'true') {
      return true;
    }

    if (val === 'false') {
      return false;
    }

    if (val === Number(val).toString()) {
      return Number(val);
    }

    if (val === '' || val === 'null') {
      return null;
    }

    return val;
  }

  function normalizeDataKey(key) {
    return key.replace(/[A-Z]/g, chr => `-${chr.toLowerCase()}`);
  }

  const Manipulator = {
    setDataAttribute(element, key, value) {
      element.setAttribute(`data-bs-${normalizeDataKey(key)}`, value);
    },

    removeDataAttribute(element, key) {
      element.removeAttribute(`data-bs-${normalizeDataKey(key)}`);
    },

    getDataAttributes(element) {
      if (!element) {
        return {};
      }

      const attributes = {};
      Object.keys(element.dataset).filter(key => key.startsWith('bs')).forEach(key => {
        let pureKey = key.replace(/^bs/, '');
        pureKey = pureKey.charAt(0).toLowerCase() + pureKey.slice(1, pureKey.length);
        attributes[pureKey] = normalizeData(element.dataset[key]);
      });
      return attributes;
    },

    getDataAttribute(element, key) {
      return normalizeData(element.getAttribute(`data-bs-${normalizeDataKey(key)}`));
    },

    offset(element) {
      const rect = element.getBoundingClientRect();
      return {
        top: rect.top + document.body.scrollTop,
        left: rect.left + document.body.scrollLeft
      };
    },

    position(element) {
      return {
        top: element.offsetTop,
        left: element.offsetLeft
      };
    }

  };

  /**
   * --------------------------------------------------------------------------
   * Bootstrap (v5.0.1): collapse.js
   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
   * --------------------------------------------------------------------------
   */
  /**
   * ------------------------------------------------------------------------
   * Constants
   * ------------------------------------------------------------------------
   */

  const NAME$9 = 'collapse';
  const DATA_KEY$8 = 'bs.collapse';
  const EVENT_KEY$8 = `.${DATA_KEY$8}`;
  const DATA_API_KEY$5 = '.data-api';
  const Default$8 = {
    toggle: true,
    parent: ''
  };
  const DefaultType$8 = {
    toggle: 'boolean',
    parent: '(string|element)'
  };
  const EVENT_SHOW$5 = `show${EVENT_KEY$8}`;
  const EVENT_SHOWN$5 = `shown${EVENT_KEY$8}`;
  const EVENT_HIDE$5 = `hide${EVENT_KEY$8}`;
  const EVENT_HIDDEN$5 = `hidden${EVENT_KEY$8}`;
  const EVENT_CLICK_DATA_API$4 = `click${EVENT_KEY$8}${DATA_API_KEY$5}`;
  const CLASS_NAME_SHOW$8 = 'show';
  const CLASS_NAME_COLLAPSE = 'collapse';
  const CLASS_NAME_COLLAPSING = 'collapsing';
  const CLASS_NAME_COLLAPSED = 'collapsed';
  const WIDTH = 'width';
  const HEIGHT = 'height';
  const SELECTOR_ACTIVES = '.show, .collapsing';
  const SELECTOR_DATA_TOGGLE$4 = '[data-bs-toggle="collapse"]';
  /**
   * ------------------------------------------------------------------------
   * Class Definition
   * ------------------------------------------------------------------------
   */

  class Collapse extends BaseComponent {
    constructor(element, config) {
      super(element);
      this._isTransitioning = false;
      this._config = this._getConfig(config);
      this._triggerArray = SelectorEngine.find(`${SELECTOR_DATA_TOGGLE$4}[href="#${this._element.id}"],` + `${SELECTOR_DATA_TOGGLE$4}[data-bs-target="#${this._element.id}"]`);
      const toggleList = SelectorEngine.find(SELECTOR_DATA_TOGGLE$4);

      for (let i = 0, len = toggleList.length; i < len; i++) {
        const elem = toggleList[i];
        const selector = getSelectorFromElement(elem);
        const filterElement = SelectorEngine.find(selector).filter(foundElem => foundElem === this._element);

        if (selector !== null && filterElement.length) {
          this._selector = selector;

          this._triggerArray.push(elem);
        }
      }

      this._parent = this._config.parent ? this._getParent() : null;

      if (!this._config.parent) {
        this._addAriaAndCollapsedClass(this._element, this._triggerArray);
      }

      if (this._config.toggle) {
        this.toggle();
      }
    } // Getters


    static get Default() {
      return Default$8;
    }

    static get NAME() {
      return NAME$9;
    } // Public


    toggle() {
      if (this._element.classList.contains(CLASS_NAME_SHOW$8)) {
        this.hide();
      } else {
        this.show();
      }
    }

    show() {
      if (this._isTransitioning || this._element.classList.contains(CLASS_NAME_SHOW$8)) {
        return;
      }

      let actives;
      let activesData;

      if (this._parent) {
        actives = SelectorEngine.find(SELECTOR_ACTIVES, this._parent).filter(elem => {
          if (typeof this._config.parent === 'string') {
            return elem.getAttribute('data-bs-parent') === this._config.parent;
          }

          return elem.classList.contains(CLASS_NAME_COLLAPSE);
        });

        if (actives.length === 0) {
          actives = null;
        }
      }

      const container = SelectorEngine.findOne(this._selector);

      if (actives) {
        const tempActiveData = actives.find(elem => container !== elem);
        activesData = tempActiveData ? Data.get(tempActiveData, DATA_KEY$8) : null;

        if (activesData && activesData._isTransitioning) {
          return;
        }
      }

      const startEvent = EventHandler.trigger(this._element, EVENT_SHOW$5);

      if (startEvent.defaultPrevented) {
        return;
      }

      if (actives) {
        actives.forEach(elemActive => {
          if (container !== elemActive) {
            Collapse.collapseInterface(elemActive, 'hide');
          }

          if (!activesData) {
            Data.set(elemActive, DATA_KEY$8, null);
          }
        });
      }

      const dimension = this._getDimension();

      this._element.classList.remove(CLASS_NAME_COLLAPSE);

      this._element.classList.add(CLASS_NAME_COLLAPSING);

      this._element.style[dimension] = 0;

      if (this._triggerArray.length) {
        this._triggerArray.forEach(element => {
          element.classList.remove(CLASS_NAME_COLLAPSED);
          element.setAttribute('aria-expanded', true);
        });
      }

      this.setTransitioning(true);

      const complete = () => {
        this._element.classList.remove(CLASS_NAME_COLLAPSING);

        this._element.classList.add(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW$8);

        this._element.style[dimension] = '';
        this.setTransitioning(false);
        EventHandler.trigger(this._element, EVENT_SHOWN$5);
      };

      const capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1);
      const scrollSize = `scroll${capitalizedDimension}`;

      this._queueCallback(complete, this._element, true);

      this._element.style[dimension] = `${this._element[scrollSize]}px`;
    }

    hide() {
      if (this._isTransitioning || !this._element.classList.contains(CLASS_NAME_SHOW$8)) {
        return;
      }

      const startEvent = EventHandler.trigger(this._element, EVENT_HIDE$5);

      if (startEvent.defaultPrevented) {
        return;
      }

      const dimension = this._getDimension();

      this._element.style[dimension] = `${this._element.getBoundingClientRect()[dimension]}px`;
      reflow(this._element);

      this._element.classList.add(CLASS_NAME_COLLAPSING);

      this._element.classList.remove(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW$8);

      const triggerArrayLength = this._triggerArray.length;

      if (triggerArrayLength > 0) {
        for (let i = 0; i < triggerArrayLength; i++) {
          const trigger = this._triggerArray[i];
          const elem = getElementFromSelector(trigger);

          if (elem && !elem.classList.contains(CLASS_NAME_SHOW$8)) {
            trigger.classList.add(CLASS_NAME_COLLAPSED);
            trigger.setAttribute('aria-expanded', false);
          }
        }
      }

      this.setTransitioning(true);

      const complete = () => {
        this.setTransitioning(false);

        this._element.classList.remove(CLASS_NAME_COLLAPSING);

        this._element.classList.add(CLASS_NAME_COLLAPSE);

        EventHandler.trigger(this._element, EVENT_HIDDEN$5);
      };

      this._element.style[dimension] = '';

      this._queueCallback(complete, this._element, true);
    }

    setTransitioning(isTransitioning) {
      this._isTransitioning = isTransitioning;
    } // Private


    _getConfig(config) {
      config = { ...Default$8,
        ...config
      };
      config.toggle = Boolean(config.toggle); // Coerce string values

      typeCheckConfig(NAME$9, config, DefaultType$8);
      return config;
    }

    _getDimension() {
      return this._element.classList.contains(WIDTH) ? WIDTH : HEIGHT;
    }

    _getParent() {
      let {
        parent
      } = this._config;
      parent = getElement(parent);
      const selector = `${SELECTOR_DATA_TOGGLE$4}[data-bs-parent="${parent}"]`;
      SelectorEngine.find(selector, parent).forEach(element => {
        const selected = getElementFromSelector(element);

        this._addAriaAndCollapsedClass(selected, [element]);
      });
      return parent;
    }

    _addAriaAndCollapsedClass(element, triggerArray) {
      if (!element || !triggerArray.length) {
        return;
      }

      const isOpen = element.classList.contains(CLASS_NAME_SHOW$8);
      triggerArray.forEach(elem => {
        if (isOpen) {
          elem.classList.remove(CLASS_NAME_COLLAPSED);
        } else {
          elem.classList.add(CLASS_NAME_COLLAPSED);
        }

        elem.setAttribute('aria-expanded', isOpen);
      });
    } // Static


    static collapseInterface(element, config) {
      let data = Data.get(element, DATA_KEY$8);
      const _config = { ...Default$8,
        ...Manipulator.getDataAttributes(element),
        ...(typeof config === 'object' && config ? config : {})
      };

      if (!data && _config.toggle && typeof config === 'string' && /show|hide/.test(config)) {
        _config.toggle = false;
      }

      if (!data) {
        data = new Collapse(element, _config);
      }

      if (typeof config === 'string') {
        if (typeof data[config] === 'undefined') {
          throw new TypeError(`No method named "${config}"`);
        }

        data[config]();
      }
    }

    static jQueryInterface(config) {
      return this.each(function () {
        Collapse.collapseInterface(this, config);
      });
    }

  }
  /**
   * ------------------------------------------------------------------------
   * Data Api implementation
   * ------------------------------------------------------------------------
   */


  EventHandler.on(document, EVENT_CLICK_DATA_API$4, SELECTOR_DATA_TOGGLE$4, function (event) {
    // preventDefault only for <a> elements (which change the URL) not inside the collapsible element
    if (event.target.tagName === 'A' || event.delegateTarget && event.delegateTarget.tagName === 'A') {
      event.preventDefault();
    }

    const triggerData = Manipulator.getDataAttributes(this);
    const selector = getSelectorFromElement(this);
    const selectorElements = SelectorEngine.find(selector);
    selectorElements.forEach(element => {
      const data = Data.get(element, DATA_KEY$8);
      let config;

      if (data) {
        // update parent attribute
        if (data._parent === null && typeof triggerData.parent === 'string') {
          data._config.parent = triggerData.parent;
          data._parent = data._getParent();
        }

        config = 'toggle';
      } else {
        config = triggerData;
      }

      Collapse.collapseInterface(element, config);
    });
  });
  /**
   * ------------------------------------------------------------------------
   * jQuery
   * ------------------------------------------------------------------------
   * add .Collapse to jQuery only if jQuery is present
   */

  defineJQueryPlugin(Collapse);

  var top = 'top';
  var bottom = 'bottom';
  var right = 'right';
  var left = 'left';
  var auto = 'auto';
  var basePlacements = [top, bottom, right, left];
  var start = 'start';
  var end = 'end';
  var clippingParents = 'clippingParents';
  var viewport = 'viewport';
  var popper = 'popper';
  var reference = 'reference';
  var variationPlacements = /*#__PURE__*/basePlacements.reduce(function (acc, placement) {
    return acc.concat([placement + "-" + start, placement + "-" + end]);
  }, []);
  var placements = /*#__PURE__*/[].concat(basePlacements, [auto]).reduce(function (acc, placement) {
    return acc.concat([placement, placement + "-" + start, placement + "-" + end]);
  }, []); // modifiers that need to read the DOM

  var beforeRead = 'beforeRead';
  var read = 'read';
  var afterRead = 'afterRead'; // pure-logic modifiers

  var beforeMain = 'beforeMain';
  var main = 'main';
  var afterMain = 'afterMain'; // modifier with the purpose to write to the DOM (or write into a framework state)

  var beforeWrite = 'beforeWrite';
  var write = 'write';
  var afterWrite = 'afterWrite';
  var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite];

  function getNodeName(element) {
    return element ? (element.nodeName || '').toLowerCase() : null;
  }

  function getWindow(node) {
    if (node == null) {
      return window;
    }

    if (node.toString() !== '[object Window]') {
      var ownerDocument = node.ownerDocument;
      return ownerDocument ? ownerDocument.defaultView || window : window;
    }

    return node;
  }

  function isElement(node) {
    var OwnElement = getWindow(node).Element;
    return node instanceof OwnElement || node instanceof Element;
  }

  function isHTMLElement(node) {
    var OwnElement = getWindow(node).HTMLElement;
    return node instanceof OwnElement || node instanceof HTMLElement;
  }

  function isShadowRoot(node) {
    // IE 11 has no ShadowRoot
    if (typeof ShadowRoot === 'undefined') {
      return false;
    }

    var OwnElement = getWindow(node).ShadowRoot;
    return node instanceof OwnElement || node instanceof ShadowRoot;
  }

  // and applies them to the HTMLElements such as popper and arrow

  function applyStyles(_ref) {
    var state = _ref.state;
    Object.keys(state.elements).forEach(function (name) {
      var style = state.styles[name] || {};
      var attributes = state.attributes[name] || {};
      var element = state.elements[name]; // arrow is optional + virtual elements

      if (!isHTMLElement(element) || !getNodeName(element)) {
        return;
      } // Flow doesn't support to extend this property, but it's the most
      // effective way to apply styles to an HTMLElement
      // $FlowFixMe[cannot-write]


      Object.assign(element.style, style);
      Object.keys(attributes).forEach(function (name) {
        var value = attributes[name];

        if (value === false) {
          element.removeAttribute(name);
        } else {
          element.setAttribute(name, value === true ? '' : value);
        }
      });
    });
  }

  function effect$2(_ref2) {
    var state = _ref2.state;
    var initialStyles = {
      popper: {
        position: state.options.strategy,
        left: '0',
        top: '0',
        margin: '0'
      },
      arrow: {
        position: 'absolute'
      },
      reference: {}
    };
    Object.assign(state.elements.popper.style, initialStyles.popper);
    state.styles = initialStyles;

    if (state.elements.arrow) {
      Object.assign(state.elements.arrow.style, initialStyles.arrow);
    }

    return function () {
      Object.keys(state.elements).forEach(function (name) {
        var element = state.elements[name];
        var attributes = state.attributes[name] || {};
        var styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]); // Set all values to an empty string to unset them

        var style = styleProperties.reduce(function (style, property) {
          style[property] = '';
          return style;
        }, {}); // arrow is optional + virtual elements

        if (!isHTMLElement(element) || !getNodeName(element)) {
          return;
        }

        Object.assign(element.style, style);
        Object.keys(attributes).forEach(function (attribute) {
          element.removeAttribute(attribute);
        });
      });
    };
  } // eslint-disable-next-line import/no-unused-modules


  var applyStyles$1 = {
    name: 'applyStyles',
    enabled: true,
    phase: 'write',
    fn: applyStyles,
    effect: effect$2,
    requires: ['computeStyles']
  };

  function getBasePlacement(placement) {
    return placement.split('-')[0];
  }

  function getBoundingClientRect(element) {
    var rect = element.getBoundingClientRect();
    return {
      width: rect.width,
      height: rect.height,
      top: rect.top,
      right: rect.right,
      bottom: rect.bottom,
      left: rect.left,
      x: rect.left,
      y: rect.top
    };
  }

  // means it doesn't take into account transforms.

  function getLayoutRect(element) {
    var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed.
    // Fixes https://github.com/popperjs/popper-core/issues/1223

    var width = element.offsetWidth;
    var height = element.offsetHeight;

    if (Math.abs(clientRect.width - width) <= 1) {
      width = clientRect.width;
    }

    if (Math.abs(clientRect.height - height) <= 1) {
      height = clientRect.height;
    }

    return {
      x: element.offsetLeft,
      y: element.offsetTop,
      width: width,
      height: height
    };
  }

  function contains(parent, child) {
    var rootNode = child.getRootNode && child.getRootNode(); // First, attempt with faster native method

    if (parent.contains(child)) {
      return true;
    } // then fallback to custom implementation with Shadow DOM support
    else if (rootNode && isShadowRoot(rootNode)) {
        var next = child;

        do {
          if (next && parent.isSameNode(next)) {
            return true;
          } // $FlowFixMe[prop-missing]: need a better way to handle this...


          next = next.parentNode || next.host;
        } while (next);
      } // Give up, the result is false


    return false;
  }

  function getComputedStyle$1(element) {
    return getWindow(element).getComputedStyle(element);
  }

  function isTableElement(element) {
    return ['table', 'td', 'th'].indexOf(getNodeName(element)) >= 0;
  }

  function getDocumentElement(element) {
    // $FlowFixMe[incompatible-return]: assume body is always available
    return ((isElement(element) ? element.ownerDocument : // $FlowFixMe[prop-missing]
    element.document) || window.document).documentElement;
  }

  function getParentNode(element) {
    if (getNodeName(element) === 'html') {
      return element;
    }

    return (// this is a quicker (but less type safe) way to save quite some bytes from the bundle
      // $FlowFixMe[incompatible-return]
      // $FlowFixMe[prop-missing]
      element.assignedSlot || // step into the shadow DOM of the parent of a slotted node
      element.parentNode || ( // DOM Element detected
      isShadowRoot(element) ? element.host : null) || // ShadowRoot detected
      // $FlowFixMe[incompatible-call]: HTMLElement is a Node
      getDocumentElement(element) // fallback

    );
  }

  function getTrueOffsetParent(element) {
    if (!isHTMLElement(element) || // https://github.com/popperjs/popper-core/issues/837
    getComputedStyle$1(element).position === 'fixed') {
      return null;
    }

    return element.offsetParent;
  } // `.offsetParent` reports `null` for fixed elements, while absolute elements
  // return the containing block


  function getContainingBlock(element) {
    var isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') !== -1;
    var isIE = navigator.userAgent.indexOf('Trident') !== -1;

    if (isIE && isHTMLElement(element)) {
      // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport
      var elementCss = getComputedStyle$1(element);

      if (elementCss.position === 'fixed') {
        return null;
      }
    }

    var currentNode = getParentNode(element);

    while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {
      var css = getComputedStyle$1(currentNode); // This is non-exhaustive but covers the most common CSS properties that
      // create a containing block.
      // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block

      if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {
        return currentNode;
      } else {
        currentNode = currentNode.parentNode;
      }
    }

    return null;
  } // Gets the closest ancestor positioned element. Handles some edge cases,
  // such as table ancestors and cross browser bugs.


  function getOffsetParent(element) {
    var window = getWindow(element);
    var offsetParent = getTrueOffsetParent(element);

    while (offsetParent && isTableElement(offsetParent) && getComputedStyle$1(offsetParent).position === 'static') {
      offsetParent = getTrueOffsetParent(offsetParent);
    }

    if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle$1(offsetParent).position === 'static')) {
      return window;
    }

    return offsetParent || getContainingBlock(element) || window;
  }

  function getMainAxisFromPlacement(placement) {
    return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';
  }

  var max = Math.max;
  var min = Math.min;
  var round = Math.round;

  function within(min$1, value, max$1) {
    return max(min$1, min(value, max$1));
  }

  function getFreshSideObject() {
    return {
      top: 0,
      right: 0,
      bottom: 0,
      left: 0
    };
  }

  function mergePaddingObject(paddingObject) {
    return Object.assign({}, getFreshSideObject(), paddingObject);
  }

  function expandToHashMap(value, keys) {
    return keys.reduce(function (hashMap, key) {
      hashMap[key] = value;
      return hashMap;
    }, {});
  }

  var toPaddingObject = function toPaddingObject(padding, state) {
    padding = typeof padding === 'function' ? padding(Object.assign({}, state.rects, {
      placement: state.placement
    })) : padding;
    return mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));
  };

  function arrow(_ref) {
    var _state$modifiersData$;

    var state = _ref.state,
        name = _ref.name,
        options = _ref.options;
    var arrowElement = state.elements.arrow;
    var popperOffsets = state.modifiersData.popperOffsets;
    var basePlacement = getBasePlacement(state.placement);
    var axis = getMainAxisFromPlacement(basePlacement);
    var isVertical = [left, right].indexOf(basePlacement) >= 0;
    var len = isVertical ? 'height' : 'width';

    if (!arrowElement || !popperOffsets) {
      return;
    }

    var paddingObject = toPaddingObject(options.padding, state);
    var arrowRect = getLayoutRect(arrowElement);
    var minProp = axis === 'y' ? top : left;
    var maxProp = axis === 'y' ? bottom : right;
    var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets[axis] - state.rects.popper[len];
    var startDiff = popperOffsets[axis] - state.rects.reference[axis];
    var arrowOffsetParent = getOffsetParent(arrowElement);
    var clientSize = arrowOffsetParent ? axis === 'y' ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0;
    var centerToReference = endDiff / 2 - startDiff / 2; // Make sure the arrow doesn't overflow the popper if the center point is
    // outside of the popper bounds

    var min = paddingObject[minProp];
    var max = clientSize - arrowRect[len] - paddingObject[maxProp];
    var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference;
    var offset = within(min, center, max); // Prevents breaking syntax highlighting...

    var axisProp = axis;
    state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset, _state$modifiersData$.centerOffset = offset - center, _state$modifiersData$);
  }

  function effect$1(_ref2) {
    var state = _ref2.state,
        options = _ref2.options;
    var _options$element = options.element,
        arrowElement = _options$element === void 0 ? '[data-popper-arrow]' : _options$element;

    if (arrowElement == null) {
      return;
    } // CSS selector


    if (typeof arrowElement === 'string') {
      arrowElement = state.elements.popper.querySelector(arrowElement);

      if (!arrowElement) {
        return;
      }
    }

    if (!contains(state.elements.popper, arrowElement)) {

      return;
    }

    state.elements.arrow = arrowElement;
  } // eslint-disable-next-line import/no-unused-modules


  var arrow$1 = {
    name: 'arrow',
    enabled: true,
    phase: 'main',
    fn: arrow,
    effect: effect$1,
    requires: ['popperOffsets'],
    requiresIfExists: ['preventOverflow']
  };

  var unsetSides = {
    top: 'auto',
    right: 'auto',
    bottom: 'auto',
    left: 'auto'
  }; // Round the offsets to the nearest suitable subpixel based on the DPR.
  // Zooming can change the DPR, but it seems to report a value that will
  // cleanly divide the values into the appropriate subpixels.

  function roundOffsetsByDPR(_ref) {
    var x = _ref.x,
        y = _ref.y;
    var win = window;
    var dpr = win.devicePixelRatio || 1;
    return {
      x: round(round(x * dpr) / dpr) || 0,
      y: round(round(y * dpr) / dpr) || 0
    };
  }

  function mapToStyles(_ref2) {
    var _Object$assign2;

    var popper = _ref2.popper,
        popperRect = _ref2.popperRect,
        placement = _ref2.placement,
        offsets = _ref2.offsets,
        position = _ref2.position,
        gpuAcceleration = _ref2.gpuAcceleration,
        adaptive = _ref2.adaptive,
        roundOffsets = _ref2.roundOffsets;

    var _ref3 = roundOffsets === true ? roundOffsetsByDPR(offsets) : typeof roundOffsets === 'function' ? roundOffsets(offsets) : offsets,
        _ref3$x = _ref3.x,
        x = _ref3$x === void 0 ? 0 : _ref3$x,
        _ref3$y = _ref3.y,
        y = _ref3$y === void 0 ? 0 : _ref3$y;

    var hasX = offsets.hasOwnProperty('x');
    var hasY = offsets.hasOwnProperty('y');
    var sideX = left;
    var sideY = top;
    var win = window;

    if (adaptive) {
      var offsetParent = getOffsetParent(popper);
      var heightProp = 'clientHeight';
      var widthProp = 'clientWidth';

      if (offsetParent === getWindow(popper)) {
        offsetParent = getDocumentElement(popper);

        if (getComputedStyle$1(offsetParent).position !== 'static') {
          heightProp = 'scrollHeight';
          widthProp = 'scrollWidth';
        }
      } // $FlowFixMe[incompatible-cast]: force type refinement, we compare offsetParent with window above, but Flow doesn't detect it


      offsetParent = offsetParent;

      if (placement === top) {
        sideY = bottom; // $FlowFixMe[prop-missing]

        y -= offsetParent[heightProp] - popperRect.height;
        y *= gpuAcceleration ? 1 : -1;
      }

      if (placement === left) {
        sideX = right; // $FlowFixMe[prop-missing]

        x -= offsetParent[widthProp] - popperRect.width;
        x *= gpuAcceleration ? 1 : -1;
      }
    }

    var commonStyles = Object.assign({
      position: position
    }, adaptive && unsetSides);

    if (gpuAcceleration) {
      var _Object$assign;

      return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) < 2 ? "translate(" + x + "px, " + y + "px)" : "translate3d(" + x + "px, " + y + "px, 0)", _Object$assign));
    }

    return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + "px" : '', _Object$assign2[sideX] = hasX ? x + "px" : '', _Object$assign2.transform = '', _Object$assign2));
  }

  function computeStyles(_ref4) {
    var state = _ref4.state,
        options = _ref4.options;
    var _options$gpuAccelerat = options.gpuAcceleration,
        gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat,
        _options$adaptive = options.adaptive,
        adaptive = _options$adaptive === void 0 ? true : _options$adaptive,
        _options$roundOffsets = options.roundOffsets,
        roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets;

    var commonStyles = {
      placement: getBasePlacement(state.placement),
      popper: state.elements.popper,
      popperRect: state.rects.popper,
      gpuAcceleration: gpuAcceleration
    };

    if (state.modifiersData.popperOffsets != null) {
      state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, {
        offsets: state.modifiersData.popperOffsets,
        position: state.options.strategy,
        adaptive: adaptive,
        roundOffsets: roundOffsets
      })));
    }

    if (state.modifiersData.arrow != null) {
      state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, {
        offsets: state.modifiersData.arrow,
        position: 'absolute',
        adaptive: false,
        roundOffsets: roundOffsets
      })));
    }

    state.attributes.popper = Object.assign({}, state.attributes.popper, {
      'data-popper-placement': state.placement
    });
  } // eslint-disable-next-line import/no-unused-modules


  var computeStyles$1 = {
    name: 'computeStyles',
    enabled: true,
    phase: 'beforeWrite',
    fn: computeStyles,
    data: {}
  };

  var passive = {
    passive: true
  };

  function effect(_ref) {
    var state = _ref.state,
        instance = _ref.instance,
        options = _ref.options;
    var _options$scroll = options.scroll,
        scroll = _options$scroll === void 0 ? true : _options$scroll,
        _options$resize = options.resize,
        resize = _options$resize === void 0 ? true : _options$resize;
    var window = getWindow(state.elements.popper);
    var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper);

    if (scroll) {
      scrollParents.forEach(function (scrollParent) {
        scrollParent.addEventListener('scroll', instance.update, passive);
      });
    }

    if (resize) {
      window.addEventListener('resize', instance.update, passive);
    }

    return function () {
      if (scroll) {
        scrollParents.forEach(function (scrollParent) {
          scrollParent.removeEventListener('scroll', instance.update, passive);
        });
      }

      if (resize) {
        window.removeEventListener('resize', instance.update, passive);
      }
    };
  } // eslint-disable-next-line import/no-unused-modules


  var eventListeners = {
    name: 'eventListeners',
    enabled: true,
    phase: 'write',
    fn: function fn() {},
    effect: effect,
    data: {}
  };

  var hash$1 = {
    left: 'right',
    right: 'left',
    bottom: 'top',
    top: 'bottom'
  };
  function getOppositePlacement(placement) {
    return placement.replace(/left|right|bottom|top/g, function (matched) {
      return hash$1[matched];
    });
  }

  var hash = {
    start: 'end',
    end: 'start'
  };
  function getOppositeVariationPlacement(placement) {
    return placement.replace(/start|end/g, function (matched) {
      return hash[matched];
    });
  }

  function getWindowScroll(node) {
    var win = getWindow(node);
    var scrollLeft = win.pageXOffset;
    var scrollTop = win.pageYOffset;
    return {
      scrollLeft: scrollLeft,
      scrollTop: scrollTop
    };
  }

  function getWindowScrollBarX(element) {
    // If <html> has a CSS width greater than the viewport, then this will be
    // incorrect for RTL.
    // Popper 1 is broken in this case and never had a bug report so let's assume
    // it's not an issue. I don't think anyone ever specifies width on <html>
    // anyway.
    // Browsers where the left scrollbar doesn't cause an issue report `0` for
    // this (e.g. Edge 2019, IE11, Safari)
    return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft;
  }

  function getViewportRect(element) {
    var win = getWindow(element);
    var html = getDocumentElement(element);
    var visualViewport = win.visualViewport;
    var width = html.clientWidth;
    var height = html.clientHeight;
    var x = 0;
    var y = 0; // NB: This isn't supported on iOS <= 12. If the keyboard is open, the popper
    // can be obscured underneath it.
    // Also, `html.clientHeight` adds the bottom bar height in Safari iOS, even
    // if it isn't open, so if this isn't available, the popper will be detected
    // to overflow the bottom of the screen too early.

    if (visualViewport) {
      width = visualViewport.width;
      height = visualViewport.height; // Uses Layout Viewport (like Chrome; Safari does not currently)
      // In Chrome, it returns a value very close to 0 (+/-) but contains rounding
      // errors due to floating point numbers, so we need to check precision.
      // Safari returns a number <= 0, usually < -1 when pinch-zoomed
      // Feature detection fails in mobile emulation mode in Chrome.
      // Math.abs(win.innerWidth / visualViewport.scale - visualViewport.width) <
      // 0.001
      // Fallback here: "Not Safari" userAgent

      if (!/^((?!chrome|android).)*safari/i.test(navigator.userAgent)) {
        x = visualViewport.offsetLeft;
        y = visualViewport.offsetTop;
      }
    }

    return {
      width: width,
      height: height,
      x: x + getWindowScrollBarX(element),
      y: y
    };
  }

  // of the `<html>` and `<body>` rect bounds if horizontally scrollable

  function getDocumentRect(element) {
    var _element$ownerDocumen;

    var html = getDocumentElement(element);
    var winScroll = getWindowScroll(element);
    var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;
    var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);
    var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);
    var x = -winScroll.scrollLeft + getWindowScrollBarX(element);
    var y = -winScroll.scrollTop;

    if (getComputedStyle$1(body || html).direction === 'rtl') {
      x += max(html.clientWidth, body ? body.clientWidth : 0) - width;
    }

    return {
      width: width,
      height: height,
      x: x,
      y: y
    };
  }

  function isScrollParent(element) {
    // Firefox wants us to check `-x` and `-y` variations as well
    var _getComputedStyle = getComputedStyle$1(element),
        overflow = _getComputedStyle.overflow,
        overflowX = _getComputedStyle.overflowX,
        overflowY = _getComputedStyle.overflowY;

    return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);
  }

  function getScrollParent(node) {
    if (['html', 'body', '#document'].indexOf(getNodeName(node)) >= 0) {
      // $FlowFixMe[incompatible-return]: assume body is always available
      return node.ownerDocument.body;
    }

    if (isHTMLElement(node) && isScrollParent(node)) {
      return node;
    }

    return getScrollParent(getParentNode(node));
  }

  /*
  given a DOM element, return the list of all scroll parents, up the list of ancesors
  until we get to the top window object. This list is what we attach scroll listeners
  to, because if any of these parent elements scroll, we'll need to re-calculate the
  reference element's position.
  */

  function listScrollParents(element, list) {
    var _element$ownerDocumen;

    if (list === void 0) {
      list = [];
    }

    var scrollParent = getScrollParent(element);
    var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);
    var win = getWindow(scrollParent);
    var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;
    var updatedList = list.concat(target);
    return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
    updatedList.concat(listScrollParents(getParentNode(target)));
  }

  function rectToClientRect(rect) {
    return Object.assign({}, rect, {
      left: rect.x,
      top: rect.y,
      right: rect.x + rect.width,
      bottom: rect.y + rect.height
    });
  }

  function getInnerBoundingClientRect(element) {
    var rect = getBoundingClientRect(element);
    rect.top = rect.top + element.clientTop;
    rect.left = rect.left + element.clientLeft;
    rect.bottom = rect.top + element.clientHeight;
    rect.right = rect.left + element.clientWidth;
    rect.width = element.clientWidth;
    rect.height = element.clientHeight;
    rect.x = rect.left;
    rect.y = rect.top;
    return rect;
  }

  function getClientRectFromMixedType(element, clippingParent) {
    return clippingParent === viewport ? rectToClientRect(getViewportRect(element)) : isHTMLElement(clippingParent) ? getInnerBoundingClientRect(clippingParent) : rectToClientRect(getDocumentRect(getDocumentElement(element)));
  } // A "clipping parent" is an overflowable container with the characteristic of
  // clipping (or hiding) overflowing elements with a position different from
  // `initial`


  function getClippingParents(element) {
    var clippingParents = listScrollParents(getParentNode(element));
    var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle$1(element).position) >= 0;
    var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;

    if (!isElement(clipperElement)) {
      return [];
    } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414


    return clippingParents.filter(function (clippingParent) {
      return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';
    });
  } // Gets the maximum area that the element is visible in due to any number of
  // clipping parents


  function getClippingRect(element, boundary, rootBoundary) {
    var mainClippingParents = boundary === 'clippingParents' ? getClippingParents(element) : [].concat(boundary);
    var clippingParents = [].concat(mainClippingParents, [rootBoundary]);
    var firstClippingParent = clippingParents[0];
    var clippingRect = clippingParents.reduce(function (accRect, clippingParent) {
      var rect = getClientRectFromMixedType(element, clippingParent);
      accRect.top = max(rect.top, accRect.top);
      accRect.right = min(rect.right, accRect.right);
      accRect.bottom = min(rect.bottom, accRect.bottom);
      accRect.left = max(rect.left, accRect.left);
      return accRect;
    }, getClientRectFromMixedType(element, firstClippingParent));
    clippingRect.width = clippingRect.right - clippingRect.left;
    clippingRect.height = clippingRect.bottom - clippingRect.top;
    clippingRect.x = clippingRect.left;
    clippingRect.y = clippingRect.top;
    return clippingRect;
  }

  function getVariation(placement) {
    return placement.split('-')[1];
  }

  function computeOffsets(_ref) {
    var reference = _ref.reference,
        element = _ref.element,
        placement = _ref.placement;
    var basePlacement = placement ? getBasePlacement(placement) : null;
    var variation = placement ? getVariation(placement) : null;
    var commonX = reference.x + reference.width / 2 - element.width / 2;
    var commonY = reference.y + reference.height / 2 - element.height / 2;
    var offsets;

    switch (basePlacement) {
      case top:
        offsets = {
          x: commonX,
          y: reference.y - element.height
        };
        break;

      case bottom:
        offsets = {
          x: commonX,
          y: reference.y + reference.height
        };
        break;

      case right:
        offsets = {
          x: reference.x + reference.width,
          y: commonY
        };
        break;

      case left:
        offsets = {
          x: reference.x - element.width,
          y: commonY
        };
        break;

      default:
        offsets = {
          x: reference.x,
          y: reference.y
        };
    }

    var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null;

    if (mainAxis != null) {
      var len = mainAxis === 'y' ? 'height' : 'width';

      switch (variation) {
        case start:
          offsets[mainAxis] = offsets[mainAxis] - (reference[len] / 2 - element[len] / 2);
          break;

        case end:
          offsets[mainAxis] = offsets[mainAxis] + (reference[len] / 2 - element[len] / 2);
          break;
      }
    }

    return offsets;
  }

  function detectOverflow(state, options) {
    if (options === void 0) {
      options = {};
    }

    var _options = options,
        _options$placement = _options.placement,
        placement = _options$placement === void 0 ? state.placement : _options$placement,
        _options$boundary = _options.boundary,
        boundary = _options$boundary === void 0 ? clippingParents : _options$boundary,
        _options$rootBoundary = _options.rootBoundary,
        rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary,
        _options$elementConte = _options.elementContext,
        elementContext = _options$elementConte === void 0 ? popper : _options$elementConte,
        _options$altBoundary = _options.altBoundary,
        altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary,
        _options$padding = _options.padding,
        padding = _options$padding === void 0 ? 0 : _options$padding;
    var paddingObject = mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));
    var altContext = elementContext === popper ? reference : popper;
    var referenceElement = state.elements.reference;
    var popperRect = state.rects.popper;
    var element = state.elements[altBoundary ? altContext : elementContext];
    var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary);
    var referenceClientRect = getBoundingClientRect(referenceElement);
    var popperOffsets = computeOffsets({
      reference: referenceClientRect,
      element: popperRect,
      strategy: 'absolute',
      placement: placement
    });
    var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets));
    var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; // positive = overflowing the clipping rect
    // 0 or negative = within the clipping rect

    var overflowOffsets = {
      top: clippingClientRect.top - elementClientRect.top + paddingObject.top,
      bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,
      left: clippingClientRect.left - elementClientRect.left + paddingObject.left,
      right: elementClientRect.right - clippingClientRect.right + paddingObject.right
    };
    var offsetData = state.modifiersData.offset; // Offsets can be applied only to the popper element

    if (elementContext === popper && offsetData) {
      var offset = offsetData[placement];
      Object.keys(overflowOffsets).forEach(function (key) {
        var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1;
        var axis = [top, bottom].indexOf(key) >= 0 ? 'y' : 'x';
        overflowOffsets[key] += offset[axis] * multiply;
      });
    }

    return overflowOffsets;
  }

  function computeAutoPlacement(state, options) {
    if (options === void 0) {
      options = {};
    }

    var _options = options,
        placement = _options.placement,
        boundary = _options.boundary,
        rootBoundary = _options.rootBoundary,
        padding = _options.padding,
        flipVariations = _options.flipVariations,
        _options$allowedAutoP = _options.allowedAutoPlacements,
        allowedAutoPlacements = _options$allowedAutoP === void 0 ? placements : _options$allowedAutoP;
    var variation = getVariation(placement);
    var placements$1 = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function (placement) {
      return getVariation(placement) === variation;
    }) : basePlacements;
    var allowedPlacements = placements$1.filter(function (placement) {
      return allowedAutoPlacements.indexOf(placement) >= 0;
    });

    if (allowedPlacements.length === 0) {
      allowedPlacements = placements$1;
    } // $FlowFixMe[incompatible-type]: Flow seems to have problems with two array unions...


    var overflows = allowedPlacements.reduce(function (acc, placement) {
      acc[placement] = detectOverflow(state, {
        placement: placement,
        boundary: boundary,
        rootBoundary: rootBoundary,
        padding: padding
      })[getBasePlacement(placement)];
      return acc;
    }, {});
    return Object.keys(overflows).sort(function (a, b) {
      return overflows[a] - overflows[b];
    });
  }

  function getExpandedFallbackPlacements(placement) {
    if (getBasePlacement(placement) === auto) {
      return [];
    }

    var oppositePlacement = getOppositePlacement(placement);
    return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)];
  }

  function flip(_ref) {
    var state = _ref.state,
        options = _ref.options,
        name = _ref.name;

    if (state.modifiersData[name]._skip) {
      return;
    }

    var _options$mainAxis = options.mainAxis,
        checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,
        _options$altAxis = options.altAxis,
        checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis,
        specifiedFallbackPlacements = options.fallbackPlacements,
        padding = options.padding,
        boundary = options.boundary,
        rootBoundary = options.rootBoundary,
        altBoundary = options.altBoundary,
        _options$flipVariatio = options.flipVariations,
        flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio,
        allowedAutoPlacements = options.allowedAutoPlacements;
    var preferredPlacement = state.options.placement;
    var basePlacement = getBasePlacement(preferredPlacement);
    var isBasePlacement = basePlacement === preferredPlacement;
    var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement));
    var placements = [preferredPlacement].concat(fallbackPlacements).reduce(function (acc, placement) {
      return acc.concat(getBasePlacement(placement) === auto ? computeAutoPlacement(state, {
        placement: placement,
        boundary: boundary,
        rootBoundary: rootBoundary,
        padding: padding,
        flipVariations: flipVariations,
        allowedAutoPlacements: allowedAutoPlacements
      }) : placement);
    }, []);
    var referenceRect = state.rects.reference;
    var popperRect = state.rects.popper;
    var checksMap = new Map();
    var makeFallbackChecks = true;
    var firstFittingPlacement = placements[0];

    for (var i = 0; i < placements.length; i++) {
      var placement = placements[i];

      var _basePlacement = getBasePlacement(placement);

      var isStartVariation = getVariation(placement) === start;
      var isVertical = [top, bottom].indexOf(_basePlacement) >= 0;
      var len = isVertical ? 'width' : 'height';
      var overflow = detectOverflow(state, {
        placement: placement,
        boundary: boundary,
        rootBoundary: rootBoundary,
        altBoundary: altBoundary,
        padding: padding
      });
      var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : top;

      if (referenceRect[len] > popperRect[len]) {
        mainVariationSide = getOppositePlacement(mainVariationSide);
      }

      var altVariationSide = getOppositePlacement(mainVariationSide);
      var checks = [];

      if (checkMainAxis) {
        checks.push(overflow[_basePlacement] <= 0);
      }

      if (checkAltAxis) {
        checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0);
      }

      if (checks.every(function (check) {
        return check;
      })) {
        firstFittingPlacement = placement;
        makeFallbackChecks = false;
        break;
      }

      checksMap.set(placement, checks);
    }

    if (makeFallbackChecks) {
      // `2` may be desired in some cases – research later
      var numberOfChecks = flipVariations ? 3 : 1;

      var _loop = function _loop(_i) {
        var fittingPlacement = placements.find(function (placement) {
          var checks = checksMap.get(placement);

          if (checks) {
            return checks.slice(0, _i).every(function (check) {
              return check;
            });
          }
        });

        if (fittingPlacement) {
          firstFittingPlacement = fittingPlacement;
          return "break";
        }
      };

      for (var _i = numberOfChecks; _i > 0; _i--) {
        var _ret = _loop(_i);

        if (_ret === "break") break;
      }
    }

    if (state.placement !== firstFittingPlacement) {
      state.modifiersData[name]._skip = true;
      state.placement = firstFittingPlacement;
      state.reset = true;
    }
  } // eslint-disable-next-line import/no-unused-modules


  var flip$1 = {
    name: 'flip',
    enabled: true,
    phase: 'main',
    fn: flip,
    requiresIfExists: ['offset'],
    data: {
      _skip: false
    }
  };

  function getSideOffsets(overflow, rect, preventedOffsets) {
    if (preventedOffsets === void 0) {
      preventedOffsets = {
        x: 0,
        y: 0
      };
    }

    return {
      top: overflow.top - rect.height - preventedOffsets.y,
      right: overflow.right - rect.width + preventedOffsets.x,
      bottom: overflow.bottom - rect.height + preventedOffsets.y,
      left: overflow.left - rect.width - preventedOffsets.x
    };
  }

  function isAnySideFullyClipped(overflow) {
    return [top, right, bottom, left].some(function (side) {
      return overflow[side] >= 0;
    });
  }

  function hide$1(_ref) {
    var state = _ref.state,
        name = _ref.name;
    var referenceRect = state.rects.reference;
    var popperRect = state.rects.popper;
    var preventedOffsets = state.modifiersData.preventOverflow;
    var referenceOverflow = detectOverflow(state, {
      elementContext: 'reference'
    });
    var popperAltOverflow = detectOverflow(state, {
      altBoundary: true
    });
    var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect);
    var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets);
    var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets);
    var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets);
    state.modifiersData[name] = {
      referenceClippingOffsets: referenceClippingOffsets,
      popperEscapeOffsets: popperEscapeOffsets,
      isReferenceHidden: isReferenceHidden,
      hasPopperEscaped: hasPopperEscaped
    };
    state.attributes.popper = Object.assign({}, state.attributes.popper, {
      'data-popper-reference-hidden': isReferenceHidden,
      'data-popper-escaped': hasPopperEscaped
    });
  } // eslint-disable-next-line import/no-unused-modules


  var hide$2 = {
    name: 'hide',
    enabled: true,
    phase: 'main',
    requiresIfExists: ['preventOverflow'],
    fn: hide$1
  };

  function distanceAndSkiddingToXY(placement, rects, offset) {
    var basePlacement = getBasePlacement(placement);
    var invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1;

    var _ref = typeof offset === 'function' ? offset(Object.assign({}, rects, {
      placement: placement
    })) : offset,
        skidding = _ref[0],
        distance = _ref[1];

    skidding = skidding || 0;
    distance = (distance || 0) * invertDistance;
    return [left, right].indexOf(basePlacement) >= 0 ? {
      x: distance,
      y: skidding
    } : {
      x: skidding,
      y: distance
    };
  }

  function offset(_ref2) {
    var state = _ref2.state,
        options = _ref2.options,
        name = _ref2.name;
    var _options$offset = options.offset,
        offset = _options$offset === void 0 ? [0, 0] : _options$offset;
    var data = placements.reduce(function (acc, placement) {
      acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset);
      return acc;
    }, {});
    var _data$state$placement = data[state.placement],
        x = _data$state$placement.x,
        y = _data$state$placement.y;

    if (state.modifiersData.popperOffsets != null) {
      state.modifiersData.popperOffsets.x += x;
      state.modifiersData.popperOffsets.y += y;
    }

    state.modifiersData[name] = data;
  } // eslint-disable-next-line import/no-unused-modules


  var offset$1 = {
    name: 'offset',
    enabled: true,
    phase: 'main',
    requires: ['popperOffsets'],
    fn: offset
  };

  function popperOffsets(_ref) {
    var state = _ref.state,
        name = _ref.name;
    // Offsets are the actual position the popper needs to have to be
    // properly positioned near its reference element
    // This is the most basic placement, and will be adjusted by
    // the modifiers in the next step
    state.modifiersData[name] = computeOffsets({
      reference: state.rects.reference,
      element: state.rects.popper,
      strategy: 'absolute',
      placement: state.placement
    });
  } // eslint-disable-next-line import/no-unused-modules


  var popperOffsets$1 = {
    name: 'popperOffsets',
    enabled: true,
    phase: 'read',
    fn: popperOffsets,
    data: {}
  };

  function getAltAxis(axis) {
    return axis === 'x' ? 'y' : 'x';
  }

  function preventOverflow(_ref) {
    var state = _ref.state,
        options = _ref.options,
        name = _ref.name;
    var _options$mainAxis = options.mainAxis,
        checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,
        _options$altAxis = options.altAxis,
        checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis,
        boundary = options.boundary,
        rootBoundary = options.rootBoundary,
        altBoundary = options.altBoundary,
        padding = options.padding,
        _options$tether = options.tether,
        tether = _options$tether === void 0 ? true : _options$tether,
        _options$tetherOffset = options.tetherOffset,
        tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset;
    var overflow = detectOverflow(state, {
      boundary: boundary,
      rootBoundary: rootBoundary,
      padding: padding,
      altBoundary: altBoundary
    });
    var basePlacement = getBasePlacement(state.placement);
    var variation = getVariation(state.placement);
    var isBasePlacement = !variation;
    var mainAxis = getMainAxisFromPlacement(basePlacement);
    var altAxis = getAltAxis(mainAxis);
    var popperOffsets = state.modifiersData.popperOffsets;
    var referenceRect = state.rects.reference;
    var popperRect = state.rects.popper;
    var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, {
      placement: state.placement
    })) : tetherOffset;
    var data = {
      x: 0,
      y: 0
    };

    if (!popperOffsets) {
      return;
    }

    if (checkMainAxis || checkAltAxis) {
      var mainSide = mainAxis === 'y' ? top : left;
      var altSide = mainAxis === 'y' ? bottom : right;
      var len = mainAxis === 'y' ? 'height' : 'width';
      var offset = popperOffsets[mainAxis];
      var min$1 = popperOffsets[mainAxis] + overflow[mainSide];
      var max$1 = popperOffsets[mainAxis] - overflow[altSide];
      var additive = tether ? -popperRect[len] / 2 : 0;
      var minLen = variation === start ? referenceRect[len] : popperRect[len];
      var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go
      // outside the reference bounds

      var arrowElement = state.elements.arrow;
      var arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : {
        width: 0,
        height: 0
      };
      var arrowPaddingObject = state.modifiersData['arrow#persistent'] ? state.modifiersData['arrow#persistent'].padding : getFreshSideObject();
      var arrowPaddingMin = arrowPaddingObject[mainSide];
      var arrowPaddingMax = arrowPaddingObject[altSide]; // If the reference length is smaller than the arrow length, we don't want
      // to include its full size in the calculation. If the reference is small
      // and near the edge of a boundary, the popper can overflow even if the
      // reference is not overflowing as well (e.g. virtual elements with no
      // width or height)

      var arrowLen = within(0, referenceRect[len], arrowRect[len]);
      var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - tetherOffsetValue : minLen - arrowLen - arrowPaddingMin - tetherOffsetValue;
      var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + tetherOffsetValue : maxLen + arrowLen + arrowPaddingMax + tetherOffsetValue;
      var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow);
      var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;
      var offsetModifierValue = state.modifiersData.offset ? state.modifiersData.offset[state.placement][mainAxis] : 0;
      var tetherMin = popperOffsets[mainAxis] + minOffset - offsetModifierValue - clientOffset;
      var tetherMax = popperOffsets[mainAxis] + maxOffset - offsetModifierValue;

      if (checkMainAxis) {
        var preventedOffset = within(tether ? min(min$1, tetherMin) : min$1, offset, tether ? max(max$1, tetherMax) : max$1);
        popperOffsets[mainAxis] = preventedOffset;
        data[mainAxis] = preventedOffset - offset;
      }

      if (checkAltAxis) {
        var _mainSide = mainAxis === 'x' ? top : left;

        var _altSide = mainAxis === 'x' ? bottom : right;

        var _offset = popperOffsets[altAxis];

        var _min = _offset + overflow[_mainSide];

        var _max = _offset - overflow[_altSide];

        var _preventedOffset = within(tether ? min(_min, tetherMin) : _min, _offset, tether ? max(_max, tetherMax) : _max);

        popperOffsets[altAxis] = _preventedOffset;
        data[altAxis] = _preventedOffset - _offset;
      }
    }

    state.modifiersData[name] = data;
  } // eslint-disable-next-line import/no-unused-modules


  var preventOverflow$1 = {
    name: 'preventOverflow',
    enabled: true,
    phase: 'main',
    fn: preventOverflow,
    requiresIfExists: ['offset']
  };

  function getHTMLElementScroll(element) {
    return {
      scrollLeft: element.scrollLeft,
      scrollTop: element.scrollTop
    };
  }

  function getNodeScroll(node) {
    if (node === getWindow(node) || !isHTMLElement(node)) {
      return getWindowScroll(node);
    } else {
      return getHTMLElementScroll(node);
    }
  }

  // Composite means it takes into account transforms as well as layout.

  function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {
    if (isFixed === void 0) {
      isFixed = false;
    }

    var documentElement = getDocumentElement(offsetParent);
    var rect = getBoundingClientRect(elementOrVirtualElement);
    var isOffsetParentAnElement = isHTMLElement(offsetParent);
    var scroll = {
      scrollLeft: 0,
      scrollTop: 0
    };
    var offsets = {
      x: 0,
      y: 0
    };

    if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
      if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078
      isScrollParent(documentElement)) {
        scroll = getNodeScroll(offsetParent);
      }

      if (isHTMLElement(offsetParent)) {
        offsets = getBoundingClientRect(offsetParent);
        offsets.x += offsetParent.clientLeft;
        offsets.y += offsetParent.clientTop;
      } else if (documentElement) {
        offsets.x = getWindowScrollBarX(documentElement);
      }
    }

    return {
      x: rect.left + scroll.scrollLeft - offsets.x,
      y: rect.top + scroll.scrollTop - offsets.y,
      width: rect.width,
      height: rect.height
    };
  }

  function order(modifiers) {
    var map = new Map();
    var visited = new Set();
    var result = [];
    modifiers.forEach(function (modifier) {
      map.set(modifier.name, modifier);
    }); // On visiting object, check for its dependencies and visit them recursively

    function sort(modifier) {
      visited.add(modifier.name);
      var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);
      requires.forEach(function (dep) {
        if (!visited.has(dep)) {
          var depModifier = map.get(dep);

          if (depModifier) {
            sort(depModifier);
          }
        }
      });
      result.push(modifier);
    }

    modifiers.forEach(function (modifier) {
      if (!visited.has(modifier.name)) {
        // check for visited object
        sort(modifier);
      }
    });
    return result;
  }

  function orderModifiers(modifiers) {
    // order based on dependencies
    var orderedModifiers = order(modifiers); // order based on phase

    return modifierPhases.reduce(function (acc, phase) {
      return acc.concat(orderedModifiers.filter(function (modifier) {
        return modifier.phase === phase;
      }));
    }, []);
  }

  function debounce(fn) {
    var pending;
    return function () {
      if (!pending) {
        pending = new Promise(function (resolve) {
          Promise.resolve().then(function () {
            pending = undefined;
            resolve(fn());
          });
        });
      }

      return pending;
    };
  }

  function mergeByName(modifiers) {
    var merged = modifiers.reduce(function (merged, current) {
      var existing = merged[current.name];
      merged[current.name] = existing ? Object.assign({}, existing, current, {
        options: Object.assign({}, existing.options, current.options),
        data: Object.assign({}, existing.data, current.data)
      }) : current;
      return merged;
    }, {}); // IE11 does not support Object.values

    return Object.keys(merged).map(function (key) {
      return merged[key];
    });
  }

  var DEFAULT_OPTIONS = {
    placement: 'bottom',
    modifiers: [],
    strategy: 'absolute'
  };

  function areValidElements() {
    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
      args[_key] = arguments[_key];
    }

    return !args.some(function (element) {
      return !(element && typeof element.getBoundingClientRect === 'function');
    });
  }

  function popperGenerator(generatorOptions) {
    if (generatorOptions === void 0) {
      generatorOptions = {};
    }

    var _generatorOptions = generatorOptions,
        _generatorOptions$def = _generatorOptions.defaultModifiers,
        defaultModifiers = _generatorOptions$def === void 0 ? [] : _generatorOptions$def,
        _generatorOptions$def2 = _generatorOptions.defaultOptions,
        defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2;
    return function createPopper(reference, popper, options) {
      if (options === void 0) {
        options = defaultOptions;
      }

      var state = {
        placement: 'bottom',
        orderedModifiers: [],
        options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions),
        modifiersData: {},
        elements: {
          reference: reference,
          popper: popper
        },
        attributes: {},
        styles: {}
      };
      var effectCleanupFns = [];
      var isDestroyed = false;
      var instance = {
        state: state,
        setOptions: function setOptions(options) {
          cleanupModifierEffects();
          state.options = Object.assign({}, defaultOptions, state.options, options);
          state.scrollParents = {
            reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [],
            popper: listScrollParents(popper)
          }; // Orders the modifiers based on their dependencies and `phase`
          // properties

          var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers, state.options.modifiers))); // Strip out disabled modifiers

          state.orderedModifiers = orderedModifiers.filter(function (m) {
            return m.enabled;
          }); // Validate the provided modifiers so that the consumer will get warned

          runModifierEffects();
          return instance.update();
        },
        // Sync update – it will always be executed, even if not necessary. This
        // is useful for low frequency updates where sync behavior simplifies the
        // logic.
        // For high frequency updates (e.g. `resize` and `scroll` events), always
        // prefer the async Popper#update method
        forceUpdate: function forceUpdate() {
          if (isDestroyed) {
            return;
          }

          var _state$elements = state.elements,
              reference = _state$elements.reference,
              popper = _state$elements.popper; // Don't proceed if `reference` or `popper` are not valid elements
          // anymore

          if (!areValidElements(reference, popper)) {

            return;
          } // Store the reference and popper rects to be read by modifiers


          state.rects = {
            reference: getCompositeRect(reference, getOffsetParent(popper), state.options.strategy === 'fixed'),
            popper: getLayoutRect(popper)
          }; // Modifiers have the ability to reset the current update cycle. The
          // most common use case for this is the `flip` modifier changing the
          // placement, which then needs to re-run all the modifiers, because the
          // logic was previously ran for the previous placement and is therefore
          // stale/incorrect

          state.reset = false;
          state.placement = state.options.placement; // On each update cycle, the `modifiersData` property for each modifier
          // is filled with the initial data specified by the modifier. This means
          // it doesn't persist and is fresh on each update.
          // To ensure persistent data, use `${name}#persistent`

          state.orderedModifiers.forEach(function (modifier) {
            return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);
          });

          for (var index = 0; index < state.orderedModifiers.length; index++) {

            if (state.reset === true) {
              state.reset = false;
              index = -1;
              continue;
            }

            var _state$orderedModifie = state.orderedModifiers[index],
                fn = _state$orderedModifie.fn,
                _state$orderedModifie2 = _state$orderedModifie.options,
                _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2,
                name = _state$orderedModifie.name;

            if (typeof fn === 'function') {
              state = fn({
                state: state,
                options: _options,
                name: name,
                instance: instance
              }) || state;
            }
          }
        },
        // Async and optimistically optimized update – it will not be executed if
        // not necessary (debounced to run at most once-per-tick)
        update: debounce(function () {
          return new Promise(function (resolve) {
            instance.forceUpdate();
            resolve(state);
          });
        }),
        destroy: function destroy() {
          cleanupModifierEffects();
          isDestroyed = true;
        }
      };

      if (!areValidElements(reference, popper)) {

        return instance;
      }

      instance.setOptions(options).then(function (state) {
        if (!isDestroyed && options.onFirstUpdate) {
          options.onFirstUpdate(state);
        }
      }); // Modifiers have the ability to execute arbitrary code before the first
      // update cycle runs. They will be executed in the same order as the update
      // cycle. This is useful when a modifier adds some persistent data that
      // other modifiers need to use, but the modifier is run after the dependent
      // one.

      function runModifierEffects() {
        state.orderedModifiers.forEach(function (_ref3) {
          var name = _ref3.name,
              _ref3$options = _ref3.options,
              options = _ref3$options === void 0 ? {} : _ref3$options,
              effect = _ref3.effect;

          if (typeof effect === 'function') {
            var cleanupFn = effect({
              state: state,
              name: name,
              instance: instance,
              options: options
            });

            var noopFn = function noopFn() {};

            effectCleanupFns.push(cleanupFn || noopFn);
          }
        });
      }

      function cleanupModifierEffects() {
        effectCleanupFns.forEach(function (fn) {
          return fn();
        });
        effectCleanupFns = [];
      }

      return instance;
    };
  }
  var createPopper$2 = /*#__PURE__*/popperGenerator(); // eslint-disable-next-line import/no-unused-modules

  var defaultModifiers$1 = [eventListeners, popperOffsets$1, computeStyles$1, applyStyles$1];
  var createPopper$1 = /*#__PURE__*/popperGenerator({
    defaultModifiers: defaultModifiers$1
  }); // eslint-disable-next-line import/no-unused-modules

  var defaultModifiers = [eventListeners, popperOffsets$1, computeStyles$1, applyStyles$1, offset$1, flip$1, preventOverflow$1, arrow$1, hide$2];
  var createPopper = /*#__PURE__*/popperGenerator({
    defaultModifiers: defaultModifiers
  }); // eslint-disable-next-line import/no-unused-modules

  var Popper = /*#__PURE__*/Object.freeze({
    __proto__: null,
    popperGenerator: popperGenerator,
    detectOverflow: detectOverflow,
    createPopperBase: createPopper$2,
    createPopper: createPopper,
    createPopperLite: createPopper$1,
    top: top,
    bottom: bottom,
    right: right,
    left: left,
    auto: auto,
    basePlacements: basePlacements,
    start: start,
    end: end,
    clippingParents: clippingParents,
    viewport: viewport,
    popper: popper,
    reference: reference,
    variationPlacements: variationPlacements,
    placements: placements,
    beforeRead: beforeRead,
    read: read,
    afterRead: afterRead,
    beforeMain: beforeMain,
    main: main,
    afterMain: afterMain,
    beforeWrite: beforeWrite,
    write: write,
    afterWrite: afterWrite,
    modifierPhases: modifierPhases,
    applyStyles: applyStyles$1,
    arrow: arrow$1,
    computeStyles: computeStyles$1,
    eventListeners: eventListeners,
    flip: flip$1,
    hide: hide$2,
    offset: offset$1,
    popperOffsets: popperOffsets$1,
    preventOverflow: preventOverflow$1
  });

  /**
   * --------------------------------------------------------------------------
   * Bootstrap (v5.0.1): dropdown.js
   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
   * --------------------------------------------------------------------------
   */
  /**
   * ------------------------------------------------------------------------
   * Constants
   * ------------------------------------------------------------------------
   */

  const NAME$8 = 'dropdown';
  const DATA_KEY$7 = 'bs.dropdown';
  const EVENT_KEY$7 = `.${DATA_KEY$7}`;
  const DATA_API_KEY$4 = '.data-api';
  const ESCAPE_KEY$2 = 'Escape';
  const SPACE_KEY = 'Space';
  const TAB_KEY = 'Tab';
  const ARROW_UP_KEY = 'ArrowUp';
  const ARROW_DOWN_KEY = 'ArrowDown';
  const RIGHT_MOUSE_BUTTON = 2; // MouseEvent.button value for the secondary button, usually the right button

  const REGEXP_KEYDOWN = new RegExp(`${ARROW_UP_KEY}|${ARROW_DOWN_KEY}|${ESCAPE_KEY$2}`);
  const EVENT_HIDE$4 = `hide${EVENT_KEY$7}`;
  const EVENT_HIDDEN$4 = `hidden${EVENT_KEY$7}`;
  const EVENT_SHOW$4 = `show${EVENT_KEY$7}`;
  const EVENT_SHOWN$4 = `shown${EVENT_KEY$7}`;
  const EVENT_CLICK = `click${EVENT_KEY$7}`;
  const EVENT_CLICK_DATA_API$3 = `click${EVENT_KEY$7}${DATA_API_KEY$4}`;
  const EVENT_KEYDOWN_DATA_API = `keydown${EVENT_KEY$7}${DATA_API_KEY$4}`;
  const EVENT_KEYUP_DATA_API = `keyup${EVENT_KEY$7}${DATA_API_KEY$4}`;
  const CLASS_NAME_SHOW$7 = 'show';
  const CLASS_NAME_DROPUP = 'dropup';
  const CLASS_NAME_DROPEND = 'dropend';
  const CLASS_NAME_DROPSTART = 'dropstart';
  const CLASS_NAME_NAVBAR = 'navbar';
  const SELECTOR_DATA_TOGGLE$3 = '[data-bs-toggle="dropdown"]';
  const SELECTOR_MENU = '.dropdown-menu';
  const SELECTOR_NAVBAR_NAV = '.navbar-nav';
  const SELECTOR_VISIBLE_ITEMS = '.dropdown-menu .dropdown-item:not(.disabled):not(:disabled)';
  const PLACEMENT_TOP = isRTL() ? 'top-end' : 'top-start';
  const PLACEMENT_TOPEND = isRTL() ? 'top-start' : 'top-end';
  const PLACEMENT_BOTTOM = isRTL() ? 'bottom-end' : 'bottom-start';
  const PLACEMENT_BOTTOMEND = isRTL() ? 'bottom-start' : 'bottom-end';
  const PLACEMENT_RIGHT = isRTL() ? 'left-start' : 'right-start';
  const PLACEMENT_LEFT = isRTL() ? 'right-start' : 'left-start';
  const Default$7 = {
    offset: [0, 2],
    boundary: 'clippingParents',
    reference: 'toggle',
    display: 'dynamic',
    popperConfig: null,
    autoClose: true
  };
  const DefaultType$7 = {
    offset: '(array|string|function)',
    boundary: '(string|element)',
    reference: '(string|element|object)',
    display: 'string',
    popperConfig: '(null|object|function)',
    autoClose: '(boolean|string)'
  };
  /**
   * ------------------------------------------------------------------------
   * Class Definition
   * ------------------------------------------------------------------------
   */

  class Dropdown extends BaseComponent {
    constructor(element, config) {
      super(element);
      this._popper = null;
      this._config = this._getConfig(config);
      this._menu = this._getMenuElement();
      this._inNavbar = this._detectNavbar();

      this._addEventListeners();
    } // Getters


    static get Default() {
      return Default$7;
    }

    static get DefaultType() {
      return DefaultType$7;
    }

    static get NAME() {
      return NAME$8;
    } // Public


    toggle() {
      if (isDisabled(this._element)) {
        return;
      }

      const isActive = this._element.classList.contains(CLASS_NAME_SHOW$7);

      if (isActive) {
        this.hide();
        return;
      }

      this.show();
    }

    show() {
      if (isDisabled(this._element) || this._menu.classList.contains(CLASS_NAME_SHOW$7)) {
        return;
      }

      const parent = Dropdown.getParentFromElement(this._element);
      const relatedTarget = {
        relatedTarget: this._element
      };
      const showEvent = EventHandler.trigger(this._element, EVENT_SHOW$4, relatedTarget);

      if (showEvent.defaultPrevented) {
        return;
      } // Totally disable Popper for Dropdowns in Navbar


      if (this._inNavbar) {
        Manipulator.setDataAttribute(this._menu, 'popper', 'none');
      } else {
        if (typeof Popper === 'undefined') {
          throw new TypeError('Bootstrap\'s dropdowns require Popper (https://popper.js.org)');
        }

        let referenceElement = this._element;

        if (this._config.reference === 'parent') {
          referenceElement = parent;
        } else if (isElement$1(this._config.reference)) {
          referenceElement = getElement(this._config.reference);
        } else if (typeof this._config.reference === 'object') {
          referenceElement = this._config.reference;
        }

        const popperConfig = this._getPopperConfig();

        const isDisplayStatic = popperConfig.modifiers.find(modifier => modifier.name === 'applyStyles' && modifier.enabled === false);
        this._popper = createPopper(referenceElement, this._menu, popperConfig);

        if (isDisplayStatic) {
          Manipulator.setDataAttribute(this._menu, 'popper', 'static');
        }
      } // If this is a touch-enabled device we add extra
      // empty mouseover listeners to the body's immediate children;
      // only needed because of broken event delegation on iOS
      // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html


      if ('ontouchstart' in document.documentElement && !parent.closest(SELECTOR_NAVBAR_NAV)) {
        [].concat(...document.body.children).forEach(elem => EventHandler.on(elem, 'mouseover', noop));
      }

      this._element.focus();

      this._element.setAttribute('aria-expanded', true);

      this._menu.classList.toggle(CLASS_NAME_SHOW$7);

      this._element.classList.toggle(CLASS_NAME_SHOW$7);

      EventHandler.trigger(this._element, EVENT_SHOWN$4, relatedTarget);
    }

    hide() {
      if (isDisabled(this._element) || !this._menu.classList.contains(CLASS_NAME_SHOW$7)) {
        return;
      }

      const relatedTarget = {
        relatedTarget: this._element
      };

      this._completeHide(relatedTarget);
    }

    dispose() {
      if (this._popper) {
        this._popper.destroy();
      }

      super.dispose();
    }

    update() {
      this._inNavbar = this._detectNavbar();

      if (this._popper) {
        this._popper.update();
      }
    } // Private


    _addEventListeners() {
      EventHandler.on(this._element, EVENT_CLICK, event => {
        event.preventDefault();
        this.toggle();
      });
    }

    _completeHide(relatedTarget) {
      const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE$4, relatedTarget);

      if (hideEvent.defaultPrevented) {
        return;
      } // If this is a touch-enabled device we remove the extra
      // empty mouseover listeners we added for iOS support


      if ('ontouchstart' in document.documentElement) {
        [].concat(...document.body.children).forEach(elem => EventHandler.off(elem, 'mouseover', noop));
      }

      if (this._popper) {
        this._popper.destroy();
      }

      this._menu.classList.remove(CLASS_NAME_SHOW$7);

      this._element.classList.remove(CLASS_NAME_SHOW$7);

      this._element.setAttribute('aria-expanded', 'false');

      Manipulator.removeDataAttribute(this._menu, 'popper');
      EventHandler.trigger(this._element, EVENT_HIDDEN$4, relatedTarget);
    }

    _getConfig(config) {
      config = { ...this.constructor.Default,
        ...Manipulator.getDataAttributes(this._element),
        ...config
      };
      typeCheckConfig(NAME$8, config, this.constructor.DefaultType);

      if (typeof config.reference === 'object' && !isElement$1(config.reference) && typeof config.reference.getBoundingClientRect !== 'function') {
        // Popper virtual elements require a getBoundingClientRect method
        throw new TypeError(`${NAME$8.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);
      }

      return config;
    }

    _getMenuElement() {
      return SelectorEngine.next(this._element, SELECTOR_MENU)[0];
    }

    _getPlacement() {
      const parentDropdown = this._element.parentNode;

      if (parentDropdown.classList.contains(CLASS_NAME_DROPEND)) {
        return PLACEMENT_RIGHT;
      }

      if (parentDropdown.classList.contains(CLASS_NAME_DROPSTART)) {
        return PLACEMENT_LEFT;
      } // We need to trim the value because custom properties can also include spaces


      const isEnd = getComputedStyle(this._menu).getPropertyValue('--bs-position').trim() === 'end';

      if (parentDropdown.classList.contains(CLASS_NAME_DROPUP)) {
        return isEnd ? PLACEMENT_TOPEND : PLACEMENT_TOP;
      }

      return isEnd ? PLACEMENT_BOTTOMEND : PLACEMENT_BOTTOM;
    }

    _detectNavbar() {
      return this._element.closest(`.${CLASS_NAME_NAVBAR}`) !== null;
    }

    _getOffset() {
      const {
        offset
      } = this._config;

      if (typeof offset === 'string') {
        return offset.split(',').map(val => Number.parseInt(val, 10));
      }

      if (typeof offset === 'function') {
        return popperData => offset(popperData, this._element);
      }

      return offset;
    }

    _getPopperConfig() {
      const defaultBsPopperConfig = {
        placement: this._getPlacement(),
        modifiers: [{
          name: 'preventOverflow',
          options: {
            boundary: this._config.boundary
          }
        }, {
          name: 'offset',
          options: {
            offset: this._getOffset()
          }
        }]
      }; // Disable Popper if we have a static display

      if (this._config.display === 'static') {
        defaultBsPopperConfig.modifiers = [{
          name: 'applyStyles',
          enabled: false
        }];
      }

      return { ...defaultBsPopperConfig,
        ...(typeof this._config.popperConfig === 'function' ? this._config.popperConfig(defaultBsPopperConfig) : this._config.popperConfig)
      };
    }

    _selectMenuItem(event) {
      const items = SelectorEngine.find(SELECTOR_VISIBLE_ITEMS, this._menu).filter(isVisible);

      if (!items.length) {
        return;
      }

      let index = items.indexOf(event.target); // Up

      if (event.key === ARROW_UP_KEY && index > 0) {
        index--;
      } // Down


      if (event.key === ARROW_DOWN_KEY && index < items.length - 1) {
        index++;
      } // index is -1 if the first keydown is an ArrowUp


      index = index === -1 ? 0 : index;
      items[index].focus();
    } // Static


    static dropdownInterface(element, config) {
      let data = Data.get(element, DATA_KEY$7);

      const _config = typeof config === 'object' ? config : null;

      if (!data) {
        data = new Dropdown(element, _config);
      }

      if (typeof config === 'string') {
        if (typeof data[config] === 'undefined') {
          throw new TypeError(`No method named "${config}"`);
        }

        data[config]();
      }
    }

    static jQueryInterface(config) {
      return this.each(function () {
        Dropdown.dropdownInterface(this, config);
      });
    }

    static clearMenus(event) {
      if (event && (event.button === RIGHT_MOUSE_BUTTON || event.type === 'keyup' && event.key !== TAB_KEY)) {
        return;
      }

      const toggles = SelectorEngine.find(SELECTOR_DATA_TOGGLE$3);

      for (let i = 0, len = toggles.length; i < len; i++) {
        const context = Data.get(toggles[i], DATA_KEY$7);

        if (!context || context._config.autoClose === false) {
          continue;
        }

        if (!context._element.classList.contains(CLASS_NAME_SHOW$7)) {
          continue;
        }

        const relatedTarget = {
          relatedTarget: context._element
        };

        if (event) {
          const composedPath = event.composedPath();
          const isMenuTarget = composedPath.includes(context._menu);

          if (composedPath.includes(context._element) || context._config.autoClose === 'inside' && !isMenuTarget || context._config.autoClose === 'outside' && isMenuTarget) {
            continue;
          } // Tab navigation through the dropdown menu or events from contained inputs shouldn't close the menu


          if (context._menu.contains(event.target) && (event.type === 'keyup' && event.key === TAB_KEY || /input|select|option|textarea|form/i.test(event.target.tagName))) {
            continue;
          }

          if (event.type === 'click') {
            relatedTarget.clickEvent = event;
          }
        }

        context._completeHide(relatedTarget);
      }
    }

    static getParentFromElement(element) {
      return getElementFromSelector(element) || element.parentNode;
    }

    static dataApiKeydownHandler(event) {
      // If not input/textarea:
      //  - And not a key in REGEXP_KEYDOWN => not a dropdown command
      // If input/textarea:
      //  - If space key => not a dropdown command
      //  - If key is other than escape
      //    - If key is not up or down => not a dropdown command
      //    - If trigger inside the menu => not a dropdown command
      if (/input|textarea/i.test(event.target.tagName) ? event.key === SPACE_KEY || event.key !== ESCAPE_KEY$2 && (event.key !== ARROW_DOWN_KEY && event.key !== ARROW_UP_KEY || event.target.closest(SELECTOR_MENU)) : !REGEXP_KEYDOWN.test(event.key)) {
        return;
      }

      const isActive = this.classList.contains(CLASS_NAME_SHOW$7);

      if (!isActive && event.key === ESCAPE_KEY$2) {
        return;
      }

      event.preventDefault();
      event.stopPropagation();

      if (isDisabled(this)) {
        return;
      }

      const getToggleButton = () => this.matches(SELECTOR_DATA_TOGGLE$3) ? this : SelectorEngine.prev(this, SELECTOR_DATA_TOGGLE$3)[0];

      if (event.key === ESCAPE_KEY$2) {
        getToggleButton().focus();
        Dropdown.clearMenus();
        return;
      }

      if (!isActive && (event.key === ARROW_UP_KEY || event.key === ARROW_DOWN_KEY)) {
        getToggleButton().click();
        return;
      }

      if (!isActive || event.key === SPACE_KEY) {
        Dropdown.clearMenus();
        return;
      }

      Dropdown.getInstance(getToggleButton())._selectMenuItem(event);
    }

  }
  /**
   * ------------------------------------------------------------------------
   * Data Api implementation
   * ------------------------------------------------------------------------
   */


  EventHandler.on(document, EVENT_KEYDOWN_DATA_API, SELECTOR_DATA_TOGGLE$3, Dropdown.dataApiKeydownHandler);
  EventHandler.on(document, EVENT_KEYDOWN_DATA_API, SELECTOR_MENU, Dropdown.dataApiKeydownHandler);
  EventHandler.on(document, EVENT_CLICK_DATA_API$3, Dropdown.clearMenus);
  EventHandler.on(document, EVENT_KEYUP_DATA_API, Dropdown.clearMenus);
  EventHandler.on(document, EVENT_CLICK_DATA_API$3, SELECTOR_DATA_TOGGLE$3, function (event) {
    event.preventDefault();
    Dropdown.dropdownInterface(this);
  });
  /**
   * ------------------------------------------------------------------------
   * jQuery
   * ------------------------------------------------------------------------
   * add .Dropdown to jQuery only if jQuery is present
   */

  defineJQueryPlugin(Dropdown);

  /**
   * --------------------------------------------------------------------------
   * Bootstrap (v5.0.1): util/scrollBar.js
   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
   * --------------------------------------------------------------------------
   */
  const SELECTOR_FIXED_CONTENT = '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top';
  const SELECTOR_STICKY_CONTENT = '.sticky-top';

  const getWidth = () => {
    // https://developer.mozilla.org/en-US/docs/Web/API/Window/innerWidth#usage_notes
    const documentWidth = document.documentElement.clientWidth;
    return Math.abs(window.innerWidth - documentWidth);
  };

  const hide = (width = getWidth()) => {
    _disableOverFlow(); // give padding to element to balances the hidden scrollbar width


    _setElementAttributes('body', 'paddingRight', calculatedValue => calculatedValue + width); // trick: We adjust positive paddingRight and negative marginRight to sticky-top elements, to keep shown fullwidth


    _setElementAttributes(SELECTOR_FIXED_CONTENT, 'paddingRight', calculatedValue => calculatedValue + width);

    _setElementAttributes(SELECTOR_STICKY_CONTENT, 'marginRight', calculatedValue => calculatedValue - width);
  };

  const _disableOverFlow = () => {
    const actualValue = document.body.style.overflow;

    if (actualValue) {
      Manipulator.setDataAttribute(document.body, 'overflow', actualValue);
    }

    document.body.style.overflow = 'hidden';
  };

  const _setElementAttributes = (selector, styleProp, callback) => {
    const scrollbarWidth = getWidth();
    SelectorEngine.find(selector).forEach(element => {
      if (element !== document.body && window.innerWidth > element.clientWidth + scrollbarWidth) {
        return;
      }

      const actualValue = element.style[styleProp];
      const calculatedValue = window.getComputedStyle(element)[styleProp];
      Manipulator.setDataAttribute(element, styleProp, actualValue);
      element.style[styleProp] = `${callback(Number.parseFloat(calculatedValue))}px`;
    });
  };

  const reset = () => {
    _resetElementAttributes('body', 'overflow');

    _resetElementAttributes('body', 'paddingRight');

    _resetElementAttributes(SELECTOR_FIXED_CONTENT, 'paddingRight');

    _resetElementAttributes(SELECTOR_STICKY_CONTENT, 'marginRight');
  };

  const _resetElementAttributes = (selector, styleProp) => {
    SelectorEngine.find(selector).forEach(element => {
      const value = Manipulator.getDataAttribute(element, styleProp);

      if (typeof value === 'undefined') {
        element.style.removeProperty(styleProp);
      } else {
        Manipulator.removeDataAttribute(element, styleProp);
        element.style[styleProp] = value;
      }
    });
  };

  /**
   * --------------------------------------------------------------------------
   * Bootstrap (v5.0.1): util/backdrop.js
   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
   * --------------------------------------------------------------------------
   */
  const Default$6 = {
    isVisible: true,
    // if false, we use the backdrop helper without adding any element to the dom
    isAnimated: false,
    rootElement: document.body,
    // give the choice to place backdrop under different elements
    clickCallback: null
  };
  const DefaultType$6 = {
    isVisible: 'boolean',
    isAnimated: 'boolean',
    rootElement: 'element',
    clickCallback: '(function|null)'
  };
  const NAME$7 = 'backdrop';
  const CLASS_NAME_BACKDROP = 'modal-backdrop';
  const CLASS_NAME_FADE$5 = 'fade';
  const CLASS_NAME_SHOW$6 = 'show';
  const EVENT_MOUSEDOWN = `mousedown.bs.${NAME$7}`;

  class Backdrop {
    constructor(config) {
      this._config = this._getConfig(config);
      this._isAppended = false;
      this._element = null;
    }

    show(callback) {
      if (!this._config.isVisible) {
        execute(callback);
        return;
      }

      this._append();

      if (this._config.isAnimated) {
        reflow(this._getElement());
      }

      this._getElement().classList.add(CLASS_NAME_SHOW$6);

      this._emulateAnimation(() => {
        execute(callback);
      });
    }

    hide(callback) {
      if (!this._config.isVisible) {
        execute(callback);
        return;
      }

      this._getElement().classList.remove(CLASS_NAME_SHOW$6);

      this._emulateAnimation(() => {
        this.dispose();
        execute(callback);
      });
    } // Private


    _getElement() {
      if (!this._element) {
        const backdrop = document.createElement('div');
        backdrop.className = CLASS_NAME_BACKDROP;

        if (this._config.isAnimated) {
          backdrop.classList.add(CLASS_NAME_FADE$5);
        }

        this._element = backdrop;
      }

      return this._element;
    }

    _getConfig(config) {
      config = { ...Default$6,
        ...(typeof config === 'object' ? config : {})
      };
      config.rootElement = config.rootElement || document.body;
      typeCheckConfig(NAME$7, config, DefaultType$6);
      return config;
    }

    _append() {
      if (this._isAppended) {
        return;
      }

      this._config.rootElement.appendChild(this._getElement());

      EventHandler.on(this._getElement(), EVENT_MOUSEDOWN, () => {
        execute(this._config.clickCallback);
      });
      this._isAppended = true;
    }

    dispose() {
      if (!this._isAppended) {
        return;
      }

      EventHandler.off(this._element, EVENT_MOUSEDOWN);

      this._getElement().parentNode.removeChild(this._element);

      this._isAppended = false;
    }

    _emulateAnimation(callback) {
      if (!this._config.isAnimated) {
        execute(callback);
        return;
      }

      const backdropTransitionDuration = getTransitionDurationFromElement(this._getElement());
      EventHandler.one(this._getElement(), 'transitionend', () => execute(callback));
      emulateTransitionEnd(this._getElement(), backdropTransitionDuration);
    }

  }

  /**
   * --------------------------------------------------------------------------
   * Bootstrap (v5.0.1): modal.js
   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
   * --------------------------------------------------------------------------
   */
  /**
   * ------------------------------------------------------------------------
   * Constants
   * ------------------------------------------------------------------------
   */

  const NAME$6 = 'modal';
  const DATA_KEY$6 = 'bs.modal';
  const EVENT_KEY$6 = `.${DATA_KEY$6}`;
  const DATA_API_KEY$3 = '.data-api';
  const ESCAPE_KEY$1 = 'Escape';
  const Default$5 = {
    backdrop: true,
    keyboard: true,
    focus: true
  };
  const DefaultType$5 = {
    backdrop: '(boolean|string)',
    keyboard: 'boolean',
    focus: 'boolean'
  };
  const EVENT_HIDE$3 = `hide${EVENT_KEY$6}`;
  const EVENT_HIDE_PREVENTED = `hidePrevented${EVENT_KEY$6}`;
  const EVENT_HIDDEN$3 = `hidden${EVENT_KEY$6}`;
  const EVENT_SHOW$3 = `show${EVENT_KEY$6}`;
  const EVENT_SHOWN$3 = `shown${EVENT_KEY$6}`;
  const EVENT_FOCUSIN$2 = `focusin${EVENT_KEY$6}`;
  const EVENT_RESIZE = `resize${EVENT_KEY$6}`;
  const EVENT_CLICK_DISMISS$2 = `click.dismiss${EVENT_KEY$6}`;
  const EVENT_KEYDOWN_DISMISS$1 = `keydown.dismiss${EVENT_KEY$6}`;
  const EVENT_MOUSEUP_DISMISS = `mouseup.dismiss${EVENT_KEY$6}`;
  const EVENT_MOUSEDOWN_DISMISS = `mousedown.dismiss${EVENT_KEY$6}`;
  const EVENT_CLICK_DATA_API$2 = `click${EVENT_KEY$6}${DATA_API_KEY$3}`;
  const CLASS_NAME_OPEN = 'modal-open';
  const CLASS_NAME_FADE$4 = 'fade';
  const CLASS_NAME_SHOW$5 = 'show';
  const CLASS_NAME_STATIC = 'modal-static';
  const SELECTOR_DIALOG = '.modal-dialog';
  const SELECTOR_MODAL_BODY = '.modal-body';
  const SELECTOR_DATA_TOGGLE$2 = '[data-bs-toggle="modal"]';
  const SELECTOR_DATA_DISMISS$2 = '[data-bs-dismiss="modal"]';
  /**
   * ------------------------------------------------------------------------
   * Class Definition
   * ------------------------------------------------------------------------
   */

  class Modal extends BaseComponent {
    constructor(element, config) {
      super(element);
      this._config = this._getConfig(config);
      this._dialog = SelectorEngine.findOne(SELECTOR_DIALOG, this._element);
      this._backdrop = this._initializeBackDrop();
      this._isShown = false;
      this._ignoreBackdropClick = false;
      this._isTransitioning = false;
    } // Getters


    static get Default() {
      return Default$5;
    }

    static get NAME() {
      return NAME$6;
    } // Public


    toggle(relatedTarget) {
      return this._isShown ? this.hide() : this.show(relatedTarget);
    }

    show(relatedTarget) {
      if (this._isShown || this._isTransitioning) {
        return;
      }

      if (this._isAnimated()) {
        this._isTransitioning = true;
      }

      const showEvent = EventHandler.trigger(this._element, EVENT_SHOW$3, {
        relatedTarget
      });

      if (this._isShown || showEvent.defaultPrevented) {
        return;
      }

      this._isShown = true;
      hide();
      document.body.classList.add(CLASS_NAME_OPEN);

      this._adjustDialog();

      this._setEscapeEvent();

      this._setResizeEvent();

      EventHandler.on(this._element, EVENT_CLICK_DISMISS$2, SELECTOR_DATA_DISMISS$2, event => this.hide(event));
      EventHandler.on(this._dialog, EVENT_MOUSEDOWN_DISMISS, () => {
        EventHandler.one(this._element, EVENT_MOUSEUP_DISMISS, event => {
          if (event.target === this._element) {
            this._ignoreBackdropClick = true;
          }
        });
      });

      this._showBackdrop(() => this._showElement(relatedTarget));
    }

    hide(event) {
      if (event) {
        event.preventDefault();
      }

      if (!this._isShown || this._isTransitioning) {
        return;
      }

      const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE$3);

      if (hideEvent.defaultPrevented) {
        return;
      }

      this._isShown = false;

      const isAnimated = this._isAnimated();

      if (isAnimated) {
        this._isTransitioning = true;
      }

      this._setEscapeEvent();

      this._setResizeEvent();

      EventHandler.off(document, EVENT_FOCUSIN$2);

      this._element.classList.remove(CLASS_NAME_SHOW$5);

      EventHandler.off(this._element, EVENT_CLICK_DISMISS$2);
      EventHandler.off(this._dialog, EVENT_MOUSEDOWN_DISMISS);

      this._queueCallback(() => this._hideModal(), this._element, isAnimated);
    }

    dispose() {
      [window, this._dialog].forEach(htmlElement => EventHandler.off(htmlElement, EVENT_KEY$6));

      this._backdrop.dispose();

      super.dispose();
      /**
       * `document` has 2 events `EVENT_FOCUSIN` and `EVENT_CLICK_DATA_API`
       * Do not move `document` in `htmlElements` array
       * It will remove `EVENT_CLICK_DATA_API` event that should remain
       */

      EventHandler.off(document, EVENT_FOCUSIN$2);
    }

    handleUpdate() {
      this._adjustDialog();
    } // Private


    _initializeBackDrop() {
      return new Backdrop({
        isVisible: Boolean(this._config.backdrop),
        // 'static' option will be translated to true, and booleans will keep their value
        isAnimated: this._isAnimated()
      });
    }

    _getConfig(config) {
      config = { ...Default$5,
        ...Manipulator.getDataAttributes(this._element),
        ...config
      };
      typeCheckConfig(NAME$6, config, DefaultType$5);
      return config;
    }

    _showElement(relatedTarget) {
      const isAnimated = this._isAnimated();

      const modalBody = SelectorEngine.findOne(SELECTOR_MODAL_BODY, this._dialog);

      if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) {
        // Don't move modal's DOM position
        document.body.appendChild(this._element);
      }

      this._element.style.display = 'block';

      this._element.removeAttribute('aria-hidden');

      this._element.setAttribute('aria-modal', true);

      this._element.setAttribute('role', 'dialog');

      this._element.scrollTop = 0;

      if (modalBody) {
        modalBody.scrollTop = 0;
      }

      if (isAnimated) {
        reflow(this._element);
      }

      this._element.classList.add(CLASS_NAME_SHOW$5);

      if (this._config.focus) {
        this._enforceFocus();
      }

      const transitionComplete = () => {
        if (this._config.focus) {
          this._element.focus();
        }

        this._isTransitioning = false;
        EventHandler.trigger(this._element, EVENT_SHOWN$3, {
          relatedTarget
        });
      };

      this._queueCallback(transitionComplete, this._dialog, isAnimated);
    }

    _enforceFocus() {
      EventHandler.off(document, EVENT_FOCUSIN$2); // guard against infinite focus loop

      EventHandler.on(document, EVENT_FOCUSIN$2, event => {
        if (document !== event.target && this._element !== event.target && !this._element.contains(event.target)) {
          this._element.focus();
        }
      });
    }

    _setEscapeEvent() {
      if (this._isShown) {
        EventHandler.on(this._element, EVENT_KEYDOWN_DISMISS$1, event => {
          if (this._config.keyboard && event.key === ESCAPE_KEY$1) {
            event.preventDefault();
            this.hide();
          } else if (!this._config.keyboard && event.key === ESCAPE_KEY$1) {
            this._triggerBackdropTransition();
          }
        });
      } else {
        EventHandler.off(this._element, EVENT_KEYDOWN_DISMISS$1);
      }
    }

    _setResizeEvent() {
      if (this._isShown) {
        EventHandler.on(window, EVENT_RESIZE, () => this._adjustDialog());
      } else {
        EventHandler.off(window, EVENT_RESIZE);
      }
    }

    _hideModal() {
      this._element.style.display = 'none';

      this._element.setAttribute('aria-hidden', true);

      this._element.removeAttribute('aria-modal');

      this._element.removeAttribute('role');

      this._isTransitioning = false;

      this._backdrop.hide(() => {
        document.body.classList.remove(CLASS_NAME_OPEN);

        this._resetAdjustments();

        reset();
        EventHandler.trigger(this._element, EVENT_HIDDEN$3);
      });
    }

    _showBackdrop(callback) {
      EventHandler.on(this._element, EVENT_CLICK_DISMISS$2, event => {
        if (this._ignoreBackdropClick) {
          this._ignoreBackdropClick = false;
          return;
        }

        if (event.target !== event.currentTarget) {
          return;
        }

        if (this._config.backdrop === true) {
          this.hide();
        } else if (this._config.backdrop === 'static') {
          this._triggerBackdropTransition();
        }
      });

      this._backdrop.show(callback);
    }

    _isAnimated() {
      return this._element.classList.contains(CLASS_NAME_FADE$4);
    }

    _triggerBackdropTransition() {
      const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE_PREVENTED);

      if (hideEvent.defaultPrevented) {
        return;
      }

      const isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;

      if (!isModalOverflowing) {
        this._element.style.overflowY = 'hidden';
      }

      this._element.classList.add(CLASS_NAME_STATIC);

      const modalTransitionDuration = getTransitionDurationFromElement(this._dialog);
      EventHandler.off(this._element, 'transitionend');
      EventHandler.one(this._element, 'transitionend', () => {
        this._element.classList.remove(CLASS_NAME_STATIC);

        if (!isModalOverflowing) {
          EventHandler.one(this._element, 'transitionend', () => {
            this._element.style.overflowY = '';
          });
          emulateTransitionEnd(this._element, modalTransitionDuration);
        }
      });
      emulateTransitionEnd(this._element, modalTransitionDuration);

      this._element.focus();
    } // ----------------------------------------------------------------------
    // the following methods are used to handle overflowing modals
    // ----------------------------------------------------------------------


    _adjustDialog() {
      const isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight;
      const scrollbarWidth = getWidth();
      const isBodyOverflowing = scrollbarWidth > 0;

      if (!isBodyOverflowing && isModalOverflowing && !isRTL() || isBodyOverflowing && !isModalOverflowing && isRTL()) {
        this._element.style.paddingLeft = `${scrollbarWidth}px`;
      }

      if (isBodyOverflowing && !isModalOverflowing && !isRTL() || !isBodyOverflowing && isModalOverflowing && isRTL()) {
        this._element.style.paddingRight = `${scrollbarWidth}px`;
      }
    }

    _resetAdjustments() {
      this._element.style.paddingLeft = '';
      this._element.style.paddingRight = '';
    } // Static


    static jQueryInterface(config, relatedTarget) {
      return this.each(function () {
        const data = Modal.getInstance(this) || new Modal(this, typeof config === 'object' ? config : {});

        if (typeof config !== 'string') {
          return;
        }

        if (typeof data[config] === 'undefined') {
          throw new TypeError(`No method named "${config}"`);
        }

        data[config](relatedTarget);
      });
    }

  }
  /**
   * ------------------------------------------------------------------------
   * Data Api implementation
   * ------------------------------------------------------------------------
   */


  EventHandler.on(document, EVENT_CLICK_DATA_API$2, SELECTOR_DATA_TOGGLE$2, function (event) {
    const target = getElementFromSelector(this);

    if (['A', 'AREA'].includes(this.tagName)) {
      event.preventDefault();
    }

    EventHandler.one(target, EVENT_SHOW$3, showEvent => {
      if (showEvent.defaultPrevented) {
        // only register focus restorer if modal will actually get shown
        return;
      }

      EventHandler.one(target, EVENT_HIDDEN$3, () => {
        if (isVisible(this)) {
          this.focus();
        }
      });
    });
    const data = Modal.getInstance(target) || new Modal(target);
    data.toggle(this);
  });
  /**
   * ------------------------------------------------------------------------
   * jQuery
   * ------------------------------------------------------------------------
   * add .Modal to jQuery only if jQuery is present
   */

  defineJQueryPlugin(Modal);

  /**
   * --------------------------------------------------------------------------
   * Bootstrap (v5.0.1): offcanvas.js
   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
   * --------------------------------------------------------------------------
   */
  /**
   * ------------------------------------------------------------------------
   * Constants
   * ------------------------------------------------------------------------
   */

  const NAME$5 = 'offcanvas';
  const DATA_KEY$5 = 'bs.offcanvas';
  const EVENT_KEY$5 = `.${DATA_KEY$5}`;
  const DATA_API_KEY$2 = '.data-api';
  const EVENT_LOAD_DATA_API$1 = `load${EVENT_KEY$5}${DATA_API_KEY$2}`;
  const ESCAPE_KEY = 'Escape';
  const Default$4 = {
    backdrop: true,
    keyboard: true,
    scroll: false
  };
  const DefaultType$4 = {
    backdrop: 'boolean',
    keyboard: 'boolean',
    scroll: 'boolean'
  };
  const CLASS_NAME_SHOW$4 = 'show';
  const OPEN_SELECTOR = '.offcanvas.show';
  const EVENT_SHOW$2 = `show${EVENT_KEY$5}`;
  const EVENT_SHOWN$2 = `shown${EVENT_KEY$5}`;
  const EVENT_HIDE$2 = `hide${EVENT_KEY$5}`;
  const EVENT_HIDDEN$2 = `hidden${EVENT_KEY$5}`;
  const EVENT_FOCUSIN$1 = `focusin${EVENT_KEY$5}`;
  const EVENT_CLICK_DATA_API$1 = `click${EVENT_KEY$5}${DATA_API_KEY$2}`;
  const EVENT_CLICK_DISMISS$1 = `click.dismiss${EVENT_KEY$5}`;
  const EVENT_KEYDOWN_DISMISS = `keydown.dismiss${EVENT_KEY$5}`;
  const SELECTOR_DATA_DISMISS$1 = '[data-bs-dismiss="offcanvas"]';
  const SELECTOR_DATA_TOGGLE$1 = '[data-bs-toggle="offcanvas"]';
  /**
   * ------------------------------------------------------------------------
   * Class Definition
   * ------------------------------------------------------------------------
   */

  class Offcanvas extends BaseComponent {
    constructor(element, config) {
      super(element);
      this._config = this._getConfig(config);
      this._isShown = false;
      this._backdrop = this._initializeBackDrop();

      this._addEventListeners();
    } // Getters


    static get NAME() {
      return NAME$5;
    }

    static get Default() {
      return Default$4;
    } // Public


    toggle(relatedTarget) {
      return this._isShown ? this.hide() : this.show(relatedTarget);
    }

    show(relatedTarget) {
      if (this._isShown) {
        return;
      }

      const showEvent = EventHandler.trigger(this._element, EVENT_SHOW$2, {
        relatedTarget
      });

      if (showEvent.defaultPrevented) {
        return;
      }

      this._isShown = true;
      this._element.style.visibility = 'visible';

      this._backdrop.show();

      if (!this._config.scroll) {
        hide();

        this._enforceFocusOnElement(this._element);
      }

      this._element.removeAttribute('aria-hidden');

      this._element.setAttribute('aria-modal', true);

      this._element.setAttribute('role', 'dialog');

      this._element.classList.add(CLASS_NAME_SHOW$4);

      const completeCallBack = () => {
        EventHandler.trigger(this._element, EVENT_SHOWN$2, {
          relatedTarget
        });
      };

      this._queueCallback(completeCallBack, this._element, true);
    }

    hide() {
      if (!this._isShown) {
        return;
      }

      const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE$2);

      if (hideEvent.defaultPrevented) {
        return;
      }

      EventHandler.off(document, EVENT_FOCUSIN$1);

      this._element.blur();

      this._isShown = false;

      this._element.classList.remove(CLASS_NAME_SHOW$4);

      this._backdrop.hide();

      const completeCallback = () => {
        this._element.setAttribute('aria-hidden', true);

        this._element.removeAttribute('aria-modal');

        this._element.removeAttribute('role');

        this._element.style.visibility = 'hidden';

        if (!this._config.scroll) {
          reset();
        }

        EventHandler.trigger(this._element, EVENT_HIDDEN$2);
      };

      this._queueCallback(completeCallback, this._element, true);
    }

    dispose() {
      this._backdrop.dispose();

      super.dispose();
      EventHandler.off(document, EVENT_FOCUSIN$1);
    } // Private


    _getConfig(config) {
      config = { ...Default$4,
        ...Manipulator.getDataAttributes(this._element),
        ...(typeof config === 'object' ? config : {})
      };
      typeCheckConfig(NAME$5, config, DefaultType$4);
      return config;
    }

    _initializeBackDrop() {
      return new Backdrop({
        isVisible: this._config.backdrop,
        isAnimated: true,
        rootElement: this._element.parentNode,
        clickCallback: () => this.hide()
      });
    }

    _enforceFocusOnElement(element) {
      EventHandler.off(document, EVENT_FOCUSIN$1); // guard against infinite focus loop

      EventHandler.on(document, EVENT_FOCUSIN$1, event => {
        if (document !== event.target && element !== event.target && !element.contains(event.target)) {
          element.focus();
        }
      });
      element.focus();
    }

    _addEventListeners() {
      EventHandler.on(this._element, EVENT_CLICK_DISMISS$1, SELECTOR_DATA_DISMISS$1, () => this.hide());
      EventHandler.on(this._element, EVENT_KEYDOWN_DISMISS, event => {
        if (this._config.keyboard && event.key === ESCAPE_KEY) {
          this.hide();
        }
      });
    } // Static


    static jQueryInterface(config) {
      return this.each(function () {
        const data = Data.get(this, DATA_KEY$5) || new Offcanvas(this, typeof config === 'object' ? config : {});

        if (typeof config !== 'string') {
          return;
        }

        if (data[config] === undefined || config.startsWith('_') || config === 'constructor') {
          throw new TypeError(`No method named "${config}"`);
        }

        data[config](this);
      });
    }

  }
  /**
   * ------------------------------------------------------------------------
   * Data Api implementation
   * ------------------------------------------------------------------------
   */


  EventHandler.on(document, EVENT_CLICK_DATA_API$1, SELECTOR_DATA_TOGGLE$1, function (event) {
    const target = getElementFromSelector(this);

    if (['A', 'AREA'].includes(this.tagName)) {
      event.preventDefault();
    }

    if (isDisabled(this)) {
      return;
    }

    EventHandler.one(target, EVENT_HIDDEN$2, () => {
      // focus on trigger when it is closed
      if (isVisible(this)) {
        this.focus();
      }
    }); // avoid conflict when clicking a toggler of an offcanvas, while another is open

    const allReadyOpen = SelectorEngine.findOne(OPEN_SELECTOR);

    if (allReadyOpen && allReadyOpen !== target) {
      Offcanvas.getInstance(allReadyOpen).hide();
    }

    const data = Data.get(target, DATA_KEY$5) || new Offcanvas(target);
    data.toggle(this);
  });
  EventHandler.on(window, EVENT_LOAD_DATA_API$1, () => {
    SelectorEngine.find(OPEN_SELECTOR).forEach(el => (Data.get(el, DATA_KEY$5) || new Offcanvas(el)).show());
  });
  /**
   * ------------------------------------------------------------------------
   * jQuery
   * ------------------------------------------------------------------------
   */

  defineJQueryPlugin(Offcanvas);

  /**
   * --------------------------------------------------------------------------
   * Bootstrap (v5.0.1): util/sanitizer.js
   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
   * --------------------------------------------------------------------------
   */
  const uriAttrs = new Set(['background', 'cite', 'href', 'itemtype', 'longdesc', 'poster', 'src', 'xlink:href']);
  const ARIA_ATTRIBUTE_PATTERN = /^aria-[\w-]*$/i;
  /**
   * A pattern that recognizes a commonly useful subset of URLs that are safe.
   *
   * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts
   */

  const SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^#&/:?]*(?:[#/?]|$))/i;
  /**
   * A pattern that matches safe data URLs. Only matches image, video and audio types.
   *
   * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts
   */

  const DATA_URL_PATTERN = /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i;

  const allowedAttribute = (attr, allowedAttributeList) => {
    const attrName = attr.nodeName.toLowerCase();

    if (allowedAttributeList.includes(attrName)) {
      if (uriAttrs.has(attrName)) {
        return Boolean(SAFE_URL_PATTERN.test(attr.nodeValue) || DATA_URL_PATTERN.test(attr.nodeValue));
      }

      return true;
    }

    const regExp = allowedAttributeList.filter(attrRegex => attrRegex instanceof RegExp); // Check if a regular expression validates the attribute.

    for (let i = 0, len = regExp.length; i < len; i++) {
      if (regExp[i].test(attrName)) {
        return true;
      }
    }

    return false;
  };

  const DefaultAllowlist = {
    // Global attributes allowed on any supplied element below.
    '*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN],
    a: ['target', 'href', 'title', 'rel'],
    area: [],
    b: [],
    br: [],
    col: [],
    code: [],
    div: [],
    em: [],
    hr: [],
    h1: [],
    h2: [],
    h3: [],
    h4: [],
    h5: [],
    h6: [],
    i: [],
    img: ['src', 'srcset', 'alt', 'title', 'width', 'height'],
    li: [],
    ol: [],
    p: [],
    pre: [],
    s: [],
    small: [],
    span: [],
    sub: [],
    sup: [],
    strong: [],
    u: [],
    ul: []
  };
  function sanitizeHtml(unsafeHtml, allowList, sanitizeFn) {
    if (!unsafeHtml.length) {
      return unsafeHtml;
    }

    if (sanitizeFn && typeof sanitizeFn === 'function') {
      return sanitizeFn(unsafeHtml);
    }

    const domParser = new window.DOMParser();
    const createdDocument = domParser.parseFromString(unsafeHtml, 'text/html');
    const allowlistKeys = Object.keys(allowList);
    const elements = [].concat(...createdDocument.body.querySelectorAll('*'));

    for (let i = 0, len = elements.length; i < len; i++) {
      const el = elements[i];
      const elName = el.nodeName.toLowerCase();

      if (!allowlistKeys.includes(elName)) {
        el.parentNode.removeChild(el);
        continue;
      }

      const attributeList = [].concat(...el.attributes);
      const allowedAttributes = [].concat(allowList['*'] || [], allowList[elName] || []);
      attributeList.forEach(attr => {
        if (!allowedAttribute(attr, allowedAttributes)) {
          el.removeAttribute(attr.nodeName);
        }
      });
    }

    return createdDocument.body.innerHTML;
  }

  /**
   * --------------------------------------------------------------------------
   * Bootstrap (v5.0.1): tooltip.js
   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
   * --------------------------------------------------------------------------
   */
  /**
   * ------------------------------------------------------------------------
   * Constants
   * ------------------------------------------------------------------------
   */

  const NAME$4 = 'tooltip';
  const DATA_KEY$4 = 'bs.tooltip';
  const EVENT_KEY$4 = `.${DATA_KEY$4}`;
  const CLASS_PREFIX$1 = 'bs-tooltip';
  const BSCLS_PREFIX_REGEX$1 = new RegExp(`(^|\\s)${CLASS_PREFIX$1}\\S+`, 'g');
  const DISALLOWED_ATTRIBUTES = new Set(['sanitize', 'allowList', 'sanitizeFn']);
  const DefaultType$3 = {
    animation: 'boolean',
    template: 'string',
    title: '(string|element|function)',
    trigger: 'string',
    delay: '(number|object)',
    html: 'boolean',
    selector: '(string|boolean)',
    placement: '(string|function)',
    offset: '(array|string|function)',
    container: '(string|element|boolean)',
    fallbackPlacements: 'array',
    boundary: '(string|element)',
    customClass: '(string|function)',
    sanitize: 'boolean',
    sanitizeFn: '(null|function)',
    allowList: 'object',
    popperConfig: '(null|object|function)'
  };
  const AttachmentMap = {
    AUTO: 'auto',
    TOP: 'top',
    RIGHT: isRTL() ? 'left' : 'right',
    BOTTOM: 'bottom',
    LEFT: isRTL() ? 'right' : 'left'
  };
  const Default$3 = {
    animation: true,
    template: '<div class="tooltip" role="tooltip">' + '<div class="tooltip-arrow"></div>' + '<div class="tooltip-inner"></div>' + '</div>',
    trigger: 'hover focus',
    title: '',
    delay: 0,
    html: false,
    selector: false,
    placement: 'top',
    offset: [0, 6],
    container: false,
    fallbackPlacements: ['top', 'right', 'bottom', 'left'],
    boundary: 'clippingParents',
    customClass: '',
    sanitize: true,
    sanitizeFn: null,
    allowList: DefaultAllowlist,
    popperConfig: null
  };
  const Event$2 = {
    HIDE: `hide${EVENT_KEY$4}`,
    HIDDEN: `hidden${EVENT_KEY$4}`,
    SHOW: `show${EVENT_KEY$4}`,
    SHOWN: `shown${EVENT_KEY$4}`,
    INSERTED: `inserted${EVENT_KEY$4}`,
    CLICK: `click${EVENT_KEY$4}`,
    FOCUSIN: `focusin${EVENT_KEY$4}`,
    FOCUSOUT: `focusout${EVENT_KEY$4}`,
    MOUSEENTER: `mouseenter${EVENT_KEY$4}`,
    MOUSELEAVE: `mouseleave${EVENT_KEY$4}`
  };
  const CLASS_NAME_FADE$3 = 'fade';
  const CLASS_NAME_MODAL = 'modal';
  const CLASS_NAME_SHOW$3 = 'show';
  const HOVER_STATE_SHOW = 'show';
  const HOVER_STATE_OUT = 'out';
  const SELECTOR_TOOLTIP_INNER = '.tooltip-inner';
  const TRIGGER_HOVER = 'hover';
  const TRIGGER_FOCUS = 'focus';
  const TRIGGER_CLICK = 'click';
  const TRIGGER_MANUAL = 'manual';
  /**
   * ------------------------------------------------------------------------
   * Class Definition
   * ------------------------------------------------------------------------
   */

  class Tooltip extends BaseComponent {
    constructor(element, config) {
      if (typeof Popper === 'undefined') {
        throw new TypeError('Bootstrap\'s tooltips require Popper (https://popper.js.org)');
      }

      super(element); // private

      this._isEnabled = true;
      this._timeout = 0;
      this._hoverState = '';
      this._activeTrigger = {};
      this._popper = null; // Protected

      this._config = this._getConfig(config);
      this.tip = null;

      this._setListeners();
    } // Getters


    static get Default() {
      return Default$3;
    }

    static get NAME() {
      return NAME$4;
    }

    static get Event() {
      return Event$2;
    }

    static get DefaultType() {
      return DefaultType$3;
    } // Public


    enable() {
      this._isEnabled = true;
    }

    disable() {
      this._isEnabled = false;
    }

    toggleEnabled() {
      this._isEnabled = !this._isEnabled;
    }

    toggle(event) {
      if (!this._isEnabled) {
        return;
      }

      if (event) {
        const context = this._initializeOnDelegatedTarget(event);

        context._activeTrigger.click = !context._activeTrigger.click;

        if (context._isWithActiveTrigger()) {
          context._enter(null, context);
        } else {
          context._leave(null, context);
        }
      } else {
        if (this.getTipElement().classList.contains(CLASS_NAME_SHOW$3)) {
          this._leave(null, this);

          return;
        }

        this._enter(null, this);
      }
    }

    dispose() {
      clearTimeout(this._timeout);
      EventHandler.off(this._element.closest(`.${CLASS_NAME_MODAL}`), 'hide.bs.modal', this._hideModalHandler);

      if (this.tip && this.tip.parentNode) {
        this.tip.parentNode.removeChild(this.tip);
      }

      if (this._popper) {
        this._popper.destroy();
      }

      super.dispose();
    }

    show() {
      if (this._element.style.display === 'none') {
        throw new Error('Please use show on visible elements');
      }

      if (!(this.isWithContent() && this._isEnabled)) {
        return;
      }

      const showEvent = EventHandler.trigger(this._element, this.constructor.Event.SHOW);
      const shadowRoot = findShadowRoot(this._element);
      const isInTheDom = shadowRoot === null ? this._element.ownerDocument.documentElement.contains(this._element) : shadowRoot.contains(this._element);

      if (showEvent.defaultPrevented || !isInTheDom) {
        return;
      }

      const tip = this.getTipElement();
      const tipId = getUID(this.constructor.NAME);
      tip.setAttribute('id', tipId);

      this._element.setAttribute('aria-describedby', tipId);

      this.setContent();

      if (this._config.animation) {
        tip.classList.add(CLASS_NAME_FADE$3);
      }

      const placement = typeof this._config.placement === 'function' ? this._config.placement.call(this, tip, this._element) : this._config.placement;

      const attachment = this._getAttachment(placement);

      this._addAttachmentClass(attachment);

      const {
        container
      } = this._config;
      Data.set(tip, this.constructor.DATA_KEY, this);

      if (!this._element.ownerDocument.documentElement.contains(this.tip)) {
        container.appendChild(tip);
        EventHandler.trigger(this._element, this.constructor.Event.INSERTED);
      }

      if (this._popper) {
        this._popper.update();
      } else {
        this._popper = createPopper(this._element, tip, this._getPopperConfig(attachment));
      }

      tip.classList.add(CLASS_NAME_SHOW$3);
      const customClass = typeof this._config.customClass === 'function' ? this._config.customClass() : this._config.customClass;

      if (customClass) {
        tip.classList.add(...customClass.split(' '));
      } // If this is a touch-enabled device we add extra
      // empty mouseover listeners to the body's immediate children;
      // only needed because of broken event delegation on iOS
      // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html


      if ('ontouchstart' in document.documentElement) {
        [].concat(...document.body.children).forEach(element => {
          EventHandler.on(element, 'mouseover', noop);
        });
      }

      const complete = () => {
        const prevHoverState = this._hoverState;
        this._hoverState = null;
        EventHandler.trigger(this._element, this.constructor.Event.SHOWN);

        if (prevHoverState === HOVER_STATE_OUT) {
          this._leave(null, this);
        }
      };

      const isAnimated = this.tip.classList.contains(CLASS_NAME_FADE$3);

      this._queueCallback(complete, this.tip, isAnimated);
    }

    hide() {
      if (!this._popper) {
        return;
      }

      const tip = this.getTipElement();

      const complete = () => {
        if (this._isWithActiveTrigger()) {
          return;
        }

        if (this._hoverState !== HOVER_STATE_SHOW && tip.parentNode) {
          tip.parentNode.removeChild(tip);
        }

        this._cleanTipClass();

        this._element.removeAttribute('aria-describedby');

        EventHandler.trigger(this._element, this.constructor.Event.HIDDEN);

        if (this._popper) {
          this._popper.destroy();

          this._popper = null;
        }
      };

      const hideEvent = EventHandler.trigger(this._element, this.constructor.Event.HIDE);

      if (hideEvent.defaultPrevented) {
        return;
      }

      tip.classList.remove(CLASS_NAME_SHOW$3); // If this is a touch-enabled device we remove the extra
      // empty mouseover listeners we added for iOS support

      if ('ontouchstart' in document.documentElement) {
        [].concat(...document.body.children).forEach(element => EventHandler.off(element, 'mouseover', noop));
      }

      this._activeTrigger[TRIGGER_CLICK] = false;
      this._activeTrigger[TRIGGER_FOCUS] = false;
      this._activeTrigger[TRIGGER_HOVER] = false;
      const isAnimated = this.tip.classList.contains(CLASS_NAME_FADE$3);

      this._queueCallback(complete, this.tip, isAnimated);

      this._hoverState = '';
    }

    update() {
      if (this._popper !== null) {
        this._popper.update();
      }
    } // Protected


    isWithContent() {
      return Boolean(this.getTitle());
    }

    getTipElement() {
      if (this.tip) {
        return this.tip;
      }

      const element = document.createElement('div');
      element.innerHTML = this._config.template;
      this.tip = element.children[0];
      return this.tip;
    }

    setContent() {
      const tip = this.getTipElement();
      this.setElementContent(SelectorEngine.findOne(SELECTOR_TOOLTIP_INNER, tip), this.getTitle());
      tip.classList.remove(CLASS_NAME_FADE$3, CLASS_NAME_SHOW$3);
    }

    setElementContent(element, content) {
      if (element === null) {
        return;
      }

      if (isElement$1(content)) {
        content = getElement(content); // content is a DOM node or a jQuery

        if (this._config.html) {
          if (content.parentNode !== element) {
            element.innerHTML = '';
            element.appendChild(content);
          }
        } else {
          element.textContent = content.textContent;
        }

        return;
      }

      if (this._config.html) {
        if (this._config.sanitize) {
          content = sanitizeHtml(content, this._config.allowList, this._config.sanitizeFn);
        }

        element.innerHTML = content;
      } else {
        element.textContent = content;
      }
    }

    getTitle() {
      let title = this._element.getAttribute('data-bs-original-title');

      if (!title) {
        title = typeof this._config.title === 'function' ? this._config.title.call(this._element) : this._config.title;
      }

      return title;
    }

    updateAttachment(attachment) {
      if (attachment === 'right') {
        return 'end';
      }

      if (attachment === 'left') {
        return 'start';
      }

      return attachment;
    } // Private


    _initializeOnDelegatedTarget(event, context) {
      const dataKey = this.constructor.DATA_KEY;
      context = context || Data.get(event.delegateTarget, dataKey);

      if (!context) {
        context = new this.constructor(event.delegateTarget, this._getDelegateConfig());
        Data.set(event.delegateTarget, dataKey, context);
      }

      return context;
    }

    _getOffset() {
      const {
        offset
      } = this._config;

      if (typeof offset === 'string') {
        return offset.split(',').map(val => Number.parseInt(val, 10));
      }

      if (typeof offset === 'function') {
        return popperData => offset(popperData, this._element);
      }

      return offset;
    }

    _getPopperConfig(attachment) {
      const defaultBsPopperConfig = {
        placement: attachment,
        modifiers: [{
          name: 'flip',
          options: {
            fallbackPlacements: this._config.fallbackPlacements
          }
        }, {
          name: 'offset',
          options: {
            offset: this._getOffset()
          }
        }, {
          name: 'preventOverflow',
          options: {
            boundary: this._config.boundary
          }
        }, {
          name: 'arrow',
          options: {
            element: `.${this.constructor.NAME}-arrow`
          }
        }, {
          name: 'onChange',
          enabled: true,
          phase: 'beforeMain',
          fn: data => this._handlePopperPlacementChange(data)
        }],
        // onFirstUpdate: data => {
        //   if (data.options.placement !== data.placement) {
        //     this._handlePopperPlacementChange(data);
        //   }
        // }
      };
      return { ...defaultBsPopperConfig,
        ...(typeof this._config.popperConfig === 'function' ? this._config.popperConfig(defaultBsPopperConfig) : this._config.popperConfig)
      };
    }

    _addAttachmentClass(attachment) {
      // this.getTipElement().classList.add(`${CLASS_PREFIX$1}-${this.updateAttachment(attachment)}`);
      this.getTipElement().classList.add(`${CLASS_PREFIX$1}-auto`);
    }

    _getAttachment(placement) {
      return AttachmentMap[placement.toUpperCase()];
    }

    _setListeners() {
      const triggers = this._config.trigger.split(' ');

      triggers.forEach(trigger => {
        if (trigger === 'click') {
          EventHandler.on(this._element, this.constructor.Event.CLICK, this._config.selector, event => this.toggle(event));
        } else if (trigger !== TRIGGER_MANUAL) {
          const eventIn = trigger === TRIGGER_HOVER ? this.constructor.Event.MOUSEENTER : this.constructor.Event.FOCUSIN;
          const eventOut = trigger === TRIGGER_HOVER ? this.constructor.Event.MOUSELEAVE : this.constructor.Event.FOCUSOUT;
          EventHandler.on(this._element, eventIn, this._config.selector, event => this._enter(event));
          EventHandler.on(this._element, eventOut, this._config.selector, event => this._leave(event));
        }
      });

      this._hideModalHandler = () => {
        if (this._element) {
          this.hide();
        }
      };

      EventHandler.on(this._element.closest(`.${CLASS_NAME_MODAL}`), 'hide.bs.modal', this._hideModalHandler);

      if (this._config.selector) {
        this._config = { ...this._config,
          trigger: 'manual',
          selector: ''
        };
      } else {
        this._fixTitle();
      }
    }

    _fixTitle() {
      const title = this._element.getAttribute('title');

      const originalTitleType = typeof this._element.getAttribute('data-bs-original-title');

      if (title || originalTitleType !== 'string') {
        this._element.setAttribute('data-bs-original-title', title || '');

        if (title && !this._element.getAttribute('aria-label') && !this._element.textContent && 'DIV' != this._element.tagName) {
          this._element.setAttribute('aria-label', title);
        }

        this._element.setAttribute('title', '');
      }
    }

    _enter(event, context) {
      context = this._initializeOnDelegatedTarget(event, context);

      if (event) {
        context._activeTrigger[event.type === 'focusin' ? TRIGGER_FOCUS : TRIGGER_HOVER] = true;
      }

      if (context.getTipElement().classList.contains(CLASS_NAME_SHOW$3) || context._hoverState === HOVER_STATE_SHOW) {
        context._hoverState = HOVER_STATE_SHOW;
        return;
      }

      clearTimeout(context._timeout);
      context._hoverState = HOVER_STATE_SHOW;

      if (!context._config.delay || !context._config.delay.show) {
        context.show();
        return;
      }

      context._timeout = setTimeout(() => {
        if (context._hoverState === HOVER_STATE_SHOW) {
          context.show();
        }
      }, context._config.delay.show);
    }

    _leave(event, context) {
      context = this._initializeOnDelegatedTarget(event, context);

      if (event) {
        context._activeTrigger[event.type === 'focusout' ? TRIGGER_FOCUS : TRIGGER_HOVER] = context._element.contains(event.relatedTarget);
      }

      if (context._isWithActiveTrigger()) {
        return;
      }

      clearTimeout(context._timeout);
      context._hoverState = HOVER_STATE_OUT;

      if (!context._config.delay || !context._config.delay.hide) {
        context.hide();
        return;
      }

      context._timeout = setTimeout(() => {
        if (context._hoverState === HOVER_STATE_OUT) {
          context.hide();
        }
      }, context._config.delay.hide);
    }

    _isWithActiveTrigger() {
      for (const trigger in this._activeTrigger) {
        if (this._activeTrigger[trigger]) {
          return true;
        }
      }

      return false;
    }

    _getConfig(config) {
      const dataAttributes = Manipulator.getDataAttributes(this._element);
      Object.keys(dataAttributes).forEach(dataAttr => {
        if (DISALLOWED_ATTRIBUTES.has(dataAttr)) {
          delete dataAttributes[dataAttr];
        }
      });
      config = { ...this.constructor.Default,
        ...dataAttributes,
        ...(typeof config === 'object' && config ? config : {})
      };
      config.container = config.container === false ? document.body : getElement(config.container);

      if (typeof config.delay === 'number') {
        config.delay = {
          show: config.delay,
          hide: config.delay
        };
      }

      if (typeof config.title === 'number') {
        config.title = config.title.toString();
      }

      if (typeof config.content === 'number') {
        config.content = config.content.toString();
      }

      typeCheckConfig(NAME$4, config, this.constructor.DefaultType);

      if (config.sanitize) {
        config.template = sanitizeHtml(config.template, config.allowList, config.sanitizeFn);
      }

      return config;
    }

    _getDelegateConfig() {
      const config = {};

      if (this._config) {
        for (const key in this._config) {
          if (this.constructor.Default[key] !== this._config[key]) {
            config[key] = this._config[key];
          }
        }
      }

      return config;
    }

    _cleanTipClass() {
      const tip = this.getTipElement();
      const tabClass = tip.getAttribute('class').match(BSCLS_PREFIX_REGEX$1);

      if (tabClass !== null && tabClass.length > 0) {
        tabClass.map(token => token.trim()).forEach(tClass => tip.classList.remove(tClass));
      }
    }

    _handlePopperPlacementChange(popperData) {
      const {
        state
      } = popperData;

      if (!state) {
        return;
      }

      this.tip = state.elements.popper;

      this._cleanTipClass();

      this._addAttachmentClass(this._getAttachment(state.placement));
      this.tip.setAttribute('data-popper-placement', state.placement);
    } // Static


    static jQueryInterface(config) {
      return this.each(function () {
        let data = Data.get(this, DATA_KEY$4);

        const _config = typeof config === 'object' && config;

        if (!data && /dispose|hide/.test(config)) {
          return;
        }

        if (!data) {
          data = new Tooltip(this, _config);
        }

        if (typeof config === 'string') {
          if (typeof data[config] === 'undefined') {
            throw new TypeError(`No method named "${config}"`);
          }

          data[config]();
        }
      });
    }

  }
  /**
   * ------------------------------------------------------------------------
   * jQuery
   * ------------------------------------------------------------------------
   * add .Tooltip to jQuery only if jQuery is present
   */


  defineJQueryPlugin(Tooltip);

  /**
   * --------------------------------------------------------------------------
   * Bootstrap (v5.0.1): popover.js
   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
   * --------------------------------------------------------------------------
   */
  /**
   * ------------------------------------------------------------------------
   * Constants
   * ------------------------------------------------------------------------
   */

  const NAME$3 = 'popover';
  const DATA_KEY$3 = 'bs.popover';
  const EVENT_KEY$3 = `.${DATA_KEY$3}`;
  const CLASS_PREFIX = 'bs-popover';
  const BSCLS_PREFIX_REGEX = new RegExp(`(^|\\s)${CLASS_PREFIX}\\S+`, 'g');
  const Default$2 = { ...Tooltip.Default,
    placement: 'right',
    offset: [0, 8],
    trigger: 'click',
    content: '',
    template: '<div class="popover" role="tooltip">' + '<div class="popover-arrow"></div>' + '<h3 class="popover-header"></h3>' + '<div class="popover-body"></div>' + '</div>'
  };
  const DefaultType$2 = { ...Tooltip.DefaultType,
    content: '(string|element|function)'
  };
  const Event$1 = {
    HIDE: `hide${EVENT_KEY$3}`,
    HIDDEN: `hidden${EVENT_KEY$3}`,
    SHOW: `show${EVENT_KEY$3}`,
    SHOWN: `shown${EVENT_KEY$3}`,
    INSERTED: `inserted${EVENT_KEY$3}`,
    CLICK: `click${EVENT_KEY$3}`,
    FOCUSIN: `focusin${EVENT_KEY$3}`,
    FOCUSOUT: `focusout${EVENT_KEY$3}`,
    MOUSEENTER: `mouseenter${EVENT_KEY$3}`,
    MOUSELEAVE: `mouseleave${EVENT_KEY$3}`
  };
  const CLASS_NAME_FADE$2 = 'fade';
  const CLASS_NAME_SHOW$2 = 'show';
  const SELECTOR_TITLE = '.popover-header';
  const SELECTOR_CONTENT = '.popover-body';
  /**
   * ------------------------------------------------------------------------
   * Class Definition
   * ------------------------------------------------------------------------
   */

  class Popover extends Tooltip {
    // Getters
    static get Default() {
      return Default$2;
    }

    static get NAME() {
      return NAME$3;
    }

    static get Event() {
      return Event$1;
    }

    static get DefaultType() {
      return DefaultType$2;
    } // Overrides


    isWithContent() {
      return this.getTitle() || this._getContent();
    }

    setContent() {
      const tip = this.getTipElement(); // we use append for html objects to maintain js events

      this.setElementContent(SelectorEngine.findOne(SELECTOR_TITLE, tip), this.getTitle());

      let content = this._getContent();

      if (typeof content === 'function') {
        content = content.call(this._element);
      }

      this.setElementContent(SelectorEngine.findOne(SELECTOR_CONTENT, tip), content);
      tip.classList.remove(CLASS_NAME_FADE$2, CLASS_NAME_SHOW$2);
    } // Private


    _addAttachmentClass(attachment) {
      this.getTipElement().classList.add(`${CLASS_PREFIX}-${this.updateAttachment(attachment)}`);
    }

    _getContent() {
      return this._element.getAttribute('data-bs-content') || this._config.content;
    }

    _cleanTipClass() {
      const tip = this.getTipElement();
      const tabClass = tip.getAttribute('class').match(BSCLS_PREFIX_REGEX);

      if (tabClass !== null && tabClass.length > 0) {
        tabClass.map(token => token.trim()).forEach(tClass => tip.classList.remove(tClass));
      }
    } // Static


    static jQueryInterface(config) {
      return this.each(function () {
        let data = Data.get(this, DATA_KEY$3);

        const _config = typeof config === 'object' ? config : null;

        if (!data && /dispose|hide/.test(config)) {
          return;
        }

        if (!data) {
          data = new Popover(this, _config);
          Data.set(this, DATA_KEY$3, data);
        }

        if (typeof config === 'string') {
          if (typeof data[config] === 'undefined') {
            throw new TypeError(`No method named "${config}"`);
          }

          data[config]();
        }
      });
    }

  }
  /**
   * ------------------------------------------------------------------------
   * jQuery
   * ------------------------------------------------------------------------
   * add .Popover to jQuery only if jQuery is present
   */


  defineJQueryPlugin(Popover);

  /**
   * --------------------------------------------------------------------------
   * Bootstrap (v5.0.1): scrollspy.js
   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
   * --------------------------------------------------------------------------
   */
  /**
   * ------------------------------------------------------------------------
   * Constants
   * ------------------------------------------------------------------------
   */

  const NAME$2 = 'scrollspy';
  const DATA_KEY$2 = 'bs.scrollspy';
  const EVENT_KEY$2 = `.${DATA_KEY$2}`;
  const DATA_API_KEY$1 = '.data-api';
  const Default$1 = {
    offset: 10,
    method: 'auto',
    target: ''
  };
  const DefaultType$1 = {
    offset: 'number',
    method: 'string',
    target: '(string|element)'
  };
  const EVENT_ACTIVATE = `activate${EVENT_KEY$2}`;
  const EVENT_SCROLL = `scroll${EVENT_KEY$2}`;
  const EVENT_LOAD_DATA_API = `load${EVENT_KEY$2}${DATA_API_KEY$1}`;
  const CLASS_NAME_DROPDOWN_ITEM = 'dropdown-item';
  const CLASS_NAME_ACTIVE$1 = 'active';
  const SELECTOR_DATA_SPY = '[data-bs-spy="scroll"]';
  const SELECTOR_NAV_LIST_GROUP$1 = '.nav, .list-group';
  const SELECTOR_NAV_LINKS = '.nav-link';
  const SELECTOR_NAV_ITEMS = '.nav-item';
  const SELECTOR_LIST_ITEMS = '.list-group-item';
  const SELECTOR_DROPDOWN$1 = '.dropdown';
  const SELECTOR_DROPDOWN_TOGGLE$1 = '.dropdown-toggle';
  const METHOD_OFFSET = 'offset';
  const METHOD_POSITION = 'position';
  /**
   * ------------------------------------------------------------------------
   * Class Definition
   * ------------------------------------------------------------------------
   */

  class ScrollSpy extends BaseComponent {
    constructor(element, config) {
      super(element);
      this._scrollElement = this._element.tagName === 'BODY' ? window : this._element;
      this._config = this._getConfig(config);
      this._selector = `${this._config.target} ${SELECTOR_NAV_LINKS}, ${this._config.target} ${SELECTOR_LIST_ITEMS}, ${this._config.target} .${CLASS_NAME_DROPDOWN_ITEM}`;
      this._offsets = [];
      this._targets = [];
      this._activeTarget = null;
      this._scrollHeight = 0;
      EventHandler.on(this._scrollElement, EVENT_SCROLL, () => this._process());
      this.refresh();

      this._process();
    } // Getters


    static get Default() {
      return Default$1;
    }

    static get NAME() {
      return NAME$2;
    } // Public


    refresh() {
      const autoMethod = this._scrollElement === this._scrollElement.window ? METHOD_OFFSET : METHOD_POSITION;
      const offsetMethod = this._config.method === 'auto' ? autoMethod : this._config.method;
      const offsetBase = offsetMethod === METHOD_POSITION ? this._getScrollTop() : 0;
      this._offsets = [];
      this._targets = [];
      this._scrollHeight = this._getScrollHeight();
      const targets = SelectorEngine.find(this._selector);
      targets.map(element => {
        const targetSelector = getSelectorFromElement(element);
        const target = targetSelector ? SelectorEngine.findOne(targetSelector) : null;

        if (target) {
          const targetBCR = target.getBoundingClientRect();

          if (targetBCR.width || targetBCR.height) {
            if ( this._scrollElement === this._scrollElement.window && 'offset' == offsetMethod ) {
              return [targetBCR.top + this._scrollElement.window.pageYOffset + offsetBase, targetSelector];
            }
            return [Manipulator[offsetMethod](target).top + offsetBase, targetSelector];
          }
        }

        return null;
      }).filter(item => item).sort((a, b) => a[0] - b[0]).forEach(item => {
        this._offsets.push(item[0]);

        this._targets.push(item[1]);
      });
    }

    dispose() {
      EventHandler.off(this._scrollElement, EVENT_KEY$2);
      super.dispose();
    } // Private


    _getConfig(config) {
      config = { ...Default$1,
        ...Manipulator.getDataAttributes(this._element),
        ...(typeof config === 'object' && config ? config : {})
      };

      if (typeof config.target !== 'string' && isElement$1(config.target)) {
        let {
          id
        } = config.target;

        if (!id) {
          id = getUID(NAME$2);
          config.target.id = id;
        }

        config.target = `#${id}`;
      }

      typeCheckConfig(NAME$2, config, DefaultType$1);
      return config;
    }

    _getScrollTop() {
      return this._scrollElement === window ? this._scrollElement.pageYOffset : this._scrollElement.scrollTop;
    }

    _getScrollHeight() {
      return this._scrollElement.scrollHeight || Math.max(document.body.scrollHeight, document.documentElement.scrollHeight);
    }

    _getOffsetHeight() {
      return this._scrollElement === window ? window.innerHeight : this._scrollElement.getBoundingClientRect().height;
    }

    _process() {
      const scrollTop = this._getScrollTop() + this._config.offset;

      const scrollHeight = this._getScrollHeight();

      const maxScroll = this._config.offset + scrollHeight - this._getOffsetHeight();

      if (this._scrollHeight !== scrollHeight) {
        this.refresh();
      }

      if (scrollTop >= maxScroll) {
        const target = this._targets[this._targets.length - 1];

        if (this._activeTarget !== target) {
          this._activate(target);
        }

        return;
      }

      if (this._activeTarget && scrollTop < this._offsets[0] && this._offsets[0] > 0) {
        this._activeTarget = null;

        this._clear();

        return;
      }

      for (let i = this._offsets.length; i--;) {
        const isActiveTarget = this._activeTarget !== this._targets[i] && scrollTop >= this._offsets[i] && (typeof this._offsets[i + 1] === 'undefined' || scrollTop < this._offsets[i + 1]);

        if (isActiveTarget) {
          this._activate(this._targets[i]);
        }
      }
    }

    _activate(target) {
      this._activeTarget = target;

      this._clear();

      const queries = this._selector.split(',').map(selector => `${selector}[data-bs-target="${target}"],${selector}[href="${target}"]`);

      const link = SelectorEngine.findOne(queries.join(','));

      if (link.classList.contains(CLASS_NAME_DROPDOWN_ITEM)) {
        SelectorEngine.findOne(SELECTOR_DROPDOWN_TOGGLE$1, link.closest(SELECTOR_DROPDOWN$1)).classList.add(CLASS_NAME_ACTIVE$1);
        link.classList.add(CLASS_NAME_ACTIVE$1);
      } else {
        // Set triggered link as active
        link.classList.add(CLASS_NAME_ACTIVE$1);
        SelectorEngine.parents(link, SELECTOR_NAV_LIST_GROUP$1).forEach(listGroup => {
          // Set triggered links parents as active
          // With both <ul> and <nav> markup a parent is the previous sibling of any nav ancestor
          SelectorEngine.prev(listGroup, `${SELECTOR_NAV_LINKS}, ${SELECTOR_LIST_ITEMS}`).forEach(item => item.classList.add(CLASS_NAME_ACTIVE$1)); // Handle special case when .nav-link is inside .nav-item

          SelectorEngine.prev(listGroup, SELECTOR_NAV_ITEMS).forEach(navItem => {
            SelectorEngine.children(navItem, SELECTOR_NAV_LINKS).forEach(item => item.classList.add(CLASS_NAME_ACTIVE$1));
          });
        });
      }

      EventHandler.trigger(this._scrollElement, EVENT_ACTIVATE, {
        relatedTarget: target
      });
    }

    _clear() {
      SelectorEngine.find(this._selector).filter(node => node.classList.contains(CLASS_NAME_ACTIVE$1)).forEach(node => node.classList.remove(CLASS_NAME_ACTIVE$1));
    } // Static


    static jQueryInterface(config) {
      return this.each(function () {
        const data = ScrollSpy.getInstance(this) || new ScrollSpy(this, typeof config === 'object' ? config : {});

        if (typeof config !== 'string') {
          return;
        }

        if (typeof data[config] === 'undefined') {
          throw new TypeError(`No method named "${config}"`);
        }

        data[config]();
      });
    }

  }
  /**
   * ------------------------------------------------------------------------
   * Data Api implementation
   * ------------------------------------------------------------------------
   */


  EventHandler.on(window, EVENT_LOAD_DATA_API, () => {
    SelectorEngine.find(SELECTOR_DATA_SPY).forEach(spy => new ScrollSpy(spy));
  });
  /**
   * ------------------------------------------------------------------------
   * jQuery
   * ------------------------------------------------------------------------
   * add .ScrollSpy to jQuery only if jQuery is present
   */

  defineJQueryPlugin(ScrollSpy);

  /**
   * --------------------------------------------------------------------------
   * Bootstrap (v5.0.1): tab.js
   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
   * --------------------------------------------------------------------------
   */
  /**
   * ------------------------------------------------------------------------
   * Constants
   * ------------------------------------------------------------------------
   */

  const NAME$1 = 'tab';
  const DATA_KEY$1 = 'bs.tab';
  const EVENT_KEY$1 = `.${DATA_KEY$1}`;
  const DATA_API_KEY = '.data-api';
  const EVENT_HIDE$1 = `hide${EVENT_KEY$1}`;
  const EVENT_HIDDEN$1 = `hidden${EVENT_KEY$1}`;
  const EVENT_SHOW$1 = `show${EVENT_KEY$1}`;
  const EVENT_SHOWN$1 = `shown${EVENT_KEY$1}`;
  const EVENT_CLICK_DATA_API = `click${EVENT_KEY$1}${DATA_API_KEY}`;
  const CLASS_NAME_DROPDOWN_MENU = 'dropdown-menu';
  const CLASS_NAME_ACTIVE = 'active';
  const CLASS_NAME_FADE$1 = 'fade';
  const CLASS_NAME_SHOW$1 = 'show';
  const SELECTOR_DROPDOWN = '.dropdown';
  const SELECTOR_NAV_LIST_GROUP = '.nav, .list-group';
  const SELECTOR_ACTIVE = '.active';
  const SELECTOR_ACTIVE_UL = ':scope > li > .active';
  const SELECTOR_DATA_TOGGLE = '[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]';
  const SELECTOR_DROPDOWN_TOGGLE = '.dropdown-toggle';
  const SELECTOR_DROPDOWN_ACTIVE_CHILD = ':scope > .dropdown-menu .active';
  /**
   * ------------------------------------------------------------------------
   * Class Definition
   * ------------------------------------------------------------------------
   */

  class Tab extends BaseComponent {
    // Getters
    static get NAME() {
      return NAME$1;
    } // Public


    show() {
      if (this._element.parentNode && this._element.parentNode.nodeType === Node.ELEMENT_NODE && this._element.classList.contains(CLASS_NAME_ACTIVE)) {
        return;
      }

      let previous;
      const target = getElementFromSelector(this._element);

      const listElement = this._element.closest(SELECTOR_NAV_LIST_GROUP);

      if (listElement) {
        const itemSelector = listElement.nodeName === 'UL' || listElement.nodeName === 'OL' ? SELECTOR_ACTIVE_UL : SELECTOR_ACTIVE;
        previous = SelectorEngine.find(itemSelector, listElement);
        previous = previous[previous.length - 1];
      }

      const hideEvent = previous ? EventHandler.trigger(previous, EVENT_HIDE$1, {
        relatedTarget: this._element
      }) : null;
      const showEvent = EventHandler.trigger(this._element, EVENT_SHOW$1, {
        relatedTarget: previous
      });

      if (showEvent.defaultPrevented || hideEvent !== null && hideEvent.defaultPrevented) {
        return;
      }

      this._activate(this._element, listElement);

      const complete = () => {
        EventHandler.trigger(previous, EVENT_HIDDEN$1, {
          relatedTarget: this._element
        });
        EventHandler.trigger(this._element, EVENT_SHOWN$1, {
          relatedTarget: previous
        });
      };

      if (target) {
        this._activate(target, target.parentNode, complete);
      } else {
        complete();
      }
    } // Private


    _activate(element, container, callback) {
      const activeElements = container && (container.nodeName === 'UL' || container.nodeName === 'OL') ? SelectorEngine.find(SELECTOR_ACTIVE_UL, container) : SelectorEngine.children(container, SELECTOR_ACTIVE);
      const active = activeElements[0];
      const isTransitioning = callback && active && active.classList.contains(CLASS_NAME_FADE$1);

      const complete = () => this._transitionComplete(element, active, callback);

      if (active && isTransitioning) {
        active.classList.remove(CLASS_NAME_SHOW$1);

        this._queueCallback(complete, element, true);
      } else {
        complete();
      }
    }

    _transitionComplete(element, active, callback) {
      if (active) {
        active.classList.remove(CLASS_NAME_ACTIVE);
        const dropdownChild = SelectorEngine.findOne(SELECTOR_DROPDOWN_ACTIVE_CHILD, active.parentNode);

        if (dropdownChild) {
          dropdownChild.classList.remove(CLASS_NAME_ACTIVE);
        }

        if (active.getAttribute('role') === 'tab') {
          active.setAttribute('aria-selected', false);
        }
      }

      element.classList.add(CLASS_NAME_ACTIVE);

      if (element.getAttribute('role') === 'tab') {
        element.setAttribute('aria-selected', true);
      }

      reflow(element);

      if (element.classList.contains(CLASS_NAME_FADE$1)) {
        element.classList.add(CLASS_NAME_SHOW$1);
      }

      let parent = element.parentNode;

      if (parent && parent.nodeName === 'LI') {
        parent = parent.parentNode;
      }

      if (parent && parent.classList.contains(CLASS_NAME_DROPDOWN_MENU)) {
        const dropdownElement = element.closest(SELECTOR_DROPDOWN);

        if (dropdownElement) {
          SelectorEngine.find(SELECTOR_DROPDOWN_TOGGLE, dropdownElement).forEach(dropdown => dropdown.classList.add(CLASS_NAME_ACTIVE));
        }

        element.setAttribute('aria-expanded', true);
      }

      if (callback) {
        callback();
      }
    } // Static


    static jQueryInterface(config) {
      return this.each(function () {
        const data = Data.get(this, DATA_KEY$1) || new Tab(this);

        if (typeof config === 'string') {
          if (typeof data[config] === 'undefined') {
            throw new TypeError(`No method named "${config}"`);
          }

          data[config]();
        }
      });
    }

  }
  /**
   * ------------------------------------------------------------------------
   * Data Api implementation
   * ------------------------------------------------------------------------
   */


  EventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
    if (['A', 'AREA'].includes(this.tagName)) {
      event.preventDefault();
    }

    if (isDisabled(this)) {
      return;
    }

    const data = Data.get(this, DATA_KEY$1) || new Tab(this);
    data.show();
  });
  /**
   * ------------------------------------------------------------------------
   * jQuery
   * ------------------------------------------------------------------------
   * add .Tab to jQuery only if jQuery is present
   */

  defineJQueryPlugin(Tab);

  /**
   * --------------------------------------------------------------------------
   * Bootstrap (v5.0.1): toast.js
   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
   * --------------------------------------------------------------------------
   */
  /**
   * ------------------------------------------------------------------------
   * Constants
   * ------------------------------------------------------------------------
   */

  const NAME = 'toast';
  const DATA_KEY = 'bs.toast';
  const EVENT_KEY = `.${DATA_KEY}`;
  const EVENT_CLICK_DISMISS = `click.dismiss${EVENT_KEY}`;
  const EVENT_MOUSEOVER = `mouseover${EVENT_KEY}`;
  const EVENT_MOUSEOUT = `mouseout${EVENT_KEY}`;
  const EVENT_FOCUSIN = `focusin${EVENT_KEY}`;
  const EVENT_FOCUSOUT = `focusout${EVENT_KEY}`;
  const EVENT_HIDE = `hide${EVENT_KEY}`;
  const EVENT_HIDDEN = `hidden${EVENT_KEY}`;
  const EVENT_SHOW = `show${EVENT_KEY}`;
  const EVENT_SHOWN = `shown${EVENT_KEY}`;
  const CLASS_NAME_FADE = 'fade';
  const CLASS_NAME_HIDE = 'hide';
  const CLASS_NAME_SHOW = 'show';
  const CLASS_NAME_SHOWING = 'showing';
  const DefaultType = {
    animation: 'boolean',
    autohide: 'boolean',
    delay: 'number'
  };
  const Default = {
    animation: true,
    autohide: true,
    delay: 5000
  };
  const SELECTOR_DATA_DISMISS = '[data-bs-dismiss="toast"]';
  /**
   * ------------------------------------------------------------------------
   * Class Definition
   * ------------------------------------------------------------------------
   */

  class Toast extends BaseComponent {
    constructor(element, config) {
      super(element);
      this._config = this._getConfig(config);
      this._timeout = null;
      this._hasMouseInteraction = false;
      this._hasKeyboardInteraction = false;

      this._setListeners();
    } // Getters


    static get DefaultType() {
      return DefaultType;
    }

    static get Default() {
      return Default;
    }

    static get NAME() {
      return NAME;
    } // Public


    show() {
      const showEvent = EventHandler.trigger(this._element, EVENT_SHOW);

      if (showEvent.defaultPrevented) {
        return;
      }

      this._clearTimeout();

      if (this._config.animation) {
        this._element.classList.add(CLASS_NAME_FADE);
      }

      const complete = () => {
        this._element.classList.remove(CLASS_NAME_SHOWING);

        this._element.classList.add(CLASS_NAME_SHOW);

        EventHandler.trigger(this._element, EVENT_SHOWN);

        this._maybeScheduleHide();
      };

      this._element.classList.remove(CLASS_NAME_HIDE);

      reflow(this._element);

      this._element.classList.add(CLASS_NAME_SHOWING);

      this._queueCallback(complete, this._element, this._config.animation);
    }

    hide() {
      if (!this._element.classList.contains(CLASS_NAME_SHOW)) {
        return;
      }

      const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE);

      if (hideEvent.defaultPrevented) {
        return;
      }

      const complete = () => {
        this._element.classList.add(CLASS_NAME_HIDE);

        EventHandler.trigger(this._element, EVENT_HIDDEN);
      };

      this._element.classList.remove(CLASS_NAME_SHOW);

      this._queueCallback(complete, this._element, this._config.animation);
    }

    dispose() {
      this._clearTimeout();

      if (this._element.classList.contains(CLASS_NAME_SHOW)) {
        this._element.classList.remove(CLASS_NAME_SHOW);
      }

      super.dispose();
    } // Private


    _getConfig(config) {
      config = { ...Default,
        ...Manipulator.getDataAttributes(this._element),
        ...(typeof config === 'object' && config ? config : {})
      };
      typeCheckConfig(NAME, config, this.constructor.DefaultType);
      return config;
    }

    _maybeScheduleHide() {
      if (!this._config.autohide) {
        return;
      }

      if (this._hasMouseInteraction || this._hasKeyboardInteraction) {
        return;
      }

      this._timeout = setTimeout(() => {
        this.hide();
      }, this._config.delay);
    }

    _onInteraction(event, isInteracting) {
      switch (event.type) {
        case 'mouseover':
        case 'mouseout':
          this._hasMouseInteraction = isInteracting;
          break;

        case 'focusin':
        case 'focusout':
          this._hasKeyboardInteraction = isInteracting;
          break;
      }

      if (isInteracting) {
        this._clearTimeout();

        return;
      }

      const nextElement = event.relatedTarget;

      if (this._element === nextElement || this._element.contains(nextElement)) {
        return;
      }

      this._maybeScheduleHide();
    }

    _setListeners() {
      EventHandler.on(this._element, EVENT_CLICK_DISMISS, SELECTOR_DATA_DISMISS, () => this.hide());
      EventHandler.on(this._element, EVENT_MOUSEOVER, event => this._onInteraction(event, true));
      EventHandler.on(this._element, EVENT_MOUSEOUT, event => this._onInteraction(event, false));
      EventHandler.on(this._element, EVENT_FOCUSIN, event => this._onInteraction(event, true));
      EventHandler.on(this._element, EVENT_FOCUSOUT, event => this._onInteraction(event, false));
    }

    _clearTimeout() {
      clearTimeout(this._timeout);
      this._timeout = null;
    } // Static


    static jQueryInterface(config) {
      return this.each(function () {
        let data = Data.get(this, DATA_KEY);

        const _config = typeof config === 'object' && config;

        if (!data) {
          data = new Toast(this, _config);
        }

        if (typeof config === 'string') {
          if (typeof data[config] === 'undefined') {
            throw new TypeError(`No method named "${config}"`);
          }

          data[config](this);
        }
      });
    }

  }
  /**
   * ------------------------------------------------------------------------
   * jQuery
   * ------------------------------------------------------------------------
   * add .Toast to jQuery only if jQuery is present
   */


  defineJQueryPlugin(Toast);

  /**
   * --------------------------------------------------------------------------
   * Bootstrap (v5.0.1): index.umd.js
   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
   * --------------------------------------------------------------------------
   */
  var index_umd = {
    Alert,
    Button,
    //Carousel,
    Collapse,
    Dropdown,
    Modal,
    Offcanvas,
    Popover,
    ScrollSpy,
    Tab,
    Toast,
    Tooltip
  };

  return index_umd;

})));
// source --> https://mfrash.com/wp-content/plugins/woocommerce/assets/js/jquery-cookie/jquery.cookie.min.js?ver=1.4.1-wc.10.7.0 
/*!
 * jQuery Cookie Plugin v1.4.1
 * https://github.com/carhartl/jquery-cookie
 *
 * Copyright 2013 Klaus Hartl
 * Released under the MIT license
 */
!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?e(require("jquery")):e(jQuery)}(function(e){var n=/\+/g;function o(e){return r.raw?e:encodeURIComponent(e)}function i(e,o){var i=r.raw?e:function(e){0===e.indexOf('"')&&(e=e.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return e=decodeURIComponent(e.replace(n," ")),r.json?JSON.parse(e):e}catch(o){}}(e);return"function"==typeof o?o(i):i}var r=e.cookie=function(n,t,u){if(t!==undefined&&"function"!=typeof t){if("number"==typeof(u=e.extend({},r.defaults,u)).expires){var c=u.expires,f=u.expires=new Date;f.setTime(+f+864e5*c)}return document.cookie=[o(n),"=",function(e){return o(r.json?JSON.stringify(e):String(e))}(t),u.expires?"; expires="+u.expires.toUTCString():"",u.path?"; path="+u.path:"",u.domain?"; domain="+u.domain:"",u.secure?"; secure":""].join("")}for(var d,a=n?undefined:{},p=document.cookie?document.cookie.split("; "):[],s=0,m=p.length;s<m;s++){var x=p[s].split("="),y=(d=x.shift(),r.raw?d:decodeURIComponent(d)),k=x.join("=");if(n&&n===y){a=i(k,t);break}n||(k=i(k))===undefined||(a[y]=k)}return a};r.defaults={},e.removeCookie=function(n,o){return e.cookie(n)!==undefined&&(e.cookie(n,"",e.extend({},o,{expires:-1})),!e.cookie(n))}});
// source --> https://mfrash.com/wp-content/themes/porto/js/libs/owl.carousel.min.js?ver=2.3.4 
!function(t,e,i,s){function n(e,i){this.settings=null,this.options=t.extend({},n.Defaults,i),this.$element=t(e),this._handlers={},this._plugins={},this._supress={},this._current=null,this._speed=null,this._coordinates=[],this._breakpoint=null,this._width=null,this._items=[],this._clones=[],this._mergers=[],this._widths=[],this._invalidated={},this._pipe=[],this._drag={time:null,target:null,pointer:null,stage:{start:null,current:null},direction:null},this._states={current:{},tags:{initializing:["busy"],animating:["busy"],dragging:["interacting"]}},t.each(["onResize","onThrottledResize"],t.proxy((function(e,i){this._handlers[i]=t.proxy(this[i],this)}),this)),t.each(n.Plugins,t.proxy((function(t,e){this._plugins[t.charAt(0).toLowerCase()+t.slice(1)]=new e(this)}),this)),t.each(n.Workers,t.proxy((function(e,i){this._pipe.push({filter:i.filter,run:t.proxy(i.run,this)})}),this)),this.setup(),this.initialize()}n.Defaults={items:3,loop:!1,center:!1,rewind:!1,checkVisibility:!0,mouseDrag:!0,touchDrag:!0,pullDrag:!0,freeDrag:!1,margin:0,stagePadding:0,merge:!1,mergeFit:!0,autoWidth:!1,startPosition:0,rtl:!1,smartSpeed:250,fluidSpeed:!1,dragEndSpeed:!1,responsive:{},responsiveRefreshRate:200,responsiveBaseElement:e,fallbackEasing:"swing",slideTransition:"",info:!1,nestedItemSelector:!1,itemElement:"div",stageElement:"div",refreshClass:"owl-refresh",loadedClass:"owl-loaded",loadingClass:"owl-loading",rtlClass:"owl-rtl",responsiveClass:"owl-responsive",dragClass:"owl-drag",itemClass:"owl-item",stageClass:"owl-stage",stageOuterClass:"owl-stage-outer",grabClass:"owl-grab"},n.Width={Default:"default",Inner:"inner",Outer:"outer"},n.Type={Event:"event",State:"state"},n.Plugins={},n.Workers=[{filter:["width","settings"],run:function(){this._width=this.$element.width()}},{filter:["width","items","settings"],run:function(t){t.current=this._items&&this._items[this.relative(this._current)]}},{filter:["items","settings"],run:function(){this.$stage.children(".cloned").remove()}},{filter:["width","items","settings"],run:function(t){var e=this.settings.margin||"",i=!this.settings.autoWidth,s=this.settings.rtl,n={width:"auto","margin-left":s?e:"","margin-right":s?"":e};!i&&this.$stage.children().css(n),t.css=n}},{filter:["width","items","settings"],run:function(t){var e=(this.width()/this.settings.items).toFixed(3)-this.settings.margin,i=null,s=this._items.length,n=!this.settings.autoWidth,o=[];for(t.items={merge:!1,width:e};s--;)i=this._mergers[s],i=this.settings.mergeFit&&Math.min(i,this.settings.items)||i,t.items.merge=i>1||t.items.merge,o[s]=n?e*i:this._items[s].width();this._widths=o}},{filter:["items","settings"],run:function(){var e=[],i=this._items,s=this.settings,n=Math.max(2*s.items,4),o=2*Math.ceil(i.length/2),r=s.loop&&i.length?s.rewind?n:Math.max(n,o):0,a="",h="";for(r/=2;r>0;)e.push(this.normalize(e.length/2,!0)),a+=i[e[e.length-1]][0].outerHTML,e.push(this.normalize(i.length-1-(e.length-1)/2,!0)),h=i[e[e.length-1]][0].outerHTML+h,r-=1;this._clones=e,t(a).addClass("cloned").appendTo(this.$stage),t(h).addClass("cloned").prependTo(this.$stage)}},{filter:["width","items","settings"],run:function(){for(var t=this.settings.rtl?1:-1,e=this._clones.length+this._items.length,i=-1,s=0,n=0,o=[];++i<e;)s=o[i-1]||0,n=this._widths[this.relative(i)]+this.settings.margin,o.push(s+n*t);this._coordinates=o}},{filter:["width","items","settings"],run:function(){var t=this.settings.stagePadding,e=this._coordinates,i={width:Math.ceil(Math.abs(e[e.length-1]))+2*t,"padding-left":t||"","padding-right":t||""};this.$stage.css(i)}},{filter:["width","items","settings"],run:function(t){var e=this._coordinates.length,i=!this.settings.autoWidth,s=this.$stage.children();if(i&&t.items.merge)for(;e--;)t.css.width=this._widths[this.relative(e)],s.eq(e).css(t.css);else i&&(t.css.width=t.items.width,s.css(t.css))}},{filter:["items"],run:function(){this._coordinates.length<1&&this.$stage.removeAttr("style")}},{filter:["width","items","settings"],run:function(t){t.current=t.current?this.$stage.children().index(t.current):0,t.current=Math.max(this.minimum(),Math.min(this.maximum(),t.current)),this.reset(t.current)}},{filter:["position"],run:function(){this.animate(this.coordinates(this._current))}},{filter:["width","position","items","settings"],run:function(){var t,e,i,s,n=this.settings.rtl?1:-1,o=2*this.settings.stagePadding,r=this.coordinates(this.current())+o,a=r+this.width()*n,h=[];for(i=0,s=this._coordinates.length;i<s;i++)t=this._coordinates[i-1]||0,e=Math.abs(this._coordinates[i])+o*n,(this.op(t,"<=",r)&&this.op(t,">",a)||this.op(e,"<",r)&&this.op(e,">",a))&&h.push(i);this.$stage.children(".active").removeClass("active"),this.$stage.children(":eq("+h.join("), :eq(")+")").addClass("active"),this.$stage.children(".center").removeClass("center"),this.settings.center&&this.$stage.children().eq(this.current()).addClass("center")}}],n.prototype.initializeStage=function(){this.$stage=this.$element.find("."+this.settings.stageClass),this.$stage.length||(this.$element.addClass(this.options.loadingClass),this.$stage=t("<"+this.settings.stageElement+">",{class:this.settings.stageClass}).wrap(t("<div/>",{class:this.settings.stageOuterClass})),this.$element.append(this.$stage.parent()))},n.prototype.initializeItems=function(){var e=this.$element.find(".owl-item");if(e.length)return this._items=e.get().map((function(e){return t(e)})),this._mergers=this._items.map((function(){return 1})),void this.refresh();this.replace(this.$element.children().not(this.$stage.parent())),this.isVisible()?this.refresh():this.invalidate("width"),this.$element.removeClass(this.options.loadingClass).addClass(this.options.loadedClass)},n.prototype.initialize=function(){var t,e,i;(this.enter("initializing"),this.trigger("initialize"),this.$element.toggleClass(this.settings.rtlClass,this.settings.rtl),this.settings.autoWidth&&!this.is("pre-loading"))&&(t=this.$element.find("img"),e=this.settings.nestedItemSelector?"."+this.settings.nestedItemSelector:s,i=this.$element.children(e).width(),t.length&&i<=0&&this.preloadAutoWidthImages(t));this.initializeStage(),this.initializeItems(),this.registerEventHandlers(),this.leave("initializing"),this.trigger("initialized")},n.prototype.isVisible=function(){return!this.settings.checkVisibility||this.$element.is(":visible")},n.prototype.setup=function(){var e=this.viewport(),i=this.options.responsive,s=-1,n=null;i?(t.each(i,(function(t){t<=e&&t>s&&(s=Number(t))})),"function"==typeof(n=t.extend({},this.options,i[s])).stagePadding&&(n.stagePadding=n.stagePadding()),delete n.responsive,n.responsiveClass&&this.$element.attr("class",this.$element.attr("class").replace(new RegExp("("+this.options.responsiveClass+"-)\\S+\\s","g"),"$1"+s))):n=t.extend({},this.options),this.trigger("change",{property:{name:"settings",value:n}}),this._breakpoint=s,this.settings=n,this.invalidate("settings"),this.trigger("changed",{property:{name:"settings",value:this.settings}})},n.prototype.optionsLogic=function(){this.settings.autoWidth&&(this.settings.stagePadding=!1,this.settings.merge=!1)},n.prototype.prepare=function(e){var i=this.trigger("prepare",{content:e});return i.data||(i.data=t("<"+this.settings.itemElement+"/>").addClass(this.options.itemClass).append(e)),this.trigger("prepared",{content:i.data}),i.data},n.prototype.update=function(){for(var e=0,i=this._pipe.length,s=t.proxy((function(t){return this[t]}),this._invalidated),n={};e<i;)(this._invalidated.all||t.grep(this._pipe[e].filter,s).length>0)&&this._pipe[e].run(n),e++;this._invalidated={},!this.is("valid")&&this.enter("valid")},n.prototype.width=function(t){switch(t=t||n.Width.Default){case n.Width.Inner:case n.Width.Outer:return this._width;default:return this._width-2*this.settings.stagePadding+this.settings.margin}},n.prototype.refresh=function(){this.enter("refreshing"),this.trigger("refresh"),this.setup(),this.optionsLogic(),this.$element.addClass(this.options.refreshClass),this.update(),this.$element.removeClass(this.options.refreshClass),this.leave("refreshing"),this.trigger("refreshed")},n.prototype.onThrottledResize=function(){e.clearTimeout(this.resizeTimer),this.resizeTimer=e.setTimeout(this._handlers.onResize,this.settings.responsiveRefreshRate)},n.prototype.onResize=function(){return!!this._items.length&&(this._width!==this.$element.width()&&(!!this.isVisible()&&(this.enter("resizing"),this.trigger("resize").isDefaultPrevented()?(this.leave("resizing"),!1):(this.invalidate("width"),this.refresh(),this.leave("resizing"),void this.trigger("resized")))))},n.prototype.registerEventHandlers=function(){t.support.transition&&this.$stage.on(t.support.transition.end+".owl.core",t.proxy(this.onTransitionEnd,this)),!1!==this.settings.responsive&&this.on(e,"resize",this._handlers.onThrottledResize),this.settings.mouseDrag&&(this.$element.addClass(this.options.dragClass),this.$stage.on("mousedown.owl.core",t.proxy(this.onDragStart,this)),this.$stage.on("dragstart.owl.core selectstart.owl.core",(function(){return!1}))),this.settings.touchDrag&&(this.$stage.on("touchstart.owl.core",t.proxy(this.onDragStart,this)),this.$stage.on("touchcancel.owl.core",t.proxy(this.onDragEnd,this)))},n.prototype.onDragStart=function(e){var s=null;3!==e.which&&(t.support.transform?s={x:(s=this.$stage.css("transform").replace(/.*\(|\)| /g,"").split(","))[16===s.length?12:4],y:s[16===s.length?13:5]}:(s=this.$stage.position(),s={x:this.settings.rtl?s.left+this.$stage.width()-this.width()+this.settings.margin:s.left,y:s.top}),this.is("animating")&&(t.support.transform?this.animate(s.x):this.$stage.stop(),this.invalidate("position")),this.$element.toggleClass(this.options.grabClass,"mousedown"===e.type),this.speed(0),this._drag.time=(new Date).getTime(),this._drag.target=t(e.target),this._drag.stage.start=s,this._drag.stage.current=s,this._drag.pointer=this.pointer(e),t(i).on("mouseup.owl.core touchend.owl.core",t.proxy(this.onDragEnd,this)),t(i).one("mousemove.owl.core touchmove.owl.core",t.proxy((function(e){var s=this.difference(this._drag.pointer,this.pointer(e));t(i).on("mousemove.owl.core touchmove.owl.core",t.proxy(this.onDragMove,this)),Math.abs(s.x)<Math.abs(s.y)&&this.is("valid")||(e.preventDefault(),this.enter("dragging"),this.trigger("drag"))}),this)))},n.prototype.onDragMove=function(t){var e=null,i=null,s=null,n=this.difference(this._drag.pointer,this.pointer(t)),o=this.difference(this._drag.stage.start,n);this.is("dragging")&&(t.preventDefault(),this.settings.loop?(e=this.coordinates(this.minimum()),i=this.coordinates(this.maximum()+1)-e,o.x=((o.x-e)%i+i)%i+e):(e=this.settings.rtl?this.coordinates(this.maximum()):this.coordinates(this.minimum()),i=this.settings.rtl?this.coordinates(this.minimum()):this.coordinates(this.maximum()),s=this.settings.pullDrag?-1*n.x/5:0,o.x=Math.max(Math.min(o.x,e+s),i+s)),this._drag.stage.current=o,this.animate(o.x))},n.prototype.onDragEnd=function(e){var s=this.difference(this._drag.pointer,this.pointer(e)),n=this._drag.stage.current,o=s.x>0^this.settings.rtl?"left":"right";t(i).off(".owl.core"),this.$element.removeClass(this.options.grabClass),(0!==s.x&&this.is("dragging")||!this.is("valid"))&&(this.speed(this.settings.dragEndSpeed||this.settings.smartSpeed),this.current(this.closest(n.x,0!==s.x?o:this._drag.direction)),this.invalidate("position"),this.update(),this._drag.direction=o,(Math.abs(s.x)>3||(new Date).getTime()-this._drag.time>300)&&this._drag.target.one("click.owl.core",(function(){return!1}))),this.is("dragging")&&(this.leave("dragging"),this.trigger("dragged"))},n.prototype.closest=function(e,i){var n=-1,o=this.width(),r=this.coordinates();return this.settings.freeDrag||t.each(r,t.proxy((function(t,a){return"left"===i&&e>a-30&&e<a+30?n=t:"right"===i&&e>a-o-30&&e<a-o+30?n=t+1:this.op(e,"<",a)&&this.op(e,">",r[t+1]!==s?r[t+1]:a-o)&&(n="left"===i?t+1:t),-1===n}),this)),this.settings.loop||(this.op(e,">",r[this.minimum()])?n=e=this.minimum():this.op(e,"<",r[this.maximum()])&&(n=e=this.maximum())),n},n.prototype.animate=function(e){var i=this.speed()>0;this.is("animating")&&this.onTransitionEnd(),i&&(this.enter("animating"),this.trigger("translate")),t.support.transform3d&&t.support.transition?this.$stage.css({transform:"translate3d("+e+"px,0px,0px)",transition:this.speed()/1e3+"s"+(this.settings.slideTransition?" "+this.settings.slideTransition:"")}):i?this.$stage.animate({left:e+"px"},this.speed(),this.settings.fallbackEasing,t.proxy(this.onTransitionEnd,this)):this.$stage.css({left:e+"px"})},n.prototype.is=function(t){return this._states.current[t]&&this._states.current[t]>0},n.prototype.current=function(t){if(t===s)return this._current;if(0===this._items.length)return s;if(t=this.normalize(t),this._current!==t){var e=this.trigger("change",{property:{name:"position",value:t}});e.data!==s&&(t=this.normalize(e.data)),this._current=t,this.invalidate("position"),this.trigger("changed",{property:{name:"position",value:this._current}})}return this._current},n.prototype.invalidate=function(e){return"string"==typeof e&&(this._invalidated[e]=!0,this.is("valid")&&this.leave("valid")),t.map(this._invalidated,(function(t,e){return e}))},n.prototype.reset=function(t){(t=this.normalize(t))!==s&&(this._speed=0,this._current=t,this.suppress(["translate","translated"]),this.animate(this.coordinates(t)),this.release(["translate","translated"]))},n.prototype.normalize=function(t,e){var i=this._items.length,n=e?0:this._clones.length;return!this.isNumeric(t)||i<1?t=s:(t<0||t>=i+n)&&(t=((t-n/2)%i+i)%i+n/2),t},n.prototype.relative=function(t){return t-=this._clones.length/2,this.normalize(t,!0)},n.prototype.maximum=function(t){var e,i,s,n=this.settings,o=this._coordinates.length;if(n.loop)o=this._clones.length/2+this._items.length-1;else if(n.autoWidth||n.merge){if(e=this._items.length)for(i=this._items[--e].width(),s=this.$element.width();e--&&!((i+=this._items[e].width()+this.settings.margin)>s););o=e+1}else o=n.center?this._items.length-1:this._items.length-n.items;return t&&(o-=this._clones.length/2),Math.max(o,0)},n.prototype.minimum=function(t){return t?0:this._clones.length/2},n.prototype.items=function(t){return t===s?this._items.slice():(t=this.normalize(t,!0),this._items[t])},n.prototype.mergers=function(t){return t===s?this._mergers.slice():(t=this.normalize(t,!0),this._mergers[t])},n.prototype.clones=function(e){var i=this._clones.length/2,n=i+this._items.length,o=function(t){return t%2==0?n+t/2:i-(t+1)/2};return e===s?t.map(this._clones,(function(t,e){return o(e)})):t.map(this._clones,(function(t,i){return t===e?o(i):null}))},n.prototype.speed=function(t){return t!==s&&(this._speed=t),this._speed},n.prototype.coordinates=function(e){var i,n=1,o=e-1;return e===s?t.map(this._coordinates,t.proxy((function(t,e){return this.coordinates(e)}),this)):(this.settings.center?(this.settings.rtl&&(n=-1,o=e+1),i=this._coordinates[e],i+=(this.width()-i+(this._coordinates[o]||0))/2*n):i=this._coordinates[o]||0,i=Math.ceil(i))},n.prototype.duration=function(t,e,i){return 0===i?0:Math.min(Math.max(Math.abs(e-t),1),6)*Math.abs(i||this.settings.smartSpeed)},n.prototype.to=function(t,e){var i=this.current(),s=null,n=t-this.relative(i),o=(n>0)-(n<0),r=this._items.length,a=this.minimum(),h=this.maximum();this.settings.loop?(!this.settings.rewind&&Math.abs(n)>r/2&&(n+=-1*o*r),(s=(((t=i+n)-a)%r+r)%r+a)!==t&&s-n<=h&&s-n>0&&(i=s-n,t=s,this.reset(i))):t=this.settings.rewind?(t%(h+=1)+h)%h:Math.max(a,Math.min(h,t)),this.speed(this.duration(i,t,e)),this.current(t),this.isVisible()&&this.update()},n.prototype.next=function(t){t=t||!1,this.to(this.relative(this.current())+1,t)},n.prototype.prev=function(t){t=t||!1,this.to(this.relative(this.current())-1,t)},n.prototype.onTransitionEnd=function(t){if(t!==s&&(t.stopPropagation(),(t.target||t.srcElement||t.originalTarget)!==this.$stage.get(0)))return!1;this.leave("animating"),this.trigger("translated")},n.prototype.viewport=function(){var s;return this.options.responsiveBaseElement!==e?s=t(this.options.responsiveBaseElement).width():e.innerWidth?s=e.innerWidth:i.documentElement&&i.documentElement.clientWidth?s=i.documentElement.clientWidth:console.warn("Can not detect viewport width."),s},n.prototype.replace=function(e){this.$stage.empty(),this._items=[],e&&(e=e instanceof jQuery?e:t(e)),this.settings.nestedItemSelector&&(e=e.find("."+this.settings.nestedItemSelector)),e.filter((function(){return 1===this.nodeType})).each(t.proxy((function(t,e){e=this.prepare(e),this.$stage.append(e),this._items.push(e),this._mergers.push(1*e.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)}),this)),this.reset(this.isNumeric(this.settings.startPosition)?this.settings.startPosition:0),this.invalidate("items")},n.prototype.add=function(e,i){var n=this.relative(this._current);i=i===s?this._items.length:this.normalize(i,!0),e=e instanceof jQuery?e:t(e),this.trigger("add",{content:e,position:i}),e=this.prepare(e),0===this._items.length||i===this._items.length?(0===this._items.length&&this.$stage.append(e),0!==this._items.length&&this._items[i-1].after(e),this._items.push(e),this._mergers.push(1*e.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)):(this._items[i].before(e),this._items.splice(i,0,e),this._mergers.splice(i,0,1*e.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)),this._items[n]&&this.reset(this._items[n].index()),this.invalidate("items"),this.trigger("added",{content:e,position:i})},n.prototype.remove=function(t){(t=this.normalize(t,!0))!==s&&(this.trigger("remove",{content:this._items[t],position:t}),this._items[t].remove(),this._items.splice(t,1),this._mergers.splice(t,1),this.invalidate("items"),this.trigger("removed",{content:null,position:t}))},n.prototype.preloadAutoWidthImages=function(e){e.each(t.proxy((function(e,i){this.enter("pre-loading"),i=t(i),t(new Image).one("load",t.proxy((function(t){i.attr("src",t.target.src),i.css("opacity",1),this.leave("pre-loading"),!this.is("pre-loading")&&!this.is("initializing")&&this.refresh()}),this)).attr("src",i.attr("src")||i.attr("data-src")||i.attr("data-src-retina"))}),this))},n.prototype.destroy=function(){for(var s in this.$element.off(".owl.core"),this.$stage.off(".owl.core"),t(i).off(".owl.core"),!1!==this.settings.responsive&&(e.clearTimeout(this.resizeTimer),this.off(e,"resize",this._handlers.onThrottledResize)),this._plugins)this._plugins[s].destroy();this.$stage.children(".cloned").remove(),this.$stage.unwrap(),this.$stage.children().contents().unwrap(),this.$stage.children().unwrap(),this.$stage.remove(),this.$element.removeClass(this.options.refreshClass).removeClass(this.options.loadingClass).removeClass(this.options.loadedClass).removeClass(this.options.rtlClass).removeClass(this.options.dragClass).removeClass(this.options.grabClass).attr("class",this.$element.attr("class").replace(new RegExp(this.options.responsiveClass+"-\\S+\\s","g"),"")).removeData("owl.carousel")},n.prototype.op=function(t,e,i){var s=this.settings.rtl;switch(e){case"<":return s?t>i:t<i;case">":return s?t<i:t>i;case">=":return s?t<=i:t>=i;case"<=":return s?t>=i:t<=i}},n.prototype.on=function(t,e,i,s){t.addEventListener?t.addEventListener(e,i,s):t.attachEvent&&t.attachEvent("on"+e,i)},n.prototype.off=function(t,e,i,s){t.removeEventListener?t.removeEventListener(e,i,s):t.detachEvent&&t.detachEvent("on"+e,i)},n.prototype.trigger=function(e,i,s,o,r){var a={item:{count:this._items.length,index:this.current()}},h=t.camelCase(t.grep(["on",e,s],(function(t){return t})).join("-").toLowerCase()),l=t.Event([e,"owl",s||"carousel"].join(".").toLowerCase(),t.extend({relatedTarget:this},a,i));return this._supress[e]||(t.each(this._plugins,(function(t,e){e.onTrigger&&e.onTrigger(l)})),this.register({type:n.Type.Event,name:e}),this.$element.trigger(l),this.settings&&"function"==typeof this.settings[h]&&this.settings[h].call(this,l)),l},n.prototype.enter=function(e){t.each([e].concat(this._states.tags[e]||[]),t.proxy((function(t,e){this._states.current[e]===s&&(this._states.current[e]=0),this._states.current[e]++}),this))},n.prototype.leave=function(e){t.each([e].concat(this._states.tags[e]||[]),t.proxy((function(t,e){this._states.current[e]--}),this))},n.prototype.register=function(e){if(e.type===n.Type.Event){if(t.event.special[e.name]||(t.event.special[e.name]={}),!t.event.special[e.name].owl){var i=t.event.special[e.name]._default;t.event.special[e.name]._default=function(t){return!i||!i.apply||t.namespace&&-1!==t.namespace.indexOf("owl")?t.namespace&&t.namespace.indexOf("owl")>-1:i.apply(this,arguments)},t.event.special[e.name].owl=!0}}else e.type===n.Type.State&&(this._states.tags[e.name]?this._states.tags[e.name]=this._states.tags[e.name].concat(e.tags):this._states.tags[e.name]=e.tags,this._states.tags[e.name]=t.grep(this._states.tags[e.name],t.proxy((function(i,s){return t.inArray(i,this._states.tags[e.name])===s}),this)))},n.prototype.suppress=function(e){t.each(e,t.proxy((function(t,e){this._supress[e]=!0}),this))},n.prototype.release=function(e){t.each(e,t.proxy((function(t,e){delete this._supress[e]}),this))},n.prototype.pointer=function(t){var i={x:null,y:null};return(t=(t=t.originalEvent||t||e.event).touches&&t.touches.length?t.touches[0]:t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t).pageX?(i.x=t.pageX,i.y=t.pageY):(i.x=t.clientX,i.y=t.clientY),i},n.prototype.isNumeric=function(t){return!isNaN(parseFloat(t))},n.prototype.difference=function(t,e){return{x:t.x-e.x,y:t.y-e.y}},t.fn.owlCarousel=function(e){var i=Array.prototype.slice.call(arguments,1);return this.each((function(){var s=t(this),o=s.data("owl.carousel");o||(o=new n(this,"object"==typeof e&&e),s.data("owl.carousel",o),t.each(["next","prev","to","destroy","refresh","replace","add","remove"],(function(e,i){o.register({type:n.Type.Event,name:i}),o.$element.on(i+".owl.carousel.core",t.proxy((function(t){t.namespace&&t.relatedTarget!==this&&(this.suppress([i]),o[i].apply(this,[].slice.call(arguments,1)),this.release([i]))}),o))}))),"string"==typeof e&&"_"!==e.charAt(0)&&o[e].apply(o,i)}))},t.fn.owlCarousel.Constructor=n}(window.jQuery||window.Zepto,window,document),function(t,e,i,s){var n=function(e){this._core=e,this._interval=null,this._visible=null,this._handlers={"initialized.owl.carousel":t.proxy((function(t){t.namespace&&this._core.settings.autoRefresh&&this.watch()}),this)},this._core.options=t.extend({},n.Defaults,this._core.options),this._core.$element.on(this._handlers)};n.Defaults={autoRefresh:!0,autoRefreshInterval:500},n.prototype.watch=function(){this._interval||(this._visible=this._core.isVisible(),this._interval=e.setInterval(t.proxy(this.refresh,this),this._core.settings.autoRefreshInterval))},n.prototype.refresh=function(){this._core.isVisible()!==this._visible&&(this._visible=!this._visible,this._core.$element.toggleClass("owl-hidden",!this._visible),this._visible&&this._core.invalidate("width")&&this._core.refresh())},n.prototype.destroy=function(){var t,i;for(t in e.clearInterval(this._interval),this._handlers)this._core.$element.off(t,this._handlers[t]);for(i in Object.getOwnPropertyNames(this))"function"!=typeof this[i]&&(this[i]=null)},t.fn.owlCarousel.Constructor.Plugins.AutoRefresh=n}(window.jQuery||window.Zepto,window,document),function(t,e,i,s){var n=function(e){this._core=e,this._loaded=[],this._handlers={"initialized.owl.carousel change.owl.carousel resized.owl.carousel":t.proxy((function(e){if(e.namespace&&this._core.settings&&this._core.settings.lazyLoad&&(e.property&&"position"==e.property.name||"initialized"==e.type)){var i=this._core.settings,s=i.center&&Math.ceil(i.items/2)||i.items,n=i.center&&-1*s||0,o=(e.property&&undefined!==e.property.value?e.property.value:this._core.current())+n,r=this._core.clones().length,a=t.proxy((function(t,e){this.load(e)}),this);for(i.lazyLoadEager>0&&(s+=i.lazyLoadEager,i.loop&&(o-=i.lazyLoadEager,s++));n++<s;)this.load(r/2+this._core.relative(o)),r&&t.each(this._core.clones(this._core.relative(o)),a),o++}}),this)},this._core.options=t.extend({},n.Defaults,this._core.options),this._core.$element.on(this._handlers)};n.Defaults={lazyLoad:!1,lazyLoadEager:0},n.prototype.load=function(i){var s=this._core.$stage.children().eq(i),n=s&&s.find(".owl-lazy");!n||t.inArray(s.get(0),this._loaded)>-1||(n.each(t.proxy((function(i,s){var n,o=t(s),r=e.devicePixelRatio>1&&o.attr("data-src-retina")||o.attr("data-src")||o.attr("data-srcset");this._core.trigger("load",{element:o,url:r},"lazy"),o.is("img")?o.one("load.owl.lazy",t.proxy((function(){o.addClass("owl-lazy-loaded"),this._core.trigger("loaded",{element:o,url:r},"lazy")}),this)).attr("src",r):o.is("source")?o.one("load.owl.lazy",t.proxy((function(){this._core.trigger("loaded",{element:o,url:r},"lazy")}),this)).attr("srcset",r):((n=new Image).onload=t.proxy((function(){o.css({"background-image":'url("'+r+'")',opacity:"1"}),this._core.trigger("loaded",{element:o,url:r},"lazy")}),this),n.src=r)}),this)),this._loaded.push(s.get(0)))},n.prototype.destroy=function(){var t,e;for(t in this.handlers)this._core.$element.off(t,this.handlers[t]);for(e in Object.getOwnPropertyNames(this))"function"!=typeof this[e]&&(this[e]=null)},t.fn.owlCarousel.Constructor.Plugins.Lazy=n}(window.jQuery||window.Zepto,window,document),function(t,e,i,s){var n=function(i){this._core=i,this._previousHeight=null,this._handlers={"initialized.owl.carousel refreshed.owl.carousel":t.proxy((function(t){t.namespace&&this._core.settings.autoHeight&&this.update()}),this),"changed.owl.carousel":t.proxy((function(t){t.namespace&&this._core.settings.autoHeight&&"position"===t.property.name&&this.update()}),this),"loaded.owl.lazy":t.proxy((function(t){t.namespace&&this._core.settings.autoHeight&&t.element.closest("."+this._core.settings.itemClass).index()===this._core.current()&&this.update()}),this)},this._core.options=t.extend({},n.Defaults,this._core.options),this._core.$element.on(this._handlers),this._intervalId=null;var s=this;t(e).on("load",(function(){s._core.settings.autoHeight&&s.update()})),t(e).on("resize",(function(){s._core.settings.autoHeight&&(null!=s._intervalId&&clearTimeout(s._intervalId),s._intervalId=setTimeout((function(){s.update()}),250))}))};n.Defaults={autoHeight:!1,autoHeightClass:"owl-height"},n.prototype.update=function(){var e=this._core._current,i=e+this._core.settings.items,s=this._core.settings.lazyLoad,n=this._core.$stage.children().toArray().slice(e,i),o=[],r=0;t.each(n,(function(e,i){o.push(t(i).height())})),(r=Math.max.apply(null,o))<=1&&s&&this._previousHeight&&(r=this._previousHeight),this._previousHeight=r,this._core.$stage.parent().height(r).addClass(this._core.settings.autoHeightClass)},n.prototype.destroy=function(){var t,e;for(t in this._handlers)this._core.$element.off(t,this._handlers[t]);for(e in Object.getOwnPropertyNames(this))"function"!=typeof this[e]&&(this[e]=null)},t.fn.owlCarousel.Constructor.Plugins.AutoHeight=n}(window.jQuery||window.Zepto,window,document),function(t,e,i,s){var n=function(e){this._core=e,this._videos={},this._playing=null,this._handlers={"initialized.owl.carousel":t.proxy((function(t){t.namespace&&this._core.register({type:"state",name:"playing",tags:["interacting"]})}),this),"resize.owl.carousel":t.proxy((function(t){t.namespace&&this._core.settings.video&&this.isInFullScreen()&&t.preventDefault()}),this),"refreshed.owl.carousel":t.proxy((function(t){t.namespace&&this._core.is("resizing")&&this._core.$stage.find(".cloned .owl-video-frame").remove()}),this),"changed.owl.carousel":t.proxy((function(t){t.namespace&&"position"===t.property.name&&this._playing&&this.stop()}),this),"prepared.owl.carousel":t.proxy((function(e){if(e.namespace){var i=t(e.content).find(".owl-video");i.length&&(i.css("display","none"),this.fetch(i,t(e.content)))}}),this)},this._core.options=t.extend({},n.Defaults,this._core.options),this._core.$element.on(this._handlers),this._core.$element.on("click.owl.video",".owl-video-play-icon",t.proxy((function(t){this.play(t)}),this))};n.Defaults={video:!1,videoHeight:!1,videoWidth:!1},n.prototype.fetch=function(t,e){var i=t.attr("data-vimeo-id")?"vimeo":t.attr("data-vzaar-id")?"vzaar":"youtube",s=t.attr("data-vimeo-id")||t.attr("data-youtube-id")||t.attr("data-vzaar-id"),n=t.attr("data-width")||this._core.settings.videoWidth,o=t.attr("data-height")||this._core.settings.videoHeight,r=t.attr("href");if(!r)throw new Error("Missing video URL.");if((s=r.match(/(http:|https:|)\/\/(player.|www.|app.)?(vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com|be\-nocookie\.com)|vzaar\.com)\/(video\/|videos\/|embed\/|channels\/.+\/|groups\/.+\/|watch\?v=|v\/)?([A-Za-z0-9._%-]*)(\&\S+)?/))[3].indexOf("youtu")>-1)i="youtube";else if(s[3].indexOf("vimeo")>-1)i="vimeo";else{if(!(s[3].indexOf("vzaar")>-1))throw new Error("Video URL not supported.");i="vzaar"}s=s[6],this._videos[r]={type:i,id:s,width:n,height:o},e.attr("data-video",r),this.thumbnail(t,this._videos[r])},n.prototype.thumbnail=function(e,i){var s,n,o=i.width&&i.height?"width:"+i.width+"px;height:"+i.height+"px;":"",r=e.find("img"),a="src",h="",l=this._core.settings,c=function(i){'<div class="owl-video-play-icon"></div>',s=l.lazyLoad?t("<div/>",{class:"owl-video-tn "+h,srcType:i}):t("<div/>",{class:"owl-video-tn",style:"opacity:1;background-image:url("+i+")"}),e.after(s),e.after('<div class="owl-video-play-icon"></div>')};if(e.wrap(t("<div/>",{class:"owl-video-wrapper",style:o})),this._core.settings.lazyLoad&&(a="data-src",h="owl-lazy"),r.length)return c(r.attr(a)),r.remove(),!1;"youtube"===i.type?(n="//img.youtube.com/vi/"+i.id+"/hqdefault.jpg",c(n)):"vimeo"===i.type?t.ajax({type:"GET",url:"//vimeo.com/api/v2/video/"+i.id+".json",jsonp:"callback",dataType:"jsonp",success:function(t){n=t[0].thumbnail_large,c(n)}}):"vzaar"===i.type&&t.ajax({type:"GET",url:"//vzaar.com/api/videos/"+i.id+".json",jsonp:"callback",dataType:"jsonp",success:function(t){n=t.framegrab_url,c(n)}})},n.prototype.stop=function(){this._core.trigger("stop",null,"video"),this._playing.find(".owl-video-frame").remove(),this._playing.removeClass("owl-video-playing"),this._playing=null,this._core.leave("playing"),this._core.trigger("stopped",null,"video")},n.prototype.play=function(e){var i,s=t(e.target).closest("."+this._core.settings.itemClass),n=this._videos[s.attr("data-video")],o=n.width||"100%",r=n.height||this._core.$stage.height();this._playing||(this._core.enter("playing"),this._core.trigger("play",null,"video"),s=this._core.items(this._core.relative(s.index())),this._core.reset(s.index()),(i=t('<iframe frameborder="0" allowfullscreen mozallowfullscreen webkitAllowFullScreen ></iframe>')).attr("height",r),i.attr("width",o),"youtube"===n.type?i.attr("src","//www.youtube.com/embed/"+n.id+"?autoplay=1&rel=0&v="+n.id):"vimeo"===n.type?i.attr("src","//player.vimeo.com/video/"+n.id+"?autoplay=1"):"vzaar"===n.type&&i.attr("src","//view.vzaar.com/"+n.id+"/player?autoplay=true"),t(i).wrap('<div class="owl-video-frame" />').insertAfter(s.find(".owl-video")),this._playing=s.addClass("owl-video-playing"))},n.prototype.isInFullScreen=function(){var e=i.fullscreenElement||i.mozFullScreenElement||i.webkitFullscreenElement;return e&&t(e).parent().hasClass("owl-video-frame")},n.prototype.destroy=function(){var t,e;for(t in this._core.$element.off("click.owl.video"),this._handlers)this._core.$element.off(t,this._handlers[t]);for(e in Object.getOwnPropertyNames(this))"function"!=typeof this[e]&&(this[e]=null)},t.fn.owlCarousel.Constructor.Plugins.Video=n}(window.jQuery||window.Zepto,window,document),function(t,e,i,s){var n=function(e){this.core=e,this.core.options=t.extend({},n.Defaults,this.core.options),this.swapping=!0,this.previous=s,this.next=s,this.handlers={"change.owl.carousel":t.proxy((function(t){t.namespace&&"position"==t.property.name&&(this.previous=this.core.current(),this.next=t.property.value)}),this),"drag.owl.carousel dragged.owl.carousel translated.owl.carousel":t.proxy((function(t){t.namespace&&(this.swapping="translated"==t.type)}),this),"translate.owl.carousel":t.proxy((function(t){t.namespace&&this.swapping&&(this.core.options.animateOut||this.core.options.animateIn)&&this.swap()}),this)},this.core.$element.on(this.handlers)};n.Defaults={animateOut:!1,animateIn:!1},n.prototype.swap=function(){if(1===this.core.settings.items&&t.support.animation&&t.support.transition){this.core.speed(0);var e,i=t.proxy(this.clear,this),s=this.core.$stage.children().eq(this.previous),n=this.core.$stage.children().eq(this.next),o=this.core.settings.animateIn,r=this.core.settings.animateOut;this.core.current()!==this.previous&&(r&&(e=this.core.coordinates(this.previous)-this.core.coordinates(this.next),s.one(t.support.animation.end,i).css({left:e+"px"}).addClass("animated owl-animated-out").addClass(r)),o&&n.one(t.support.animation.end,i).addClass("animated owl-animated-in").addClass(o))}},n.prototype.clear=function(e){t(e.target).css({left:""}).removeClass("animated owl-animated-out owl-animated-in").removeClass(this.core.settings.animateIn).removeClass(this.core.settings.animateOut),this.core.onTransitionEnd()},n.prototype.destroy=function(){var t,e;for(t in this.handlers)this.core.$element.off(t,this.handlers[t]);for(e in Object.getOwnPropertyNames(this))"function"!=typeof this[e]&&(this[e]=null)},t.fn.owlCarousel.Constructor.Plugins.Animate=n}(window.jQuery||window.Zepto,window,document),function(t,e,i,s){var n=function(e){this._core=e,this._call=null,this._time=0,this._timeout=0,this._paused=!0,this._handlers={"changed.owl.carousel":t.proxy((function(t){t.namespace&&"settings"===t.property.name?this._core.settings.autoplay?this.play():this.stop():t.namespace&&"position"===t.property.name&&this._paused&&(this._time=0)}),this),"initialized.owl.carousel":t.proxy((function(t){t.namespace&&this._core.settings.autoplay&&this.play()}),this),"play.owl.autoplay":t.proxy((function(t,e,i){t.namespace&&this.play(e,i)}),this),"stop.owl.autoplay":t.proxy((function(t){t.namespace&&this.stop()}),this),"mouseover.owl.autoplay":t.proxy((function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.pause()}),this),"mouseleave.owl.autoplay":t.proxy((function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.play()}),this),"touchstart.owl.core":t.proxy((function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.pause()}),this),"touchend.owl.core":t.proxy((function(){this._core.settings.autoplayHoverPause&&this.play()}),this)},this._core.$element.on(this._handlers),this._core.options=t.extend({},n.Defaults,this._core.options)};n.Defaults={autoplay:!1,autoplayTimeout:5e3,autoplayHoverPause:!1,autoplaySpeed:!1},n.prototype._next=function(s){this._call=e.setTimeout(t.proxy(this._next,this,s),this._timeout*(Math.round(this.read()/this._timeout)+1)-this.read()),this._core.is("interacting")||i.hidden||this._core.next(s||this._core.settings.autoplaySpeed)},n.prototype.read=function(){return(new Date).getTime()-this._time},n.prototype.play=function(i,s){var n;this._core.is("rotating")||this._core.enter("rotating"),i=i||this._core.settings.autoplayTimeout,n=Math.min(this._time%(this._timeout||i),i),this._paused?(this._time=this.read(),this._paused=!1):e.clearTimeout(this._call),this._time+=this.read()%i-n,this._timeout=i,this._call=e.setTimeout(t.proxy(this._next,this,s),i-n)},n.prototype.stop=function(){this._core.is("rotating")&&(this._time=0,this._paused=!0,e.clearTimeout(this._call),this._core.leave("rotating"))},n.prototype.pause=function(){this._core.is("rotating")&&!this._paused&&(this._time=this.read(),this._paused=!0,e.clearTimeout(this._call))},n.prototype.destroy=function(){var t,e;for(t in this.stop(),this._handlers)this._core.$element.off(t,this._handlers[t]);for(e in Object.getOwnPropertyNames(this))"function"!=typeof this[e]&&(this[e]=null)},t.fn.owlCarousel.Constructor.Plugins.autoplay=n}(window.jQuery||window.Zepto,window,document),function(t,e,i,s){"use strict";var n=function(e){this._core=e,this._initialized=!1,this._pages=[],this._controls={},this._templates=[],this.$element=this._core.$element,this._overrides={next:this._core.next,prev:this._core.prev,to:this._core.to},this._handlers={"prepared.owl.carousel":t.proxy((function(e){e.namespace&&this._core.settings.dotsData&&this._templates.push('<div class="'+this._core.settings.dotClass+'">'+t(e.content).find("[data-dot]").addBack("[data-dot]").attr("data-dot")+"</div>")}),this),"added.owl.carousel":t.proxy((function(t){t.namespace&&this._core.settings.dotsData&&this._templates.splice(t.position,0,this._templates.pop())}),this),"remove.owl.carousel":t.proxy((function(t){t.namespace&&this._core.settings.dotsData&&this._templates.splice(t.position,1)}),this),"changed.owl.carousel":t.proxy((function(t){t.namespace&&"position"==t.property.name&&this.draw()}),this),"initialized.owl.carousel":t.proxy((function(t){t.namespace&&!this._initialized&&(this._core.trigger("initialize",null,"navigation"),this.initialize(),this.update(),this.draw(),this._initialized=!0,this._core.trigger("initialized",null,"navigation"))}),this),"refreshed.owl.carousel":t.proxy((function(t){t.namespace&&this._initialized&&(this._core.trigger("refresh",null,"navigation"),this.update(),this.draw(),this._core.trigger("refreshed",null,"navigation"))}),this)},this._core.options=t.extend({},n.Defaults,this._core.options),this.$element.on(this._handlers)};n.Defaults={nav:!1,navText:['<span aria-label="Previous">&#x2039;</span>','<span aria-label="Next">&#x203a;</span>'],navSpeed:!1,navElement:'button type="button" aria-label="Owl carousel Navigation" role="button"',navContainer:!1,navContainerClass:"owl-nav",navClass:["owl-prev","owl-next"],slideBy:1,dotClass:"owl-dot",dotsClass:"owl-dots",dots:!0,dotsEach:!1,dotsData:!1,dotsSpeed:!1,dotsContainer:!1},n.prototype.initialize=function(){var e,i=this._core.settings;for(e in this._controls.$relative=(i.navContainer?t(i.navContainer):t("<div>").addClass(i.navContainerClass).appendTo(this.$element)).addClass("disabled"),this._controls.$previous=t("<"+i.navElement+">").addClass(i.navClass[0]).html(i.navText[0]).prependTo(this._controls.$relative).on("click",t.proxy((function(t){this.prev(i.navSpeed)}),this)),this._controls.$next=t("<"+i.navElement+">").addClass(i.navClass[1]).html(i.navText[1]).appendTo(this._controls.$relative).on("click",t.proxy((function(t){this.next(i.navSpeed)}),this)),i.dotsData||(this._templates=[t('<button aria-label="Owl Carousel Pagination"  role="button">').addClass(i.dotClass).append(t("<span>")).prop("outerHTML")]),this._controls.$absolute=(i.dotsContainer?t(i.dotsContainer):t("<div>").addClass(i.dotsClass).appendTo(this.$element)).addClass("disabled"),this._controls.$absolute.on("click","button",t.proxy((function(e){var s=t(e.target).parent().is(this._controls.$absolute)?t(e.target).index():t(e.target).parent().index();e.preventDefault(),this.to(s,i.dotsSpeed)}),this)),this._overrides)this._core[e]=t.proxy(this[e],this)},n.prototype.destroy=function(){var t,e,i,s,n;for(t in n=this._core.settings,this._handlers)this.$element.off(t,this._handlers[t]);for(e in this._controls)"$relative"===e&&n.navContainer?this._controls[e].html(""):this._controls[e].remove();for(s in this.overides)this._core[s]=this._overrides[s];for(i in Object.getOwnPropertyNames(this))"function"!=typeof this[i]&&(this[i]=null)},n.prototype.update=function(){var t,e,i=this._core.clones().length/2,s=i+this._core.items().length,n=this._core.maximum(!0),o=this._core.settings,r=o.center||o.autoWidth||o.dotsData?1:o.dotsEach||o.items;if("page"!==o.slideBy&&(o.slideBy=Math.min(o.slideBy,o.items)),o.dots||"page"==o.slideBy)for(this._pages=[],t=i,e=0,0;t<s;t++){if(e>=r||0===e){if(this._pages.push({start:Math.min(n,t-i),end:t-i+r-1}),Math.min(n,t-i)===n)break;e=0}e+=this._core.mergers(this._core.relative(t))}},n.prototype.draw=function(){var e,i=this._core.settings,s=this._core.items().length<=i.items,n=this._core.relative(this._core.current()),o=i.loop||i.rewind;this._controls.$relative.toggleClass("disabled",!i.nav||s),i.nav&&(this._controls.$previous.toggleClass("disabled",!o&&n<=this._core.minimum(!0)),this._controls.$next.toggleClass("disabled",!o&&n>=this._core.maximum(!0))),this._controls.$absolute.toggleClass("disabled",!i.dots||s),i.dots&&(e=this._pages.length-this._controls.$absolute.children().length,i.dotsData&&0!==e?this._controls.$absolute.html(this._templates.join("")):e>0?this._controls.$absolute.append(new Array(e+1).join(this._templates[0])):e<0&&this._controls.$absolute.children().slice(e).remove(),this._controls.$absolute.find(".active").removeClass("active"),this._controls.$absolute.children().eq(t.inArray(this.current(),this._pages)).addClass("active"))},n.prototype.onTrigger=function(e){var i=this._core.settings;e.page={index:t.inArray(this.current(),this._pages),count:this._pages.length,size:i&&(i.center||i.autoWidth||i.dotsData?1:i.dotsEach||i.items)}},n.prototype.current=function(){var e=this._core.relative(this._core.current());return t.grep(this._pages,t.proxy((function(t,i){return t.start<=e&&t.end>=e}),this)).pop()},n.prototype.getPosition=function(e){var i,s,n=this._core.settings;return"page"==n.slideBy?(i=t.inArray(this.current(),this._pages),s=this._pages.length,e?++i:--i,i=this._pages[(i%s+s)%s].start):(i=this._core.relative(this._core.current()),s=this._core.items().length,e?i+=n.slideBy:i-=n.slideBy),i},n.prototype.next=function(e){t.proxy(this._overrides.to,this._core)(this.getPosition(!0),e)},n.prototype.prev=function(e){t.proxy(this._overrides.to,this._core)(this.getPosition(!1),e)},n.prototype.to=function(e,i,s){var n;!s&&this._pages.length?(n=this._pages.length,t.proxy(this._overrides.to,this._core)(this._pages[(e%n+n)%n].start,i)):t.proxy(this._overrides.to,this._core)(e,i)},t.fn.owlCarousel.Constructor.Plugins.Navigation=n}(window.jQuery||window.Zepto,window,document),function(t,e,i,s){"use strict";var n=function(i){this._core=i,this._hashes={},this.$element=this._core.$element,this._handlers={"initialized.owl.carousel":t.proxy((function(i){i.namespace&&"URLHash"===this._core.settings.startPosition&&t(e).trigger("hashchange.owl.navigation")}),this),"prepared.owl.carousel":t.proxy((function(e){if(e.namespace){var i=t(e.content).find("[data-hash]").addBack("[data-hash]").attr("data-hash");if(!i)return;this._hashes[i]=e.content}}),this),"changed.owl.carousel":t.proxy((function(i){if(i.namespace&&"position"===i.property.name){var s=this._core.items(this._core.relative(this._core.current())),n=t.map(this._hashes,(function(t,e){return t===s?e:null})).join();if(!n||e.location.hash.slice(1)===n)return;e.location.hash=n}}),this)},this._core.options=t.extend({},n.Defaults,this._core.options),this.$element.on(this._handlers),t(e).on("hashchange.owl.navigation",t.proxy((function(t){var i=e.location.hash.substring(1),s=this._core.$stage.children(),n=this._hashes[i]&&s.index(this._hashes[i]);undefined!==n&&n!==this._core.current()&&this._core.to(this._core.relative(n),!1,!0)}),this))};n.Defaults={URLhashListener:!1},n.prototype.destroy=function(){var i,s;for(i in t(e).off("hashchange.owl.navigation"),this._handlers)this._core.$element.off(i,this._handlers[i]);for(s in Object.getOwnPropertyNames(this))"function"!=typeof this[s]&&(this[s]=null)},t.fn.owlCarousel.Constructor.Plugins.Hash=n}(window.jQuery||window.Zepto,window,document),function(t,e,i,s){var n=t("<support>").get(0).style,o="Webkit Moz O ms".split(" "),r={transition:{end:{WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd",transition:"transitionend"}},animation:{end:{WebkitAnimation:"webkitAnimationEnd",MozAnimation:"animationend",OAnimation:"oAnimationEnd",animation:"animationend"}}},a=function(){return!!c("transform")},h=function(){return!!c("perspective")},l=function(){return!!c("animation")};function c(e,i){var r=!1,a=e.charAt(0).toUpperCase()+e.slice(1);return t.each((e+" "+o.join(a+" ")+a).split(" "),(function(t,e){if(n[e]!==s)return r=!i||e,!1})),r}function p(t){return c(t,!0)}(function(){return!!c("transition")})()&&(t.support.transition=new String(p("transition")),t.support.transition.end=r.transition.end[t.support.transition]),l()&&(t.support.animation=new String(p("animation")),t.support.animation.end=r.animation.end[t.support.animation]),a()&&(t.support.transform=new String(p("transform")),t.support.transform3d=h())}(window.jQuery||window.Zepto,window,document);
// source --> https://mfrash.com/wp-includes/js/imagesloaded.min.js?ver=5.0.0 
/*! This file is auto-generated */
/*!
 * imagesLoaded PACKAGED v5.0.0
 * JavaScript is all like "You images are done yet or what?"
 * MIT License
 */
!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})),
/*!
 * imagesLoaded v5.0.0
 * JavaScript is all like "You images are done yet or what?"
 * MIT License
 */
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}));
// source --> https://mfrash.com/wp-content/themes/porto/js/libs/jquery.magnific-popup.min.js?ver=1.1.0 
/*! Magnific Popup - v1.1.0 - 2016-02-20
* http://dimsemenov.com/plugins/magnific-popup/
* Copyright (c) 2016 Dmitry Semenov; */
!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):window.jQuery||window.Zepto)}(function(a){var b,c,d,e,f,g,h="Close",i="BeforeClose",j="AfterClose",k="BeforeAppend",l="MarkupParse",m="Open",n="Change",o="mfp",p="."+o,q="mfp-ready",r="mfp-removing",s="mfp-prevent-close",t=function(){},u=!!window.jQuery,v=a(window),w=function(a,c){b.ev.on(o+a+p,c)},x=function(b,c,d,e){var f=document.createElement("div");return f.className="mfp-"+b,d&&(f.innerHTML=d),e?c&&c.appendChild(f):(f=a(f),c&&f.appendTo(c)),f},y=function(c,d){b.ev.triggerHandler(o+c,d),b.st.callbacks&&(c=c.charAt(0).toLowerCase()+c.slice(1),b.st.callbacks[c]&&b.st.callbacks[c].apply(b,Array.isArray(d)?d:[d]))},z=function(c){return c===g&&b.currTemplate.closeBtn||(b.currTemplate.closeBtn=a(b.st.closeMarkup.replace("%title%",b.st.tClose)),g=c),b.currTemplate.closeBtn},A=function(){a.magnificPopup.instance||(b=new t,b.init(),a.magnificPopup.instance=b)},B=function(){var a=document.createElement("p").style,b=["ms","O","Moz","Webkit"];if(void 0!==a.transition)return!0;for(;b.length;)if(b.pop()+"Transition"in a)return!0;return!1};t.prototype={constructor:t,init:function(){var c=navigator.appVersion;b.isLowIE=b.isIE8=document.all&&!document.addEventListener,b.isAndroid=/android/gi.test(c),b.isIOS=/iphone|ipad|ipod/gi.test(c),b.supportsTransition=B(),b.probablyMobile=b.isAndroid||b.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),d=a(document),b.popupsCache={}},open:function(c){var e;if(c.isObj===!1){b.items=c.items.toArray(),b.index=0;var g,h=c.items;for(e=0;e<h.length;e++)if(g=h[e],g.parsed&&(g=g.el[0]),g===c.el[0]){b.index=e;break}}else b.items=Array.isArray(c.items)?c.items:[c.items],b.index=c.index||0;if(b.isOpen)return void b.updateItemHTML();b.types=[],f="",c.mainEl&&c.mainEl.length?b.ev=c.mainEl.eq(0):b.ev=d,c.key?(b.popupsCache[c.key]||(b.popupsCache[c.key]={}),b.currTemplate=b.popupsCache[c.key]):b.currTemplate={},b.st=a.extend(!0,{},a.magnificPopup.defaults,c),b.fixedContentPos="auto"===b.st.fixedContentPos?!b.probablyMobile:b.st.fixedContentPos,b.st.modal&&(b.st.closeOnContentClick=!1,b.st.closeOnBgClick=!1,b.st.showCloseBtn=!1,b.st.enableEscapeKey=!1),b.bgOverlay||(b.bgOverlay=x("bg").on("click"+p,function(){b.close()}),b.wrap=x("wrap").attr("tabindex",-1).on("click"+p,function(a){b._checkIfClose(a.target)&&b.close()}),b.container=x("container",b.wrap)),b.contentContainer=x("content"),b.st.preloader&&(b.preloader=x("preloader",b.container,b.st.tLoading));var i=a.magnificPopup.modules;for(e=0;e<i.length;e++){var j=i[e];j=j.charAt(0).toUpperCase()+j.slice(1),b["init"+j].call(b)}y("BeforeOpen"),b.st.showCloseBtn&&(b.st.closeBtnInside?(w(l,function(a,b,c,d){c.close_replaceWith=z(d.type)}),f+=" mfp-close-btn-in"):b.wrap.append(z())),b.st.alignTop&&(f+=" mfp-align-top"),b.fixedContentPos?b.wrap.css({overflow:b.st.overflowY,overflowX:"hidden",overflowY:b.st.overflowY}):b.wrap.css({top:v.scrollTop(),position:"absolute"}),(b.st.fixedBgPos===!1||"auto"===b.st.fixedBgPos&&!b.fixedContentPos)&&b.bgOverlay.css({height:d.height(),position:"absolute"}),b.st.enableEscapeKey&&d.on("keyup"+p,function(a){27===a.keyCode&&b.close()}),v.on("resize"+p,function(){b.updateSize()}),b.st.closeOnContentClick||(f+=" mfp-auto-cursor"),f&&b.wrap.addClass(f);var k=b.wH=v.height(),n={};if(b.fixedContentPos&&b._hasScrollBar(k)){var o=b._getScrollbarSize();o&&(n.marginRight=o)}b.fixedContentPos&&(b.isIE7?a("body, html").css("overflow","hidden"):n.overflow="hidden");var r=b.st.mainClass;return b.isIE7&&(r+=" mfp-ie7"),r&&b._addClassToMFP(r),b.updateItemHTML(),y("BuildControls"),a("html").css(n),b.bgOverlay.add(b.wrap).prependTo(b.st.prependTo||a(document.body)),b._lastFocusedEl=document.activeElement,setTimeout(function(){b.content?(b._addClassToMFP(q),b._setFocus()):b.bgOverlay.addClass(q),d.on("focusin"+p,b._onFocusIn)},16),b.isOpen=!0,b.updateSize(k),y(m),c},close:function(){b.isOpen&&(y(i),b.isOpen=!1,b.st.removalDelay&&!b.isLowIE&&b.supportsTransition?(b._addClassToMFP(r),setTimeout(function(){b._close()},b.st.removalDelay)):b._close())},_close:function(){y(h);var c=r+" "+q+" ";if(b.bgOverlay.detach(),b.wrap.detach(),b.container.empty(),b.st.mainClass&&(c+=b.st.mainClass+" "),b._removeClassFromMFP(c),b.fixedContentPos){var e={marginRight:""};b.isIE7?a("body, html").css("overflow",""):e.overflow="",a("html").css(e)}d.off("keyup"+p+" focusin"+p),b.ev.off(p),b.wrap.attr("class","mfp-wrap").removeAttr("style"),b.bgOverlay.attr("class","mfp-bg"),b.container.attr("class","mfp-container"),!b.st.showCloseBtn||b.st.closeBtnInside&&b.currTemplate[b.currItem.type]!==!0||b.currTemplate.closeBtn&&b.currTemplate.closeBtn.detach(),b.st.autoFocusLast&&b._lastFocusedEl&&a(b._lastFocusedEl).trigger('focus'),b.currItem=null,b.content=null,b.currTemplate=null,b.prevHeight=0,y(j)},updateSize:function(a){if(b.isIOS){var c=document.documentElement.clientWidth/window.innerWidth,d=window.innerHeight*c;b.wrap.css("height",d),b.wH=d}else b.wH=a||v.height();b.fixedContentPos||b.wrap.css("height",b.wH),y("Resize")},updateItemHTML:function(){var c=b.items[b.index];b.contentContainer.detach(),b.content&&b.content.detach(),c.parsed||(c=b.parseEl(b.index));var d=c.type;if(y("BeforeChange",[b.currItem?b.currItem.type:"",d]),b.currItem=c,!b.currTemplate[d]){var f=b.st[d]?b.st[d].markup:!1;y("FirstMarkupParse",f),f?b.currTemplate[d]=a(f):b.currTemplate[d]=!0}e&&e!==c.type&&b.container.removeClass("mfp-"+e+"-holder");var g=b["get"+d.charAt(0).toUpperCase()+d.slice(1)](c,b.currTemplate[d]);b.appendContent(g,d),c.preloaded=!0,y(n,c),e=c.type,b.container.prepend(b.contentContainer),y("AfterChange")},appendContent:function(a,c){b.content=a,a?b.st.showCloseBtn&&b.st.closeBtnInside&&b.currTemplate[c]===!0?b.content.find(".mfp-close").length||b.content.append(z()):b.content=a:b.content="",y(k),b.container.addClass("mfp-"+c+"-holder"),b.contentContainer.append(b.content)},parseEl:function(c){var d,e=b.items[c];if(e.tagName?e={el:a(e)}:(d=e.type,e={data:e,src:e.src}),e.el){for(var f=b.types,g=0;g<f.length;g++)if(e.el.hasClass("mfp-"+f[g])){d=f[g];break}e.src=e.el.attr("data-mfp-src"),e.src||(e.src=e.el.attr("href"))}return e.type=d||b.st.type||"inline",e.index=c,e.parsed=!0,b.items[c]=e,y("ElementParse",e),b.items[c]},addGroup:function(a,c){var d=function(d){d.mfpEl=this,b._openClick(d,a,c)};c||(c={});var e="click.magnificPopup";c.mainEl=a,c.items?(c.isObj=!0,a.off(e).on(e,d)):(c.isObj=!1,c.delegate?a.off(e).on(e,c.delegate,d):(c.items=a,a.off(e).on(e,d)))},_openClick:function(c,d,e){var f=void 0!==e.midClick?e.midClick:a.magnificPopup.defaults.midClick;if(f||!(2===c.which||c.ctrlKey||c.metaKey||c.altKey||c.shiftKey)){var g=void 0!==e.disableOn?e.disableOn:a.magnificPopup.defaults.disableOn;if(g)if(a.isFunction(g)){if(!g.call(b))return!0}else if(v.width()<g)return!0;c.type&&(c.preventDefault(),b.isOpen&&c.stopPropagation()),e.el=a(c.mfpEl),e.delegate&&(e.items=d.find(e.delegate)),b.open(e)}},updateStatus:function(a,d){if(b.preloader){c!==a&&b.container.removeClass("mfp-s-"+c),d||"loading"!==a||(d=b.st.tLoading);var e={status:a,text:d};y("UpdateStatus",e),a=e.status,d=e.text,b.preloader.html(d),b.preloader.find("a").on("click",function(a){a.stopImmediatePropagation()}),b.container.addClass("mfp-s-"+a),c=a}},_checkIfClose:function(c){if(!a(c).hasClass(s)){var d=b.st.closeOnContentClick,e=b.st.closeOnBgClick;if(d&&e)return!0;if(!b.content||a(c).hasClass("mfp-close")||b.preloader&&c===b.preloader[0])return!0;if(c===b.content[0]||a.contains(b.content[0],c)){if(d)return!0}else if(e&&a.contains(document,c))return!0;return!1}},_addClassToMFP:function(a){b.bgOverlay.addClass(a),b.wrap.addClass(a)},_removeClassFromMFP:function(a){this.bgOverlay.removeClass(a),b.wrap.removeClass(a)},_hasScrollBar:function(a){return(b.isIE7?d.height():document.body.scrollHeight)>(a||v.height())},_setFocus:function(){(b.st.focus?b.content.find(b.st.focus).eq(0):b.wrap).trigger('focus')},_onFocusIn:function(c){return c.target===b.wrap[0]||a.contains(b.wrap[0],c.target)?void 0:(b._setFocus(),!1)},_parseMarkup:function(b,c,d){var e;d.data&&(c=a.extend(d.data,c)),y(l,[b,c,d]),a.each(c,function(c,d){if(void 0===d||d===!1)return!0;if(e=c.split("_"),e.length>1){var f=b.find(p+"-"+e[0]);if(f.length>0){var g=e[1];"replaceWith"===g?f[0]!==d[0]&&f.replaceWith(d):"img"===g?f.is("img")?f.attr("src",d):f.replaceWith(a("<img>").attr("src",d).attr("class",f.attr("class"))):f.attr(e[1],d)}}else b.find(p+"-"+c).html(d)})},_getScrollbarSize:function(){if(void 0===b.scrollbarSize){var a=document.createElement("div");a.style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;",document.body.appendChild(a),b.scrollbarSize=a.offsetWidth-a.clientWidth,document.body.removeChild(a)}return b.scrollbarSize}},a.magnificPopup={instance:null,proto:t.prototype,modules:[],open:function(b,c){return A(),b=b?a.extend(!0,{},b):{},b.isObj=!0,b.index=c||0,this.instance.open(b)},close:function(){return a.magnificPopup.instance&&a.magnificPopup.instance.close()},registerModule:function(b,c){c.options&&(a.magnificPopup.defaults[b]=c.options),a.extend(this.proto,c.proto),this.modules.push(b)},defaults:{disableOn:0,key:null,midClick:!1,mainClass:"",preloader:!0,focus:"",closeOnContentClick:!1,closeOnBgClick:!0,closeBtnInside:!0,showCloseBtn:!0,enableEscapeKey:!0,modal:!1,alignTop:!1,removalDelay:0,prependTo:null,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:'<button title="%title%" type="button" class="mfp-close">&#215;</button>',tClose:"Close (Esc)",tLoading:"Loading...",autoFocusLast:!0}},a.fn.magnificPopup=function(c){A();var d=a(this);if("string"==typeof c)if("open"===c){var e,f=u?d.data("magnificPopup"):d[0].magnificPopup,g=parseInt(arguments[1],10)||0;f.items?e=f.items[g]:(e=d,f.delegate&&(e=e.find(f.delegate)),e=e.eq(g)),b._openClick({mfpEl:e},d,f)}else b.isOpen&&b[c].apply(b,Array.prototype.slice.call(arguments,1));else c=a.extend(!0,{},c),u?d.data("magnificPopup",c):d[0].magnificPopup=c,b.addGroup(d,c);return d};var C,D,E,F="inline",G=function(){E&&(D.after(E.addClass(C)).detach(),E=null)};a.magnificPopup.registerModule(F,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){b.types.push(F),w(h+"."+F,function(){G()})},getInline:function(c,d){if(G(),c.src){var e=b.st.inline,f=a(c.src);if(f.length){var g=f[0].parentNode;g&&g.tagName&&(D||(C=e.hiddenClass,D=x(C),C="mfp-"+C),E=f.after(D).detach().removeClass(C)),b.updateStatus("ready")}else b.updateStatus("error",e.tNotFound),f=a("<div>");return c.inlineElement=f,f}return b.updateStatus("ready"),b._parseMarkup(d,{},c),d}}});var H,I="ajax",J=function(){H&&a(document.body).removeClass(H)},K=function(){J(),b.req&&b.req.abort()};a.magnificPopup.registerModule(I,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'<a href="%url%">The content</a> could not be loaded.'},proto:{initAjax:function(){b.types.push(I),H=b.st.ajax.cursor,w(h+"."+I,K),w("BeforeChange."+I,K)},getAjax:function(c){H&&a(document.body).addClass(H),b.updateStatus("loading");var d=a.extend({url:c.src,success:function(d,e,f){var g={data:d,xhr:f};y("ParseAjax",g),b.appendContent(a(g.data),I),c.finished=!0,J(),b._setFocus(),setTimeout(function(){b.wrap.addClass(q)},16),b.updateStatus("ready"),y("AjaxContentAdded")},error:function(){J(),c.finished=c.loadError=!0,b.updateStatus("error",b.st.ajax.tError.replace("%url%",c.src))}},b.st.ajax.settings);return b.req=a.ajax(d),""}}});var L,M=function(c){if(c.data&&void 0!==c.data.title)return c.data.title;var d=b.st.image.titleSrc;if(d){if(a.isFunction(d))return d.call(b,c);if(c.el)return c.el.attr(d)||""}return""};a.magnificPopup.registerModule("image",{options:{markup:'<div class="mfp-figure"><div class="mfp-close"></div><figure><div class="mfp-img"></div><figcaption><div class="mfp-bottom-bar"><div class="mfp-title"></div><div class="mfp-counter"></div></div></figcaption></figure></div>',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:'<a href="%url%">The image</a> could not be loaded.'},proto:{initImage:function(){var c=b.st.image,d=".image";b.types.push("image"),w(m+d,function(){"image"===b.currItem.type&&c.cursor&&a(document.body).addClass(c.cursor)}),w(h+d,function(){c.cursor&&a(document.body).removeClass(c.cursor),v.off("resize"+p)}),w("Resize"+d,b.resizeImage),b.isLowIE&&w("AfterChange",b.resizeImage)},resizeImage:function(){var a=b.currItem;if(a&&a.img&&b.st.image.verticalFit){var c=0;b.isLowIE&&(c=parseInt(a.img.css("padding-top"),10)+parseInt(a.img.css("padding-bottom"),10)),a.img.css("max-height",b.wH-c)}},_onImageHasSize:function(a){a.img&&(a.hasSize=!0,L&&clearInterval(L),a.isCheckingImgSize=!1,y("ImageHasSize",a),a.imgHidden&&(b.content&&b.content.removeClass("mfp-loading"),a.imgHidden=!1))},findImageSize:function(a){var c=0,d=a.img[0],e=function(f){L&&clearInterval(L),L=setInterval(function(){return d.naturalWidth>0?void b._onImageHasSize(a):(c>200&&clearInterval(L),c++,void(3===c?e(10):40===c?e(50):100===c&&e(500)))},f)};e(1)},getImage:function(c,d){var e=0,f=function(){c&&(c.img[0].complete?(c.img.off(".mfploader"),c===b.currItem&&(b._onImageHasSize(c),b.updateStatus("ready")),c.hasSize=!0,c.loaded=!0,y("ImageLoadComplete")):(e++,200>e?setTimeout(f,100):g()))},g=function(){c&&(c.img.off(".mfploader"),c===b.currItem&&(b._onImageHasSize(c),b.updateStatus("error",h.tError.replace("%url%",c.src))),c.hasSize=!0,c.loaded=!0,c.loadError=!0)},h=b.st.image,i=d.find(".mfp-img");if(i.length){var j=document.createElement("img");j.className="mfp-img",c.el&&c.el.find("img").length&&(j.alt=c.el.find("img").attr("alt")),c.img=a(j).on("load.mfploader",f).on("error.mfploader",g),j.src=c.src,i.is("img")&&(c.img=c.img.clone()),j=c.img[0],j.naturalWidth>0?c.hasSize=!0:j.width||(c.hasSize=!1)}return b._parseMarkup(d,{title:M(c),img_replaceWith:c.img},c),b.resizeImage(),c.hasSize?(L&&clearInterval(L),c.loadError?(d.addClass("mfp-loading"),b.updateStatus("error",h.tError.replace("%url%",c.src))):(d.removeClass("mfp-loading"),b.updateStatus("ready")),d):(b.updateStatus("loading"),c.loading=!0,c.hasSize||(c.imgHidden=!0,d.addClass("mfp-loading"),b.findImageSize(c)),d)}}});var N,O=function(){return void 0===N&&(N=void 0!==document.createElement("p").style.MozTransform),N};a.magnificPopup.registerModule("zoom",{options:{enabled:!1,easing:"ease-in-out",duration:300,opener:function(a){return a.is("img")?a:a.find("img")}},proto:{initZoom:function(){var a,c=b.st.zoom,d=".zoom";if(c.enabled&&b.supportsTransition){var e,f,g=c.duration,j=function(a){var b=a.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),d="all "+c.duration/1e3+"s "+c.easing,e={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},f="transition";return e["-webkit-"+f]=e["-moz-"+f]=e["-o-"+f]=e[f]=d,b.css(e),b},k=function(){b.content.css("visibility","visible")};w("BuildControls"+d,function(){if(b._allowZoom()){if(clearTimeout(e),b.content.css("visibility","hidden"),a=b._getItemToZoom(),!a)return void k();f=j(a),f.css(b._getOffset()),b.wrap.append(f),e=setTimeout(function(){f.css(b._getOffset(!0)),e=setTimeout(function(){k(),setTimeout(function(){f.remove(),a=f=null,y("ZoomAnimationEnded")},16)},g)},16)}}),w(i+d,function(){if(b._allowZoom()){if(clearTimeout(e),b.st.removalDelay=g,!a){if(a=b._getItemToZoom(),!a)return;f=j(a)}f.css(b._getOffset(!0)),b.wrap.append(f),b.content.css("visibility","hidden"),setTimeout(function(){f.css(b._getOffset())},16)}}),w(h+d,function(){b._allowZoom()&&(k(),f&&f.remove(),a=null)})}},_allowZoom:function(){return"image"===b.currItem.type},_getItemToZoom:function(){return b.currItem.hasSize?b.currItem.img:!1},_getOffset:function(c){var d;d=c?b.currItem.img:b.st.zoom.opener(b.currItem.el||b.currItem);var e=d.offset(),f=parseInt(d.css("padding-top"),10),g=parseInt(d.css("padding-bottom"),10);e.top-=a(window).scrollTop()-f;var h={width:d.width(),height:(u?d.innerHeight():d[0].offsetHeight)-g-f};return O()?h["-moz-transform"]=h.transform="translate("+e.left+"px,"+e.top+"px)":(h.left=e.left,h.top=e.top),h}}});var P="iframe",Q="//about:blank",R=function(a){if(b.currTemplate[P]){var c=b.currTemplate[P].find("iframe");c.length&&(a||(c[0].src=Q),b.isIE8&&c.css("display",a?"block":"none"))}};a.magnificPopup.registerModule(P,{options:{markup:'<div class="mfp-iframe-scaler"><div class="mfp-close"></div><iframe class="mfp-iframe" src="//about:blank" frameborder="0" allowfullscreen></iframe></div>',srcAction:"iframe_src",patterns:{youtube:{index:"youtube.com",id:"v=",src:"//www.youtube.com/embed/%id%?autoplay=1"},vimeo:{index:"vimeo.com/",id:"/",src:"//player.vimeo.com/video/%id%?autoplay=1"},gmaps:{index:"//maps.google.",src:"%id%&output=embed"}}},proto:{initIframe:function(){b.types.push(P),w("BeforeChange",function(a,b,c){b!==c&&(b===P?R():c===P&&R(!0))}),w(h+"."+P,function(){R()})},getIframe:function(c,d){var e=c.src,f=b.st.iframe;a.each(f.patterns,function(){return e.indexOf(this.index)>-1?(this.id&&(e="string"==typeof this.id?e.substr(e.lastIndexOf(this.id)+this.id.length,e.length):this.id.call(this,e)),e=this.src.replace("%id%",e),!1):void 0});var g={};return f.srcAction&&(g[f.srcAction]=e),b._parseMarkup(d,g,c),b.updateStatus("ready"),d}}});var S=function(a){var c=b.items.length;return a>c-1?a-c:0>a?c+a:a},T=function(a,b,c){return a.replace(/%curr%/gi,b+1).replace(/%total%/gi,c)};a.magnificPopup.registerModule("gallery",{options:{enabled:!1,arrowMarkup:'<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>',preload:[0,2],navigateByImgClick:!0,arrows:!0,tPrev:"Previous (Left arrow key)",tNext:"Next (Right arrow key)",tCounter:"%curr% of %total%"},proto:{initGallery:function(){var c=b.st.gallery,e=".mfp-gallery";return b.direction=!0,c&&c.enabled?(f+=" mfp-gallery",w(m+e,function(){c.navigateByImgClick&&b.wrap.on("click"+e,".mfp-img",function(){return b.items.length>1?(b.next(),!1):void 0}),d.on("keydown"+e,function(a){37===a.keyCode?b.prev():39===a.keyCode&&b.next()})}),w("UpdateStatus"+e,function(a,c){c.text&&(c.text=T(c.text,b.currItem.index,b.items.length))}),w(l+e,function(a,d,e,f){var g=b.items.length;e.counter=g>1?T(c.tCounter,f.index,g):""}),w("BuildControls"+e,function(){if(b.items.length>1&&c.arrows&&!b.arrowLeft){var d=c.arrowMarkup,e=b.arrowLeft=a(d.replace(/%title%/gi,c.tPrev).replace(/%dir%/gi,"left")).addClass(s),f=b.arrowRight=a(d.replace(/%title%/gi,c.tNext).replace(/%dir%/gi,"right")).addClass(s);e.click(function(){b.prev()}),f.click(function(){b.next()}),b.container.append(e.add(f))}}),w(n+e,function(){b._preloadTimeout&&clearTimeout(b._preloadTimeout),b._preloadTimeout=setTimeout(function(){b.preloadNearbyImages(),b._preloadTimeout=null},16)}),void w(h+e,function(){d.off(e),b.wrap.off("click"+e),b.arrowRight=b.arrowLeft=null})):!1},next:function(){b.direction=!0,b.index=S(b.index+1),b.updateItemHTML()},prev:function(){b.direction=!1,b.index=S(b.index-1),b.updateItemHTML()},goTo:function(a){b.direction=a>=b.index,b.index=a,b.updateItemHTML()},preloadNearbyImages:function(){var a,c=b.st.gallery.preload,d=Math.min(c[0],b.items.length),e=Math.min(c[1],b.items.length);for(a=1;a<=(b.direction?e:d);a++)b._preloadItem(b.index+a);for(a=1;a<=(b.direction?d:e);a++)b._preloadItem(b.index-a)},_preloadItem:function(c){if(c=S(c),!b.items[c].preloaded){var d=b.items[c];d.parsed||(d=b.parseEl(c)),y("LazyLoad",d),"image"===d.type&&(d.img=a('<img class="mfp-img" />').on("load.mfploader",function(){d.hasSize=!0}).on("error.mfploader",function(){d.hasSize=!0,d.loadError=!0,y("LazyLoadError",d)}).attr("src",d.src)),d.preloaded=!0}}}});var U="retina";a.magnificPopup.registerModule(U,{options:{replaceSrc:function(a){return a.src.replace(/\.\w+$/,function(a){return"@2x"+a})},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var a=b.st.retina,c=a.ratio;c=isNaN(c)?c():c,c>1&&(w("ImageHasSize."+U,function(a,b){b.img.css({"max-width":b.img[0].naturalWidth/c,width:"100%"})}),w("ElementParse."+U,function(b,d){d.src=a.replaceSrc(d,c)}))}}}}),A()});
// source --> https://mfrash.com/wp-content/themes/porto/js/theme.js?ver=7.8.5 
/**
 * Porto theme's main JavaScript file
 */

// Dokan Compatibility
jQuery( '.tips' ).each( function() {
	let $this = jQuery( this );
	$this.attr( 'data-bs-title', $this.data( 'title' ) );
});

/* Alternatives for old browsers */
if ( !String.prototype.endsWith ) {
	String.prototype.endsWith = function( search, this_len ) {
		if ( this_len === undefined || this_len > this.length ) {
			this_len = this.length;
		}
		return this.substring( this_len - search.length, this_len ) === search;
	};
}
if ( window.NodeList && !NodeList.prototype.forEach ) {
	NodeList.prototype.forEach = Array.prototype.forEach;
}
if ( !String.prototype.trim ) {
	String.prototype.trim = function() {
		return this.replace( /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, '' );
	};
}

/* Smart Resize  */
( function( $, sr ) {
	'use strict';

	// debouncing function from John Hann
	// http://unscriptable.com/index.php/2009/03/20/debouncing-javascript-methods/
	var debounce = function( func, threshold, execAsap ) {
		var timeout;

		return function debounced() {
			var obj = this, args = arguments;
			function delayed() {
				if ( !execAsap )
					func.apply( obj, args );
				timeout = null;
			}

			if ( timeout && timeout.val )
				theme.deleteTimeout( timeout );
			else if ( execAsap )
				func.apply( obj, args );

			timeout = theme.requestTimeout( delayed, threshold || 100 );
		};
	};
	// smartresize 
	jQuery.fn[sr] = function( fn ) { return fn ? this.on( 'resize', debounce( fn ) ) : this.trigger( sr ); };

} )( jQuery, 'smartresize' );

/* easing */
jQuery.extend( jQuery.easing, {
	def: 'easeOutQuad',
	swing: function( x, t, b, c, d ) {
		return jQuery.easing[jQuery.easing.def]( x, t, b, c, d );
	},
	easeOutQuad: function( x, t, b, c, d ) {
		return -c * ( t /= d ) * ( t - 2 ) + b;
	},
	easeInOutQuart: function( x, t, b, c, d ) {
		if ( ( t /= d / 2 ) < 1 ) return c / 2 * t * t * t * t + b;
		return -c / 2 * ( ( t -= 2 ) * t * t * t - 2 ) + b;
	},
	easeOutQuint: function( x, t, b, c, d ) {
		return c * ( ( t = t / d - 1 ) * t * t * t * t + 1 ) + b;
	}
} );

( function( $ ) {

	/**
	 * Copyright 2012, Digital Fusion
	 * Licensed under the MIT license.
	 * http://teamdf.com/jquery-plugins/license/
	 *
	 * @author Sam Sehnert
	 * @desc A small plugin that checks whether elements are within
	 *       the user visible viewport of a web browser.
	 *       only accounts for vertical position, not horizontal.
	 */
	$.fn.visible = function( partial, hidden, direction, container ) {

		if ( this.length < 1 )
			return;

		var $t = this.length > 1 ? this.eq( 0 ) : this,
			isContained = typeof container !== 'undefined' && container !== null,
			$w = isContained ? $( container ) : $( window ),
			wPosition = isContained ? $w.position() : 0,
			t = $t.get( 0 ),
			vpWidth = $w.outerWidth(),
			vpHeight = $w.outerHeight(),
			direction = ( direction ) ? direction : 'both',
			clientSize = hidden === true ? t.offsetWidth * t.offsetHeight : true;

		if ( typeof t.getBoundingClientRect === 'function' ) {

			// Use this native browser method, if available.
			var rec = t.getBoundingClientRect(),
				tViz = isContained ?
					rec.top - wPosition.top >= 0 && rec.top < vpHeight + wPosition.top :
					rec.top >= 0 && rec.top < vpHeight,
				bViz = isContained ?
					rec.bottom - wPosition.top > 0 && rec.bottom <= vpHeight + wPosition.top :
					rec.bottom > 0 && rec.bottom <= vpHeight,
				lViz = isContained ?
					rec.left - wPosition.left >= 0 && rec.left < vpWidth + wPosition.left :
					rec.left >= 0 && rec.left < vpWidth,
				rViz = isContained ?
					rec.right - wPosition.left > 0 && rec.right < vpWidth + wPosition.left :
					rec.right > 0 && rec.right <= vpWidth,
				vVisible = partial ? tViz || bViz : tViz && bViz,
				hVisible = partial ? lViz || rViz : lViz && rViz;

			if ( direction === 'both' )
				return clientSize && vVisible && hVisible;
			else if ( direction === 'vertical' )
				return clientSize && vVisible;
			else if ( direction === 'horizontal' )
				return clientSize && hVisible;
		} else {

			var viewTop = isContained ? 0 : wPosition,
				viewBottom = viewTop + vpHeight,
				viewLeft = $w.scrollLeft(),
				viewRight = viewLeft + vpWidth,
				position = $t.position(),
				_top = position.top,
				_bottom = _top + $t.height(),
				_left = position.left,
				_right = _left + $t.width(),
				compareTop = partial === true ? _bottom : _top,
				compareBottom = partial === true ? _top : _bottom,
				compareLeft = partial === true ? _right : _left,
				compareRight = partial === true ? _left : _right;

			if ( direction === 'both' )
				return !!clientSize && ( ( compareBottom <= viewBottom ) && ( compareTop >= viewTop ) ) && ( ( compareRight <= viewRight ) && ( compareLeft >= viewLeft ) );
			else if ( direction === 'vertical' )
				return !!clientSize && ( ( compareBottom <= viewBottom ) && ( compareTop >= viewTop ) );
			else if ( direction === 'horizontal' )
				return !!clientSize && ( ( compareRight <= viewRight ) && ( compareLeft >= viewLeft ) );
		}
	};

} )( jQuery );

/*
 Name: Porto Theme Javascript
 Writtern By: P-THEMES
 Javascript Version: 1.2
 */

// Theme
window.theme || (window.theme = {});
// Configuration
( function( theme, $ ) {
	'use strict';

	theme = theme || {};

	$.extend( theme, {

		rtl: js_porto_vars.rtl == '1' ? true : false,
		rtl_browser: $( 'html' ).hasClass( 'browser-rtl' ),

		ajax_url: js_porto_vars.ajax_url,
		request_error: js_porto_vars.request_error,

		change_logo: js_porto_vars.change_logo == '1' ? true : false,

		show_sticky_header: js_porto_vars.show_sticky_header == '1' ? true : false,
		show_sticky_header_tablet: js_porto_vars.show_sticky_header_tablet == '1' ? true : false,
		show_sticky_header_mobile: js_porto_vars.show_sticky_header_mobile == '1' ? true : false,

		category_ajax: js_porto_vars.category_ajax == '1' ? true : false,
		prdctfltr_ajax: js_porto_vars.prdctfltr_ajax == '1' ? true : false,

		container_width: parseInt( js_porto_vars.container_width ),
		grid_gutter_width: parseInt( js_porto_vars.grid_gutter_width ),
		screen_xl: parseInt( js_porto_vars.screen_xl ),
		screen_xxl: parseInt( js_porto_vars.screen_xxl ),
		slider_loop: js_porto_vars.slider_loop == '1' ? true : false,
		slider_autoplay: js_porto_vars.slider_autoplay == '1' ? true : false,
		slider_autoheight: js_porto_vars.slider_autoheight == '1' ? true : false,
		slider_speed: js_porto_vars.slider_speed ? js_porto_vars.slider_speed : 5000,
		slider_nav: js_porto_vars.slider_nav == '1' ? true : false,
		slider_nav_hover: js_porto_vars.slider_nav_hover == '1' ? true : false,
		slider_margin: js_porto_vars.slider_margin == '1' ? 40 : 0,
		slider_dots: js_porto_vars.slider_dots == '1' ? true : false,
		slider_animatein: js_porto_vars.slider_animatein ? js_porto_vars.slider_animatein : '',
		slider_animateout: js_porto_vars.slider_animateout ? js_porto_vars.slider_animateout : '',
		product_thumbs_count: js_porto_vars.product_thumbs_count ? parseInt( js_porto_vars.product_thumbs_count, 10 ) : 4,
		product_zoom: js_porto_vars.product_zoom == '1' ? true : false,
		product_zoom_mobile: js_porto_vars.product_zoom_mobile == '1' ? true : false,
		product_image_popup: js_porto_vars.product_image_popup == '1' ? 'fadeOut' : false,
		innerHeight: window.innerHeight,
		animation_support: !$( 'html' ).hasClass( 'no-csstransitions' ),

		owlConfig: {
			rtl: js_porto_vars.rtl == '1' ? true : false,
			loop: js_porto_vars.slider_loop == '1' ? true : false,
			autoplay: js_porto_vars.slider_autoplay == '1' ? true : false,
			autoHeight: js_porto_vars.slider_autoheight == '1' ? true : false,
			autoplayTimeout: js_porto_vars.slider_speed ? js_porto_vars.slider_speed : 7000,
			autoplayHoverPause: true,
			lazyLoad: true,
			nav: js_porto_vars.slider_nav == '1' ? true : false,
			navText: ["", ""],
			dots: js_porto_vars.slider_dots == '1' ? true : false,
			stagePadding: ( js_porto_vars.slider_nav_hover != '1' && js_porto_vars.slider_margin == '1' ) ? 40 : 0,
			animateOut: js_porto_vars.slider_animateout ? js_porto_vars.slider_animateout : '',
			animateIn: js_porto_vars.slider_animatein ? js_porto_vars.slider_animatein : ''
		},

		sticky_nav_height: 0,

		is_device_mobile: /(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test( navigator.userAgent || navigator.vendor || window.opera ) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test( ( navigator.userAgent || navigator.vendor || window.opera ).substr( 0, 4 ) ),

		getScrollbarWidth: function() {

			if ( this.scrollbarSize === undefined ) {
				this.scrollbarSize = window.innerWidth - document.documentElement.clientWidth;
			}
			return this.scrollbarSize;
		},

		isTablet: function() {
			if ( window.innerWidth < 992 )
				return true;
			return false;
		},

		isMobile: function() {
			if ( window.innerWidth <= 480 )
				return true;
			return false;
		},

		isIOS: function () {
			return [
				'iPad Simulator',
				'iPhone Simulator',
				'iPod Simulator',
				'iPad',
				'iPhone',
				'iPod'
			].includes(navigator.platform)
				// iPad on iOS 13 detection
				|| (navigator.userAgent.includes("Mac") && "ontouchend" in document);
		},

		refreshVCContent: function( $elements ) {
			if ( $elements || $( document.body ).hasClass( 'elementor-page' ) ) {
				$( window ).trigger( 'resize', [ $elements ] );
			}
			theme.refreshStickySidebar( true );

			if ( typeof window.vc_js == 'function' )
				window.vc_js();

			$( document.body ).trigger( 'porto_refresh_vc_content', [$elements] );
		},

		adminBarHeight: function() {
			if ( theme.adminBarHeightNum || 0 === theme.adminBarHeightNum ) {
				return theme.adminBarHeightNum;
			}
			var obj = document.getElementById( 'wpadminbar' ),
				fixed_top = $( '.porto-scroll-progress.fixed-top:not(.fixed-under-header)' );
			if ( fixed_top.length && '0px' == fixed_top.css( 'margin-top' ) ) {
				theme.adminBarHeightNum = fixed_top.height();
			} else {
				theme.adminBarHeightNum = 0;
			}
			if ( obj && obj.offsetHeight && window.innerWidth > 600 ) {
				theme.adminBarHeightNum += obj.offsetHeight;
			}

			return theme.adminBarHeightNum;
		},

		refreshStickySidebar: function( timeout, $sticky_sidebar ) {
			if ( typeof $sticky_sidebar == 'undefined' ) {
				$sticky_sidebar = $( '.sidebar [data-plugin-sticky]' );
			}
			if ( $sticky_sidebar.get( 0 ) ) {
				if ( timeout ) {
					theme.requestTimeout( function() {
						$sticky_sidebar.trigger( 'recalc.pin' );
					}, 400 );
				} else {
					$sticky_sidebar.trigger( 'recalc.pin' );
				}
			}
		},

		scrolltoContainer: function( $container, timeout ) {
			if ( $container.get( 0 ) ) {
				if ( window.innerWidth < 992 ) {
					$( '.sidebar-overlay' ).trigger( 'click' );
				}
				if ( !timeout ) {
					timeout = 600;
				}
				$( 'html, body' ).stop().animate( {
					scrollTop: $container.offset().top - theme.StickyHeader.sticky_height - theme.adminBarHeight() - theme.sticky_nav_height - 18
				}, timeout, 'easeOutQuad' );
			}
		},

		requestFrame: function( fn ) {
			var handler = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame;
			if ( !handler ) {
				return setTimeout( fn, 1000 / 60 );
			}
			var rt = new Object()
			rt.val = handler( fn );
			return rt;
		},

		requestTimeout: function( fn, delay ) {
			var handler = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame;
			if ( !handler ) {
				return setTimeout( fn, delay );
			}
			var start, rt = new Object();

			function loop( timestamp ) {
				if ( !start ) {
					start = timestamp;
				}
				var progress = timestamp - start;
				progress >= delay ? fn.call() : rt.val = handler( loop );
			};

			rt.val = handler( loop );
			return rt;
		},

		deleteTimeout: function( timeoutID ) {
			if ( !timeoutID ) {
				return;
			}
			var handler = window.cancelAnimationFrame || window.webkitCancelAnimationFrame || window.mozCancelAnimationFrame;
			if ( !handler ) {
				return clearTimeout( timeoutID );
			}
			if ( timeoutID.val ) {
				return handler( timeoutID.val );
			}
		},

		execPluginFunction: function( functionName, context ) {
			var args = Array.prototype.slice.call( arguments, 2 );
			var namespaces = functionName.split( "." );
			var func = namespaces.pop();

			for ( var i = 0; i < namespaces.length; i++ ) {
				context = context[namespaces[i]];
			}

			return context[func].apply( context, args );
		},

		getOptions: function( opts ) {
			if ( typeof ( opts ) == 'object' ) {
				return opts;
			} else if ( typeof ( opts ) == 'string' ) {
				try {
					return JSON.parse( opts.replace( /'/g, '"' ).replace( ';', '' ) );
				} catch ( e ) {
					return {};
				}
			} else {
				return {};
			}
		},
		mergeOptions: function( obj1, obj2 ) {
			var obj3 = {};
			for ( var attrname in obj1 ) { obj3[attrname] = obj1[attrname]; }
			for ( var attrname in obj2 ) { obj3[attrname] = obj2[attrname]; }
			return obj3;
		},

		intObs: function( selector, functionName, accY ) {
			var $el;
			if ( typeof selector == 'string' ) {
				$el = document.querySelectorAll( selector );
			} else {
				$el = selector;
			}
			var intersectionObserverOptions = {
				rootMargin: '200px'
			}
			if ( typeof accY != 'undefined' ) {
				intersectionObserverOptions.rootMargin = '0px 0px ' + Number( accY ) + 'px 0px';
			}

			var observer = new IntersectionObserver( function( entries ) {
				for ( var i = 0; i < entries.length; i++ ) {
					var entry = entries[i];
					if ( entry.intersectionRatio > 0 ) {
						var $this = $( entry.target ),
							opts;

						if ( typeof functionName == 'string' ) {
							var pluginOptions = theme.getOptions( $this.data( 'plugin-options' ) );
							if ( pluginOptions )
								opts = pluginOptions;

							theme.execPluginFunction( functionName, $this, opts );
						} else {
							var callback = functionName;
							callback.call( $this );
						}

						// Unobserve
						observer.unobserve( entry.target );
					}
				}
			}, intersectionObserverOptions );

			Array.prototype.forEach.call( $el, function( obj ) {
				observer.observe( obj );
			} );
		},

		dynIntObsInit: function( selector, functionName, pluginDefaults ) {
			var $el;
			if ( typeof selector == 'string' ) {
				$el = document.querySelectorAll( selector );
			} else {
				$el = selector;
			}

			Array.prototype.forEach.call( $el, function( obj ) {
				var $this = $( obj ),
					opts;
				if ( $this.data( 'observer-init' ) ) {
					return;
				}

				var pluginOptions = theme.getOptions( $this.data( 'plugin-options' ) );
				if ( pluginOptions )
					opts = pluginOptions;

				var mergedPluginDefaults = theme.mergeOptions( pluginDefaults, opts )

				var intersectionObserverOptions = {
					rootMargin: '0px 0px 200px 0px',
					thresholds: 0
				}
				if ( mergedPluginDefaults.accY ) {
					intersectionObserverOptions.rootMargin = '0px 0px ' + Number( mergedPluginDefaults.accY ) + 'px 0px';
				}

				var observer = new IntersectionObserver( function( entries ) {
					for ( var i = 0; i < entries.length; i++ ) {
						var entry = entries[i];
						if ( entry.intersectionRatio > 0 ) {
							theme.execPluginFunction( functionName, $this, mergedPluginDefaults );

							// Unobserve
							observer.unobserve( entry.target );
						}
					}
				}, intersectionObserverOptions );

				observer.observe( obj );
				$this.data( 'observer-init', true );
			} );
		}

	} );

	if ( theme.isIOS() ) {
		document.body.classList.add( 'ios' );
	}

	$.extend( theme, {
		add_query_arg: function( key, value ) {
			key = escape( key ); value = escape( value );

			var s = document.location.search;
			var kvp = key + "=" + value;

			var r = new RegExp( "(&|\\?)" + key + "=[^\&]*" );

			s = s.replace( r, "$1" + kvp );

			if ( !RegExp.$1 ) { s += ( s.length > 0 ? '&' : '?' ) + kvp; };

			//again, do what you will here
			return s;
		},
		addUrlParam: function (href, name, value) {
			var url = document.createElement('a'), s, r;
			href = decodeURIComponent(decodeURI(href));
			url.href = href;
			s = url.search;
			if (0 <= s.indexOf(name + '=')) {
				r = s.replace(new RegExp(name + '=[^&]*'), name + '=' + value);
			} else {
				r = (s.length && 0 <= s.indexOf('?')) ? s : '?';
				r.endsWith('?') || (r += '&');
				r += name + '=' + value;
			}
			return encodeURI(href.replace(s, '') + r.replace(/&+/, '&'));
		},
		removeUrlParam: function (href, name) {
			var url = document.createElement('a'), s, r;
			href = decodeURIComponent(decodeURI(href));
			url.href = href;
			s = url.search;
			if (0 <= s.indexOf(name + '=')) {
				r = s.replace(new RegExp(name + '=[^&]*'), '').replace(/&+/, '&').replace('?&', '?');
				r.endsWith('&') && (r = r.substr(0, r.length - 1));
				r.endsWith('?') && (r = r.substr(0, r.length - 1));
				r = r.replace('&&', '&');
			} else {
				r = s;
			}
			return encodeURI(href.replace(s, '') + r);
		}
	} );

} ).apply( this, [window.theme, jQuery] );


/**
 * Copyright 2016 Google Inc. All Rights Reserved.
 *
 * Licensed under the W3C SOFTWARE AND DOCUMENT NOTICE AND LICENSE.
 *
 *  https://www.w3.org/Consortium/Legal/2015/copyright-software-and-document
 *
 */
!function() { "use strict"; if ( "object" == typeof window ) if ( "IntersectionObserver" in window && "IntersectionObserverEntry" in window && "intersectionRatio" in window.IntersectionObserverEntry.prototype ) "isIntersecting" in window.IntersectionObserverEntry.prototype || Object.defineProperty( window.IntersectionObserverEntry.prototype, "isIntersecting", { get: function() { return this.intersectionRatio > 0 } } ); else { var t = function( t ) { for ( var e = window.document, o = i( e ); o; )o = i( e = o.ownerDocument ); return e }(), e = [], o = null, n = null; s.prototype.THROTTLE_TIMEOUT = 100, s.prototype.POLL_INTERVAL = null, s.prototype.USE_MUTATION_OBSERVER = !0, s._setupCrossOriginUpdater = function() { return o || ( o = function( t, o ) { n = t && o ? l( t, o ) : { top: 0, bottom: 0, left: 0, right: 0, width: 0, height: 0 }, e.forEach( function( t ) { t._checkForIntersections() } ) } ), o }, s._resetCrossOriginUpdater = function() { o = null, n = null }, s.prototype.observe = function( t ) { if ( !this._observationTargets.some( function( e ) { return e.element == t } ) ) { if ( !t || 1 != t.nodeType ) throw new Error( "target must be an Element" ); this._registerInstance(), this._observationTargets.push( { element: t, entry: null } ), this._monitorIntersections( t.ownerDocument ), this._checkForIntersections() } }, s.prototype.unobserve = function( t ) { this._observationTargets = this._observationTargets.filter( function( e ) { return e.element != t } ), this._unmonitorIntersections( t.ownerDocument ), 0 == this._observationTargets.length && this._unregisterInstance() }, s.prototype.disconnect = function() { this._observationTargets = [], this._unmonitorAllIntersections(), this._unregisterInstance() }, s.prototype.takeRecords = function() { var t = this._queuedEntries.slice(); return this._queuedEntries = [], t }, s.prototype._initThresholds = function( t ) { var e = t || [0]; return Array.isArray( e ) || ( e = [e] ), e.sort().filter( function( t, e, o ) { if ( "number" != typeof t || isNaN( t ) || t < 0 || t > 1 ) throw new Error( "threshold must be a number between 0 and 1 inclusively" ); return t !== o[e - 1] } ) }, s.prototype._parseRootMargin = function( t ) { var e = ( t || "0px" ).split( /\s+/ ).map( function( t ) { var e = /^(-?\d*\.?\d+)(px|%)$/.exec( t ); if ( !e ) throw new Error( "rootMargin must be specified in pixels or percent" ); return { value: parseFloat( e[1] ), unit: e[2] } } ); return e[1] = e[1] || e[0], e[2] = e[2] || e[0], e[3] = e[3] || e[1], e }, s.prototype._monitorIntersections = function( e ) { var o = e.defaultView; if ( o && -1 == this._monitoringDocuments.indexOf( e ) ) { var n = this._checkForIntersections, r = null, s = null; this.POLL_INTERVAL ? r = o.setInterval( n, this.POLL_INTERVAL ) : ( h( o, "resize", n, !0 ), h( e, "scroll", n, !0 ), this.USE_MUTATION_OBSERVER && "MutationObserver" in o && ( s = new o.MutationObserver( n ) ).observe( e, { attributes: !0, childList: !0, characterData: !0, subtree: !0 } ) ), this._monitoringDocuments.push( e ), this._monitoringUnsubscribes.push( function() { var t = e.defaultView; t && ( r && t.clearInterval( r ), c( t, "resize", n, !0 ) ), c( e, "scroll", n, !0 ), s && s.disconnect() } ); var u = this.root && ( this.root.ownerDocument || this.root ) || t; if ( e != u ) { var a = i( e ); a && this._monitorIntersections( a.ownerDocument ) } } }, s.prototype._unmonitorIntersections = function( e ) { var o = this._monitoringDocuments.indexOf( e ); if ( -1 != o ) { var n = this.root && ( this.root.ownerDocument || this.root ) || t; if ( !this._observationTargets.some( function( t ) { var o = t.element.ownerDocument; if ( o == e ) return !0; for ( ; o && o != n; ) { var r = i( o ); if ( ( o = r && r.ownerDocument ) == e ) return !0 } return !1 } ) ) { var r = this._monitoringUnsubscribes[o]; if ( this._monitoringDocuments.splice( o, 1 ), this._monitoringUnsubscribes.splice( o, 1 ), r(), e != n ) { var s = i( e ); s && this._unmonitorIntersections( s.ownerDocument ) } } } }, s.prototype._unmonitorAllIntersections = function() { var t = this._monitoringUnsubscribes.slice( 0 ); this._monitoringDocuments.length = 0, this._monitoringUnsubscribes.length = 0; for ( var e = 0; e < t.length; e++ )t[e]() }, s.prototype._checkForIntersections = function() { if ( this.root || !o || n ) { var t = this._rootIsInDom(), e = t ? this._getRootRect() : { top: 0, bottom: 0, left: 0, right: 0, width: 0, height: 0 }; this._observationTargets.forEach( function( n ) { var i = n.element, s = u( i ), h = this._rootContainsTarget( i ), c = n.entry, a = t && h && this._computeTargetAndRootIntersection( i, s, e ), l = null; this._rootContainsTarget( i ) ? o && !this.root || ( l = e ) : l = { top: 0, bottom: 0, left: 0, right: 0, width: 0, height: 0 }; var f = n.entry = new r( { time: window.performance && performance.now && performance.now(), target: i, boundingClientRect: s, rootBounds: l, intersectionRect: a } ); c ? t && h ? this._hasCrossedThreshold( c, f ) && this._queuedEntries.push( f ) : c && c.isIntersecting && this._queuedEntries.push( f ) : this._queuedEntries.push( f ) }, this ), this._queuedEntries.length && this._callback( this.takeRecords(), this ) } }, s.prototype._computeTargetAndRootIntersection = function( e, i, r ) { if ( "none" != window.getComputedStyle( e ).display ) { for ( var s, h, c, a, f, d, g, m, v = i, _ = p( e ), b = !1; !b && _; ) { var w = null, y = 1 == _.nodeType ? window.getComputedStyle( _ ) : {}; if ( "none" == y.display ) return null; if ( _ == this.root || 9 == _.nodeType ) if ( b = !0, _ == this.root || _ == t ) o && !this.root ? !n || 0 == n.width && 0 == n.height ? ( _ = null, w = null, v = null ) : w = n : w = r; else { var I = p( _ ), E = I && u( I ), T = I && this._computeTargetAndRootIntersection( I, E, r ); E && T ? ( _ = I, w = l( E, T ) ) : ( _ = null, v = null ) } else { var R = _.ownerDocument; _ != R.body && _ != R.documentElement && "visible" != y.overflow && ( w = u( _ ) ) } if ( w && ( s = w, h = v, c = void 0, a = void 0, f = void 0, d = void 0, g = void 0, m = void 0, c = Math.max( s.top, h.top ), a = Math.min( s.bottom, h.bottom ), f = Math.max( s.left, h.left ), d = Math.min( s.right, h.right ), m = a - c, v = ( g = d - f ) >= 0 && m >= 0 && { top: c, bottom: a, left: f, right: d, width: g, height: m } || null ), !v ) break; _ = _ && p( _ ) } return v } }, s.prototype._getRootRect = function() { var e; if ( this.root && !d( this.root ) ) e = u( this.root ); else { var o = d( this.root ) ? this.root : t, n = o.documentElement, i = o.body; e = { top: 0, left: 0, right: n.clientWidth || i.clientWidth, width: n.clientWidth || i.clientWidth, bottom: n.clientHeight || i.clientHeight, height: n.clientHeight || i.clientHeight } } return this._expandRectByRootMargin( e ) }, s.prototype._expandRectByRootMargin = function( t ) { var e = this._rootMarginValues.map( function( e, o ) { return "px" == e.unit ? e.value : e.value * ( o % 2 ? t.width : t.height ) / 100 } ), o = { top: t.top - e[0], right: t.right + e[1], bottom: t.bottom + e[2], left: t.left - e[3] }; return o.width = o.right - o.left, o.height = o.bottom - o.top, o }, s.prototype._hasCrossedThreshold = function( t, e ) { var o = t && t.isIntersecting ? t.intersectionRatio || 0 : -1, n = e.isIntersecting ? e.intersectionRatio || 0 : -1; if ( o !== n ) for ( var i = 0; i < this.thresholds.length; i++ ) { var r = this.thresholds[i]; if ( r == o || r == n || r < o != r < n ) return !0 } }, s.prototype._rootIsInDom = function() { return !this.root || f( t, this.root ) }, s.prototype._rootContainsTarget = function( e ) { var o = this.root && ( this.root.ownerDocument || this.root ) || t; return f( o, e ) && ( !this.root || o == e.ownerDocument ) }, s.prototype._registerInstance = function() { e.indexOf( this ) < 0 && e.push( this ) }, s.prototype._unregisterInstance = function() { var t = e.indexOf( this ); -1 != t && e.splice( t, 1 ) }, window.IntersectionObserver = s, window.IntersectionObserverEntry = r } function i( t ) { try { return t.defaultView && t.defaultView.frameElement || null } catch ( t ) { return null } } function r( t ) { this.time = t.time, this.target = t.target, this.rootBounds = a( t.rootBounds ), this.boundingClientRect = a( t.boundingClientRect ), this.intersectionRect = a( t.intersectionRect || { top: 0, bottom: 0, left: 0, right: 0, width: 0, height: 0 } ), this.isIntersecting = !!t.intersectionRect; var e = this.boundingClientRect, o = e.width * e.height, n = this.intersectionRect, i = n.width * n.height; this.intersectionRatio = o ? Number( ( i / o ).toFixed( 4 ) ) : this.isIntersecting ? 1 : 0 } function s( t, e ) { var o, n, i, r = e || {}; if ( "function" != typeof t ) throw new Error( "callback must be a function" ); if ( r.root && 1 != r.root.nodeType && 9 != r.root.nodeType ) throw new Error( "root must be a Document or Element" ); this._checkForIntersections = ( o = this._checkForIntersections.bind( this ), n = this.THROTTLE_TIMEOUT, i = null, function() { i || ( i = setTimeout( function() { o(), i = null }, n ) ) } ), this._callback = t, this._observationTargets = [], this._queuedEntries = [], this._rootMarginValues = this._parseRootMargin( r.rootMargin ), this.thresholds = this._initThresholds( r.threshold ), this.root = r.root || null, this.rootMargin = this._rootMarginValues.map( function( t ) { return t.value + t.unit } ).join( " " ), this._monitoringDocuments = [], this._monitoringUnsubscribes = [] } function h( t, e, o, n ) { "function" == typeof t.addEventListener ? t.addEventListener( e, o, n || !1 ) : "function" == typeof t.attachEvent && t.attachEvent( "on" + e, o ) } function c( t, e, o, n ) { "function" == typeof t.removeEventListener ? t.removeEventListener( e, o, n || !1 ) : "function" == typeof t.detatchEvent && t.detatchEvent( "on" + e, o ) } function u( t ) { var e; try { e = t.getBoundingClientRect() } catch ( t ) { } return e ? ( e.width && e.height || ( e = { top: e.top, right: e.right, bottom: e.bottom, left: e.left, width: e.right - e.left, height: e.bottom - e.top } ), e ) : { top: 0, bottom: 0, left: 0, right: 0, width: 0, height: 0 } } function a( t ) { return !t || "x" in t ? t : { top: t.top, y: t.top, bottom: t.bottom, left: t.left, x: t.left, right: t.right, width: t.width, height: t.height } } function l( t, e ) { var o = e.top - t.top, n = e.left - t.left; return { top: o, left: n, height: e.height, width: e.width, bottom: o + e.height, right: n + e.width } } function f( t, e ) { for ( var o = e; o; ) { if ( o == t ) return !0; o = p( o ) } return !1 } function p( e ) { var o = e.parentNode; return 9 == e.nodeType && e != t ? i( e ) : ( o && o.assignedSlot && ( o = o.assignedSlot.parentNode ), o && 11 == o.nodeType && o.host ? o.host : o ) } function d( t ) { return t && 9 === t.nodeType } }();

/* browser select */
( function( $ ) {
	'use strict';
	$.extend( {

		browserSelector: function() {

			// Touch
			var hasTouch = 'ontouchstart' in window || navigator.msMaxTouchPoints;

			var u = navigator.userAgent,
				ua = u.toLowerCase(),
				is = function( t ) {
					return ua.indexOf( t ) > -1;
				},
				g = 'gecko',
				w = 'webkit',
				s = 'safari',
				o = 'opera',
				h = document.documentElement,
				b = [( !( /opera|webtv/i.test( ua ) ) && /msie\s(\d)/.test( ua ) ) ? ( 'ie ie' + parseFloat( navigator.appVersion.split( "MSIE" )[1] ) ) : is( 'firefox/2' ) ? g + ' ff2' : is( 'firefox/3.5' ) ? g + ' ff3 ff3_5' : is( 'firefox/3' ) ? g + ' ff3' : is( 'gecko/' ) ? g : is( 'opera' ) ? o + ( /version\/(\d+)/.test( ua ) ? ' ' + o + RegExp.jQuery1 : ( /opera(\s|\/)(\d+)/.test( ua ) ? ' ' + o + RegExp.jQuery2 : '' ) ) : is( 'konqueror' ) ? 'konqueror' : is( 'chrome' ) ? w + ' chrome' : is( 'iron' ) ? w + ' iron' : is( 'applewebkit/' ) ? w + ' ' + s + ( /version\/(\d+)/.test( ua ) ? ' ' + s + RegExp.jQuery1 : '' ) : is( 'mozilla/' ) ? g : '', is( 'j2me' ) ? 'mobile' : is( 'iphone' ) ? 'iphone' : is( 'ipod' ) ? 'ipod' : is( 'mac' ) ? 'mac' : is( 'darwin' ) ? 'mac' : is( 'webtv' ) ? 'webtv' : is( 'win' ) ? 'win' : is( 'freebsd' ) ? 'freebsd' : ( is( 'x11' ) || is( 'linux' ) ) ? 'linux' : '', 'js'];

			var c = b.join( ' ' );

			if ( theme.is_device_mobile ) {
				c += ' mobile';
			}

			if ( hasTouch ) {
				c += ' touch';
			}

			h.className += ' ' + c;

			// IE11 Detect
			var isIE11 = !( window.ActiveXObject ) && "ActiveXObject" in window;

			if ( isIE11 ) {
				$( 'html' ).removeClass( 'gecko' ).addClass( 'ie ie11' );
				return;
			}
		}

	} );

	$.browserSelector();

} )( jQuery );

// Accordion
( function( theme, $ ) {
	'use strict';

	theme = theme || {};
	var instanceName = '__accordion';
	var Accordion = function( $el, opts ) {
		return this.initialize( $el, opts );
	};
	Accordion.defaults = {
	};
	Accordion.prototype = {
		initialize: function( $el, opts ) {
			if ( $el.data( instanceName ) ) {
				return this;
			}

			this.$el = $el;

			this
				.setData()
				.setOptions( opts )
				.build();

			return this;
		},

		setData: function() {
			this.$el.data( instanceName, this );
			return this;
		},

		setOptions: function( opts ) {
			this.options = $.extend( true, {}, Accordion.defaults, opts, {
				wrapper: this.$el
			} );

			return this;
		},

		build: function() {
			// if ( !$.fn.collapse ) {
			// 	return this;
			// }

			var polyfillCollapse = function( selector ) {
				$( selector ).each( function() {
					let $this = $( this );
					$this.addClass( 'show' );
					$this.prev().find( '.accordion-toggle' ).removeClass( 'collapsed' ).attr( 'aria-expanded', true );
				});
			}

			var $el = this.options.wrapper,
				$collapse = $el.find( '.collapse' ),
				collapsible = $el.data( 'collapsible' ),
				active_num = $el.data( 'active-tab' );

			if ( $collapse.length > 0 ) {
				if ( $el.data( 'use-accordion' ) && 'yes' == $el.data( 'use-accordion' ) ) {
					$el.find( '.collapse' ).attr( 'data-bs-parent', '#' + $el.attr( 'id' ) );
				}
				if ( collapsible == 'yes' ) {
					if ( $.fn.collapse ) {
						$collapse.collapse( { toggle: false, parent: '#' + $el.attr( 'id' ) } );
					}
				} else if ( !isNaN( active_num ) && active_num == parseInt( active_num ) && $el.find( '.collapse' ).length >= active_num ) {
					if ( !$.fn.collapse ) {
						polyfillCollapse( $el.find( '.collapse' ).eq( active_num - 1 ) );
					} else {
						$el.find( '.collapse' ).collapse( { toggle: false, parent: '#' + $el.attr( 'id' ) } );
						$el.find( '.collapse' ).eq( active_num - 1 ).collapse( 'toggle' );
					}
				} else {
					if ( !$.fn.collapse ) {
						polyfillCollapse( $el.find( '.collapse' ) );
					} else {
						$el.find( '.collapse' ).collapse( { parent: '#' + $el.attr( 'id' ) } );
					}
				}
			}

			return this;
		}
	};

	// expose to scope
	$.extend( theme, {
		Accordion: Accordion
	} );

	// jquery plugin
	$.fn.themeAccordion = function( opts ) {
		return this.map( function() {
			var $this = $( this );

			if ( $this.data( instanceName ) ) {
				return $this.data( instanceName );
			} else {
				return new theme.Accordion( $this, opts );
			}

		} );
	};

} ).apply( this, [window.theme, jQuery] );


// Accordion Menu
( function( theme, $ ) {

	'use strict';

	theme = theme || {};

	var instanceName = '__accordionMenu';

	var AccordionMenu = function( $el, opts ) {
		return this.initialize( $el, opts );
	};

	AccordionMenu.defaults = {

	};

	AccordionMenu.prototype = {
		initialize: function( $el, opts ) {
			if ( $el.data( instanceName ) ) {
				return this;
			}

			this.$el = $el;

			this
				.setData()
				.setOptions( opts )
				.build();

			return this;
		},

		setData: function() {
			this.$el.data( instanceName, this );

			return this;
		},

		setOptions: function( opts ) {
			this.options = $.extend( true, {}, AccordionMenu.defaults, opts, {
				wrapper: this.$el
			} );

			return this;
		},

		build: function() {
			var self = this,
				$el = this.options.wrapper;

			$el.find( 'li.menu-item.active' ).each( function() {
				var $this = $( this );

				if ( $this.find( '> .arrow' ).get( 0 ) )
					$this.find( '> .arrow' ).trigger( 'click' );
			} );

			$el.on( 'click', '.arrow', function( e ) {
				e.preventDefault();
				e.stopPropagation();
				var $this = $( this ),
					$parent = $this.closest( 'li' );
				if ( typeof self.options.open_one != 'undefined' ) {
					$parent.siblings( '.open' ).children( '.arrow' ).next().hide();
					$parent.siblings( '.open' ).removeClass( 'open' );
					$this.next().stop().toggle();
				} else {
					$this.next().stop().slideToggle();
				}
				if ( $parent.hasClass( 'open' ) ) {
					$parent.removeClass( 'open' );
				} else {
					$parent.addClass( 'open' );
				}
				if ( $this.closest( '.header-side-nav .sidebar-menu' ).length ) { // for side header
					$( '.header-side-nav [data-plugin-sticky]' ).trigger( 'recalc.pin' );
				}
				return false;
			} );

			$el.find( '.menu-item-has-children' ).each( function () {
				var $this = $(this);
				if ( $this.find( '>.sub-menu > li:not(.hidden-item)' ).length == 0 ) {
					$this.addClass( 'hidden-item' );
				}
			} );

			return this;
		}
	};

	// expose to scope
	$.extend( theme, {
		AccordionMenu: AccordionMenu
	} );

	// jquery plugin
	$.fn.themeAccordionMenu = function( opts ) {
		return this.map( function() {
			var $this = $( this );

			if ( $this.data( instanceName ) ) {
				return $this.data( instanceName );
			} else {
				return new theme.AccordionMenu( $this, opts );
			}

		} );
	};

} ).apply( this, [window.theme, jQuery] );


// Flickr Zoom
( function( theme, $ ) {
	'use strict';

	theme = theme || {};

	var instanceName = '__flickrZoom';

	var FlickrZoom = function( $el, opts ) {
		return this.initialize( $el, opts );
	};

	FlickrZoom.defaults = {

	};

	FlickrZoom.prototype = {
		initialize: function( $el, opts ) {
			if ( $el.data( instanceName ) ) {
				return this;
			}

			this.$el = $el;

			this
				.setData()
				.setOptions( opts )
				.build();

			return this;
		},

		setData: function() {
			this.$el.data( instanceName, this );

			return this;
		},

		setOptions: function( opts ) {
			this.options = $.extend( true, {}, FlickrZoom.defaults, opts, {
				wrapper: this.$el
			} );

			return this;
		},

		build: function() {
			var $el = this.options.wrapper,
				links = [],
				i = 0,
				$flickr_links = $el.find( '.flickr_badge_image > a' );

			$flickr_links.each( function() {
				var slide = {},
					$image = $( this ).find( '> img' );

				slide.src = $image.attr( 'src' ).replace( '_s.', '_b.' );
				slide.title = $image.attr( 'title' );
				links[i] = slide;
				i++;
			} );

			$flickr_links.on( 'click', function( e ) {
				e.preventDefault();
				if ( $.fn.magnificPopup ) {
					$.magnificPopup.close();
					$.magnificPopup.open( $.extend( true, {}, theme.mfpConfig, {
						items: links,
						gallery: {
							enabled: true
						},
						type: 'image'
					} ), $flickr_links.index( $( this ) ) );
				}
			} );

			return this;
		}
	};

	// expose to scope
	$.extend( theme, {
		FlickrZoom: FlickrZoom
	} );

	// jquery plugin
	$.fn.themeFlickrZoom = function( opts ) {
		return this.map( function() {
			var $this = $( this );

			if ( $this.data( instanceName ) ) {
				return $this.data( instanceName );
			} else {
				return new theme.FlickrZoom( $this, opts );
			}

		} );
	}

} ).apply( this, [window.theme, jQuery] );

// Masonry
( function( theme, $ ) {
	'use strict';

	theme = theme || {};

	var instanceName = '__masonry';

	var Masonry = function( $el, opts ) {
		return this.initialize( $el, opts );
	};

	Masonry.defaults = {
		itemSelector: 'li',
		isOriginLeft: !theme.rtl
	};

	Masonry.prototype = {
		initialize: function( $el, opts ) {
			if ( $el.data( instanceName ) ) {
				return this;
			}

			this.$el = $el;

			this
				.setData()
				.setOptions( opts )
				.build();

			return this;
		},

		setData: function() {
			this.$el.data( instanceName, this );

			return this;
		},

		setOptions: function( opts ) {
			this.options = $.extend( true, {}, Masonry.defaults, opts, {
				wrapper: this.$el
			} );

			return this;
		},

		build: function() {
			if ( !$.fn.isotope ) {
				return this;
			}

			var self = this,
				$el = this.options.wrapper,
				trigger_timer = null;
			$el.isotope( this.options );
			$el.isotope( 'on', 'layoutComplete', function() {
				if ( typeof this.options.callback == 'function' ) {
					this.options.callback.call();
				}

				if ( $el.find( '.porto-lazyload:not(.lazy-load-loaded):visible' ).length ) {
					$( window ).trigger( 'scroll' );
				}
			} );
			$el.isotope( 'layout' );
			self.resize();
			$( window ).smartresize( function() {
				self.resize()
			} );

			return this;
		},

		resize: function() {
			var self = this,
				$el = this.options.wrapper;

			if ( self.resizeTimer ) {
				theme.deleteTimeout( self.resizeTimer );
			}

			self.resizeTimer = theme.requestTimeout( function() {
				if ( $el.data( 'isotope' ) ) {
					$el.isotope( 'layout' );
				}
				delete self.resizeTimer;
			}, 600 );
		}
	};

	// expose to scope
	$.extend( theme, {
		Masonry: Masonry
	} );

	// jquery plugin
	$.fn.themeMasonry = function( opts ) {
		return this.map( function() {
			var $this = $( this );
			imagesLoaded( this, function() {
				if ( $this.data( instanceName ) ) {
					return $this.data( instanceName );
				} else {
					return new theme.Masonry( $this, opts );
				}
			} );

		} );
	}

} ).apply( this, [window.theme, jQuery] );


// Toggle
( function( theme, $ ) {
	'use strict';

	theme = theme || {};

	var instanceName = '__toggle';

	var Toggle = function( $el, opts ) {
		return this.initialize( $el, opts );
	};

	Toggle.defaults = {

	};

	Toggle.prototype = {
		initialize: function( $el, opts ) {
			if ( $el.data( instanceName ) ) {
				return this;
			}

			this.$el = $el;

			this
				.setData()
				.setOptions( opts )
				.build();

			return this;
		},

		setData: function() {
			this.$el.data( instanceName, this );

			return this;
		},

		setOptions: function( opts ) {
			this.options = $.extend( true, {}, Toggle.defaults, opts, {
				wrapper: this.$el
			} );

			return this;
		},

		build: function() {
			var $el = this.options.wrapper;

			if ( $el.hasClass( 'active' ) )
				$el.find( "> div.toggle-content" ).stop().slideDown( 350, function() {
					$( this ).attr( 'style', '' ).show();
				} );

			$el.on( 'click', "> label", function( e ) {
				var parentSection = $( this ).parent(),
					parentWrapper = $( this ).closest( "div.toogle" ),
					parentToggles = $( this ).closest( ".porto-toggles" ),
					isAccordion = parentWrapper.hasClass( "toogle-accordion" ),
					toggleContent = parentSection.find( "> div.toggle-content" );

				if ( isAccordion && typeof ( e.originalEvent ) != "undefined" ) {
					parentWrapper.find( "section.toggle.active > label" ).trigger( "click" );
				}

				// Preview Paragraph
				if ( !parentSection.hasClass( "active" ) ) {
					if ( parentToggles.length ) {
						if ( parentToggles.data( 'view' ) == 'one-toggle' ) {
							parentToggles.find( '.toggle' ).each( function() {
								$( this ).removeClass( 'active' );
								$( this ).find( "> div.toggle-content" ).stop().slideUp( 350, function() {
									$( this ).attr( 'style', '' ).hide();
								} );
							} );
						}
					}
					toggleContent.stop().slideDown( 350, function() {
						$( this ).attr( 'style', '' ).show();
						theme.refreshVCContent( toggleContent );
					} );
					parentSection.addClass( "active" );
				} else {
					if ( !parentToggles.length || parentToggles.data( 'view' ) != 'one-toggle' ) {
						toggleContent.stop().slideUp( 350, function() {
							$( this ).attr( 'style', '' ).hide();
						} );
						parentSection.removeClass( "active" );
					}
				}
			} );

			return this;
		}
	};

	// expose to scope
	$.extend( theme, {
		Toggle: Toggle
	} );

	// jquery plugin
	$.fn.themeToggle = function( opts ) {
		return this.map( function() {
			var $this = $( this );

			if ( $this.data( instanceName ) ) {
				return $this.data( instanceName );
			} else {
				return new theme.Toggle( $this, opts );
			}

		} );
	}

} ).apply( this, [window.theme, jQuery] );


// Sticky
( function( theme, $ ) {
	'use strict';

	// jQuery Pin plugin
	$.fn.themePin = function( options ) {
		var scrollY = 0, lastScrollY = 0, elements = [], disabled = false, $window = $( window ), fixedSideTop = [], fixedSideBottom = [], prevDataTo = [];

		options = options || {};

		var recalculateLimits = function() {
			for ( var i = 0, len = elements.length; i < len; i++ ) {
				var $this = elements[i];
				if ( options.minWidth && window.innerWidth < options.minWidth ) {
					if ( $this.parent().hasClass( "pin-wrapper" ) ) { 
						if ( options.hasWrap ) {
							// $this.parent().removeClass( "pin-wrapper" );
							$this.parent().css( 'height', '' );
						} else {
							$this.unwrap(); 
						}

					}
					$this.css( { width: "", left: "", top: "", position: "" } );
					if ( options.activeClass ) { $this.removeClass( options.activeClass ); }
					$this.removeClass( 'sticky-transition' );
					$this.removeClass( 'sticky-absolute' );
					disabled = true;
					continue;
				} else {
					disabled = false;
				}

				var $container = options.containerSelector ? ( $this.closest( options.containerSelector ).length ? $this.closest( options.containerSelector ) : $( options.containerSelector ) ) : $( document.body ),
					offset = $this.offset();
				if ( options.hasWrap && $container.height() < $this.closest( '.pin-wrapper' ).outerHeight() ) { // for sticky side header
					$container = $this.closest( '.pin-wrapper' );
				}
				var containerOffset = $container.offset();

				if ( typeof containerOffset == 'undefined' ) {
					continue;
				}

				if ( !$this.parent().hasClass( "pin-wrapper" ) ) {
					$this.wrap( "<div class='pin-wrapper'>" );
					if ( $this.hasClass( 'elementor-element-populated' ) ) {
						var $el_cont = $this.closest( '.elementor-container' );
						if ( $el_cont.length ) {
							var matches = $el_cont.attr( 'class' ).match( /elementor-column-gap-([a-z]*)/g );
							if ( matches && matches.length ) {
								var gap = matches[0].replace( 'elementor-column-gap-', '' );
								$this.addClass( 'porto-gap-' + gap );
							}
						}
					}
				}
				var parentOffset = $this.parent().offset();
				var pad = $.extend( {
					top: 0,
					bottom: 0
				}, options.padding || {} );

				var $pin = $this.parent(),
					pt = parseInt( $pin.parent().css( 'padding-top' ) ), pb = parseInt( $pin.parent().css( 'padding-bottom' ) );

				if ( options.autoInit ) {
					if ( $( '#header' ).hasClass( 'header-side' ) ) {
						pad.top = theme.adminBarHeight();
						/*if ($('.page-top.fixed-pos').length) {
							pad.top += $('.page-top.fixed-pos').height();
						}*/
					} else {
						pad.top = theme.adminBarHeight();
						if ( $( '#header > .main-menu-wrap' ).length || !$( '#header' ).hasClass( 'sticky-menu-header' ) ) {
							pad.top += ( theme.StickyHeader.sticky_height ? theme.StickyHeader.sticky_height : 0 );
						}
					}
					if ( typeof options.paddingOffsetTop != 'undefined' ) {
						pad.top += parseInt( options.paddingOffsetTop, 10 );
					} else {
						pad.top += 18;
					}
					if ( typeof options.paddingOffsetBottom != 'undefined' ) {
						pad.bottom = parseInt( options.paddingOffsetBottom, 10 );
					} else {
						pad.bottom = 0;
					}
				}

				var bb = $this.css( 'border-bottom' ), h = $this.outerHeight();
				$this.css( 'border-bottom', '1px solid transparent' );
				var o_h = $this.outerHeight() - h - 1;
				$this.css( 'border-bottom', bb );
				$this.css( { width: $this.outerWidth() <= $pin.width() ? $this.outerWidth() : $pin.width() } );
				$pin.css( "height", $this.outerHeight() + o_h );

				if ( ( !options.autoFit && !options.fitToBottom ) || $this.outerHeight() <= $window.height() ) {
					$this.data( "themePin", {
						pad: pad,
						from: ( options.containerSelector ? containerOffset.top : offset.top ) - pad.top + pt,
						pb: pb,
						parentTop: parentOffset.top - pt,
						offset: o_h,
						stickyOffset: options.stickyOffset ? options.stickyOffset : 0
					} );
				} else {
					$this.data( "themePin", {
						pad: pad,
						fromFitTop: ( options.containerSelector ? containerOffset.top : offset.top ) - pad.top + pt,
						from: ( options.containerSelector ? containerOffset.top : offset.top ) + $this.outerHeight() - window.innerHeight + pt,
						pb: pb,
						parentTop: parentOffset.top - pt,
						offset: o_h,
						stickyOffset: options.stickyOffset ? options.stickyOffset : 0
					} );
				}
			}
		};

		var onScroll = function() {
			if ( disabled ) { return; }

			scrollY = $window.scrollTop();

			var window_height = window.innerHeight || $window.height();

			for ( var i = 0, len = elements.length; i < len; i++ ) {
				var $this = $( elements[i] ),
					data = $this.data( "themePin" ),
					sidebarTop;

				let contentWrap = $this.closest( '.porto-products-filter-body' );
				let sidebarWrap = $this.closest( '.sidebar' );
				if ( contentWrap.length && sidebarWrap.length ) {
					if ( $.contains( contentWrap[0], sidebarWrap[0] ) && !contentWrap.hasClass( 'opened' ) ) {
						continue;
					}
				}

				if ( !data || typeof data.pad == 'undefined' ) { // Removed element
					continue;
				}

				var $container = options.containerSelector ? ( $this.closest( options.containerSelector ).length ? $this.closest( options.containerSelector ) : $( options.containerSelector ) ) : $( document.body ),
					isFitToTop = ( !options.autoFit && !options.fitToBottom ) || ( $this.outerHeight() + data.pad.top ) <= window_height;
				if ( options.hasWrap && $container.height() < $this.closest( '.pin-wrapper' ).outerHeight() ) { // for sticky side header
					$container = $this.closest( '.pin-wrapper' );
				}
				data.end = $container.offset().top + $container.height();
				if ( isFitToTop ) {
					data.to = $container.offset().top + $container.height() - $this.outerHeight() - data.pad.bottom - data.pb;
				} else {
					data.to = $container.offset().top + $container.height() - window_height - data.pb;
					data.to2 = $container.height() - $this.outerHeight() - data.pad.bottom - data.pb;
				}

				if ( prevDataTo[i] === 0 ) {
					prevDataTo[i] = data.to;
				}

				if ( isFitToTop ) {
					var from = data.from - data.pad.bottom,
						to = data.to - data.pad.top - data.offset,
						$parent = $this.closest( '.sticky-nav-wrapper' ),
						widgetTop;

					// Sticky Navigation
					if ( $parent.length ) {
						widgetTop = $parent.offset().top - data.pad.top;
						if ( widgetTop > from ) {
							from = widgetTop;
						}
					}

					if ( typeof data.fromFitTop != 'undefined' && data.fromFitTop ) {
						from = data.fromFitTop - data.pad.bottom;
					}

					if ( from + $this.outerHeight() > data.end || from >= to ) {
						$this.css( { position: "", top: "", left: "" } );
						if ( options.activeClass ) { $this.removeClass( options.activeClass ); }
						$this.removeClass( 'sticky-transition' );
						$this.removeClass( 'sticky-absolute' );
						continue;
					}
					if ( scrollY > from + data.stickyOffset && scrollY < to ) {
						!( $this.css( "position" ) == "fixed" ) && $this.css( {
							left: $this.offset().left,
							top: data.pad.top
						} ).css( "position", "fixed" );
						if ( options.activeClass ) { $this.addClass( options.activeClass ); }
						$this.removeClass( 'sticky-transition' );
						$this.removeClass( 'sticky-absolute' );
					} else if ( scrollY >= to ) {
						$this.css( {
							left: "",
							top: to - data.parentTop + data.pad.top
						} ).css( "position", "absolute" );
						if ( options.activeClass ) { $this.addClass( options.activeClass ); }
						if ( $this.hasClass( 'sticky-absolute' ) ) $this.addClass( 'sticky-transition' );
						$this.addClass( 'sticky-absolute' );
					} else {
						$this.css( { position: "", top: "", left: "" } );
						if ( options.activeClass ) { $this.removeClass( options.activeClass ); }
						$this.removeClass( 'sticky-transition' );
						$this.removeClass( 'sticky-absolute' );
					}
				} else if ( options.fitToBottom ) {
					var from = data.from,
						to = data.to;
					if ( data.from + window_height > data.end || data.from >= to ) {
						$this.css( { position: "", top: "", bottom: "", left: "" } );
						if ( options.activeClass ) { $this.removeClass( options.activeClass ); }
						$this.removeClass( 'sticky-transition' );
						$this.removeClass( 'sticky-absolute' );
						continue;
					}
					if ( scrollY > from && scrollY < to ) {
						!( $this.css( "position" ) == "fixed" ) && $this.css( {
							left: $this.offset().left,
							bottom: data.pad.bottom,
							top: ""
						} ).css( "position", "fixed" );
						if ( options.activeClass ) { $this.addClass( options.activeClass ); }
						$this.removeClass( 'sticky-transition' );
						$this.removeClass( 'sticky-absolute' );
					} else if ( scrollY >= to ) {
						$this.css( {
							left: "",
							top: data.to2,
							bottom: ""
						} ).css( "position", "absolute" );
						if ( options.activeClass ) { $this.addClass( options.activeClass ); }
						if ( $this.hasClass( 'sticky-absolute' ) ) $this.addClass( 'sticky-transition' );
						$this.addClass( 'sticky-absolute' );
					} else {
						$this.css( { position: "", top: "", bottom: "", left: "" } );
						if ( options.activeClass ) { $this.removeClass( options.activeClass ); }
						$this.removeClass( 'sticky-transition' );
						$this.removeClass( 'sticky-absolute' );
					}
				} else { // auto fit
					var this_height = $this.outerHeight()
					if ( prevDataTo[i] != data.to ) {
						if ( fixedSideBottom[i] && this_height + $this.offset().top + data.pad.bottom < scrollY + window_height ) {
							fixedSideBottom[i] = false;
						}
					}
					if ( ( this_height + data.pad.top + data.pad.bottom ) > window_height || fixedSideTop[i] || fixedSideBottom[i] ) {
						var padTop = parseInt( $this.parent().parent().css( 'padding-top' ) );
						// Reset the sideSortables style when scrolling to the top.
						if ( scrollY + data.pad.top - padTop <= data.parentTop ) {
							$this.css( { position: "", top: "", bottom: "", left: "" } );
							fixedSideTop[i] = fixedSideBottom[i] = false;
							if ( options.activeClass ) { $this.removeClass( options.activeClass ); }
						} else if ( scrollY >= data.to ) {
							$this.css( {
								left: "",
								top: data.to2,
								bottom: ""
							} ).css( "position", "absolute" );
							if ( options.activeClass ) { $this.addClass( options.activeClass ); }
						} else {

							// When scrolling down.
							if ( scrollY >= lastScrollY ) {
								if ( fixedSideTop[i] ) {

									// Let it scroll.
									fixedSideTop[i] = false;
									sidebarTop = $this.offset().top - data.parentTop;

									$this.css( {
										left: "",
										top: sidebarTop,
										bottom: ""
									} ).css( "position", "absolute" );
									if ( options.activeClass ) { $this.addClass( options.activeClass ); }
								} else if ( !fixedSideBottom[i] && this_height + $this.offset().top + data.pad.bottom < scrollY + window_height ) {
									// Pin the bottom.
									fixedSideBottom[i] = true;

									!( $this.css( "position" ) == "fixed" ) && $this.css( {
										left: $this.offset().left,
										bottom: data.pad.bottom,
										top: ""
									} ).css( "position", "fixed" );
									if ( options.activeClass ) { $this.addClass( options.activeClass ); }
								}

								// When scrolling up.
							} else if ( scrollY < lastScrollY ) {
								if ( fixedSideBottom[i] ) {
									// Let it scroll.
									fixedSideBottom[i] = false;
									sidebarTop = $this.offset().top - data.parentTop;

									/*if ($this.css('position') == 'absolute' && sidebarTop > data.to2) {
										sidebarTop = data.to2;
									}*/
									$this.css( {
										left: "",
										top: sidebarTop,
										bottom: ""
									} ).css( "position", "absolute" );
									if ( options.activeClass ) { $this.addClass( options.activeClass ); }
								} else if ( !fixedSideTop[i] && $this.offset().top >= scrollY + data.pad.top ) {
									// Pin the top.
									fixedSideTop[i] = true;

									!( $this.css( "position" ) == "fixed" ) && $this.css( {
										left: $this.offset().left,
										top: data.pad.top,
										bottom: ''
									} ).css( "position", "fixed" );
									if ( options.activeClass ) { $this.addClass( options.activeClass ); }
								} else if ( !fixedSideBottom[i] && fixedSideTop[i] && $this.css( 'position' ) == 'absolute' && $this.offset().top >= scrollY + data.pad.top ) {
									fixedSideTop[i] = false;
								}
							}
						}
					} else {
						// If the sidebar container is smaller than the viewport, then pin/unpin the top when scrolling.
						if ( scrollY >= ( data.parentTop - data.pad.top ) ) {
							$this.css( {
								position: 'fixed',
								top: data.pad.top
							} );
						} else {
							$this.css( { position: "", top: "", bottom: "", left: "" } );
							if ( options.activeClass ) { $this.removeClass( options.activeClass ); }
						}

						fixedSideTop[i] = fixedSideBottom[i] = false;
					}
				}

				prevDataTo[i] = data.to;
			}

			lastScrollY = scrollY;
		};

		var update = function() { recalculateLimits(); onScroll(); },
			r_timer = null;

		this.each( function() {
			var $this = $( this ),
				data = $this.data( 'themePin' ) || {};

			if ( data && data.update ) { return; }
			elements.push( $this );
			$( "img", this ).one( "load", function() {
				if ( r_timer ) {
					theme.deleteTimeout( r_timer );
				}
				r_timer = theme.requestFrame( recalculateLimits );
			} );
			data.update = update;
			$this.data( 'themePin', data );
			fixedSideTop.push( false );
			fixedSideBottom.push( false );
			prevDataTo.push( 0 );
		} );

		//$window.on( 'touchmove', onScroll );
		window.addEventListener( 'touchmove', onScroll, { passive: true } );
		window.addEventListener( 'scroll', onScroll, { passive: true } );
		recalculateLimits();

		if ( !theme.isLoaded ) {
			$window.on( 'load', update );
		} else {
			update();
		}

		$( this ).on( 'recalc.pin', function() {
			recalculateLimits();
			onScroll();
		} );

		return this;
	};

	theme = theme || {};

	var instanceName = '__sticky';

	var Sticky = function( $el, opts ) {
		return this.initialize( $el, opts );
	};

	Sticky.defaults = {
		autoInit: false,
		minWidth: 767,
		activeClass: 'sticky-active',
		padding: {
			top: 0,
			bottom: 0
		},
		offsetTop: 0,
		offsetBottom: 0,
		autoFit: false,
		fitToBottom: false,
		stickyOffset: 0
	};

	Sticky.prototype = {
		initialize: function( $el, opts ) {
			if ( $el.data( instanceName ) ) {
				return this;
			}

			this.$el = $el;

			this
				.setData()
				.setOptions( opts )
				.build();

			return this;
		},

		setData: function() {
			this.$el.data( instanceName, this );

			return this;
		},

		setOptions: function( opts ) {
			this.options = $.extend( true, {}, Sticky.defaults, opts, {
				wrapper: this.$el
			} );

			return this;
		},

		build: function() {
			if ( !$.fn.themePin ) {
				return this;
			}

			var self = this,
				$el = this.options.wrapper,
				stickyResizeTrigger;

			if ( $el.hasClass( 'porto-sticky-nav' ) ) {
				this.options.padding.top = ( theme.StickyHeader.sticky_height ? theme.StickyHeader.sticky_height : 0 ) + theme.adminBarHeight();
				this.options.activeClass = 'sticky-active';
				this.options.containerSelector = '.main-content-wrap';
				theme.sticky_nav_height = $el.outerHeight();
				if ( this.options.minWidth > window.innerWidth )
					theme.sticky_nav_height = 0;

				var porto_progress_obj = $( '.porto-scroll-progress.fixed-top:not(.fixed-under-header)' );
				if ( porto_progress_obj.length ) {
					var flag = false;
					if ( porto_progress_obj.is( ':hidden' ) ) {
						porto_progress_obj.show();
						flag = true;
					}
					if ( flag ) {
						porto_progress_obj.hide();
					}
				}

				var offset = theme.adminBarHeight() + ( theme.StickyHeader.sticky_height ? theme.StickyHeader.sticky_height : 0 ) - 1,
				$transitionOffset = ( offset > 100 ) ? offset : 100;

				this.options.stickyOffset = theme.sticky_nav_height + $transitionOffset;
				var init_filter_widget_sticky = function() {
					var prevScrollPos = $el.data('prev-pos') ? $el.data('prev-pos') : 0,
						scrollUpOffset = 0,
						objHeight = $el.outerHeight() + parseInt( $el.css( 'margin-bottom' ) ),
						scrollTop = $( window ).scrollTop();
					
					if ( $( '.page-wrapper' ).hasClass( 'sticky-scroll-up' ) ) {
						if ( scrollTop > prevScrollPos ) {
							$el.addClass('scroll-down');
						} else {
							$el.removeClass('scroll-down');
						}

						// Header is scroll-up Sticky Type
						scrollUpOffset = - theme.StickyHeader.sticky_height;
						if ( 'undefined' == typeof ( theme.StickyHeader.sticky_height ) ) {
							$el.data( 'prev-pos', 0 );
						} else {
							// The transition of Sticky isn't working in this area
							if ( $el.parent().offset().top + objHeight + $transitionOffset < scrollTop + offset + scrollUpOffset ) {
								$el.addClass( 'sticky-ready' );
							} else {
								$el.removeClass( 'sticky-ready' );
							}
							$el.data( 'prev-pos', scrollTop );
						}
					}
				}
				
				if ( this.options.minWidth <= window.innerWidth ) {
					window.removeEventListener( 'scroll', init_filter_widget_sticky );
					window.addEventListener( 'scroll', init_filter_widget_sticky, { passive: true } );
					init_filter_widget_sticky();
				}
			}

			$el.themePin( this.options );

			$( window ).smartresize( function() {
				if ( stickyResizeTrigger ) {
					clearTimeout( stickyResizeTrigger );
				}
				stickyResizeTrigger = setTimeout( function() {
					$el.trigger( 'recalc.pin' );
				}, 800 );

				var $parent = $el.parent();

				$el.outerWidth( $parent.width() );
				if ( $el.css( 'position' ) == 'fixed' ) {
					$el.css( 'left', $parent.offset().left );
				}

				if ( $el.hasClass( 'porto-sticky-nav' ) ) {
					theme.sticky_nav_height = $el.outerHeight();
					if ( self.options.minWidth > window.innerWidth )
						theme.sticky_nav_height = 0;
				}
			} );

			return this;
		}
	};

	// expose to scope
	$.extend( theme, {
		Sticky: Sticky
	} );

	// jquery plugin
	$.fn.themeSticky = function( opts ) {
		return this.map( function() {
			var $this = $( this );
			if ( $this.data( instanceName ) ) {
				$this.trigger( 'recalc.pin' );
				setTimeout( function() {
					$this.trigger( 'recalc.pin' );
				}, 800 );

				return $this.data( instanceName );
			} else {
				return new theme.Sticky( $this, opts );
			}

		} );
	}

} ).apply( this, [window.theme, jQuery] );


// Mobile Panel
( function( theme, $ ) {
	'use strict';

	$( function() {
		$( document.body ).on( 'click', '.mobile-toggle', function( e ) {
			var $nav_panel = $( '#nav-panel' );
			if ( $nav_panel.length > 0 ) {
				if ( $( this ).closest( '.header-main' ).length && $nav_panel.closest( '.header-builder-p' ).length && !$nav_panel.parent( '.header-main' ).length ) {
					$nav_panel.appendTo( $( this ).closest( '.header-main' ) );
				} else if ( $( this ).closest( '.header-main' ).length && $nav_panel.closest( '.wp-block-template-part' ).length ) {
					$nav_panel.insertAfter( $( this ).closest( '.header-main' ) );
				}

				if ( $nav_panel.is( ':visible' ) && $( '#header' ).hasClass( 'sticky-header' ) ) {
					var h_h = $( '#header' ).height(), p_h = $nav_panel.outerHeight();
					if ( h_h > p_h + 30 ) {
						$( '#header' ).css( 'height', h_h - p_h );
					}
				}
				$nav_panel.stop().slideToggle();
			} else if ( $( '#side-nav-panel' ).length > 0 ) {
				$( 'html' ).toggleClass( 'panel-opened' );
				$( '.panel-overlay' ).toggleClass( 'active' );
				if ( $( '#side-nav-panel' ).hasClass( 'panel-right' ) ) {
					$( 'html' ).addClass( 'panel-right-opened' );
				}
			}
			if ( $( '#nav-panel .skeleton-body, #side-nav-panel .skeleton-body' ).length ) {
				theme.lazyload_menu( 1, 'mobile_menu' );
			}
			e.preventDefault();
		} );

		$( document.body ).on( 'click', '.panel-overlay', function() {
			$( 'html' ).css( 'transition', 'margin .3s' ).removeClass( 'panel-opened' ).removeClass( 'panel-right-opened' );
			theme.requestTimeout( function() {
				$( 'html' ).css( 'transition', '' );
			}, 260 );
			$( this ).removeClass( 'active' );
		} );

		$( document.body ).on( 'click', '.side-nav-panel-close', function( e ) {
			e.preventDefault();
			$( '.panel-overlay' ).trigger( 'click' );
		} );

		$( document.body ).on( 'click', '#side-nav-panel .mobile-tab-items .nav-item', function( e ) {
			e.preventDefault();
			var $this = $( this ),
				$id = $this.attr('pane-id'),
				$parent = $this.closest('.mobile-tabs');
			
			if ( $id ) {
				$parent.find('.active').removeClass( 'active' );
				$this.addClass('active');
				$parent.find('.mobile-tab-content [tab-id="' + $id + '"]').addClass( 'active' );
			}
		} );

		$( window ).on( 'resize', function() {
			if ( window.innerWidth > 991 ) {
				$( '#nav-panel' ).hide();
				if ( $( 'html' ).hasClass( 'panel-opened' ) ) {
					$( '.panel-overlay' ).trigger( 'click' );
				}
			}
		} );
	} );

} ).apply( this, [window.theme, jQuery] );

// Scroll to Top

//** jQuery Scroll to Top Control script- (c) Dynamic Drive DHTML code library: http://www.dynamicdrive.com.
//** Available/ usage terms at http://www.dynamicdrive.com (March 30th, 09')
//** v1.1 (April 7th, 09'):
//** 1) Adds ability to scroll to an absolute position (from top of page) or specific element on the page instead.
//** 2) Fixes scroll animation not working in Opera. 


var scrolltotop = {
	//startline: Integer. Number of pixels from top of doc scrollbar is scrolled before showing control
	//scrollto: Keyword (Integer, or "Scroll_to_Element_ID"). How far to scroll document up when control is clicked on (0=top).
	setting: { startline: 100, scrollto: 0, scrollduration: 1000, fadeduration: [500, 100] },
	controlHTML: '<img src="assets/img/up.png" style="width:40px; height:40px" />', //HTML for control, which is auto wrapped in DIV w/ ID="topcontrol"
	controlattrs: { offsetx: 10, offsety: 10 }, //offset of control relative to right/ bottom of window corner
	anchorkeyword: '#top', //Enter href value of HTML anchors on the page that should also act as "Scroll Up" links

	state: { isvisible: false, shouldvisible: false },

	scrollup: function() {
		if ( !this.cssfixedsupport ) //if control is positioned using JavaScript
			this.$control.css( { opacity: 0 } ); //hide control immediately after clicking it
		var dest = isNaN( this.setting.scrollto ) ? this.setting.scrollto : parseInt( this.setting.scrollto );
		if ( typeof dest == "string" && jQuery( '#' + dest ).length == 1 ) //check element set by string exists
			dest = jQuery( '#' + dest ).offset().top;
		else
			dest = 0;
		this.$body.stop().animate( { scrollTop: dest }, this.setting.scrollduration );
	},

	keepfixed: function() {
		var $window = jQuery( window );
		var controlx = $window.scrollLeft() + $window.width() - this.$control.width() - this.controlattrs.offsetx;
		var controly = $window.scrollTop() + $window.height() - this.$control.height() - this.controlattrs.offsety;
		this.$control.css( { left: controlx + 'px', top: controly + 'px' } );
	},

	togglecontrol: function() {
		var scrolltop = jQuery( window ).scrollTop();
		if ( !this.cssfixedsupport )
			this.keepfixed();
		this.state.shouldvisible = ( scrolltop >= this.setting.startline ) ? true : false;
		if ( this.state.shouldvisible && !this.state.isvisible ) {
			this.$control.stop().animate( { opacity: 1 }, this.setting.fadeduration[0] );
			this.state.isvisible = true;
		}
		else if ( this.state.shouldvisible == false && this.state.isvisible ) {
			this.$control.stop().animate( { opacity: 0 }, this.setting.fadeduration[1] );
			this.state.isvisible = false;
		}
	},

	init: function() {
		jQuery( document ).ready( function( $ ) {
			var mainobj = scrolltotop;
			var iebrws = document.all;
			mainobj.cssfixedsupport = !iebrws || iebrws && document.compatMode == "CSS1Compat" && window.XMLHttpRequest //not IE or IE7+ browsers in standards mode
			mainobj.$body = ( window.opera ) ? ( document.compatMode == "CSS1Compat" ? $( 'html' ) : $( 'body' ) ) : $( 'html,body' );
			mainobj.$control = $( '<div id="topcontrol">' + mainobj.controlHTML + '</div>' )
				.css( { position: mainobj.cssfixedsupport ? 'fixed' : 'absolute', bottom: mainobj.controlattrs.offsety, opacity: 0, cursor: 'pointer' } )
				.attr( { title: '' } )
				.on( 'click', function() { mainobj.scrollup(); return false; } )
				.appendTo( 'body' );
			if ( document.all && !window.XMLHttpRequest && mainobj.$control.text() != '' ) //loose check for IE6 and below, plus whether control contains any text
				mainobj.$control.css( { width: mainobj.$control.width() } ); //IE6- seems to require an explicit width on a DIV containing text
			mainobj.togglecontrol();
			$( 'a[href="' + mainobj.anchorkeyword + '"]' ).on( 'click', function() {
				mainobj.scrollup();
				return false;
			} );
			$( window ).on( 'scroll resize', function( e ) {
				mainobj.togglecontrol();
			} );
		} );
	}
};

//scrolltotop.init()

( function( theme, $ ) {
	'use strict';
	theme = theme || {};

	$.extend( theme, {

		ScrollToTop: {

			defaults: {
				html: '<i class="fas fa-chevron-up"></i>',
				offsetx: 10,
				offsety: 0
			},

			initialize: function( html, offsetx, offsety ) {
				if ( $( '#topcontrol' ).length ) {
					return this;
				}
				this.html = ( html || this.defaults.html );
				this.offsetx = ( offsetx || this.defaults.offsetx );
				this.offsety = ( offsety || this.defaults.offsety );

				this.build();

				return this;
			},

			build: function() {
				var self = this;

				if ( typeof scrolltotop !== 'undefined' ) {
					// scroll top control
					scrolltotop.controlHTML = self.html;
					scrolltotop.controlattrs = { offsetx: self.offsetx, offsety: self.offsety };
					scrolltotop.init();
				}

				return self;
			}
		}

	} );

} ).apply( this, [window.theme, jQuery] );


// Mega Menu
( function( theme, $ ) {
	'use strict';

	theme = theme || {};

	$.extend( theme, {

		MegaMenu: {

			defaults: {
				menu: $( '.mega-menu' )
			},

			initialize: function( $menu ) {
				this.$menu = ( $menu || this.defaults.menu );

				this.events(); // Include the build function

				return this;
			},

			popupWidth: function() {
				var winWidth = window.innerWidth,
					popupWidth = theme.bodyWidth - theme.grid_gutter_width * 2;
				if ( !$( 'body' ).hasClass( 'wide' ) ) {
					if ( winWidth >= 1140 + theme.grid_gutter_width && winWidth <= theme.container_width + 2 * theme.grid_gutter_width - 1 && theme.container_width >= 1360 )
						popupWidth = 1140 - theme.grid_gutter_width;
					else if ( winWidth >= theme.container_width + theme.grid_gutter_width - 1 )
						popupWidth = theme.container_width - theme.grid_gutter_width;
					else if ( winWidth >= 992 )
						popupWidth = 960 - theme.grid_gutter_width;
					else if ( winWidth >= 768 )
						popupWidth = 720 - theme.grid_gutter_width;
				}
				return popupWidth;
			},

			calcMenuPosition: function( menu_obj, is_left ) {
				var menu = menu_obj,
					$menuWrap;
				
				if ( $( menu ).closest( '.elementor-top-section' ).length ) {
					// Elementor Section
					$menuWrap = $( menu ).closest( '.elementor-top-section' );
				} else if ( $( menu ).closest( '.e-con.e-parent' ).length ) {
					// Elementor Container
					$menuWrap = $( menu ).closest( '.e-con.e-parent' );
				} else if ( $( menu ).closest( '.e-con' ).length ) {
					// Elementor Container
					$menuWrap = $( menu ).closest( '.e-con' );
				} else if ( $( menu ).closest( '.header-main' ).length ) {
					// Header Type
					$menuWrap = $( menu ).closest( '.header-main' );
				} else if ( $( menu ).closest( '.main-menu-wrap' ).length ) {
					// Customize header builder & header type
					$menuWrap = $( menu ).closest( '.main-menu-wrap' );
				} else if ( $( menu ).closest( '.header-top' ).length ) {
					// Customize header builder
					$menuWrap = $( menu ).closest( '.header-top' );
				} else if ( $( menu ).closest( '.header-bottom' ).length ) {
					// Customize header builder
					$menuWrap = $( menu ).closest( '.header-bottom' );
				} else {
					// Built with WPBakery
					$menuWrap = $( menu ).closest( '.top-row' );
				}

				var $headerContainer = $menuWrap;
				var ctSpacing        = 0;
				if ( $menuWrap.children( '.elementor-container' ).length ) {
					$headerContainer = $menuWrap.children( '.elementor-container' );
				} else if ( $menuWrap.find( '.container-fluid' ).length ) {
					$headerContainer = $menuWrap.find( '.container-fluid' );
				} else if ( $menuWrap.find( '.container' ).length ) {
					$headerContainer = $menuWrap.find( '.container' );
				} else if ( $menuWrap.find( '.e-con-inner' ).length ) {
					$headerContainer = $menuWrap.find( '.e-con-inner' );
				} else if ( $menuWrap.find( '.vc_column_container' ).length ) {
					ctSpacing = 2 * parseInt( $menuWrap.find( '.vc_column_container' ).css( 'padding-left' ) );
					// $headerContainer = $menuWrap.find( '.vc_column_container' );
				}

				if ( $headerContainer.length >= 1 ) {
					var isParent = false;
					$headerContainer.each( function () {
						var $this = $(this);
						if ( $this.find( menu ).length && ! isParent ) {
							$headerContainer = $this;
							isParent = true;
						}
					} );
					if ( ! isParent ) {
						$headerContainer = $menuWrap;
					}
				}
				if ( ! $headerContainer.length ) {
					return;
				}

				var menuContainerWidth = $headerContainer.outerWidth() - parseInt( $headerContainer.css( 'padding-left' ) ) - parseInt( $headerContainer.css( 'padding-right' ) ) - ctSpacing;
				if ( menuContainerWidth < 900 ) return;
				if ( menu.parent().hasClass( 'pos-fullwidth' ) ) {
					menu.get( 0 ).style.width = menuContainerWidth + 'px';
				}
				var browserWidth = document.body.offsetWidth,
					menuLeftPos = menu.offset().left - ( ( browserWidth - menuContainerWidth ) / 2 ),
					l = false;

				if ( 'center' == is_left ) {
					var remainWidth = menuContainerWidth - ( menuLeftPos + menu.width() );
					if ( remainWidth <= 0 ) {
						l = remainWidth;
					} else if ( menuLeftPos <= 0 ) {
						l = -menuLeftPos;
					}
				} else if ( 'justify' == is_left ) {
					if ( window.theme.rtl ) {
						menuLeftPos = browserWidth - ( menu.offset().left + menu.outerWidth() ) - ( browserWidth - menuContainerWidth ) / 2;
					}
					var menuWidth = menu.width(),
						remainWidth = menuContainerWidth - ( menuLeftPos + menuWidth );
					if ( menuLeftPos > remainWidth && menuLeftPos < menuWidth ) {
						l = ( menuLeftPos + remainWidth ) / 3;
					}
					if ( remainWidth <= 0 ) {
						l = -remainWidth;
					}
				} else if ( false !== is_left ) {
					var remainWidth = menuContainerWidth - ( menuLeftPos + menu.width() );
					if ( remainWidth <= 0 ) {
						l = -remainWidth;
					}
				} else if ( menuLeftPos <= 0 ) {
					l = -menuLeftPos;
				}
				return l;
			},

			build: function( $menu ) {
				var self = this;
				if ( !$menu ) {
					$menu = self.$menu;
				}

				$menu.each( function() {
					var $menu = $( this ),
						$menu_container = $menu.closest( '.container' ),
						container_width = self.popupWidth();
					if ( $menu.closest( '.porto-popup-menu' ).length ) {
						return false;
					}

					var $menu_items = $menu.children( 'li.has-sub' );

					$menu_items.each( function() {
						var $menu_item = $( this ),
							$popup = $menu_item.children( '.popup' );
						if ( $popup.length ) {
							var popup_obj = $popup.get( 0 );
							popup_obj.style.display = 'block';
							if ( $menu_item.hasClass( 'wide' ) ) {
								popup_obj.style.left = 0;
								var padding = parseInt( $popup.css( 'padding-left' ) ) + parseInt( $popup.css( 'padding-right' ) ) +
									parseInt( $popup.find( '> .inner' ).css( 'padding-left' ) ) + parseInt( $popup.find( '> .inner' ).css( 'padding-right' ) );

								var row_number = 4;

								if ( $menu_item.hasClass( 'col-1' ) ) row_number = 1;
								if ( $menu_item.hasClass( 'col-2' ) ) row_number = 2;
								if ( $menu_item.hasClass( 'col-3' ) ) row_number = 3;
								if ( $menu_item.hasClass( 'col-4' ) ) row_number = 4;
								if ( $menu_item.hasClass( 'col-5' ) ) row_number = 5;
								if ( $menu_item.hasClass( 'col-6' ) ) row_number = 6;

								if ( window.innerWidth < 992 )
									row_number = 1;

								var col_length = 0;
								$popup.find( '> .inner > ul > li' ).each( function() {
									var cols = parseFloat( $( this ).attr( 'data-cols' ) );
									if ( cols <= 0 || !cols )
										cols = 1;

									if ( cols > row_number )
										cols = row_number;

									col_length += cols;
								} );

								if ( col_length > row_number ) col_length = row_number;

								var popup_max_width = $popup.data( 'popup-mw' ) ? $popup.data( 'popup-mw' ) : $popup.find( '.inner' ).css( 'max-width' ),
									col_width = container_width / row_number;
								if ( 'none' !== popup_max_width && parseInt( popup_max_width ) < container_width ) {
									col_width = parseInt( popup_max_width ) / row_number;
								}

								$popup.find( '> .inner > ul > li' ).each( function() {
									var cols = parseFloat( $( this ).data( 'cols' ) );
									if ( cols <= 0 )
										cols = 1;

									if ( cols > row_number )
										cols = row_number;

									if ( $menu_item.hasClass( 'pos-center' ) || $menu_item.hasClass( 'pos-left' ) || $menu_item.hasClass( 'pos-right' ) )
										this.style.width = ( 100 / col_length * cols ) + '%';
									else
										this.style.width = ( 100 / row_number * cols ) + '%';
								} );

								if ( $menu_item.hasClass( 'pos-center' ) ) { // position center
									var width = col_width * col_length - padding;
									$popup.find( '> .inner > ul' ).get( 0 ).style.width = width + 'px';
									var left_position = ( $menu_item.outerWidth() - width ) / 2;
									popup_obj.style.left = left_position + 'px';
									popup_obj.style.right = 'auto';
									self.SetMenuPosition( popup_obj, $popup, 'center', left_position );
								} else if ( $menu_item.hasClass( 'pos-left' ) ) { // position left
									$popup.find( '> .inner > ul' ).get( 0 ).style.width = ( col_width * col_length - padding ) + 'px';
									popup_obj.style.left = '0';
									popup_obj.style.right = 'auto';
									self.SetMenuPosition( popup_obj, $popup );
								} else if ( $menu_item.hasClass( 'pos-right' ) ) { // position right
									$popup.find( '> .inner > ul' ).get( 0 ).style.width = ( col_width * col_length - padding ) + 'px';
									popup_obj.style.right = '0';
									popup_obj.style.left = 'auto';
									self.SetMenuPosition( popup_obj, $popup, false );
								} else if ( $menu_item.hasClass( 'pos-fullwidth' ) ) {
									popup_obj.style.right = 'auto';
									popup_obj.style.left = '0';
									self.SetMenuPosition( popup_obj, $popup );
								} else {
									$popup.find( '> .inner > ul' ).get( 0 ).style.width = ( container_width - padding ) + 'px';
									if ( theme.rtl ) {
										popup_obj.style.right = '0';
										popup_obj.style.left = 'auto';
									} else {
										popup_obj.style.left = '0';
										popup_obj.style.right = 'auto';
									}
									self.SetMenuPosition( popup_obj, $popup, 'justify' );
								}
							} else { // auto position
								if ( $menu_item.hasClass( 'pos-left' ) ) { // position left
									if ( $popup.offset().left + $popup.width() > window.innerWidth ) {
										$menu_item.removeClass( 'pos-left' ).addClass( 'pos-right' );
									}
								} else if ( $menu_item.hasClass( 'pos-right' ) ) { // position right
									if ( $popup.offset().left < 0 ) {
										$menu_item.removeClass( 'pos-right' ).addClass( 'pos-left' );
									}
								} else { // position justify
									if ( $popup.offset().left + $popup.width() > window.innerWidth ) {
										$menu_item.addClass( 'pos-right' );
									} else if ( $popup.find( '> .inner > ul' ).length ) {
										var $sub_menu = $popup.find( '> .inner > ul' ).eq( 0 );
										if ( $sub_menu.offset().left + $sub_menu.width() + 200 > window.innerWidth ) {
											$sub_menu.addClass( 'pos-left' );
										}
									}
								}
							}
							$menu_item.addClass( 'sub-ready' );
						}
					} );
				} );

				return self;
			},

			SetMenuPosition: function ( popup_obj, $popup, is_left = true, offsetWidth = 0 ) {
				setTimeout( () => {
					var self = this,
						left_position = self.calcMenuPosition( $popup, is_left );
						if ( 0 !== left_position ) {
							if ( 'center' == is_left ) {
								// Center
								if ( false !== left_position ) {
									popup_obj.style.left = ( offsetWidth + left_position ) + 'px';
									popup_obj.style.right = 'auto';
								}
							} else if ( 'justify' == is_left ) {
								if ( theme.rtl ) {
									popup_obj.style.left = 'auto';
									if ( left_position ) {
										popup_obj.style.right = '-' + left_position + 'px';
									} else {
										if ( ! $( 'body' ).hasClass( 'wide' ) ) {
											popup_obj.style.right = '-15px';
										} else {
											popup_obj.style.right = '0';
										}
									}
								} else {
									popup_obj.style.right = 'auto';
									if ( left_position ) {
										popup_obj.style.left = '-' + left_position + 'px';
									} else {
										if ( ! $( 'body' ).hasClass( 'wide' ) ) {
											popup_obj.style.left = '-15px';
										} else {
											popup_obj.style.left = '0';
										}
									}
								}
							} else {
								if ( is_left ) {
									popup_obj.style.right = 'auto';
									if ( false !== left_position ) {
										popup_obj.style.left = '-' + left_position + 'px';
									} else {
										if ( ! $( 'body' ).hasClass( 'wide' ) ) {
											popup_obj.style.left = '-15px';
										} else {
											popup_obj.style.left = '0';
										}
									}
								} else {
									popup_obj.style.left = 'auto';
									if ( false !== left_position ) {
										popup_obj.style.right = '-' + left_position + 'px';
									} else {
										if ( ! $( 'body' ).hasClass( 'wide' ) ) {
											popup_obj.style.right = '-15px';
										} else {
											popup_obj.style.right = '0';
										}
									}
								}
							}
						}
						$popup.parent().addClass( 'loaded' );
				} );
			},

			events: function() {
				var self = this;

				$( window ).smartresize( function( e ) {
					if ( e.originalEvent ) {
						self.build();
					}
				} );

				if ( theme.isLoaded ) {
					theme.requestFrame( function() {
						self.build();
					} );
				} else {
					$( window ).on( 'load', function() {
						theme.requestFrame( function() {
							self.build();
						} );
					} );
				}

				if ( self.$menu.length ) {
					self.$menu.on( 'mouseenter', '.menu-item.has-sub', function( e ) {
						var $thePopup = $( e.currentTarget ).find( '>.popup' );
						if ( $thePopup.find( '.owl-carousel:not(.owl-loaded)' ).length == 0 ) {
							return;
						}
						$thePopup.find( '.owl-carousel:not(.owl-loaded)' ).each( function() {
							var $this = $( this ),
								opts;
							if ( ! $this.hasClass( 'owl-loaded' ) ) {
								var pluginOptions = $this.data( 'plugin-options' );
								if ( pluginOptions )
									opts = pluginOptions;
								if ( $.fn.themeCarousel ) {
									$this.themeCarousel( opts );
								}
							}
						});
					});
				}
				return self;
			}
		}

	} );

} ).apply( this, [window.theme, jQuery] );


// Sticky Header
( function( theme, $ ) {
	'use strict';

	theme = theme || {};

	$.extend( theme, {

		StickyHeader: {

			defaults: {
				header: $( '#header' )
			},

			initialize: function( $header ) {
				this.$header = ( $header || this.defaults.header );
				this.sticky_height = 0;
				this.sticky_pos = 0;
				this.change_logo = theme.change_logo;

				if ( !theme.show_sticky_header || !this.$header.length || $( '.side-header-narrow-bar' ).length )
					return this;

				var self = this;

				var $menu_wrap = self.$header.find( '> .main-menu-wrap' );
				if ( $menu_wrap.length ) {
					self.$menu_wrap = $menu_wrap;
					self.menu_height = $menu_wrap.height();
				} else {
					self.$menu_wrap = false;
				}

				self.$header_main = self.$header.find( '.header-main' );

				if ( self.$header_main.length > 1 ) {
					self.$header_main = $( self.$header_main[0] );
				}

				// fix compatibility issue with Elementor pro header builder
				if ( !self.$header_main.length && self.$header.children( '.elementor-location-header' ).length ) {
					self.$header_main = self.$header.children( '.elementor-location-header' ).last().addClass( 'header-main' );
				}

				if ( !self.$header_main.length ) {
					return this;
				}

				self.reveal = self.$header.parents( '.header-wrapper' ).hasClass( 'header-reveal' );

				self.is_sticky = false;

				self.reset()
					.build()
					.events();

				return self;
			},

			build: function() {
				var self = this;

				if ( !self.is_sticky && ( window.innerHeight + self.header_height + theme.adminBarHeight() + parseInt( self.$header.css( 'border-top-width' ) ) >= $( document ).height() ) ) {
					return self;
				}

				if ( window.innerHeight > $( document.body ).height() )
					window.scrollTo( 0, 0 );

				var scroll_top = $( window ).scrollTop(),
					$pageWrapper = $( '.page-wrapper' );

				if ( self.$menu_wrap && !theme.isTablet() ) {

					self.$header_main.stop().css( 'top', 0 );

					if ( self.$header.parent().hasClass( 'fixed-header' ) )
						self.$header.parent().attr( 'style', '' );

					// Scroll Up - Header Type
					if ( $( '.page-wrapper' ).hasClass( 'sticky-scroll-up' ) ) {
						scroll_top -= self.sticky_height;
						if ( scroll_top > self.sticky_pos + 100 ) {
							self.$header.addClass( 'sticky-ready' );
						} else {
							self.$header.removeClass( 'sticky-ready' );
						}
					}
					if ( scroll_top > self.sticky_pos ) {
						if ( !self.$header.hasClass( 'sticky-header' ) && ( ! $pageWrapper.hasClass( 'sticky-scroll-up' ) || ( $pageWrapper.hasClass( 'sticky-scroll-up' ) && 'undefined' !== typeof ( $pageWrapper.data( 'prev-scrollpos' ) ) ) ) ) {
							var header_height = self.$header.outerHeight();
							self.$header.addClass( 'sticky-header' ).css( 'height', header_height );
							self.$menu_wrap.stop().css( 'top', theme.adminBarHeight() );

							var selectric = self.$header.find( '.header-main .searchform select' ).data( 'selectric' );
							if ( selectric && typeof selectric.close != 'undefined' )
								selectric.close();

							if ( self.$header.parent().hasClass( 'fixed-header' ) ) {
								self.$header_main.hide();
								self.$header.css( 'height', '' );
							}

							if ( !self.init_toggle_menu ) {
								self.init_toggle_menu = true;
								theme.MegaMenu.build();
								if ( $( '#main-toggle-menu' ).length ) {
									if ( $( '#main-toggle-menu' ).hasClass( 'show-always' ) ) {
										$( '#main-toggle-menu' ).data( 'show-always', true );
										$( '#main-toggle-menu' ).removeClass( 'show-always' );
									}
									$( '#main-toggle-menu' ).addClass( 'closed' );
									$( '#main-toggle-menu .menu-title' ).addClass( 'closed' );
									$( '#main-toggle-menu .toggle-menu-wrap' ).attr( 'style', '' );
								}
							}
							self.is_sticky = true;
						}
					} else {
						if ( self.$header.hasClass( 'sticky-header' ) ) {
							self.$header.removeClass( 'sticky-header' );
							self.$header.css( 'height', '' );
							self.$menu_wrap.stop().css( 'top', 0 );
							self.$header_main.show();

							var selectric = self.$header.find( '.main-menu-wrap .searchform select' ).data( 'selectric' );
							if ( selectric && typeof selectric.close != 'undefined' )
								selectric.close();

							if ( self.init_toggle_menu ) {
								self.init_toggle_menu = false;
								theme.MegaMenu.build();
								if ( $( '#main-toggle-menu' ).length ) {
									if ( $( '#main-toggle-menu' ).data( 'show-always' ) ) {
										$( '#main-toggle-menu' ).addClass( 'show-always' );
										$( '#main-toggle-menu' ).removeClass( 'closed' );
										$( '#main-toggle-menu .menu-title' ).removeClass( 'closed' );
										$( '#main-toggle-menu .toggle-menu-wrap' ).attr( 'style', '' );
									}
								}
							}
							self.is_sticky = false;
						}
					}
				} else {
					self.$header_main.show();
					if ( self.$header.parent().hasClass( 'fixed-header' ) && $( '#wpadminbar' ).length && $( '#wpadminbar' ).css( 'position' ) == 'absolute' ) {
						// self.$header.parent().css( 'top', ( $( '#wpadminbar' ).height() - scroll_top ) < 0 ? -$( '#wpadminbar' ).height() : -scroll_top );
					} else if ( self.$header.parent().hasClass( 'fixed-header' ) ) {
						self.$header.parent().attr( 'style', '' );
					} else {
						if ( self.$header.parent().hasClass( 'fixed-header' ) )
							self.$header.parent().attr( 'style', '' );
					}
					if ( self.$header.hasClass( 'sticky-menu-header' ) && !theme.isTablet() ) {
						self.$header_main.stop().css( 'top', 0 );
						if ( self.change_logo ) self.$header_main.removeClass( 'change-logo' );
						self.$header_main.removeClass( 'sticky' );
						self.$header.removeClass( 'sticky-header' );
						self.is_sticky = false;
						self.sticky_height = 0;
					} else {
						if ( self.$menu_wrap )
							self.$menu_wrap.stop().css( 'top', 0 );
						if ( $pageWrapper.hasClass( 'sticky-scroll-up' ) ) {
							scroll_top -= self.sticky_height;
							if ( scroll_top > self.sticky_pos + 100 ) {
								self.$header.addClass( 'sticky-ready' );
							} else {
								self.$header.removeClass( 'sticky-ready' );
							}
						}
						if ( scroll_top > self.sticky_pos && ( !theme.isTablet() || ( theme.isTablet() && ( !theme.isMobile() && theme.show_sticky_header_tablet ) || ( theme.isMobile() && theme.show_sticky_header_tablet && theme.show_sticky_header_mobile ) ) ) ) {
							if ( ! self.$header.hasClass( 'sticky-header' ) && ( ! $pageWrapper.hasClass( 'sticky-scroll-up' ) || ( $pageWrapper.hasClass( 'sticky-scroll-up' ) && 'undefined' !== typeof ( $pageWrapper.data( 'prev-scrollpos' ) ) ) ) ) {
								var header_height = self.$header.outerHeight();
								self.$header.addClass( 'sticky-header' ).css( 'height', header_height );
								self.$header_main.addClass( 'sticky' );
								if ( self.change_logo ) self.$header_main.addClass( 'change-logo' );
								self.$header_main.stop().css( 'top', theme.adminBarHeight() );

								if ( !self.init_toggle_menu ) {
									self.init_toggle_menu = true;
									theme.MegaMenu.build();
									if ( $( '#main-toggle-menu' ).length ) {
										if ( $( '#main-toggle-menu' ).hasClass( 'show-always' ) ) {
											$( '#main-toggle-menu' ).data( 'show-always', true );
											$( '#main-toggle-menu' ).removeClass( 'show-always' );
										}
										$( '#main-toggle-menu' ).addClass( 'closed' );
										$( '#main-toggle-menu .menu-title' ).addClass( 'closed' );
										$( '#main-toggle-menu .toggle-menu-wrap' ).attr( 'style', '' );
									}
								}
								self.is_sticky = true;
							}
						} else {
							if ( self.$header.hasClass( 'sticky-header' ) ) {
								if ( self.change_logo ) self.$header_main.removeClass( 'change-logo' );
								self.$header_main.removeClass( 'sticky' );
								self.$header.removeClass( 'sticky-header' );
								self.$header.css( 'height', '' );
								self.$header_main.stop().css( 'top', 0 );

								if ( self.init_toggle_menu ) {
									self.init_toggle_menu = false;
									theme.MegaMenu.build();
									if ( $( '#main-toggle-menu' ).length ) {
										if ( $( '#main-toggle-menu' ).data( 'show-always' ) ) {
											$( '#main-toggle-menu' ).addClass( 'show-always' );
											$( '#main-toggle-menu' ).removeClass( 'closed' );
											$( '#main-toggle-menu .menu-title' ).removeClass( 'closed' );
											$( '#main-toggle-menu .toggle-menu-wrap' ).attr( 'style', '' );
										}
									}
								}
								self.is_sticky = false;
							}
						}
					}
				}

				if ( !self.$header.hasClass( 'header-loaded' ) )
					self.$header.addClass( 'header-loaded' );

				if ( !self.$header.find( '.logo' ).hasClass( 'logo-transition' ) )
					self.$header.find( '.logo' ).addClass( 'logo-transition' );

				if ( self.$header.find( '.overlay-logo' ).get( 0 ) && !self.$header.find( '.overlay-logo' ).hasClass( 'overlay-logo-transition' ) )
					self.$header.find( '.overlay-logo' ).addClass( 'overlay-logo-transition' );

				return self;
			},

			reset: function() {
				var self = this;

				if ( self.$header.find( '.logo' ).hasClass( 'logo-transition' ) )
					self.$header.find( '.logo' ).removeClass( 'logo-transition' );

				if ( self.$header.find( '.overlay-logo' ).get( 0 ) && self.$header.find( '.overlay-logo' ).hasClass( 'overlay-logo-transition' ) )
					self.$header.find( '.overlay-logo' ).removeClass( 'overlay-logo-transition' );

				if ( self.$menu_wrap && !theme.isTablet() ) {
					// show main menu
					self.$header.addClass( 'sticky-header sticky-header-calc' );
					self.$header_main.addClass( 'sticky' );
					if ( self.change_logo ) self.$header_main.addClass( 'change-logo' );
					self.sticky_height = self.$menu_wrap.height() + parseInt( self.$menu_wrap.css( 'padding-top' ) ) + parseInt( self.$menu_wrap.css( 'padding-bottom' ) );

					if ( self.change_logo ) self.$header_main.removeClass( 'change-logo' );
					self.$header_main.removeClass( 'sticky' );
					self.$header.removeClass( 'sticky-header sticky-header-calc' );
					self.header_height = self.$header.height() + parseInt( self.$header.css( 'margin-top' ) );
					self.menu_height = self.$menu_wrap.height() + parseInt( self.$menu_wrap.css( 'padding-top' ) ) + parseInt( self.$menu_wrap.css( 'padding-bottom' ) );

					self.sticky_pos = ( self.header_height - self.sticky_height ) + parseInt( $( 'body' ).css( 'padding-top' ) ) + parseInt( self.$header.css( 'border-top-width' ) );
					if ( $( '.banner-before-header' ).length ) {
						self.sticky_pos += $( '.banner-before-header' ).height();
					}
					if ( $( '.porto-block-html-top' ).length ) {
						self.sticky_pos += $( '.porto-block-html-top' ).height();
					}
				} else {
					// show header main
					self.$header.addClass( 'sticky-header sticky-header-calc' );
					self.$header_main.addClass( 'sticky' );
					if ( self.change_logo ) self.$header_main.addClass( 'change-logo' );
					self.sticky_height = self.$header_main.outerHeight();

					if ( self.change_logo ) self.$header_main.removeClass( 'change-logo' );
					self.$header_main.removeClass( 'sticky' );
					self.$header.removeClass( 'sticky-header sticky-header-calc' );
					self.header_height = self.$header.height() + parseInt( self.$header.css( 'margin-top' ) );
					self.main_height = self.$header_main.height();

					if ( !( !theme.isTablet() || ( theme.isTablet() && !theme.isMobile() && theme.show_sticky_header_tablet ) || ( theme.isMobile() && theme.show_sticky_header_tablet && theme.show_sticky_header_mobile ) ) ) {
						self.sticky_height = 0;
					}

					/*if (self.$header_main.length && self.$header.length) {
						self.sticky_pos = self.$header_main.offset().top - self.$header.offset().top + $('.banner-before-header').height() + parseInt($('body').css('padding-top')) + parseInt(self.$header.css('border-top-width'));
					} else {
						self.sticky_pos = $('.banner-before-header').height() + parseInt($('body').css('padding-top')) + parseInt(self.$header.css('border-top-width'));
					}
					if (theme.adminBarHeight() && self.$header.offset().top > theme.adminBarHeight()) {
						self.sticky_pos -= theme.adminBarHeight();
					}
					self.sticky_pos = (self.header_height - self.sticky_height) + $('.banner-before-header').height() + $('.porto-block-html-top').height() + parseInt($('body').css('padding-top')) + parseInt(self.$header.css('border-top-width'));*/
					self.sticky_pos = self.$header.offset().top + self.header_height - self.sticky_height - theme.adminBarHeight() + parseInt( self.$header.css( 'border-top-width' ) );
				}

				if ( self.reveal ) {
					if ( self.menu_height ) {
						self.sticky_pos += self.menu_height + 30;
					} else {
						self.sticky_pos += 30;
					}
				}

				if ( self.sticky_pos < 0 ) {
					self.sticky_pos = 0;
				}

				self.init_toggle_menu = false;

				self.$header_main.removeAttr( 'style' );
				if ( !theme.isTablet() && self.$header.hasClass( 'header-side' ) && typeof self.$header.attr( 'data-plugin-sticky' ) != 'undefined' ) {
					self.$header.css( 'height', '' );
				} else {
					self.$header.removeAttr( 'style' );
				}
				return self;
			},

			events: function() {
				var self = this, win_width = 0;

				$( window ).smartresize( function() {
					if ( win_width != window.innerWidth ) {
						self.reset().build();
						win_width = window.innerWidth;
					}
				} );

				var scrollEffect = function () {
					theme.requestFrame( function() {
						self.build();
						var $pageWrapper = $( '.page-wrapper' );
						if ( $pageWrapper.hasClass( 'sticky-scroll-up' ) && ! $( 'html' ).hasClass( 'porto-search-opened' ) ) {
							var prevScrollPos = 0,
								scrollTop = $( window ).scrollTop();
							if ( $pageWrapper.data( 'prev-scrollpos' ) ) {
								prevScrollPos = $pageWrapper.data( 'prev-scrollpos' );
							}
							if ( scrollTop > prevScrollPos ) {
								self.$header.addClass( 'scroll-down' );
							} else {
								self.$header.removeClass( 'scroll-down' );
							}
							$pageWrapper.data( 'prev-scrollpos', scrollTop );
						}
					} );
				}

				window.addEventListener( 'scroll', scrollEffect, { passive: true } );
				scrollEffect();
				return self;
			}
		}

	} );

} ).apply( this, [window.theme, jQuery] );

// Hash Scroll
( function( theme, $ ) {
	'use strict';

	theme = theme || {};

	$.extend( theme, {

		HashScroll: {

			initialize: function() {

				this.build()
					.events();

				return this;
			},

			build: function() {
				var self = this;

				try {
					var hash = window.location.hash;
					var target = $( hash );
					if ( target.length && !( hash == '#review_form' || hash == '#reviews' || hash.indexOf( '#comment-' ) != -1 ) ) {
						$( 'html, body' ).delay( 600 ).stop().animate( {
							scrollTop: target.offset().top - theme.StickyHeader.sticky_height - theme.adminBarHeight() - theme.sticky_nav_height + 1
						}, 600, 'easeOutQuad' );
					}

					return self;
				} catch ( err ) {
					return self;
				}
			},

			getTarget: function( href ) {
				if ( '#' == href || href.endsWith( '#' ) ) {
					return false;
				}
				var target;

				if ( href.indexOf( '#' ) == 0 ) {
					target = $( href );
				} else {
					var url = window.location.href;
					url = url.substring( url.indexOf( '://' ) + 3 );
					if ( url.indexOf( '#' ) != -1 )
						url = url.substring( 0, url.indexOf( '#' ) );
					href = href.substring( href.indexOf( '://' ) + 3 );
					href = href.substring( href.indexOf( url ) + url.length );
					if ( href.indexOf( '#' ) == 0 ) {
						target = $( href );
					}
				}
				return target;
			},

			activeMenuItem: function() {
				var self = this;

				var scroll_pos = $( window ).scrollTop();

				var $menu_items = $( '.menu-item > a[href*="#"], .porto-sticky-nav .nav > li > a[href*="#"]' );
				if ( $menu_items.length ) {
					$menu_items.each( function() {
						var $this = $( this ),
							href = $this.attr( 'href' ),
							target = self.getTarget( href );
						if ( target && target.get( 0 ) ) {
							if ( $this.parent().is( ':last-child' ) && scroll_pos + window.innerHeight >= target.offset().top + target.outerHeight() ) {
								$this.parent().siblings().removeClass( 'active' );
								$this.parent().addClass( 'active' );
							} else {
								var scroll_to = target.offset().top - theme.StickyHeader.sticky_height - theme.adminBarHeight() - theme.sticky_nav_height + 1,
									$parent = $this.parent();
								//if (scroll_to <= theme.StickyHeader.sticky_pos + theme.sticky_nav_height) {
								//scroll_to = theme.StickyHeader.sticky_pos + theme.sticky_nav_height + 1;
								//}
								if ( scroll_to <= scroll_pos + 5 ) {
									$parent.siblings().removeClass( 'active' );
									$parent.addClass( 'active' );
									if ( $parent.closest( '.secondary-menu' ).length ) {
										$parent.closest( '#header' ).find( '.main-menu' ).eq( 0 ).children( '.menu-item.active' ).removeClass( 'active' );
									}
								} else {
									$parent.removeClass( 'active' );
								}
							}
						}
					} );
				}

				return self;
			},

			events: function() {
				var self = this;

				$( '.menu-item > a[href*="#"], .porto-sticky-nav .nav > li > a[href*="#"], a[href*="#"].hash-scroll, .hash-scroll-wrap a[href*="#"]' ).on( 'click', function( e ) {
					e.preventDefault();

					var $this = $( this ),
						href = $this.attr( 'href' ),
						target = self.getTarget( href );

					if ( target && target.get( 0 ) ) {
						var $parent = $this.parent();

						var scroll_to = target.offset().top - theme.StickyHeader.sticky_height - theme.adminBarHeight() - theme.sticky_nav_height + 1;
						//                        if (scroll_to <= theme.StickyHeader.sticky_pos + theme.sticky_nav_height) {
						//                            scroll_to = theme.StickyHeader.sticky_pos + theme.sticky_nav_height + 1;
						//                        }
						$( 'html, body' ).stop().animate( {
							scrollTop: scroll_to
						}, 600, 'easeOutQuad', function() {
							//self.activeMenuItem();
							$parent.siblings().removeClass( 'active' );
							$parent.addClass( 'active' );
						} );
						if ( $this.closest( '.porto-popup-menu.opened' ).length ) {
							$this.closest( '.porto-popup-menu.opened' ).children( '.hamburguer-btn' ).trigger( 'click' );
						}
					} else if ( ( '#' != href || !$this.closest( '.porto-popup-menu.opened' ).length ) && !$this.hasClass( 'nolink' ) ) {
						window.location.href = $this.attr( 'href' );
					}
				} );

				/*window.addEventListener( 'scroll', function () {
					self.activeMenuItem();
				}, { passive: true } );*/
				var $menu_items = $( '.menu-item > a[href*="#"], .porto-sticky-nav .nav > li > a[href*="#"]' );
				$menu_items.each( function() {
					var rootMargin = '-20% 0px -79.9% 0px',
						isLast = $( this ).parent().is( ':last-child' );
					if ( isLast ) {
						var obj = document.getElementById( this.hash.replace( '#', '' ) );
						if ( obj && document.body.offsetHeight - obj.offsetTop < window.innerHeight ) {
							var ratio = ( window.innerHeight - document.body.offsetHeight + obj.offsetTop ) / window.innerHeight * 0.8;
							ratio = Math.round( ratio * 100 );
							rootMargin = '-' + ( 20 + ratio ) + '% 0px -' + ( 79.9 - ratio ) + '% 0px';
						}
					}
					var callback = function() {
						if ( this && typeof this[0] != 'undefined' && this[0].id ) {
							$( '.menu-item > a[href*="#' + this[0].id + '"], .porto-sticky-nav .nav > li > a[href*="#' + this[0].id + '"]' ).parent().addClass( 'active' ).siblings().removeClass( 'active' );
						}
					};
					self.scrollSpyIntObs( this.hash, callback, {
						rootMargin: rootMargin,
						thresholds: 0
					}, true, isLast, true, $menu_items, $( this ).parent().index() );
				} );

				//self.activeMenuItem();

				return self;
			},

			scrollSpyIntObs: function( selector, functionName, intObsOptions, alwaysObserve, isLast, firstLoad, $allItems, index ) {
				if ( typeof IntersectionObserver == 'undefined' ) {
					return this;
				}
				var obj = document.getElementById( selector.replace( '#', '' ) );
				if ( !obj ) {
					return this;
				}

				var self = this;

				var intersectionObserverOptions = {
					rootMargin: '0px 0px 200px 0px'
				}

				if ( Object.keys( intObsOptions ).length ) {
					intersectionObserverOptions = $.extend( intersectionObserverOptions, intObsOptions );
				}

				var observer = new IntersectionObserver( function( entries ) {

					for ( var i = 0; i < entries.length; i++ ) {
						var entry = entries[i];
						if ( entry.intersectionRatio > 0 ) {
							if ( typeof functionName === 'string' ) {
								var func = Function( 'return ' + functionName )();
							} else {
								var callback = functionName;

								callback.call( $( entry.target ) );
							}
						} else {
							if ( firstLoad == false ) {
								if ( isLast && ! $allItems.closest('.porto-sticky-nav').length ) {
									$allItems.filter( '[href*="' + entry.target.id + '"]' ).parent().prev().addClass( 'active' ).siblings().removeClass( 'active' );
								}
							}
							firstLoad = false;

						}
					}
				}, intersectionObserverOptions );

				observer.observe( obj );

				return this;
			}
		}

	} );

} ).apply( this, [window.theme, jQuery] );


// Init Theme
function porto_init( $wrap = '', initial = false ) {
	jQuery( window ).on( 'touchstart', function() { } );
	if ( !$wrap ) {
		$wrap = jQuery( document.body );
	}
	var wrapObj = $wrap.get( 0 );
	$wrap.trigger( 'porto_init_start', [wrapObj] );

	( function( $ ) {
		// Accordion
		if ( $.fn.themeAccordion ) {

			$( function() {
				$wrap.find( '.accordion:not(.manual)' ).each( function() {
					var $this = $( this ),
						opts;

					var pluginOptions = $this.data( 'plugin-options' );
					if ( pluginOptions )
						opts = pluginOptions;

					$this.themeAccordion( opts );
				} );
			} );
		}

		// Accordion Menu
		if ( $.fn.themeAccordionMenu ) {

			$( function() {
				$wrap.find( '.accordion-menu:not(.manual)' ).each( function() {
					var $this = $( this ),
						opts;

					var pluginOptions = $this.data( 'plugin-options' );
					if ( pluginOptions )
						opts = pluginOptions;

					$this.themeAccordionMenu( opts );
				} );
			} );

		}

		// Flickr Zoom
		if ( $.fn.themeFlickrZoom ) {

			$( function() {
				$wrap.find( '.wpb_flickr_widget:not(.manual)' ).each( function() {
					var $this = $( this ),
						opts;

					var pluginOptions = $this.data( 'plugin-options' );
					if ( pluginOptions )
						opts = pluginOptions;

					$this.themeFlickrZoom( opts );
				} );
			} );

		}

		// Masonry
		if ( $.fn.themeMasonry ) {

			$( function() {
				$wrap.find( '[data-plugin-masonry]:not(.manual)' ).each( function() {
					var $this = $( this ),
						opts;
					if ( $this.hasClass( 'elementor-row' ) ) {
						$this.children( '.elementor-column' ).addClass( 'porto-grid-item' );
					}
					var pluginOptions = $this.data( 'plugin-options' );
					if ( pluginOptions )
						opts = pluginOptions;
					$this.themeMasonry( opts );
				} );
				$wrap.find( '.posts-masonry .posts-container:not(.manual)' ).each( function() {
					var pluginOptions = $( this ).data( 'plugin-options' );
					if ( !pluginOptions ) {
						pluginOptions = {};
					}
					pluginOptions.itemSelector = '.post';
					$( this ).themeMasonry( pluginOptions );
				} );
				$wrap.find( '.page-portfolios .portfolio-row:not(.manual)' ).each( function() {
					if ( $( this ).closest( '.porto-grid-container' ).length > 0 || typeof $( this ).attr( 'data-plugin-masonry' ) != 'undefined' ) {
						return;
					}
					var $parent = $( this ).parent(), layoutMode = 'masonry', options, columnWidth = '.portfolio:not(.w2)', timer = null;

					if ( $parent.hasClass( 'portfolios-grid' ) ) {
						//layoutMode = 'fitRows';
					} else if ( $parent.hasClass( 'portfolios-masonry' ) ) {
						if ( !$parent.children( '.bounce-loader' ).length ) {
							$parent.append( '<div class="bounce-loader"><div class="bounce1"></div><div class="bounce2"></div><div class="bounce3"></div></div>' );
						}
					}

					options = {
						itemSelector: '.portfolio',
						layoutMode: layoutMode,
						callback: function() {
							timer && clearTimeout( timer );
							timer = setTimeout( function() {
								if ( typeof theme.FilterZoom !== 'undefined' ) {
									theme.FilterZoom.initialize( $( '.page-portfolios' ) );
								}
								$parent.addClass( 'portfolio-iso-active' );
							}, 400 );
						}
					};
					if ( layoutMode == 'masonry' ) {
						if ( !$parent.find( '.portfolio:not(.w2)' ).length )
							columnWidth = '.portfolio';
						options = $.extend( true, {}, options, {
							masonry: { columnWidth: columnWidth }
						} );
					}

					$( this ).themeMasonry( options );

				} );
				$wrap.find( '.page-members .member-row:not(.manual)' ).each( function() {
					$( this ).themeMasonry( {
						itemSelector: '.member',
						//layoutMode: 'fitRows',
						callback: function() {
							setTimeout( function() {
								if ( typeof theme.FilterZoom !== 'undefined' ) {
									theme.FilterZoom.initialize( $( '.page-members' ) );
								}
							}, 400 );
						}
					} );
				} );
			} );

		}

		// Toggle
		if ( $.fn.themeToggle ) {

			$( function() {
				$wrap.find( 'section.toggle:not(.manual)' ).each( function() {
					var $this = $( this ),
						opts;

					var pluginOptions = $this.data( 'plugin-options' );
					if ( pluginOptions )
						opts = pluginOptions;

					$this.themeToggle( opts );
				} );
			} );

		}

		// Sticky
		if ( $.fn.themeSticky ) {

			$( function() {
				$wrap.find( '[data-plugin-sticky]:not(.manual), .porto-sticky:not(.manual), .porto-sticky-nav:not(.manual)' ).each( function() {
					var $this = $( this ),
						opts;

					var pluginOptions = $this.data( 'plugin-options' );
					if ( pluginOptions )
						opts = pluginOptions;
					if ( $this.is( ':visible' ) ) {
						$this.themeSticky( opts );
					}
				} );
			} );
		}

		if ( typeof bootstrap != 'undefined' && typeof wrapObj != 'undefined' ) {
			// Tooltip
			var tooltipTriggerList = [].slice.call( wrapObj.querySelectorAll( "[data-bs-tooltip]:not(.manual), [data-toggle='tooltip']:not(.manual), .star-rating:not(.manual)" ) );
			tooltipTriggerList.map( function( tooltipTriggerEl ) {
				return new bootstrap.Tooltip( tooltipTriggerEl )
			} );
		}
		// Tabs
		$wrap.find( 'a[data-bs-toggle="tab"]' ).off( 'shown.bs.tab' ).on( 'shown.bs.tab', function( e ) {
			let $this = $( this );
			if ( $this.closest( '.custom-nav-sidebar' ).length ) { // For hotel demo
				return;
			}
			$this.parents( '.nav-tabs' ).find( '.active' ).removeClass( 'active' );
			$this.addClass( 'active' ).parent().addClass( 'active' );

			if ( $this.closest( '.tabs' ) ) {
				var _tabCarousel = $this.closest( '.tabs' ).find( '.tab-content>.active' ).find( '.owl-carousel' );
				if ( ! _tabCarousel.data( 'owl.carousel' ) ) {
					_tabCarousel.themeCarousel( _tabCarousel.data( 'plugin-options') );
				}
			}

		} );

		// call async functions
		if ( typeof theme.initAsync == 'function' ) {
			theme.initAsync( $wrap, wrapObj );
		} else {
			$( document.body ).on( 'porto_async_init', function() {
				theme.initAsync( $wrap, wrapObj );
			} );
		}

	} )( jQuery );


	jQuery( document.body ).trigger( 'porto_init', [$wrap, initial] );
}

( function( theme, $ ) {

	'use strict';

	$( document ).ready( function() {
		// update adminbar height
		var win_width = 0;
		$( window ).smartresize( function() {
			if ( win_width != window.innerWidth ) {
				theme.adminBarHeightNum = null;
				win_width = window.innerWidth;
			}
			theme.bodyWidth = document.body.offsetWidth;
		} );

		// Scroll to Top
		if ( typeof theme.ScrollToTop !== 'undefined' ) {
			theme.ScrollToTop.initialize();
		}
		setTimeout( function() {
			// Sticky Header
			if ( typeof theme.StickyHeader !== 'undefined' ) {
				theme.StickyHeader.initialize();
			}
			// Init Porto Theme
			porto_init( $( document.body ), true );
		}, 0 );

		( function() {
			theme.bodyWidth = theme.bodyWidth || document.body.offsetWidth;
			// Mega Menu
			if ( typeof theme.MegaMenu !== 'undefined' ) {
				theme.MegaMenu.initialize();
			}
		} )();

		setTimeout( () => {

			// Hash Scroll
			if ( typeof theme.HashScroll !== 'undefined' ) {
				theme.HashScroll.initialize();
			}
		} );

		$( document ).trigger( 'porto_theme_init' );
		theme.isReady = true; // isReady after document.ready, isloaded after onload
	} );
	$( window ).on( 'load', function() {
		// Mobile Sidebar
		// filter popup events
		$( document ).on( 'click', '.sidebar-toggle', function( e ) {
			e.preventDefault();
			var $html = $( 'html' ),
				$main = $( '#main' ), 
				$this = $( this );
			if ( $this.siblings( '.porto-product-filters' ).length ) {
				if ( $html.hasClass( 'filter-sidebar-opened' ) ) {
					$html.removeClass( 'filter-sidebar-opened' );
					$this.siblings( '.sidebar-overlay' ).removeClass( 'active' );
					if ( $html.hasClass( 'sidebar-right-opened' ) ) {
						$html.removeClass( 'sidebar-right-opened' );
					}
				} else {
					$html.removeClass( 'sidebar-opened' );
					$html.addClass( 'filter-sidebar-opened' );
					$this.siblings( '.sidebar-overlay' ).addClass( 'active' );
					if ( $main.hasClass( 'column2-right-sidebar' ) || $main.hasClass( 'column2-wide-right-sidebar' ) ) {
						$html.addClass( 'sidebar-right-opened' );
					}
				}
			} else {
				if ( $html.hasClass( 'sidebar-opened' ) ) {
					$html.removeClass( 'sidebar-opened' );
					$( '.sidebar-overlay' ).removeClass( 'active' );
					if ( $html.hasClass( 'sidebar-right-opened' ) ) {
						$html.removeClass( 'sidebar-right-opened' );
					}
				} else {
					$html.addClass( 'sidebar-opened' );
					$( '.sidebar-overlay' ).addClass( 'active' );
					//$( '.mobile-sidebar' ).find( '.porto-lazyload:not(.lazy-load-loaded)' ).trigger( 'appear' );
					if ( $main.hasClass( 'column2-right-sidebar' ) || $main.hasClass( 'column2-wide-right-sidebar' ) ) {
						$html.addClass( 'sidebar-right-opened' );
					}
				}
			}
		} );

		$( '#header .mini-cart' ).on( 'click', function( e ) {
			let $body = $( 'body' );
			if ( js_porto_vars.cart_url && ( $body.hasClass( 'woocommerce-cart' ) || $body.hasClass( 'woocommerce-checkout' ) ) ) {
				location.href = js_porto_vars.cart_url;
			}
		});
		$( '.minicart-offcanvas .cart-head' ).on( 'click', function() {
			let $body = $( 'body' );
			if ( js_porto_vars.cart_url && ( $body.hasClass( 'woocommerce-cart' ) || $body.hasClass( 'woocommerce-checkout' ) ) ) {
				return;
			}
			var $this = $( this );
			$this.closest( '.minicart-offcanvas' ).toggleClass( 'minicart-opened' );
			if ( $this.closest( '.minicart-offcanvas' ).hasClass( 'minicart-opened' ) ) {
				$( 'html' ).css( 'margin-right', theme.getScrollbarWidth() );
				$( 'html' ).css( 'overflow', 'hidden' );
			} else {
				$( 'html' ).css( 'overflow', '' );
				$( 'html' ).css( 'margin-right', '' );
			}
		} );

		$( '.minicart-offcanvas .minicart-overlay' ).on( 'click', function() {
			$( this ).closest( '.minicart-offcanvas' ).removeClass( 'minicart-opened' );
			$( '.d-none .minicart-offcanvas.minicart-opened' ).removeClass( 'minicart-opened' );
			$( 'html' ).css( 'overflow', '' );
			$( 'html' ).css( 'margin-right', '' );
		} );

		$( document.body ).on( 'click', '.sidebar-overlay', function() {
			var $html = $( 'html' ); 
			$html.removeClass( 'sidebar-opened' );
			$html.removeClass( 'filter-sidebar-opened' );
			$( this ).removeClass( 'active' );
			$html.removeClass( 'sidebar-right-opened' );
		} );

		// Section Tab
		$( document.body ).on( 'click', '.section-tabs .nav-link', function( e ) {
			e.preventDefault();
			var $this = $( this ),
				nav_id = $this.data( 'tab' ),
				$section_tab = $this.closest( '.section-tabs' ),
				$nav_wrap = $section_tab.children( 'ul.nav' ),
				$tab_content = $section_tab.children( '.tab-content' );
			if ( nav_id ) {
				// Nav Item
				$nav_wrap.find( '.active' ).removeClass( 'active' );
				$this.addClass( 'active' ).parent( '.nav-item' ).addClass( 'active' );

				// Content Item
				$tab_content.find( '>.active' ).removeClass( 'show active' );
				$tab_content.find( '>.tab-pane[id="' + nav_id + '"]' ).addClass( 'active' );
				let _offsetHeight = $tab_content.find( '>.active' ).get(0).offsetHeight;
				$tab_content.find( '>.active' ).addClass( 'show' );
								
				var _tabCarousel = $tab_content.find( '>.active' ).find( '.owl-carousel' );
				if ( ! _tabCarousel.data( 'owl.carousel' ) ) {
					_tabCarousel.themeCarousel( _tabCarousel.data( 'plugin-options') );
				}
			}
		} );

		$( window ).on( 'resize', function( e ) {
			if ( e.originalEvent && window.innerWidth > 991 && $( 'html' ).hasClass( 'sidebar-opened' ) ) {
				$( '.sidebar-overlay' ).trigger( 'click' );
			}
		} );

		// Match Height
		var $matchHeightObj = $( '.tabs-simple .featured-box .box-content, .porto-content-box .featured-box .box-content, .vc_general.vc_cta3, .match-height' );
		if ( $matchHeightObj.length ) {
			if ( $.fn.matchHeight ) {
				$matchHeightObj.matchHeight();
			} else {
				var script = document.createElement( "script" );
				script.addEventListener( "load", function( event ) {
					$matchHeightObj.matchHeight();
				} );
				script.src = js_porto_vars.ajax_loader_url.replace( '/images/ajax-loader@2x.gif', '/js/libs/jquery.matchHeight.min.js' );
				script.async = true;
				document.body.appendChild( script );
			}
		}

		// WhatsApp Sharing
		if ( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test( navigator.userAgent ) ) {
			$( '.share-whatsapp' ).css( 'display', 'inline-block' );
		}
		$( document ).ajaxComplete( function( event, xhr, options ) {
			if ( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test( navigator.userAgent ) ) {
				$( '.share-whatsapp' ).css( 'display', 'inline-block' );
			}
		} );

		// Add Ege Browser Class
		var ua = window.navigator.userAgent,
			ie12 = ua.indexOf( 'Edge/' ) > 0;
		if ( ie12 ) $( 'html' ).addClass( 'ie12' );

		// Portfolio Link Lightbox
		$( document ).on( 'click', '.portfolios-lightbox a.portfolio-link', function( e ) {
			$( this ).find( '.thumb-info-zoom' ).trigger( 'click' );
			return false;
		} );

		$( '.porto-faqs' ).each( function() {
			if ( $( this ).find( '.faq .toggle.active' ).length < 1 ) {
				$( this ).find( '.faq' ).eq( 0 ).find( '.toggle' ).addClass( 'active' );
				$( this ).find( '.faq' ).eq( 0 ).find( '.toggle-content' ).show();
			}
		} );

		// refresh wpb content
		$( document ).on( 'shown.bs.collapse', '.collapse', function() {
			var panel = $( this );
			theme.refreshVCContent( panel );
		} );
		$( document ).on( 'shown.bs.tab', 'a[data-bs-toggle="tab"]', function( e ) {
			var panel = $( $( e.target ).attr( 'href' ) );
			theme.refreshVCContent( panel );
		} );

		// porto tooltip for header, footer
		$( '.porto-tooltip .tooltip-icon' ).on( 'click', function() {
			if ( $( this ).parent().children( ".tooltip-popup" ).css( "display" ) == "none" ) {
				$( this ).parent().children( ".tooltip-popup" ).fadeIn( 200 );
			} else {
				$( this ).parent().children( ".tooltip-popup" ).fadeOut( 200 );
			}
		} );
		$( '.porto-tooltip .tooltip-close' ).on( 'click', function() {
			$( this ).parent().fadeOut( 200 );
		} );

		// Add Scrollbar width
		$( 'body' ).css( '--porto-scroll-w', theme.getScrollbarWidth() + 'px' );
	} );

} ).apply( this, [window.theme, jQuery] );

( function( theme, $, undefined ) {
	"use strict";

	$( document ).ready( function() {
		$( window ).on( 'vc_reload', function() {
			porto_init();
			$( '.type-post' ).addClass( 'post' );
			$( '.type-portfolio' ).addClass( 'portfolio' );
			$( '.type-member' ).addClass( 'member' );
			$( '.type-block' ).addClass( 'block' );
		} );
	} );

	/*
	* Experience Timeline
	*/
	var timelineHeightAdjust = {
		$timeline: $( '#exp-timeline' ),
		$timelineBar: $( '#exp-timeline .timeline-bar' ),
		$firstTimelineItem: $( '#exp-timeline .timeline-box' ).first(),
		$lastTimelineItem: $( '#exp-timeline .timeline-box' ).last(),

		build: function() {
			var self = this;

			self.adjustHeight();
		},
		adjustHeight: function() {
			var self = this,
				calcFirstItemHeight = ( self.$firstTimelineItem.outerHeight( true ) / 2 ) + 5,
				calcLastItemHeight = ( self.$lastTimelineItem.outerHeight( true ) / 2 ) + 5;

			// Set Timeline Bar Top and Bottom
			self.$timelineBar.css( {
				top: calcFirstItemHeight,
				bottom: calcLastItemHeight
			} );
		}
	}

	if ( $( '#exp-timeline' ).get( 0 ) ) {
		// Adjust Timeline Height On Resize
		var timeline_timer = null;
		$( window ).smartresize( function() {
			if ( timeline_timer ) {
				clearTimeout( timeline_timer );
			}
			timeline_timer = setTimeout( function() {
				timelineHeightAdjust.build();
			}, 800 );
		} );

		timelineHeightAdjust.build();
	}

	$( '.custom-view-our-location' ).on( 'click', function( e ) {
		e.preventDefault();
		var this_ = $( this );
		$( '.custom-googlemap' ).slideDown( '1000', function() {
			this_.delay( 700 ).hide();
		} );
	} );

	// compatibility with w3 total cache
	window.addEventListener(
		'LazyLoad::Initialized',
		function ( event ) {
			theme.w3tcLazyLoadInstance = event.detail.instance;
		},
		false
	);

} )( window.theme, jQuery );

// Porto 4.0 extra shortcodes
( function( theme, $, undefined ) {
	'use strict';

	window.addEventListener( 'load', function() {
		theme.isLoaded = true;
	} );

	// fix Elementor ScrollTop
	$( window ).on( 'elementor/frontend/init', function() {
		if ( typeof elementorFrontend != 'undefined' ) {
			elementorFrontend.hooks.addFilter( 'frontend/handlers/menu_anchor/scroll_top_distance', function( scrollTop ) {
				if ( theme && theme.StickyHeader && typeof theme.sticky_nav_height != 'undefined' ) {
					if ( elementorFrontend.elements.$wpAdminBar.length ) {
						scrollTop += elementorFrontend.elements.$wpAdminBar.height();
					}
					scrollTop = scrollTop - theme.adminBarHeight() - theme.StickyHeader.sticky_height - theme.sticky_nav_height + 1;
				}
				return scrollTop;
			} );
			elementorFrontend.elements.$window.on( 'elementor/nested-tabs/activate', function( e, content ) {
				var _tabCarousel = $( content ).find( '.owl-carousel' );
				if ( ! _tabCarousel.data( 'owl.carousel' ) ) {
					_tabCarousel.themeCarousel( _tabCarousel.data( 'plugin-options' ) );
				}
			});
		}
	} );

	// widget wysija
	$( '#footer .widget_wysija .wysija-submit:not(.btn)' ).addClass( 'btn btn-default' );

	// fixed visual compoer issue which has owl carousel
	if ( $( '[data-vc-parallax] .owl-carousel' ).length ) {
		theme.requestTimeout( function() { if ( typeof window.vcParallaxSkroll == 'object' ) { window.vcParallaxSkroll.refresh(); } }, 200 );
	}

	if ( $( '.page-content > .alignfull, .post-content > .alignfull' ).length ) {
		var initAlignFull = function() {
			$( '.page-content > .alignfull, .post-content > .alignfull' ).each( function() {
				$( this ).css( 'left', -1 * $( this ).parent().offset().left ).css( 'right', -1 * $( this ).parent().offset().left ).css( 'width', $( 'body' ).width() - ( parseInt( $( this ).css( 'margin-left' ), 10 ) + parseInt( $( this ).css( 'margin-right' ), 10 ) ) );
			} );
		};
		initAlignFull();
		$( window ).smartresize( function() {
			initAlignFull();
		} );
	}
} )( window.theme, jQuery );
// source --> https://mfrash.com/wp-content/themes/porto/js/skeleton.min.js?ver=7.8.5 
jQuery(document).ready((function(e){if(js_porto_vars.use_skeleton_screen.length>0&&e(".skeleton-loading").length){var t=(r=e.Deferred(),e((function(){r.resolve(),!0})),r.promise()),n=!1,i=window.MutationObserver||window.WebkitMutationObserver||window.MozMutationObserver;void 0!==i&&(n=new i((function(t,n){for(var i in t){var o=t[i];"childList"==o.type&&e(o.target).trigger("skeleton:initialised")}})));var o=setTimeout((function(){n&&(n.disconnect(),n=void 0)}),4e3);e(".skeleton-loading").each((function(i){var r=e(this),s=function(){var t=e.Deferred();return r.on("skeleton:initialised",(function(e){e.target.classList.contains("skeleton-loading")&&t.resolve(e)})),t.promise()}(),a=e.Deferred().resolve().promise();if(e.when(s,a,t).done((function(t){var i=e(t.target),r=i.siblings(".skeleton-body");r.length||(r=i.parent().parent().parent().find('[class="'+i.attr("class").replace("skeleton-loading","skeleton-body")+'"]')),porto_init(i),i.find(".sidebar-menu:not(.side-menu-accordion)").length&&void 0!==theme.SidebarMenu&&theme.SidebarMenu.initialize(i.find(".sidebar-menu:not(.side-menu-accordion)")),i.trigger("skeleton-loaded"),theme.requestTimeout((function(){r.length&&(r.parent().hasClass("yit-wcan-container")?r.parent().remove():r.remove()),i.removeClass("skeleton-loading"),i.closest(".skeleton-loading-wrap")&&i.closest(".skeleton-loading-wrap").removeClass("skeleton-loading-wrap"),(e(document.body).hasClass("elementor-default")||e(document.body).hasClass("elementor-page"))&&e(window).trigger("resize"),theme.refreshStickySidebar(!1)}),100),e(".skeleton-loading").length||(clearTimeout(o),n.disconnect(),n=void 0)})),r.children('script[type="text/template"]').length){var l=e(JSON.parse(r.children('script[type="text/template"]').eq(0).html()));r.children('script[type="text/template"]').eq(0).remove(),n&&n.observe(this,{childList:!0,subtree:!1}),r.append(l),n||r.trigger("skeleton:initialised")}}))}var r}));
// source --> https://mfrash.com/wp-content/themes/porto/js/sticky-icon-bar.min.js?ver=7.8.5 
!function(e,a){"use strict";var r=a("#header .header-main"),t=a("#header .main-menu-wrap");a(".porto-sticky-navbar").length>0&&window.addEventListener("scroll",(function(){if(window.innerWidth<576){var e=-1,h=a(window).scrollTop();r.length&&(e=Math.max(r.scrollTop()+r.height(),e)),t.length&&(e=Math.max(t.scrollTop()+t.height(),e)),e<=0&&(e=a("#header").length>0&&a("#header").height()>10?a("#header").scrollTop()+a("#header").height():100),e<=h?a(".porto-sticky-navbar").addClass("fixed"):a(".porto-sticky-navbar").removeClass("fixed")}}),{passive:!0})}(window.theme,jQuery);
// source --> https://mfrash.com/wp-content/themes/porto/js/lazy-menu.min.js?ver=7.8.5 
(function(e,n){"use strict";e=e||{},n.extend(e,{lazyload_menu:function(a,o,i){if((js_porto_vars.lazyload_menu||"mobile_menu"==o)&&o){var l=!1,r={action:"porto_lazyload_menu",menu_type:o,nonce:js_porto_vars.porto_nonce};i&&(r.menu_id=i);var t=function(i){if(i){var m=n(i);if("mobile_menu"!=o&&a.each((function(a){var o=n(this),i=m.children(".mega-menu, .sidebar-menu").eq(a);i.length||(i=m.find(".mega-menu, .sidebar-menu").eq(a)),o.children("li.menu-item-has-children").each((function(e){var a=i.children("li.menu-item-has-children").eq(e).children(".popup, .sub-menu");a.hasClass("popup")&&(a=a.children(".inner")),a.length&&(n(this).children(".popup").length?n(this).children(".popup").children(".inner").replaceWith(a):o.hasClass("overlay")?(n(this).children(".sub-menu").remove(),n(this).append(a)):n(this).children(".sub-menu").replaceWith(a))})),o.hasClass("mega-menu")?e.MegaMenu.build(o):o.hasClass("side-menu-accordion")?o.themeAccordionMenu({open_one:!0}):e.SidebarMenu.build(o),o.addClass("sub-ready").trigger("sub-loaded")})),m.find("#nav-panel, #side-nav-panel").length||"mobile_menu"==o){var d=!1;if(n("#nav-panel").length)(u=m.find(".mobile-nav-wrap > *")).length?(n("#nav-panel .mobile-nav-wrap > *").replaceWith(u),n("#nav-panel .mobile-nav-wrap").removeClass("skeleton-body porto-ajax-loading"),n("#nav-panel .accordion-menu").themeAccordionMenu()):d=!0;else if(n("#side-nav-panel").length){var u;(u=m.find("#side-nav-panel")).length?(n("#side-nav-panel").replaceWith(u),n("#side-nav-panel .accordion-menu").themeAccordionMenu()):d=!0}if(d&&!l){l=!0,d=!1;var s=r;s.porto_lazyload_menu_2=1,n.post(window.location.href,s,t)}}"object"==typeof a&&a.length&&(n.fn.themePluginLazyLoad&&a.find(".porto-lazyload:not(.lazy-load-loaded)").themePluginLazyLoad({}),a.find(".porto-carousel").each((function(){n(this).themeCarousel(n(this).data("plugin-options"))})),a.find("[data-appear-animation]").each((function(){n(this).themeAnimate(n(this).data("plugin-options"))})))}},m=window.location.href;e.WooEvents&&e.WooEvents.removeParameterFromUrl&&(m=e.WooEvents.removeParameterFromUrl(m,"add-to-cart")),n.post(m,r,t)}}})}).apply(this,[window.theme,jQuery]),jQuery(document).ready((function(e){if(js_porto_vars.lazyload_menu){var n;function a(e,n,a){var o=!1;"pageload"==js_porto_vars.lazyload_menu?theme.lazyload_menu(e,n,a):"firsthover"==js_porto_vars.lazyload_menu&&e.one("mouseenter touchstart","li.menu-item-has-children",(function(){if(o)return!0;theme.lazyload_menu(e,n,a),o=!0}))}e(".secondary-menu.mega-menu").length&&(n="secondary_menu",a(e(".secondary-menu.mega-menu"),n)),e(".mega-menu.main-menu:not(.scroll-wrapper):not(.secondary-menu)").length&&(n="main_menu",a(e(".mega-menu.main-menu:not(.scroll-wrapper):not(.secondary-menu)"),n)),e(".toggle-menu-wrap .sidebar-menu").length&&(n="toggle_menu",a(e(".toggle-menu-wrap .sidebar-menu"),n)),e(".main-sidebar-menu .sidebar-menu").length&&(n="sidebar_menu",e(".main-sidebar-menu .sidebar-menu").each((function(){let o=e(this);a(o,n,o.closest(".main-sidebar-menu").data("menu"))}))),e(".header-side-nav .sidebar-menu").length&&(n="header_side_menu",a(e(".header-side-nav .sidebar-menu"),n)),e("#nav-panel .skeleton-body, #side-nav-panel .skeleton-body").length&&"pageload"==js_porto_vars.lazyload_menu&&theme.lazyload_menu(1,"mobile_menu")}}));
// source --> https://mfrash.com/wp-content/themes/porto/js/appearanimate.js?ver=7.8.5 
( function( $ ) {
	window.theme = window.theme || {};
	if ( typeof window.theme.animation_support == 'undefined' ) {
		theme.animation_support = !window.jQuery( 'html' ).hasClass( 'no-csstransitions' );
		theme.getOptions = function( opts ) {
			if ( typeof ( opts ) == 'object' ) {
				return opts;
			} else if ( typeof ( opts ) == 'string' ) {
				try {
					return JSON.parse( opts.replace( /'/g, '"' ).replace( ';', '' ) );
				} catch ( e ) {
					return {};
				}
			} else {
				return {};
			}
		}
		theme.execPluginFunction = function( functionName, context ) {
			var args = Array.prototype.slice.call( arguments, 2 );
			var namespaces = functionName.split( "." );
			var func = namespaces.pop();

			for ( var i = 0; i < namespaces.length; i++ ) {
				context = context[namespaces[i]];
			}

			return context[func].apply( context, args );
		}
		theme.mergeOptions = function( obj1, obj2 ) {
			var obj3 = {};
			for ( var attrname in obj1 ) { obj3[attrname] = obj1[attrname]; }
			for ( var attrname in obj2 ) { obj3[attrname] = obj2[attrname]; }
			return obj3;
		}
		theme.dynIntObsInit = function( selector, functionName, pluginDefaults ) {
			var $el;
			if ( typeof selector == 'string' ) {
				$el = document.querySelectorAll( selector );
			} else {
				$el = selector;
			}

			Array.prototype.forEach.call( $el, function( obj ) {
				var $this = $( obj ),
					opts;
				if ( $this.data( 'observer-init' ) ) {
					return;
				}

				var pluginOptions = theme.getOptions( $this.data( 'plugin-options' ) );
				if ( pluginOptions )
					opts = pluginOptions;

				var mergedPluginDefaults = theme.mergeOptions( pluginDefaults, opts )

				var intersectionObserverOptions = {
					rootMargin: '0px 0px 200px 0px',
					thresholds: 0
				}
				if ( mergedPluginDefaults.accY ) {
					intersectionObserverOptions.rootMargin = '0px 0px ' + Number( mergedPluginDefaults.accY ) + 'px 0px';
				}

				var observer = new IntersectionObserver( function( entries ) {
					for ( var i = 0; i < entries.length; i++ ) {
						var entry = entries[i];
						if ( entry.intersectionRatio > 0 ) {
							theme.execPluginFunction( functionName, $this, mergedPluginDefaults );

							// Unobserve
							observer.unobserve( entry.target );
						}
					}
				}, intersectionObserverOptions );

				observer.observe( obj );
				$this.data( 'observer-init', true );
			} );
		}
	}
} )( window.jQuery );

// Animate
( function( theme, $ ) {
	'use strict';

	theme = theme || {};

	var instanceName = '__animate';

	var Animate = function( $el, opts ) {
		return this.initialize( $el, opts );
	};

	Animate.defaults = {
		accX: 0,
		accY: -120,
		delay: 1,
		duration: 1000
	};

	Animate.prototype = {
		initialize: function( $el, opts ) {
			if ( $el.data( instanceName ) ) {
				return this;
			}

			this.$el = $el;

			this
				.setData()
				.setOptions( opts )
				.build();

			return this;
		},

		setData: function() {
			this.$el.data( instanceName, true );

			return this;
		},

		setOptions: function( opts ) {
			this.options = $.extend( true, {}, Animate.defaults, opts, {
				wrapper: this.$el
			} );

			return this;
		},

		build: function() {
			var self = this,
				$el = this.options.wrapper,
				delay = 0,
				duration = 0;

			if ( $el.data( 'appear-animation-svg' ) ) {
				$el.find( '[data-appear-animation]' ).each( function() {
					var $this = $( this ),
						opts;

					var pluginOptions = theme.getOptions( $this.data( 'plugin-options' ) );
					if ( pluginOptions )
						opts = pluginOptions;

					$this.themeAnimate( opts );
				} );

				return this;
			}

			$el.addClass( 'appear-animation' );

			var el_obj = $el.get( 0 );

			delay = Math.abs( $el.data( 'appear-animation-delay' ) ? $el.data( 'appear-animation-delay' ) : self.options.delay );
			duration = Math.abs( $el.data( 'appear-animation-duration' ) ? $el.data( 'appear-animation-duration' ) : self.options.duration );
			if ( 'undefined' !== typeof $el.data( 'appear-animation' ) && $el.data( 'appear-animation' ).includes( 'revealDir' ) ) {
				if ( delay > 1 ) {
					el_obj.style.setProperty( '--porto-reveal-animation-delay', delay + 'ms' );
				}
				if ( duration != 1000 ) {
					el_obj.style.setProperty( '--porto-reveal-animation-duration', duration + 'ms' );
				}
				if ( $el.data( 'animation-reveal-clr' ) ) {
					el_obj.style.setProperty(  '--porto-reveal-clr', $el.data( 'animation-reveal-clr' ) );
				}
			} else {
				if ( delay > 1 ) {
					el_obj.style.animationDelay = delay + 'ms';
				}
				if ( duration != 1000 ) {
					el_obj.style.animationDuration = duration + 'ms';
				}				
			}

			/*if ( $el.find( '.porto-lazyload:not(.lazy-load-loaded)' ).length ) {
				$el.find( '.porto-lazyload:not(.lazy-load-loaded)' ).trigger( 'appear' );
			}*/
			$el.addClass( $el.data( 'appear-animation' ) + ' appear-animation-visible' );

			return this;
		}
	};

	// expose to scope
	$.extend( theme, {
		Animate: Animate
	} );

	// jquery plugin
	$.fn.themeAnimate = function( opts ) {
		return this.map( function() {
			var $this = $( this );

			if ( $this.data( instanceName ) ) {
				return $this;
			} else {
				return new theme.Animate( $this, opts );
			}

		} );
	};

} ).apply( this, [window.theme, jQuery] );


( function( theme, $ ) {
    theme = theme || {};
	
	var funcAnimate = function( $wrap, wrapObj ) {
        // Animate
		if ( $.fn.themeAnimate && typeof wrapObj != 'undefined' ) {

			$( function() {
				var svgAnimates = wrapObj.querySelectorAll( 'svg [data-appear-animation]' );
				if ( svgAnimates.length ) {
					$( svgAnimates ).closest( 'svg' ).attr( 'data-appear-animation-svg', '1' );
				}
				var $animates = wrapObj.querySelectorAll( '[data-plugin-animate], [data-appear-animation], [data-appear-animation-svg]' );
				if ( $animates.length ) {
					var animateResize = function() {
						if ( window.innerWidth < 768 ) {
							window.removeEventListener( 'resize', animateResize );
							$animates.forEach( function( o ) {
								o.classList.add( 'appear-animation-visible' );
							} );
						}
					};
					if ( theme.animation_support ) {
						window.addEventListener( 'resize', animateResize );
						theme.dynIntObsInit( $animates, 'themeAnimate', theme.Animate.defaults );
					} else {
						$animates.forEach( function( o ) {
							o.classList.add( 'appear-animation-visible' );
						} );
					}
				}
			} );
		} 
	}

	funcAnimate( '', document.body );
    $( document.body ).on( 'porto_after_async_init', function( e, $wrap, wrapObj ) {
		if ( theme.isAsyncInit != -1 ) { // not initial
			funcAnimate( $wrap, wrapObj );	
		}
    } );
} ).apply( this, [window.theme, jQuery] );
// source --> https://mfrash.com/wp-content/themes/porto/js/theme-async.js?ver=7.8.5 
( function( theme, $ ) {
	'use strict';

	theme = theme || {};

	$.extend( theme, {
		mfpConfig: {
			tClose: js_porto_vars.popup_close,
			tLoading: '<div class="porto-ajax-loading"><i class="porto-loading-icon"></i></div>',
			gallery: {
				tPrev: js_porto_vars.popup_prev,
				tNext: js_porto_vars.popup_next,
				tCounter: js_porto_vars.mfp_counter
			},
			image: {
				tError: js_porto_vars.mfp_img_error
			},
			ajax: {
				tError: js_porto_vars.mfp_ajax_error
			},
			callbacks: {
				open: function() {
					$( 'body' ).addClass( 'lightbox-opened' );
					var fixed = this.st.fixedContentPos;
					if ( fixed ) {
						$( '#header.sticky-header .header-main.sticky, #header.sticky-header .main-menu-wrap, .fixed-header #header.sticky-header .header-main, .fixed-header #header.sticky-header .main-menu-wrap' ).css( theme.rtl_browser ? 'left' : 'right', theme.getScrollbarWidth() );
					}
					/* D3-Ahsan - Start */
					var that = $( this._lastFocusedEl );
					if ( ( that.closest( '.portfolios-lightbox' ).hasClass( 'with-thumbs' ) ) && $( document ).width() >= 1024 ) {

						var portfolio_lightbox_thumbnails_base = that.closest( '.portfolios-lightbox.with-thumbs' ).find( '.porto-portfolios-lighbox-thumbnails' ).clone(),
							magnificPopup = $.magnificPopup.instance;

						$( 'body' ).prepend( portfolio_lightbox_thumbnails_base );

						var $portfolios_lightbox_thumbnails = $( 'body > .porto-portfolios-lighbox-thumbnails' ),
							$portfolios_lightbox_thumbnails_carousel = $portfolios_lightbox_thumbnails.children( '.owl-carousel' );
						$portfolios_lightbox_thumbnails_carousel.themeCarousel( $portfolios_lightbox_thumbnails_carousel.data( 'plugin-options' ) );
						$portfolios_lightbox_thumbnails_carousel.trigger( 'refresh.owl.carousel' );

						var $carousel_items_wrapper = $portfolios_lightbox_thumbnails_carousel.find( '.owl-stage' );

						$carousel_items_wrapper.find( '.owl-item' ).removeClass( 'current' );
						$carousel_items_wrapper.find( '.owl-item' ).eq( magnificPopup.currItem.index ).addClass( 'current' );

						$.magnificPopup.instance.next = function() {
							var magnificPopup = $.magnificPopup.instance;
							$.magnificPopup.proto.next.call( this );
							$carousel_items_wrapper.find( '.owl-item' ).removeClass( 'current' );
							$carousel_items_wrapper.find( '.owl-item' ).eq( magnificPopup.currItem.index ).addClass( 'current' );
						};

						$.magnificPopup.instance.prev = function() {
							var magnificPopup = $.magnificPopup.instance;
							$.magnificPopup.proto.prev.call( this );
							$carousel_items_wrapper.find( '.owl-item' ).removeClass( 'current' );
							$carousel_items_wrapper.find( '.owl-item' ).eq( magnificPopup.currItem.index ).addClass( 'current' );
						};

						$carousel_items_wrapper.find( '.owl-item' ).on( 'click', function() {
							$carousel_items_wrapper.find( '.owl-item' ).removeClass( 'current' );
							$.magnificPopup.instance.goTo( $( this ).index() );
							$( this ).addClass( 'current' );
						} );

					}
					/* End - D3-Ahsan */
				},
				close: function() {
					$( 'body' ).removeClass( 'lightbox-opened' );
					var fixed = this.st.fixedContentPos;
					if ( fixed ) {
						$( '#header.sticky-header .header-main.sticky, #header.sticky-header .main-menu-wrap, .fixed-header #header.sticky-header .header-main, .fixed-header #header.sticky-header .main-menu-wrap' ).css( theme.rtl_browser ? 'left' : 'right', '' );
					}
					$( '.owl-carousel .owl-stage' ).each( function() {
						var $this = $( this ),
							w = $this.width() + parseInt( $this.css( 'padding-left' ) ) + parseInt( $this.css( 'padding-right' ) );

						$this.css( { 'width': w + 200 } );
						setTimeout( function() {
							$this.css( { 'width': w } );
						}, 0 );
					} );
					/* D3-Ahsan - Start */
					var that = $( this._lastFocusedEl );
					if ( ( that.parents( '.portfolios-lightbox' ).hasClass( 'with-thumbs' ) ) && $( document ).width() >= 1024 ) {
						$( ' body > .porto-portfolios-lighbox-thumbnails' ).remove();
					}
					/* End - D3-Ahsan */
				}
			}
		},
	} );

} ).apply( this, [window.theme, jQuery] );

// Search
( function( theme, $ ) {
	'use strict';

	theme = theme || {};

	$.extend( theme, {

		Search: {

			defaults: {
				popup: $( '.searchform-popup' ),
				form: $( '.searchform' )
			},

			initialize: function( $popup, $form ) {
				this.$popup = ( $popup || this.defaults.popup );
				this.$form = ( $form || this.defaults.form );
				this.form_layout = this.$form.hasClass( 'search-layout-overlay' ) ? 'overlay' : this.$form.hasClass( 'search-layout-reveal' ) ? 'reveal' : false;

				this.build()
					.events();

				return this;
			},

			build: function() {
				var self = this;

				/* Change search form values */
				var $search_form_texts = self.$form.find( '.text input' ),
					$search_form_cats = self.$form.find( '.cat' );

				if ( $( '.searchform .cat' ).get( 0 ) && $.fn.selectric ) {
					$( '.searchform .cat' ).selectric( {
						arrowButtonMarkup: '',
						expandToItemText: true,
						maxHeight: 240
					} );
				}

				$search_form_texts.on( 'change', function() {
					var $this = $( this ),
						val = $this.val();

					$search_form_texts.each( function() {
						if ( $this != $( this ) ) $( this ).val( val );
					} );
				} );

				$search_form_cats.on( 'change', function() {
					var $this = $( this ),
						val = $this.val();

					$search_form_cats.each( function() {
						if ( $this != $( this ) ) $( this ).val( val );
					} );
				} );

				$( document ).on( 'focus', '.searchform-popup .text input', function (e) {
					let $this = $( this );
					$this.trigger( 'porto_sh_before_open' );
					if ( $this.closest( '.searchform-popup' ).find( '.search-list:not(.search-history-list)' ).length ) {
						$this.closest( '.searchform-popup' ).find( '.search-lists' ).addClass( 'show' );
					}
				});

				return this;
			},

			events: function() {
				var self = this;

				$( 'body' ).on( 'click', '.searchform-popup', function( e ) {
					e.stopPropagation();
				} );
				$( 'body' ).off( 'click', '.searchform-popup .search-toggle' ).on( 'click', '.searchform-popup .search-toggle', function( e ) {
					var $this = $( this ),
						$form = $this.next();
					$this.toggleClass( 'opened' );
					if ( 'overlay' == self.form_layout ) {
						$this.siblings( '.search-layout-overlay' ).addClass( 'show' );
						$( 'html' ).addClass( 'porto-search-opened porto-search-overlay-wrap' );
						$this.closest( '.vc_row.vc_row-flex>.vc_column_container>.vc_column-inner' ).css( 'z-index', '999' );
					} else if ( 'reveal' == self.form_layout  ) {
						self.parents = [];
						var $element = self.$popup;
						while ( ! ( ( $element.hasClass( 'elementor-container' ) && ! $element.parent().hasClass( 'elementor-inner-container' ) ) || ( $element.hasClass( 'e-con-inner' ) && ! $element.parent().hasClass( 'e-child' ) ) || ( $element.parent().hasClass( 'vc_row' ) && ! $element.parent().hasClass( 'vc_inner' ) ) || 'header' == $element.parent().attr( 'id' ) || $element.parent().hasClass( 'header-main' ) || $element.parent().hasClass( 'header-top' ) || $element.parent().hasClass( 'header-bottom' ) ) ) {
							$element = $element.parent();
							$element.addClass( 'position-static' );
							self.parents.push( $element );
						}
						if ( 'static' == $element.parent().css( 'position' ) ) {
							self.topParent = $element.parent();
							self.topParent.addClass( 'position-relative' );
						}
						$form.toggle();
						window.setTimeout( function () {
							$( 'body' ).addClass( 'porto-search-opened' );
							$form.find( '.text>input[name="s"]' ).focus();
						}, 100 );
					} else {
						$form.toggle();
					}
					if ( $this.hasClass( 'opened' ) ) {
						$( '#mini-cart.open' ).removeClass( 'open' );
						$this.next().find( 'input[type="text"]' ).focus();
						if ( self.$popup.find( '.btn-close-search-form' ).length ) {
							self.$popup.parent().addClass( 'position-static' );
						}
					} else if ( 'reveal' == self.form_layout ) {
						self.removeFormStyle();
					}
					e.preventDefault();
					e.stopPropagation();
				} );

				$( 'html,body' ).on( 'click', function() {
					self.removeFormStyle();
					$( '.search-lists' ).removeClass( 'show' );
				} );

				if ( !( 'ontouchstart' in document ) ) {

					$( window ).on( 'resize', function() {
						self.removeFormStyle();
					} );
				}

				$( '.btn-close-search-form' ).on( 'click', function( e ) {
					e.preventDefault();
					self.removeFormStyle();
				} );

				return self;
			},

			removeFormStyle: function() {
				this.$form.removeAttr( 'style' );
				var $searchToggle = this.$popup.find( '.search-toggle' );
				$searchToggle.removeClass( 'opened' );
				if ( 'overlay' == this.form_layout ) {
					$( 'html' ).removeClass( 'porto-search-opened porto-search-overlay-wrap' );
					$searchToggle.siblings( '.search-layout-overlay' ).removeClass( 'show' );
					$searchToggle.closest( '.vc_row.vc_row-flex>.vc_column_container>.vc_column-inner' ).css( 'z-index', '' );
				} else if ( 'reveal' == this.form_layout && this.parents && this.parents.length >= 1 ) {
					$( 'body' ).removeClass( 'porto-search-opened' );
					this.parents.forEach( $element => {
						$element.removeClass( 'position-static' );
					});
					if ( this.topParent ) {
						this.topParent.removeClass( 'position-relative' );
					}
				}
				if ( this.$popup.find( '.btn-close-search-form' ).length ) {
					this.$popup.parent().removeClass( 'position-static' );
				}
			}
		}

	} );

} ).apply( this, [window.theme, jQuery] );


// Carousel

( function( theme, $ ) {
	'use strict';

	theme = theme || {};

	var instanceName = '__carousel';

	var Carousel = function( $el, opts ) {
		return this.initialize( $el, opts );
	};

	Carousel.defaults = $.extend( {}, {
		loop: true,
		navText: [],
		themeConfig: false,
		lazyLoad: true,
		lg: 0,
		md: 0,
		sm: 0,
		xs: 0,
		single: false,
		rtl: theme.rtl
	} );

	Carousel.prototype = {
		initialize: function( $el, opts ) {
			if ( $el.data( instanceName ) ) {
				return this;
			}

			this.$el = $el;

			this
				.setData()
				.setOptions( opts )
				.build();

			return this;
		},

		setData: function() {
			this.$el.data( instanceName, true );

			return this;
		},

		setOptions: function( opts ) {
			if ( ( opts && opts.themeConfig ) || !opts ) {
				this.options = $.extend( true, {}, Carousel.defaults, theme.owlConfig, opts, {
					wrapper: this.$el,
					themeConfig: true
				} );
			} else {
				this.options = $.extend( true, {}, Carousel.defaults, opts, {
					wrapper: this.$el
				} );
			}

			return this;
		},

		calcOwlHeight: function( $el ) {
			var h = 0;
			$el.find( '.owl-item.active' ).each( function() {
				if ( h < $( this ).height() )
					h = $( this ).height();
			} );
			$el.children( '.owl-stage-outer' ).height( h );
		},

		build: function() {
			if ( !$.fn.owlCarousel ) {
				return this;
			}

			var $el = this.options.wrapper,
				loop = this.options.loop,
				lg = this.options.lg,
				md = this.options.md,
				sm = this.options.sm,
				xs = this.options.xs,
				single = this.options.single,
				zoom = $el.find( '.zoom' ).filter( function() {
					if ( $( this ).closest( '.tb-image-type-slider' ).length ) {
						return false;
					}
					return true;
				} ).get( 0 ),
				responsive = {},
				items,
				count = $el.find( '.owl-item' ).length > 0 ? $el.find( '.owl-item:not(.cloned)' ).length : $el.find( '> *' ).length,
				fullscreen = typeof this.options.fullscreen == 'undefined' ? false : this.options.fullscreen;


			/*if (fullscreen) {
				$el.children().width(window.innerWidth - theme.getScrollbarWidth());
				$el.children().height($el.closest('.fullscreen-carousel').length ? $el.closest('.fullscreen-carousel').height() : window.innerHeight);
				$el.children().css('max-height', '100%');
				$(window).on('resize', function() {
					$el.find('.owl-item').children().width(window.innerWidth - theme.getScrollbarWidth());
					$el.find('.owl-item').children().height($el.closest('.fullscreen-carousel').length ? $el.closest('.fullscreen-carousel').height() : window.innerHeight);
					$el.find('.owl-item').children().css('max-height', '100%');
				});
			}*/

			if ( single ) {
				items = 1;
			} else if ( typeof this.options.responsive != 'undefined' ) {
				for ( var w in this.options.responsive ) {
					var number_items = Number( this.options.responsive[w] );
					responsive[Number( w )] = { items: number_items, loop: ( loop && count >= number_items ) ? true : false };
				}
			} else {
				items = this.options.items ? this.options.items : ( lg ? lg : 1 );
				var isResponsive = ( this.options.xxl || this.options.xl || lg || md || sm || xs );
				if ( isResponsive ) {
					if ( this.options.xxl ) {
						responsive[theme.screen_xxl] = { items: this.options.xxl, loop: ( loop && count > this.options.xxl ) ? true : false, mergeFit: this.options.mergeFit };
					} else if ( lg && items > lg + 1 ) {
						responsive[theme.screen_xxl] = { items: items, loop: ( loop && count > items ) ? true : false, mergeFit: this.options.mergeFit };
						responsive[theme.screen_xl] = { items: lg + 1, loop: ( loop && count > lg + 1 ) ? true : false, mergeFit: this.options.mergeFit };
					}
					if ( this.options.xl ) {
						responsive[theme.screen_xl] = { items: this.options.xl, loop: ( loop && count > this.options.xl ) ? true : false, mergeFit: this.options.mergeFit };
					} else if ( typeof responsive[theme.screen_xl] == 'undefined' && ( ! lg || items != lg ) ) {
						responsive[theme.screen_xl] = { items: items, loop: ( loop && count >= items ) ? true : false, mergeFit: this.options.mergeFit };
					}
					if ( lg ) responsive[992] = { items: lg, loop: ( loop && count >= lg ) ? true : false, mergeFit: this.options.mergeFit_lg };
					if ( md ) responsive[768] = { items: md, loop: ( loop && count > md ) ? true : false, mergeFit: this.options.mergeFit_md };
					if ( sm ) {
						responsive[576] = { items: sm, loop: ( loop && count > sm ) ? true : false, mergeFit: this.options.mergeFit_sm };
					} else {
						if ( xs && xs > 1 )  {
							responsive[576] = { items: xs, loop: ( loop && count > xs ) ? true : false, mergeFit: this.options.mergeFit_sm };
						} else {
							responsive[576] = { items: 1, mergeFit: false };
						}
					}
					if ( xs ) {
						responsive[0] = { items: xs, loop: ( loop && count > xs ) ? true : false, mergeFit: this.options.mergeFit_xs };
					} else {
						responsive[0] = { items: 1 };
					}
				}
			}

			if ( !$el.hasClass( 'show-nav-title' ) && this.options.themeConfig && theme.slider_nav && theme.slider_nav_hover ) {
				$el.addClass( 'show-nav-hover' );
			}

			this.options = $.extend( true, {}, this.options, {
				items: items,
				loop: ( loop && count > items ) ? true : false,
				responsive: responsive,
				onInitialized: function() {
					if ( $el.hasClass( 'stage-margin' ) ) {
						$el.find( '.owl-stage-outer' ).css( {
							'margin-left': this.options.stagePadding,
							'margin-right': this.options.stagePadding
						} );
					}
					var heading_cls = '.porto-u-heading, .vc_custom_heading, .slider-title, .elementor-widget-heading, .porto-heading';
					if ( $el.hasClass( 'show-dots-title' ) && ( $el.prev( heading_cls ).length || $el.closest( '.slider-wrapper' ).prev( heading_cls ).length || $el.closest( '.porto-recent-posts' ).prev( heading_cls ).length || $el.closest( '.elementor-widget-porto_recent_posts, .elementor-section' ).prev( heading_cls ).length ) ) {
						var $obj = $el.prev( heading_cls );
						if ( !$obj.length ) {
							$obj = $el.closest( '.slider-wrapper' ).prev( heading_cls );
						}
						if ( !$obj.length ) {
							$obj = $el.closest( '.porto-recent-posts' ).prev( heading_cls );
						}
						if ( !$obj.length ) {
							$obj = $el.closest( '.elementor-widget-porto_recent_posts, .elementor-section' ).prev( heading_cls );
						}
						try {
							var innerWidth = $obj.addClass( 'w-auto' ).css( 'display', 'inline-block' ).width();
							$obj.removeClass( 'w-auto' ).css( 'display', '' );
							if ( innerWidth + 15 + $el.find( '.owl-dots' ).width() <= $obj.width() ) {
								$el.find( '.owl-dots' ).css( ( $( 'body' ).hasClass( 'rtl' ) ? 'right' : 'left' ), innerWidth + 15 + ( $el.width() - $obj.width() ) / 2 );
								$el.find( '.owl-dots' ).css( 'top', -1 * $obj.height() / 2 - parseInt( $obj.css( 'margin-bottom' ) ) - $el.find( '.owl-dots' ).height() / 2 + 2 );
							} else {
								$el.find( '.owl-dots' ).css( 'position', 'static' );
							}
						} catch ( e ) { }
					}
				}
			} );

			// Auto Height Fixes
			if ( this.options.autoHeight ) {
				var thisobj = this;
				$( window ).on( 'resize', function() {
					thisobj.calcOwlHeight( $el );
				} );

				if ( theme.isLoaded ) {
					setTimeout( function() {
						thisobj.calcOwlHeight( $el );
					}, 100 );
				} else {
					$( window ).on( 'load', function() {
						thisobj.calcOwlHeight( $el );
					} );
				}
			}

			var links = false;
			if ( zoom ) {
				links = [];
				var i = 0;

				$el.find( '.zoom' ).each( function() {
					var slide = {},
						$zoom = $( this );

					slide.src = $zoom.data( 'src' ) ? $zoom.data( 'src' ) : $zoom.data( 'mfp-src' );
					slide.title = $zoom.data( 'title' );
					links[i] = slide;
					$zoom.data( 'index', i );
					i++;
				} );
			}

			if ( $el.hasClass( 'show-nav-title' ) ) {
				this.options.stagePadding = 0;
			} else {
				if ( this.options.themeConfig && theme.slider_nav && theme.slider_nav_hover )
					$el.addClass( 'show-nav-hover' );
				if ( this.options.themeConfig && !theme.slider_nav_hover && theme.slider_margin )
					$el.addClass( 'stage-margin' );
			}
			if ( $el.hasClass( 'has-ccols-spacing' ) ) {
				$el.removeClass( 'has-ccols-spacing' );
			}
			$el.owlCarousel( this.options );

			if ( zoom && links ) {
				$el.on( 'click', '.zoom', function( e ) {
					e.preventDefault();
					if ( $.fn.magnificPopup ) {
						var image_index = $( this ).data( 'index' );
						if ( typeof image_index == 'undefined' ) {
							image_index = ( $( this ).closest( '.owl-item' ).index() - $el.find( '.cloned' ).length / 2 ) % $el.data( 'owl.carousel' ).items().length;
						}
						$.magnificPopup.close();
						$.magnificPopup.open( $.extend( true, {}, theme.mfpConfig, {
							items: links,
							gallery: {
								enabled: true
							},
							type: 'image'
						} ), image_index );
					}
					return false;
				} );
			}

			return this;
		}
	}
	// expose to scope
	$.extend( theme, {
		Carousel: Carousel
	} );

	// jquery plugin
	$.fn.themeCarousel = function( opts, zoom ) {
		if ( typeof $.fn.owlCarousel != 'function' ) {
			return this;
		}
		return this.map( function() {
			var $this = $( this );

			if ( $this.data( instanceName ) ) {
				return $this;
			} else {
				return new theme.Carousel( $this, opts, zoom );
			}

		} );
	}

} ).apply( this, [window.theme, jQuery] );

// Lightbox
( function( theme, $ ) {
	'use strict';

	theme = theme || {};

	var instanceName = '__lightbox';

	var Lightbox = function( $el, opts ) {
		return this.initialize( $el, opts );
	};

	Lightbox.defaults = {
		callbacks: {
			open: function() {
				$( 'body' ).addClass( 'lightbox-opened' );
			},
			close: function() {
				$( 'body' ).removeClass( 'lightbox-opened' );
			}
		}
	};

	Lightbox.prototype = {
		initialize: function( $el, opts ) {
			if ( $el.data( instanceName ) ) {
				return this;
			}

			this.$el = $el;

			this
				.setData()
				.setOptions( opts )
				.build();

			return this;
		},

		setData: function() {
			this.$el.data( instanceName, this );

			return this;
		},

		setOptions: function( opts ) {
			this.options = $.extend( true, {}, Lightbox.defaults, theme.mfpConfig, opts, {
				wrapper: this.$el
			} );

			return this;
		},

		build: function() {
			if ( !$.fn.magnificPopup ) {
				return this;
			}

			this.options.wrapper.magnificPopup( this.options );

			return this;
		}
	};

	// expose to scope
	$.extend( theme, {
		Lightbox: Lightbox
	} );

	// jquery plugin
	$.fn.themeLightbox = function( opts ) {
		return this.map( function() {
			var $this = $( this );

			if ( $this.data( instanceName ) ) {
				return $this.data( instanceName );
			} else {
				return new theme.Lightbox( $this, opts );
			}

		} );
	}

} ).apply( this, [window.theme, jQuery] );

// Post Filter
( function( theme, $ ) {
	'use strict';

	theme = theme || {};

	$.extend( theme, {

		PostFilter: {

			cache: {
			},

			defaults: {
				elements: '.portfolio-filter'
			},

			initialize: function( $elements, post_type ) {
				this.$elements = ( $elements || $( this.defaults.elements ) );
				this.build( post_type );

				return this;
			},

			filterFn: function( e ) {
				if ( typeof e == 'undefined' || typeof e.data == 'undefined' || typeof e.data.elements == 'undefined' || !e.data.elements || !e.data.elements.length ) {
					return;
				}
				var self = e.data.selfobj;

				if ( self.isLoading ) {
					return false;
				}
				var $this = e.data.thisobj,
					$elements = e.data.elements,
					position = e.data.position,
					post_type = e.data.post_type,
					$parent = e.data.parent,
					$posts_wrap = e.data.posts_wrap,
					use_ajax = e.data.use_ajax,
					page_path = e.data.page_path,
					infinite_load = e.data.infinite_load,
					load_more = e.data.load_more;
				e.preventDefault();
				if ( $( this ).hasClass( 'active' ) ) {
					return;
				}

				self.isLoading = true;
				var selector = $( this ).attr( 'data-filter' );
				if ( 'sidebar' == position ) {
					$( '.sidebar-overlay' ).trigger( 'click' );
				}

				$this.find( '.active' ).removeClass( 'active' );

				if ( use_ajax ) {
					var current_cat = '*' == selector ? '' : selector;
					if ( !page_path ) {
						page_path = $posts_wrap.data( 'page_path' );
					}
					if ( page_path ) {
						$posts_wrap.data( 'page_path', page_path.replace( /&category=[^&]*&/, '&category=' + current_cat + '&' ) );
					}

					$( this ).addClass( 'active' );
					self.load_posts( current_cat, infinite_load || load_more ? true : false, $parent, post_type, $posts_wrap, undefined, $( this ).children( 'a' ).attr( 'href' ) );
				} else if ( 'faq' == post_type ) {
					$parent.find( '.faq' ).each( function() {
						var $that = $( this ), easing = "easeInOutQuart", timeout = 300;
						if ( selector == '*' ) {
							if ( $that.css( 'display' ) == 'none' ) $that.stop( true ).slideDown( timeout, easing, function() {
								$( this ).attr( 'style', '' ).show();
							} );
							selected++;
						} else {
							if ( $that.hasClass( selector ) ) {
								if ( $that.css( 'display' ) == 'none' ) $that.stop( true ).slideDown( timeout, easing, function() {
									$( this ).attr( 'style', '' ).show();
								} );
								selected++;
							} else {
								if ( $that.css( 'display' ) != 'none' ) $that.stop( true ).slideUp( timeout, easing, function() {
									$( this ).attr( 'style', '' ).hide();
								} );
							}
						}
					} );

					if ( !selected && $parent.find( '.faqs-infinite' ).length && typeof ( $.fn.infinitescroll ) != 'undefined' ) {
						$parent.find( '.faqs-infinite' ).infinitescroll( 'retrieve' );
					}
				} else if ( $parent.hasClass( 'portfolios-timeline' ) ) {
					var selected = 0;
					$parent.find( '.portfolio' ).each( function() {
						var $that = $( this ), easing = "easeInOutQuart", timeout = 300;
						if ( selector == '*' ) {
							if ( $that.css( 'display' ) == 'none' ) $that.stop( true ).slideDown( timeout, easing, function() {
								$( this ).attr( 'style', '' ).show();
							} );
							selected++;
						} else {
							if ( $that.hasClass( selector ) ) {
								if ( $that.css( 'display' ) == 'none' ) $that.stop( true ).slideDown( timeout, easing, function() {
									$( this ).attr( 'style', '' ).show();
								} );
								selected++;
							} else {
								if ( $that.css( 'display' ) != 'none' ) $that.stop( true ).slideUp( timeout, easing, function() {
									$( this ).attr( 'style', '' ).hide();
								} );
							}
						}
					} );
					if ( !selected && $parent.find( '.portfolios-infinite' ).length && typeof ( $.fn.infinitescroll ) != 'undefined' ) {
						$parent.find( '.portfolios-infinite' ).infinitescroll( 'retrieve' );
					}
					setTimeout( function() {
						theme.FilterZoom.initialize( $parent );
					}, 400 );
				} else {
					$parent.find( '.' + post_type + '-row' ).isotope( {
						filter: selector == '*' ? selector : '.' + selector
					} );
				}

				if ( !use_ajax ) {
					$( this ).addClass( 'active' );
					self.isLoading = false;
				}

				if ( position == 'sidebar' ) {
					self.$elements.each( function() {
						var $that = $( this );

						if ( $that == $this && $that.data( 'position' ) != 'sidebar' ) return;
						$that.find( 'li' ).removeClass( 'active' );
						$that.find( 'li[data-filter="' + selector + '"]' ).addClass( 'active' );
					} );
				}

				if ( !use_ajax ) {
					window.location.hash = '#' + selector;
				}
				theme.refreshVCContent();
				return false;
			},

			build: function( post_type_param ) {
				var self = this;

				self.$elements.each( function() {
					var $this = $( this ),
						position = $this.data( 'position' ),
						$parent,
						post_type;
					if ( typeof post_type_param == 'undefined' ) {
						if ( $this.hasClass( 'member-filter' ) ) {
							post_type = 'member';
						} else if ( $this.hasClass( 'faq-filter' ) ) {
							post_type = 'faq';
						} else if ( $this.hasClass( 'product-filter' ) ) {
							post_type = 'product';
						} else if ( $this.hasClass( 'post-filter' ) ) {
							post_type = 'post';
						} else if ( $this.hasClass( 'portfolio-filter' ) ) {
							post_type = 'portfolio';
						} else {
							post_type = $this.attr( 'data-filter-type' );
						}
					} else {
						post_type = post_type_param;
					}

					if ( 'sidebar' == position ) {
						$parent = $( '.main-content .page-' + post_type + 's' );
						//theme.scrolltoContainer($parent);
					} else if ( 'global' == position ) {
						$parent = $( '.main-content .page-' + post_type + 's' );
					} else {
						$parent = $this.closest( '.page-' + post_type + 's' );
					}
					if ( !$parent.length ) {
						$parent = $this.closest( '.porto-posts-grid' );
					}
					if ( !$parent || !$parent.length ) {
						return;
					}
					var use_ajax = $this.hasClass( 'porto-ajax-filter' ),
						infinite_load = $parent.hasClass( 'load-infinite' ),
						load_more = $parent.hasClass( 'load-more' );

					var $posts_wrap = $parent.find( '.' + post_type + 's-container' ),
						page_path;
					if ( use_ajax && ( ( !infinite_load && !load_more ) || !$parent.data( 'ajax_load_options' ) ) ) {
						var current_url = window.location.href;
						if ( -1 !== current_url.indexOf( '#' ) ) {
							current_url = current_url.split( '#' )[0];
						}
						page_path = theme.ajax_url + ( -1 === theme.ajax_url.indexOf( '?' ) ? '?' : '&' )  + 'action=porto_ajax_posts&nonce=' + js_porto_vars.porto_nonce + '&post_type=' + post_type + '&current_link=' + current_url + '&category=&page=%cur_page%';
						if ( $parent.data( 'post_layout' ) ) {
							page_path += '&post_layout=' + $parent.data( 'post_layout' );
						}
						$posts_wrap.data( 'page_path', page_path );
					}

					$this.find( 'li' ).on( 'click', { thisobj: $this, selfobj: self, elements: self.$elements, position: position, parent: $parent, post_type: post_type, posts_wrap: $posts_wrap, use_ajax: use_ajax, page_path: page_path, infinite_load: infinite_load, load_more: load_more }, self.filterFn );
				} );

				$( window ).on( 'hashchange', { elements: self.$elements }, self.hashchange );
				self.hashchange( { data: { elements: self.$elements } } );

				return self;
			},

			hashchange: function( e ) {
				if ( typeof e == 'undefined' || typeof e.data == 'undefined' || typeof e.data.elements == 'undefined' || !e.data.elements || !e.data.elements.length ) {
					return;
				}
				var $elements = e.data.elements,
					$filter = $( $elements.get( 0 ) ),
					hash = window.location.hash;

				if ( hash ) {
					var $o = $filter.find( 'li[data-filter="' + hash.replace( '#', '' ) + '"]' );
					if ( !$o.hasClass( 'active' ) ) {
						$o.trigger( 'click' );
					}
				}
			},

			set_elements: function( $elements ) {
				var self = this;
				if ( typeof $elements == 'undefined' || !$elements || !$elements.length ) {
					self.destroy( self.$elements );
					return;
				}
				self.$elements = $elements;
				$( window ).off( 'hashchange', self.hashchange ).on( 'hashchange', { elements: $elements }, self.hashchange );
			},

			destroy: function( $elements ) {
				if ( typeof $elements == 'undefined' || !$elements || !$elements.length ) {
					return;
				}
				var self = this;
				$elements.find( 'li' ).off( 'click', self.filterFn );
				$( window ).off( 'hashchange', self.hashchange );
			},

			load_posts: function( cat, is_infinite, $parent, post_type, $posts_wrap, default_args, page_url ) {
				var _gridcookie = '';
				if ( $parent.hasClass( 'archive-products' ) ) {
					_gridcookie = new URLSearchParams( location.search.substring( 1 ) ).get( 'gridcookie' );
					if ( ! ( _gridcookie == null || _gridcookie == '' || _gridcookie == 'grid' ) ) {
						page_url = theme.addUrlParam( page_url, 'gridcookie', _gridcookie );
					}
				}
				var pid = $parent.attr( 'id' ),
					self = this,
					is_archive = $parent.hasClass( 'archive-posts' ),
					successfn = function( res, directcall ) {
						if ( !res ) {
							return;
						}
						if ( ( typeof directcall == 'undefined' || true !== directcall ) && typeof default_args == 'undefined' && pid ) {
							if ( !self.cache[pid] ) {
								self.cache[pid] = {};
							}
							self.cache[pid][cat + _gridcookie] = res;
						}
						var $res = $( res ),
							is_shop = $parent.hasClass( 'archive-products' ),
							$posts = $res.find( is_archive ? '.archive-posts .posts-wrap' : '.posts-wrap' ).children();

						if ( !$posts.length ) {
							return;
						}

						if ( typeof $posts_wrap == 'undefined' || is_archive ) {
							$posts_wrap = $parent.find( '.' + post_type + 's-container' );
						}
						if ( !$posts_wrap.length ) {
							return;
						}

						if ( $posts_wrap.data( 'isotope' ) ) {
							$posts_wrap.isotope( 'remove', $posts_wrap.children() );
						} else {
							$posts_wrap.children().remove();
						}

						if ( $posts_wrap.hasClass( 'owl-loaded' ) ) {
							$posts_wrap.removeClass( 'owl-loaded' );
						}
						$posts.children().addClass( 'fadeInUp animated' );
						$posts_wrap.append( $posts );
						theme.refreshVCContent( $posts );

						// filter
						var $old_filter = $parent.find( '.' + post_type + '-filter' );
						if ( $old_filter.length && !$old_filter.hasClass( 'porto-ajax-filter' ) && !$parent.hasClass( 'load-infinite' ) && !$parent.hasClass( 'load-more' ) ) {
							var $new_filter = $res.find( ( is_archive ? '.archive-posts ' : '' ) + '.' + post_type + '-filter' );
							if ( $new_filter.length ) {
								$old_filter.find( 'li:first-child' ).trigger( 'click' );
								theme.PostFilter.destroy( $old_filter );
								$old_filter.replaceWith( $new_filter );
								//$new_filter = $parent.find( '.' + post_type + '-filter' );
								theme.PostFilter.initialize( $new_filter, post_type );
								theme.PostFilter.set_elements( $( 'ul[data-filter-type], ul.portfolio-filter, ul.member-filter, ul.faq-filter, .porto-ajax-filter.product-filter, .porto-ajax-filter.post-filter' ) );
							}
						}

						porto_init( $parent );

						var behavior_action = '';
						if ( post_type != 'product' && post_type != 'member' && post_type != 'faq' && post_type != 'portfolio' && post_type != 'post' ) {
							behavior_action = 'ptu';
						} else {
							behavior_action = post_type;
						}
						theme.PostsInfinite[behavior_action + 'Behavior']( $posts, $posts_wrap );

						// init CountDown
						$( document.body ).trigger( 'porto_init_countdown', [$posts_wrap] );

						// pagination
						var $old_pagination = $parent.find( '.pagination-wrap' ),
							$new_pagination = $res.find( ( is_archive ? '.archive-posts ' : '' ) + '.pagination-wrap' ).eq( 0 ),
							has_pagination = false,
							nst_pagination = false;
						if ( $old_pagination.length ) {
							if ( $new_pagination.length ) {
								$old_pagination.replaceWith( $new_pagination );
								has_pagination = true;
								nst_pagination = true;
							} else {
								$old_pagination.children().remove();
							}
						} else if ( $new_pagination.length ) {
							$parent.append( $new_pagination );
							has_pagination = true;
							nst_pagination = true;
						}

						if ( is_shop ) { // shop builder with counter per page widget
							let _paginationWrap = $( '.woocommerce-pagination' );
							var $old_pagination = _paginationWrap.find( 'ul.page-numbers' ),
							$new_pagination = $res.find( '.woocommerce-pagination ul.page-numbers' ).eq( 0 ),
							has_pagination = false;
							if ( $old_pagination.length ) {
								if ( $new_pagination.length ) {
									$old_pagination.replaceWith( $new_pagination );
									has_pagination = true;
								} else {
									$old_pagination.children().remove();
								}
							} else if ( $new_pagination.length ) {
								_paginationWrap.append( $new_pagination );
								has_pagination = true;
							}
						}
					

						if ( is_infinite ) {
							var infinitescroll_ins = $posts_wrap.data( 'infinitescroll' );
							if ( has_pagination || ( is_shop && nst_pagination ) ) {
								var $new_posts_wrap = $res.find( is_archive ? '.archive-posts .posts-wrap' : '.posts-wrap' );
								if ( $new_posts_wrap.data( 'cur_page' ) ) {
									$posts_wrap.data( 'cur_page', $new_posts_wrap.data( 'cur_page' ) );
									$posts_wrap.data( 'max_page', $new_posts_wrap.data( 'max_page' ) );
								}

								var should_init_again = true;
								if ( infinitescroll_ins ) {
									if ( infinitescroll_ins.options.state.isDestroyed ) {
										$posts_wrap.removeData( 'infinitescroll' );
									} else {
										should_init_again = false;
										if ( $new_posts_wrap.data( 'cur_page' ) ) {
											infinitescroll_ins.update( {
												maxPage: $new_posts_wrap.data( 'max_page' ),
												state: {
													currPage: $new_posts_wrap.data( 'cur_page' )
												}
											} );
										}
										if ( infinitescroll_ins.options.state.isPaused ) {
											infinitescroll_ins.resume();
										}
									}
								}

								if ( should_init_again ) {
									var ins = $posts_wrap.data( '__postsinfinite' );
									if ( ins ) {
										ins.destroy();
									}
									var selector_product = '.' + post_type + ', .timeline-date';
									if ( is_shop ) {
										selector_product = '.archive-products .product';
										if ( $( '.elementor-widget-wc-archive-products' ).length ) {
											selector_product = '.elementor-widget-wc-archive-products .product';
										}
									}
									new theme.PostsInfinite( $posts_wrap, selector_product, $posts_wrap.data( 'infiniteoptions' ), post_type );
								}

								if ( is_archive ) {
									var page_path = $posts_wrap.siblings( '.pagination-wrap' ).find( '.next' ).attr( 'href' );
									if ( page_path ) {
										page_path += ( -1 !== page_path.indexOf( '?' ) ? '&' : '?' ) + 'portoajax=1&load_posts_only=2';
										page_path = page_path.replace( /(paged=)(\d+)|(page\/)(\d+)/, '$1$3%cur_page%' );
										$posts_wrap.data( 'page_path', page_path );
									}
								}
								var selector_product = '.' + post_type + ', .timeline-date';
								if ( is_shop ) {
									selector_product = '.archive-products .product';
									if ( $( '.elementor-widget-wc-archive-products' ).length ) {
										selector_product = '.elementor-widget-wc-archive-products .product';
									}
								}
								new theme.PostsInfinite( $posts_wrap, selector_product, $posts_wrap.data( 'infiniteoptions' ), post_type );
							}
						}

						// in archive page
						if ( is_archive ) {
							// update widgets
							$( '.sidebar-content' ).each( function( index ) {
								var $this = $( this ),
									$that = $( $res.find( '.sidebar-content' ).get( index ) );

								$this.html( $that.html() );

								// in shop
								if ( is_shop ) {
									if ( typeof updateSelect2 != 'undefined' && updateSelect2 ) {
										// Use Select2 enhancement if possible
										if ( jQuery().selectWoo ) {
											var porto_wc_layered_nav_select = function() {
												$this.find( 'select.woocommerce-widget-layered-nav-dropdown' ).each( function() {
													$( this ).selectWoo( {
														placeholder: $( this ).find( 'option' ).eq( 0 ).text(),
														minimumResultsForSearch: 5,
														width: '100%',
														allowClear: typeof $( this ).attr( 'multiple' ) != 'undefined' && $( this ).attr( 'multiple' ) == 'multiple' ? 'false' : 'true'
													} );
												} );
											};
											porto_wc_layered_nav_select();
										}
										$( 'body' ).children( 'span.select2-container' ).remove();
									}
								}
							} );

							// in shop
							if ( is_shop ) {
								var $script = $res.filter( 'script:contains("var woocommerce_price_slider_params")' ).first();
								if ( $script && $script.length && $script.text().indexOf( '{' ) !== -1 && $script.text().indexOf( '}' ) !== -1 ) {
									var arrStr = $script.text().substring( $script.text().indexOf( '{' ), $script.text().indexOf( '}' ) + 1 );
									window.woocommerce_price_slider_params = JSON.parse( arrStr );
								}

								// update entry title
								var $title = $( '.entry-title' );
								if ( $title.length ) {
									var $newTitle = $res.find( '.entry-title' ).eq( 0 );
									if ( $newTitle.length ) {
										$title.html( $newTitle.html() );
									}
								}

								// update entry description
								var $desc = $( '.entry-description' );
								if ( $desc.length ) {
									var $newDesc = $res.find( '.entry-description' ).eq( 0 );
									if ( $newDesc.length ) {
										$desc.html( $newDesc.html() );
									}
								}

								// top toolbar
								var shop_before = '.shop-loop-before',
									$shop_before = $( shop_before );
								if ( $shop_before.length ) {
									if ( $res.find( shop_before ).length ) {
										$shop_before.each( function( index ) {
											var $res_shop_before = $res.find( shop_before ).eq( index );
											if ( $res_shop_before.length ) {
												$( this ).html( $res_shop_before.html() ).show();
											}
										} );
									} else {
										$shop_before.empty();
									}
								}

								// update result count
								var $count = $( '.woocommerce-result-count' );
								if ( $count.length ) {
									var $newCount = $res.find( '.woocommerce-result-count' ).eq( 0 );
									if ( $newCount.length ) {
										$count[0].outerHTML = $newCount.length ? $newCount[0].outerHTML : '';
									}
								}

								// trigger ready event
								$( document ).trigger( 'yith_wcan_init_shortcodes' );
								$( document ).trigger( 'yith-wcan-ajax-filtered' );
							}

							// update browser history (IE doesn't support it)
							if ( page_url && !navigator.userAgent.match( /msie/i ) ) {
								window.history.pushState( { 'pageTitle': ( res && res.pageTitle ) || '' }, '', page_url );
							}
						}

						$( document.body ).trigger( 'porto_load_posts_end', [$parent.parent()] );
					};

				if ( typeof default_args == 'undefined' && typeof self.cache[pid] != 'undefined' && typeof self.cache[pid][cat+ _gridcookie] != 'undefined' && self.cache[pid][cat+ _gridcookie] ) {
					successfn( self.cache[pid][cat+ _gridcookie], true );
					self.isLoading = false;
					$parent.removeClass( 'porto-ajax-loading' ).removeClass( 'loading' ).find( '.porto-loading-icon' ).remove();
					return;
				}

				var ajax_load_options = $parent.data( 'ajax_load_options' );
				if ( ( $parent.hasClass( 'archive-products' ) && -1 != js_porto_vars.use_skeleton_screen.indexOf( 'shop' ) ) ||
					( is_archive && -1 != js_porto_vars.use_skeleton_screen.indexOf( 'blog' ) ) ) { // skeleton screen in archive builder
					$posts_wrap = $parent.find( '.' + post_type + 's-container' );
					if ( ajax_load_options ) {
						var tag_name = 'div';
						if ( 'product' == post_type && 'ul' == $posts_wrap.get( 0 ).tagName.toLowerCase() ) {
							tag_name = 'li';
						}
						$posts_wrap.addClass( 'skeleton-body' ).empty();
						for ( var i = 0; i < Number( ajax_load_options.count || ( ajax_load_options.columns && ajax_load_options.columns * 3 ) || 12 ); i++ ) {
							$posts_wrap.append( '<' + tag_name + ' class="porto-tb-item post ' + post_type + ( 'product' == post_type ? ' product-col' : '' ) + '"></' + tag_name + '>' );
						}
					} else {
						$posts_wrap.addClass( 'skeleton-body' ).children().empty();
					}
				} else {
					if ( !$parent.children( '.porto-loading-icon' ).length ) {
						$parent.append( '<i class="porto-loading-icon"></i>' );
					}
					$parent.addClass( 'porto-ajax-loading' );
				}

				var current_url = window.location.href;
				if ( -1 !== current_url.indexOf( '#' ) ) {
					current_url = current_url.split( '#' )[0];
				}

				var args, load_url = theme.ajax_url;
				if ( $parent.hasClass( 'archive-posts' ) ) { // archive builder
					args = {
						portoajax: true,
						load_posts_only: true
					};
					if ( $parent.closest( '.porto-block' ).length ) {
						args['builder_id'] = $parent.closest( '.porto-block' ).data( 'id' );
					}
					load_url = typeof page_url != 'undefined' ? page_url : current_url;
				} else {
					args = {
						action: 'porto_ajax_posts',
						nonce: js_porto_vars.porto_nonce,
						post_type: post_type,
						current_link: current_url
					};
					if ( $parent.data( 'post_layout' ) ) {
						args['post_layout'] = $parent.data( 'post_layout' );
					}
					if ( ajax_load_options ) {
						args['extra'] = ajax_load_options;
					}
					if ( typeof default_args != 'undefined' ) {
						args = $.extend( args, default_args );
					}
				}
				if ( cat ) {
					args['category'] = cat;
				}

				$.ajax( {
					url: load_url,
					type: 'post',
					data: args,
					success: successfn,
					complete: function() {
						self.isLoading = false;
						$posts_wrap.removeClass( 'skeleton-body' );
						$parent.removeClass( 'porto-ajax-loading' ).removeClass( 'loading' ).find( '.porto-loading-icon' ).remove();
					}
				} );

			}
		}

	} );

} ).apply( this, [window.theme, jQuery] );

// Filter Zoom
( function( theme, $ ) {
	'use strict';

	theme = theme || {};

	$.extend( theme, {

		FilterZoom: {

			defaults: {
				elements: null
			},

			initialize: function( $elements ) {
				this.$elements = ( $elements || this.defaults.elements );

				this.build();

				return this;
			},

			build: function() {
				var self = this;

				self.$elements.each( function() {
					var $this = $( this ),
						zoom = $this.find( '.zoom, .thumb-info-zoom' ).get( 0 );

					if ( !zoom ) return;

					$this.find( '.zoom, .thumb-info-zoom' ).off( 'click' );
					var links = [];
					var i = 0;
					$this.find( 'article' ).each( function() {
						var $that = $( this );
						if ( $that.css( 'display' ) != 'none' ) {
							var $zoom = $that.find( '.zoom, .thumb-info-zoom' ),
								slide,
								src = $zoom.data( 'src' ),
								title = $zoom.data( 'title' );

							$zoom.data( 'index', i );
							if ( Array.isArray( src ) ) {
								$.each( src, function( index, value ) {
									slide = {};
									slide.src = value;
									slide.title = title[index];
									links[i] = slide;
									i++;
								} );
							} else {
								slide = {};
								slide.src = src;
								slide.title = title;
								links[i] = slide;
								i++;
							}
						}
					} );
					$this.find( 'article' ).each( function() {
						var $that = $( this );
						if ( $that.css( 'display' ) != 'none' ) {
							$that.off( 'click', '.zoom, .thumb-info-zoom' ).on( 'click', '.zoom, .thumb-info-zoom', function( e ) {
								var $zoom = $( this ), $parent = $zoom.parents( '.thumb-info' ), offset = 0;
								if ( $parent.get( 0 ) ) {
									var $slider = $parent.find( '.porto-carousel' );
									if ( $slider.get( 0 ) ) {
										offset = $slider.data( 'owl.carousel' ).current() - $slider.find( '.cloned' ).length / 2;
									}
								}
								e.preventDefault();
								if ( $.fn.magnificPopup ) {
									$.magnificPopup.close();
									$.magnificPopup.open( $.extend( true, {}, theme.mfpConfig, {
										items: links,
										gallery: {
											enabled: true
										},
										type: 'image'
									} ), $zoom.data( 'index' ) + offset );
								}
								return false;
							} );
						}
					} );
				} );

				return self;
			}
		}

	} );

} ).apply( this, [window.theme, jQuery] );

/* initialize */
( function( theme, $ ) {
	theme.initAsync = function( $wrap, wrapObj ) {
		// Carousel
		if ( $.fn.themeCarousel ) {

			$( function() {
				
				var portoImgNavMiddle = function ( $el ) {
					var $images = $el.find( '.owl-item img' ),
						height = 0;
						for ( var i = 0; i < $images.length; i++) {
							var imgHeight = $images.eq(i).height();
							if ( height < imgHeight ) {
								height = imgHeight;
							}
						}
					if ( $el.hasClass( 'products-slider' ) ) {
						$el.children( '.owl-nav' ).css( 'top', ( 5 + height / 2 ) + 'px' );
					} else {
						$el.children( '.owl-nav' ).css( 'top', height / 2 + 'px' );
					}
				};
				// Carousel Lazyload images
				var portoCarouselInit = function( e ) {
					var $this = $( e.currentTarget );

					$this.find( '[data-appear-animation]:not(.appear-animation)' ).addClass( 'appear-animation' );
					if ( $this.find( '.owl-item.cloned' ).length ) {
						// compatibility with W3 Total Cache
						var $not_loaded = $this.find( 'img.lazy:not(.loaded)' );
						if ( $not_loaded.length ) {
							if (typeof window.w3tc_lazyload == 'object') {
								window.w3tc_lazyload.update();
							} else if (theme.w3tcLazyLoadInstance) {
								theme.w3tcLazyLoadInstance.update();
							}
						}

						if ( $.fn.themePluginLazyLoad ) {
							$this.find( '.porto-lazyload:not(.lazy-load-loaded)' ).themePluginLazyLoad( { effect: 'fadeIn', effect_speed: 400 } );
						}
						var $animates = e.currentTarget.querySelectorAll( '.appear-animation' );
						if ( $animates.length ) {
							if ( theme.animation_support ) {
								// theme.dynIntObsInit( $animates, 'themeAnimate', theme.Animate.defaults );
							} else {
								$animates.forEach( function( o ) {
									o.classList.add( 'appear-animation-visible' );
								} );
							}
						}
						if ( $.fn.themePluginAnimatedLetters && ( $( this ).find( '.owl-item.cloned [data-plugin-animated-letters]:not(.manual)' ).length ) ) {
							theme.dynIntObsInit( $( this ).find( '.owl-item.cloned [data-plugin-animated-letters]:not(.manual)' ), 'themePluginAnimatedLetters' );
						}
					}

					setTimeout( function() {
						var $hiddenItems = $this.find( '.owl-item:not(.active)' );
						if ( theme.animation_support ) {
							$hiddenItems.find( '.appear-animation' ).removeClass( 'appear-animation-visible' );
							$hiddenItems.find( '.appear-animation' ).each( function() {
								var $el = $( this ),
									delay = Math.abs( $el.data( 'appear-animation-delay' ) ? $el.data( 'appear-animation-delay' ) : 0 );
								if ( delay > 1 ) {
									this.style.animationDelay = delay + 'ms';
								}

								var duration = Math.abs( $el.data( 'appear-animation-duration' ) ? $el.data( 'appear-animation-duration' ) : 1000 );
								if ( 1000 != duration ) {
									this.style.animationDuration = duration + 'ms';
								}
							} );
						}
						if ( window.innerWidth >= 1200 ) {
							$hiddenItems.find( '[data-vce-animate]' ).removeAttr( 'data-vcv-o-animated' );
						}
						// Position the navigation in the middle of the image
						if ( $this.hasClass( 'nav-center-images-only' ) ) {
							portoImgNavMiddle( $this );
						}
					}, 300 );
				};
				var portoCarouselTranslated = function( e ) {
					var $this = $( e.currentTarget );
					/*if ( window.innerWidth > 767 ) {
						if ( $this.find( '.owl-item.cloned' ).length && $this.find( '.appear-animation:not(.appear-animation-visible)' ).length ) {
							$( document.body ).trigger( 'appear_refresh' );
						}
					}*/

					var $active = $this.find( '.owl-item.active' );
					if ( $active.hasClass( 'translating' ) ) {
						$active.removeClass( 'translating' );
						return;
					}
					$this.find( '.owl-item.translating' ).removeClass( 'translating' );
					// Animated Letters
					$this.find( '[data-plugin-animated-letters]' ).removeClass( 'invisible' );
					$this.find( '.owl-item.active [data-plugin-animated-letters]' ).trigger( 'animated.letters.initialize' );

					if ( window.innerWidth > 767 ) {
						// WPBakery
						$this.find( '.appear-animation' ).removeClass( 'appear-animation-visible' );
						$active.find( '.appear-animation' ).each( function() {
							var $animation_item = $( this ),
								anim_name = $animation_item.data( 'appear-animation' );
							$animation_item.addClass( anim_name + ' appear-animation-visible' );
						} );
					}

					// sticky sidebar
					if ( window.innerWidth > 991 ) {
						if ( $this.closest( '[data-plugin-sticky]' ).length ) {
							theme.refreshStickySidebar( false, $this.closest( '[data-plugin-sticky]' ) );
						}
					}

					// Elementor
					$active.find( '.slide-animate' ).each( function() {
						var $animation_item = $( this ),
							settings = $animation_item.data( 'settings' );
						if ( settings && ( settings._animation || settings.animation ) ) {
							var animation = settings._animation || settings.animation,
								delay = settings._animation_delay || settings.animation_delay || 0;
							theme.requestTimeout( function() {
								$animation_item.removeClass( 'elementor-invisible' ).addClass( 'animated ' + animation );
							}, delay );
						}
					} );

					// Visual Composer
					if ( window.innerWidth >= 1200 ) {
						$this.find( '[data-vce-animate]' ).removeAttr( 'data-vcv-o-animated' ).removeAttr( 'data-vcv-o-animated-fully' );
						$active.find( '[data-vce-animate]' ).each( function() {
							var $animation_item = $( this );
							if ( $animation_item.data( 'porto-origin-anim' ) ) {
								var anim_name = $animation_item.data( 'porto-origin-anim' );
								$animation_item.attr( 'data-vce-animate', anim_name ).attr( 'data-vcv-o-animated', true );
								var duration = parseFloat( window.getComputedStyle( this )['animationDuration'] ) * 1000,
									delay = parseFloat( window.getComputedStyle( this )['animationDelay'] ) * 1000;
								window.setTimeout( function() {
									$animation_item.attr( 'data-vcv-o-animated-fully', true );
								}, delay + duration + 5 );
							}
						} );
					}
				};
				var portoCarouselTranslateVC = function( e ) {
					var $this = $( e.currentTarget );
					$this.find( '.owl-item.active' ).addClass( 'translating' );

					if ( window.innerWidth >= 1200 ) {
						$this.find( '[data-vce-animate]' ).each( function() {
							var $animation_item = $( this );
							$animation_item.data( 'porto-origin-anim', $animation_item.data( 'vce-animate' ) ).attr( 'data-vce-animate', '' );
						} );
					}
				};
				var portoCarouselTranslateElementor = function( e ) {
					var $this = $( e.currentTarget );
					$this.find( '.owl-item.active' ).addClass( 'translating' );
					$this.find( '.owl-item:not(.active) .slide-animate' ).addClass( 'elementor-invisible' );
					$this.find( '.slide-animate' ).each( function() {
						var $animation_item = $( this ),
							settings = $animation_item.data( 'settings' );
						if ( settings._animation || settings.animation ) {
							$animation_item.removeClass( settings._animation || settings.animation );
						}
					} );
				};
				var portoCarouselTranslateWPB = function( e ) {
					if ( window.innerWidth > 767 ) {
						var $this = $( e.currentTarget );
						$this.find( '.owl-item.active' ).addClass( 'translating' );
						$this.find( '.appear-animation' ).each( function() {
							var $animation_item = $( this );
							$animation_item.removeClass( $animation_item.data( 'appear-animation' ) );
						} );
					}
				};

				var carouselItems = $wrap.find( '.owl-carousel:not(.manual)' );
				carouselItems.on( 'initialized.owl.carousel refreshed.owl.carousel', portoCarouselInit ).on( 'translated.owl.carousel', portoCarouselTranslated );
				carouselItems.on( 'translate.owl.carousel', function() {
					// Hide elements inside carousel
					$( this ).find( '[data-plugin-animated-letters]' ).addClass( 'invisible' );
					// Animated Letters
					$( this ).find( '[data-plugin-animated-letters]' ).trigger( 'animated.letters.destroy' );
				} );
				carouselItems.on( 'resized.owl.carousel', function () {
					var $this = $( this );
					// Position the navigation in the middle of the image
					if ( $this.hasClass( 'nav-center-images-only' ) ) {
						portoImgNavMiddle( $this );
					}
				} )
				carouselItems.filter( function() {
					if ( $( this ).find( '[data-vce-animate]' ).length ) {
						return true;
					}
					return false;
				} ).on( 'translate.owl.carousel', portoCarouselTranslateVC );
				carouselItems.filter( function() {
					var $anim_obj = $( this ).find( '.elementor-invisible' );
					if ( $anim_obj.length ) {
						$anim_obj.addClass( 'slide-animate' );
						return true;
					}
					return false;
				} ).on( 'translate.owl.carousel', portoCarouselTranslateElementor );
				carouselItems.filter( function() {
					if ( $( this ).find( '.appear-animation, [data-appear-animation]' ).length ) {
						return true;
					}
					return false;
				} ).on( 'translate.owl.carousel', portoCarouselTranslateWPB );

				$wrap.find( '[data-plugin-carousel]:not(.manual), .porto-carousel:not(.manual)' ).each( function() {
					var $this = $( this ),
						opts;
					if ( $this.closest( '.tab-pane' ).length && ! $this.closest( '.tab-pane' ).hasClass( 'active' ) ) {
						return;
					}
					if ( $this.closest( '.e-n-tabs-content > .e-con' ).length && ! $this.closest( '.e-n-tabs-content > .e-con' ).hasClass( 'e-active' ) ) {
						return;
					}
					if ( $this.closest( '.sidebar-menu:not(.side-menu-accordion) .menu-block' ).length ) {
						return;
					}
					if ( $this.closest( '.mega-menu .menu-block' ).length ) {
						return;
					}
					var pluginOptions = $this.data( 'plugin-options' );
					if ( pluginOptions )
						opts = pluginOptions;

					setTimeout( function() {
						$this.themeCarousel( opts );
					}, 0 );
				} );
			} );

		}
		// Fixed video
		$wrap.find( '.video-fixed' ).each( function() {
			var $this = $( this ),
				$video = $this.find( 'video, iframe' );

			if ( $video.length ) {
				window.addEventListener( 'scroll', function() {
					var offset = $( window ).scrollTop() - $this.position().top + theme.adminBarHeight();
					$video.css( "cssText", "top: " + offset + "px !important;" );
				}, { passive: true } );
			}
		} );
		setTimeout( function() {
			// Search
			if ( typeof theme.Search !== 'undefined' ) {
				theme.Search.initialize();
			}
		}, 0 );
		if ( typeof theme.isAsyncInit == 'undefined' ) {
			theme.isAsyncInit = -1; //initial
		}
		$( document.body ).trigger( 'porto_after_async_init', [ $wrap, wrapObj ] );
		theme.isAsyncInit = 1;
	};

	$( document.body ).trigger( 'porto_async_init' );
} ).apply( this, [window.theme, jQuery] );

jQuery( document ).ready( function( $ ) {
	'use strict';

	function porto_modal_open( $this ) {
		var trigger = $this.data( 'trigger-id' ),
			overlayClass = $this.data( 'overlay-class' ),
			disableOverlay = $this.data( 'disable-overlay' ),
			extraClass = $this.data( 'extra-class' ) ? $this.data( 'extra-class' ) : '',
			type = $this.data( 'type' ),
			buttonPopup = false,
			isExist = 0;
		if ( typeof trigger != 'undefined'/* && $('#' + escape(trigger)).length > 0*/ ) {
			if ( typeof type == 'undefined' ) {
				type = 'inline';
			}
			if ( type == 'inline' ) {
				trigger = '#' + escape( trigger );
			}
			if ( typeof $.magnificPopup.instance != 'undefined' && $.magnificPopup.instance.isOpen ) {
				isExist = 350;
				$.magnificPopup.close(); // Destroy before init
			}

			try {
				if ( document.querySelector( trigger ) ) {
					if ( 'script' == document.querySelector( trigger ).nodeName.toLowerCase() ) { // Dynamic Popup Click
						trigger = $( trigger ).html();
						disableOverlay = $( trigger ).data( 'disable-overlay' );
						overlayClass = $( trigger ).data( 'overlay-class' );
						extraClass = 'button-popup ';
						buttonPopup = true;
					}
				}
			} catch( e ) {

			}

			var args = {
				items: {
					src: trigger
				},
				type: type,
				mainClass: extraClass + ( disableOverlay ? ' popup-builder-disable-overlay ' : '' ),
				prependTo: $( '.page-wrapper' )
			};
			if ( trigger == '#popup-builder' ) {
				args['fixedContentPos'] = true;
			}
			var $popupModal = $this;
			if ( buttonPopup ) {
				args['fixedContentPos'] = true;
				if ( disableOverlay ) {
					args['closeOnBgClick'] = false;
					args['fixedContentPos'] = false;
					args['focus'] = '.bb-none'; // random selector
				}
				args['callbacks'] = {
					'open': function () {
						if ( disableOverlay ) {
							$( '.button-popup.mfp-bg' ).remove();
							
						}
						// Update bootstrap tooltip for Popup
						var $popup_builder = $( '.button-popup.mfp-wrap' );
						if ( typeof theme.porto_init_builder_tooltip == 'function' ) {
							theme.porto_init_builder_tooltip( $popup_builder.get(0) );
						}
						porto_init( $popup_builder );

						if ( $popup_builder.find( '.wpcf7' ).length ) {
							var $wpcf7 = $popup_builder.find( '.wpcf7 .wpcf7-form' );
							if ( typeof wpcf7 == 'object' ) {
								if ( typeof wpcf7.initForm == 'function' ) {
									wpcf7.initForm( $wpcf7 );
								} else if ( typeof wpcf7.init == 'function' ) {
									wpcf7.init( $wpcf7.get( 0 ) );
									$wpcf7.get( 0 ).classList.replace( "no-js", "js" );
								}
							}
						}
						if ( $popup_builder.find( '.wpforms-container' ).length ) {
							if ( typeof wpforms == 'object' && typeof wpforms.init == 'function' ) {
								wpforms.init();
							}
						}
					}
				};
			}
			if ( $this.hasClass( 'porto-onload' ) || $this.hasClass( 'porto-exit-intent' ) ) {
				if ( disableOverlay ) {
					args['closeOnBgClick'] = false;
					args['fixedContentPos'] = false;
					args['focus'] = '.bb-none'; // random selector
				}
				args['callbacks'] = {
					'beforeClose': function() {
						if ( $( '.mfp-wrap .porto-disable-modal-onload' ).length && ( $( '.mfp-wrap .porto-disable-modal-onload' ).is( ':checked' ) || $( '.mfp-wrap .porto-disable-modal-onload input[type="checkbox"]' ).is( ':checked' ) ) ) {
							$.cookie( 'porto_modal_disable_onload', 'true', { expires: 7 } );
						} else if ( 'undefined' !== typeof $popupModal.data( 'expired' ) && 'undefined' !== typeof $popupModal.data( 'popup-id' ) ) {
							$.cookie( 'porto_modal_disable_period_onload_' + $popupModal.data( 'popup-id' ), $popupModal.data('expired'), { expires: $popupModal.data('expired') } );
						}
					},
					'afterClose': function() {
						// If minicart(cart, wishlist) opened, keep disabling mouse scrolling
						if ( $( '#header .minicart-opened' ).length ) {
							$( 'html' ).css( theme.rtl_browser ? 'margin-left' : 'margin-right', theme.getScrollbarWidth() );
							$( 'html' ).css( 'overflow', 'hidden' );
						}
					},
					'open': function () {
						if ( disableOverlay ) {
							$( '.popup-builder.mfp-bg' ).remove();
						}
						// Update bootstrap tooltip for Popup
						var $popup_builder = $( '.mfp-wrap .porto-block[data-bs-original-title]' );
						if ( $popup_builder.length ) {
							bootstrap.Tooltip.getInstance( $popup_builder[0] ).update();
						}
						if ( $popup_builder.find( '.marquee' ).length && $.isFunction( $.fn.marquee ) ) {
							$popup_builder.find( '.marquee' ).marquee( {
								duration: 5000,
								gap: 0,
								delayBeforeStart: 0,
								direction: 'left',
								duplicated: true
							} );
						}
						if ( $( '.mfp-wrap .porto-block .owl-carousel' ) ) {
							$( '.mfp-wrap .porto-block .owl-carousel' ).trigger( 'refresh.owl.carousel' );
						}
					}
				};
			}
			if ( typeof overlayClass != "undefined" && overlayClass ) {
				args.mainClass += escape( overlayClass );
			}
			setTimeout( () => {
				$.magnificPopup.open( $.extend( true, {}, theme.mfpConfig, args ), 0 );
			}, isExist );

		}
	}
	theme.porto_modal_open = porto_modal_open;
	function porto_init_magnific_popup_functions( $wrap ) {
		if ( typeof $wrap == 'undefined' || !$wrap.length ) {
			$wrap = $( document.body );
		}
		$wrap.find( '.lightbox:not(.manual)' ).each( function() {
			var $this = $( this ),
				opts;
			if ( $this.find( '>.lb-dataContainer' ).length ) {
				return;
			}
			var pluginOptions = $this.data( 'lightbox-options' );
			if ( pluginOptions ) {
				opts = pluginOptions;
			} else {
				pluginOptions = $this.data( 'plugin-options' );
				if ( typeof pluginOptions != 'object' ) {
					pluginOptions = JSON.parse( pluginOptions );
				}
				if ( pluginOptions ) {
					opts = pluginOptions;
				}
			}

			$this.themeLightbox( opts );
		} );

		// Popup with video or map
		$wrap.find( '.porto-popup-iframe' ).magnificPopup( $.extend( true, {}, theme.mfpConfig, {
			disableOn: 700,
			type: 'iframe',
			mainClass: 'mfp-fade',
			removalDelay: 160,
			preloader: false,
			fixedContentPos: false
		} ) );

		// Popup with ajax
		$wrap.find( '.porto-popup-ajax' ).magnificPopup( $.extend( true, {}, theme.mfpConfig, {
			type: 'ajax'
		} ) );

		// Popup with content
		$wrap.find( '.porto-popup-content' ).each( function() {
			var animation = $( this ).attr( 'data-animation' );
			$( this ).magnificPopup( $.extend( true, {}, theme.mfpConfig, {
				type: 'inline',
				fixedContentPos: false,
				fixedBgPos: true,
				overflowY: 'auto',
				closeBtnInside: true,
				preloader: false,
				midClick: true,
				removalDelay: 300,
				mainClass: animation
			} ) );
		} );

		// Porto Modal
		$wrap.find( '.popup-youtube, .popup-vimeo, .popup-gmaps' ).each( function( index ) {
			var overlayClass = $( this ).find( '.porto-modal-trigger' ).data( 'overlay-class' ),
				args = {
					type: 'iframe',
					removalDelay: 160,
					preloader: false,

					fixedContentPos: false
				};
			if ( typeof overlayClass != "undefined" && overlayClass ) {
				args.mainClass = escape( overlayClass );
			}
			$( this ).magnificPopup( args );
		} );

		$wrap.find( '[href*=porto-action_popup-id-]' ).each( function() {
			var $this = $( this ), popupId = $this.attr( 'href' );
			if ( popupId = popupId.match(/#porto-action_popup-id-(\d+)/)[1] ) {
				$this.attr( 'data-trigger-id', 'popup-id-' + popupId );
				$this.addClass( 'porto-modal-trigger' );
			}
		} );

		if ( $wrap.find( '.porto-modal-trigger.porto-onload' ).length ) {
			var $obj = $wrap.find( '.porto-modal-trigger.porto-onload' ).eq( 0 ),
				timeout = 0;
			if ( $obj.data( 'timeout' ) ) {
				timeout = parseInt( $obj.data( 'timeout' ), 10 );
			}
			setTimeout( function() {
				porto_modal_open( $obj );
			}, timeout );
		}
		$wrap.on( 'click', '.porto-modal-trigger', function( e ) {
			e.preventDefault();
			porto_modal_open( $( this ) );
		} );

		/* Woocommerce */
		// login popup
		if ( $wrap.hasClass( 'login-popup' ) ) {
			$wrap.find( '.porto-link-login, .porto-link-register' ).magnificPopup( {
				items: {
					src: theme.ajax_url + ( -1 === theme.ajax_url.indexOf( '?' ) ? '?' : '&' )  + 'action=porto_account_login_popup&nonce=' + js_porto_vars.porto_nonce,
					type: 'ajax'
				},
				tLoading: '<i class="porto-loading-icon"></i>',
				callbacks: {
					ajaxContentAdded: function() {
						$( window ).trigger( 'porto_login_popup_opened' );
					}
				}
			} );
		}

		if ( typeof PhotoSwipe != 'undefined' ) {
			let _images = $wrap.find( '.product-images' ), links = [], i = 0;
			_images.find( 'img' ).each( function() {
				var slide = {};

				slide.src = $( this ).attr( 'href' );
				slide.title = $( this ).attr( 'alt' );
				slide.w = parseInt( $( this ).attr( 'data-large_image_width' ) );
				slide.h = parseInt( $( this ).attr( 'data-large_image_height' ) );
				
				links[i] = slide;
				i++;
			} );
			_images.data( 'links', links );
			_images.on( 'click', '.img-thumbnail a.zoom', function( e ) {
				e.preventDefault();
				var options = $.extend( {
					index: $( this ).closest( '.img-thumbnail' ).index(),
					addCaptionHTMLFn: function( item, captionEl ) {
						if ( ! item.title ) {
							captionEl.children[0].textContent = '';
							return false;
						}
						captionEl.children[0].textContent = item.title;
						return true;
					}
				}, wc_single_product_params.photoswipe_options );
	
				// Initializes and opens PhotoSwipe.
				var photoswipe = new PhotoSwipe( $( '.pswp' )[0], PhotoSwipeUI_Default, _images.data( 'links' ), options );
				photoswipe.init();
			} );


		} else {
			$wrap.find( '.product-images' ).magnificPopup(
				$.extend( true, {}, theme.mfpConfig, {
					delegate: '.img-thumbnail a.zoom',
					type: 'image',
					gallery: { enabled: true }
				} )
			);
		}
		$wrap.find( '.porto-posts-grid' ).each( function() {
			$( this ).magnificPopup(
				$.extend( true, {}, theme.mfpConfig, {
					delegate: '.porto-tb-featured-image span.zoom, .porto-tb-featured-image a.zoom, .post-image span.zoom',
					type: 'image',
					gallery: { enabled: true }
				} )
			);
		} );
		$wrap.find( '.porto-posts-grid .tb-image-type-slider div.zoom' ).each( function() {
			var $this = $( this ),
				links = [];
			$this.find( 'a' ).each( function() {
				var slide = {};
				slide.src = $( this ).attr( 'href' );
				slide.title = $( this ).attr( 'title' );
				links.push( slide );
			} );
			if ( links.length ) {
				$this.on( 'click', function() {
					var $slider = $this.siblings( '.porto-carousel' );
					if ( $slider.length ) {
						var offset = $slider.data( 'owl.carousel' ).current() - $slider.find( '.cloned' ).length / 2;
						$.magnificPopup.open( $.extend( true, {}, theme.mfpConfig, {
							items: links,
							gallery: {
								enabled: true
							},
							type: 'image'
						} ), offset );
					}
				} );
			}
		} );
	}

	if ( $.fn.magnificPopup ) {
		porto_init_magnific_popup_functions();
	} else {
		setTimeout( function() {
			if ( $.fn.magnificPopup ) {
				porto_init_magnific_popup_functions();
			}
		}, 500 );
	}
	$( document.body ).on( 'porto_load_posts_end', function( e, $posts_wrap ) {
		if ( $.fn.magnificPopup ) {
			porto_init_magnific_popup_functions( $posts_wrap );
		}
	} );

	// Post Filter
	if ( typeof theme.PostFilter !== 'undefined' ) {
		var $postFilterElements = $( 'ul[data-filter-type], .portfolio-filter, .member-filter, .faq-filter, .porto-ajax-filter.product-filter, .porto-ajax-filter.post-filter' );
		if ( $postFilterElements.length ) {
			theme.PostFilter.initialize( $postFilterElements );
		}
	}

	// Post ajax pagination
	$( 'body' ).on( 'click', '.porto-ajax-load .pagination:not(.load-more) .page-numbers', function( e ) {
		var $this = $( this );
		if ( $this.hasClass( 'current' ) || $this.hasClass( 'dots' ) ) {
			return;
		}
		e.preventDefault();
		var $wrap = $this.closest( '.porto-ajax-load' ),
			post_type = $wrap.data( 'post_type' ),
			$obj = $wrap.find( '.' + post_type + 's-container' );

		if ( !$obj.length || $wrap.hasClass( 'loading' ) ) {
			return;
		}
		$wrap.addClass( 'loading' );
		var $filter = $wrap.find( '.porto-ajax-filter' ),
			cat = $filter.length && $filter.children( '.active' ).length && $filter.children( '.active' ).data( 'filter' );
		if ( '*' == cat ) {
			cat = '';
		}
		var default_args = {},
			page = $this.attr( 'href' ).match( /paged=(\d+)|page\/(\d+)/ );

		if ( page && Array.isArray( page ) && ( page[1] || page[2] ) ) {
			default_args['page'] = parseInt( page[1] || page[2] );
		} else {
			if ( $this.hasClass( 'prev' ) ) {
				default_args['page'] = parseInt( $this.next().text() );
			} else if ( $this.hasClass( 'next' ) ) {
				default_args['page'] = parseInt( $this.prev().text() );
			} else {
				default_args['page'] = parseInt( $this.text() );
			}
		}
		if ( cat == '' && $wrap.find( 'input[type=hidden].category' ).length ) {
			cat = $wrap.find( 'input[type=hidden].category' ).val();
			default_args['taxonomy'] = $wrap.find( 'input[type=hidden].taxonomy' ).val();
		}
		theme.PostFilter.load_posts( cat, $wrap.hasClass( 'load-infinite' ), $wrap, post_type, $obj, default_args, $this.attr( 'href' ) );

	} );

	// Filter Zooms
	if ( typeof theme.FilterZoom !== 'undefined' ) {
		// Portfolio Filter Zoom
		theme.FilterZoom.initialize( $( '.page-portfolios' ) );
		// Member Filter Zoom
		theme.FilterZoom.initialize( $( '.page-members' ) );
		// Posts Related Style Filter Zoom
		theme.FilterZoom.initialize( $( '.blog-posts-related' ) );
	}

	// close popup using esc key
	var $minicart_offcanvas = $( '.minicart-offcanvas' ),
		$wl_offcanvas = $( '.wishlist-offcanvas' ),
		$mobile_sidebar = $( '.mobile-sidebar' ),
		$mobile_panel = $( '#side-nav-panel' ),
		$overlay_search = $( '#header .btn-close-search-form' ),
		$html = $( 'html' );
	if ( $minicart_offcanvas.length || $wl_offcanvas.length || $mobile_sidebar.length || $mobile_panel.length || $( '.skeleton-loading' ).length || $overlay_search.length ) {
		$( document.documentElement ).on( 'keyup', function( e ) {
			try {
				if ( e.keyCode == 27 ) {
					$minicart_offcanvas.removeClass( 'minicart-opened' );
					$wl_offcanvas.removeClass( 'minicart-opened' );
					if ( $mobile_sidebar.length ) {
						$html.removeClass( 'filter-sidebar-opened' );
						$html.removeClass( 'sidebar-opened' );
						$( '.sidebar-overlay' ).removeClass( 'active' );
						$( 'html' ).css( 'overflow', '' );
						$( 'html' ).css( theme.rtl_browser ? 'margin-left' : 'margin-right', '' );
					}
					if ( $mobile_panel.length && $html.hasClass( 'panel-opened' ) ) {
						$html.removeClass( 'panel-opened' );
						$( '.panel-overlay' ).removeClass( 'active' );
					}
					if ( $overlay_search.length ) {
						$overlay_search.trigger( 'click' );
					}
				}
			} catch ( err ) { }
		} );
		$( '.skeleton-loading' ).on( 'skeleton-loaded', function() {
			$mobile_sidebar = $( '.mobile-sidebar' );
		} );
	}
} );
// source --> https://mfrash.com/wp-content/themes/porto/js/woocommerce-theme.js?ver=7.8.5 
( function() {
	'use strict';
	// Compatibility with YITH WISHLIST PRO
	if ( typeof yith_wcwl_l10n != 'undefined' ) {
		yith_wcwl_l10n.enable_tooltip = false;
	}
	// Hide Tooltip before adding to wishlist
	jQuery( document ).on( 'yith_wcwl_add_to_wishlist_data yith_woocompare_product_added', function( e, $el ) {
		if ( $el.length ) {
			$el.tooltip( 'dispose' );
		}
		if ( $el.$initiator ) {
			$el.$initiator.tooltip( 'dispose' );
		}
	} );
	jQuery( document ).on( 'click', 'a.compare.added', function( e ) {
		jQuery( this ).tooltip( 'dispose' );
	});
	// Theme Functions
	function portoCalcSliderButtonsPosition( $parent, padding ) {
		var $buttons = $parent.find( '.show-nav-title .owl-nav' );
		if ( $buttons.length ) {
			if ( window.theme.rtl ) {
				$buttons.css( 'left', padding );
			} else {
				$buttons.css( 'right', padding );
			}
			if ( $buttons.closest( '.porto-products' ).length && $buttons.closest( '.porto-products' ).parent().children( '.products-slider-title' ).length ) {
				var $title = $buttons.closest( '.porto-products' ).parent().children( '.products-slider-title' ), newMT = $title.offset().top - $parent.offset().top - parseInt( $title.css( 'padding-top' ), 10 ) - parseInt( $title.css( 'line-height' ), 10 ) / 2 + $buttons.children().outerHeight() - parseInt( $buttons.children().css( 'margin-top' ), 10 );
				$buttons.css( 'margin-top', newMT );
			}
		}
	}

	// Woocommerce Products Slider
	if ( typeof jQuery.fn.owlCarousel == 'function' ) {
		( function( theme, $ ) {

			theme = theme || {};

			var instanceName = '__wooProductsSlider';

			var WooProductsSlider = function( $el, opts ) {
				return this.initialize( $el, opts );
			};

			WooProductsSlider.defaults = {
				rtl: theme.rtl,
				autoplay: theme.slider_autoplay == '1' ? true : false,
				autoplayTimeout: theme.slider_speed ? theme.slider_speed : 5000,
				loop: theme.slider_loop,
				nav: false,
				navText: ["", ""],
				dots: false,
				autoplayHoverPause: true,
				items: 1,
				responsive: {},
				autoHeight: true,
				lazyLoad: true
			};

			WooProductsSlider.prototype = {
				initialize: function( $el, opts ) {
					if ( $el.data( instanceName ) ) {
						return this;
					}

					this.$el = $el;

					this
						.setData()
						.setOptions( opts )
						.build();

					return this;
				},

				setData: function() {
					this.$el.data( instanceName, true );

					return this;
				},

				setOptions: function( opts ) {
					this.options = $.extend( true, {}, WooProductsSlider.defaults, opts, {
						wrapper: this.$el
					} );

					return this;
				},

				calcOwlHeight: function( $el ) {
					var h = 0;
					$el.find( '.owl-item.active' ).each( function() {
						if ( h < $( this ).height() )
							h = $( this ).height();
					} );
					$el.find( '.owl-stage-outer' ).height( h );
				},

				build: function() {
					var self = this,
						$el = this.options.wrapper,
						lg = this.options.lg,
						md = this.options.md,
						xs = this.options.xs,
						ls = this.options.ls,
						$slider_wrapper = $el.closest( '.slider-wrapper' ),
						single = this.options.single,
						dots = this.options.dots,
						nav = this.options.nav,
						responsive = {},
						items,
						// scrollwidth = 0 not using getscrollbarwidth
						scrollWidth = 0,
						count = $el.find( '> *' ).length,
						w_xs = 576 - scrollWidth,
						w_md = 768 - scrollWidth,
						w_xl = theme.screen_xl - scrollWidth,
						w_sl = theme.screen_xxl - scrollWidth;

					if ( $el.find( '.product-col' ).get( 0 ) ) {
						portoCalcSliderButtonsPosition( $slider_wrapper, $el.find( '.product-col' ).css( 'padding-left' ) );
					}

					if ( single ) {
						items = 1;
					} else {
						items = lg ? lg : 1;
						if ( this.options.xl ) {
							responsive[w_sl] = { items: this.options.xl, loop: ( this.options.loop && count > this.options.xl ) ? true : false };
						}
						responsive[w_xl] = { items: items, loop: ( this.options.loop && count > items ) ? true : false };
						if ( md ) responsive[w_md] = { items: md, loop: ( this.options.loop && count > md ) ? true : false };
						if ( xs ) responsive[w_xs] = { items: xs, loop: ( this.options.loop && count > xs ) ? true : false };
						if ( ls ) responsive[0] = { items: ls, loop: ( this.options.loop && count > ls ) ? true : false };
					}

					this.options = $.extend( true, {}, this.options, {
						loop: ( this.options.loop && count > items ) ? true : false,
						items: items,
						responsive: responsive,
						onRefresh: function() {
							if ( $el.find( '.product-col' ).get( 0 ) ) {
								portoCalcSliderButtonsPosition( $slider_wrapper, $el.find( '.product-col' ).css( 'padding-left' ) );
							}
						},
						onInitialized: function() {
							if ( $el.find( '.product-col' ).get( 0 ) ) {
								portoCalcSliderButtonsPosition( $slider_wrapper, $el.find( '.product-col' ).css( 'padding-left' ) );
							}
							//$el.find('.cloned .porto-lazyload:not(.lazy-load-loaded)').themePluginLazyLoad();

							if ( $el.find( '.owl-item.cloned' ).length ) {
								setTimeout( function() {
									if ( $.fn.themePluginLazyLoad ) {
										var ins = $el.find( '.owl-item.cloned .porto-lazyload:not(.lazy-load-loaded)' ).themePluginLazyLoad( { effect: 'fadeIn', effect_speed: 400 } );
										if ( ins && ins.loadAndDestroy ) {
											ins.loadAndDestroy();
										}
									}
								}, 100 );
							}
						},
						touchDrag: ( count == 1 ) ? false : true,
						mouseDrag: ( count == 1 ) ? false : true
					} );

					// Auto Height Fixes
					if ( this.options.autoHeight ) {
						var thisobj = this;
						$( window ).on( 'resize', function() {
							thisobj.calcOwlHeight( $el );
						} );

						if ( theme.isLoaded ) {
							setTimeout( function() {
								thisobj.calcOwlHeight( $el );
							}, 100 );
						} else {
							$( window ).on( 'load', function() {
								thisobj.calcOwlHeight( $el );
							} );
						}
					}

					if ( $el.hasClass( 'has-ccols-spacing' ) ) {
						$el.removeClass( 'has-ccols-spacing' );
					}
					$el.owlCarousel( this.options );

					return this;
				}
			};

			// expose to scope
			$.extend( theme, {
				WooProductsSlider: WooProductsSlider
			} );

			// jquery plugin
			$.fn.themeWooProductsSlider = function( opts ) {
				return this.map( function() {
					var $this = $( this );

					if ( $this.data( instanceName ) ) {
						return $this;
					} else {
						return new theme.WooProductsSlider( $this, opts );
					}

				} );
			}

		} ).apply( this, [window.theme, jQuery] );
	}

	// Woocommerce Add to Cart, View Cart Events
	( function( theme, $ ) {

		var $supports_html5_storage;
		try {
			$supports_html5_storage = ( 'sessionStorage' in window && window.sessionStorage !== null );

			window.sessionStorage.setItem( 'wc', 'test' );
			window.sessionStorage.removeItem( 'wc' );
		} catch ( err ) {
			$supports_html5_storage = false;
		}

		var setCartCreationTimestamp = function() {
			if ( $supports_html5_storage ) {
				sessionStorage.setItem( 'wc_cart_created', ( new Date() ).getTime() );
			}
		};

		var setCartHash = function( cart_hash ) {
			if ( $supports_html5_storage && wc_cart_fragments_params ) {
				localStorage.setItem( wc_cart_fragments_params.cart_hash_key, cart_hash );
				sessionStorage.setItem( wc_cart_fragments_params.cart_hash_key, cart_hash );
			}
		};

		var initAjaxRemoveCartItem = function() {
			$( document ).off( 'click', '.widget_shopping_cart .remove-product, .shop_table.cart .remove-product, .shop_table.review-order .remove-product' ).on( 'click', '.widget_shopping_cart .remove-product, .shop_table.cart .remove-product, .shop_table.review-order .remove-product', function( e ) {
				e.preventDefault();
				var $this = $( this );
				var cart_id = $this.data( "cart_id" );
				var product_id = $this.data( "product_id" );
				var is_checkout = false;
				$this.closest( 'li' ).find( '.ajax-loading' ).show();

				if ( 'undefined' == typeof cart_id ) {
					is_checkout = true;
					cart_id = $this.closest( '.cart_item' ).data( 'key' );
				}
				$.ajax( {
					type: 'POST',
					dataType: 'json',
					url: theme.ajax_url,
					data: {
						action: "porto_cart_item_remove",
						nonce: js_porto_vars.porto_nonce,
						cart_id: cart_id
					},
					success: function( response ) {
						updateCartFragment( response );
						$( document.body ).trigger( 'wc_fragments_refreshed' );
						var this_page = window.location.toString(),
							item_count = $( response.fragments['div.widget_shopping_cart_content'] ).find( '.mini_cart_item' ).length;

						this_page = this_page.replace( 'add-to-cart', 'added-to-cart' );
						$( '.viewcart-' + product_id ).removeClass( 'added' );
						$( '.porto_cart_item_' + cart_id ).remove();

						// Block widgets and fragments
						if ( item_count == 0 && ( $( 'body' ).hasClass( 'woocommerce-cart' ) || $( 'body' ).hasClass( 'woocommerce-checkout' ) ) ) {
							$( '.page-content' ).fadeTo( 400, 0.8 ).block( {
								message: null,
								overlayCSS: {
									opacity: 0.2
								}
							} );
						} else {
							$( 'form.woocommerce-cart-form, #order_review, .updating, .cart_totals' ).fadeTo( 400, 0.8 ).block( {
								message: null,
								overlayCSS: {
									opacity: 0.2
								}
							} );
						}

						// Unblock
						$( '.widget_shopping_cart, .updating' ).stop( true ).css( 'opacity', '1' ).unblock();

						// Cart page elements
						if ( item_count == 0 && ( $( 'body' ).hasClass( 'woocommerce-cart' ) || $( 'body' ).hasClass( 'woocommerce-checkout' ) ) ) {
							$( '.page-content' ).load( this_page + ' .page-content:eq(0) > *', function() {
								$( '.page-content' ).stop( true ).css( 'opacity', '1' ).unblock();
							} );
						} else {
							$( 'form.woocommerce-cart-form' ).load( this_page + ' form.woocommerce-cart-form:eq(0) > *', function() {
								$( 'form.woocommerce-cart-form' ).stop( true ).css( 'opacity', '1' ).unblock();
							} );

							$( '.cart_totals' ).load( this_page + ' .cart_totals:eq(0) > *', function() {
								$( '.cart_totals' ).stop( true ).css( 'opacity', '1' ).unblock();
							} );

							// Checkout page elements
							$( '#order_review' ).load( this_page + ' #order_review:eq(0) > *', function() {
								$( '#order_review' ).stop( true ).css( 'opacity', '1' ).unblock();
							} );
						}
					}
				} );

				return false;
			} );
		};

		var refreshCartFragment = function() {
			initAjaxRemoveCartItem();
			if ( $.cookie( 'woocommerce_items_in_cart' ) > 0 ) {
				$( '.hide_cart_widget_if_empty' ).closest( '.widget_shopping_cart' ).show();
			} else {
				$( '.hide_cart_widget_if_empty' ).closest( '.widget_shopping_cart' ).hide();
			}
		};

		var updateCartFragment = function( data ) {
			if ( data && data.fragments ) {
				var fragments = data.fragments,
					cart_hash = data.cart_hash;

				$.each( fragments, function( key, value ) {
					$( key ).replaceWith( value );
				} );
				if ( typeof wc_cart_fragments_params === 'undefined' ) {
					return;
				}
				/* Storage Handling */
				if ( $supports_html5_storage ) {
					var prev_cart_hash = sessionStorage.getItem( 'wc_cart_hash' );

					if ( prev_cart_hash === null || prev_cart_hash === undefined || prev_cart_hash === '' ) {
						setCartCreationTimestamp();
					}
					sessionStorage.setItem( wc_cart_fragments_params.fragment_name, JSON.stringify( fragments ) );
					setCartHash( cart_hash );
				}
			}
		};

		$( function() {

			refreshCartFragment();

			// add ajax cart loading
			$( document ).on( 'click', '.add_to_cart_button', function( e ) {
				var $this = $( this );
				if ( typeof theme.noAjaxCart == 'undefined' ) {
					theme.noAjaxCart = ! $( '#wc-add-to-cart-js' ).length;
				}
				if ( $this.is( '.product_type_simple' ) || $this.is( '.jck_wssv_add_to_cart' ) ) {
					if ( 'SPAN' == $this.prop( 'tagName' ) && ( theme.noAjaxCart || ! $this.attr( 'data-product_id' ) ) ) {
						window.location.href = $this.attr( 'href' );
					}

					if ( $.fn.tooltip ) {
						$this.tooltip( 'hide' );
					}

					if ( $this.attr( 'data-product_id' ) ) {
						$this.addClass( 'product-adding' );

						// add to cart notifaction style 2, 3
						if ( $this.hasClass( 'viewcart-style-2' ) || $this.hasClass( 'viewcart-style-3' ) ) {
							if ( $this.closest( '.porto-hotspot' ).length == 0 && $this.closest( '.menu-block' ).length == 0 && ! $( '#loading-mask' ).length ) {
								$( 'body' ).append( '<div id="loading-mask"><div class="background-overlay"></div></div>' );
							}
							if ( !$( this ).closest( '.product' ).find( '.loader-container' ).length ) {
								$( this ).closest( '.product' ).find( '.product-image' ).append( '<div class="loader-container"><div class="loader"><i class="porto-ajax-loader"></i></div></div>' );
							}
							$( this ).closest( '.product' ).find( '.loader-container' ).show();
						}
					}
				} else if ( 'SPAN' == $this.prop( 'tagName' ) ) {
					window.location.href = $this.attr( 'href' );
				}
			} );

			$( document.body ).on( 'added_to_cart', function() {
				$( 'ul.products li.product .added_to_cart, .porto-tb-item .added_to_cart' ).remove();
				initAjaxRemoveCartItem();
			} );

			$( document.body ).on( 'wc_cart_button_updated', function() {
				$( 'ul.products li.product .added_to_cart, .porto-tb-item .added_to_cart' ).remove();
			} );

			$( document.body ).on( 'wc_fragments_refreshed wc_fragments_loaded', function() {
				refreshCartFragment();
			} );

			$( document ).on( 'click', '.product-image .viewcart, .after-loading-success-message .viewcart', function( e ) {
				if ( wc_add_to_cart_params.cart_url ) {
					window.location.href = wc_add_to_cart_params.cart_url;
				}
				e.preventDefault();
			} );
			var porto_product_add_cart_timer = null;
			$( document ).on( 'added_to_cart', 'body', function( event ) {
				var $mc_item = $( '#mini-cart .cart-items' );
				if ( $mc_item.length ) {
					$mc_item.addClass( 'count-updating' );
					setTimeout( function() {
						$mc_item.removeClass( 'count-updating' );
					}, 1000 );
				}

				//add to cart notifaction style 2,3
				$( 'body #loading-mask' ).remove();

				$( '.add_to_cart_button.product-adding' ).each( function() {
					var $link = $( this );
					$link.removeClass( 'product-adding' );
					if ( $( '.woocommerce-wishlist.woocommerce-page' ).length ) { //wishlist page
						return;
					}
					if ( $link.hasClass( 'viewcart-style-1' ) ) {
						$link.closest( '.product' ).find( '.viewcart' ).addClass( 'added' );
						$( '.minicart-offcanvas' ).addClass( 'minicart-opened' );
					} else {
						$link.closest( '.product' ).find( '.loader-container' ).hide();
						if ( $link.closest( 'li.outofstock' ).length ) {
							return;
						}
						var $msg;
						if ( $link.hasClass( 'viewcart-style-2' ) ) {
							$msg = $( '.after-loading-success-message .success-message-container' ).eq( 0 );
							$msg.find( '.product-name' ).text( $link.closest( '.product' ).find( '.woocommerce-loop-product__title, .product-loop-title, .post-title a' ).text() );
						} else {
							$msg = $( '.after-loading-success-message .success-message-container' ).last().clone().removeClass( 'd-none' );
							$msg.find( '.product-name' ).empty().append( $link.closest( '.product' ).find( '.product-loop-title, .post-title a' ).clone() );
						}
						$msg.find( '.msg-box img' ).remove();
						if ( $link.closest( '.product' ).find( '.product-image img' ).length ) {
							var $img = $link.closest( '.product' ).find( '.product-image img' ).eq( 0 );
							$( '<img />' ).attr( 'src', $img.data( 'oi' ) ? $img.data( 'oi' ) : $img.attr( 'src' ) ).appendTo( $msg.find( '.msg-box' ) ).attr( 'alt', $msg.find( '.msg .product-name' ).text() );
						} else if ( typeof js_porto_vars.wc_placeholder_img != 'undefined' ) {
							$( '<img />' ).attr( 'src', js_porto_vars.wc_placeholder_img ).appendTo( $msg.find( '.msg-box' ) ).attr( 'alt', $msg.find( '.msg .product-name' ).text() );
						}
						$( '.after-loading-success-message' ).eq( 0 ).stop().show();

						if ( $link.hasClass( 'viewcart-style-2' ) ) {
							if ( porto_product_add_cart_timer ) {
								clearTimeout( porto_product_add_cart_timer );
							}
							porto_product_add_cart_timer = setTimeout( function() { $( '.after-loading-success-message' ).eq( 0 ).hide(); }, 4000 );
						} else {
							$msg.prependTo( '.after-loading-success-message' );
							theme.requestTimeout( function() {
								$msg.addClass( 'active' );
							}, 50 );
							setTimeout( function() { $msg.find( '.mfp-close' ).trigger( 'click' ); }, 5000 );
						}
					}
				} );
			} );

			$( '.after-loading-success-message .continue_shopping' ).on( 'click', function() {
				$( '.after-loading-success-message' ).eq( 0 ).fadeOut( 200 );
			} );
			$( '.after-loading-success-message' ).on( 'click', '.mfp-close', function() {
				var $obj = $( this ).closest( '.success-message-container' );
				$obj.removeClass( 'active' );
				theme.requestTimeout( function() {
					$obj.slideUp( 300, function() {
						$obj.remove();
					} );
				}, 350 );
			} );

			$( document.body ).on( 'click', '.variations_form .variations .filter-item-list .filter-color, .variations_form .variations .filter-item-list .filter-item', function( e ) {
				e.preventDefault();
				var $this = $( this ),
					$selector = $this.closest( 'ul' ).siblings( 'select' );
				if ( !$selector.length || $this.hasClass( 'disabled' ) ) {
					return;
				}
				var $li_obj = $this.closest( 'li' );
				if ( $li_obj.hasClass( 'active' ) ) {
					$li_obj.removeClass( 'active' );
					$selector.val( '' );
				} else {
					$li_obj.addClass( 'active' ).siblings().removeClass( 'active' );
					$selector.val( $this.data( 'value' ) );
				}
				$selector.trigger( 'change.wc-variation-form' );
			} );


			$( document.body ).on( 'click', '.porto-general-swatch .filter-color, .porto-general-swatch .filter-item', function( e ) {
				e.preventDefault();
				var $this = $( this ),
					$swatch_li = $this.parent();

				var $product = $( this ).closest( '.product, .product-col' );
				var $product_img;
				if ( $product.hasClass( 'porto-tb-item' ) ) { // in type builder
					$product_img = $product.find( '.porto-tb-featured-image img' ).eq( 0 );
				} else if ( $product.hasClass( 'product-col' ) ) { // product legacy loop
					$product_img = $product.find( 'div.product-image .inner img:first-child' );
				}

				var srcOrig    = $product_img.data( 'original-src' ),
				srcsetOrig = $product_img.data( 'original-srcset '),
				sizesOrig  = $product_img.data( 'original-sizes' );
				if ( typeof srcOrig == 'undefined' ) {
					$product_img.data( 'original-src', $product_img.attr( 'src' ) );
					if ( typeof srcsetOrig == 'undefined' && $product_img.attr( 'srcset' ) ) {
						$product_img.data( 'original-srcset', $product_img.attr( 'srcset' ) );
					}
		
					if ( typeof sizesOrig == 'undefined' && $product_img.attr( 'sizes' ) ) {
						$product_img.data( 'original-sizes', $product_img.attr( 'sizes' ) );
					}
				}

				var image_src = '',
					image_srcset = '',
					image_sizes = '';

				if ( $this.parent().hasClass( 'active' ) ) {
					$swatch_li.removeClass( 'active' );
				} else { // active
					$this.closest( 'ul' ).find( 'li' ).removeClass( 'active' );
					$swatch_li.addClass( 'active' );
					if ( $swatch_li.data( 'image-src' ) ) {
						image_src = $swatch_li.data( 'image-src' );
						image_srcset = $swatch_li.data( 'image-srcset' );
						image_sizes = $swatch_li.data( 'image-sizes' );
					}
				}
				if ( ! image_src ) {
					var $active_swatch = $this.closest( '.porto-general-swatch' ).find( 'li.active' );
					if ( $active_swatch.length && $active_swatch.data( 'image-src' ) ) {
						image_src = $active_swatch.data( 'image-src' );
						image_srcset = $active_swatch.data( 'image-srcset' );
						image_sizes = $active_swatch.data( 'image-sizes' );
					} else {
						if ( $product_img.data('original-src' ) ) {
							image_src = $product_img.data('original-src' );
						}
			
						if ( $product_img.data( 'original-srcset' ) ) {
							image_srcset = $product_img.data( 'original-srcset' );
						}
			
						if ( $product_img.data( 'original-sizes' ) ) {
							image_sizes = $product_img.data( 'original-sizes' );
						}
					}
				}
				if ( image_src ) {
					$product_img.attr( 'src', image_src ).attr( 'srcset', image_srcset ).attr( 'image_sizes', image_sizes );
					var $image_slider = $product.find( '.owl-carousel' );

					if ( $image_slider.length ) {
						$image_slider.trigger( 'to.owl.carousel', [0, 300, true] );
					}
				}
			});


			$( document ).on( 'wc_variation_form', '.variations_form', function() {
				$( this ).addClass( 'vf_init' );
				if ( $( this ).find( '.filter-item-list' ).length < 1 ) {
					return;
				}
				$( this ).find( '.variations select' ).trigger( 'focusin' );
			} );
			$( document ).on( 'updated_wc_div', function() {
				if ( $.fn.themePluginLazyLoad ) {
					$( '.woocommerce-cart-form .porto-lazyload' ).themePluginLazyLoad();
				}
			} );
			$( document ).on( 'found_variation reset_data', '.variations_form', function( e, args ) {
				// attribute description
				var $this = $( this );
				if ( $this.find( '.product-attr-description' ).length ) {
					if ( typeof args == 'undefined' ) {
						$this.find( '.product-attr-description' ).removeClass( 'active' );
					} else {
						$this.find( '.product-attr-description' ).addClass( 'active' );
						$this.find( '.product-attr-description .attr-desc' ).removeClass( 'active' );
						$this.find( '.variations select' ).each( function() {
							var $obj = $( this );
							$this.find( '.product-attr-description .attr-desc[data-attrid="' + $obj.val() + '"]' ).addClass( 'active' );
						} );
					}
				}

				if ( $this.find( ".filter-item-list" ).length < 1 ) {
					return;
				}
				$this.find( ".filter-item-list" ).each( function() {
					if ( $( this ).next( "select" ).length < 1 ) {
						return;
					}
					var selector = $( this ).next( "select" ),
						//html = '',
						$list = $( this );
					$list.find( 'li.active' ).removeClass( 'active' );
					$list.find( '.filter-color, .filter-item' ).removeClass( 'enabled' ).removeClass( 'disabled' );
					selector.children( "option" ).each( function() {
						/*var isColor = typeof $(this).data('color') != 'undefined' ? true : false,
							isImage = typeof $(this).data('image') != 'undefined' ? true : false,
						spanClass = isColor ? "filter-color" : ( isImage ? "filter-item filter-image" : "filter-item" );*/
						if ( !$( this ).val() ) {
							return;
						}
						$list.find( '[data-value="' + $( this ).val().replace(/"/g, '\\\"') + '"]' ).addClass( 'enabled' );
						if ( $( this ).val() == selector.val() ) {
							$list.find( '[data-value="' + $( this ).val().replace(/"/g, '\\\"') + '"]' ).parent().addClass( 'active' );
						}
						/*html += '<li';
						if ($(this).val() == selector.val()) {
							html += ' class="active"';
						}
						html += '><a href="#" data-value="'+ escape( $(this).val() ) +'" class="' + spanClass + '"';
						if (isColor) {
							html += ' style="background-color: #' + escape( $(this).data('color').replace('#','') ) + '"';
						}
						if (isImage) {
							html += ' style="background-image:url(' + $(this).data('image') + ')"';
						}
						html += '>';
						if (!isColor) {
							html += $(this).text();
						}
						html += '</a></li>';*/
					} );
					$list.find( '.filter-color:not(.enabled), .filter-item:not(.enabled)' ).addClass( 'disabled' );
					//$(this).html(html);
				} );
			} );

			// daily sale
			$( document ).on( 'found_variation reset_data', '.variations_form', function( e, obj ) {
				var $wrapper = $( this ).closest( '.product' ),
					$timer = $wrapper.find( '.sale-product-daily-deal.for-some-variations' );
				if ( !$timer.length ) {
					$timer = $wrapper.find( '.porto-product-sale-timer' ).eq( 0 );
					if ( !$timer.length ) {
						return;
					}
				}
				if ( obj && obj.is_purchasable && typeof obj.porto_date_on_sale_to != 'undefined' && obj.porto_date_on_sale_to ) {
					var saleTimer = $timer.find( '.porto_countdown-dateAndTime' );
					if ( saleTimer.data( 'terminal-date' ) != obj.porto_date_on_sale_to ) {
						var newDate = new Date( obj.porto_date_on_sale_to );
						saleTimer.porto_countdown( 'option', { until: newDate } );
						saleTimer.data( 'terminal-date', obj.porto_date_on_sale_to );
					}
					$timer.slideDown();
				} else {
					if ( $timer.is( ':hidden' ) ) {
						$timer.hide();
					} else {
						$timer.slideUp();
					}
				}
			} );

			$( 'body' ).on( 'click', '.product-attr-description > a', function( e ) {
				e.preventDefault();
				$( this ).next().stop().slideToggle( 400 );
			} );

			// if product was already added to cart, show check icon in add to cart button and view cart button in single product page
			if ( $( document.body ).hasClass( 'single-product' ) ) {
				$( document ).on( 'woocommerce_variation_has_changed', '.variations_form', function( e, variation ) {
					$( document.body ).removeClass( 'single-add-to-cart' );
				} );
				$( document ).on( 'found_variation', '.variations_form', function( e, variation ) {
					try {
						var cart_items = JSON.parse( sessionStorage.getItem( wc_cart_fragments_params.fragment_name ) );
						if ( cart_items['div.widget_shopping_cart_content'] ) {
							var cart_item = $( cart_items['div.widget_shopping_cart_content'] ).find( '.porto-variation-' + variation.variation_id );
							if ( cart_item.length ) {
								theme.requestFrame( function() {
									$( document.body ).addClass( 'single-add-to-cart' );
								} );
							}
						}
					} catch ( e ) {
					}
				} );
			}

			// Mini Cart Quantity on Cart Popup or Offcanvas
			var timeout;

			$( document ).on( 'change input', '.cart_list .quantity .qty, .woocommerce-checkout-review-order-table .quantity .qty', function() {
				var input = $(this);
				var itemID = '';
				var qtyVal = input.val();
				var maxValue = input.attr( 'max' );
				var is_checkout = false;
	
				clearTimeout( timeout );
	
				if ( parseInt( qtyVal ) > parseInt( maxValue ) ) {
					qtyVal = maxValue;
				}
				if ( input.closest( '.cart_list' ).length ) {
					itemID = input.parents( '.woocommerce-mini-cart-item' ).data( 'key' );
				} else {
					is_checkout = true;
					itemID = input.closest( '.cart_item' ).data( 'key' );
				}
				timeout = setTimeout( function() {
					if ( ! is_checkout ) {
						input.parents( '.mini_cart_item' ).find( '.ajax-loading' ).show();
					}
					$.ajax( {
						url     : theme.ajax_url,
						data    : {
							action : 'porto_update_cart_item',
							item_id: itemID,
							qty    : qtyVal
						},
						success : function( data ) {
							if ( data && data.fragments ) {
								updateCartFragment( data );
								$( document.body ).trigger( 'wc_fragments_refreshed' );
							}
							if ( is_checkout ) {
								input.closest( 'form.checkout' ).trigger( 'update' );
							} else {
								input.parents( '.mini_cart_item' ).find( '.ajax-loading' ).hide();
							}
						},
						dataType: 'json',
						method  : 'GET'
					} );
				}, 500 );
			} );

			if ( $( 'form.woocommerce-cart-form button.update-button-hidden' ).length > 0 ) {
				$( document ).on( 'change input', 'form.woocommerce-cart-form .product-quantity input', function () {
					var $form = $( this ).closest( 'form' ),
						$updateBtn = $form.find( '.update-button-hidden' );

					$updateBtn.removeAttr( 'disabled' );
					$updateBtn.click();
				} );
			}

			// fix dummy yith ajax requests on first load
			if ( 'undefined' !== typeof yith_wcwl_l10n && yith_wcwl_l10n.reload_on_found_variation && $('.products-container .variations_form').length ) {
				var porto_update_reload_wishlist_fn = function() {
					yith_wcwl_l10n.reload_on_found_variation = true;
					if ( $(this).closest( '.products-container' ).length ) {
						yith_wcwl_l10n.reload_on_found_variation = false;
					}
				};
				$('.products-container').one( 'woocommerce_variation_has_changed woocommerce_variation_select_change', '.variations_form', function() {
					yith_wcwl_l10n.reload_on_found_variation = true;
					$( document ).off( 'update_variation_values', '.variations_form', porto_update_reload_wishlist_fn );
				} );
				$( document ).on( 'update_variation_values', '.variations_form', porto_update_reload_wishlist_fn );
			}
		} );

	} ).apply( this, [window.theme, jQuery] );


	// Woocommerce Product Image Slider
	( function( theme, $ ) {

		theme = theme || {};

		var duration = 300,
			flag = false;

		$.extend( theme, {

			WooProductImageSlider: {

				defaults: {
					elements: '.product-image-slider'
				},

				initialize: function( $elements ) {

					this.$elements = ( $elements || $( this.defaults.elements ) );
					if ( !this.$elements.length && !$( '.product-images-block' ).length ) {
						return this;
					}
					// if ( theme.isMobile() ) {
					// 	let $zoom = this.$elements.siblings( '.zoom' );
					// 	if ( $zoom.length ) {
					// 		this.$elements.off( 'click' ).on( 'click', function() {
					// 			$zoom.trigger( 'click' );
					// 		} );
					// 	}
					// }
/*
					if ( !$.fn.owlCarousel ) {

						this.$elements.each(function(){
							var links = [],
								$this = $( this );
							if ( theme.product_image_popup ) {
								var i = 0;
								$this.find( 'img' ).each( function() {
									var slide = {};

									slide.src = $( this ).attr( 'href' );
									slide.title = $( this ).attr( 'alt' );
									slide.w = parseInt( $( this ).attr( 'data-large_image_width' ) );
									slide.h = parseInt( $( this ).attr( 'data-large_image_height' ) );
									
									links[i] = slide;
									i++;
								} );
							}

							$this.data( 'links', links );

							if ( theme.product_image_popup ) {
								var $zoom_buttons = $this.siblings( '.zoom' );
								$zoom_buttons.off( 'click' ).on( 'click', function( e ) {
									if ( ! $this.data( 'links' ).length ) {
										return;
									}
									e.preventDefault();
									if ( typeof PhotoSwipe == 'undefined' ) {
										return;
									}
									var options = $.extend( {
										index: 0,
										addCaptionHTMLFn: function( item, captionEl ) {
											if ( ! item.title ) {
												captionEl.children[0].textContent = '';
												return false;
											}
											captionEl.children[0].textContent = item.title;
											return true;
										}
									}, wc_single_product_params.photoswipe_options );

									// Initializes and opens PhotoSwipe.
									var photoswipe = new PhotoSwipe( $( '.pswp' )[0], PhotoSwipeUI_Default, $this.data( 'links' ), options );
									photoswipe.init();

								} );
							}
						});
						return false;
					}
*/

					this.build();

					return this;
				},

				build: function() {
					var self = this,
						thumbs_count = theme.product_thumbs_count;

					if ( theme.product_zoom && ( !( 'ontouchstart' in document ) || ( ( 'ontouchstart' in document ) && theme.product_zoom_mobile ) ) ) {
						var zoomConfig = {
							responsive: true,
							zoomWindowFadeIn: 200,
							zoomWindowFadeOut: 100,
							zoomType: js_porto_vars.zoom_type,
							cursor: 'grab'
						};

						if ( js_porto_vars.zoom_type == 'lens' ) {
							zoomConfig.scrollZoom = js_porto_vars.zoom_scroll;
							zoomConfig.lensSize = js_porto_vars.zoom_lens_size;
							zoomConfig.lensShape = js_porto_vars.zoom_lens_shape;
							zoomConfig.containLensZoom = js_porto_vars.zoom_contain_lens;
							zoomConfig.lensBorderSize = js_porto_vars.zoom_lens_border;
							zoomConfig.borderColour = js_porto_vars.zoom_border_color;
						}

						if ( js_porto_vars.zoom_type == 'inner' ) {
							zoomConfig.borderSize = 0;
						} else {
							zoomConfig.borderSize = js_porto_vars.zoom_border;
						}
						zoomConfig.zoomActivation = 'dbltouch';

						if ( !self.$elements.length ) {
							var $images_grid = $( '.product-images-block' );
							if ( $images_grid.length ) {
								self.initZoom( $images_grid, zoomConfig );
							}
						}
					}

					self.$elements.each( function() {
						var $this = $( this ),
							$product = $this.closest( '.product' );
						if ( !$product.length ) {
							$product = $this.closest( '.product_layout, .product-layout-image' ).eq( 0 );
						}
						var $thumbs_slider = $product.find( '.product-thumbs-slider' ),
							$thumbs = $product.find( '.product-thumbnails-inner' ),
							$thumbs_vertical_slider = $product.find( '.product-thumbs-vertical-slider' ),
							currentSlide = 0,
							count = $this.find( '> *' ).length;

						$this.find( '> *:first-child' ).imagesLoaded( function() {

							var links = [];
							if ( theme.product_image_popup ) {
								var i = 0;
								$this.find( '.img-thumbnail img' ).each( function() {
									var slide = {}, _imageItem = $( this );
									if ( _imageItem.closest( '.vd-image' ).length ) {
										return;
									}
									slide.src = _imageItem.attr( 'href' );
									slide.title = _imageItem.attr( 'alt' );
									slide.w = parseInt( _imageItem.attr( 'data-large_image_width' ) );
									slide.h = parseInt( _imageItem.attr( 'data-large_image_height' ) );
									
									links[i] = slide;
									i++;
								} );
							}

							if ( $.fn.owlCarousel ) {
								$thumbs_slider.removeClass( 'has-ccols-spacing' );
								$thumbs_slider.owlCarousel( {
									rtl: theme.rtl,
									loop: false,
									autoplay: false,
									items: thumbs_count,
									nav: false,
									navText: ["", ""],
									dots: false,
									rewind: true,
									margin: 8,
									stagePadding: 1,
									lazyLoad: true,
									onInitialized: function() {
										self.selectThumb( null, $thumbs_slider, 0 );
										if ( $thumbs_slider.find( '.owl-item' ).length >= thumbs_count )
											$thumbs_slider.append( '<div class="thumb-nav"><div class="thumb-prev"></div><div class="thumb-next"></div></div>' );
									}
								} ).on( 'click', '.owl-item', function() {
									self.selectThumb( $this, $thumbs_slider, $( this ).index() );
								} );
								if ( $thumbs_vertical_slider.length > 0 && typeof $.fn.slick == 'function' ) {
									var slickOptions = {
										dots: false,
										vertical: true,
										slidesToShow: thumbs_count,
										slidesToScroll: 1,
										infinite: false,
									}
									if ( thumbs_count >= 5 ) {
										slickOptions['responsive'] = [
											{
												breakpoint: 992,
												settings: {
													slidesToShow: 4,
												}
											},
											{
												breakpoint: 768,
												settings: {
													slidesToShow: 3,
												}
											}
										]
									}
									$thumbs_vertical_slider.slick( slickOptions ).on( 'click', '.slick-slide', function() {
										self.selectVerticalSliderThumb( $this, $thumbs_vertical_slider, $( this ).data( 'slick-index' ) );
									} );
									$( '.product-layout-transparent .product-image-slider' ).on( 'resized.owl.carousel', function() {
										$( window ).trigger( 'resize.slick' );
									} );

									self.selectVerticalSliderThumb( null, $thumbs_vertical_slider, 0 );
									if ( $thumbs_vertical_slider.find( '.porto-lazyload' ).length ) {
										theme.requestTimeout( function() {
											$thumbs_vertical_slider.find( '.slick-cloned .porto-lazyload:not(.lazy-load-loaded)' ).each( function() {
												$( this ).attr( 'src', $( this ).data( 'oi' ) ).removeAttr( 'data-oi' ).addClass( 'lazy-load-loaded' );
											} );
										}, 100 );
									}
								}

								self.selectVerticalThumb( null, $thumbs, 0 );
								$thumbs.off( 'click', '.img-thumbnail' ).on( 'click', '.img-thumbnail', function() {
									self.selectVerticalThumb( $this, $thumbs, $( this ).index() );
								} );

								$thumbs_slider.off( 'click', '.thumb-prev' ).on( 'click', '.thumb-prev', function( e ) {
									var currentThumb = $thumbs_slider.data( 'currentThumb' );
									self.selectThumb( $this, $thumbs_slider, --currentThumb );
								} );
								$thumbs_slider.off( 'click', '.thumb-next' ).on( 'click', '.thumb-next', function( e ) {
									var currentThumb = $thumbs_slider.data( 'currentThumb' );
									self.selectThumb( $this, $thumbs_slider, ++currentThumb );
								} );

								var itemsCount = typeof $this.data( 'items' ) != 'undefined' ? $this.data( 'items' ) : 1,
									itemsResponsive = typeof $this.data( 'responsive' ) != 'undefined' ? $this.data( 'responsive' ) : {},
									centerItem = typeof $this.data( 'centeritem' ) != 'undefined' ? true : false,
									margin = typeof $this.data( 'margin' ) != 'undefined' ? $this.data( 'margin' ) : 0,
									loop = ( count > 1 ) ? ( typeof $this.data( 'loop' ) != 'undefined' ? $this.data( 'loop' ) : true ) : false;
								for ( var itemCount in itemsResponsive ) {
									itemsResponsive[itemCount] = { items: itemsResponsive[itemCount] };
								}
								$this.removeClass( 'has-ccols-spacing' );
								$this.owlCarousel( {
									rtl: theme.rtl,
									loop: loop,
									autoplay: false,
									items: itemsCount,
									margin: margin,
									responsive: itemsResponsive,
									autoHeight: true,
									nav: true,
									navText: ["", ""],
									dots: false,
									rewind: true,
									lazyLoad: true,
									center: centerItem,
									onInitialized: function() {
										if ( $this.find( '.owl-item.cloned' ).length ) {
											setTimeout( function() {
												if ( $.fn.themePluginLazyLoad ) {
													var ins = $this.find( '.owl-item.cloned .porto-lazyload:not(.lazy-load-loaded)' ).themePluginLazyLoad( { effect: 'fadeIn', effect_speed: 400 } );
													if ( ins && ins.loadAndDestroy ) {
														ins.loadAndDestroy();
													}
												}
											}, 100 );
										}
										//$this.find('.cloned .porto-lazyload:not(.lazy-load-loaded)').themePluginLazyLoad();
											self.initZoom( $this, zoomConfig );
									},
									onTranslate: function( event ) {
										currentSlide = event.item.index - $this.find( '.cloned' ).length / 2;
										currentSlide = ( currentSlide + event.item.count ) % event.item.count;
										self.selectThumb( null, $thumbs_slider, currentSlide );
										self.selectVerticalThumb( null, $thumbs, currentSlide );
										self.selectVerticalSliderThumb( null, $thumbs_vertical_slider, currentSlide );

										/*var $obj = event.relatedTarget.items(currentSlide).find('img.owl-lazy:not(.owl-lazy-loaded)');
										if ($obj.length) {
											var src = $obj.attr('href'),
												elevateZoom = $obj.data('elevateZoom'),
												smallImage = $obj.data('src') ? $obj.data('src') : $obj.attr('src');
											if (typeof elevateZoom != 'undefined') {
												elevateZoom.swaptheimage(smallImage, src);
											}
										}*/
									},
									onRefreshed: function() {
										if ( theme.product_zoom && ( !( 'ontouchstart' in document ) || ( ( 'ontouchstart' in document ) && theme.product_zoom_mobile ) ) ) {
											$this.find( 'img' ).each( function() {
												var $this = $( this ),
													src = typeof $this.attr( 'href' ) != 'undefined' ? $this.attr( 'href' ) : ( $this.data( 'oi' ) ? $this.data( 'oi' ) : $this.attr( 'src' ) ),
													elevateZoom = $this.data( 'elevateZoom' ),
													smallImage = $this.data( 'src' ) ? $this.data( 'src' ) : ( $this.data( 'oi' ) ? $this.data( 'oi' ) : $this.attr( 'src' ) );
												if ( typeof elevateZoom != 'undefined' ) {
													elevateZoom.startZoom();
													elevateZoom.swaptheimage( smallImage, src );
												} else if ( $.fn.elevateZoom ) {
													zoomConfig.zoomContainer = $this.parent();
													if ( ! $this.closest( '.vd-image' ).length ) {
														$this.elevateZoom( zoomConfig );
													}
												}
											} );
										}
									}
								} );
							} else {
								self.initZoom( $this, zoomConfig );
							}

							$this.data( 'links', links );

							if ( theme.product_image_popup ) {
								var $zoom_buttons = $this.siblings( '.zoom' );
								$zoom_buttons.off( 'click' ).on( 'click', function( e ) {
									if ( ! $this.data( 'links' ).length ) {
										return;
									}
									e.preventDefault();
									if ( typeof PhotoSwipe == 'undefined' ) {
										return;
									}
									var options = $.extend( {
										index: currentSlide ? currentSlide : 0,
										addCaptionHTMLFn: function( item, captionEl ) {
											if ( ! item.title ) {
												captionEl.children[0].textContent = '';
												return false;
											}
											captionEl.children[0].textContent = item.title;
											return true;
										}
									}, wc_single_product_params.photoswipe_options );

									// Initializes and opens PhotoSwipe.
									var photoswipe = new PhotoSwipe( $( '.pswp' )[0], PhotoSwipeUI_Default, $this.data( 'links' ), options );
									photoswipe.init();

								} );
							}

						} );
					} );

					return self;
				},

				selectThumb: function( $image_slider, $thumbs_slider, index ) {
					if ( flag || !$thumbs_slider.length ) return;

					flag = true;
					var len = $thumbs_slider.find( '.owl-item' ).length,
						actives = [],
						i = 0;

					index = ( index + len ) % len;
					if ( $image_slider ) {
						$image_slider.trigger( 'to.owl.carousel', [index, duration, true] );
					}
					$thumbs_slider.find( '.owl-item' ).removeClass( 'selected' );
					$thumbs_slider.find( '.owl-item:eq(' + index + ')' ).addClass( 'selected' );
					$thumbs_slider.data( 'currentThumb', index );
					$thumbs_slider.find( '.owl-item.active' ).each( function() {
						actives[i++] = $( this ).index();
					} );
					if ( $.inArray( index, actives ) == -1 ) {
						if ( Math.abs( index - actives[0] ) > Math.abs( index - actives[actives.length - 1] ) ) {
							$thumbs_slider.trigger( 'to.owl.carousel', [( index - actives.length + 1 ) % len, duration, true] );
						} else {
							$thumbs_slider.trigger( 'to.owl.carousel', [index % len, duration, true] );
						}
					}
					flag = false;
				},

				selectVerticalSliderThumb: function( $image_slider, $thumbs_vertical_slider, index ) {
					if ( flag || !$thumbs_vertical_slider.length ) return;
					flag = true;
					if ( 'undefined' == typeof $thumbs_vertical_slider[0].slick ) {
						return;
					}
					var len = $thumbs_vertical_slider[0].slick.slideCount,
						actives = [],
						i = 0;
					index = ( index + len ) % len;
					if ( $image_slider ) {
						$image_slider.trigger( 'to.owl.carousel', [index, duration, true] );
					}
					$thumbs_vertical_slider.find( '.slick-slide' ).removeClass( 'selected' );
					$thumbs_vertical_slider.find( '.slick-slide:eq(' + index + ')' ).addClass( 'selected' );
					$thumbs_vertical_slider.data( 'currentThumb', index );
					$thumbs_vertical_slider.find( '.slick-slide.slick-active' ).each( function() {
						actives[i++] = $( this ).index();
					} );
					if ( $.inArray( index, actives ) == -1 ) {
						if ( Math.abs( index - actives[0] ) > Math.abs( index - actives[actives.length - 1] ) ) {
							$thumbs_vertical_slider.get( 0 ).slick.goTo( ( index - actives.length + 1 ) % len, false );
						} else {
							$thumbs_vertical_slider.get( 0 ).slick.goTo( index % len, false );
						}
					}
					flag = false;
				},

				selectVerticalThumb: function( $image_slider, $thumbs, index ) {
					if ( flag || !$thumbs.length ) return;
					flag = true;
					var len = $thumbs.find( '.img-thumbnail' ).length,
						i = 0;

					index = ( index + len ) % len;
					if ( $image_slider ) {
						$image_slider.trigger( 'to.owl.carousel', [index, duration, true] );
					}
					$thumbs.find( '.img-thumbnail' ).removeClass( 'selected' );
					$thumbs.find( '.img-thumbnail:eq(' + index + ')' ).addClass( 'selected' );
					$thumbs.data( 'currentThumb', index );
					flag = false;
				},

				initZoom: function( $this, zoomConfig ) {
					if ( theme.product_zoom && ( !( 'ontouchstart' in document ) || ( ( 'ontouchstart' in document ) && theme.product_zoom_mobile ) ) ) {
						$this.find( 'img' ).each( function() {
							var $this = $( this );
							zoomConfig.zoomContainer = $this.parent();
							if ( $.fn.elevateZoom ) {
								if ( ! $this.closest( '.vd-image' ).length ) {
									$this.elevateZoom( zoomConfig );
								}
							} else {
								setTimeout( function() {
									if ( $.fn.elevateZoom ) {
										if ( ! $this.closest( '.vd-image' ).length ) {
											$this.elevateZoom( zoomConfig );
										}
									}
								}, 1000 );
							}
						} );
					}
				}
			}

		} );

	} ).apply( this, [window.theme, jQuery] );


	// Woocommerce Quick View
	( function( theme, $ ) {

		theme = theme || {};

		$.extend( theme, {

			WooQuickView: {

				initialize: function() {

					this.events();

					return this;
				},

				events: function() {
					var self = this;

					$( document ).on( 'click', '.quickview', function( e ) {
						e.preventDefault();

						if ( !$.fn.elevateZoom && !$( '#porto-script-jquery-elevatezoom' ).length ) {
							var js = document.createElement( 'script' );
							js.id = 'porto-script-jquery-elevatezoom';
							$( js ).appendTo( 'body' ).attr( 'src', js_porto_vars.ajax_loader_url.replace( '/images/ajax-loader@2x.gif', '/js/libs/jquery.elevatezoom.min.js' ) );
						}

						var $this = $( this ),
							pid = $this.attr( 'data-id' );

						function init_quick_view_window() {

							var args = {
								href: theme.ajax_url,
								ajax: {
									data: {
										action: 'porto_product_quickview',
										variation_flag: typeof wc_add_to_cart_variation_params !== 'undefined',
										pid: pid,
										nonce: js_porto_vars.porto_nonce
									}
								},
								type: 'ajax',
								helpers: {
									overlay: {
										locked: true,
										fixed: true
									}
								},
								tpl: {
									error: '<p class="fancybox-error">' + theme.request_error + '</p>',
									closeBtn: '<a title="' + js_porto_vars.popup_close + '" class="fancybox-item fancybox-close" href="javascript:;"></a>',
									next: '<a title="' + js_porto_vars.popup_next + '" class="fancybox-nav fancybox-next" href="javascript:;"><span></span></a>',
									prev: '<a title="' + js_porto_vars.popup_prev + '" class="fancybox-nav fancybox-prev" href="javascript:;"><span></span></a>'
								},
								autoSize: true,
								autoWidth: true,
								afterShow: function( flag ) {
									theme.requestTimeout( function() {
										var $quickviewEl = $( '.quickview-wrap-' + pid );
										if ( $quickviewEl.length == 0 && $( '.woocommerce-wishlist' ).length ) { // if select variation on wishlist page
											$quickviewEl = $( '.quickview-wrap' );
										}
										if ( typeof flag == 'undefined' || flag ) {
											porto_woocommerce_init();
										}
										theme.WooProductImageSlider.initialize( $quickviewEl.find( '.product-image-slider' ) );

										// compatibility issue with Yith WooCommerce Booking form
										if ( $( document.body ).hasClass( 'yith-booking' ) ) {
											$( document ).trigger( 'yith-wcbk-init-booking-form' );
										}

										// Variation Form
										var form_variation = $quickviewEl.find( 'form.variations_form' );
										if ( form_variation.length > 0 ) {
											form_variation.wc_variation_form();
										}

										// Enqueue Countdown, Countdown-loader
										if ( $( '.quickview-wrap-' + pid + ' .porto_countdown' ).length && ! theme.isFirstLoad && typeof $.fn.porto_countdown == 'undefined' ) {
											theme.isFirstLoad = true;
											var scripts = ['countdown.min.js', 'countdown-loader.min.js'];
											for ( let index = 0; index < scripts.length; index++ ) {
												if ( !document.getElementById( scripts[index] ) ) {
													var wf, script;
													wf = document.createElement( 'script' );
													script = document.scripts[0];
													wf.id = scripts[index];
													wf.src = js_porto_vars.func_url + 'shortcodes/assets/js/' + scripts[index];
													script.parentNode.insertBefore( wf, script );
												}
											}
										}
										$( document.body ).trigger( 'porto_init_countdown', [$quickviewEl] );

										// Ajax load at the first by Yith Wishlist Plugin
										if ( ( 'undefined' !== typeof yith_wcwl_l10n ) && yith_wcwl_l10n.enable_ajax_loading ) {
											if ( $( '.fancybox-opened .wishlist-fragment' ).length ) {
												var options = {},
													$product = $( '.fancybox-opened .wishlist-fragment' ),
													id = $product.attr( 'class' ).split( ' ' ).filter( ( val ) => {
														return val.length && val !== 'exists';
													} ).join( yith_wcwl_l10n.fragments_index_glue );
												options[id] = $product.data( 'fragment-options' );

												if ( !options ) {
													return;
												}

												var ajaxData = {
													action: yith_wcwl_l10n.actions.load_fragments,
													context: 'frontend',
													fragments: options
												};

												if ( typeof yith_wcwl_l10n.nonce != 'undefined' ) {
													ajaxData.nonce = yith_wcwl_l10n.nonce.load_fragments_nonce;
												}

												$.ajax( {
													ajaxData,
													method: 'post',
													success: function( data ) {
														if ( typeof data.fragments !== 'undefined' ) {
															$.each( data.fragments, function( i, v ) {
																var itemSelector = '.' + i.split( yith_wcwl_l10n.fragments_index_glue ).filter( ( val ) => { return val.length && val !== 'exists' && val !== 'with-count'; } ).join( '.' ),
																	toReplace = $( itemSelector );

																// find replace tempalte
																var replaceWith = $( v ).filter( itemSelector );

																if ( !replaceWith.length ) {
																	replaceWith = $( v ).find( itemSelector );
																}

																if ( toReplace.length && replaceWith.length ) {
																	toReplace.replaceWith( replaceWith );
																}
															} );
														}
													},
													url: yith_wcwl_l10n.ajax_url
												} );
											}
										}
										// Compatibility with Woo Variation Gallery
										$( document ).trigger( 'woo_variation_gallery_init' );
									}, 200 );
								},
								onUpdate: function() {
									theme.requestTimeout( function() {
										var $quickviewEl = $( '.quickview-wrap-' + pid );
										if ( $quickviewEl.length == 0 && $( '.woocommerce-wishlist' ).length ) { // if select variation on wishlist page
											$quickviewEl = $( '.quickview-wrap' );
										}
										if ( js_porto_vars.use_skeleton_screen.indexOf( 'quickview' ) == -1 || !js_porto_vars.quickview_skeleton ) {
											porto_woocommerce_init();
										}
										var $slider = $quickviewEl.find( '.product-image-slider' );
										if ( typeof $slider.data( 'owl.carousel' ) != 'undefined' && typeof $slider.data( 'owl.carousel' )._invalidated != 'undefined' )
											$slider.data( 'owl.carousel' )._invalidated.width = true;
										$slider.trigger( 'refresh.owl.carousel' );
										$( document.body ).trigger( 'porto_init_countdown', [$quickviewEl] );
									}, 300 );
								}
							};
							if ( js_porto_vars.use_skeleton_screen.indexOf( 'quickview' ) != -1 && js_porto_vars.quickview_skeleton ) {
								delete args['href'];
								delete args['ajax'];
								args['type'] = 'inline';
								$.fancybox.open(
									js_porto_vars.quickview_skeleton,
									args
								);
								$.ajax( {
									url: theme.ajax_url,
									type: 'post',
									dataType: 'html',
									data: {
										action: 'porto_product_quickview',
										variation_flag: typeof wc_add_to_cart_variation_params !== 'undefined',
										pid: pid,
										nonce: js_porto_vars.porto_nonce
									},
									success: function( res ) {
										var $res = $( res );
										$res.imagesLoaded( function() {
											$( '.skeleton-body.product' ).replaceWith( $res );
											theme.WooQtyField.initialize();
											$( window ).trigger( 'resize' );
											args['afterShow'].call( false );
										} );
									}
								} );
							} else {
								if ( typeof $.fancybox == 'function' ) {
								$.fancybox( args );
								} else if ( typeof $.fancybox == 'object' && $.fancybox.version && 0 === $.fancybox.version.indexOf( '3' ) ) {
									args['src'] = args['href'];
									args['ajax']['settings'] = {
										data: args['ajax']['data']
									};
									$.fancybox.open( args );
								}
							}
						}

						if ( $.fn.fancybox ) {
							init_quick_view_window();
						} else if ( !$( '#porto-script-jquery-fancybox' ).length ) {
							var js1 = document.createElement( 'script' );
							js1.id = 'porto-script-jquery-fancybox';
							$( js1 ).appendTo( 'body' ).on( 'load', function() {
								init_quick_view_window();
							} ).attr( 'src', js_porto_vars.ajax_loader_url.replace( '/images/ajax-loader@2x.gif', '/js/libs/jquery.fancybox.min.js' ) );
						}

						return false;
					} );

					// ajax add to cart on quickview
					if ( typeof wc_add_to_cart_params != 'undefined' ) {
						$( document.body ).on( 'click', '.single-product .single_add_to_cart_button:not(.disabled, .wpcbn-btn)', function( e ) {
							if ( $( this ).closest( '.single-product' ).hasClass( 'product-type-external' ) || $( this ).closest( '.single-product' ).hasClass( 'product-type-grouped' ) ) {
								return true;
							}
							if ( $( this ).hasClass( 'readmore' ) ) {
								return true;
							}
							e.preventDefault();

							var $button = $( this ),
								product_id = $button.val(),
								variation_id = $button.closest( 'form' ).find( 'input[name="variation_id"]' ).val(),
								quantity = $button.closest( 'form' ).find( 'input[name="quantity"]' ).val();
							if ( $button.hasClass( 'loading' ) ) {
								return false;
							}
							$button.removeClass( 'added' );
							$button.addClass( 'loading' );
							$button.parent().addClass( 'porto-ajax-loading' );
							if ( !$button.siblings( '.porto-loading-icon' ).length ) {
								let $last = $button.siblings( 'button:last-of-type' );
								$( '<span class="porto-loading-icon"></span>' ).insertAfter( $last.length ? $last : $button );
							}

							var data = {
								action: 'porto_add_to_cart',
								product_id: variation_id ? variation_id : product_id,
								quantity: quantity
							};
							if ( variation_id ) {
								var $variations = $button.closest( 'form' ).find( '.variations select' );
								if ( $variations.length ) {
									$variations.each( function() {
										var name = $( this ).data( 'attribute_name' ),
											val = $( this ).val();
										if ( name && val ) {
											data[name] = val;
										}
									} );
								}
							}

							// Trigger event.
							$( document.body ).trigger( 'adding_to_cart', [$button, data] );

							$.ajax( {
								type: 'POST',
								url: theme.ajax_url,
								data: data,
								dataType: 'json',
								success: function( response ) {
									$button.parent().removeClass( 'porto-ajax-loading' );
									if ( !response ) {
										return;
									}
									if ( response.error && response.product_url ) {
										window.location = response.product_url;
										return;
									}
									// Redirect to cart option
									if ( wc_add_to_cart_params.cart_redirect_after_add === 'yes' ) {
										window.location = wc_add_to_cart_params.cart_url;
										return;
									}

									// Trigger event.
									$( document.body ).trigger( 'added_to_cart', [response.fragments, response.cart_hash, $button] );
								}
							} );
						} );
					}

					return self;
				}
			}

		} );

	} ).apply( this, [window.theme, jQuery] );


	// Woocommerce Qty Field
	( function( theme, $ ) {

		theme = theme || {};

		$.extend( theme, {

			WooQtyField: {

				initialize: function() {

					this.build()
						.events();

					return this;
				},

				qty_handler: function() {
					var $obj = $( this );
					if ( $obj.closest( '.quantity' ).next( '.add_to_cart_button[data-quantity]' ).length ) {
						var count = $obj.val();
						if ( count ) {
							$obj.closest( '.quantity' ).next( '.add_to_cart_button[data-quantity]' ).attr( 'data-quantity', count );
						}
					}
				},

				build: function() {
					var self = this;

					// Quantity buttons
					$( 'div.quantity:not(.buttons_added), td.quantity:not(.buttons_added)' ).addClass( 'buttons_added' ).append( '<button type="button" value="+" class="plus">+</button>' ).prepend( '<button type="button" value="-" class="minus">-</button>' );

					// Target quantity inputs on product pages
					$( 'input.qty:not(.product-quantity input.qty)' ).each( function() {
						var min = parseFloat( $( this ).attr( 'min' ) );

						if ( min && min > 0 && parseFloat( $( this ).val() ) < min ) {
							$( this ).val( min );
						}
					} );

					$( 'input.qty:not(.product-quantity input.qty)' ).off( 'change', self.qty_handler ).on( 'change', self.qty_handler );

					$( document ).off( 'click', '.quantity .plus, .quantity .minus' ).on( 'click', '.quantity .plus, .quantity .minus', function() {

						// Get values
						var $qty = $( this ).closest( '.quantity' ).find( '.qty' ),
							currentVal = parseFloat( $qty.val() ),
							max = parseFloat( $qty.attr( 'max' ) ),
							min = parseFloat( $qty.attr( 'min' ) ),
							step = $qty.attr( 'step' );

						// Format values
						if ( !currentVal || currentVal === '' || currentVal === 'NaN' ) currentVal = 0;
						if ( max === '' || max === 'NaN' ) max = '';
						if ( min === '' || min === 'NaN' ) min = 0;
						if ( step === 'any' || step === '' || step === undefined || parseFloat( step ) === 'NaN' ) step = 1;

						// Change the value
						if ( $( this ).is( '.plus' ) ) {

							if ( max && ( max == currentVal || currentVal > max ) ) {
								$qty.val( max );
							} else {
								$qty.val( currentVal + parseFloat( step ) );
							}

						} else {

							if ( min && ( min == currentVal || currentVal < min ) ) {
								$qty.val( min );
							} else if ( currentVal > 0 ) {
								$qty.val( currentVal - parseFloat( step ) );
							}

						}

						// Trigger change event
						$qty.trigger( 'change' );
					} );

					return self;
				},

				events: function() {
					var self = this;

					$( document ).ajaxComplete( function( event, xhr, options ) {
						self.build();
					} );

					return self;
				}
			}

		} );

	} ).apply( this, [window.theme, jQuery] );


	// Woocommerce Variation Form
	( function( theme, $ ) {

		theme = theme || {};

		var duration = 300;

		$.extend( theme, {

			WooVariationForm: {

				initialize: function() {

					this.init().events();

					return this;
				},

				init: function() {
					$( '.variations_form' ).each( function() {
						var $variation_form = $( this ),
							$reset_variations = $variation_form.find( '.reset_variations' );

						if ( $reset_variations.css( 'visibility' ) == 'hidden' )
							$reset_variations.hide();
					} );
					return this;
				},

				events: function() {
					var self = this;

					$( document ).on( 'check_variations', '.variations_form', function( event, exclude, focus ) {
						var $variation_form = $( this ),
							$reset_variations = $variation_form.find( '.reset_variations' );

						if ( $reset_variations.css( 'visibility' ) == 'hidden' )
							$reset_variations.hide();
					} );

					$( document ).on( 'reset_image', '.variations_form', function( event ) {
						var $product = $( this ).closest( '.product, .product-col' ),
							$product_img = $product.find( 'div.product-images .woocommerce-main-image' );
						if ( $product.hasClass( 'porto-tb-item' ) ) { // in type builder
							$product_img = $product.find( '.porto-tb-featured-image img' ).eq( 0 );
						} else if ( $product.hasClass( 'product-col' ) ) { // shop pages
							$product_img = $product.find( 'div.product-image .inner img:first-child' );
						}
						var o_src = $product_img.attr( 'data-o_src' ),
							o_title = $product_img.attr( 'data-o_title' ),
							o_href = $product_img.attr( 'data-o_href' ),
							$thumb_img = $product.find( '.woocommerce-main-thumb' ),
							o_thumb_src = $thumb_img.attr( 'data-o_src' );

						var $image_slider = $product.find( '.product-image-slider' ),
							$thumbs_slider = $product.find( '.product-thumbs-slider' ),
							links;

						if ( $image_slider.length ) {
							$image_slider.trigger( 'to.owl.carousel', [0, duration, true] );
							links = $image_slider.data( 'links' );
						}
						if ( $thumbs_slider.length ) {
							$thumbs_slider.trigger( 'to.owl.carousel', [0, duration, true] );
							$thumbs_slider.find( '.owl-item:eq(0)' ).trigger( 'click' );
						}

						if ( o_src ) {
							$product_img
								.attr( 'src', o_src )
								.attr( 'srcset', '' )
								.attr( 'alt', o_title )
								.attr( 'href', o_href );

							$product_img.each( function() {
								var elevateZoom = $( this ).data( 'elevateZoom' );
								if ( typeof elevateZoom != 'undefined' ) {
									elevateZoom.swaptheimage( $( this ).attr( 'src' ), $( this ).attr( 'src' ) );
								}
							} );

							if ( theme.product_image_popup && typeof links != 'undefined' ) {
								links[0].src = o_href;
								links[0].title = o_title;
							}
						}
						if ( o_thumb_src ) {
							$thumb_img.attr( 'src', o_thumb_src );
						}
					} );

					$( document ).on( 'found_variation', '.variations_form', function( event, variation ) {

						if ( typeof variation == 'undefined' ) {
							return;
						}

						var $product = $( this ).closest( '.product, .product-col' ),
							$image_slider = $product.find( '.product-image-slider' ),
							$thumbs_slider = $product.find( '.product-thumbs-slider' ),
							links;

						if ( $image_slider.length ) {
							$image_slider.trigger( 'to.owl.carousel', [0, duration, true] );
							links = $image_slider.data( 'links' );
						}
						if ( $thumbs_slider.length ) {
							$thumbs_slider.trigger( 'to.owl.carousel', [0, duration, true] );
							$thumbs_slider.find( '.owl-item:eq(0)' ).trigger( 'click' );
						}

						var $shop_single_image = $product.find( 'div.product-images .woocommerce-main-image' ).length ? $product.find( 'div.product-images .woocommerce-main-image' ) : $( '.single-product div.product-images .woocommerce-main-image' ),
							productimage = $shop_single_image.attr( 'data-o_src' ),
							imagetitle = $shop_single_image.attr( 'data-o_title' ),
							imagehref = $shop_single_image.attr( 'data-o_href' ),
							$shop_thumb_image = $product.find( '.woocommerce-main-thumb' ),
							thumbimage = $shop_thumb_image.attr( 'data-o_src' ),
							variation_image = variation.image_src,
							variation_link = variation.image_link,
							variation_title = variation.image_title,
							variation_thumb = variation.image_thumb;

						if ( $product.hasClass( 'porto-tb-item' ) ) { // in type builder
							$shop_single_image = $product.find( '.porto-tb-featured-image img' ).eq( 0 );
							productimage = $shop_single_image.attr( 'data-o_src' );
							variation_image = variation.image.thumb_src;
						} else if ( $product.hasClass( 'product-col' ) ) { // shop pages
							$shop_single_image = $product.find( 'div.product-image .inner img:first-child' );
							productimage = $shop_single_image.attr( 'data-o_src' );
							variation_image = variation.image.thumb_src;
						}

						if ( !productimage ) {
							productimage = $shop_single_image.attr( 'data-oi' ) ? $shop_single_image.attr( 'data-oi' ) : ( ( !$shop_single_image.attr( 'src' ) ) ? '' : $shop_single_image.attr( 'src' ) );
							$shop_single_image.attr( 'data-o_src', productimage );
						}

						if ( !imagehref ) {
							imagehref = ( !$shop_single_image.attr( 'href' ) ) ? '' : $shop_single_image.attr( 'href' );
							$shop_single_image.attr( 'data-o_href', imagehref );
						}

						if ( !imagetitle ) {
							imagetitle = ( !$shop_single_image.attr( 'alt' ) ) ? '' : $shop_single_image.attr( 'alt' );
							$shop_single_image.attr( 'data-o_title', imagetitle );
						}

						if ( !thumbimage ) {
							thumbimage = $shop_thumb_image.attr( 'data-oi' ) ? $shop_thumb_image.attr( 'data-oi' ) : ( ( !$shop_thumb_image.attr( 'src' ) ) ? '' : $shop_thumb_image.attr( 'src' ) );
							$shop_thumb_image.attr( 'data-o_src', thumbimage );
						}

						if ( variation_image ) {
							$shop_single_image.attr( 'src', variation_image );
							$shop_single_image.attr( 'srcset', '' );
							$shop_single_image.attr( 'alt', variation_title );
							$shop_single_image.attr( 'href', variation_link );
							$shop_thumb_image.attr( 'src', variation_thumb );
							if ( theme.product_image_popup && typeof links != 'undefined' ) {
								links[0].src = variation_link;
								links[0].title = variation_title;
							}
						} else {
							$shop_single_image.attr( 'src', productimage );
							$shop_single_image.attr( 'srcset', '' );
							$shop_single_image.attr( 'alt', imagetitle );
							$shop_single_image.attr( 'href', imagehref );
							$shop_thumb_image.attr( 'src', thumbimage );
							if ( theme.product_image_popup && typeof links != 'undefined' ) {
								links[0].src = imagehref;
								links[0].title = imagetitle;
							}
						}
						$shop_single_image.each( function() {
							var elevateZoom = $( this ).data( 'elevateZoom' );
							if ( typeof elevateZoom != 'undefined' ) {
								elevateZoom.swaptheimage( $( this ).attr( 'src' ), $( this ).attr( 'src' ) );
							}
						} );
					} );

					// fix scrolling to top issue on fancybox quickview whenever updating variation
					var porto_fb_update_trigger = null;
					$( document ).on( 'found_variation reset_image', '.variations_form', function( event, variation ) {
						if ( $( this ).closest( '.fancybox-inner' ).length && $.fancybox ) {
							$( window ).off( 'resize.fb', $.fancybox.update );
							if ( porto_fb_update_trigger ) {
								theme.deleteTimeout( porto_fb_update_trigger );
							}
							porto_fb_update_trigger = theme.requestTimeout( function() {
								$( window ).on( 'resize.fb', $.fancybox.update );
								$.fancybox.reposition();
								porto_fb_update_trigger = false;
							}, 600 );
						}
					} );

					return self;
				}
			}

		} );

	} ).apply( this, [window.theme, jQuery] );


	// Woocommerce Events
	( function( theme, $ ) {

		theme = theme || {};

		$.extend( theme, {

			WooEvents: {

				initialize: function() {

					this.events();

					return this;
				},

				events: function() {
					var self = this;

					// wcml currency switcher
					$( document ).on( 'click', '.wcml-switcher li', function() {
						if ( $( this ).parent().attr( 'disabled' ) == 'disabled' )
							return;
						var currency = $( this ).attr( 'rel' );
						self.loadCurrency( currency );
					} );

					// woocommerce currency switcher
					$( document ).on( 'click', '.woocs-switcher li', function() {
						if ( $( this ).parent().attr( 'disabled' ) == 'disabled' )
							return;
						var currency = $( this ).attr( 'rel' );
						self.loadWoocsCurrency( currency );
					} );

					return self;
				},

				loadCurrency: function( currency ) {
					$( '.wcml-switcher' ).attr( 'disabled', 'disabled' );
					$( '.wcml-switcher' ).append( '<li class="loading"></li>' );
					var data = { action: 'wcml_switch_currency', currency: currency };
					$.ajax( {
						type: 'post',
						url: theme.ajax_url,
						data: {
							action: 'wcml_switch_currency',
							currency: currency
						},
						success: function( response ) {
							$( '.wcml-switcher' ).removeAttr( 'disabled' );
							$( '.wcml-switcher' ).find( '.loading' ).remove();
							window.location = window.location.href;
						}
					} );
				},

				loadWoocsCurrency: function( currency ) {
					$( '.woocs-switcher' ).attr( 'disabled', 'disabled' );
					$( '.woocs-switcher' ).append( '<li class="loading"></li>' );
					var l = window.location.href;
					l = l.split( '?' );
					l = l[0];
					var string_of_get = '?';
					woocs_array_of_get.currency = currency;

					if ( Object.keys( woocs_array_of_get ).length > 0 ) {
						jQuery.each( woocs_array_of_get, function( index, value ) {
							string_of_get = string_of_get + "&" + index + "=" + value;
						} );
					}
					window.location = l + string_of_get;
				},

				removeParameterFromUrl: function( url, parameter ) {
					return url
						.replace( new RegExp( '[?&]' + parameter + '=[^&#]*(#.*)?$' ), '$1' )
						.replace( new RegExp( '([?&])' + parameter + '=[^&]*&' ), '$1' );
				}
			}

		} );

	} ).apply( this, [window.theme, jQuery] );

	( function( theme, $ ) {

		$( document ).ready( function() {
			// Woocommerce Qty Field
			if ( typeof theme.WooQtyField !== 'undefined' ) {
				theme.WooQtyField.initialize();
			}

			// Woocommerce Quick View
			if ( typeof theme.WooQuickView !== 'undefined' ) {
				theme.WooQuickView.initialize();
			}

			// Woocommerce Events
			if ( typeof theme.WooEvents !== 'undefined' ) {
				theme.WooEvents.initialize();
			}

			// disable drop down
			if ( !( 'ontouchstart' in document ) ) {
				$( '.mini-cart' ).on( 'hide.bs.dropdown', function() {
					return false;
				} );
			} else {
				$( '#mini-cart .cart-head' ).on( 'click', function( e ) {
					$( this ).parent().toggleClass( 'open' );
				} );
				$( 'html,body' ).on( 'click', function( e ) {
					if ( $( '#mini-cart' ).hasClass( 'open' ) && !$( e.target ).closest( '#mini-cart' ).length ) {
						$( '#mini-cart' ).removeClass( 'open' );
					}
				} );
			}

			$( document ).on( 'tabactivate', '.woocommerce-tabs', function( e, ui ) {
				var label = $( ui ).attr( 'data-target' );
				var panel = $( ui ).closest( '.woocommerce-tabs' ).find( '[aria-labelledby="' + label + '"' );
				theme.refreshVCContent( panel );
			} );

			// Perfect WooCommerce Brand Plugin
			$( document ).find( '.pwb-columns a[href="' + window.location.href + '"' ).each( function(){
				$( this ).addClass( 'active' );
			} )
		} );
	} ).apply( this, [window.theme, jQuery] );


	( function( theme, $, undefined ) {

		$( document ).ready( function() {

			/*===================================================================================*/
			/*  TOOLTIP FOR YITH WISHLIST, COMPARE, ADD TO CART, QUICK VIEW
			/*===================================================================================*/
			if ( ! theme.isMobile() ) {
				$( document ).on( 'yith_wcwl_init_after_ajax', function() {
					$( '.product-col .add_to_wishlist:not([data-bs-original-title]), .product-col .yith-wcwl-wishlistaddedbrowse > a:not([data-bs-original-title]), .product-col .yith-wcwl-wishlistexistsbrowse > a:not([data-bs-original-title])' ).each( function() {
						let _this = $( this );
						if ( ! _this.attr( 'title' ) ) {
							_this.attr( 'title', _this.text().trim() );
						}
						_this.tooltip();
					} );
				} );
			}
			// Woocommerce Variation Form
			theme.WooVariationForm.initialize();

			// Woocommerce Product Image Slider
			if ( typeof theme.initAsync == 'function' ) {
				theme.WooProductImageSlider.initialize();
				porto_woocommerce_init();
			} else {
				$.when( theme.asyncDeferred ).done( function() {
					theme.WooProductImageSlider.initialize();
					porto_woocommerce_init();
				} );
			}

			// Yith plugins compatibility
			$( document ).on( 'yith_wccl_product_gallery_loaded', function() {
				theme.WooProductImageSlider.initialize();
			} );

			$( window ).on( 'vc_reload', function() {
				porto_woocommerce_init();
				$( '.type-product' ).addClass( 'product' );
			} );

			// Add wishlist popup
			/*if ( !$( '#yith-wcwl-popup-message' ).length ) {
				$( 'body' ).prepend( $( '<div>' ).attr( 'id', 'yith-wcwl-popup-message' ).html( '<div id="yith-wcwl-message"></div>' ).hide() );
			}*/

			// shop horizontal filter
			$( document ).on( 'click', '.porto-product-filters-toggle a', function( e ) {
				e.preventDefault();
				$( this ).closest( '.porto-product-filters-toggle' ).toggleClass( 'opened' );
				var $products_wrapper = $( this ).closest( '#main' ).find( '.main-content' ).find( 'ul.products' ), offset, $main = $( this ).closest( '#main' ).find( '.main-content-wrap' );
				$main.toggleClass( 'opened' );
				if ( $main.hasClass( 'opened' ) ) {
					offset = -1;
				} else {
					offset = 1;
				}
				if ( $products_wrapper.hasClass( 'grid' ) ) {
					var cols_lg_index = 0, cols_md_index = 0, width_lg_index = 0, width_md_index = 0;
					for ( var i = 1; i <= 8; i++ ) {
						if ( !cols_lg_index && $products_wrapper.hasClass( 'ccols-xl-' + i ) ) {
							cols_lg_index = i;
							if ( i + offset >= 1 ) {
								$products_wrapper.removeClass( 'ccols-xl-' + i );
								$products_wrapper.addClass( 'ccols-xl-' + ( i + offset ) );
							}
						}
						if ( !cols_md_index && $products_wrapper.hasClass( 'ccols-lg-' + i ) ) {
							cols_md_index = i;
							if ( i + offset >= 1 ) {
								$products_wrapper.removeClass( 'ccols-lg-' + i );
								if ( offset === -1 ) {
									$products_wrapper.addClass( 'ccols-md-' + i );
								}
								$products_wrapper.addClass( 'ccols-lg-' + ( i + offset ) );
							}
						}
						if ( !width_lg_index && $products_wrapper.hasClass( 'pwidth-lg-' + i ) ) {
							width_lg_index = i;
							if ( i + offset >= 1 ) {
								$products_wrapper.removeClass( 'pwidth-lg-' + i );
								$products_wrapper.addClass( 'pwidth-lg-' + ( i + offset ) );
							}
						}
						if ( !width_md_index && $products_wrapper.hasClass( 'pwidth-md-' + i ) ) {
							width_md_index = i;
							if ( i + offset >= 1 ) {
								$products_wrapper.removeClass( 'pwidth-md-' + i );
								$products_wrapper.addClass( 'pwidth-md-' + ( i + offset ) );
							}
						}
					}
				}
				theme.requestTimeout( function() {
					$( window ).trigger( 'scroll' );
					// Update Carousel
					$( document ).find( '.owl-carousel' ).each( function( e ) {
						var $this = $( this );
						if ( $this.data( 'owl.carousel' ) ) {
							$this.trigger( 'refresh.owl.carousel' );
						}
					} );
					// Update Swiper
					$( document ).find( '.swiper-container' ).each( function( e ) {
						var $this = $( this ),
							$instance = $this.data( 'swiper' );
						if ( $instance ) {
							$instance.update();
						}
					} );
				}, 300 );

				if ( $main.hasClass( 'opened' ) ) {
					$.cookie( 'porto_horizontal_filter', 'opened' );
				} else {
					$.cookie( 'porto_horizontal_filter', 'closed' );
				}
				theme.refreshStickySidebar( true );

				return false;
			} );
			if ( $.cookie && 'opened' == $.cookie( 'porto_horizontal_filter' ) && $( '#main .porto-products-filter-body' ).length && !theme.isTablet() ) {
				$( '.porto-product-filters-toggle a' ).trigger( 'click' );
				$( '#main .porto-products-filter-body [data-plugin-sticky]:not(.manual)' ).addClass( 'manual' );
				setTimeout( function() {
					var $obj = $( '#main .porto-products-filter-body [data-plugin-sticky].manual' ),
						pluginOptions = $obj.data( 'plugin-options' );
					$obj.removeClass( 'manual' ).themeSticky( pluginOptions );
					theme.requestTimeout( function() {
						$( window ).trigger( 'scroll' );
					}, 100 );
				}, 500 );
			}

			$( document ).on( 'click', '.porto-product-filters.style2 .widget-title', function( e ) {
				e.preventDefault();
				if ( $( this ).next().is( ':hidden' ) ) {
					$( '.porto-product-filters.style2 .widget-title' ).next().hide();
					$( '.porto-product-filters.style2 .widget' ).removeClass( 'opened' );
					$( this ).next().show();
					$( this ).next().find( 'input[type="text"]:first-child' ).focus();
				} else {
					$( this ).next().hide();
				}
				$( this ).parent().toggleClass( 'opened' );
				return false;
			} );
			$( 'body' ).on( 'click', function( e ) {
				if ( !$( e.target ).is( '.porto-product-filters' ) && !$( e.target ).is( '.porto-product-filters *' ) ) {
					$( '.porto-product-filters.style2 .widget-title' ).next().hide();
					$( '.porto-product-filters.style2 .widget' ).removeClass( 'opened' );
				}
			} );

			// Perform AJAX login on form submit
			$( 'body' ).on( 'click', '#login-form-popup form .woocommerce-Button', function( e ) {
				var $this = $( this ),
					$form = $this.closest( 'form' ),
					isLogin = $this.hasClass( 'login-btn' );
				if ( !isLogin && !$this.hasClass( 'register-btn' ) ) {
					isLogin = $form.hasClass( 'login' );
				}
				$form.find( '#email' ).val( $form.find( '#username' ).val() );
				$form.find( 'p.status' ).show().text( js_porto_vars.login_popup_waiting_msg ? js_porto_vars.login_popup_waiting_msg : 'Please wait...' ).addClass( 'loading' );
				$form.find( 'button[type=submit]' ).attr( 'disabled', 'disabled' );
				$.ajax( {
					type: 'POST',
					dataType: 'json',
					url: theme.ajax_url,
					data: $form.serialize() + '&action=porto_account_login_popup_' + ( isLogin ? 'login' : 'register' ),
					success: function( data ) {
						$form.find( 'p.status' ).html( data.message.replace( '/<script.*?\/script>/s', '' ) ).removeClass( 'loading' );
						$form.find( 'button[type=submit]' ).removeAttr( 'disabled' );
						if ( data.loggedin === true ) {
							window.location.reload();
						}
					}
				} );
				e.preventDefault();
			} );

			// shortcodes
			var $ajax_tab_cache = {};
			$( document ).on( 'click', '.porto-products.show-category .product-categories a', function( e ) {
				e.preventDefault();
				var $this = $( this ), $form = $this.closest( '.porto-products' ).find( '.pagination-form' ), id = $this.closest( '.porto-products' ).attr( 'id' ), group = [];
				$( this ).parent().siblings().removeClass( 'current' );
				$( this ).parent().addClass( 'current' );
				if ( typeof $this.data( 'sort_id' ) != 'undefined' ) {
					$form.find( 'input[name="orderby"]' ).val( $this.data( 'sort_id' ) );
					group = $this.data( 'sort_id' );
					$form.find( 'input[name="category"]' ).val( '' );
				}
				if ( typeof $this.data( 'cat_id' ) != 'undefined' ) {
					if ( typeof $this.data( 'sort_id' ) == 'undefined' ) {
						$form.find( 'input[name="orderby"]' ).val( $form.find( 'input[name="original_orderby"]' ).val() );
						group = $form.find( 'input[name="original_orderby"]' ).val();
					}
					if ( typeof $form.data( 'original_cat_id' ) == 'undefined' ) {
						$form.data( 'original_cat_id', $form.find( 'input[name="category"]' ).val() );
						group = $form.find( 'input[name="category"]' ).val();
					}
					if ( $this.data( 'cat_id' ) ) {
						$form.find( 'input[name="category"]' ).val( $this.data( 'cat_id' ) );
						group = $this.data( 'cat_id' );
					} else {
						if ( $form.data( 'original_cat_id' ) ) {
							$form.find( 'input[name="category"]' ).val( $form.data( 'original_cat_id' ) );
							group = $form.data( 'original_cat_id' );
						} else {
							$form.find( 'input[name="category"]' ).val( '' );
							group = '';
						}
					}
				}
				var data = $form.serialize() + '&product-page=1&action=porto_woocommerce_shortcodes_products&nonce=' + js_porto_vars.porto_nonce;
				$this.closest( '.porto-products' ).find( 'ul.products' ).trigger( 'porto_update_products', [data, '', $this, id, group] );
			} );
			$( document ).on( 'click', '.porto-products .page-numbers a', function( e ) {
				var $this = $( this ), pagination_style,
					$shop_container = $this.closest( '.porto-products' ).find( 'ul.products' ),
					cur_page = $shop_container.data( 'cur_page' ),
					max_page = $shop_container.data( 'max_page' ),
					$form = $this.closest( '.porto-products' ).find( '.pagination-form' );
				e.preventDefault();
				if ( $this.closest( '.pagination' ).hasClass( 'load-more' ) ) {
					if ( !cur_page || !max_page || ++cur_page > max_page ) {
						return;
					}
					pagination_style = 'load_more';
					$this.data( 'text', $this.text() );
					$this.text( js_porto_vars.loader_text );
				} else {
					var url = new RegExp( "product-page(=|/)([^(&|/)]*)", "i" ).exec( this.href );
					cur_page = url && unescape( url[2] ) || "";
					pagination_style = 'default';
				}
				var page_var = cur_page ? '&product-page=' + escape( cur_page ) : '', data = $form.serialize() + page_var + '&action=porto_woocommerce_shortcodes_products&nonce=' + js_porto_vars.porto_nonce;
				$shop_container.trigger( 'porto_update_products', [data, pagination_style, $this] );
				if ( 'default' == pagination_style ) {
					theme.scrolltoContainer( $shop_container );
				}
			} );
			$( document ).on( 'porto_update_products', 'ul.products', function( e, data, pagination_style, $obj, id, group ) {
				var $this = $( this );
				// ajax tab
				if ( undefined == $ajax_tab_cache[id] || -1 == Object.keys( $ajax_tab_cache[id] ).indexOf( group ) ) {
					porto_ajax_load_products( $this, data, pagination_style, $ajax_tab_cache, id, group );
				} else {
					var response = $ajax_tab_cache[id][group];
					//animation
					$this.css( 'opacity', 0 );
					$this.animate(
						{
							'opacity': 1,
						},
						400,
						function() {
							$this.css( 'opacity', '' );
						}
					);

					porto_ajax_load_products_success( $this, response, pagination_style );
				}
			} );

			// initialize woocommerce actions after skeleton loading
			var skeletonLoadingTrigger;
			$( '.skeleton-loading' ).on( 'skeleton-loaded', function() {
				var $this = $( this );
				if ( skeletonLoadingTrigger ) {
					theme.deleteTimeout( skeletonLoadingTrigger );
				}
				porto_woocommerce_variations_init( $this );

				// yith wishlist pro compatibility
				if ( $this.hasClass( 'products' ) || $this.hasClass( 'product' ) ) {
					$( document ).trigger( 'yith_infs_added_elem' );
				}

				skeletonLoadingTrigger = theme.requestTimeout( function() {
					porto_woocommerce_init();
					if ( $( 'body' ).hasClass( 'single-product' ) ) {
						theme.WooVariationForm.init();
						var $image_slider = $( '.product-image-slider' );
						if ( $image_slider.length && $image_slider.data( 'owl.carousel' ) ) {
							$image_slider.trigger( 'refresh.owl.carousel' );
						} else {
							theme.WooProductImageSlider.initialize();
						}
						$( '.wc-tabs-wrapper, .woocommerce-tabs, #rating' ).trigger( 'init' );

						// compatibility issue with Yith WooCommerce Booking form
						if ( $( document.body ).hasClass( 'yith-booking' ) ) {
							$( document ).trigger( 'yith-wcbk-init-booking-form' );
						}
					}

					// refresh cart content
					if ( $this.find( '.widget_shopping_cart_content' ).length ) {
						$( document.body ).trigger( 'wc_fragment_refresh' );
					}
				}, 100 );
			} );
		} );
		
		var stickyShop = function() {
		
			// sticky add to cart
			var $sticky_product_obj = $( '.single-product .sticky-product' ),
				is_elementor_editor = $( document.body ).hasClass( 'elementor-editor-active' ),
				$sticky_product_form;

			var init_sticky_add_to_cart_fn = function( $sticky_product_obj, is_elementor_editor ) {
				if ( is_elementor_editor && elementorFrontend && elementorFrontend.hooks ) {
					elementorFrontend.hooks.addAction( 'frontend/element_ready/porto_cp_addcart_sticky.default', function( $obj ) {
						$sticky_product_obj = $( '.single-product .sticky-product' );
						window.dispatchEvent( new Event( 'scroll' ) );
					} );
				}

				$sticky_product_form = $( 'form.cart:visible' ).eq(0);

				window.addEventListener( 'scroll', function() {
					var scrollTop = $( window ).scrollTop(),
						offset = theme.adminBarHeight() + ( theme.StickyHeader.sticky_height > 1 ? theme.StickyHeader.sticky_height : 0 ),
                        prevScrollPos = $sticky_product_obj.data('prev-pos') ? $sticky_product_obj.data('prev-pos') : 0;
					
					if ( ! $sticky_product_obj.hasClass( 'show-mobile' ) && $( window ).width() < 768 ) {
						$( 'body' ).css( 'padding-bottom', '' );
					} else if ( $sticky_product_form.length && $sticky_product_form.offset().top + $sticky_product_form.height() / 2 <= scrollTop + offset ) {
						if ( $( '.page-wrapper' ).hasClass( 'sticky-scroll-up' ) && ! $( 'html' ).hasClass( 'porto-search-opened' ) && $sticky_product_obj.hasClass( 'pos-top' ) ) {
							if ( scrollTop >= prevScrollPos ) {
								$sticky_product_obj.addClass('scroll-down');
							} else {
								$sticky_product_obj.removeClass('scroll-down');
							}

							var scrollUpOffset = - theme.StickyHeader.sticky_height;
							if ( 'undefined' == typeof ( theme.StickyHeader.sticky_height ) ) {
								$sticky_product_obj.data( 'prev-pos', 0 );
							} else {
								// The transition of Sticky isn't working in this area
								var $transitionOffset = ( offset > 100 ) ? offset : 100;
								if ( $( 'form.cart' ).offset().top + $sticky_product_obj.outerHeight() + $transitionOffset < scrollTop + offset + scrollUpOffset ) {
									$sticky_product_obj.addClass( 'sticky-ready' );
								} else {
									$sticky_product_obj.removeClass( 'sticky-ready' );
								}
								$sticky_product_obj.data( 'prev-pos', scrollTop );
							}
						}

						var porto_progress_obj = $( '.porto-scroll-progress.fixed-top.fixed-under-header' );
						if ( porto_progress_obj.length > 0 ) {
							offset += porto_progress_obj.height();
						}

						$sticky_product_obj.removeClass( 'hide' );
						if ( !$sticky_product_obj.hasClass( 'pos-bottom' ) ) {
							$sticky_product_obj.css( 'top', offset );
						} else if ( $sticky_product_obj.hasClass( 'show-mobile' ) || ( ! $sticky_product_obj.hasClass( 'show-mobile' ) && $( window ).width() >= 768 ) ) {
							$( 'body' ).css( 'padding-bottom', $sticky_product_obj.outerHeight() );
						}
					} else {
						$sticky_product_obj.addClass( 'hide' );
						if ( $sticky_product_obj.hasClass( 'pos-bottom' ) && ( $sticky_product_obj.hasClass( 'show-mobile' ) || ( ! $sticky_product_obj.hasClass( 'show-mobile' ) && $( window ).width() >= 768 ) ) ) {
							$( 'body' ).css( 'padding-bottom', '' );
						}
					}
				}, { passive: true } );
				$sticky_product_obj.find( '.add-to-cart .button' ).on( 'click', function( e ) {
					e.preventDefault();
					if ( $sticky_product_obj.find( '.add-to-cart .qty' ).length ) {
						$( '.single-product form .quantity .qty' ).filter(function() {
							if ( $( this ).closest( '.product-col' ).length ) {
								return false;
							}
							return true;
						}).val( $sticky_product_obj.find( '.add-to-cart .qty' ).val() );
					}
					$( '.single-product form .single_add_to_cart_button' ).filter(function() {
						if ( $( this ).closest( '.product-col' ).length ) {
							return false;
						}
						return true;
					}).eq(0).trigger( 'click' );
				} );
				$( '.single-product .entry-summary .quantity' ).clone().prependTo( '.single-product .sticky-product .add-to-cart' );

				var origin_img = $sticky_product_obj.find( '.sticky-image img' ).data( 'oi' ) ? $sticky_product_obj.find( '.sticky-image img' ).data( 'oi' ) : $sticky_product_obj.find( '.sticky-image img' ).attr( 'src' ),
					origin_price = $sticky_product_obj.find( '.price' ).html(),
					origin_stock = $sticky_product_obj.find( '.availability' ).html(),
					is_variation = false;
				$( document ).on( 'found_variation reset_data', '.variations_form', function( e, obj ) {
					if ( $( e.currentTarget ).closest( '.product-col' ).length == 0 ) {
						if ( obj ) {
							is_variation = true;
							$sticky_product_obj.find( '.sticky-image img' ).attr( 'src', obj.image_thumb ? obj.image_thumb : origin_img );
							$sticky_product_obj.find( '.price' ).replaceWith( obj.price_html );
							$sticky_product_obj.find( '.availability' ).html( obj.availability_html ? obj.availability_html : origin_stock );
						} else if ( is_variation ) {
							is_variation = false;
							$sticky_product_obj.find( '.sticky-image img' ).attr( 'src', origin_img );
							$sticky_product_obj.find( '.price' ).html( origin_price );
							$sticky_product_obj.find( '.availability' ).html( origin_stock );
						}	
					}
				} );
			};

			if ( $sticky_product_obj.length || is_elementor_editor ) {
				init_sticky_add_to_cart_fn( $sticky_product_obj, is_elementor_editor );
			} else if ( $( 'div.product.skeleton-loading' ).length ) {
				$( 'div.product.skeleton-loading' ).on( 'skeleton-loaded', function() {
					$sticky_product_obj = $( '.single-product .sticky-product' );
					init_sticky_add_to_cart_fn( $sticky_product_obj, is_elementor_editor );
				} );
			} else {
				$( document.body ).on( 'porto_elementor_editor_init', function() {
					var $sticky_product_obj = $( '.single-product .sticky-product' ),
						is_elementor_editor = $( document.body ).hasClass( 'elementor-editor-active' );
					if ( $sticky_product_obj.length || is_elementor_editor ) {
						init_sticky_add_to_cart_fn( $sticky_product_obj, is_elementor_editor );
					}
				} );
			}

			// sticky filter on mobile
			if ( 1 === $( '.shop-loop-before' ).length ) {
				var porto_progress_obj = $( '.porto-scroll-progress.fixed-top.fixed-under-header' ),
					porto_progress_height = 0;
				if ( porto_progress_obj.length > 0 ) {
					var flag = false;
					if ( porto_progress_obj.is( ':hidden' ) ) {
						porto_progress_obj.show();
						flag = true;
					}
					porto_progress_height = porto_progress_obj.height();
					if ( flag ) {
						porto_progress_obj.hide();
					}
				} else {
					porto_progress_height = 0;
				}

				var init_filter_sticky = function() {
					var $obj = $( '.shop-loop-before' ),
						prevScrollPos = $obj.data('prev-pos') ? $obj.data('prev-pos') : 0,
						scrollUpOffset = 0,
						$pageWrapper = $( '.page-wrapper' );
					if ( 'none' == $obj.css( 'display' ) ) {
						// Found Nothing
						return;
					}
					if ( !$obj.prev( '.filter-placeholder' ).length ) {
						$( '<div class="filter-placeholder m-0"></div>' ).insertBefore( $obj );
					}
					var $ph = $obj.prev( '.filter-placeholder' ),
						scrollTop = $( window ).scrollTop(),
						offset = theme.adminBarHeight() + theme.StickyHeader.sticky_height + porto_progress_height - 1,
						objHeight = $obj.outerHeight() + parseInt( $obj.css( 'margin-bottom' ) );
					if ( $( '.page-wrapper' ).hasClass( 'sticky-scroll-up' ) ) {
						if ( scrollTop >= prevScrollPos ) {
							$obj.addClass('scroll-down');
						} else {
							$obj.removeClass('scroll-down');
						}
						// Header is scroll-up Sticky Type
						scrollUpOffset = - theme.StickyHeader.sticky_height;
						if ( 'undefined' == typeof ( theme.StickyHeader.sticky_height ) ) {
							$obj.data( 'prev-pos', 0 );
						} else {
							// The transition of Sticky isn't working in this area
							var $transitionOffset = ( offset > 100 ) ? offset : 100;
							if ( $ph.offset().top + objHeight + $transitionOffset < scrollTop + offset + scrollUpOffset ) {
								$obj.addClass( 'sticky-ready' );
							} else {
								$obj.removeClass( 'sticky-ready' );
							}
							$obj.data( 'prev-pos', scrollTop );
						}
					}
					// if ( $( 'html.filter-sidebar-opened' ).length ) {
					// 	$ph.css( 'height', '' );
					// 	return;
					// }
					if ( ( $ph.offset().top + objHeight < scrollTop + offset + scrollUpOffset ) ) {
						if ( ! $pageWrapper.hasClass( 'sticky-scroll-up' ) || ( $pageWrapper.hasClass( 'sticky-scroll-up' ) && 0 !== prevScrollPos ) ) {
							$ph.css( 'height', objHeight );
							$obj.css( 'top', offset );
							$obj.addClass( 'sticky' );
						}
					} else {
						$ph.css( 'height', '' );
						$obj.removeClass( 'sticky' ).css( 'top', '' );
					}
				};
				if ( window.innerWidth < 992 ) {
					window.removeEventListener( 'scroll', init_filter_sticky );
					window.addEventListener( 'scroll', init_filter_sticky, { passive: true } );
					init_filter_sticky();
				}
				var request_timer = null,
					old_win_width = window.innerWidth;
				$( window ).on( 'resize', function() {
					if ( old_win_width != window.innerWidth ) {
						if ( request_timer ) {
							theme.deleteTimeout( request_timer );
							request_timer = false;
						}
						if ( window.innerWidth < 992 ) {
							request_timer = theme.requestTimeout( function() {
								window.removeEventListener( 'scroll', init_filter_sticky );
								window.addEventListener( 'scroll', init_filter_sticky, { passive: true } );
								$( window ).trigger( 'scroll' );
							}, 100 );
						} else {
							window.removeEventListener( 'scroll', init_filter_sticky );
							$( '.shop-loop-before' ).removeClass( 'sticky' ).css( 'top', '' ).prev( '.filter-placeholder' ).css( 'height', '' );
						}

						if ( $sticky_product_obj.length ) {
							$sticky_product_form = $( 'form.cart:visible' ).eq(0);
						}
						old_win_width = window.innerWidth;
					}
				} );
			}
		}
		if ( theme.isReady ) { // Finish init
			stickyShop();
		}
		$( document ).on( 'porto_theme_init', stickyShop );

		// cart page accordion
		$( '.cart-v2 .cart_totals .accordion-toggle.out' ).removeClass( 'out' );
		$( document ).ajaxComplete( function( event, xhr, options ) {
			$( '.cart-v2 .cart_totals .accordion-toggle.out' ).each( function() {
				if ( $( $( this ).attr( 'href' ) ).length && $( $( this ).attr( 'href' ) ).is( ':hidden' ) ) {
					$( this ).removeClass( 'collapsed' );
					$( $( this ).attr( 'href' ) ).addClass( 'show' );
				}
			} );
		} );

		// porto products filter element
		$( '.porto_products_filter_form .btn-submit' ).on( 'click', function( e ) {
			e.preventDefault();
			var data = $( this ).closest( 'form' ).serializeArray(),
				submit_data = '';
			for ( var i in data ) {
				var param = data[i];
				if ( param.value ) {
					if ( submit_data ) {
						submit_data += '&';
					}
					submit_data += param.name + '=' + param.value;
					if ( 'min_price' == param.name ) {
						var max_price = $( this ).closest( 'form' ).find( '.porto_dropdown_price_range option:selected' ).data( 'maxprice' );
						if ( max_price ) {
							submit_data += '&max_price=' + max_price;
						}
					}
				}
			}
			var action_url = $( this ).closest( 'form' ).attr( 'action' );
			location.href = action_url + ( -1 === action_url.indexOf( '?' ) ? '?' : '&' ) + submit_data;
		} );

		// yith wishlist
		if ( $( '.wishlist_table.responsive' ).length ) {
			$( window ).on( 'resize', function() {
				var media = window.matchMedia( '(max-width: 768px)' ),
					$wishlist_table = $( '.wishlist_table.responsive' );
				if ( $wishlist_table.hasClass( 'traditional' ) ) {
					if ( media.matches ) {
						$wishlist_table.addClass( 'mobile' );
					} else {
						$wishlist_table.removeClass( 'mobile' );
					}
				}
			} );
		}

		// pre-order
		if ( js_porto_vars.pre_order ) {
			var porto_pre_order = {
				init: function() {
					this.$add_to_cart_btn = $( '.product-summary-wrap .single_add_to_cart_button:not(.wpcbn-btn)' );
					this.add_to_cart_label = this.$add_to_cart_btn.html();
					$( '.product-summary-wrap form.variations_form' ).on( 'show_variation', function( e, v, p ) {
						if ( v.porto_pre_order ) {
							porto_pre_order.$add_to_cart_btn.html( v.porto_pre_order_label );
							if ( v.porto_pre_order_date ) {
								$( this ).find( '.woocommerce-variation-description' ).append( v.porto_pre_order_date );
							}
						} else {
							porto_pre_order.$add_to_cart_btn.html( porto_pre_order.add_to_cart_label );
						}
					} ).on( 'hide_variation', function() {
						porto_pre_order.$add_to_cart_btn.html( porto_pre_order.add_to_cart_label );
					} );
				}
			};
			if ( $( 'div.product.skeleton-loading' ).length ) {
				$( 'div.product.skeleton-loading' ).on( 'skeleton-loaded', function() {
					porto_pre_order.init();
				} );
			} else {
				porto_pre_order.init();
			}
		}

		// refresh yith wishlist
		if ( $( '#header .my-wishlist .wishlist-count' ).length ) {
			$( document.body ).on( 'added_to_wishlist removed_from_wishlist added_to_cart', function( e ) {
				var $obj = $( '#header .my-wishlist .wishlist-count' );
				if ( $obj.text() ) {
					$.ajax( {
						type: 'POST',
						dataType: 'json',
						url: theme.ajax_url,
						data: {
							action: 'porto_refresh_wishlist_count',
							nonce: js_porto_vars.porto_nonce,
						},
						success: function( response ) {
							if ( response || 0 === response ) {
								$obj.addClass( 'count-updating' ).text( Number( response ) );
								setTimeout( function() {
									$obj.removeClass( 'count-updating' );
								}, 1000 );
							}
						}
					} );
				}
			} );
		}

		// fix contact form 7 role="alert" issue in cart page
		if ( $( document.body ).hasClass( 'woocommerce-cart' ) && $( '.wpcf7 .screen-reader-response' ).length ) {
			$( '.wpcf7 .screen-reader-response' ).attr( 'role', '' );
		}

		// fix dokan search vendor
		$( '#dokan-store-listing-filter-form-wrap .store-search-input' ).on( 'keydown', function( e ) {
			if ( e.which && event.which == 13 ) {
				$( this ).closest( 'form' ).find( '#apply-filter-btn' ).trigger( 'click' );
				e.preventDefault();
			}
		} );

		// add spinner to block
		if ( $.fn.block ) {
			var funcBlock = $.fn.block;
			$.fn.block = function( opts ) {
				if ( this.hasClass( 'yith-wcwl-add-to-wishlist' ) ) {
					this.children().addClass( 'pe-none opacity-6' );
					return this;
				}
				if ( this.is( '.woocommerce-checkout' ) ) {
					this.append( '<div class="loader-container d-block"><div class="loader"><i class="porto-ajax-loader"></i></div></div>' );
				}
				return funcBlock.call( this, opts );
			}

			var funcUnblock = $.fn.unblock;
			$.fn.unblock = function( opts ) {
				if ( this.hasClass( 'yith-wcwl-add-to-wishlist' ) ) {
					this.children().removeClass( 'pe-none opacity-6' );
					return this;
				}
				funcUnblock.call( this, opts );
				this.is( '.processing' ) || ( this.is( '.woocommerce-checkout' ) && this.children( '.loader-container' ).remove() );
				return this;
			}
		}
		$( 'body' ).on( 'click', '.single_add_to_cart_button.scroll-to-sticky', function (e) {
			$( 'html, body' ).animate(
				{ scrollTop: $( 'form.cart' ).offset().top - 200 }
			);
		} )
	} )( window.theme, jQuery );

	// Compare
	( function( theme, $ ) {
		// remove margin-right
		$( 'body' ).on( 'click', '.yith_woocompare_colorbox #cboxClose, #cboxOverlay', function() {
			$( 'html' ).css( { 'overflow': '', 'margin-right': '' } );
		} );
	} )( window.theme, window.jQuery );

} )();

function porto_woocommerce_init( $wrap ) {
	'use strict';

	if ( !$wrap ) {
		$wrap = jQuery( document.body );
	}
	// Woo Widget Toggle
	( function( $ ) {

		if ( $.fn.themeWooWidgetToggle ) {

			$( function() {
				$wrap.find( '.widget_filter_by_brand, .widget_product_categories, .widget_price_filter, .widget_layered_nav, .widget_layered_nav_filters, .widget_rating_filter, .widget-woof, .porto_widget_price_filter, #wcfmmp-store .widget.sidebar-box, #wcfmmp-store-lists-sidebar .sidebar-box' ).find( '.widget-title' ).each( function() {
					var $this = $( this ),
						opts;

					var pluginOptions = $this.data( 'plugin-options' );
					if ( pluginOptions )
						opts = pluginOptions;

					$this.themeWooWidgetToggle( opts );
				} );
			} );

		}

		// Woo Widget Accordion
		if ( $.fn.themeWooWidgetAccordion ) {

			$( function() {
				$wrap.find( '.widget_filter_by_brand, .widget_product_categories, .widget_price_filter, .widget_layered_nav, .widget_layered_nav_filters, .widget_rating_filter, .widget-woof, #wcfmmp-store .widget.sidebar-box, #wcfmmp-store-lists-sidebar .sidebar-box' ).each( function() {
					var $this = $( this ),
						opts;

					var pluginOptions = $this.data( 'plugin-options' );
					if ( pluginOptions )
						opts = pluginOptions;

					$this.themeWooWidgetAccordion( opts );
				} );
			} );

		}

		// Woo Products Slider
		if ( $.fn.themeWooProductsSlider ) {

			$( function() {
				var $direct_carousels = $wrap.find( '.products-slider:not(.manual)' ).filter( function() {
					if ( $( this ).closest( '.porto-carousel:not(.owl-loaded)' ).length ) {
						return false;
					}
					return true;
				} );
				var $parent_carousel = $wrap.find( '.porto-carousel:not(.owl-loaded)' ).filter( function() {
					if ( $( this ).find( '.products-slider:not(.manual)' ).length ) {
						return true;
					}
					return false;
				} );
				if ( $parent_carousel.length ) {
					$parent_carousel.one( 'initialized.owl.carousel', function() {
						$( this ).find( '.products-slider:not(.manual)' ).each( function() {
							var $this = $( this );
							$this.themeWooProductsSlider( $this.data( 'plugin-options' ) );
						} );
					} );
				}

				$direct_carousels.each( function() {
					var $this = $( this ),
						opts;

					var pluginOptions = $this.data( 'plugin-options' );
					if ( pluginOptions )
						opts = pluginOptions;

					setTimeout( function() {
						$this.themeWooProductsSlider( opts );
					}, 0 );
				} );
			} );
		}

		/*===================================================================================*/
		/*  TOOLTIP FOR YITH WISHLIST, COMPARE, ADD TO CART, QUICK VIEW
		/*===================================================================================*/
		if ( ! theme.isMobile() ) {
			$wrap.find( '.product-col .quickview, .product-col .add_to_cart_read_more, .product-col .add_to_cart_button, .product-col a.compare, .product-col .add_to_wishlist, .product-col .yith-wcwl-wishlistaddedbrowse > a, .product-col .yith-wcwl-wishlistexistsbrowse > a' ).each( function() {
				let _this = $( this );
				// Exclude
				let $productCol = _this.closest( '.product-col' );
				if ( _this.closest( '.porto-tb-woo-link' ).hasClass( 'no-tooltip' ) ) {
					return;
				}
				if ( _this.hasClass( 'add_to_cart_read_more' ) || _this.hasClass( 'add_to_cart_button' ) ) {
					if ( $productCol.hasClass( 'product-wq_onimage' ) || $productCol.hasClass( 'product-onimage' ) || $productCol.hasClass( 'product-outimage' ) || $productCol.hasClass( 'product-default' ) ) {
						return;
					}
					if ( _this.closest( 'ul.products' ).hasClass( 'list' ) ) {
						return;
					}
				}
				if ( _this.hasClass( 'quickview' ) ) {
					if ( $productCol.hasClass( 'product-wq_onimage' ) || $productCol.hasClass( 'product-onimage3' ) || $productCol.hasClass( 'product-onimage2' ) || $productCol.hasClass( 'product-onimage' ) || $productCol.hasClass( 'product-outimage_aq_onimage' ) ) {
						return;
					}
				}
				if ( ! _this.attr( 'title' ) ) {
					_this.attr( 'title', _this.text().trim() );
				}
				_this.tooltip();
			} );
		}

	} )( jQuery );
}

function porto_woocommerce_variations_init( $parent_obj ) {
	'use strict';

	theme.requestTimeout( function() {
		var form_variation = $parent_obj.find( 'form.variations_form:not(.vf_init)' );
		if ( form_variation.length && jQuery.fn.wc_variation_form ) {
			form_variation.each( function() {
				var data_a = jQuery._data( this, 'events' );
				if ( !data_a || !data_a['show_variation'] ) {
					jQuery( this ).wc_variation_form();
				}
			} );
		}
	}, 100 );
}
function porto_ajax_load_products( $obj, data, pagination_style, $ajax_tab_cache, id, group ) {
	'use strict';
	( function( $ ) {
		if ( $obj.hasClass( 'loading' ) ) {
			return;
		}
		$obj.addClass( 'loading' );
		if ( 'load_more' != pagination_style ) {
			$obj.addClass( 'yith-wcan-loading' );
			if ( !$obj.children( '.porto-loading-icon' ).length ) {
				$obj.append( '<i class="porto-loading-icon"></i>' );
			}
		}
		if ( $ajax_tab_cache[id] == undefined ) {
			$ajax_tab_cache[id] = {};
		}
		$.ajax( {
			url: theme.ajax_url,
			data: data,
			type: 'post',
			success: function( response ) {
				//cache
				if ( $( response ).length ) {
					$ajax_tab_cache[id][group] = $( response ).html();
				} else {
					$ajax_tab_cache[id][group] = '';
				}
				porto_ajax_load_products_success( $obj, response, pagination_style );
			},
			complete: function() {
				$obj.removeClass( 'loading' );
			}
		} );
	} )( jQuery );
}

function porto_ajax_load_products_success( $obj, success, pagination_style ) {
	'use strict';

	( function( $ ) {
		let _successProducts = $( success ).find( 'ul.products' );
		if ( $obj.data( 'cur_page' ) && _successProducts.data( 'cur_page' ) ) {
			$obj.data( 'cur_page', _successProducts.data( 'cur_page' ) );
		}
		if ( ! ( $obj.hasClass( 'grid-creative' ) && typeof $obj.attr( 'data-plugin-masonry' ) != 'undefined' ) ) {
			_successProducts.children( ':not(.grid-col-sizer)' ).addClass( 'fadeInUp animated' );
		}
		if ( 'load_more' == pagination_style ) {
			$obj.append( _successProducts.html() );
		} else {
			if ( $obj.hasClass( 'owl-carousel' ) ) {
				$obj.parent().css( 'min-height', $obj.parent().height() );
			}
			if ( $obj.hasClass( 'grid-creative' ) && typeof $obj.attr( 'data-plugin-masonry' ) != 'undefined' ) {
				$obj.isotope( 'remove', $obj.children() );
				$obj.find( '.grid-col-sizer' ).remove();
				var newItems = _successProducts.children();
				$obj.append( newItems );
				$obj.isotope( 'appended', newItems );
				$obj.imagesLoaded( function() {
					$obj.isotope( 'layout' );
				} );
			} else {
				if ( $( success ).length ) {
					$obj.html( _successProducts.html() );
				} else {
					$obj.html( '' );
				}
			}
		}

		if ( $obj.hasClass( 'owl-carousel' ) && $.fn.themeWooProductsSlider ) {
			$obj.trigger( 'destroy.owl.carousel' );
			theme.requestTimeout( function() {
				var pluginOptions = $obj.data( 'plugin-options' ), opts;
				if ( pluginOptions )
					opts = pluginOptions;
				$obj.data( '__wooProductsSlider', '' ).themeWooProductsSlider( opts );
				$obj.parent().css( 'min-height', '' );
			}, 100 );
		}
		if ( $obj.closest( '.porto-products' ).find( '.shop-loop-after' ).length ) {
			if ( $( success ).find( '.shop-loop-after' ).length ) {
				$obj.closest( '.porto-products' ).find( '.shop-loop-after' ).replaceWith( $( success ).find( '.shop-loop-after' ) );
			} else {
				$obj.closest( '.porto-products' ).find( '.shop-loop-after' ).remove();
			}
		}
		if ( typeof $obj.data( 'infinitescroll' ) != 'undefined' ) {
			var infinitescrollData = $obj.data( 'infinitescroll' );
			infinitescrollData.options.state.currPage = 1;
			$obj.data( 'infinitescroll', infinitescrollData );
		}
		$obj.removeClass( 'yith-wcan-loading' );
		if ( 'load_more' == pagination_style && typeof $obj != 'undefined' && typeof $obj.data( 'text' ) != 'undefined' ) {
			$obj.text( $obj.data( 'text' ) );
		}
		$( document ).trigger( "yith-wcan-ajax-filtered" );
	} )( jQuery );
};
// source --> https://mfrash.com/wp-content/themes/porto/js/shop-ajax.min.js?ver=7.8.5 
(function(e,t){var o=/(?!(\[))(\.)[^.#[]*/g,i=/(#)[^.#[]*/,a=/^[\w]+/,r=/^[\w]+$/,n=function(e,n){var s=r.test(e)?[{tag:e}]:function(e){for(var t={sel:[],val:[]},r=[],n=!1,s="",l=[],c=0,p=e.length;c<p;c++){var d=e.charAt(c);n?"\\"===d&&c+1<e.length?l.push(e.charAt(++c)):s===d?(s="",l.push(d)):"'"!==d&&'"'!==d||""!==s?"]"===d&&""===s?(t.val.push(l.join("")),l=[],n=!1):"]"===d&&""===s||(""===s&&","===d?(t.val.push(l.join("")),l=[]):l.push(d)):(s=d,l.push(d)):"\\"===d&&c+1<e.length?n&&l.push(e.charAt(++c)):"["===d&&""===s?n=!0:" "===d||"+"===d?(t.sel=t.sel.join(""),r.push(t),"+"===d&&r.push({sel:"+",val:""}),t={sel:[],val:[]}):" "!==d&&"]"!==d&&t.sel.push(d)}for(0==t.sel.length&&0==t.val.length||(t.sel=t.sel.join(""),r.push(t)),c=0;c<r.length;c++){if("+"===(t=r[c].sel))h.tag=t;else{var h=[];for(h.tag=a.exec(t),h.id=i.exec(t),h.id&&Array.isArray(h.id)&&(h.id=h.id[0].substr(1)),h.tag||(h.tag="div"),h.vars=[],e=0;e<r[c].val.length;e++)s=r[c].val[e].indexOf("="),n=r[c].val[e].substr(0,s),s=(s=r[c].val[e].substr(s+1)).replace(/^[\s]*[\"\']*|[\"\']*[\s]*$/g,""),"text"===n?h.text=s:h.vars.push([n,s]);if(n=[],t=t.match(o)){for(e=0;e<t.length;e++)n.push(t[e].substr(1));h.className=n.join(" ")}}r[c]=h}return r}(e),l=[];void 0===n&&(n=1);for(var c=[],p=[],d=[],h=document.createElement("div"),f=0,u=0;u<s.length;u++){if("+"==s[u].tag)p=d.slice(),--f;else{for(var g=0;g<n;g++){var m;if("input"==s[u].tag){if((m=[]).push("<"+s[u].tag),s[u].id&&m.push("id='"+s[u].id+"'"),s[u].className&&(m.push("class='"+s[u].className),u+1===s.length&&m.push(lastClass),m.push("'")),s[u].vars)for(var w=0;w<s[u].vars.length;w++)m.push(s[u].vars[w][0]+"='"+s[u].vars[w][1]+"'");s[u].text&&m.push("value='"+s[u].text+"'"),m.push("/>"),d[g]=p[g],p[g]?(p[g].innerHTML+=m.join(" "),p[g]=p[g].lastChild):(h.innerHTML=m.join(" "),p[g]=h.removeChild(h.firstChild))}else{if(m=document.createElement(s[u].tag),s[u].vars)for(w=0;w<s[u].vars.length;w++)m.setAttribute(s[u].vars[w][0],s[u].vars[w][1]);s[u].id&&(m.id=s[u].id),s[u].className&&(m.className=s[u].className),s[u].text&&m.appendChild(document.createTextNode(s[u].text)),d[g]=p[g],p[g]=p[g]?p[g].appendChild(m):m}}f++||Array.prototype.push.apply(c,p)}l=t.merge(l,p)}return t(c)},s=function(e,o,i){for(var a=e.match(/%[^%]*%/g)||[],r=[],s=0;s<o.length;s++){for(var l=e,c=0;c<a.length;c++){var p=a[c].substr(1,a[c].length-2);l=l.replace(a[c],o[s][p])}r=t.merge(r,n(l,i))}return t(r)};t.porto_jseldom=function(e){return 2==arguments.length&&t.isPlainObject(arguments[1])?s.apply(this,[arguments[0],[arguments[1]]]):1==arguments.length||2==arguments.length&&!Array.isArray(arguments[1])?n.apply(this,arguments):2==arguments.length?s.apply(this,arguments):void 0};var l=function(){if(t(".price_slider").length){if("undefined"==typeof woocommerce_price_slider_params)return!1;t("input#min_price, input#max_price").hide(),t(".price_slider, .price_label").show();var e=t(".price_slider_amount #min_price").data("min"),o=t(".price_slider_amount #max_price").data("max"),i=parseInt(t(".price_slider_amount #min_price").val()?t(".price_slider_amount #min_price").val():e,10),a=parseInt(t(".price_slider_amount #max_price").val()?t(".price_slider_amount #max_price").val():o,10);t(".price_slider").filter((function(){return!!t(this).closest("form").find("input#min_price, input#max_price").length})).slider({range:!0,animate:!0,min:e,max:o,values:[i,a],create:function(){t(".price_slider_amount #min_price").val(i),t(".price_slider_amount #max_price").val(a),t(document.body).trigger("price_slider_create",[i,a])},slide:function(e,o){t("input#min_price").val(o.values[0]),t("input#max_price").val(o.values[1]),t(document.body).trigger("price_slider_slide",[o.values[0],o.values[1]])},change:function(e,o){t(document.body).trigger("price_slider_change",[o.values[0],o.values[1]])}})}t(".yith-woo-ajax-navigation, .yith-wcan-list-price-filter").removeClass("loading")},c=function(o,i,a,r=!1){if(void 0!==window.parent&&void 0!==window.parent.vc)return;var n=".archive-products ";t(".elementor-widget-wc-archive-products").length&&(n=".elementor-widget-wc-archive-products "),t(".wcfmmp-store-page-wrap").length&&(n=".wcfmmp-store-page-wrap ");var s,l,c=".shop-loop-before",p=t(c),d=".shop-loop-after:not(.is-shortcode)",h=n+".products:not(.is-shortcode)",f=n+".woocommerce-info",u=p.parent(),g=t(h),m=t(".sidebar [data-plugin-sticky]"),w=p.data("show"),v=".porto-product-filters:not(.style2)";if(w&&t(c+","+d).stop(!0).fadeTo(400,1).block({message:null,overlayCSS:{opacity:.2}}),-1==js_porto_vars.use_skeleton_screen.indexOf("shop"))g.length?(g.addClass("yith-wcan-loading"),g.children(".porto-loading-icon").length||g.append('<i class="porto-loading-icon"></i>')):(t(f).html("").addClass("yith-wcan-loading products"),t(f).children(".porto-loading-icon").length||t(f).append('<i class="porto-loading-icon"></i>'));else if(g.length){g.addClass("skeleton-body");var _,y=g.data((g.hasClass("list")?"list":"grid")+"_col_cls");if(g.hasClass("list")&&!y)_=4;else{for(var b=1;b<=8;b++)if(g.hasClass("ccols-xl-"+b)){_=b;break}if(!_&&g.hasClass("has-ccols")){var x;if(y){x=g.attr("class").split(" ");var C=[];for(b=0;b<x.length;b++)0!==x[b].indexOf("ccols-")&&"has-ccols"!=x[b]&&C.push(x[b]);g.attr("class",C.join(" ")+" "+y),x=y.split(" ")}else x=g.attr("class").split(" ");for(b=0;b<x.length;b++)if(0===x[b].indexOf("ccols-")){_=x[b].replace(/ccols-[sm|md|lg|xl|xxl]*[-]*([\d])/,"$1");break}}}if(_){var j="product product-col";g.empty(),g.data("product_layout")&&(j+=" "+escape(g.data("product_layout")));for(b=0;b<3*_;b++)g.append('<li class="'+j+'"></li>')}else g.find(".product-col").empty();g.hasClass("owl-loaded")&&g.removeClass("owl-loaded")}t(v).length&&t(v).block({message:null,overlayCSS:{opacity:.2}}),e.scrolltoContainer(w?p.hasClass("sticky")&&p.prev(".filter-placeholder").length?p.prev(".filter-placeholder"):p:g),t(".yith-woo-ajax-navigation, .yith-wcan-list-price-filter").addClass("loading"),(l=t(".sidebar-content .widget_shopping_cart").get(0))&&(s=t(l).html()),e.shopAjaxCache||(e.shopAjaxCache={}),e.urlAnchor||(e.urlAnchor=document.createElement("a")),e.urlAnchor.href=o;let k=e.urlAnchor.href;var A=encodeURIComponent(k+"is_category="+r),S=function(r,n,f,w=!1){n&&r&&!e.shopAjaxCache[n]&&(e.shopAjaxCache[n]=r);var _=t(r);1==f&&(t(".header-wrapper ~ *:not(.footer-wrapper)").remove(),_.find(".header-wrapper ~ *:not(.footer-wrapper)").clone().insertAfter(".header-wrapper"),p=t(c),u=p.parent(),g=t(h),m=t(".sidebar [data-plugin-sticky]"),t("html").hasClass("sidebar-opened")&&t("body").hasClass("woocommerce")&&t(".main-content-wrap>.sidebar-overlay").addClass("active"));var y=g.parent();y.hasClass("yit-wcan-container")&&(y=y.parent()),m.get(0)&&u.css("min-height",0);var b=_.find(h);if(b.length){if(g.length&&g.data("infinitescroll"))try{g.data("infinitescroll").destroy();var x=g.data("__postsinfinite");x&&x.destroy()}catch(e){}if(void 0!==a&&a&&y.hasClass("porto-posts-grid")){var C=g.siblings("style"),j=b.siblings("style");C.length&&j.length&&C.replaceWith(j)}t(b).addClass("animated fadeInUp"),g.replaceWith(b[0].outerHTML),g=t(h)}else y.hasClass("porto-posts-grid")?g.empty():(y.html(_.find(".woocommerce-info")),y.find(".woocommerce-info").addClass("products"));if(t(c+","+d).get(0)&&t(c+","+d).stop(!0).css("opacity","1").unblock(),_.find(c).length?(0==t(c).length&&t.porto_jseldom(c).insertBefore(t(h)),t(c).each((function(e){var o=_.find(c).eq(e);o.length&&t(this).html(o.html()).show()}))):t(c).empty(),porto_woocommerce_variations_init(y),_.find(v).length&&t(v).html(_.find(v).html()),t(v).unblock(),_.find(d).length)if(0==t(d).length&&t.porto_jseldom(d).insertAfter(t(h)),t(d).length>1&&t(d).length==_.find(d).length)for(var k=0;k<t(d).length;k++)t(d).eq(k).html(_.find(d).eq(k).html()).show();else t(d).html(_.find(d).html()).show();else if(0==t(d).length&&_.find(".woocommerce-pagination").length){var A=_.find(".woocommerce-pagination");t(".content-area#primary .woocommerce-pagination").each((function(e){var o=A.eq(e);o.length&&t(this).html(o.html())}))}else t(d).empty();_.find(".woocommerce-ordering").each((function(e){var o=t(this);0==o.closest(".shop-loop-before").length&&0==o.closest(".shop-loop-after").length&&t("body").find(".woocommerce-ordering").eq(e).html(o.html())}));var S=y.children(".pagination-wrap"),T=b.siblings(".pagination-wrap");y.hasClass("yit-wcan-container")&&(S=y.siblings(".pagination-wrap")),S.length?S[0].outerHTML=T.length?T[0].outerHTML:"":T.length&&y.append(T);var O=t(".woocommerce-result-count");if(O.length){var I=_.find(".woocommerce-result-count").eq(0);I.length&&O.each((function(){this.outerHTML=I[0].outerHTML}))}y.hasClass("porto-posts-grid")?y.is(".porto-ajax-load.load-infinite, .porto-ajax-load.load-more")&&y.portoInfiniteScroll():void 0!==e.PostsInfinite&&"undefined"!=typeof porto_infinite_scroll&&new e.PostsInfinite(t(h)),t(".sidebar-content").each((function(e){var o=t(this),a=t(_.find(".sidebar-content").get(e));if(o.html(a.html()),void 0!==i&&i){if(jQuery().selectWoo){o.find("select.woocommerce-widget-layered-nav-dropdown").each((function(){t(this).selectWoo({placeholder:t(this).find("option").eq(0).text(),minimumResultsForSearch:5,width:"100%",allowClear:void 0!==t(this).attr("multiple")&&"multiple"==t(this).attr("multiple")?"false":"true"})}))}t("body").children("span.select2-container").remove()}}));var q=t(".sidebar-content .sidebar-menu:not(.side-menu-accordion)");q.length&&e.SidebarMenu.build(q);var D=_.filter('script:contains("var woocommerce_price_slider_params")').first();if(D&&D.length&&-1!==D.text().indexOf("{")&&-1!==D.text().indexOf("}")){var z=D.text().substring(D.text().indexOf("{"),D.text().indexOf("}")+1);window.woocommerce_price_slider_params=JSON.parse(z)}t(".sidebar-content form.woocommerce-widget-layered-nav-dropdown select").each((function(){var e=t(this);e.selectWoo({placeholder:e.find("option").eq(0).text(),minimumResultsForSearch:5,width:"100%",allowClear:void 0!==e.attr("multiple")&&"multiple"==e.attr("multiple")?"false":"true"}),e.siblings(".select2").css("width","100%")})),navigator.userAgent.match(/msie/i)||w||window.history.pushState({pageTitle:r.pageTitle?r.pageTitle:"",isShopAjax:1,filterID:n,isCategoryFilter:f},"",o);var N=function(e){var t,o,i=decodeURIComponent(window.location.search.substring(1)).split("&");for(o=0;o<i.length;o++)if((t=i[o].split("="))[0]===e)return void 0===t[1]||t[1]}("pwb-brand-filter");if(null!=N){var L=N.split(",");t('.pwb-filter-products input[type="checkbox"]').prop("checked",!1);for(var M=0,$=L.length;M<$;M++)t('.pwb-filter-products input[type="checkbox"]').each((function(e){t(this).val()&&L[M]==t(this).val()&&t(this).prop("checked",!0)}))}else t('.pwb-filter-products input[type="checkbox"]').prop("checked",!1);y.hasClass("yit-wcan-container")?y.parent().removeClass("porto-ajax-loading"):y.closest(".elementor-widget-wc-archive-products").length?y.closest(".elementor-widget-wc-archive-products").removeClass("porto-ajax-loading"):y.closest(".wcfmmp-store-page-wrap").length?y.closest(".wcfmmp-store-page-wrap .products").removeClass("porto-ajax-loading"):y.removeClass("porto-ajax-loading"),t(document).trigger("yith_wcan_init_shortcodes"),t(document).trigger("yith-wcan-ajax-filtered"),(l=t(".sidebar-content .widget_shopping_cart").get(0))&&(t(".sidebar-content .widget_shopping_cart").html(s),t.cookie("woocommerce_items_in_cart")>0?t(".hide_cart_widget_if_empty").closest(".widget_shopping_cart").show():t(".hide_cart_widget_if_empty").closest(".widget_shopping_cart").hide()),"undefined"!=typeof yith_wcwl_l10n&&yith_wcwl_l10n.enable_ajax_loading&&y.trigger("yith_wcwl_reload_fragments"),t(document.body).trigger("porto_init_countdown",[y]),"function"==typeof lazyloadRunObserver&&lazyloadRunObserver(),t(window).trigger("porto_posts_updated")};e.successfn=S,e.shopAjaxCache[A]?S(e.shopAjaxCache[A],A,r):t.ajax({url:o,data:{portoajax:!0,load_posts_only:!0,is_category_filter:r},type:"POST",success:function(e){S(e,A,r)}})};function p(e,t,o){var i=new RegExp("([?&])"+t+"=.*?(&|$)","i"),a=-1!==e.indexOf("?")?"&":"?";return e.match(i)?e.replace(i,"$1"+t+"="+o+"$2"):e+a+t+"="+o}var d,h=function(o){var i=".archive-products ";t(".elementor-widget-wc-archive-products").length&&(i=".elementor-widget-wc-archive-products "),t(".wcfmmp-store-page-wrap").length&&(i=".wcfmmp-store-page-wrap ");var a=".shop-loop-before",r=".shop-loop-after",n=i+".products",s=t(a),d=s.parent(),h=t(a+","+r);t(".sidebar [data-plugin-sticky]").get(0)&&d.css("min-height",0),h.length&&h.stop(!0).fadeTo(400,1).unblock(),t(n).find(".nothing-found-message").length||t(".archive-products").find(".woocommerce-no-products-found").length?("undefined"==typeof js_porto_vars||""!=js_porto_vars.shop_filter_layout||e.isTablet()&&0!=t(".porto-product-filters-toggle").length||h.hide().data("show",!1),"undefined"!=typeof js_porto_vars&&"horizontal"==js_porto_vars.shop_filter_layout&&e.isTablet()&&0==t(".porto-product-filters-toggle.d-lg-none").length&&h.hide().data("show",!1),"undefined"!=typeof js_porto_vars&&"horizontal2"==js_porto_vars.shop_filter_layout&&0==t(".porto-product-filters").length&&h.hide().data("show",!1)):t(n).find(".product").length||t(r).closest(".porto-products").length||s.hasClass("shop-builder")||t(r).closest(".elementor-widget-wc-archive-products")||t(r).closest(".wcfmmp-store-page-wrap")?h.show().data("show",!0):(h.hide().data("show",!1),s.find(".porto-product-filters.style2").length&&s.show().data("show",!0)),l();var f=document.getElementById("porto_price_filter_chart");if(f&&!t(f).hasClass("show-chart"))if("function"==typeof e.price_chart)e.price_chart(f);else if(js_porto_vars&&js_porto_vars.func_url){var u=document.createElement("script"),g=document.scripts[document.scripts.length-1];u.src=js_porto_vars.func_url+"widgets/apexcharts/apexcharts.js",u.id="porto-price-filter-chart-js",g.parentNode.insertBefore(u,g)}void 0!==o&&o||(porto_init(),porto_woocommerce_init(),t(".sidebar [data-plugin-sticky]").length&&e.requestTimeout((function(){e.refreshStickySidebar(!1)}),200),t(".page-wrapper").find(".elementor-invisible").each((function(){var o=t(this),i=o.data("settings");if(i&&(i._animation||i.animation)){var a=i._animation||i.animation,r=i._animation_delay||i.animation_delay||0;e.requestTimeout((function(){o.removeClass("elementor-invisible").addClass("animated "+a)}),r)}}))),t(".woocommerce-ordering").off("change","select.orderby").on("change","select.orderby",(function(){t(this).closest("form").trigger("submit")})),function(){if(t(".widget_price_filter").addClass("yith-wcan-list-price-filter"),e.category_ajax){t(".woocommerce-ordering").off("change","select.orderby").on("change","select.orderby",(function(e){e.preventDefault();var o="?"+t(this).closest("form").serialize();c(o)})),t(".woocommerce-viewing").off("change","select.count").on("change","select.count",(function(e){e.preventDefault();var o="?"+t(this).closest("form").serialize();c(o)})),t(".porto-posts-grid .product-category, .with-shop-ajax, .product-categories .cat-item, .wc-block-product-categories-list-item").off("click","a").on("click","a",(function(e){e.preventDefault(),e.stopPropagation();var t=this.href;c(t,void 0,void 0,!0)})),t(".woocommerce-pagination:not(.load-more)").each((function(){t(this).closest(".porto-products").length||t(this).closest("#comments").length||t(this).off("click","a.page-numbers").on("click","a.page-numbers",(function(e){e.preventDefault();var t=this.href;c(t)}))})),t(document).off("click",".yith-wcan a").on("click",".yith-wcan a",(function(e){t(this).yith_wcan_ajax_filters(e,this)})),t(".widget_price_filter .price_slider_wrapper").off("click",".button").on("click",".button",(function(e){e.preventDefault();var o=t(this).closest("form"),i=o.attr("action"),a=i+(-1===i.indexOf("?")?"?":"&")+o.serialize(),r=t(".woocommerce-viewing select.count");if(r.length){var n=t(".woocommerce-viewing select.count").val();n!=r.find("option:not([disabled]):first").val()&&(a+="&count="+n)}t(".widget_price_filter").removeClass("yith-wcan-list-price-filter"),c(a)})),t(".porto_widget_price_filter").off("click",".button").on("click",".button",(function(e){e.preventDefault();var o=t(this).closest("form"),i=o.attr("action"),a=t(".woocommerce-viewing select.count"),r=o.serializeArray(),n=i;if(t.each(r,(function(e,o){t.trim(o.value)&&(-1==i.indexOf("?")&&n==i?n+="?":n+="&",n+=o.name+"="+t.trim(o.value))})),a.length){var s=t(".woocommerce-viewing select.count").val();s!=a.find("option:not([disabled]):first").val()&&(-1==n.indexOf("?")?n+="?count="+s:n+="&count="+s)}c(n)})),t(".widget_layered_nav, .widget_rating_filter, .widget_layered_nav_filters").off("click","a").on("click","a",(function(e){if(!t(this).hasClass("yit-wcan-select-open")){e.preventDefault();var o=t(this),i=o.attr("href"),a=t(".woocommerce-viewing select.count"),r=".archive-products ";if(t(".elementor-widget-wc-archive-products").length&&(r=".elementor-widget-wc-archive-products "),t(".wcfmmp-store-page-wrap").length&&(r=".wcfmmp-store-page-wrap "),o.hasClass("yith-wcan-reset-navigation")&&!t(r+".products:not(.is-shortcode)").length)return window.location.href=i,!1;if(a.length){var n=t(".woocommerce-viewing select.count").val();n!=a.find("option:not([disabled]):first").val()&&(i=p(i,"count",n))}var s=o.closest(".yith-wcan-select");return s.get(0)&&s.parent().css({opacity:0,"z-index":-1}),c(i),!1}})),t(".widget_layered_nav select:not([multiple])").off("change").on("change",(function(e){var o,i=t(this),a=i.closest("form").find("input[type=hidden]").length?i.closest("form").find("input[type=hidden]").attr("name").replace("filter_",""):i.attr("class").replace("dropdown_layered_nav_",""),r=i.val(),n=t(".woocommerce-viewing select.count");if("wc-brand-dropdown-layered-nav-product_brand"==a&&(a="product_brand"),o=p(o=(o=window.location.href).replace(/\/page\/\d+/,"").replace("&amp;","&").replace("%2C",","),"filtering","1"),o=p(o,"filter_"+a,r),n.length){var s=t(".woocommerce-viewing select.count").val();s!=n.find("option:not([disabled]):first").val()&&(o=p(o,"count",s))}return c(o,a),!1}));var o=function(){var e=[location.protocol,"//",location.host,location.pathname].join(""),o=window.location.href,i=[];t('.pwb-filter-products input[type="checkbox"]').each((function(e){t(this).prop("checked")&&i.push(t(this).val())})),o=(i=i.join())?-1===(o=(o=o.replace(/&?pwb-brand-filter=([^&]$|[^&]*)/i,"")).replace(/\/page\/\d*\//i,"")).indexOf("?")?o+"?pwb-brand-filter="+i:o+"&pwb-brand-filter="+i:e,c(o)};t(".pwb-filter-products.pwb-hide-submit-btn input").off("change").on("change",(function(){o()})),t(".pwb-apply-filter").off("click").on("click",(function(){o()})),t(".pwb-remove-filter").off("click").on("click",(function(){[location.protocol,"//",location.host,location.pathname].join("");var e=window.location.href;e=(e=e.replace(/&?pwb-brand-filter=([^&]$|[^&]*)/i,"")).replace(/\/page\/\d*\//i,""),c(e)}))}else t(document).on("change",".woocommerce-viewing select.count",(function(){t(this).closest("form").trigger("submit")}))}()};t(".skeleton-loading").on("skeleton-loaded",(function(){d&&e.deleteTimeout(d),d=e.requestTimeout((function(){l()}),100)})),t((function(){var o=".archive-products ";t(".elementor-widget-wc-archive-products").length&&(o=".elementor-widget-wc-archive-products "),t(".wcfmmp-store-page-wrap").length&&(o=".wcfmmp-store-page-wrap "),"undefined"!=typeof yith_wcan&&(yith_wcan.container=o+".products",yith_wcan.pagination=".shop-loop-before",yith_wcan.result_count=".shop-loop-after"),e.category_ajax?t(document).on("click",".yith-wcan a",(function(i){var a=".shop-loop-before",r=t(a),n=o+".products",s=o+".woocommerce-info",l=t(".sidebar [data-plugin-sticky]"),c=r.data("show");c&&t(a+",.shop-loop-after").stop(!0).show().fadeTo(400,.8).block({message:null,overlayCSS:{opacity:.2}}),t(n).length?(t(n).html("").addClass("yith-wcan-loading"),t(n).children(".porto-loading-icon").length||t(n).append('<i class="porto-loading-icon"></i>')):(t(s).html("").addClass("yith-wcan-loading products"),t(s).children(".porto-loading-icon").length||t(s).append('<i class="porto-loading-icon"></i>')),l.get(0)&&e.refreshStickySidebar(!1),t(".yith-woo-ajax-navigation, .yith-wcan-list-price-filter").addClass("loading"),e.scrolltoContainer(c?r.hasClass("sticky")&&r.prev(".filter-placeholder").length?r.prev(".filter-placeholder"):r:t(n))})):t(document).off("click",".yith-wcan a"),t(document).ready((function(){h(!0)})),t(document).on("yith-wcan-ajax-filtered",(function(o,i){if(h(),i&&t("html").hasClass("sidebar-opened")&&t(".sidebar-overlay").addClass("active"),i&&"undefined"!=typeof porto_infinite_scroll){var a=".archive-products ";t(".elementor-widget-wc-archive-products").length&&(a=".elementor-widget-wc-archive-products "),t(".wcfmmp-store-page-wrap").length&&(a=".wcfmmp-store-page-wrap ");var r=t(a+".products:not(.is-shortcode)");if(r.length){var n=r.parent();n.hasClass("porto-posts-grid")?n.is(".porto-ajax-load.load-infinite, .porto-ajax-load.load-more")&&n.portoInfiniteScroll():void 0!==e.PostsInfinite&&new e.PostsInfinite(r)}}})),e.prdctfltr_ajax&&(t(document).on("change",".woocommerce-viewing select.count",(function(){t(this).closest("form").trigger("submit")})),t(document).on("click",".woocommerce-pagination:not(.load-more) a.page-numbers",(function(o){var i=t(".shop-loop-before");e.scrolltoContainer(i.hasClass("sticky")&&i.prev(".filter-placeholder").length?i.prev(".filter-placeholder"):i)}))),t(document).on("click",".gridlist-toggle #grid, .gridlist-toggle #list",(function(o){var i=t(this);if(i.hasClass("active"))return!1;t(".gridlist-toggle #grid, .gridlist-toggle #list").removeClass("active"),i.addClass("active");var a=i.attr("id");if(e.category_ajax){o.preventDefault();var r=".archive-products";t(".elementor-widget-wc-archive-products").length&&(r=".elementor-widget-wc-archive-products"),t(".wcfmmp-store-page-wrap").length&&(r=".wcfmmp-store-page-wrap .products"),-1!=js_porto_vars.use_skeleton_screen.indexOf("shop")?t(r+" ul.products, "+r+" .products-container").removeClass("grid").removeClass("list").addClass(a):t(r).addClass("porto-ajax-loading"),c(i.attr("href"))}})),e.category_ajax&&(window.addEventListener("popstate",(function(t){if(t.state&&t.state.isShopAjax){let o=t.state.filterID,i=t.state.isCategoryFilter;e.shopAjaxCache&&e.shopAjaxCache[o]&&e.successfn?e.successfn(e.shopAjaxCache[o],o,i,!0):location.reload()}})),window.history.replaceState({pageTitle:"",isShopAjax:1,filterID:"first"},"",location.href))}))}).apply(this,[window.theme,jQuery]);
// source --> https://mfrash.com/wp-content/themes/porto/js/wc-widget.min.js?ver=7.8.5 
(function(t,e){t=t||{};var n="__wooWidgetToggle",i=function(t,e){return this.initialize(t,e)};i.defaults={},i.prototype={initialize:function(t,e){return t.data(n)||(this.$el=t,this.setData().setOptions(e).build()),this},setData:function(){return this.$el.data(n,this),this},setOptions:function(t){return this.options=e.extend(!0,{},i.defaults,t,{wrapper:this.$el}),this},build:function(){var e=this.options.wrapper;return e.parent().removeClass("closed"),e.find(".toggle").length||e.append('<span class="toggle"></span>'),e.find(".toggle").on("click",(function(n){return n.preventDefault(),n.stopPropagation(),e.next().is(":visible")?e.parent().addClass("closed"):e.parent().removeClass("closed"),e.next().stop().slideToggle(200),t.refreshVCContent(),!1})),this}},e.extend(t,{WooWidgetToggle:i}),e.fn.themeWooWidgetToggle=function(i){return this.map((function(){var s=e(this);return s.data(n)?s.data(n):new t.WooWidgetToggle(s,i)}))}}).apply(this,[window.theme,jQuery]),function(t,e){t=t||{};var n="__wooWidgetAccordion",i=function(t,e){return this.initialize(t,e)};i.defaults={},i.prototype={initialize:function(t,e){return t.data(n)||(this.$el=t,this.setData().setOptions(e).build()),this},setData:function(){return this.$el.data(n,this),this},setOptions:function(t){return this.options=e.extend(!0,{},i.defaults,t,{wrapper:this.$el}),this},build:function(){var n=this.options.wrapper;return n.find("ul.children").each((function(){var n=e(this);n.prev().hasClass("toggle")||n.before(e('<span class="toggle"></span>').on("click",(function(){var n=e(this);n.next().is(":visible")?n.parent().removeClass("open").addClass("closed"):n.parent().addClass("open").removeClass("closed"),n.next().stop().slideToggle(200),t.refreshVCContent()})))})),n.find('li[class*="current-"]').addClass("current"),this}},e.extend(t,{WooWidgetAccordion:i}),e.fn.themeWooWidgetAccordion=function(i){return this.map((function(){var s=e(this);return s.data(n)?s.data(n):new t.WooWidgetAccordion(s,i)}))}}.apply(this,[window.theme,jQuery]);
// source --> https://mfrash.com/wp-content/themes/porto/js/libs/jquery.infinite-scroll.min.js?ver=2.1.0 
!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e(jQuery)}(function(e,i){"use strict";e.infinitescroll=function(i,t,o){this.element=e(o),this._create(i,t)||(this.failed=!0)},e.infinitescroll.defaults={loading:{finished:i,finishedMsg:"<em>Congratulations, you've reached the end of the internet.</em>",img:"data:image/gif;base64,R0lGODlh3AATAPQeAPDy+MnQ6LW/4N3h8MzT6rjC4sTM5r/I5NHX7N7j8c7U6tvg8OLl8uXo9Ojr9b3G5MfP6Ovu9tPZ7PT1+vX2+tbb7vf4+8/W69jd7rC73vn5/O/x+K243ai02////wAAACH/C05FVFNDQVBFMi4wAwEAAAAh+QQECgD/ACwAAAAA3AATAAAF/6AnjmRpnmiqrmzrvnAsz3Rt33iu73zv/8CgcEj0BAScpHLJbDqf0Kh0Sq1ar9isdioItAKGw+MAKYMFhbF63CW438f0mg1R2O8EuXj/aOPtaHx7fn96goR4hmuId4qDdX95c4+RBIGCB4yAjpmQhZN0YGYGXitdZBIVGAsLoq4BBKQDswm1CQRkcG6ytrYKubq8vbfAcMK9v7q7EMO1ycrHvsW6zcTKsczNz8HZw9vG3cjTsMIYqQkCLBwHCgsMDQ4RDAYIqfYSFxDxEfz88/X38Onr16+Bp4ADCco7eC8hQYMAEe57yNCew4IVBU7EGNDiRn8Z831cGLHhSIgdFf9chIeBg7oA7gjaWUWTVQAGE3LqBDCTlc9WOHfm7PkTqNCh54rePDqB6M+lR536hCpUqs2gVZM+xbrTqtGoWqdy1emValeXKzggYBBB5y1acFNZmEvXAoN2cGfJrTv3bl69Ffj2xZt3L1+/fw3XRVw4sGDGcR0fJhxZsF3KtBTThZxZ8mLMgC3fRatCbYMNFCzwLEqLgE4NsDWs/tvqdezZf13Hvk2A9Szdu2X3pg18N+68xXn7rh1c+PLksI/Dhe6cuO3ow3NfV92bdArTqC2Ebd3A8vjf5QWfH6Bg7Nz17c2fj69+fnq+8N2Lty+fuP78/eV2X13neIcCeBRwxorbZrA1ANoCDGrgoG8RTshahQ9iSKEEzUmYIYfNWViUhheCGJyIP5E4oom7WWjgCeBFAJNv1DVV01MAdJhhjdkplWNzO/5oXI846njjVEIqR2OS2B1pE5PVscajkxhMycqLJghQSwT40PgfAl4GqNSXYdZXJn5gSkmmmmJu1aZYb14V51do+pTOCmA40AqVCIhG5IJ9PvYnhIFOxmdqhpaI6GeHCtpooisuutmg+Eg62KOMKuqoTaXgicQWoIYq6qiklmoqFV0UoeqqrLbq6quwxirrrLTWauutJ4QAACH5BAUKABwALAcABADOAAsAAAX/IPd0D2dyRCoUp/k8gpHOKtseR9yiSmGbuBykler9XLAhkbDavXTL5k2oqFqNOxzUZPU5YYZd1XsD72rZpBjbeh52mSNnMSC8lwblKZGwi+0QfIJ8CncnCoCDgoVnBHmKfByGJimPkIwtiAeBkH6ZHJaKmCeVnKKTHIihg5KNq4uoqmEtcRUtEREMBggtEr4QDrjCuRC8h7/BwxENeicSF8DKy82pyNLMOxzWygzFmdvD2L3P0dze4+Xh1Arkyepi7dfFvvTtLQkZBC0T/FX3CRgCMOBHsJ+EHYQY7OinAGECgQsB+Lu3AOK+CewcWjwxQeJBihtNGHSoQOE+iQ3//4XkwBBhRZMcUS6YSXOAwIL8PGqEaSJCiYt9SNoCmnJPAgUVLChdaoFBURN8MAzl2PQphwQLfDFd6lTowglHve6rKpbjhK7/pG5VinZP1qkiz1rl4+tr2LRwWU64cFEihwEtZgbgR1UiHaMVvxpOSwBA37kzGz9e8G+B5MIEKLutOGEsAH2ATQwYfTmuX8aETWdGPZmiZcccNSzeTCA1Sw0bdiitC7LBWgu8jQr8HRzqgpK6gX88QbrB14z/kF+ELpwB8eVQj/JkqdylAudji/+ts3039vEEfK8Vz2dlvxZKG0CmbkKDBvllRd6fCzDvBLKBDSCeffhRJEFebFk1k/Mv9jVIoIJZSeBggwUaNeB+Qk34IE0cXlihcfRxkOAJFFhwGmKlmWDiakZhUJtnLBpnWWcnKaAZcxI0piFGGLBm1mc90kajSCveeBVWKeYEoU2wqeaQi0PetoE+rr14EpVC7oAbAUHqhYExbn2XHHsVqbcVew9tx8+XJKk5AZsqqdlddGpqAKdbAYBn1pcczmSTdWvdmZ17c1b3FZ99vnTdCRFM8OEcAhLwm1NdXnWcBBSMRWmfkWZqVlsmLIiAp/o1gGV2vpS4lalGYsUOqXrddcKCmK61aZ8SjEpUpVFVoCpTj4r661Km7kBHjrDyc1RAIQAAIfkEBQoAGwAsBwAEAM4ACwAABf/gtmUCd4goQQgFKj6PYKi0yrrbc8i4ohQt12EHcal+MNSQiCP8gigdz7iCioaCIvUmZLp8QBzW0EN2vSlCuDtFKaq4RyHzQLEKZNdiQDhRDVooCwkbfm59EAmKi4SGIm+AjIsKjhsqB4mSjT2IOIOUnICeCaB/mZKFNTSRmqVpmJqklSqskq6PfYYCDwYHDC4REQwGCBLGxxIQDsHMwhAIX8bKzcENgSLGF9PU1j3Sy9zX2NrgzQziChLk1BHWxcjf7N046tvN82715czn9Pryz6Ilc4ACj4EBOCZM8KEnAYYADBRKnACAYUMFv1wotIhCEcaJCisqwJFgAUSQGyX/kCSVUUTIdKMwJlyo0oXHlhskwrTJciZHEXsgaqS4s6PJiCAr1uzYU8kBBSgnWFqpoMJMUjGtDmUwkmfVmVypakWhEKvXsS4nhLW5wNjVroJIoc05wSzTr0PtiigpYe4EC2vj4iWrFu5euWIMRBhacaVJhYQBEFjA9jHjyQ0xEABwGceGAZYjY0YBOrRLCxUp29QM+bRkx5s7ZyYgVbTqwwti2ybJ+vLtDYpycyZbYOlptxdx0kV+V7lC5iJAyyRrwYKxAdiz82ng0/jnAdMJFz0cPi104Ec1Vj9/M6F173vKL/feXv156dw11tlqeMMnv4V5Ap53GmjQQH97nFfg+IFiucfgRX5Z8KAgbUlQ4IULIlghhhdOSB6AgX0IVn8eReghen3NRIBsRgnH4l4LuEidZBjwRpt6NM5WGwoW0KSjCwX6yJSMab2GwwAPDXfaBCtWpluRTQqC5JM5oUZAjUNS+VeOLWpJEQ7VYQANW0INJSZVDFSnZphjSikfmzE5N4EEbQI1QJmnWXCmHulRp2edwDXF43txukenJwvI9xyg9Q26Z3MzGUcBYFEChZh6DVTq34AU8Iflh51Sd+CnKFYQ6mmZkhqfBKfSxZWqA9DZanWjxmhrWwi0qtCrt/43K6WqVjjpmhIqgEGvculaGKklKstAACEAACH5BAUKABwALAcABADOAAsAAAX/ICdyQmaMYyAUqPgIBiHPxNpy79kqRXH8wAPsRmDdXpAWgWdEIYm2llCHqjVHU+jjJkwqBTecwItShMXkEfNWSh8e1NGAcLgpDGlRgk7EJ/6Ae3VKfoF/fDuFhohVeDeCfXkcCQqDVQcQhn+VNDOYmpSWaoqBlUSfmowjEA+iEAEGDRGztAwGCDcXEA60tXEiCrq8vREMEBLIyRLCxMWSHMzExnbRvQ2Sy7vN0zvVtNfU2tLY3rPgLdnDvca4VQS/Cpk3ABwSLQkYAQwT/P309vcI7OvXr94jBQMJ/nskkGA/BQBRLNDncAIAiDcG6LsxAWOLiQzmeURBKWSLCQbv/1F0eDGinJUKR47YY1IEgQASKk7Yc7ACRwZm7mHweRJoz59BJUogisKCUaFMR0x4SlJBVBFTk8pZivTR0K73rN5wqlXEAq5Fy3IYgHbEzQ0nLy4QSoCjXLoom96VOJEeCosK5n4kkFfqXjl94wa+l1gvAcGICbewAOAxY8l/Ky/QhAGz4cUkGxu2HNozhwMGBnCUqUdBg9UuW9eUynqSwLHIBujePef1ZGQZXcM+OFuEBeBhi3OYgLyqcuaxbT9vLkf4SeqyWxSQpKGB2gQpm1KdWbu72rPRzR9Ne2Nu9Kzr/1Jqj0yD/fvqP4aXOt5sW/5qsXXVcv1Nsp8IBUAmgswGF3llGgeU1YVXXKTN1FlhWFXW3gIE+DVChApysACHHo7Q4A35lLichh+ROBmLKAzgYmYEYDAhCgxKGOOMn4WR4kkDaoBBOxJtdNKQxFmg5JIWIBnQc07GaORfUY4AEkdV6jHlCEISSZ5yTXpp1pbGZbkWmcuZmQCaE6iJ0FhjMaDjTMsgZaNEHFRAQVp3bqXnZED1qYcECOz5V6BhSWCoVJQIKuKQi2KFKEkEFAqoAo7uYSmO3jk61wUUMKmknJ4SGimBmAa0qVQBhAAAIfkEBQoAGwAsBwAEAM4ACwAABf/gJm5FmRlEqhJC+bywgK5pO4rHI0D3pii22+Mg6/0Ej96weCMAk7cDkXf7lZTTnrMl7eaYoy10JN0ZFdco0XAuvKI6qkgVFJXYNwjkIBcNBgR8TQoGfRsJCRuCYYQQiI+ICosiCoGOkIiKfSl8mJkHZ4U9kZMbKaI3pKGXmJKrngmug4WwkhA0lrCBWgYFCCMQFwoQDRHGxwwGCBLMzRLEx8iGzMMO0cYNeCMKzBDW19lnF9DXDIY/48Xg093f0Q3s1dcR8OLe8+Y91OTv5wrj7o7B+7VNQqABIoRVCMBggsOHE36kSoCBIcSH3EbFangxogJYFi8CkJhqQciLJEf/LDDJEeJIBT0GsOwYUYJGBS0fjpQAMidGmyVP6sx4Y6VQhzs9VUwkwqaCCh0tmKoFtSMDmBOf9phg4SrVrROuasRQAaxXpVUhdsU6IsECZlvX3kwLUWzRt0BHOLTbNlbZG3vZinArge5Dvn7wbqtQkSYAAgtKmnSsYKVKo2AfW048uaPmG386i4Q8EQMBAIAnfB7xBxBqvapJ9zX9WgRS2YMpnvYMGdPK3aMjt/3dUcNI4blpj7iwkMFWDXDvSmgAlijrt9RTR78+PS6z1uAJZIe93Q8g5zcsWCi/4Y+C8bah5zUv3vv89uft30QP23punGCx5954oBBwnwYaNCDY/wYrsYeggnM9B2Fpf8GG2CEUVWhbWAtGouEGDy7Y4IEJVrbSiXghqGKIo7z1IVcXIkKWWR361QOLWWnIhwERpLaaCCee5iMBGJQmJGyPFTnbkfHVZGRtIGrg5HALEJAZbu39BuUEUmq1JJQIPtZilY5hGeSWsSk52G9XqsmgljdIcABytq13HyIM6RcUA+r1qZ4EBF3WHWB29tBgAzRhEGhig8KmqKFv8SeCeo+mgsF7YFXa1qWSbkDpom/mqR1PmHCqJ3fwNRVXjC7S6CZhFVCQ2lWvZiirhQq42SACt25IK2hv8TprriUV1usGgeka7LFcNmCldMLi6qZMgFLgpw16Cipb7bC1knXsBiEAACH5BAUKABsALAcABADOAAsAAAX/4FZsJPkUmUGsLCEUTywXglFuSg7fW1xAvNWLF6sFFcPb42C8EZCj24EJdCp2yoegWsolS0Uu6fmamg8n8YYcLU2bXSiRaXMGvqV6/KAeJAh8VgZqCX+BexCFioWAYgqNi4qAR4ORhRuHY408jAeUhAmYYiuVlpiflqGZa5CWkzc5fKmbbhIpsAoQDRG8vQwQCBLCwxK6vb5qwhfGxxENahvCEA7NzskSy7vNzzzK09W/PNHF1NvX2dXcN8K55cfh69Luveol3vO8zwi4Yhj+AQwmCBw4IYclDAAJDlQggVOChAoLKkgFkSCAHDwWLKhIEOONARsDKryogFPIiAUb/95gJNIiw4wnI778GFPhzBKFOAq8qLJEhQpiNArjMcHCmlTCUDIouTKBhApELSxFWiGiVKY4E2CAekPgUphDu0742nRrVLJZnyrFSqKQ2ohoSYAMW6IoDpNJ4bLdILTnAj8KUF7UeENjAKuDyxIgOuGiOI0EBBMgLNew5AUrDTMGsFixwBIaNCQuAXJB57qNJ2OWm2Aj4skwCQCIyNkhhtMkdsIuodE0AN4LJDRgfLPtn5YDLdBlraAByuUbBgxQwICxMOnYpVOPej074OFdlfc0TqC62OIbcppHjV4o+LrieWhfT8JC/I/T6W8oCl29vQ0XjLdBaA3s1RcPBO7lFvpX8BVoG4O5jTXRQRDuJ6FDTzEWF1/BCZhgbyAKE9qICYLloQYOFtahVRsWYlZ4KQJHlwHS/IYaZ6sZd9tmu5HQm2xi1UaTbzxYwJk/wBF5g5EEYOBZeEfGZmNdFyFZmZIR4jikbLThlh5kUUVJGmRT7sekkziRWUIACABk3T4qCsedgO4xhgGcY7q5pHJ4klBBTQRJ0CeHcoYHHUh6wgfdn9uJdSdMiebGJ0zUPTcoS286FCkrZxnYoYYKWLkBowhQoBeaOlZAgVhLidrXqg2GiqpQpZ4apwSwRtjqrB3muoF9BboaXKmshlqWqsWiGt2wphJkQbAU5hoCACH5BAUKABsALAcABADOAAsAAAX/oGFw2WZuT5oZROsSQnGaKjRvilI893MItlNOJ5v5gDcFrHhKIWcEYu/xFEqNv6B1N62aclysF7fsZYe5aOx2yL5aAUGSaT1oTYMBwQ5VGCAJgYIJCnx1gIOBhXdwiIl7d0p2iYGQUAQBjoOFSQR/lIQHnZ+Ue6OagqYzSqSJi5eTpTxGcjcSChANEbu8DBAIEsHBChe5vL13G7fFuscRDcnKuM3H0La3EA7Oz8kKEsXazr7Cw9/Gztar5uHHvte47MjktznZ2w0G1+D3BgirAqJmJMAQgMGEgwgn5Ei0gKDBhBMALGRYEOJBb5QcWlQo4cbAihZz3GgIMqFEBSM1/4ZEOWPAgpIIJXYU+PIhRG8ja1qU6VHlzZknJNQ6UanCjQkWCIGSUGEjAwVLjc44+DTqUQtPPS5gejUrTa5TJ3g9sWCr1BNUWZI161StiQUDmLYdGfesibQ3XMq1OPYthrwuA2yU2LBs2cBHIypYQPPlYAKFD5cVvNPtW8eVGbdcQADATsiNO4cFAPkvHpedPzc8kUcPgNGgZ5RNDZG05reoE9s2vSEP79MEGiQGy1qP8LA4ZcdtsJE48ONoLTBtTV0B9LsTnPceoIDBDQvS7W7vfjVY3q3eZ4A339J4eaAmKqU/sV58HvJh2RcnIBsDUw0ABqhBA5aV5V9XUFGiHfVeAiWwoFgJJrIXRH1tEMiDFV4oHoAEGlaWhgIGSGBO2nFomYY3mKjVglidaNYJGJDkWW2xxTfbjCbVaOGNqoX2GloR8ZeTaECS9pthRGJH2g0b3Agbk6hNANtteHD2GJUucfajCQBy5OOTQ25ZgUPvaVVQmbKh9510/qQpwXx3SQdfk8tZJOd5b6JJFplT3ZnmmX3qd5l1eg5q00HrtUkUn0AKaiGjClSAgKLYZcgWXwocGRcCFGCKwSB6ceqphwmYRUFYT/1WKlOdUpipmxW0mlCqHjYkAaeoZlqrqZ4qd+upQKaapn/AmgAegZ8KUtYtFAQQAgAh+QQFCgAbACwHAAQAzgALAAAF/+C2PUcmiCiZGUTrEkKBis8jQEquKwU5HyXIbEPgyX7BYa5wTNmEMwWsSXsqFbEh8DYs9mrgGjdK6GkPY5GOeU6ryz7UFopSQEzygOGhJBjoIgMDBAcBM0V/CYqLCQqFOwobiYyKjn2TlI6GKC2YjJZknouaZAcQlJUHl6eooJwKooobqoewrJSEmyKdt59NhRKFMxLEEA4RyMkMEAjDEhfGycqAG8TQx9IRDRDE3d3R2ctD1RLg0ttKEnbY5wZD3+zJ6M7X2RHi9Oby7u/r9g38UFjTh2xZJBEBMDAboogAgwkQI07IMUORwocSJwCgWDFBAIwZOaJIsOBjRogKJP8wTODw5ESVHVtm3AhzpEeQElOuNDlTZ0ycEUWKWFASqEahGwYUPbnxoAgEdlYSqDBkgoUNClAlIHbSAoOsqCRQnQHxq1axVb06FWFxLIqyaze0Tft1JVqyE+pWXMD1pF6bYl3+HTqAWNW8cRUFzmih0ZAAB2oGKukSAAGGRHWJgLiR6AylBLpuHKKUMlMCngMpDSAa9QIUggZVVvDaJobLeC3XZpvgNgCmtPcuwP3WgmXSq4do0DC6o2/guzcseECtUoO0hmcsGKDgOt7ssBd07wqesAIGZC1YIBa7PQHvb1+SFo+++HrJSQfB33xfav3i5eX3Hnb4CTJgegEq8tH/YQEOcIJzbm2G2EoYRLgBXFpVmFYDcREV4HIcnmUhiGBRouEMJGJGzHIspqgdXxK0yCKHRNXoIX4uorCdTyjkyNtdPWrA4Up82EbAbzMRxxZRR54WXVLDIRmRcag5d2R6ugl3ZXzNhTecchpMhIGVAKAYpgJjjsSklBEd99maZoo535ZvdamjBEpusJyctg3h4X8XqodBMx0tiNeg/oGJaKGABpogS40KSqiaEgBqlQWLUtqoVQnytekEjzo0hHqhRorppOZt2p923M2AAV+oBtpAnnPNoB6HaU6mAAIU+IXmi3j2mtFXuUoHKwXpzVrsjcgGOauKEjQrwq157hitGq2NoWmjh7z6Wmxb0m5w66+2VRAuXN/yFUAIACH5BAUKABsALAcABADOAAsAAAX/4CZuRiaM45MZqBgIRbs9AqTcuFLE7VHLOh7KB5ERdjJaEaU4ClO/lgKWjKKcMiJQ8KgumcieVdQMD8cbBeuAkkC6LYLhOxoQ2PF5Ys9PKPBMen17f0CCg4VSh32JV4t8jSNqEIOEgJKPlkYBlJWRInKdiJdkmQlvKAsLBxdABA4RsbIMBggtEhcQsLKxDBC2TAS6vLENdJLDxMZAubu8vjIbzcQRtMzJz79S08oQEt/guNiyy7fcvMbh4OezdAvGrakLAQwyABsELQkY9BP+//ckyPDD4J9BfAMh1GsBoImMeQUN+lMgUJ9CiRMa5msxoB9Gh/o8GmxYMZXIgxtR/yQ46S/gQAURR0pDwYDfywoyLPip5AdnCwsMFPBU4BPFhKBDi444quCmDKZOfwZ9KEGpCKgcN1jdALSpPqIYsabS+nSqvqplvYqQYAeDPgwKwjaMtiDl0oaqUAyo+3TuWwUAMPpVCfee0cEjVBGQq2ABx7oTWmQk4FglZMGN9fGVDMCuiH2AOVOu/PmyxM630gwM0CCn6q8LjVJ8GXvpa5Uwn95OTC/nNxkda1/dLSK475IjCD6dHbK1ZOa4hXP9DXs5chJ00UpVm5xo2qRpoxptwF2E4/IbJpB/SDz9+q9b1aNfQH08+p4a8uvX8B53fLP+ycAfemjsRUBgp1H20K+BghHgVgt1GXZXZpZ5lt4ECjxYR4ScUWiShEtZqBiIInRGWnERNnjiBglw+JyGnxUmGowsyiiZg189lNtPGACjV2+S9UjbU0JWF6SPvEk3QZEqsZYTk3UAaRSUnznJI5LmESCdBVSyaOWUWLK4I5gDUYVeV1T9l+FZClCAUVA09uSmRHBCKAECFEhW51ht6rnmWBXkaR+NjuHpJ40D3DmnQXt2F+ihZxlqVKOfQRACACH5BAUKABwALAcABADOAAsAAAX/ICdyUCkUo/g8mUG8MCGkKgspeC6j6XEIEBpBUeCNfECaglBcOVfJFK7YQwZHQ6JRZBUqTrSuVEuD3nI45pYjFuWKvjjSkCoRaBUMWxkwBGgJCXspQ36Bh4EEB0oKhoiBgyNLjo8Ki4QElIiWfJqHnISNEI+Ql5J9o6SgkqKkgqYihamPkW6oNBgSfiMMDQkGCBLCwxIQDhHIyQwQCGMKxsnKVyPCF9DREQ3MxMPX0cu4wt7J2uHWx9jlKd3o39MiuefYEcvNkuLt5O8c1ePI2tyELXGQwoGDAQf+iEC2xByDCRAjTlAgIUWCBRgCPJQ4AQBFXAs0coT40WLIjRxL/47AcHLkxIomRXL0CHPERZkpa4q4iVKiyp0tR/7kwHMkTUBBJR5dOCEBAVcKKtCAyOHpowXCpk7goABqBZdcvWploACpBKkpIJI1q5OD2rIWE0R1uTZu1LFwbWL9OlKuWb4c6+o9i3dEgw0RCGDUG9KlRw56gDY2qmCByZBaASi+TACA0TucAaTteCcy0ZuOK3N2vJlx58+LRQyY3Xm0ZsgjZg+oPQLi7dUcNXi0LOJw1pgNtB7XG6CBy+U75SYfPTSQAgZTNUDnQHt67wnbZyvwLgKiMN3oCZB3C76tdewpLFgIP2C88rbi4Y+QT3+8S5USMICZXWj1pkEDeUU3lOYGB3alSoEiMIjgX4WlgNF2EibIwQIXauWXSRg2SAOHIU5IIIMoZkhhWiJaiFVbKo6AQEgQXrTAazO1JhkBrBG3Y2Y6EsUhaGn95hprSN0oWpFE7rhkeaQBchGOEWnwEmc0uKWZj0LeuNV3W4Y2lZHFlQCSRjTIl8uZ+kG5HU/3sRlnTG2ytyadytnD3HrmuRcSn+0h1dycexIK1KCjYaCnjCCVqOFFJTZ5GkUUjESWaUIKU2lgCmAKKQIUjHapXRKE+t2og1VgankNYnohqKJ2CmKplso6GKz7WYCgqxeuyoF8u9IQAgA7",msg:null,msgText:"<em>Loading the next set of posts...</em>",selector:null,speed:"fast",start:i},state:{isDuringAjax:!1,isInvalidPage:!1,isDestroyed:!1,isDone:!1,isPaused:!1,isBeyondMaxPage:!1,currPage:1},debug:!1,behavior:i,binder:e(window),nextSelector:"div.navigation a:first",navSelector:"div.navigation",contentSelector:null,extraScrollPx:150,itemSelector:"div.post",animate:!1,pathParse:i,dataType:"html",appendCallback:!0,bufferPx:40,errorCallback:function(){},infid:0,pixelsFromNavToBottom:i,path:i,prefill:!1,maxPage:i},e.infinitescroll.prototype={_binding:function(e){var t=this,o=t.options;if(o.v="2.0b2.120520",o.behavior&&this["_binding_"+o.behavior]!==i)this["_binding_"+o.behavior].call(this);else{if("bind"!==e&&"unbind"!==e)return this._debug("Binding value  "+e+" not valid"),!1;"unbind"===e?this.options.binder.off("smartscroll.infscr."+t.options.infid):this.options.binder["bind"==e?"on":e]("smartscroll.infscr."+t.options.infid,function(){t.scroll()}),this._debug("Binding",e)}},_create:function(t,o){var n=e.extend(!0,{},e.infinitescroll.defaults,t);this.options=n;var a=e(window);if(!this._validate(t))return!1;var s=e(n.nextSelector).attr("href");if(!s)return this._debug("Navigation selector not found"),!1;n.path=n.path||this._determinepath(s),n.contentSelector=n.contentSelector||this.element,n.loading.selector=n.loading.selector||n.contentSelector,n.loading.msg=n.loading.msg||e('<div id="infscr-loading"><img alt="Loading..." src="'+n.loading.img+'" /><div>'+n.loading.msgText+"</div></div>"),(new Image).src=n.loading.img,n.pixelsFromNavToBottom===i&&(n.pixelsFromNavToBottom=e(document).height()-e(n.navSelector).offset().top,this._debug("pixelsFromNavToBottom: "+n.pixelsFromNavToBottom));var r=this;return n.loading.start=n.loading.start||function(){e(n.navSelector).hide(),n.loading.msg.appendTo(n.loading.selector).show(n.loading.speed,e.proxy(function(){this.beginAjax(n)},r))},n.loading.finished=n.loading.finished||function(){n.state.isBeyondMaxPage||n.loading.msg.fadeOut(n.loading.speed)},n.callback=function(t,s,r){n.behavior&&t["_callback_"+n.behavior]!==i&&t["_callback_"+n.behavior].call(e(n.contentSelector)[0],s,r),o&&o.call(e(n.contentSelector)[0],s,n,r),n.prefill&&a.on("resize.infinite-scroll",t._prefill)},t.debug&&(!Function.prototype.bind||"object"!=typeof console&&"function"!=typeof console||"object"!=typeof console.log||["log","info","warn","error","assert","dir","clear","profile","profileEnd"].forEach(function(e){console[e]=this.call(console[e],console)},Function.prototype.bind)),this._setup(),n.prefill&&this._prefill(),!0},_prefill:function(){function i(){return e(t.options.contentSelector).height()<=o.height()}var t=this,o=e(window);this._prefill=function(){i()&&t.scroll(),o.on("resize.infinite-scroll",function(){i()&&(o.off("resize.infinite-scroll"),t.scroll())})},this._prefill()},_debug:function(){!0===this.options.debug&&("undefined"!=typeof console&&"function"==typeof console.log?1===Array.prototype.slice.call(arguments).length&&Array.prototype.slice.call(arguments)[0]:Function.prototype.bind||"undefined"==typeof console||"object"!=typeof console.log||Function.prototype.call.call(console.log,console,Array.prototype.slice.call(arguments)))},_determinepath:function(e){var t=this.options;if(t.behavior&&this["_determinepath_"+t.behavior]!==i)return this["_determinepath_"+t.behavior].call(this,e);if(t.pathParse)return this._debug("pathParse manual"),t.pathParse(e,this.options.state.currPage+1);if(e.match(/^(.*?)\b2\b(.*?$)/))e=e.match(/^(.*?)\b2\b(.*?$)/).slice(1);else if(e.match(/^(.*?)2(.*?$)/)){if(e.match(/^(.*?page=)2(\/.*|$)/))return e=e.match(/^(.*?page=)2(\/.*|$)/).slice(1);e=e.match(/^(.*?)2(.*?$)/).slice(1)}else{if(e.match(/^(.*?page=)1(\/.*|$)/))return e=e.match(/^(.*?page=)1(\/.*|$)/).slice(1);this._debug("Sorry, we couldn't parse your Next (Previous Posts) URL. Verify your the css selector points to the correct A tag. If you still get this error: yell, scream, and kindly ask for help at infinite-scroll.com."),t.state.isInvalidPage=!0}return this._debug("determinePath",e),e},_error:function(e){var t=this.options;t.behavior&&this["_error_"+t.behavior]!==i?this["_error_"+t.behavior].call(this,e):("destroy"!==e&&"end"!==e&&(e="unknown"),this._debug("Error",e),("end"===e||t.state.isBeyondMaxPage)&&this._showdonemsg(),t.state.isDone=!0,t.state.currPage=1,t.state.isPaused=!1,t.state.isBeyondMaxPage=!1,this._binding("unbind"))},_loadcallback:function(t,o,n){var a,s=this.options,r=this.options.callback,l=s.state.isDone?"done":s.appendCallback?"append":"no-append";if(s.behavior&&this["_loadcallback_"+s.behavior]!==i)this["_loadcallback_"+s.behavior].call(this,t,o);else{switch(l){case"done":return this._showdonemsg(),!1;case"no-append":if("html"===s.dataType&&(o=e(o="<div>"+o+"</div>").find(s.itemSelector)),0===o.length)return this._error("end");break;case"append":if(this.element.closest(".archive-products").length){var c=e(".woocommerce-result-count");if(c.length){var h=e(o="<div>"+o+"</div>").find(".woocommerce-result-count").eq(0);h.length&&c.replaceWith(h)}}var A=t.children();if(0===A.length)return this._error("end");for(a=document.createDocumentFragment();t[0].firstChild;)a.appendChild(t[0].firstChild);this._debug("contentSelector",e(s.contentSelector)[0]),e(s.contentSelector)[0].appendChild(a),o=A.get()}if(s.loading.finished.call(e(s.contentSelector)[0],s),s.animate){var g=e(window).scrollTop()+e(s.loading.msg).height()+s.extraScrollPx+"px";e("html,body").animate({scrollTop:g},800,function(){s.state.isDuringAjax=!1})}s.animate||(s.state.isDuringAjax=!1),r(this,o,n),s.prefill&&this._prefill()}},_nearbottom:function(){var t=this.options,o=0+e(document).height()-t.binder.scrollTop()-e(window).height();return t.behavior&&this["_nearbottom_"+t.behavior]!==i?this["_nearbottom_"+t.behavior].call(this):(this._debug("math:",o,t.pixelsFromNavToBottom),o-t.bufferPx<t.pixelsFromNavToBottom)},_pausing:function(e){var t=this.options;{if(!t.behavior||this["_pausing_"+t.behavior]===i){switch("pause"!==e&&"resume"!==e&&null!==e&&this._debug("Invalid argument. Toggling pause value instead"),e=!e||"pause"!==e&&"resume"!==e?"toggle":e){case"pause":t.state.isPaused=!0;break;case"resume":t.state.isPaused=!1;break;case"toggle":t.state.isPaused=!t.state.isPaused}return this._debug("Paused",t.state.isPaused),!1}this["_pausing_"+t.behavior].call(this,e)}},_setup:function(){var e=this.options;{if(!e.behavior||this["_setup_"+e.behavior]===i)return this._binding("bind"),!1;this["_setup_"+e.behavior].call(this)}},_showdonemsg:function(){var t=this.options;t.behavior&&this["_showdonemsg_"+t.behavior]!==i?this["_showdonemsg_"+t.behavior].call(this):(t.loading.msg.find("img").hide().parent().find("div").html(t.loading.finishedMsg).animate({opacity:1},2e3,function(){e(this).parent().fadeOut(t.loading.speed)}),t.errorCallback.call(e(t.contentSelector)[0],"done"))},_validate:function(i){for(var t in i)if(t.indexOf&&t.indexOf("Selector")>-1&&0===e(i[t]).length)return this._debug("Your "+t+" found no elements."),!1;return!0},bind:function(){this._binding("bind")},destroy:function(){return this.options.state.isDestroyed=!0,this.options.loading.finished(),this._error("destroy")},pause:function(){this._pausing("pause")},resume:function(){this._pausing("resume")},beginAjax:function(t){var o,n,a,s,r=this,l=t.path;if(t.state.currPage++,t.maxPage!==i&&t.state.currPage>t.maxPage)return t.state.isBeyondMaxPage=!0,void this.destroy();switch(o=e(e(t.contentSelector).is("table, tbody")?"<tbody/>":"<div/>"),n="function"==typeof l?l(t.state.currPage):l.join(t.state.currPage),r._debug("heading into ajax",n),a="html"===t.dataType||"json"===t.dataType?t.dataType:"html+callback",t.appendCallback&&"html"===t.dataType&&(a+="+callback"),a){case"html+callback":r._debug("Using HTML via .load() method"),o.load(n+" "+t.itemSelector,i,function(e){r._loadcallback(o,e,n)});break;case"html":r._debug("Using "+a.toUpperCase()+" via $.ajax() method"),e.ajax({url:n,dataType:t.dataType,complete:function(e,i){(s=void 0!==e.isResolved?e.isResolved():"success"===i||"notmodified"===i)?r._loadcallback(o,e.responseText,n):r._error("end")}});break;case"json":r._debug("Using "+a.toUpperCase()+" via $.ajax() method"),e.ajax({dataType:"json",type:"GET",url:n,success:function(e,a,l){if(s=void 0!==l.isResolved?l.isResolved():"success"===a||"notmodified"===a,t.appendCallback)if(t.template!==i){var c=t.template(e);o.append(c),s?r._loadcallback(o,c):r._error("end")}else r._debug("template must be defined."),r._error("end");else s?r._loadcallback(o,e,n):r._error("end")},error:function(){r._debug("JSON ajax request failed."),r._error("end")}})}},retrieve:function(t){t=t||null;var o=this.options;if(o.behavior&&this["retrieve_"+o.behavior]!==i)this["retrieve_"+o.behavior].call(this,t);else{if(o.state.isDestroyed)return this._debug("Instance is destroyed"),!1;o.state.isDuringAjax=!0,o.loading.start.call(e(o.contentSelector)[0],o)}},scroll:function(){var e=this.options,t=e.state;e.behavior&&this["scroll_"+e.behavior]!==i?this["scroll_"+e.behavior].call(this):t.isDuringAjax||t.isInvalidPage||t.isDone||t.isDestroyed||t.isPaused||this._nearbottom()&&this.retrieve()},toggle:function(){this._pausing()},unbind:function(){this._binding("unbind")},update:function(i){e.isPlainObject(i)&&(this.options=e.extend(!0,this.options,i))}},e.fn.infinitescroll=function(i,t){switch(typeof i){case"string":var o=Array.prototype.slice.call(arguments,1);this.each(function(){var t=e.data(this,"infinitescroll");return!!t&&("function"==typeof t[i]&&"_"!==i.charAt(0)&&void t[i].apply(t,o))});break;case"object":this.each(function(){var o=e.data(this,"infinitescroll");o?o.update(i):(o=new e.infinitescroll(i,t,this)).failed||e.data(this,"infinitescroll",o)})}return this};var t,o=e.event;o.special.smartscroll={setup:function(){e(this).on("scroll",o.special.smartscroll.handler)},teardown:function(){e(this).off("scroll",o.special.smartscroll.handler)},handler:function(i,o){var n=this,a=arguments;i.type="smartscroll",t&&clearTimeout(t),t=setTimeout(function(){e(n).trigger("smartscroll",a)},"execAsap"===o?0:100)}},e.fn.smartscroll=function(e){return e?this.on("smartscroll",e):this.trigger("smartscroll",["execAsap"])}});
// source --> https://mfrash.com/wp-content/themes/porto/inc/lib/infinite-scroll/infinite-scroll.min.js?ver=7.8.5 
(function(t,e){"use strict";t=t||{};var o="__postsinfinite",i=function(t,e,o,i){return this.initialize(t,e,o,i)};i.prototype={initialize:function(t,i,n,a){void 0!==n&&n?(this.defaults=e.extend(!0,{},n),this.post_type=a):(this.defaults={elements:"."+escape(porto_infinite_scroll.post_type)+"s-container",itemSelector:porto_infinite_scroll.item_selector,navSelector:"product"==porto_infinite_scroll.post_type?".woocommerce-pagination":"div.pagination",nextSelector:"product"==porto_infinite_scroll.post_type?".woocommerce-pagination .page-numbers a.next":"div.pagination a.next",loading:{finishedMsg:"",msgText:porto_infinite_scroll.loader_html,img:"data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="},paginationType:void 0!==porto_infinite_scroll.pagination_type?porto_infinite_scroll.pagination_type:"infinite_scroll"},"product"==porto_infinite_scroll.post_type&&(this.defaults.elements+=":not(.is-shortcode)"),this.post_type=porto_infinite_scroll.post_type),this.$elements=t||e(this.defaults.elements+":not(.skeleton-body)"),this.itemSelector=i||this.defaults.itemSelector,void 0!==n&&n&&this.$elements.data("infiniteoptions",n),this.defaults.behavior=this.defaults.paginationType;var s=this.$elements.data(o);return s&&s.destroy(),this.$elements.data(o,this),this.build().events(),this},build:function(){var o=this;return o.$elements.each((function(){var n,a,s,r=e(this);if(!r.hasClass("skeleton-body")){n=void 0!==r.data("cur_page")?r.data("cur_page"):porto_infinite_scroll.cur_page,a=void 0!==r.data("max_page")?r.data("max_page"):porto_infinite_scroll.max_page;var l=!!r.data("keep_url");r.infinitescroll(e.extend(o.defaults,{itemSelector:o.itemSelector,state:{currPage:n},maxPage:a,infid:t.PostsInfinite.index,path:function(t){if(void 0!==r.data("page_path")){if(s=r.data("page_path"),"portfolio"==o.post_type&&r.closest(".portfolios-timeline").length){var e=r.find(".timeline-date").last().data("date");e&&(s+="&last_date="+e)}}else s=porto_infinite_scroll.page_path,void 0!==porto_infinite_scroll.pagination_type&&(s+="&type="+porto_infinite_scroll.pagination_type);return s.replace("%cur_page%",t)}}),(function(n){if("load_more"==o.defaults.paginationType){var a=r.data("infinitescroll");if(a){var d=e(a.options.navSelector);d.length>1&&d.each((function(){e(this).closest(".porto-products").length||(d=e(this))})),a.options.state.currPage>=a.options.maxPage?d.addClass("d-none"):d.show(),d.find(".next").data("text")&&d.find(".next").text(d.find(".next").data("text"))}}var p=e(n);if(p.find(".porto-lazyload:not(.lazy-load-loaded)").length){var c=p.find(".porto-lazyload:not(.lazy-load-loaded)").themePluginLazyLoad({}).data("__lazyload");c&&c.loadAndDestroy&&c.loadAndDestroy()}t.refreshVCContent(p),porto_init();var f="";if(f="product"!=o.post_type&&"member"!=o.post_type&&"faq"!=o.post_type&&"portfolio"!=o.post_type&&"post"!=o.post_type?"ptu":o.post_type,i[f+"Behavior"](p,r),l&&a.options.state.currPage){var h="",u=s.replace("%cur_page%",a.options.state.currPage);u=u.split("?")[0]+window.location.search,window.history.state&&window.history.state.hasOwnProperty("url")&&(window.history.state.url=u,h=window.history.state),window.history.replaceState(h,"",u)}e(document.body).trigger("porto_infinite_scroll_behavior",[f]),e(document.body).trigger("porto_init_countdown",[r]),e(window).trigger("resize"),e(window).trigger("porto_posts_updated")})),t.PostsInfinite.index++}})),o.resize(),o},resize:function(t){var o;if((o=void 0!==t&&void 0!==t.data&&t.data.ins?t.data.ins:this).$elements.length&&!e(document.body).find(o.$elements).length)return o.destroy(),!1;var i=o.$elements;return o.resizeTimer&&clearTimeout(o.resizeTimer),o.resizeTimer=setTimeout((function(){i.each((function(t){var o=e(this);e().isotope&&o.data("isotope")&&o.isotope("layout")})),delete o.resizeTimer}),800),o},events:function(){var t=this;return e(window).on("resize",{ins:t},t.resize),t},destroy:function(){var t=this;return e(window).off("resize",t.resize),t.$elements.removeData(o),t}},e.extend(i,{index:0,globalBehavior:function(t){t.each((function(){var t=e(this);t.hasClass("owl-carousel")&&(t.removeData("__carousel"),t.removeClass("owl-loaded").trigger("destroy.owl.carousel"),t.find("#infscr-loading").remove(),"function"==typeof e.fn.themeCarousel&&t.themeCarousel(t.data("plugin-options")))})),e().isotope&&setTimeout((function(){t.each((function(){var t=e(this);t.data("isotope")&&t.isotope("layout")}))}),800)},postBehavior:function(o,i){var n=this;i.closest(".blog-posts").hasClass("blog-posts-related")&&t.FilterZoom.initialize(i.closest(".blog-posts")),e().isotope&&i.data("isotope")&&(i.isotope("appended",o),t.requestTimeout((function(){i.isotope("layout")}),50)),n&&o.imagesLoaded((function(){n.globalBehavior(i)}))},portfolioBehavior:function(o,i){var n=this;o.each((function(){var t=e(this).find(".thumb-info-wrapper").children("img").attr("src");i.find(".porto-portfolios-lighbox-thumbnails > div").append('<span><img src="'+t+'" alt="" style="height: 84px;" /></span>')}));var a=i.closest(".page-portfolios");if(a.hasClass("portfolios-timeline")){var s=0;if(a.find(".portfolio-filter").length){var r=a.find(".portfolio-filter .active").attr("data-filter"),l="easeInOutQuart";o.each((function(){var t=e(this);t.hasClass("timeline-date")||("*"==r||t.hasClass(r)?("none"==t.css("display")&&t.stop().slideDown(300,l,(function(){e(this).attr("style","").show()})),s++):t.stop().hide())}))}!s&&a.find(".portfolios-infinite").length&&a.find(".portfolios-infinite").infinitescroll("retrieve"),t.FilterZoom.initialize(a)}else e().isotope&&i.data("isotope")&&(i.isotope("appended",o),t.requestTimeout((function(){i.isotope("layout")}),50)),n&&o.imagesLoaded((function(){n.globalBehavior(i)}));a.data("portfolioAjaxOnPage")&&a.data("portfolioAjaxOnPage").build(),a.data("portfolioAjaxOnModal")&&a.data("portfolioAjaxOnModal").build(a,"portfolio")},memberBehavior:function(o,i){var n=this;e().isotope&&i.data("isotope")&&(i.isotope("appended",o),t.requestTimeout((function(){i.isotope("layout")}),50)),n&&o.imagesLoaded((function(){n.globalBehavior(i)}));var a=i.closest(".page-members");a.length&&(a.data("memberAjaxOnPage")&&a.data("memberAjaxOnPage").build(),a.data("memberAjaxOnModal")&&a.data("memberAjaxOnModal").build(a,"member"))},faqBehavior:function(t,o){var i=this,n=o.closest(".page-faqs"),a=0;if(n.find(".faq-filter").length){var s=n.find(".faq-filter .active").attr("data-filter"),r="easeInOutQuart";t.each((function(){var t=e(this);"*"==s||t.hasClass(s)?("none"==t.css("display")&&t.stop().slideDown(300,r,(function(){e(this).attr("style","").show()})),a++):t.stop().hide()}))}!a&&n.find(".faqs-infinite").length&&n.find(".faqs-infinite").infinitescroll("retrieve"),i&&t.imagesLoaded((function(){i.globalBehavior(o)}))},productBehavior:function(o,i){var n=this;if(e().isotope&&i.data("isotope")&&(i.isotope("appended",o),t.requestTimeout((function(){i.isotope("layout")}),50)),n&&o.imagesLoaded((function(){n.globalBehavior(i)})),o.closest(".archive-products").length){var a=e(".woocommerce-result-count"),s=o.closest(".archive-products");if(a.length){var r=o.closest(".content-area").find(".woocommerce-result-count").eq(0);a[0].outerHTML=r.length?r[0].outerHTML:""}"undefined"!=typeof yith_wcwl_l10n&&yith_wcwl_l10n.enable_ajax_loading&&s.trigger("yith_wcwl_reload_fragments")}porto_woocommerce_init(),porto_woocommerce_variations_init(o)},ptuBehavior:function(o,i){var n=this;e().isotope&&i.data("isotope")&&(i.isotope("appended",o),t.requestTimeout((function(){i.isotope("layout")}),50)),n&&o.imagesLoaded((function(){n.globalBehavior(i)}))},btnAction:function(t){if(t.preventDefault(),!e(this).closest(".porto-products").length){var o;if(e(this).closest(".porto-ajax-load").length){var i=e(this).closest(".porto-ajax-load").data("post_type"),n=e(this).closest(".porto-ajax-load").find("."+i+"s-container").data("infinitescroll");n&&(o=n)}else o=t.data;o&&(e(this).data("text",e(this).text()),e(this).text("undefined"!=typeof porto_infinite_scroll?porto_infinite_scroll.loader_text:js_porto_vars.loader_text),o.scroll(),e(this).blur())}}}),e.extend(t,{PostsInfinite:i}),e.fn.portoInfiniteScroll=function(o){return this.map((function(){var i=e(this),n=i.find(".shortcode-id");if(n.length){var a=n.val(),s=i.data("post_type"),r=i.closest(".porto-"+("post"==s?"blog":s+"s")),l=".porto-"+("post"==s?"blog":s+"s")+a;if(r.length||(r=i.closest(".porto-ajax-load")),r.length){r.attr("id");var d=r.find("."+s+"s-container"),p=i.data("ajax_load_options"),c="."+s+", .timeline-date",f=o;if(p&&p.post_found_nothing&&(p.post_found_nothing=encodeURI(p.post_found_nothing)),d.closest(".archive-posts").length){var h=d.siblings(".pagination-wrap");0==h.length&&d.parent(".yit-wcan-container").length&&(h=d.parent(".yit-wcan-container").siblings(".pagination-wrap"));var u=h.find(".next").attr("href");u||(u=window.location.href),f=(u+=(-1!==u.indexOf("?")?"&":"?")+"portoajax=1&load_posts_only=2&type=load_more").replace(/(paged=)(\d+)|(page\/)(\d+)/,"$1$3%cur_page%"),c=".archive-posts ."+s}else f+="&post_type="+s+(p?"&extra="+encodeURI(JSON.stringify(p)):"");if(e(c).length){var g=i.find(".porto-ajax-filter li.active").attr("data-filter"),_="*"==g?"":g,m="";void 0!==_&&""!=_||!r.find("input[type=hidden].category").length||(_=r.find("input[type=hidden].category").val()),r.find("input[type=hidden].taxonomy").length?(m=r.find("input[type=hidden].taxonomy").val(),f=f.replace(/&category=[^&]*&/,"&category="+_+"&taxonomy="+m+"&")):void 0!==_&&(f=f.replace(/&category=[^&]*&/,"&category="+_+"&")),d.data("page_path",f);var v=i.hasClass("load-infinite")?"infinite_scroll":"load_more";new t.PostsInfinite(d,c,{navSelector:"product"==s&&void 0===p.shortcode?l+" .woocommerce-pagination":l+" div.pagination",nextSelector:"product"==s&&void 0===p.shortcode?l+" .woocommerce-pagination .page-numbers a.next":l+" div.pagination a.next",loading:{finishedMsg:"",msgText:'<div class="bounce-loader"><div class="bounce1"></div><div class="bounce2"></div><div class="bounce3"></div></div>',img:"data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="},paginationType:v},s)}}}}))}}).apply(this,[window.theme,jQuery]),jQuery(window).on("load",(function(){"use strict";var t=jQuery;void 0!==t.infinitescroll&&t.extend(t.infinitescroll.prototype,{_binding_load_more:function(e){"unbind"===e?this.options.binder.off("smartscroll.infscr."+this.options.infid):t(document).off("click",".pagination.load-more .next",theme.PostsInfinite.btnAction).on("click",".pagination.load-more .next",this,theme.PostsInfinite.btnAction)},_nearbottom_load_more:function(){return!0},_nearbottom_infinite_scroll:function(){var e=window.innerHeight||t(window).height();return t(window).scrollTop()+e>this.element.offset().top+this.element.height()}}),void 0===theme.PostsInfinite||"undefined"==typeof porto_infinite_scroll||t(document).find(".archive-posts-infinite, .porto-ajax-load[data-ajax_load_options]").length||new theme.PostsInfinite;var e=t(".porto-ajax-load.load-infinite, .porto-ajax-load.load-more");if(e.length){var o=window.location.href;-1!==o.indexOf("#")&&(o=o.split("#")[0]);var i=theme.ajax_url+(-1===theme.ajax_url.indexOf("?")?"?":"&")+"action=porto_ajax_posts&nonce="+js_porto_vars.porto_nonce+"&current_link="+o+"&page=%cur_page%&category=";e.portoInfiniteScroll(i)}}));
// source --> https://mfrash.com/wp-content/plugins/woocommerce/assets/js/frontend/checkout.min.js?ver=10.7.0 
jQuery(function(e){if("undefined"==typeof wc_checkout_params)return!1;function t(){var t=wc.customPlaceOrderButton.__getForm();return{validate:function(){return new Promise(function(o){var r=!1,i=t.find('input[name="terms"]:visible');if(i.length&&i.closest(".form-row").removeClass("woocommerce-invalid"),t.find(".input-text, select, input:checkbox").trigger("validate"),t.find(".woocommerce-invalid").length>0&&(r=!0),t.find(".validate-required:visible").each(function(){var t=e(this),o=t.find("input.input-text, select, input:checkbox");0!==o.length&&((o.is(":checkbox")?!o.is(":checked"):""===o.val()||null===o.val())&&(r=!0,t.addClass("woocommerce-invalid woocommerce-invalid-required-field")))}),i.length&&!i.is(":checked")&&(r=!0,i.closest(".form-row").addClass("woocommerce-invalid")),r){var c=t.find(".woocommerce-invalid").first();c.length&&e("html, body").animate({scrollTop:c.offset().top-100},500)}o({hasError:r})})},submit:function(){t.trigger("submit")}}}e.blockUI.defaults.overlayCSS.cursor="default",e(document.body).on("update_checkout",function(){wc.customPlaceOrderButton.__cleanup()}),e(document.body).on("wc_custom_place_order_button_registered",function(e,o){wc.customPlaceOrderButton.__maybeShow(o,t())});var o={updateTimer:!1,dirtyInput:!1,selectedPaymentMethod:!1,xhr:!1,$order_review:e("#order_review"),$checkout_form:e("form.checkout"),init:function(){if(e(document.body).on("update_checkout",this.update_checkout),e(document.body).on("init_checkout",this.init_checkout),this.$checkout_form.on("click",'input[name="payment_method"]',this.payment_method_selected),e(document.body).hasClass("woocommerce-order-pay")){this.$order_review.on("click",'input[name="payment_method"]',this.payment_method_selected),this.$order_review.on("submit",this.submitOrder),this.$order_review.attr("novalidate","novalidate");var t=this.$order_review.find('input[name="payment_method"]:checked');t.length&&(wc.customPlaceOrderButton.__maybeHideDefaultButtonOnInit(t.val()),t.trigger("click"))}this.$checkout_form.attr("novalidate","novalidate"),this.$checkout_form.on("submit",this.submit),this.$checkout_form.on("input validate change focusout",".input-text, select, input:checkbox",this.validate_field),this.$checkout_form.on("update",this.trigger_update_checkout),this.$checkout_form.on("change",'select.shipping_method, input[name^="shipping_method"], #ship-to-different-address input, .update_totals_on_change select, .update_totals_on_change input[type="radio"], .update_totals_on_change input[type="checkbox"]',this.trigger_update_checkout),this.$checkout_form.on("change",".address-field select",this.input_changed),this.$checkout_form.on("change",".address-field input.input-text, .update_totals_on_change input.input-text",this.maybe_input_changed),this.$checkout_form.on("keydown",".address-field input.input-text, .update_totals_on_change input.input-text",this.queue_update_checkout),this.$checkout_form.on("blur","#billing_address_1, #shipping_address_1",this.address_field_blur),this.$checkout_form.on("change","#ship-to-different-address input",this.ship_to_different_address),this.$checkout_form.find("#ship-to-different-address input").trigger("change"),this.init_payment_methods(),"1"===wc_checkout_params.is_checkout&&e(document.body).trigger("init_checkout"),"yes"===wc_checkout_params.option_guest_checkout&&e("input#createaccount").on("change",this.toggle_create_account).trigger("change")},init_payment_methods:function(){var t=e(".woocommerce-checkout").find('input[name="payment_method"]');1===t.length&&t.eq(0).hide(),o.selectedPaymentMethod&&e("#"+o.selectedPaymentMethod).prop("checked",!0),0===t.filter(":checked").length&&t.eq(0).prop("checked",!0);var r=t.filter(":checked").eq(0).prop("id");t.length>1&&e('div.payment_box:not(".'+r+'")').filter(":visible").slideUp(0);var i=t.filter(":checked").eq(0);i.length&&wc.customPlaceOrderButton.__maybeHideDefaultButtonOnInit(i.val()),t.filter(":checked").eq(0).trigger("click")},get_payment_method:function(){return o.$checkout_form.find('input[name="payment_method"]:checked').val()},payment_method_selected:function(r){if(r.stopPropagation(),e(".payment_methods input.input-radio").length>1){var i=e("div.payment_box."+e(this).attr("ID")),c=e(this).is(":checked");c&&!i.is(":visible")&&(e("div.payment_box").filter(":visible").slideUp(230),c&&i.slideDown(230))}else e("div.payment_box").show();e(this).data("order_button_text")?e("#place_order").text(e(this).data("order_button_text")):e("#place_order").text(e("#place_order").data("value"));var n=e('.woocommerce-checkout input[name="payment_method"]:checked').attr("id");n!==o.selectedPaymentMethod&&e(document.body).trigger("payment_method_selected");var a=e(this).val();wc.customPlaceOrderButton.__maybeShow(a,t()),o.selectedPaymentMethod=n},toggle_create_account:function(){e("div.create-account").hide(),e(this).is(":checked")&&(e("#account_password").val("").trigger("change"),e("div.create-account").slideDown())},init_checkout:function(){e(document.body).trigger("update_checkout")},should_skip_address_update:function(e){var t=e.target||e.srcElement;if(t&&("billing_address_1"===t.id||"shipping_address_1"===t.id)){if("true"===t.getAttribute("data-autocomplete-manipulating"))return!0;var o=t.id.replace("_address_1","");if(window.wc&&window.wc.addressAutocomplete&&window.wc.addressAutocomplete.activeProvider&&window.wc.addressAutocomplete.activeProvider[o])return!0}return!1},should_trigger_address_blur_update:function(e){var t=e.target||e.srcElement;if(t&&("billing_address_1"===t.id||"shipping_address_1"===t.id)){if("true"===t.getAttribute("data-autocomplete-manipulating"))return!1;var o=t.id.replace("_address_1","");if(window.wc&&window.wc.addressAutocomplete&&window.wc.addressAutocomplete.activeProvider&&window.wc.addressAutocomplete.activeProvider[o])return!0}return!1},maybe_input_changed:function(e){o.should_skip_address_update(e)||o.dirtyInput&&o.input_changed(e)},input_changed:function(e){o.should_skip_address_update(e)||(o.dirtyInput=e.target,o.maybe_update_checkout())},address_field_blur:function(e){o.should_trigger_address_blur_update(e)&&(o.dirtyInput=e.target,o.maybe_update_checkout())},queue_update_checkout:function(e){if(9===(e.keyCode||e.which||0))return!0;var t=e.target||e.srcElement;if(t&&("billing_address_1"===t.id||"shipping_address_1"===t.id)){var r=t.id.replace("_address_1","");if(window.wc&&window.wc.addressAutocomplete&&window.wc.addressAutocomplete.activeProvider&&window.wc.addressAutocomplete.activeProvider[r])return!0}o.dirtyInput=this,o.reset_update_checkout_timer(),o.updateTimer=setTimeout(o.maybe_update_checkout,"1000")},trigger_update_checkout:function(t){o.reset_update_checkout_timer(),o.dirtyInput=!1,e(document.body).trigger("update_checkout",{current_target:t?t.currentTarget:null})},maybe_update_checkout:function(){var t=!0;if(e(o.dirtyInput).length){var r=e(o.dirtyInput).closest("div").find(".address-field.validate-required");r.length&&r.each(function(){""===e(this).find("input.input-text").val()&&(t=!1)})}t&&o.trigger_update_checkout()},ship_to_different_address:function(){e("div.shipping_address").hide(),e(this).is(":checked")&&e("div.shipping_address").slideDown()},reset_update_checkout_timer:function(){clearTimeout(o.updateTimer)},is_valid_json:function(e){try{var t=JSON.parse(e);return t&&"object"==typeof t}catch(o){return!1}},validate_field:function(t){var o=e(this),r=o.closest(".form-row"),i=!0,c=r.is(".validate-required"),n=r.is(".validate-email"),a=r.is(".validate-phone"),d="",s=t.type;"input"===s&&(o.removeAttr("aria-invalid").removeAttr("aria-describedby"),r.find(".checkout-inline-error-message").remove(),r.removeClass("woocommerce-invalid woocommerce-invalid-required-field woocommerce-invalid-email woocommerce-invalid-phone woocommerce-validated")),"validate"!==s&&"change"!==s&&"focusout"!==s||(c&&("checkbox"===o.attr("type")&&!o.is(":checked")||""===o.val())&&(o.attr("aria-invalid","true"),r.removeClass("woocommerce-validated").addClass("woocommerce-invalid woocommerce-invalid-required-field"),i=!1),n&&o.val()&&((d=new RegExp(/^([a-z\d!#$%&'*+\-\/=?^_`{|}~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+(\.[a-z\d!#$%&'*+\-\/=?^_`{|}~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+)*|"((([ \t]*\r\n)?[ \t]+)?([\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|\\[\x01-\x09\x0b\x0c\x0d-\x7f\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))*(([ \t]*\r\n)?[ \t]+)?")@(([a-z\d\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|[a-z\d\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF][a-z\d\-._~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]*[a-z\d\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])\.)+([a-z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]|[a-z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF][a-z\d\-._~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]*[0-9a-z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])\.?$/i)).test(o.val())||(o.attr("aria-invalid","true"),r.removeClass("woocommerce-validated").addClass("woocommerce-invalid woocommerce-invalid-email"),i=!1)),a&&(d=new RegExp(/[\s\#0-9_\-\+\/\(\)\.]/g),0<o.val().replace(d,"").length&&(o.attr("aria-invalid","true"),r.removeClass("woocommerce-validated").addClass("woocommerce-invalid woocommerce-invalid-phone"),i=!1)),i&&(o.removeAttr("aria-invalid").removeAttr("aria-describedby"),r.find(".checkout-inline-error-message").remove(),r.removeClass("woocommerce-invalid woocommerce-invalid-required-field woocommerce-invalid-email woocommerce-invalid-phone").addClass("woocommerce-validated")))},update_checkout:function(e,t){o.reset_update_checkout_timer(),o.updateTimer=setTimeout(o.update_checkout_action,"5",t)},update_checkout_action:function(t){if(o.xhr&&o.xhr.abort(),0!==e("form.checkout").length){t=void 0!==t?t:{update_shipping_method:!0};var r=e("#billing_country").val(),i=e("#billing_state").val(),c=e(":input#billing_postcode").val(),n=e("#billing_city").val(),a=e(":input#billing_address_1").val(),d=e(":input#billing_address_2").val(),s=r,u=i,l=c,m=n,p=a,_=d,h=e(o.$checkout_form).find(".address-field.validate-required:visible"),f=!0;h.length&&h.each(function(){""===e(this).find(":input").val()&&(f=!1)}),e("#ship-to-different-address").find("input").is(":checked")&&(s=e("#shipping_country").val(),u=e("#shipping_state").val(),l=e(":input#shipping_postcode").val(),m=e("#shipping_city").val(),p=e(":input#shipping_address_1").val(),_=e(":input#shipping_address_2").val());var v={security:wc_checkout_params.update_order_review_nonce,payment_method:o.get_payment_method(),country:r,state:i,postcode:c,city:n,address:a,address_2:d,s_country:s,s_state:u,s_postcode:l,s_city:m,s_address:p,s_address_2:_,has_full_address:f,post_data:e("form.checkout").serialize()};if(!1!==t.update_shipping_method){var g={};e('select.shipping_method, input[name^="shipping_method"][type="radio"]:checked, input[name^="shipping_method"][type="hidden"]').each(function(){g[e(this).data("index")]=e(this).val()}),v.shipping_method=g}e(".woocommerce-checkout-payment, .woocommerce-checkout-review-order-table").block({message:null,overlayCSS:{background:"#fff",opacity:.6}}),o.xhr=e.ajax({type:"POST",url:wc_checkout_params.wc_ajax_url.toString().replace("%%endpoint%%","update_order_review"),data:v,success:function(r){if(r&&!0===r.reload)window.location.reload();else{e(".woocommerce-NoticeGroup-updateOrderReview").remove();var i=e("#terms").prop("checked"),c={};if(e(".payment_box :input").each(function(){var t=e(this).attr("id");t&&(-1!==e.inArray(e(this).attr("type"),["checkbox","radio"])?c[t]=e(this).prop("checked"):c[t]=e(this).val())}),r&&r.fragments&&(e.each(r.fragments,function(t,r){o.fragments&&o.fragments[t]===r||e(t).replaceWith(r),e(t).unblock()}),o.fragments=r.fragments),i&&e("#terms").prop("checked",!0),e.isEmptyObject(c)||e(".payment_box :input").each(function(){var t=e(this).attr("id");t&&(-1!==e.inArray(e(this).attr("type"),["checkbox","radio"])?e(this).prop("checked",c[t]).trigger("change"):-1!==e.inArray(e(this).attr("type"),["select"])?e(this).val(c[t]).trigger("change"):null!==e(this).val()&&0===e(this).val().length&&e(this).val(c[t]).trigger("change"))}),r&&"failure"===r.result){var n=e("form.checkout");e(".woocommerce-error, .woocommerce-message, .is-error, .is-success").remove(),r.messages?n.prepend('<div class="woocommerce-NoticeGroup woocommerce-NoticeGroup-updateOrderReview">'+r.messages+"</div>"):n.prepend(r),n.find(".input-text, select, input:checkbox").trigger("validate").trigger("blur"),o.scroll_to_notices()}o.init_payment_methods(),r&&"success"===r.result&&t.current_target&&-1!==t.current_target.id.indexOf("shipping_method")&&document.getElementById(t.current_target.id).focus(),e(document.body).trigger("updated_checkout",[r])}}})}},handleUnloadEvent:function(e){return-1===navigator.userAgent.indexOf("MSIE")&&!document.documentMode||(e.preventDefault(),undefined)},attachUnloadEventsOnSubmit:function(){e(window).on("beforeunload",this.handleUnloadEvent)},detachUnloadEventsOnSubmit:function(){e(window).off("beforeunload",this.handleUnloadEvent)},blockOnSubmit:function(e){1!==e.data("blockUI.isBlocked")&&e.block({message:null,overlayCSS:{background:"#fff",opacity:.6}})},submitOrder:function(){o.blockOnSubmit(e(this))},submit:function(){o.reset_update_checkout_timer();var t=e(this);return!t.is(".processing")&&(!1!==t.triggerHandler("checkout_place_order",[o])&&!1!==t.triggerHandler("checkout_place_order_"+o.get_payment_method(),[o])&&(t.addClass("processing"),o.blockOnSubmit(t),o.attachUnloadEventsOnSubmit(),e.ajaxSetup({dataFilter:function(e,t){if("json"!==t)return e;if(o.is_valid_json(e))return e;var r=e.match(/{"result.*}/);return null===r?console.log("Unable to fix malformed JSON #1"):o.is_valid_json(r[0])?(console.log("Fixed malformed JSON. Original:"),console.log(e),e=r[0]):console.log("Unable to fix malformed JSON #2"),e}}),e.ajax({type:"POST",url:wc_checkout_params.checkout_url,data:t.serialize(),dataType:"json",success:function(r){o.detachUnloadEventsOnSubmit(),e(".checkout-inline-error-message").remove();try{if("success"!==r.result||!1===t.triggerHandler("checkout_place_order_success",[r,o]))throw"failure"===r.result?"Result failure":"Invalid response";-1===r.redirect.indexOf("https://")||-1===r.redirect.indexOf("http://")?window.location=r.redirect:window.location=decodeURI(r.redirect)}catch(a){if(!0===r.reload)return void window.location.reload();if(!0===r.refresh&&e(document.body).trigger("update_checkout"),r.messages){var i=e(r.messages).removeAttr("role").attr("tabindex","-1"),c=o.wrapMessagesInsideLink(i),n=e('<div role="alert"></div>').append(c);o.submit_error(n.prop("outerHTML")),o.show_inline_errors(i)}else o.submit_error('<div class="woocommerce-error">'+wc_checkout_params.i18n_checkout_error+"</div>")}},error:function(e,t,r){o.detachUnloadEventsOnSubmit();var i=r;"object"==typeof wc_checkout_params&&null!==wc_checkout_params&&wc_checkout_params.hasOwnProperty("i18n_checkout_error")&&"string"==typeof wc_checkout_params.i18n_checkout_error&&""!==wc_checkout_params.i18n_checkout_error.trim()&&(i=wc_checkout_params.i18n_checkout_error),o.submit_error('<div class="woocommerce-error">'+i+"</div>")}})),!1)},submit_error:function(t){e(".woocommerce-NoticeGroup-checkout, .woocommerce-error, .woocommerce-message, .is-error, .is-success").remove(),o.$checkout_form.prepend('<div class="woocommerce-NoticeGroup woocommerce-NoticeGroup-checkout">'+t+"</div>"),o.$checkout_form.removeClass("processing").unblock(),o.$checkout_form.find(".input-text, select, input:checkbox").trigger("validate").trigger("blur"),o.scroll_to_notices(),o.$checkout_form.find('.woocommerce-error[tabindex="-1"], .wc-block-components-notice-banner.is-error[tabindex="-1"]').focus(),e(document.body).trigger("checkout_error",[t])},wrapMessagesInsideLink:function(t){return t.find("li[data-id]").each(function(){const t=e(this),o=t.attr("data-id");if(o){const r=e("<a>",{href:"#"+o,html:t.html()});t.empty().append(r)}}),t},show_inline_errors:function(t){t.find("li[data-id]").each(function(){const t=e(this),o=t.attr("data-id"),r=e("#"+o);if(1===r.length){const e=o+"_description",i=t.text().trim(),c=r.closest(".form-row"),n=document.createElement("p");n.id=e,n.className="checkout-inline-error-message",n.textContent=i,c&&n.textContent.length>0&&c.append(n),r.attr("aria-describedby",e),r.attr("aria-invalid","true")}})},scroll_to_notices:function(){var t=e(".woocommerce-NoticeGroup-updateOrderReview, .woocommerce-NoticeGroup-checkout");t.length||(t=e("form.checkout")),e.scroll_to_notices(t)}},r={init:function(){e(document.body).on("click","a.showcoupon",this.show_coupon_form),e(document.body).on("click",".woocommerce-remove-coupon",this.remove_coupon),e(document.body).on("keydown",".woocommerce-remove-coupon",this.on_keydown_remove_coupon),e(document.body).on("change input","#coupon_code",this.remove_coupon_error),e("form.checkout_coupon").hide().on("submit",this.submit.bind(this))},show_coupon_form:function(){var t=e(this);return e(".checkout_coupon").slideToggle(400,function(){var o=e(this);o.is(":visible")?(t.attr("aria-expanded","true"),o.find(":input:eq(0)").trigger("focus")):t.attr("aria-expanded","false")}),!1},show_coupon_error:function(t,o){if(0!==o.length){this.remove_coupon_error();var r=e(e.parseHTML(t)).text().trim();""!==r&&(o.find("#coupon_code").focus().addClass("has-error").attr("aria-invalid","true").attr("aria-describedby","coupon-error-notice"),e("<span>",{"class":"coupon-error-notice",id:"coupon-error-notice",role:"alert",text:r}).appendTo(o))}},remove_coupon_error:function(){var t=e("#coupon_code");0!==t.length&&t.removeClass("has-error").removeAttr("aria-invalid").removeAttr("aria-describedby").next(".coupon-error-notice").remove()},clear_coupon_input:function(){e("#coupon_code").val("").removeClass("has-error").removeAttr("aria-invalid").removeAttr("aria-describedby").next(".coupon-error-notice").remove()},submit:function(t){var r=e(t.currentTarget),i=r.find("#coupon_code"),c=this;if(c.remove_coupon_error(),r.is(".processing"))return!1;r.addClass("processing").block({message:null,overlayCSS:{background:"#fff",opacity:.6}});var n={security:wc_checkout_params.apply_coupon_nonce,coupon_code:r.find('input[name="coupon_code"]').val(),billing_email:o.$checkout_form.find('input[name="billing_email"]').val()};return e.ajax({type:"POST",url:wc_checkout_params.wc_ajax_url.toString().replace("%%endpoint%%","apply_coupon"),data:n,success:function(t){e(".woocommerce-error, .woocommerce-message, .is-error, .is-success, .checkout-inline-error-message").remove(),r.removeClass("processing").unblock(),t&&(-1===t.indexOf("woocommerce-error")&&-1===t.indexOf("is-error")?(r.slideUp(400,function(){e("a.showcoupon").attr("aria-expanded","false"),r.before(t)}),c.clear_coupon_input()):c.show_coupon_error(t,i.parent()),e(document.body).trigger("applied_coupon_in_checkout",[n.coupon_code]),e(document.body).trigger("update_checkout",{update_shipping_method:!1}))},dataType:"html"}),!1},remove_coupon:function(t){t.preventDefault();var o=e(this).parents(".woocommerce-checkout-review-order"),i=e(this).data("coupon");o.addClass("processing").block({message:null,overlayCSS:{background:"#fff",opacity:.6}});var c={security:wc_checkout_params.remove_coupon_nonce,coupon:i};e.ajax({type:"POST",url:wc_checkout_params.wc_ajax_url.toString().replace("%%endpoint%%","remove_coupon"),data:c,success:function(t){e(".woocommerce-error, .woocommerce-message, .is-error, .is-success").remove(),o.removeClass("processing").unblock(),t&&(e("form.woocommerce-checkout").before(t),e(document.body).trigger("removed_coupon_in_checkout",[c.coupon]),e(document.body).trigger("update_checkout",{update_shipping_method:!1}),r.clear_coupon_input(),e("form.checkout_coupon").slideUp(400,function(){e("a.showcoupon").attr("aria-expanded","false")}))},error:function(e){wc_checkout_params.debug_mode&&console.log(e.responseText)},dataType:"html"})},on_keydown_remove_coupon:function(t){" "===t.key&&(t.preventDefault(),e(this).trigger("click"))}},i={init:function(){e(document.body).on("click","a.showlogin",this.show_login_form)},show_login_form:function(){var t=e("form.login, form.woocommerce-form--login");return t.is(":visible")?t.slideToggle({duration:400}):t.slideToggle({duration:400,complete:function(){t.is(":visible")&&e("html, body").animate({scrollTop:t.offset().top-50},300)}}),!1}},c={init:function(){e(document.body).on("click","a.woocommerce-terms-and-conditions-link",this.toggle_terms)},toggle_terms:function(){if(e(".woocommerce-terms-and-conditions").length)return e(".woocommerce-terms-and-conditions").slideToggle(function(){var t=e(".woocommerce-terms-and-conditions-link");e(".woocommerce-terms-and-conditions").is(":visible")?(t.addClass("woocommerce-terms-and-conditions-link--open"),t.removeClass("woocommerce-terms-and-conditions-link--closed")):(t.removeClass("woocommerce-terms-and-conditions-link--open"),t.addClass("woocommerce-terms-and-conditions-link--closed"))}),!1}};o.init(),r.init(),i.init(),c.init()});
// source --> https://mfrash.com/wp-includes/js/dist/vendor/react.min.js?ver=18.3.1.1 
/**
 * @license React
 * react.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */
(function(){'use strict';(function(c,x){"object"===typeof exports&&"undefined"!==typeof module?x(exports):"function"===typeof define&&define.amd?define(["exports"],x):(c=c||self,x(c.React={}))})(this,function(c){function x(a){if(null===a||"object"!==typeof a)return null;a=V&&a[V]||a["@@iterator"];return"function"===typeof a?a:null}function w(a,b,e){this.props=a;this.context=b;this.refs=W;this.updater=e||X}function Y(){}function K(a,b,e){this.props=a;this.context=b;this.refs=W;this.updater=e||X}function Z(a,b,
e){var m,d={},c=null,h=null;if(null!=b)for(m in void 0!==b.ref&&(h=b.ref),void 0!==b.key&&(c=""+b.key),b)aa.call(b,m)&&!ba.hasOwnProperty(m)&&(d[m]=b[m]);var l=arguments.length-2;if(1===l)d.children=e;else if(1<l){for(var f=Array(l),k=0;k<l;k++)f[k]=arguments[k+2];d.children=f}if(a&&a.defaultProps)for(m in l=a.defaultProps,l)void 0===d[m]&&(d[m]=l[m]);return{$$typeof:y,type:a,key:c,ref:h,props:d,_owner:L.current}}function oa(a,b){return{$$typeof:y,type:a.type,key:b,ref:a.ref,props:a.props,_owner:a._owner}}
function M(a){return"object"===typeof a&&null!==a&&a.$$typeof===y}function pa(a){var b={"=":"=0",":":"=2"};return"$"+a.replace(/[=:]/g,function(a){return b[a]})}function N(a,b){return"object"===typeof a&&null!==a&&null!=a.key?pa(""+a.key):b.toString(36)}function B(a,b,e,m,d){var c=typeof a;if("undefined"===c||"boolean"===c)a=null;var h=!1;if(null===a)h=!0;else switch(c){case "string":case "number":h=!0;break;case "object":switch(a.$$typeof){case y:case qa:h=!0}}if(h)return h=a,d=d(h),a=""===m?"."+
N(h,0):m,ca(d)?(e="",null!=a&&(e=a.replace(da,"$&/")+"/"),B(d,b,e,"",function(a){return a})):null!=d&&(M(d)&&(d=oa(d,e+(!d.key||h&&h.key===d.key?"":(""+d.key).replace(da,"$&/")+"/")+a)),b.push(d)),1;h=0;m=""===m?".":m+":";if(ca(a))for(var l=0;l<a.length;l++){c=a[l];var f=m+N(c,l);h+=B(c,b,e,f,d)}else if(f=x(a),"function"===typeof f)for(a=f.call(a),l=0;!(c=a.next()).done;)c=c.value,f=m+N(c,l++),h+=B(c,b,e,f,d);else if("object"===c)throw b=String(a),Error("Objects are not valid as a React child (found: "+
("[object Object]"===b?"object with keys {"+Object.keys(a).join(", ")+"}":b)+"). If you meant to render a collection of children, use an array instead.");return h}function C(a,b,e){if(null==a)return a;var c=[],d=0;B(a,c,"","",function(a){return b.call(e,a,d++)});return c}function ra(a){if(-1===a._status){var b=a._result;b=b();b.then(function(b){if(0===a._status||-1===a._status)a._status=1,a._result=b},function(b){if(0===a._status||-1===a._status)a._status=2,a._result=b});-1===a._status&&(a._status=
0,a._result=b)}if(1===a._status)return a._result.default;throw a._result;}function O(a,b){var e=a.length;a.push(b);a:for(;0<e;){var c=e-1>>>1,d=a[c];if(0<D(d,b))a[c]=b,a[e]=d,e=c;else break a}}function p(a){return 0===a.length?null:a[0]}function E(a){if(0===a.length)return null;var b=a[0],e=a.pop();if(e!==b){a[0]=e;a:for(var c=0,d=a.length,k=d>>>1;c<k;){var h=2*(c+1)-1,l=a[h],f=h+1,g=a[f];if(0>D(l,e))f<d&&0>D(g,l)?(a[c]=g,a[f]=e,c=f):(a[c]=l,a[h]=e,c=h);else if(f<d&&0>D(g,e))a[c]=g,a[f]=e,c=f;else break a}}return b}
function D(a,b){var c=a.sortIndex-b.sortIndex;return 0!==c?c:a.id-b.id}function P(a){for(var b=p(r);null!==b;){if(null===b.callback)E(r);else if(b.startTime<=a)E(r),b.sortIndex=b.expirationTime,O(q,b);else break;b=p(r)}}function Q(a){z=!1;P(a);if(!u)if(null!==p(q))u=!0,R(S);else{var b=p(r);null!==b&&T(Q,b.startTime-a)}}function S(a,b){u=!1;z&&(z=!1,ea(A),A=-1);F=!0;var c=k;try{P(b);for(n=p(q);null!==n&&(!(n.expirationTime>b)||a&&!fa());){var m=n.callback;if("function"===typeof m){n.callback=null;
k=n.priorityLevel;var d=m(n.expirationTime<=b);b=v();"function"===typeof d?n.callback=d:n===p(q)&&E(q);P(b)}else E(q);n=p(q)}if(null!==n)var g=!0;else{var h=p(r);null!==h&&T(Q,h.startTime-b);g=!1}return g}finally{n=null,k=c,F=!1}}function fa(){return v()-ha<ia?!1:!0}function R(a){G=a;H||(H=!0,I())}function T(a,b){A=ja(function(){a(v())},b)}function ka(a){throw Error("act(...) is not supported in production builds of React.");}var y=Symbol.for("react.element"),qa=Symbol.for("react.portal"),sa=Symbol.for("react.fragment"),
ta=Symbol.for("react.strict_mode"),ua=Symbol.for("react.profiler"),va=Symbol.for("react.provider"),wa=Symbol.for("react.context"),xa=Symbol.for("react.forward_ref"),ya=Symbol.for("react.suspense"),za=Symbol.for("react.memo"),Aa=Symbol.for("react.lazy"),V=Symbol.iterator,X={isMounted:function(a){return!1},enqueueForceUpdate:function(a,b,c){},enqueueReplaceState:function(a,b,c,m){},enqueueSetState:function(a,b,c,m){}},la=Object.assign,W={};w.prototype.isReactComponent={};w.prototype.setState=function(a,
b){if("object"!==typeof a&&"function"!==typeof a&&null!=a)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,a,b,"setState")};w.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,"forceUpdate")};Y.prototype=w.prototype;var t=K.prototype=new Y;t.constructor=K;la(t,w.prototype);t.isPureReactComponent=!0;var ca=Array.isArray,aa=Object.prototype.hasOwnProperty,L={current:null},
ba={key:!0,ref:!0,__self:!0,__source:!0},da=/\/+/g,g={current:null},J={transition:null};if("object"===typeof performance&&"function"===typeof performance.now){var Ba=performance;var v=function(){return Ba.now()}}else{var ma=Date,Ca=ma.now();v=function(){return ma.now()-Ca}}var q=[],r=[],Da=1,n=null,k=3,F=!1,u=!1,z=!1,ja="function"===typeof setTimeout?setTimeout:null,ea="function"===typeof clearTimeout?clearTimeout:null,na="undefined"!==typeof setImmediate?setImmediate:null;"undefined"!==typeof navigator&&
void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var H=!1,G=null,A=-1,ia=5,ha=-1,U=function(){if(null!==G){var a=v();ha=a;var b=!0;try{b=G(!0,a)}finally{b?I():(H=!1,G=null)}}else H=!1};if("function"===typeof na)var I=function(){na(U)};else if("undefined"!==typeof MessageChannel){t=new MessageChannel;var Ea=t.port2;t.port1.onmessage=U;I=function(){Ea.postMessage(null)}}else I=function(){ja(U,0)};t={ReactCurrentDispatcher:g,
ReactCurrentOwner:L,ReactCurrentBatchConfig:J,Scheduler:{__proto__:null,unstable_ImmediatePriority:1,unstable_UserBlockingPriority:2,unstable_NormalPriority:3,unstable_IdlePriority:5,unstable_LowPriority:4,unstable_runWithPriority:function(a,b){switch(a){case 1:case 2:case 3:case 4:case 5:break;default:a=3}var c=k;k=a;try{return b()}finally{k=c}},unstable_next:function(a){switch(k){case 1:case 2:case 3:var b=3;break;default:b=k}var c=k;k=b;try{return a()}finally{k=c}},unstable_scheduleCallback:function(a,
b,c){var e=v();"object"===typeof c&&null!==c?(c=c.delay,c="number"===typeof c&&0<c?e+c:e):c=e;switch(a){case 1:var d=-1;break;case 2:d=250;break;case 5:d=1073741823;break;case 4:d=1E4;break;default:d=5E3}d=c+d;a={id:Da++,callback:b,priorityLevel:a,startTime:c,expirationTime:d,sortIndex:-1};c>e?(a.sortIndex=c,O(r,a),null===p(q)&&a===p(r)&&(z?(ea(A),A=-1):z=!0,T(Q,c-e))):(a.sortIndex=d,O(q,a),u||F||(u=!0,R(S)));return a},unstable_cancelCallback:function(a){a.callback=null},unstable_wrapCallback:function(a){var b=
k;return function(){var c=k;k=b;try{return a.apply(this,arguments)}finally{k=c}}},unstable_getCurrentPriorityLevel:function(){return k},unstable_shouldYield:fa,unstable_requestPaint:function(){},unstable_continueExecution:function(){u||F||(u=!0,R(S))},unstable_pauseExecution:function(){},unstable_getFirstCallbackNode:function(){return p(q)},get unstable_now(){return v},unstable_forceFrameRate:function(a){0>a||125<a?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):
ia=0<a?Math.floor(1E3/a):5},unstable_Profiling:null}};c.Children={map:C,forEach:function(a,b,c){C(a,function(){b.apply(this,arguments)},c)},count:function(a){var b=0;C(a,function(){b++});return b},toArray:function(a){return C(a,function(a){return a})||[]},only:function(a){if(!M(a))throw Error("React.Children.only expected to receive a single React element child.");return a}};c.Component=w;c.Fragment=sa;c.Profiler=ua;c.PureComponent=K;c.StrictMode=ta;c.Suspense=ya;c.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=
t;c.act=ka;c.cloneElement=function(a,b,c){if(null===a||void 0===a)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+a+".");var e=la({},a.props),d=a.key,k=a.ref,h=a._owner;if(null!=b){void 0!==b.ref&&(k=b.ref,h=L.current);void 0!==b.key&&(d=""+b.key);if(a.type&&a.type.defaultProps)var l=a.type.defaultProps;for(f in b)aa.call(b,f)&&!ba.hasOwnProperty(f)&&(e[f]=void 0===b[f]&&void 0!==l?l[f]:b[f])}var f=arguments.length-2;if(1===f)e.children=c;else if(1<f){l=
Array(f);for(var g=0;g<f;g++)l[g]=arguments[g+2];e.children=l}return{$$typeof:y,type:a.type,key:d,ref:k,props:e,_owner:h}};c.createContext=function(a){a={$$typeof:wa,_currentValue:a,_currentValue2:a,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null};a.Provider={$$typeof:va,_context:a};return a.Consumer=a};c.createElement=Z;c.createFactory=function(a){var b=Z.bind(null,a);b.type=a;return b};c.createRef=function(){return{current:null}};c.forwardRef=function(a){return{$$typeof:xa,
render:a}};c.isValidElement=M;c.lazy=function(a){return{$$typeof:Aa,_payload:{_status:-1,_result:a},_init:ra}};c.memo=function(a,b){return{$$typeof:za,type:a,compare:void 0===b?null:b}};c.startTransition=function(a,b){b=J.transition;J.transition={};try{a()}finally{J.transition=b}};c.unstable_act=ka;c.useCallback=function(a,b){return g.current.useCallback(a,b)};c.useContext=function(a){return g.current.useContext(a)};c.useDebugValue=function(a,b){};c.useDeferredValue=function(a){return g.current.useDeferredValue(a)};
c.useEffect=function(a,b){return g.current.useEffect(a,b)};c.useId=function(){return g.current.useId()};c.useImperativeHandle=function(a,b,c){return g.current.useImperativeHandle(a,b,c)};c.useInsertionEffect=function(a,b){return g.current.useInsertionEffect(a,b)};c.useLayoutEffect=function(a,b){return g.current.useLayoutEffect(a,b)};c.useMemo=function(a,b){return g.current.useMemo(a,b)};c.useReducer=function(a,b,c){return g.current.useReducer(a,b,c)};c.useRef=function(a){return g.current.useRef(a)};
c.useState=function(a){return g.current.useState(a)};c.useSyncExternalStore=function(a,b,c){return g.current.useSyncExternalStore(a,b,c)};c.useTransition=function(){return g.current.useTransition()};c.version="18.3.1"});
})();
// source --> https://mfrash.com/wp-includes/js/dist/vendor/react-jsx-runtime.min.js?ver=18.3.1 
"use strict";var ReactJSXRuntime=(()=>{var l=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var u=l((R,p)=>{p.exports=globalThis.React});var c=l(s=>{"use strict";var d=u(),m=Symbol.for("react.element"),O=Symbol.for("react.fragment"),v=Object.prototype.hasOwnProperty,E=d.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function _(t,e,f){var r,o={},n=null,i=null;f!==void 0&&(n=""+f),e.key!==void 0&&(n=""+e.key),e.ref!==void 0&&(i=e.ref);for(r in e)v.call(e,r)&&!a.hasOwnProperty(r)&&(o[r]=e[r]);if(t&&t.defaultProps)for(r in e=t.defaultProps,e)o[r]===void 0&&(o[r]=e[r]);return{$$typeof:m,type:t,key:n,ref:i,props:o,_owner:E.current}}s.Fragment=O;s.jsx=_;s.jsxs=_});var j=l((k,y)=>{y.exports=c()});return j();})();
/*! Bundled license information:

react/cjs/react-jsx-runtime.production.min.js:
  (**
   * @license React
   * react-jsx-runtime.production.min.js
   *
   * Copyright (c) Facebook, Inc. and its affiliates.
   *
   * This source code is licensed under the MIT license found in the
   * LICENSE file in the root directory of this source tree.
   *)
*/;
// source --> https://mfrash.com/wp-includes/js/dist/deprecated.min.js?ver=990e85f234fee8f7d446 
"use strict";var wp;(wp||={}).deprecated=(()=>{var k=Object.create;var a=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var x=Object.getOwnPropertyNames;var j=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty;var I=(e,s)=>()=>(s||e((s={exports:{}}).exports,s),s.exports),N=(e,s)=>{for(var n in s)a(e,n,{get:s[n],enumerable:!0})},$=(e,s,n,t)=>{if(s&&typeof s=="object"||typeof s=="function")for(let o of x(s))!A.call(e,o)&&o!==n&&a(e,o,{get:()=>s[o],enumerable:!(t=b(s,o))||t.enumerable});return e};var O=(e,s,n)=>(n=e!=null?k(j(e)):{},$(s||!e||!e.__esModule?a(n,"default",{value:e,enumerable:!0}):n,e)),P=e=>$(a({},"__esModule",{value:!0}),e);var p=I((z,g)=>{g.exports=window.wp.hooks});var q={};N(q,{default:()=>S,logged:()=>c});var u=O(p(),1),c=Object.create(null);function S(e,s={}){let{since:n,version:t,alternative:o,plugin:r,link:d,hint:l}=s,v=r?` from ${r}`:"",M=n?` since version ${n}`:"",m=t?` and will be removed${v} in version ${t}`:"",w=o?` Please use ${o} instead.`:"",f=d?` See: ${d}`:"",h=l?` Note: ${l}`:"",i=`${e} is deprecated${M}${m}.${w}${f}${h}`;i in c||((0,u.doAction)("deprecated",e,s,i),console.warn(i),c[i]=!0)}return P(q);})();
if (typeof wp.deprecated === 'object' && wp.deprecated.default) { wp.deprecated = wp.deprecated.default; };
// source --> https://mfrash.com/wp-includes/js/dist/dom.min.js?ver=66a6cf58e0c4cd128af0 
"use strict";var wp;(wp||={}).dom=(()=>{var Dt=Object.create;var v=Object.defineProperty;var At=Object.getOwnPropertyDescriptor;var vt=Object.getOwnPropertyNames;var Ot=Object.getPrototypeOf,Lt=Object.prototype.hasOwnProperty;var Ht=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),B=(t,e)=>{for(var r in e)v(t,r,{get:e[r],enumerable:!0})},Z=(t,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of vt(e))!Lt.call(t,n)&&n!==r&&v(t,n,{get:()=>e[n],enumerable:!(o=At(e,n))||o.enumerable});return t};var Ft=(t,e,r)=>(r=t!=null?Dt(Ot(t)):{},Z(e||!t||!t.__esModule?v(r,"default",{value:t,enumerable:!0}):r,t)),Pt=t=>Z(v({},"__esModule",{value:!0}),t);var ut=Ht((Ye,lt)=>{lt.exports=window.wp.deprecated});var Qt={};B(Qt,{__unstableStripHTML:()=>Nt,computeCaretRect:()=>K,documentHasSelection:()=>et,documentHasTextSelection:()=>E,documentHasUncollapsedSelection:()=>tt,focus:()=>Kt,getFilesFromDataTransfer:()=>Jt,getOffsetParent:()=>rt,getPhrasingContentSchema:()=>Et,getRectangleFromRange:()=>h,getScrollContainer:()=>W,insertAfter:()=>y,isEmpty:()=>R,isEntirelySelected:()=>nt,isFormElement:()=>it,isHorizontalEdge:()=>ft,isNumberInput:()=>dt,isPhrasingContent:()=>A,isRTL:()=>T,isSelectionForward:()=>O,isTextContent:()=>Zt,isTextField:()=>C,isVerticalEdge:()=>mt,placeCaretAtHorizontalEdge:()=>pt,placeCaretAtVerticalEdge:()=>gt,remove:()=>g,removeInvalidHTML:()=>Tt,replace:()=>ht,replaceTag:()=>bt,safeHTML:()=>M,unwrap:()=>w,wrap:()=>xt});var z={};B(z,{find:()=>S});function Mt(t){return[t?'[tabindex]:not([tabindex^="-"])':"[tabindex]","a[href]","button:not([disabled])",'input:not([type="hidden"]):not([disabled])',"select:not([disabled])","textarea:not([disabled])",'iframe:not([tabindex^="-"])',"object","embed","summary","area[href]","[contenteditable]:not([contenteditable=false])"].join(",")}function $(t){return t.offsetWidth>0||t.offsetHeight>0||t.getClientRects().length>0}function Vt(t){let e=t.closest("map[name]");if(!e)return!1;let r=t.ownerDocument.querySelector('img[usemap="#'+e.name+'"]');return!!r&&$(r)}function S(t,{sequential:e=!1}={}){let r=t.querySelectorAll(Mt(e));return Array.from(r).filter(o=>{if(!$(o)||o.closest("[inert]"))return!1;let{nodeName:n}=o;return n==="AREA"?Vt(o):!0})}var k={};B(k,{find:()=>jt,findNext:()=>Wt,findPrevious:()=>kt,isTabbableIndex:()=>J});function U(t){let e=t.getAttribute("tabindex");return e===null?0:parseInt(e,10)}function J(t){return U(t)!==-1}function _t(){let t={};return function(r,o){let{nodeName:n,type:i,checked:a,name:s}=o;if(n!=="INPUT"||i!=="radio"||!s)return r.concat(o);let f=t.hasOwnProperty(s);if(!(a||!f))return r;if(f){let d=t[s];r=r.filter(l=>l!==d)}return t[s]=o,r.concat(o)}}function Bt(t,e){return{element:t,index:e}}function zt(t){return t.element}function Ut(t,e){let r=U(t.element),o=U(e.element);return r===o?t.index-e.index:r-o}function j(t){return t.filter(J).map(Bt).sort(Ut).map(zt).reduce(_t(),[])}function jt(t){return j(S(t))}function kt(t){return j(S(t.ownerDocument.body)).reverse().find(e=>t.compareDocumentPosition(e)&t.DOCUMENT_POSITION_PRECEDING)}function Wt(t){return j(S(t.ownerDocument.body)).find(e=>t.compareDocumentPosition(e)&t.DOCUMENT_POSITION_FOLLOWING)}function h(t){if(!t.collapsed){let i=Array.from(t.getClientRects());if(i.length===1)return i[0];let a=i.filter(({width:l})=>l>1);if(a.length===0)return t.getBoundingClientRect();if(a.length===1)return a[0];let{top:s,bottom:f,left:u,right:d}=a[0];for(let{top:l,bottom:c,left:m,right:N}of a)l<s&&(s=l),c>f&&(f=c),m<u&&(u=m),N>d&&(d=N);return new window.DOMRect(u,s,d-u,f-s)}let{startContainer:e}=t,{ownerDocument:r}=e;if(e.nodeName==="BR"){let{parentNode:i}=e;let a=Array.from(i.childNodes).indexOf(e);t=r.createRange(),t.setStart(i,a),t.setEnd(i,a)}let o=t.getClientRects();if(o.length>1)return null;let n=o[0];if(!n||n.height===0){let i=r.createTextNode("\u200B");t=t.cloneRange(),t.insertNode(i),n=t.getClientRects()[0],i.parentNode,i.parentNode.removeChild(i)}return n}function K(t){let e=t.getSelection();let r=e.rangeCount?e.getRangeAt(0):null;return r?h(r):null}function E(t){t.defaultView;let e=t.defaultView.getSelection();let r=e.rangeCount?e.getRangeAt(0):null;return!!r&&!r.collapsed}function b(t){return t?.nodeName==="INPUT"}function C(t){let e=["button","checkbox","hidden","file","radio","image","range","reset","submit","number","email","time"];return b(t)&&t.type&&!e.includes(t.type)||t.nodeName==="TEXTAREA"||t.contentEditable==="true"}function Q(t){if(!b(t)&&!C(t))return!1;try{let{selectionStart:e,selectionEnd:r}=t;return e===null||e!==r}catch{return!0}}function tt(t){return E(t)||!!t.activeElement&&Q(t.activeElement)}function et(t){return!!t.activeElement&&(b(t.activeElement)||C(t.activeElement)||E(t))}function p(t){return t.ownerDocument.defaultView,t.ownerDocument.defaultView.getComputedStyle(t)}function W(t,e="vertical"){if(t){if((e==="vertical"||e==="all")&&t.scrollHeight>t.clientHeight){let{overflowY:r}=p(t);if(/(auto|scroll)/.test(r))return t}if((e==="horizontal"||e==="all")&&t.scrollWidth>t.clientWidth){let{overflowX:r}=p(t);if(/(auto|scroll)/.test(r))return t}return t.ownerDocument===t.parentNode?t:W(t.parentNode,e)}}function rt(t){let e;for(;(e=t.parentNode)&&e.nodeType!==e.ELEMENT_NODE;);return e?p(e).position!=="static"?e:e.offsetParent:null}function x(t){return t.tagName==="INPUT"||t.tagName==="TEXTAREA"}var qt="\uFEFF";function nt(t){if(x(t))return t.selectionStart===0&&t.value.length===t.selectionEnd;if(!t.isContentEditable)return!0;let e=t.textContent||"";if(e===""||e===qt)return!0;let{ownerDocument:r}=t,{defaultView:o}=r;let n=o.getSelection();let i=n.rangeCount?n.getRangeAt(0):null;if(!i)return!0;let{startContainer:a,endContainer:s,startOffset:f,endOffset:u}=i;if(a===t&&s===t&&f===0&&u===t.childNodes.length)return!0;let d=t.lastChild;let l=s.nodeType===s.TEXT_NODE?s.data.length:s.childNodes.length;return ot(a,t,"firstChild")&&ot(s,t,"lastChild")&&f===0&&u===l}function ot(t,e,r){let o=e;do{if(t===o)return!0;for(o=o[r];o&&o.nodeType===o.TEXT_NODE&&o.nodeValue==="";)o=o[r==="lastChild"?"previousSibling":"nextSibling"]}while(o);return!1}function it(t){if(!t)return!1;let{tagName:e}=t;return x(t)||e==="BUTTON"||e==="SELECT"}function T(t){return p(t).direction==="rtl"}function at(t){let e=Array.from(t.getClientRects());if(!e.length)return;let r=Math.min(...e.map(({top:n})=>n));return Math.max(...e.map(({bottom:n})=>n))-r}function O(t){let{anchorNode:e,focusNode:r,anchorOffset:o,focusOffset:n}=t;let i=e.compareDocumentPosition(r);return i&e.DOCUMENT_POSITION_PRECEDING?!1:i&e.DOCUMENT_POSITION_FOLLOWING?!0:i===0?o<=n:!0}function st(t,e,r){if(t.caretRangeFromPoint)return t.caretRangeFromPoint(e,r);if(!t.caretPositionFromPoint)return null;let o=t.caretPositionFromPoint(e,r);if(!o)return null;let n=t.createRange();return n.setStart(o.offsetNode,o.offset),n.collapse(!0),n}function L(t,e,r,o){let n=o.style.zIndex,i=o.style.position,a=o.style.borderRadius,{position:s="static"}=p(o);s==="static"&&(o.style.position="relative"),o.style.zIndex="10000",o.style.borderRadius="0";let f=st(t,e,r);return o.style.zIndex=n,o.style.position=i,o.style.borderRadius=a,f}function H(t,e,r){let o=r();return(!o||!o.startContainer||!t.contains(o.startContainer))&&(t.scrollIntoView(e),o=r(),!o||!o.startContainer||!t.contains(o.startContainer))?null:o}function F(t,e,r=!1){if(x(t)&&typeof t.selectionStart=="number")return t.selectionStart!==t.selectionEnd?!1:e?t.selectionStart===0:t.value.length===t.selectionStart;if(!t.isContentEditable)return!0;let{ownerDocument:o}=t,{defaultView:n}=o;let i=n.getSelection();if(!i||!i.rangeCount)return!1;let a=i.getRangeAt(0),s=a.cloneRange(),f=O(i),u=i.isCollapsed;u||s.collapse(!f);let d=h(s),l=h(a);if(!d||!l)return!1;let c=at(a);if(!u&&c&&c>d.height&&f===e)return!1;let m=T(t)?!e:e,N=t.getBoundingClientRect(),yt=m?N.left+1:N.right-1,wt=e?N.top+1:N.bottom-1,q=H(t,e,()=>L(o,yt,wt,t));if(!q)return!1;let _=h(q);if(!_)return!1;let G=e?"top":"bottom",X=m?"left":"right",It=_[G]-l[G],St=_[X]-d[X],Y=Math.abs(It)<=1,Rt=Math.abs(St)<=1;return r?Y:Y&&Rt}function ft(t,e){return F(t,e)}var ct=Ft(ut(),1);function dt(t){return(0,ct.default)("wp.dom.isNumberInput",{since:"6.1",version:"6.5"}),b(t)&&t.type==="number"&&!isNaN(t.valueAsNumber)}function mt(t,e){return F(t,e,!0)}function Gt(t,e,r){let{ownerDocument:o}=t,n=T(t)?!e:e,i=t.getBoundingClientRect();r===void 0?r=e?i.right-1:i.left+1:r<=i.left?r=i.left+1:r>=i.right&&(r=i.right-1);let a=n?i.bottom-1:i.top+1;return L(o,r,a,t)}function P(t,e,r){if(!t)return;if(t.focus(),x(t)){if(typeof t.selectionStart!="number")return;e?(t.selectionStart=t.value.length,t.selectionEnd=t.value.length):(t.selectionStart=0,t.selectionEnd=0);return}if(!t.isContentEditable)return;let o=H(t,e,()=>Gt(t,e,r));if(!o)return;let{ownerDocument:n}=t,{defaultView:i}=n;let a=i.getSelection();a.removeAllRanges(),a.addRange(o)}function pt(t,e){return P(t,e,void 0)}function gt(t,e,r){return P(t,e,r?.left)}function y(t,e){e.parentNode,e.parentNode.insertBefore(t,e.nextSibling)}function g(t){t.parentNode,t.parentNode.removeChild(t)}function ht(t,e){t.parentNode,y(e,t.parentNode),g(t)}function w(t){let e=t.parentNode;for(;t.firstChild;)e.insertBefore(t.firstChild,t);e.removeChild(t)}function bt(t,e){let r=t.ownerDocument.createElement(e);for(;t.firstChild;)r.appendChild(t.firstChild);return t.parentNode,t.parentNode.replaceChild(r,t),r}function xt(t,e){e.parentNode,e.parentNode.insertBefore(t,e),t.appendChild(e)}function M(t){let{body:e}=document.implementation.createHTMLDocument("");e.innerHTML=t;let r=e.getElementsByTagName("*"),o=r.length;for(;o--;){let n=r[o];if(n.tagName==="SCRIPT")g(n);else{let i=n.attributes.length;for(;i--;){let{name:a}=n.attributes[i];a.startsWith("on")&&n.removeAttribute(a)}}}return e.innerHTML}function Nt(t){t=M(t);let e=document.implementation.createHTMLDocument("");return e.body.innerHTML=t,e.body.textContent||""}function R(t){switch(t.nodeType){case t.TEXT_NODE:return/^[ \f\n\r\t\v\u00a0]*$/.test(t.nodeValue||"");case t.ELEMENT_NODE:return t.hasAttributes()?!1:t.hasChildNodes()?Array.from(t.childNodes).every(R):!0;default:return!0}}var D={strong:{},em:{},s:{},del:{},ins:{},a:{attributes:["href","target","rel","id"]},code:{},abbr:{attributes:["title"]},sub:{},sup:{},br:{},small:{},q:{attributes:["cite"]},dfn:{attributes:["title"]},data:{attributes:["value"]},time:{attributes:["datetime"]},var:{},samp:{},kbd:{},i:{},b:{},u:{},mark:{},ruby:{},rt:{},rp:{},bdi:{attributes:["dir"]},bdo:{attributes:["dir"]},wbr:{},"#text":{}},Xt=["#text","br"];Object.keys(D).filter(t=>!Xt.includes(t)).forEach(t=>{let{[t]:e,...r}=D;D[t].children=r});var Yt={audio:{attributes:["src","preload","autoplay","mediagroup","loop","muted"]},canvas:{attributes:["width","height"]},embed:{attributes:["src","type","width","height"]},img:{attributes:["alt","src","srcset","usemap","ismap","width","height"]},object:{attributes:["data","type","name","usemap","form","width","height"]},video:{attributes:["src","poster","preload","playsinline","autoplay","mediagroup","loop","muted","controls","width","height"]},math:{attributes:["display","xmlns"],children:"*"}},V={...D,...Yt};function Et(t){if(t!=="paste")return V;let{u:e,abbr:r,data:o,time:n,wbr:i,bdi:a,bdo:s,...f}={...V,ins:{children:V.ins.children},del:{children:V.del.children}};return f}function A(t){let e=t.nodeName.toLowerCase();return Et().hasOwnProperty(e)||e==="span"}function Zt(t){let e=t.nodeName.toLowerCase();return D.hasOwnProperty(e)||e==="span"}function Ct(t){return!!t&&t.nodeType===t.ELEMENT_NODE}var $t=()=>{};function I(t,e,r,o){Array.from(t).forEach(n=>{let i=n.nodeName.toLowerCase();if(r.hasOwnProperty(i)&&(!r[i].isMatch||r[i].isMatch?.(n))){if(Ct(n)){let{attributes:a=[],classes:s=[],children:f,require:u=[],allowEmpty:d}=r[i];if(f&&!d&&R(n)){g(n);return}if(n.hasAttributes()&&(Array.from(n.attributes).forEach(({name:l})=>{l!=="class"&&!a.includes(l)&&n.removeAttribute(l)}),n.classList&&n.classList.length)){let l=s.map(c=>c==="*"?()=>!0:typeof c=="string"?m=>m===c:c instanceof RegExp?m=>c.test(m):$t);Array.from(n.classList).forEach(c=>{l.some(m=>m(c))||n.classList.remove(c)}),n.classList.length||n.removeAttribute("class")}if(n.hasChildNodes()){if(f==="*")return;if(f)u.length&&!n.querySelector(u.join(","))?(I(n.childNodes,e,r,o),w(n)):n.parentNode&&n.parentNode.nodeName==="BODY"&&A(n)?(I(n.childNodes,e,r,o),Array.from(n.childNodes).some(l=>!A(l))&&w(n)):I(n.childNodes,e,f,o);else for(;n.firstChild;)g(n.firstChild)}}}else I(n.childNodes,e,r,o),o&&!A(n)&&n.nextElementSibling&&y(e.createElement("br"),n),w(n)})}function Tt(t,e,r){let o=document.implementation.createHTMLDocument("");return o.body.innerHTML=t,I(o.body.childNodes,o,e,r),o.body.innerHTML}function Jt(t){let e=Array.from(t.files);return Array.from(t.items).forEach(r=>{let o=r.getAsFile();o&&!e.find(({name:n,type:i,size:a})=>n===o.name&&i===o.type&&a===o.size)&&e.push(o)}),e}var Kt={focusable:z,tabbable:k};return Pt(Qt);})();
// source --> https://mfrash.com/wp-includes/js/dist/vendor/react-dom.min.js?ver=18.3.1.1 
/**
 * @license React
 * react-dom.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */
(function(){/*
 Modernizr 3.0.0pre (Custom Build) | MIT
*/
'use strict';(function(Q,zb){"object"===typeof exports&&"undefined"!==typeof module?zb(exports,require("react")):"function"===typeof define&&define.amd?define(["exports","react"],zb):(Q=Q||self,zb(Q.ReactDOM={},Q.React))})(this,function(Q,zb){function m(a){for(var b="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;c<arguments.length;c++)b+="&args[]="+encodeURIComponent(arguments[c]);return"Minified React error #"+a+"; visit "+b+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}
function mb(a,b){Ab(a,b);Ab(a+"Capture",b)}function Ab(a,b){$b[a]=b;for(a=0;a<b.length;a++)cg.add(b[a])}function bj(a){if(Zd.call(dg,a))return!0;if(Zd.call(eg,a))return!1;if(cj.test(a))return dg[a]=!0;eg[a]=!0;return!1}function dj(a,b,c,d){if(null!==c&&0===c.type)return!1;switch(typeof b){case "function":case "symbol":return!0;case "boolean":if(d)return!1;if(null!==c)return!c.acceptsBooleans;a=a.toLowerCase().slice(0,5);return"data-"!==a&&"aria-"!==a;default:return!1}}function ej(a,b,c,d){if(null===
b||"undefined"===typeof b||dj(a,b,c,d))return!0;if(d)return!1;if(null!==c)switch(c.type){case 3:return!b;case 4:return!1===b;case 5:return isNaN(b);case 6:return isNaN(b)||1>b}return!1}function Y(a,b,c,d,e,f,g){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=f;this.removeEmptyString=g}function $d(a,b,c,d){var e=R.hasOwnProperty(b)?R[b]:null;if(null!==e?0!==e.type:d||!(2<b.length)||"o"!==
b[0]&&"O"!==b[0]||"n"!==b[1]&&"N"!==b[1])ej(b,c,e,d)&&(c=null),d||null===e?bj(b)&&(null===c?a.removeAttribute(b):a.setAttribute(b,""+c)):e.mustUseProperty?a[e.propertyName]=null===c?3===e.type?!1:"":c:(b=e.attributeName,d=e.attributeNamespace,null===c?a.removeAttribute(b):(e=e.type,c=3===e||4===e&&!0===c?"":""+c,d?a.setAttributeNS(d,b,c):a.setAttribute(b,c)))}function ac(a){if(null===a||"object"!==typeof a)return null;a=fg&&a[fg]||a["@@iterator"];return"function"===typeof a?a:null}function bc(a,b,
c){if(void 0===ae)try{throw Error();}catch(d){ae=(b=d.stack.trim().match(/\n( *(at )?)/))&&b[1]||""}return"\n"+ae+a}function be(a,b){if(!a||ce)return"";ce=!0;var c=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(b)if(b=function(){throw Error();},Object.defineProperty(b.prototype,"props",{set:function(){throw Error();}}),"object"===typeof Reflect&&Reflect.construct){try{Reflect.construct(b,[])}catch(n){var d=n}Reflect.construct(a,[],b)}else{try{b.call()}catch(n){d=n}a.call(b.prototype)}else{try{throw Error();
}catch(n){d=n}a()}}catch(n){if(n&&d&&"string"===typeof n.stack){for(var e=n.stack.split("\n"),f=d.stack.split("\n"),g=e.length-1,h=f.length-1;1<=g&&0<=h&&e[g]!==f[h];)h--;for(;1<=g&&0<=h;g--,h--)if(e[g]!==f[h]){if(1!==g||1!==h){do if(g--,h--,0>h||e[g]!==f[h]){var k="\n"+e[g].replace(" at new "," at ");a.displayName&&k.includes("<anonymous>")&&(k=k.replace("<anonymous>",a.displayName));return k}while(1<=g&&0<=h)}break}}}finally{ce=!1,Error.prepareStackTrace=c}return(a=a?a.displayName||a.name:"")?bc(a):
""}function fj(a){switch(a.tag){case 5:return bc(a.type);case 16:return bc("Lazy");case 13:return bc("Suspense");case 19:return bc("SuspenseList");case 0:case 2:case 15:return a=be(a.type,!1),a;case 11:return a=be(a.type.render,!1),a;case 1:return a=be(a.type,!0),a;default:return""}}function de(a){if(null==a)return null;if("function"===typeof a)return a.displayName||a.name||null;if("string"===typeof a)return a;switch(a){case Bb:return"Fragment";case Cb:return"Portal";case ee:return"Profiler";case fe:return"StrictMode";
case ge:return"Suspense";case he:return"SuspenseList"}if("object"===typeof a)switch(a.$$typeof){case gg:return(a.displayName||"Context")+".Consumer";case hg:return(a._context.displayName||"Context")+".Provider";case ie:var b=a.render;a=a.displayName;a||(a=b.displayName||b.name||"",a=""!==a?"ForwardRef("+a+")":"ForwardRef");return a;case je:return b=a.displayName||null,null!==b?b:de(a.type)||"Memo";case Ta:b=a._payload;a=a._init;try{return de(a(b))}catch(c){}}return null}function gj(a){var b=a.type;
switch(a.tag){case 24:return"Cache";case 9:return(b.displayName||"Context")+".Consumer";case 10:return(b._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return a=b.render,a=a.displayName||a.name||"",b.displayName||(""!==a?"ForwardRef("+a+")":"ForwardRef");case 7:return"Fragment";case 5:return b;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return de(b);case 8:return b===fe?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";
case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"===typeof b)return b.displayName||b.name||null;if("string"===typeof b)return b}return null}function Ua(a){switch(typeof a){case "boolean":case "number":case "string":case "undefined":return a;case "object":return a;default:return""}}function ig(a){var b=a.type;return(a=a.nodeName)&&"input"===a.toLowerCase()&&("checkbox"===b||"radio"===
b)}function hj(a){var b=ig(a)?"checked":"value",c=Object.getOwnPropertyDescriptor(a.constructor.prototype,b),d=""+a[b];if(!a.hasOwnProperty(b)&&"undefined"!==typeof c&&"function"===typeof c.get&&"function"===typeof c.set){var e=c.get,f=c.set;Object.defineProperty(a,b,{configurable:!0,get:function(){return e.call(this)},set:function(a){d=""+a;f.call(this,a)}});Object.defineProperty(a,b,{enumerable:c.enumerable});return{getValue:function(){return d},setValue:function(a){d=""+a},stopTracking:function(){a._valueTracker=
null;delete a[b]}}}}function Pc(a){a._valueTracker||(a._valueTracker=hj(a))}function jg(a){if(!a)return!1;var b=a._valueTracker;if(!b)return!0;var c=b.getValue();var d="";a&&(d=ig(a)?a.checked?"true":"false":a.value);a=d;return a!==c?(b.setValue(a),!0):!1}function Qc(a){a=a||("undefined"!==typeof document?document:void 0);if("undefined"===typeof a)return null;try{return a.activeElement||a.body}catch(b){return a.body}}function ke(a,b){var c=b.checked;return E({},b,{defaultChecked:void 0,defaultValue:void 0,
value:void 0,checked:null!=c?c:a._wrapperState.initialChecked})}function kg(a,b){var c=null==b.defaultValue?"":b.defaultValue,d=null!=b.checked?b.checked:b.defaultChecked;c=Ua(null!=b.value?b.value:c);a._wrapperState={initialChecked:d,initialValue:c,controlled:"checkbox"===b.type||"radio"===b.type?null!=b.checked:null!=b.value}}function lg(a,b){b=b.checked;null!=b&&$d(a,"checked",b,!1)}function le(a,b){lg(a,b);var c=Ua(b.value),d=b.type;if(null!=c)if("number"===d){if(0===c&&""===a.value||a.value!=
c)a.value=""+c}else a.value!==""+c&&(a.value=""+c);else if("submit"===d||"reset"===d){a.removeAttribute("value");return}b.hasOwnProperty("value")?me(a,b.type,c):b.hasOwnProperty("defaultValue")&&me(a,b.type,Ua(b.defaultValue));null==b.checked&&null!=b.defaultChecked&&(a.defaultChecked=!!b.defaultChecked)}function mg(a,b,c){if(b.hasOwnProperty("value")||b.hasOwnProperty("defaultValue")){var d=b.type;if(!("submit"!==d&&"reset"!==d||void 0!==b.value&&null!==b.value))return;b=""+a._wrapperState.initialValue;
c||b===a.value||(a.value=b);a.defaultValue=b}c=a.name;""!==c&&(a.name="");a.defaultChecked=!!a._wrapperState.initialChecked;""!==c&&(a.name=c)}function me(a,b,c){if("number"!==b||Qc(a.ownerDocument)!==a)null==c?a.defaultValue=""+a._wrapperState.initialValue:a.defaultValue!==""+c&&(a.defaultValue=""+c)}function Db(a,b,c,d){a=a.options;if(b){b={};for(var e=0;e<c.length;e++)b["$"+c[e]]=!0;for(c=0;c<a.length;c++)e=b.hasOwnProperty("$"+a[c].value),a[c].selected!==e&&(a[c].selected=e),e&&d&&(a[c].defaultSelected=
!0)}else{c=""+Ua(c);b=null;for(e=0;e<a.length;e++){if(a[e].value===c){a[e].selected=!0;d&&(a[e].defaultSelected=!0);return}null!==b||a[e].disabled||(b=a[e])}null!==b&&(b.selected=!0)}}function ne(a,b){if(null!=b.dangerouslySetInnerHTML)throw Error(m(91));return E({},b,{value:void 0,defaultValue:void 0,children:""+a._wrapperState.initialValue})}function ng(a,b){var c=b.value;if(null==c){c=b.children;b=b.defaultValue;if(null!=c){if(null!=b)throw Error(m(92));if(cc(c)){if(1<c.length)throw Error(m(93));
c=c[0]}b=c}null==b&&(b="");c=b}a._wrapperState={initialValue:Ua(c)}}function og(a,b){var c=Ua(b.value),d=Ua(b.defaultValue);null!=c&&(c=""+c,c!==a.value&&(a.value=c),null==b.defaultValue&&a.defaultValue!==c&&(a.defaultValue=c));null!=d&&(a.defaultValue=""+d)}function pg(a,b){b=a.textContent;b===a._wrapperState.initialValue&&""!==b&&null!==b&&(a.value=b)}function qg(a){switch(a){case "svg":return"http://www.w3.org/2000/svg";case "math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}
function oe(a,b){return null==a||"http://www.w3.org/1999/xhtml"===a?qg(b):"http://www.w3.org/2000/svg"===a&&"foreignObject"===b?"http://www.w3.org/1999/xhtml":a}function rg(a,b,c){return null==b||"boolean"===typeof b||""===b?"":c||"number"!==typeof b||0===b||dc.hasOwnProperty(a)&&dc[a]?(""+b).trim():b+"px"}function sg(a,b){a=a.style;for(var c in b)if(b.hasOwnProperty(c)){var d=0===c.indexOf("--"),e=rg(c,b[c],d);"float"===c&&(c="cssFloat");d?a.setProperty(c,e):a[c]=e}}function pe(a,b){if(b){if(ij[a]&&
(null!=b.children||null!=b.dangerouslySetInnerHTML))throw Error(m(137,a));if(null!=b.dangerouslySetInnerHTML){if(null!=b.children)throw Error(m(60));if("object"!==typeof b.dangerouslySetInnerHTML||!("__html"in b.dangerouslySetInnerHTML))throw Error(m(61));}if(null!=b.style&&"object"!==typeof b.style)throw Error(m(62));}}function qe(a,b){if(-1===a.indexOf("-"))return"string"===typeof b.is;switch(a){case "annotation-xml":case "color-profile":case "font-face":case "font-face-src":case "font-face-uri":case "font-face-format":case "font-face-name":case "missing-glyph":return!1;
default:return!0}}function re(a){a=a.target||a.srcElement||window;a.correspondingUseElement&&(a=a.correspondingUseElement);return 3===a.nodeType?a.parentNode:a}function tg(a){if(a=ec(a)){if("function"!==typeof se)throw Error(m(280));var b=a.stateNode;b&&(b=Rc(b),se(a.stateNode,a.type,b))}}function ug(a){Eb?Fb?Fb.push(a):Fb=[a]:Eb=a}function vg(){if(Eb){var a=Eb,b=Fb;Fb=Eb=null;tg(a);if(b)for(a=0;a<b.length;a++)tg(b[a])}}function wg(a,b,c){if(te)return a(b,c);te=!0;try{return xg(a,b,c)}finally{if(te=
!1,null!==Eb||null!==Fb)yg(),vg()}}function fc(a,b){var c=a.stateNode;if(null===c)return null;var d=Rc(c);if(null===d)return null;c=d[b];a:switch(b){case "onClick":case "onClickCapture":case "onDoubleClick":case "onDoubleClickCapture":case "onMouseDown":case "onMouseDownCapture":case "onMouseMove":case "onMouseMoveCapture":case "onMouseUp":case "onMouseUpCapture":case "onMouseEnter":(d=!d.disabled)||(a=a.type,d=!("button"===a||"input"===a||"select"===a||"textarea"===a));a=!d;break a;default:a=!1}if(a)return null;
if(c&&"function"!==typeof c)throw Error(m(231,b,typeof c));return c}function jj(a,b,c,d,e,f,g,h,k){gc=!1;Sc=null;kj.apply(lj,arguments)}function mj(a,b,c,d,e,f,g,h,k){jj.apply(this,arguments);if(gc){if(gc){var n=Sc;gc=!1;Sc=null}else throw Error(m(198));Tc||(Tc=!0,ue=n)}}function nb(a){var b=a,c=a;if(a.alternate)for(;b.return;)b=b.return;else{a=b;do b=a,0!==(b.flags&4098)&&(c=b.return),a=b.return;while(a)}return 3===b.tag?c:null}function zg(a){if(13===a.tag){var b=a.memoizedState;null===b&&(a=a.alternate,
null!==a&&(b=a.memoizedState));if(null!==b)return b.dehydrated}return null}function Ag(a){if(nb(a)!==a)throw Error(m(188));}function nj(a){var b=a.alternate;if(!b){b=nb(a);if(null===b)throw Error(m(188));return b!==a?null:a}for(var c=a,d=b;;){var e=c.return;if(null===e)break;var f=e.alternate;if(null===f){d=e.return;if(null!==d){c=d;continue}break}if(e.child===f.child){for(f=e.child;f;){if(f===c)return Ag(e),a;if(f===d)return Ag(e),b;f=f.sibling}throw Error(m(188));}if(c.return!==d.return)c=e,d=f;
else{for(var g=!1,h=e.child;h;){if(h===c){g=!0;c=e;d=f;break}if(h===d){g=!0;d=e;c=f;break}h=h.sibling}if(!g){for(h=f.child;h;){if(h===c){g=!0;c=f;d=e;break}if(h===d){g=!0;d=f;c=e;break}h=h.sibling}if(!g)throw Error(m(189));}}if(c.alternate!==d)throw Error(m(190));}if(3!==c.tag)throw Error(m(188));return c.stateNode.current===c?a:b}function Bg(a){a=nj(a);return null!==a?Cg(a):null}function Cg(a){if(5===a.tag||6===a.tag)return a;for(a=a.child;null!==a;){var b=Cg(a);if(null!==b)return b;a=a.sibling}return null}
function oj(a,b){if(Ca&&"function"===typeof Ca.onCommitFiberRoot)try{Ca.onCommitFiberRoot(Uc,a,void 0,128===(a.current.flags&128))}catch(c){}}function pj(a){a>>>=0;return 0===a?32:31-(qj(a)/rj|0)|0}function hc(a){switch(a&-a){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return a&
4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return a&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return a}}function Vc(a,b){var c=a.pendingLanes;if(0===c)return 0;var d=0,e=a.suspendedLanes,f=a.pingedLanes,g=c&268435455;if(0!==g){var h=g&~e;0!==h?d=hc(h):(f&=g,0!==f&&(d=hc(f)))}else g=c&~e,0!==g?d=hc(g):0!==f&&(d=hc(f));if(0===d)return 0;if(0!==b&&b!==d&&0===(b&e)&&
(e=d&-d,f=b&-b,e>=f||16===e&&0!==(f&4194240)))return b;0!==(d&4)&&(d|=c&16);b=a.entangledLanes;if(0!==b)for(a=a.entanglements,b&=d;0<b;)c=31-ta(b),e=1<<c,d|=a[c],b&=~e;return d}function sj(a,b){switch(a){case 1:case 2:case 4:return b+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return b+5E3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;
case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function tj(a,b){for(var c=a.suspendedLanes,d=a.pingedLanes,e=a.expirationTimes,f=a.pendingLanes;0<f;){var g=31-ta(f),h=1<<g,k=e[g];if(-1===k){if(0===(h&c)||0!==(h&d))e[g]=sj(h,b)}else k<=b&&(a.expiredLanes|=h);f&=~h}}function ve(a){a=a.pendingLanes&-1073741825;return 0!==a?a:a&1073741824?1073741824:0}function Dg(){var a=Wc;Wc<<=1;0===(Wc&4194240)&&(Wc=64);return a}function we(a){for(var b=[],c=0;31>c;c++)b.push(a);
return b}function ic(a,b,c){a.pendingLanes|=b;536870912!==b&&(a.suspendedLanes=0,a.pingedLanes=0);a=a.eventTimes;b=31-ta(b);a[b]=c}function uj(a,b){var c=a.pendingLanes&~b;a.pendingLanes=b;a.suspendedLanes=0;a.pingedLanes=0;a.expiredLanes&=b;a.mutableReadLanes&=b;a.entangledLanes&=b;b=a.entanglements;var d=a.eventTimes;for(a=a.expirationTimes;0<c;){var e=31-ta(c),f=1<<e;b[e]=0;d[e]=-1;a[e]=-1;c&=~f}}function xe(a,b){var c=a.entangledLanes|=b;for(a=a.entanglements;c;){var d=31-ta(c),e=1<<d;e&b|a[d]&
b&&(a[d]|=b);c&=~e}}function Eg(a){a&=-a;return 1<a?4<a?0!==(a&268435455)?16:536870912:4:1}function Fg(a,b){switch(a){case "focusin":case "focusout":Va=null;break;case "dragenter":case "dragleave":Wa=null;break;case "mouseover":case "mouseout":Xa=null;break;case "pointerover":case "pointerout":jc.delete(b.pointerId);break;case "gotpointercapture":case "lostpointercapture":kc.delete(b.pointerId)}}function lc(a,b,c,d,e,f){if(null===a||a.nativeEvent!==f)return a={blockedOn:b,domEventName:c,eventSystemFlags:d,
nativeEvent:f,targetContainers:[e]},null!==b&&(b=ec(b),null!==b&&Gg(b)),a;a.eventSystemFlags|=d;b=a.targetContainers;null!==e&&-1===b.indexOf(e)&&b.push(e);return a}function vj(a,b,c,d,e){switch(b){case "focusin":return Va=lc(Va,a,b,c,d,e),!0;case "dragenter":return Wa=lc(Wa,a,b,c,d,e),!0;case "mouseover":return Xa=lc(Xa,a,b,c,d,e),!0;case "pointerover":var f=e.pointerId;jc.set(f,lc(jc.get(f)||null,a,b,c,d,e));return!0;case "gotpointercapture":return f=e.pointerId,kc.set(f,lc(kc.get(f)||null,a,b,
c,d,e)),!0}return!1}function Hg(a){var b=ob(a.target);if(null!==b){var c=nb(b);if(null!==c)if(b=c.tag,13===b){if(b=zg(c),null!==b){a.blockedOn=b;wj(a.priority,function(){xj(c)});return}}else if(3===b&&c.stateNode.current.memoizedState.isDehydrated){a.blockedOn=3===c.tag?c.stateNode.containerInfo:null;return}}a.blockedOn=null}function Xc(a){if(null!==a.blockedOn)return!1;for(var b=a.targetContainers;0<b.length;){var c=ye(a.domEventName,a.eventSystemFlags,b[0],a.nativeEvent);if(null===c){c=a.nativeEvent;
var d=new c.constructor(c.type,c);ze=d;c.target.dispatchEvent(d);ze=null}else return b=ec(c),null!==b&&Gg(b),a.blockedOn=c,!1;b.shift()}return!0}function Ig(a,b,c){Xc(a)&&c.delete(b)}function yj(){Ae=!1;null!==Va&&Xc(Va)&&(Va=null);null!==Wa&&Xc(Wa)&&(Wa=null);null!==Xa&&Xc(Xa)&&(Xa=null);jc.forEach(Ig);kc.forEach(Ig)}function mc(a,b){a.blockedOn===b&&(a.blockedOn=null,Ae||(Ae=!0,Jg(Kg,yj)))}function nc(a){if(0<Yc.length){mc(Yc[0],a);for(var b=1;b<Yc.length;b++){var c=Yc[b];c.blockedOn===a&&(c.blockedOn=
null)}}null!==Va&&mc(Va,a);null!==Wa&&mc(Wa,a);null!==Xa&&mc(Xa,a);b=function(b){return mc(b,a)};jc.forEach(b);kc.forEach(b);for(b=0;b<Ya.length;b++)c=Ya[b],c.blockedOn===a&&(c.blockedOn=null);for(;0<Ya.length&&(b=Ya[0],null===b.blockedOn);)Hg(b),null===b.blockedOn&&Ya.shift()}function zj(a,b,c,d){var e=z,f=Gb.transition;Gb.transition=null;try{z=1,Be(a,b,c,d)}finally{z=e,Gb.transition=f}}function Aj(a,b,c,d){var e=z,f=Gb.transition;Gb.transition=null;try{z=4,Be(a,b,c,d)}finally{z=e,Gb.transition=
f}}function Be(a,b,c,d){if(Zc){var e=ye(a,b,c,d);if(null===e)Ce(a,b,d,$c,c),Fg(a,d);else if(vj(e,a,b,c,d))d.stopPropagation();else if(Fg(a,d),b&4&&-1<Bj.indexOf(a)){for(;null!==e;){var f=ec(e);null!==f&&Cj(f);f=ye(a,b,c,d);null===f&&Ce(a,b,d,$c,c);if(f===e)break;e=f}null!==e&&d.stopPropagation()}else Ce(a,b,d,null,c)}}function ye(a,b,c,d){$c=null;a=re(d);a=ob(a);if(null!==a)if(b=nb(a),null===b)a=null;else if(c=b.tag,13===c){a=zg(b);if(null!==a)return a;a=null}else if(3===c){if(b.stateNode.current.memoizedState.isDehydrated)return 3===
b.tag?b.stateNode.containerInfo:null;a=null}else b!==a&&(a=null);$c=a;return null}function Lg(a){switch(a){case "cancel":case "click":case "close":case "contextmenu":case "copy":case "cut":case "auxclick":case "dblclick":case "dragend":case "dragstart":case "drop":case "focusin":case "focusout":case "input":case "invalid":case "keydown":case "keypress":case "keyup":case "mousedown":case "mouseup":case "paste":case "pause":case "play":case "pointercancel":case "pointerdown":case "pointerup":case "ratechange":case "reset":case "resize":case "seeked":case "submit":case "touchcancel":case "touchend":case "touchstart":case "volumechange":case "change":case "selectionchange":case "textInput":case "compositionstart":case "compositionend":case "compositionupdate":case "beforeblur":case "afterblur":case "beforeinput":case "blur":case "fullscreenchange":case "focus":case "hashchange":case "popstate":case "select":case "selectstart":return 1;
case "drag":case "dragenter":case "dragexit":case "dragleave":case "dragover":case "mousemove":case "mouseout":case "mouseover":case "pointermove":case "pointerout":case "pointerover":case "scroll":case "toggle":case "touchmove":case "wheel":case "mouseenter":case "mouseleave":case "pointerenter":case "pointerleave":return 4;case "message":switch(Dj()){case De:return 1;case Mg:return 4;case ad:case Ej:return 16;case Ng:return 536870912;default:return 16}default:return 16}}function Og(){if(bd)return bd;
var a,b=Ee,c=b.length,d,e="value"in Za?Za.value:Za.textContent,f=e.length;for(a=0;a<c&&b[a]===e[a];a++);var g=c-a;for(d=1;d<=g&&b[c-d]===e[f-d];d++);return bd=e.slice(a,1<d?1-d:void 0)}function cd(a){var b=a.keyCode;"charCode"in a?(a=a.charCode,0===a&&13===b&&(a=13)):a=b;10===a&&(a=13);return 32<=a||13===a?a:0}function dd(){return!0}function Pg(){return!1}function ka(a){function b(b,d,e,f,g){this._reactName=b;this._targetInst=e;this.type=d;this.nativeEvent=f;this.target=g;this.currentTarget=null;
for(var c in a)a.hasOwnProperty(c)&&(b=a[c],this[c]=b?b(f):f[c]);this.isDefaultPrevented=(null!=f.defaultPrevented?f.defaultPrevented:!1===f.returnValue)?dd:Pg;this.isPropagationStopped=Pg;return this}E(b.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():"unknown"!==typeof a.returnValue&&(a.returnValue=!1),this.isDefaultPrevented=dd)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():
"unknown"!==typeof a.cancelBubble&&(a.cancelBubble=!0),this.isPropagationStopped=dd)},persist:function(){},isPersistent:dd});return b}function Fj(a){var b=this.nativeEvent;return b.getModifierState?b.getModifierState(a):(a=Gj[a])?!!b[a]:!1}function Fe(a){return Fj}function Qg(a,b){switch(a){case "keyup":return-1!==Hj.indexOf(b.keyCode);case "keydown":return 229!==b.keyCode;case "keypress":case "mousedown":case "focusout":return!0;default:return!1}}function Rg(a){a=a.detail;return"object"===typeof a&&
"data"in a?a.data:null}function Ij(a,b){switch(a){case "compositionend":return Rg(b);case "keypress":if(32!==b.which)return null;Sg=!0;return Tg;case "textInput":return a=b.data,a===Tg&&Sg?null:a;default:return null}}function Jj(a,b){if(Hb)return"compositionend"===a||!Ge&&Qg(a,b)?(a=Og(),bd=Ee=Za=null,Hb=!1,a):null;switch(a){case "paste":return null;case "keypress":if(!(b.ctrlKey||b.altKey||b.metaKey)||b.ctrlKey&&b.altKey){if(b.char&&1<b.char.length)return b.char;if(b.which)return String.fromCharCode(b.which)}return null;
case "compositionend":return Ug&&"ko"!==b.locale?null:b.data;default:return null}}function Vg(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return"input"===b?!!Kj[a.type]:"textarea"===b?!0:!1}function Lj(a){if(!Ia)return!1;a="on"+a;var b=a in document;b||(b=document.createElement("div"),b.setAttribute(a,"return;"),b="function"===typeof b[a]);return b}function Wg(a,b,c,d){ug(d);b=ed(b,"onChange");0<b.length&&(c=new He("onChange","change",null,c,d),a.push({event:c,listeners:b}))}function Mj(a){Xg(a,
0)}function fd(a){var b=Ib(a);if(jg(b))return a}function Nj(a,b){if("change"===a)return b}function Yg(){oc&&(oc.detachEvent("onpropertychange",Zg),pc=oc=null)}function Zg(a){if("value"===a.propertyName&&fd(pc)){var b=[];Wg(b,pc,a,re(a));wg(Mj,b)}}function Oj(a,b,c){"focusin"===a?(Yg(),oc=b,pc=c,oc.attachEvent("onpropertychange",Zg)):"focusout"===a&&Yg()}function Pj(a,b){if("selectionchange"===a||"keyup"===a||"keydown"===a)return fd(pc)}function Qj(a,b){if("click"===a)return fd(b)}function Rj(a,b){if("input"===
a||"change"===a)return fd(b)}function Sj(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}function qc(a,b){if(ua(a,b))return!0;if("object"!==typeof a||null===a||"object"!==typeof b||null===b)return!1;var c=Object.keys(a),d=Object.keys(b);if(c.length!==d.length)return!1;for(d=0;d<c.length;d++){var e=c[d];if(!Zd.call(b,e)||!ua(a[e],b[e]))return!1}return!0}function $g(a){for(;a&&a.firstChild;)a=a.firstChild;return a}function ah(a,b){var c=$g(a);a=0;for(var d;c;){if(3===c.nodeType){d=a+c.textContent.length;
if(a<=b&&d>=b)return{node:c,offset:b-a};a=d}a:{for(;c;){if(c.nextSibling){c=c.nextSibling;break a}c=c.parentNode}c=void 0}c=$g(c)}}function bh(a,b){return a&&b?a===b?!0:a&&3===a.nodeType?!1:b&&3===b.nodeType?bh(a,b.parentNode):"contains"in a?a.contains(b):a.compareDocumentPosition?!!(a.compareDocumentPosition(b)&16):!1:!1}function ch(){for(var a=window,b=Qc();b instanceof a.HTMLIFrameElement;){try{var c="string"===typeof b.contentWindow.location.href}catch(d){c=!1}if(c)a=b.contentWindow;else break;
b=Qc(a.document)}return b}function Ie(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return b&&("input"===b&&("text"===a.type||"search"===a.type||"tel"===a.type||"url"===a.type||"password"===a.type)||"textarea"===b||"true"===a.contentEditable)}function Tj(a){var b=ch(),c=a.focusedElem,d=a.selectionRange;if(b!==c&&c&&c.ownerDocument&&bh(c.ownerDocument.documentElement,c)){if(null!==d&&Ie(c))if(b=d.start,a=d.end,void 0===a&&(a=b),"selectionStart"in c)c.selectionStart=b,c.selectionEnd=Math.min(a,c.value.length);
else if(a=(b=c.ownerDocument||document)&&b.defaultView||window,a.getSelection){a=a.getSelection();var e=c.textContent.length,f=Math.min(d.start,e);d=void 0===d.end?f:Math.min(d.end,e);!a.extend&&f>d&&(e=d,d=f,f=e);e=ah(c,f);var g=ah(c,d);e&&g&&(1!==a.rangeCount||a.anchorNode!==e.node||a.anchorOffset!==e.offset||a.focusNode!==g.node||a.focusOffset!==g.offset)&&(b=b.createRange(),b.setStart(e.node,e.offset),a.removeAllRanges(),f>d?(a.addRange(b),a.extend(g.node,g.offset)):(b.setEnd(g.node,g.offset),
a.addRange(b)))}b=[];for(a=c;a=a.parentNode;)1===a.nodeType&&b.push({element:a,left:a.scrollLeft,top:a.scrollTop});"function"===typeof c.focus&&c.focus();for(c=0;c<b.length;c++)a=b[c],a.element.scrollLeft=a.left,a.element.scrollTop=a.top}}function dh(a,b,c){var d=c.window===c?c.document:9===c.nodeType?c:c.ownerDocument;Je||null==Jb||Jb!==Qc(d)||(d=Jb,"selectionStart"in d&&Ie(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d=
{anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),rc&&qc(rc,d)||(rc=d,d=ed(Ke,"onSelect"),0<d.length&&(b=new He("onSelect","select",null,b,c),a.push({event:b,listeners:d}),b.target=Jb)))}function gd(a,b){var c={};c[a.toLowerCase()]=b.toLowerCase();c["Webkit"+a]="webkit"+b;c["Moz"+a]="moz"+b;return c}function hd(a){if(Le[a])return Le[a];if(!Kb[a])return a;var b=Kb[a],c;for(c in b)if(b.hasOwnProperty(c)&&c in eh)return Le[a]=b[c];return a}function $a(a,
b){fh.set(a,b);mb(b,[a])}function gh(a,b,c){var d=a.type||"unknown-event";a.currentTarget=c;mj(d,b,void 0,a);a.currentTarget=null}function Xg(a,b){b=0!==(b&4);for(var c=0;c<a.length;c++){var d=a[c],e=d.event;d=d.listeners;a:{var f=void 0;if(b)for(var g=d.length-1;0<=g;g--){var h=d[g],k=h.instance,n=h.currentTarget;h=h.listener;if(k!==f&&e.isPropagationStopped())break a;gh(e,h,n);f=k}else for(g=0;g<d.length;g++){h=d[g];k=h.instance;n=h.currentTarget;h=h.listener;if(k!==f&&e.isPropagationStopped())break a;
gh(e,h,n);f=k}}}if(Tc)throw a=ue,Tc=!1,ue=null,a;}function B(a,b){var c=b[Me];void 0===c&&(c=b[Me]=new Set);var d=a+"__bubble";c.has(d)||(hh(b,a,2,!1),c.add(d))}function Ne(a,b,c){var d=0;b&&(d|=4);hh(c,a,d,b)}function sc(a){if(!a[id]){a[id]=!0;cg.forEach(function(b){"selectionchange"!==b&&(Uj.has(b)||Ne(b,!1,a),Ne(b,!0,a))});var b=9===a.nodeType?a:a.ownerDocument;null===b||b[id]||(b[id]=!0,Ne("selectionchange",!1,b))}}function hh(a,b,c,d,e){switch(Lg(b)){case 1:e=zj;break;case 4:e=Aj;break;default:e=
Be}c=e.bind(null,b,c,a);e=void 0;!Oe||"touchstart"!==b&&"touchmove"!==b&&"wheel"!==b||(e=!0);d?void 0!==e?a.addEventListener(b,c,{capture:!0,passive:e}):a.addEventListener(b,c,!0):void 0!==e?a.addEventListener(b,c,{passive:e}):a.addEventListener(b,c,!1)}function Ce(a,b,c,d,e){var f=d;if(0===(b&1)&&0===(b&2)&&null!==d)a:for(;;){if(null===d)return;var g=d.tag;if(3===g||4===g){var h=d.stateNode.containerInfo;if(h===e||8===h.nodeType&&h.parentNode===e)break;if(4===g)for(g=d.return;null!==g;){var k=g.tag;
if(3===k||4===k)if(k=g.stateNode.containerInfo,k===e||8===k.nodeType&&k.parentNode===e)return;g=g.return}for(;null!==h;){g=ob(h);if(null===g)return;k=g.tag;if(5===k||6===k){d=f=g;continue a}h=h.parentNode}}d=d.return}wg(function(){var d=f,e=re(c),g=[];a:{var h=fh.get(a);if(void 0!==h){var k=He,m=a;switch(a){case "keypress":if(0===cd(c))break a;case "keydown":case "keyup":k=Vj;break;case "focusin":m="focus";k=Pe;break;case "focusout":m="blur";k=Pe;break;case "beforeblur":case "afterblur":k=Pe;break;
case "click":if(2===c.button)break a;case "auxclick":case "dblclick":case "mousedown":case "mousemove":case "mouseup":case "mouseout":case "mouseover":case "contextmenu":k=ih;break;case "drag":case "dragend":case "dragenter":case "dragexit":case "dragleave":case "dragover":case "dragstart":case "drop":k=Wj;break;case "touchcancel":case "touchend":case "touchmove":case "touchstart":k=Xj;break;case jh:case kh:case lh:k=Yj;break;case mh:k=Zj;break;case "scroll":k=ak;break;case "wheel":k=bk;break;case "copy":case "cut":case "paste":k=
ck;break;case "gotpointercapture":case "lostpointercapture":case "pointercancel":case "pointerdown":case "pointermove":case "pointerout":case "pointerover":case "pointerup":k=nh}var l=0!==(b&4),p=!l&&"scroll"===a,w=l?null!==h?h+"Capture":null:h;l=[];for(var A=d,t;null!==A;){t=A;var M=t.stateNode;5===t.tag&&null!==M&&(t=M,null!==w&&(M=fc(A,w),null!=M&&l.push(tc(A,M,t))));if(p)break;A=A.return}0<l.length&&(h=new k(h,m,null,c,e),g.push({event:h,listeners:l}))}}if(0===(b&7)){a:{h="mouseover"===a||"pointerover"===
a;k="mouseout"===a||"pointerout"===a;if(h&&c!==ze&&(m=c.relatedTarget||c.fromElement)&&(ob(m)||m[Ja]))break a;if(k||h){h=e.window===e?e:(h=e.ownerDocument)?h.defaultView||h.parentWindow:window;if(k){if(m=c.relatedTarget||c.toElement,k=d,m=m?ob(m):null,null!==m&&(p=nb(m),m!==p||5!==m.tag&&6!==m.tag))m=null}else k=null,m=d;if(k!==m){l=ih;M="onMouseLeave";w="onMouseEnter";A="mouse";if("pointerout"===a||"pointerover"===a)l=nh,M="onPointerLeave",w="onPointerEnter",A="pointer";p=null==k?h:Ib(k);t=null==
m?h:Ib(m);h=new l(M,A+"leave",k,c,e);h.target=p;h.relatedTarget=t;M=null;ob(e)===d&&(l=new l(w,A+"enter",m,c,e),l.target=t,l.relatedTarget=p,M=l);p=M;if(k&&m)b:{l=k;w=m;A=0;for(t=l;t;t=Lb(t))A++;t=0;for(M=w;M;M=Lb(M))t++;for(;0<A-t;)l=Lb(l),A--;for(;0<t-A;)w=Lb(w),t--;for(;A--;){if(l===w||null!==w&&l===w.alternate)break b;l=Lb(l);w=Lb(w)}l=null}else l=null;null!==k&&oh(g,h,k,l,!1);null!==m&&null!==p&&oh(g,p,m,l,!0)}}}a:{h=d?Ib(d):window;k=h.nodeName&&h.nodeName.toLowerCase();if("select"===k||"input"===
k&&"file"===h.type)var ma=Nj;else if(Vg(h))if(ph)ma=Rj;else{ma=Pj;var va=Oj}else(k=h.nodeName)&&"input"===k.toLowerCase()&&("checkbox"===h.type||"radio"===h.type)&&(ma=Qj);if(ma&&(ma=ma(a,d))){Wg(g,ma,c,e);break a}va&&va(a,h,d);"focusout"===a&&(va=h._wrapperState)&&va.controlled&&"number"===h.type&&me(h,"number",h.value)}va=d?Ib(d):window;switch(a){case "focusin":if(Vg(va)||"true"===va.contentEditable)Jb=va,Ke=d,rc=null;break;case "focusout":rc=Ke=Jb=null;break;case "mousedown":Je=!0;break;case "contextmenu":case "mouseup":case "dragend":Je=
!1;dh(g,c,e);break;case "selectionchange":if(dk)break;case "keydown":case "keyup":dh(g,c,e)}var ab;if(Ge)b:{switch(a){case "compositionstart":var da="onCompositionStart";break b;case "compositionend":da="onCompositionEnd";break b;case "compositionupdate":da="onCompositionUpdate";break b}da=void 0}else Hb?Qg(a,c)&&(da="onCompositionEnd"):"keydown"===a&&229===c.keyCode&&(da="onCompositionStart");da&&(Ug&&"ko"!==c.locale&&(Hb||"onCompositionStart"!==da?"onCompositionEnd"===da&&Hb&&(ab=Og()):(Za=e,Ee=
"value"in Za?Za.value:Za.textContent,Hb=!0)),va=ed(d,da),0<va.length&&(da=new qh(da,a,null,c,e),g.push({event:da,listeners:va}),ab?da.data=ab:(ab=Rg(c),null!==ab&&(da.data=ab))));if(ab=ek?Ij(a,c):Jj(a,c))d=ed(d,"onBeforeInput"),0<d.length&&(e=new fk("onBeforeInput","beforeinput",null,c,e),g.push({event:e,listeners:d}),e.data=ab)}Xg(g,b)})}function tc(a,b,c){return{instance:a,listener:b,currentTarget:c}}function ed(a,b){for(var c=b+"Capture",d=[];null!==a;){var e=a,f=e.stateNode;5===e.tag&&null!==
f&&(e=f,f=fc(a,c),null!=f&&d.unshift(tc(a,f,e)),f=fc(a,b),null!=f&&d.push(tc(a,f,e)));a=a.return}return d}function Lb(a){if(null===a)return null;do a=a.return;while(a&&5!==a.tag);return a?a:null}function oh(a,b,c,d,e){for(var f=b._reactName,g=[];null!==c&&c!==d;){var h=c,k=h.alternate,n=h.stateNode;if(null!==k&&k===d)break;5===h.tag&&null!==n&&(h=n,e?(k=fc(c,f),null!=k&&g.unshift(tc(c,k,h))):e||(k=fc(c,f),null!=k&&g.push(tc(c,k,h))));c=c.return}0!==g.length&&a.push({event:b,listeners:g})}function rh(a){return("string"===
typeof a?a:""+a).replace(gk,"\n").replace(hk,"")}function jd(a,b,c,d){b=rh(b);if(rh(a)!==b&&c)throw Error(m(425));}function kd(){}function Qe(a,b){return"textarea"===a||"noscript"===a||"string"===typeof b.children||"number"===typeof b.children||"object"===typeof b.dangerouslySetInnerHTML&&null!==b.dangerouslySetInnerHTML&&null!=b.dangerouslySetInnerHTML.__html}function ik(a){setTimeout(function(){throw a;})}function Re(a,b){var c=b,d=0;do{var e=c.nextSibling;a.removeChild(c);if(e&&8===e.nodeType)if(c=
e.data,"/$"===c){if(0===d){a.removeChild(e);nc(b);return}d--}else"$"!==c&&"$?"!==c&&"$!"!==c||d++;c=e}while(c);nc(b)}function Ka(a){for(;null!=a;a=a.nextSibling){var b=a.nodeType;if(1===b||3===b)break;if(8===b){b=a.data;if("$"===b||"$!"===b||"$?"===b)break;if("/$"===b)return null}}return a}function sh(a){a=a.previousSibling;for(var b=0;a;){if(8===a.nodeType){var c=a.data;if("$"===c||"$!"===c||"$?"===c){if(0===b)return a;b--}else"/$"===c&&b++}a=a.previousSibling}return null}function ob(a){var b=a[Da];
if(b)return b;for(var c=a.parentNode;c;){if(b=c[Ja]||c[Da]){c=b.alternate;if(null!==b.child||null!==c&&null!==c.child)for(a=sh(a);null!==a;){if(c=a[Da])return c;a=sh(a)}return b}a=c;c=a.parentNode}return null}function ec(a){a=a[Da]||a[Ja];return!a||5!==a.tag&&6!==a.tag&&13!==a.tag&&3!==a.tag?null:a}function Ib(a){if(5===a.tag||6===a.tag)return a.stateNode;throw Error(m(33));}function Rc(a){return a[uc]||null}function bb(a){return{current:a}}function v(a,b){0>Mb||(a.current=Se[Mb],Se[Mb]=null,Mb--)}
function y(a,b,c){Mb++;Se[Mb]=a.current;a.current=b}function Nb(a,b){var c=a.type.contextTypes;if(!c)return cb;var d=a.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===b)return d.__reactInternalMemoizedMaskedChildContext;var e={},f;for(f in c)e[f]=b[f];d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=b,a.__reactInternalMemoizedMaskedChildContext=e);return e}function ea(a){a=a.childContextTypes;return null!==a&&void 0!==a}function th(a,b,c){if(J.current!==cb)throw Error(m(168));
y(J,b);y(S,c)}function uh(a,b,c){var d=a.stateNode;b=b.childContextTypes;if("function"!==typeof d.getChildContext)return c;d=d.getChildContext();for(var e in d)if(!(e in b))throw Error(m(108,gj(a)||"Unknown",e));return E({},c,d)}function ld(a){a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||cb;pb=J.current;y(J,a);y(S,S.current);return!0}function vh(a,b,c){var d=a.stateNode;if(!d)throw Error(m(169));c?(a=uh(a,b,pb),d.__reactInternalMemoizedMergedChildContext=a,v(S),v(J),y(J,a)):v(S);
y(S,c)}function wh(a){null===La?La=[a]:La.push(a)}function jk(a){md=!0;wh(a)}function db(){if(!Te&&null!==La){Te=!0;var a=0,b=z;try{var c=La;for(z=1;a<c.length;a++){var d=c[a];do d=d(!0);while(null!==d)}La=null;md=!1}catch(e){throw null!==La&&(La=La.slice(a+1)),xh(De,db),e;}finally{z=b,Te=!1}}return null}function qb(a,b){Ob[Pb++]=nd;Ob[Pb++]=od;od=a;nd=b}function yh(a,b,c){na[oa++]=Ma;na[oa++]=Na;na[oa++]=rb;rb=a;var d=Ma;a=Na;var e=32-ta(d)-1;d&=~(1<<e);c+=1;var f=32-ta(b)+e;if(30<f){var g=e-e%5;
f=(d&(1<<g)-1).toString(32);d>>=g;e-=g;Ma=1<<32-ta(b)+e|c<<e|d;Na=f+a}else Ma=1<<f|c<<e|d,Na=a}function Ue(a){null!==a.return&&(qb(a,1),yh(a,1,0))}function Ve(a){for(;a===od;)od=Ob[--Pb],Ob[Pb]=null,nd=Ob[--Pb],Ob[Pb]=null;for(;a===rb;)rb=na[--oa],na[oa]=null,Na=na[--oa],na[oa]=null,Ma=na[--oa],na[oa]=null}function zh(a,b){var c=pa(5,null,null,0);c.elementType="DELETED";c.stateNode=b;c.return=a;b=a.deletions;null===b?(a.deletions=[c],a.flags|=16):b.push(c)}function Ah(a,b){switch(a.tag){case 5:var c=
a.type;b=1!==b.nodeType||c.toLowerCase()!==b.nodeName.toLowerCase()?null:b;return null!==b?(a.stateNode=b,la=a,fa=Ka(b.firstChild),!0):!1;case 6:return b=""===a.pendingProps||3!==b.nodeType?null:b,null!==b?(a.stateNode=b,la=a,fa=null,!0):!1;case 13:return b=8!==b.nodeType?null:b,null!==b?(c=null!==rb?{id:Ma,overflow:Na}:null,a.memoizedState={dehydrated:b,treeContext:c,retryLane:1073741824},c=pa(18,null,null,0),c.stateNode=b,c.return=a,a.child=c,la=a,fa=null,!0):!1;default:return!1}}function We(a){return 0!==
(a.mode&1)&&0===(a.flags&128)}function Xe(a){if(D){var b=fa;if(b){var c=b;if(!Ah(a,b)){if(We(a))throw Error(m(418));b=Ka(c.nextSibling);var d=la;b&&Ah(a,b)?zh(d,c):(a.flags=a.flags&-4097|2,D=!1,la=a)}}else{if(We(a))throw Error(m(418));a.flags=a.flags&-4097|2;D=!1;la=a}}}function Bh(a){for(a=a.return;null!==a&&5!==a.tag&&3!==a.tag&&13!==a.tag;)a=a.return;la=a}function pd(a){if(a!==la)return!1;if(!D)return Bh(a),D=!0,!1;var b;(b=3!==a.tag)&&!(b=5!==a.tag)&&(b=a.type,b="head"!==b&&"body"!==b&&!Qe(a.type,
a.memoizedProps));if(b&&(b=fa)){if(We(a)){for(a=fa;a;)a=Ka(a.nextSibling);throw Error(m(418));}for(;b;)zh(a,b),b=Ka(b.nextSibling)}Bh(a);if(13===a.tag){a=a.memoizedState;a=null!==a?a.dehydrated:null;if(!a)throw Error(m(317));a:{a=a.nextSibling;for(b=0;a;){if(8===a.nodeType){var c=a.data;if("/$"===c){if(0===b){fa=Ka(a.nextSibling);break a}b--}else"$"!==c&&"$!"!==c&&"$?"!==c||b++}a=a.nextSibling}fa=null}}else fa=la?Ka(a.stateNode.nextSibling):null;return!0}function Qb(){fa=la=null;D=!1}function Ye(a){null===
wa?wa=[a]:wa.push(a)}function vc(a,b,c){a=c.ref;if(null!==a&&"function"!==typeof a&&"object"!==typeof a){if(c._owner){c=c._owner;if(c){if(1!==c.tag)throw Error(m(309));var d=c.stateNode}if(!d)throw Error(m(147,a));var e=d,f=""+a;if(null!==b&&null!==b.ref&&"function"===typeof b.ref&&b.ref._stringRef===f)return b.ref;b=function(a){var b=e.refs;null===a?delete b[f]:b[f]=a};b._stringRef=f;return b}if("string"!==typeof a)throw Error(m(284));if(!c._owner)throw Error(m(290,a));}return a}function qd(a,b){a=
Object.prototype.toString.call(b);throw Error(m(31,"[object Object]"===a?"object with keys {"+Object.keys(b).join(", ")+"}":a));}function Ch(a){var b=a._init;return b(a._payload)}function Dh(a){function b(b,c){if(a){var d=b.deletions;null===d?(b.deletions=[c],b.flags|=16):d.push(c)}}function c(c,d){if(!a)return null;for(;null!==d;)b(c,d),d=d.sibling;return null}function d(a,b){for(a=new Map;null!==b;)null!==b.key?a.set(b.key,b):a.set(b.index,b),b=b.sibling;return a}function e(a,b){a=eb(a,b);a.index=
0;a.sibling=null;return a}function f(b,c,d){b.index=d;if(!a)return b.flags|=1048576,c;d=b.alternate;if(null!==d)return d=d.index,d<c?(b.flags|=2,c):d;b.flags|=2;return c}function g(b){a&&null===b.alternate&&(b.flags|=2);return b}function h(a,b,c,d){if(null===b||6!==b.tag)return b=Ze(c,a.mode,d),b.return=a,b;b=e(b,c);b.return=a;return b}function k(a,b,c,d){var f=c.type;if(f===Bb)return l(a,b,c.props.children,d,c.key);if(null!==b&&(b.elementType===f||"object"===typeof f&&null!==f&&f.$$typeof===Ta&&
Ch(f)===b.type))return d=e(b,c.props),d.ref=vc(a,b,c),d.return=a,d;d=rd(c.type,c.key,c.props,null,a.mode,d);d.ref=vc(a,b,c);d.return=a;return d}function n(a,b,c,d){if(null===b||4!==b.tag||b.stateNode.containerInfo!==c.containerInfo||b.stateNode.implementation!==c.implementation)return b=$e(c,a.mode,d),b.return=a,b;b=e(b,c.children||[]);b.return=a;return b}function l(a,b,c,d,f){if(null===b||7!==b.tag)return b=sb(c,a.mode,d,f),b.return=a,b;b=e(b,c);b.return=a;return b}function u(a,b,c){if("string"===
typeof b&&""!==b||"number"===typeof b)return b=Ze(""+b,a.mode,c),b.return=a,b;if("object"===typeof b&&null!==b){switch(b.$$typeof){case sd:return c=rd(b.type,b.key,b.props,null,a.mode,c),c.ref=vc(a,null,b),c.return=a,c;case Cb:return b=$e(b,a.mode,c),b.return=a,b;case Ta:var d=b._init;return u(a,d(b._payload),c)}if(cc(b)||ac(b))return b=sb(b,a.mode,c,null),b.return=a,b;qd(a,b)}return null}function r(a,b,c,d){var e=null!==b?b.key:null;if("string"===typeof c&&""!==c||"number"===typeof c)return null!==
e?null:h(a,b,""+c,d);if("object"===typeof c&&null!==c){switch(c.$$typeof){case sd:return c.key===e?k(a,b,c,d):null;case Cb:return c.key===e?n(a,b,c,d):null;case Ta:return e=c._init,r(a,b,e(c._payload),d)}if(cc(c)||ac(c))return null!==e?null:l(a,b,c,d,null);qd(a,c)}return null}function p(a,b,c,d,e){if("string"===typeof d&&""!==d||"number"===typeof d)return a=a.get(c)||null,h(b,a,""+d,e);if("object"===typeof d&&null!==d){switch(d.$$typeof){case sd:return a=a.get(null===d.key?c:d.key)||null,k(b,a,d,
e);case Cb:return a=a.get(null===d.key?c:d.key)||null,n(b,a,d,e);case Ta:var f=d._init;return p(a,b,c,f(d._payload),e)}if(cc(d)||ac(d))return a=a.get(c)||null,l(b,a,d,e,null);qd(b,d)}return null}function x(e,g,h,k){for(var n=null,m=null,l=g,t=g=0,q=null;null!==l&&t<h.length;t++){l.index>t?(q=l,l=null):q=l.sibling;var A=r(e,l,h[t],k);if(null===A){null===l&&(l=q);break}a&&l&&null===A.alternate&&b(e,l);g=f(A,g,t);null===m?n=A:m.sibling=A;m=A;l=q}if(t===h.length)return c(e,l),D&&qb(e,t),n;if(null===l){for(;t<
h.length;t++)l=u(e,h[t],k),null!==l&&(g=f(l,g,t),null===m?n=l:m.sibling=l,m=l);D&&qb(e,t);return n}for(l=d(e,l);t<h.length;t++)q=p(l,e,t,h[t],k),null!==q&&(a&&null!==q.alternate&&l.delete(null===q.key?t:q.key),g=f(q,g,t),null===m?n=q:m.sibling=q,m=q);a&&l.forEach(function(a){return b(e,a)});D&&qb(e,t);return n}function I(e,g,h,k){var n=ac(h);if("function"!==typeof n)throw Error(m(150));h=n.call(h);if(null==h)throw Error(m(151));for(var l=n=null,q=g,t=g=0,A=null,w=h.next();null!==q&&!w.done;t++,w=
h.next()){q.index>t?(A=q,q=null):A=q.sibling;var x=r(e,q,w.value,k);if(null===x){null===q&&(q=A);break}a&&q&&null===x.alternate&&b(e,q);g=f(x,g,t);null===l?n=x:l.sibling=x;l=x;q=A}if(w.done)return c(e,q),D&&qb(e,t),n;if(null===q){for(;!w.done;t++,w=h.next())w=u(e,w.value,k),null!==w&&(g=f(w,g,t),null===l?n=w:l.sibling=w,l=w);D&&qb(e,t);return n}for(q=d(e,q);!w.done;t++,w=h.next())w=p(q,e,t,w.value,k),null!==w&&(a&&null!==w.alternate&&q.delete(null===w.key?t:w.key),g=f(w,g,t),null===l?n=w:l.sibling=
w,l=w);a&&q.forEach(function(a){return b(e,a)});D&&qb(e,t);return n}function v(a,d,f,h){"object"===typeof f&&null!==f&&f.type===Bb&&null===f.key&&(f=f.props.children);if("object"===typeof f&&null!==f){switch(f.$$typeof){case sd:a:{for(var k=f.key,n=d;null!==n;){if(n.key===k){k=f.type;if(k===Bb){if(7===n.tag){c(a,n.sibling);d=e(n,f.props.children);d.return=a;a=d;break a}}else if(n.elementType===k||"object"===typeof k&&null!==k&&k.$$typeof===Ta&&Ch(k)===n.type){c(a,n.sibling);d=e(n,f.props);d.ref=vc(a,
n,f);d.return=a;a=d;break a}c(a,n);break}else b(a,n);n=n.sibling}f.type===Bb?(d=sb(f.props.children,a.mode,h,f.key),d.return=a,a=d):(h=rd(f.type,f.key,f.props,null,a.mode,h),h.ref=vc(a,d,f),h.return=a,a=h)}return g(a);case Cb:a:{for(n=f.key;null!==d;){if(d.key===n)if(4===d.tag&&d.stateNode.containerInfo===f.containerInfo&&d.stateNode.implementation===f.implementation){c(a,d.sibling);d=e(d,f.children||[]);d.return=a;a=d;break a}else{c(a,d);break}else b(a,d);d=d.sibling}d=$e(f,a.mode,h);d.return=a;
a=d}return g(a);case Ta:return n=f._init,v(a,d,n(f._payload),h)}if(cc(f))return x(a,d,f,h);if(ac(f))return I(a,d,f,h);qd(a,f)}return"string"===typeof f&&""!==f||"number"===typeof f?(f=""+f,null!==d&&6===d.tag?(c(a,d.sibling),d=e(d,f),d.return=a,a=d):(c(a,d),d=Ze(f,a.mode,h),d.return=a,a=d),g(a)):c(a,d)}return v}function af(){bf=Rb=td=null}function cf(a,b){b=ud.current;v(ud);a._currentValue=b}function df(a,b,c){for(;null!==a;){var d=a.alternate;(a.childLanes&b)!==b?(a.childLanes|=b,null!==d&&(d.childLanes|=
b)):null!==d&&(d.childLanes&b)!==b&&(d.childLanes|=b);if(a===c)break;a=a.return}}function Sb(a,b){td=a;bf=Rb=null;a=a.dependencies;null!==a&&null!==a.firstContext&&(0!==(a.lanes&b)&&(ha=!0),a.firstContext=null)}function qa(a){var b=a._currentValue;if(bf!==a)if(a={context:a,memoizedValue:b,next:null},null===Rb){if(null===td)throw Error(m(308));Rb=a;td.dependencies={lanes:0,firstContext:a}}else Rb=Rb.next=a;return b}function ef(a){null===tb?tb=[a]:tb.push(a)}function Eh(a,b,c,d){var e=b.interleaved;
null===e?(c.next=c,ef(b)):(c.next=e.next,e.next=c);b.interleaved=c;return Oa(a,d)}function Oa(a,b){a.lanes|=b;var c=a.alternate;null!==c&&(c.lanes|=b);c=a;for(a=a.return;null!==a;)a.childLanes|=b,c=a.alternate,null!==c&&(c.childLanes|=b),c=a,a=a.return;return 3===c.tag?c.stateNode:null}function ff(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Fh(a,b){a=a.updateQueue;b.updateQueue===a&&(b.updateQueue=
{baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,effects:a.effects})}function Pa(a,b){return{eventTime:a,lane:b,tag:0,payload:null,callback:null,next:null}}function fb(a,b,c){var d=a.updateQueue;if(null===d)return null;d=d.shared;if(0!==(p&2)){var e=d.pending;null===e?b.next=b:(b.next=e.next,e.next=b);d.pending=b;return kk(a,c)}e=d.interleaved;null===e?(b.next=b,ef(d)):(b.next=e.next,e.next=b);d.interleaved=b;return Oa(a,c)}function vd(a,b,c){b=
b.updateQueue;if(null!==b&&(b=b.shared,0!==(c&4194240))){var d=b.lanes;d&=a.pendingLanes;c|=d;b.lanes=c;xe(a,c)}}function Gh(a,b){var c=a.updateQueue,d=a.alternate;if(null!==d&&(d=d.updateQueue,c===d)){var e=null,f=null;c=c.firstBaseUpdate;if(null!==c){do{var g={eventTime:c.eventTime,lane:c.lane,tag:c.tag,payload:c.payload,callback:c.callback,next:null};null===f?e=f=g:f=f.next=g;c=c.next}while(null!==c);null===f?e=f=b:f=f.next=b}else e=f=b;c={baseState:d.baseState,firstBaseUpdate:e,lastBaseUpdate:f,
shared:d.shared,effects:d.effects};a.updateQueue=c;return}a=c.lastBaseUpdate;null===a?c.firstBaseUpdate=b:a.next=b;c.lastBaseUpdate=b}function wd(a,b,c,d){var e=a.updateQueue;gb=!1;var f=e.firstBaseUpdate,g=e.lastBaseUpdate,h=e.shared.pending;if(null!==h){e.shared.pending=null;var k=h,n=k.next;k.next=null;null===g?f=n:g.next=n;g=k;var l=a.alternate;null!==l&&(l=l.updateQueue,h=l.lastBaseUpdate,h!==g&&(null===h?l.firstBaseUpdate=n:h.next=n,l.lastBaseUpdate=k))}if(null!==f){var m=e.baseState;g=0;l=
n=k=null;h=f;do{var r=h.lane,p=h.eventTime;if((d&r)===r){null!==l&&(l=l.next={eventTime:p,lane:0,tag:h.tag,payload:h.payload,callback:h.callback,next:null});a:{var x=a,v=h;r=b;p=c;switch(v.tag){case 1:x=v.payload;if("function"===typeof x){m=x.call(p,m,r);break a}m=x;break a;case 3:x.flags=x.flags&-65537|128;case 0:x=v.payload;r="function"===typeof x?x.call(p,m,r):x;if(null===r||void 0===r)break a;m=E({},m,r);break a;case 2:gb=!0}}null!==h.callback&&0!==h.lane&&(a.flags|=64,r=e.effects,null===r?e.effects=
[h]:r.push(h))}else p={eventTime:p,lane:r,tag:h.tag,payload:h.payload,callback:h.callback,next:null},null===l?(n=l=p,k=m):l=l.next=p,g|=r;h=h.next;if(null===h)if(h=e.shared.pending,null===h)break;else r=h,h=r.next,r.next=null,e.lastBaseUpdate=r,e.shared.pending=null}while(1);null===l&&(k=m);e.baseState=k;e.firstBaseUpdate=n;e.lastBaseUpdate=l;b=e.shared.interleaved;if(null!==b){e=b;do g|=e.lane,e=e.next;while(e!==b)}else null===f&&(e.shared.lanes=0);ra|=g;a.lanes=g;a.memoizedState=m}}function Hh(a,
b,c){a=b.effects;b.effects=null;if(null!==a)for(b=0;b<a.length;b++){var d=a[b],e=d.callback;if(null!==e){d.callback=null;d=c;if("function"!==typeof e)throw Error(m(191,e));e.call(d)}}}function ub(a){if(a===wc)throw Error(m(174));return a}function gf(a,b){y(xc,b);y(yc,a);y(Ea,wc);a=b.nodeType;switch(a){case 9:case 11:b=(b=b.documentElement)?b.namespaceURI:oe(null,"");break;default:a=8===a?b.parentNode:b,b=a.namespaceURI||null,a=a.tagName,b=oe(b,a)}v(Ea);y(Ea,b)}function Tb(a){v(Ea);v(yc);v(xc)}function Ih(a){ub(xc.current);
var b=ub(Ea.current);var c=oe(b,a.type);b!==c&&(y(yc,a),y(Ea,c))}function hf(a){yc.current===a&&(v(Ea),v(yc))}function xd(a){for(var b=a;null!==b;){if(13===b.tag){var c=b.memoizedState;if(null!==c&&(c=c.dehydrated,null===c||"$?"===c.data||"$!"===c.data))return b}else if(19===b.tag&&void 0!==b.memoizedProps.revealOrder){if(0!==(b.flags&128))return b}else if(null!==b.child){b.child.return=b;b=b.child;continue}if(b===a)break;for(;null===b.sibling;){if(null===b.return||b.return===a)return null;b=b.return}b.sibling.return=
b.return;b=b.sibling}return null}function jf(){for(var a=0;a<kf.length;a++)kf[a]._workInProgressVersionPrimary=null;kf.length=0}function V(){throw Error(m(321));}function lf(a,b){if(null===b)return!1;for(var c=0;c<b.length&&c<a.length;c++)if(!ua(a[c],b[c]))return!1;return!0}function mf(a,b,c,d,e,f){vb=f;C=b;b.memoizedState=null;b.updateQueue=null;b.lanes=0;yd.current=null===a||null===a.memoizedState?lk:mk;a=c(d,e);if(zc){f=0;do{zc=!1;Ac=0;if(25<=f)throw Error(m(301));f+=1;N=K=null;b.updateQueue=null;
yd.current=nk;a=c(d,e)}while(zc)}yd.current=zd;b=null!==K&&null!==K.next;vb=0;N=K=C=null;Ad=!1;if(b)throw Error(m(300));return a}function nf(){var a=0!==Ac;Ac=0;return a}function Fa(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};null===N?C.memoizedState=N=a:N=N.next=a;return N}function sa(){if(null===K){var a=C.alternate;a=null!==a?a.memoizedState:null}else a=K.next;var b=null===N?C.memoizedState:N.next;if(null!==b)N=b,K=a;else{if(null===a)throw Error(m(310));K=a;
a={memoizedState:K.memoizedState,baseState:K.baseState,baseQueue:K.baseQueue,queue:K.queue,next:null};null===N?C.memoizedState=N=a:N=N.next=a}return N}function Bc(a,b){return"function"===typeof b?b(a):b}function of(a,b,c){b=sa();c=b.queue;if(null===c)throw Error(m(311));c.lastRenderedReducer=a;var d=K,e=d.baseQueue,f=c.pending;if(null!==f){if(null!==e){var g=e.next;e.next=f.next;f.next=g}d.baseQueue=e=f;c.pending=null}if(null!==e){f=e.next;d=d.baseState;var h=g=null,k=null,n=f;do{var l=n.lane;if((vb&
l)===l)null!==k&&(k=k.next={lane:0,action:n.action,hasEagerState:n.hasEagerState,eagerState:n.eagerState,next:null}),d=n.hasEagerState?n.eagerState:a(d,n.action);else{var u={lane:l,action:n.action,hasEagerState:n.hasEagerState,eagerState:n.eagerState,next:null};null===k?(h=k=u,g=d):k=k.next=u;C.lanes|=l;ra|=l}n=n.next}while(null!==n&&n!==f);null===k?g=d:k.next=h;ua(d,b.memoizedState)||(ha=!0);b.memoizedState=d;b.baseState=g;b.baseQueue=k;c.lastRenderedState=d}a=c.interleaved;if(null!==a){e=a;do f=
e.lane,C.lanes|=f,ra|=f,e=e.next;while(e!==a)}else null===e&&(c.lanes=0);return[b.memoizedState,c.dispatch]}function pf(a,b,c){b=sa();c=b.queue;if(null===c)throw Error(m(311));c.lastRenderedReducer=a;var d=c.dispatch,e=c.pending,f=b.memoizedState;if(null!==e){c.pending=null;var g=e=e.next;do f=a(f,g.action),g=g.next;while(g!==e);ua(f,b.memoizedState)||(ha=!0);b.memoizedState=f;null===b.baseQueue&&(b.baseState=f);c.lastRenderedState=f}return[f,d]}function Jh(a,b,c){}function Kh(a,b,c){c=C;var d=sa(),
e=b(),f=!ua(d.memoizedState,e);f&&(d.memoizedState=e,ha=!0);d=d.queue;qf(Lh.bind(null,c,d,a),[a]);if(d.getSnapshot!==b||f||null!==N&&N.memoizedState.tag&1){c.flags|=2048;Cc(9,Mh.bind(null,c,d,e,b),void 0,null);if(null===O)throw Error(m(349));0!==(vb&30)||Nh(c,b,e)}return e}function Nh(a,b,c){a.flags|=16384;a={getSnapshot:b,value:c};b=C.updateQueue;null===b?(b={lastEffect:null,stores:null},C.updateQueue=b,b.stores=[a]):(c=b.stores,null===c?b.stores=[a]:c.push(a))}function Mh(a,b,c,d){b.value=c;b.getSnapshot=
d;Oh(b)&&Ph(a)}function Lh(a,b,c){return c(function(){Oh(b)&&Ph(a)})}function Oh(a){var b=a.getSnapshot;a=a.value;try{var c=b();return!ua(a,c)}catch(d){return!0}}function Ph(a){var b=Oa(a,1);null!==b&&xa(b,a,1,-1)}function Qh(a){var b=Fa();"function"===typeof a&&(a=a());b.memoizedState=b.baseState=a;a={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Bc,lastRenderedState:a};b.queue=a;a=a.dispatch=ok.bind(null,C,a);return[b.memoizedState,a]}function Cc(a,b,c,d){a={tag:a,create:b,
destroy:c,deps:d,next:null};b=C.updateQueue;null===b?(b={lastEffect:null,stores:null},C.updateQueue=b,b.lastEffect=a.next=a):(c=b.lastEffect,null===c?b.lastEffect=a.next=a:(d=c.next,c.next=a,a.next=d,b.lastEffect=a));return a}function Rh(a){return sa().memoizedState}function Bd(a,b,c,d){var e=Fa();C.flags|=a;e.memoizedState=Cc(1|b,c,void 0,void 0===d?null:d)}function Cd(a,b,c,d){var e=sa();d=void 0===d?null:d;var f=void 0;if(null!==K){var g=K.memoizedState;f=g.destroy;if(null!==d&&lf(d,g.deps)){e.memoizedState=
Cc(b,c,f,d);return}}C.flags|=a;e.memoizedState=Cc(1|b,c,f,d)}function Sh(a,b){return Bd(8390656,8,a,b)}function qf(a,b){return Cd(2048,8,a,b)}function Th(a,b){return Cd(4,2,a,b)}function Uh(a,b){return Cd(4,4,a,b)}function Vh(a,b){if("function"===typeof b)return a=a(),b(a),function(){b(null)};if(null!==b&&void 0!==b)return a=a(),b.current=a,function(){b.current=null}}function Wh(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;return Cd(4,4,Vh.bind(null,b,a),c)}function rf(a,b){}function Xh(a,b){var c=
sa();b=void 0===b?null:b;var d=c.memoizedState;if(null!==d&&null!==b&&lf(b,d[1]))return d[0];c.memoizedState=[a,b];return a}function Yh(a,b){var c=sa();b=void 0===b?null:b;var d=c.memoizedState;if(null!==d&&null!==b&&lf(b,d[1]))return d[0];a=a();c.memoizedState=[a,b];return a}function Zh(a,b,c){if(0===(vb&21))return a.baseState&&(a.baseState=!1,ha=!0),a.memoizedState=c;ua(c,b)||(c=Dg(),C.lanes|=c,ra|=c,a.baseState=!0);return b}function pk(a,b,c){c=z;z=0!==c&&4>c?c:4;a(!0);var d=sf.transition;sf.transition=
{};try{a(!1),b()}finally{z=c,sf.transition=d}}function $h(){return sa().memoizedState}function qk(a,b,c){var d=hb(a);c={lane:d,action:c,hasEagerState:!1,eagerState:null,next:null};if(ai(a))bi(b,c);else if(c=Eh(a,b,c,d),null!==c){var e=Z();xa(c,a,d,e);ci(c,b,d)}}function ok(a,b,c){var d=hb(a),e={lane:d,action:c,hasEagerState:!1,eagerState:null,next:null};if(ai(a))bi(b,e);else{var f=a.alternate;if(0===a.lanes&&(null===f||0===f.lanes)&&(f=b.lastRenderedReducer,null!==f))try{var g=b.lastRenderedState,
h=f(g,c);e.hasEagerState=!0;e.eagerState=h;if(ua(h,g)){var k=b.interleaved;null===k?(e.next=e,ef(b)):(e.next=k.next,k.next=e);b.interleaved=e;return}}catch(n){}finally{}c=Eh(a,b,e,d);null!==c&&(e=Z(),xa(c,a,d,e),ci(c,b,d))}}function ai(a){var b=a.alternate;return a===C||null!==b&&b===C}function bi(a,b){zc=Ad=!0;var c=a.pending;null===c?b.next=b:(b.next=c.next,c.next=b);a.pending=b}function ci(a,b,c){if(0!==(c&4194240)){var d=b.lanes;d&=a.pendingLanes;c|=d;b.lanes=c;xe(a,c)}}function ya(a,b){if(a&&
a.defaultProps){b=E({},b);a=a.defaultProps;for(var c in a)void 0===b[c]&&(b[c]=a[c]);return b}return b}function tf(a,b,c,d){b=a.memoizedState;c=c(d,b);c=null===c||void 0===c?b:E({},b,c);a.memoizedState=c;0===a.lanes&&(a.updateQueue.baseState=c)}function di(a,b,c,d,e,f,g){a=a.stateNode;return"function"===typeof a.shouldComponentUpdate?a.shouldComponentUpdate(d,f,g):b.prototype&&b.prototype.isPureReactComponent?!qc(c,d)||!qc(e,f):!0}function ei(a,b,c){var d=!1,e=cb;var f=b.contextType;"object"===typeof f&&
null!==f?f=qa(f):(e=ea(b)?pb:J.current,d=b.contextTypes,f=(d=null!==d&&void 0!==d)?Nb(a,e):cb);b=new b(c,f);a.memoizedState=null!==b.state&&void 0!==b.state?b.state:null;b.updater=Dd;a.stateNode=b;b._reactInternals=a;d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=e,a.__reactInternalMemoizedMaskedChildContext=f);return b}function fi(a,b,c,d){a=b.state;"function"===typeof b.componentWillReceiveProps&&b.componentWillReceiveProps(c,d);"function"===typeof b.UNSAFE_componentWillReceiveProps&&
b.UNSAFE_componentWillReceiveProps(c,d);b.state!==a&&Dd.enqueueReplaceState(b,b.state,null)}function uf(a,b,c,d){var e=a.stateNode;e.props=c;e.state=a.memoizedState;e.refs={};ff(a);var f=b.contextType;"object"===typeof f&&null!==f?e.context=qa(f):(f=ea(b)?pb:J.current,e.context=Nb(a,f));e.state=a.memoizedState;f=b.getDerivedStateFromProps;"function"===typeof f&&(tf(a,b,f,c),e.state=a.memoizedState);"function"===typeof b.getDerivedStateFromProps||"function"===typeof e.getSnapshotBeforeUpdate||"function"!==
typeof e.UNSAFE_componentWillMount&&"function"!==typeof e.componentWillMount||(b=e.state,"function"===typeof e.componentWillMount&&e.componentWillMount(),"function"===typeof e.UNSAFE_componentWillMount&&e.UNSAFE_componentWillMount(),b!==e.state&&Dd.enqueueReplaceState(e,e.state,null),wd(a,c,e,d),e.state=a.memoizedState);"function"===typeof e.componentDidMount&&(a.flags|=4194308)}function Ub(a,b){try{var c="",d=b;do c+=fj(d),d=d.return;while(d);var e=c}catch(f){e="\nError generating stack: "+f.message+
"\n"+f.stack}return{value:a,source:b,stack:e,digest:null}}function vf(a,b,c){return{value:a,source:null,stack:null!=c?c:null,digest:null!=b?b:null}}function wf(a,b){try{console.error(b.value)}catch(c){setTimeout(function(){throw c;})}}function gi(a,b,c){c=Pa(-1,c);c.tag=3;c.payload={element:null};var d=b.value;c.callback=function(){Ed||(Ed=!0,xf=d);wf(a,b)};return c}function hi(a,b,c){c=Pa(-1,c);c.tag=3;var d=a.type.getDerivedStateFromError;if("function"===typeof d){var e=b.value;c.payload=function(){return d(e)};
c.callback=function(){wf(a,b)}}var f=a.stateNode;null!==f&&"function"===typeof f.componentDidCatch&&(c.callback=function(){wf(a,b);"function"!==typeof d&&(null===ib?ib=new Set([this]):ib.add(this));var c=b.stack;this.componentDidCatch(b.value,{componentStack:null!==c?c:""})});return c}function ii(a,b,c){var d=a.pingCache;if(null===d){d=a.pingCache=new rk;var e=new Set;d.set(b,e)}else e=d.get(b),void 0===e&&(e=new Set,d.set(b,e));e.has(c)||(e.add(c),a=sk.bind(null,a,b,c),b.then(a,a))}function ji(a){do{var b;
if(b=13===a.tag)b=a.memoizedState,b=null!==b?null!==b.dehydrated?!0:!1:!0;if(b)return a;a=a.return}while(null!==a);return null}function ki(a,b,c,d,e){if(0===(a.mode&1))return a===b?a.flags|=65536:(a.flags|=128,c.flags|=131072,c.flags&=-52805,1===c.tag&&(null===c.alternate?c.tag=17:(b=Pa(-1,1),b.tag=2,fb(c,b,1))),c.lanes|=1),a;a.flags|=65536;a.lanes=e;return a}function aa(a,b,c,d){b.child=null===a?li(b,null,c,d):Vb(b,a.child,c,d)}function mi(a,b,c,d,e){c=c.render;var f=b.ref;Sb(b,e);d=mf(a,b,c,d,f,
e);c=nf();if(null!==a&&!ha)return b.updateQueue=a.updateQueue,b.flags&=-2053,a.lanes&=~e,Qa(a,b,e);D&&c&&Ue(b);b.flags|=1;aa(a,b,d,e);return b.child}function ni(a,b,c,d,e){if(null===a){var f=c.type;if("function"===typeof f&&!yf(f)&&void 0===f.defaultProps&&null===c.compare&&void 0===c.defaultProps)return b.tag=15,b.type=f,oi(a,b,f,d,e);a=rd(c.type,null,d,b,b.mode,e);a.ref=b.ref;a.return=b;return b.child=a}f=a.child;if(0===(a.lanes&e)){var g=f.memoizedProps;c=c.compare;c=null!==c?c:qc;if(c(g,d)&&a.ref===
b.ref)return Qa(a,b,e)}b.flags|=1;a=eb(f,d);a.ref=b.ref;a.return=b;return b.child=a}function oi(a,b,c,d,e){if(null!==a){var f=a.memoizedProps;if(qc(f,d)&&a.ref===b.ref)if(ha=!1,b.pendingProps=d=f,0!==(a.lanes&e))0!==(a.flags&131072)&&(ha=!0);else return b.lanes=a.lanes,Qa(a,b,e)}return zf(a,b,c,d,e)}function pi(a,b,c){var d=b.pendingProps,e=d.children,f=null!==a?a.memoizedState:null;if("hidden"===d.mode)if(0===(b.mode&1))b.memoizedState={baseLanes:0,cachePool:null,transitions:null},y(Ga,ba),ba|=c;
else{if(0===(c&1073741824))return a=null!==f?f.baseLanes|c:c,b.lanes=b.childLanes=1073741824,b.memoizedState={baseLanes:a,cachePool:null,transitions:null},b.updateQueue=null,y(Ga,ba),ba|=a,null;b.memoizedState={baseLanes:0,cachePool:null,transitions:null};d=null!==f?f.baseLanes:c;y(Ga,ba);ba|=d}else null!==f?(d=f.baseLanes|c,b.memoizedState=null):d=c,y(Ga,ba),ba|=d;aa(a,b,e,c);return b.child}function qi(a,b){var c=b.ref;if(null===a&&null!==c||null!==a&&a.ref!==c)b.flags|=512,b.flags|=2097152}function zf(a,
b,c,d,e){var f=ea(c)?pb:J.current;f=Nb(b,f);Sb(b,e);c=mf(a,b,c,d,f,e);d=nf();if(null!==a&&!ha)return b.updateQueue=a.updateQueue,b.flags&=-2053,a.lanes&=~e,Qa(a,b,e);D&&d&&Ue(b);b.flags|=1;aa(a,b,c,e);return b.child}function ri(a,b,c,d,e){if(ea(c)){var f=!0;ld(b)}else f=!1;Sb(b,e);if(null===b.stateNode)Fd(a,b),ei(b,c,d),uf(b,c,d,e),d=!0;else if(null===a){var g=b.stateNode,h=b.memoizedProps;g.props=h;var k=g.context,n=c.contextType;"object"===typeof n&&null!==n?n=qa(n):(n=ea(c)?pb:J.current,n=Nb(b,
n));var l=c.getDerivedStateFromProps,m="function"===typeof l||"function"===typeof g.getSnapshotBeforeUpdate;m||"function"!==typeof g.UNSAFE_componentWillReceiveProps&&"function"!==typeof g.componentWillReceiveProps||(h!==d||k!==n)&&fi(b,g,d,n);gb=!1;var r=b.memoizedState;g.state=r;wd(b,d,g,e);k=b.memoizedState;h!==d||r!==k||S.current||gb?("function"===typeof l&&(tf(b,c,l,d),k=b.memoizedState),(h=gb||di(b,c,h,d,r,k,n))?(m||"function"!==typeof g.UNSAFE_componentWillMount&&"function"!==typeof g.componentWillMount||
("function"===typeof g.componentWillMount&&g.componentWillMount(),"function"===typeof g.UNSAFE_componentWillMount&&g.UNSAFE_componentWillMount()),"function"===typeof g.componentDidMount&&(b.flags|=4194308)):("function"===typeof g.componentDidMount&&(b.flags|=4194308),b.memoizedProps=d,b.memoizedState=k),g.props=d,g.state=k,g.context=n,d=h):("function"===typeof g.componentDidMount&&(b.flags|=4194308),d=!1)}else{g=b.stateNode;Fh(a,b);h=b.memoizedProps;n=b.type===b.elementType?h:ya(b.type,h);g.props=
n;m=b.pendingProps;r=g.context;k=c.contextType;"object"===typeof k&&null!==k?k=qa(k):(k=ea(c)?pb:J.current,k=Nb(b,k));var p=c.getDerivedStateFromProps;(l="function"===typeof p||"function"===typeof g.getSnapshotBeforeUpdate)||"function"!==typeof g.UNSAFE_componentWillReceiveProps&&"function"!==typeof g.componentWillReceiveProps||(h!==m||r!==k)&&fi(b,g,d,k);gb=!1;r=b.memoizedState;g.state=r;wd(b,d,g,e);var x=b.memoizedState;h!==m||r!==x||S.current||gb?("function"===typeof p&&(tf(b,c,p,d),x=b.memoizedState),
(n=gb||di(b,c,n,d,r,x,k)||!1)?(l||"function"!==typeof g.UNSAFE_componentWillUpdate&&"function"!==typeof g.componentWillUpdate||("function"===typeof g.componentWillUpdate&&g.componentWillUpdate(d,x,k),"function"===typeof g.UNSAFE_componentWillUpdate&&g.UNSAFE_componentWillUpdate(d,x,k)),"function"===typeof g.componentDidUpdate&&(b.flags|=4),"function"===typeof g.getSnapshotBeforeUpdate&&(b.flags|=1024)):("function"!==typeof g.componentDidUpdate||h===a.memoizedProps&&r===a.memoizedState||(b.flags|=
4),"function"!==typeof g.getSnapshotBeforeUpdate||h===a.memoizedProps&&r===a.memoizedState||(b.flags|=1024),b.memoizedProps=d,b.memoizedState=x),g.props=d,g.state=x,g.context=k,d=n):("function"!==typeof g.componentDidUpdate||h===a.memoizedProps&&r===a.memoizedState||(b.flags|=4),"function"!==typeof g.getSnapshotBeforeUpdate||h===a.memoizedProps&&r===a.memoizedState||(b.flags|=1024),d=!1)}return Af(a,b,c,d,f,e)}function Af(a,b,c,d,e,f){qi(a,b);var g=0!==(b.flags&128);if(!d&&!g)return e&&vh(b,c,!1),
Qa(a,b,f);d=b.stateNode;tk.current=b;var h=g&&"function"!==typeof c.getDerivedStateFromError?null:d.render();b.flags|=1;null!==a&&g?(b.child=Vb(b,a.child,null,f),b.child=Vb(b,null,h,f)):aa(a,b,h,f);b.memoizedState=d.state;e&&vh(b,c,!0);return b.child}function si(a){var b=a.stateNode;b.pendingContext?th(a,b.pendingContext,b.pendingContext!==b.context):b.context&&th(a,b.context,!1);gf(a,b.containerInfo)}function ti(a,b,c,d,e){Qb();Ye(e);b.flags|=256;aa(a,b,c,d);return b.child}function Bf(a){return{baseLanes:a,
cachePool:null,transitions:null}}function ui(a,b,c){var d=b.pendingProps,e=F.current,f=!1,g=0!==(b.flags&128),h;(h=g)||(h=null!==a&&null===a.memoizedState?!1:0!==(e&2));if(h)f=!0,b.flags&=-129;else if(null===a||null!==a.memoizedState)e|=1;y(F,e&1);if(null===a){Xe(b);a=b.memoizedState;if(null!==a&&(a=a.dehydrated,null!==a))return 0===(b.mode&1)?b.lanes=1:"$!"===a.data?b.lanes=8:b.lanes=1073741824,null;g=d.children;a=d.fallback;return f?(d=b.mode,f=b.child,g={mode:"hidden",children:g},0===(d&1)&&null!==
f?(f.childLanes=0,f.pendingProps=g):f=Gd(g,d,0,null),a=sb(a,d,c,null),f.return=b,a.return=b,f.sibling=a,b.child=f,b.child.memoizedState=Bf(c),b.memoizedState=Cf,a):Df(b,g)}e=a.memoizedState;if(null!==e&&(h=e.dehydrated,null!==h))return uk(a,b,g,d,h,e,c);if(f){f=d.fallback;g=b.mode;e=a.child;h=e.sibling;var k={mode:"hidden",children:d.children};0===(g&1)&&b.child!==e?(d=b.child,d.childLanes=0,d.pendingProps=k,b.deletions=null):(d=eb(e,k),d.subtreeFlags=e.subtreeFlags&14680064);null!==h?f=eb(h,f):(f=
sb(f,g,c,null),f.flags|=2);f.return=b;d.return=b;d.sibling=f;b.child=d;d=f;f=b.child;g=a.child.memoizedState;g=null===g?Bf(c):{baseLanes:g.baseLanes|c,cachePool:null,transitions:g.transitions};f.memoizedState=g;f.childLanes=a.childLanes&~c;b.memoizedState=Cf;return d}f=a.child;a=f.sibling;d=eb(f,{mode:"visible",children:d.children});0===(b.mode&1)&&(d.lanes=c);d.return=b;d.sibling=null;null!==a&&(c=b.deletions,null===c?(b.deletions=[a],b.flags|=16):c.push(a));b.child=d;b.memoizedState=null;return d}
function Df(a,b,c){b=Gd({mode:"visible",children:b},a.mode,0,null);b.return=a;return a.child=b}function Hd(a,b,c,d){null!==d&&Ye(d);Vb(b,a.child,null,c);a=Df(b,b.pendingProps.children);a.flags|=2;b.memoizedState=null;return a}function uk(a,b,c,d,e,f,g){if(c){if(b.flags&256)return b.flags&=-257,d=vf(Error(m(422))),Hd(a,b,g,d);if(null!==b.memoizedState)return b.child=a.child,b.flags|=128,null;f=d.fallback;e=b.mode;d=Gd({mode:"visible",children:d.children},e,0,null);f=sb(f,e,g,null);f.flags|=2;d.return=
b;f.return=b;d.sibling=f;b.child=d;0!==(b.mode&1)&&Vb(b,a.child,null,g);b.child.memoizedState=Bf(g);b.memoizedState=Cf;return f}if(0===(b.mode&1))return Hd(a,b,g,null);if("$!"===e.data){d=e.nextSibling&&e.nextSibling.dataset;if(d)var h=d.dgst;d=h;f=Error(m(419));d=vf(f,d,void 0);return Hd(a,b,g,d)}h=0!==(g&a.childLanes);if(ha||h){d=O;if(null!==d){switch(g&-g){case 4:e=2;break;case 16:e=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:e=
32;break;case 536870912:e=268435456;break;default:e=0}e=0!==(e&(d.suspendedLanes|g))?0:e;0!==e&&e!==f.retryLane&&(f.retryLane=e,Oa(a,e),xa(d,a,e,-1))}Ef();d=vf(Error(m(421)));return Hd(a,b,g,d)}if("$?"===e.data)return b.flags|=128,b.child=a.child,b=vk.bind(null,a),e._reactRetry=b,null;a=f.treeContext;fa=Ka(e.nextSibling);la=b;D=!0;wa=null;null!==a&&(na[oa++]=Ma,na[oa++]=Na,na[oa++]=rb,Ma=a.id,Na=a.overflow,rb=b);b=Df(b,d.children);b.flags|=4096;return b}function vi(a,b,c){a.lanes|=b;var d=a.alternate;
null!==d&&(d.lanes|=b);df(a.return,b,c)}function Ff(a,b,c,d,e){var f=a.memoizedState;null===f?a.memoizedState={isBackwards:b,rendering:null,renderingStartTime:0,last:d,tail:c,tailMode:e}:(f.isBackwards=b,f.rendering=null,f.renderingStartTime=0,f.last=d,f.tail=c,f.tailMode=e)}function wi(a,b,c){var d=b.pendingProps,e=d.revealOrder,f=d.tail;aa(a,b,d.children,c);d=F.current;if(0!==(d&2))d=d&1|2,b.flags|=128;else{if(null!==a&&0!==(a.flags&128))a:for(a=b.child;null!==a;){if(13===a.tag)null!==a.memoizedState&&
vi(a,c,b);else if(19===a.tag)vi(a,c,b);else if(null!==a.child){a.child.return=a;a=a.child;continue}if(a===b)break a;for(;null===a.sibling;){if(null===a.return||a.return===b)break a;a=a.return}a.sibling.return=a.return;a=a.sibling}d&=1}y(F,d);if(0===(b.mode&1))b.memoizedState=null;else switch(e){case "forwards":c=b.child;for(e=null;null!==c;)a=c.alternate,null!==a&&null===xd(a)&&(e=c),c=c.sibling;c=e;null===c?(e=b.child,b.child=null):(e=c.sibling,c.sibling=null);Ff(b,!1,e,c,f);break;case "backwards":c=
null;e=b.child;for(b.child=null;null!==e;){a=e.alternate;if(null!==a&&null===xd(a)){b.child=e;break}a=e.sibling;e.sibling=c;c=e;e=a}Ff(b,!0,c,null,f);break;case "together":Ff(b,!1,null,null,void 0);break;default:b.memoizedState=null}return b.child}function Fd(a,b){0===(b.mode&1)&&null!==a&&(a.alternate=null,b.alternate=null,b.flags|=2)}function Qa(a,b,c){null!==a&&(b.dependencies=a.dependencies);ra|=b.lanes;if(0===(c&b.childLanes))return null;if(null!==a&&b.child!==a.child)throw Error(m(153));if(null!==
b.child){a=b.child;c=eb(a,a.pendingProps);b.child=c;for(c.return=b;null!==a.sibling;)a=a.sibling,c=c.sibling=eb(a,a.pendingProps),c.return=b;c.sibling=null}return b.child}function wk(a,b,c){switch(b.tag){case 3:si(b);Qb();break;case 5:Ih(b);break;case 1:ea(b.type)&&ld(b);break;case 4:gf(b,b.stateNode.containerInfo);break;case 10:var d=b.type._context,e=b.memoizedProps.value;y(ud,d._currentValue);d._currentValue=e;break;case 13:d=b.memoizedState;if(null!==d){if(null!==d.dehydrated)return y(F,F.current&
1),b.flags|=128,null;if(0!==(c&b.child.childLanes))return ui(a,b,c);y(F,F.current&1);a=Qa(a,b,c);return null!==a?a.sibling:null}y(F,F.current&1);break;case 19:d=0!==(c&b.childLanes);if(0!==(a.flags&128)){if(d)return wi(a,b,c);b.flags|=128}e=b.memoizedState;null!==e&&(e.rendering=null,e.tail=null,e.lastEffect=null);y(F,F.current);if(d)break;else return null;case 22:case 23:return b.lanes=0,pi(a,b,c)}return Qa(a,b,c)}function Dc(a,b){if(!D)switch(a.tailMode){case "hidden":b=a.tail;for(var c=null;null!==
b;)null!==b.alternate&&(c=b),b=b.sibling;null===c?a.tail=null:c.sibling=null;break;case "collapsed":c=a.tail;for(var d=null;null!==c;)null!==c.alternate&&(d=c),c=c.sibling;null===d?b||null===a.tail?a.tail=null:a.tail.sibling=null:d.sibling=null}}function W(a){var b=null!==a.alternate&&a.alternate.child===a.child,c=0,d=0;if(b)for(var e=a.child;null!==e;)c|=e.lanes|e.childLanes,d|=e.subtreeFlags&14680064,d|=e.flags&14680064,e.return=a,e=e.sibling;else for(e=a.child;null!==e;)c|=e.lanes|e.childLanes,
d|=e.subtreeFlags,d|=e.flags,e.return=a,e=e.sibling;a.subtreeFlags|=d;a.childLanes=c;return b}function xk(a,b,c){var d=b.pendingProps;Ve(b);switch(b.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return W(b),null;case 1:return ea(b.type)&&(v(S),v(J)),W(b),null;case 3:d=b.stateNode;Tb();v(S);v(J);jf();d.pendingContext&&(d.context=d.pendingContext,d.pendingContext=null);if(null===a||null===a.child)pd(b)?b.flags|=4:null===a||a.memoizedState.isDehydrated&&0===(b.flags&
256)||(b.flags|=1024,null!==wa&&(Gf(wa),wa=null));xi(a,b);W(b);return null;case 5:hf(b);var e=ub(xc.current);c=b.type;if(null!==a&&null!=b.stateNode)yk(a,b,c,d,e),a.ref!==b.ref&&(b.flags|=512,b.flags|=2097152);else{if(!d){if(null===b.stateNode)throw Error(m(166));W(b);return null}a=ub(Ea.current);if(pd(b)){d=b.stateNode;c=b.type;var f=b.memoizedProps;d[Da]=b;d[uc]=f;a=0!==(b.mode&1);switch(c){case "dialog":B("cancel",d);B("close",d);break;case "iframe":case "object":case "embed":B("load",d);break;
case "video":case "audio":for(e=0;e<Ec.length;e++)B(Ec[e],d);break;case "source":B("error",d);break;case "img":case "image":case "link":B("error",d);B("load",d);break;case "details":B("toggle",d);break;case "input":kg(d,f);B("invalid",d);break;case "select":d._wrapperState={wasMultiple:!!f.multiple};B("invalid",d);break;case "textarea":ng(d,f),B("invalid",d)}pe(c,f);e=null;for(var g in f)if(f.hasOwnProperty(g)){var h=f[g];"children"===g?"string"===typeof h?d.textContent!==h&&(!0!==f.suppressHydrationWarning&&
jd(d.textContent,h,a),e=["children",h]):"number"===typeof h&&d.textContent!==""+h&&(!0!==f.suppressHydrationWarning&&jd(d.textContent,h,a),e=["children",""+h]):$b.hasOwnProperty(g)&&null!=h&&"onScroll"===g&&B("scroll",d)}switch(c){case "input":Pc(d);mg(d,f,!0);break;case "textarea":Pc(d);pg(d);break;case "select":case "option":break;default:"function"===typeof f.onClick&&(d.onclick=kd)}d=e;b.updateQueue=d;null!==d&&(b.flags|=4)}else{g=9===e.nodeType?e:e.ownerDocument;"http://www.w3.org/1999/xhtml"===
a&&(a=qg(c));"http://www.w3.org/1999/xhtml"===a?"script"===c?(a=g.createElement("div"),a.innerHTML="<script>\x3c/script>",a=a.removeChild(a.firstChild)):"string"===typeof d.is?a=g.createElement(c,{is:d.is}):(a=g.createElement(c),"select"===c&&(g=a,d.multiple?g.multiple=!0:d.size&&(g.size=d.size))):a=g.createElementNS(a,c);a[Da]=b;a[uc]=d;zk(a,b,!1,!1);b.stateNode=a;a:{g=qe(c,d);switch(c){case "dialog":B("cancel",a);B("close",a);e=d;break;case "iframe":case "object":case "embed":B("load",a);e=d;break;
case "video":case "audio":for(e=0;e<Ec.length;e++)B(Ec[e],a);e=d;break;case "source":B("error",a);e=d;break;case "img":case "image":case "link":B("error",a);B("load",a);e=d;break;case "details":B("toggle",a);e=d;break;case "input":kg(a,d);e=ke(a,d);B("invalid",a);break;case "option":e=d;break;case "select":a._wrapperState={wasMultiple:!!d.multiple};e=E({},d,{value:void 0});B("invalid",a);break;case "textarea":ng(a,d);e=ne(a,d);B("invalid",a);break;default:e=d}pe(c,e);h=e;for(f in h)if(h.hasOwnProperty(f)){var k=
h[f];"style"===f?sg(a,k):"dangerouslySetInnerHTML"===f?(k=k?k.__html:void 0,null!=k&&yi(a,k)):"children"===f?"string"===typeof k?("textarea"!==c||""!==k)&&Fc(a,k):"number"===typeof k&&Fc(a,""+k):"suppressContentEditableWarning"!==f&&"suppressHydrationWarning"!==f&&"autoFocus"!==f&&($b.hasOwnProperty(f)?null!=k&&"onScroll"===f&&B("scroll",a):null!=k&&$d(a,f,k,g))}switch(c){case "input":Pc(a);mg(a,d,!1);break;case "textarea":Pc(a);pg(a);break;case "option":null!=d.value&&a.setAttribute("value",""+Ua(d.value));
break;case "select":a.multiple=!!d.multiple;f=d.value;null!=f?Db(a,!!d.multiple,f,!1):null!=d.defaultValue&&Db(a,!!d.multiple,d.defaultValue,!0);break;default:"function"===typeof e.onClick&&(a.onclick=kd)}switch(c){case "button":case "input":case "select":case "textarea":d=!!d.autoFocus;break a;case "img":d=!0;break a;default:d=!1}}d&&(b.flags|=4)}null!==b.ref&&(b.flags|=512,b.flags|=2097152)}W(b);return null;case 6:if(a&&null!=b.stateNode)Ak(a,b,a.memoizedProps,d);else{if("string"!==typeof d&&null===
b.stateNode)throw Error(m(166));c=ub(xc.current);ub(Ea.current);if(pd(b)){d=b.stateNode;c=b.memoizedProps;d[Da]=b;if(f=d.nodeValue!==c)if(a=la,null!==a)switch(a.tag){case 3:jd(d.nodeValue,c,0!==(a.mode&1));break;case 5:!0!==a.memoizedProps.suppressHydrationWarning&&jd(d.nodeValue,c,0!==(a.mode&1))}f&&(b.flags|=4)}else d=(9===c.nodeType?c:c.ownerDocument).createTextNode(d),d[Da]=b,b.stateNode=d}W(b);return null;case 13:v(F);d=b.memoizedState;if(null===a||null!==a.memoizedState&&null!==a.memoizedState.dehydrated){if(D&&
null!==fa&&0!==(b.mode&1)&&0===(b.flags&128)){for(f=fa;f;)f=Ka(f.nextSibling);Qb();b.flags|=98560;f=!1}else if(f=pd(b),null!==d&&null!==d.dehydrated){if(null===a){if(!f)throw Error(m(318));f=b.memoizedState;f=null!==f?f.dehydrated:null;if(!f)throw Error(m(317));f[Da]=b}else Qb(),0===(b.flags&128)&&(b.memoizedState=null),b.flags|=4;W(b);f=!1}else null!==wa&&(Gf(wa),wa=null),f=!0;if(!f)return b.flags&65536?b:null}if(0!==(b.flags&128))return b.lanes=c,b;d=null!==d;d!==(null!==a&&null!==a.memoizedState)&&
d&&(b.child.flags|=8192,0!==(b.mode&1)&&(null===a||0!==(F.current&1)?0===L&&(L=3):Ef()));null!==b.updateQueue&&(b.flags|=4);W(b);return null;case 4:return Tb(),xi(a,b),null===a&&sc(b.stateNode.containerInfo),W(b),null;case 10:return cf(b.type._context),W(b),null;case 17:return ea(b.type)&&(v(S),v(J)),W(b),null;case 19:v(F);f=b.memoizedState;if(null===f)return W(b),null;d=0!==(b.flags&128);g=f.rendering;if(null===g)if(d)Dc(f,!1);else{if(0!==L||null!==a&&0!==(a.flags&128))for(a=b.child;null!==a;){g=
xd(a);if(null!==g){b.flags|=128;Dc(f,!1);d=g.updateQueue;null!==d&&(b.updateQueue=d,b.flags|=4);b.subtreeFlags=0;d=c;for(c=b.child;null!==c;)f=c,a=d,f.flags&=14680066,g=f.alternate,null===g?(f.childLanes=0,f.lanes=a,f.child=null,f.subtreeFlags=0,f.memoizedProps=null,f.memoizedState=null,f.updateQueue=null,f.dependencies=null,f.stateNode=null):(f.childLanes=g.childLanes,f.lanes=g.lanes,f.child=g.child,f.subtreeFlags=0,f.deletions=null,f.memoizedProps=g.memoizedProps,f.memoizedState=g.memoizedState,
f.updateQueue=g.updateQueue,f.type=g.type,a=g.dependencies,f.dependencies=null===a?null:{lanes:a.lanes,firstContext:a.firstContext}),c=c.sibling;y(F,F.current&1|2);return b.child}a=a.sibling}null!==f.tail&&P()>Hf&&(b.flags|=128,d=!0,Dc(f,!1),b.lanes=4194304)}else{if(!d)if(a=xd(g),null!==a){if(b.flags|=128,d=!0,c=a.updateQueue,null!==c&&(b.updateQueue=c,b.flags|=4),Dc(f,!0),null===f.tail&&"hidden"===f.tailMode&&!g.alternate&&!D)return W(b),null}else 2*P()-f.renderingStartTime>Hf&&1073741824!==c&&(b.flags|=
128,d=!0,Dc(f,!1),b.lanes=4194304);f.isBackwards?(g.sibling=b.child,b.child=g):(c=f.last,null!==c?c.sibling=g:b.child=g,f.last=g)}if(null!==f.tail)return b=f.tail,f.rendering=b,f.tail=b.sibling,f.renderingStartTime=P(),b.sibling=null,c=F.current,y(F,d?c&1|2:c&1),b;W(b);return null;case 22:case 23:return ba=Ga.current,v(Ga),d=null!==b.memoizedState,null!==a&&null!==a.memoizedState!==d&&(b.flags|=8192),d&&0!==(b.mode&1)?0!==(ba&1073741824)&&(W(b),b.subtreeFlags&6&&(b.flags|=8192)):W(b),null;case 24:return null;
case 25:return null}throw Error(m(156,b.tag));}function Bk(a,b,c){Ve(b);switch(b.tag){case 1:return ea(b.type)&&(v(S),v(J)),a=b.flags,a&65536?(b.flags=a&-65537|128,b):null;case 3:return Tb(),v(S),v(J),jf(),a=b.flags,0!==(a&65536)&&0===(a&128)?(b.flags=a&-65537|128,b):null;case 5:return hf(b),null;case 13:v(F);a=b.memoizedState;if(null!==a&&null!==a.dehydrated){if(null===b.alternate)throw Error(m(340));Qb()}a=b.flags;return a&65536?(b.flags=a&-65537|128,b):null;case 19:return v(F),null;case 4:return Tb(),
null;case 10:return cf(b.type._context),null;case 22:case 23:return ba=Ga.current,v(Ga),null;case 24:return null;default:return null}}function Wb(a,b){var c=a.ref;if(null!==c)if("function"===typeof c)try{c(null)}catch(d){G(a,b,d)}else c.current=null}function If(a,b,c){try{c()}catch(d){G(a,b,d)}}function Ck(a,b){Jf=Zc;a=ch();if(Ie(a)){if("selectionStart"in a)var c={start:a.selectionStart,end:a.selectionEnd};else a:{c=(c=a.ownerDocument)&&c.defaultView||window;var d=c.getSelection&&c.getSelection();
if(d&&0!==d.rangeCount){c=d.anchorNode;var e=d.anchorOffset,f=d.focusNode;d=d.focusOffset;try{c.nodeType,f.nodeType}catch(M){c=null;break a}var g=0,h=-1,k=-1,n=0,q=0,u=a,r=null;b:for(;;){for(var p;;){u!==c||0!==e&&3!==u.nodeType||(h=g+e);u!==f||0!==d&&3!==u.nodeType||(k=g+d);3===u.nodeType&&(g+=u.nodeValue.length);if(null===(p=u.firstChild))break;r=u;u=p}for(;;){if(u===a)break b;r===c&&++n===e&&(h=g);r===f&&++q===d&&(k=g);if(null!==(p=u.nextSibling))break;u=r;r=u.parentNode}u=p}c=-1===h||-1===k?null:
{start:h,end:k}}else c=null}c=c||{start:0,end:0}}else c=null;Kf={focusedElem:a,selectionRange:c};Zc=!1;for(l=b;null!==l;)if(b=l,a=b.child,0!==(b.subtreeFlags&1028)&&null!==a)a.return=b,l=a;else for(;null!==l;){b=l;try{var x=b.alternate;if(0!==(b.flags&1024))switch(b.tag){case 0:case 11:case 15:break;case 1:if(null!==x){var v=x.memoizedProps,z=x.memoizedState,w=b.stateNode,A=w.getSnapshotBeforeUpdate(b.elementType===b.type?v:ya(b.type,v),z);w.__reactInternalSnapshotBeforeUpdate=A}break;case 3:var t=
b.stateNode.containerInfo;1===t.nodeType?t.textContent="":9===t.nodeType&&t.documentElement&&t.removeChild(t.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(m(163));}}catch(M){G(b,b.return,M)}a=b.sibling;if(null!==a){a.return=b.return;l=a;break}l=b.return}x=zi;zi=!1;return x}function Gc(a,b,c){var d=b.updateQueue;d=null!==d?d.lastEffect:null;if(null!==d){var e=d=d.next;do{if((e.tag&a)===a){var f=e.destroy;e.destroy=void 0;void 0!==f&&If(b,c,f)}e=e.next}while(e!==d)}}
function Id(a,b){b=b.updateQueue;b=null!==b?b.lastEffect:null;if(null!==b){var c=b=b.next;do{if((c.tag&a)===a){var d=c.create;c.destroy=d()}c=c.next}while(c!==b)}}function Lf(a){var b=a.ref;if(null!==b){var c=a.stateNode;switch(a.tag){case 5:a=c;break;default:a=c}"function"===typeof b?b(a):b.current=a}}function Ai(a){var b=a.alternate;null!==b&&(a.alternate=null,Ai(b));a.child=null;a.deletions=null;a.sibling=null;5===a.tag&&(b=a.stateNode,null!==b&&(delete b[Da],delete b[uc],delete b[Me],delete b[Dk],
delete b[Ek]));a.stateNode=null;a.return=null;a.dependencies=null;a.memoizedProps=null;a.memoizedState=null;a.pendingProps=null;a.stateNode=null;a.updateQueue=null}function Bi(a){return 5===a.tag||3===a.tag||4===a.tag}function Ci(a){a:for(;;){for(;null===a.sibling;){if(null===a.return||Bi(a.return))return null;a=a.return}a.sibling.return=a.return;for(a=a.sibling;5!==a.tag&&6!==a.tag&&18!==a.tag;){if(a.flags&2)continue a;if(null===a.child||4===a.tag)continue a;else a.child.return=a,a=a.child}if(!(a.flags&
2))return a.stateNode}}function Mf(a,b,c){var d=a.tag;if(5===d||6===d)a=a.stateNode,b?8===c.nodeType?c.parentNode.insertBefore(a,b):c.insertBefore(a,b):(8===c.nodeType?(b=c.parentNode,b.insertBefore(a,c)):(b=c,b.appendChild(a)),c=c._reactRootContainer,null!==c&&void 0!==c||null!==b.onclick||(b.onclick=kd));else if(4!==d&&(a=a.child,null!==a))for(Mf(a,b,c),a=a.sibling;null!==a;)Mf(a,b,c),a=a.sibling}function Nf(a,b,c){var d=a.tag;if(5===d||6===d)a=a.stateNode,b?c.insertBefore(a,b):c.appendChild(a);
else if(4!==d&&(a=a.child,null!==a))for(Nf(a,b,c),a=a.sibling;null!==a;)Nf(a,b,c),a=a.sibling}function jb(a,b,c){for(c=c.child;null!==c;)Di(a,b,c),c=c.sibling}function Di(a,b,c){if(Ca&&"function"===typeof Ca.onCommitFiberUnmount)try{Ca.onCommitFiberUnmount(Uc,c)}catch(h){}switch(c.tag){case 5:X||Wb(c,b);case 6:var d=T,e=za;T=null;jb(a,b,c);T=d;za=e;null!==T&&(za?(a=T,c=c.stateNode,8===a.nodeType?a.parentNode.removeChild(c):a.removeChild(c)):T.removeChild(c.stateNode));break;case 18:null!==T&&(za?
(a=T,c=c.stateNode,8===a.nodeType?Re(a.parentNode,c):1===a.nodeType&&Re(a,c),nc(a)):Re(T,c.stateNode));break;case 4:d=T;e=za;T=c.stateNode.containerInfo;za=!0;jb(a,b,c);T=d;za=e;break;case 0:case 11:case 14:case 15:if(!X&&(d=c.updateQueue,null!==d&&(d=d.lastEffect,null!==d))){e=d=d.next;do{var f=e,g=f.destroy;f=f.tag;void 0!==g&&(0!==(f&2)?If(c,b,g):0!==(f&4)&&If(c,b,g));e=e.next}while(e!==d)}jb(a,b,c);break;case 1:if(!X&&(Wb(c,b),d=c.stateNode,"function"===typeof d.componentWillUnmount))try{d.props=
c.memoizedProps,d.state=c.memoizedState,d.componentWillUnmount()}catch(h){G(c,b,h)}jb(a,b,c);break;case 21:jb(a,b,c);break;case 22:c.mode&1?(X=(d=X)||null!==c.memoizedState,jb(a,b,c),X=d):jb(a,b,c);break;default:jb(a,b,c)}}function Ei(a){var b=a.updateQueue;if(null!==b){a.updateQueue=null;var c=a.stateNode;null===c&&(c=a.stateNode=new Fk);b.forEach(function(b){var d=Gk.bind(null,a,b);c.has(b)||(c.add(b),b.then(d,d))})}}function Aa(a,b,c){c=b.deletions;if(null!==c)for(var d=0;d<c.length;d++){var e=
c[d];try{var f=a,g=b,h=g;a:for(;null!==h;){switch(h.tag){case 5:T=h.stateNode;za=!1;break a;case 3:T=h.stateNode.containerInfo;za=!0;break a;case 4:T=h.stateNode.containerInfo;za=!0;break a}h=h.return}if(null===T)throw Error(m(160));Di(f,g,e);T=null;za=!1;var k=e.alternate;null!==k&&(k.return=null);e.return=null}catch(n){G(e,b,n)}}if(b.subtreeFlags&12854)for(b=b.child;null!==b;)Fi(b,a),b=b.sibling}function Fi(a,b,c){var d=a.alternate;c=a.flags;switch(a.tag){case 0:case 11:case 14:case 15:Aa(b,a);
Ha(a);if(c&4){try{Gc(3,a,a.return),Id(3,a)}catch(I){G(a,a.return,I)}try{Gc(5,a,a.return)}catch(I){G(a,a.return,I)}}break;case 1:Aa(b,a);Ha(a);c&512&&null!==d&&Wb(d,d.return);break;case 5:Aa(b,a);Ha(a);c&512&&null!==d&&Wb(d,d.return);if(a.flags&32){var e=a.stateNode;try{Fc(e,"")}catch(I){G(a,a.return,I)}}if(c&4&&(e=a.stateNode,null!=e)){var f=a.memoizedProps,g=null!==d?d.memoizedProps:f,h=a.type,k=a.updateQueue;a.updateQueue=null;if(null!==k)try{"input"===h&&"radio"===f.type&&null!=f.name&&lg(e,f);
qe(h,g);var n=qe(h,f);for(g=0;g<k.length;g+=2){var q=k[g],u=k[g+1];"style"===q?sg(e,u):"dangerouslySetInnerHTML"===q?yi(e,u):"children"===q?Fc(e,u):$d(e,q,u,n)}switch(h){case "input":le(e,f);break;case "textarea":og(e,f);break;case "select":var r=e._wrapperState.wasMultiple;e._wrapperState.wasMultiple=!!f.multiple;var p=f.value;null!=p?Db(e,!!f.multiple,p,!1):r!==!!f.multiple&&(null!=f.defaultValue?Db(e,!!f.multiple,f.defaultValue,!0):Db(e,!!f.multiple,f.multiple?[]:"",!1))}e[uc]=f}catch(I){G(a,a.return,
I)}}break;case 6:Aa(b,a);Ha(a);if(c&4){if(null===a.stateNode)throw Error(m(162));e=a.stateNode;f=a.memoizedProps;try{e.nodeValue=f}catch(I){G(a,a.return,I)}}break;case 3:Aa(b,a);Ha(a);if(c&4&&null!==d&&d.memoizedState.isDehydrated)try{nc(b.containerInfo)}catch(I){G(a,a.return,I)}break;case 4:Aa(b,a);Ha(a);break;case 13:Aa(b,a);Ha(a);e=a.child;e.flags&8192&&(f=null!==e.memoizedState,e.stateNode.isHidden=f,!f||null!==e.alternate&&null!==e.alternate.memoizedState||(Of=P()));c&4&&Ei(a);break;case 22:q=
null!==d&&null!==d.memoizedState;a.mode&1?(X=(n=X)||q,Aa(b,a),X=n):Aa(b,a);Ha(a);if(c&8192){n=null!==a.memoizedState;if((a.stateNode.isHidden=n)&&!q&&0!==(a.mode&1))for(l=a,q=a.child;null!==q;){for(u=l=q;null!==l;){r=l;p=r.child;switch(r.tag){case 0:case 11:case 14:case 15:Gc(4,r,r.return);break;case 1:Wb(r,r.return);var x=r.stateNode;if("function"===typeof x.componentWillUnmount){c=r;b=r.return;try{d=c,x.props=d.memoizedProps,x.state=d.memoizedState,x.componentWillUnmount()}catch(I){G(c,b,I)}}break;
case 5:Wb(r,r.return);break;case 22:if(null!==r.memoizedState){Gi(u);continue}}null!==p?(p.return=r,l=p):Gi(u)}q=q.sibling}a:for(q=null,u=a;;){if(5===u.tag){if(null===q){q=u;try{e=u.stateNode,n?(f=e.style,"function"===typeof f.setProperty?f.setProperty("display","none","important"):f.display="none"):(h=u.stateNode,k=u.memoizedProps.style,g=void 0!==k&&null!==k&&k.hasOwnProperty("display")?k.display:null,h.style.display=rg("display",g))}catch(I){G(a,a.return,I)}}}else if(6===u.tag){if(null===q)try{u.stateNode.nodeValue=
n?"":u.memoizedProps}catch(I){G(a,a.return,I)}}else if((22!==u.tag&&23!==u.tag||null===u.memoizedState||u===a)&&null!==u.child){u.child.return=u;u=u.child;continue}if(u===a)break a;for(;null===u.sibling;){if(null===u.return||u.return===a)break a;q===u&&(q=null);u=u.return}q===u&&(q=null);u.sibling.return=u.return;u=u.sibling}}break;case 19:Aa(b,a);Ha(a);c&4&&Ei(a);break;case 21:break;default:Aa(b,a),Ha(a)}}function Ha(a){var b=a.flags;if(b&2){try{a:{for(var c=a.return;null!==c;){if(Bi(c)){var d=c;
break a}c=c.return}throw Error(m(160));}switch(d.tag){case 5:var e=d.stateNode;d.flags&32&&(Fc(e,""),d.flags&=-33);var f=Ci(a);Nf(a,f,e);break;case 3:case 4:var g=d.stateNode.containerInfo,h=Ci(a);Mf(a,h,g);break;default:throw Error(m(161));}}catch(k){G(a,a.return,k)}a.flags&=-3}b&4096&&(a.flags&=-4097)}function Hk(a,b,c){l=a;Hi(a,b,c)}function Hi(a,b,c){for(var d=0!==(a.mode&1);null!==l;){var e=l,f=e.child;if(22===e.tag&&d){var g=null!==e.memoizedState||Jd;if(!g){var h=e.alternate,k=null!==h&&null!==
h.memoizedState||X;h=Jd;var n=X;Jd=g;if((X=k)&&!n)for(l=e;null!==l;)g=l,k=g.child,22===g.tag&&null!==g.memoizedState?Ii(e):null!==k?(k.return=g,l=k):Ii(e);for(;null!==f;)l=f,Hi(f,b,c),f=f.sibling;l=e;Jd=h;X=n}Ji(a,b,c)}else 0!==(e.subtreeFlags&8772)&&null!==f?(f.return=e,l=f):Ji(a,b,c)}}function Ji(a,b,c){for(;null!==l;){b=l;if(0!==(b.flags&8772)){c=b.alternate;try{if(0!==(b.flags&8772))switch(b.tag){case 0:case 11:case 15:X||Id(5,b);break;case 1:var d=b.stateNode;if(b.flags&4&&!X)if(null===c)d.componentDidMount();
else{var e=b.elementType===b.type?c.memoizedProps:ya(b.type,c.memoizedProps);d.componentDidUpdate(e,c.memoizedState,d.__reactInternalSnapshotBeforeUpdate)}var f=b.updateQueue;null!==f&&Hh(b,f,d);break;case 3:var g=b.updateQueue;if(null!==g){c=null;if(null!==b.child)switch(b.child.tag){case 5:c=b.child.stateNode;break;case 1:c=b.child.stateNode}Hh(b,g,c)}break;case 5:var h=b.stateNode;if(null===c&&b.flags&4){c=h;var k=b.memoizedProps;switch(b.type){case "button":case "input":case "select":case "textarea":k.autoFocus&&
c.focus();break;case "img":k.src&&(c.src=k.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(null===b.memoizedState){var n=b.alternate;if(null!==n){var q=n.memoizedState;if(null!==q){var p=q.dehydrated;null!==p&&nc(p)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(m(163));}X||b.flags&512&&Lf(b)}catch(r){G(b,b.return,r)}}if(b===a){l=null;break}c=b.sibling;if(null!==c){c.return=b.return;l=c;break}l=b.return}}function Gi(a){for(;null!==l;){var b=l;if(b===
a){l=null;break}var c=b.sibling;if(null!==c){c.return=b.return;l=c;break}l=b.return}}function Ii(a){for(;null!==l;){var b=l;try{switch(b.tag){case 0:case 11:case 15:var c=b.return;try{Id(4,b)}catch(k){G(b,c,k)}break;case 1:var d=b.stateNode;if("function"===typeof d.componentDidMount){var e=b.return;try{d.componentDidMount()}catch(k){G(b,e,k)}}var f=b.return;try{Lf(b)}catch(k){G(b,f,k)}break;case 5:var g=b.return;try{Lf(b)}catch(k){G(b,g,k)}}}catch(k){G(b,b.return,k)}if(b===a){l=null;break}var h=b.sibling;
if(null!==h){h.return=b.return;l=h;break}l=b.return}}function Hc(){Hf=P()+500}function Z(){return 0!==(p&6)?P():-1!==Kd?Kd:Kd=P()}function hb(a){if(0===(a.mode&1))return 1;if(0!==(p&2)&&0!==U)return U&-U;if(null!==Ik.transition)return 0===Ld&&(Ld=Dg()),Ld;a=z;if(0!==a)return a;a=window.event;a=void 0===a?16:Lg(a.type);return a}function xa(a,b,c,d){if(50<Ic)throw Ic=0,Pf=null,Error(m(185));ic(a,c,d);if(0===(p&2)||a!==O)a===O&&(0===(p&2)&&(Md|=c),4===L&&kb(a,U)),ia(a,d),1===c&&0===p&&0===(b.mode&1)&&
(Hc(),md&&db())}function ia(a,b){var c=a.callbackNode;tj(a,b);var d=Vc(a,a===O?U:0);if(0===d)null!==c&&Ki(c),a.callbackNode=null,a.callbackPriority=0;else if(b=d&-d,a.callbackPriority!==b){null!=c&&Ki(c);if(1===b)0===a.tag?jk(Li.bind(null,a)):wh(Li.bind(null,a)),Jk(function(){0===(p&6)&&db()}),c=null;else{switch(Eg(d)){case 1:c=De;break;case 4:c=Mg;break;case 16:c=ad;break;case 536870912:c=Ng;break;default:c=ad}c=Mi(c,Ni.bind(null,a))}a.callbackPriority=b;a.callbackNode=c}}function Ni(a,b){Kd=-1;
Ld=0;if(0!==(p&6))throw Error(m(327));var c=a.callbackNode;if(Xb()&&a.callbackNode!==c)return null;var d=Vc(a,a===O?U:0);if(0===d)return null;if(0!==(d&30)||0!==(d&a.expiredLanes)||b)b=Nd(a,d);else{b=d;var e=p;p|=2;var f=Oi();if(O!==a||U!==b)Ra=null,Hc(),wb(a,b);do try{Kk();break}catch(h){Pi(a,h)}while(1);af();Od.current=f;p=e;null!==H?b=0:(O=null,U=0,b=L)}if(0!==b){2===b&&(e=ve(a),0!==e&&(d=e,b=Qf(a,e)));if(1===b)throw c=Jc,wb(a,0),kb(a,d),ia(a,P()),c;if(6===b)kb(a,d);else{e=a.current.alternate;
if(0===(d&30)&&!Lk(e)&&(b=Nd(a,d),2===b&&(f=ve(a),0!==f&&(d=f,b=Qf(a,f))),1===b))throw c=Jc,wb(a,0),kb(a,d),ia(a,P()),c;a.finishedWork=e;a.finishedLanes=d;switch(b){case 0:case 1:throw Error(m(345));case 2:xb(a,ja,Ra);break;case 3:kb(a,d);if((d&130023424)===d&&(b=Of+500-P(),10<b)){if(0!==Vc(a,0))break;e=a.suspendedLanes;if((e&d)!==d){Z();a.pingedLanes|=a.suspendedLanes&e;break}a.timeoutHandle=Rf(xb.bind(null,a,ja,Ra),b);break}xb(a,ja,Ra);break;case 4:kb(a,d);if((d&4194240)===d)break;b=a.eventTimes;
for(e=-1;0<d;){var g=31-ta(d);f=1<<g;g=b[g];g>e&&(e=g);d&=~f}d=e;d=P()-d;d=(120>d?120:480>d?480:1080>d?1080:1920>d?1920:3E3>d?3E3:4320>d?4320:1960*Mk(d/1960))-d;if(10<d){a.timeoutHandle=Rf(xb.bind(null,a,ja,Ra),d);break}xb(a,ja,Ra);break;case 5:xb(a,ja,Ra);break;default:throw Error(m(329));}}}ia(a,P());return a.callbackNode===c?Ni.bind(null,a):null}function Qf(a,b){var c=Kc;a.current.memoizedState.isDehydrated&&(wb(a,b).flags|=256);a=Nd(a,b);2!==a&&(b=ja,ja=c,null!==b&&Gf(b));return a}function Gf(a){null===
ja?ja=a:ja.push.apply(ja,a)}function Lk(a){for(var b=a;;){if(b.flags&16384){var c=b.updateQueue;if(null!==c&&(c=c.stores,null!==c))for(var d=0;d<c.length;d++){var e=c[d],f=e.getSnapshot;e=e.value;try{if(!ua(f(),e))return!1}catch(g){return!1}}}c=b.child;if(b.subtreeFlags&16384&&null!==c)c.return=b,b=c;else{if(b===a)break;for(;null===b.sibling;){if(null===b.return||b.return===a)return!0;b=b.return}b.sibling.return=b.return;b=b.sibling}}return!0}function kb(a,b){b&=~Sf;b&=~Md;a.suspendedLanes|=b;a.pingedLanes&=
~b;for(a=a.expirationTimes;0<b;){var c=31-ta(b),d=1<<c;a[c]=-1;b&=~d}}function Li(a){if(0!==(p&6))throw Error(m(327));Xb();var b=Vc(a,0);if(0===(b&1))return ia(a,P()),null;var c=Nd(a,b);if(0!==a.tag&&2===c){var d=ve(a);0!==d&&(b=d,c=Qf(a,d))}if(1===c)throw c=Jc,wb(a,0),kb(a,b),ia(a,P()),c;if(6===c)throw Error(m(345));a.finishedWork=a.current.alternate;a.finishedLanes=b;xb(a,ja,Ra);ia(a,P());return null}function Tf(a,b){var c=p;p|=1;try{return a(b)}finally{p=c,0===p&&(Hc(),md&&db())}}function yb(a){null!==
lb&&0===lb.tag&&0===(p&6)&&Xb();var b=p;p|=1;var c=ca.transition,d=z;try{if(ca.transition=null,z=1,a)return a()}finally{z=d,ca.transition=c,p=b,0===(p&6)&&db()}}function wb(a,b){a.finishedWork=null;a.finishedLanes=0;var c=a.timeoutHandle;-1!==c&&(a.timeoutHandle=-1,Nk(c));if(null!==H)for(c=H.return;null!==c;){var d=c;Ve(d);switch(d.tag){case 1:d=d.type.childContextTypes;null!==d&&void 0!==d&&(v(S),v(J));break;case 3:Tb();v(S);v(J);jf();break;case 5:hf(d);break;case 4:Tb();break;case 13:v(F);break;
case 19:v(F);break;case 10:cf(d.type._context);break;case 22:case 23:ba=Ga.current,v(Ga)}c=c.return}O=a;H=a=eb(a.current,null);U=ba=b;L=0;Jc=null;Sf=Md=ra=0;ja=Kc=null;if(null!==tb){for(b=0;b<tb.length;b++)if(c=tb[b],d=c.interleaved,null!==d){c.interleaved=null;var e=d.next,f=c.pending;if(null!==f){var g=f.next;f.next=e;d.next=g}c.pending=d}tb=null}return a}function Pi(a,b){do{var c=H;try{af();yd.current=zd;if(Ad){for(var d=C.memoizedState;null!==d;){var e=d.queue;null!==e&&(e.pending=null);d=d.next}Ad=
!1}vb=0;N=K=C=null;zc=!1;Ac=0;Uf.current=null;if(null===c||null===c.return){L=1;Jc=b;H=null;break}a:{var f=a,g=c.return,h=c,k=b;b=U;h.flags|=32768;if(null!==k&&"object"===typeof k&&"function"===typeof k.then){var n=k,l=h,p=l.tag;if(0===(l.mode&1)&&(0===p||11===p||15===p)){var r=l.alternate;r?(l.updateQueue=r.updateQueue,l.memoizedState=r.memoizedState,l.lanes=r.lanes):(l.updateQueue=null,l.memoizedState=null)}var v=ji(g);if(null!==v){v.flags&=-257;ki(v,g,h,f,b);v.mode&1&&ii(f,n,b);b=v;k=n;var x=b.updateQueue;
if(null===x){var z=new Set;z.add(k);b.updateQueue=z}else x.add(k);break a}else{if(0===(b&1)){ii(f,n,b);Ef();break a}k=Error(m(426))}}else if(D&&h.mode&1){var y=ji(g);if(null!==y){0===(y.flags&65536)&&(y.flags|=256);ki(y,g,h,f,b);Ye(Ub(k,h));break a}}f=k=Ub(k,h);4!==L&&(L=2);null===Kc?Kc=[f]:Kc.push(f);f=g;do{switch(f.tag){case 3:f.flags|=65536;b&=-b;f.lanes|=b;var w=gi(f,k,b);Gh(f,w);break a;case 1:h=k;var A=f.type,t=f.stateNode;if(0===(f.flags&128)&&("function"===typeof A.getDerivedStateFromError||
null!==t&&"function"===typeof t.componentDidCatch&&(null===ib||!ib.has(t)))){f.flags|=65536;b&=-b;f.lanes|=b;var B=hi(f,h,b);Gh(f,B);break a}}f=f.return}while(null!==f)}Qi(c)}catch(ma){b=ma;H===c&&null!==c&&(H=c=c.return);continue}break}while(1)}function Oi(){var a=Od.current;Od.current=zd;return null===a?zd:a}function Ef(){if(0===L||3===L||2===L)L=4;null===O||0===(ra&268435455)&&0===(Md&268435455)||kb(O,U)}function Nd(a,b){var c=p;p|=2;var d=Oi();if(O!==a||U!==b)Ra=null,wb(a,b);do try{Ok();break}catch(e){Pi(a,
e)}while(1);af();p=c;Od.current=d;if(null!==H)throw Error(m(261));O=null;U=0;return L}function Ok(){for(;null!==H;)Ri(H)}function Kk(){for(;null!==H&&!Pk();)Ri(H)}function Ri(a){var b=Qk(a.alternate,a,ba);a.memoizedProps=a.pendingProps;null===b?Qi(a):H=b;Uf.current=null}function Qi(a){var b=a;do{var c=b.alternate;a=b.return;if(0===(b.flags&32768)){if(c=xk(c,b,ba),null!==c){H=c;return}}else{c=Bk(c,b);if(null!==c){c.flags&=32767;H=c;return}if(null!==a)a.flags|=32768,a.subtreeFlags=0,a.deletions=null;
else{L=6;H=null;return}}b=b.sibling;if(null!==b){H=b;return}H=b=a}while(null!==b);0===L&&(L=5)}function xb(a,b,c){var d=z,e=ca.transition;try{ca.transition=null,z=1,Rk(a,b,c,d)}finally{ca.transition=e,z=d}return null}function Rk(a,b,c,d){do Xb();while(null!==lb);if(0!==(p&6))throw Error(m(327));c=a.finishedWork;var e=a.finishedLanes;if(null===c)return null;a.finishedWork=null;a.finishedLanes=0;if(c===a.current)throw Error(m(177));a.callbackNode=null;a.callbackPriority=0;var f=c.lanes|c.childLanes;
uj(a,f);a===O&&(H=O=null,U=0);0===(c.subtreeFlags&2064)&&0===(c.flags&2064)||Pd||(Pd=!0,Mi(ad,function(){Xb();return null}));f=0!==(c.flags&15990);if(0!==(c.subtreeFlags&15990)||f){f=ca.transition;ca.transition=null;var g=z;z=1;var h=p;p|=4;Uf.current=null;Ck(a,c);Fi(c,a);Tj(Kf);Zc=!!Jf;Kf=Jf=null;a.current=c;Hk(c,a,e);Sk();p=h;z=g;ca.transition=f}else a.current=c;Pd&&(Pd=!1,lb=a,Qd=e);f=a.pendingLanes;0===f&&(ib=null);oj(c.stateNode,d);ia(a,P());if(null!==b)for(d=a.onRecoverableError,c=0;c<b.length;c++)e=
b[c],d(e.value,{componentStack:e.stack,digest:e.digest});if(Ed)throw Ed=!1,a=xf,xf=null,a;0!==(Qd&1)&&0!==a.tag&&Xb();f=a.pendingLanes;0!==(f&1)?a===Pf?Ic++:(Ic=0,Pf=a):Ic=0;db();return null}function Xb(){if(null!==lb){var a=Eg(Qd),b=ca.transition,c=z;try{ca.transition=null;z=16>a?16:a;if(null===lb)var d=!1;else{a=lb;lb=null;Qd=0;if(0!==(p&6))throw Error(m(331));var e=p;p|=4;for(l=a.current;null!==l;){var f=l,g=f.child;if(0!==(l.flags&16)){var h=f.deletions;if(null!==h){for(var k=0;k<h.length;k++){var n=
h[k];for(l=n;null!==l;){var q=l;switch(q.tag){case 0:case 11:case 15:Gc(8,q,f)}var u=q.child;if(null!==u)u.return=q,l=u;else for(;null!==l;){q=l;var r=q.sibling,v=q.return;Ai(q);if(q===n){l=null;break}if(null!==r){r.return=v;l=r;break}l=v}}}var x=f.alternate;if(null!==x){var y=x.child;if(null!==y){x.child=null;do{var C=y.sibling;y.sibling=null;y=C}while(null!==y)}}l=f}}if(0!==(f.subtreeFlags&2064)&&null!==g)g.return=f,l=g;else b:for(;null!==l;){f=l;if(0!==(f.flags&2048))switch(f.tag){case 0:case 11:case 15:Gc(9,
f,f.return)}var w=f.sibling;if(null!==w){w.return=f.return;l=w;break b}l=f.return}}var A=a.current;for(l=A;null!==l;){g=l;var t=g.child;if(0!==(g.subtreeFlags&2064)&&null!==t)t.return=g,l=t;else b:for(g=A;null!==l;){h=l;if(0!==(h.flags&2048))try{switch(h.tag){case 0:case 11:case 15:Id(9,h)}}catch(ma){G(h,h.return,ma)}if(h===g){l=null;break b}var B=h.sibling;if(null!==B){B.return=h.return;l=B;break b}l=h.return}}p=e;db();if(Ca&&"function"===typeof Ca.onPostCommitFiberRoot)try{Ca.onPostCommitFiberRoot(Uc,
a)}catch(ma){}d=!0}return d}finally{z=c,ca.transition=b}}return!1}function Si(a,b,c){b=Ub(c,b);b=gi(a,b,1);a=fb(a,b,1);b=Z();null!==a&&(ic(a,1,b),ia(a,b))}function G(a,b,c){if(3===a.tag)Si(a,a,c);else for(;null!==b;){if(3===b.tag){Si(b,a,c);break}else if(1===b.tag){var d=b.stateNode;if("function"===typeof b.type.getDerivedStateFromError||"function"===typeof d.componentDidCatch&&(null===ib||!ib.has(d))){a=Ub(c,a);a=hi(b,a,1);b=fb(b,a,1);a=Z();null!==b&&(ic(b,1,a),ia(b,a));break}}b=b.return}}function sk(a,
b,c){var d=a.pingCache;null!==d&&d.delete(b);b=Z();a.pingedLanes|=a.suspendedLanes&c;O===a&&(U&c)===c&&(4===L||3===L&&(U&130023424)===U&&500>P()-Of?wb(a,0):Sf|=c);ia(a,b)}function Ti(a,b){0===b&&(0===(a.mode&1)?b=1:(b=Rd,Rd<<=1,0===(Rd&130023424)&&(Rd=4194304)));var c=Z();a=Oa(a,b);null!==a&&(ic(a,b,c),ia(a,c))}function vk(a){var b=a.memoizedState,c=0;null!==b&&(c=b.retryLane);Ti(a,c)}function Gk(a,b){var c=0;switch(a.tag){case 13:var d=a.stateNode;var e=a.memoizedState;null!==e&&(c=e.retryLane);
break;case 19:d=a.stateNode;break;default:throw Error(m(314));}null!==d&&d.delete(b);Ti(a,c)}function Mi(a,b){return xh(a,b)}function Tk(a,b,c,d){this.tag=a;this.key=c;this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null;this.index=0;this.ref=null;this.pendingProps=b;this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null;this.mode=d;this.subtreeFlags=this.flags=0;this.deletions=null;this.childLanes=this.lanes=0;this.alternate=null}function yf(a){a=
a.prototype;return!(!a||!a.isReactComponent)}function Uk(a){if("function"===typeof a)return yf(a)?1:0;if(void 0!==a&&null!==a){a=a.$$typeof;if(a===ie)return 11;if(a===je)return 14}return 2}function eb(a,b){var c=a.alternate;null===c?(c=pa(a.tag,b,a.key,a.mode),c.elementType=a.elementType,c.type=a.type,c.stateNode=a.stateNode,c.alternate=a,a.alternate=c):(c.pendingProps=b,c.type=a.type,c.flags=0,c.subtreeFlags=0,c.deletions=null);c.flags=a.flags&14680064;c.childLanes=a.childLanes;c.lanes=a.lanes;c.child=
a.child;c.memoizedProps=a.memoizedProps;c.memoizedState=a.memoizedState;c.updateQueue=a.updateQueue;b=a.dependencies;c.dependencies=null===b?null:{lanes:b.lanes,firstContext:b.firstContext};c.sibling=a.sibling;c.index=a.index;c.ref=a.ref;return c}function rd(a,b,c,d,e,f){var g=2;d=a;if("function"===typeof a)yf(a)&&(g=1);else if("string"===typeof a)g=5;else a:switch(a){case Bb:return sb(c.children,e,f,b);case fe:g=8;e|=8;break;case ee:return a=pa(12,c,b,e|2),a.elementType=ee,a.lanes=f,a;case ge:return a=
pa(13,c,b,e),a.elementType=ge,a.lanes=f,a;case he:return a=pa(19,c,b,e),a.elementType=he,a.lanes=f,a;case Ui:return Gd(c,e,f,b);default:if("object"===typeof a&&null!==a)switch(a.$$typeof){case hg:g=10;break a;case gg:g=9;break a;case ie:g=11;break a;case je:g=14;break a;case Ta:g=16;d=null;break a}throw Error(m(130,null==a?a:typeof a,""));}b=pa(g,c,b,e);b.elementType=a;b.type=d;b.lanes=f;return b}function sb(a,b,c,d){a=pa(7,a,d,b);a.lanes=c;return a}function Gd(a,b,c,d){a=pa(22,a,d,b);a.elementType=
Ui;a.lanes=c;a.stateNode={isHidden:!1};return a}function Ze(a,b,c){a=pa(6,a,null,b);a.lanes=c;return a}function $e(a,b,c){b=pa(4,null!==a.children?a.children:[],a.key,b);b.lanes=c;b.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation};return b}function Vk(a,b,c,d,e){this.tag=b;this.containerInfo=a;this.finishedWork=this.pingCache=this.current=this.pendingChildren=null;this.timeoutHandle=-1;this.callbackNode=this.pendingContext=this.context=null;this.callbackPriority=
0;this.eventTimes=we(0);this.expirationTimes=we(-1);this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0;this.entanglements=we(0);this.identifierPrefix=d;this.onRecoverableError=e;this.mutableSourceEagerHydrationData=null}function Vf(a,b,c,d,e,f,g,h,k,l){a=new Vk(a,b,c,h,k);1===b?(b=1,!0===f&&(b|=8)):b=0;f=pa(3,null,null,b);a.current=f;f.stateNode=a;f.memoizedState={element:d,isDehydrated:c,cache:null,transitions:null,
pendingSuspenseBoundaries:null};ff(f);return a}function Wk(a,b,c){var d=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:Cb,key:null==d?null:""+d,children:a,containerInfo:b,implementation:c}}function Vi(a){if(!a)return cb;a=a._reactInternals;a:{if(nb(a)!==a||1!==a.tag)throw Error(m(170));var b=a;do{switch(b.tag){case 3:b=b.stateNode.context;break a;case 1:if(ea(b.type)){b=b.stateNode.__reactInternalMemoizedMergedChildContext;break a}}b=b.return}while(null!==b);throw Error(m(171));
}if(1===a.tag){var c=a.type;if(ea(c))return uh(a,c,b)}return b}function Wi(a,b,c,d,e,f,g,h,k,l){a=Vf(c,d,!0,a,e,f,g,h,k);a.context=Vi(null);c=a.current;d=Z();e=hb(c);f=Pa(d,e);f.callback=void 0!==b&&null!==b?b:null;fb(c,f,e);a.current.lanes=e;ic(a,e,d);ia(a,d);return a}function Sd(a,b,c,d){var e=b.current,f=Z(),g=hb(e);c=Vi(c);null===b.context?b.context=c:b.pendingContext=c;b=Pa(f,g);b.payload={element:a};d=void 0===d?null:d;null!==d&&(b.callback=d);a=fb(e,b,g);null!==a&&(xa(a,e,g,f),vd(a,e,g));return g}
function Td(a){a=a.current;if(!a.child)return null;switch(a.child.tag){case 5:return a.child.stateNode;default:return a.child.stateNode}}function Xi(a,b){a=a.memoizedState;if(null!==a&&null!==a.dehydrated){var c=a.retryLane;a.retryLane=0!==c&&c<b?c:b}}function Wf(a,b){Xi(a,b);(a=a.alternate)&&Xi(a,b)}function Xk(a){a=Bg(a);return null===a?null:a.stateNode}function Yk(a){return null}function Xf(a){this._internalRoot=a}function Ud(a){this._internalRoot=a}function Yf(a){return!(!a||1!==a.nodeType&&9!==
a.nodeType&&11!==a.nodeType)}function Vd(a){return!(!a||1!==a.nodeType&&9!==a.nodeType&&11!==a.nodeType&&(8!==a.nodeType||" react-mount-point-unstable "!==a.nodeValue))}function Yi(){}function Zk(a,b,c,d,e){if(e){if("function"===typeof d){var f=d;d=function(){var a=Td(g);f.call(a)}}var g=Wi(b,d,a,0,null,!1,!1,"",Yi);a._reactRootContainer=g;a[Ja]=g.current;sc(8===a.nodeType?a.parentNode:a);yb();return g}for(;e=a.lastChild;)a.removeChild(e);if("function"===typeof d){var h=d;d=function(){var a=Td(k);
h.call(a)}}var k=Vf(a,0,!1,null,null,!1,!1,"",Yi);a._reactRootContainer=k;a[Ja]=k.current;sc(8===a.nodeType?a.parentNode:a);yb(function(){Sd(b,k,c,d)});return k}function Wd(a,b,c,d,e){var f=c._reactRootContainer;if(f){var g=f;if("function"===typeof e){var h=e;e=function(){var a=Td(g);h.call(a)}}Sd(b,g,a,e)}else g=Zk(c,b,a,e,d);return Td(g)}var cg=new Set,$b={},Ia=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),Zd=Object.prototype.hasOwnProperty,
cj=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,eg={},dg={},R={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){R[a]=
new Y(a,0,!1,a,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var b=a[0];R[b]=new Y(b,1,!1,a[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(a){R[a]=new Y(a,2,!1,a.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){R[a]=new Y(a,2,!1,a,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){R[a]=
new Y(a,3,!1,a.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(a){R[a]=new Y(a,3,!0,a,null,!1,!1)});["capture","download"].forEach(function(a){R[a]=new Y(a,4,!1,a,null,!1,!1)});["cols","rows","size","span"].forEach(function(a){R[a]=new Y(a,6,!1,a,null,!1,!1)});["rowSpan","start"].forEach(function(a){R[a]=new Y(a,5,!1,a.toLowerCase(),null,!1,!1)});var Zf=/[\-:]([a-z])/g,$f=function(a){return a[1].toUpperCase()};"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(a){var b=
a.replace(Zf,$f);R[b]=new Y(b,1,!1,a,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var b=a.replace(Zf,$f);R[b]=new Y(b,1,!1,a,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(a){var b=a.replace(Zf,$f);R[b]=new Y(b,1,!1,a,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(a){R[a]=new Y(a,1,!1,a.toLowerCase(),null,!1,!1)});R.xlinkHref=new Y("xlinkHref",
1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(a){R[a]=new Y(a,1,!1,a.toLowerCase(),null,!0,!0)});var Sa=zb.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,sd=Symbol.for("react.element"),Cb=Symbol.for("react.portal"),Bb=Symbol.for("react.fragment"),fe=Symbol.for("react.strict_mode"),ee=Symbol.for("react.profiler"),hg=Symbol.for("react.provider"),gg=Symbol.for("react.context"),ie=Symbol.for("react.forward_ref"),ge=Symbol.for("react.suspense"),
he=Symbol.for("react.suspense_list"),je=Symbol.for("react.memo"),Ta=Symbol.for("react.lazy");Symbol.for("react.scope");Symbol.for("react.debug_trace_mode");var Ui=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden");Symbol.for("react.cache");Symbol.for("react.tracing_marker");var fg=Symbol.iterator,E=Object.assign,ae,ce=!1,cc=Array.isArray,Xd,yi=function(a){return"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(b,c,d,e){MSApp.execUnsafeLocalFunction(function(){return a(b,
c,d,e)})}:a}(function(a,b){if("http://www.w3.org/2000/svg"!==a.namespaceURI||"innerHTML"in a)a.innerHTML=b;else{Xd=Xd||document.createElement("div");Xd.innerHTML="<svg>"+b.valueOf().toString()+"</svg>";for(b=Xd.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;b.firstChild;)a.appendChild(b.firstChild)}}),Fc=function(a,b){if(b){var c=a.firstChild;if(c&&c===a.lastChild&&3===c.nodeType){c.nodeValue=b;return}}a.textContent=b},dc={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,
borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,
strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},$k=["Webkit","ms","Moz","O"];Object.keys(dc).forEach(function(a){$k.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);dc[b]=dc[a]})});var ij=E({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0}),ze=null,se=null,Eb=null,Fb=null,xg=function(a,b){return a(b)},yg=function(){},te=!1,Oe=!1;if(Ia)try{var Lc={};Object.defineProperty(Lc,
"passive",{get:function(){Oe=!0}});window.addEventListener("test",Lc,Lc);window.removeEventListener("test",Lc,Lc)}catch(a){Oe=!1}var kj=function(a,b,c,d,e,f,g,h,k){var l=Array.prototype.slice.call(arguments,3);try{b.apply(c,l)}catch(q){this.onError(q)}},gc=!1,Sc=null,Tc=!1,ue=null,lj={onError:function(a){gc=!0;Sc=a}},Ba=zb.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Scheduler,Jg=Ba.unstable_scheduleCallback,Kg=Ba.unstable_NormalPriority,xh=Jg,Ki=Ba.unstable_cancelCallback,Pk=Ba.unstable_shouldYield,
Sk=Ba.unstable_requestPaint,P=Ba.unstable_now,Dj=Ba.unstable_getCurrentPriorityLevel,De=Ba.unstable_ImmediatePriority,Mg=Ba.unstable_UserBlockingPriority,ad=Kg,Ej=Ba.unstable_LowPriority,Ng=Ba.unstable_IdlePriority,Uc=null,Ca=null,ta=Math.clz32?Math.clz32:pj,qj=Math.log,rj=Math.LN2,Wc=64,Rd=4194304,z=0,Ae=!1,Yc=[],Va=null,Wa=null,Xa=null,jc=new Map,kc=new Map,Ya=[],Bj="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" "),
Gb=Sa.ReactCurrentBatchConfig,Zc=!0,$c=null,Za=null,Ee=null,bd=null,Yb={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},He=ka(Yb),Mc=E({},Yb,{view:0,detail:0}),ak=ka(Mc),ag,bg,Nc,Yd=E({},Mc,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Fe,button:0,buttons:0,relatedTarget:function(a){return void 0===a.relatedTarget?a.fromElement===a.srcElement?a.toElement:a.fromElement:
a.relatedTarget},movementX:function(a){if("movementX"in a)return a.movementX;a!==Nc&&(Nc&&"mousemove"===a.type?(ag=a.screenX-Nc.screenX,bg=a.screenY-Nc.screenY):bg=ag=0,Nc=a);return ag},movementY:function(a){return"movementY"in a?a.movementY:bg}}),ih=ka(Yd),al=E({},Yd,{dataTransfer:0}),Wj=ka(al),bl=E({},Mc,{relatedTarget:0}),Pe=ka(bl),cl=E({},Yb,{animationName:0,elapsedTime:0,pseudoElement:0}),Yj=ka(cl),dl=E({},Yb,{clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}}),
ck=ka(dl),el=E({},Yb,{data:0}),qh=ka(el),fk=qh,fl={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},gl={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",
112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Gj={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"},hl=E({},Mc,{key:function(a){if(a.key){var b=fl[a.key]||a.key;if("Unidentified"!==b)return b}return"keypress"===a.type?(a=cd(a),13===a?"Enter":String.fromCharCode(a)):"keydown"===a.type||"keyup"===a.type?gl[a.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,
metaKey:0,repeat:0,locale:0,getModifierState:Fe,charCode:function(a){return"keypress"===a.type?cd(a):0},keyCode:function(a){return"keydown"===a.type||"keyup"===a.type?a.keyCode:0},which:function(a){return"keypress"===a.type?cd(a):"keydown"===a.type||"keyup"===a.type?a.keyCode:0}}),Vj=ka(hl),il=E({},Yd,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),nh=ka(il),jl=E({},Mc,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,
ctrlKey:0,shiftKey:0,getModifierState:Fe}),Xj=ka(jl),kl=E({},Yb,{propertyName:0,elapsedTime:0,pseudoElement:0}),Zj=ka(kl),ll=E({},Yd,{deltaX:function(a){return"deltaX"in a?a.deltaX:"wheelDeltaX"in a?-a.wheelDeltaX:0},deltaY:function(a){return"deltaY"in a?a.deltaY:"wheelDeltaY"in a?-a.wheelDeltaY:"wheelDelta"in a?-a.wheelDelta:0},deltaZ:0,deltaMode:0}),bk=ka(ll),Hj=[9,13,27,32],Ge=Ia&&"CompositionEvent"in window,Oc=null;Ia&&"documentMode"in document&&(Oc=document.documentMode);var ek=Ia&&"TextEvent"in
window&&!Oc,Ug=Ia&&(!Ge||Oc&&8<Oc&&11>=Oc),Tg=String.fromCharCode(32),Sg=!1,Hb=!1,Kj={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0},oc=null,pc=null,ph=!1;Ia&&(ph=Lj("input")&&(!document.documentMode||9<document.documentMode));var ua="function"===typeof Object.is?Object.is:Sj,dk=Ia&&"documentMode"in document&&11>=document.documentMode,Jb=null,Ke=null,rc=null,Je=!1,Kb={animationend:gd("Animation","AnimationEnd"),
animationiteration:gd("Animation","AnimationIteration"),animationstart:gd("Animation","AnimationStart"),transitionend:gd("Transition","TransitionEnd")},Le={},eh={};Ia&&(eh=document.createElement("div").style,"AnimationEvent"in window||(delete Kb.animationend.animation,delete Kb.animationiteration.animation,delete Kb.animationstart.animation),"TransitionEvent"in window||delete Kb.transitionend.transition);var jh=hd("animationend"),kh=hd("animationiteration"),lh=hd("animationstart"),mh=hd("transitionend"),
fh=new Map,Zi="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");
(function(){for(var a=0;a<Zi.length;a++){var b=Zi[a],c=b.toLowerCase();b=b[0].toUpperCase()+b.slice(1);$a(c,"on"+b)}$a(jh,"onAnimationEnd");$a(kh,"onAnimationIteration");$a(lh,"onAnimationStart");$a("dblclick","onDoubleClick");$a("focusin","onFocus");$a("focusout","onBlur");$a(mh,"onTransitionEnd")})();Ab("onMouseEnter",["mouseout","mouseover"]);Ab("onMouseLeave",["mouseout","mouseover"]);Ab("onPointerEnter",["pointerout","pointerover"]);Ab("onPointerLeave",["pointerout","pointerover"]);mb("onChange",
"change click focusin focusout input keydown keyup selectionchange".split(" "));mb("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));mb("onBeforeInput",["compositionend","keypress","textInput","paste"]);mb("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));mb("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));mb("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));
var Ec="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Uj=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ec)),id="_reactListening"+Math.random().toString(36).slice(2),gk=/\r\n?/g,hk=/\u0000|\uFFFD/g,Jf=null,Kf=null,Rf="function"===typeof setTimeout?setTimeout:void 0,Nk="function"===typeof clearTimeout?
clearTimeout:void 0,$i="function"===typeof Promise?Promise:void 0,Jk="function"===typeof queueMicrotask?queueMicrotask:"undefined"!==typeof $i?function(a){return $i.resolve(null).then(a).catch(ik)}:Rf,Zb=Math.random().toString(36).slice(2),Da="__reactFiber$"+Zb,uc="__reactProps$"+Zb,Ja="__reactContainer$"+Zb,Me="__reactEvents$"+Zb,Dk="__reactListeners$"+Zb,Ek="__reactHandles$"+Zb,Se=[],Mb=-1,cb={},J=bb(cb),S=bb(!1),pb=cb,La=null,md=!1,Te=!1,Ob=[],Pb=0,od=null,nd=0,na=[],oa=0,rb=null,Ma=1,Na="",la=
null,fa=null,D=!1,wa=null,Ik=Sa.ReactCurrentBatchConfig,Vb=Dh(!0),li=Dh(!1),ud=bb(null),td=null,Rb=null,bf=null,tb=null,kk=Oa,gb=!1,wc={},Ea=bb(wc),yc=bb(wc),xc=bb(wc),F=bb(0),kf=[],yd=Sa.ReactCurrentDispatcher,sf=Sa.ReactCurrentBatchConfig,vb=0,C=null,K=null,N=null,Ad=!1,zc=!1,Ac=0,ml=0,zd={readContext:qa,useCallback:V,useContext:V,useEffect:V,useImperativeHandle:V,useInsertionEffect:V,useLayoutEffect:V,useMemo:V,useReducer:V,useRef:V,useState:V,useDebugValue:V,useDeferredValue:V,useTransition:V,
useMutableSource:V,useSyncExternalStore:V,useId:V,unstable_isNewReconciler:!1},lk={readContext:qa,useCallback:function(a,b){Fa().memoizedState=[a,void 0===b?null:b];return a},useContext:qa,useEffect:Sh,useImperativeHandle:function(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;return Bd(4194308,4,Vh.bind(null,b,a),c)},useLayoutEffect:function(a,b){return Bd(4194308,4,a,b)},useInsertionEffect:function(a,b){return Bd(4,2,a,b)},useMemo:function(a,b){var c=Fa();b=void 0===b?null:b;a=a();c.memoizedState=
[a,b];return a},useReducer:function(a,b,c){var d=Fa();b=void 0!==c?c(b):b;d.memoizedState=d.baseState=b;a={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:b};d.queue=a;a=a.dispatch=qk.bind(null,C,a);return[d.memoizedState,a]},useRef:function(a){var b=Fa();a={current:a};return b.memoizedState=a},useState:Qh,useDebugValue:rf,useDeferredValue:function(a){return Fa().memoizedState=a},useTransition:function(){var a=Qh(!1),b=a[0];a=pk.bind(null,a[1]);Fa().memoizedState=
a;return[b,a]},useMutableSource:function(a,b,c){},useSyncExternalStore:function(a,b,c){var d=C,e=Fa();if(D){if(void 0===c)throw Error(m(407));c=c()}else{c=b();if(null===O)throw Error(m(349));0!==(vb&30)||Nh(d,b,c)}e.memoizedState=c;var f={value:c,getSnapshot:b};e.queue=f;Sh(Lh.bind(null,d,f,a),[a]);d.flags|=2048;Cc(9,Mh.bind(null,d,f,c,b),void 0,null);return c},useId:function(){var a=Fa(),b=O.identifierPrefix;if(D){var c=Na;var d=Ma;c=(d&~(1<<32-ta(d)-1)).toString(32)+c;b=":"+b+"R"+c;c=Ac++;0<c&&
(b+="H"+c.toString(32));b+=":"}else c=ml++,b=":"+b+"r"+c.toString(32)+":";return a.memoizedState=b},unstable_isNewReconciler:!1},mk={readContext:qa,useCallback:Xh,useContext:qa,useEffect:qf,useImperativeHandle:Wh,useInsertionEffect:Th,useLayoutEffect:Uh,useMemo:Yh,useReducer:of,useRef:Rh,useState:function(a){return of(Bc)},useDebugValue:rf,useDeferredValue:function(a){var b=sa();return Zh(b,K.memoizedState,a)},useTransition:function(){var a=of(Bc)[0],b=sa().memoizedState;return[a,b]},useMutableSource:Jh,
useSyncExternalStore:Kh,useId:$h,unstable_isNewReconciler:!1},nk={readContext:qa,useCallback:Xh,useContext:qa,useEffect:qf,useImperativeHandle:Wh,useInsertionEffect:Th,useLayoutEffect:Uh,useMemo:Yh,useReducer:pf,useRef:Rh,useState:function(a){return pf(Bc)},useDebugValue:rf,useDeferredValue:function(a){var b=sa();return null===K?b.memoizedState=a:Zh(b,K.memoizedState,a)},useTransition:function(){var a=pf(Bc)[0],b=sa().memoizedState;return[a,b]},useMutableSource:Jh,useSyncExternalStore:Kh,useId:$h,
unstable_isNewReconciler:!1},Dd={isMounted:function(a){return(a=a._reactInternals)?nb(a)===a:!1},enqueueSetState:function(a,b,c){a=a._reactInternals;var d=Z(),e=hb(a),f=Pa(d,e);f.payload=b;void 0!==c&&null!==c&&(f.callback=c);b=fb(a,f,e);null!==b&&(xa(b,a,e,d),vd(b,a,e))},enqueueReplaceState:function(a,b,c){a=a._reactInternals;var d=Z(),e=hb(a),f=Pa(d,e);f.tag=1;f.payload=b;void 0!==c&&null!==c&&(f.callback=c);b=fb(a,f,e);null!==b&&(xa(b,a,e,d),vd(b,a,e))},enqueueForceUpdate:function(a,b){a=a._reactInternals;
var c=Z(),d=hb(a),e=Pa(c,d);e.tag=2;void 0!==b&&null!==b&&(e.callback=b);b=fb(a,e,d);null!==b&&(xa(b,a,d,c),vd(b,a,d))}},rk="function"===typeof WeakMap?WeakMap:Map,tk=Sa.ReactCurrentOwner,ha=!1,Cf={dehydrated:null,treeContext:null,retryLane:0};var zk=function(a,b,c,d){for(c=b.child;null!==c;){if(5===c.tag||6===c.tag)a.appendChild(c.stateNode);else if(4!==c.tag&&null!==c.child){c.child.return=c;c=c.child;continue}if(c===b)break;for(;null===c.sibling;){if(null===c.return||c.return===b)return;c=c.return}c.sibling.return=
c.return;c=c.sibling}};var xi=function(a,b){};var yk=function(a,b,c,d,e){var f=a.memoizedProps;if(f!==d){a=b.stateNode;ub(Ea.current);e=null;switch(c){case "input":f=ke(a,f);d=ke(a,d);e=[];break;case "select":f=E({},f,{value:void 0});d=E({},d,{value:void 0});e=[];break;case "textarea":f=ne(a,f);d=ne(a,d);e=[];break;default:"function"!==typeof f.onClick&&"function"===typeof d.onClick&&(a.onclick=kd)}pe(c,d);var g;c=null;for(l in f)if(!d.hasOwnProperty(l)&&f.hasOwnProperty(l)&&null!=f[l])if("style"===
l){var h=f[l];for(g in h)h.hasOwnProperty(g)&&(c||(c={}),c[g]="")}else"dangerouslySetInnerHTML"!==l&&"children"!==l&&"suppressContentEditableWarning"!==l&&"suppressHydrationWarning"!==l&&"autoFocus"!==l&&($b.hasOwnProperty(l)?e||(e=[]):(e=e||[]).push(l,null));for(l in d){var k=d[l];h=null!=f?f[l]:void 0;if(d.hasOwnProperty(l)&&k!==h&&(null!=k||null!=h))if("style"===l)if(h){for(g in h)!h.hasOwnProperty(g)||k&&k.hasOwnProperty(g)||(c||(c={}),c[g]="");for(g in k)k.hasOwnProperty(g)&&h[g]!==k[g]&&(c||
(c={}),c[g]=k[g])}else c||(e||(e=[]),e.push(l,c)),c=k;else"dangerouslySetInnerHTML"===l?(k=k?k.__html:void 0,h=h?h.__html:void 0,null!=k&&h!==k&&(e=e||[]).push(l,k)):"children"===l?"string"!==typeof k&&"number"!==typeof k||(e=e||[]).push(l,""+k):"suppressContentEditableWarning"!==l&&"suppressHydrationWarning"!==l&&($b.hasOwnProperty(l)?(null!=k&&"onScroll"===l&&B("scroll",a),e||h===k||(e=[])):(e=e||[]).push(l,k))}c&&(e=e||[]).push("style",c);var l=e;if(b.updateQueue=l)b.flags|=4}};var Ak=function(a,
b,c,d){c!==d&&(b.flags|=4)};var Jd=!1,X=!1,Fk="function"===typeof WeakSet?WeakSet:Set,l=null,zi=!1,T=null,za=!1,Mk=Math.ceil,Od=Sa.ReactCurrentDispatcher,Uf=Sa.ReactCurrentOwner,ca=Sa.ReactCurrentBatchConfig,p=0,O=null,H=null,U=0,ba=0,Ga=bb(0),L=0,Jc=null,ra=0,Md=0,Sf=0,Kc=null,ja=null,Of=0,Hf=Infinity,Ra=null,Ed=!1,xf=null,ib=null,Pd=!1,lb=null,Qd=0,Ic=0,Pf=null,Kd=-1,Ld=0;var Qk=function(a,b,c){if(null!==a)if(a.memoizedProps!==b.pendingProps||S.current)ha=!0;else{if(0===(a.lanes&c)&&0===(b.flags&
128))return ha=!1,wk(a,b,c);ha=0!==(a.flags&131072)?!0:!1}else ha=!1,D&&0!==(b.flags&1048576)&&yh(b,nd,b.index);b.lanes=0;switch(b.tag){case 2:var d=b.type;Fd(a,b);a=b.pendingProps;var e=Nb(b,J.current);Sb(b,c);e=mf(null,b,d,a,e,c);var f=nf();b.flags|=1;"object"===typeof e&&null!==e&&"function"===typeof e.render&&void 0===e.$$typeof?(b.tag=1,b.memoizedState=null,b.updateQueue=null,ea(d)?(f=!0,ld(b)):f=!1,b.memoizedState=null!==e.state&&void 0!==e.state?e.state:null,ff(b),e.updater=Dd,b.stateNode=
e,e._reactInternals=b,uf(b,d,a,c),b=Af(null,b,d,!0,f,c)):(b.tag=0,D&&f&&Ue(b),aa(null,b,e,c),b=b.child);return b;case 16:d=b.elementType;a:{Fd(a,b);a=b.pendingProps;e=d._init;d=e(d._payload);b.type=d;e=b.tag=Uk(d);a=ya(d,a);switch(e){case 0:b=zf(null,b,d,a,c);break a;case 1:b=ri(null,b,d,a,c);break a;case 11:b=mi(null,b,d,a,c);break a;case 14:b=ni(null,b,d,ya(d.type,a),c);break a}throw Error(m(306,d,""));}return b;case 0:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:ya(d,e),zf(a,b,d,e,c);
case 1:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:ya(d,e),ri(a,b,d,e,c);case 3:a:{si(b);if(null===a)throw Error(m(387));d=b.pendingProps;f=b.memoizedState;e=f.element;Fh(a,b);wd(b,d,null,c);var g=b.memoizedState;d=g.element;if(f.isDehydrated)if(f={element:d,isDehydrated:!1,cache:g.cache,pendingSuspenseBoundaries:g.pendingSuspenseBoundaries,transitions:g.transitions},b.updateQueue.baseState=f,b.memoizedState=f,b.flags&256){e=Ub(Error(m(423)),b);b=ti(a,b,d,c,e);break a}else if(d!==e){e=
Ub(Error(m(424)),b);b=ti(a,b,d,c,e);break a}else for(fa=Ka(b.stateNode.containerInfo.firstChild),la=b,D=!0,wa=null,c=li(b,null,d,c),b.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{Qb();if(d===e){b=Qa(a,b,c);break a}aa(a,b,d,c)}b=b.child}return b;case 5:return Ih(b),null===a&&Xe(b),d=b.type,e=b.pendingProps,f=null!==a?a.memoizedProps:null,g=e.children,Qe(d,e)?g=null:null!==f&&Qe(d,f)&&(b.flags|=32),qi(a,b),aa(a,b,g,c),b.child;case 6:return null===a&&Xe(b),null;case 13:return ui(a,b,c);case 4:return gf(b,
b.stateNode.containerInfo),d=b.pendingProps,null===a?b.child=Vb(b,null,d,c):aa(a,b,d,c),b.child;case 11:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:ya(d,e),mi(a,b,d,e,c);case 7:return aa(a,b,b.pendingProps,c),b.child;case 8:return aa(a,b,b.pendingProps.children,c),b.child;case 12:return aa(a,b,b.pendingProps.children,c),b.child;case 10:a:{d=b.type._context;e=b.pendingProps;f=b.memoizedProps;g=e.value;y(ud,d._currentValue);d._currentValue=g;if(null!==f)if(ua(f.value,g)){if(f.children===
e.children&&!S.current){b=Qa(a,b,c);break a}}else for(f=b.child,null!==f&&(f.return=b);null!==f;){var h=f.dependencies;if(null!==h){g=f.child;for(var k=h.firstContext;null!==k;){if(k.context===d){if(1===f.tag){k=Pa(-1,c&-c);k.tag=2;var l=f.updateQueue;if(null!==l){l=l.shared;var p=l.pending;null===p?k.next=k:(k.next=p.next,p.next=k);l.pending=k}}f.lanes|=c;k=f.alternate;null!==k&&(k.lanes|=c);df(f.return,c,b);h.lanes|=c;break}k=k.next}}else if(10===f.tag)g=f.type===b.type?null:f.child;else if(18===
f.tag){g=f.return;if(null===g)throw Error(m(341));g.lanes|=c;h=g.alternate;null!==h&&(h.lanes|=c);df(g,c,b);g=f.sibling}else g=f.child;if(null!==g)g.return=f;else for(g=f;null!==g;){if(g===b){g=null;break}f=g.sibling;if(null!==f){f.return=g.return;g=f;break}g=g.return}f=g}aa(a,b,e.children,c);b=b.child}return b;case 9:return e=b.type,d=b.pendingProps.children,Sb(b,c),e=qa(e),d=d(e),b.flags|=1,aa(a,b,d,c),b.child;case 14:return d=b.type,e=ya(d,b.pendingProps),e=ya(d.type,e),ni(a,b,d,e,c);case 15:return oi(a,
b,b.type,b.pendingProps,c);case 17:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:ya(d,e),Fd(a,b),b.tag=1,ea(d)?(a=!0,ld(b)):a=!1,Sb(b,c),ei(b,d,e),uf(b,d,e,c),Af(null,b,d,!0,a,c);case 19:return wi(a,b,c);case 22:return pi(a,b,c)}throw Error(m(156,b.tag));};var pa=function(a,b,c,d){return new Tk(a,b,c,d)},aj="function"===typeof reportError?reportError:function(a){console.error(a)};Ud.prototype.render=Xf.prototype.render=function(a){var b=this._internalRoot;if(null===b)throw Error(m(409));
Sd(a,b,null,null)};Ud.prototype.unmount=Xf.prototype.unmount=function(){var a=this._internalRoot;if(null!==a){this._internalRoot=null;var b=a.containerInfo;yb(function(){Sd(null,a,null,null)});b[Ja]=null}};Ud.prototype.unstable_scheduleHydration=function(a){if(a){var b=nl();a={blockedOn:null,target:a,priority:b};for(var c=0;c<Ya.length&&0!==b&&b<Ya[c].priority;c++);Ya.splice(c,0,a);0===c&&Hg(a)}};var Cj=function(a){switch(a.tag){case 3:var b=a.stateNode;if(b.current.memoizedState.isDehydrated){var c=
hc(b.pendingLanes);0!==c&&(xe(b,c|1),ia(b,P()),0===(p&6)&&(Hc(),db()))}break;case 13:yb(function(){var b=Oa(a,1);if(null!==b){var c=Z();xa(b,a,1,c)}}),Wf(a,1)}};var Gg=function(a){if(13===a.tag){var b=Oa(a,134217728);if(null!==b){var c=Z();xa(b,a,134217728,c)}Wf(a,134217728)}};var xj=function(a){if(13===a.tag){var b=hb(a),c=Oa(a,b);if(null!==c){var d=Z();xa(c,a,b,d)}Wf(a,b)}};var nl=function(){return z};var wj=function(a,b){var c=z;try{return z=a,b()}finally{z=c}};se=function(a,b,c){switch(b){case "input":le(a,
c);b=c.name;if("radio"===c.type&&null!=b){for(c=a;c.parentNode;)c=c.parentNode;c=c.querySelectorAll("input[name="+JSON.stringify(""+b)+'][type="radio"]');for(b=0;b<c.length;b++){var d=c[b];if(d!==a&&d.form===a.form){var e=Rc(d);if(!e)throw Error(m(90));jg(d);le(d,e)}}}break;case "textarea":og(a,c);break;case "select":b=c.value,null!=b&&Db(a,!!c.multiple,b,!1)}};(function(a,b,c){xg=a;yg=c})(Tf,function(a,b,c,d,e){var f=z,g=ca.transition;try{return ca.transition=null,z=1,a(b,c,d,e)}finally{z=f,ca.transition=
g,0===p&&Hc()}},yb);var ol={usingClientEntryPoint:!1,Events:[ec,Ib,Rc,ug,vg,Tf]};(function(a){a={bundleType:a.bundleType,version:a.version,rendererPackageName:a.rendererPackageName,rendererConfig:a.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Sa.ReactCurrentDispatcher,findHostInstanceByFiber:Xk,
findFiberByHostInstance:a.findFiberByHostInstance||Yk,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1"};if("undefined"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)a=!1;else{var b=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(b.isDisabled||!b.supportsFiber)a=!0;else{try{Uc=b.inject(a),Ca=b}catch(c){}a=b.checkDCE?!0:!1}}return a})({findFiberByHostInstance:ob,bundleType:0,version:"18.3.1-next-f1338f8080-20240426",
rendererPackageName:"react-dom"});Q.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ol;Q.createPortal=function(a,b){var c=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Yf(b))throw Error(m(200));return Wk(a,b,null,c)};Q.createRoot=function(a,b){if(!Yf(a))throw Error(m(299));var c=!1,d="",e=aj;null!==b&&void 0!==b&&(!0===b.unstable_strictMode&&(c=!0),void 0!==b.identifierPrefix&&(d=b.identifierPrefix),void 0!==b.onRecoverableError&&(e=b.onRecoverableError));b=Vf(a,1,!1,null,null,
c,!1,d,e);a[Ja]=b.current;sc(8===a.nodeType?a.parentNode:a);return new Xf(b)};Q.findDOMNode=function(a){if(null==a)return null;if(1===a.nodeType)return a;var b=a._reactInternals;if(void 0===b){if("function"===typeof a.render)throw Error(m(188));a=Object.keys(a).join(",");throw Error(m(268,a));}a=Bg(b);a=null===a?null:a.stateNode;return a};Q.flushSync=function(a){return yb(a)};Q.hydrate=function(a,b,c){if(!Vd(b))throw Error(m(200));return Wd(null,a,b,!0,c)};Q.hydrateRoot=function(a,b,c){if(!Yf(a))throw Error(m(405));
var d=null!=c&&c.hydratedSources||null,e=!1,f="",g=aj;null!==c&&void 0!==c&&(!0===c.unstable_strictMode&&(e=!0),void 0!==c.identifierPrefix&&(f=c.identifierPrefix),void 0!==c.onRecoverableError&&(g=c.onRecoverableError));b=Wi(b,null,a,1,null!=c?c:null,e,!1,f,g);a[Ja]=b.current;sc(a);if(d)for(a=0;a<d.length;a++)c=d[a],e=c._getVersion,e=e(c._source),null==b.mutableSourceEagerHydrationData?b.mutableSourceEagerHydrationData=[c,e]:b.mutableSourceEagerHydrationData.push(c,e);return new Ud(b)};Q.render=
function(a,b,c){if(!Vd(b))throw Error(m(200));return Wd(null,a,b,!1,c)};Q.unmountComponentAtNode=function(a){if(!Vd(a))throw Error(m(40));return a._reactRootContainer?(yb(function(){Wd(null,null,a,!1,function(){a._reactRootContainer=null;a[Ja]=null})}),!0):!1};Q.unstable_batchedUpdates=Tf;Q.unstable_renderSubtreeIntoContainer=function(a,b,c,d){if(!Vd(c))throw Error(m(200));if(null==a||void 0===a._reactInternals)throw Error(m(38));return Wd(a,b,c,!1,d)};Q.version="18.3.1-next-f1338f8080-20240426"});
})();
// source --> https://mfrash.com/wp-includes/js/dist/escape-html.min.js?ver=3f093e5cca67aa0f8b56 
"use strict";var wp;(wp||={}).escapeHtml=(()=>{var u=Object.defineProperty;var o=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var E=(e,t)=>{for(var a in t)u(e,a,{get:t[a],enumerable:!0})},T=(e,t,a,p)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of f(t))!l.call(e,r)&&r!==a&&u(e,r,{get:()=>t[r],enumerable:!(p=o(t,r))||p.enumerable});return e};var _=e=>T(u({},"__esModule",{value:!0}),e);var d={};E(d,{escapeAmpersand:()=>c,escapeAttribute:()=>m,escapeEditableHTML:()=>b,escapeHTML:()=>A,escapeLessThan:()=>n,escapeQuotationMark:()=>s,isValidAttributeName:()=>F});function i(e){return e.replace(/>/g,"&gt;")}var g=/[\u007F-\u009F "'>/="\uFDD0-\uFDEF]/;function c(e){return e.replace(/&(?!([a-z0-9]+|#[0-9]+|#x[a-f0-9]+);)/gi,"&amp;")}function s(e){return e.replace(/"/g,"&quot;")}function n(e){return e.replace(/</g,"&lt;")}function m(e){return i(n(s(c(e))))}function A(e){return n(c(e))}function b(e){return n(e.replace(/&/g,"&amp;"))}function F(e){return!g.test(e)}return _(d);})();
// source --> https://mfrash.com/wp-includes/js/dist/element.min.js?ver=15ba804677f72a8db97b 
"use strict";var wp;(wp||={}).element=(()=>{var oe=Object.create;var S=Object.defineProperty;var ie=Object.getOwnPropertyDescriptor;var ae=Object.getOwnPropertyNames;var se=Object.getPrototypeOf,ue=Object.prototype.hasOwnProperty;var x=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),le=(e,t)=>{for(var o in t)S(e,o,{get:t[o],enumerable:!0})},L=(e,t,o,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of ae(t))!ue.call(e,n)&&n!==o&&S(e,n,{get:()=>t[n],enumerable:!(i=ie(t,n))||i.enumerable});return e};var O=(e,t,o)=>(o=e!=null?oe(se(e)):{},L(t||!e||!e.__esModule?S(o,"default",{value:e,enumerable:!0}):o,e)),ce=e=>L(S({},"__esModule",{value:!0}),e);var N=x((Fe,D)=>{D.exports=window.React});var j=x((We,F)=>{F.exports=window.ReactDOM});var z=x(A=>{"use strict";var V=j();A.createRoot=V.createRoot,A.hydrateRoot=V.hydrateRoot;var $e});var J=x((st,Z)=>{Z.exports=window.wp.escapeHtml});var Ue={};le(Ue,{Children:()=>r.Children,Component:()=>r.Component,Fragment:()=>r.Fragment,Platform:()=>B,PureComponent:()=>r.PureComponent,RawHTML:()=>P,StrictMode:()=>r.StrictMode,Suspense:()=>r.Suspense,cloneElement:()=>r.cloneElement,concatChildren:()=>fe,createContext:()=>r.createContext,createElement:()=>r.createElement,createInterpolateElement:()=>H,createPortal:()=>u.createPortal,createRef:()=>r.createRef,createRoot:()=>E.createRoot,findDOMNode:()=>u.findDOMNode,flushSync:()=>u.flushSync,forwardRef:()=>r.forwardRef,hydrate:()=>u.hydrate,hydrateRoot:()=>E.hydrateRoot,isEmptyElement:()=>be,isValidElement:()=>r.isValidElement,lazy:()=>r.lazy,memo:()=>r.memo,render:()=>u.render,renderToString:()=>ne,startTransition:()=>r.startTransition,switchChildrenNodeName:()=>pe,unmountComponentAtNode:()=>u.unmountComponentAtNode,useCallback:()=>r.useCallback,useContext:()=>r.useContext,useDebugValue:()=>r.useDebugValue,useDeferredValue:()=>r.useDeferredValue,useEffect:()=>r.useEffect,useId:()=>r.useId,useImperativeHandle:()=>r.useImperativeHandle,useInsertionEffect:()=>r.useInsertionEffect,useLayoutEffect:()=>r.useLayoutEffect,useMemo:()=>r.useMemo,useReducer:()=>r.useReducer,useRef:()=>r.useRef,useState:()=>r.useState,useSyncExternalStore:()=>r.useSyncExternalStore,useTransition:()=>r.useTransition});var r=O(N(),1);function fe(...e){return e.reduce((t,o,i)=>(r.Children.forEach(o,(n,a)=>{(0,r.isValidElement)(n)&&typeof n!="string"&&(n=(0,r.cloneElement)(n,{key:[i,a].join()})),t.push(n)}),t),[])}function pe(e,t){return e&&r.Children.map(e,(o,i)=>{if(typeof o?.valueOf()=="string")return(0,r.createElement)(t,{key:i},o);if(!(0,r.isValidElement)(o))return o;let{children:n,...a}=o.props;return(0,r.createElement)(t,{key:i,...a},n)})}var f,p,h,d,U=/<(\/)?(\w+)\s*(\/)?>/g;function C(e,t,o,i,n){return{element:e,tokenStart:t,tokenLength:o,prevOffset:i,leadingTextStart:n,children:[]}}var de=(e,t)=>{if(f=e,p=0,h=[],d=[],U.lastIndex=0,!he(t))throw new TypeError("The conversionMap provided is not valid. It must be an object with values that are React Elements");do;while(ye(t));return(0,r.createElement)(r.Fragment,null,...h)},he=e=>{let t=typeof e=="object"&&e!==null,o=t&&Object.values(e);return t&&o.length>0&&o.every(i=>(0,r.isValidElement)(i))};function ye(e){let t=me(),[o,i,n,a]=t,s=d.length,l=n>p?p:null;if(i&&!e[i])return k(),!1;switch(o){case"no-more-tokens":if(s!==0){let{leadingTextStart:w,tokenStart:_}=d.pop();h.push(f.substr(w,_))}return k(),!1;case"self-closed":return s===0?(l!==null&&h.push(f.substr(l,n-l)),h.push(e[i]),p=n+a,!0):(M(C(e[i],n,a)),p=n+a,!0);case"opener":return d.push(C(e[i],n,a,n+a,l)),p=n+a,!0;case"closer":if(s===1)return ge(n),p=n+a,!0;let c=d.pop(),R=f.substr(c.prevOffset,n-c.prevOffset);c.children.push(R),c.prevOffset=n+a;let y=C(c.element,c.tokenStart,c.tokenLength,n+a);return y.children=c.children,M(y),p=n+a,!0;default:return k(),!1}}function me(){let e=U.exec(f);if(e===null)return["no-more-tokens"];let t=e.index,[o,i,n,a]=e,s=o.length;return a?["self-closed",n,t,s]:i?["closer",n,t,s]:["opener",n,t,s]}function k(){let e=f.length-p;e!==0&&h.push(f.substr(p,e))}function M(e){let{element:t,tokenStart:o,tokenLength:i,prevOffset:n,children:a}=e,s=d[d.length-1],l=f.substr(s.prevOffset,o-s.prevOffset);l&&s.children.push(l),s.children.push((0,r.cloneElement)(t,null,...a)),s.prevOffset=n||o+i}function ge(e){let{element:t,leadingTextStart:o,prevOffset:i,tokenStart:n,children:a}=d.pop(),s=e?f.substr(i,e-i):f.substr(i);s&&a.push(s),o!==null&&h.push(f.substr(o,n-o)),h.push((0,r.cloneElement)(t,null,...a))}var H=de;var u=O(j(),1),E=O(z(),1);var be=e=>typeof e=="number"?!1:typeof e?.valueOf()=="string"||Array.isArray(e)?!e.length:!e;var we={OS:"web",select(e){return"web"in e?e.web:e.default},isWeb:!0},B=we;function W(e){return Object.prototype.toString.call(e)==="[object Object]"}function $(e){var t,o;return W(e)===!1?!1:(t=e.constructor,t===void 0?!0:(o=t.prototype,!(W(o)===!1||o.hasOwnProperty("isPrototypeOf")===!1)))}var m=function(){return m=Object.assign||function(t){for(var o,i=1,n=arguments.length;i<n;i++){o=arguments[i];for(var a in o)Object.prototype.hasOwnProperty.call(o,a)&&(t[a]=o[a])}return t},m.apply(this,arguments)};function G(e){return e.toLowerCase()}var _e=[/([a-z0-9])([A-Z])/g,/([A-Z])([A-Z][a-z])/g],ve=/[^A-Z0-9]+/gi;function X(e,t){t===void 0&&(t={});for(var o=t.splitRegexp,i=o===void 0?_e:o,n=t.stripRegexp,a=n===void 0?ve:n,s=t.transform,l=s===void 0?G:s,c=t.delimiter,R=c===void 0?" ":c,y=q(q(e,i,"$1\0$2"),a,"\0"),w=0,_=y.length;y.charAt(w)==="\0";)w++;for(;y.charAt(_-1)==="\0";)_--;return y.slice(w,_).split("\0").map(l).join(R)}function q(e,t,o){return t instanceof RegExp?e.replace(t,o):t.reduce(function(i,n){return i.replace(n,o)},e)}function Y(e,t){return t===void 0&&(t={}),X(e,m({delimiter:"."},t))}function T(e,t){return t===void 0&&(t={}),Y(e,m({delimiter:"-"},t))}var b=O(J(),1);function P({children:e,...t}){let o="";return r.Children.toArray(e).forEach(i=>{typeof i=="string"&&i.trim()!==""&&(o+=i)}),(0,r.createElement)("div",{dangerouslySetInnerHTML:{__html:o},...t})}var re=(0,r.createContext)(void 0);re.displayName="ElementContext";var{Provider:Se,Consumer:xe}=re,Oe=(0,r.forwardRef)(()=>null),Ee=new Set(["string","boolean","number"]),Te=new Set(["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"]),Pe=new Set(["allowfullscreen","allowpaymentrequest","allowusermedia","async","autofocus","autoplay","checked","controls","default","defer","disabled","download","formnovalidate","hidden","ismap","itemscope","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected","typemustmatch"]),Re=new Set(["autocapitalize","autocomplete","charset","contenteditable","crossorigin","decoding","dir","draggable","enctype","formenctype","formmethod","http-equiv","inputmode","kind","method","preload","scope","shape","spellcheck","translate","type","wrap"]),Ce=new Set(["animation","animationIterationCount","baselineShift","borderImageOutset","borderImageSlice","borderImageWidth","columnCount","cx","cy","fillOpacity","flexGrow","flexShrink","floodOpacity","fontWeight","gridColumnEnd","gridColumnStart","gridRowEnd","gridRowStart","lineHeight","opacity","order","orphans","r","rx","ry","shapeImageThreshold","stopOpacity","strokeDasharray","strokeDashoffset","strokeMiterlimit","strokeOpacity","strokeWidth","tabSize","widows","x","y","zIndex","zoom"]);function I(e,t){return t.some(o=>e.indexOf(o)===0)}function ke(e){return e==="key"||e==="children"}function je(e,t){return e==="style"?Me(t):t}var K=["accentHeight","alignmentBaseline","arabicForm","baselineShift","capHeight","clipPath","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","dominantBaseline","enableBackground","fillOpacity","fillRule","floodColor","floodOpacity","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","horizAdvX","horizOriginX","imageRendering","letterSpacing","lightingColor","markerEnd","markerMid","markerStart","overlinePosition","overlineThickness","paintOrder","panose1","pointerEvents","renderingIntent","shapeRendering","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","textAnchor","textDecoration","textRendering","underlinePosition","underlineThickness","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","vHanging","vIdeographic","vMathematical","vectorEffect","vertAdvY","vertOriginX","vertOriginY","wordSpacing","writingMode","xmlnsXlink","xHeight"].reduce((e,t)=>(e[t.toLowerCase()]=t,e),{}),Q=["allowReorder","attributeName","attributeType","autoReverse","baseFrequency","baseProfile","calcMode","clipPathUnits","contentScriptType","contentStyleType","diffuseConstant","edgeMode","externalResourcesRequired","filterRes","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","suppressContentEditableWarning","suppressHydrationWarning","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector"].reduce((e,t)=>(e[t.toLowerCase()]=t,e),{}),ee=["xlink:actuate","xlink:arcrole","xlink:href","xlink:role","xlink:show","xlink:title","xlink:type","xml:base","xml:lang","xml:space","xmlns:xlink"].reduce((e,t)=>(e[t.replace(":","").toLowerCase()]=t,e),{});function Ae(e){switch(e){case"htmlFor":return"for";case"className":return"class"}let t=e.toLowerCase();return Q[t]?Q[t]:K[t]?T(K[t]):ee[t]?ee[t]:t}function Ie(e){return e.startsWith("--")?e:I(e,["ms","O","Moz","Webkit"])?"-"+T(e):T(e)}function Le(e,t){return typeof t=="number"&&t!==0&&!I(e,["--"])&&!Ce.has(e)?t+"px":t}function g(e,t,o={}){if(e==null||e===!1)return"";if(Array.isArray(e))return v(e,t,o);switch(typeof e){case"string":return(0,b.escapeHTML)(e);case"number":return e.toString()}let{type:i,props:n}=e;switch(i){case r.StrictMode:case r.Fragment:return v(n.children,t,o);case P:let{children:a,...s}=n;return te(Object.keys(s).length?"div":null,{...s,dangerouslySetInnerHTML:{__html:a}},t,o)}switch(typeof i){case"string":return te(i,n,t,o);case"function":return i.prototype&&typeof i.prototype.render=="function"?De(i,n,t,o):g(i(n,o),t,o)}switch(i&&i.$$typeof){case Se.$$typeof:return v(n.children,n.value,o);case xe.$$typeof:return g(n.children(t||i._currentValue),t,o);case Oe.$$typeof:return g(i.render(n),t,o)}return""}function te(e,t,o,i={}){let n="";if(e==="textarea"&&t.hasOwnProperty("value")){n=v(t.value,o,i);let{value:s,...l}=t;t=l}else t.dangerouslySetInnerHTML&&typeof t.dangerouslySetInnerHTML.__html=="string"?n=t.dangerouslySetInnerHTML.__html:typeof t.children<"u"&&(n=v(t.children,o,i));if(!e)return n;let a=Ne(t);return Te.has(e)?"<"+e+a+"/>":"<"+e+a+">"+n+"</"+e+">"}function De(e,t,o,i={}){let n=new e(t,i);return typeof n.getChildContext=="function"&&Object.assign(i,n.getChildContext()),g(n.render(),o,i)}function v(e,t,o={}){let i="",n=Array.isArray(e)?e:[e];for(let a=0;a<n.length;a++){let s=n[a];i+=g(s,t,o)}return i}function Ne(e){let t="";for(let o in e){let i=Ae(o);if(!(0,b.isValidAttributeName)(i))continue;let n=je(o,e[o]);if(!Ee.has(typeof n)||ke(o))continue;let a=Pe.has(i);if(a&&n===!1)continue;let s=a||I(o,["data-","aria-"])||Re.has(i);typeof n=="boolean"&&!s||(t+=" "+i,!a&&(typeof n=="string"&&(n=(0,b.escapeAttribute)(n)),t+='="'+n+'"'))}return t}function Me(e){if(!$(e))return e;let t,o=e;for(let i in o){let n=o[i];if(n==null)continue;t?t+=";":t="";let a=Ie(i),s=Le(i,n);t+=a+":"+s}return t}var ne=g;return ce(Ue);})();
/*! Bundled license information:

is-plain-object/dist/is-plain-object.mjs:
  (*!
   * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
   *
   * Copyright (c) 2014-2017, Jon Schlinkert.
   * Released under the MIT License.
   *)
*/;
// source --> https://mfrash.com/wp-includes/js/dist/is-shallow-equal.min.js?ver=5d84b9f3cb50d2ce7d04 
"use strict";var wp;(wp||={}).isShallowEqual=(()=>{var u=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var h=Object.prototype.hasOwnProperty;var y=(e,r)=>{for(var t in r)u(e,t,{get:r[t],enumerable:!0})},w=(e,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let l of c(r))!h.call(e,l)&&l!==t&&u(e,l,{get:()=>r[l],enumerable:!(n=a(r,l))||n.enumerable});return e};var O=e=>w(u({},"__esModule",{value:!0}),e);var j={};y(j,{default:()=>g,isShallowEqual:()=>g,isShallowEqualArrays:()=>i,isShallowEqualObjects:()=>o});function o(e,r){if(e===r)return!0;let t=Object.keys(e),n=Object.keys(r);if(t.length!==n.length)return!1;let l=0;for(;l<t.length;){let s=t[l],f=e[s];if(f===void 0&&!r.hasOwnProperty(s)||f!==r[s])return!1;l++}return!0}function i(e,r){if(e===r)return!0;if(e.length!==r.length)return!1;for(let t=0,n=e.length;t<n;t++)if(e[t]!==r[t])return!1;return!0}function g(e,r){if(e&&r){if(e.constructor===Object&&r.constructor===Object)return o(e,r);if(Array.isArray(e)&&Array.isArray(r))return i(e,r)}return e===r}return O(j);})();