PageSourceSearch

https://glosscrystal.com/cdn/shop/t/38/assets/shopify.min.js?v=57004990022067937331725605618

js glosscrystal.com collected 2026-10-09 17:33:43 UTC 6,886 bytes, 1 lines download raw bytes

1Shopify.bind=function(t,e){return function(){return t.apply(e,arguments)}},Shopify.setSelectorByValue=function(t,e){for(var n=0,o=t.options.length;n<o;n++){var i=t.options[n];if(e==i.value||e==i.innerHTML)return t.selectedIndex=n,n}},Shopify.addListener=function(t,e,n){t.addEventListener?t.addEventListener(e,n,!1):t.attachEvent("on"+e,n)},Shopify.postLink=function(t,e){var n=(e=e||{}).method||"post",o=e.parameters||{},i=document.createElement("form");for(var a in i.setAttribute("method",n),i.setAttribute("action",t),o){var r=document.createElement("input");r.setAttribute("type","hidden"),r.setAttribute("name",a),r.setAttribute("value",o[a]),i.appendChild(r)}document.body.appendChild(i),i.submit(),document.body.removeChild(i)},Shopify.CountryProvinceSelector=function(t,e,n){this.countryEl=document.getElementById(t),this.provinceEl=document.getElementById(e),this.provinceContainer=document.getElementById(n.hideElement||e),Shopify.addListener(this.countryEl,"change",Shopify.bind(this.countryHandler,this)),this.initCountry(),this.initProvince()},Shopify.CountryProvinceSelector.prototype={initCountry:function(){var t=this.countryEl.getAttribute("data-default");Shopify.setSelectorByValue(this.countryEl,t),this.countryHandler()},initProvince:function(){var t=this.provinceEl.getAttribute("data-default");t&&this.provinceEl.options.length>0&&Shopify.setSelectorByValue(this.provinceEl,t)},countryHandler:function(t){var e=(i=this.countryEl.options[this.countryEl.selectedIndex]).getAttribute("data-provinces"),n=JSON.parse(e);if(this.clearOptions(this.provinceEl),n&&0==n.length)this.provinceContainer.style.display="none";else{for(var o=0;o<n.length;o++){var i;(i=document.createElement("option")).value=n[o][0],i.innerHTML=n[o][1],this.provinceEl.appendChild(i)}this.provinceContainer.style.display=""}},clearOptions:function(t){for(;t.firstChild;)t.removeChild(t.firstChild)},setOptions:function(t,e){var n=0;for(e.length;n<e.length;n++){var o=document.createElement("option");o.value=e[n],o.innerHTML=e[n],t.appendChild(o)}}},Shopify.formatMoney=function(t,e){"string"==typeof t&&(t=t.replace(".",""));var n="",o=/\{\{\s*(\w+)\s*\}\}/,i=e||this.money_format;function a(t,e){return void 0===t?e:t}function r(t,e,n,o){if(e=a(e,2),n=a(n,","),o=a(o,"."),isNaN(t)||null==t)return 0;var i=(t=(t/100).toFixed(e)).split(".");return i[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1"+n)+(i[1]?o+i[1]:"")}switch(i.match(o)[1]){case"amount":n=r(t,2);break;case"amount_no_decimals":n=r(t,0);break;case"amount_with_comma_separator":n=r(t,2,".",",");break;case"amount_no_decimals_with_comma_separator":n=r(t,0,".",",")}return i.replace(o,n)},Shopify.eventFlashSold=function(t=!1){let e=document.querySelector(".bls__product-details-infor .bls__flash-sold");if(t&&(e=document.querySelector(".bls__quickview-content .bls__flash-sold")),!e)return;const n=e.getAttribute("data-flash-sold"),o=e.getAttribute("data-flash-hours"),i=n.split(","),a=o.split(",");var r=i[Math.floor(Math.random()*i.length)],s=a[Math.floor(Math.random()*a.length)];const c=document.querySelector(".bls__flash-sold .product-sold"),l=document.querySelector(".bls__flash-sold .product-hour");c&&(c.innerHTML=r),l&&(l.innerHTML=s),e.style.display="block"},Shopify.eventFlashingBrowseTab=function(){var t,e,n=window.flashingBrowseTab?.enable,o=document.getElementsByTagName("title")[0],i=window.flashingBrowseTab?.firstNotification,a=window.flashingBrowseTab?.secondaryNotification;if(n&&o){var r=o.innerText,s=!0;document.addEventListener("visibilitychange",(()=>{var n;"visible"===document.visibilityState?s||(clearInterval(t),o.innerText=r):(n=1,s=!1,i&&a&&(t=setInterval((function(){1==n?(e=i,n=2):(e=a,n=1),o.innerText=e}),2e3)))}))}},Shopify.addToastAction=function(t){let e=EasyDialogBox.create(null,"dlg-toast dlg-fade",null,t,null,null,20,500);e.onHide=e.destroy,e.show().hide(3e3)},Shopify.termsConditionsAction=function(){function t(t){const e=document.getElementById("popup-terms-conditions"),n=t.currentTarget;if(!e)return;const o=e.getAttribute("data-text");var i=EasyDialogBox.create("popup-terms-conditions","dlg dlg-disable-footer dlg-disable-drag",o,e.innerHTML);i.onClose=i.destroy,i.show(300),n.href="javascript: (function(){})();",n.target="_self"}document.querySelectorAll(".bls__terms-conditions a").forEach((e=>{e.addEventListener("click",t)}))},Shopify.eventCountDownTimer=function(t=!1){let e=document.querySelectorAll(".bls__countdown-timer");t&&(e=document.querySelectorAll(".bls__quickview-content .bls__countdown-timer")),e.forEach((t=>{const e=t.getAttribute("data-days"),n=t.getAttribute("data-hrs"),o=t.getAttribute("data-secs"),i=t.getAttribute("data-mins"),a=t.getAttribute("data-time");var r=new Date(a).getTime(),s=setInterval((function(){var a=(new Date).getTime(),c=r-a;if(c<0)t.classList.add("d-none"),clearInterval(s);else{var l=Math.floor(c/864e5),d=Math.floor(c%864e5/36e5),u=Math.floor(c%36e5/6e4),p=Math.floor(c%6e4/1e3),h='<span class="countdown-days"><span class="countdown_ti heading-weight">'+l+'</span> <span class="countdown_tx">'+e+'</span></span> <span class="countdown-hours"><span class="countdown_ti heading-weight">'+d+'</span> <span class="countdown_tx">'+n+'</span></span> <span class="countdown-min"><span class="countdown_ti heading-weight">'+u+'</span> <span class="countdown_tx">'+i+'</span></span> <span class="countdown-sec"><span class="countdown_ti heading-weight">'+p+'</span> <span class="countdown_tx">'+o+"</span></span>";
1const a=t.querySelector(".bls__product-countdown");a&&(a.innerHTML=h),t.classList.remove("d-none")}}),1e3)}))},Shopify.swiperSlideQickview=function(){var t=new Swiper("#bls__swiper-qickview",{slidesPerView:1,spaceBetween:0,autoplay:!1,loop:!0,navigation:{nextEl:document.getElementById("bls__swiper-qickview").querySelector(".swiper-button-next"),prevEl:document.getElementById("bls__swiper-qickview").querySelector(".swiper-button-prev")}});document.querySelectorAll(".bls__quickview-content .bls__option-swatch").forEach((e=>{e.addEventListener("click",(e=>{const n=e.currentTarget;var o=Array.from(n.closest("#variant-radios").querySelectorAll(".bls__option-swatch.active"),(t=>t.getAttribute("data-value"))),i=JSON.parse(n.closest("#variant-radios").querySelector('[type="application/json"]').textContent).find((t=>!t.options.map(((t,e)=>o[e]===t)).includes(!1)));if(i&&i.featured_media){var a=i.featured_media.id,r=n.closest(".bls__product-quickview").querySelector(`[data-media-id="${a}"]`).getAttribute("data-position");t.slideTo(r,1e3)}}),!1)}));var e=document.getElementById("conditions_form_qickview");const n=document.querySelector(".bls-btn-checkout-qickview");e&&(getCookie("term_conditions")?(e.setAttribute("checked",""),n&&n.classList.remove("disabled")):e.addEventListener("change",(t=>{setCookie("term_conditions",1,1),n&&(t.currentTarget.checked?n.classList.remove("disabled"):n.classList.add("disabled"))})))};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.