PageSourceSearch

https://musashi.com/cdn/shop/t/40/assets/sm-progress-bar.6bad3475.min.js

js musashi.com collected 2026-10-03 21:23:44 UTC 2,566 bytes, 2 lines download raw bytes

1var f=Object.defineProperty;var b=(s,e,t)=>e in s?f(s,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[e]=t;var u=(s,e,t)=>(b(s,typeof e!="symbol"?e+"":e,t),t);import{p as g}from"./theme.a5e9727e.min.js";function y(s,e,t,n,i,a){const r=e||n;if(g()){s.textContent=r+i.toFixed(2);return}let o=null;const l=c=>{o||(o=c);const d=Math.min((c-o)/a,1);s.textContent=r+(t+d*(i-t)).toFixed(2),d<1&&window.requestAnimationFrame(l)};window.requestAnimationFrame(l)}function h(s){const e=s.match(/([^\d.-]+)?([\d.-]+)/);return e?{symbol:e[1]||"",value:parseFloat(e[2])}:{symbol:"",value:0}}class w extends window.HTMLElement{constructor(){super();u(this,"staticId",null);u(this,"initialized",!1);u(this,"unlocked",!1);this.staticId=this.dataset.static,this.unlocked=this.dataset.unlocked==="true",this.boundOnCartUpdate=this.onCartUpdate.bind(this)}onCartUpdate(t){var i;const n=(i=t.detail)==null?void 0:i.newChildren;n&&n.forEach(a=>{var r,o,l,c;if(this.staticId===((r=a.dataset)==null?void 0:r.static)){const d=(o=a.dataset)==null?void 0:o.progress;if(d){this.style.setProperty("--progress",d);const m=h(this.querySelector(".progress-bar__label").textContent),p=h((l=a.dataset)==null?void 0:l.away);y(this.querySelector(".progress-bar__label"),m.symbol,m.value,p.symbol,p.value,300)}((c=a.dataset)==null?void 0:c.unlocked)==="true"?(this.classList.add("unlocked"),this.switchMessage(!1)):(this.classList.remove("unlocked"),this.switchMessage(!0))}})}switchMessage(t){t?this.querySelector("[data-unlocked-title]").textContent=this.querySelector("[data-unlocked-title]").dataset.originalTitle:this.querySelector("[data-unlocked-title]").dataset.unlockedTitle!==""&&(this.querySelector("[data-unlocked-title]").textContent=this.querySelector("[data-unlocked-title]").dataset.unlockedTitle)}initializeProgressBar(){var n,i;const t=(n=this.dataset)==null?void 0:n.progress;if(t&&!this.initialized){this.style.setProperty("--progress",t);const a=h(this.querySelector(".progress-bar__label").textContent),r=h((i=this.dataset)==null?void 0:i.away);y(this.querySelector(".progress-bar__label"),a.symbol,a.value,r.symbol,r.value,300),this.initialized=!0}this.unlocked?(this.classList.add("unlocked"),this.switchMessage(!1)):this.switchMessage(!0)}connectedCallback(){this.initializeProgressBar(),document.addEventListener("cart:quantity:update",this.boundOnCartUpdate)}disconnectedCallback(){document.removeEventListener("cart:quantity:update",this.boundOnCartUpdate)}}window.customElements.define("sm-progress-bar",w);
2//# sourceMappingURL=sm-progress-bar.6bad3475.min.js.map

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.