import{r as t,h as s,H as i}from"./p-1e44390c.js";const e=class{constructor(s){t(this,s),this.setScriptEl=t=>{this.targetEl=t}}componentDidLoad(){var t;const s=`\n    var disqus_config = function () {\n      this.page.url = '${this.url}';  // Replace PAGE_URL with your page's canonical URL variable\n      this.page.identifier = '${this.siteId}'; // Replace PAGE_IDENTIFIER with your page's unique identifier variable\n    };\n\n    (function() {\n    var d = document, s = d.createElement('script');\n    s.src = 'https://${this.siteId}.disqus.com/embed.js';\n    s.setAttribute('data-timestamp', +new Date());\n    (d.head || d.body).appendChild(s);\n    })();\n    `;this.scriptEl=document.createElement("script"),this.scriptEl.type="text/javascript",this.scriptEl.innerHTML=s,null===(t=this.targetEl)||void 0===t||t.appendChild(this.scriptEl);const i=document.createElement("script");i.id="dsq-count-scr",i.async=!0,i.src=`//${this.siteId}.disqus.com/count.js`,this.disqusScriptEl=i,document.body.appendChild(i)}componentDidUnload(){var t,s,i,e;null===(s=null===(t=this.scriptEl)||void 0===t?void 0:t.parentNode)||void 0===s||s.removeChild(this.scriptEl),null===(e=null===(i=this.disqusScriptEl)||void 0===i?void 0:i.parentNode)||void 0===e||e.removeChild(this.disqusScriptEl)}render(){return s(i,null,s("div",{id:"disqus_thread"}),s("div",{ref:t=>this.setScriptEl(t)}),s("noscript",null,"Please enable JavaScript to view the"," ",s("a",{href:"https://disqus.com/?ref_noscript"},"comments powered by Disqus.")))}};e.style=":host{display:block}";export{e as disqus_comments}