logicdn 1.0.468 → 1.0.472

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. package/logi.im/api/asset/data/bundle.json +1 -1
  2. package/logi.im/api/asset/data/friends-cached.json +68 -68
  3. package/logi.im/api/asset/data/nodes.info +1 -1
  4. package/logi.im/api/biz/friend.py +231 -228
  5. package/logi.im/usr/plugins/Mirages/js/dashboard.write.min.js +33 -33
  6. package/logi.im/usr/themes/Mirages/css/{7.10.2 → 7.10.3}/OwO.custom.min.css +0 -0
  7. package/logi.im/usr/themes/Mirages/css/{7.10.2 → 7.10.3}/dashboard.settings.min.css +1 -1
  8. package/logi.im/usr/themes/Mirages/css/{7.10.2 → 7.10.3}/dashboard.write.min.css +1 -1
  9. package/logi.im/usr/themes/Mirages/css/{7.10.2 → 7.10.3}/fonts/fontawesome-webfont.eot +0 -0
  10. package/logi.im/usr/themes/Mirages/css/{7.10.2 → 7.10.3}/fonts/fontawesome-webfont.svg +0 -0
  11. package/logi.im/usr/themes/Mirages/css/{7.10.2 → 7.10.3}/fonts/fontawesome-webfont.ttf +0 -0
  12. package/logi.im/usr/themes/Mirages/css/{7.10.2 → 7.10.3}/fonts/fontawesome-webfont.woff +0 -0
  13. package/logi.im/usr/themes/Mirages/css/{7.10.2 → 7.10.3}/fonts/fontawesome-webfont.woff2 +0 -0
  14. package/logi.im/usr/themes/Mirages/css/7.10.3/mirages.min.css +1 -0
  15. package/logi.im/usr/themes/Mirages/css/7.10.3/vditor/theme/light.css +1 -0
  16. package/logi.im/usr/themes/Mirages/css/{7.10.2 → 7.10.3}/webfonts/fa-brands-400.eot +0 -0
  17. package/logi.im/usr/themes/Mirages/css/{7.10.2 → 7.10.3}/webfonts/fa-brands-400.svg +0 -0
  18. package/logi.im/usr/themes/Mirages/css/{7.10.2 → 7.10.3}/webfonts/fa-brands-400.ttf +0 -0
  19. package/logi.im/usr/themes/Mirages/css/{7.10.2 → 7.10.3}/webfonts/fa-brands-400.woff +0 -0
  20. package/logi.im/usr/themes/Mirages/css/{7.10.2 → 7.10.3}/webfonts/fa-brands-400.woff2 +0 -0
  21. package/logi.im/usr/themes/Mirages/css/{7.10.2 → 7.10.3}/webfonts/fa-regular-400.eot +0 -0
  22. package/logi.im/usr/themes/Mirages/css/{7.10.2 → 7.10.3}/webfonts/fa-regular-400.svg +0 -0
  23. package/logi.im/usr/themes/Mirages/css/{7.10.2 → 7.10.3}/webfonts/fa-regular-400.ttf +0 -0
  24. package/logi.im/usr/themes/Mirages/css/{7.10.2 → 7.10.3}/webfonts/fa-regular-400.woff +0 -0
  25. package/logi.im/usr/themes/Mirages/css/{7.10.2 → 7.10.3}/webfonts/fa-regular-400.woff2 +0 -0
  26. package/logi.im/usr/themes/Mirages/css/{7.10.2 → 7.10.3}/webfonts/fa-solid-900.eot +0 -0
  27. package/logi.im/usr/themes/Mirages/css/{7.10.2 → 7.10.3}/webfonts/fa-solid-900.svg +0 -0
  28. package/logi.im/usr/themes/Mirages/css/{7.10.2 → 7.10.3}/webfonts/fa-solid-900.ttf +0 -0
  29. package/logi.im/usr/themes/Mirages/css/{7.10.2 → 7.10.3}/webfonts/fa-solid-900.woff +0 -0
  30. package/logi.im/usr/themes/Mirages/css/{7.10.2 → 7.10.3}/webfonts/fa-solid-900.woff2 +0 -0
  31. package/logi.im/usr/themes/Mirages/images/gonganwangbei.png +0 -0
  32. package/logi.im/usr/themes/Mirages/js/{7.10.2 → 7.10.3}/OwO.custom.min.js +8 -8
  33. package/logi.im/usr/themes/Mirages/js/{7.10.2 → 7.10.3}/OwO.json +0 -0
  34. package/logi.im/usr/themes/Mirages/js/7.10.3/dashboard.settings.min.js +16 -0
  35. package/logi.im/usr/themes/Mirages/js/{7.10.2 → 7.10.3}/mirages.main.min.js +88 -87
  36. package/logi.im/usr/themes/Mirages/usr/biaoqing/YUKIri/{ yuyumengchijing.png → yuyumengchijing.png} +0 -0
  37. package/package.json +1 -1
  38. package/logi.im/api/asset/bin/np +0 -0
  39. package/logi.im/usr/themes/Mirages/css/7.10.2/mirages.min.css +0 -1
  40. package/logi.im/usr/themes/Mirages/css/7.10.2/vditor/theme/light.css +0 -1
  41. package/logi.im/usr/themes/Mirages/js/7.10.2/dashboard.settings.min.js +0 -16
@@ -6,49 +6,49 @@ $jscomp.polyfill=function(a,l,g,n){if(l){g=$jscomp.global;a=a.split(".");for(n=0
6
6
  $jscomp.iteratorFromArray=function(a,l){$jscomp.initSymbolIterator();a instanceof String&&(a+="");var g=0,n={next:function(){if(g<a.length){var k=g++;return{value:l(k,a[k]),done:!1}}n.next=function(){return{done:!0,value:void 0}};return n.next()}};n[Symbol.iterator]=function(){return n};return n};$jscomp.polyfill("Array.prototype.keys",function(a){return a?a:function(){return $jscomp.iteratorFromArray(this,function(a){return a})}},"es6-impl","es3");
7
7
  $jscomp.checkStringArgs=function(a,l,g){if(null==a)throw new TypeError("The 'this' value for String.prototype."+g+" must not be null or undefined");if(l instanceof RegExp)throw new TypeError("First argument to String.prototype."+g+" must not be a regular expression");return a+""};$jscomp.polyfill("String.prototype.includes",function(a){return a?a:function(a,g){return-1!==$jscomp.checkStringArgs(this,a,"includes").indexOf(a,g||0)}},"es6-impl","es3");
8
8
  $(document).ready(function(){var a=function(a,b){this.container=a;this.editor=b;this.spacerIndex=1};a._encodeHTML=function(a){var b=document.createElement("div");null!=b.textContent?b.textContent=a:b.innerText=a;return b.innerHTML};a._removeElement=function(a){"string"===typeof a&&(a=document.querySelector(a));a&&("function"===typeof a.remove?a.remove():a.parentNode&&a.parentNode.removeChild(a))};a.createDialog=function(a,b){return'<div id="mirages-dialog">\n <div class="wmd-prompt-background"></div>\n <div class="wmd-prompt-container">\n <div class="wmd-prompt-dialog" role="dialog">\n <div>\n <p><h3>'+
9
- a+'</h3></p>\n </div>\n <form id="mirages-dialog-form">\n '+b+'\n <button type="button" class="btn btn-s primary" id="mirages-dialog-btn-submit">\u786e\u5b9a</button>\n <button type="button" class="btn btn-s" id="mirages-dialog-btn-cancel">\u53d6\u6d88</button>\n </form>\n </div>\n </div>\n</div>'};a._createForm=function(d){for(var b="",p=0;p<d.fields.length;p++){var c=d.fields[p],b=b+('<div class="form-group">\n <label>'+
10
- c.title+(c.required?"<span style='color: red'>*</span>":"")+":</label>\n");c.type||(c.type="text");if("text"===c.type)b+='<input type="text" name="'+c.name+'" value="'+(c.defaultValue?c.defaultValue:"")+'">';else if("select"===c.type){for(var b=b+('<select name="'+c.name+'">'),h=0;h<c.options.length;h++){var f=c.options[h],g="";c.defaultValue===f&&(g="selected");b+="<option "+g+">"+f+"</option>"}b+="</select>"}else"textarea"===c.type&&(b+='<textarea type="text" name="'+c.name+'" rows="6">'+(c.defaultValue?
11
- a._encodeHTML(c.defaultValue):"")+"</textarea>");b+="</div>"}return a.createDialog(d.title,b)};a.prototype._insertText=function(a){if(document.selection)this.editor.focus(),document.selection.createRange().text=a,this.editor.focus();else if(0<=this.editor.selectionStart){var b=this.editor.selectionStart,d=this.editor.selectionEnd,c=b;this.editor.value=this.editor.value.substring(0,b)+a+this.editor.value.substring(d,this.editor.value.length);c+=a.length;this.editor.focus();this.editor.selectionStart=
12
- c;this.editor.selectionEnd=c}else this.editor.value+=a,this.editor.focus()};a._serializeFormData=function(a){for(var b={},d=0;d<a.length;d++){var c=a[d];if(/^([a-zA-Z0-9]+)\[(\d+)]$/i.test(c.name)){var h=c.name.match(/^([a-zA-Z0-9]+)\[(\d+)]$/i),f=h[1],h=h[2];b[f]||(b[f]=[]);b[f][h]=c.value}else if(/^([a-zA-Z0-9]+)\[(\d+)]\.([a-zA-Z0-9]+)$/i.test(c.name)){var g=c.name.match(/^([a-zA-Z0-9]+)\[(\d+)]\.([a-zA-Z0-9]+)$/i),f=g[1],h=g[2],g=g[3];b[f]||(b[f]=[]);b[f][h]||(b[f][h]={});b[f][h][g]=c.value}else/^([a-zA-Z0-9]+)\.([a-zA-Z0-9]+)$/i.test(c.name)?
13
- (h=c.name.match(/^([a-zA-Z0-9]+)\.([a-zA-Z0-9]+)$/i),f=h[1],h=h[2],b[f]||(b[f]={}),b[f][h]=c.value):b[c.name]=c.value}return b};a._showDialog=function(d){var b=$("body");"function"===typeof d?(b.addClass("dialog-show"),d(b)):(d=a._createForm(d),b.addClass("dialog-show"),b.append(d))};a._hideDialog=function(){var d=$("body");a._removeElement("#mirages-dialog");d.removeClass("dialog-show")};a.triggerDialog=function(d,b){var p=a.buttons[d];if(p){var c=p.form,h=p.doneCallback;c?(a._showDialog(c),$("#mirages-dialog-btn-cancel").off("click").on("click",
14
- function(b){a._hideDialog()}),$("#mirages-dialog-btn-submit").off("click").on("click",function(c){var d=$("#mirages-dialog-form").serializeArray(),d=a._serializeFormData(d);c=h(d,c);"string"===typeof c&&(a._hideDialog(),"function"===typeof b&&b(c))})):(p=h({},e),"function"===typeof b&&b(p))}else console.error("Button: "+d+" not found!")};a.prototype.addButton=function(d,b,p,c,h){var f=this;a.buttons[d]={title:b,icon:p,form:c,doneCallback:h};$(this.container).append('<li class="wmd-button" id="wmd-mirages-'+
15
- d+'-button" title="'+b+'"><i class="fa fa-'+p+'"></i></li>');if(c)$("#wmd-mirages-"+d+"-button").off("click").on("click",function(b){a._showDialog(c);$("#mirages-dialog-btn-cancel").off("click").on("click",function(b){a._hideDialog()});$("#mirages-dialog-btn-submit").off("click").on("click",function(b){var c=$("#mirages-dialog-form").serializeArray(),c=a._serializeFormData(c);b=h(c,b);"string"===typeof b&&(a._hideDialog(),f._insertText(b))})});else $("#wmd-mirages-"+d+"-button").off("click").on("click",
16
- function(b){b=h({},b);f._insertText(b)})};a.prototype.addLinkButton=function(a,b,p,c){$(this.container).append('<li class="wmd-button" id="wmd-mirages-'+a+'-button" title="'+p+'"><a href="'+c+'" target="_blank"><i class="fa fa-'+b+'"/></a></li>')};a.prototype.addSpacer=function(){$(this.container).append('<li class="wmd-spacer" id="wmd-mirages-spacer'+this.spacerIndex+'"></li>');this.spacerIndex++};a.buttons={};var l=function(a,b,p,c){this.targetNode=a;this.classToWatch=b;this.classAddedCallback=
17
- p;this.classRemovedCallback=c;this.observer=null;this.lastClassState=a.classList.contains(this.classToWatch);this.init()};l.prototype.init=function(){var a=this;"undefined"!==typeof MutationObserver&&(this.observer=new MutationObserver(function(b){b=$jscomp.makeIterator(b);for(var d=b.next();!d.done;d=b.next())d=d.value,"attributes"===d.type&&"class"===d.attributeName&&(d=d.target.classList.contains(a.classToWatch),a.lastClassState!==d&&((a.lastClassState=d)?a.classAddedCallback():a.classRemovedCallback()))}),
18
- this.observer.observe(this.targetNode,{attributes:!0}))};l.prototype.disconnect=function(){this.observer&&this.observer.disconnect()};var g=function(d){d.addSpacer();d.addButton("html-video","\u63d2\u5165\u89c6\u9891 (video \u6807\u7b7e)","video-camera",{title:"\u63d2\u5165\u89c6\u9891 (video \u6807\u7b7e)",fields:[{name:"src",title:"\u89c6\u9891\u94fe\u63a5 (\u5efa\u8bae\u4f7f\u7528 MP4 \u683c\u5f0f)",required:!0},{name:"poster",title:"\u89c6\u9891\u5c01\u9762\u56fe\u7247",required:!1},{name:"controls",
9
+ a+'</h3></p>\n </div>\n <form id="mirages-dialog-form">\n '+b+'\n <button type="button" class="btn btn-s primary" id="mirages-dialog-btn-submit">\u786e\u5b9a</button>\n <button type="button" class="btn btn-s" id="mirages-dialog-btn-cancel">\u53d6\u6d88</button>\n </form>\n </div>\n </div>\n</div>'};a._createForm=function(c){for(var b="",p=0;p<c.fields.length;p++){var d=c.fields[p],b=b+('<div class="form-group">\n <label>'+
10
+ d.title+(d.required?"<span style='color: red'>*</span>":"")+":</label>\n");d.type||(d.type="text");if("text"===d.type)b+='<input type="text" name="'+d.name+'" value="'+(d.defaultValue?d.defaultValue:"")+'">';else if("select"===d.type){for(var b=b+('<select name="'+d.name+'">'),h=0;h<d.options.length;h++){var f=d.options[h],g="";d.defaultValue===f&&(g="selected");b+="<option "+g+">"+f+"</option>"}b+="</select>"}else"textarea"===d.type&&(b+='<textarea type="text" name="'+d.name+'" rows="6">'+(d.defaultValue?
11
+ a._encodeHTML(d.defaultValue):"")+"</textarea>");b+="</div>"}return a.createDialog(c.title,b)};a.prototype._insertText=function(a){if(document.selection)this.editor.focus(),document.selection.createRange().text=a,this.editor.focus();else if(0<=this.editor.selectionStart){var b=this.editor.selectionStart,c=this.editor.selectionEnd,d=b;this.editor.value=this.editor.value.substring(0,b)+a+this.editor.value.substring(c,this.editor.value.length);d+=a.length;this.editor.focus();this.editor.selectionStart=
12
+ d;this.editor.selectionEnd=d}else this.editor.value+=a,this.editor.focus()};a._serializeFormData=function(a){for(var b={},c=0;c<a.length;c++){var d=a[c];if(/^([a-zA-Z0-9]+)\[(\d+)]$/i.test(d.name)){var h=d.name.match(/^([a-zA-Z0-9]+)\[(\d+)]$/i),f=h[1],h=h[2];b[f]||(b[f]=[]);b[f][h]=d.value}else if(/^([a-zA-Z0-9]+)\[(\d+)]\.([a-zA-Z0-9]+)$/i.test(d.name)){var g=d.name.match(/^([a-zA-Z0-9]+)\[(\d+)]\.([a-zA-Z0-9]+)$/i),f=g[1],h=g[2],g=g[3];b[f]||(b[f]=[]);b[f][h]||(b[f][h]={});b[f][h][g]=d.value}else/^([a-zA-Z0-9]+)\.([a-zA-Z0-9]+)$/i.test(d.name)?
13
+ (h=d.name.match(/^([a-zA-Z0-9]+)\.([a-zA-Z0-9]+)$/i),f=h[1],h=h[2],b[f]||(b[f]={}),b[f][h]=d.value):b[d.name]=d.value}return b};a._showDialog=function(c){var b=$("body");"function"===typeof c?(b.addClass("dialog-show"),c(b)):(c=a._createForm(c),b.addClass("dialog-show"),b.append(c))};a._hideDialog=function(){var c=$("body");a._removeElement("#mirages-dialog");c.removeClass("dialog-show")};a.triggerDialog=function(c,b){var p=a.buttons[c];if(p){var d=p.form,h=p.doneCallback;d?(a._showDialog(d),$("#mirages-dialog-btn-cancel").off("click").on("click",
14
+ function(b){a._hideDialog()}),$("#mirages-dialog-btn-submit").off("click").on("click",function(d){var c=$("#mirages-dialog-form").serializeArray(),c=a._serializeFormData(c);d=h(c,d);"string"===typeof d&&(a._hideDialog(),"function"===typeof b&&b(d))})):(p=h({},e),"function"===typeof b&&b(p))}else console.error("Button: "+c+" not found!")};a.prototype.addButton=function(c,b,p,d,h){var f=this;a.buttons[c]={title:b,icon:p,form:d,doneCallback:h};$(this.container).append('<li class="wmd-button" id="wmd-mirages-'+
15
+ c+'-button" title="'+b+'"><i class="fa fa-'+p+'"></i></li>');if(d)$("#wmd-mirages-"+c+"-button").off("click").on("click",function(b){a._showDialog(d);$("#mirages-dialog-btn-cancel").off("click").on("click",function(b){a._hideDialog()});$("#mirages-dialog-btn-submit").off("click").on("click",function(b){var d=$("#mirages-dialog-form").serializeArray(),d=a._serializeFormData(d);b=h(d,b);"string"===typeof b&&(a._hideDialog(),f._insertText(b))})});else $("#wmd-mirages-"+c+"-button").off("click").on("click",
16
+ function(b){b=h({},b);f._insertText(b)})};a.prototype.addLinkButton=function(a,b,p,d){$(this.container).append('<li class="wmd-button" id="wmd-mirages-'+a+'-button" title="'+p+'"><a href="'+d+'" target="_blank"><i class="fa fa-'+b+'"/></a></li>')};a.prototype.addSpacer=function(){$(this.container).append('<li class="wmd-spacer" id="wmd-mirages-spacer'+this.spacerIndex+'"></li>');this.spacerIndex++};a.buttons={};var l=function(a,b,p,d){this.targetNode=a;this.classToWatch=b;this.classAddedCallback=
17
+ p;this.classRemovedCallback=d;this.observer=null;this.lastClassState=a.classList.contains(this.classToWatch);this.init()};l.prototype.init=function(){var a=this;"undefined"!==typeof MutationObserver&&(this.observer=new MutationObserver(function(b){b=$jscomp.makeIterator(b);for(var c=b.next();!c.done;c=b.next())c=c.value,"attributes"===c.type&&"class"===c.attributeName&&(c=c.target.classList.contains(a.classToWatch),a.lastClassState!==c&&((a.lastClassState=c)?a.classAddedCallback():a.classRemovedCallback()))}),
18
+ this.observer.observe(this.targetNode,{attributes:!0}))};l.prototype.disconnect=function(){this.observer&&this.observer.disconnect()};var g=function(c){c.addSpacer();c.addButton("html-video","\u63d2\u5165\u89c6\u9891 (video \u6807\u7b7e)","video-camera",{title:"\u63d2\u5165\u89c6\u9891 (video \u6807\u7b7e)",fields:[{name:"src",title:"\u89c6\u9891\u94fe\u63a5 (\u5efa\u8bae\u4f7f\u7528 MP4 \u683c\u5f0f)",required:!0},{name:"poster",title:"\u89c6\u9891\u5c01\u9762\u56fe\u7247",required:!1},{name:"controls",
19
19
  title:"\u64ad\u653e\u5668\u63a7\u5236\u6309\u94ae",required:!1,type:"select",options:["\u663e\u793a","\u9690\u85cf"],defaultValue:"\u663e\u793a"},{name:"autoplay",title:"\u81ea\u52a8\u64ad\u653e",required:!1,type:"select",options:["\u662f","\u5426"],defaultValue:"\u5426"},{name:"loop",title:"\u5faa\u73af\u64ad\u653e",required:!1,type:"select",options:["\u662f","\u5426"],defaultValue:"\u5426"},{name:"muted",title:"\u9759\u97f3\u64ad\u653e",required:!1,type:"select",options:["\u662f","\u5426"],defaultValue:"\u5426"}]},
20
- function(a){return a.src?'\n!!!\n<video src="'+a.src+'" '+("\u663e\u793a"===a.controls?'controls="controls"':"")+" "+(a.poster?'poster="'+a.poster+'"':"")+" "+("\u662f"===a.autoplay?"autoplay":"")+" "+("\u662f"===a.loop?"loop":"")+" "+("\u662f"===a.muted?"muted":"")+" playsinline></video>\n!!!\n":(alert("\u89c6\u9891\u94fe\u63a5\u4e0d\u80fd\u4e3a\u7a7a"),!1)});d.addSpacer();d.addButton("btn","\u77ed\u4ee3\u7801 - \u6309\u94ae\u6837\u5f0f\u7684\u94fe\u63a5","link",{title:"\u63d2\u5165\u77ed\u4ee3\u7801 - \u6309\u94ae\u6837\u5f0f\u7684\u94fe\u63a5",
21
- fields:[{name:"title",title:"\u94fe\u63a5\u540d\u79f0",required:!0},{name:"link",title:"\u94fe\u63a5\u5730\u5740",required:!0}]},function(a){return a.link?'[button href="'+a.link+'"]'+(a.title?a.title:a.link)+"[/button]":(alert("\u94fe\u63a5\u5730\u5740\u4e0d\u80fd\u4e3a\u7a7a"),!1)});d.addButton("tip","\u77ed\u4ee3\u7801 - \u63d0\u793a\u53ca\u8b66\u544a\u6846","exclamation-triangle",{title:"\u63d2\u5165\u77ed\u4ee3\u7801 - \u63d0\u793a\u53ca\u8b66\u544a\u6846",fields:[{name:"type",title:"\u63d0\u793a\u7c7b\u578b",
22
- required:!0,type:"select",options:["info","success","warning","danger"],defaultValue:"info"},{name:"title",title:"\u63d0\u793a\u6807\u9898\uff08\u7528\u4e8e\u52a0\u91cd\u5c55\u793a\uff0c\u53ef\u4e0d\u586b\uff09"},{name:"content",title:"\u63d0\u793a\u5185\u5bb9",required:!0,type:"textarea"}]},function(a){a.content||(a.content="\u63d0\u793a\u5185\u5bb9");return'[tip type="'+a.type+'"'+(a.title?' title="'+a.title+'"':"")+"]\n"+a.content+"\n[/tip]"});d.addButton("file","\u77ed\u4ee3\u7801 - \u4e0b\u8f7d\u6587\u4ef6",
23
- "file-archive-o",{title:"\u63d2\u5165\u77ed\u4ee3\u7801 - \u4e0b\u8f7d\u6587\u4ef6",fields:[{name:"title",title:"\u6587\u4ef6\u540d\u79f0",required:!0},{name:"link",title:"\u6587\u4ef6\u94fe\u63a5\u5730\u5740",required:!0}]},function(a){return a.link?'[file href="'+a.link+'"]'+(a.title?a.title:a.link)+"[/file]":(alert("\u6587\u4ef6\u94fe\u63a5\u5730\u5740\u4e0d\u80fd\u4e3a\u7a7a"),!1)});d.addButton("tag","\u77ed\u4ee3\u7801 - \u6807\u7b7e","tag",{title:"\u63d2\u5165\u77ed\u4ee3\u7801 - \u6807\u7b7e",
20
+ function(a){return a.src?'\n!!!\n<video src="'+a.src+'" '+("\u663e\u793a"===a.controls?'controls="controls"':"")+" "+(a.poster?'poster="'+a.poster+'"':"")+" "+("\u662f"===a.autoplay?"autoplay":"")+" "+("\u662f"===a.loop?"loop":"")+" "+("\u662f"===a.muted?"muted":"")+" playsinline></video>\n!!!\n":(alert("\u89c6\u9891\u94fe\u63a5\u4e0d\u80fd\u4e3a\u7a7a"),!1)});c.addSpacer();c.addButton("btn","\u77ed\u4ee3\u7801 - \u6309\u94ae\u6837\u5f0f\u7684\u94fe\u63a5","link",{title:"\u63d2\u5165\u77ed\u4ee3\u7801 - \u6309\u94ae\u6837\u5f0f\u7684\u94fe\u63a5",
21
+ fields:[{name:"title",title:"\u94fe\u63a5\u540d\u79f0",required:!0},{name:"link",title:"\u94fe\u63a5\u5730\u5740",required:!0}]},function(a){return a.link?'[button href="'+a.link+'"]'+(a.title?a.title:a.link)+"[/button]":(alert("\u94fe\u63a5\u5730\u5740\u4e0d\u80fd\u4e3a\u7a7a"),!1)});c.addButton("tip","\u77ed\u4ee3\u7801 - \u63d0\u793a\u53ca\u8b66\u544a\u6846","exclamation-triangle",{title:"\u63d2\u5165\u77ed\u4ee3\u7801 - \u63d0\u793a\u53ca\u8b66\u544a\u6846",fields:[{name:"type",title:"\u63d0\u793a\u7c7b\u578b",
22
+ required:!0,type:"select",options:["info","success","warning","danger"],defaultValue:"info"},{name:"title",title:"\u63d0\u793a\u6807\u9898\uff08\u7528\u4e8e\u52a0\u91cd\u5c55\u793a\uff0c\u53ef\u4e0d\u586b\uff09"},{name:"content",title:"\u63d0\u793a\u5185\u5bb9",required:!0,type:"textarea"}]},function(a){a.content||(a.content="\u63d0\u793a\u5185\u5bb9");return'[tip type="'+a.type+'"'+(a.title?' title="'+a.title+'"':"")+"]\n"+a.content+"\n[/tip]"});c.addButton("file","\u77ed\u4ee3\u7801 - \u4e0b\u8f7d\u6587\u4ef6",
23
+ "file-archive-o",{title:"\u63d2\u5165\u77ed\u4ee3\u7801 - \u4e0b\u8f7d\u6587\u4ef6",fields:[{name:"title",title:"\u6587\u4ef6\u540d\u79f0",required:!0},{name:"link",title:"\u6587\u4ef6\u94fe\u63a5\u5730\u5740",required:!0}]},function(a){return a.link?'[file href="'+a.link+'"]'+(a.title?a.title:a.link)+"[/file]":(alert("\u6587\u4ef6\u94fe\u63a5\u5730\u5740\u4e0d\u80fd\u4e3a\u7a7a"),!1)});c.addButton("tag","\u77ed\u4ee3\u7801 - \u6807\u7b7e","tag",{title:"\u63d2\u5165\u77ed\u4ee3\u7801 - \u6807\u7b7e",
24
24
  fields:[{name:"type",title:"\u6807\u7b7e\u989c\u8272",required:!0,type:"select",options:"default primary info success warning danger".split(" "),defaultValue:"default"},{name:"outline",title:"Outline \u6837\u5f0f",required:!0,type:"select",options:["\u662f","\u5426"],defaultValue:"\u5426"},{name:"content",title:"\u6807\u7b7e\u5185\u5bb9",required:!0}]},function(a){return a.content?'[tag type="'+a.type+'"'+("\u662f"===a.outline?" outline":"")+"]"+a.content+"[/tag]":(alert("\u6807\u7b7e\u5185\u5bb9\u4e0d\u80fd\u4e3a\u7a7a"),
25
- !1)});d.addButton("hide","\u77ed\u4ee3\u7801 - \u5185\u5bb9\u56de\u590d\u53ef\u89c1","eye-slash",{title:"\u63d2\u5165\u77ed\u4ee3\u7801 - \u5185\u5bb9\u56de\u590d\u53ef\u89c1",fields:[{name:"content",title:"\u5185\u5bb9",required:!0,type:"textarea"}]},function(a){return a.content?"[hide]\n"+a.content+"\n[/hide]":(alert("\u5185\u5bb9\u4e0d\u80fd\u4e3a\u7a7a"),!1)});d.addButton("tab","\u77ed\u4ee3\u7801 - \u6807\u7b7e\u5361","window-maximize",function(b){var d=a.createDialog("\u63d2\u5165\u77ed\u4ee3\u7801 - \u6807\u7b7e\u5361",
26
- '\n<button type="button" class="btn btn-s primary" id="btn-tab-add">\u65b0\u5efa\u6807\u7b7e\u9875</button>\n<div class="content-tabs">\n <div class="content-tabs-head"></div>\n <div class="content-tabs-body"></div>\n</div>');b.append(d);var c=1,h=1,f=function(){$(".content-tabs-head").append('<div class="content-tab-title" role="tab" data-tab-index="'+c+'">\u6807\u7b7e\u9875 '+h+"</div>");$(".content-tabs-body").append('\n <div class="content-tab-content" data-tab-index="'+c+'">\n <div class="form-group">\n <label>\u6807\u7b7e\u9875\u540d\u79f0<span style="color: red">*</span>:</label>\n <input type="text" class="input-tab-title" name="tabs['+
27
- (c-1)+'].title" value="\u6807\u7b7e\u9875 '+h+'">\n </div>\n <div class="form-group">\n <label>\u6807\u7b7e\u9875\u5185\u5bb9<span style="color: red">*</span>:</label>\n <textarea type="text" class="input-tab-content" name="tabs['+(c-1)+'].content" rows="6"></textarea>\n </div>\n <button type="button" class="btn btn-s btn-warn btn-tab-delete">\u5220\u9664\u6b64\u6807\u7b7e\u9875</button>\n </div>');c++;h++},g=function(){$(".content-tab-title").off("click").on("click",
28
- function(a){var b=$(this),c=b.parent();a=c.parent();var d=b.attr("data-tab-index");a.find(".content-tab-title").each(function(){$(this).attr("data-tab-index")===d?$(this).addClass("selected"):$(this).removeClass("selected")});a.find(".content-tab-content").each(function(){$(this).attr("data-tab-index")===d?$(this).addClass("selected"):$(this).removeClass("selected")});a=c.offset().left;var f=b.offset().left,g=c.innerWidth(),b=b.outerWidth(),h=c.scrollLeft();(function(a){0>a&&(a=0);try{a>c[0].scrollWidth-
29
- c.innerWidth()&&(a=c[0].scrollWidth-c.innerWidth())}catch(E){console.error(E)}c.animate({scrollLeft:a},500)})(f+h-a-(g-b)/2)});$(".btn-tab-delete").off("click").on("click",function(a){if(confirm("\u786e\u5b9a\u8981\u5220\u9664\u6b64\u6807\u7b7e\u9875\u5417\uff1f")){a=$(this).parent();var b=a.parent().parent(),d=parseInt(a.attr("data-tab-index")),f=d-1;1>=d&&(f=d+1);b.find(".content-tab-title").each(function(){var a=parseInt($(this).attr("data-tab-index"));a===f?$(this).addClass("selected"):a===d?
30
- $(this).remove():$(this).removeClass("selected")});b.find(".content-tab-content").each(function(){var a=parseInt($(this).attr("data-tab-index"));a===f?$(this).addClass("selected"):a===d?$(this).remove():$(this).removeClass("selected")});c=1;b.find(".content-tab-title").each(function(a){a+2>c&&(c=a+2);var d=$(this),f=parseInt(d.attr("data-tab-index"));d.attr("data-tab-index",a+1);if(d=b.find(".content-tab-content[data-tab-index="+f+"]"))d.attr("data-tab-index",a+1),d.find(".input-tab-title").attr("name",
31
- "tabs["+a+"].title"),d.find(".input-tab-content").attr("name","tabs["+a+"].content")})}});$(".input-tab-title").off("input propertychange").on("input propertychange",function(a){var b=$(this),c=b.parents(".content-tab-content");a=c.parent().parent();c=parseInt(c.attr("data-tab-index"));b=b.val();0>=b.length&&(b="\u6807\u7b7e\u9875");a.find(".content-tab-title[data-tab-index="+c+"]").text(b)})};f();f();$('.content-tab-title[data-tab-index="1"]').addClass("selected");$('.content-tab-content[data-tab-index="1"]').addClass("selected");
32
- g();$("#btn-tab-add").off("click").on("click",function(a){f();g();$('.content-tab-title[data-tab-index="'+(c-1)+'"]').trigger("click")})},function(a){a=a.tabs;if(!a||0>=a.length)return alert("\u6ca1\u6709\u521b\u5efa\u6807\u7b7e\u9875"),!1;var b="";[].forEach.call(a,function(a){a.title||(a.title="\u6807\u7b7e\u9875");a.content||(a.content="\u6807\u7b7e\u9875\u5185\u5bb9");b+='[tab title="'+a.title+'"]\n'+a.content+"\n[/tab]\n\n"});return"[tabs]\n\n"+b+"[/tabs]\n"});d.addButton("collapse","\u77ed\u4ee3\u7801 - \u6298\u53e0\u6846",
25
+ !1)});c.addButton("hide","\u77ed\u4ee3\u7801 - \u5185\u5bb9\u56de\u590d\u53ef\u89c1","eye-slash",{title:"\u63d2\u5165\u77ed\u4ee3\u7801 - \u5185\u5bb9\u56de\u590d\u53ef\u89c1",fields:[{name:"content",title:"\u5185\u5bb9",required:!0,type:"textarea"}]},function(a){return a.content?"[hide]\n"+a.content+"\n[/hide]":(alert("\u5185\u5bb9\u4e0d\u80fd\u4e3a\u7a7a"),!1)});c.addButton("tab","\u77ed\u4ee3\u7801 - \u6807\u7b7e\u5361","window-maximize",function(b){var c=a.createDialog("\u63d2\u5165\u77ed\u4ee3\u7801 - \u6807\u7b7e\u5361",
26
+ '\n<button type="button" class="btn btn-s primary" id="btn-tab-add">\u65b0\u5efa\u6807\u7b7e\u9875</button>\n<div class="content-tabs">\n <div class="content-tabs-head"></div>\n <div class="content-tabs-body"></div>\n</div>');b.append(c);var d=1,h=1,f=function(){$(".content-tabs-head").append('<div class="content-tab-title" role="tab" data-tab-index="'+d+'">\u6807\u7b7e\u9875 '+h+"</div>");$(".content-tabs-body").append('\n <div class="content-tab-content" data-tab-index="'+d+'">\n <div class="form-group">\n <label>\u6807\u7b7e\u9875\u540d\u79f0<span style="color: red">*</span>:</label>\n <input type="text" class="input-tab-title" name="tabs['+
27
+ (d-1)+'].title" value="\u6807\u7b7e\u9875 '+h+'">\n </div>\n <div class="form-group">\n <label>\u6807\u7b7e\u9875\u5185\u5bb9<span style="color: red">*</span>:</label>\n <textarea type="text" class="input-tab-content" name="tabs['+(d-1)+'].content" rows="6"></textarea>\n </div>\n <button type="button" class="btn btn-s btn-warn btn-tab-delete">\u5220\u9664\u6b64\u6807\u7b7e\u9875</button>\n </div>');d++;h++},g=function(){$(".content-tab-title").off("click").on("click",
28
+ function(a){var b=$(this),d=b.parent();a=d.parent();var c=b.attr("data-tab-index");a.find(".content-tab-title").each(function(){$(this).attr("data-tab-index")===c?$(this).addClass("selected"):$(this).removeClass("selected")});a.find(".content-tab-content").each(function(){$(this).attr("data-tab-index")===c?$(this).addClass("selected"):$(this).removeClass("selected")});a=d.offset().left;var f=b.offset().left,g=d.innerWidth(),b=b.outerWidth(),h=d.scrollLeft();(function(a){0>a&&(a=0);try{a>d[0].scrollWidth-
29
+ d.innerWidth()&&(a=d[0].scrollWidth-d.innerWidth())}catch(E){console.error(E)}d.animate({scrollLeft:a},500)})(f+h-a-(g-b)/2)});$(".btn-tab-delete").off("click").on("click",function(a){if(confirm("\u786e\u5b9a\u8981\u5220\u9664\u6b64\u6807\u7b7e\u9875\u5417\uff1f")){a=$(this).parent();var b=a.parent().parent(),c=parseInt(a.attr("data-tab-index")),f=c-1;1>=c&&(f=c+1);b.find(".content-tab-title").each(function(){var a=parseInt($(this).attr("data-tab-index"));a===f?$(this).addClass("selected"):a===c?
30
+ $(this).remove():$(this).removeClass("selected")});b.find(".content-tab-content").each(function(){var a=parseInt($(this).attr("data-tab-index"));a===f?$(this).addClass("selected"):a===c?$(this).remove():$(this).removeClass("selected")});d=1;b.find(".content-tab-title").each(function(a){a+2>d&&(d=a+2);var c=$(this),f=parseInt(c.attr("data-tab-index"));c.attr("data-tab-index",a+1);if(c=b.find(".content-tab-content[data-tab-index="+f+"]"))c.attr("data-tab-index",a+1),c.find(".input-tab-title").attr("name",
31
+ "tabs["+a+"].title"),c.find(".input-tab-content").attr("name","tabs["+a+"].content")})}});$(".input-tab-title").off("input propertychange").on("input propertychange",function(a){var b=$(this),d=b.parents(".content-tab-content");a=d.parent().parent();d=parseInt(d.attr("data-tab-index"));b=b.val();0>=b.length&&(b="\u6807\u7b7e\u9875");a.find(".content-tab-title[data-tab-index="+d+"]").text(b)})};f();f();$('.content-tab-title[data-tab-index="1"]').addClass("selected");$('.content-tab-content[data-tab-index="1"]').addClass("selected");
32
+ g();$("#btn-tab-add").off("click").on("click",function(a){f();g();$('.content-tab-title[data-tab-index="'+(d-1)+'"]').trigger("click")})},function(a){a=a.tabs;if(!a||0>=a.length)return alert("\u6ca1\u6709\u521b\u5efa\u6807\u7b7e\u9875"),!1;var b="";[].forEach.call(a,function(a){a.title||(a.title="\u6807\u7b7e\u9875");a.content||(a.content="\u6807\u7b7e\u9875\u5185\u5bb9");b+='[tab title="'+a.title+'"]\n'+a.content+"\n[/tab]\n\n"});return"[tabs]\n\n"+b+"[/tabs]\n"});c.addButton("collapse","\u77ed\u4ee3\u7801 - \u6298\u53e0\u6846",
33
33
  "chevron-circle-down",{title:"\u63d2\u5165\u77ed\u4ee3\u7801 - \u6298\u53e0\u6846",fields:[{name:"title",title:"\u6298\u53e0\u6846\u6807\u9898",required:!0},{name:"show",title:"\u662f\u5426\u9ed8\u8ba4\u5c55\u5f00",required:!1,type:"select",options:["\u662f","\u5426"],defaultValue:"\u5426"},{name:"content",title:"\u5185\u5bb9",required:!0,type:"textarea"}]},function(a){return a.title?a.content?'[collapse title="'+a.title+'"'+("\u662f"===a.show?' show="true"':"")+"]\n"+a.content+"\n[/collapse]":(alert("\u5185\u5bb9\u4e0d\u80fd\u4e3a\u7a7a"),
34
- !1):(alert("\u6298\u53e0\u6846\u6807\u9898\u4e0d\u80fd\u4e3a\u7a7a"),!1)});d.addButton("github","\u77ed\u4ee3\u7801 - Github Repo","github",{title:"\u63d2\u5165\u77ed\u4ee3\u7801 - Github Repo",fields:[{name:"repo",title:"Github Repo",required:!0}]},function(a){if(!a.repo)return alert("Github Repo \u4e0d\u80fd\u4e3a\u7a7a"),!1;a=a.repo;var b=a.match(/^(http|https):\/\/github.com\/([^\/]+\/[^\/]+)$/);b&&(a=b[2]);return'[github repo="'+a+'" /]'});d.addLinkButton("shortcode-doc","question-circle-o",
35
- "\u77ed\u4ee3\u7801\u4f7f\u7528\u8bf4\u660e","https://get233.com/archives/mirages-shortcode-docs.html")},n=function(a){if("undefined"===typeof Pinyin)return a;var b="";a=Pinyin.parse(a);for(var d=0;d<a.length;d++){var c=a[d],g=c.type;(1===g||2===g)&&(c=c.target)&&(b+=c.toLowerCase())}return b},k=null,x=function(){var d=!1,b=setTimeout(function(){alert("Vditor \u521d\u59cb\u5316\u5931\u8d25")},1E4),g=null,c=$("#text"),h=c.height(),f=$("#title").parent().width(),x=c.val(),A=$("#wmd-editarea");A.after('<div id="vditor"></div>');
36
- var r=$('form[name="write_post"],form[name="write_page"]').attr("action"),r=new URL(r),q=$('input[name="cid"]').val(),y=LocalConst.BASE_UPLOAD_URL;y||(y=""+r.origin+LocalConst.REWRITE_FIX+"/action/upload"+r.search);var y=y+("&cid="+q),B={},C=[],G=function(a){var b=k.getSelection();b&&0<b.length?k.updateValue(a):k.insertValue(a)},H=function(){if(k){var a=k.getValue();A.val(a)}};window.allowSubmitFormInVditor=function(a){if(!d)return!1;H();return!0};var E=function(){try{$(".post-content table").wrap("<div class='table-responsive'></div>"),
34
+ !1):(alert("\u6298\u53e0\u6846\u6807\u9898\u4e0d\u80fd\u4e3a\u7a7a"),!1)});c.addButton("github","\u77ed\u4ee3\u7801 - Github Repo","github",{title:"\u63d2\u5165\u77ed\u4ee3\u7801 - Github Repo",fields:[{name:"repo",title:"Github Repo",required:!0}]},function(a){if(!a.repo)return alert("Github Repo \u4e0d\u80fd\u4e3a\u7a7a"),!1;a=a.repo;var b=a.match(/^(http|https):\/\/github.com\/([^\/]+\/[^\/]+)$/);b&&(a=b[2]);return'[github repo="'+a+'" /]'});c.addLinkButton("shortcode-doc","question-circle-o",
35
+ "\u77ed\u4ee3\u7801\u4f7f\u7528\u8bf4\u660e","https://get233.com/archives/mirages-shortcode-docs.html")},n=function(a){if("undefined"===typeof Pinyin)return a;var b="";a=Pinyin.parse(a);for(var c=0;c<a.length;c++){var d=a[c],g=d.type;(1===g||2===g)&&(d=d.target)&&(b+=d.toLowerCase())}return b},k=null,x=function(){var c=!1,b=setTimeout(function(){alert("Vditor \u521d\u59cb\u5316\u5931\u8d25")},1E4),g=null,d=$("#text"),h=d.height(),f=$("#title").parent().width(),x=d.val(),A=$("#wmd-editarea");A.after('<div id="vditor"></div>');
36
+ var r=$('form[name="write_post"],form[name="write_page"]').attr("action"),r=new URL(r),q=$('input[name="cid"]').val(),y=LocalConst.BASE_UPLOAD_URL;y||(y=""+r.origin+LocalConst.REWRITE_FIX+"/action/upload"+r.search);var y=y+("&cid="+q),B={},C=[],G=function(a){var b=k.getSelection();b&&0<b.length?k.updateValue(a):k.insertValue(a)},H=function(){if(k){var a=k.getValue();A.val(a)}};window.allowSubmitFormInVditor=function(a){if(!c)return!1;H();return!0};var E=function(){try{$(".post-content table").wrap("<div class='table-responsive'></div>"),
37
37
  $(".post-content embed.video, .post-content video.video, .post-content iframe.video").addClass("video-4-3"),$(".post-content embed[video], .post-content video[video], .post-content iframe[video]").addClass("video-4-3"),$(".post-content embed[video-4-3], .post-content video[video-4-3], .post-content iframe[video-4-3]").addClass("video-4-3"),$(".post-content embed[video-16-9], .post-content video[video-16-9], .post-content iframe[video-16-9]").addClass("video-16-9"),$(".post-content embed, .post-content video, .post-content iframe").each(function(){0!==
38
38
  this.style.height.length&&($(this).hasClass("video-4-3")||$(this).hasClass("video-16-9")||$(this).attr("not-video",""))}),$(".post-content embed:not([not-video], [height], .video-4-3, .video-16-9, .large-content), .post-content iframe:not([not-video], [height], .video-4-3, .video-16-9, .large-content)").addClass("video-4-3"),$(".post-content embed.video-4-3, .post-content video.video-4-3, .post-content iframe.video-4-3").removeClass("video-16-9").wrap("<div class='video-container video-4-3'></div>"),
39
39
  $(".post-content embed.video-16-9, .post-content video.video-16-9, .post-content iframe.video-16-9").wrap("<div class='video-container video-16-9'></div>"),$(".post-content iframe, .post-content embed").each(function(){var a=$(this);a&&!a.attr("src")&&a.attr("data-src")&&a.attr("src",a.attr("data-src"))}),$(".post-content object").each(function(){var a=$(this);a&&!a.attr("data")&&a.attr("data-delay")&&a.attr("data",a.attr("data-delay"))})}catch(t){console.error(t)}};window._vditorStageRange=null;
40
- var I=function(){var a=window.getSelection();window._vditorStageRange=null;0<a.rangeCount&&(window._vditorStageRange=a.getRangeAt(0))},J=function(){if(null!=window._vditorStageRange){var a=window.getSelection();a.removeAllRanges();a.addRange(window._vditorStageRange)}},K=[];"html-video btn tip file tag hide tab collapse github".split(" ").forEach(function(b){var c=a.buttons[b].title;K.push({name:"shortCode-"+b,tip:c,icon:c,click:function(){I();a.triggerDialog(b,function(a){J();G(a)})}})});var q={shortCode:{name:"shortCode",
40
+ var I=function(){var a=window.getSelection();window._vditorStageRange=null;0<a.rangeCount&&(window._vditorStageRange=a.getRangeAt(0))},J=function(){if(null!=window._vditorStageRange){var a=window.getSelection();a.removeAllRanges();a.addRange(window._vditorStageRange)}},K=[];"html-video btn tip file tag hide tab collapse github".split(" ").forEach(function(b){var d=a.buttons[b].title;K.push({name:"shortCode-"+b,tip:d,icon:d,click:function(){I();a.triggerDialog(b,function(a){J();G(a)})}})});var q={shortCode:{name:"shortCode",
41
41
  tipPosition:"n",tip:"\u77ed\u4ee3\u7801",icon:'<svg viewBox="64 64 896 896" focusable="false" data-icon="build" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M916 210H376c-17.7 0-32 14.3-32 32v236H108c-17.7 0-32 14.3-32 32v272c0 17.7 14.3 32 32 32h540c17.7 0 32-14.3 32-32V546h236c17.7 0 32-14.3 32-32V242c0-17.7-14.3-32-32-32zm-504 68h200v200H412V278zm-68 468H144V546h200v200zm268 0H412V546h200v200zm268-268H680V278h200v200z"></path></svg>',click:function(){},toolbar:K},biaoqing:{name:"biaoqing",
42
42
  tipPosition:"n",tip:"\u8868\u60c5",icon:'<svg viewBox="64 64 896 896" focusable="false" data-icon="smile" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M288 421a48 48 0 1096 0 48 48 0 10-96 0zm352 0a48 48 0 1096 0 48 48 0 10-96 0zM512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm263 711c-34.2 34.2-74 61-118.3 79.8C611 874.2 562.3 884 512 884c-50.3 0-99-9.8-144.8-29.2A370.4 370.4 0 01248.9 775c-34.2-34.2-61-74-79.8-118.3C149.8 611 140 562.3 140 512s9.8-99 29.2-144.8A370.4 370.4 0 01249 248.9c34.2-34.2 74-61 118.3-79.8C413 149.8 461.7 140 512 140c50.3 0 99 9.8 144.8 29.2A370.4 370.4 0 01775.1 249c34.2 34.2 61 74 79.8 118.3C874.2 413 884 461.7 884 512s-9.8 99-29.2 144.8A368.89 368.89 0 01775 775zM664 533h-48.1c-4.2 0-7.8 3.2-8.1 7.4C604 589.9 562.5 629 512 629s-92.1-39.1-95.8-88.6c-.3-4.2-3.9-7.4-8.1-7.4H360a8 8 0 00-8 8.4c4.4 84.3 74.5 151.6 160 151.6s155.6-67.3 160-151.6a8 8 0 00-8-8.4z"></path></svg>',
43
43
  click:function(){I();g&&g.toggle()}}},w="biaoqing headings bold italic strike link | list ordered-list check outdent indent | quote line code inline-code insert-before insert-after | upload table shortCode | undo redo | fullscreen edit-mode preview".split(" "),L=["both","outline","export",{name:"defaultEditor",tip:"\u5207\u6362\u56de\u9ed8\u8ba4\u7f16\u8f91\u5668",icon:"\u5207\u56de\u9ed8\u8ba4\u7f16\u8f91\u5668",click:function(){k&&(H(),k.destroy(),$("#vditor").remove(),A.show(),$("#wmd-button-bar").show(),
44
44
  $("form[name=write_post],form[name=write_page]").attr("onsubmit",""),$('a[href="#tab-files"]').parent().show().prev().removeClass("w-100").addClass("w-50"))}},"info","help"],r=[],F=Object.keys(q),z=[],u=["upload","shortCode","fullscreen"],m=f-10,D;520>f?(m=98*Math.floor((m-5)/49),D=49*(u.length+1)):D=25*(u.length+1);for(;m>D&&0<w.length;){var v=w.shift();if(520>=f)if("|"===v)continue;else m-=49;else m="|"===v?m-17:m-25;u.includes(v)&&(D-=520>=f?49:25);F.includes(v)&&(z.push(v),v=q[v]);r.push(v)}for(;0<
45
45
  u.length;)f=u.shift(),F.includes(f)?z.includes(f)||(z.push(f),f=q[f],r.push(f)):r.includes(f)||r.push(f);f=!0;for(u=[];0<w.length;)f=!1,m=w.shift(),"|"!==m&&(F.includes(m)?z.includes(m)||(z.push(m),m=q[m],u.push(m)):r.includes(m)||u.push(m));for(;0<L.length;)u.push(L.shift());r.push({name:"more",toolbar:u});q=LocalConst.VDITOR_DEFAULT_MODE;w="editor";"1"===q?q="wysiwyg":"2"===q?q="ir":"3"===q?(q="sv",w="both"):q="4"===q?"sv":"ir";h={height:h,cache:{enable:!1},value:x,placeholder:"\u8bf7\u5728\u6b64\u5904\u8f93\u5165\u6587\u7ae0\u5185\u5bb9",
46
- mode:q,toolbar:r,toolbarConfig:{pin:!0},tab:" ",after:function(){clearTimeout(b);A.hide();$("#wmd-button-bar").hide();var a=$("#vditor");a.css("display","");$('a[href="#tab-files"]').parent().hide().prev().removeClass("w-50").addClass("w-100");$("form[name=write_post],form[name=write_page]").attr("onsubmit","return allowSubmitFormInVditor(this)");$("#btn-submit, #btn-save").on("click",function(a){d=!0});var c=document.querySelector("#vditor");new l(c,"vditor--fullscreen",function(){$("body").css("overflow-y",
46
+ mode:q,toolbar:r,toolbarConfig:{pin:!0},tab:" ",after:function(){clearTimeout(b);A.hide();$("#wmd-button-bar").hide();var a=$("#vditor");a.css("display","");$('a[href="#tab-files"]').parent().hide().prev().removeClass("w-50").addClass("w-100");$("form[name=write_post],form[name=write_page]").attr("onsubmit","return allowSubmitFormInVditor(this)");$("#btn-submit, #btn-save").on("click",function(a){c=!0});var d=document.querySelector("#vditor");new l(d,"vditor--fullscreen",function(){$("body").css("overflow-y",
47
47
  "hidden").addClass("vditor-mode-fullscreen")},function(){$("body").css("overflow-y","").removeClass("vditor-mode-fullscreen")});a.before('<span class="OwO" id="owo-vditor"></span>');g=new OwO({logo:'<svg viewBox="64 64 896 896" focusable="false" data-icon="smile" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M288 421a48 48 0 1096 0 48 48 0 10-96 0zm352 0a48 48 0 1096 0 48 48 0 10-96 0zM512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm263 711c-34.2 34.2-74 61-118.3 79.8C611 874.2 562.3 884 512 884c-50.3 0-99-9.8-144.8-29.2A370.4 370.4 0 01248.9 775c-34.2-34.2-61-74-79.8-118.3C149.8 611 140 562.3 140 512s9.8-99 29.2-144.8A370.4 370.4 0 01249 248.9c34.2-34.2 74-61 118.3-79.8C413 149.8 461.7 140 512 140c50.3 0 99 9.8 144.8 29.2A370.4 370.4 0 01775.1 249c34.2 34.2 61 74 79.8 118.3C874.2 413 884 461.7 884 512s-9.8 99-29.2 144.8A368.89 368.89 0 01775 775zM664 533h-48.1c-4.2 0-7.8 3.2-8.1 7.4C604 589.9 562.5 629 512 629s-92.1-39.1-95.8-88.6c-.3-4.2-3.9-7.4-8.1-7.4H360a8 8 0 00-8 8.4c4.4 84.3 74.5 151.6 160 151.6s155.6-67.3 160-151.6a8 8 0 00-8-8.4z"></path></svg>',
48
- container:document.getElementById("owo-vditor"),target:function(a){J();G(a)},api:LocalConst.OWO_API,position:"down",style:"max-width: 100%;",maxHeight:"250px",completeFunction:function(a){a=a.odata;for(var b=Object.keys(a),c=0;c<b.length;c++){var d=a[b[c]],f=d.type;if("biaoqing"===f)for(var f=d.baseURL,g=d.container,h=d.suffix,d=d.input,f=f.replace("{BIAOQING_PAOPAO_PATH}",LocalConst.BIAOQING_PAOPAO_PATH),f=f.replace("{BIAOQING_ARU_PATH}",LocalConst.BIAOQING_ARU_PATH),l=0;l<g.length;l++){var k=g[l],
49
- t=n(k),m='<img src="'+(f+encodeURI(k).replace(/%/g,"")+h)+'" style="width: auto" alt="'+k+'">'+k,p=d.replace("{NAME}",k);B[t+","+k]={html:m,value:p}}else if("usr"===f)for(f=d.name,g=LocalConst.BASE_SCRIPT_URL+"usr/biaoqing/"+f+"/",h=d.suffix,d=d.container,l=0;l<d.length;l++)m=d[l],"undefined"!==typeof m&&(t=k=m,"string"===typeof m?t=k=m:("string"===typeof m.icon&&(k=m.icon),"string"===typeof m.text&&(t=m.text)),m=n(t),B[m+","+t]={html:'<img src="'+(g+k+h)+'" style="width: auto" alt="'+t+'">'+t,value:"::"+
50
- f+":"+k+"::"})}C=Object.keys(B);C.sort()}})},input:function(a,b){c.val(a)},"debugger":!1,counter:{enable:f},upload:{url:y,validate:function(a){if(!LocalConst.ALLOWED_ATTACHMENT_TYPES||"function"!==typeof LocalConst.ALLOWED_ATTACHMENT_TYPES.includes||0===LocalConst.ALLOWED_ATTACHMENT_TYPES.length)return!0;for(var b=0;b<a.length;b++){var c=a[b].name,d=c.lastIndexOf("."),f="";0<=d&&(f=c.substring(d+1).toLowerCase());if(!LocalConst.ALLOWED_ATTACHMENT_TYPES.includes(f))return!1}return!0},format:function(a,
51
- b){var c;if(!1===b||"false"===b){c=[];for(var d=0;d<a.length;d++)c[d]=a[d].name;c={msg:"\u4e0a\u4f20\u5931\u8d25",code:0,data:{errFiles:c,succMap:{}}}}else c=JSON.parse(b),d={},d[c[1].title]=c[0],c={msg:"",code:0,data:{errFiles:[],succMap:d}};return JSON.stringify(c)},file:function(a){console.log("files",a);return a},multiple:!1,fieldName:"file"},hint:{extend:[{key:"@",hint:function(a){"undefined"===typeof a&&(a="");for(var b=10,c=[],d=0;d<C.length&&0<b;d++){var f=C[d];0<=f.indexOf(a)&&(f=B[f])&&
52
- (c.push(f),b--)}return c}}]},resize:{enable:!0},classes:{preview:"post-content"},preview:{maxWidth:710,mode:w,actions:["desktop","tablet","mobile"],theme:{current:"light",list:'{light: "Light"}',path:LocalConst.BASE_CSS_URL+"vditor/theme"},math:{engine:"MathJax"},markdown:{autoSpace:!0,toc:!0,mark:!0},hljs:{enable:!0,style:"custom",lineNumber:!0},parse:function(a){E()}}};try{$("#vditor").css("display","none"),k=new Vditor("vditor",h)}catch(t){console.error(t),alert("Vditor \u521d\u59cb\u5316\u5931\u8d25"),
53
- clearTimeout(b),k&&k.destroy()}};$("body").addClass(LocalConst.BODY_CLASS);(function(){var d=new a(document.querySelector("#wmd-button-row"),document.querySelector("#text"));g(d)})();"function"===typeof Vditor&&x();$("body").addClass("theme-white");$("#text").before('<span class="OwO" id="owo-default"></span>');new OwO({logo:"O\u03c9O",container:document.getElementById("owo-default"),target:document.getElementById("text"),api:LocalConst.OWO_API,position:"down",style:"max-width: 100%;",maxHeight:"250px"});
48
+ container:document.getElementById("owo-vditor"),target:function(a){J();G(a)},api:LocalConst.OWO_API,position:"down",style:"max-width: 100%;",maxHeight:"250px",completeFunction:function(a){a=a.odata;for(var b=Object.keys(a),d=0;d<b.length;d++){var c=a[b[d]],f=c.type;if("biaoqing"===f)for(var f=c.baseURL,g=c.container,h=c.suffix,c=c.input,f=f.replace("{BIAOQING_PAOPAO_PATH}",LocalConst.BIAOQING_PAOPAO_PATH),f=f.replace("{BIAOQING_ARU_PATH}",LocalConst.BIAOQING_ARU_PATH),l=0;l<g.length;l++){var k=g[l],
49
+ t=n(k),m='<img src="'+(f+encodeURI(k).replace(/%/g,"")+h)+'" style="width: auto" alt="'+k+'">'+k,p=c.replace("{NAME}",k);B[t+","+k]={html:m,value:p}}else if("usr"===f)for(g=c.path,g||(g=c.name),f=c.name,g=LocalConst.BASE_SCRIPT_URL+"usr/biaoqing/"+g+"/",h=c.suffix,c=c.container,l=0;l<c.length;l++)m=c[l],"undefined"!==typeof m&&(t=k=m,"string"===typeof m?t=k=m:("string"===typeof m.icon&&(k=m.icon),"string"===typeof m.text&&(t=m.text)),m=n(t),B[m+","+t]={html:'<img src="'+(g+k+h)+'" style="width: auto" alt="'+
50
+ t+'">'+t,value:"::"+f+":"+k+"::"})}C=Object.keys(B);C.sort()}})},input:function(a,b){d.val(a)},"debugger":!1,counter:{enable:f},upload:{url:y,validate:function(a){if(!LocalConst.ALLOWED_ATTACHMENT_TYPES||"function"!==typeof LocalConst.ALLOWED_ATTACHMENT_TYPES.includes||0===LocalConst.ALLOWED_ATTACHMENT_TYPES.length)return!0;for(var b=0;b<a.length;b++){var c=a[b].name,d=c.lastIndexOf("."),f="";0<=d&&(f=c.substring(d+1).toLowerCase());if(!LocalConst.ALLOWED_ATTACHMENT_TYPES.includes(f))return!1}return!0},
51
+ format:function(a,b){var c;if(!1===b||"false"===b){c=[];for(var d=0;d<a.length;d++)c[d]=a[d].name;c={msg:"\u4e0a\u4f20\u5931\u8d25",code:0,data:{errFiles:c,succMap:{}}}}else c=JSON.parse(b),d={},d[c[1].title]=c[0],c={msg:"",code:0,data:{errFiles:[],succMap:d}};return JSON.stringify(c)},file:function(a){console.log("files",a);return a},multiple:!1,fieldName:"file"},hint:{extend:[{key:"@",hint:function(a){"undefined"===typeof a&&(a="");for(var b=10,c=[],d=0;d<C.length&&0<b;d++){var f=C[d];0<=f.indexOf(a)&&
52
+ (f=B[f])&&(c.push(f),b--)}return c}}]},resize:{enable:!0},classes:{preview:"post-content"},preview:{maxWidth:710,mode:w,actions:["desktop","tablet","mobile"],theme:{current:"light",list:'{light: "Light"}',path:LocalConst.BASE_CSS_URL+"vditor/theme"},math:{engine:"MathJax"},markdown:{autoSpace:!0,toc:!0,mark:!0},hljs:{enable:!0,style:"custom",lineNumber:!0},parse:function(a){E()}}};try{$("#vditor").css("display","none"),k=new Vditor("vditor",h)}catch(t){console.error(t),alert("Vditor \u521d\u59cb\u5316\u5931\u8d25"),
53
+ clearTimeout(b),k&&k.destroy()}};$("body").addClass(LocalConst.BODY_CLASS);(function(){var c=new a(document.querySelector("#wmd-button-row"),document.querySelector("#text"));g(c)})();"function"===typeof Vditor&&x();$("body").addClass("theme-white");$("#text").before('<span class="OwO" id="owo-default"></span>');new OwO({logo:"O\u03c9O",container:document.getElementById("owo-default"),target:document.getElementById("text"),api:LocalConst.OWO_API,position:"down",style:"max-width: 100%;",maxHeight:"250px"});
54
54
  $("#custom-field").addClass("fold")});