1var e,t=e=>{throw TypeError(e)},i=(e,i,s)=>i.has(e)||t("Cannot "+s),s=(e,t,s)=>(i(e,t,"read from private field"),s?s.call(e):t.get(e)),o=(e,t,s,o)=>(i(e,t,"write to private field"),o?o.call(e,s):t.set(e,s),s);import{s as a}from"./bluetti.storage.D9pxbeCQ.min.js";import{s as n}from"./bluetti.pubsub.CgmIXzsp.min.js";import{Q as r}from"./bluetti.questionnaireapi.DCv_fjTb.min.js";import{s as l}from"./bluetti.utils.ZnnwTbrg.min.js";import{v as d}from"./bluetti.vendor.9VHUw-kC.min.js";import"./bluetti.constants.918rGUao.min.js";const h="_unique_id";e=new WeakMap;const c=new class{constructor(){var i,s,o;i=this,o=null,(s=e).has(i)?t("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(i):s.set(i,o)}init(){if(s(this,e))return s(this,e);let t=window.localStorage.getItem(h);return t||(t=d(),window.localStorage.setItem(h,t)),o(this,e,t),s(this,e)}getUuid(){return s(this,e)??this.init()}reset(){const t=d();return window.localStorage.setItem(h,t),o(this,e,t),s(this,e)}},{feedI18n:u}=window.Shopify;class m extends window.HTMLElement{constructor(){super(),this.feedFormId=this.dataset.feedFormId||"",this.overlay="",this.questionnApi=new r,this.visitorId=c.getUuid()}connectedCallback(){this.feedHiddenEvent=n("feed-hidden",()=>this.remove()),this.feedOpenEvent=n("feed-open",({id:e})=>{this.LOCAL_STORAGE_KEY=`article-feed:${e}`,this.render(),this.toggleShow()}),this.feedCloseEvent=n("feed-close",()=>this.handleClose()),this.addEventListener("click",({target:e})=>{const t=e.getAttribute("action"),i=e.getAttribute("data-value");"close"===t&&this.handleClose(),/^100[0-2]$/.test(t)&&(this.selectValue=i,this.handleAction(Number(t)))})}disconnectedCallback(){this.feedHiddenEvent(),this.feedOpenEvent(),this.feedCloseEvent()}render(){var e;const t=this.getLocalStorageKey();this.querySelectorAll("[action]").forEach(e=>e.classList.remove("active")),this.classList.toggle("not-active",!t),t&&(null==(e=this.querySelector(`[action="${t}"]`))||e.classList.add("active"))}toggleShow(e=!0){document.body.classList.toggle("max-lg:overflow-hidden",e),this.classList.toggle("show",e),e&&!this.overlay?(this.overlay=this.createOverlay(),document.body.appendChild(this.overlay)):!e&&this.overlay&&(this.overlay.remove(),this.overlay="")}createOverlay(){const e=document.createElement("div");return e.classList.add("fixed","inset-0","z-50","bg-black/50","lg:hidden","backdrop-blur-sm","transition-all"),e.addEventListener("click",()=>this.toggleShow(!1)),e}handleAction(e){a.setItem(this.LOCAL_STORAGE_KEY,e),this.render(),this.handleSubmit()}handleClose(){this.toggleShow(!1)}getLocalStorageKey(){return a.getItem(this.LOCAL_STORAGE_KEY)}async handleSubmit(){var e;try{if(!this.feedFormId)return;const t={questionnaireId:this.feedFormId,email:null==(e=null==window?void 0:window.customer)?void 0:e.email,visitorID:this.visitorId,from:"blog",sheet:[]},i=this.querySelectorAll("[data-question-id]"),s=this.querySelector("[data-question-options-id]");null==i||i.forEach(e=>{const i=e.dataset.type,s=e.dataset.questionId,o=e.querySelector("[data-value]");o&&t.sheet.push({questionId:s,[i]:o.dataset.value})}),t.sheet.push({questionId:s.dataset.questionOptionsId,[s.dataset.type]:[this.selectValue]});const{code:o,msg:a}=await this.questionnApi.AnswerCreate(t);if(0===o)return this.toggleShow(!1),void l("success",u.feed_thank);l("error",a)}catch(t){}}}window.customElements.define("bluetti-article-feed",m);
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.