diff --git a/dist/halo-comment.js b/dist/halo-comment.js
index 9557656..d4d20b3 100644
--- a/dist/halo-comment.js
+++ b/dist/halo-comment.js
@@ -9799,7 +9799,7 @@ var __webpack_exports__ = {};
if (typeof window !== 'undefined') {
var currentScript = window.document.currentScript
- if (({"NODE_ENV":"production","BASE_URL":"/themes/dream/source/lib/halo-comment@1.0.6/"}).NEED_CURRENTSCRIPT_POLYFILL) {
+ if (({"NODE_ENV":"production","BASE_URL":"https://unpkg.com/halo-comment-dream@1.0.7/dist/"}).NEED_CURRENTSCRIPT_POLYFILL) {
var getCurrentScript = __webpack_require__(7679)
currentScript = getCurrentScript()
@@ -13153,7 +13153,7 @@ var DreamEmojivue_type_template_id_2a4d7e70_staticRenderFns = []
url: {
type: String,
required: false,
- default: `${"/themes/dream/source/lib/halo-comment@1.0.6/"}assets/emoji/`
+ default: `${"https://unpkg.com/halo-comment-dream@1.0.7/dist/"}assets/emoji/`
}
},
computed: {
@@ -13400,7 +13400,7 @@ function renderedEmojiHtml(html) {
for (let emoji of emojiData) {
let name = emoji.name;
- let img = ` `;
+ let img = ` `;
html = html.replace(new RegExp(`\\[/${name}\\]`, 'gm'), img);
}
@@ -14744,8 +14744,8 @@ const defaultConfig = {
enableImageUpload: false,
enableBulletScreen: false,
imageToken: undefined,
- avatarLoading: `${"/themes/dream/source/lib/halo-comment@1.0.6/"}assets/img/loading.svg`,
- defaultAvatar: `${"/themes/dream/source/lib/halo-comment@1.0.6/"}assets/img/avatar.svg`
+ avatarLoading: `${"https://unpkg.com/halo-comment-dream@1.0.7/dist/"}assets/img/loading.svg`,
+ defaultAvatar: `${"https://unpkg.com/halo-comment-dream@1.0.7/dist/"}assets/img/avatar.svg`
};
/* harmony default export */ var Commentvue_type_script_lang_js_shadow = ({
name: 'Comment',
diff --git a/dist/halo-comment.min.js b/dist/halo-comment.min.js
index 2926692..f950394 100644
--- a/dist/halo-comment.min.js
+++ b/dist/halo-comment.min.js
@@ -10,4 +10,4 @@
* @author Feross Aboukhadijeh
* @license MIT
*/
-e.exports=function(e){return null!=e&&(t(e)||n(e)||!!e._isBuffer)}},9575:function(e,t,n){(function(t,n){e.exports=n()})("undefined"!==typeof self?self:"undefined"!==typeof window?window:"undefined"!==typeof n.g&&n.g,(function(){"use strict";var e="3.7.2",t=e,n="function"===typeof atob,r="function"===typeof btoa,o="function"===typeof Buffer,i="function"===typeof TextDecoder?new TextDecoder:void 0,a="function"===typeof TextEncoder?new TextEncoder:void 0,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",l=Array.prototype.slice.call(s),c=function(e){var t={};return e.forEach((function(e,n){return t[e]=n})),t}(l),u=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,p=String.fromCharCode.bind(String),f="function"===typeof Uint8Array.from?Uint8Array.from.bind(Uint8Array):function(e,t){return void 0===t&&(t=function(e){return e}),new Uint8Array(Array.prototype.slice.call(e,0).map(t))},d=function(e){return e.replace(/=/g,"").replace(/[+\/]/g,(function(e){return"+"==e?"-":"_"}))},h=function(e){return e.replace(/[^A-Za-z0-9\+\/]/g,"")},m=function(e){for(var t,n,r,o,i="",a=e.length%3,s=0;s255||(r=e.charCodeAt(s++))>255||(o=e.charCodeAt(s++))>255)throw new TypeError("invalid character found");t=n<<16|r<<8|o,i+=l[t>>18&63]+l[t>>12&63]+l[t>>6&63]+l[63&t]}return a?i.slice(0,a-3)+"===".substring(a):i},g=r?function(e){return btoa(e)}:o?function(e){return Buffer.from(e,"binary").toString("base64")}:m,b=o?function(e){return Buffer.from(e).toString("base64")}:function(e){for(var t=4096,n=[],r=0,o=e.length;r>>6)+p(128|63&t):p(224|t>>>12&15)+p(128|t>>>6&63)+p(128|63&t)}t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return p(240|t>>>18&7)+p(128|t>>>12&63)+p(128|t>>>6&63)+p(128|63&t)},v=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,x=function(e){return e.replace(v,w)},k=o?function(e){return Buffer.from(e,"utf8").toString("base64")}:a?function(e){return b(a.encode(e))}:function(e){return g(x(e))},_=function(e,t){return void 0===t&&(t=!1),t?d(k(e)):k(e)},S=function(e){return _(e,!0)},j=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,C=function(e){switch(e.length){case 4:var t=(7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3),n=t-65536;return p(55296+(n>>>10))+p(56320+(1023&n));case 3:return p((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return p((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},O=function(e){return e.replace(j,C)},A=function(e){if(e=e.replace(/\s+/g,""),!u.test(e))throw new TypeError("malformed base64.");e+="==".slice(2-(3&e.length));for(var t,n,r,o="",i=0;i>16&255):64===r?p(t>>16&255,t>>8&255):p(t>>16&255,t>>8&255,255&t);return o},P=n?function(e){return atob(h(e))}:o?function(e){return Buffer.from(e,"base64").toString("binary")}:A,E=o?function(e){return f(Buffer.from(e,"base64"))}:function(e){return f(P(e),(function(e){return e.charCodeAt(0)}))},T=function(e){return E($(e))},R=o?function(e){return Buffer.from(e,"base64").toString("utf8")}:i?function(e){return i.decode(E(e))}:function(e){return O(P(e))},$=function(e){return h(e.replace(/[-_]/g,(function(e){return"-"==e?"+":"/"})))},z=function(e){return R($(e))},N=function(e){if("string"!==typeof e)return!1;var t=e.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(t)||!/[^\s0-9a-zA-Z\-_]/.test(t)},I=function(e){return{value:e,enumerable:!1,writable:!0,configurable:!0}},M=function(){var e=function(e,t){return Object.defineProperty(String.prototype,e,I(t))};e("fromBase64",(function(){return z(this)})),e("toBase64",(function(e){return _(this,e)})),e("toBase64URI",(function(){return _(this,!0)})),e("toBase64URL",(function(){return _(this,!0)})),e("toUint8Array",(function(){return T(this)}))},D=function(){var e=function(e,t){return Object.defineProperty(Uint8Array.prototype,e,I(t))};e("toBase64",(function(e){return y(this,e)})),e("toBase64URI",(function(){return y(this,!0)})),e("toBase64URL",(function(){return y(this,!0)}))},U=function(){M(),D()},q={version:e,VERSION:t,atob:P,atobPolyfill:A,btoa:g,btoaPolyfill:m,fromBase64:z,toBase64:_,encode:_,encodeURI:S,encodeURL:S,utob:x,btou:O,decode:z,isValid:N,fromUint8Array:y,toUint8Array:T,extendString:M,extendUint8Array:D,extendBuiltins:U,Base64:{}};return Object.keys(q).forEach((function(e){return q.Base64[e]=q[e]})),q}))},2568:function(e,t,n){(function(){var t=n(1012),r=n(487).utf8,o=n(8738),i=n(487).bin,a=function(e,n){e.constructor==String?e=n&&"binary"===n.encoding?i.stringToBytes(e):r.stringToBytes(e):o(e)?e=Array.prototype.slice.call(e,0):Array.isArray(e)||e.constructor===Uint8Array||(e=e.toString());for(var s=t.bytesToWords(e),l=8*e.length,c=1732584193,u=-271733879,p=-1732584194,f=271733878,d=0;d>>24)|4278255360&(s[d]<<24|s[d]>>>8);s[l>>>5]|=128<>>9<<4)]=l;var h=a._ff,m=a._gg,g=a._hh,b=a._ii;for(d=0;d>>0,u=u+w>>>0,p=p+v>>>0,f=f+x>>>0}return t.endian([c,u,p,f])};a._ff=function(e,t,n,r,o,i,a){var s=e+(t&n|~t&r)+(o>>>0)+a;return(s<>>32-i)+t},a._gg=function(e,t,n,r,o,i,a){var s=e+(t&r|n&~r)+(o>>>0)+a;return(s<>>32-i)+t},a._hh=function(e,t,n,r,o,i,a){var s=e+(t^n^r)+(o>>>0)+a;return(s<>>32-i)+t},a._ii=function(e,t,n,r,o,i,a){var s=e+(n^(t|~r))+(o>>>0)+a;return(s<>>32-i)+t},a._blocksize=16,a._digestsize=16,e.exports=function(e,n){if(void 0===e||null===e)throw new Error("Illegal argument "+e);var r=t.wordsToBytes(a(e,n));return n&&n.asBytes?r:n&&n.asString?i.bytesToString(r):t.bytesToHex(r)}})()},631:function(e,t,n){var r="function"===typeof Map&&Map.prototype,o=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,i=r&&o&&"function"===typeof o.get?o.get:null,a=r&&Map.prototype.forEach,s="function"===typeof Set&&Set.prototype,l=Object.getOwnPropertyDescriptor&&s?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=s&&l&&"function"===typeof l.get?l.get:null,u=s&&Set.prototype.forEach,p="function"===typeof WeakMap&&WeakMap.prototype,f=p?WeakMap.prototype.has:null,d="function"===typeof WeakSet&&WeakSet.prototype,h=d?WeakSet.prototype.has:null,m="function"===typeof WeakRef&&WeakRef.prototype,g=m?WeakRef.prototype.deref:null,b=Boolean.prototype.valueOf,y=Object.prototype.toString,w=Function.prototype.toString,v=String.prototype.match,x=String.prototype.slice,k=String.prototype.replace,_=String.prototype.toUpperCase,S=String.prototype.toLowerCase,j=RegExp.prototype.test,C=Array.prototype.concat,O=Array.prototype.join,A=Array.prototype.slice,P=Math.floor,E="function"===typeof BigInt?BigInt.prototype.valueOf:null,T=Object.getOwnPropertySymbols,R="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?Symbol.prototype.toString:null,$="function"===typeof Symbol&&"object"===typeof Symbol.iterator,z="function"===typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===$||"symbol")?Symbol.toStringTag:null,N=Object.prototype.propertyIsEnumerable,I=("function"===typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function M(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||j.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"===typeof e){var r=e<0?-P(-e):P(e);if(r!==e){var o=String(r),i=x.call(t,o.length+1);return k.call(o,n,"$&_")+"."+k.call(k.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return k.call(t,n,"$&_")}var D=n(4654).custom,U=D&&Y(D)?D:null;function q(e,t,n){var r="double"===(n.quoteStyle||t)?'"':"'";return r+e+r}function B(e){return k.call(String(e),/"/g,""")}function F(e){return"[object Array]"===K(e)&&(!z||!("object"===typeof e&&z in e))}function L(e){return"[object Date]"===K(e)&&(!z||!("object"===typeof e&&z in e))}function H(e){return"[object RegExp]"===K(e)&&(!z||!("object"===typeof e&&z in e))}function V(e){return"[object Error]"===K(e)&&(!z||!("object"===typeof e&&z in e))}function W(e){return"[object String]"===K(e)&&(!z||!("object"===typeof e&&z in e))}function Z(e){return"[object Number]"===K(e)&&(!z||!("object"===typeof e&&z in e))}function Q(e){return"[object Boolean]"===K(e)&&(!z||!("object"===typeof e&&z in e))}function Y(e){if($)return e&&"object"===typeof e&&e instanceof Symbol;if("symbol"===typeof e)return!0;if(!e||"object"!==typeof e||!R)return!1;try{return R.call(e),!0}catch(t){}return!1}function G(e){if(!e||"object"!==typeof e||!E)return!1;try{return E.call(e),!0}catch(t){}return!1}e.exports=function e(t,n,r,o){var s=n||{};if(X(s,"quoteStyle")&&"single"!==s.quoteStyle&&"double"!==s.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(X(s,"maxStringLength")&&("number"===typeof s.maxStringLength?s.maxStringLength<0&&s.maxStringLength!==1/0:null!==s.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var l=!X(s,"customInspect")||s.customInspect;if("boolean"!==typeof l&&"symbol"!==l)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(X(s,"indent")&&null!==s.indent&&"\t"!==s.indent&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(X(s,"numericSeparator")&&"boolean"!==typeof s.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var p=s.numericSeparator;if("undefined"===typeof t)return"undefined";if(null===t)return"null";if("boolean"===typeof t)return t?"true":"false";if("string"===typeof t)return le(t,s);if("number"===typeof t){if(0===t)return 1/0/t>0?"0":"-0";var f=String(t);return p?M(t,f):f}if("bigint"===typeof t){var d=String(t)+"n";return p?M(t,d):d}var h="undefined"===typeof s.depth?5:s.depth;if("undefined"===typeof r&&(r=0),r>=h&&h>0&&"object"===typeof t)return F(t)?"[Array]":"[Object]";var m=he(s,r);if("undefined"===typeof o)o=[];else if(te(o,t)>=0)return"[Circular]";function g(t,n,i){if(n&&(o=A.call(o),o.push(n)),i){var a={depth:s.depth};return X(s,"quoteStyle")&&(a.quoteStyle=s.quoteStyle),e(t,a,r+1,o)}return e(t,s,r+1,o)}if("function"===typeof t){var y=ee(t),w=ge(t,g);return"[Function"+(y?": "+y:" (anonymous)")+"]"+(w.length>0?" { "+O.call(w,", ")+" }":"")}if(Y(t)){var v=$?k.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):R.call(t);return"object"!==typeof t||$?v:ue(v)}if(se(t)){for(var _="<"+S.call(String(t.nodeName)),j=t.attributes||[],P=0;P",t.childNodes&&t.childNodes.length&&(_+="..."),_+=""+S.call(String(t.nodeName))+">",_}if(F(t)){if(0===t.length)return"[]";var T=ge(t,g);return m&&!de(T)?"["+me(T,m)+"]":"[ "+O.call(T,", ")+" ]"}if(V(t)){var D=ge(t,g);return"cause"in t&&!N.call(t,"cause")?"{ ["+String(t)+"] "+O.call(C.call("[cause]: "+g(t.cause),D),", ")+" }":0===D.length?"["+String(t)+"]":"{ ["+String(t)+"] "+O.call(D,", ")+" }"}if("object"===typeof t&&l){if(U&&"function"===typeof t[U])return t[U]();if("symbol"!==l&&"function"===typeof t.inspect)return t.inspect()}if(ne(t)){var J=[];return a.call(t,(function(e,n){J.push(g(n,t,!0)+" => "+g(e,t))})),fe("Map",i.call(t),J,m)}if(ie(t)){var ce=[];return u.call(t,(function(e){ce.push(g(e,t))})),fe("Set",c.call(t),ce,m)}if(re(t))return pe("WeakMap");if(ae(t))return pe("WeakSet");if(oe(t))return pe("WeakRef");if(Z(t))return ue(g(Number(t)));if(G(t))return ue(g(E.call(t)));if(Q(t))return ue(b.call(t));if(W(t))return ue(g(String(t)));if(!L(t)&&!H(t)){var be=ge(t,g),ye=I?I(t)===Object.prototype:t instanceof Object||t.constructor===Object,we=t instanceof Object?"":"null prototype",ve=!ye&&z&&Object(t)===t&&z in t?x.call(K(t),8,-1):we?"Object":"",xe=ye||"function"!==typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"",ke=xe+(ve||we?"["+O.call(C.call([],ve||[],we||[]),": ")+"] ":"");return 0===be.length?ke+"{}":m?ke+"{"+me(be,m)+"}":ke+"{ "+O.call(be,", ")+" }"}return String(t)};var J=Object.prototype.hasOwnProperty||function(e){return e in this};function X(e,t){return J.call(e,t)}function K(e){return y.call(e)}function ee(e){if(e.name)return e.name;var t=v.call(w.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function te(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;nt.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return le(x.call(e,0,t.maxStringLength),t)+r}var o=k.call(k.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,ce);return q(o,"single",t)}function ce(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+_.call(t.toString(16))}function ue(e){return"Object("+e+")"}function pe(e){return e+" { ? }"}function fe(e,t,n,r){var o=r?me(n,r):O.call(n,", ");return e+" ("+t+") {"+o+"}"}function de(e){for(var t=0;t=0)return!1;return!0}function he(e,t){var n;if("\t"===e.indent)n="\t";else{if(!("number"===typeof e.indent&&e.indent>0))return null;n=O.call(Array(e.indent+1)," ")}return{base:n,prev:O.call(Array(t+1),n)}}function me(e,t){if(0===e.length)return"";var n="\n"+t.prev+t.base;return n+O.call(e,","+n)+"\n"+t.prev}function ge(e,t){var n=F(e),r=[];if(n){r.length=e.length;for(var o=0;o-1?e.split(","):e},c="utf8=%26%2310003%3B",u="utf8=%E2%9C%93",p=function(e,t){var n,p={},f=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,d=t.parameterLimit===1/0?void 0:t.parameterLimit,h=f.split(t.delimiter,d),m=-1,g=t.charset;if(t.charsetSentinel)for(n=0;n-1&&(y=i(y)?[y]:y),o.call(p,b)?p[b]=r.combine(p[b],y):p[b]=y}return p},f=function(e,t,n,r){for(var o=r?t:l(t,n),i=e.length-1;i>=0;--i){var a,s=e[i];if("[]"===s&&n.parseArrays)a=[].concat(o);else{a=n.plainObjects?Object.create(null):{};var c="["===s.charAt(0)&&"]"===s.charAt(s.length-1)?s.slice(1,-1):s,u=parseInt(c,10);n.parseArrays||""!==c?!isNaN(u)&&s!==c&&String(u)===c&&u>=0&&n.parseArrays&&u<=n.arrayLimit?(a=[],a[u]=o):"__proto__"!==c&&(a[c]=o):a={0:o}}o=a}return o},d=function(e,t,n,r){if(e){var i=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/,s=/(\[[^[\]]*])/g,l=n.depth>0&&a.exec(i),c=l?i.slice(0,l.index):i,u=[];if(c){if(!n.plainObjects&&o.call(Object.prototype,c)&&!n.allowPrototypes)return;u.push(c)}var p=0;while(n.depth>0&&null!==(l=s.exec(i))&&p0?S.join(",")||null:void 0}];else if(l(f))$=f;else{var N=Object.keys(S);$=d?N.sort(d):N}for(var I=0;I<$.length;++I){var M=$[I],D="object"===typeof M&&"undefined"!==typeof M.value?M.value:S[M];if(!s||null!==D){var U=l(S)?"function"===typeof i?i(n,M):n:n+(b?"."+M:"["+M+"]");_.set(t,C);var q=r();q.set(g,_),p(z,e(D,U,i,a,s,u,f,d,b,y,w,v,x,k,q))}}return z},y=function(e){if(!e)return h;if(null!==e.encoder&&"undefined"!==typeof e.encoder&&"function"!==typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||h.charset;if("undefined"!==typeof e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=i["default"];if("undefined"!==typeof e.format){if(!a.call(i.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var r=i.formatters[n],o=h.filter;return("function"===typeof e.filter||l(e.filter))&&(o=e.filter),{addQueryPrefix:"boolean"===typeof e.addQueryPrefix?e.addQueryPrefix:h.addQueryPrefix,allowDots:"undefined"===typeof e.allowDots?h.allowDots:!!e.allowDots,charset:t,charsetSentinel:"boolean"===typeof e.charsetSentinel?e.charsetSentinel:h.charsetSentinel,delimiter:"undefined"===typeof e.delimiter?h.delimiter:e.delimiter,encode:"boolean"===typeof e.encode?e.encode:h.encode,encoder:"function"===typeof e.encoder?e.encoder:h.encoder,encodeValuesOnly:"boolean"===typeof e.encodeValuesOnly?e.encodeValuesOnly:h.encodeValuesOnly,filter:o,format:n,formatter:r,serializeDate:"function"===typeof e.serializeDate?e.serializeDate:h.serializeDate,skipNulls:"boolean"===typeof e.skipNulls?e.skipNulls:h.skipNulls,sort:"function"===typeof e.sort?e.sort:null,strictNullHandling:"boolean"===typeof e.strictNullHandling?e.strictNullHandling:h.strictNullHandling}};e.exports=function(e,t){var n,o,i=e,a=y(t);"function"===typeof a.filter?(o=a.filter,i=o("",i)):l(a.filter)&&(o=a.filter,n=o);var c,u=[];if("object"!==typeof i||null===i)return"";c=t&&t.arrayFormat in s?t.arrayFormat:t&&"indices"in t?t.indices?"indices":"repeat":"indices";var f=s[c];n||(n=Object.keys(i)),a.sort&&n.sort(a.sort);for(var d=r(),h=0;h0?w+g:""}},2769:function(e,t,n){"use strict";var r=n(5798),o=Object.prototype.hasOwnProperty,i=Array.isArray,a=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),s=function(e){while(e.length>1){var t=e.pop(),n=t.obj[t.prop];if(i(n)){for(var r=[],o=0;o=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122||i===r.RFC1738&&(40===u||41===u)?l+=s.charAt(c):u<128?l+=a[u]:u<2048?l+=a[192|u>>6]+a[128|63&u]:u<55296||u>=57344?l+=a[224|u>>12]+a[128|u>>6&63]+a[128|63&u]:(c+=1,u=65536+((1023&u)<<10|1023&s.charCodeAt(c)),l+=a[240|u>>18]+a[128|u>>12&63]+a[128|u>>6&63]+a[128|63&u])}return l},d=function(e){for(var t=[{obj:{o:e},prop:"o"}],n=[],r=0;r=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function l(e,t){return function(n,r){t(n,r,e)}}function c(e,t){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(e,t)}function u(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{l(r.next(e))}catch(t){i(t)}}function s(e){try{l(r["throw"](e))}catch(t){i(t)}}function l(e){e.done?n(e.value):o(e.value).then(a,s)}l((r=r.apply(e,t||[])).next())}))}function p(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(e){return function(t){return l([e,t])}}function l(i){if(n)throw new TypeError("Generator is already executing.");while(a)try{if(n=1,r&&(o=2&i[0]?r["return"]:i[0]?r["throw"]||((o=r["return"])&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(o=a.trys,!(o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function m(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{while((void 0===t||t-- >0)&&!(r=i.next()).done)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i["return"])&&n.call(i)}finally{if(o)throw o.error}}return a}function g(){for(var e=[],t=0;t1||s(e,t)}))})}function s(e,t){try{l(o[e](t))}catch(n){p(i[0][3],n)}}function l(e){e.value instanceof w?Promise.resolve(e.value.v).then(c,u):p(i[0][2],e)}function c(e){s("next",e)}function u(e){s("throw",e)}function p(e,t){e(t),i.shift(),i.length&&s(i[0][0],i[0][1])}}function x(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:w(e[r](t)),done:"return"===r}:o?o(t):t}:o}}function k(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e="function"===typeof h?h(e):e[Symbol.iterator](),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,i){t=e[n](t),o(r,i,t.done,t.value)}))}}function o(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)}}function _(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var S=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e["default"]=t};function j(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&f(t,e,n);return S(t,e),t}function C(e){return e&&e.__esModule?e:{default:e}}function O(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"===typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)}function A(e,t,n,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"===typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(e,n):o?o.value=n:t.set(e,n),n}function P(e,t){if(null===t||"object"!==typeof t&&"function"!==typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"===typeof e?t===e:e.has(t)}},2238:function(e,t,n){var r;(function(o,i){"use strict";var a="0.7.31",s="",l="?",c="function",u="undefined",p="object",f="string",d="major",h="model",m="name",g="type",b="vendor",y="version",w="architecture",v="console",x="mobile",k="tablet",_="smarttv",S="wearable",j="embedded",C=255,O="Amazon",A="Apple",P="ASUS",E="BlackBerry",T="Browser",R="Chrome",$="Edge",z="Firefox",N="Google",I="Huawei",M="LG",D="Microsoft",U="Motorola",q="Opera",B="Samsung",F="Sony",L="Xiaomi",H="Zebra",V="Facebook",W=function(e,t){var n={};for(var r in e)t[r]&&t[r].length%2===0?n[r]=t[r].concat(e[r]):n[r]=e[r];return n},Z=function(e){for(var t={},n=0;n0?2===a.length?typeof a[1]==c?this[a[0]]=a[1].call(this,l):this[a[0]]=a[1]:3===a.length?typeof a[1]!==c||a[1].exec&&a[1].test?this[a[0]]=l?l.replace(a[1],a[2]):i:this[a[0]]=l?a[1].call(this,l,a[2]):i:4===a.length&&(this[a[0]]=l?a[3].call(this,l.replace(a[1],a[2])):i):this[a]=l||i;u+=2}},K=function(e,t){for(var n in t)if(typeof t[n]===p&&t[n].length>0){for(var r=0;rC?J(e,C):e,this},this.setUA(n),this};re.VERSION=a,re.BROWSER=Z([m,y,d]),re.CPU=Z([w]),re.DEVICE=Z([h,b,g,v,x,_,k,S,j]),re.ENGINE=re.OS=Z([m,y]),typeof t!==u?("object"!==u&&e.exports&&(t=e.exports=re),t.UAParser=re):"function"===c&&n.amdO?(r=function(){return re}.call(t,n,t,e),r===i||(e.exports=r)):typeof o!==u&&(o.UAParser=re);var oe=typeof o!==u&&(o.jQuery||o.Zepto);if(oe&&!oe.ua){var ie=new re;oe.ua=ie.getResult(),oe.ua.get=function(){return ie.getUA()},oe.ua.set=function(e){ie.setUA(e);var t=ie.getResult();for(var n in t)oe.ua[n]=t[n]}}})("object"===typeof window?window:this)},5708:function(e,t,n){var r=n(6332);r.__esModule&&(r=r.default),"string"===typeof r&&(r=[[e.id,r,""]]),r.locals&&(e.exports=r.locals);var o=n(2339).Z;e.exports.__inject__=function(e){o("08e032f2",r,e)}},1817:function(e,t,n){var r=n(4995);r.__esModule&&(r=r.default),"string"===typeof r&&(r=[[e.id,r,""]]),r.locals&&(e.exports=r.locals);var o=n(2339).Z;e.exports.__inject__=function(e){o("7494d101",r,e)}},8935:function(e,t,n){var r=n(7272);r.__esModule&&(r=r.default),"string"===typeof r&&(r=[[e.id,r,""]]),r.locals&&(e.exports=r.locals);var o=n(2339).Z;e.exports.__inject__=function(e){o("148f94a5",r,e)}},8715:function(e,t,n){var r=n(1090);r.__esModule&&(r=r.default),"string"===typeof r&&(r=[[e.id,r,""]]),r.locals&&(e.exports=r.locals);var o=n(2339).Z;e.exports.__inject__=function(e){o("a4f66f42",r,e)}},2708:function(e,t,n){var r=n(6431);r.__esModule&&(r=r.default),"string"===typeof r&&(r=[[e.id,r,""]]),r.locals&&(e.exports=r.locals);var o=n(2339).Z;e.exports.__inject__=function(e){o("266f19bb",r,e)}},2339:function(e,t,n){"use strict";function r(e,t){for(var n=[],r={},o=0;oe.replace(a,((e,t)=>t?t.toUpperCase():"")),l=/\B([A-Z])/g,c=e=>e.replace(l,"-$1").toLowerCase();function u(e){const t={};return e.forEach((e=>{t[e]=void 0})),t}function p(e,t,n){e[t]=[].concat(e[t]||[]),e[t].unshift(n)}function f(e,t){if(e){const n=e.$options[t]||[];n.forEach((t=>{t.call(e)}))}}function d(e,t){return new CustomEvent(e,{bubbles:!1,cancelable:!1,detail:t})}const h=e=>/function Boolean/.test(String(e)),m=e=>/function Number/.test(String(e));function g(e,t,{type:n}={}){if(h(n))return"true"===e||"false"===e?"true"===e:""===e||e===t||null!=e||e;if(m(n)){const t=parseFloat(e,10);return isNaN(t)?e:t}return e}function b(e,t){const n=[];for(let r=0,o=t.length;r(e[t]=l[n[r]],e)),{}),p(t,"beforeCreate",(function(){const e=this.$emit;this.$emit=(t,...n)=>(this.$root.$options.customElement.dispatchEvent(d(t,n)),e.call(this,t,...n))})),p(t,"created",(function(){o.forEach((e=>{this.$root.props[e]=this[e]}))})),o.forEach((e=>{Object.defineProperty(m.prototype,e,{get(){return this._wrapper.props[e]},set(t){this._wrapper.props[e]=t},enumerable:!1,configurable:!0})})),a=!0}function h(e,t){const n=s(t),r=e.hasAttribute(t)?e.getAttribute(t):void 0;e._wrapper.props[n]=g(r,t,i[n])}class m extends HTMLElement{constructor(){const n=super();n.attachShadow({mode:"open"});const r=n._wrapper=new e({name:"shadow-root",customElement:n,shadowRoot:n.shadowRoot,data(){return{props:{},slotChildren:[]}},render(e){return e(t,{ref:"inner",props:this.props},this.slotChildren)}}),o=new MutationObserver((e=>{let t=!1;for(let r=0;r{e.props=u(o),r.forEach((e=>{h(this,e)}))};a?n():t().then((e=>{(e.__esModule||"Module"===e[Symbol.toStringTag])&&(e=e.default),l(e),n()})),e.slotChildren=Object.freeze(b(e.$createElement,this.childNodes)),e.$mount(),this.shadowRoot.appendChild(e.$el)}}disconnectedCallback(){f(this.vueComponent,"deactivated")}}return n||l(t),m}var x=v,k=(n(3645),function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"halo-comment",class:e.mergedConfigs.night?"night":"",attrs:{id:"halo-comment"}},[n("keep-alive",[n("comment-editor",{attrs:{configs:e.mergedConfigs,options:e.options,target:e.target,targetId:e.id}})],1),e.mergedConfigs.autoLoad||e.list.loaded?e._e():n("div",{staticClass:"load-comment"},[n("button",{staticClass:"btn btn-primary",attrs:{type:"button"},on:{click:e.handleGetComments}},[e._v("加载评论")])]),e.list.loaded?n("div",{staticClass:"comment-action"},[n("h3",{staticClass:"comment-title"},[e._v(e._s(e.list.total)+" 条评论")]),n("svg",{staticClass:"comment-refresh",attrs:{viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},on:{click:function(t){return e.handlePaginationChange(0)}}},[n("path",{attrs:{d:"M55.935033 264.48948c0 0 85.897017-132.548409 221.81443-203.673173 135.916406-71.121743 303.368504-50.646859 413.187968 18.319527 109.819465 68.970415 146.791894 127.160016 146.791894 127.160016l94.59499-53.879895c0 0 19.576483-9.697092 19.576483 12.932142l0 338.379961c0 0 0 30.17399-22.837719 19.395191-19.210878-9.062571-226.959086-127.198289-292.424528-164.466828-35.950145-16.035251-4.365101-29.062068-4.365101-29.062068l91.284402-52.173738c0 0-52.068992-65.209619-128.278989-99.744682-81.576231-42.501826-157.948384-47.541735-251.497925-12.224097-61.002644 23.025054-132.823368 81.988166-184.553949 169.082716L55.935033 264.48948 55.935033 264.48948 55.935033 264.48948zM904.056909 711.697844c0 0-85.897017 132.550423-221.816444 203.671159-135.917413 71.12275-303.366489 50.651895-413.186961-18.315498-109.825508-68.972429-146.790886-127.165052-146.790886-127.165052L27.662591 823.768348c0 0-19.572454 9.703135-19.572454-12.932142L8.090137 472.459267c0 0 0-30.170968 22.831676-19.397205 19.211885 9.067607 226.965129 127.198289 292.430571 164.470856 35.950145 16.035251 4.366109 29.058039 4.366109 29.058039l-91.285409 52.175753c0 0 52.071006 65.206598 128.279996 99.744682 81.57321 42.498804 157.942341 47.540728 251.496918 12.222082 60.998616-23.026061 132.820346-81.983131 184.546898-169.082716L904.056909 711.697844 904.056909 711.697844 904.056909 711.697844zM904.056909 711.697844"}})])]):e._e(),n("comment-loading",{directives:[{name:"show",rawName:"v-show",value:e.list.loading,expression:"list.loading"}],attrs:{configs:e.mergedConfigs}}),e.list.data.length>=1?n("ul",{staticClass:"comment-nodes"},[e._l(e.list.data,(function(t,r){return[n("CommentNode",{key:r,attrs:{comment:t,replyNum:e.mergedConfigs.unfoldReplyNum,configs:e.mergedConfigs,options:e.options,target:e.target,targetId:e.id}})]}))],2):e.list.loaded&&!e.list.loading?n("div",{staticClass:"comment-empty"},[e._v("暂无评论")]):e._e(),e.list.pages>1?n("pagination",{attrs:{page:e.list.params.page,size:e.list.size,total:e.list.total},on:{change:e.handlePaginationChange}}):e._e(),e.mergedConfigs.enableBulletScreen?n("bullet-screen",{attrs:{target:e.target,id:e.id,configs:e.mergedConfigs,options:e.options}}):e._e()],1)}),_=[];function S(){return{baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}let j=S();function C(e){j=e}const O=/[&<>"']/,A=/[&<>"']/g,P=/[<>"']|&(?!#?\w+;)/,E=/[<>"']|&(?!#?\w+;)/g,T={"&":"&","<":"<",">":">",'"':""","'":"'"},R=e=>T[e];function $(e,t){if(t){if(O.test(e))return e.replace(A,R)}else if(P.test(e))return e.replace(E,R);return e}const z=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function N(e){return e.replace(z,((e,t)=>(t=t.toLowerCase(),"colon"===t?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):"")))}const I=/(^|[^\[])\^/g;function M(e,t){e="string"===typeof e?e:e.source,t=t||"";const n={replace:(t,r)=>(r=r.source||r,r=r.replace(I,"$1"),e=e.replace(t,r),n),getRegex:()=>new RegExp(e,t)};return n}const D=/[^\w:]/g,U=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function q(e,t,n){if(e){let e;try{e=decodeURIComponent(N(n)).replace(D,"").toLowerCase()}catch(r){return null}if(0===e.indexOf("javascript:")||0===e.indexOf("vbscript:")||0===e.indexOf("data:"))return null}t&&!U.test(n)&&(n=V(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch(r){return null}return n}const B={},F=/^[^:]+:\/*[^/]*$/,L=/^([^:]+:)[\s\S]*$/,H=/^([^:]+:\/*[^/]*)[\s\S]*$/;function V(e,t){B[" "+e]||(F.test(e)?B[" "+e]=e+"/":B[" "+e]=Y(e,"/",!0)),e=B[" "+e];const n=-1===e.indexOf(":");return"//"===t.substring(0,2)?n?t:e.replace(L,"$1")+t:"/"===t.charAt(0)?n?t:e.replace(H,"$1")+t:e+t}const W={exec:function(){}};function Z(e){let t,n,r=1;for(;r{let r=!1,o=t;while(--o>=0&&"\\"===n[o])r=!r;return r?"|":" |"})),r=n.split(/ \|/);let o=0;if(r[0].trim()||r.shift(),r.length>0&&!r[r.length-1].trim()&&r.pop(),r.length>t)r.splice(t);else while(r.length1)1&t&&(n+=e),t>>=1,e+=e;return n+e}function K(e,t,n,r){const o=t.href,i=t.title?$(t.title):null,a=e[1].replace(/\\([\[\]])/g,"$1");if("!"!==e[0].charAt(0)){r.state.inLink=!0;const e={type:"link",raw:n,href:o,title:i,text:a,tokens:r.inlineTokens(a,[])};return r.state.inLink=!1,e}return{type:"image",raw:n,href:o,title:i,text:$(a)}}function ee(e,t){const n=e.match(/^(\s+)(?:```)/);if(null===n)return t;const r=n[1];return t.split("\n").map((e=>{const t=e.match(/^\s+/);if(null===t)return e;const[n]=t;return n.length>=r.length?e.slice(r.length):e})).join("\n")}class te{constructor(e){this.options=e||j}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const e=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:Y(e,"\n")}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const e=t[0],n=ee(e,t[3]||"");return{type:"code",raw:e,lang:t[2]?t[2].trim():t[2],text:n}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(/#$/.test(e)){const t=Y(e,"#");this.options.pedantic?e=t.trim():t&&!/ $/.test(t)||(e=t.trim())}const n={type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:[]};return this.lexer.inline(n.text,n.tokens),n}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:t[0]}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){const e=t[0].replace(/^ *>[ \t]?/gm,"");return{type:"blockquote",raw:t[0],tokens:this.lexer.blockTokens(e,[]),text:e}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n,r,o,i,a,s,l,c,u,p,f,d,h=t[1].trim();const m=h.length>1,g={type:"list",raw:"",ordered:m,start:m?+h.slice(0,-1):"",loose:!1,items:[]};h=m?`\\d{1,9}\\${h.slice(-1)}`:`\\${h}`,this.options.pedantic&&(h=m?h:"[*+-]");const b=new RegExp(`^( {0,3}${h})((?:[\t ][^\\n]*)?(?:\\n|$))`);while(e){if(d=!1,!(t=b.exec(e)))break;if(this.rules.block.hr.test(e))break;if(n=t[0],e=e.substring(n.length),c=t[2].split("\n",1)[0],u=e.split("\n",1)[0],this.options.pedantic?(i=2,f=c.trimLeft()):(i=t[2].search(/[^ ]/),i=i>4?1:i,f=c.slice(i),i+=t[1].length),s=!1,!c&&/^ *$/.test(u)&&(n+=u+"\n",e=e.substring(u.length+1),d=!0),!d){const t=new RegExp(`^ {0,${Math.min(3,i-1)}}(?:[*+-]|\\d{1,9}[.)])((?: [^\\n]*)?(?:\\n|$))`),r=new RegExp(`^ {0,${Math.min(3,i-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`);while(e){if(p=e.split("\n",1)[0],c=p,this.options.pedantic&&(c=c.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),t.test(c))break;if(r.test(e))break;if(c.search(/[^ ]/)>=i||!c.trim())f+="\n"+c.slice(i);else{if(s)break;f+="\n"+c}s||c.trim()||(s=!0),n+=p+"\n",e=e.substring(p.length+1)}}g.loose||(l?g.loose=!0:/\n *\n *$/.test(n)&&(l=!0)),this.options.gfm&&(r=/^\[[ xX]\] /.exec(f),r&&(o="[ ] "!==r[0],f=f.replace(/^\[[ xX]\] +/,""))),g.items.push({type:"list_item",raw:n,task:!!r,checked:o,loose:!1,text:f}),g.raw+=n}g.items[g.items.length-1].raw=n.trimRight(),g.items[g.items.length-1].text=f.trimRight(),g.raw=g.raw.trimRight();const y=g.items.length;for(a=0;a"space"===e.type)),t=e.every((e=>{const t=e.raw.split("");let n=0;for(const r of t)if("\n"===r&&(n+=1),n>1)return!0;return!1}));!g.loose&&e.length&&t&&(g.loose=!0,g.items[a].loose=!0)}return g}}html(e){const t=this.rules.block.html.exec(e);if(t){const e={type:"html",raw:t[0],pre:!this.options.sanitizer&&("pre"===t[1]||"script"===t[1]||"style"===t[1]),text:t[0]};return this.options.sanitize&&(e.type="paragraph",e.text=this.options.sanitizer?this.options.sanitizer(t[0]):$(t[0]),e.tokens=[],this.lexer.inline(e.text,e.tokens)),e}}def(e){const t=this.rules.block.def.exec(e);if(t){t[3]&&(t[3]=t[3].substring(1,t[3].length-1));const e=t[1].toLowerCase().replace(/\s+/g," ");return{type:"def",tag:e,raw:t[0],href:t[2],title:t[3]}}}table(e){const t=this.rules.block.table.exec(e);if(t){const e={type:"table",header:Q(t[1]).map((e=>({text:e}))),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split("\n"):[]};if(e.header.length===e.align.length){e.raw=t[0];let n,r,o,i,a=e.align.length;for(n=0;n({text:e})));for(a=e.header.length,r=0;r /i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(t[0]):$(t[0]):t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const e=t[2].trim();if(!this.options.pedantic&&/^$/.test(e))return;const t=Y(e.slice(0,-1),"\\");if((e.length-t.length)%2===0)return}else{const e=G(t[2],"()");if(e>-1){const n=0===t[0].indexOf("!")?5:4,r=n+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,r).trim(),t[3]=""}}let n=t[2],r="";if(this.options.pedantic){const e=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(n);e&&(n=e[1],r=e[3])}else r=t[3]?t[3].slice(1,-1):"";return n=n.trim(),/^$/.test(e)?n.slice(1):n.slice(1,-1)),K(t,{href:n?n.replace(this.rules.inline._escapes,"$1"):n,title:r?r.replace(this.rules.inline._escapes,"$1"):r},t[0],this.lexer)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let e=(n[2]||n[1]).replace(/\s+/g," ");if(e=t[e.toLowerCase()],!e||!e.href){const e=n[0].charAt(0);return{type:"text",raw:e,text:e}}return K(n,e,n[0],this.lexer)}}emStrong(e,t,n=""){let r=this.rules.inline.emStrong.lDelim.exec(e);if(!r)return;if(r[3]&&n.match(/[\p{L}\p{N}]/u))return;const o=r[1]||r[2]||"";if(!o||o&&(""===n||this.rules.inline.punctuation.exec(n))){const n=r[0].length-1;let o,i,a=n,s=0;const l="*"===r[0][0]?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;l.lastIndex=0,t=t.slice(-1*e.length+n);while(null!=(r=l.exec(t))){if(o=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!o)continue;if(i=o.length,r[3]||r[4]){a+=i;continue}if((r[5]||r[6])&&n%3&&!((n+i)%3)){s+=i;continue}if(a-=i,a>0)continue;if(i=Math.min(i,i+a+s),Math.min(n,i)%2){const t=e.slice(1,n+r.index+i);return{type:"em",raw:e.slice(0,n+r.index+i+1),text:t,tokens:this.lexer.inlineTokens(t,[])}}const t=e.slice(2,n+r.index+i-1);return{type:"strong",raw:e.slice(0,n+r.index+i+1),text:t,tokens:this.lexer.inlineTokens(t,[])}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(/\n/g," ");const n=/[^ ]/.test(e),r=/^ /.test(e)&&/ $/.test(e);return n&&r&&(e=e.substring(1,e.length-1)),e=$(e,!0),{type:"codespan",raw:t[0],text:e}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2],[])}}autolink(e,t){const n=this.rules.inline.autolink.exec(e);if(n){let e,r;return"@"===n[2]?(e=$(this.options.mangle?t(n[1]):n[1]),r="mailto:"+e):(e=$(n[1]),r=e),{type:"link",raw:n[0],text:e,href:r,tokens:[{type:"text",raw:e,text:e}]}}}url(e,t){let n;if(n=this.rules.inline.url.exec(e)){let e,r;if("@"===n[2])e=$(this.options.mangle?t(n[0]):n[0]),r="mailto:"+e;else{let t;do{t=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0]}while(t!==n[0]);e=$(n[0]),r="www."===n[1]?"http://"+e:e}return{type:"link",raw:n[0],text:e,href:r,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e,t){const n=this.rules.inline.text.exec(e);if(n){let e;return e=this.lexer.state.inRawBlock?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(n[0]):$(n[0]):n[0]:$(this.options.smartypants?t(n[0]):n[0]),{type:"text",raw:n[0],text:e}}}}const ne={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?([^\s>]+)>?(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:W,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\.|[^\[\]\\])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};ne.def=M(ne.def).replace("label",ne._label).replace("title",ne._title).getRegex(),ne.bullet=/(?:[*+-]|\d{1,9}[.)])/,ne.listItemStart=M(/^( *)(bull) */).replace("bull",ne.bullet).getRegex(),ne.list=M(ne.list).replace(/bull/g,ne.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+ne.def.source+")").getRegex(),ne._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",ne._comment=/|$)/,ne.html=M(ne.html,"i").replace("comment",ne._comment).replace("tag",ne._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ne.paragraph=M(ne._paragraph).replace("hr",ne.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ne._tag).getRegex(),ne.blockquote=M(ne.blockquote).replace("paragraph",ne.paragraph).getRegex(),ne.normal=Z({},ne),ne.gfm=Z({},ne.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),ne.gfm.table=M(ne.gfm.table).replace("hr",ne.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ne._tag).getRegex(),ne.gfm.paragraph=M(ne._paragraph).replace("hr",ne.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",ne.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ne._tag).getRegex(),ne.pedantic=Z({},ne.normal,{html:M("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?\\1> *(?:\\n{2,}|\\s*$)| \\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",ne._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:W,paragraph:M(ne.normal._paragraph).replace("hr",ne.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",ne.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});const re={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:W,tag:"^comment|^[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^[^_*]*?\_\_[^_*]*?\*[^_*]*?(?=\_\_)|[^*]+(?=[^*])|[punct_](\*+)(?=[\s]|$)|[^punct*_\s](\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|[^punct*_\s](\*+)(?=[^punct*_\s])/,rDelimUnd:/^[^_*]*?\*\*[^_*]*?\_[^_*]*?(?=\*\*)|[^_]+(?=[^_])|[punct*](\_+)(?=[\s]|$)|[^punct*_\s](\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:W,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\.5&&(n="x"+n.toString(16)),r+=""+n+";";return r}re._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",re.punctuation=M(re.punctuation).replace(/punctuation/g,re._punctuation).getRegex(),re.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,re.escapedEmSt=/\\\*|\\_/g,re._comment=M(ne._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),re.emStrong.lDelim=M(re.emStrong.lDelim).replace(/punct/g,re._punctuation).getRegex(),re.emStrong.rDelimAst=M(re.emStrong.rDelimAst,"g").replace(/punct/g,re._punctuation).getRegex(),re.emStrong.rDelimUnd=M(re.emStrong.rDelimUnd,"g").replace(/punct/g,re._punctuation).getRegex(),re._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,re._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,re._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,re.autolink=M(re.autolink).replace("scheme",re._scheme).replace("email",re._email).getRegex(),re._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,re.tag=M(re.tag).replace("comment",re._comment).replace("attribute",re._attribute).getRegex(),re._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,re._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,re._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,re.link=M(re.link).replace("label",re._label).replace("href",re._href).replace("title",re._title).getRegex(),re.reflink=M(re.reflink).replace("label",re._label).replace("ref",ne._label).getRegex(),re.nolink=M(re.nolink).replace("ref",ne._label).getRegex(),re.reflinkSearch=M(re.reflinkSearch,"g").replace("reflink",re.reflink).replace("nolink",re.nolink).getRegex(),re.normal=Z({},re),re.pedantic=Z({},re.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:M(/^!?\[(label)\]\((.*?)\)/).replace("label",re._label).getRegex(),reflink:M(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",re._label).getRegex()}),re.gfm=Z({},re.normal,{escape:M(re.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\t+" ".repeat(n.length)));while(e)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((r=>!!(n=r.call({lexer:this},e,t))&&(e=e.substring(n.raw.length),t.push(n),!0)))))if(n=this.tokenizer.space(e))e=e.substring(n.raw.length),1===n.raw.length&&t.length>0?t[t.length-1].raw+="\n":t.push(n);else if(n=this.tokenizer.code(e))e=e.substring(n.raw.length),r=t[t.length-1],!r||"paragraph"!==r.type&&"text"!==r.type?t.push(n):(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue[this.inlineQueue.length-1].src=r.text);else if(n=this.tokenizer.fences(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.heading(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.hr(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.blockquote(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.list(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.html(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.def(e))e=e.substring(n.raw.length),r=t[t.length-1],!r||"paragraph"!==r.type&&"text"!==r.type?this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title}):(r.raw+="\n"+n.raw,r.text+="\n"+n.raw,this.inlineQueue[this.inlineQueue.length-1].src=r.text);else if(n=this.tokenizer.table(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.lheading(e))e=e.substring(n.raw.length),t.push(n);else{if(o=e,this.options.extensions&&this.options.extensions.startBlock){let t=1/0;const n=e.slice(1);let r;this.options.extensions.startBlock.forEach((function(e){r=e.call({lexer:this},n),"number"===typeof r&&r>=0&&(t=Math.min(t,r))})),t<1/0&&t>=0&&(o=e.substring(0,t+1))}if(this.state.top&&(n=this.tokenizer.paragraph(o)))r=t[t.length-1],i&&"paragraph"===r.type?(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):t.push(n),i=o.length!==e.length,e=e.substring(n.raw.length);else if(n=this.tokenizer.text(e))e=e.substring(n.raw.length),r=t[t.length-1],r&&"text"===r.type?(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):t.push(n);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return this.state.top=!0,t}inline(e,t){this.inlineQueue.push({src:e,tokens:t})}inlineTokens(e,t=[]){let n,r,o,i,a,s,l=e;if(this.tokens.links){const e=Object.keys(this.tokens.links);if(e.length>0)while(null!=(i=this.tokenizer.rules.inline.reflinkSearch.exec(l)))e.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(l=l.slice(0,i.index)+"["+X("a",i[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}while(null!=(i=this.tokenizer.rules.inline.blockSkip.exec(l)))l=l.slice(0,i.index)+"["+X("a",i[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);while(null!=(i=this.tokenizer.rules.inline.escapedEmSt.exec(l)))l=l.slice(0,i.index)+"++"+l.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);while(e)if(a||(s=""),a=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((r=>!!(n=r.call({lexer:this},e,t))&&(e=e.substring(n.raw.length),t.push(n),!0)))))if(n=this.tokenizer.escape(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.tag(e))e=e.substring(n.raw.length),r=t[t.length-1],r&&"text"===n.type&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);else if(n=this.tokenizer.link(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(n.raw.length),r=t[t.length-1],r&&"text"===n.type&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);else if(n=this.tokenizer.emStrong(e,l,s))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.codespan(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.br(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.del(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.autolink(e,ie))e=e.substring(n.raw.length),t.push(n);else if(this.state.inLink||!(n=this.tokenizer.url(e,ie))){if(o=e,this.options.extensions&&this.options.extensions.startInline){let t=1/0;const n=e.slice(1);let r;this.options.extensions.startInline.forEach((function(e){r=e.call({lexer:this},n),"number"===typeof r&&r>=0&&(t=Math.min(t,r))})),t<1/0&&t>=0&&(o=e.substring(0,t+1))}if(n=this.tokenizer.inlineText(o,oe))e=e.substring(n.raw.length),"_"!==n.raw.slice(-1)&&(s=n.raw.slice(-1)),a=!0,r=t[t.length-1],r&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}else e=e.substring(n.raw.length),t.push(n);return t}}class se{constructor(e){this.options=e||j}code(e,t,n){const r=(t||"").match(/\S*/)[0];if(this.options.highlight){const t=this.options.highlight(e,r);null!=t&&t!==e&&(n=!0,e=t)}return e=e.replace(/\n$/,"")+"\n",r?''+(n?e:$(e,!0))+"
\n":""+(n?e:$(e,!0))+"
\n"}blockquote(e){return`\n${e} \n`}html(e){return e}heading(e,t,n,r){if(this.options.headerIds){const o=this.options.headerPrefix+r.slug(n);return`${e} \n`}return`${e} \n`}hr(){return this.options.xhtml?" \n":" \n"}list(e,t,n){const r=t?"ol":"ul",o=t&&1!==n?' start="'+n+'"':"";return"<"+r+o+">\n"+e+""+r+">\n"}listitem(e){return`${e} \n`}checkbox(e){return" "}paragraph(e){return`${e}
\n`}table(e,t){return t&&(t=`${t} `)," \n"}tablerow(e){return`\n${e} \n`}tablecell(e,t){const n=t.header?"th":"td",r=t.align?`<${n} align="${t.align}">`:`<${n}>`;return r+e+`${n}>\n`}strong(e){return`${e} `}em(e){return`${e} `}codespan(e){return`${e}
`}br(){return this.options.xhtml?" ":" "}del(e){return`${e}`}link(e,t,n){if(e=q(this.options.sanitize,this.options.baseUrl,e),null===e)return n;let r='"+n+" ",r}image(e,t,n){if(e=q(this.options.sanitize,this.options.baseUrl,e),null===e)return n;let r=` ":">",r}text(e){return e}}class le{strong(e){return e}em(e){return e}codespan(e){return e}del(e){return e}html(e){return e}text(e){return e}link(e,t,n){return""+n}image(e,t,n){return""+n}br(){return""}}class ce{constructor(){this.seen={}}serialize(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")}getNextSafeSlug(e,t){let n=e,r=0;if(this.seen.hasOwnProperty(n)){r=this.seen[e];do{r++,n=e+"-"+r}while(this.seen.hasOwnProperty(n))}return t||(this.seen[e]=r,this.seen[n]=0),n}slug(e,t={}){const n=this.serialize(e);return this.getNextSafeSlug(n,t.dryrun)}}class ue{constructor(e){this.options=e||j,this.options.renderer=this.options.renderer||new se,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new le,this.slugger=new ce}static parse(e,t){const n=new ue(t);return n.parse(e)}static parseInline(e,t){const n=new ue(t);return n.parseInline(e)}parse(e,t=!0){let n,r,o,i,a,s,l,c,u,p,f,d,h,m,g,b,y,w,v,x="";const k=e.length;for(n=0;n0&&"paragraph"===g.tokens[0].type?(g.tokens[0].text=w+" "+g.tokens[0].text,g.tokens[0].tokens&&g.tokens[0].tokens.length>0&&"text"===g.tokens[0].tokens[0].type&&(g.tokens[0].tokens[0].text=w+" "+g.tokens[0].tokens[0].text)):g.tokens.unshift({type:"text",text:w}):m+=w),m+=this.parse(g.tokens,h),u+=this.renderer.listitem(m,y,b);x+=this.renderer.list(u,f,d);continue;case"html":x+=this.renderer.html(p.text);continue;case"paragraph":x+=this.renderer.paragraph(this.parseInline(p.tokens));continue;case"text":u=p.tokens?this.parseInline(p.tokens):p.text;while(n+1{o(e.text,e.lang,(function(t,n){if(t)return a(t);null!=n&&n!==e.text&&(e.text=n,e.escaped=!0),s--,0===s&&a()}))}),0))})),void(0===s&&a())}try{const n=ae.lex(e,t);return t.walkTokens&&pe.walkTokens(n,t.walkTokens),ue.parse(n,t)}catch(r){if(r.message+="\nPlease report this to https://github.com/markedjs/marked.",t.silent)return"An error occurred:
"+$(r.message+"",!0)+" ";throw r}}pe.options=pe.setOptions=function(e){return Z(pe.defaults,e),C(pe.defaults),pe},pe.getDefaults=S,pe.defaults=j,pe.use=function(...e){const t=Z({},...e),n=pe.defaults.extensions||{renderers:{},childTokens:{}};let r;e.forEach((e=>{if(e.extensions&&(r=!0,e.extensions.forEach((e=>{if(!e.name)throw new Error("extension name required");if(e.renderer){const t=n.renderers?n.renderers[e.name]:null;n.renderers[e.name]=t?function(...n){let r=e.renderer.apply(this,n);return!1===r&&(r=t.apply(this,n)),r}:e.renderer}if(e.tokenizer){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");n[e.level]?n[e.level].unshift(e.tokenizer):n[e.level]=[e.tokenizer],e.start&&("block"===e.level?n.startBlock?n.startBlock.push(e.start):n.startBlock=[e.start]:"inline"===e.level&&(n.startInline?n.startInline.push(e.start):n.startInline=[e.start]))}e.childTokens&&(n.childTokens[e.name]=e.childTokens)}))),e.renderer){const n=pe.defaults.renderer||new se;for(const t in e.renderer){const r=n[t];n[t]=(...o)=>{let i=e.renderer[t].apply(n,o);return!1===i&&(i=r.apply(n,o)),i}}t.renderer=n}if(e.tokenizer){const n=pe.defaults.tokenizer||new te;for(const t in e.tokenizer){const r=n[t];n[t]=(...o)=>{let i=e.tokenizer[t].apply(n,o);return!1===i&&(i=r.apply(n,o)),i}}t.tokenizer=n}if(e.walkTokens){const n=pe.defaults.walkTokens;t.walkTokens=function(t){e.walkTokens.call(this,t),n&&n.call(this,t)}}r&&(t.extensions=n),pe.setOptions(t)}))},pe.walkTokens=function(e,t){for(const n of e)switch(t.call(pe,n),n.type){case"table":for(const e of n.header)pe.walkTokens(e.tokens,t);for(const e of n.rows)for(const n of e)pe.walkTokens(n.tokens,t);break;case"list":pe.walkTokens(n.items,t);break;default:pe.defaults.extensions&&pe.defaults.extensions.childTokens&&pe.defaults.extensions.childTokens[n.type]?pe.defaults.extensions.childTokens[n.type].forEach((function(e){pe.walkTokens(n[e],t)})):n.tokens&&pe.walkTokens(n.tokens,t)}},pe.parseInline=function(e,t){if("undefined"===typeof e||null===e)throw new Error("marked.parseInline(): input parameter is undefined or null");if("string"!==typeof e)throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");t=Z({},pe.defaults,t||{}),J(t);try{const n=ae.lexInline(e,t);return t.walkTokens&&pe.walkTokens(n,t.walkTokens),ue.parseInline(n,t)}catch(n){if(n.message+="\nPlease report this to https://github.com/markedjs/marked.",t.silent)return"An error occurred:
"+$(n.message+"",!0)+" ";throw n}},pe.Parser=ue,pe.parser=ue.parse,pe.Renderer=se,pe.TextRenderer=le,pe.Lexer=ae,pe.lexer=ae.lex,pe.Tokenizer=te,pe.Slugger=ce,pe.parse=pe;pe.options,pe.setOptions,pe.use,pe.walkTokens,pe.parseInline,ue.parse,ae.lex;var fe=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("section",{staticClass:"comment-editor",attrs:{role:"form"}},[n("div",{staticClass:"avatar-body"},[n("avatar",{staticStyle:{cursor:"pointer"},attrs:{src:e.avatar,configs:e.configs,title:"点击头像试试"},on:{click:e.randomAuthor}})],1),n("form",{staticClass:"comment-form"},[n("div",{staticClass:"author-info"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.comment.author,expression:"comment.author"}],attrs:{id:"author","aria-required":"true",placeholder:e.configs.getQQInfo?"* 昵称(输入QQ自动获取)":"* 昵称",required:"required",type:"text"},domProps:{value:e.comment.author},on:{blur:function(t){e.configs.getQQInfo&&e.handleQQInfo()},input:function(t){t.target.composing||e.$set(e.comment,"author",t.target.value)}}}),n("input",{directives:[{name:"model",rawName:"v-model",value:e.comment.email,expression:"comment.email"}],class:!this.comment.email||e.isEmail()?"":"error",attrs:{id:"email",placeholder:"邮箱",type:"text"},domProps:{value:e.comment.email},on:{input:function(t){t.target.composing||e.$set(e.comment,"email",t.target.value)}}}),n("input",{directives:[{name:"model",rawName:"v-model",value:e.comment.authorUrl,expression:"comment.authorUrl"}],attrs:{id:"authorUrl",placeholder:"网址",type:"text"},domProps:{value:e.comment.authorUrl},on:{input:function(t){t.target.composing||e.$set(e.comment,"authorUrl",t.target.value)}}})]),n("div",{directives:[{name:"show",rawName:"v-show",value:!e.previewMode,expression:"!previewMode"}],staticClass:"comment-textarea"},[n("textarea",{directives:[{name:"model",rawName:"v-model",value:e.comment.content,expression:"comment.content"}],ref:"commentTextarea",class:!e.comment.content||e.comment.content.length<1023?"":"error",attrs:{placeholder:e.options.comment_content_placeholder||"撰写评论...","aria-required":"true",required:"required"},domProps:{value:e.comment.content},on:{input:function(t){t.target.composing||e.$set(e.comment,"content",t.target.value)}}}),n("span",{staticClass:"edit-picker"},[n("span",{staticClass:"edit-btn",class:e.emojiDialogVisible?"edit-open":"",on:{click:e.handleToggleDialogEmoji}},[n("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"18",height:"18"}},[e._v(" > "),n("path",{attrs:{d:"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm0-2a8 8 0 1 0 0-16 8 8 0 0 0 0 16zm-5-7h2a3 3 0 0 0 6 0h2a5 5 0 0 1-10 0zm1-2a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm8 0a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3z"}})])]),e.configs.enableImageUpload?n("span",{staticClass:"edit-btn",class:e.imageDialogVisible?"edit-open":"",on:{click:e.handleImageUpload}},[n("svg",{attrs:{viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18"}},[n("path",{attrs:{d:"M896 128a64 64 0 0 1 64 64v640a64 64 0 0 1-64 64H128a64 64 0 0 1-64-64V192a64 64 0 0 1 64-64h768zM288 409.6L128 569.536V832h768v-83.2l-204.8-204.8-134.4 134.4-268.8-268.8zM896 192H128v288L288 320l268.8 268.8 134.4-134.4 204.8 204.8V192z"}}),n("path",{attrs:{d:"M774.08 356.736a44.8 44.8 0 1 0 0-89.6 44.8 44.8 0 0 0 0 89.6z"}})])]):e._e(),n("transition",{attrs:{name:"emoji-fade"}},[n("keep-alive",[e.emojiDialogVisible?n("EmojiPicker",{attrs:{pack:e.emojiPack},on:{select:e.handleSelectEmoji}}):e._e()],1)],1)],1)]),e.previewMode?n("div",{staticClass:"comment-preview markdown-content",domProps:{innerHTML:e._s(e.renderedContent)}}):e._e(),n("ul",[this.replyComment?n("li",[n("button",{staticClass:"btn",attrs:{type:"button"},on:{click:function(t){e.globalData.replyId=0}}},[e._v("取消")])]):e._e(),e.comment.content?n("li",[n("button",{staticClass:"btn",attrs:{type:"button"},on:{click:function(t){e.previewMode=!e.previewMode}}},[e._v(" "+e._s(e.previewMode?"编辑":"预览")+" ")])]):e._e(),n("li",[n("button",{staticClass:"btn btn-primary",attrs:{type:"button"},on:{click:e.handleSubmitClick}},[e._v("提交")])])]),n("div",{staticClass:"comment-alert"},[e.infoAlertVisible?e._l(e.infoes,(function(t,r){return n("div",{key:r,staticClass:"alert info"},[n("span",{staticClass:"closebtn",on:{click:e.clearAlertClose}},[e._v("×")]),n("strong",[e._v(e._s(t))])])})):e._e(),e.successAlertVisible?e._l(e.successes,(function(t,r){return n("div",{key:r,staticClass:"alert success"},[n("span",{staticClass:"closebtn",on:{click:e.clearAlertClose}},[e._v("×")]),n("strong",[e._v(e._s(t))])])})):e._e(),e.warningAlertVisible?e._l(e.warnings,(function(t,r){return n("div",{key:r,staticClass:"alert warning"},[n("span",{staticClass:"closebtn",on:{click:e.clearAlertClose}},[e._v("×")]),n("strong",[e._v(e._s(t))])])})):e._e()],2)])])},de=[],he=n(2568),me=n.n(he);n(6699);function ge(e){const t=(new Date).getTime(),n=t-e,r=Math.floor(n/864e5);if(0===r){const e=n%864e5,t=Math.floor(e/36e5);if(0===t){const t=e%36e5,n=Math.floor(t/6e4);if(0===n){const e=t%6e4,n=Math.round(e/1e3);return n+" 秒前"}return n+" 分钟前"}return t+" 小时前"}return r<0?"刚刚":r<=7?r+" 天前":be(e,"yyyy/MM/dd hh:mm")}function be(e,t){e=new Date(e),/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(e.getFullYear()+"").substr(4-RegExp.$1.length)));let n={"M+":e.getMonth()+1,"d+":e.getDate(),"h+":e.getHours(),"m+":e.getMinutes(),"s+":e.getSeconds()};for(let r in n)if(new RegExp(`(${r})`).test(t)){let e=n[r]+"";t=t.replace(RegExp.$1,1===RegExp.$1.length?e:ye(e))}return t}function ye(e){return("00"+e).substr(e.length)}function we(e){return null===e||void 0===e||""===e}function ve(e){return e&&"object"===typeof e&&e.constructor===Object}function xe(e){const t=/^[A-Za-z0-9]+([-_.][A-Za-z0-9]+)*@([A-Za-z0-9]+[-.])+[A-Za-z]{2,8}$/;return t.test(e)}function ke(e){var t=/^[1-9][0-9]{4,9}$/gim;return t.test(e)}function _e(e,t,n,r){let o,i=e.getBoundingClientRect(),a=window.scrollY,s=a+i.top-n,l=(s-a)/t,c=a>s?-1:1;function u(){a+=l,a*c ");let n=document.createElement("div");n.innerHTML=e;const r=n.innerText||n.textContent;return n=null,r}function je(e,t){return t?e:e.replace(/[<&"]/g,(function(e){return{"<":"<","&":"&",'"':"""}[e]}))}function Ce(e){return e.replace(/<\/*([^/\s>]+)[^>]*>/g,(function(e,t){return["img","ul","ol","span","div","h1","h2","h3","h4","h5","h6","input","code"].includes(t)?"":["hr","br","p","li","a","blockquote"].includes(t)?" ":e}))}function Oe(e=0,t=1){return Math.random()*(t-e)+e}function Ae(){let e=["追梦","放风筝","打酱油","耍帅","卖萌","发嗲","发呆","傻笑","打盹","可爱","善良","邪恶","笨笨","聪明","美丽","智慧","温柔","调皮","动人","活泼","任性","苗条","纯洁","娇小","体贴","贪嘴","朴实","机灵","机智","搞笑"],t=["法师","猛男","少女","勇士","帅哥","英雄","老者","小矮人","天才","旺财","小熊","少年","驴","猪","恶龙","天使","恶魔","仙女","哥布林","企鹅","小提莫","爵士","骑士","国王","公主","王子","太监","猪儿虫","猫猫","上仙"];return`${e[Math.floor(Math.random()*e.length)]}的${t[Math.floor(Math.random()*t.length)]}`}var Pe=n(3977);const Ee=new Pe.HaloRestAPIClient({baseUrl:""}),Te=new Pe.ContentApiClient(Ee);var Re=Te,$e=n(9367),ze=n.n($e);const Ne={replyId:0};var Ie=Ne,Me=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("EmojiList",{attrs:{data:e.pack},on:{select:e.onSelectEmoji}})},De=[],Ue=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"emoji-container"},e._l(e.data,(function(t,r){return n("DreamEmoji",{key:r,attrs:{data:t},nativeOn:{click:function(n){return e.onSelect(t)}}})})),1)},qe=[],Be=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("span",{staticClass:"emoji-item",attrs:{title:e.data.name}},[n("img",{attrs:{alt:e.data.name,src:e.dreamSrc,onerror:"this.src='data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=='"}})])},Fe=[],Le={name:"DreamEmoji",props:{data:{type:Object},url:{type:String,required:!1,default:"/themes/dream/source/lib/halo-comment@1.0.6/assets/emoji/"}},computed:{dreamSrc(){return this.url+this.data.fileName+".png"}}},He=Le;function Ve(e,t,n,r,o,i,a,s){var l,c="function"===typeof e?e.options:e;if(t&&(c.render=t,c.staticRenderFns=n,c._compiled=!0),r&&(c.functional=!0),i&&(c._scopeId="data-v-"+i),a?(l=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||"undefined"===typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),o&&o.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(a)},c._ssrRegister=l):o&&(l=s?function(){o.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:o),l)if(c.functional){c._injectStyles=l;var u=c.render;c.render=function(e,t){return l.call(t),u(e,t)}}else{var p=c.beforeCreate;c.beforeCreate=p?[].concat(p,l):[l]}return{exports:e,options:c}}var We=Ve(He,Be,Fe,!1,null,null,null,!0),Ze=We.exports,Qe={name:"EmojiList",components:{DreamEmoji:Ze},props:{data:{type:Object}},methods:{onSelect(e){this.$emit("select",e)}},watch:{data(){this.$refs["container-emoji"].scrollTop=0}}},Ye=Qe;function Ge(e){var t=n(949);t.__inject__&&t.__inject__(e)}var Je=Ve(Ye,Ue,qe,!1,Ge,null,null,!0),Xe=Je.exports,Ke={name:"EmojiPicker",props:{pack:{type:Array,required:!0}},components:{EmojiList:Xe},data:()=>({mapEmojis:{}}),methods:{onSelectEmoji(e){this.$emit("select",e)}}},et=Ke,tt=Ve(et,Me,De,!1,null,null,null,!0),nt=tt.exports,rt=n(3483);function ot(e){const t=n(3483).Z;for(let n of t){let t=n.name,r=` `;e=e.replace(new RegExp(`\\[/${t}\\]`,"gm"),r)}return e}var it=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("img",{staticClass:"avatar",attrs:{alt:e.author?e.author+"'s avatar":"avatar",src:e.configs.avatarLoading},on:{click:e.click,load:e.handleAvatarLoading,error:e.handleAvatarError}})},at=[],st={name:"Avatar",props:{src:{type:String,required:!0},author:{type:String,required:!1},configs:{type:Object,required:!0}},methods:{handleAvatarLoading(e){const t=e.target||e.srcElement;t.finish||(t.finish=!0,t.src=this.src)},handleAvatarError(e){const t=e.target||e.srcElement;t.onerror=null,t.finish=!0,t.src=this.configs.defaultAvatar},click(){this.$emit("click")}}},lt=st,ct=Ve(lt,it,at,!1,null,null,null,!0),ut=ct.exports,pt={name:"CommentEditor",components:{Avatar:ut,EmojiPicker:nt},props:{targetId:{type:Number,required:!1,default:0},target:{type:String,required:!1,default:"posts",validator:function(e){return-1!==["posts","sheets","journals"].indexOf(e)}},replyComment:{type:Object,required:!1,default:()=>{}},options:{required:!1,default:[]},configs:{type:Object,required:!0}},data(){return{emojiPack:rt.Z,emojiDialogVisible:!1,imageDialogVisible:!1,comment:{author:null,authorUrl:null,email:null,content:""},previewMode:!1,globalData:Ie,infoes:[],warnings:[],successes:[]}},computed:{renderedContent(){return this.comment.content?pe.parse(ot(je(this.comment.content,this.configs.commentHtml))):""},avatar(){const e=this.options.comment_gravatar_default,t=this.options.gravatar_source||"//cn.gravatar.com/avatar/";if(!this.comment.email||!xe(this.comment.email))return`${t}?d=${e}`;const n=me()(this.comment.email);return`${t}${n}?s=256&d=${e}`},infoAlertVisible(){return null!==this.infoes&&this.infoes.length>0},warningAlertVisible(){return null!==this.warnings&&this.warnings.length>0},successAlertVisible(){return null!==this.successes&&this.successes.length>0}},created(){const e=localStorage.getItem("comment-author"),t=localStorage.getItem("comment-authorUrl"),n=localStorage.getItem("comment-email");this.comment.author=e||"",this.comment.authorUrl=t||"",this.comment.email=n||""},activated(){ze()(this.$el.querySelector("textarea"))},methods:{randomAuthor(){this.comment.author=Ae()},isEmail(){return xe(this.comment.email)},handleQQInfo(){ke(this.comment.author)&&fetch("https://api.coor.top/qqinfo/?qq="+this.comment.author).then((e=>e.json())).then((e=>{this.comment.author=e.nickname,this.comment.email=e.email}))},handleSubmitClick(){we(this.comment.author)?this.warnings.push("评论者昵称不能为空"):we(this.comment.content)?this.warnings.push("评论内容不能为空"):(this.comment.postId=this.targetId,this.replyComment&&(this.comment.parentId=this.replyComment.id),Re.comment.create(this.target,this.comment).then((e=>{localStorage.setItem("comment-author",this.comment.author),localStorage.setItem("comment-email",this.comment.email),localStorage.setItem("comment-authorUrl",this.comment.authorUrl),this.comment.content="",this.handleCommentCreated(e.data)})).catch((e=>{this.handleFailedToCreateComment(e)})))},handleCommentCreated(e){this.clearAlertClose(),"PUBLISHED"===e.status?this.successes.push("评论成功,刷新即可显示最新评论!"):this.infoes.push("您的评论已经投递至博主,等待博主审核!")},handleFailedToCreateComment(e){if(this.clearAlertClose(),400===e.status){if(this.warnings.push(e.data.message),e.data){const t=e.data.data;ve(t)&&Object.keys(t).forEach((e=>{this.warnings.push(t[e])}))}}else 401===e.status&&this.warnings.push("评论失败,博主关闭了评论功能!")},handleToggleDialogEmoji(){this.emojiDialogVisible=!this.emojiDialogVisible},handleImageUpload(){if(this.imageDialogVisible)return;const e=document.createElement("input");e.setAttribute("type","file"),e.style.display="none",e.accept="image/*",e.addEventListener("change",(()=>{const t=e.files[0];if(!t)return;this.imageDialogVisible=!0,this.infoes.push("图片上传中,请稍后……");const n=new FormData;n.append("image",t),fetch("https://pic.jitudisk.com/api/upload",{method:"POST",body:n,headers:{token:this.configs.imageToken}}).then((e=>e.json())).then((e=>{if(200!==e.code)return this.clearAlertClose(),void this.warnings.push(`图片上传失败:${e.msg}`);const t=e.data;this.comment.content+=`\n![${t.name}](${t.url})\n`,this.clearAlertClose(),this.successes.push("图片上传成功!")})).catch((e=>{this.clearAlertClose(),this.warnings.push(`图片上传失败:${e}`)})).finally((()=>this.imageDialogVisible=!1))})),e.click()},handleSelectEmoji(e){this.comment.content+=`[/${e.name}]`},clearAlertClose(){this.infoes=[],this.warnings=[],this.successes=[]}}},ft=pt,dt=Ve(ft,fe,de,!1,null,null,null,!0),ht=dt.exports,mt=function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.comment.no<=e.replyNum?n("li",{staticClass:"comment",class:e.commentClass,attrs:{id:"li-comment-"+e.comment.id,itemprop:"comment",itemtype:"https://schema.org/Comment"}},[n("div",{ref:"comment-"+e.comment.id,staticClass:"comment-body",attrs:{id:"comment-"+e.comment.id}},[n("div",{staticClass:"avatar-body"},[e.comment.authorUrl&&""!==e.comment.authorUrl?n("a",{attrs:{href:e.comment.authorUrl,rel:"nofollow",target:"_blank"}},[n("avatar",{attrs:{src:e.avatar,author:e.comment.author,configs:e.configs}})],1):n("avatar",{attrs:{src:e.avatar,author:e.comment.author,configs:e.configs}})],1),n("div",{staticClass:"comment-main"},[n("div",{staticClass:"comment-meta"},[n("div",{staticClass:"comment-author",attrs:{itemprop:"author"}},[n("div",{staticClass:"author-meta"},[e.comment.authorUrl&&""!==e.comment.authorUrl?n("a",{staticClass:"author-name",attrs:{href:e.comment.authorUrl,rel:"noopener noreferrer nofollow",target:"_blank"}},[e._v(e._s(e.comment.author))]):n("a",{staticClass:"author-name"},[e._v(e._s(e.comment.author))]),e.comment.isAdmin?n("span",{staticClass:"is-admin"},[e._v("博主")]):e._e()]),n("span",{staticClass:"btn btn-primary comment-reply",on:{click:e.handleCreateComment}},[e._v(e._s(e.globalData.replyId===e.comment.id?"取消回复":"回复"))])]),n("div",{staticClass:"comment-info"},[n("time",{staticClass:"comment-time",attrs:{datetime:e.comment.createTime,itemprop:"datePublished"}},[e._v(e._s(e.createTimeAgo))]),e.configs.showUserAgent?n("div",{staticClass:"useragent-info"},[e._v(" "+e._s(e.compileUserAgent)+" ")]):e._e()])]),n("div",{staticClass:"markdown-body",attrs:{itemprop:"description"}},[e.parent?n("span",{staticClass:"comment-reference",on:{click:e.handleToCommentRef,mouseenter:e.handleHighlightParent,mouseleave:function(t){return e.handleHighlightParent(!1)}}},[n("a",{attrs:{href:"#comment-"+this.parent.id}},[e._v("@"+e._s(this.parent.author))])]):e._e(),n("span",{staticClass:"markdown-content",domProps:{innerHTML:e._s(e.compileContent)}})])])]),n("keep-alive",[e.globalData.replyId===e.comment.id?n("comment-editor",{attrs:{configs:e.configs,options:e.options,replyComment:e.comment,target:e.target,targetId:e.targetId}}):e._e()],1),e.comment.children?n("ul",{staticClass:"children-nodes"},[e._l(e.comment.children,(function(t,r){return[n("CommentNode",{key:r,attrs:{comment:t,configs:e.configs,replyNum:e.replyNum,isChild:!0,options:e.options,parent:t.parent,target:e.target,targetId:e.targetId}})]}))],2):e._e(),!e.isChild&&e.replyNum{}},replyNum:{type:Number,required:!0,default:10},options:{type:Object,required:!1,default:()=>{}},configs:{type:Object,required:!0}},data(){return{globalData:Ie}},computed:{avatar(){if(!this.configs.priorityQQAvatar&&this.comment.avatar)return this.comment.avatar;const e=this.options.comment_gravatar_default,t=this.options.gravatar_source||"//cn.gravatar.com/avatar/";return`${t}${this.comment.gravatarMd5}?s=256&d=${e}`},compileContent(){return pe.parse(ot(Se(this.comment.content,this.configs.commentHtml)))},createTimeAgo(){return ge(this.comment.createTime)},compileUserAgent(){const e=new(yt());e.setUA(this.comment.userAgent);const t=e.getResult();return`(${t.browser.name} ${t.browser.version} in ${t.os.name} ${t.os.version})`},commentClass(){let e=this.isChild?" ":" index-1";return" li-comment-"+this.comment.id+e}},methods:{handleToCommentRef(){const e=document.getElementById(this.targetId+"").shadowRoot;if(!e)return;const t=e.getElementById(`comment-${this.parent.id}`);t.classList.add("comment-active"),_e(t,20,(window.innerHeight||document.documentElement.clientHeight)/4,(()=>setTimeout((()=>t.classList.remove("comment-active")),500)))},handleCreateComment(){this.globalData.replyId===this.comment.id?this.globalData.replyId=0:(this.globalData.replyId=this.comment.id,this.$nextTick((()=>{const e=this.$el.querySelector(".comment-editor"),t=e.getBoundingClientRect(),n=window.innerHeight||document.documentElement.clientHeight;(t.top<0||t.bottom>n)&&_e(e,20,n/2)})))},handleHighlightParent(e){const t=document.getElementById(this.targetId+"").shadowRoot;if(!t)return;const n=t.getElementById(`comment-${this.parent.id}`);if(n){const t=n.classList;e?t.add("comment-ref"):t.remove("comment-ref")}}}},vt=wt,xt=Ve(vt,mt,gt,!1,null,null,null,!0),kt=xt.exports,_t=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"comment-loader-container"},["default"===e.configs.loadingStyle?n("div",{staticClass:"comment-loader-default"},[n("span"),n("span"),n("span"),n("span")]):"circle"===e.configs.loadingStyle?n("div",{staticClass:"comment-loader-circle"}):"balls"===e.configs.loadingStyle?n("div",{staticClass:"comment-loader-balls"},[n("div"),n("div"),n("div")]):e._e()])},St=[],jt={name:"CommentLoading",props:{configs:{type:Object,required:!0}}},Ct=jt;function Ot(e){var t=n(2062);t.__inject__&&t.__inject__(e)}var At=Ve(Ct,_t,St,!1,Ot,null,null,!0),Pt=At.exports,Et=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"comment-page"},[n("ul",{staticClass:"page"},[n("li",{staticClass:"page-item"},[n("button",{staticClass:"prev-button",class:{disabled:!e.hasPrev},on:{click:e.handlePrevClick}},[e._v("上一页")])]),null!=e.firstPage?n("li",{staticClass:"page-item",class:{active:e.page===e.firstPage}},[n("button",{class:{active:e.page===e.firstPage},on:{click:function(t){return e.handlePageItemClick(e.firstPage)}}},[e._v(" "+e._s(e.firstPage+1)+" ")])]):e._e(),n("li",{directives:[{name:"show",rawName:"v-show",value:e.hasMorePrev,expression:"hasMorePrev"}],staticClass:"page-item"},[n("span",[e._v("...")])]),e._l(e.middlePages,(function(t){return n("li",{key:t,staticClass:"page-item",class:{active:t===e.page}},[n("button",{class:{active:t===e.page},on:{click:function(n){return e.handlePageItemClick(t)}}},[e._v(" "+e._s(t+1)+" ")])])})),n("li",{directives:[{name:"show",rawName:"v-show",value:e.hasMoreNext,expression:"hasMoreNext"}],staticClass:"page-item"},[n("span",[e._v("...")])]),e.lastPage?n("li",{staticClass:"page-item",class:{active:e.page===e.lastPage}},[n("button",{class:{active:e.page===e.lastPage},on:{click:function(t){return e.handlePageItemClick(e.lastPage)}}},[e._v(" "+e._s(e.lastPage+1)+" ")])]):e._e(),n("li",{staticClass:"page-item"},[n("button",{staticClass:"next-button",class:{disabled:!e.hasNext},on:{click:e.handleNextClick}},[e._v("下一页")])])],2)])},Tt=[],Rt={name:"Pagination",model:{prop:"page",event:"change"},props:{page:{type:Number,required:!1,default:0},size:{type:Number,required:!1,default:10},total:{type:Number,required:!1,default:0}},data(){return{middleSize:3}},computed:{pages(){return Math.ceil(this.total/this.size)},hasNext(){return this.page0},firstPage(){return 0===this.pages?null:0},hasMorePrev(){return!(null===this.firstPage||this.pages<=this.middleSize+2)&&this.page>=2+this.middleSize/2},hasMoreNext(){return!(null===this.lastPage||this.pages<=this.middleSize+2)&&this.page=this.lastPage-e-1&&(n=this.lastPage-1,t=n-this.middleSize+1),this.range(t,n+1)},lastPage(){return 0===this.pages||1===this.pages?0:this.pages-1}},methods:{handleNextClick(){this.hasNext&&this.$emit("change",this.page+1)},handlePrevClick(){this.hasPrev&&this.$emit("change",this.page-1)},handlePageItemClick(e){this.$emit("change",e)},range(e,t){if(e>=t)return[];const n=[];for(let r=e;r{}},configs:{type:Object,required:!0}},created(){window.innerHeight>500&&window.innerWidth>768&&(this.handleGetComments(),this.bulletScreenAnimate())},methods:{handleMouseleave(e){e.click=!1,e.stop=!1},createTimeAgo(e){return ge(e)},avatar(e){if(!this.configs.priorityQQAvatar&&e.avatar)return e.avatar;const t=this.options.comment_gravatar_default,n=this.options.gravatar_source||"//cn.gravatar.com/avatar/";return`${n}${e.gravatarMd5}?s=256&d=${t}`},async handleGetComments(){let e=0;while(1){const{data:t}=await Re.comment.listTopComments(this.target,this.id,{page:e++});let n=1200*t.content.length;for(let e of t.content){let t=pe.parse(Se(e.content,this.configs.commentHtml));e.summary=ot(Ce(t)),e.content=ot(t),e.top=Oe(50,window.innerHeight-350),e.startTime=(new Date).getTime()+Oe(0,n),e.speed=Oe(.5,3),this.$set(e,"style",{top:e.top+"px"}),this.$set(e,"stop",!1),this.$set(e,"click",!1)}if(this.comments.push(...t.content),!t.hasNext)break}this.loaded=!0},bulletScreenAnimate(){let e,t=this;function n(){let r=(new Date).getTime(),o=window.innerWidth,i=window.innerHeight-350;if(i<50)return t.comments.splice(0,t.comments.length),void window.cancelAnimationFrame(e);for(let e=t.comments.length-1;e>=0;e--){let n=t.comments[e];n.stop||(n.startTime<=r&&(n.left=n.left?n.left-n.speed:o,t.$set(n.style,"left",n.left+"px"),n.top>i&&(n.top=Oe(50,i),t.$set(n.style,"top",n.top+"px"))),n.left<-420&&t.comments.splice(e,1))}t.loaded&&0===t.comments.length?window.cancelAnimationFrame(e):e=window.requestAnimationFrame(n)}e=window.requestAnimationFrame(n)}}},qt=Ut;function Bt(e){var t=n(1486);t.__inject__&&t.__inject__(e)}var Ft=Ve(qt,Mt,Dt,!1,Bt,null,null,!0),Lt=Ft.exports;const Ht={CommentEditor:ht,CommentNode:kt,CommentLoading:Pt,Pagination:It,BulletScreen:Lt},Vt={};Object.keys(Ht).forEach((e=>{Vt[e]=i().component(e,Ht[e])})),pe.use({renderer:{listitem(e,t){return`${e} `},image(e,t,n){return` `},link(e,t,n){return`${n} `}},breaks:!0});const Wt={autoLoad:!0,showUserAgent:!0,priorityQQAvatar:!1,getQQInfo:!1,commentHtml:!1,loadingStyle:"default",unfoldReplyNum:10,night:!1,replyDescSoft:!1,enableImageUpload:!1,enableBulletScreen:!1,imageToken:void 0,avatarLoading:"/themes/dream/source/lib/halo-comment@1.0.6/assets/img/loading.svg",defaultAvatar:"/themes/dream/source/lib/halo-comment@1.0.6/assets/img/avatar.svg"};var Zt={name:"Comment",props:{id:{type:Number,required:!1,default:0},type:{type:String,required:!1,default:"post",validator:function(e){return-1!==["post","sheet","journal"].indexOf(e)}},configs:{type:[Object,String],required:!1,default:()=>Wt}},data(){return{list:{data:[],loading:!1,loaded:!1,params:{page:0},pages:0,total:0,size:10},options:{comment_gravatar_default:""},globalData:Ie}},computed:{target(){return`${this.type}s`},mergedConfigs(){let e={};return"[object String]"===Object.prototype.toString.call(this.configs)&&(e=JSON.parse(this.configs)),Wt["night"]=localStorage&&"true"===localStorage.getItem("night")||!1,Object.assign(Wt,e)}},created(){this.handleGetOptions(),this.mergedConfigs.autoLoad&&this.handleGetComments()},methods:{async handleGetComments(){this.list.loading=!0;const{data:e}=await Re.comment.listAsTreeView(this.target,this.id,this.list.params);e.content&&(e.content=this.flatReplyList(e.content))&&e.content.forEach((e=>e["replyCount"]=this.handleReplyList(e))),this.list.data=e.content,this.list.total=e.total,this.list.pages=e.pages,this.list.size=e.rpp,this.list.loading=!1,this.list.loaded=!0,this.globalData.replyId=0},async handleGetOptions(){const{data:e}=await Re.option.comment();this.options=e,this.mergedConfigs.priorityQQAvatar&&(this.options.gravatar_source="https://cravatar.cn/avatar/")},flatReplyList(e){let t=this.mergedConfigs.replyDescSoft,n=function(e,n){return t?n.createTime-e.createTime:e.createTime-n.createTime};for(let r of e)if(r.children){let e=r.children;e.forEach((e=>e.parent=r));for(let t=0;t{t.parent=n,e.push(t)})),n.children=null)}r.children.sort(n)}return e},handleReplyList(e,t=0){return e["no"]=t,e.children&&e.children.forEach((e=>t=this.handleReplyList(e,t+1))),t},handlePaginationChange(e){this.list.params.page=e,this.handleGetComments()}}},Qt=Zt;function Yt(e){var t=n(5714);t.__inject__&&t.__inject__(e)}var Gt=Ve(Qt,k,_,!1,Yt,null,null,!0),Jt=Gt.exports;window.customElements.define("halo-comment",x(i(),Jt))}()})();
\ No newline at end of file
+e.exports=function(e){return null!=e&&(t(e)||n(e)||!!e._isBuffer)}},9575:function(e,t,n){(function(t,n){e.exports=n()})("undefined"!==typeof self?self:"undefined"!==typeof window?window:"undefined"!==typeof n.g&&n.g,(function(){"use strict";var e="3.7.2",t=e,n="function"===typeof atob,r="function"===typeof btoa,o="function"===typeof Buffer,i="function"===typeof TextDecoder?new TextDecoder:void 0,a="function"===typeof TextEncoder?new TextEncoder:void 0,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",l=Array.prototype.slice.call(s),c=function(e){var t={};return e.forEach((function(e,n){return t[e]=n})),t}(l),u=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,p=String.fromCharCode.bind(String),f="function"===typeof Uint8Array.from?Uint8Array.from.bind(Uint8Array):function(e,t){return void 0===t&&(t=function(e){return e}),new Uint8Array(Array.prototype.slice.call(e,0).map(t))},d=function(e){return e.replace(/=/g,"").replace(/[+\/]/g,(function(e){return"+"==e?"-":"_"}))},h=function(e){return e.replace(/[^A-Za-z0-9\+\/]/g,"")},m=function(e){for(var t,n,r,o,i="",a=e.length%3,s=0;s255||(r=e.charCodeAt(s++))>255||(o=e.charCodeAt(s++))>255)throw new TypeError("invalid character found");t=n<<16|r<<8|o,i+=l[t>>18&63]+l[t>>12&63]+l[t>>6&63]+l[63&t]}return a?i.slice(0,a-3)+"===".substring(a):i},g=r?function(e){return btoa(e)}:o?function(e){return Buffer.from(e,"binary").toString("base64")}:m,b=o?function(e){return Buffer.from(e).toString("base64")}:function(e){for(var t=4096,n=[],r=0,o=e.length;r>>6)+p(128|63&t):p(224|t>>>12&15)+p(128|t>>>6&63)+p(128|63&t)}t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return p(240|t>>>18&7)+p(128|t>>>12&63)+p(128|t>>>6&63)+p(128|63&t)},v=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,x=function(e){return e.replace(v,w)},k=o?function(e){return Buffer.from(e,"utf8").toString("base64")}:a?function(e){return b(a.encode(e))}:function(e){return g(x(e))},_=function(e,t){return void 0===t&&(t=!1),t?d(k(e)):k(e)},S=function(e){return _(e,!0)},j=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,C=function(e){switch(e.length){case 4:var t=(7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3),n=t-65536;return p(55296+(n>>>10))+p(56320+(1023&n));case 3:return p((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return p((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},O=function(e){return e.replace(j,C)},A=function(e){if(e=e.replace(/\s+/g,""),!u.test(e))throw new TypeError("malformed base64.");e+="==".slice(2-(3&e.length));for(var t,n,r,o="",i=0;i>16&255):64===r?p(t>>16&255,t>>8&255):p(t>>16&255,t>>8&255,255&t);return o},P=n?function(e){return atob(h(e))}:o?function(e){return Buffer.from(e,"base64").toString("binary")}:A,E=o?function(e){return f(Buffer.from(e,"base64"))}:function(e){return f(P(e),(function(e){return e.charCodeAt(0)}))},T=function(e){return E($(e))},R=o?function(e){return Buffer.from(e,"base64").toString("utf8")}:i?function(e){return i.decode(E(e))}:function(e){return O(P(e))},$=function(e){return h(e.replace(/[-_]/g,(function(e){return"-"==e?"+":"/"})))},z=function(e){return R($(e))},N=function(e){if("string"!==typeof e)return!1;var t=e.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(t)||!/[^\s0-9a-zA-Z\-_]/.test(t)},I=function(e){return{value:e,enumerable:!1,writable:!0,configurable:!0}},M=function(){var e=function(e,t){return Object.defineProperty(String.prototype,e,I(t))};e("fromBase64",(function(){return z(this)})),e("toBase64",(function(e){return _(this,e)})),e("toBase64URI",(function(){return _(this,!0)})),e("toBase64URL",(function(){return _(this,!0)})),e("toUint8Array",(function(){return T(this)}))},D=function(){var e=function(e,t){return Object.defineProperty(Uint8Array.prototype,e,I(t))};e("toBase64",(function(e){return y(this,e)})),e("toBase64URI",(function(){return y(this,!0)})),e("toBase64URL",(function(){return y(this,!0)}))},U=function(){M(),D()},q={version:e,VERSION:t,atob:P,atobPolyfill:A,btoa:g,btoaPolyfill:m,fromBase64:z,toBase64:_,encode:_,encodeURI:S,encodeURL:S,utob:x,btou:O,decode:z,isValid:N,fromUint8Array:y,toUint8Array:T,extendString:M,extendUint8Array:D,extendBuiltins:U,Base64:{}};return Object.keys(q).forEach((function(e){return q.Base64[e]=q[e]})),q}))},2568:function(e,t,n){(function(){var t=n(1012),r=n(487).utf8,o=n(8738),i=n(487).bin,a=function(e,n){e.constructor==String?e=n&&"binary"===n.encoding?i.stringToBytes(e):r.stringToBytes(e):o(e)?e=Array.prototype.slice.call(e,0):Array.isArray(e)||e.constructor===Uint8Array||(e=e.toString());for(var s=t.bytesToWords(e),l=8*e.length,c=1732584193,u=-271733879,p=-1732584194,f=271733878,d=0;d>>24)|4278255360&(s[d]<<24|s[d]>>>8);s[l>>>5]|=128<>>9<<4)]=l;var h=a._ff,m=a._gg,g=a._hh,b=a._ii;for(d=0;d>>0,u=u+w>>>0,p=p+v>>>0,f=f+x>>>0}return t.endian([c,u,p,f])};a._ff=function(e,t,n,r,o,i,a){var s=e+(t&n|~t&r)+(o>>>0)+a;return(s<>>32-i)+t},a._gg=function(e,t,n,r,o,i,a){var s=e+(t&r|n&~r)+(o>>>0)+a;return(s<>>32-i)+t},a._hh=function(e,t,n,r,o,i,a){var s=e+(t^n^r)+(o>>>0)+a;return(s<>>32-i)+t},a._ii=function(e,t,n,r,o,i,a){var s=e+(n^(t|~r))+(o>>>0)+a;return(s<>>32-i)+t},a._blocksize=16,a._digestsize=16,e.exports=function(e,n){if(void 0===e||null===e)throw new Error("Illegal argument "+e);var r=t.wordsToBytes(a(e,n));return n&&n.asBytes?r:n&&n.asString?i.bytesToString(r):t.bytesToHex(r)}})()},631:function(e,t,n){var r="function"===typeof Map&&Map.prototype,o=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,i=r&&o&&"function"===typeof o.get?o.get:null,a=r&&Map.prototype.forEach,s="function"===typeof Set&&Set.prototype,l=Object.getOwnPropertyDescriptor&&s?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=s&&l&&"function"===typeof l.get?l.get:null,u=s&&Set.prototype.forEach,p="function"===typeof WeakMap&&WeakMap.prototype,f=p?WeakMap.prototype.has:null,d="function"===typeof WeakSet&&WeakSet.prototype,h=d?WeakSet.prototype.has:null,m="function"===typeof WeakRef&&WeakRef.prototype,g=m?WeakRef.prototype.deref:null,b=Boolean.prototype.valueOf,y=Object.prototype.toString,w=Function.prototype.toString,v=String.prototype.match,x=String.prototype.slice,k=String.prototype.replace,_=String.prototype.toUpperCase,S=String.prototype.toLowerCase,j=RegExp.prototype.test,C=Array.prototype.concat,O=Array.prototype.join,A=Array.prototype.slice,P=Math.floor,E="function"===typeof BigInt?BigInt.prototype.valueOf:null,T=Object.getOwnPropertySymbols,R="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?Symbol.prototype.toString:null,$="function"===typeof Symbol&&"object"===typeof Symbol.iterator,z="function"===typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===$||"symbol")?Symbol.toStringTag:null,N=Object.prototype.propertyIsEnumerable,I=("function"===typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function M(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||j.call(/e/,t))return t;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"===typeof e){var r=e<0?-P(-e):P(e);if(r!==e){var o=String(r),i=x.call(t,o.length+1);return k.call(o,n,"$&_")+"."+k.call(k.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return k.call(t,n,"$&_")}var D=n(4654).custom,U=D&&Y(D)?D:null;function q(e,t,n){var r="double"===(n.quoteStyle||t)?'"':"'";return r+e+r}function B(e){return k.call(String(e),/"/g,""")}function F(e){return"[object Array]"===K(e)&&(!z||!("object"===typeof e&&z in e))}function L(e){return"[object Date]"===K(e)&&(!z||!("object"===typeof e&&z in e))}function H(e){return"[object RegExp]"===K(e)&&(!z||!("object"===typeof e&&z in e))}function V(e){return"[object Error]"===K(e)&&(!z||!("object"===typeof e&&z in e))}function W(e){return"[object String]"===K(e)&&(!z||!("object"===typeof e&&z in e))}function Z(e){return"[object Number]"===K(e)&&(!z||!("object"===typeof e&&z in e))}function Q(e){return"[object Boolean]"===K(e)&&(!z||!("object"===typeof e&&z in e))}function Y(e){if($)return e&&"object"===typeof e&&e instanceof Symbol;if("symbol"===typeof e)return!0;if(!e||"object"!==typeof e||!R)return!1;try{return R.call(e),!0}catch(t){}return!1}function G(e){if(!e||"object"!==typeof e||!E)return!1;try{return E.call(e),!0}catch(t){}return!1}e.exports=function e(t,n,r,o){var s=n||{};if(X(s,"quoteStyle")&&"single"!==s.quoteStyle&&"double"!==s.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(X(s,"maxStringLength")&&("number"===typeof s.maxStringLength?s.maxStringLength<0&&s.maxStringLength!==1/0:null!==s.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var l=!X(s,"customInspect")||s.customInspect;if("boolean"!==typeof l&&"symbol"!==l)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(X(s,"indent")&&null!==s.indent&&"\t"!==s.indent&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(X(s,"numericSeparator")&&"boolean"!==typeof s.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var p=s.numericSeparator;if("undefined"===typeof t)return"undefined";if(null===t)return"null";if("boolean"===typeof t)return t?"true":"false";if("string"===typeof t)return le(t,s);if("number"===typeof t){if(0===t)return 1/0/t>0?"0":"-0";var f=String(t);return p?M(t,f):f}if("bigint"===typeof t){var d=String(t)+"n";return p?M(t,d):d}var h="undefined"===typeof s.depth?5:s.depth;if("undefined"===typeof r&&(r=0),r>=h&&h>0&&"object"===typeof t)return F(t)?"[Array]":"[Object]";var m=he(s,r);if("undefined"===typeof o)o=[];else if(te(o,t)>=0)return"[Circular]";function g(t,n,i){if(n&&(o=A.call(o),o.push(n)),i){var a={depth:s.depth};return X(s,"quoteStyle")&&(a.quoteStyle=s.quoteStyle),e(t,a,r+1,o)}return e(t,s,r+1,o)}if("function"===typeof t){var y=ee(t),w=ge(t,g);return"[Function"+(y?": "+y:" (anonymous)")+"]"+(w.length>0?" { "+O.call(w,", ")+" }":"")}if(Y(t)){var v=$?k.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):R.call(t);return"object"!==typeof t||$?v:ue(v)}if(se(t)){for(var _="<"+S.call(String(t.nodeName)),j=t.attributes||[],P=0;P",t.childNodes&&t.childNodes.length&&(_+="..."),_+=""+S.call(String(t.nodeName))+">",_}if(F(t)){if(0===t.length)return"[]";var T=ge(t,g);return m&&!de(T)?"["+me(T,m)+"]":"[ "+O.call(T,", ")+" ]"}if(V(t)){var D=ge(t,g);return"cause"in t&&!N.call(t,"cause")?"{ ["+String(t)+"] "+O.call(C.call("[cause]: "+g(t.cause),D),", ")+" }":0===D.length?"["+String(t)+"]":"{ ["+String(t)+"] "+O.call(D,", ")+" }"}if("object"===typeof t&&l){if(U&&"function"===typeof t[U])return t[U]();if("symbol"!==l&&"function"===typeof t.inspect)return t.inspect()}if(ne(t)){var J=[];return a.call(t,(function(e,n){J.push(g(n,t,!0)+" => "+g(e,t))})),fe("Map",i.call(t),J,m)}if(ie(t)){var ce=[];return u.call(t,(function(e){ce.push(g(e,t))})),fe("Set",c.call(t),ce,m)}if(re(t))return pe("WeakMap");if(ae(t))return pe("WeakSet");if(oe(t))return pe("WeakRef");if(Z(t))return ue(g(Number(t)));if(G(t))return ue(g(E.call(t)));if(Q(t))return ue(b.call(t));if(W(t))return ue(g(String(t)));if(!L(t)&&!H(t)){var be=ge(t,g),ye=I?I(t)===Object.prototype:t instanceof Object||t.constructor===Object,we=t instanceof Object?"":"null prototype",ve=!ye&&z&&Object(t)===t&&z in t?x.call(K(t),8,-1):we?"Object":"",xe=ye||"function"!==typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"",ke=xe+(ve||we?"["+O.call(C.call([],ve||[],we||[]),": ")+"] ":"");return 0===be.length?ke+"{}":m?ke+"{"+me(be,m)+"}":ke+"{ "+O.call(be,", ")+" }"}return String(t)};var J=Object.prototype.hasOwnProperty||function(e){return e in this};function X(e,t){return J.call(e,t)}function K(e){return y.call(e)}function ee(e){if(e.name)return e.name;var t=v.call(w.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function te(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;nt.maxStringLength){var n=e.length-t.maxStringLength,r="... "+n+" more character"+(n>1?"s":"");return le(x.call(e,0,t.maxStringLength),t)+r}var o=k.call(k.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,ce);return q(o,"single",t)}function ce(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+_.call(t.toString(16))}function ue(e){return"Object("+e+")"}function pe(e){return e+" { ? }"}function fe(e,t,n,r){var o=r?me(n,r):O.call(n,", ");return e+" ("+t+") {"+o+"}"}function de(e){for(var t=0;t=0)return!1;return!0}function he(e,t){var n;if("\t"===e.indent)n="\t";else{if(!("number"===typeof e.indent&&e.indent>0))return null;n=O.call(Array(e.indent+1)," ")}return{base:n,prev:O.call(Array(t+1),n)}}function me(e,t){if(0===e.length)return"";var n="\n"+t.prev+t.base;return n+O.call(e,","+n)+"\n"+t.prev}function ge(e,t){var n=F(e),r=[];if(n){r.length=e.length;for(var o=0;o-1?e.split(","):e},c="utf8=%26%2310003%3B",u="utf8=%E2%9C%93",p=function(e,t){var n,p={},f=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,d=t.parameterLimit===1/0?void 0:t.parameterLimit,h=f.split(t.delimiter,d),m=-1,g=t.charset;if(t.charsetSentinel)for(n=0;n-1&&(y=i(y)?[y]:y),o.call(p,b)?p[b]=r.combine(p[b],y):p[b]=y}return p},f=function(e,t,n,r){for(var o=r?t:l(t,n),i=e.length-1;i>=0;--i){var a,s=e[i];if("[]"===s&&n.parseArrays)a=[].concat(o);else{a=n.plainObjects?Object.create(null):{};var c="["===s.charAt(0)&&"]"===s.charAt(s.length-1)?s.slice(1,-1):s,u=parseInt(c,10);n.parseArrays||""!==c?!isNaN(u)&&s!==c&&String(u)===c&&u>=0&&n.parseArrays&&u<=n.arrayLimit?(a=[],a[u]=o):"__proto__"!==c&&(a[c]=o):a={0:o}}o=a}return o},d=function(e,t,n,r){if(e){var i=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/,s=/(\[[^[\]]*])/g,l=n.depth>0&&a.exec(i),c=l?i.slice(0,l.index):i,u=[];if(c){if(!n.plainObjects&&o.call(Object.prototype,c)&&!n.allowPrototypes)return;u.push(c)}var p=0;while(n.depth>0&&null!==(l=s.exec(i))&&p0?S.join(",")||null:void 0}];else if(l(f))$=f;else{var N=Object.keys(S);$=d?N.sort(d):N}for(var I=0;I<$.length;++I){var M=$[I],D="object"===typeof M&&"undefined"!==typeof M.value?M.value:S[M];if(!s||null!==D){var U=l(S)?"function"===typeof i?i(n,M):n:n+(b?"."+M:"["+M+"]");_.set(t,C);var q=r();q.set(g,_),p(z,e(D,U,i,a,s,u,f,d,b,y,w,v,x,k,q))}}return z},y=function(e){if(!e)return h;if(null!==e.encoder&&"undefined"!==typeof e.encoder&&"function"!==typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||h.charset;if("undefined"!==typeof e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=i["default"];if("undefined"!==typeof e.format){if(!a.call(i.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var r=i.formatters[n],o=h.filter;return("function"===typeof e.filter||l(e.filter))&&(o=e.filter),{addQueryPrefix:"boolean"===typeof e.addQueryPrefix?e.addQueryPrefix:h.addQueryPrefix,allowDots:"undefined"===typeof e.allowDots?h.allowDots:!!e.allowDots,charset:t,charsetSentinel:"boolean"===typeof e.charsetSentinel?e.charsetSentinel:h.charsetSentinel,delimiter:"undefined"===typeof e.delimiter?h.delimiter:e.delimiter,encode:"boolean"===typeof e.encode?e.encode:h.encode,encoder:"function"===typeof e.encoder?e.encoder:h.encoder,encodeValuesOnly:"boolean"===typeof e.encodeValuesOnly?e.encodeValuesOnly:h.encodeValuesOnly,filter:o,format:n,formatter:r,serializeDate:"function"===typeof e.serializeDate?e.serializeDate:h.serializeDate,skipNulls:"boolean"===typeof e.skipNulls?e.skipNulls:h.skipNulls,sort:"function"===typeof e.sort?e.sort:null,strictNullHandling:"boolean"===typeof e.strictNullHandling?e.strictNullHandling:h.strictNullHandling}};e.exports=function(e,t){var n,o,i=e,a=y(t);"function"===typeof a.filter?(o=a.filter,i=o("",i)):l(a.filter)&&(o=a.filter,n=o);var c,u=[];if("object"!==typeof i||null===i)return"";c=t&&t.arrayFormat in s?t.arrayFormat:t&&"indices"in t?t.indices?"indices":"repeat":"indices";var f=s[c];n||(n=Object.keys(i)),a.sort&&n.sort(a.sort);for(var d=r(),h=0;h0?w+g:""}},2769:function(e,t,n){"use strict";var r=n(5798),o=Object.prototype.hasOwnProperty,i=Array.isArray,a=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),s=function(e){while(e.length>1){var t=e.pop(),n=t.obj[t.prop];if(i(n)){for(var r=[],o=0;o=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122||i===r.RFC1738&&(40===u||41===u)?l+=s.charAt(c):u<128?l+=a[u]:u<2048?l+=a[192|u>>6]+a[128|63&u]:u<55296||u>=57344?l+=a[224|u>>12]+a[128|u>>6&63]+a[128|63&u]:(c+=1,u=65536+((1023&u)<<10|1023&s.charCodeAt(c)),l+=a[240|u>>18]+a[128|u>>12&63]+a[128|u>>6&63]+a[128|63&u])}return l},d=function(e){for(var t=[{obj:{o:e},prop:"o"}],n=[],r=0;r=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function l(e,t){return function(n,r){t(n,r,e)}}function c(e,t){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(e,t)}function u(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,i){function a(e){try{l(r.next(e))}catch(t){i(t)}}function s(e){try{l(r["throw"](e))}catch(t){i(t)}}function l(e){e.done?n(e.value):o(e.value).then(a,s)}l((r=r.apply(e,t||[])).next())}))}function p(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(e){return function(t){return l([e,t])}}function l(i){if(n)throw new TypeError("Generator is already executing.");while(a)try{if(n=1,r&&(o=2&i[0]?r["return"]:i[0]?r["throw"]||((o=r["return"])&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(o=a.trys,!(o=o.length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function m(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{while((void 0===t||t-- >0)&&!(r=i.next()).done)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i["return"])&&n.call(i)}finally{if(o)throw o.error}}return a}function g(){for(var e=[],t=0;t1||s(e,t)}))})}function s(e,t){try{l(o[e](t))}catch(n){p(i[0][3],n)}}function l(e){e.value instanceof w?Promise.resolve(e.value.v).then(c,u):p(i[0][2],e)}function c(e){s("next",e)}function u(e){s("throw",e)}function p(e,t){e(t),i.shift(),i.length&&s(i[0][0],i[0][1])}}function x(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:w(e[r](t)),done:"return"===r}:o?o(t):t}:o}}function k(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e="function"===typeof h?h(e):e[Symbol.iterator](),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,i){t=e[n](t),o(r,i,t.done,t.value)}))}}function o(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)}}function _(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var S=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e["default"]=t};function j(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&f(t,e,n);return S(t,e),t}function C(e){return e&&e.__esModule?e:{default:e}}function O(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"===typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)}function A(e,t,n,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"===typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(e,n):o?o.value=n:t.set(e,n),n}function P(e,t){if(null===t||"object"!==typeof t&&"function"!==typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"===typeof e?t===e:e.has(t)}},2238:function(e,t,n){var r;(function(o,i){"use strict";var a="0.7.31",s="",l="?",c="function",u="undefined",p="object",f="string",d="major",h="model",m="name",g="type",b="vendor",y="version",w="architecture",v="console",x="mobile",k="tablet",_="smarttv",S="wearable",j="embedded",C=255,O="Amazon",A="Apple",P="ASUS",E="BlackBerry",T="Browser",R="Chrome",$="Edge",z="Firefox",N="Google",I="Huawei",M="LG",D="Microsoft",U="Motorola",q="Opera",B="Samsung",F="Sony",L="Xiaomi",H="Zebra",V="Facebook",W=function(e,t){var n={};for(var r in e)t[r]&&t[r].length%2===0?n[r]=t[r].concat(e[r]):n[r]=e[r];return n},Z=function(e){for(var t={},n=0;n0?2===a.length?typeof a[1]==c?this[a[0]]=a[1].call(this,l):this[a[0]]=a[1]:3===a.length?typeof a[1]!==c||a[1].exec&&a[1].test?this[a[0]]=l?l.replace(a[1],a[2]):i:this[a[0]]=l?a[1].call(this,l,a[2]):i:4===a.length&&(this[a[0]]=l?a[3].call(this,l.replace(a[1],a[2])):i):this[a]=l||i;u+=2}},K=function(e,t){for(var n in t)if(typeof t[n]===p&&t[n].length>0){for(var r=0;rC?J(e,C):e,this},this.setUA(n),this};re.VERSION=a,re.BROWSER=Z([m,y,d]),re.CPU=Z([w]),re.DEVICE=Z([h,b,g,v,x,_,k,S,j]),re.ENGINE=re.OS=Z([m,y]),typeof t!==u?("object"!==u&&e.exports&&(t=e.exports=re),t.UAParser=re):"function"===c&&n.amdO?(r=function(){return re}.call(t,n,t,e),r===i||(e.exports=r)):typeof o!==u&&(o.UAParser=re);var oe=typeof o!==u&&(o.jQuery||o.Zepto);if(oe&&!oe.ua){var ie=new re;oe.ua=ie.getResult(),oe.ua.get=function(){return ie.getUA()},oe.ua.set=function(e){ie.setUA(e);var t=ie.getResult();for(var n in t)oe.ua[n]=t[n]}}})("object"===typeof window?window:this)},5708:function(e,t,n){var r=n(6332);r.__esModule&&(r=r.default),"string"===typeof r&&(r=[[e.id,r,""]]),r.locals&&(e.exports=r.locals);var o=n(2339).Z;e.exports.__inject__=function(e){o("08e032f2",r,e)}},1817:function(e,t,n){var r=n(4995);r.__esModule&&(r=r.default),"string"===typeof r&&(r=[[e.id,r,""]]),r.locals&&(e.exports=r.locals);var o=n(2339).Z;e.exports.__inject__=function(e){o("7494d101",r,e)}},8935:function(e,t,n){var r=n(7272);r.__esModule&&(r=r.default),"string"===typeof r&&(r=[[e.id,r,""]]),r.locals&&(e.exports=r.locals);var o=n(2339).Z;e.exports.__inject__=function(e){o("148f94a5",r,e)}},8715:function(e,t,n){var r=n(1090);r.__esModule&&(r=r.default),"string"===typeof r&&(r=[[e.id,r,""]]),r.locals&&(e.exports=r.locals);var o=n(2339).Z;e.exports.__inject__=function(e){o("a4f66f42",r,e)}},2708:function(e,t,n){var r=n(6431);r.__esModule&&(r=r.default),"string"===typeof r&&(r=[[e.id,r,""]]),r.locals&&(e.exports=r.locals);var o=n(2339).Z;e.exports.__inject__=function(e){o("266f19bb",r,e)}},2339:function(e,t,n){"use strict";function r(e,t){for(var n=[],r={},o=0;oe.replace(a,((e,t)=>t?t.toUpperCase():"")),l=/\B([A-Z])/g,c=e=>e.replace(l,"-$1").toLowerCase();function u(e){const t={};return e.forEach((e=>{t[e]=void 0})),t}function p(e,t,n){e[t]=[].concat(e[t]||[]),e[t].unshift(n)}function f(e,t){if(e){const n=e.$options[t]||[];n.forEach((t=>{t.call(e)}))}}function d(e,t){return new CustomEvent(e,{bubbles:!1,cancelable:!1,detail:t})}const h=e=>/function Boolean/.test(String(e)),m=e=>/function Number/.test(String(e));function g(e,t,{type:n}={}){if(h(n))return"true"===e||"false"===e?"true"===e:""===e||e===t||null!=e||e;if(m(n)){const t=parseFloat(e,10);return isNaN(t)?e:t}return e}function b(e,t){const n=[];for(let r=0,o=t.length;r(e[t]=l[n[r]],e)),{}),p(t,"beforeCreate",(function(){const e=this.$emit;this.$emit=(t,...n)=>(this.$root.$options.customElement.dispatchEvent(d(t,n)),e.call(this,t,...n))})),p(t,"created",(function(){o.forEach((e=>{this.$root.props[e]=this[e]}))})),o.forEach((e=>{Object.defineProperty(m.prototype,e,{get(){return this._wrapper.props[e]},set(t){this._wrapper.props[e]=t},enumerable:!1,configurable:!0})})),a=!0}function h(e,t){const n=s(t),r=e.hasAttribute(t)?e.getAttribute(t):void 0;e._wrapper.props[n]=g(r,t,i[n])}class m extends HTMLElement{constructor(){const n=super();n.attachShadow({mode:"open"});const r=n._wrapper=new e({name:"shadow-root",customElement:n,shadowRoot:n.shadowRoot,data(){return{props:{},slotChildren:[]}},render(e){return e(t,{ref:"inner",props:this.props},this.slotChildren)}}),o=new MutationObserver((e=>{let t=!1;for(let r=0;r{e.props=u(o),r.forEach((e=>{h(this,e)}))};a?n():t().then((e=>{(e.__esModule||"Module"===e[Symbol.toStringTag])&&(e=e.default),l(e),n()})),e.slotChildren=Object.freeze(b(e.$createElement,this.childNodes)),e.$mount(),this.shadowRoot.appendChild(e.$el)}}disconnectedCallback(){f(this.vueComponent,"deactivated")}}return n||l(t),m}var x=v,k=(n(3645),function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"halo-comment",class:e.mergedConfigs.night?"night":"",attrs:{id:"halo-comment"}},[n("keep-alive",[n("comment-editor",{attrs:{configs:e.mergedConfigs,options:e.options,target:e.target,targetId:e.id}})],1),e.mergedConfigs.autoLoad||e.list.loaded?e._e():n("div",{staticClass:"load-comment"},[n("button",{staticClass:"btn btn-primary",attrs:{type:"button"},on:{click:e.handleGetComments}},[e._v("加载评论")])]),e.list.loaded?n("div",{staticClass:"comment-action"},[n("h3",{staticClass:"comment-title"},[e._v(e._s(e.list.total)+" 条评论")]),n("svg",{staticClass:"comment-refresh",attrs:{viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},on:{click:function(t){return e.handlePaginationChange(0)}}},[n("path",{attrs:{d:"M55.935033 264.48948c0 0 85.897017-132.548409 221.81443-203.673173 135.916406-71.121743 303.368504-50.646859 413.187968 18.319527 109.819465 68.970415 146.791894 127.160016 146.791894 127.160016l94.59499-53.879895c0 0 19.576483-9.697092 19.576483 12.932142l0 338.379961c0 0 0 30.17399-22.837719 19.395191-19.210878-9.062571-226.959086-127.198289-292.424528-164.466828-35.950145-16.035251-4.365101-29.062068-4.365101-29.062068l91.284402-52.173738c0 0-52.068992-65.209619-128.278989-99.744682-81.576231-42.501826-157.948384-47.541735-251.497925-12.224097-61.002644 23.025054-132.823368 81.988166-184.553949 169.082716L55.935033 264.48948 55.935033 264.48948 55.935033 264.48948zM904.056909 711.697844c0 0-85.897017 132.550423-221.816444 203.671159-135.917413 71.12275-303.366489 50.651895-413.186961-18.315498-109.825508-68.972429-146.790886-127.165052-146.790886-127.165052L27.662591 823.768348c0 0-19.572454 9.703135-19.572454-12.932142L8.090137 472.459267c0 0 0-30.170968 22.831676-19.397205 19.211885 9.067607 226.965129 127.198289 292.430571 164.470856 35.950145 16.035251 4.366109 29.058039 4.366109 29.058039l-91.285409 52.175753c0 0 52.071006 65.206598 128.279996 99.744682 81.57321 42.498804 157.942341 47.540728 251.496918 12.222082 60.998616-23.026061 132.820346-81.983131 184.546898-169.082716L904.056909 711.697844 904.056909 711.697844 904.056909 711.697844zM904.056909 711.697844"}})])]):e._e(),n("comment-loading",{directives:[{name:"show",rawName:"v-show",value:e.list.loading,expression:"list.loading"}],attrs:{configs:e.mergedConfigs}}),e.list.data.length>=1?n("ul",{staticClass:"comment-nodes"},[e._l(e.list.data,(function(t,r){return[n("CommentNode",{key:r,attrs:{comment:t,replyNum:e.mergedConfigs.unfoldReplyNum,configs:e.mergedConfigs,options:e.options,target:e.target,targetId:e.id}})]}))],2):e.list.loaded&&!e.list.loading?n("div",{staticClass:"comment-empty"},[e._v("暂无评论")]):e._e(),e.list.pages>1?n("pagination",{attrs:{page:e.list.params.page,size:e.list.size,total:e.list.total},on:{change:e.handlePaginationChange}}):e._e(),e.mergedConfigs.enableBulletScreen?n("bullet-screen",{attrs:{target:e.target,id:e.id,configs:e.mergedConfigs,options:e.options}}):e._e()],1)}),_=[];function S(){return{baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}let j=S();function C(e){j=e}const O=/[&<>"']/,A=/[&<>"']/g,P=/[<>"']|&(?!#?\w+;)/,E=/[<>"']|&(?!#?\w+;)/g,T={"&":"&","<":"<",">":">",'"':""","'":"'"},R=e=>T[e];function $(e,t){if(t){if(O.test(e))return e.replace(A,R)}else if(P.test(e))return e.replace(E,R);return e}const z=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function N(e){return e.replace(z,((e,t)=>(t=t.toLowerCase(),"colon"===t?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):"")))}const I=/(^|[^\[])\^/g;function M(e,t){e="string"===typeof e?e:e.source,t=t||"";const n={replace:(t,r)=>(r=r.source||r,r=r.replace(I,"$1"),e=e.replace(t,r),n),getRegex:()=>new RegExp(e,t)};return n}const D=/[^\w:]/g,U=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function q(e,t,n){if(e){let e;try{e=decodeURIComponent(N(n)).replace(D,"").toLowerCase()}catch(r){return null}if(0===e.indexOf("javascript:")||0===e.indexOf("vbscript:")||0===e.indexOf("data:"))return null}t&&!U.test(n)&&(n=V(t,n));try{n=encodeURI(n).replace(/%25/g,"%")}catch(r){return null}return n}const B={},F=/^[^:]+:\/*[^/]*$/,L=/^([^:]+:)[\s\S]*$/,H=/^([^:]+:\/*[^/]*)[\s\S]*$/;function V(e,t){B[" "+e]||(F.test(e)?B[" "+e]=e+"/":B[" "+e]=Y(e,"/",!0)),e=B[" "+e];const n=-1===e.indexOf(":");return"//"===t.substring(0,2)?n?t:e.replace(L,"$1")+t:"/"===t.charAt(0)?n?t:e.replace(H,"$1")+t:e+t}const W={exec:function(){}};function Z(e){let t,n,r=1;for(;r{let r=!1,o=t;while(--o>=0&&"\\"===n[o])r=!r;return r?"|":" |"})),r=n.split(/ \|/);let o=0;if(r[0].trim()||r.shift(),r.length>0&&!r[r.length-1].trim()&&r.pop(),r.length>t)r.splice(t);else while(r.length1)1&t&&(n+=e),t>>=1,e+=e;return n+e}function K(e,t,n,r){const o=t.href,i=t.title?$(t.title):null,a=e[1].replace(/\\([\[\]])/g,"$1");if("!"!==e[0].charAt(0)){r.state.inLink=!0;const e={type:"link",raw:n,href:o,title:i,text:a,tokens:r.inlineTokens(a,[])};return r.state.inLink=!1,e}return{type:"image",raw:n,href:o,title:i,text:$(a)}}function ee(e,t){const n=e.match(/^(\s+)(?:```)/);if(null===n)return t;const r=n[1];return t.split("\n").map((e=>{const t=e.match(/^\s+/);if(null===t)return e;const[n]=t;return n.length>=r.length?e.slice(r.length):e})).join("\n")}class te{constructor(e){this.options=e||j}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const e=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?e:Y(e,"\n")}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const e=t[0],n=ee(e,t[3]||"");return{type:"code",raw:e,lang:t[2]?t[2].trim():t[2],text:n}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(/#$/.test(e)){const t=Y(e,"#");this.options.pedantic?e=t.trim():t&&!/ $/.test(t)||(e=t.trim())}const n={type:"heading",raw:t[0],depth:t[1].length,text:e,tokens:[]};return this.lexer.inline(n.text,n.tokens),n}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:t[0]}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){const e=t[0].replace(/^ *>[ \t]?/gm,"");return{type:"blockquote",raw:t[0],tokens:this.lexer.blockTokens(e,[]),text:e}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n,r,o,i,a,s,l,c,u,p,f,d,h=t[1].trim();const m=h.length>1,g={type:"list",raw:"",ordered:m,start:m?+h.slice(0,-1):"",loose:!1,items:[]};h=m?`\\d{1,9}\\${h.slice(-1)}`:`\\${h}`,this.options.pedantic&&(h=m?h:"[*+-]");const b=new RegExp(`^( {0,3}${h})((?:[\t ][^\\n]*)?(?:\\n|$))`);while(e){if(d=!1,!(t=b.exec(e)))break;if(this.rules.block.hr.test(e))break;if(n=t[0],e=e.substring(n.length),c=t[2].split("\n",1)[0],u=e.split("\n",1)[0],this.options.pedantic?(i=2,f=c.trimLeft()):(i=t[2].search(/[^ ]/),i=i>4?1:i,f=c.slice(i),i+=t[1].length),s=!1,!c&&/^ *$/.test(u)&&(n+=u+"\n",e=e.substring(u.length+1),d=!0),!d){const t=new RegExp(`^ {0,${Math.min(3,i-1)}}(?:[*+-]|\\d{1,9}[.)])((?: [^\\n]*)?(?:\\n|$))`),r=new RegExp(`^ {0,${Math.min(3,i-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`);while(e){if(p=e.split("\n",1)[0],c=p,this.options.pedantic&&(c=c.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),t.test(c))break;if(r.test(e))break;if(c.search(/[^ ]/)>=i||!c.trim())f+="\n"+c.slice(i);else{if(s)break;f+="\n"+c}s||c.trim()||(s=!0),n+=p+"\n",e=e.substring(p.length+1)}}g.loose||(l?g.loose=!0:/\n *\n *$/.test(n)&&(l=!0)),this.options.gfm&&(r=/^\[[ xX]\] /.exec(f),r&&(o="[ ] "!==r[0],f=f.replace(/^\[[ xX]\] +/,""))),g.items.push({type:"list_item",raw:n,task:!!r,checked:o,loose:!1,text:f}),g.raw+=n}g.items[g.items.length-1].raw=n.trimRight(),g.items[g.items.length-1].text=f.trimRight(),g.raw=g.raw.trimRight();const y=g.items.length;for(a=0;a"space"===e.type)),t=e.every((e=>{const t=e.raw.split("");let n=0;for(const r of t)if("\n"===r&&(n+=1),n>1)return!0;return!1}));!g.loose&&e.length&&t&&(g.loose=!0,g.items[a].loose=!0)}return g}}html(e){const t=this.rules.block.html.exec(e);if(t){const e={type:"html",raw:t[0],pre:!this.options.sanitizer&&("pre"===t[1]||"script"===t[1]||"style"===t[1]),text:t[0]};return this.options.sanitize&&(e.type="paragraph",e.text=this.options.sanitizer?this.options.sanitizer(t[0]):$(t[0]),e.tokens=[],this.lexer.inline(e.text,e.tokens)),e}}def(e){const t=this.rules.block.def.exec(e);if(t){t[3]&&(t[3]=t[3].substring(1,t[3].length-1));const e=t[1].toLowerCase().replace(/\s+/g," ");return{type:"def",tag:e,raw:t[0],href:t[2],title:t[3]}}}table(e){const t=this.rules.block.table.exec(e);if(t){const e={type:"table",header:Q(t[1]).map((e=>({text:e}))),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:t[3]&&t[3].trim()?t[3].replace(/\n[ \t]*$/,"").split("\n"):[]};if(e.header.length===e.align.length){e.raw=t[0];let n,r,o,i,a=e.align.length;for(n=0;n({text:e})));for(a=e.header.length,r=0;r /i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(t[0]):$(t[0]):t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const e=t[2].trim();if(!this.options.pedantic&&/^$/.test(e))return;const t=Y(e.slice(0,-1),"\\");if((e.length-t.length)%2===0)return}else{const e=G(t[2],"()");if(e>-1){const n=0===t[0].indexOf("!")?5:4,r=n+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,r).trim(),t[3]=""}}let n=t[2],r="";if(this.options.pedantic){const e=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(n);e&&(n=e[1],r=e[3])}else r=t[3]?t[3].slice(1,-1):"";return n=n.trim(),/^$/.test(e)?n.slice(1):n.slice(1,-1)),K(t,{href:n?n.replace(this.rules.inline._escapes,"$1"):n,title:r?r.replace(this.rules.inline._escapes,"$1"):r},t[0],this.lexer)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let e=(n[2]||n[1]).replace(/\s+/g," ");if(e=t[e.toLowerCase()],!e||!e.href){const e=n[0].charAt(0);return{type:"text",raw:e,text:e}}return K(n,e,n[0],this.lexer)}}emStrong(e,t,n=""){let r=this.rules.inline.emStrong.lDelim.exec(e);if(!r)return;if(r[3]&&n.match(/[\p{L}\p{N}]/u))return;const o=r[1]||r[2]||"";if(!o||o&&(""===n||this.rules.inline.punctuation.exec(n))){const n=r[0].length-1;let o,i,a=n,s=0;const l="*"===r[0][0]?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;l.lastIndex=0,t=t.slice(-1*e.length+n);while(null!=(r=l.exec(t))){if(o=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!o)continue;if(i=o.length,r[3]||r[4]){a+=i;continue}if((r[5]||r[6])&&n%3&&!((n+i)%3)){s+=i;continue}if(a-=i,a>0)continue;if(i=Math.min(i,i+a+s),Math.min(n,i)%2){const t=e.slice(1,n+r.index+i);return{type:"em",raw:e.slice(0,n+r.index+i+1),text:t,tokens:this.lexer.inlineTokens(t,[])}}const t=e.slice(2,n+r.index+i-1);return{type:"strong",raw:e.slice(0,n+r.index+i+1),text:t,tokens:this.lexer.inlineTokens(t,[])}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(/\n/g," ");const n=/[^ ]/.test(e),r=/^ /.test(e)&&/ $/.test(e);return n&&r&&(e=e.substring(1,e.length-1)),e=$(e,!0),{type:"codespan",raw:t[0],text:e}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2],[])}}autolink(e,t){const n=this.rules.inline.autolink.exec(e);if(n){let e,r;return"@"===n[2]?(e=$(this.options.mangle?t(n[1]):n[1]),r="mailto:"+e):(e=$(n[1]),r=e),{type:"link",raw:n[0],text:e,href:r,tokens:[{type:"text",raw:e,text:e}]}}}url(e,t){let n;if(n=this.rules.inline.url.exec(e)){let e,r;if("@"===n[2])e=$(this.options.mangle?t(n[0]):n[0]),r="mailto:"+e;else{let t;do{t=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0]}while(t!==n[0]);e=$(n[0]),r="www."===n[1]?"http://"+e:e}return{type:"link",raw:n[0],text:e,href:r,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e,t){const n=this.rules.inline.text.exec(e);if(n){let e;return e=this.lexer.state.inRawBlock?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(n[0]):$(n[0]):n[0]:$(this.options.smartypants?t(n[0]):n[0]),{type:"text",raw:n[0],text:e}}}}const ne={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|\\n*|$)|\\n*|$)|?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?([^\s>]+)>?(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:W,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\.|[^\[\]\\])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};ne.def=M(ne.def).replace("label",ne._label).replace("title",ne._title).getRegex(),ne.bullet=/(?:[*+-]|\d{1,9}[.)])/,ne.listItemStart=M(/^( *)(bull) */).replace("bull",ne.bullet).getRegex(),ne.list=M(ne.list).replace(/bull/g,ne.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+ne.def.source+")").getRegex(),ne._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",ne._comment=/|$)/,ne.html=M(ne.html,"i").replace("comment",ne._comment).replace("tag",ne._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ne.paragraph=M(ne._paragraph).replace("hr",ne.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ne._tag).getRegex(),ne.blockquote=M(ne.blockquote).replace("paragraph",ne.paragraph).getRegex(),ne.normal=Z({},ne),ne.gfm=Z({},ne.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),ne.gfm.table=M(ne.gfm.table).replace("hr",ne.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ne._tag).getRegex(),ne.gfm.paragraph=M(ne._paragraph).replace("hr",ne.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",ne.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ne._tag).getRegex(),ne.pedantic=Z({},ne.normal,{html:M("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?\\1> *(?:\\n{2,}|\\s*$)| \\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",ne._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:W,paragraph:M(ne.normal._paragraph).replace("hr",ne.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",ne.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});const re={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:W,tag:"^comment|^[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^[^_*]*?\_\_[^_*]*?\*[^_*]*?(?=\_\_)|[^*]+(?=[^*])|[punct_](\*+)(?=[\s]|$)|[^punct*_\s](\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|[^punct*_\s](\*+)(?=[^punct*_\s])/,rDelimUnd:/^[^_*]*?\*\*[^_*]*?\_[^_*]*?(?=\*\*)|[^_]+(?=[^_])|[punct*](\_+)(?=[\s]|$)|[^punct*_\s](\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:W,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\.5&&(n="x"+n.toString(16)),r+=""+n+";";return r}re._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",re.punctuation=M(re.punctuation).replace(/punctuation/g,re._punctuation).getRegex(),re.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,re.escapedEmSt=/\\\*|\\_/g,re._comment=M(ne._comment).replace("(?:--\x3e|$)","--\x3e").getRegex(),re.emStrong.lDelim=M(re.emStrong.lDelim).replace(/punct/g,re._punctuation).getRegex(),re.emStrong.rDelimAst=M(re.emStrong.rDelimAst,"g").replace(/punct/g,re._punctuation).getRegex(),re.emStrong.rDelimUnd=M(re.emStrong.rDelimUnd,"g").replace(/punct/g,re._punctuation).getRegex(),re._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,re._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,re._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,re.autolink=M(re.autolink).replace("scheme",re._scheme).replace("email",re._email).getRegex(),re._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,re.tag=M(re.tag).replace("comment",re._comment).replace("attribute",re._attribute).getRegex(),re._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,re._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,re._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,re.link=M(re.link).replace("label",re._label).replace("href",re._href).replace("title",re._title).getRegex(),re.reflink=M(re.reflink).replace("label",re._label).replace("ref",ne._label).getRegex(),re.nolink=M(re.nolink).replace("ref",ne._label).getRegex(),re.reflinkSearch=M(re.reflinkSearch,"g").replace("reflink",re.reflink).replace("nolink",re.nolink).getRegex(),re.normal=Z({},re),re.pedantic=Z({},re.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:M(/^!?\[(label)\]\((.*?)\)/).replace("label",re._label).getRegex(),reflink:M(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",re._label).getRegex()}),re.gfm=Z({},re.normal,{escape:M(re.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\t+" ".repeat(n.length)));while(e)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some((r=>!!(n=r.call({lexer:this},e,t))&&(e=e.substring(n.raw.length),t.push(n),!0)))))if(n=this.tokenizer.space(e))e=e.substring(n.raw.length),1===n.raw.length&&t.length>0?t[t.length-1].raw+="\n":t.push(n);else if(n=this.tokenizer.code(e))e=e.substring(n.raw.length),r=t[t.length-1],!r||"paragraph"!==r.type&&"text"!==r.type?t.push(n):(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue[this.inlineQueue.length-1].src=r.text);else if(n=this.tokenizer.fences(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.heading(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.hr(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.blockquote(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.list(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.html(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.def(e))e=e.substring(n.raw.length),r=t[t.length-1],!r||"paragraph"!==r.type&&"text"!==r.type?this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title}):(r.raw+="\n"+n.raw,r.text+="\n"+n.raw,this.inlineQueue[this.inlineQueue.length-1].src=r.text);else if(n=this.tokenizer.table(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.lheading(e))e=e.substring(n.raw.length),t.push(n);else{if(o=e,this.options.extensions&&this.options.extensions.startBlock){let t=1/0;const n=e.slice(1);let r;this.options.extensions.startBlock.forEach((function(e){r=e.call({lexer:this},n),"number"===typeof r&&r>=0&&(t=Math.min(t,r))})),t<1/0&&t>=0&&(o=e.substring(0,t+1))}if(this.state.top&&(n=this.tokenizer.paragraph(o)))r=t[t.length-1],i&&"paragraph"===r.type?(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):t.push(n),i=o.length!==e.length,e=e.substring(n.raw.length);else if(n=this.tokenizer.text(e))e=e.substring(n.raw.length),r=t[t.length-1],r&&"text"===r.type?(r.raw+="\n"+n.raw,r.text+="\n"+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=r.text):t.push(n);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}return this.state.top=!0,t}inline(e,t){this.inlineQueue.push({src:e,tokens:t})}inlineTokens(e,t=[]){let n,r,o,i,a,s,l=e;if(this.tokens.links){const e=Object.keys(this.tokens.links);if(e.length>0)while(null!=(i=this.tokenizer.rules.inline.reflinkSearch.exec(l)))e.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(l=l.slice(0,i.index)+"["+X("a",i[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}while(null!=(i=this.tokenizer.rules.inline.blockSkip.exec(l)))l=l.slice(0,i.index)+"["+X("a",i[0].length-2)+"]"+l.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);while(null!=(i=this.tokenizer.rules.inline.escapedEmSt.exec(l)))l=l.slice(0,i.index)+"++"+l.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);while(e)if(a||(s=""),a=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some((r=>!!(n=r.call({lexer:this},e,t))&&(e=e.substring(n.raw.length),t.push(n),!0)))))if(n=this.tokenizer.escape(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.tag(e))e=e.substring(n.raw.length),r=t[t.length-1],r&&"text"===n.type&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);else if(n=this.tokenizer.link(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(n.raw.length),r=t[t.length-1],r&&"text"===n.type&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);else if(n=this.tokenizer.emStrong(e,l,s))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.codespan(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.br(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.del(e))e=e.substring(n.raw.length),t.push(n);else if(n=this.tokenizer.autolink(e,ie))e=e.substring(n.raw.length),t.push(n);else if(this.state.inLink||!(n=this.tokenizer.url(e,ie))){if(o=e,this.options.extensions&&this.options.extensions.startInline){let t=1/0;const n=e.slice(1);let r;this.options.extensions.startInline.forEach((function(e){r=e.call({lexer:this},n),"number"===typeof r&&r>=0&&(t=Math.min(t,r))})),t<1/0&&t>=0&&(o=e.substring(0,t+1))}if(n=this.tokenizer.inlineText(o,oe))e=e.substring(n.raw.length),"_"!==n.raw.slice(-1)&&(s=n.raw.slice(-1)),a=!0,r=t[t.length-1],r&&"text"===r.type?(r.raw+=n.raw,r.text+=n.text):t.push(n);else if(e){const t="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw new Error(t)}}else e=e.substring(n.raw.length),t.push(n);return t}}class se{constructor(e){this.options=e||j}code(e,t,n){const r=(t||"").match(/\S*/)[0];if(this.options.highlight){const t=this.options.highlight(e,r);null!=t&&t!==e&&(n=!0,e=t)}return e=e.replace(/\n$/,"")+"\n",r?''+(n?e:$(e,!0))+"
\n":""+(n?e:$(e,!0))+"
\n"}blockquote(e){return`\n${e} \n`}html(e){return e}heading(e,t,n,r){if(this.options.headerIds){const o=this.options.headerPrefix+r.slug(n);return`${e} \n`}return`${e} \n`}hr(){return this.options.xhtml?" \n":" \n"}list(e,t,n){const r=t?"ol":"ul",o=t&&1!==n?' start="'+n+'"':"";return"<"+r+o+">\n"+e+""+r+">\n"}listitem(e){return`${e} \n`}checkbox(e){return" "}paragraph(e){return`${e}
\n`}table(e,t){return t&&(t=`${t} `)," \n"}tablerow(e){return`\n${e} \n`}tablecell(e,t){const n=t.header?"th":"td",r=t.align?`<${n} align="${t.align}">`:`<${n}>`;return r+e+`${n}>\n`}strong(e){return`${e} `}em(e){return`${e} `}codespan(e){return`${e}
`}br(){return this.options.xhtml?" ":" "}del(e){return`${e}`}link(e,t,n){if(e=q(this.options.sanitize,this.options.baseUrl,e),null===e)return n;let r='"+n+" ",r}image(e,t,n){if(e=q(this.options.sanitize,this.options.baseUrl,e),null===e)return n;let r=` ":">",r}text(e){return e}}class le{strong(e){return e}em(e){return e}codespan(e){return e}del(e){return e}html(e){return e}text(e){return e}link(e,t,n){return""+n}image(e,t,n){return""+n}br(){return""}}class ce{constructor(){this.seen={}}serialize(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")}getNextSafeSlug(e,t){let n=e,r=0;if(this.seen.hasOwnProperty(n)){r=this.seen[e];do{r++,n=e+"-"+r}while(this.seen.hasOwnProperty(n))}return t||(this.seen[e]=r,this.seen[n]=0),n}slug(e,t={}){const n=this.serialize(e);return this.getNextSafeSlug(n,t.dryrun)}}class ue{constructor(e){this.options=e||j,this.options.renderer=this.options.renderer||new se,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new le,this.slugger=new ce}static parse(e,t){const n=new ue(t);return n.parse(e)}static parseInline(e,t){const n=new ue(t);return n.parseInline(e)}parse(e,t=!0){let n,r,o,i,a,s,l,c,u,p,f,d,h,m,g,b,y,w,v,x="";const k=e.length;for(n=0;n0&&"paragraph"===g.tokens[0].type?(g.tokens[0].text=w+" "+g.tokens[0].text,g.tokens[0].tokens&&g.tokens[0].tokens.length>0&&"text"===g.tokens[0].tokens[0].type&&(g.tokens[0].tokens[0].text=w+" "+g.tokens[0].tokens[0].text)):g.tokens.unshift({type:"text",text:w}):m+=w),m+=this.parse(g.tokens,h),u+=this.renderer.listitem(m,y,b);x+=this.renderer.list(u,f,d);continue;case"html":x+=this.renderer.html(p.text);continue;case"paragraph":x+=this.renderer.paragraph(this.parseInline(p.tokens));continue;case"text":u=p.tokens?this.parseInline(p.tokens):p.text;while(n+1{o(e.text,e.lang,(function(t,n){if(t)return a(t);null!=n&&n!==e.text&&(e.text=n,e.escaped=!0),s--,0===s&&a()}))}),0))})),void(0===s&&a())}try{const n=ae.lex(e,t);return t.walkTokens&&pe.walkTokens(n,t.walkTokens),ue.parse(n,t)}catch(r){if(r.message+="\nPlease report this to https://github.com/markedjs/marked.",t.silent)return"An error occurred:
"+$(r.message+"",!0)+" ";throw r}}pe.options=pe.setOptions=function(e){return Z(pe.defaults,e),C(pe.defaults),pe},pe.getDefaults=S,pe.defaults=j,pe.use=function(...e){const t=Z({},...e),n=pe.defaults.extensions||{renderers:{},childTokens:{}};let r;e.forEach((e=>{if(e.extensions&&(r=!0,e.extensions.forEach((e=>{if(!e.name)throw new Error("extension name required");if(e.renderer){const t=n.renderers?n.renderers[e.name]:null;n.renderers[e.name]=t?function(...n){let r=e.renderer.apply(this,n);return!1===r&&(r=t.apply(this,n)),r}:e.renderer}if(e.tokenizer){if(!e.level||"block"!==e.level&&"inline"!==e.level)throw new Error("extension level must be 'block' or 'inline'");n[e.level]?n[e.level].unshift(e.tokenizer):n[e.level]=[e.tokenizer],e.start&&("block"===e.level?n.startBlock?n.startBlock.push(e.start):n.startBlock=[e.start]:"inline"===e.level&&(n.startInline?n.startInline.push(e.start):n.startInline=[e.start]))}e.childTokens&&(n.childTokens[e.name]=e.childTokens)}))),e.renderer){const n=pe.defaults.renderer||new se;for(const t in e.renderer){const r=n[t];n[t]=(...o)=>{let i=e.renderer[t].apply(n,o);return!1===i&&(i=r.apply(n,o)),i}}t.renderer=n}if(e.tokenizer){const n=pe.defaults.tokenizer||new te;for(const t in e.tokenizer){const r=n[t];n[t]=(...o)=>{let i=e.tokenizer[t].apply(n,o);return!1===i&&(i=r.apply(n,o)),i}}t.tokenizer=n}if(e.walkTokens){const n=pe.defaults.walkTokens;t.walkTokens=function(t){e.walkTokens.call(this,t),n&&n.call(this,t)}}r&&(t.extensions=n),pe.setOptions(t)}))},pe.walkTokens=function(e,t){for(const n of e)switch(t.call(pe,n),n.type){case"table":for(const e of n.header)pe.walkTokens(e.tokens,t);for(const e of n.rows)for(const n of e)pe.walkTokens(n.tokens,t);break;case"list":pe.walkTokens(n.items,t);break;default:pe.defaults.extensions&&pe.defaults.extensions.childTokens&&pe.defaults.extensions.childTokens[n.type]?pe.defaults.extensions.childTokens[n.type].forEach((function(e){pe.walkTokens(n[e],t)})):n.tokens&&pe.walkTokens(n.tokens,t)}},pe.parseInline=function(e,t){if("undefined"===typeof e||null===e)throw new Error("marked.parseInline(): input parameter is undefined or null");if("string"!==typeof e)throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected");t=Z({},pe.defaults,t||{}),J(t);try{const n=ae.lexInline(e,t);return t.walkTokens&&pe.walkTokens(n,t.walkTokens),ue.parseInline(n,t)}catch(n){if(n.message+="\nPlease report this to https://github.com/markedjs/marked.",t.silent)return"An error occurred:
"+$(n.message+"",!0)+" ";throw n}},pe.Parser=ue,pe.parser=ue.parse,pe.Renderer=se,pe.TextRenderer=le,pe.Lexer=ae,pe.lexer=ae.lex,pe.Tokenizer=te,pe.Slugger=ce,pe.parse=pe;pe.options,pe.setOptions,pe.use,pe.walkTokens,pe.parseInline,ue.parse,ae.lex;var fe=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("section",{staticClass:"comment-editor",attrs:{role:"form"}},[n("div",{staticClass:"avatar-body"},[n("avatar",{staticStyle:{cursor:"pointer"},attrs:{src:e.avatar,configs:e.configs,title:"点击头像试试"},on:{click:e.randomAuthor}})],1),n("form",{staticClass:"comment-form"},[n("div",{staticClass:"author-info"},[n("input",{directives:[{name:"model",rawName:"v-model",value:e.comment.author,expression:"comment.author"}],attrs:{id:"author","aria-required":"true",placeholder:e.configs.getQQInfo?"* 昵称(输入QQ自动获取)":"* 昵称",required:"required",type:"text"},domProps:{value:e.comment.author},on:{blur:function(t){e.configs.getQQInfo&&e.handleQQInfo()},input:function(t){t.target.composing||e.$set(e.comment,"author",t.target.value)}}}),n("input",{directives:[{name:"model",rawName:"v-model",value:e.comment.email,expression:"comment.email"}],class:!this.comment.email||e.isEmail()?"":"error",attrs:{id:"email",placeholder:"邮箱",type:"text"},domProps:{value:e.comment.email},on:{input:function(t){t.target.composing||e.$set(e.comment,"email",t.target.value)}}}),n("input",{directives:[{name:"model",rawName:"v-model",value:e.comment.authorUrl,expression:"comment.authorUrl"}],attrs:{id:"authorUrl",placeholder:"网址",type:"text"},domProps:{value:e.comment.authorUrl},on:{input:function(t){t.target.composing||e.$set(e.comment,"authorUrl",t.target.value)}}})]),n("div",{directives:[{name:"show",rawName:"v-show",value:!e.previewMode,expression:"!previewMode"}],staticClass:"comment-textarea"},[n("textarea",{directives:[{name:"model",rawName:"v-model",value:e.comment.content,expression:"comment.content"}],ref:"commentTextarea",class:!e.comment.content||e.comment.content.length<1023?"":"error",attrs:{placeholder:e.options.comment_content_placeholder||"撰写评论...","aria-required":"true",required:"required"},domProps:{value:e.comment.content},on:{input:function(t){t.target.composing||e.$set(e.comment,"content",t.target.value)}}}),n("span",{staticClass:"edit-picker"},[n("span",{staticClass:"edit-btn",class:e.emojiDialogVisible?"edit-open":"",on:{click:e.handleToggleDialogEmoji}},[n("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"18",height:"18"}},[e._v(" > "),n("path",{attrs:{d:"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm0-2a8 8 0 1 0 0-16 8 8 0 0 0 0 16zm-5-7h2a3 3 0 0 0 6 0h2a5 5 0 0 1-10 0zm1-2a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3zm8 0a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3z"}})])]),e.configs.enableImageUpload?n("span",{staticClass:"edit-btn",class:e.imageDialogVisible?"edit-open":"",on:{click:e.handleImageUpload}},[n("svg",{attrs:{viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18"}},[n("path",{attrs:{d:"M896 128a64 64 0 0 1 64 64v640a64 64 0 0 1-64 64H128a64 64 0 0 1-64-64V192a64 64 0 0 1 64-64h768zM288 409.6L128 569.536V832h768v-83.2l-204.8-204.8-134.4 134.4-268.8-268.8zM896 192H128v288L288 320l268.8 268.8 134.4-134.4 204.8 204.8V192z"}}),n("path",{attrs:{d:"M774.08 356.736a44.8 44.8 0 1 0 0-89.6 44.8 44.8 0 0 0 0 89.6z"}})])]):e._e(),n("transition",{attrs:{name:"emoji-fade"}},[n("keep-alive",[e.emojiDialogVisible?n("EmojiPicker",{attrs:{pack:e.emojiPack},on:{select:e.handleSelectEmoji}}):e._e()],1)],1)],1)]),e.previewMode?n("div",{staticClass:"comment-preview markdown-content",domProps:{innerHTML:e._s(e.renderedContent)}}):e._e(),n("ul",[this.replyComment?n("li",[n("button",{staticClass:"btn",attrs:{type:"button"},on:{click:function(t){e.globalData.replyId=0}}},[e._v("取消")])]):e._e(),e.comment.content?n("li",[n("button",{staticClass:"btn",attrs:{type:"button"},on:{click:function(t){e.previewMode=!e.previewMode}}},[e._v(" "+e._s(e.previewMode?"编辑":"预览")+" ")])]):e._e(),n("li",[n("button",{staticClass:"btn btn-primary",attrs:{type:"button"},on:{click:e.handleSubmitClick}},[e._v("提交")])])]),n("div",{staticClass:"comment-alert"},[e.infoAlertVisible?e._l(e.infoes,(function(t,r){return n("div",{key:r,staticClass:"alert info"},[n("span",{staticClass:"closebtn",on:{click:e.clearAlertClose}},[e._v("×")]),n("strong",[e._v(e._s(t))])])})):e._e(),e.successAlertVisible?e._l(e.successes,(function(t,r){return n("div",{key:r,staticClass:"alert success"},[n("span",{staticClass:"closebtn",on:{click:e.clearAlertClose}},[e._v("×")]),n("strong",[e._v(e._s(t))])])})):e._e(),e.warningAlertVisible?e._l(e.warnings,(function(t,r){return n("div",{key:r,staticClass:"alert warning"},[n("span",{staticClass:"closebtn",on:{click:e.clearAlertClose}},[e._v("×")]),n("strong",[e._v(e._s(t))])])})):e._e()],2)])])},de=[],he=n(2568),me=n.n(he);n(6699);function ge(e){const t=(new Date).getTime(),n=t-e,r=Math.floor(n/864e5);if(0===r){const e=n%864e5,t=Math.floor(e/36e5);if(0===t){const t=e%36e5,n=Math.floor(t/6e4);if(0===n){const e=t%6e4,n=Math.round(e/1e3);return n+" 秒前"}return n+" 分钟前"}return t+" 小时前"}return r<0?"刚刚":r<=7?r+" 天前":be(e,"yyyy/MM/dd hh:mm")}function be(e,t){e=new Date(e),/(y+)/.test(t)&&(t=t.replace(RegExp.$1,(e.getFullYear()+"").substr(4-RegExp.$1.length)));let n={"M+":e.getMonth()+1,"d+":e.getDate(),"h+":e.getHours(),"m+":e.getMinutes(),"s+":e.getSeconds()};for(let r in n)if(new RegExp(`(${r})`).test(t)){let e=n[r]+"";t=t.replace(RegExp.$1,1===RegExp.$1.length?e:ye(e))}return t}function ye(e){return("00"+e).substr(e.length)}function we(e){return null===e||void 0===e||""===e}function ve(e){return e&&"object"===typeof e&&e.constructor===Object}function xe(e){const t=/^[A-Za-z0-9]+([-_.][A-Za-z0-9]+)*@([A-Za-z0-9]+[-.])+[A-Za-z]{2,8}$/;return t.test(e)}function ke(e){var t=/^[1-9][0-9]{4,9}$/gim;return t.test(e)}function _e(e,t,n,r){let o,i=e.getBoundingClientRect(),a=window.scrollY,s=a+i.top-n,l=(s-a)/t,c=a>s?-1:1;function u(){a+=l,a*c ");let n=document.createElement("div");n.innerHTML=e;const r=n.innerText||n.textContent;return n=null,r}function je(e,t){return t?e:e.replace(/[<&"]/g,(function(e){return{"<":"<","&":"&",'"':"""}[e]}))}function Ce(e){return e.replace(/<\/*([^/\s>]+)[^>]*>/g,(function(e,t){return["img","ul","ol","span","div","h1","h2","h3","h4","h5","h6","input","code"].includes(t)?"":["hr","br","p","li","a","blockquote"].includes(t)?" ":e}))}function Oe(e=0,t=1){return Math.random()*(t-e)+e}function Ae(){let e=["追梦","放风筝","打酱油","耍帅","卖萌","发嗲","发呆","傻笑","打盹","可爱","善良","邪恶","笨笨","聪明","美丽","智慧","温柔","调皮","动人","活泼","任性","苗条","纯洁","娇小","体贴","贪嘴","朴实","机灵","机智","搞笑"],t=["法师","猛男","少女","勇士","帅哥","英雄","老者","小矮人","天才","旺财","小熊","少年","驴","猪","恶龙","天使","恶魔","仙女","哥布林","企鹅","小提莫","爵士","骑士","国王","公主","王子","太监","猪儿虫","猫猫","上仙"];return`${e[Math.floor(Math.random()*e.length)]}的${t[Math.floor(Math.random()*t.length)]}`}var Pe=n(3977);const Ee=new Pe.HaloRestAPIClient({baseUrl:""}),Te=new Pe.ContentApiClient(Ee);var Re=Te,$e=n(9367),ze=n.n($e);const Ne={replyId:0};var Ie=Ne,Me=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("EmojiList",{attrs:{data:e.pack},on:{select:e.onSelectEmoji}})},De=[],Ue=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"emoji-container"},e._l(e.data,(function(t,r){return n("DreamEmoji",{key:r,attrs:{data:t},nativeOn:{click:function(n){return e.onSelect(t)}}})})),1)},qe=[],Be=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("span",{staticClass:"emoji-item",attrs:{title:e.data.name}},[n("img",{attrs:{alt:e.data.name,src:e.dreamSrc,onerror:"this.src='data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=='"}})])},Fe=[],Le={name:"DreamEmoji",props:{data:{type:Object},url:{type:String,required:!1,default:"https://unpkg.com/halo-comment-dream@1.0.7/dist/assets/emoji/"}},computed:{dreamSrc(){return this.url+this.data.fileName+".png"}}},He=Le;function Ve(e,t,n,r,o,i,a,s){var l,c="function"===typeof e?e.options:e;if(t&&(c.render=t,c.staticRenderFns=n,c._compiled=!0),r&&(c.functional=!0),i&&(c._scopeId="data-v-"+i),a?(l=function(e){e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,e||"undefined"===typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),o&&o.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(a)},c._ssrRegister=l):o&&(l=s?function(){o.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:o),l)if(c.functional){c._injectStyles=l;var u=c.render;c.render=function(e,t){return l.call(t),u(e,t)}}else{var p=c.beforeCreate;c.beforeCreate=p?[].concat(p,l):[l]}return{exports:e,options:c}}var We=Ve(He,Be,Fe,!1,null,null,null,!0),Ze=We.exports,Qe={name:"EmojiList",components:{DreamEmoji:Ze},props:{data:{type:Object}},methods:{onSelect(e){this.$emit("select",e)}},watch:{data(){this.$refs["container-emoji"].scrollTop=0}}},Ye=Qe;function Ge(e){var t=n(949);t.__inject__&&t.__inject__(e)}var Je=Ve(Ye,Ue,qe,!1,Ge,null,null,!0),Xe=Je.exports,Ke={name:"EmojiPicker",props:{pack:{type:Array,required:!0}},components:{EmojiList:Xe},data:()=>({mapEmojis:{}}),methods:{onSelectEmoji(e){this.$emit("select",e)}}},et=Ke,tt=Ve(et,Me,De,!1,null,null,null,!0),nt=tt.exports,rt=n(3483);function ot(e){const t=n(3483).Z;for(let n of t){let t=n.name,r=` `;e=e.replace(new RegExp(`\\[/${t}\\]`,"gm"),r)}return e}var it=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("img",{staticClass:"avatar",attrs:{alt:e.author?e.author+"'s avatar":"avatar",src:e.configs.avatarLoading},on:{click:e.click,load:e.handleAvatarLoading,error:e.handleAvatarError}})},at=[],st={name:"Avatar",props:{src:{type:String,required:!0},author:{type:String,required:!1},configs:{type:Object,required:!0}},methods:{handleAvatarLoading(e){const t=e.target||e.srcElement;t.finish||(t.finish=!0,t.src=this.src)},handleAvatarError(e){const t=e.target||e.srcElement;t.onerror=null,t.finish=!0,t.src=this.configs.defaultAvatar},click(){this.$emit("click")}}},lt=st,ct=Ve(lt,it,at,!1,null,null,null,!0),ut=ct.exports,pt={name:"CommentEditor",components:{Avatar:ut,EmojiPicker:nt},props:{targetId:{type:Number,required:!1,default:0},target:{type:String,required:!1,default:"posts",validator:function(e){return-1!==["posts","sheets","journals"].indexOf(e)}},replyComment:{type:Object,required:!1,default:()=>{}},options:{required:!1,default:[]},configs:{type:Object,required:!0}},data(){return{emojiPack:rt.Z,emojiDialogVisible:!1,imageDialogVisible:!1,comment:{author:null,authorUrl:null,email:null,content:""},previewMode:!1,globalData:Ie,infoes:[],warnings:[],successes:[]}},computed:{renderedContent(){return this.comment.content?pe.parse(ot(je(this.comment.content,this.configs.commentHtml))):""},avatar(){const e=this.options.comment_gravatar_default,t=this.options.gravatar_source||"//cn.gravatar.com/avatar/";if(!this.comment.email||!xe(this.comment.email))return`${t}?d=${e}`;const n=me()(this.comment.email);return`${t}${n}?s=256&d=${e}`},infoAlertVisible(){return null!==this.infoes&&this.infoes.length>0},warningAlertVisible(){return null!==this.warnings&&this.warnings.length>0},successAlertVisible(){return null!==this.successes&&this.successes.length>0}},created(){const e=localStorage.getItem("comment-author"),t=localStorage.getItem("comment-authorUrl"),n=localStorage.getItem("comment-email");this.comment.author=e||"",this.comment.authorUrl=t||"",this.comment.email=n||""},activated(){ze()(this.$el.querySelector("textarea"))},methods:{randomAuthor(){this.comment.author=Ae()},isEmail(){return xe(this.comment.email)},handleQQInfo(){ke(this.comment.author)&&fetch("https://api.coor.top/qqinfo/?qq="+this.comment.author).then((e=>e.json())).then((e=>{this.comment.author=e.nickname,this.comment.email=e.email}))},handleSubmitClick(){we(this.comment.author)?this.warnings.push("评论者昵称不能为空"):we(this.comment.content)?this.warnings.push("评论内容不能为空"):(this.comment.postId=this.targetId,this.replyComment&&(this.comment.parentId=this.replyComment.id),Re.comment.create(this.target,this.comment).then((e=>{localStorage.setItem("comment-author",this.comment.author),localStorage.setItem("comment-email",this.comment.email),localStorage.setItem("comment-authorUrl",this.comment.authorUrl),this.comment.content="",this.handleCommentCreated(e.data)})).catch((e=>{this.handleFailedToCreateComment(e)})))},handleCommentCreated(e){this.clearAlertClose(),"PUBLISHED"===e.status?this.successes.push("评论成功,刷新即可显示最新评论!"):this.infoes.push("您的评论已经投递至博主,等待博主审核!")},handleFailedToCreateComment(e){if(this.clearAlertClose(),400===e.status){if(this.warnings.push(e.data.message),e.data){const t=e.data.data;ve(t)&&Object.keys(t).forEach((e=>{this.warnings.push(t[e])}))}}else 401===e.status&&this.warnings.push("评论失败,博主关闭了评论功能!")},handleToggleDialogEmoji(){this.emojiDialogVisible=!this.emojiDialogVisible},handleImageUpload(){if(this.imageDialogVisible)return;const e=document.createElement("input");e.setAttribute("type","file"),e.style.display="none",e.accept="image/*",e.addEventListener("change",(()=>{const t=e.files[0];if(!t)return;this.imageDialogVisible=!0,this.infoes.push("图片上传中,请稍后……");const n=new FormData;n.append("image",t),fetch("https://pic.jitudisk.com/api/upload",{method:"POST",body:n,headers:{token:this.configs.imageToken}}).then((e=>e.json())).then((e=>{if(200!==e.code)return this.clearAlertClose(),void this.warnings.push(`图片上传失败:${e.msg}`);const t=e.data;this.comment.content+=`\n![${t.name}](${t.url})\n`,this.clearAlertClose(),this.successes.push("图片上传成功!")})).catch((e=>{this.clearAlertClose(),this.warnings.push(`图片上传失败:${e}`)})).finally((()=>this.imageDialogVisible=!1))})),e.click()},handleSelectEmoji(e){this.comment.content+=`[/${e.name}]`},clearAlertClose(){this.infoes=[],this.warnings=[],this.successes=[]}}},ft=pt,dt=Ve(ft,fe,de,!1,null,null,null,!0),ht=dt.exports,mt=function(){var e=this,t=e.$createElement,n=e._self._c||t;return e.comment.no<=e.replyNum?n("li",{staticClass:"comment",class:e.commentClass,attrs:{id:"li-comment-"+e.comment.id,itemprop:"comment",itemtype:"https://schema.org/Comment"}},[n("div",{ref:"comment-"+e.comment.id,staticClass:"comment-body",attrs:{id:"comment-"+e.comment.id}},[n("div",{staticClass:"avatar-body"},[e.comment.authorUrl&&""!==e.comment.authorUrl?n("a",{attrs:{href:e.comment.authorUrl,rel:"nofollow",target:"_blank"}},[n("avatar",{attrs:{src:e.avatar,author:e.comment.author,configs:e.configs}})],1):n("avatar",{attrs:{src:e.avatar,author:e.comment.author,configs:e.configs}})],1),n("div",{staticClass:"comment-main"},[n("div",{staticClass:"comment-meta"},[n("div",{staticClass:"comment-author",attrs:{itemprop:"author"}},[n("div",{staticClass:"author-meta"},[e.comment.authorUrl&&""!==e.comment.authorUrl?n("a",{staticClass:"author-name",attrs:{href:e.comment.authorUrl,rel:"noopener noreferrer nofollow",target:"_blank"}},[e._v(e._s(e.comment.author))]):n("a",{staticClass:"author-name"},[e._v(e._s(e.comment.author))]),e.comment.isAdmin?n("span",{staticClass:"is-admin"},[e._v("博主")]):e._e()]),n("span",{staticClass:"btn btn-primary comment-reply",on:{click:e.handleCreateComment}},[e._v(e._s(e.globalData.replyId===e.comment.id?"取消回复":"回复"))])]),n("div",{staticClass:"comment-info"},[n("time",{staticClass:"comment-time",attrs:{datetime:e.comment.createTime,itemprop:"datePublished"}},[e._v(e._s(e.createTimeAgo))]),e.configs.showUserAgent?n("div",{staticClass:"useragent-info"},[e._v(" "+e._s(e.compileUserAgent)+" ")]):e._e()])]),n("div",{staticClass:"markdown-body",attrs:{itemprop:"description"}},[e.parent?n("span",{staticClass:"comment-reference",on:{click:e.handleToCommentRef,mouseenter:e.handleHighlightParent,mouseleave:function(t){return e.handleHighlightParent(!1)}}},[n("a",{attrs:{href:"#comment-"+this.parent.id}},[e._v("@"+e._s(this.parent.author))])]):e._e(),n("span",{staticClass:"markdown-content",domProps:{innerHTML:e._s(e.compileContent)}})])])]),n("keep-alive",[e.globalData.replyId===e.comment.id?n("comment-editor",{attrs:{configs:e.configs,options:e.options,replyComment:e.comment,target:e.target,targetId:e.targetId}}):e._e()],1),e.comment.children?n("ul",{staticClass:"children-nodes"},[e._l(e.comment.children,(function(t,r){return[n("CommentNode",{key:r,attrs:{comment:t,configs:e.configs,replyNum:e.replyNum,isChild:!0,options:e.options,parent:t.parent,target:e.target,targetId:e.targetId}})]}))],2):e._e(),!e.isChild&&e.replyNum{}},replyNum:{type:Number,required:!0,default:10},options:{type:Object,required:!1,default:()=>{}},configs:{type:Object,required:!0}},data(){return{globalData:Ie}},computed:{avatar(){if(!this.configs.priorityQQAvatar&&this.comment.avatar)return this.comment.avatar;const e=this.options.comment_gravatar_default,t=this.options.gravatar_source||"//cn.gravatar.com/avatar/";return`${t}${this.comment.gravatarMd5}?s=256&d=${e}`},compileContent(){return pe.parse(ot(Se(this.comment.content,this.configs.commentHtml)))},createTimeAgo(){return ge(this.comment.createTime)},compileUserAgent(){const e=new(yt());e.setUA(this.comment.userAgent);const t=e.getResult();return`(${t.browser.name} ${t.browser.version} in ${t.os.name} ${t.os.version})`},commentClass(){let e=this.isChild?" ":" index-1";return" li-comment-"+this.comment.id+e}},methods:{handleToCommentRef(){const e=document.getElementById(this.targetId+"").shadowRoot;if(!e)return;const t=e.getElementById(`comment-${this.parent.id}`);t.classList.add("comment-active"),_e(t,20,(window.innerHeight||document.documentElement.clientHeight)/4,(()=>setTimeout((()=>t.classList.remove("comment-active")),500)))},handleCreateComment(){this.globalData.replyId===this.comment.id?this.globalData.replyId=0:(this.globalData.replyId=this.comment.id,this.$nextTick((()=>{const e=this.$el.querySelector(".comment-editor"),t=e.getBoundingClientRect(),n=window.innerHeight||document.documentElement.clientHeight;(t.top<0||t.bottom>n)&&_e(e,20,n/2)})))},handleHighlightParent(e){const t=document.getElementById(this.targetId+"").shadowRoot;if(!t)return;const n=t.getElementById(`comment-${this.parent.id}`);if(n){const t=n.classList;e?t.add("comment-ref"):t.remove("comment-ref")}}}},vt=wt,xt=Ve(vt,mt,gt,!1,null,null,null,!0),kt=xt.exports,_t=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"comment-loader-container"},["default"===e.configs.loadingStyle?n("div",{staticClass:"comment-loader-default"},[n("span"),n("span"),n("span"),n("span")]):"circle"===e.configs.loadingStyle?n("div",{staticClass:"comment-loader-circle"}):"balls"===e.configs.loadingStyle?n("div",{staticClass:"comment-loader-balls"},[n("div"),n("div"),n("div")]):e._e()])},St=[],jt={name:"CommentLoading",props:{configs:{type:Object,required:!0}}},Ct=jt;function Ot(e){var t=n(2062);t.__inject__&&t.__inject__(e)}var At=Ve(Ct,_t,St,!1,Ot,null,null,!0),Pt=At.exports,Et=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"comment-page"},[n("ul",{staticClass:"page"},[n("li",{staticClass:"page-item"},[n("button",{staticClass:"prev-button",class:{disabled:!e.hasPrev},on:{click:e.handlePrevClick}},[e._v("上一页")])]),null!=e.firstPage?n("li",{staticClass:"page-item",class:{active:e.page===e.firstPage}},[n("button",{class:{active:e.page===e.firstPage},on:{click:function(t){return e.handlePageItemClick(e.firstPage)}}},[e._v(" "+e._s(e.firstPage+1)+" ")])]):e._e(),n("li",{directives:[{name:"show",rawName:"v-show",value:e.hasMorePrev,expression:"hasMorePrev"}],staticClass:"page-item"},[n("span",[e._v("...")])]),e._l(e.middlePages,(function(t){return n("li",{key:t,staticClass:"page-item",class:{active:t===e.page}},[n("button",{class:{active:t===e.page},on:{click:function(n){return e.handlePageItemClick(t)}}},[e._v(" "+e._s(t+1)+" ")])])})),n("li",{directives:[{name:"show",rawName:"v-show",value:e.hasMoreNext,expression:"hasMoreNext"}],staticClass:"page-item"},[n("span",[e._v("...")])]),e.lastPage?n("li",{staticClass:"page-item",class:{active:e.page===e.lastPage}},[n("button",{class:{active:e.page===e.lastPage},on:{click:function(t){return e.handlePageItemClick(e.lastPage)}}},[e._v(" "+e._s(e.lastPage+1)+" ")])]):e._e(),n("li",{staticClass:"page-item"},[n("button",{staticClass:"next-button",class:{disabled:!e.hasNext},on:{click:e.handleNextClick}},[e._v("下一页")])])],2)])},Tt=[],Rt={name:"Pagination",model:{prop:"page",event:"change"},props:{page:{type:Number,required:!1,default:0},size:{type:Number,required:!1,default:10},total:{type:Number,required:!1,default:0}},data(){return{middleSize:3}},computed:{pages(){return Math.ceil(this.total/this.size)},hasNext(){return this.page0},firstPage(){return 0===this.pages?null:0},hasMorePrev(){return!(null===this.firstPage||this.pages<=this.middleSize+2)&&this.page>=2+this.middleSize/2},hasMoreNext(){return!(null===this.lastPage||this.pages<=this.middleSize+2)&&this.page=this.lastPage-e-1&&(n=this.lastPage-1,t=n-this.middleSize+1),this.range(t,n+1)},lastPage(){return 0===this.pages||1===this.pages?0:this.pages-1}},methods:{handleNextClick(){this.hasNext&&this.$emit("change",this.page+1)},handlePrevClick(){this.hasPrev&&this.$emit("change",this.page-1)},handlePageItemClick(e){this.$emit("change",e)},range(e,t){if(e>=t)return[];const n=[];for(let r=e;r{}},configs:{type:Object,required:!0}},created(){window.innerHeight>500&&window.innerWidth>768&&(this.handleGetComments(),this.bulletScreenAnimate())},methods:{handleMouseleave(e){e.click=!1,e.stop=!1},createTimeAgo(e){return ge(e)},avatar(e){if(!this.configs.priorityQQAvatar&&e.avatar)return e.avatar;const t=this.options.comment_gravatar_default,n=this.options.gravatar_source||"//cn.gravatar.com/avatar/";return`${n}${e.gravatarMd5}?s=256&d=${t}`},async handleGetComments(){let e=0;while(1){const{data:t}=await Re.comment.listTopComments(this.target,this.id,{page:e++});let n=1200*t.content.length;for(let e of t.content){let t=pe.parse(Se(e.content,this.configs.commentHtml));e.summary=ot(Ce(t)),e.content=ot(t),e.top=Oe(50,window.innerHeight-350),e.startTime=(new Date).getTime()+Oe(0,n),e.speed=Oe(.5,3),this.$set(e,"style",{top:e.top+"px"}),this.$set(e,"stop",!1),this.$set(e,"click",!1)}if(this.comments.push(...t.content),!t.hasNext)break}this.loaded=!0},bulletScreenAnimate(){let e,t=this;function n(){let r=(new Date).getTime(),o=window.innerWidth,i=window.innerHeight-350;if(i<50)return t.comments.splice(0,t.comments.length),void window.cancelAnimationFrame(e);for(let e=t.comments.length-1;e>=0;e--){let n=t.comments[e];n.stop||(n.startTime<=r&&(n.left=n.left?n.left-n.speed:o,t.$set(n.style,"left",n.left+"px"),n.top>i&&(n.top=Oe(50,i),t.$set(n.style,"top",n.top+"px"))),n.left<-420&&t.comments.splice(e,1))}t.loaded&&0===t.comments.length?window.cancelAnimationFrame(e):e=window.requestAnimationFrame(n)}e=window.requestAnimationFrame(n)}}},qt=Ut;function Bt(e){var t=n(1486);t.__inject__&&t.__inject__(e)}var Ft=Ve(qt,Mt,Dt,!1,Bt,null,null,!0),Lt=Ft.exports;const Ht={CommentEditor:ht,CommentNode:kt,CommentLoading:Pt,Pagination:It,BulletScreen:Lt},Vt={};Object.keys(Ht).forEach((e=>{Vt[e]=i().component(e,Ht[e])})),pe.use({renderer:{listitem(e,t){return`${e} `},image(e,t,n){return` `},link(e,t,n){return`${n} `}},breaks:!0});const Wt={autoLoad:!0,showUserAgent:!0,priorityQQAvatar:!1,getQQInfo:!1,commentHtml:!1,loadingStyle:"default",unfoldReplyNum:10,night:!1,replyDescSoft:!1,enableImageUpload:!1,enableBulletScreen:!1,imageToken:void 0,avatarLoading:"https://unpkg.com/halo-comment-dream@1.0.7/dist/assets/img/loading.svg",defaultAvatar:"https://unpkg.com/halo-comment-dream@1.0.7/dist/assets/img/avatar.svg"};var Zt={name:"Comment",props:{id:{type:Number,required:!1,default:0},type:{type:String,required:!1,default:"post",validator:function(e){return-1!==["post","sheet","journal"].indexOf(e)}},configs:{type:[Object,String],required:!1,default:()=>Wt}},data(){return{list:{data:[],loading:!1,loaded:!1,params:{page:0},pages:0,total:0,size:10},options:{comment_gravatar_default:""},globalData:Ie}},computed:{target(){return`${this.type}s`},mergedConfigs(){let e={};return"[object String]"===Object.prototype.toString.call(this.configs)&&(e=JSON.parse(this.configs)),Wt["night"]=localStorage&&"true"===localStorage.getItem("night")||!1,Object.assign(Wt,e)}},created(){this.handleGetOptions(),this.mergedConfigs.autoLoad&&this.handleGetComments()},methods:{async handleGetComments(){this.list.loading=!0;const{data:e}=await Re.comment.listAsTreeView(this.target,this.id,this.list.params);e.content&&(e.content=this.flatReplyList(e.content))&&e.content.forEach((e=>e["replyCount"]=this.handleReplyList(e))),this.list.data=e.content,this.list.total=e.total,this.list.pages=e.pages,this.list.size=e.rpp,this.list.loading=!1,this.list.loaded=!0,this.globalData.replyId=0},async handleGetOptions(){const{data:e}=await Re.option.comment();this.options=e,this.mergedConfigs.priorityQQAvatar&&(this.options.gravatar_source="https://cravatar.cn/avatar/")},flatReplyList(e){let t=this.mergedConfigs.replyDescSoft,n=function(e,n){return t?n.createTime-e.createTime:e.createTime-n.createTime};for(let r of e)if(r.children){let e=r.children;e.forEach((e=>e.parent=r));for(let t=0;t{t.parent=n,e.push(t)})),n.children=null)}r.children.sort(n)}return e},handleReplyList(e,t=0){return e["no"]=t,e.children&&e.children.forEach((e=>t=this.handleReplyList(e,t+1))),t},handlePaginationChange(e){this.list.params.page=e,this.handleGetComments()}}},Qt=Zt;function Yt(e){var t=n(5714);t.__inject__&&t.__inject__(e)}var Gt=Ve(Qt,k,_,!1,Yt,null,null,!0),Jt=Gt.exports;window.customElements.define("halo-comment",x(i(),Jt))}()})();
\ No newline at end of file
diff --git a/package.json b/package.json
index c766839..f509219 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "halo-comment-dream",
- "version": "1.0.6",
+ "version": "1.0.7",
"private": false,
"scripts": {
"serve": "vue-cli-service serve",