"use strict";var alpha_cs_tooltips=[{target:".main-content .product-single .social-icons, .main-content .post-single .social-icons",text:"Share",elementID:"share",pos:"bottom",type:"section"},{target:".page-header",text:"Page Title Bar",elementID:"title_bar",pos:"bottom",type:"section"},{target:".post-archive",text:"Archive Page",elementID:"blog",pos:"top",type:"section"},{target:".single .post-single",text:"Single Page",elementID:"blog",pos:"top",type:"section"},{target:".main-content > .products, .main-content > .yit-wcan-container > .products",text:"Product Archive Page",elementID:"products_archive",pos:"top",type:"section"},{target:".single .product-single",text:"Product Page",elementID:"product_detail",pos:"top",type:"section"},{target:".products .product-wrap .product",text:"Product Type",elementID:"product_type",pos:"center",type:"section"},{target:".product-single .woocommerce-tabs",text:"Product DataTab Type",elementID:"product_description_title",pos:"center",type:"control"},{target:".cookies-popup",text:"Privacy Setting",elementID:"cookie_law_info",pos:"top",type:"section"}];jQuery(document).ready((function(t){function e(t){var e=wp.customize(t);return e?e.get():""}var o,r=["container","container_fluid",["site_type","site_bg","content_bg","site_width","site_gap"],["primary_color","secondary_color","dark_color","light_color"],["typo_default"],"typo_heading","ptb_bg","ptb_height","typo_ptb_title","typo_ptb_subtitle","typo_ptb_breadcrumb","share_color",["custom_css"],"product_description_title","product_reviews_title","product_tab_title","product_specification_title","cart_show_qty"];function a(e){alpha_cs_tooltips.forEach((function(o){(t(o.target).is(e)||e.find(t(o.target)).length)&&(o.type||(o.type="control"),t(o.target).alphaTooltip({position:o.pos,text:o.text,target:o.target,init:function(e){!function(e,o){if(e.elementID&&"custom"!=e.type)e.type||(e.type="section"),window.parent.wp.customize[e.type](e.elementID).focus(),"section"==e.type&&window.parent.wp.customize[e.type](e.elementID).contentContainer?window.parent.jQuery("body").trigger("initReduxFields",[window.parent.wp.customize[e.type](e.elementID).contentContainer]):"control"==e.type&&window.parent.wp.customize[e.type](e.elementID).container&&window.parent.jQuery("body").trigger("initReduxFields",[window.parent.wp.customize[e.type](e.elementID).container.closest(".control-section")]);else if("custom"==e.type&&e.elementID){window.parent.wp.customize.section("alpha_header_layouts").focus();var r=t(e.target,".header-wrapper").index(o),a=!!o.closest(".visible-for-sm:visible").length;t(".alpha-header-builder .header-wrapper-"+(a?"mobile":"desktop")+" .header-builder-wrapper",window.parent.document).find('[data-id="'+e.elementID+'"]').eq(r).trigger("click")}}(o,e)}}))})),t(document.body).on("mouseenter",".alpha-tooltip",(function(){t(this).stop(!0,!0).show();var e=t(this).data("triggerObj");e&&e.addClass("alpha-tooltip-active")})).on("mouseleave",".alpha-tooltip",(function(){t(this).stop().fadeOut(400);var e=t(this).data("triggerObj");e&&e.removeClass("alpha-tooltip-active")})).on("click",".alpha-tooltip",(function(){var e=t(this).data("initCall");e&&e.call(this,t(this).data("triggerObj"))}))}t.fn.alphaTooltip=function(e){return e.target=escape(e.target.replace(/"/g,"")),t('.alpha-tooltip[data-target="'+e.target+'"]').remove(),t(this).each((function(){if(!t(this).hasClass("alpha-tooltip-initialized")){var o=t(this),r=t('").appendTo("body");r.data("triggerObj",o),e.init&&r.data("initCall",e.init),o.on("mouseenter",(function(){r.text(e.text),"top"==e.position?r.css("top",o.offset().top-r.outerHeight()/2).css("left",o.offset().left+o.outerWidth()/2-r.outerWidth()/2):"bottom"==e.position?r.css("top",o.offset().top+o.outerHeight()-r.outerHeight()/2).css("left",o.offset().left+o.outerWidth()/2-r.outerWidth()/2):"left"==e.position?r.css("top",o.offset().top+o.outerHeight()/2-r.outerHeight()/2).css("left",o.offset().left-r.outerWidth()/2):"right"==e.position?r.css("top",o.offset().top+o.outerHeight()/2-r.outerHeight()/2).css("left",o.offset().left+o.outerWidth()-r.outerWidth()/2):"center"==e.position&&r.css("top",o.offset().top+o.outerHeight()/2-r.outerHeight()/2).css("left",o.offset().left+o.outerWidth()/2-r.outerWidth()/2),r.stop().fadeIn(100),o.addClass("alpha-tooltip-active")})).on("mouseleave",(function(){r.stop(!0,!0).fadeOut(400),o.removeClass("alpha-tooltip-active")})).addClass("alpha-tooltip-initialized")}}))},wp.customize.selectiveRefresh.bind("partial-content-rendered",(function(e){a(t(e.partial.params.selector))})),a(t("body")),function(){var e="alpha-theme",o="";["alpha-theme-shop","alpha-theme-blog","alpha-theme-shop-other","alpha-theme-single-product","alpha-theme-single-post"].forEach((function(o,r){"alpha-theme"==e&&t("#"+o+"-inline-css").length&&(e=o)}));var r=(o=t("#"+e+"-inline-css").text()).matchAll(/\n(--[^\: ]*)\:/g),a=o.matchAll(/\n--[^\: ]*\: ([^\;]*)\;/g),i=[],n=[],p=t("html")[0].style;for(var c of r)i.push(c[1]);for(var l of a)n.push(l[1]);for(var s=0;sa")})),t(document.body).on("product_reviews_title",(function(){c("product_reviews_title",".woocommerce-Tabs-panel--reviews .title"),c("product_reviews_title","#tab-title-reviews>a")})),t(document.body).on("product_specification_title",(function(){c("product_specification_title",".woocommerce-Tabs-panel--additional_information .title"),c("product_specification_title","#tab-title-additional_information>a")})),t(document.body).on("product_tab_title",(function(){c("product_tab_title",".woocommerce-Tabs-panel--alpha_product_tab .title"),c("product_tab_title","#tab-title-alpha_product_tab>a")})),t(document.body).on("site_type",(function(){var r=e("site_type");"full"!=r?(t(document.body).addClass("site-boxed"),l(o,"site",e("site_bg")),o.setProperty("--alpha-site-width",e("site_width")+"px"),o.setProperty("--alpha-site-margin","0 auto"),"boxed"==r?o.setProperty("--alpha-site-gap","0 "+e("site_gap")+"px"):o.setProperty("--alpha-site-gap",e("site_gap")+"px")):(t(document.body).removeClass("site-boxed"),l(o,"site",{"background-color":"#fff"}),o.setProperty("--alpha-site-width","false"),o.setProperty("--alpha-site-margin","0"),o.setProperty("--alpha-site-gap","0")),document.querySelector(".page-wrapper")&&l(document.querySelector(".page-wrapper").style,"page-wrapper",e("content_bg"))})),t(document.body).on("primary_color",(function(){o.setProperty("--alpha-primary-color",e("primary_color")),o.setProperty("--alpha-primary-color-hover",g(e("primary_color"))),o.setProperty("--alpha-primary-color-op-80",m(e("primary_color"),.8)),o.setProperty("--alpha-secondary-color",e("secondary_color")),o.setProperty("--alpha-secondary-color-hover",g(e("secondary_color"))),o.setProperty("--alpha-dark-color",e("dark_color")),o.setProperty("--alpha-dark-color-hover",g(e("dark_color"))),o.setProperty("--alpha-light-color",e("light_color")),o.setProperty("--alpha-light-color-hover",g(e("light_color"))),o.setProperty("--alpha-change-border-color","#eee"),o.setProperty("--alpha-change-color-light-1","#fff"),o.setProperty("--alpha-change-color-light-1-op2",m("#eee",.2)),o.setProperty("--alpha-change-color-light-1-op9",m("#eee",.9)),o.setProperty("--alpha-change-color-light-2","#f4f4f4"),o.setProperty("--alpha-change-color-light-3","#ccc"),o.setProperty("--alpha-change-color-dark-1","#333"),o.setProperty("--alpha-change-color-dark-1-op1",m("#f4f4f4",.1)),o.setProperty("--alpha-change-color-dark-1-op7",m("#f4f4f4",.7)),o.setProperty("--alpha-change-color-dark-2","#444"),o.setProperty("--alpha-change-color-dark-3","#313438")})),t(document.body).on("typo_default",(function(){s(o,"body",e("typo_default"))})),t(document.body).on("typo_heading",(function(){s(o,"heading",e("typo_heading"))})),t(document.body).on("ptb_bg",(function(){document.querySelector(".page-header")&&l(document.querySelector(".page-header").style,"ptb",e("ptb_bg"))})),t(document.body).on("ptb_height",(function(){document.querySelector(".page-title-bar")&&document.querySelector(".page-title-bar").style.setProperty("--alpha-ptb-height",e("ptb_height")+"px")})),t(document.body).on("ptb_breadcrumb_bg",(function(){document.querySelector(".breadcrumb")&&document.querySelector(".breadcrumb").style.setProperty("--alpha-ptb-breadcrumb-background",e("ptb_breadcrumb_bg"))})),t(document.body).on("typo_ptb_title",(function(){document.querySelector(".page-header .page-title")&&s(document.querySelector(".page-header .page-title").style,"ptb-title",e("typo_ptb_title"))})),t(document.body).on("typo_ptb_subtitle",(function(){document.querySelector(".page-header .page-subtitle")&&s(document.querySelector(".page-header .page-subtitle").style,"ptb-subtitle",e("typo_ptb_subtitle"))})),t(document.body).on("typo_ptb_breadcrumb",(function(){document.querySelector(".breadcrumb")&&s(document.querySelector(".breadcrumb").style,"ptb-breadcrumb",e("typo_ptb_breadcrumb"))})),t(document.body).on("custom_css",(function(){t("style#alpha-preview-custom-inline-css").length||t('').insertAfter("#alpha-preview-custom-css"),t("style#alpha-preview-custom-inline-css").html(e("custom_css"))})),t(document.body).on("cart_show_qty",(function(){"undefined"!=typeof wc_cart_fragments_params&&(sessionStorage.removeItem("wc_cart_created"),localStorage.removeItem(wc_cart_fragments_params.cart_hash_key),sessionStorage.removeItem(wc_cart_fragments_params.cart_hash_key),sessionStorage.removeItem(wc_cart_fragments_params.fragment_name))}));for(var i=0;i0&&(a.textContent=e(o))}function l(t,e,o){o["background-color"]?t.setProperty("--alpha-"+e+"-bg-color",o["background-color"]):t.removeProperty("--alpha-"+e+"-bg-color"),o["background-image"]?(t.setProperty("--alpha-"+e+"-bg-image","url("+o["background-image"]+")"),o["background-repeat"]&&t.setProperty("--alpha-"+e+"-bg-repeat",o["background-repeat"]),o["background-position"]&&t.setProperty("--alpha-"+e+"-bg-position",o["background-position"]),o["background-size"]&&t.setProperty("--alpha-"+e+"-bg-size",o["background-size"]),o["background-attachment"]&&t.setProperty("--alpha-"+e+"-bg-attachment",o["background-attachment"])):(t.removeProperty("--alpha-"+e+"-bg-image"),t.removeProperty("--alpha-"+e+"-bg-repeat"),t.removeProperty("--alpha-"+e+"-bg-position"),t.removeProperty("--alpha-"+e+"-bg-size"),t.removeProperty("--alpha-"+e+"-bg-attachment"))}function s(t,e,o){o["font-family"]&&"inherit"!=o["font-family"]?(t.setProperty("--alpha-"+e+"-font-family","'"+o["font-family"]+"', sans-serif"),o.variant||(o.variant=400)):t.removeProperty("--alpha-"+e+"-font-family"),o.variant?t.setProperty("--alpha-"+e+"-font-weight","regular"==o.variant?400:o.variant):"heading"==e?t.setProperty("--alpha-"+e+"-font-weight",600):t.removeProperty("--alpha-"+e+"-font-weight"),o["font-size"]&&""!=o["font-size"]?t.setProperty("--alpha-"+e+"-font-size",Number(o["font-size"])?o["font-size"]+"px":o["font-size"]):t.removeProperty("--alpha-"+e+"-font-size"),o["line-height"]&&""!=o["line-height"]?t.setProperty("--alpha-"+e+"-line-height",o["line-height"]):t.removeProperty("--alpha-"+e+"-line-height"),o["letter-spacing"]&&""!=o["letter-spacing"]?t.setProperty("--alpha-"+e+"-letter-spacing",o["letter-spacing"]):t.removeProperty("--alpha-"+e+"-letter-spacing"),o["text-transform"]&&""!=o["text-transform"]?t.setProperty("--alpha-"+e+"-text-transform",o["text-transform"]):t.removeProperty("--alpha-"+e+"-text-transform"),o.color&&""!=o.color?t.setProperty("--alpha-"+e+"-color",o.color):t.removeProperty("--alpha-"+e+"-color")}function d(t){var e=(t=Number.parseInt(t.slice(1),16))%256,o=(t/=256)%256,r=t/=256,a=Math.min(r,o,e),i=Math.max(r,o,e),n=a+i,p=Number(i-a),c=0,l=0;return p&&(l=n<255?p/n:p/(510-n),r==i?c=60*(o-e)/p:o==i?c=60*(e-r)/p+120:e==i&&(c=60*(r-o)/p+240)),[(c+360)%360,100*l,n/5.1+7]}function u(t,e,o){return o<0?o+=1:o>1&&(o-=1),6*o<1?t+(e-t)*o*6:2*o<1?e:3*o<2?t+(e-t)*(2/3-o)*6:t}function h(t,e){var o=d(t);o[2]+=e;var r=function(t,e,o){t<0&&(t+=360);var r=t/360,a=Math.min(100,Math.max(0,e))/100,i=Math.min(100,Math.max(0,o))/100,n=i<=.5?i*(a+1):i+a-i*a,p=2*i-n,c=255*u(p,n,r+1/3),l=255*u(p,n,r),s=255*u(p,n,r-1/3);return[Math.ceil(c),Math.ceil(l),Math.ceil(s)]}(o[0],o[1],o[2]);return"rgb("+r[0]+","+r[1]+","+r[2]+")"}function g(t,e=5){return t&&"transparent"!=t?(4==t.length&&(t="#"+t[1]+t[1]+t[2]+t[2]+t[3]+t[3]),h(t,e)):"transparent"}function m(t,e){var o=d(t);return"hsl("+o[0]+", "+o[1]+"%, "+o[2]+"%, "+e+")"}}));