1import{B as e}from"./BaseElement.wji90fuE.min.js";import{c as t,f as i}from"./WithApiClient.B8AOHZZP.min.js";import{n as s,t as r}from"./vendor-lit.2u3dzq2T.min.js";import"./fetchWithCache.BJ12kVQ7.min.js";import"./vendor.D2HIaoTS.min.js";var n=Object.defineProperty,o=Object.getOwnPropertyDescriptor,a=(e,t,i,s)=>{for(var r,a=s>1?void 0:s?o(t,i):t,h=e.length-1;h>=0;h--)(r=e[h])&&(a=(s?r(t,i,a):r(a))||a);return s&&a&&n(t,i,a),a};let h=class extends e{constructor(){super(...arguments),this.baseUrl="",this.sections="",this.whenInView=!1,this.$api=t({baseUrl:""},"html-update-utility")}observeElementInView(){return new Promise(e=>{const t=new IntersectionObserver(i=>{i.forEach(i=>{i.isIntersecting&&(t.disconnect(),e())})},{threshold:.1});t.observe(this)})}async firstUpdated(e){super.firstUpdated(e),this.whenInView&&await this.observeElementInView();const t=i(new URLSearchParams(this.baseUrl.split("?")[1])),s=this.baseUrl.split("?")[0];setTimeout(()=>{this.$api(`${s??window.location.pathname}`,{method:"GET"},{params:{...t,sections:this.sections},withCache:!0,forceJSON:!0})},0)}};a([s({type:String,attribute:"base-url"})],h.prototype,"baseUrl",2),a([s({type:String})],h.prototype,"sections",2),a([s({type:Boolean,attribute:"when-in-view"})],h.prototype,"whenInView",2),h=a([r("hydrate-sections-cache")],h);export{h as HydrateSectionsCache};
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.