PageSourceSearch

https://www.josephjoseph.com/cdn/shop/t/651/assets/bao-section-rendering.js?v=97875159808162224091790082281

js josephjoseph.com collected 2026-10-02 11:17:09 UTC 2,590 bytes, 2 lines download raw bytes

1window.BAO.sectionRenderer=new class{async fetch(sections,sectionsUrl=window.location.pathname){typeof sections=="string"&&(sections=[sections]);const[path,querystring=""]=sectionsUrl.split("?"),params=new URLSearchParams(querystring);return params.append("sections",sections.join(",")),(await fetch(`${path}?${params.toString()}`)).json()}async fetchSingle(section,sectionsUrl=this.sectionsUrl){const[path,querystring=""]=sectionsUrl.split("?"),params=new URLSearchParams(querystring);return params.set("section_id",section),(await fetch(`${path}?${params.toString()}`)).text()}render(section){if("dontRender"in section&&section.dontRender)return;this.validate(section);const elementToReplace=document.getElementById(section.id)?.querySelector(section.selector)||document.getElementById(section.id);if(!elementToReplace)return;const newHTML=this.getInnerHtml(section.html,section.selector),oldHTML=elementToReplace.innerHTML;elementToReplace.innerHTML=typeof section.convertor=="function"?section.convertor(oldHTML,newHTML):newHTML}renderMultiple(sections){sections.forEach(section=>this.render(section))}getInnerHtml(html,selector=".shopify-section"){return this.convertToDOM(html)?.querySelector(selector)?.innerHTML||""}convertToDOM(html){return new DOMParser().parseFromString(html,"text/html")}validate(section){const isValid=this.expectedKeys.every(key=>key in section);if(!isValid)throw new Error(`section is missing these keys: "${this.expectedKeys.filter(k=>!(k in section)).join(", ")}"`);return isValid}get expectedKeys(){return["id","selector","html"]}get pushCartSections(){return[{id:"push-cart-delivery",section:"push-cart-delivery",selector:'[data-section-id="push-cart-delivery"]'},{id:"push-cart-items",section:"push-cart-items",selector:'[data-section-id="push-cart-items"]'},{id:"push-cart-footer",section:"push-cart-footer",selector:'[data-section-id="push-cart-footer"]'},{id:"push-cart-count",section:"push-cart-count",selector:".shopify-section",dontRender:!0},{id:"cart-data",section:"cart-data",dontRender:!0}]}get cartSections(){return[{id:"push-cart-count",section:"push-cart-count",selector:".shopify-section",dontRender:!0},{id:"template-cart-items",section:document.getElementById("template-cart-items").dataset.id,selector:"[data-cart-items]"},{id:"template-cart-footer",section:document.getElementById("template-cart-footer").dataset.id,selector:"[data-cart-footer]"}]}get sectionsUrl(){return`${window.location.pathname}${window.location.search}`}};
2//# sourceMappingURL=/cdn/shop/t/651/assets/bao-section-rendering.js.map?v=97875159808162224091790082281

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.