/*!
* DisqusJS | v1.2.2
* Author: SukkaW
* Link: https://github.com/SukkaW/DisqusJS
* License: MIT
*/"use strict";function _typeof(s){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(s){return typeof s}:function(s){return s&&"function"==typeof Symbol&&s.constructor===Symbol&&s!==Symbol.prototype?"symbol":typeof s})(s)}!function(s,e){"function"==typeof define&&define.amd?define("DisqusJS",[],e):"object"===("undefined"==typeof module?"undefined":_typeof(module))&&module.exports?module.exports=e():s.DisqusJS=e()}("undefined"!=typeof self?self:void 0,function(){return function(s){var n=document,f=function(s){return n.getElementById(s)},o=function(s,e,t){var n=new XMLHttpRequest;n.open("GET",encodeURI(s),!0),n.onload=function(){if(200<=n.status&&n.status<300||304===n.status){var s=JSON.parse(n.responseText);e(s)}else a()},n.timeout=4500,n.ontimeout=function(s){t(s)},n.onerror=function(s){t(s)},n.send()},p=function(s,e){try{localStorage.setItem(s,e)}catch(s){}},d=function(s){var e=function(s){return s<10?"0".concat(s):s};s=Date.parse(new Date(s));var t=(s=new Date(s+288e5)).getFullYear(),n=e(s.getMonth()+1),o=e(s.getDate()),a=e(s.getHours()),r=e(s.getMinutes());return"".concat(t,"-").concat(n,"-").concat(o," ").concat(a,":").concat(r)};function e(){var s=n.createElement("script");f("disqus_thread").innerHTML='
评论完整模式加载中...如果长时间无法加载,请针对 disq.us | disquscdn.com | disqus.com 启用代理,或使用
评论基础模式',f("dsqjs-force-dsqjs").addEventListener("click",r),s.src="https://".concat(h.config.shortname,".disqus.com/embed.js"),s.setAttribute("data-timestamp",+new Date),(n.head||n.body).appendChild(s)}function j(){f("disqus_thread").innerHTML='
';for(var s=["disqus.com","".concat(h.config.shortname,".disqus.com")],n=0,o=0,a=function(){s.length===n&&n===o?g():s.length===n&&r()},e=function(s){var e=new Image,t=setTimeout(function(){e.onerror=e.onload=null,n++,a()},3e3);e.onerror=function(){clearTimeout(t),n++,a()},e.onload=function(){clearTimeout(t),n++,o++,a()},e.src="https://".concat(s,"/favicon.ico?").concat(+new Date)},t=0;t
',f("dsqjs-msg").innerHTML='评论基础模式加载中。如需完整体验请针对 disq.us | disquscdn.com | disqus.com 启用代理并 | 。',f("dsqjs-reload-disqus").addEventListener("click",j),f("dsqjs-force-disqus").addEventListener("click",g),f("dsqjs-order-".concat(h.sortType)).setAttribute("checked","true");var s="".concat(h.config.api,"3.0/threads/list.json?forum=").concat(h.config.shortname,"&thread=ident:").concat(h.config.identifier,"&api_key=").concat(v());o(s,function(s){if(0===s.code&&1===s.response.length){var e=s.response[0];h.page={id:e.id,title:e.title,isClosed:e.isClosed,length:e.posts,comment:[]},f("dsqjs-comment-num").innerHTML=h.page.length,h.config.siteName&&(f("dsqjs-site-name").innerHTML=h.config.siteName),t()}else 0===s.code&&1!==s.response.length?(f("dsqjs-msg").innerHTML='该 Thread 并没有初始化,是否 进行初始化?',f("dsqjs-force-disqus").addEventListener("click",g)):a()},function(s){a()})}();var t=function i(s){var d=f("dsqjs-load-more"),c=n.getElementsByClassName("dsqjs-order-radio"),l=function s(){var e=!0,t=!1,n=void 0;try{for(var o,a=c[Symbol.iterator]();!(e=(o=a.next()).done);e=!0)o.value.removeEventListener("change",u)}catch(s){t=!0,n=s}finally{try{e||null==a.return||a.return()}finally{if(t)throw n}}d.removeEventListener("click",s),i(h.page.next)},r=function(){s?(d.classList.remove("dsqjs-disabled"),d.innerHTML="加载更多评论失败,点击重试",d.addEventListener("click",l)):a()},u=function s(e){h.sortType=e.target.getAttribute("value"),p("disqus.sort",h.sortType);var t=!0,n=!1,o=void 0;try{for(var a,r=c[Symbol.iterator]();!(t=(a=r.next()).done);t=!0)a.value.removeEventListener("change",s)}catch(s){n=!0,o=s}finally{try{t||null==r.return||r.return()}finally{if(n)throw o}}d.removeEventListener("click",l),h.page.comment=[],h.page.next="",f("dsqjs-post-container").innerHTML='正在切换排序方式...
',d.classList.add("dsqjs-hide"),i()};s=s?"&cursor=".concat(s):"",d.classList.add("dsqjs-disabled");var m={parseDate:function(s){return Date.parse(new Date(s.createdAt))},parentAsc:function(s,e){return s.parent&&e.parent?m.parseDate(s)-m.parseDate(e):0}},e="".concat(h.config.api,"3.0/threads/listPostsThreaded?forum=").concat(h.config.shortname,"&thread=").concat(h.page.id).concat(s,"&api_key=").concat(v(),"&order=").concat(h.sortType);o(e,function(s){if(0===s.code&&0