diff --git a/dist/Artalk.css b/dist/Artalk.css index a51db3678..b5052c306 100644 --- a/dist/Artalk.css +++ b/dist/Artalk.css @@ -2,4 +2,4 @@ * Artalk v1.0.6 * (c) 2016-2020 qwqaq.com * Link: https://github.com/qwqcode/Artalk - */.artalk{position:relative;width:100%;min-height:200px}.artalk *,.artalk-layer-wrap *{line-height:1.6em;color:#565a5f;font-family:Helvetica Neue,PingFangSC-Light,Hiragino Sans GB,Microsoft YaHei,WenQuanYi Micro Hei,sans-serif;word-wrap:break-word;word-break:break-all}.artalk-layer-wrap pre,.artalk pre{line-height:1.6em;background-color:#f6f6f6;color:#555;padding:5px 10px;border-radius:2px;margin:0;font-family:Source Code Pro,courier new,Input Mono,PT Mono,SFMono-Regular,Consolas,Monaco,Menlo,PingFang SC,Liberation Mono,Microsoft YaHei,Courier,monospace}.artalk-layer-wrap a,.artalk a{color:#0083ff;text-decoration:none}.artalk-layer-wrap blockquote,.artalk blockquote{position:static;margin:10px 0;padding:10px 20px;background:#fcfcfc;border-left:4px solid #eee}.artalk-layer-wrap p:first-child,.artalk p:first-child{margin-top:0}.artalk-layer-wrap p:last-child,.artalk p:last-child{margin-bottom:0}.artalk *,.artalk-layer-wrap *{box-sizing:border-box}.artalk-layer-wrap img,.artalk img{max-width:100%}.artalk-error-layer,.artalk-layer-dialog-wrap,.artalk-loading,.full-layer{width:100%;height:100%;position:absolute;top:0;left:0;background:#fff;z-index:10;align-items:center;justify-content:center;flex-flow:column;display:flex}.artalk-loading{z-index:11}.artalk-loading-spinner{position:relative;width:50px;height:50px}.artalk-loading-spinner svg{-webkit-animation:artalkRotate 2s linear infinite;animation:artalkRotate 2s linear infinite;transform-origin:center center;width:100%;height:100%;position:absolute;top:0;left:0}.artalk-loading-spinner svg circle{stroke-dasharray:1,200;stroke-dashoffset:0;-webkit-animation:artalkDash 1.5s ease-in-out infinite,artalkColor 6s ease-in-out infinite;animation:artalkDash 1.5s ease-in-out infinite,artalkColor 6s ease-in-out infinite;stroke-linecap:round}@-webkit-keyframes artalkRotate{to{transform:rotate(1turn)}}@keyframes artalkRotate{to{transform:rotate(1turn)}}@-webkit-keyframes artalkDash{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:89,200;stroke-dashoffset:-35px}to{stroke-dasharray:89,200;stroke-dashoffset:-124px}}@keyframes artalkDash{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:89,200;stroke-dashoffset:-35px}to{stroke-dasharray:89,200;stroke-dashoffset:-124px}}@-webkit-keyframes artalkColor{0%,to{stroke:#ff5652}40%{stroke:#2196f3}66%{stroke:#32c787}80%,90%{stroke:#ffc107}}@keyframes artalkColor{0%,to{stroke:#ff5652}40%{stroke:#2196f3}66%{stroke:#32c787}80%,90%{stroke:#ffc107}}@-webkit-keyframes artalkLoadingIconRotate{0%{transform:rotate(0)}to{transform:rotate(1turn)}}@keyframes artalkLoadingIconRotate{0%{transform:rotate(0)}to{transform:rotate(1turn)}}.artalk-loading-icon{width:18px;height:18px;box-sizing:border-box;border-color:#29d transparent transparent #29d;border-style:solid;border-width:1px;border-radius:50%;-webkit-animation:artalkLoadingIconRotate .4s linear infinite;animation:artalkLoadingIconRotate .4s linear infinite}.artalk-fade-in{-webkit-animation:artalkFadeIn .3s both;animation:artalkFadeIn .3s both}.artalk-fade-out{-webkit-animation:artalkFadeOut .2s both;animation:artalkFadeOut .2s both}@-webkit-keyframes artalkFadeIn{0%{opacity:0}to{opacity:1}}@keyframes artalkFadeIn{0%{opacity:0}to{opacity:1}}@-webkit-keyframes artalkFadeOut{to{opacity:0}}@keyframes artalkFadeOut{to{opacity:0}}.artalk-error-layer{background-color:hsla(0,0%,100%,.94)}.artalk-error-layer .artalk-error-title{color:#ff5652}.artalk-error-layer .artalk-error-text{text-align:center}.artalk-layer-dialog-wrap{background-color:hsla(0,0%,100%,.94)}.artalk-layer-dialog-wrap>.artalk-layer-dialog{width:25%}.artalk-layer-dialog-wrap>.artalk-layer-dialog>.artalk-layer-dialog-content .artalk-captcha-img{cursor:pointer;width:100px;height:auto;margin-right:10px;padding-right:10px;border-right:1px solid #eee;vertical-align:bottom}.artalk-layer-dialog-wrap>.artalk-layer-dialog>.artalk-layer-dialog-content input{width:100%;line-height:34px;border:1px solid #999;border-radius:2px;outline:none;padding:0 6px;display:block;margin-top:10px;margin-bottom:5px;text-align:center}.artalk-layer-dialog-wrap>.artalk-layer-dialog>.artalk-layer-dialog-action{display:flex;flex-direction:row}.artalk-layer-dialog-wrap>.artalk-layer-dialog>.artalk-layer-dialog-action button{flex:1;display:block;cursor:pointer;border:1px solid #0083ff;background:transparent;color:#0083ff;border-radius:2px;padding:0 15px;line-height:30px;outline:none}.artalk-layer-dialog-wrap>.artalk-layer-dialog>.artalk-layer-dialog-action button:active{color:#fff;background:#0083ff}.artalk-layer-dialog-wrap>.artalk-layer-dialog>.artalk-layer-dialog-action button:not(:last-child){margin-right:5px}.artalk-layer-dialog-wrap>.artalk-layer-dialog>.artalk-layer-dialog-action button.error{color:#fff;background:#ff5652;border-color:#ff5652}@media only screen and (max-width:768px){.artalk-layer-dialog-wrap>.artalk-layer-dialog{width:90%!important}}.artalk-notify{display:block;overflow:hidden;background-color:#2c2c2c;color:#fff;border-radius:2px;cursor:pointer;font-size:14px;padding:4px 15px}.artalk-notify:not(:last-child){margin-bottom:3px}.artalk-notify .artalk-notify-content{color:#fff}.artalk-layer-wrap .artalk-layer-mask{position:fixed;top:0;left:0;width:100%;height:100%;z-index:99998;background:rgba(0,0,0,.3)}.artalk-layer-wrap .artalk-layer-item{position:fixed;z-index:99999;top:0;right:0;width:100%;height:100%}.artalk>.artalk-editor{border:1px solid #eceff2;border-radius:4px;margin-bottom:15px;overflow:hidden;position:relative;background:#fff}.artalk>.artalk-editor>.artalk-editor-header{display:flex;flex-direction:row;padding:5px 10px 0}.artalk>.artalk-editor>.artalk-editor-header input{border:2px solid transparent;transition:color .3s ease;flex:1;background:transparent;border-radius:2px;padding:6px 5px;resize:none;outline:none;width:100%}.artalk>.artalk-editor>.artalk-editor-header input:not(:last-child){margin-right:2px}.artalk>.artalk-editor>.artalk-editor-textarea-wrap .artalk-editor-textarea{margin-top:2px;padding:10px 15px;display:block;width:100%;min-height:130px;resize:none;word-wrap:break-word;border:2px solid transparent;border-radius:2px;outline:none;overflow:hidden}.artalk>.artalk-editor>.artalk-editor-textarea-wrap .artalk-close-comment{display:flex;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;padding:0;position:relative;text-align:center;min-height:30px;border-top:1px solid #eceff2;margin-top:4px;font-weight:100;font-size:12px;place-items:center;justify-content:center;place-content:flex-end;flex-direction:row;background:#fff}.artalk>.artalk-editor>.artalk-editor-textarea-wrap .artalk-close-comment>span{color:#757e91;border-radius:2px;margin-right:14px}.artalk>.artalk-editor>.artalk-editor-textarea-wrap .artalk-send-reply{font-size:14px;height:30px;line-height:30px;background:hsla(0,0%,95.7%,.75);padding:0 30px 0 10px;position:absolute;right:10px;bottom:40px;pointer-events:none;max-width:calc(100% - 20px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;z-index:2}.artalk>.artalk-editor>.artalk-editor-textarea-wrap .artalk-send-reply .artalk-cancel{pointer-events:all;position:absolute;right:0;bottom:0;height:30px;text-align:center;width:30px;line-height:30px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-weight:700}.artalk>.artalk-editor>.artalk-editor-textarea-wrap .artalk-send-reply .artalk-cancel:hover{color:#2a2e2e}.artalk>.artalk-editor>.artalk-editor-plug-wrap{position:relative;height:180px;width:100%;overflow:hidden;border-top:1px solid #eceff2;-webkit-animation:artalkFadeIn .3s both;animation:artalkFadeIn .3s both;transition:height .2s ease-in-out}.artalk>.artalk-editor>.artalk-editor-bottom{display:flex;flex-direction:row;border-top:1px solid #eceff2;padding:0 0 0 5px}.artalk>.artalk-editor>.artalk-editor-bottom .artalk-editor-bottom-part{display:flex;flex:1;flex-direction:row;align-items:center}.artalk>.artalk-editor>.artalk-editor-bottom .artalk-editor-bottom-part.artalk-left{flex:inherit}.artalk>.artalk-editor>.artalk-editor-bottom .artalk-editor-bottom-part.artalk-right{justify-content:flex-end}.artalk>.artalk-editor>.artalk-editor-bottom .artalk-editor-action{padding:0 8px;cursor:pointer;color:#999;font-size:14px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.artalk>.artalk-editor>.artalk-editor-bottom .artalk-editor-action>i{color:#999;display:inline-flex;vertical-align:sub;margin-left:4px}.artalk>.artalk-editor>.artalk-editor-bottom .artalk-editor-action>i svg.markdown path{fill:#999}.artalk>.artalk-editor>.artalk-editor-bottom .artalk-editor-action.active{color:#0083ff}.artalk>.artalk-editor>.artalk-editor-bottom .artalk-editor-action.active>i>svg.markdown path{fill:#0083ff}.artalk>.artalk-editor>.artalk-editor-bottom .artalk-editor-action:not(:last-child){border-right:1px solid #eceff2}.artalk>.artalk-editor>.artalk-editor-bottom .artalk-send-btn{background:#0083ff;color:#fff;border:none;padding:0 30px;height:30px;cursor:pointer;transition:opacity .3s ease-in-out;outline:none;font-size:14px}.artalk>.artalk-editor>.artalk-editor-bottom .artalk-send-btn:active{opacity:.9}.artalk>.artalk-editor>.artalk-editor-notify-wrap{position:absolute;right:-2px;bottom:36px;width:225px;z-index:9;opacity:.83}.artalk-comment-wrap{overflow:hidden;position:relative;margin-bottom:10px;border-bottom:1px solid #eceff2}.artalk-comment-wrap.artalk-flash-once{-webkit-animation:artalkFlashOnce 1s ease-in-out 0s;animation:artalkFlashOnce 1s ease-in-out 0s}@-webkit-keyframes artalkFlashOnce{0%{background:rgba(0,131,255,.2)}to{background:transparent}}@keyframes artalkFlashOnce{0%{background:rgba(0,131,255,.2)}to{background:transparent}}.artalk-comment-wrap:last-child{border-bottom-color:transparent}.artalk-comment-wrap>.artalk-comment{display:flex;padding:12px 10px}.artalk-comment-wrap>.artalk-comment>.artalk-avatar{display:block;flex:none;margin-right:12px;padding:2px 0}.artalk-comment-wrap>.artalk-comment>.artalk-avatar img{width:48px;height:48px;border-radius:3px}.artalk-comment-wrap>.artalk-comment>.artalk-comment-main{display:block;flex:auto}.artalk-comment-wrap>.artalk-comment>.artalk-comment-main>.artalk-header{line-height:1;font-size:12px;margin-bottom:3px;overflow:hidden;position:relative;display:flex;flex-wrap:wrap;align-items:end}.artalk-comment-wrap>.artalk-comment>.artalk-comment-main>.artalk-header>span{display:flex;margin-bottom:2px;color:#757e91}.artalk-comment-wrap>.artalk-comment>.artalk-comment-main>.artalk-header>span:not(:last-child){margin-right:5px}.artalk-comment-wrap>.artalk-comment>.artalk-comment-main>.artalk-header>span.artalk-nick{font-size:13px}.artalk-comment-wrap>.artalk-comment>.artalk-comment-main>.artalk-header>span.artalk-nick>a{color:#0083ff;text-decoration:none}.artalk-comment-wrap>.artalk-comment>.artalk-comment-main>.artalk-header>span.artalk-badge{background:#f4f4f4;padding:0 5px;border-radius:3px;background:#ffa928;color:#fff}.artalk-comment-wrap>.artalk-comment>.artalk-comment-main>.artalk-header>span.artalk-ua{background:#f4f4f4;padding:0 5px;border-radius:3px}.artalk-comment-wrap>.artalk-comment>.artalk-comment-main>.artalk-body{display:block;overflow:hidden;position:relative}.artalk-comment-wrap>.artalk-comment>.artalk-comment-main>.artalk-body img{max-width:100%}.artalk-comment-wrap>.artalk-comment>.artalk-comment-main>.artalk-body>.artalk-content.artalk-type-collapsed{border:3px solid #f4f4f4;border-bottom:0;padding:5px 10px;border-radius:4px 4px 0 0;margin-bottom:-5px}.artalk-comment-wrap>.artalk-comment>.artalk-comment-main>.artalk-body>.artalk-content.artalk-hide{display:none}.artalk-comment-wrap>.artalk-comment>.artalk-comment-main>.artalk-body>.artalk-content>:first-child{margin-top:0}.artalk-comment-wrap>.artalk-comment>.artalk-comment-main>.artalk-body>.artalk-content>:last-child{margin-bottom:0}.artalk-comment-wrap>.artalk-comment>.artalk-comment-main>.artalk-body>.artalk-collapsed{margin:3px 0;font-size:13px;padding:10px 18px;display:block;background:#f4f4f4;border-radius:4px}.artalk-comment-wrap>.artalk-comment>.artalk-comment-main>.artalk-body>.artalk-collapsed>.artalk-text{color:#757e91}.artalk-comment-wrap>.artalk-comment>.artalk-comment-main>.artalk-body>.artalk-collapsed>.artalk-show-btn{color:#0083ff;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;margin-left:3px}.artalk-comment-wrap>.artalk-comment>.artalk-comment-main>.artalk-body>.artalk-collapsed>.artalk-show-btn:hover{color:#0083ff}.artalk-comment-wrap>.artalk-comment>.artalk-comment-main>.artalk-footer .artalk-comment-actions{display:flex;flex-direction:row;align-items:center;margin-top:4px}.artalk-comment-wrap>.artalk-comment>.artalk-comment-main>.artalk-footer .artalk-comment-actions>span{display:inline-flex;color:#757e91;font-size:13px;line-height:15px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.artalk-comment-wrap>.artalk-comment>.artalk-comment-main>.artalk-footer .artalk-comment-actions>span.artalk-hide{display:none}.artalk-comment-wrap>.artalk-comment>.artalk-comment-main>.artalk-footer .artalk-comment-actions>span.artalk-error,.artalk-comment-wrap>.artalk-comment>.artalk-comment-main>.artalk-footer .artalk-comment-actions>span.artalk-error:hover{color:#ff5652}.artalk-comment-wrap>.artalk-comment>.artalk-comment-main>.artalk-footer .artalk-comment-actions>span:not(:first-child):not(.artalk-hide){margin-left:8px;padding-left:8px;border-left:1px solid #eceff2}.artalk-comment-wrap>.artalk-comment>.artalk-comment-main>.artalk-footer .artalk-comment-actions>span:hover{color:#2a2e2e}.artalk-comment-wrap>.artalk-comment>.artalk-comment-main .artalk-comment-children{margin-top:10px;border-radius:3px;border-left:1px dashed hsla(0,0%,93%,.5)}.artalk-comment-wrap>.artalk-comment>.artalk-comment-main .artalk-comment-children .artalk-comment-wrap{border-bottom-color:transparent}.artalk-comment-wrap>.artalk-comment>.artalk-comment-main .artalk-comment-children .artalk-comment-wrap:not(:last-child){margin-bottom:5px}.artalk-comment-wrap>.artalk-comment>.artalk-comment-main .artalk-comment-children .artalk-comment-wrap>.artalk-comment{padding-top:4px;padding-bottom:4px}.artalk-comment-wrap>.artalk-comment>.artalk-comment-main .artalk-comment-children .artalk-comment-wrap>.artalk-comment>.artalk-avatar img{width:36px;height:36px}.artalk-editor-plug-emoticons{height:100%;width:100%}.artalk-editor-plug-emoticons .artalk-emoticons-list-wrap{overflow-y:scroll;overflow-x:hidden;height:100%;width:100%}.artalk-editor-plug-emoticons .artalk-emoticons-list-wrap::-webkit-scrollbar{width:4px;background:transparent}.artalk-editor-plug-emoticons .artalk-emoticons-list-wrap::-webkit-scrollbar-thumb,.artalk-editor-plug-emoticons .artalk-emoticons-list-wrap::-webkit-scrollbar-thumb:window-inactive{background:rgba(86,86,86,.3)}.artalk-editor-plug-emoticons .artalk-emoticons-list-wrap::-webkit-scrollbar-thumb:vertical:hover{background:rgba(65,74,82,.77)}.artalk-editor-plug-emoticons .artalk-emoticons-list-wrap::-webkit-scrollbar-thumb:vertical:active{background:rgba(41,47,53,.77)}.artalk-editor-plug-emoticons .artalk-emoticons-list-wrap .artalk-emoticons-list{padding:5px 10px 35px}.artalk-editor-plug-emoticons .artalk-emoticons-list-wrap .artalk-emoticons-list .artalk-emoticons-item{display:inline-block;padding:5px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border-radius:2px;font-size:16px}.artalk-editor-plug-emoticons .artalk-emoticons-list-wrap .artalk-emoticons-list .artalk-emoticons-item>img{max-height:60px;width:auto}.artalk-editor-plug-emoticons .artalk-emoticons-list-wrap .artalk-emoticons-list .artalk-emoticons-item:hover{background:#f4f4f4}.artalk-editor-plug-emoticons .artalk-emoticons-types{position:absolute;bottom:0;left:0;width:100%;background:hsla(0,0%,100%,.95);height:30px;border-top:1px solid #eceff2}.artalk-editor-plug-emoticons .artalk-emoticons-types>span{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;padding:0 10px;line-height:30px;float:left;display:block;cursor:pointer;font-size:14px}.artalk-editor-plug-emoticons .artalk-emoticons-types>span.active,.artalk-editor-plug-emoticons .artalk-emoticons-types>span:hover{background:#f4f4f4}.artalk-editor-plug-preview{overflow-y:scroll;overflow-x:hidden;height:100%;width:100%;padding:10px 15px}.artalk>.artalk-list{position:relative}.artalk>.artalk-list>.artalk-list-header{display:flex;flex-direction:row;padding:10px 10px 5px;border-bottom:1px solid #eceff2}.artalk>.artalk-list>.artalk-list-header .artalk-comment-count{flex:1;font-size:15px}.artalk>.artalk-list>.artalk-list-header .artalk-comment-count .artalk-comment-count-num{font-size:22px;margin-right:4px}.artalk>.artalk-list>.artalk-list-header .artalk-right-action{display:flex;flex:1;flex-direction:row;align-items:center;justify-content:flex-end}.artalk>.artalk-list>.artalk-list-header .artalk-right-action>span{font-size:14px;color:#757e91;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.artalk>.artalk-list>.artalk-list-header .artalk-right-action>span.artalk-on{color:#0083ff}.artalk>.artalk-list>.artalk-list-header .artalk-right-action>span.artalk-hide{display:none}.artalk>.artalk-list>.artalk-list-header .artalk-right-action>span:not(:last-child):not(.artalk-hide){margin-right:10px;padding-right:10px;border-right:1px solid #eceff2}.artalk>.artalk-list>.artalk-list-body>.artalk-list-comments-wrap .artalk-no-comment{text-align:center;height:150px;line-height:150px;display:block;font-size:19px}.artalk>.artalk-list>.artalk-list-body>.artalk-list-read-more{margin-bottom:12px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border:1px solid #eceff2;padding:0 20px;font-size:14px;border-radius:4px;display:flex;height:30px;flex-direction:row;place-content:center;align-items:center}.artalk>.artalk-list>.artalk-list-body>.artalk-list-read-more.artalk-err>.artalk-text{color:#ff5652!important}.artalk>.artalk-list>.artalk-list-body>.artalk-list-read-more>.artalk-loading-icon{height:15px;width:15px}.artalk>.artalk-list>.artalk-list-body>.artalk-list-read-more>.artalk-text{color:#757e91}.artalk>.artalk-list>.artalk-list-body>.artalk-list-read-more:hover{background-color:#eceff2}.artalk>.artalk-list>.artalk-list-body>.artalk-list-read-more:hover>.artalk-text{color:#0083ff}.artalk>.artalk-list>.artalk-list-footer{position:relative;overflow:hidden}.artalk>.artalk-list>.artalk-list-footer .artalk-copyright{display:block;font-size:13px;float:right;color:#0083ff;padding:0 10px;border-radius:2px}.artalk>.artalk-list>.artalk-list-footer .artalk-copyright a{color:#0083ff;text-decoration:none}.artalk-sidebar{position:fixed;z-index:99999;top:0;right:0;width:430px;height:100%;background:#fff;transition:transform .45s cubic-bezier(.23,1,.32,1) 0ms;transform:translate(430px)}@media only screen and (max-width:430px){.artalk-sidebar{width:100%}}.artalk-sidebar .artalk-sidebar-inner{position:relative}.artalk-sidebar .artalk-sidebar-inner .artalk-sidebar-title{text-align:center;font-size:23px;padding:20px 0}.artalk-sidebar .artalk-sidebar-inner .artalk-sidebar-close{position:absolute;display:flex;left:0;top:0;width:40px;height:40px;align-items:center;place-content:center;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.artalk-sidebar .artalk-sidebar-inner .artalk-sidebar-close:hover{background:rgba(232,17,35,.9)}.artalk-sidebar .artalk-sidebar-inner .artalk-sidebar-close:hover svg{fill:#fff}.artalk-sidebar .artalk-sidebar-content{position:relative;overflow-y:auto;height:calc(100vh - 76px)} \ No newline at end of file + */.artalk{position:relative;width:100%;min-height:200px}.artalk *,.artalk-layer-wrap *{line-height:1.6em;color:#565a5f;font-family:Helvetica Neue,PingFangSC-Light,Hiragino Sans GB,Microsoft YaHei,WenQuanYi Micro Hei,sans-serif;word-wrap:break-word;word-break:break-all}.artalk-layer-wrap pre,.artalk pre{line-height:1.6em;background-color:#f6f6f6;color:#555;padding:5px 10px;border-radius:2px;margin:0;font-family:Source Code Pro,courier new,Input Mono,PT Mono,SFMono-Regular,Consolas,Monaco,Menlo,PingFang SC,Liberation Mono,Microsoft YaHei,Courier,monospace}.artalk-layer-wrap a,.artalk a{color:#0083ff;text-decoration:none}.artalk-layer-wrap blockquote,.artalk blockquote{position:static;margin:10px 0;padding:10px 20px;background:#fcfcfc;border-left:4px solid #eee}.artalk-layer-wrap p:first-child,.artalk p:first-child{margin-top:0}.artalk-layer-wrap p:last-child,.artalk p:last-child{margin-bottom:0}.artalk *,.artalk-layer-wrap *{box-sizing:border-box}.artalk-layer-wrap img,.artalk img{max-width:100%}.artalk-error-layer,.artalk-layer-dialog-wrap,.artalk-loading,.full-layer{width:100%;height:100%;position:absolute;top:0;left:0;background:#fff;z-index:10;align-items:center;justify-content:center;flex-flow:column;display:flex}.artalk-loading{z-index:11}.artalk-loading-spinner{position:relative;width:50px;height:50px}.artalk-loading-spinner svg{-webkit-animation:artalkRotate 2s linear infinite;animation:artalkRotate 2s linear infinite;transform-origin:center center;width:100%;height:100%;position:absolute;top:0;left:0}.artalk-loading-spinner svg circle{stroke-dasharray:1,200;stroke-dashoffset:0;-webkit-animation:artalkDash 1.5s ease-in-out infinite,artalkColor 6s ease-in-out infinite;animation:artalkDash 1.5s ease-in-out infinite,artalkColor 6s ease-in-out infinite;stroke-linecap:round}@-webkit-keyframes artalkRotate{to{transform:rotate(1turn)}}@keyframes artalkRotate{to{transform:rotate(1turn)}}@-webkit-keyframes artalkDash{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:89,200;stroke-dashoffset:-35px}to{stroke-dasharray:89,200;stroke-dashoffset:-124px}}@keyframes artalkDash{0%{stroke-dasharray:1,200;stroke-dashoffset:0}50%{stroke-dasharray:89,200;stroke-dashoffset:-35px}to{stroke-dasharray:89,200;stroke-dashoffset:-124px}}@-webkit-keyframes artalkColor{0%,to{stroke:#ff5652}40%{stroke:#2196f3}66%{stroke:#32c787}80%,90%{stroke:#ffc107}}@keyframes artalkColor{0%,to{stroke:#ff5652}40%{stroke:#2196f3}66%{stroke:#32c787}80%,90%{stroke:#ffc107}}@-webkit-keyframes artalkLoadingIconRotate{0%{transform:rotate(0)}to{transform:rotate(1turn)}}@keyframes artalkLoadingIconRotate{0%{transform:rotate(0)}to{transform:rotate(1turn)}}.artalk-loading-icon{width:18px;height:18px;box-sizing:border-box;border-color:#29d transparent transparent #29d;border-style:solid;border-width:1px;border-radius:50%;-webkit-animation:artalkLoadingIconRotate .4s linear infinite;animation:artalkLoadingIconRotate .4s linear infinite}.artalk-fade-in{-webkit-animation:artalkFadeIn .3s both;animation:artalkFadeIn .3s both}.artalk-fade-out{-webkit-animation:artalkFadeOut .2s both;animation:artalkFadeOut .2s both}@-webkit-keyframes artalkFadeIn{0%{opacity:0}to{opacity:1}}@keyframes artalkFadeIn{0%{opacity:0}to{opacity:1}}@-webkit-keyframes artalkFadeOut{to{opacity:0}}@keyframes artalkFadeOut{to{opacity:0}}.artalk-error-layer{background-color:hsla(0,0%,100%,.94)}.artalk-error-layer .artalk-error-title{color:#ff5652}.artalk-error-layer .artalk-error-text{text-align:center}.artalk-layer-dialog-wrap{background-color:hsla(0,0%,100%,.94)}.artalk-layer-dialog-wrap>.artalk-layer-dialog{width:25%}.artalk-layer-dialog-wrap>.artalk-layer-dialog>.artalk-layer-dialog-content .artalk-captcha-img{cursor:pointer;width:100px;height:auto;margin-right:10px;padding-right:10px;border-right:1px solid #eee;vertical-align:bottom}.artalk-layer-dialog-wrap>.artalk-layer-dialog>.artalk-layer-dialog-content input{width:100%;line-height:34px;border:1px solid #999;border-radius:2px;outline:none;padding:0 6px;display:block;margin-top:10px;margin-bottom:5px;text-align:center}.artalk-layer-dialog-wrap>.artalk-layer-dialog>.artalk-layer-dialog-action{display:flex;flex-direction:row}.artalk-layer-dialog-wrap>.artalk-layer-dialog>.artalk-layer-dialog-action button{flex:1;display:block;cursor:pointer;border:1px solid #0083ff;background:transparent;color:#0083ff;border-radius:2px;padding:0 15px;line-height:30px;outline:none}.artalk-layer-dialog-wrap>.artalk-layer-dialog>.artalk-layer-dialog-action button:active{color:#fff;background:#0083ff}.artalk-layer-dialog-wrap>.artalk-layer-dialog>.artalk-layer-dialog-action button:not(:last-child){margin-right:5px}.artalk-layer-dialog-wrap>.artalk-layer-dialog>.artalk-layer-dialog-action button.error{color:#fff;background:#ff5652;border-color:#ff5652}@media only screen and (max-width:768px){.artalk-layer-dialog-wrap>.artalk-layer-dialog{width:90%!important}}.artalk-notify{display:block;overflow:hidden;background-color:#2c2c2c;color:#fff;border-radius:2px;cursor:pointer;font-size:14px;padding:4px 15px}.artalk-notify:not(:last-child){margin-bottom:3px}.artalk-notify .artalk-notify-content{color:#fff}.artalk-layer-wrap .artalk-layer-mask{position:fixed;top:0;left:0;width:100%;height:100%;z-index:99998;background:rgba(0,0,0,.3)}.artalk-layer-wrap .artalk-layer-item{position:fixed;z-index:99999;top:0;right:0;width:100%;height:100%}.artalk>.artalk-editor{border:1px solid #eceff2;border-radius:4px;margin-bottom:15px;overflow:hidden;position:relative;background:#fff}@media only screen and (max-width:768px){.artalk>.artalk-editor{margin-bottom:7px}}.artalk>.artalk-editor>.artalk-editor-header{display:flex;flex-direction:row;padding:5px 10px 0}.artalk>.artalk-editor>.artalk-editor-header input{border:2px solid transparent;transition:color .3s ease;flex:1;background:transparent;border-radius:2px;padding:6px 5px;resize:none;outline:none;width:100%}.artalk>.artalk-editor>.artalk-editor-header input:not(:last-child){margin-right:2px}.artalk>.artalk-editor>.artalk-editor-textarea-wrap .artalk-editor-textarea{margin-top:2px;padding:10px 15px;display:block;width:100%;min-height:130px;resize:none;word-wrap:break-word;border:2px solid transparent;border-radius:2px;outline:none;overflow:hidden}.artalk>.artalk-editor>.artalk-editor-textarea-wrap .artalk-close-comment{display:flex;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;padding:0;position:relative;text-align:center;min-height:30px;border-top:1px solid #eceff2;margin-top:4px;font-weight:100;font-size:12px;place-items:center;justify-content:center;place-content:flex-end;flex-direction:row;background:#fff}.artalk>.artalk-editor>.artalk-editor-textarea-wrap .artalk-close-comment>span{color:#757e91;border-radius:2px;margin-right:14px}.artalk>.artalk-editor>.artalk-editor-textarea-wrap .artalk-send-reply{font-size:14px;height:30px;line-height:30px;background:hsla(0,0%,95.7%,.75);padding:0 30px 0 10px;position:absolute;right:10px;bottom:40px;pointer-events:none;max-width:calc(100% - 20px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;z-index:2}.artalk>.artalk-editor>.artalk-editor-textarea-wrap .artalk-send-reply .artalk-cancel{pointer-events:all;position:absolute;right:0;bottom:0;height:30px;text-align:center;width:30px;line-height:30px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-weight:700}.artalk>.artalk-editor>.artalk-editor-textarea-wrap .artalk-send-reply .artalk-cancel:hover{color:#2a2e2e}.artalk>.artalk-editor>.artalk-editor-plug-wrap{position:relative;height:180px;width:100%;overflow:hidden;border-top:1px solid #eceff2;-webkit-animation:artalkFadeIn .3s both;animation:artalkFadeIn .3s both;transition:height .2s ease-in-out}.artalk>.artalk-editor>.artalk-editor-bottom{display:flex;flex-direction:row;border-top:1px solid #eceff2;padding:0 0 0 5px}.artalk>.artalk-editor>.artalk-editor-bottom .artalk-editor-bottom-part{display:flex;flex:1;flex-direction:row;align-items:center}.artalk>.artalk-editor>.artalk-editor-bottom .artalk-editor-bottom-part.artalk-left{flex:inherit}.artalk>.artalk-editor>.artalk-editor-bottom .artalk-editor-bottom-part.artalk-right{justify-content:flex-end}.artalk>.artalk-editor>.artalk-editor-bottom .artalk-editor-action{padding:0 8px;cursor:pointer;color:#999;font-size:14px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.artalk>.artalk-editor>.artalk-editor-bottom .artalk-editor-action>i{color:#999;display:inline-flex;vertical-align:sub;margin-left:4px}.artalk>.artalk-editor>.artalk-editor-bottom .artalk-editor-action>i svg.markdown path{fill:#999}.artalk>.artalk-editor>.artalk-editor-bottom .artalk-editor-action.active{color:#0083ff}.artalk>.artalk-editor>.artalk-editor-bottom .artalk-editor-action.active>i>svg.markdown path{fill:#0083ff}.artalk>.artalk-editor>.artalk-editor-bottom .artalk-editor-action:not(:last-child){border-right:1px solid #eceff2}.artalk>.artalk-editor>.artalk-editor-bottom .artalk-send-btn{background:#0083ff;color:#fff;border:none;padding:0 30px;height:30px;cursor:pointer;transition:opacity .3s ease-in-out;outline:none;font-size:14px}.artalk>.artalk-editor>.artalk-editor-bottom .artalk-send-btn:active{opacity:.9}.artalk>.artalk-editor>.artalk-editor-notify-wrap{position:absolute;right:-2px;bottom:36px;width:225px;z-index:9;opacity:.83}.artalk-comment-wrap{overflow:hidden;position:relative;border-bottom:1px solid #eceff2}.artalk-comment-wrap.artalk-flash-once{-webkit-animation:artalkFlashOnce 1s ease-in-out 0s;animation:artalkFlashOnce 1s ease-in-out 0s}@-webkit-keyframes artalkFlashOnce{0%{background:rgba(0,131,255,.2)}to{background:transparent}}@keyframes artalkFlashOnce{0%{background:rgba(0,131,255,.2)}to{background:transparent}}.artalk-comment-wrap:last-child{border-bottom-color:transparent}.artalk-comment-wrap>.artalk-comment{display:flex;padding:12px 10px}.artalk-comment-wrap>.artalk-comment>.artalk-avatar{display:block;flex:none;margin-right:12px;padding:2px 0}.artalk-comment-wrap>.artalk-comment>.artalk-avatar img{width:48px;height:48px;border-radius:3px}.artalk-comment-wrap>.artalk-comment>.artalk-comment-main{display:block;flex:auto}.artalk-comment-wrap>.artalk-comment>.artalk-comment-main>.artalk-header{line-height:1;font-size:12px;margin-bottom:3px;overflow:hidden;position:relative;display:flex;flex-wrap:wrap;align-items:end}.artalk-comment-wrap>.artalk-comment>.artalk-comment-main>.artalk-header>span{display:flex;margin-bottom:2px;color:#757e91}.artalk-comment-wrap>.artalk-comment>.artalk-comment-main>.artalk-header>span:not(:last-child){margin-right:5px}.artalk-comment-wrap>.artalk-comment>.artalk-comment-main>.artalk-header>span.artalk-nick{font-size:13px}.artalk-comment-wrap>.artalk-comment>.artalk-comment-main>.artalk-header>span.artalk-nick>a{color:#0083ff;text-decoration:none}.artalk-comment-wrap>.artalk-comment>.artalk-comment-main>.artalk-header>span.artalk-badge{background:#f4f4f4;padding:0 5px;border-radius:3px;background:#ffa928;color:#fff}.artalk-comment-wrap>.artalk-comment>.artalk-comment-main>.artalk-header>span.artalk-ua{background:#f4f4f4;padding:0 5px;border-radius:3px}.artalk-comment-wrap>.artalk-comment>.artalk-comment-main>.artalk-body{display:block;overflow:hidden;position:relative}.artalk-comment-wrap>.artalk-comment>.artalk-comment-main>.artalk-body img{max-width:100%}.artalk-comment-wrap>.artalk-comment>.artalk-comment-main>.artalk-body>.artalk-content.artalk-type-collapsed{border:3px solid #f4f4f4;border-bottom:0;padding:5px 10px;border-radius:4px 4px 0 0;margin-bottom:-5px}.artalk-comment-wrap>.artalk-comment>.artalk-comment-main>.artalk-body>.artalk-content.artalk-hide{display:none}.artalk-comment-wrap>.artalk-comment>.artalk-comment-main>.artalk-body>.artalk-content>:first-child{margin-top:0}.artalk-comment-wrap>.artalk-comment>.artalk-comment-main>.artalk-body>.artalk-content>:last-child{margin-bottom:0}.artalk-comment-wrap>.artalk-comment>.artalk-comment-main>.artalk-body>.artalk-collapsed{margin:3px 0;font-size:13px;padding:10px 18px;display:block;background:#f4f4f4;border-radius:4px}.artalk-comment-wrap>.artalk-comment>.artalk-comment-main>.artalk-body>.artalk-collapsed>.artalk-text{color:#757e91}.artalk-comment-wrap>.artalk-comment>.artalk-comment-main>.artalk-body>.artalk-collapsed>.artalk-show-btn{color:#0083ff;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;margin-left:3px}.artalk-comment-wrap>.artalk-comment>.artalk-comment-main>.artalk-body>.artalk-collapsed>.artalk-show-btn:hover{color:#0083ff}.artalk-comment-wrap>.artalk-comment>.artalk-comment-main>.artalk-body.artalk-read-more-mask:after{pointer-events:none;position:absolute;z-index:1;display:block;overflow:hidden;width:100%;content:" ";bottom:0;height:41px;background:linear-gradient(180deg,hsla(0,0%,100%,0),#fff)}.artalk-comment-wrap>.artalk-comment>.artalk-comment-main>.artalk-footer .artalk-comment-actions{display:flex;flex-direction:row;align-items:center;margin-top:4px}.artalk-comment-wrap>.artalk-comment>.artalk-comment-main>.artalk-footer .artalk-comment-actions>span{display:inline-flex;color:#757e91;font-size:13px;line-height:15px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.artalk-comment-wrap>.artalk-comment>.artalk-comment-main>.artalk-footer .artalk-comment-actions>span.artalk-hide{display:none}.artalk-comment-wrap>.artalk-comment>.artalk-comment-main>.artalk-footer .artalk-comment-actions>span.artalk-error,.artalk-comment-wrap>.artalk-comment>.artalk-comment-main>.artalk-footer .artalk-comment-actions>span.artalk-error:hover{color:#ff5652}.artalk-comment-wrap>.artalk-comment>.artalk-comment-main>.artalk-footer .artalk-comment-actions>span:not(:first-child):not(.artalk-hide){margin-left:8px;padding-left:8px;border-left:1px solid #eceff2}.artalk-comment-wrap>.artalk-comment>.artalk-comment-main>.artalk-footer .artalk-comment-actions>span:hover{color:#2a2e2e}.artalk-comment-wrap .artalk-comment-children .artalk-comment-wrap{margin-top:10px;border-radius:3px;border-left:1px dashed hsla(0,0%,93%,.5);border-bottom-color:transparent}.artalk-comment-wrap .artalk-comment-children .artalk-comment-wrap:not(:last-child){margin-bottom:5px}.artalk-comment-wrap .artalk-comment-children .artalk-comment-wrap>.artalk-comment{padding-top:4px;padding-bottom:4px}.artalk-comment-wrap .artalk-comment-children .artalk-comment-wrap>.artalk-comment>.artalk-avatar img{width:36px;height:36px}.artalk-editor-plug-emoticons{height:100%;width:100%}.artalk-editor-plug-emoticons .artalk-emoticons-list-wrap{overflow-y:scroll;overflow-x:hidden;height:100%;width:100%}.artalk-editor-plug-emoticons .artalk-emoticons-list-wrap::-webkit-scrollbar{width:4px;background:transparent}.artalk-editor-plug-emoticons .artalk-emoticons-list-wrap::-webkit-scrollbar-thumb,.artalk-editor-plug-emoticons .artalk-emoticons-list-wrap::-webkit-scrollbar-thumb:window-inactive{background:rgba(86,86,86,.3)}.artalk-editor-plug-emoticons .artalk-emoticons-list-wrap::-webkit-scrollbar-thumb:vertical:hover{background:rgba(65,74,82,.77)}.artalk-editor-plug-emoticons .artalk-emoticons-list-wrap::-webkit-scrollbar-thumb:vertical:active{background:rgba(41,47,53,.77)}.artalk-editor-plug-emoticons .artalk-emoticons-list-wrap .artalk-emoticons-list{padding:5px 10px 35px}.artalk-editor-plug-emoticons .artalk-emoticons-list-wrap .artalk-emoticons-list .artalk-emoticons-item{display:inline-block;padding:5px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border-radius:2px;font-size:16px}.artalk-editor-plug-emoticons .artalk-emoticons-list-wrap .artalk-emoticons-list .artalk-emoticons-item>img{max-height:60px;width:auto}.artalk-editor-plug-emoticons .artalk-emoticons-list-wrap .artalk-emoticons-list .artalk-emoticons-item:hover{background:#f4f4f4}.artalk-editor-plug-emoticons .artalk-emoticons-types{position:absolute;bottom:0;left:0;width:100%;background:hsla(0,0%,100%,.95);height:30px;border-top:1px solid #eceff2}.artalk-editor-plug-emoticons .artalk-emoticons-types>span{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;padding:0 10px;line-height:30px;float:left;display:block;cursor:pointer;font-size:14px}.artalk-editor-plug-emoticons .artalk-emoticons-types>span.active,.artalk-editor-plug-emoticons .artalk-emoticons-types>span:hover{background:#f4f4f4}.artalk-editor-plug-preview{overflow-y:scroll;overflow-x:hidden;height:100%;width:100%;padding:10px 15px}.artalk>.artalk-list{position:relative}.artalk>.artalk-list>.artalk-list-header{display:flex;flex-direction:row;padding:10px 10px 5px;border-bottom:1px solid #eceff2}.artalk>.artalk-list>.artalk-list-header .artalk-comment-count{flex:1;font-size:15px}.artalk>.artalk-list>.artalk-list-header .artalk-comment-count .artalk-comment-count-num{font-size:22px;margin-right:4px}.artalk>.artalk-list>.artalk-list-header .artalk-right-action{display:flex;flex:1;flex-direction:row;align-items:center;justify-content:flex-end}.artalk>.artalk-list>.artalk-list-header .artalk-right-action>span{font-size:14px;color:#757e91;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.artalk>.artalk-list>.artalk-list-header .artalk-right-action>span.artalk-on{color:#0083ff}.artalk>.artalk-list>.artalk-list-header .artalk-right-action>span.artalk-hide{display:none}.artalk>.artalk-list>.artalk-list-header .artalk-right-action>span:not(:last-child):not(.artalk-hide){margin-right:10px;padding-right:10px;border-right:1px solid #eceff2}.artalk>.artalk-list>.artalk-list-body>.artalk-list-comments-wrap .artalk-no-comment{text-align:center;height:150px;line-height:150px;display:block;font-size:19px}.artalk>.artalk-list>.artalk-list-body>.artalk-list-read-more{margin-bottom:12px;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border:1px solid #eceff2;padding:0 20px;font-size:14px;border-radius:4px;display:flex;height:30px;flex-direction:row;place-content:center;align-items:center}.artalk>.artalk-list>.artalk-list-body>.artalk-list-read-more.artalk-err>.artalk-text{color:#ff5652!important}.artalk>.artalk-list>.artalk-list-body>.artalk-list-read-more>.artalk-loading-icon{height:15px;width:15px}.artalk>.artalk-list>.artalk-list-body>.artalk-list-read-more>.artalk-text{color:#757e91}.artalk>.artalk-list>.artalk-list-body>.artalk-list-read-more:hover{background-color:#eceff2}.artalk>.artalk-list>.artalk-list-body>.artalk-list-read-more:hover>.artalk-text{color:#0083ff}.artalk>.artalk-list>.artalk-list-footer{position:relative;overflow:hidden}.artalk>.artalk-list>.artalk-list-footer .artalk-copyright{display:block;font-size:13px;float:right;color:#0083ff;padding:0 10px;border-radius:2px}.artalk>.artalk-list>.artalk-list-footer .artalk-copyright a{color:#0083ff;text-decoration:none}.artalk-sidebar{position:fixed;z-index:99999;top:0;right:0;width:430px;height:100%;background:#fff;transition:transform .45s cubic-bezier(.23,1,.32,1) 0ms;transform:translate(430px)}@media only screen and (max-width:430px){.artalk-sidebar{width:100%}}.artalk-sidebar .artalk-sidebar-inner{position:relative}.artalk-sidebar .artalk-sidebar-inner .artalk-sidebar-title{text-align:center;font-size:23px;padding:20px 0}.artalk-sidebar .artalk-sidebar-inner .artalk-sidebar-close{position:absolute;display:flex;left:0;top:0;width:40px;height:40px;align-items:center;place-content:center;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.artalk-sidebar .artalk-sidebar-inner .artalk-sidebar-close:hover{background:rgba(232,17,35,.9)}.artalk-sidebar .artalk-sidebar-inner .artalk-sidebar-close:hover svg{fill:#fff}.artalk-sidebar .artalk-sidebar-content{position:relative;overflow-y:auto;height:calc(100vh - 76px)} \ No newline at end of file diff --git a/dist/Artalk.js b/dist/Artalk.js index 0273b674c..95d5035fb 100644 --- a/dist/Artalk.js +++ b/dist/Artalk.js @@ -3,11 +3,11 @@ * (c) 2016-2020 qwqaq.com * Link: https://github.com/qwqcode/Artalk */ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("Artalk",[],t):"object"==typeof exports?exports.Artalk=t():e.Artalk=t()}(this,function(){return d=[function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){e.exports=function(e){return e&&e.__esModule?e:{default:e}}},function(e,t){function a(e,t){for(var n=0;n0&&arguments[0]!==undefined?arguments[0]:"";var n=document.createElement("div");n.innerHTML=t.trim();return n.firstElementChild||n}},{key:"getHeight",value:function e(t){return parseFloat(getComputedStyle(t,null).height.replace("px",""))}},{key:"htmlEncode",value:function e(t){var n=document.createElement("div");n.innerText=t;var a=n.innerHTML;n=null;return a}},{key:"htmlDecode",value:function e(t){var n=document.createElement("div");n.innerHTML=t;var a=n.innerText;n=null;return a}},{key:"getLocationParmByName",value:function e(t){var n=RegExp("[?&]".concat(t,"=([^&]*)")).exec(window.location.search);return n&&decodeURIComponent(n[1].replace(/\+/g," "))}},{key:"getOffset",value:function e(t){var n=t.getBoundingClientRect();return{top:n.top+window.scrollY,left:n.left+window.scrollX}}},{key:"timeAgo",value:function e(t){try{var n=t.getTime();var a=(new Date).getTime();var r=a-n;var i=Math.floor(r/(24*3600*1e3));if(i===0){var l=r%(24*3600*1e3);var s=Math.floor(l/(3600*1e3));if(s===0){var o=l%(3600*1e3);var c=Math.floor(o/(60*1e3));if(c===0){var u=o%(60*1e3);var d=Math.round(u/1e3);return"".concat(d," 秒前")}return"".concat(c," 分钟前")}return"".concat(s," 小时前")}if(i<0)return"刚刚";if(i<8){return"".concat(i," 天前")}return this.dateFormat(t)}catch(e){console.error(e);return" - "}}},{key:"padWithZeros",value:function e(t,n){var a=t.toString();while(a.length');this.contentEl.appendChild(this.childrenEl)}else{this.childrenEl=this.parent.getChildrenEl()}}return this.childrenEl}},{key:"getParent",value:function e(){return this.parent}},{key:"getElem",value:function e(){return this.elem}},{key:"getData",value:function e(){return this.data}},{key:"getGravatarUrl",value:function e(){return"".concat(this.artalk.conf.gravatar.cdn).concat(this.data.email_encrypted,"?d=").concat(encodeURIComponent(this.artalk.conf.defaultAvatar),"&s=80")}},{key:"getContentMarked",value:function e(){return this.artalk.marked(this.data.content)}},{key:"getDateFormatted",value:function e(){return c["default"].timeAgo(new Date(this.data.date))}},{key:"getUserUaBrowser",value:function e(){var t=(0,s["default"])(this.data.ua);return"".concat(t.browser," ").concat(t.version)}},{key:"getUserUaOS",value:function e(){var t=(0,s["default"])(this.data.ua);return"".concat(t.os," ").concat(t.osVersion)}},{key:"playFadeInAnim",value:function e(){this.artalk.ui.playFadeInAnim(this.elem)}},{key:"adminCollapse",value:function e(n){var a=this;if(n.classList.contains("artalk-in-process"))return;var r=n.innerText;var i=!this.data.is_collapsed;this.artalk.request("CommentCollapse",{id:this.data.id,nick:this.artalk.user.data.nick,email:this.artalk.user.data.email,password:this.artalk.user.data.password,is_collapsed:Number(i)},function(){n.classList.add("artalk-in-process");n.innerText=i?"折叠中...":"展开中..."},function(){},function(e,t){n.classList.remove("artalk-in-process");a.data.is_collapsed=t.is_collapsed;a.artalk.eachComment([a],function(e){e.data.is_allow_reply=!t.is_collapsed});a.refreshUI();a.artalk.ui.playFadeInAnim(a.bodyEl);a.list.refreshUI()},function(e,t){n.classList.add("artalk-error");n.innerText=i?"折叠失败":"展开失败";setTimeout(function(){n.innerText=r;n.classList.remove("artalk-error");n.classList.remove("artalk-in-process")},2e3)})}},{key:"adminDelete",value:function e(n){var a=this;if(n.classList.contains("artalk-in-process"))return;var t=Number(n.getAttribute("data-btn-clicked")||1);if(t<2){if(t===1){var r=n.innerText;n.innerText="确认删除";setTimeout(function(){n.innerText=r;n.setAttribute("data-btn-clicked","")},2e3);n.setAttribute("data-btn-clicked",String(t+1))}return}var i=n.innerText;this.artalk.request("CommentDel",{id:this.data.id,nick:this.artalk.user.data.nick,email:this.artalk.user.data.email,password:this.artalk.user.data.password},function(){n.classList.add("artalk-in-process");n.innerText="删除中..."},function(){},function(e,t){n.innerText=i;a.artalk.deleteComment(a);a.list.data.total-=1;a.list.refreshUI();n.classList.remove("artalk-in-process")},function(e,t){n.classList.add("artalk-error");n.innerText="删除失败";setTimeout(function(){n.innerText=i;n.classList.remove("artalk-error");n.classList.remove("artalk-in-process")},2e3)})}}]);return i}(o["default"]);(e["default"]=p).displayName="Comment",h.exports=m.default})?e.apply(m,t):e)||(h.exports=n)},function(t,e){function n(e){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?t.exports=n=function(e){return typeof e}:t.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}t.exports=n},function(e,t,p){var n,a,r;a=[t,p(0),p(2),p(3),p(4),p(5),p(6),p(7)],void 0===(r="function"==typeof(n=function(e,l,t,n,r,i,a,s){"use strict";var o=p(1);function c(a){return function(){var e=(0,i["default"])(a),t;if(u()){var n=(0,i["default"])(this).constructor;t=Reflect.construct(e,arguments,n)}else{t=e.apply(this,arguments)}return(0,r["default"])(this,t)}}function u(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Date.prototype.toString.call(Reflect.construct(Date,[],function(){}));return true}catch(e){return false}}Object.defineProperty(e,"__esModule",{value:true}),e["default"]=f,e.Layer=void 0,l=o(l),t=o(t),n=o(n),r=o(r),i=o(i),a=o(a),s=o(s);var d=function(e){(0,n["default"])(i,e);var r=c(i);function i(e,t,n){var a;(0,l["default"])(this,i);a=r.call(this,e);a.name=t;a.maskClickHideEnable=true;a.initWrap();a.el=a.wrapEl.querySelector('[data-layer-name="'.concat(t,'"]'));if(a.el===null){if(!n){a.el=s["default"].createElement();a.el.classList.add("artalk-layer-item")}else{a.el=n}}a.el.setAttribute("data-layer-name",t);a.el.style.display="none";a.wrapEl.prepend(a.el);return a}(0,t["default"])(i,[{key:"initWrap",value:function e(){this.wrapEl=document.querySelector(".artalk-layer-wrap");if(!this.wrapEl){this.wrapEl=s["default"].createElement('');document.body.appendChild(this.wrapEl)}this.maskEl=this.wrapEl.querySelector(".artalk-layer-mask")}},{key:"getName",value:function e(){return this.name}},{key:"getWrapEl",value:function e(){return this.wrapEl}},{key:"getEl",value:function e(){return this.el}},{key:"show",value:function e(){var t=this;i.hideTimeoutList.forEach(function(e){clearTimeout(e)});i.hideTimeoutList=[];this.wrapEl.style.display="block";this.maskEl.style.display="block";this.maskEl.classList.add("artalk-fade-in");this.el.style.display="";this.maskEl.onclick=function(){if(t.maskClickHideEnable)t.hide()};document.body.style.overflow="hidden"}},{key:"hide",value:function e(){var t=this;i.hideTimeoutList.push(setTimeout(function(){t.wrapEl.style.display="none";document.body.style.overflow=""},450));this.wrapEl.classList.add("artalk-fade-out");i.hideTimeoutList.push(setTimeout(function(){t.wrapEl.style.display="none";t.wrapEl.classList.remove("artalk-fade-out")},200));this.el.style.display="none"}},{key:"setMaskClickHide",value:function e(t){this.maskClickHideEnable=t}},{key:"dispose",value:function e(){this.hide();this.el.remove();this.el=null}}]);return i}(a["default"]);function f(e,t,n){return new d(e,t,n)}(e.Layer=d).displayName="Layer",d.hideTimeoutList=[]})?n.apply(t,a):n)||(e.exports=r)},function(e,t){var n={utf8:{stringToBytes:function(e){return n.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(n.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],n=0;n https://artalk.js.org\n"+"> https://github.com/qwqcode/Artalk\n"+"> https://qwqaq.com\n","color: #FFF; background: #1DAAFF; padding:5px 0;","color: #FFF; background: #656565; padding:5px 0;","");this.conf=Object.assign(Object.assign({},h),e);try{this.el=document.querySelector(this.conf.el);if(this.el===null){throw Error('Sorry, Target element "'.concat(this.conf.el,'" was not found.'))}}catch(e){console.error(e);throw new Error("Artalk config `el` error")}this.el.classList.add("artalk");this.el.setAttribute("artalk-run-id",this.runId.toString());if(this.el.innerHTML.trim()!=="")this.el.innerHTML="";this.ui=new d["default"](this);this.user=new r["default"](this);this.checker=new i["default"](this);this.initMarked();this.editor=new o["default"](this);this.list=new c["default"](this);this.sidebar=new u["default"](this);this.list.reqComments();window.addEventListener("hashchange",function(){t.checkGoToCommentByUrlHash()})}(0,t["default"])(n,[{key:"eachComment",value:function e(t,n){var a=this;if(t.length===0)return;t.every(function(e){if(n(e,t)===false)return false;a.eachComment(e.getChildren(),n);return true})}},{key:"findComment",value:function e(t){var n=null;this.eachComment(this.comments,function(e){if(e.data.id===t){n=e;return false}return true});return n}},{key:"getCommentCount",value:function e(){var t=0;this.eachComment(this.comments,function(){t++});return t}},{key:"deleteComment",value:function e(t){var n;if(typeof t==="number"){n=this.findComment(t);if(!n)throw Error("未找到评论 ".concat(t))}else n=t;n.getElem().remove();this.eachComment(this.comments,function(e,t){if(e===n){t.splice(t.indexOf(e),1);return false}return true})}},{key:"clearComments",value:function e(){this.list.commentsWrapEl.innerHTML="";this.list.data=undefined;this.comments=[]}},{key:"request",value:function e(t,n,a,r,i,l){a();n=Object.assign({action:t},n);var s=new FormData;Object.keys(n).forEach(function(e){return s.set(e,n[e])});var o=new XMLHttpRequest;o.timeout=5e3;o.open("POST",this.conf.serverUrl,true);o.onload=function(){r();if(o.status>=200&&o.status<400){var e=JSON.parse(o.response);if(e.success){i(e.msg,e.data)}else{l(e.msg,e.data)}}else{l("服务器响应错误 Code: ".concat(o.status),{})}};o.onerror=function(){r();l("网络错误",{})};o.send(s)}},{key:"checkGoToCommentByUrlHash",value:function e(){var t=Number(f["default"].getLocationParmByName("artalk_comment"));if(!t){var n=window.location.hash.match(/#artalk-comment-([0-9]+)/);if(!n||!n[1]||Number.isNaN(Number(n[1])))return;t=Number(n[1])}var a=this.findComment(t);if(!a&&this.list.hasMoreComments){this.list.readMore();return}if(!a){return}this.ui.scrollIntoView(a.getElem(),false);setTimeout(function(){a.getElem().classList.add("artalk-flash-once")},800)}},{key:"initMarked",value:function e(){var r=new l["default"].Renderer;var i=r.link;r.link=function(e,t,n){var a=i.call(r,e,t,n);return a.replace(/^ ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|\\n*|\\n*|)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:d,table:d,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};function o(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||g.defaults,this.rules=y.normal,this.options.pedantic?this.rules=y.pedantic:this.options.gfm&&(this.rules=y.gfm)}y._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,y._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,y.def=e(y.def).replace("label",y._label).replace("title",y._title).getRegex(),y.bullet=/(?:[*+-]|\d{1,9}\.)/,y.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,y.item=e(y.item,"gm").replace(/bull/g,y.bullet).getRegex(),y.list=e(y.list).replace(/bull/g,y.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+y.def.source+")").getRegex(),y._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",y._comment=//,y.html=e(y.html,"i").replace("comment",y._comment).replace("tag",y._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),y.paragraph=e(y._paragraph).replace("hr",y.hr).replace("heading"," {0,3}#{1,6} +").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}|~{3,})[^`\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",y._tag).getRegex(),y.blockquote=e(y.blockquote).replace("paragraph",y.paragraph).getRegex(),y.normal=p({},y),y.gfm=p({},y.normal,{nptable:/^ *([^|\n ].*\|.*)\n *([-:]+ *\|[-| :]*)(?:\n((?:.*[^>\n ].*(?:\n|$))*)\n*|$)/,table:/^ *\|(.+)\n *\|?( *[-:]+[-| :]*)(?:\n((?: *[^>\n ].*(?:\n|$))*)\n*|$)/}),y.pedantic=p({},y.normal,{html:e("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",y._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:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,fences:d,paragraph:e(y.normal._paragraph).replace("hr",y.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",y.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()}),o.rules=y,o.lex=function(e,t){return new o(t).lex(e)},o.prototype.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n"),this.token(e,!0)},o.prototype.token=function(e,t){var n,a,r,i,l,s,o,c,u,d,f,p,h,m,g,k;for(e=e.replace(/^ +$/gm,"");e;)if((r=this.rules.newline.exec(e))&&(e=e.substring(r[0].length),1 ?/gm,""),this.token(r,t),this.tokens.push({type:"blockquote_end"});else if(r=this.rules.list.exec(e)){for(e=e.substring(r[0].length),o={type:"list_start",ordered:m=1<(i=r[2]).length,start:m?+i:"",loose:!1},this.tokens.push(o),n=!(c=[]),h=(r=r[0].match(this.rules.item)).length,f=0;f?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:d,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,strong:/^__([^\s_])__(?!_)|^\*\*([^\s*])\*\*(?!\*)|^__([^\s][\s\S]*?[^\s])__(?!_)|^\*\*([^\s][\s\S]*?[^\s])\*\*(?!\*)/,em:/^_([^\s_])_(?!_)|^\*([^\s*<\[])\*(?!\*)|^_([^\s<][\s\S]*?[^\s_])_(?!_|[^\spunctuation])|^_([^\s_<][\s\S]*?[^\s])_(?!_|[^\spunctuation])|^\*([^\s<"][\s\S]*?[^\s\*])\*(?!\*|[^\spunctuation])|^\*([^\s*"<\[][\s\S]*?[^\s])\*(?!\*)/,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:d,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\?@\\[^_{|}~",n.em=e(n.em).replace(/punctuation/g,n._punctuation).getRegex(),n._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,n._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,n._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])?)+(?![-_])/,n.autolink=e(n.autolink).replace("scheme",n._scheme).replace("email",n._email).getRegex(),n._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,n.tag=e(n.tag).replace("comment",y._comment).replace("attribute",n._attribute).getRegex(),n._label=/(?:\[[^\[\]]*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,n._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,n._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,n.link=e(n.link).replace("label",n._label).replace("href",n._href).replace("title",n._title).getRegex(),n.reflink=e(n.reflink).replace("label",n._label).getRegex(),n.normal=p({},n),n.pedantic=p({},n.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/,link:e(/^!?\[(label)\]\((.*?)\)/).replace("label",n._label).getRegex(),reflink:e(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",n._label).getRegex()}),n.gfm=p({},n.normal,{escape:e(n.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)~+/,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\/i.test(i[0])&&(this.inLink=!1),!this.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(i[0])?this.inRawBlock=!0:this.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(i[0])&&(this.inRawBlock=!1),e=e.substring(i[0].length),s+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(i[0]):b(i[0]):i[0];else if(i=this.rules.link.exec(e)){var o=h(i[2],"()");if(-1$/,"$1"),s+=this.outputLink(i,{href:u.escapes(a),title:u.escapes(r)}),this.inLink=!1}else if((i=this.rules.reflink.exec(e))||(i=this.rules.nolink.exec(e))){if(e=e.substring(i[0].length),t=(i[2]||i[1]).replace(/\s+/g," "),!(t=this.links[t.toLowerCase()])||!t.href){s+=i[0].charAt(0),e=i[0].substring(1)+e;continue}this.inLink=!0,s+=this.outputLink(i,t),this.inLink=!1}else if(i=this.rules.strong.exec(e))e=e.substring(i[0].length),s+=this.renderer.strong(this.output(i[4]||i[3]||i[2]||i[1]));else if(i=this.rules.em.exec(e))e=e.substring(i[0].length),s+=this.renderer.em(this.output(i[6]||i[5]||i[4]||i[3]||i[2]||i[1]));else if(i=this.rules.code.exec(e))e=e.substring(i[0].length),s+=this.renderer.codespan(b(i[2].trim(),!0));else if(i=this.rules.br.exec(e))e=e.substring(i[0].length),s+=this.renderer.br();else if(i=this.rules.del.exec(e))e=e.substring(i[0].length),s+=this.renderer.del(this.output(i[1]));else if(i=this.rules.autolink.exec(e))e=e.substring(i[0].length),a="@"===i[2]?"mailto:"+(n=b(this.mangle(i[1]))):n=b(i[1]),s+=this.renderer.link(a,null,n);else if(this.inLink||!(i=this.rules.url.exec(e))){if(i=this.rules.text.exec(e))e=e.substring(i[0].length),this.inRawBlock?s+=this.renderer.text(this.options.sanitize?this.options.sanitizer?this.options.sanitizer(i[0]):b(i[0]):i[0]):s+=this.renderer.text(b(this.smartypants(i[0])));else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0))}else{if("@"===i[2])a="mailto:"+(n=b(i[0]));else{for(;l=i[0],i[0]=this.rules._backpedal.exec(i[0])[0],l!==i[0];);n=b(i[0]),a="www."===i[1]?"http://"+n:n}e=e.substring(i[0].length),s+=this.renderer.link(a,null,n)}return s},u.escapes=function(e){return e?e.replace(u.rules._escapes,"$1"):e},u.prototype.outputLink=function(e,t){var n=t.href,a=t.title?b(t.title):null;return"!"!==e[0].charAt(0)?this.renderer.link(n,a,this.output(e[1])):this.renderer.image(n,a,b(e[1]))},u.prototype.smartypants=function(e){return this.options.smartypants?e.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…"):e},u.prototype.mangle=function(e){if(!this.options.mangle)return e;for(var t,n="",a=e.length,r=0;r'+(n?e:b(e,!0))+"\n":"
"+(n?e:b(e,!0))+"
"},a.prototype.blockquote=function(e){return"
\n"+e+"
\n"},a.prototype.html=function(e){return e},a.prototype.heading=function(e,t,n,a){return this.options.headerIds?"'+e+"\n":""+e+"\n"},a.prototype.hr=function(){return this.options.xhtml?"
\n":"
\n"},a.prototype.list=function(e,t,n){var a=t?"ol":"ul";return"<"+a+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"\n"},a.prototype.listitem=function(e){return"
  • "+e+"
  • \n"},a.prototype.checkbox=function(e){return" "},a.prototype.paragraph=function(e){return"

    "+e+"

    \n"},a.prototype.table=function(e,t){return"\n\n"+e+"\n"+(t=t&&""+t+"")+"
    \n"},a.prototype.tablerow=function(e){return"\n"+e+"\n"},a.prototype.tablecell=function(e,t){var n=t.header?"th":"td";return(t.align?"<"+n+' align="'+t.align+'">':"<"+n+">")+e+"\n"},a.prototype.strong=function(e){return""+e+""},a.prototype.em=function(e){return""+e+""},a.prototype.codespan=function(e){return""+e+""},a.prototype.br=function(){return this.options.xhtml?"
    ":"
    "},a.prototype.del=function(e){return""+e+""},a.prototype.link=function(e,t,n){if(null===(e=i(this.options.sanitize,this.options.baseUrl,e)))return n;var a='
    "},a.prototype.image=function(e,t,n){if(null===(e=i(this.options.sanitize,this.options.baseUrl,e)))return n;var a=''+n+'":">"},a.prototype.text=function(e){return e},r.prototype.strong=r.prototype.em=r.prototype.codespan=r.prototype.del=r.prototype.text=function(e){return e},r.prototype.link=r.prototype.image=function(e,t,n){return""+n},r.prototype.br=function(){return""},c.parse=function(e,t){return new c(t).parse(e)},c.prototype.parse=function(e){this.inline=new u(e.links,this.options),this.inlineText=new u(e.links,p({},this.options,{renderer:new r})),this.tokens=e.reverse();for(var t="";this.next();)t+=this.tok();return t},c.prototype.next=function(){return this.token=this.tokens.pop(),this.token},c.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0},c.prototype.parseText=function(){for(var e=this.token.text;"text"===this.peek().type;)e+="\n"+this.next().text;return this.inline.output(e)},c.prototype.tok=function(){switch(this.token.type){case"space":return"";case"hr":return this.renderer.hr();case"heading":return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,f(this.inlineText.output(this.token.text)),this.slugger);case"code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);case"table":var e,t,n,a,r="",i="";for(n="",e=0;e?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(t))for(var n=t;this.seen[n]++,t=n+"-"+this.seen[n],this.seen.hasOwnProperty(t););return this.seen[t]=0,t},b.escapeTest=/[&<>"']/,b.escapeReplace=/[&<>"']/g,b.replacements={"&":"&","<":"<",">":">",'"':""","'":"'"},b.escapeTestNoEncode=/[<>"']|&(?!#?\w+;)/,b.escapeReplaceNoEncode=/[<>"']|&(?!#?\w+;)/g;var l={},s=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function d(){}function p(e){for(var t,n,a=1;at)n.splice(t);else for(;n.lengthAn error occurred:

    "+b(e.message+"",!0)+"
    ";throw e}}d.exec=d,g.options=g.setOptions=function(e){return p(g.defaults,e),g},g.defaults=(g.getDefaults=function(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:new a,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,xhtml:!1}})(),g.Parser=c,g.parser=c.parse,g.Renderer=a,g.TextRenderer=r,g.Lexer=o,g.lexer=o.lex,g.InlineLexer=u,g.inlineLexer=u.output,g.Slugger=t,g.parse=g,k.exports=g}()}).call(this,t(17))},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){e.exports=function(){"use strict";function e(e,t){return t={exports:{}},e(t,t.exports),t.exports}var o=e(function(e){"use strict";var t=e.exports=function(){return new RegExp("(?:"+t.line().source+")|(?:"+t.block().source+")","gm")};t.line=function(){return/(?:^|\s)\/\/(.+?)$/gm};t.block=function(){return/\/\*([\S\s]*?)\*\//gm}}),c=["23AC69","91C132","F19726","E8552D","1AAB8E","E1147F","2980C1","1BA1E6","9FA0A0","F19726","E30B20","E30B20","A3338B"],t;function u(e){return''+e+""}return function(e,t){if(t===void 0)t={};var i=t.colors;if(i===void 0)i=c;var l=0;var s={};var n=/[\u4E00-\u9FFF\u3400-\u4dbf\uf900-\ufaff\u3040-\u309f\uac00-\ud7af\u0400-\u04FF]+|\w+/;var a=/'+t+"";l=++l%i.length;return r})}}()},function(d,f,p){var e,t,n;t=[f,p(0),p(2),p(3),p(4),p(5),p(6)],void 0===(n="function"==typeof(e=function(e,i,t,n,r,l,a){"use strict";var s=p(1);function o(a){return function(){var e=(0,l["default"])(a),t;if(c()){var n=(0,l["default"])(this).constructor;t=Reflect.construct(e,arguments,n)}else{t=e.apply(this,arguments)}return(0,r["default"])(this,t)}}function c(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Date.prototype.toString.call(Reflect.construct(Date,[],function(){}));return true}catch(e){return false}}Object.defineProperty(e,"__esModule",{value:true}),e["default"]=void 0,i=s(i),t=s(t),n=s(n),r=s(r),l=s(l);var u=function(e){(0,n["default"])(r,e);var a=o(r);function r(e){var t;(0,i["default"])(this,r);t=a.call(this,e);var n=JSON.parse(window.localStorage.getItem("ArtalkUser")||"{}");t.data={nick:n.nick||"",email:n.email||"",link:n.link||"",password:n.password||"",isAdmin:n.isAdmin||false};return t}(0,t["default"])(r,[{key:"save",value:function e(){window.localStorage.setItem("ArtalkUser",JSON.stringify(this.data))}},{key:"checkHasBasicUserInfo",value:function e(){return!!this.data.nick&&!!this.data.email}}]);return r}((a=s(a))["default"]);(e["default"]=u).displayName="User",d.exports=f.default})?e.apply(f,t):e)||(d.exports=n)},function(n,e){function a(e,t){return n.exports=a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},a(e,t)}n.exports=a},function(d,h,m){var e,t,n;t=[h,m(0),m(2),m(3),m(4),m(5),m(6),m(7),m(11)],void 0===(n="function"==typeof(e=function(e,a,r,i,l,s,t,f,p){"use strict";var n=m(1);function o(a){return function(){var e=(0,s["default"])(a),t;if(c()){var n=(0,s["default"])(this).constructor;t=Reflect.construct(e,arguments,n)}else{t=e.apply(this,arguments)}return(0,l["default"])(this,t)}}function c(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Date.prototype.toString.call(Reflect.construct(Date,[],function(){}));return true}catch(e){return false}}Object.defineProperty(e,"__esModule",{value:true}),e["default"]=void 0,a=n(a),r=n(r),i=n(i),l=n(l),s=n(s),t=n(t),f=n(f),p=n(p);var u=function(e){(0,i["default"])(n,e);var t=o(n);function n(){var r;(0,a["default"])(this,n);r=t.apply(this,arguments);r.LIST={"管理员":{body:function e(){return f["default"].createElement("敲入密码来验证管理员身份:")},reqAct:"AdminCheck",reqObj:function e(t){return{nick:r.artalk.user.data.nick,email:r.artalk.user.data.email,password:t}},onSuccess:function e(t,n,a){r.artalk.user.data.isAdmin=true;r.artalk.user.data.password=a;r.artalk.user.save()}},"验证码":{body:function e(){var t=f["default"].createElement('验证码敲入验证码继续:'));r.LIST["验证码"].elem=t;t.querySelector(".artalk-captcha-img").onclick=function(){r.LIST["验证码"].refresh()};return t},reqAct:"CaptchaCheck",reqObj:function e(t){return{captcha:t}},onSuccess:function e(t,n,a){r.submitCaptchaVal=a},refresh:function e(t){var n=r.LIST["验证码"].elem;var a=n.querySelector(".artalk-captcha-img");if(!t){r.artalk.request("CaptchaCheck",{refresh:true},function(){},function(){},function(e,t){a.setAttribute("src",t.img_data)},function(){})}else{a.setAttribute("src",t)}}}};return r}(0,r["default"])(n,[{key:"action",value:function e(l,s){var o=this;var c=this.LIST[l];var t=f["default"].createElement();t.appendChild(c.body());var u=f["default"].createElement(''));t.appendChild(u);setTimeout(function(){u.focus()},80);var d=(0,p["default"])(this.artalk,"checker-".concat((new Date).getTime()));d.setMaskClickHide(false);d.show();u.onkeyup=function(e){if(e.keyCode===13){e.preventDefault();d.getEl().querySelector('button[data-action="confirm"]').click()}};this.artalk.ui.showDialog(d.getEl(),t,function(e,n){var a=u.value.trim();var t=n.innerText;var r=function e(t){n.innerText=t;n.classList.add("error")};var i=function e(){n.innerText=t;n.classList.remove("error")};o.artalk.request(c.reqAct,c.reqObj(a),function(){n.innerText="加载中..."},function(){},function(e,t){c.onSuccess(e,t,a);d.dispose();s()},function(e,t){r(e);if(l==="验证码"){c.refresh(t.img_data)}var n=setTimeout(function(){i()},3e3);u.onfocus=function(){i();clearTimeout(n)}});return false},function(){d.dispose();return false})}}]);return n}(t["default"]);(e["default"]=u).displayName="Checker",d.exports=h.default})?e.apply(h,t):e)||(d.exports=n)},function(v,y,b){var e,t,n;t=[y,b(10),b(0),b(2),b(8),b(3),b(4),b(5),b(23),b(9),b(27),b(36),b(6),b(7)],void 0===(n="function"==typeof(e=function(e,r,i,t,l,s,o,c,n,u,d,f,a,p){"use strict";var h=b(1);function m(a){return function(){var e=(0,c["default"])(a),t;if(g()){var n=(0,c["default"])(this).constructor;t=Reflect.construct(e,arguments,n)}else{t=e.apply(this,arguments)}return(0,o["default"])(this,t)}}function g(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Date.prototype.toString.call(Reflect.construct(Date,[],function(){}));return true}catch(e){return false}}Object.defineProperty(e,"__esModule",{value:true}),e["default"]=void 0,r=h(r),i=h(i),t=h(t),l=h(l),s=h(s),o=h(o),c=h(c),u=h(u),d=h(d),f=h(f),a=h(a),p=h(p);var k=function(e){(0,s["default"])(a,e);var n=m(a);function a(e){var t;(0,i["default"])(this,a);t=n.call(this,e);t.LOADABLE_PLUG_LIST=[d["default"],f["default"]];t.plugList={};t.openedPlugName=null;t.el=p["default"].createElement(b(38)((0,l["default"])(t)));t.artalk.el.appendChild(t.el);t.headerEl=t.el.querySelector(".artalk-editor-header");t.textareaWrapEl=t.el.querySelector(".artalk-editor-textarea-wrap");t.textareaEl=t.el.querySelector(".artalk-editor-textarea");t.closeCommentEl=t.el.querySelector(".artalk-close-comment");t.plugWrapEl=t.el.querySelector(".artalk-editor-plug-wrap");t.bottomEl=t.el.querySelector(".artalk-editor-bottom");t.bottomPartLeftEl=t.el.querySelector(".artalk-editor-bottom-part.artalk-left");t.plugSwitcherWrapEl=t.el.querySelector(".artalk-editor-plug-switcher-wrap");t.bottomPartRightEl=t.el.querySelector(".artalk-editor-bottom-part.artalk-right");t.submitBtn=t.el.querySelector(".artalk-send-btn");t.notifyWrapEl=t.el.querySelector(".artalk-editor-notify-wrap");t.initLocalStorage();t.initHeader();t.initTextarea();t.initEditorPlug();t.initBottomPart();return t}(0,t["default"])(a,[{key:"initLocalStorage",value:function e(){var t=this;var n=window.localStorage.getItem("ArtalkContent")||"";if(n.trim()!==""){this.showNotify("已自动恢复","i");this.setContent(n)}this.textareaEl.addEventListener("input",function(){t.saveContent()})}},{key:"initHeader",value:function e(){var a=this;Object.keys(this.user.data).forEach(function(t){var n=a.headerEl.querySelector('[name="'.concat(t,'"]'));if(n!==null&&n instanceof HTMLInputElement){n.value=a.user.data[t]||"";n.addEventListener("input",function(e){a.user.data[t]=n.value.trim();if(t!=="link"){a.user.data.password="";a.user.data.isAdmin=false;if(a.user.checkHasBasicUserInfo()&&a.artalk.list.checkNickEmailIsAdmin(a.user.data.nick,a.user.data.email)){a.artalk.checker.action("管理员",function(){a.artalk.list.refreshUI()})}}a.saveUser();a.artalk.list.refreshUI()})}})}},{key:"saveUser",value:function e(){this.user.save()}},{key:"saveContent",value:function e(){window.localStorage.setItem("ArtalkContent",this.getContentOriginal().trim())}},{key:"initTextarea",value:function e(){var n=this;this.textareaEl.addEventListener("keydown",function(e){var t=e.keyCode||e.which;if(t===9){e.preventDefault();n.insertContent("\t")}});this.textareaEl.addEventListener("input",function(e){n.adjustTextareaHeight()})}},{key:"adjustTextareaHeight",value:function e(){var t=this.textareaEl.offsetHeight-this.textareaEl.clientHeight;this.textareaEl.style.height="0px";this.textareaEl.style.height="".concat(this.textareaEl.scrollHeight+t,"px")}},{key:"initEditorPlug",value:function e(){var a=this;this.plugList={};this.plugWrapEl.innerHTML="";this.plugWrapEl.style.display="none";this.openedPlugName=null;this.plugSwitcherWrapEl.innerHTML="";this.LOADABLE_PLUG_LIST.forEach(function(e){var n=new e(a);a.plugList[n.getName()]=n;var t=p["default"].createElement(''.concat(n.getBtnHtml(),""));a.plugSwitcherWrapEl.appendChild(t);t.addEventListener("click",function(){a.plugSwitcherWrapEl.querySelectorAll(".active").forEach(function(e){return e.classList.remove("active")});if(n.getName()===a.openedPlugName){n.onHide();a.plugWrapEl.style.display="none";a.openedPlugName=null;return}if(a.plugWrapEl.querySelector('[data-plug-name="'.concat(n.getName(),'"]'))===null){var e=n.getElem();e.setAttribute("data-plug-name",n.getName());e.style.display="none";a.plugWrapEl.appendChild(e)}Array.from(a.plugWrapEl.children).forEach(function(e){var t=e.getAttribute("data-plug-name");if(t===n.getName()){e.style.display="";a.plugList[t].onShow()}else{e.style.display="none";a.plugList[t].onHide()}});a.plugWrapEl.style.display="";a.openedPlugName=n.getName();t.classList.add("active")})})}},{key:"closePlug",value:function e(){this.plugWrapEl.innerHTML="";this.plugWrapEl.style.display="none";this.openedPlugName=null}},{key:"insertContent",value:function e(t){if(document.selection){this.textareaEl.focus();document.selection.createRange().text=t;this.textareaEl.focus()}else if(this.textareaEl.selectionStart||this.textareaEl.selectionStart===0){var n=this.textareaEl.selectionStart;var a=this.textareaEl.selectionEnd;var r=this.textareaEl.scrollTop;this.setContent(this.textareaEl.value.substring(0,n)+t+this.textareaEl.value.substring(a,this.textareaEl.value.length));this.textareaEl.focus();this.textareaEl.selectionStart=n+t.length;this.textareaEl.selectionEnd=n+t.length;this.textareaEl.scrollTop=r}else{this.textareaEl.focus();this.textareaEl.value+=t}}},{key:"setContent",value:function e(t){this.textareaEl.value=t;this.saveContent();if(!!this.plugList&&!!this.plugList.preview){this.plugList.preview.updateContent()}this.adjustTextareaHeight()}},{key:"clearEditor",value:function e(){this.setContent("");this.cancelReply()}},{key:"getContent",value:function e(){var t=this.getContentOriginal();if(this.plugList&&this.plugList.emoticons){var n=this.plugList.emoticons;t=n.transEmoticonImageText(t)}return t}},{key:"getContentOriginal",value:function e(){return this.textareaEl.value||""}},{key:"getContentMarked",value:function e(){return this.artalk.marked(this.getContent())}},{key:"initBottomPart",value:function e(){this.initReply();this.initSubmit()}},{key:"initReply",value:function e(){this.replyComment=null;this.sendReplyEl=null}},{key:"setReply",value:function e(t){var n=this;if(this.replyComment!==null){this.cancelReply()}if(this.sendReplyEl===null){this.sendReplyEl=p["default"].createElement('
    ×
    ');this.sendReplyEl.querySelector(".artalk-text").innerText="@".concat(t.data.nick);this.sendReplyEl.querySelector(".artalk-cancel").addEventListener("click",function(){n.cancelReply()});this.textareaWrapEl.appendChild(this.sendReplyEl)}this.replyComment=t;this.artalk.ui.scrollIntoView(this.el);this.textareaEl.focus()}},{key:"cancelReply",value:function e(){if(this.sendReplyEl!==null){this.sendReplyEl.remove();this.sendReplyEl=null}this.replyComment=null}},{key:"getReplyComment",value:function e(){return this.replyComment}},{key:"initSubmit",value:function e(){var n=this;this.submitBtn.addEventListener("click",function(e){var t=e.currentTarget;n.submit()})}},{key:"submit",value:function e(){var a=this;if(this.getContent().trim()===""){this.textareaEl.focus();return}this.artalk.request("CommentAdd",{content:this.getContent(),nick:this.user.data.nick,email:this.user.data.email,link:this.user.data.link,rid:this.getReplyComment()===null?0:this.getReplyComment().data.id,page_key:this.artalk.conf.pageKey,password:this.user.data.password,captcha:this.artalk.checker.submitCaptchaVal||""},function(){a.artalk.ui.showLoading(a.el)},function(){a.artalk.ui.hideLoading(a.el)},function(e,t){var n=new u["default"](a.artalk,a.artalk.list,t.comment);if(a.getReplyComment()!==null){a.getReplyComment().putChild(n)}else{a.artalk.list.putRootComment(n)}a.clearEditor();a.artalk.ui.scrollIntoView(n.getElem());n.playFadeInAnim();a.artalk.list.data.total+=1;a.artalk.list.refreshUI()},function(e,t){if((0,r["default"])(t)==="object"&&t!==null&&typeof t.need_password==="boolean"&&t.need_password===true){a.artalk.checker.action("管理员",function(){a.submit()})}else if((0,r["default"])(t)==="object"&&t!==null&&typeof t.need_captcha==="boolean"&&t.need_captcha===true){a.artalk.checker.submitCaptchaImgData=t.img_data;a.artalk.checker.action("验证码",function(){a.submit()})}else{a.showNotify("评论失败,".concat(e),"e")}})}},{key:"showNotify",value:function e(t,n){this.artalk.ui.showNotify(t,n,this.notifyWrapEl)}},{key:"closeComment",value:function e(){this.closeCommentEl.style.display="";if(!this.artalk.user.data.isAdmin){this.textareaEl.style.display="none";this.closePlug();this.bottomEl.style.display="none"}else{this.textareaEl.style.display="";this.bottomEl.style.display=""}}},{key:"openComment",value:function e(){this.closeCommentEl.style.display="none";this.textareaEl.style.display="";this.bottomEl.style.display=""}},{key:"user",get:function e(){return this.artalk.user}}]);return a}(a["default"]);(e["default"]=k).displayName="Editor",v.exports=y.default})?e.apply(y,t):e)||(v.exports=n)},function(e,t,n){},function(e,t,n){},function(r,i,e){var t,n,a;n=[i],void 0===(a="function"==typeof(t=function(e){"use strict";Object.defineProperty(e,"__esModule",{value:true}),e["default"]=void 0;var u=window||{},d=navigator||{};function t(e){var a=e||d.userAgent;var t=this;var n={Trident:a.indexOf("Trident")>-1||a.indexOf("NET CLR")>-1,Presto:a.indexOf("Presto")>-1,WebKit:a.indexOf("AppleWebKit")>-1,Gecko:a.indexOf("Gecko/")>-1,Safari:a.indexOf("Safari")>-1,Chrome:a.indexOf("Chrome")>-1||a.indexOf("CriOS")>-1,IE:a.indexOf("MSIE")>-1||a.indexOf("Trident")>-1,Edge:a.indexOf("Edge")>-1,Firefox:a.indexOf("Firefox")>-1||a.indexOf("FxiOS")>-1,"Firefox Focus":a.indexOf("Focus")>-1,Chromium:a.indexOf("Chromium")>-1,Opera:a.indexOf("Opera")>-1||a.indexOf("OPR")>-1,Vivaldi:a.indexOf("Vivaldi")>-1,Yandex:a.indexOf("YaBrowser")>-1,Kindle:a.indexOf("Kindle")>-1||a.indexOf("Silk/")>-1,360:a.indexOf("360EE")>-1||a.indexOf("360SE")>-1,UC:a.indexOf("UC")>-1||a.indexOf(" UBrowser")>-1,QQBrowser:a.indexOf("QQBrowser")>-1,QQ:a.indexOf("QQ/")>-1,Baidu:a.indexOf("Baidu")>-1||a.indexOf("BIDUBrowser")>-1,Maxthon:a.indexOf("Maxthon")>-1,Sogou:a.indexOf("MetaSr")>-1||a.indexOf("Sogou")>-1,LBBROWSER:a.indexOf("LBBROWSER")>-1,"2345Explorer":a.indexOf("2345Explorer")>-1,TheWorld:a.indexOf("TheWorld")>-1,XiaoMi:a.indexOf("MiuiBrowser")>-1,Quark:a.indexOf("Quark")>-1,Qiyu:a.indexOf("Qiyu")>-1,Wechat:a.indexOf("MicroMessenger")>-1,Taobao:a.indexOf("AliApp(TB")>-1,Alipay:a.indexOf("AliApp(AP")>-1,Weibo:a.indexOf("Weibo")>-1,Douban:a.indexOf("com.douban.frodo")>-1,Suning:a.indexOf("SNEBUY-APP")>-1,iQiYi:a.indexOf("IqiyiApp")>-1,Windows:a.indexOf("Windows")>-1,Linux:a.indexOf("Linux")>-1||a.indexOf("X11")>-1,"Mac OS":a.indexOf("Macintosh")>-1,Android:a.indexOf("Android")>-1||a.indexOf("Adr")>-1,Ubuntu:a.indexOf("Ubuntu")>-1,FreeBSD:a.indexOf("FreeBSD")>-1,Debian:a.indexOf("Debian")>-1,"Windows Phone":a.indexOf("IEMobile")>-1||a.indexOf("Windows Phone")>-1,BlackBerry:a.indexOf("BlackBerry")>-1||a.indexOf("RIM")>-1,MeeGo:a.indexOf("MeeGo")>-1,Symbian:a.indexOf("Symbian")>-1,iOS:a.indexOf("like Mac OS X")>-1,"Chrome OS":a.indexOf("CrOS")>-1,WebOS:a.indexOf("hpwOS")>-1,Mobile:a.indexOf("Mobi")>-1||a.indexOf("iPh")>-1||a.indexOf("480")>-1,Tablet:a.indexOf("Tablet")>-1||a.indexOf("Pad")>-1||a.indexOf("Nexus 7")>-1};if(n.Mobile){n.Mobile=!(a.indexOf("iPad")>-1)}else if(u.showModalDialog&&u.chrome){n["360"]=true}var r={engine:["WebKit","Trident","Gecko","Presto"],browser:["Safari","Chrome","Edge","IE","Firefox","Firefox Focus","Chromium","Opera","Vivaldi","Yandex","Kindle","360","UC","QQBrowser","QQ","Baidu","Maxthon","Sogou","LBBROWSER","2345Explorer","TheWorld","XiaoMi","Quark","Qiyu","Wechat","Taobao","Alipay","Weibo","Douban","Suning","iQiYi"],os:["Windows","Linux","Mac OS","Android","Ubuntu","FreeBSD","Debian","iOS","Windows Phone","BlackBerry","MeeGo","Symbian","Chrome OS","WebOS"],device:["Mobile","Tablet"]};t.device="PC";t.language=function(){var e=d.browserLanguage||d.language;var t=e.split("-");if(t[1]){t[1]=t[1].toUpperCase()}return t.join("_")}();for(var i in r){for(var l=0;l27){t.engine="Blink"}else if(t.browser==="Opera"&&parseInt(t.version)>12){t.engine="Blink"}else if(t.browser==="Yandex"){t.engine="Blink"}else if(t.browser===undefined){t.browser="Unknow App"}}function n(e){return new t(e)}var a=n;e["default"]=a,r.exports=i.default})?t.apply(i,n):t)||(r.exports=a)},function(module,exports){module.exports=function anonymous(locals,filters,escape,rethrow){escape=escape||function(e){return String(e).replace(/&/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,""")};var __stack={lineno:1,input:'
    \r\n
    \r\n \r\n
    \r\n
    \r\n \r\n href="<%= data.link %>"<% } %>><%= data.nick %>\r\n \r\n <% if (!!data.badge) { %>\r\n style="background-color: <%= data.badge.color %>"<% } %>>\r\n <%= data.badge.name || \'管理员\' %>\r\n \r\n <% } %>\r\n <%= getDateFormatted() %>\r\n <%= getUserUaBrowser() %>\r\n <%= getUserUaOS() %>\r\n
    \r\n
    \r\n
    <%- getContentMarked() %>
    \r\n <% if(!!data.is_collapsed) { %>\r\n
    \r\n 该评论已被系统或管理员折叠\r\n 查看内容\r\n
    \r\n <% } %>\r\n
    \r\n \r\n
    \r\n
    \r\n
    \r\n',filename:"."};function rethrow(e,t,n,a){var r=t.split("\n"),i=Math.max(a-3,0),l=Math.min(r.length,a+3),s=r.slice(i,l).map(function(e,t){var n=t+i+1;return(n==a?" >> ":" ")+n+"| "+e}).join("\n");throw e.path=n,e.message=(n||"ejs")+":"+a+"\n"+s+"\n\n"+e.message,e}try{var buf=[];with(locals||{})buf.push('
    \n
    \n
    \n \n \n \n
    \n
    \n
    \n \n ",escape((__stack.lineno=11,data.nick)),"\n \n "),__stack.lineno=13,data.badge&&(buf.push('\n \n ",escape((__stack.lineno=15,data.badge.name||"管理员")),"\n \n "),__stack.lineno=17),buf.push('\n ',escape((__stack.lineno=18,getDateFormatted())),'\n ',escape((__stack.lineno=19,getUserUaBrowser())),'\n ',escape((__stack.lineno=20,getUserUaOS())),'\n
    \n
    \n
    ',(__stack.lineno=23,getContentMarked()),"
    \n "),__stack.lineno=24,data.is_collapsed&&(buf.push('\n
    \n 该评论已被系统或管理员折叠\n 查看内容\n
    \n '),__stack.lineno=29),buf.push('\n
    \n \n
    \n
    \n
    \n');return buf.join("")}catch(e){rethrow(e,__stack.input,__stack.filename,__stack.lineno)}}},function(h,m,g){var e,t,n;t=[m,g(28),g(0),g(2),g(3),g(4),g(5),g(34),g(6),g(7)],void 0===(n="function"==typeof(e=function(e,i,r,t,l,s,o,n,a,c){"use strict";var u=g(1);function d(a){return function(){var e=(0,o["default"])(a),t;if(f()){var n=(0,o["default"])(this).constructor;t=Reflect.construct(e,arguments,n)}else{t=e.apply(this,arguments)}return(0,s["default"])(this,t)}}function f(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Date.prototype.toString.call(Reflect.construct(Date,[],function(){}));return true}catch(e){return false}}Object.defineProperty(e,"__esModule",{value:true}),e["default"]=void 0,i=u(i),r=u(r),t=u(t),l=u(l),s=u(s),o=u(o),a=u(a),c=u(c);var p=function(e){(0,l["default"])(a,e);var n=d(a);function a(e){var t;(0,r["default"])(this,a);t=n.call(this,e.artalk);t.editor=e;t.emoticons=t.artalk.conf.emoticons;t.initElem();return t}(0,t["default"])(a,[{key:"initElem",value:function e(){var i=this;this.elem=c["default"].createElement(g(35)(this));this.listWrapElem=this.elem.querySelector(".artalk-emoticons-list-wrap");this.typesElem=this.elem.querySelector(".artalk-emoticons-types");this.typesElem.querySelectorAll("span").forEach(function(e){e.addEventListener("click",function(e){var t=e.currentTarget;var n=t.getAttribute("data-key");if(n)i.openType(n)})});if(Object.keys(this.emoticons).length>0)this.openType(Object.keys(this.emoticons)[0]);this.listWrapElem.querySelectorAll(".artalk-emoticons-item").forEach(function(e){e.onclick=function(e){var t=e.currentTarget;var n=t.closest(".artalk-emoticons-list").getAttribute("data-input-type");var a=t.getAttribute("title");var r=t.getAttribute("data-content");if(n==="image"){i.editor.insertContent(":[".concat(a,"]"))}else{i.editor.insertContent(r)}}})}},{key:"openType",value:function e(t){Array.from(this.listWrapElem.children).forEach(function(e){if(e.getAttribute("data-key")!==t){e.style.display="none"}else{e.style.display=""}});this.typesElem.querySelectorAll("span.active").forEach(function(e){return e.classList.remove("active")});this.typesElem.querySelector('span[data-key="'.concat(t,'"]')).classList.add("active");this.changeListHeight()}},{key:"getName",value:function e(){return"emoticons"}},{key:"getBtnHtml",value:function e(){return"表情"}},{key:"getElem",value:function e(){return this.elem}},{key:"changeListHeight",value:function e(){}},{key:"onShow",value:function e(){var t=this;setTimeout(function(){t.changeListHeight()},30)}},{key:"onHide",value:function e(){this.elem.parentElement.style.height=""}},{key:"transEmoticonImageText",value:function e(r){Object.entries(this.emoticons).forEach(function(e){var t=(0,i["default"])(e,2),n=t[0],a=t[1];if(a.inputType!=="image")return;Object.entries(a.container).forEach(function(e){var t=(0,i["default"])(e,2),n=t[0],a=t[1];r=r.split(":[".concat(n,"]")).join("![".concat(n,"](").concat(a,") "))})});return r}}]);return a}(a["default"]);(e["default"]=p).displayName="EmoticonsPlug",h.exports=m.default})?e.apply(m,t):e)||(h.exports=n)},function(e,t,n){var a=n(29),r=n(30),i=n(31),l=n(33);e.exports=function(e,t){return a(e)||r(e,t)||i(e,t)||l()}},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],a=!0,r=!1,i=void 0;try{for(var l,s=e[Symbol.iterator]();!(a=(l=s.next()).done)&&(n.push(l.value),!t||n.length!==t);a=!0);}catch(e){r=!0,i=e}finally{try{a||null==s.return||s.return()}finally{if(r)throw i}}return n}}},function(e,t,n){var a=n(32);e.exports=function(e,t){if(e){if("string"==typeof e)return a(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(e,t):void 0}}},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n/g,">").replace(/'/g,"'").replace(/"/g,""")};var __stack={lineno:1,input:'
    \r\n
    \r\n <% for (var i in emoticons) { %>\r\n <% var item = emoticons[i] %>\r\n \r\n <% } %>\r\n
    \r\n
    \r\n <% var types = Object.keys(emoticons); %>\r\n <% for (var i in types) { %>\r\n <%= types[i] %>\r\n <% } %>\r\n
    \r\n
    \r\n',filename:"."};function rethrow(e,t,n,a){var r=t.split("\n"),i=Math.max(a-3,0),l=Math.min(r.length,a+3),s=r.slice(i,l).map(function(e,t){var n=t+i+1;return(n==a?" >> ":" ")+n+"| "+e}).join("\n");throw e.path=n,e.message=(n||"ejs")+":"+a+"\n"+s+"\n\n"+e.message,e}try{var buf=[];with(locals||{})!function(){for(var e in buf.push('
    \n
    \n '),__stack.lineno=3,emoticons){buf.push("\n "),__stack.lineno=4;var t=emoticons[e];for(var n in buf.push('\n \n "),__stack.lineno=17}buf.push('\n
    \n
    \n '),__stack.lineno=20;var r=Object.keys(emoticons);for(var e in buf.push("\n "),__stack.lineno=21,r)buf.push('\n ',escape((__stack.lineno=22,r[e])),"\n "),__stack.lineno=23;buf.push("\n
    \n
    \n")}();return buf.join("")}catch(e){rethrow(e,__stack.input,__stack.filename,__stack.lineno)}}},function(p,h,m){var e,t,n;t=[h,m(0),m(2),m(3),m(4),m(5),m(37),m(6),m(7)],void 0===(n="function"==typeof(e=function(e,r,t,i,l,s,n,a,o){"use strict";var c=m(1);function u(a){return function(){var e=(0,s["default"])(a),t;if(d()){var n=(0,s["default"])(this).constructor;t=Reflect.construct(e,arguments,n)}else{t=e.apply(this,arguments)}return(0,l["default"])(this,t)}}function d(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Date.prototype.toString.call(Reflect.construct(Date,[],function(){}));return true}catch(e){return false}}Object.defineProperty(e,"__esModule",{value:true}),e["default"]=void 0,r=c(r),t=c(t),i=c(i),l=c(l),s=c(s),a=c(a),o=c(o);var f=function(e){(0,i["default"])(a,e);var n=u(a);function a(e){var t;(0,r["default"])(this,a);t=n.call(this,e.artalk);t.editor=e;t.binded=false;t.initElem();return t}(0,t["default"])(a,[{key:"initElem",value:function e(){this.elem=o["default"].createElement('
    ');this.binded=false}},{key:"getName",value:function e(){return"preview"}},{key:"getBtnHtml",value:function e(){return'预览 '}},{key:"getElem",value:function e(){return this.elem}},{key:"onShow",value:function e(){var t=this;this.updateContent();if(!this.binded){var n=function e(){t.updateContent()};this.editor.textareaEl.addEventListener("input",n);this.editor.textareaEl.addEventListener("change",n);this.binded=true}}},{key:"onHide",value:function e(){}},{key:"updateContent",value:function e(){if(this.elem.style.display!=="none"){this.elem.innerHTML=this.editor.getContentMarked()}}}]);return a}(a["default"]);(e["default"]=f).displayName="PreviewPlug",p.exports=h.default})?e.apply(h,t):e)||(p.exports=n)},function(e,t,n){},function(module,exports){module.exports=function anonymous(locals,filters,escape,rethrow){escape=escape||function(e){return String(e).replace(/&/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,""")};var __stack={lineno:1,input:'
    \n
    \n \n \n \n
    \n
    \n \n \n
    \n \n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n',filename:"."};function rethrow(e,t,n,a){var r=t.split("\n"),i=Math.max(a-3,0),l=Math.min(r.length,a+3),s=r.slice(i,l).map(function(e,t){var n=t+i+1;return(n==a?" >> ":" ")+n+"| "+e}).join("\n");throw e.path=n,e.message=(n||"ejs")+":"+a+"\n"+s+"\n\n"+e.message,e}try{var buf=[];with(locals||{})buf.push('
    \n
    \n \n \n \n
    \n
    \n \n \n
    \n \n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n');return buf.join("")}catch(e){rethrow(e,__stack.input,__stack.filename,__stack.lineno)}}},function(g,k,v){var e,t,n;t=[k,v(0),v(2),v(8),v(3),v(4),v(5),v(40),v(43),v(9),v(6),v(7)],void 0===(n="function"==typeof(e=function(e,r,t,i,l,s,o,c,n,u,a,d){"use strict";var f=v(1);function p(a){return function(){var e=(0,o["default"])(a),t;if(h()){var n=(0,o["default"])(this).constructor;t=Reflect.construct(e,arguments,n)}else{t=e.apply(this,arguments)}return(0,s["default"])(this,t)}}function h(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Date.prototype.toString.call(Reflect.construct(Date,[],function(){}));return true}catch(e){return false}}Object.defineProperty(e,"__esModule",{value:true}),e["default"]=void 0,r=f(r),t=f(t),i=f(i),l=f(l),s=f(s),o=f(o),c=f(c),u=f(u),a=f(a),d=f(d);var m=function(e){(0,l["default"])(a,e);var n=p(a);function a(e){var t;(0,r["default"])(this,a);t=n.call(this,e);t.reqPageSize=15;t.isLoading=false;t.el=d["default"].createElement(v(44)((0,i["default"])(t)));t.artalk.el.appendChild(t.el);t.commentsWrapEl=t.el.querySelector(".artalk-list-comments-wrap");t.initListActionBtn();t.reqPageSize=t.artalk.conf.readMore?t.artalk.conf.readMore.pageSize||t.reqPageSize:t.reqPageSize;t.readMoreEl=t.el.querySelector(".artalk-list-read-more");t.readMoreLoadingEl=t.readMoreEl.querySelector(".artalk-loading-icon");t.readMoreTextEl=t.readMoreEl.querySelector(".artalk-text");t.readMoreEl.addEventListener("click",function(){t.readMore()});return t}(0,t["default"])(a,[{key:"reqComments",value:function e(){var r=this;var i=arguments.length>0&&arguments[0]!==undefined?arguments[0]:0;if(i===0){this.artalk.clearComments()}this.artalk.request("CommentGet",{page_key:this.artalk.conf.pageKey,limit:this.reqPageSize,offset:i},function(){r.isLoading=true;if(i===0)r.artalk.ui.showLoading();else r.readMoreBtnSetLoading(true)},function(){r.isLoading=false;if(i===0)r.artalk.ui.hideLoading();else r.readMoreBtnSetLoading(false)},function(e,t){r.data=Object.assign({},t);r.artalk.ui.setGlobalError(null);r.reqImportComments(t.comments);if(r.hasMoreComments)r.showReadMoreBtn();else r.hideReadMoreBtn();r.artalk.checkGoToCommentByUrlHash();if(i===0&&r.hasMoreComments){r.initScrollBottomAutoLoad()}},function(e,t){if(i===0){var n=d["default"].createElement("".concat(e,",无法获取评论列表数据
    "));var a=d["default"].createElement('点击重新获取');a.addEventListener("click",function(){r.reqComments(0)});n.appendChild(a);r.artalk.ui.setGlobalError(n)}else{r.readMoreBtnShowErr("".concat(e," 获取失败"))}})}},{key:"reqImportComments",value:function e(t){var r=this;if(!Array.isArray(t)){throw new Error("请求响应参数非数组")}var n=function n(a){var e=t.filter(function(e){return e.rid===a.data.id});if(e.length===0)return;e.forEach(function(e){var t=new u["default"](r.artalk,r,e);a.putChild(t);n(t)})};t.filter(function(e){return e.rid===0}).forEach(function(e){var t=new u["default"](r.artalk,r,e);r.artalk.comments.push(t);r.commentsWrapEl.appendChild(t.getElem());t.playFadeInAnim();n(t)});this.refreshUI(true)}},{key:"putRootComment",value:function e(t){this.commentsWrapEl.prepend(t.getElem());this.artalk.comments.unshift(t)}},{key:"initListActionBtn",value:function e(){var t=this;this.openSidebarBtnEl=this.el.querySelector('[data-action="open-sidebar"]');this.openSidebarBtnEl.addEventListener("click",function(){t.artalk.sidebar.show()});this.closeCommentBtnEl=this.el.querySelector('[data-action="admin-close-comment"]');this.closeCommentBtnEl.addEventListener("click",function(){t.adminSetPage({is_close_comment:!t.data.page.is_close_comment})})}},{key:"refreshUI",value:function e(){var t=this;var n=arguments.length>0&&arguments[0]!==undefined?arguments[0]:false;this.el.querySelector(".artalk-comment-count-num").innerText=this.getListCommentCount().toString();var a=this.commentsWrapEl.querySelector(".artalk-no-comment");if(this.artalk.comments.length<=0&&!a){a=d["default"].createElement('
    ');a.innerText=this.artalk.conf.noComment;this.commentsWrapEl.appendChild(a)}if(this.artalk.comments.length>0&&a!==null){a.remove()}if(!!this.artalk.user.data.nick&&!!this.artalk.user.data.email){this.openSidebarBtnEl.classList.remove("artalk-hide")}else{this.openSidebarBtnEl.classList.add("artalk-hide")}this.el.querySelectorAll("[data-list-ui-only-admin]").forEach(function(e){if(t.artalk.user.data.isAdmin)e.classList.remove("artalk-hide");else e.classList.add("artalk-hide")});if(!!this.data&&!!this.data.page&&this.data.page.is_close_comment===true){this.artalk.editor.closeComment();this.closeCommentBtnEl.innerHTML="打开评论"}else if(!n){this.artalk.editor.openComment();this.closeCommentBtnEl.innerHTML="关闭评论"}}},{key:"getListCommentCount",value:function e(){if(!this.data||!this.data.total)return 0;return Number(this.data.total||"0")}},{key:"readMore",value:function e(){var t=this.data.offset+this.reqPageSize;this.reqComments(t)}},{key:"showReadMoreBtn",value:function e(){this.readMoreEl.style.display=""}},{key:"hideReadMoreBtn",value:function e(){this.readMoreEl.style.display="none"}},{key:"readMoreBtnSetLoading",value:function e(t){this.showReadMoreBtn();this.readMoreLoadingEl.style.display=t?"":"none";this.readMoreTextEl.style.display=t?"none":""}},{key:"readMoreBtnShowErr",value:function e(t){var n=this;this.readMoreBtnSetLoading(false);var a=this.readMoreTextEl.innerText;this.readMoreTextEl.innerText=t;this.readMoreEl.classList.add("artalk-err");setTimeout(function(){n.readMoreTextEl.innerText=a;n.readMoreEl.classList.remove("artalk-err")},2e3)}},{key:"initScrollBottomAutoLoad",value:function e(){var t=this;if(!this.artalk.conf.readMore)return;if(!this.artalk.conf.readMore.autoLoad)return;document.addEventListener("scroll",function(){var e=t.el.querySelector(".artalk-list-comments-wrap > .artalk-comment-wrap:nth-last-child(3)");if(!e)return;if(!t.hasMoreComments)return;if(t.isLoading)return;if(t.artalk.ui.isVisible(e)){t.readMore()}})}},{key:"checkNickEmailIsAdmin",value:function e(t,n){if(!this.data||!this.data.admin_nicks||!this.data.admin_encrypted_emails)return false;return this.data.admin_nicks.indexOf(t)!==-1&&this.data.admin_encrypted_emails.find(function(e){return String(e).toLowerCase()===String((0,c["default"])(n)).toLowerCase()})}},{key:"adminSetPage",value:function e(t){var n=this;this.artalk.request("SetPage",{nick:this.artalk.user.data.nick,email:this.artalk.user.data.email,page_key:this.artalk.conf.pageKey,password:this.artalk.user.data.password,is_close_comment:Number(t.is_close_comment)},function(){n.artalk.ui.showLoading(n.artalk.editor.el)},function(){n.artalk.ui.hideLoading(n.artalk.editor.el)},function(e,t){n.data.page=Object.assign({},t);n.refreshUI()},function(e,t){n.artalk.editor.showNotify("修改页面数据失败:".concat(e),"e")})}},{key:"hasMoreComments",get:function e(){if(!this.data)return false;return this.data.total_parents>this.data.offset+this.data.limit}}]);return a}(a["default"]);(e["default"]=m).displayName="List",g.exports=k.default})?e.apply(k,t):e)||(g.exports=n)},function(e,t,n){var k,v,y,b,x;k=n(41),v=n(12).utf8,y=n(42),b=n(12).bin,(x=function(e,t){e.constructor==String?e=t&&"binary"===t.encoding?b.stringToBytes(e):v.stringToBytes(e):y(e)?e=Array.prototype.slice.call(e,0):Array.isArray(e)||(e=e.toString());for(var n=k.bytesToWords(e),a=8*e.length,r=1732584193,i=-271733879,l=-1732584194,s=271733878,o=0;o>>24)|4278255360&(n[o]<<24|n[o]>>>8);n[a>>>5]|=128<>>9<<4)]=a;var c=x._ff,u=x._gg,d=x._hh,f=x._ii;for(o=0;o>>0,i=i+h>>>0,l=l+m>>>0,s=s+g>>>0}return k.endian([r,i,l,s])})._ff=function(e,t,n,a,r,i,l){var s=e+(t&n|~t&a)+(r>>>0)+l;return(s<>>32-i)+t},x._gg=function(e,t,n,a,r,i,l){var s=e+(t&a|n&~a)+(r>>>0)+l;return(s<>>32-i)+t},x._hh=function(e,t,n,a,r,i,l){var s=e+(t^n^a)+(r>>>0)+l;return(s<>>32-i)+t},x._ii=function(e,t,n,a,r,i,l){var s=e+(n^(t|~a))+(r>>>0)+l;return(s<>>32-i)+t},x._blocksize=16,x._digestsize=16,e.exports=function(e,t){if(null==e)throw new Error("Illegal argument "+e);var n=k.wordsToBytes(x(e,t));return t&&t.asBytes?n:t&&t.asString?b.bytesToString(n):k.bytesToHex(n)}},function(e,t){var i,n;i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n={rotl:function(e,t){return e<>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number)return 16711935&n.rotl(e,8)|4278255360&n.rotl(e,24);for(var t=0;t>>5]|=e[n]<<24-a%32;return t},wordsToBytes:function(e){for(var t=[],n=0;n<32*e.length;n+=8)t.push(e[n>>>5]>>>24-n%32&255);return t},bytesToHex:function(e){for(var t=[],n=0;n>>4).toString(16)),t.push((15&e[n]).toString(16));return t.join("")},hexToBytes:function(e){for(var t=[],n=0;n>>6*(3-r)&63)):t.push("=");return t.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var t=[],n=0,a=0;n>>6-2*a);return t}},e.exports=n},function(e,t){function n(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)} +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("Artalk",[],t):"object"==typeof exports?exports.Artalk=t():e.Artalk=t()}(this,function(){return d=[function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}},function(e,t){e.exports=function(e){return e&&e.__esModule?e:{default:e}}},function(e,t){function a(e,t){for(var n=0;n0&&arguments[0]!==undefined?arguments[0]:"";var n=document.createElement("div");n.innerHTML=t.trim();return n.firstElementChild||n}},{key:"getHeight",value:function e(t){return parseFloat(getComputedStyle(t,null).height.replace("px",""))}},{key:"htmlEncode",value:function e(t){var n=document.createElement("div");n.innerText=t;var a=n.innerHTML;n=null;return a}},{key:"htmlDecode",value:function e(t){var n=document.createElement("div");n.innerHTML=t;var a=n.innerText;n=null;return a}},{key:"getLocationParmByName",value:function e(t){var n=RegExp("[?&]".concat(t,"=([^&]*)")).exec(window.location.search);return n&&decodeURIComponent(n[1].replace(/\+/g," "))}},{key:"getOffset",value:function e(t){var n=t.getBoundingClientRect();return{top:n.top+window.scrollY,left:n.left+window.scrollX}}},{key:"timeAgo",value:function e(t){try{var n=t.getTime();var a=(new Date).getTime();var r=a-n;var i=Math.floor(r/(24*3600*1e3));if(i===0){var l=r%(24*3600*1e3);var s=Math.floor(l/(3600*1e3));if(s===0){var o=l%(3600*1e3);var c=Math.floor(o/(60*1e3));if(c===0){var u=o%(60*1e3);var d=Math.round(u/1e3);return"".concat(d," 秒前")}return"".concat(c," 分钟前")}return"".concat(s," 小时前")}if(i<0)return"刚刚";if(i<8){return"".concat(i," 天前")}return this.dateFormat(t)}catch(e){console.error(e);return" - "}}},{key:"padWithZeros",value:function e(t,n){var a=t.toString();while(a.length');this.mainEl.appendChild(this.childrenEl)}else{this.childrenEl=this.parent.getChildrenEl()}}return this.childrenEl}},{key:"getParent",value:function e(){return this.parent}},{key:"getElem",value:function e(){return this.elem}},{key:"getData",value:function e(){return this.data}},{key:"getGravatarUrl",value:function e(){return"".concat(this.artalk.conf.gravatar.cdn).concat(this.data.email_encrypted,"?d=").concat(encodeURIComponent(this.artalk.conf.defaultAvatar),"&s=80")}},{key:"getContentMarked",value:function e(){return this.artalk.marked(this.data.content)}},{key:"getDateFormatted",value:function e(){return c["default"].timeAgo(new Date(this.data.date))}},{key:"getUserUaBrowser",value:function e(){var t=(0,s["default"])(this.data.ua);return"".concat(t.browser," ").concat(t.version)}},{key:"getUserUaOS",value:function e(){var t=(0,s["default"])(this.data.ua);return"".concat(t.os," ").concat(t.osVersion)}},{key:"playFadeInAnim",value:function e(){this.artalk.ui.playFadeInAnim(this.elem)}},{key:"adminCollapse",value:function e(n){var a=this;if(n.classList.contains("artalk-in-process"))return;var r=n.innerText;var i=!this.data.is_collapsed;this.artalk.request("CommentCollapse",{id:this.data.id,nick:this.artalk.user.data.nick,email:this.artalk.user.data.email,password:this.artalk.user.data.password,is_collapsed:Number(i)},function(){n.classList.add("artalk-in-process");n.innerText=i?"折叠中...":"展开中..."},function(){},function(e,t){n.classList.remove("artalk-in-process");a.data.is_collapsed=t.is_collapsed;a.artalk.eachComment([a],function(e){e.data.is_allow_reply=!t.is_collapsed});a.refreshUI();a.artalk.ui.playFadeInAnim(a.bodyEl);a.list.refreshUI()},function(e,t){n.classList.add("artalk-error");n.innerText=i?"折叠失败":"展开失败";setTimeout(function(){n.innerText=r;n.classList.remove("artalk-error");n.classList.remove("artalk-in-process")},2e3)})}},{key:"adminDelete",value:function e(n){var a=this;if(n.classList.contains("artalk-in-process"))return;var t=Number(n.getAttribute("data-btn-clicked")||1);if(t<2){if(t===1){var r=n.innerText;n.innerText="确认删除";setTimeout(function(){n.innerText=r;n.setAttribute("data-btn-clicked","")},2e3);n.setAttribute("data-btn-clicked",String(t+1))}return}var i=n.innerText;this.artalk.request("CommentDel",{id:this.data.id,nick:this.artalk.user.data.nick,email:this.artalk.user.data.email,password:this.artalk.user.data.password},function(){n.classList.add("artalk-in-process");n.innerText="删除中..."},function(){},function(e,t){n.innerText=i;a.artalk.deleteComment(a);a.list.data.total-=1;a.list.refreshUI();n.classList.remove("artalk-in-process")},function(e,t){n.classList.add("artalk-error");n.innerText="删除失败";setTimeout(function(){n.innerText=i;n.classList.remove("artalk-error");n.classList.remove("artalk-in-process")},2e3)})}}]);return i}(o["default"]);(e["default"]=p).displayName="Comment",h.exports=m.default})?e.apply(m,t):e)||(h.exports=n)},function(t,e){function n(e){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?t.exports=n=function(e){return typeof e}:t.exports=n=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}t.exports=n},function(e,t,p){var n,a,r;a=[t,p(0),p(2),p(3),p(4),p(5),p(6),p(7)],void 0===(r="function"==typeof(n=function(e,l,t,n,r,i,a,s){"use strict";var o=p(1);function c(a){return function(){var e=(0,i["default"])(a),t;if(u()){var n=(0,i["default"])(this).constructor;t=Reflect.construct(e,arguments,n)}else{t=e.apply(this,arguments)}return(0,r["default"])(this,t)}}function u(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Date.prototype.toString.call(Reflect.construct(Date,[],function(){}));return true}catch(e){return false}}Object.defineProperty(e,"__esModule",{value:true}),e["default"]=f,e.Layer=void 0,l=o(l),t=o(t),n=o(n),r=o(r),i=o(i),a=o(a),s=o(s);var d=function(e){(0,n["default"])(i,e);var r=c(i);function i(e,t,n){var a;(0,l["default"])(this,i);a=r.call(this,e);a.name=t;a.maskClickHideEnable=true;a.initWrap();a.el=a.wrapEl.querySelector('[data-layer-name="'.concat(t,'"]'));if(a.el===null){if(!n){a.el=s["default"].createElement();a.el.classList.add("artalk-layer-item")}else{a.el=n}}a.el.setAttribute("data-layer-name",t);a.el.style.display="none";a.wrapEl.prepend(a.el);return a}(0,t["default"])(i,[{key:"initWrap",value:function e(){this.wrapEl=document.querySelector(".artalk-layer-wrap");if(!this.wrapEl){this.wrapEl=s["default"].createElement('');document.body.appendChild(this.wrapEl)}this.maskEl=this.wrapEl.querySelector(".artalk-layer-mask")}},{key:"getName",value:function e(){return this.name}},{key:"getWrapEl",value:function e(){return this.wrapEl}},{key:"getEl",value:function e(){return this.el}},{key:"show",value:function e(){var t=this;i.hideTimeoutList.forEach(function(e){clearTimeout(e)});i.hideTimeoutList=[];this.wrapEl.style.display="block";this.maskEl.style.display="block";this.maskEl.classList.add("artalk-fade-in");this.el.style.display="";this.maskEl.onclick=function(){if(t.maskClickHideEnable)t.hide()};document.body.style.overflow="hidden"}},{key:"hide",value:function e(){var t=this;i.hideTimeoutList.push(setTimeout(function(){t.wrapEl.style.display="none";document.body.style.overflow=""},450));this.wrapEl.classList.add("artalk-fade-out");i.hideTimeoutList.push(setTimeout(function(){t.wrapEl.style.display="none";t.wrapEl.classList.remove("artalk-fade-out")},200));this.el.style.display="none"}},{key:"setMaskClickHide",value:function e(t){this.maskClickHideEnable=t}},{key:"dispose",value:function e(){this.hide();this.el.remove();this.el=null}}]);return i}(a["default"]);function f(e,t,n){return new d(e,t,n)}(e.Layer=d).displayName="Layer",d.hideTimeoutList=[]})?n.apply(t,a):n)||(e.exports=r)},function(e,t){var n={utf8:{stringToBytes:function(e){return n.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(n.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],n=0;n https://artalk.js.org\n"+"> https://github.com/qwqcode/Artalk\n"+"> https://qwqaq.com\n","color: #FFF; background: #1DAAFF; padding:5px 0;","color: #FFF; background: #656565; padding:5px 0;","");this.conf=Object.assign(Object.assign({},h),e);try{this.el=document.querySelector(this.conf.el);if(this.el===null){throw Error('Sorry, Target element "'.concat(this.conf.el,'" was not found.'))}}catch(e){console.error(e);throw new Error("Artalk config `el` error")}this.el.classList.add("artalk");this.el.setAttribute("artalk-run-id",this.runId.toString());if(this.el.innerHTML.trim()!=="")this.el.innerHTML="";this.ui=new d["default"](this);this.user=new r["default"](this);this.checker=new i["default"](this);this.initMarked();this.editor=new o["default"](this);this.list=new c["default"](this);this.sidebar=new u["default"](this);this.list.reqComments();window.addEventListener("hashchange",function(){t.checkGoToCommentByUrlHash()})}(0,t["default"])(n,[{key:"eachComment",value:function e(t,n){var a=this;if(t.length===0)return;t.every(function(e){if(n(e,t)===false)return false;a.eachComment(e.getChildren(),n);return true})}},{key:"findComment",value:function e(t){var n=null;this.eachComment(this.comments,function(e){if(e.data.id===t){n=e;return false}return true});return n}},{key:"getCommentCount",value:function e(){var t=0;this.eachComment(this.comments,function(){t++});return t}},{key:"deleteComment",value:function e(t){var n;if(typeof t==="number"){n=this.findComment(t);if(!n)throw Error("未找到评论 ".concat(t))}else n=t;n.getElem().remove();this.eachComment(this.comments,function(e,t){if(e===n){t.splice(t.indexOf(e),1);return false}return true})}},{key:"clearComments",value:function e(){this.list.commentsWrapEl.innerHTML="";this.list.data=undefined;this.comments=[]}},{key:"request",value:function e(t,n,a,r,i,l){a();n=Object.assign({action:t},n);var s=new FormData;Object.keys(n).forEach(function(e){return s.set(e,n[e])});var o=new XMLHttpRequest;o.timeout=5e3;o.open("POST",this.conf.serverUrl,true);o.onload=function(){r();if(o.status>=200&&o.status<400){var e=JSON.parse(o.response);if(e.success){i(e.msg,e.data)}else{l(e.msg,e.data)}}else{l("服务器响应错误 Code: ".concat(o.status),{})}};o.onerror=function(){r();l("网络错误",{})};o.send(s)}},{key:"checkGoToCommentByUrlHash",value:function e(){var t=Number(f["default"].getLocationParmByName("artalk_comment"));if(!t){var n=window.location.hash.match(/#artalk-comment-([0-9]+)/);if(!n||!n[1]||Number.isNaN(Number(n[1])))return;t=Number(n[1])}var a=this.findComment(t);if(!a&&this.list.hasMoreComments){this.list.readMore();return}if(!a){return}this.ui.scrollIntoView(a.getElem(),false);setTimeout(function(){a.getElem().classList.add("artalk-flash-once")},800)}},{key:"initMarked",value:function e(){var r=new l["default"].Renderer;var i=r.link;r.link=function(e,t,n){var a=i.call(r,e,t,n);return a.replace(/^ ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|\\n*|\\n*|)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:d,table:d,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/};function o(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||g.defaults,this.rules=y.normal,this.options.pedantic?this.rules=y.pedantic:this.options.gfm&&(this.rules=y.gfm)}y._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,y._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,y.def=e(y.def).replace("label",y._label).replace("title",y._title).getRegex(),y.bullet=/(?:[*+-]|\d{1,9}\.)/,y.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,y.item=e(y.item,"gm").replace(/bull/g,y.bullet).getRegex(),y.list=e(y.list).replace(/bull/g,y.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+y.def.source+")").getRegex(),y._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",y._comment=//,y.html=e(y.html,"i").replace("comment",y._comment).replace("tag",y._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),y.paragraph=e(y._paragraph).replace("hr",y.hr).replace("heading"," {0,3}#{1,6} +").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}|~{3,})[^`\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",y._tag).getRegex(),y.blockquote=e(y.blockquote).replace("paragraph",y.paragraph).getRegex(),y.normal=p({},y),y.gfm=p({},y.normal,{nptable:/^ *([^|\n ].*\|.*)\n *([-:]+ *\|[-| :]*)(?:\n((?:.*[^>\n ].*(?:\n|$))*)\n*|$)/,table:/^ *\|(.+)\n *\|?( *[-:]+[-| :]*)(?:\n((?: *[^>\n ].*(?:\n|$))*)\n*|$)/}),y.pedantic=p({},y.normal,{html:e("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",y._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:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,fences:d,paragraph:e(y.normal._paragraph).replace("hr",y.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",y.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()}),o.rules=y,o.lex=function(e,t){return new o(t).lex(e)},o.prototype.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n"),this.token(e,!0)},o.prototype.token=function(e,t){var n,a,r,i,l,s,o,c,u,d,f,p,h,m,g,k;for(e=e.replace(/^ +$/gm,"");e;)if((r=this.rules.newline.exec(e))&&(e=e.substring(r[0].length),1 ?/gm,""),this.token(r,t),this.tokens.push({type:"blockquote_end"});else if(r=this.rules.list.exec(e)){for(e=e.substring(r[0].length),o={type:"list_start",ordered:m=1<(i=r[2]).length,start:m?+i:"",loose:!1},this.tokens.push(o),n=!(c=[]),h=(r=r[0].match(this.rules.item)).length,f=0;f?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:d,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,strong:/^__([^\s_])__(?!_)|^\*\*([^\s*])\*\*(?!\*)|^__([^\s][\s\S]*?[^\s])__(?!_)|^\*\*([^\s][\s\S]*?[^\s])\*\*(?!\*)/,em:/^_([^\s_])_(?!_)|^\*([^\s*<\[])\*(?!\*)|^_([^\s<][\s\S]*?[^\s_])_(?!_|[^\spunctuation])|^_([^\s_<][\s\S]*?[^\s])_(?!_|[^\spunctuation])|^\*([^\s<"][\s\S]*?[^\s\*])\*(?!\*|[^\spunctuation])|^\*([^\s*"<\[][\s\S]*?[^\s])\*(?!\*)/,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:d,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\?@\\[^_{|}~",n.em=e(n.em).replace(/punctuation/g,n._punctuation).getRegex(),n._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,n._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,n._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])?)+(?![-_])/,n.autolink=e(n.autolink).replace("scheme",n._scheme).replace("email",n._email).getRegex(),n._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,n.tag=e(n.tag).replace("comment",y._comment).replace("attribute",n._attribute).getRegex(),n._label=/(?:\[[^\[\]]*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,n._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,n._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,n.link=e(n.link).replace("label",n._label).replace("href",n._href).replace("title",n._title).getRegex(),n.reflink=e(n.reflink).replace("label",n._label).getRegex(),n.normal=p({},n),n.pedantic=p({},n.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/,link:e(/^!?\[(label)\]\((.*?)\)/).replace("label",n._label).getRegex(),reflink:e(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",n._label).getRegex()}),n.gfm=p({},n.normal,{escape:e(n.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)~+/,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\/i.test(i[0])&&(this.inLink=!1),!this.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(i[0])?this.inRawBlock=!0:this.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(i[0])&&(this.inRawBlock=!1),e=e.substring(i[0].length),s+=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(i[0]):b(i[0]):i[0];else if(i=this.rules.link.exec(e)){var o=h(i[2],"()");if(-1$/,"$1"),s+=this.outputLink(i,{href:u.escapes(a),title:u.escapes(r)}),this.inLink=!1}else if((i=this.rules.reflink.exec(e))||(i=this.rules.nolink.exec(e))){if(e=e.substring(i[0].length),t=(i[2]||i[1]).replace(/\s+/g," "),!(t=this.links[t.toLowerCase()])||!t.href){s+=i[0].charAt(0),e=i[0].substring(1)+e;continue}this.inLink=!0,s+=this.outputLink(i,t),this.inLink=!1}else if(i=this.rules.strong.exec(e))e=e.substring(i[0].length),s+=this.renderer.strong(this.output(i[4]||i[3]||i[2]||i[1]));else if(i=this.rules.em.exec(e))e=e.substring(i[0].length),s+=this.renderer.em(this.output(i[6]||i[5]||i[4]||i[3]||i[2]||i[1]));else if(i=this.rules.code.exec(e))e=e.substring(i[0].length),s+=this.renderer.codespan(b(i[2].trim(),!0));else if(i=this.rules.br.exec(e))e=e.substring(i[0].length),s+=this.renderer.br();else if(i=this.rules.del.exec(e))e=e.substring(i[0].length),s+=this.renderer.del(this.output(i[1]));else if(i=this.rules.autolink.exec(e))e=e.substring(i[0].length),a="@"===i[2]?"mailto:"+(n=b(this.mangle(i[1]))):n=b(i[1]),s+=this.renderer.link(a,null,n);else if(this.inLink||!(i=this.rules.url.exec(e))){if(i=this.rules.text.exec(e))e=e.substring(i[0].length),this.inRawBlock?s+=this.renderer.text(this.options.sanitize?this.options.sanitizer?this.options.sanitizer(i[0]):b(i[0]):i[0]):s+=this.renderer.text(b(this.smartypants(i[0])));else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0))}else{if("@"===i[2])a="mailto:"+(n=b(i[0]));else{for(;l=i[0],i[0]=this.rules._backpedal.exec(i[0])[0],l!==i[0];);n=b(i[0]),a="www."===i[1]?"http://"+n:n}e=e.substring(i[0].length),s+=this.renderer.link(a,null,n)}return s},u.escapes=function(e){return e?e.replace(u.rules._escapes,"$1"):e},u.prototype.outputLink=function(e,t){var n=t.href,a=t.title?b(t.title):null;return"!"!==e[0].charAt(0)?this.renderer.link(n,a,this.output(e[1])):this.renderer.image(n,a,b(e[1]))},u.prototype.smartypants=function(e){return this.options.smartypants?e.replace(/---/g,"—").replace(/--/g,"–").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…"):e},u.prototype.mangle=function(e){if(!this.options.mangle)return e;for(var t,n="",a=e.length,r=0;r'+(n?e:b(e,!0))+"\n":"
    "+(n?e:b(e,!0))+"
    "},a.prototype.blockquote=function(e){return"
    \n"+e+"
    \n"},a.prototype.html=function(e){return e},a.prototype.heading=function(e,t,n,a){return this.options.headerIds?"'+e+"\n":""+e+"\n"},a.prototype.hr=function(){return this.options.xhtml?"
    \n":"
    \n"},a.prototype.list=function(e,t,n){var a=t?"ol":"ul";return"<"+a+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"\n"},a.prototype.listitem=function(e){return"
  • "+e+"
  • \n"},a.prototype.checkbox=function(e){return" "},a.prototype.paragraph=function(e){return"

    "+e+"

    \n"},a.prototype.table=function(e,t){return"\n\n"+e+"\n"+(t=t&&""+t+"")+"
    \n"},a.prototype.tablerow=function(e){return"\n"+e+"\n"},a.prototype.tablecell=function(e,t){var n=t.header?"th":"td";return(t.align?"<"+n+' align="'+t.align+'">':"<"+n+">")+e+"\n"},a.prototype.strong=function(e){return""+e+""},a.prototype.em=function(e){return""+e+""},a.prototype.codespan=function(e){return""+e+""},a.prototype.br=function(){return this.options.xhtml?"
    ":"
    "},a.prototype.del=function(e){return""+e+""},a.prototype.link=function(e,t,n){if(null===(e=i(this.options.sanitize,this.options.baseUrl,e)))return n;var a='
    "},a.prototype.image=function(e,t,n){if(null===(e=i(this.options.sanitize,this.options.baseUrl,e)))return n;var a=''+n+'":">"},a.prototype.text=function(e){return e},r.prototype.strong=r.prototype.em=r.prototype.codespan=r.prototype.del=r.prototype.text=function(e){return e},r.prototype.link=r.prototype.image=function(e,t,n){return""+n},r.prototype.br=function(){return""},c.parse=function(e,t){return new c(t).parse(e)},c.prototype.parse=function(e){this.inline=new u(e.links,this.options),this.inlineText=new u(e.links,p({},this.options,{renderer:new r})),this.tokens=e.reverse();for(var t="";this.next();)t+=this.tok();return t},c.prototype.next=function(){return this.token=this.tokens.pop(),this.token},c.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0},c.prototype.parseText=function(){for(var e=this.token.text;"text"===this.peek().type;)e+="\n"+this.next().text;return this.inline.output(e)},c.prototype.tok=function(){switch(this.token.type){case"space":return"";case"hr":return this.renderer.hr();case"heading":return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,f(this.inlineText.output(this.token.text)),this.slugger);case"code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);case"table":var e,t,n,a,r="",i="";for(n="",e=0;e?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(t))for(var n=t;this.seen[n]++,t=n+"-"+this.seen[n],this.seen.hasOwnProperty(t););return this.seen[t]=0,t},b.escapeTest=/[&<>"']/,b.escapeReplace=/[&<>"']/g,b.replacements={"&":"&","<":"<",">":">",'"':""","'":"'"},b.escapeTestNoEncode=/[<>"']|&(?!#?\w+;)/,b.escapeReplaceNoEncode=/[<>"']|&(?!#?\w+;)/g;var l={},s=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function d(){}function p(e){for(var t,n,a=1;at)n.splice(t);else for(;n.lengthAn error occurred:

    "+b(e.message+"",!0)+"
    ";throw e}}d.exec=d,g.options=g.setOptions=function(e){return p(g.defaults,e),g},g.defaults=(g.getDefaults=function(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:new a,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,xhtml:!1}})(),g.Parser=c,g.parser=c.parse,g.Renderer=a,g.TextRenderer=r,g.Lexer=o,g.lexer=o.lex,g.InlineLexer=u,g.inlineLexer=u.output,g.Slugger=t,g.parse=g,k.exports=g}()}).call(this,t(17))},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){e.exports=function(){"use strict";function e(e,t){return t={exports:{}},e(t,t.exports),t.exports}var o=e(function(e){"use strict";var t=e.exports=function(){return new RegExp("(?:"+t.line().source+")|(?:"+t.block().source+")","gm")};t.line=function(){return/(?:^|\s)\/\/(.+?)$/gm};t.block=function(){return/\/\*([\S\s]*?)\*\//gm}}),c=["23AC69","91C132","F19726","E8552D","1AAB8E","E1147F","2980C1","1BA1E6","9FA0A0","F19726","E30B20","E30B20","A3338B"],t;function u(e){return''+e+""}return function(e,t){if(t===void 0)t={};var i=t.colors;if(i===void 0)i=c;var l=0;var s={};var n=/[\u4E00-\u9FFF\u3400-\u4dbf\uf900-\ufaff\u3040-\u309f\uac00-\ud7af\u0400-\u04FF]+|\w+/;var a=/'+t+"";l=++l%i.length;return r})}}()},function(d,f,p){var e,t,n;t=[f,p(0),p(2),p(3),p(4),p(5),p(6)],void 0===(n="function"==typeof(e=function(e,i,t,n,r,l,a){"use strict";var s=p(1);function o(a){return function(){var e=(0,l["default"])(a),t;if(c()){var n=(0,l["default"])(this).constructor;t=Reflect.construct(e,arguments,n)}else{t=e.apply(this,arguments)}return(0,r["default"])(this,t)}}function c(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Date.prototype.toString.call(Reflect.construct(Date,[],function(){}));return true}catch(e){return false}}Object.defineProperty(e,"__esModule",{value:true}),e["default"]=void 0,i=s(i),t=s(t),n=s(n),r=s(r),l=s(l);var u=function(e){(0,n["default"])(r,e);var a=o(r);function r(e){var t;(0,i["default"])(this,r);t=a.call(this,e);var n=JSON.parse(window.localStorage.getItem("ArtalkUser")||"{}");t.data={nick:n.nick||"",email:n.email||"",link:n.link||"",password:n.password||"",isAdmin:n.isAdmin||false};return t}(0,t["default"])(r,[{key:"save",value:function e(){window.localStorage.setItem("ArtalkUser",JSON.stringify(this.data))}},{key:"checkHasBasicUserInfo",value:function e(){return!!this.data.nick&&!!this.data.email}}]);return r}((a=s(a))["default"]);(e["default"]=u).displayName="User",d.exports=f.default})?e.apply(f,t):e)||(d.exports=n)},function(n,e){function a(e,t){return n.exports=a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},a(e,t)}n.exports=a},function(d,h,m){var e,t,n;t=[h,m(0),m(2),m(3),m(4),m(5),m(6),m(7),m(11)],void 0===(n="function"==typeof(e=function(e,a,r,i,l,s,t,f,p){"use strict";var n=m(1);function o(a){return function(){var e=(0,s["default"])(a),t;if(c()){var n=(0,s["default"])(this).constructor;t=Reflect.construct(e,arguments,n)}else{t=e.apply(this,arguments)}return(0,l["default"])(this,t)}}function c(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Date.prototype.toString.call(Reflect.construct(Date,[],function(){}));return true}catch(e){return false}}Object.defineProperty(e,"__esModule",{value:true}),e["default"]=void 0,a=n(a),r=n(r),i=n(i),l=n(l),s=n(s),t=n(t),f=n(f),p=n(p);var u=function(e){(0,i["default"])(n,e);var t=o(n);function n(){var r;(0,a["default"])(this,n);r=t.apply(this,arguments);r.LIST={"管理员":{body:function e(){return f["default"].createElement("敲入密码来验证管理员身份:")},reqAct:"AdminCheck",reqObj:function e(t){return{nick:r.artalk.user.data.nick,email:r.artalk.user.data.email,password:t}},onSuccess:function e(t,n,a){r.artalk.user.data.isAdmin=true;r.artalk.user.data.password=a;r.artalk.user.save()}},"验证码":{body:function e(){var t=f["default"].createElement('验证码敲入验证码继续:'));r.LIST["验证码"].elem=t;t.querySelector(".artalk-captcha-img").onclick=function(){r.LIST["验证码"].refresh()};return t},reqAct:"CaptchaCheck",reqObj:function e(t){return{captcha:t}},onSuccess:function e(t,n,a){r.submitCaptchaVal=a},refresh:function e(t){var n=r.LIST["验证码"].elem;var a=n.querySelector(".artalk-captcha-img");if(!t){r.artalk.request("CaptchaCheck",{refresh:true},function(){},function(){},function(e,t){a.setAttribute("src",t.img_data)},function(){})}else{a.setAttribute("src",t)}}}};return r}(0,r["default"])(n,[{key:"action",value:function e(l,s){var o=this;var c=this.LIST[l];var t=f["default"].createElement();t.appendChild(c.body());var u=f["default"].createElement(''));t.appendChild(u);setTimeout(function(){u.focus()},80);var d=(0,p["default"])(this.artalk,"checker-".concat((new Date).getTime()));d.setMaskClickHide(false);d.show();u.onkeyup=function(e){if(e.keyCode===13){e.preventDefault();d.getEl().querySelector('button[data-action="confirm"]').click()}};this.artalk.ui.showDialog(d.getEl(),t,function(e,n){var a=u.value.trim();var t=n.innerText;var r=function e(t){n.innerText=t;n.classList.add("error")};var i=function e(){n.innerText=t;n.classList.remove("error")};o.artalk.request(c.reqAct,c.reqObj(a),function(){n.innerText="加载中..."},function(){},function(e,t){c.onSuccess(e,t,a);d.dispose();s()},function(e,t){r(e);if(l==="验证码"){c.refresh(t.img_data)}var n=setTimeout(function(){i()},3e3);u.onfocus=function(){i();clearTimeout(n)}});return false},function(){d.dispose();return false})}}]);return n}(t["default"]);(e["default"]=u).displayName="Checker",d.exports=h.default})?e.apply(h,t):e)||(d.exports=n)},function(v,y,b){var e,t,n;t=[y,b(10),b(0),b(2),b(8),b(3),b(4),b(5),b(23),b(9),b(27),b(36),b(6),b(7)],void 0===(n="function"==typeof(e=function(e,r,i,t,l,s,o,c,n,u,d,f,a,p){"use strict";var h=b(1);function m(a){return function(){var e=(0,c["default"])(a),t;if(g()){var n=(0,c["default"])(this).constructor;t=Reflect.construct(e,arguments,n)}else{t=e.apply(this,arguments)}return(0,o["default"])(this,t)}}function g(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Date.prototype.toString.call(Reflect.construct(Date,[],function(){}));return true}catch(e){return false}}Object.defineProperty(e,"__esModule",{value:true}),e["default"]=void 0,r=h(r),i=h(i),t=h(t),l=h(l),s=h(s),o=h(o),c=h(c),u=h(u),d=h(d),f=h(f),a=h(a),p=h(p);var k=function(e){(0,s["default"])(a,e);var n=m(a);function a(e){var t;(0,i["default"])(this,a);t=n.call(this,e);t.LOADABLE_PLUG_LIST=[d["default"],f["default"]];t.plugList={};t.openedPlugName=null;t.el=p["default"].createElement(b(38)((0,l["default"])(t)));t.artalk.el.appendChild(t.el);t.headerEl=t.el.querySelector(".artalk-editor-header");t.textareaWrapEl=t.el.querySelector(".artalk-editor-textarea-wrap");t.textareaEl=t.el.querySelector(".artalk-editor-textarea");t.closeCommentEl=t.el.querySelector(".artalk-close-comment");t.plugWrapEl=t.el.querySelector(".artalk-editor-plug-wrap");t.bottomEl=t.el.querySelector(".artalk-editor-bottom");t.bottomPartLeftEl=t.el.querySelector(".artalk-editor-bottom-part.artalk-left");t.plugSwitcherWrapEl=t.el.querySelector(".artalk-editor-plug-switcher-wrap");t.bottomPartRightEl=t.el.querySelector(".artalk-editor-bottom-part.artalk-right");t.submitBtn=t.el.querySelector(".artalk-send-btn");t.notifyWrapEl=t.el.querySelector(".artalk-editor-notify-wrap");t.initLocalStorage();t.initHeader();t.initTextarea();t.initEditorPlug();t.initBottomPart();return t}(0,t["default"])(a,[{key:"initLocalStorage",value:function e(){var t=this;var n=window.localStorage.getItem("ArtalkContent")||"";if(n.trim()!==""){this.showNotify("已自动恢复","i");this.setContent(n)}this.textareaEl.addEventListener("input",function(){t.saveContent()})}},{key:"initHeader",value:function e(){var a=this;Object.keys(this.user.data).forEach(function(t){var n=a.headerEl.querySelector('[name="'.concat(t,'"]'));if(n!==null&&n instanceof HTMLInputElement){n.value=a.user.data[t]||"";n.addEventListener("input",function(e){a.user.data[t]=n.value.trim();if(t!=="link"){a.user.data.password="";a.user.data.isAdmin=false;if(a.user.checkHasBasicUserInfo()&&a.artalk.list.checkNickEmailIsAdmin(a.user.data.nick,a.user.data.email)){a.artalk.checker.action("管理员",function(){a.artalk.list.refreshUI()})}}a.saveUser();a.artalk.list.refreshUI()})}})}},{key:"saveUser",value:function e(){this.user.save()}},{key:"saveContent",value:function e(){window.localStorage.setItem("ArtalkContent",this.getContentOriginal().trim())}},{key:"initTextarea",value:function e(){var n=this;this.textareaEl.addEventListener("keydown",function(e){var t=e.keyCode||e.which;if(t===9){e.preventDefault();n.insertContent("\t")}});this.textareaEl.addEventListener("input",function(e){n.adjustTextareaHeight()})}},{key:"adjustTextareaHeight",value:function e(){var t=this.textareaEl.offsetHeight-this.textareaEl.clientHeight;this.textareaEl.style.height="0px";this.textareaEl.style.height="".concat(this.textareaEl.scrollHeight+t,"px")}},{key:"initEditorPlug",value:function e(){var a=this;this.plugList={};this.plugWrapEl.innerHTML="";this.plugWrapEl.style.display="none";this.openedPlugName=null;this.plugSwitcherWrapEl.innerHTML="";this.LOADABLE_PLUG_LIST.forEach(function(e){var n=new e(a);a.plugList[n.getName()]=n;var t=p["default"].createElement(''.concat(n.getBtnHtml(),""));a.plugSwitcherWrapEl.appendChild(t);t.addEventListener("click",function(){a.plugSwitcherWrapEl.querySelectorAll(".active").forEach(function(e){return e.classList.remove("active")});if(n.getName()===a.openedPlugName){n.onHide();a.plugWrapEl.style.display="none";a.openedPlugName=null;return}if(a.plugWrapEl.querySelector('[data-plug-name="'.concat(n.getName(),'"]'))===null){var e=n.getElem();e.setAttribute("data-plug-name",n.getName());e.style.display="none";a.plugWrapEl.appendChild(e)}Array.from(a.plugWrapEl.children).forEach(function(e){var t=e.getAttribute("data-plug-name");if(t===n.getName()){e.style.display="";a.plugList[t].onShow()}else{e.style.display="none";a.plugList[t].onHide()}});a.plugWrapEl.style.display="";a.openedPlugName=n.getName();t.classList.add("active")})})}},{key:"closePlug",value:function e(){this.plugWrapEl.innerHTML="";this.plugWrapEl.style.display="none";this.openedPlugName=null}},{key:"insertContent",value:function e(t){if(document.selection){this.textareaEl.focus();document.selection.createRange().text=t;this.textareaEl.focus()}else if(this.textareaEl.selectionStart||this.textareaEl.selectionStart===0){var n=this.textareaEl.selectionStart;var a=this.textareaEl.selectionEnd;var r=this.textareaEl.scrollTop;this.setContent(this.textareaEl.value.substring(0,n)+t+this.textareaEl.value.substring(a,this.textareaEl.value.length));this.textareaEl.focus();this.textareaEl.selectionStart=n+t.length;this.textareaEl.selectionEnd=n+t.length;this.textareaEl.scrollTop=r}else{this.textareaEl.focus();this.textareaEl.value+=t}}},{key:"setContent",value:function e(t){this.textareaEl.value=t;this.saveContent();if(!!this.plugList&&!!this.plugList.preview){this.plugList.preview.updateContent()}this.adjustTextareaHeight()}},{key:"clearEditor",value:function e(){this.setContent("");this.cancelReply()}},{key:"getContent",value:function e(){var t=this.getContentOriginal();if(this.plugList&&this.plugList.emoticons){var n=this.plugList.emoticons;t=n.transEmoticonImageText(t)}return t}},{key:"getContentOriginal",value:function e(){return this.textareaEl.value||""}},{key:"getContentMarked",value:function e(){return this.artalk.marked(this.getContent())}},{key:"initBottomPart",value:function e(){this.initReply();this.initSubmit()}},{key:"initReply",value:function e(){this.replyComment=null;this.sendReplyEl=null}},{key:"setReply",value:function e(t){var n=this;if(this.replyComment!==null){this.cancelReply()}if(this.sendReplyEl===null){this.sendReplyEl=p["default"].createElement('
    ×
    ');this.sendReplyEl.querySelector(".artalk-text").innerText="@".concat(t.data.nick);this.sendReplyEl.querySelector(".artalk-cancel").addEventListener("click",function(){n.cancelReply()});this.textareaWrapEl.appendChild(this.sendReplyEl)}this.replyComment=t;this.artalk.ui.scrollIntoView(this.el);this.textareaEl.focus()}},{key:"cancelReply",value:function e(){if(this.sendReplyEl!==null){this.sendReplyEl.remove();this.sendReplyEl=null}this.replyComment=null}},{key:"getReplyComment",value:function e(){return this.replyComment}},{key:"initSubmit",value:function e(){var n=this;this.submitBtn.addEventListener("click",function(e){var t=e.currentTarget;n.submit()})}},{key:"submit",value:function e(){var a=this;if(this.getContent().trim()===""){this.textareaEl.focus();return}this.artalk.request("CommentAdd",{content:this.getContent(),nick:this.user.data.nick,email:this.user.data.email,link:this.user.data.link,rid:this.getReplyComment()===null?0:this.getReplyComment().data.id,page_key:this.artalk.conf.pageKey,password:this.user.data.password,captcha:this.artalk.checker.submitCaptchaVal||""},function(){a.artalk.ui.showLoading(a.el)},function(){a.artalk.ui.hideLoading(a.el)},function(e,t){var n=new u["default"](a.artalk,a.artalk.list,t.comment);if(a.getReplyComment()!==null){a.getReplyComment().putChild(n)}else{a.artalk.list.putRootComment(n)}a.clearEditor();a.artalk.ui.scrollIntoView(n.getElem());n.playFadeInAnim();a.artalk.list.data.total+=1;a.artalk.list.refreshUI()},function(e,t){if((0,r["default"])(t)==="object"&&t!==null&&typeof t.need_password==="boolean"&&t.need_password===true){a.artalk.checker.action("管理员",function(){a.submit()})}else if((0,r["default"])(t)==="object"&&t!==null&&typeof t.need_captcha==="boolean"&&t.need_captcha===true){a.artalk.checker.submitCaptchaImgData=t.img_data;a.artalk.checker.action("验证码",function(){a.submit()})}else{a.showNotify("评论失败,".concat(e),"e")}})}},{key:"showNotify",value:function e(t,n){this.artalk.ui.showNotify(t,n,this.notifyWrapEl)}},{key:"closeComment",value:function e(){this.closeCommentEl.style.display="";if(!this.artalk.user.data.isAdmin){this.textareaEl.style.display="none";this.closePlug();this.bottomEl.style.display="none"}else{this.textareaEl.style.display="";this.bottomEl.style.display=""}}},{key:"openComment",value:function e(){this.closeCommentEl.style.display="none";this.textareaEl.style.display="";this.bottomEl.style.display=""}},{key:"user",get:function e(){return this.artalk.user}}]);return a}(a["default"]);(e["default"]=k).displayName="Editor",v.exports=y.default})?e.apply(y,t):e)||(v.exports=n)},function(e,t,n){},function(e,t,n){},function(r,i,e){var t,n,a;n=[i],void 0===(a="function"==typeof(t=function(e){"use strict";Object.defineProperty(e,"__esModule",{value:true}),e["default"]=void 0;var u=window||{},d=navigator||{};function t(e){var a=e||d.userAgent;var t=this;var n={Trident:a.indexOf("Trident")>-1||a.indexOf("NET CLR")>-1,Presto:a.indexOf("Presto")>-1,WebKit:a.indexOf("AppleWebKit")>-1,Gecko:a.indexOf("Gecko/")>-1,Safari:a.indexOf("Safari")>-1,Chrome:a.indexOf("Chrome")>-1||a.indexOf("CriOS")>-1,IE:a.indexOf("MSIE")>-1||a.indexOf("Trident")>-1,Edge:a.indexOf("Edge")>-1,Firefox:a.indexOf("Firefox")>-1||a.indexOf("FxiOS")>-1,"Firefox Focus":a.indexOf("Focus")>-1,Chromium:a.indexOf("Chromium")>-1,Opera:a.indexOf("Opera")>-1||a.indexOf("OPR")>-1,Vivaldi:a.indexOf("Vivaldi")>-1,Yandex:a.indexOf("YaBrowser")>-1,Kindle:a.indexOf("Kindle")>-1||a.indexOf("Silk/")>-1,360:a.indexOf("360EE")>-1||a.indexOf("360SE")>-1,UC:a.indexOf("UC")>-1||a.indexOf(" UBrowser")>-1,QQBrowser:a.indexOf("QQBrowser")>-1,QQ:a.indexOf("QQ/")>-1,Baidu:a.indexOf("Baidu")>-1||a.indexOf("BIDUBrowser")>-1,Maxthon:a.indexOf("Maxthon")>-1,Sogou:a.indexOf("MetaSr")>-1||a.indexOf("Sogou")>-1,LBBROWSER:a.indexOf("LBBROWSER")>-1,"2345Explorer":a.indexOf("2345Explorer")>-1,TheWorld:a.indexOf("TheWorld")>-1,XiaoMi:a.indexOf("MiuiBrowser")>-1,Quark:a.indexOf("Quark")>-1,Qiyu:a.indexOf("Qiyu")>-1,Wechat:a.indexOf("MicroMessenger")>-1,Taobao:a.indexOf("AliApp(TB")>-1,Alipay:a.indexOf("AliApp(AP")>-1,Weibo:a.indexOf("Weibo")>-1,Douban:a.indexOf("com.douban.frodo")>-1,Suning:a.indexOf("SNEBUY-APP")>-1,iQiYi:a.indexOf("IqiyiApp")>-1,Windows:a.indexOf("Windows")>-1,Linux:a.indexOf("Linux")>-1||a.indexOf("X11")>-1,"Mac OS":a.indexOf("Macintosh")>-1,Android:a.indexOf("Android")>-1||a.indexOf("Adr")>-1,Ubuntu:a.indexOf("Ubuntu")>-1,FreeBSD:a.indexOf("FreeBSD")>-1,Debian:a.indexOf("Debian")>-1,"Windows Phone":a.indexOf("IEMobile")>-1||a.indexOf("Windows Phone")>-1,BlackBerry:a.indexOf("BlackBerry")>-1||a.indexOf("RIM")>-1,MeeGo:a.indexOf("MeeGo")>-1,Symbian:a.indexOf("Symbian")>-1,iOS:a.indexOf("like Mac OS X")>-1,"Chrome OS":a.indexOf("CrOS")>-1,WebOS:a.indexOf("hpwOS")>-1,Mobile:a.indexOf("Mobi")>-1||a.indexOf("iPh")>-1||a.indexOf("480")>-1,Tablet:a.indexOf("Tablet")>-1||a.indexOf("Pad")>-1||a.indexOf("Nexus 7")>-1};if(n.Mobile){n.Mobile=!(a.indexOf("iPad")>-1)}else if(u.showModalDialog&&u.chrome){n["360"]=true}var r={engine:["WebKit","Trident","Gecko","Presto"],browser:["Safari","Chrome","Edge","IE","Firefox","Firefox Focus","Chromium","Opera","Vivaldi","Yandex","Kindle","360","UC","QQBrowser","QQ","Baidu","Maxthon","Sogou","LBBROWSER","2345Explorer","TheWorld","XiaoMi","Quark","Qiyu","Wechat","Taobao","Alipay","Weibo","Douban","Suning","iQiYi"],os:["Windows","Linux","Mac OS","Android","Ubuntu","FreeBSD","Debian","iOS","Windows Phone","BlackBerry","MeeGo","Symbian","Chrome OS","WebOS"],device:["Mobile","Tablet"]};t.device="PC";t.language=function(){var e=d.browserLanguage||d.language;var t=e.split("-");if(t[1]){t[1]=t[1].toUpperCase()}return t.join("_")}();for(var i in r){for(var l=0;l27){t.engine="Blink"}else if(t.browser==="Opera"&&parseInt(t.version)>12){t.engine="Blink"}else if(t.browser==="Yandex"){t.engine="Blink"}else if(t.browser===undefined){t.browser="Unknow App"}}function n(e){return new t(e)}var a=n;e["default"]=a,r.exports=i.default})?t.apply(i,n):t)||(r.exports=a)},function(module,exports){module.exports=function anonymous(locals,filters,escape,rethrow){escape=escape||function(e){return String(e).replace(/&/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,""")};var __stack={lineno:1,input:'
    \n
    \n \n
    \n
    \n \n href="<%= data.link %>"<% } %>><%= data.nick %>\n \n <% if (!!data.badge) { %>\n style="background-color: <%= data.badge.color %>"<% } %>>\n <%= data.badge.name || \'管理员\' %>\n \n <% } %>\n <%= getDateFormatted() %>\n <%= getUserUaBrowser() %>\n <%= getUserUaOS() %>\n
    \n
    \n
    <%- getContentMarked() %>
    \n <% if(!!data.is_collapsed) { %>\n
    \n 该评论已被系统或管理员折叠\n 查看内容\n
    \n <% } %>\n
    \n \n
    \n
    \n
    \n',filename:"."};function rethrow(e,t,n,a){var r=t.split("\n"),i=Math.max(a-3,0),l=Math.min(r.length,a+3),s=r.slice(i,l).map(function(e,t){var n=t+i+1;return(n==a?" >> ":" ")+n+"| "+e}).join("\n");throw e.path=n,e.message=(n||"ejs")+":"+a+"\n"+s+"\n\n"+e.message,e}try{var buf=[];with(locals||{})buf.push('
    \n
    \n
    \n \n \n \n
    \n
    \n
    \n \n ",escape((__stack.lineno=11,data.nick)),"\n \n "),__stack.lineno=13,data.badge&&(buf.push('\n \n ",escape((__stack.lineno=15,data.badge.name||"管理员")),"\n \n "),__stack.lineno=17),buf.push('\n ',escape((__stack.lineno=18,getDateFormatted())),'\n ',escape((__stack.lineno=19,getUserUaBrowser())),'\n ',escape((__stack.lineno=20,getUserUaOS())),'\n
    \n
    \n
    ',(__stack.lineno=23,getContentMarked()),"
    \n "),__stack.lineno=24,data.is_collapsed&&(buf.push('\n
    \n 该评论已被系统或管理员折叠\n 查看内容\n
    \n '),__stack.lineno=29),buf.push('\n
    \n \n
    \n
    \n
    \n');return buf.join("")}catch(e){rethrow(e,__stack.input,__stack.filename,__stack.lineno)}}},function(h,m,g){var e,t,n;t=[m,g(28),g(0),g(2),g(3),g(4),g(5),g(34),g(6),g(7)],void 0===(n="function"==typeof(e=function(e,i,r,t,l,s,o,n,a,c){"use strict";var u=g(1);function d(a){return function(){var e=(0,o["default"])(a),t;if(f()){var n=(0,o["default"])(this).constructor;t=Reflect.construct(e,arguments,n)}else{t=e.apply(this,arguments)}return(0,s["default"])(this,t)}}function f(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Date.prototype.toString.call(Reflect.construct(Date,[],function(){}));return true}catch(e){return false}}Object.defineProperty(e,"__esModule",{value:true}),e["default"]=void 0,i=u(i),r=u(r),t=u(t),l=u(l),s=u(s),o=u(o),a=u(a),c=u(c);var p=function(e){(0,l["default"])(a,e);var n=d(a);function a(e){var t;(0,r["default"])(this,a);t=n.call(this,e.artalk);t.editor=e;t.emoticons=t.artalk.conf.emoticons;t.initElem();return t}(0,t["default"])(a,[{key:"initElem",value:function e(){var i=this;this.elem=c["default"].createElement(g(35)(this));this.listWrapElem=this.elem.querySelector(".artalk-emoticons-list-wrap");this.typesElem=this.elem.querySelector(".artalk-emoticons-types");this.typesElem.querySelectorAll("span").forEach(function(e){e.addEventListener("click",function(e){var t=e.currentTarget;var n=t.getAttribute("data-key");if(n)i.openType(n)})});if(Object.keys(this.emoticons).length>0)this.openType(Object.keys(this.emoticons)[0]);this.listWrapElem.querySelectorAll(".artalk-emoticons-item").forEach(function(e){e.onclick=function(e){var t=e.currentTarget;var n=t.closest(".artalk-emoticons-list").getAttribute("data-input-type");var a=t.getAttribute("title");var r=t.getAttribute("data-content");if(n==="image"){i.editor.insertContent(":[".concat(a,"]"))}else{i.editor.insertContent(r)}}})}},{key:"openType",value:function e(t){Array.from(this.listWrapElem.children).forEach(function(e){if(e.getAttribute("data-key")!==t){e.style.display="none"}else{e.style.display=""}});this.typesElem.querySelectorAll("span.active").forEach(function(e){return e.classList.remove("active")});this.typesElem.querySelector('span[data-key="'.concat(t,'"]')).classList.add("active");this.changeListHeight()}},{key:"getName",value:function e(){return"emoticons"}},{key:"getBtnHtml",value:function e(){return"表情"}},{key:"getElem",value:function e(){return this.elem}},{key:"changeListHeight",value:function e(){}},{key:"onShow",value:function e(){var t=this;setTimeout(function(){t.changeListHeight()},30)}},{key:"onHide",value:function e(){this.elem.parentElement.style.height=""}},{key:"transEmoticonImageText",value:function e(r){Object.entries(this.emoticons).forEach(function(e){var t=(0,i["default"])(e,2),n=t[0],a=t[1];if(a.inputType!=="image")return;Object.entries(a.container).forEach(function(e){var t=(0,i["default"])(e,2),n=t[0],a=t[1];r=r.split(":[".concat(n,"]")).join("![".concat(n,"](").concat(a,") "))})});return r}}]);return a}(a["default"]);(e["default"]=p).displayName="EmoticonsPlug",h.exports=m.default})?e.apply(m,t):e)||(h.exports=n)},function(e,t,n){var a=n(29),r=n(30),i=n(31),l=n(33);e.exports=function(e,t){return a(e)||r(e,t)||i(e,t)||l()}},function(e,t){e.exports=function(e){if(Array.isArray(e))return e}},function(e,t){e.exports=function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],a=!0,r=!1,i=void 0;try{for(var l,s=e[Symbol.iterator]();!(a=(l=s.next()).done)&&(n.push(l.value),!t||n.length!==t);a=!0);}catch(e){r=!0,i=e}finally{try{a||null==s.return||s.return()}finally{if(r)throw i}}return n}}},function(e,t,n){var a=n(32);e.exports=function(e,t){if(e){if("string"==typeof e)return a(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(n):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(e,t):void 0}}},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n/g,">").replace(/'/g,"'").replace(/"/g,""")};var __stack={lineno:1,input:'
    \r\n
    \r\n <% for (var i in emoticons) { %>\r\n <% var item = emoticons[i] %>\r\n \r\n <% } %>\r\n
    \r\n
    \r\n <% var types = Object.keys(emoticons); %>\r\n <% for (var i in types) { %>\r\n <%= types[i] %>\r\n <% } %>\r\n
    \r\n
    \r\n',filename:"."};function rethrow(e,t,n,a){var r=t.split("\n"),i=Math.max(a-3,0),l=Math.min(r.length,a+3),s=r.slice(i,l).map(function(e,t){var n=t+i+1;return(n==a?" >> ":" ")+n+"| "+e}).join("\n");throw e.path=n,e.message=(n||"ejs")+":"+a+"\n"+s+"\n\n"+e.message,e}try{var buf=[];with(locals||{})!function(){for(var e in buf.push('
    \n
    \n '),__stack.lineno=3,emoticons){buf.push("\n "),__stack.lineno=4;var t=emoticons[e];for(var n in buf.push('\n \n "),__stack.lineno=17}buf.push('\n
    \n
    \n '),__stack.lineno=20;var r=Object.keys(emoticons);for(var e in buf.push("\n "),__stack.lineno=21,r)buf.push('\n ',escape((__stack.lineno=22,r[e])),"\n "),__stack.lineno=23;buf.push("\n
    \n
    \n")}();return buf.join("")}catch(e){rethrow(e,__stack.input,__stack.filename,__stack.lineno)}}},function(p,h,m){var e,t,n;t=[h,m(0),m(2),m(3),m(4),m(5),m(37),m(6),m(7)],void 0===(n="function"==typeof(e=function(e,r,t,i,l,s,n,a,o){"use strict";var c=m(1);function u(a){return function(){var e=(0,s["default"])(a),t;if(d()){var n=(0,s["default"])(this).constructor;t=Reflect.construct(e,arguments,n)}else{t=e.apply(this,arguments)}return(0,l["default"])(this,t)}}function d(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Date.prototype.toString.call(Reflect.construct(Date,[],function(){}));return true}catch(e){return false}}Object.defineProperty(e,"__esModule",{value:true}),e["default"]=void 0,r=c(r),t=c(t),i=c(i),l=c(l),s=c(s),a=c(a),o=c(o);var f=function(e){(0,i["default"])(a,e);var n=u(a);function a(e){var t;(0,r["default"])(this,a);t=n.call(this,e.artalk);t.editor=e;t.binded=false;t.initElem();return t}(0,t["default"])(a,[{key:"initElem",value:function e(){this.elem=o["default"].createElement('
    ');this.binded=false}},{key:"getName",value:function e(){return"preview"}},{key:"getBtnHtml",value:function e(){return'预览 '}},{key:"getElem",value:function e(){return this.elem}},{key:"onShow",value:function e(){var t=this;this.updateContent();if(!this.binded){var n=function e(){t.updateContent()};this.editor.textareaEl.addEventListener("input",n);this.editor.textareaEl.addEventListener("change",n);this.binded=true}}},{key:"onHide",value:function e(){}},{key:"updateContent",value:function e(){if(this.elem.style.display!=="none"){this.elem.innerHTML=this.editor.getContentMarked()}}}]);return a}(a["default"]);(e["default"]=f).displayName="PreviewPlug",p.exports=h.default})?e.apply(h,t):e)||(p.exports=n)},function(e,t,n){},function(module,exports){module.exports=function anonymous(locals,filters,escape,rethrow){escape=escape||function(e){return String(e).replace(/&/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,""")};var __stack={lineno:1,input:'
    \n
    \n \n \n \n
    \n
    \n \n \n
    \n \n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n',filename:"."};function rethrow(e,t,n,a){var r=t.split("\n"),i=Math.max(a-3,0),l=Math.min(r.length,a+3),s=r.slice(i,l).map(function(e,t){var n=t+i+1;return(n==a?" >> ":" ")+n+"| "+e}).join("\n");throw e.path=n,e.message=(n||"ejs")+":"+a+"\n"+s+"\n\n"+e.message,e}try{var buf=[];with(locals||{})buf.push('
    \n
    \n \n \n \n
    \n
    \n \n \n
    \n \n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n');return buf.join("")}catch(e){rethrow(e,__stack.input,__stack.filename,__stack.lineno)}}},function(g,k,v){var e,t,n;t=[k,v(0),v(2),v(8),v(3),v(4),v(5),v(40),v(43),v(9),v(6),v(7)],void 0===(n="function"==typeof(e=function(e,r,t,i,l,s,o,c,n,u,a,d){"use strict";var f=v(1);function p(a){return function(){var e=(0,o["default"])(a),t;if(h()){var n=(0,o["default"])(this).constructor;t=Reflect.construct(e,arguments,n)}else{t=e.apply(this,arguments)}return(0,s["default"])(this,t)}}function h(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Date.prototype.toString.call(Reflect.construct(Date,[],function(){}));return true}catch(e){return false}}Object.defineProperty(e,"__esModule",{value:true}),e["default"]=void 0,r=f(r),t=f(t),i=f(i),l=f(l),s=f(s),o=f(o),c=f(c),u=f(u),a=f(a),d=f(d);var m=function(e){(0,l["default"])(a,e);var n=p(a);function a(e){var t;(0,r["default"])(this,a);t=n.call(this,e);t.reqPageSize=15;t.isLoading=false;t.el=d["default"].createElement(v(44)((0,i["default"])(t)));t.artalk.el.appendChild(t.el);t.commentsWrapEl=t.el.querySelector(".artalk-list-comments-wrap");t.initListActionBtn();t.reqPageSize=t.artalk.conf.readMore?t.artalk.conf.readMore.pageSize||t.reqPageSize:t.reqPageSize;t.readMoreEl=t.el.querySelector(".artalk-list-read-more");t.readMoreLoadingEl=t.readMoreEl.querySelector(".artalk-loading-icon");t.readMoreTextEl=t.readMoreEl.querySelector(".artalk-text");t.readMoreEl.addEventListener("click",function(){t.readMore()});return t}(0,t["default"])(a,[{key:"reqComments",value:function e(){var r=this;var i=arguments.length>0&&arguments[0]!==undefined?arguments[0]:0;if(i===0){this.artalk.clearComments()}this.artalk.request("CommentGet",{page_key:this.artalk.conf.pageKey,limit:this.reqPageSize,offset:i},function(){r.isLoading=true;if(i===0)r.artalk.ui.showLoading();else r.readMoreBtnSetLoading(true)},function(){r.isLoading=false;if(i===0)r.artalk.ui.hideLoading();else r.readMoreBtnSetLoading(false)},function(e,t){r.data=Object.assign({},t);r.artalk.ui.setGlobalError(null);r.reqImportComments(t.comments);if(r.hasMoreComments)r.showReadMoreBtn();else r.hideReadMoreBtn();r.artalk.checkGoToCommentByUrlHash();if(i===0&&r.hasMoreComments){r.initScrollBottomAutoLoad()}},function(e,t){if(i===0){var n=d["default"].createElement("".concat(e,",无法获取评论列表数据
    "));var a=d["default"].createElement('点击重新获取');a.addEventListener("click",function(){r.reqComments(0)});n.appendChild(a);r.artalk.ui.setGlobalError(n)}else{r.readMoreBtnShowErr("".concat(e," 获取失败"))}})}},{key:"reqImportComments",value:function e(t){var r=this;if(!Array.isArray(t)){throw new Error("请求响应参数非数组")}var n=function n(a){var e=t.filter(function(e){return e.rid===a.data.id});if(e.length===0)return;e.forEach(function(e){e.is_allow_reply=a.data.is_allow_reply;var t=new u["default"](r.artalk,r,e);a.putChild(t);n(t)})};t.filter(function(e){return e.rid===0}).forEach(function(e){if(e.is_collapsed)e.is_allow_reply=false;var t=new u["default"](r.artalk,r,e);r.artalk.comments.push(t);r.commentsWrapEl.appendChild(t.getElem());t.playFadeInAnim();n(t)});this.refreshUI(true)}},{key:"putRootComment",value:function e(t){this.commentsWrapEl.prepend(t.getElem());this.artalk.comments.unshift(t)}},{key:"initListActionBtn",value:function e(){var t=this;this.openSidebarBtnEl=this.el.querySelector('[data-action="open-sidebar"]');this.openSidebarBtnEl.addEventListener("click",function(){t.artalk.sidebar.show()});this.closeCommentBtnEl=this.el.querySelector('[data-action="admin-close-comment"]');this.closeCommentBtnEl.addEventListener("click",function(){t.adminSetPage({is_close_comment:!t.data.page.is_close_comment})})}},{key:"refreshUI",value:function e(){var t=this;var n=arguments.length>0&&arguments[0]!==undefined?arguments[0]:false;this.el.querySelector(".artalk-comment-count-num").innerText=this.getListCommentCount().toString();var a=this.commentsWrapEl.querySelector(".artalk-no-comment");if(this.artalk.comments.length<=0&&!a){a=d["default"].createElement('
    ');a.innerText=this.artalk.conf.noComment;this.commentsWrapEl.appendChild(a)}if(this.artalk.comments.length>0&&a!==null){a.remove()}if(!!this.artalk.user.data.nick&&!!this.artalk.user.data.email){this.openSidebarBtnEl.classList.remove("artalk-hide")}else{this.openSidebarBtnEl.classList.add("artalk-hide")}this.el.querySelectorAll("[data-list-ui-only-admin]").forEach(function(e){if(t.artalk.user.data.isAdmin)e.classList.remove("artalk-hide");else e.classList.add("artalk-hide")});if(!!this.data&&!!this.data.page&&this.data.page.is_close_comment===true){this.artalk.editor.closeComment();this.closeCommentBtnEl.innerHTML="打开评论"}else if(!n){this.artalk.editor.openComment();this.closeCommentBtnEl.innerHTML="关闭评论"}}},{key:"getListCommentCount",value:function e(){if(!this.data||!this.data.total)return 0;return Number(this.data.total||"0")}},{key:"readMore",value:function e(){var t=this.data.offset+this.reqPageSize;this.reqComments(t)}},{key:"showReadMoreBtn",value:function e(){this.readMoreEl.style.display=""}},{key:"hideReadMoreBtn",value:function e(){this.readMoreEl.style.display="none"}},{key:"readMoreBtnSetLoading",value:function e(t){this.showReadMoreBtn();this.readMoreLoadingEl.style.display=t?"":"none";this.readMoreTextEl.style.display=t?"none":""}},{key:"readMoreBtnShowErr",value:function e(t){var n=this;this.readMoreBtnSetLoading(false);var a=this.readMoreTextEl.innerText;this.readMoreTextEl.innerText=t;this.readMoreEl.classList.add("artalk-err");setTimeout(function(){n.readMoreTextEl.innerText=a;n.readMoreEl.classList.remove("artalk-err")},2e3)}},{key:"initScrollBottomAutoLoad",value:function e(){var t=this;if(!this.artalk.conf.readMore)return;if(!this.artalk.conf.readMore.autoLoad)return;document.addEventListener("scroll",function(){var e=t.el.querySelector(".artalk-list-comments-wrap > .artalk-comment-wrap:nth-last-child(3)");if(!e)return;if(!t.hasMoreComments)return;if(t.isLoading)return;if(t.artalk.ui.isVisible(e)){t.readMore()}})}},{key:"checkNickEmailIsAdmin",value:function e(t,n){if(!this.data||!this.data.admin_nicks||!this.data.admin_encrypted_emails)return false;return this.data.admin_nicks.indexOf(t)!==-1&&this.data.admin_encrypted_emails.find(function(e){return String(e).toLowerCase()===String((0,c["default"])(n)).toLowerCase()})}},{key:"adminSetPage",value:function e(t){var n=this;this.artalk.request("SetPage",{nick:this.artalk.user.data.nick,email:this.artalk.user.data.email,page_key:this.artalk.conf.pageKey,password:this.artalk.user.data.password,is_close_comment:Number(t.is_close_comment)},function(){n.artalk.ui.showLoading(n.artalk.editor.el)},function(){n.artalk.ui.hideLoading(n.artalk.editor.el)},function(e,t){n.data.page=Object.assign({},t);n.refreshUI()},function(e,t){n.artalk.editor.showNotify("修改页面数据失败:".concat(e),"e")})}},{key:"hasMoreComments",get:function e(){if(!this.data)return false;return this.data.total_parents>this.data.offset+this.data.limit}}]);return a}(a["default"]);(e["default"]=m).displayName="List",g.exports=k.default})?e.apply(k,t):e)||(g.exports=n)},function(e,t,n){var k,v,y,b,x;k=n(41),v=n(12).utf8,y=n(42),b=n(12).bin,(x=function(e,t){e.constructor==String?e=t&&"binary"===t.encoding?b.stringToBytes(e):v.stringToBytes(e):y(e)?e=Array.prototype.slice.call(e,0):Array.isArray(e)||(e=e.toString());for(var n=k.bytesToWords(e),a=8*e.length,r=1732584193,i=-271733879,l=-1732584194,s=271733878,o=0;o>>24)|4278255360&(n[o]<<24|n[o]>>>8);n[a>>>5]|=128<>>9<<4)]=a;var c=x._ff,u=x._gg,d=x._hh,f=x._ii;for(o=0;o>>0,i=i+h>>>0,l=l+m>>>0,s=s+g>>>0}return k.endian([r,i,l,s])})._ff=function(e,t,n,a,r,i,l){var s=e+(t&n|~t&a)+(r>>>0)+l;return(s<>>32-i)+t},x._gg=function(e,t,n,a,r,i,l){var s=e+(t&a|n&~a)+(r>>>0)+l;return(s<>>32-i)+t},x._hh=function(e,t,n,a,r,i,l){var s=e+(t^n^a)+(r>>>0)+l;return(s<>>32-i)+t},x._ii=function(e,t,n,a,r,i,l){var s=e+(n^(t|~a))+(r>>>0)+l;return(s<>>32-i)+t},x._blocksize=16,x._digestsize=16,e.exports=function(e,t){if(null==e)throw new Error("Illegal argument "+e);var n=k.wordsToBytes(x(e,t));return t&&t.asBytes?n:t&&t.asString?b.bytesToString(n):k.bytesToHex(n)}},function(e,t){var i,n;i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n={rotl:function(e,t){return e<>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(e){if(e.constructor==Number)return 16711935&n.rotl(e,8)|4278255360&n.rotl(e,24);for(var t=0;t>>5]|=e[n]<<24-a%32;return t},wordsToBytes:function(e){for(var t=[],n=0;n<32*e.length;n+=8)t.push(e[n>>>5]>>>24-n%32&255);return t},bytesToHex:function(e){for(var t=[],n=0;n>>4).toString(16)),t.push((15&e[n]).toString(16));return t.join("")},hexToBytes:function(e){for(var t=[],n=0;n>>6*(3-r)&63)):t.push("=");return t.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var t=[],n=0,a=0;n>>6-2*a);return t}},e.exports=n},function(e,t){function n(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)} /*! * Determine if an object is a Buffer * * @author Feross Aboukhadijeh * @license MIT */ -e.exports=function(e){return null!=e&&(n(e)||"function"==typeof(t=e).readFloatLE&&"function"==typeof t.slice&&n(t.slice(0,0))||!!e._isBuffer);var t}},function(e,t,n){},function(module,exports){module.exports=function anonymous(locals,filters,escape,rethrow){escape=escape||function(e){return String(e).replace(/&/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,""")};var __stack={lineno:1,input:'
    \n
    \n
    \n 0\n 条评论\n
    \n
    \n 关闭评论\n 通知中心\n
    \n
    \n
    \n
    \n
    \n \n
    \n \n
    \n',filename:"."};function rethrow(e,t,n,a){var r=t.split("\n"),i=Math.max(a-3,0),l=Math.min(r.length,a+3),s=r.slice(i,l).map(function(e,t){var n=t+i+1;return(n==a?" >> ":" ")+n+"| "+e}).join("\n");throw e.path=n,e.message=(n||"ejs")+":"+a+"\n"+s+"\n\n"+e.message,e}try{var buf=[];with(locals||{})buf.push('
    \n
    \n
    \n 0\n 条评论\n
    \n
    \n 关闭评论\n 通知中心\n
    \n
    \n
    \n
    \n
    \n \n
    \n \n
    \n');return buf.join("")}catch(e){rethrow(e,__stack.input,__stack.filename,__stack.lineno)}}},function(g,k,v){var e,t,n;t=[k,v(0),v(2),v(8),v(3),v(4),v(5),v(9),v(46),v(6),v(7),v(11)],void 0===(n="function"==typeof(e=function(e,r,t,i,l,s,o,c,n,a,u,d){"use strict";var f=v(1);function p(a){return function(){var e=(0,o["default"])(a),t;if(h()){var n=(0,o["default"])(this).constructor;t=Reflect.construct(e,arguments,n)}else{t=e.apply(this,arguments)}return(0,s["default"])(this,t)}}function h(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Date.prototype.toString.call(Reflect.construct(Date,[],function(){}));return true}catch(e){return false}}Object.defineProperty(e,"__esModule",{value:true}),e["default"]=void 0,r=f(r),t=f(t),i=f(i),l=f(l),s=f(s),o=f(o),c=f(c),a=f(a),u=f(u),d=f(d);var m=function(e){(0,l["default"])(a,e);var n=p(a);function a(e){var t;(0,r["default"])(this,a);t=n.call(this,e);t.el=u["default"].createElement(v(47)((0,i["default"])(t)));t.contentEl=t.el.querySelector(".artalk-sidebar-content");t.el.querySelector(".artalk-sidebar-close").addEventListener("click",function(){t.hide()});return t}(0,t["default"])(a,[{key:"show",value:function e(){var n=this;this.layer=(0,d["default"])(this.artalk,"sidebar",this.el);this.layer.show();this.contentEl.scrollTo(0,0);setTimeout(function(){n.el.style.transform="translate(0, 0)"},20);this.artalk.request("CommentReplyGet",{nick:this.artalk.user.data.nick,email:this.artalk.user.data.email},function(){n.artalk.ui.showLoading(n.contentEl)},function(){n.artalk.ui.hideLoading(n.contentEl)},function(e,t){n.contentEl.innerHTML="";if(Array.isArray(t.reply_comments)){t.reply_comments.forEach(function(e){n.putComment(e)})}},function(e,t){})}},{key:"hide",value:function e(){this.el.style.transform="";this.layer.dispose()}},{key:"putComment",value:function e(t){var n=new c["default"](this.artalk,null,t);n.elem.querySelector('[data-comment-action="reply"]').remove();n.elem.style.cursor="pointer";n.elem.addEventListener("mouseover",function(){n.elem.style.backgroundColor="#F4F4F4"});n.elem.addEventListener("mouseout",function(){n.elem.style.backgroundColor=""});n.elem.addEventListener("click",function(e){e.preventDefault();window.location.href="".concat(t.page_key,"#artalk-comment-").concat(n.data.id)});this.contentEl.appendChild(n.getElem())}}]);return a}(a["default"]);(e["default"]=m).displayName="Sidebar",g.exports=k.default})?e.apply(k,t):e)||(g.exports=n)},function(e,t,n){},function(module,exports){module.exports=function anonymous(locals,filters,escape,rethrow){escape=escape||function(e){return String(e).replace(/&/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,""")};var __stack={lineno:1,input:'
    \r\n
    \r\n
    Artalk · 通知中心
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n',filename:"."};function rethrow(e,t,n,a){var r=t.split("\n"),i=Math.max(a-3,0),l=Math.min(r.length,a+3),s=r.slice(i,l).map(function(e,t){var n=t+i+1;return(n==a?" >> ":" ")+n+"| "+e}).join("\n");throw e.path=n,e.message=(n||"ejs")+":"+a+"\n"+s+"\n\n"+e.message,e}try{var buf=[];with(locals||{})buf.push('
    \n
    \n
    Artalk · 通知中心
    \n
    \n
    \n
    \n
    \n');return buf.join("")}catch(e){rethrow(e,__stack.input,__stack.filename,__stack.lineno)}}},function(f,p,h){var e,t,n;t=[p,h(0),h(2),h(3),h(4),h(5),h(6),h(7)],void 0===(n="function"==typeof(e=function(e,r,t,i,l,s,n,u){"use strict";var a=h(1);function o(a){return function(){var e=(0,s["default"])(a),t;if(c()){var n=(0,s["default"])(this).constructor;t=Reflect.construct(e,arguments,n)}else{t=e.apply(this,arguments)}return(0,l["default"])(this,t)}}function c(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Date.prototype.toString.call(Reflect.construct(Date,[],function(){}));return true}catch(e){return false}}Object.defineProperty(e,"__esModule",{value:true}),e["default"]=void 0,r=a(r),t=a(t),i=a(i),l=a(l),s=a(s),n=a(n),u=a(u);var d=function(e){(0,i["default"])(a,e);var n=o(a);function a(e){var t;(0,r["default"])(this,a);t=n.call(this,e);t.el=t.artalk.el;return t}(0,t["default"])(a,[{key:"showLoading",value:function e(t){if(!t)t=this.el;var n=t.querySelector(".artalk-loading");if(!n){n=u["default"].createElement('');t.appendChild(n)}n.style.display=""}},{key:"hideLoading",value:function e(t){if(!t)t=this.el;var n=t.querySelector(".artalk-loading");n.style.display="none"}},{key:"setGlobalError",value:function e(t){var n=this.el.querySelector(".artalk-error-layer");if(t===null){if(n!==null)n.remove();return}if(!n){n=u["default"].createElement('
    Artalk Error
    ');this.el.appendChild(n)}var a=n.querySelector(".artalk-error-text");a.innerHTML="";if(t===null)return;if(t instanceof HTMLElement){a.appendChild(t)}else{a.innerText=t}}},{key:"showDialog",value:function e(t,n,a,r){var i=u["default"].createElement('
    ');t.appendChild(i);var l=i.querySelector(".artalk-layer-dialog-action");var s=function e(n){return function(e){var t=n(i,e.currentTarget);if(t===undefined||t===true){i.remove()}}};if(typeof a==="function"){var o=u["default"].createElement('');o.onclick=s(a);l.appendChild(o)}if(typeof r==="function"){var c=u["default"].createElement('');c.onclick=s(r);l.appendChild(c)}i.querySelector(".artalk-layer-dialog-content").appendChild(n)}},{key:"showNotify",value:function e(t,n,a){var r={s:"#57d59f",e:"#ff6f6c",w:"#ffc721",i:"#2ebcfc"};var i=3e3;var l=u["default"].createElement('
    '));var s=l.querySelector(".artalk-notify-content");s.innerHTML=u["default"].htmlEncode(t).replace("\n","
    ");a.appendChild(l);var o=function e(){l.classList.add("artalk-fade-out");setTimeout(function(){l.remove()},200)};var c;if(i>0){c=setTimeout(function(){o()},i)}l.addEventListener("click",function(){o();clearTimeout(c)})}},{key:"scrollIntoView",value:function e(t){var n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:true;if(this.isVisible(t))return;var a=u["default"].getOffset(t).top+u["default"].getHeight(t)/2-document.documentElement.clientHeight/2;if(n){window.scroll({top:a>0?a:0,left:0,behavior:"smooth"})}else{window.scroll(0,a>0?a:0)}}},{key:"isVisible",value:function e(t){var n=window.scrollY;var a=n+document.documentElement.clientHeight;var r=u["default"].getOffset(t).top;var i=r+t.offsetHeight;return i<=a&&r>=n}},{key:"playFadeAnim",value:function e(t,n){var a=arguments.length>2&&arguments[2]!==undefined?arguments[2]:"in";t.classList.add("artalk-fade-".concat(a));var r=function e(){t.classList.remove("artalk-fade-".concat(a));t.removeEventListener("animationend",e);if(n)n()};t.addEventListener("animationend",r)}},{key:"playFadeInAnim",value:function e(t,n){this.playFadeAnim(t,n,"in")}},{key:"playFadeOutAnim",value:function e(t,n){this.playFadeAnim(t,n,"out")}}]);return a}(n["default"]);(e["default"]=d).displayName="Ui",f.exports=p.default})?e.apply(p,t):e)||(f.exports=n)},function(e){e.exports=JSON.parse('{"颜表情":{"inputType":"emoticon","container":{"Hi":"|´・ω・)ノ","开心":"ヾ(≧∇≦*)ゝ","星星眼":"(☆ω☆)","掀桌":"(╯‵□′)╯︵┴─┴","流口水":" ̄﹃ ̄","捂脸":"(/ω\)","给跪":"∠( ᐛ 」∠)_","蛤?":"(๑•̀ㅁ•́ฅ)","斜眼":"→_→","加油":"୧(๑•̀⌄•́๑)૭","有木有WiFi":"٩(ˊᗜˋ*)و","前方高能预警":"(ノ°ο°)ノ","我从未见过如此厚颜无耻之人":"(´இ皿இ`)","吓死宝宝惹":"⌇●﹏●⌇","已阅留爪":"(ฅ´ω`ฅ)","去吧大师球":"(╯°A°)╯︵○○○","太萌惹":"φ( ̄∇ ̄o)","咦咦咦":"ヾ(´・ ・`。)ノ\\"","气呼呼":"( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃","我受到了惊吓":"(ó﹏ò。)","什么鬼":"Σ(っ °Д °;)っ","摸摸头":"( ,,´・ω・)ノ\\"(´っω・`。)","无奈":"╮(╯▽╰)╭ ","脸红":"o(*////▽////*)q ","悲哀":">﹏<","静静地看着你":"( ๑´•ω•) \\"(ㆆᴗㆆ)","不要哇":"(。•ˇ‸ˇ•。)"}},"Emoji":{"inputType":"emoji","container":["😀","😃","😄","😁","😆","😅","😂","😊","😉","👀","😌","😍","😘","😋","😜","😝","😎","😏","😒","😟","😕","😖","😫","😩","😠","😲","😵","😳","😱","😨","😢","😭","😷","✋","✌️","👊","👋","👏","👍","👎","❤️","🎉","🚀"]},"滑稽":{"inputType":"image","container":{"原味稽":"https://i.loli.net/2019/02/01/5c53d26b7ae13.png","还是算了":"https://i.loli.net/2020/04/30/riySFlu75fJdG4p.png","蓝纹稽":"https://i.loli.net/2020/04/30/jyh5IVzpqXsHuvU.jpg","随稽应变":"https://i.loli.net/2017/02/05/5896e6ec1d528.jpg","蠕动":"https://i.loli.net/2017/02/05/5896e9712a3c1.gif","束手无稽":"https://i.loli.net/2020/04/30/dF8sTOpgomj7qf5.jpg","微笑默叹以为妙绝":"https://i.loli.net/2019/02/01/5c53daa84f24a.png","喝嘤料":"https://i.loli.net/2019/02/01/5c53d63d8c6af.jpg","暗中观察":"https://i.loli.net/2019/02/01/5c53dd21a2e7b.jpg","高兴":"https://i.loli.net/2019/02/01/5c53d1b9e5f38.jpg","惊稽":"https://i.loli.net/2019/02/01/5c53d1e2ad89f.jpg","可这和我的帅有什么关系":"https://i.loli.net/2017/02/05/5896ece29a8e0.jpg","狱稽":"https://i.loli.net/2020/04/30/cUEQrVYGFiDjqhy.jpg","梆":"https://i.loli.net/2020/04/30/TlAGjm6IvJSMVpq.jpg","吃鱼摆摆":"https://i.loli.net/2017/02/05/5896ec2cb7f39.gif","跃跃欲试 3":"https://i.loli.net/2017/02/05/5896ece2ac5a2.gif","突然滑稽":"https://i.loli.net/2019/02/01/5c53cf2a457f1.jpg","扶墙怂":"https://i.loli.net/2017/02/05/5896ece2ab57a.jpg","阔以":"https://i.loli.net/2020/04/30/7EYyq1TcBKa3eQ2.jpg","不得行":"https://i.loli.net/2020/04/30/KoqBGauX7TEfeyn.jpg","少儿不宜":"https://i.loli.net/2020/04/30/nt2ZWRozUNjBxAK.jpg","稽日可期":"https://i.loli.net/2020/04/30/FmfYcoMJesi2Ddq.jpg","哎":"https://i.loli.net/2020/04/30/ps7PTIANgSErqnU.jpg","别看丢人":"https://i.loli.net/2019/02/01/5c53d4f89ea29.jpg","地稽 2":"https://i.loli.net/2019/02/01/5c53dbae85687.jpg","地稽":"https://i.loli.net/2020/04/30/BnTMX35EPxleVmA.jpg","老阔有点扣":"https://i.loli.net/2020/04/30/fhDXbA9T1zJPlKk.gif","啊哈哈":"https://i.loli.net/2019/02/01/5c53dc2947d84.jpg","无稽可奈":"https://i.loli.net/2020/04/30/UyxTzB2fS3LtH7Q.jpg","老实巴交":"https://i.loli.net/2020/04/30/7DgSoyqwtYBxchE.jpg","紧张":"https://i.loli.net/2017/02/05/5896e8a408253.jpg","摇摆稽":"https://i.loli.net/2019/02/01/5c53d1904dcb2.gif","又不是不能用":"https://i.loli.net/2019/02/01/5c53ce897ab55.jpg","一时滑稽":"https://i.loli.net/2019/02/01/5c53d5d28e22c.jpg","无法接受":"https://i.loli.net/2019/02/01/5c53cee8422fc.jpg","嘤雄豪稽":"https://i.loli.net/2020/04/30/sbtw6o7iKaM4Nmq.jpg","相视双稽":"https://i.loli.net/2019/02/01/5c53d5a093149.jpg","稽皮发麻":"https://i.loli.net/2017/02/05/5896ece2a019f.jpg","地稽 3":"https://i.loli.net/2019/02/01/5c53dbe510bcf.jpg","地稽委屈":"https://i.loli.net/2019/02/01/5c53d76e250da.jpg","地稽抚摸":"https://i.loli.net/2020/04/30/cavZ6nNzMPimLy7.gif","地稽捶打":"https://i.loli.net/2020/04/30/vFVPynXaHR5sitk.gif","绝望":"https://i.loli.net/2019/02/01/5c53dc0ba2303.jpg","气稽败坏":"https://i.loli.net/2019/02/01/5c53d216f3c60.jpg","当场去世":"https://i.loli.net/2020/04/30/sogxHMTFWbE2lrP.jpg","喝酒":"https://i.loli.net/2019/02/01/5c53d78c3f4a5.jpg","老衲摆摊算命":"https://i.loli.net/2017/02/05/5896ece29d8a5.gif","老哥,稳":"https://i.loli.net/2017/02/05/5896ece29ebb0.jpg","自闭稽":"https://i.loli.net/2019/02/01/5c53d6603ee24.jpg","无话可说":"https://i.loli.net/2019/02/01/5c53d6a77b7e4.jpg","跃跃欲试":"https://i.loli.net/2017/02/05/5896e9710dfd5.jpg","跃跃欲试 2":"https://i.loli.net/2019/02/01/5c53dcc057350.jpg","满脑子骚操作":"https://i.loli.net/2020/04/30/xJXcUtO2BryHAsa.gif","稽之舞":"https://i.loli.net/2019/02/01/5c53de1a4d14d.gif","将稽就稽":"https://i.loli.net/2020/04/30/KVwf8qCrZts6WOT.gif"}}}')}],e={},f.m=d,f.c=e,f.d=function(e,t,n){f.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},f.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},f.t=function(t,e){if(1&e&&(t=f(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(f.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var a in t)f.d(n,a,function(e){return t[e]}.bind(null,a));return n},f.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return f.d(t,"a",t),t},f.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},f.p="",f(f.s=13);function f(t){if(e[t])return e[t].exports;var n=e[t]={i:t,l:!1,exports:{}};return d[t].call(n.exports,n,n.exports,f),n.l=!0,n.exports}var d,e}); \ No newline at end of file +e.exports=function(e){return null!=e&&(n(e)||"function"==typeof(t=e).readFloatLE&&"function"==typeof t.slice&&n(t.slice(0,0))||!!e._isBuffer);var t}},function(e,t,n){},function(module,exports){module.exports=function anonymous(locals,filters,escape,rethrow){escape=escape||function(e){return String(e).replace(/&/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,""")};var __stack={lineno:1,input:'
    \n
    \n
    \n 0\n 条评论\n
    \n
    \n 关闭评论\n 通知中心\n
    \n
    \n
    \n
    \n
    \n \n
    \n \n
    \n',filename:"."};function rethrow(e,t,n,a){var r=t.split("\n"),i=Math.max(a-3,0),l=Math.min(r.length,a+3),s=r.slice(i,l).map(function(e,t){var n=t+i+1;return(n==a?" >> ":" ")+n+"| "+e}).join("\n");throw e.path=n,e.message=(n||"ejs")+":"+a+"\n"+s+"\n\n"+e.message,e}try{var buf=[];with(locals||{})buf.push('
    \n
    \n
    \n 0\n 条评论\n
    \n
    \n 关闭评论\n 通知中心\n
    \n
    \n
    \n
    \n
    \n \n
    \n \n
    \n');return buf.join("")}catch(e){rethrow(e,__stack.input,__stack.filename,__stack.lineno)}}},function(g,k,v){var e,t,n;t=[k,v(0),v(2),v(8),v(3),v(4),v(5),v(9),v(46),v(6),v(7),v(11)],void 0===(n="function"==typeof(e=function(e,r,t,i,l,s,o,c,n,a,u,d){"use strict";var f=v(1);function p(a){return function(){var e=(0,o["default"])(a),t;if(h()){var n=(0,o["default"])(this).constructor;t=Reflect.construct(e,arguments,n)}else{t=e.apply(this,arguments)}return(0,s["default"])(this,t)}}function h(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Date.prototype.toString.call(Reflect.construct(Date,[],function(){}));return true}catch(e){return false}}Object.defineProperty(e,"__esModule",{value:true}),e["default"]=void 0,r=f(r),t=f(t),i=f(i),l=f(l),s=f(s),o=f(o),c=f(c),a=f(a),u=f(u),d=f(d);var m=function(e){(0,l["default"])(a,e);var n=p(a);function a(e){var t;(0,r["default"])(this,a);t=n.call(this,e);t.el=u["default"].createElement(v(47)((0,i["default"])(t)));t.contentEl=t.el.querySelector(".artalk-sidebar-content");t.el.querySelector(".artalk-sidebar-close").addEventListener("click",function(){t.hide()});return t}(0,t["default"])(a,[{key:"show",value:function e(){var n=this;this.layer=(0,d["default"])(this.artalk,"sidebar",this.el);this.layer.show();this.contentEl.scrollTo(0,0);setTimeout(function(){n.el.style.transform="translate(0, 0)"},20);this.artalk.request("CommentReplyGet",{nick:this.artalk.user.data.nick,email:this.artalk.user.data.email},function(){n.artalk.ui.showLoading(n.contentEl)},function(){n.artalk.ui.hideLoading(n.contentEl)},function(e,t){n.contentEl.innerHTML="";if(Array.isArray(t.reply_comments)){t.reply_comments.forEach(function(e){n.putComment(e)})}},function(e,t){})}},{key:"hide",value:function e(){this.el.style.transform="";this.layer.dispose()}},{key:"putComment",value:function e(t){var n=new c["default"](this.artalk,null,t);n.elem.querySelector('[data-comment-action="reply"]').remove();n.elem.style.cursor="pointer";n.elem.addEventListener("mouseover",function(){n.elem.style.backgroundColor="#F4F4F4"});n.elem.addEventListener("mouseout",function(){n.elem.style.backgroundColor=""});n.elem.addEventListener("click",function(e){e.preventDefault();window.location.href="".concat(t.page_key,"#artalk-comment-").concat(n.data.id)});this.contentEl.appendChild(n.getElem())}}]);return a}(a["default"]);(e["default"]=m).displayName="Sidebar",g.exports=k.default})?e.apply(k,t):e)||(g.exports=n)},function(e,t,n){},function(module,exports){module.exports=function anonymous(locals,filters,escape,rethrow){escape=escape||function(e){return String(e).replace(/&/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,""")};var __stack={lineno:1,input:'
    \r\n
    \r\n
    Artalk · 通知中心
    \r\n
    \r\n
    \r\n
    \r\n
    \r\n',filename:"."};function rethrow(e,t,n,a){var r=t.split("\n"),i=Math.max(a-3,0),l=Math.min(r.length,a+3),s=r.slice(i,l).map(function(e,t){var n=t+i+1;return(n==a?" >> ":" ")+n+"| "+e}).join("\n");throw e.path=n,e.message=(n||"ejs")+":"+a+"\n"+s+"\n\n"+e.message,e}try{var buf=[];with(locals||{})buf.push('
    \n
    \n
    Artalk · 通知中心
    \n
    \n
    \n
    \n
    \n');return buf.join("")}catch(e){rethrow(e,__stack.input,__stack.filename,__stack.lineno)}}},function(f,p,h){var e,t,n;t=[p,h(0),h(2),h(3),h(4),h(5),h(6),h(7)],void 0===(n="function"==typeof(e=function(e,r,t,i,l,s,n,u){"use strict";var a=h(1);function o(a){return function(){var e=(0,s["default"])(a),t;if(c()){var n=(0,s["default"])(this).constructor;t=Reflect.construct(e,arguments,n)}else{t=e.apply(this,arguments)}return(0,l["default"])(this,t)}}function c(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Date.prototype.toString.call(Reflect.construct(Date,[],function(){}));return true}catch(e){return false}}Object.defineProperty(e,"__esModule",{value:true}),e["default"]=void 0,r=a(r),t=a(t),i=a(i),l=a(l),s=a(s),n=a(n),u=a(u);var d=function(e){(0,i["default"])(a,e);var n=o(a);function a(e){var t;(0,r["default"])(this,a);t=n.call(this,e);t.el=t.artalk.el;return t}(0,t["default"])(a,[{key:"showLoading",value:function e(t){if(!t)t=this.el;var n=t.querySelector(".artalk-loading");if(!n){n=u["default"].createElement('');t.appendChild(n)}n.style.display=""}},{key:"hideLoading",value:function e(t){if(!t)t=this.el;var n=t.querySelector(".artalk-loading");n.style.display="none"}},{key:"setGlobalError",value:function e(t){var n=this.el.querySelector(".artalk-error-layer");if(t===null){if(n!==null)n.remove();return}if(!n){n=u["default"].createElement('
    Artalk Error
    ');this.el.appendChild(n)}var a=n.querySelector(".artalk-error-text");a.innerHTML="";if(t===null)return;if(t instanceof HTMLElement){a.appendChild(t)}else{a.innerText=t}}},{key:"showDialog",value:function e(t,n,a,r){var i=u["default"].createElement('
    ');t.appendChild(i);var l=i.querySelector(".artalk-layer-dialog-action");var s=function e(n){return function(e){var t=n(i,e.currentTarget);if(t===undefined||t===true){i.remove()}}};if(typeof a==="function"){var o=u["default"].createElement('');o.onclick=s(a);l.appendChild(o)}if(typeof r==="function"){var c=u["default"].createElement('');c.onclick=s(r);l.appendChild(c)}i.querySelector(".artalk-layer-dialog-content").appendChild(n)}},{key:"showNotify",value:function e(t,n,a){var r={s:"#57d59f",e:"#ff6f6c",w:"#ffc721",i:"#2ebcfc"};var i=3e3;var l=u["default"].createElement('
    '));var s=l.querySelector(".artalk-notify-content");s.innerHTML=u["default"].htmlEncode(t).replace("\n","
    ");a.appendChild(l);var o=function e(){l.classList.add("artalk-fade-out");setTimeout(function(){l.remove()},200)};var c;if(i>0){c=setTimeout(function(){o()},i)}l.addEventListener("click",function(){o();clearTimeout(c)})}},{key:"scrollIntoView",value:function e(t){var n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:true;if(this.isVisible(t))return;var a=u["default"].getOffset(t).top+u["default"].getHeight(t)/2-document.documentElement.clientHeight/2;if(n){window.scroll({top:a>0?a:0,left:0,behavior:"smooth"})}else{window.scroll(0,a>0?a:0)}}},{key:"isVisible",value:function e(t){var n=window.scrollY;var a=n+document.documentElement.clientHeight;var r=u["default"].getOffset(t).top;var i=r+t.offsetHeight;return i<=a&&r>=n}},{key:"playFadeAnim",value:function e(t,n){var a=arguments.length>2&&arguments[2]!==undefined?arguments[2]:"in";t.classList.add("artalk-fade-".concat(a));var r=function e(){t.classList.remove("artalk-fade-".concat(a));t.removeEventListener("animationend",e);if(n)n()};t.addEventListener("animationend",r)}},{key:"playFadeInAnim",value:function e(t,n){this.playFadeAnim(t,n,"in")}},{key:"playFadeOutAnim",value:function e(t,n){this.playFadeAnim(t,n,"out")}}]);return a}(n["default"]);(e["default"]=d).displayName="Ui",f.exports=p.default})?e.apply(p,t):e)||(f.exports=n)},function(e){e.exports=JSON.parse('{"颜表情":{"inputType":"emoticon","container":{"Hi":"|´・ω・)ノ","开心":"ヾ(≧∇≦*)ゝ","星星眼":"(☆ω☆)","掀桌":"(╯‵□′)╯︵┴─┴","流口水":" ̄﹃ ̄","捂脸":"(/ω\)","给跪":"∠( ᐛ 」∠)_","哈?":"(๑•̀ㅁ•́ฅ)","斜眼":"→_→","加油":"୧(๑•̀⌄•́๑)૭","有木有WiFi":"٩(ˊᗜˋ*)و","前方高能预警":"(ノ°ο°)ノ","纳尼":"(´இ皿இ`)","吓死惹":"⌇●﹏●⌇","已阅留爪":"(ฅ´ω`ฅ)","去吧大师球":"(╯°A°)╯︵○○○","太萌惹":"φ( ̄∇ ̄o)","咦咦咦":"ヾ(´・ ・`。)ノ\\"","气呼呼":"( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃","我受到了惊吓":"(ó﹏ò。)","什么鬼":"Σ(っ °Д °;)っ","摸摸头":"( ,,´・ω・)ノ\\"(´っω・`。)","无奈":"╮(╯▽╰)╭ ","脸红":"o(*////▽////*)q ","悲哀":">﹏<","静静地看着你":"( ๑´•ω•) \\"(ㆆᴗㆆ)","不要哇":"(。•ˇ‸ˇ•。)"}},"Emoji":{"inputType":"emoji","container":["😀","😃","😄","😁","😆","😅","😂","😊","😉","👀","😌","😍","😘","😋","😜","😝","😎","😏","😒","😟","😕","😖","😫","😩","😠","😲","😵","😳","😱","😨","😢","😭","😷","✋","✌️","👊","👋","👏","👍","👎","❤️","🎉","🚀"]},"滑稽":{"inputType":"image","container":{"原味稽":"https://i.loli.net/2019/02/01/5c53d26b7ae13.png","还是算了":"https://i.loli.net/2020/04/30/riySFlu75fJdG4p.png","蓝纹稽":"https://i.loli.net/2020/04/30/jyh5IVzpqXsHuvU.jpg","随稽应变":"https://i.loli.net/2017/02/05/5896e6ec1d528.jpg","蠕动":"https://i.loli.net/2017/02/05/5896e9712a3c1.gif","束手无稽":"https://i.loli.net/2020/04/30/dF8sTOpgomj7qf5.jpg","微笑默叹以为妙绝":"https://i.loli.net/2019/02/01/5c53daa84f24a.png","喝嘤料":"https://i.loli.net/2019/02/01/5c53d63d8c6af.jpg","暗中观察":"https://i.loli.net/2019/02/01/5c53dd21a2e7b.jpg","高兴":"https://i.loli.net/2019/02/01/5c53d1b9e5f38.jpg","惊稽":"https://i.loli.net/2019/02/01/5c53d1e2ad89f.jpg","可这和我的帅有什么关系":"https://i.loli.net/2017/02/05/5896ece29a8e0.jpg","狱稽":"https://i.loli.net/2020/04/30/cUEQrVYGFiDjqhy.jpg","梆":"https://i.loli.net/2020/04/30/TlAGjm6IvJSMVpq.jpg","吃鱼摆摆":"https://i.loli.net/2017/02/05/5896ec2cb7f39.gif","跃跃欲试 3":"https://i.loli.net/2017/02/05/5896ece2ac5a2.gif","突然滑稽":"https://i.loli.net/2019/02/01/5c53cf2a457f1.jpg","扶墙怂":"https://i.loli.net/2017/02/05/5896ece2ab57a.jpg","阔以":"https://i.loli.net/2020/04/30/7EYyq1TcBKa3eQ2.jpg","不得行":"https://i.loli.net/2020/04/30/KoqBGauX7TEfeyn.jpg","少儿不宜":"https://i.loli.net/2020/04/30/nt2ZWRozUNjBxAK.jpg","稽日可期":"https://i.loli.net/2020/04/30/FmfYcoMJesi2Ddq.jpg","哎":"https://i.loli.net/2020/04/30/ps7PTIANgSErqnU.jpg","别看丢人":"https://i.loli.net/2019/02/01/5c53d4f89ea29.jpg","地稽 2":"https://i.loli.net/2019/02/01/5c53dbae85687.jpg","地稽":"https://i.loli.net/2020/04/30/BnTMX35EPxleVmA.jpg","老阔有点扣":"https://i.loli.net/2020/04/30/fhDXbA9T1zJPlKk.gif","啊哈哈":"https://i.loli.net/2019/02/01/5c53dc2947d84.jpg","无稽可奈":"https://i.loli.net/2020/04/30/UyxTzB2fS3LtH7Q.jpg","老实巴交":"https://i.loli.net/2020/04/30/7DgSoyqwtYBxchE.jpg","紧张":"https://i.loli.net/2017/02/05/5896e8a408253.jpg","摇摆稽":"https://i.loli.net/2019/02/01/5c53d1904dcb2.gif","又不是不能用":"https://i.loli.net/2019/02/01/5c53ce897ab55.jpg","一时滑稽":"https://i.loli.net/2019/02/01/5c53d5d28e22c.jpg","无法接受":"https://i.loli.net/2019/02/01/5c53cee8422fc.jpg","嘤雄豪稽":"https://i.loli.net/2020/04/30/sbtw6o7iKaM4Nmq.jpg","相视双稽":"https://i.loli.net/2019/02/01/5c53d5a093149.jpg","稽皮发麻":"https://i.loli.net/2017/02/05/5896ece2a019f.jpg","地稽 3":"https://i.loli.net/2019/02/01/5c53dbe510bcf.jpg","地稽委屈":"https://i.loli.net/2019/02/01/5c53d76e250da.jpg","地稽抚摸":"https://i.loli.net/2020/04/30/cavZ6nNzMPimLy7.gif","地稽捶打":"https://i.loli.net/2020/04/30/vFVPynXaHR5sitk.gif","绝望":"https://i.loli.net/2019/02/01/5c53dc0ba2303.jpg","气稽败坏":"https://i.loli.net/2019/02/01/5c53d216f3c60.jpg","当场去世":"https://i.loli.net/2020/04/30/sogxHMTFWbE2lrP.jpg","喝酒":"https://i.loli.net/2019/02/01/5c53d78c3f4a5.jpg","老衲摆摊算命":"https://i.loli.net/2017/02/05/5896ece29d8a5.gif","老哥,稳":"https://i.loli.net/2017/02/05/5896ece29ebb0.jpg","自闭稽":"https://i.loli.net/2019/02/01/5c53d6603ee24.jpg","无话可说":"https://i.loli.net/2019/02/01/5c53d6a77b7e4.jpg","跃跃欲试":"https://i.loli.net/2017/02/05/5896e9710dfd5.jpg","跃跃欲试 2":"https://i.loli.net/2019/02/01/5c53dcc057350.jpg","满脑子骚操作":"https://i.loli.net/2020/04/30/xJXcUtO2BryHAsa.gif","稽之舞":"https://i.loli.net/2019/02/01/5c53de1a4d14d.gif","将稽就稽":"https://i.loli.net/2020/04/30/KVwf8qCrZts6WOT.gif"}}}')}],e={},f.m=d,f.c=e,f.d=function(e,t,n){f.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},f.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},f.t=function(t,e){if(1&e&&(t=f(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(f.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var a in t)f.d(n,a,function(e){return t[e]}.bind(null,a));return n},f.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return f.d(t,"a",t),t},f.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},f.p="",f(f.s=13);function f(t){if(e[t])return e[t].exports;var n=e[t]={i:t,l:!1,exports:{}};return d[t].call(n.exports,n,n.exports,f),n.l=!0,n.exports}var d,e}); \ No newline at end of file diff --git a/index-tpl.ejs b/index-tpl.ejs index 2173ebc15..704452450 100644 --- a/index-tpl.ejs +++ b/index-tpl.ejs @@ -5,6 +5,7 @@ <%= htmlWebpackPlugin.options.title %> diff --git a/index.html b/index.html index 5c8743d65..f7928235f 100644 --- a/index.html +++ b/index.html @@ -5,6 +5,7 @@ Artalk DEMO - +
    diff --git a/src/assets/emoticons.json b/src/assets/emoticons.json index 18466d36c..df6ebb083 100644 --- a/src/assets/emoticons.json +++ b/src/assets/emoticons.json @@ -9,13 +9,13 @@ "流口水": " ̄﹃ ̄", "捂脸": "(/ω\)", "给跪": "∠( ᐛ 」∠)_", - "蛤?": "(๑•̀ㅁ•́ฅ)", + "哈?": "(๑•̀ㅁ•́ฅ)", "斜眼": "→_→", "加油": "୧(๑•̀⌄•́๑)૭", "有木有WiFi": "٩(ˊᗜˋ*)و", "前方高能预警": "(ノ°ο°)ノ", - "我从未见过如此厚颜无耻之人": "(´இ皿இ`)", - "吓死宝宝惹": "⌇●﹏●⌇", + "纳尼": "(´இ皿இ`)", + "吓死惹": "⌇●﹏●⌇", "已阅留爪": "(ฅ´ω`ฅ)", "去吧大师球": "(╯°A°)╯︵○○○", "太萌惹": "φ( ̄∇ ̄o)", diff --git a/src/components/Comment.ts b/src/components/Comment.ts index 554ad4fa3..68dbba1e4 100644 --- a/src/components/Comment.ts +++ b/src/components/Comment.ts @@ -119,7 +119,7 @@ export default class Comment extends ArtalkContext { // console.log(this.nestedNo) if (this.nestedNum < this.maxNestedNo) { this.childrenEl = Utils.createElement('
    ') - this.contentEl.appendChild(this.childrenEl) + this.mainEl.appendChild(this.childrenEl) } else { this.childrenEl = this.parent.getChildrenEl() } diff --git a/src/components/List.ts b/src/components/List.ts index a35aa9009..d49298cae 100644 --- a/src/components/List.ts +++ b/src/components/List.ts @@ -1,7 +1,7 @@ import md5 from 'md5' import '../css/list.less' import Comment from './Comment' -import { ListData } from '~/types/artalk-data' +import { ListData, CommentData } from '~/types/artalk-data' import Artalk from '../Artalk' import ArtalkContext from '../ArtalkContext' import Utils from '../utils' @@ -99,7 +99,8 @@ export default class List extends ArtalkContext { const children = rawData.filter(o => o.rid === parentC.data.id) if (children.length === 0) return - children.forEach((itemData) => { + children.forEach((itemData: CommentData) => { + itemData.is_allow_reply = parentC.data.is_allow_reply const childC = new Comment(this.artalk, this, itemData) parentC.putChild(childC) @@ -108,7 +109,8 @@ export default class List extends ArtalkContext { } // 开始处理 rawData - rawData.filter((o) => o.rid === 0).forEach((rootCommentData) => { + rawData.filter((o) => o.rid === 0).forEach((rootCommentData: CommentData) => { + if (rootCommentData.is_collapsed) rootCommentData.is_allow_reply = false const rootComment = new Comment(this.artalk, this, rootCommentData) this.artalk.comments.push(rootComment) // 将评论导入 comments 总表中 diff --git a/src/css/_variables.less b/src/css/_variables.less index c68658b0b..1a5f7a9ba 100644 --- a/src/css/_variables.less +++ b/src/css/_variables.less @@ -14,5 +14,6 @@ @line-height: 1.6em; @block-margin: 15px; +@block-margin-mobile: 7px; @block-padding: 10px; @block-radius: 4px; diff --git a/src/css/comment.less b/src/css/comment.less index d44a65984..72baaa524 100644 --- a/src/css/comment.less +++ b/src/css/comment.less @@ -1,7 +1,6 @@ .artalk-comment-wrap { overflow: hidden; position: relative; - margin-bottom: 10px; border-bottom: 1px solid @color-border; &.artalk-flash-once { @@ -141,6 +140,19 @@ } } } + + &.artalk-read-more-mask:after { + pointer-events: none; + position: absolute; + z-index: 1; + display: block; + overflow: hidden; + width: 100%; + content: " "; + bottom: 0; + height: 41px; + background: linear-gradient(180deg, hsla(0,0%,100%,0), hsla(0,0%,100%,1)); + } } & > .artalk-footer { @@ -178,29 +190,33 @@ } } } + } + } - .artalk-comment-children { - margin-top: 10px; - border-radius: 3px; - border-left: 1px dashed hsla(0,0%,93%,.5); - - .artalk-comment-wrap { - border-bottom-color: transparent; - &:not(:last-child) { - margin-bottom: 5px; - } + .comment-small-size() { + border-bottom-color: transparent; + &:not(:last-child) { + margin-bottom: 5px; + } - & > .artalk-comment { - padding-top: 4px; - padding-bottom: 4px; + & > .artalk-comment { + padding-top: 4px; + padding-bottom: 4px; - & > .artalk-avatar img { - width: 36px; - height: 36px; - } - } - } + & > .artalk-avatar img { + width: 36px; + height: 36px; } } } + + .artalk-comment-children { + .artalk-comment-wrap { + margin-top: 10px; + border-radius: 3px; + border-left: 1px dashed hsla(0,0%,93%,.5); + + .comment-small-size() + } + } } diff --git a/src/css/editor.less b/src/css/editor.less index 78707b722..7407fa192 100644 --- a/src/css/editor.less +++ b/src/css/editor.less @@ -6,6 +6,12 @@ position: relative; background: #FFF; + @media only screen and (max-width: 768px) { + & > { + margin-bottom: @block-margin-mobile; + } + } + & > .artalk-editor-header { display: flex; flex-direction: row; diff --git a/src/templates/Editor.ejs b/src/templates/Editor.ejs index e38bf3711..5e5407be5 100644 --- a/src/templates/Editor.ejs +++ b/src/templates/Editor.ejs @@ -5,7 +5,7 @@
    - +