PageSourceSearch

https://www.stauffusa.com/assets/85393ace388eb89d64cbb1b9dc84c00e9…/js/stauff_platform.product-catalog.js

js stauffusa.com collected 2026-10-01 03:05:13 UTC 4,005 bytes, 1 lines download raw bytes

1"use strict";(self.webpackJsonp_stauff_platform=self.webpackJsonp_stauff_platform||[]).push([[5074],{4465:(e,t,l)=>{l.r(t),l.d(t,{default:()=>s});var a=l(97337);class s extends a.Z{constructor(){super(...arguments),this.triggers=void 0,this.dialog=void 0,this.downloadLink=void 0,this.downloadLinkFallback=void 0}readyCallback(){}init(){this.triggers=this.querySelectorAll("."+this.jsName+"__trigger"),this.downloadLink=this.querySelectorAll("a."+this.jsName+"__download-link")[0],this.downloadLinkFallback=this.querySelectorAll("a."+this.jsName+"__download-link-fallback")[0],this.mapEvents(),this.initClickEventTracker()}initClickEventTracker(){var e="data-track-catalog-click-event";this.querySelectorAll("["+e+"]").forEach((t=>{t.addEventListener("click",(()=>{this.trackCatalogElementClickEvent(t.getAttribute(e))}))}))}mapEvents(){var e,t=e=>this.showModalDialog(e);this.triggers.forEach((e=>e.addEventListener("click",t))),null==(e=this.downloadLink)||e.addEventListener("click",(e=>this.handleDownLoadClick(e)))}handleDownLoadClick(e){var t,l,a,s,i,o,n,d,r;this.downloadLink&&null!=(t=this.downloadLink)&&null!=(l=t.href)&&null!=(a=l.toLowerCase())&&a.endsWith(".pdf")&&(e.preventDefault(),null!=(s=this.downloadLink.getElementsByClassName(this.jsName+"__download-link-spinner")[0])&&null!=(i=s.classList)&&i.contains("is-hidden")&&(null==(o=this.downloadLink.getElementsByClassName(this.jsName+"__download-link-icon")[0])||null==(n=o.classList)||n.add("is-hidden"),null==(d=this.downloadLink.getElementsByClassName(this.jsName+"__download-link-spinner")[0])||null==(r=d.classList)||r.remove("is-hidden"),fetch(this.downloadLink.href).then((e=>e.ok?e.blob():Promise.reject(e.status+" "+e.statusText))).then((e=>{var t,l=window.document.createElement("a");l.href=window.URL.createObjectURL(e);var a=(null==(t=new URL(this.downloadLink.href).pathname.split("/").pop())?void 0:t.split(".")[0])||"download";l.setAttribute("download",a),document.body.appendChild(l),l.click(),document.body.removeChild(l),window.URL.revokeObjectURL(l.href)})).catch((()=>{var e;null==(e=this.downloadLinkFallback)||e.click()})).finally((()=>{var e,t,l,a;null==(e=this.downloadLink.getElementsByClassName(this.jsName+"__download-link-icon")[0])||null==(t=e.classList)||t.remove("is-hidden"),null==(l=this.downloadLink.getElementsByClassName(this.jsName+"__download-link-spinner")[0])||null==(a=l.classList)||a.add("is-hidden")}))))}showModalDialog(e){e&&e.preventDefault(),this.dialog||(this.dialog=this.makeDialog()),this.setEscListenerState(!0),this.setBodyScrollState(!0),this.dialog.show()}closeModalDialog(){this.dialog.close(),this.setBodyScrollState(!1),this.setEscListenerState(!1)}makeDialog(){var e,t=this.querySelector('[data-role="modal_template"]').content.firstElementChild.cloneNode(!0);return t.appendChild(this.makeIframe()),document.body.append(t),null==(e=t.querySelector('[data-role="close_dialog"]'))||e.addEventListener("click",this.closeModalDialog.bind(this)),t}makeIframe(){var e=document.createElement("iframe");return e.name=this.name,e.src=this.dataset.link,e.classList.add(this.name+"__iframe","col--sm-12"),e.allowFullscreen=!0,e}setBodyScrollState(e){e?(this._scrollY=window.scrollY,document.body.style.overflow="hidden"):void 0!==this._scrollY&&(document.body.style.overflow="",window.scrollTo(0,this._scrollY),delete this._scrollY)}setEscListenerState(e){e?(this._closeClosure||(this._closeClosure=e=>{"Escape"===e.key&&this.closeModalDialog()}),document.addEventListener("keydown",this._closeClosure)):this._closeClosure&&document.removeEventListener("keydown",this._closeClosure)}trackCatalogElementClickEvent(e){this.clearPreviousTrackedData(),window.dataLayer.push({event:e,catalog_details:{catalogue_type:this.dataset.link,article_number:this.getArticleNumber()}})}getArticleNumber(){try{var e=window.location.href,t=new URL(e).pathname.match(/(\d+)$/);if(t)return t[1]}catch(e){return null}return null}clearPreviousTrackedData(){window.dataLayer.push({catalog_details:null})}}}}]);

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.