From: woltlab.com Date: Tue, 26 Aug 2014 14:36:51 +0000 (+0200) Subject: Updating minified JavaScript files X-Git-Tag: 2.1.0_Alpha_1~406 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6edf4dd352bdf98dc39566a1fb9705dbc4b172cb;p=GitHub%2FWoltLab%2FWCF.git Updating minified JavaScript files --- diff --git a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wcombined.min.js b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wcombined.min.js index b5a1bcf719..cc787d0873 100644 --- a/wcfsetup/install/files/js/3rdParty/redactor/plugins/wcombined.min.js +++ b/wcfsetup/install/files/js/3rdParty/redactor/plugins/wcombined.min.js @@ -1,5 +1,5 @@ // wbbcode.js -if(!RedactorPlugins){var RedactorPlugins={}}RedactorPlugins.wbbcode={init:function(){var c=this.$source.wcfIdentify();this.opts.initCallback=$.proxy(function(){var f=$.trim(this.getOption("wOriginalValue"));if(f.length){this.toggle();this.$source.val(f);this.toggle()}delete this.opts.wOriginalValue},this);this.opts.pasteBeforeCallback=$.proxy(this._wPasteBeforeCallback,this);this.opts.pasteAfterCallback=$.proxy(this._wPasteAfterCallback,this);var e=this.syncClean;var b=this;this.syncClean=function(f){f=f.replace(/

]+)?><\/p>/g,"

@@@wcf_empty_line@@@

");return e.call(b,f)};if(this.getOption("wAutosaveOnce")){this._saveTextToStorage();delete this.opts.wAutosaveOnce}var a=this.buttonGet("table");if(a.length){var d=a.data("dropdown").children("a.redactor_dropdown_add_head");d.prev().remove();d.next().remove();d.remove();a.click($.proxy(this._tableButtonClick,this))}WCF.System.Event.addListener("com.woltlab.wcf.redactor","insertBBCode_quote_"+c,$.proxy(function(f){f.cancel=true;this._handleInsertQuote()},this));WCF.System.Event.addListener("com.woltlab.wcf.redactor","keydown_"+c,$.proxy(this._wKeydownCallback,this))},_tableButtonClick:function(b){var c=$(b.currentTarget);if(!c.hasClass("dropact")){return}var a=this.getBlock()||this.getCurrent();var d=c.data("dropdown");d.children("li").show();var e=d.find("> li > .redactor_dropdown_insert_table").parent();if(a.tagName=="TD"){e.hide().next().hide()}else{e.nextAll().hide()}},insertSmiley:function(a,b,c){if(c){this.registerSmiley(a,b)}if(this.opts.visual){this.bufferSet();this.$editor.focus();this.insertHtml(' '+a+' ');if(this.opts.air){this.$air.fadeOut(100)}this.sync()}else{this.insertAtCaret(" "+a+" ")}},registerSmiley:function(a,b){if(__REDACTOR_SMILIES[a]){return false}__REDACTOR_SMILIES[a]=b;return true},toggle:function(a){if(this.opts.visual){this.sync(undefined,true);this.toggleCode(a);this._convertFromHtml();this.buttonGet("html").children("i").removeClass("fa-square-o").addClass("fa-square")}else{this._convertToHtml();this.toggleVisual();this._observeQuotes();this.buttonGet("html").children("i").removeClass("fa-square").addClass("fa-square-o")}},_convertFromHtml:function(){var m=this.$source.val();WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","beforeConvertFromHtml",{html:m});m=m.replace(/\r?\n/g,"");var f=m.split(/(<\/?(?:div|p)>)/);var g="";var x="";for(var a=0;a"||y=="
"){continue}else{if(y=="

"||y=="
"){x=$.trim(x);if(x!="@@@wcf_empty_line@@@"){x+="\n"}g+=x;x=""}else{if(a==0||a+1==f.length){g+=y}else{x+=y}}}}if(x){g+=x;x=""}m=g;m=m.replace(/@@@wcf_empty_line@@@/g,"\n");m=m.replace(/\n\n$/,"\n");m=m.replace(/
$/,"");m=m.replace(/
/g,"\n");m=m.replace(/
/g,"");m=m.replace(/ /gi," ");m=m.replace(/
\n?]+>\n?
[\s\S]*?<\/header>/gi,function(z,B,A,C){var D;if(B){D="[quote='"+A+"','"+B+"']"}else{if(A){D="[quote='"+A+"']"}else{D="[quote]"}}return D});m=m.replace(/(?:\n*)<\/blockquote>/gi,"[/quote]\n");m=m.replace(/]*?href=(["'])mailto:(.+?)\1.*?>([\s\S]+?)<\/a>/gi,"[email=$2]$3[/email]");m=m.replace(/]*?href=(["'])(.+?)\1.*?>([\s\S]+?)<\/a>/gi,function(B,z,A,C){if(A==C){return"[url]"+A+"[/url]"}return"[url='"+A+"']"+C+"[/url]"});m=m.replace(/<(?:b|strong)>/gi,"[b]");m=m.replace(/<\/(?:b|strong)>/gi,"[/b]");m=m.replace(/<(?:i|em)>/gi,"[i]");m=m.replace(/<\/(?:i|em)>/gi,"[/i]");m=m.replace(//gi,"[u]");m=m.replace(/<\/u>/gi,"[/u]");m=m.replace(/<(?:s(trike)?|del)>/gi,"[s]");m=m.replace(/<\/(?:s(trike)?|del)>/gi,"[/s]");m=m.replace(//gi,"[sub]");m=m.replace(/<\/sub>/gi,"[/sub]");m=m.replace(//gi,"[sup]");m=m.replace(/<\/sup>/gi,"[/sup]");m=m.replace(/]*?alt="([^"]+?)" class="smiley".*?>/gi,"$1");m=m.replace(/]*?class="smiley" alt="([^"]+?)".*?>/gi,"$1");m=m.replace(/]*?class="redactorEmbeddedAttachment" data-attachment-id="(\d+)".*?>/gi,"[attach=$1][/attach]");m=m.replace(/]*?src=(["'])([^"']+?)\1 style="float: (left|right)[^"]*".*?>/gi,"[img='$2',$3][/img]");m=m.replace(/]*?src=(["'])([^"']+?)\1.*?>/gi,"[img]$2[/img]");var d=m.split(/(<\/?span[^>]*>)/);var x=[];var p=[];var q="";for(var a=0;a"){var c=p.pop();var g=c.start+x.pop()+c.end;if(x.length){x[x.length-1]+=g}else{q+=g}}else{if(h.match(/^/)){var k=RegExp.$1;var v;var n;if(k.match(/^color: ?rgb\((\d{1,3}), ?(\d{1,3}), ?(\d{1,3})\);?$/i)){var u=RegExp.$1;var b=RegExp.$2;var e=RegExp.$3;var s=("0123456789ABCDEF".charAt((u-u%16)/16)+""+"0123456789ABCDEF".charAt(u%16))+""+("0123456789ABCDEF".charAt((b-b%16)/16)+""+"0123456789ABCDEF".charAt(b%16))+""+("0123456789ABCDEF".charAt((e-e%16)/16)+""+"0123456789ABCDEF".charAt(e%16));v="[color=#"+s+"]";n="[/color]"}else{if(k.match(/^color: ?(.*?);?$/i)){v="[color="+RegExp.$1+"]";n="[/color]"}else{if(k.match(/^font-size: ?(\d+)pt;?$/i)){v="[size="+RegExp.$1+"]";n="[/size]"}else{if(k.match(/^font-family: ?(.*?);?$/)){v="[font="+RegExp.$1.replace(/'/g,"")+"]";n="[/font]"}else{v='';n=""}}}}x[x.length]="";p[x.length]={start:v,end:n}}else{if(h.match(/^/)){x[x.length]="";p[x.length]={start:"[tt]",end:"[/tt]"}}else{if(x.length){x[x.length-1]+=h}else{q+=h}}}}}m=q;m=m.replace(/<(div|p) style="text-align: ?(left|center|right|justify);? ?">([\s\S]*?)\n/gi,function(A,z,C,B){return"[align="+C+"]"+$.trim(B)+"[/align]"});m=m.replace(/
  • /gi,"[*]");m=m.replace(/<\/li>/gi,"");m=m.replace(/
      /gi,"[list]");m=m.replace(/<(ol|ul style="list-style-type: decimal")>/gi,"[list=1]");m=m.replace(/
        /gi,"[list=$1]");m=m.replace(/<\/(ul|ol)>/gi,"[/list]");m=m.replace(/]*>/gi,"[table]\n");m=m.replace(/<\/table>/gi,"[/table]\n");m=m.replace(/([\s\S]*?)<\/tbody>/,function(z,A){return $.trim(A)});m=m.replace(/<\/tr>/gi,"");m=m.replace(//gi,"[tr]\n");m=m.replace(/<\/tr>/gi,"[/tr]\n");m=m.replace(/([\s\S]*?)<\/td>/gi,"[td][align=$1]$2[/align][/td]");m=m.replace(/(\t)*(\t)*/gi,"[td]");m=m.replace(/(\t)*<\/td>/gi,"[/td]\n");var w={};m.replace(/<\/span>/,function(z){var A=z.hashCode();w[A]=z.replace(/\$/g,"$$$$");return"@@"+A+"@@"});WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","convertFromHtml",{html:m});m=m.replace(/<[^>]+>/g,"");if($.getLength(w)){for(var j in w){var t=new RegExp("@@"+j+"@@","g");data=data.replace(t,w[j])}}m=m.replace(/</g,"<");m=m.replace(/>/g,">");m=m.replace(/&/g,"&");m=m.replace(/%28/g,"(");m=m.replace(/%29/g,")");var r={};for(var a=0,i=__REDACTOR_SOURCE_BBCODES.length;a/g,">");var m={};for(var a=0,f=__REDACTOR_SOURCE_BBCODES.length;a$1');q=q.replace(/\[url\='([^'"]+)'](.+?)\[\/url]/gi,'$2');q=q.replace(/\[url\=([^'"\]]+)](.+?)\[\/url]/gi,'$2');q=q.replace(/\[email\]([^"]+?)\[\/email]/gi,'$1');q=q.replace(/\[email\=([^"\]]+)](.+?)\[\/email]/gi,'$2');q=q.replace(/\[b\](.*?)\[\/b]/gi,"$1");q=q.replace(/\[i\](.*?)\[\/i]/gi,"$1");q=q.replace(/\[u\](.*?)\[\/u]/gi,"$1");q=q.replace(/\[s\](.*?)\[\/s]/gi,"$1");q=q.replace(/\[sub\](.*?)\[\/sub]/gi,"$1");q=q.replace(/\[sup\](.*?)\[\/sup]/gi,"$1");q=q.replace(/\[img\]([^"]+?)\[\/img\]/gi,'');q=q.replace(/\[img='?([^"]*?)'?,'?(left|right)'?\]\[\/img\]/gi,'');q=q.replace(/\[img='?([^"]*?)'?\]\[\/img\]/gi,'');q=q.replace(/\[size=(\d+)\](.*?)\[\/size\]/gi,'$2');q=q.replace(/\[color=([#a-z0-9]*?)\](.*?)\[\/color\]/gi,'$2');q=q.replace(/\[font='?([a-z,\- ]*?)'?\](.*?)\[\/font\]/gi,'$2');q=q.replace(/\[align=(left|right|center|justify)\](.*?)\[\/align\]/gi,'
        $2
        ');q=q.replace(/\[\*\](.*?)(?=\[\*\]|\[\/list\])/gi,"
      • $1
      • ");q=q.replace(/\[list\]/gi,"
          ");q=q.replace(/\[list=1\]/gi,'
            ');q=q.replace(/\[list=a\]/gi,'
              ');q=q.replace(/\[list=(none|circle|square|disc|decimal|lower-roman|upper-roman|decimal-leading-zero|lower-greek|lower-latin|upper-latin|armenian|georgian)\]/gi,'
                ');q=q.replace(/\[\/list]/gi,"
              ");q=q.replace(/\[table\]([\S\s]*?)\[\/table\]/gi,function(s,t){return"[table]"+$.trim(t)+"[/table]"});q=q.replace(/\[table\]/gi,'');q=q.replace(/\[\/table\]/gi,"
              ");q=q.replace(/\[tr\]/gi,"");q=q.replace(/\[\/tr\]/gi,"");q=q.replace(/\[td\]/gi,"");q=q.replace(/\[\/td\]/gi,"");q=q.replace(/([\S\s]*?)<\/td>/gi,function(s,u){var t=$.trim(u);if(!t.length){t="​"}return""+t+""});var b=this.getOption("wAttachmentUrl");if(b){var c=this._getImageAttachmentIDs();q=q.replace(/\[attach=(\d+)\]\[\/attach\]/g,function(s,t){t=parseInt(t);if(WCF.inArray(t,c)){return''}return s})}for(var n in __REDACTOR_SMILIES){$smileyCode=n.replace(//g,">");var e=new RegExp("(\\s|>|^)"+WCF.String.escapeRegExp($smileyCode)+"(?=\\s|<|$)","gi");q=q.replace(e,'$1'+$smileyCode+'')}q=q.replace(/(javascript):/gi,"$1:");q=q.replace(/(\r|\r\n)/g,"\n");var p={};q=q.replace(/\[quote.*?\][\S\s]*?\[\/quote\]/gi,function(s){var t=s.hashCode();p[t]=s.replace(/\$/g,"$$$$");return"@@"+t+"@@"});q=q.replace(/(\[quote.*?\])/gi,"$1\n");q=q.replace(/(\[\/quote\])/gi,"\n$1");var d=q.split("\n");q="";for(var a=0,f=d.length;a"}q+="

              "+l+"

              "}}if($.getLength(m)){for(var g in m){var o=new RegExp("@@"+g+"@@","g");q=q.replace(o,m[g])}q=q.replace(/\[tt\](.*?)\[\/tt\]/gi,'$1')}q=q.replace(/\[code\][\S\s]*?\[\/code\]/,"
              $&
              ");if($.getLength(p)){var r=function(s){return s.replace(/^['"]/,"").replace(/['"]$/,"")};var j=this;var i=function(s){return s.replace(/\[quote([^\]]+)?\]([\S\s]*)\[\/quote\]?/gi,$.proxy(function(v,u,x){var A="";var w="";if(u){u=u.substr(1);u=u.split(",");switch(u.length){case 1:A=u[0];break;case 2:A=u[0];w=u[1];break}A=WCF.String.escapeHTML(r($.trim(A)));w=WCF.String.escapeHTML(r($.trim(w)))}var B='

              '+j._buildQuoteHeader(A,w)+'

              ';var z=x.split("\n");var t="";for(var y=0;y"+z[y]+"
              "}if(!t){t="
              "+this.opts.invisibleSpace+"
              "}B+=t;B+="
              ";return B},this))};for(var g in p){var o=new RegExp("@@"+g+"@@","g");q=q.replace(o,i(p[g]))}}WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","afterConvertToHtml",{data:q});this.$source.val(q)},_wPasteBeforeCallback:function(a){var b={1:24,2:22,3:18,4:14,5:12,6:10};a=a.replace(/]+>/g,function(c,d){return"[size="+b[d]+"]"});a=a.replace(/<\/h[1-6]>/g,"[/size]");a=a.replace(/<(article|header)[^>]+>/g,"
              ");a=a.replace(/<\/(article|header)>/g,"
              ");a=a.replace(/<(div|p)([^>]+)?><(div|p)([^>]+)?>/g,"

              ");a=a.replace(/<\/(div|p)><\/(div|p)>/g,"

              @@@wcf_break@@@");WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","beforePaste",{html:a});return a},_wPasteAfterCallback:function(a){a=a.replace(/

              ([\s\S]*?)<\/p>/g,"

              $1

              ");a=a.replace(/]*>/g,"");a=a.replace(/<\/header>/g,"");a=a.replace(/
              .*?<\/div>/g,"

              $1

              ");a=a.replace(/<\/?div>/g,"");a=a.replace(/@@@wcf_break@@@/g,"


              ");a=a.replace(/

              /g,"

              ");a=a.replace(/\[size=(\d+)\]/g,'


              ');a=a.replace(/\[\/size\]/g,"


              ");a=a.replace(/]+)>/g,function(b,c){b=b.replace(/data-mozilla-paste-image="0"/,'data-mozilla-paste-image="0" style="display:none"');return b});WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","afterPaste",{html:a});return a},insertAttachment:function(d){d=parseInt(d);var b=this.getOption("wAttachmentUrl");var c="[attach="+d+"][/attach]";var a=this._getImageAttachmentIDs();if(b&&WCF.inArray(d,a)){this.insertDynamic('',c)}else{this.insertDynamic(c)}},_getImageAttachmentIDs:function(){var a=this.getOption("wAttachmentImageIDs")||[];if(a.length){delete this.opts.wAttachmentImageIDs;return a}var b={imageAttachmentIDs:[]};WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","getImageAttachments_"+this.$source.wcfIdentify(),b);return b.imageAttachmentIDs},_wKeydownCallback:function(d){if(d.event.which!==$.ui.keyCode.DOWN&&d.event.which!==$.ui.keyCode.UP){return}var b=$(this.getCurrent());var e=this.getParent();e=(e)?$(e):e;var g=(e)?e.closest("blockquote.quoteBox",this.$editor.get()[0]):{length:0};console.clear();console.debug(b);console.debug(e);switch(d.event.which){case $.ui.keyCode.DOWN:if(e){if(g.length){var f=b.closest("div",g[0]);if(!f.next().length){this.insertingAfterLastElement(g);console.debug("case#0");d.cancel=true}else{console.debug("case#1")}}else{if(e.next("blockquote.quoteBox").length){this.selectionStart(e.next().find("> div > div:first"));console.debug("case#2");d.cancel=true}else{console.debug("case#3")}}}else{if(b.next("blockquote.quoteBox").length){this.selectionStart(b.next().find("> div > div:first"));console.debug("case#4");d.cancel=true}else{console.debug("case#5")}}break;case $.ui.keyCode.UP:if(!e||!g.length){return}var f=b.closest("div",g[0]);if(f.prev("div").length){return}var c=g.prev();if(c.length===0){console.debug("case#1");var a=$(this.opts.emptyHtml);a.insertBefore(g);this.selectionStart(a)}else{if(c[0].tagName==="BLOCKQUOTE"){this.selectionEnd(c.find("> div > div:last"))}else{if($.trim(c.html())==""){c.html(this.opts.invisibleSpace)}this.selectionEnd(c)}}d.cancel=true;break}},_observeQuotes:function(){this.$editor.find(".redactorQuoteEdit:not(.jsRedactorQuoteEdit)").addClass("jsRedactorQuoteEdit").click($.proxy(this._observeQuotesClick,this))},_observeQuotesClick:function(d){var b=$(d.currentTarget).closest("header");var c=$('');$(''+WCF.Language.get("wcf.bbcode.quote.edit")+"").click($.proxy(function(f){f.preventDefault();this._openQuoteEditOverlay($(d.currentTarget).closest("blockquote.quoteBox"),false);$(".redactor-link-tooltip").remove()},this)).appendTo(c);var a=b.offset();c.css({left:a.left+"px",top:(a.top+20)+"px"});$(".redactor-link-tooltip").remove();c.appendTo(document.body)},_openQuoteEditOverlay:function(a,b){if(b){this.modalInit(WCF.Language.get("wcf.bbcode.quote.insert"),this.opts.modal_quote,300,$.proxy(function(){$("#redactorEditQuote").click($.proxy(function(){var d=$("#redactorQuoteAuthor").val();var c=WCF.String.escapeHTML($("#redactorQuoteLink").val());this.insertQuoteBBCode(d,c);this.modalClose()},this))},this))}else{this.modalInit(WCF.Language.get("wcf.bbcode.quote.edit"),this.opts.modal_quote,300,$.proxy(function(){if(!b){$("#redactorQuoteAuthor").val(a.data("author"));$("#redactorQuoteLink").val(a.attr("cite"))}$("#redactorEditQuote").click($.proxy(function(){var c=$("#redactorQuoteAuthor").val();a.data("author",c);a.attr("data-author",c);a.prop("cite",WCF.String.escapeHTML($("#redactorQuoteLink").val()));this._updateQuoteHeader(a);this.modalClose()},this))},this))}},_updateQuoteHeader:function(b){var c=b.data("author");var a=b.attr("cite");if(a){a=WCF.String.escapeHTML(a)}b.find("> div > header > h3").empty().append(this._buildQuoteHeader(c,a))},insertQuoteBBCode:function(b,d){if(this.inWysiwygMode()){var a='

              '+this._buildQuoteHeader(b,d)+'

              ';this.insertHtml(a);var f=$("#redactorInsertedQuote");var e=$("
              "+this.opts.invisibleSpace+"
              ").insertAfter(f.find("> div > header"));f.removeAttr("id");this.selectionStart(e[0]);this._observeQuotes()}else{var c="[quote][/quote]";if(b){if(d){c="[quote='"+b+"','"+d+"'][/quote]"}else{c="[quote='"+b+"'][/quote]"}}this.insertAtCaret(c)}},_buildQuoteHeader:function(b,c){var a="";if(!b&&c){b=c;c=""}if(b){if(c){a+=''}a+=WCF.Language.get("wcf.bbcode.quote.title.javascript",{quoteAuthor:WCF.String.unescapeHTML(b)});if(c){a+=""}}else{a=""+WCF.Language.get("wcf.bbcode.quote.title.clickToSet")+""}return a},_handleInsertQuote:function(){this._openQuoteEditOverlay(null,true)}}; +if(!RedactorPlugins){var RedactorPlugins={}}RedactorPlugins.wbbcode={init:function(){var c=this.$source.wcfIdentify();this.opts.initCallback=$.proxy(function(){var f=$.trim(this.getOption("wOriginalValue"));if(f.length){this.toggle();this.$source.val(f);this.toggle()}delete this.opts.wOriginalValue},this);this.opts.pasteBeforeCallback=$.proxy(this._wPasteBeforeCallback,this);this.opts.pasteAfterCallback=$.proxy(this._wPasteAfterCallback,this);var e=this.syncClean;var b=this;this.syncClean=function(f){f=f.replace(/

              ]+)?><\/p>/g,"

              @@@wcf_empty_line@@@

              ");return e.call(b,f)};if(this.getOption("wAutosaveOnce")){this._saveTextToStorage();delete this.opts.wAutosaveOnce}var a=this.buttonGet("table");if(a.length){var d=a.data("dropdown").children("a.redactor_dropdown_add_head");d.prev().remove();d.next().remove();d.remove();a.click($.proxy(this._tableButtonClick,this))}WCF.System.Event.addListener("com.woltlab.wcf.redactor","insertBBCode_quote_"+c,$.proxy(function(f){f.cancel=true;this._handleInsertQuote()},this));WCF.System.Event.addListener("com.woltlab.wcf.redactor","keydown_"+c,$.proxy(this._wKeydownCallback,this))},_tableButtonClick:function(b){var c=$(b.currentTarget);if(!c.hasClass("dropact")){return}var a=this.getBlock()||this.getCurrent();var d=c.data("dropdown");d.children("li").show();var e=d.find("> li > .redactor_dropdown_insert_table").parent();if(a.tagName=="TD"){e.hide().next().hide()}else{e.nextAll().hide()}},insertSmiley:function(a,b,c){if(c){this.registerSmiley(a,b)}if(this.opts.visual){this.bufferSet();this.$editor.focus();this.insertHtml(' '+a+' ');if(this.opts.air){this.$air.fadeOut(100)}this.sync()}else{this.insertAtCaret(" "+a+" ")}},registerSmiley:function(a,b){if(__REDACTOR_SMILIES[a]){return false}__REDACTOR_SMILIES[a]=b;return true},toggle:function(a){if(this.opts.visual){this.sync(undefined,true);this.toggleCode(a);this._convertFromHtml();this.buttonGet("html").children("i").removeClass("fa-square-o").addClass("fa-square")}else{this._convertToHtml();this.toggleVisual();this._observeQuotes();this.buttonGet("html").children("i").removeClass("fa-square").addClass("fa-square-o")}},_convertFromHtml:function(){var m=this.$source.val();WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","beforeConvertFromHtml",{html:m});m=m.replace(/\r?\n/g,"");var f=m.split(/(<\/?(?:div|p)>)/);var g="";var x="";for(var a=0;a"||y=="
              "){continue}else{if(y=="

              "||y=="
              "){x=$.trim(x);if(x!="@@@wcf_empty_line@@@"){x+="\n"}g+=x;x=""}else{if(a==0||a+1==f.length){g+=y}else{x+=y}}}}if(x){g+=x;x=""}m=g;m=m.replace(/@@@wcf_empty_line@@@/g,"\n");m=m.replace(/\n\n$/,"\n");m=m.replace(/
              $/,"");m=m.replace(/
              /g,"\n");m=m.replace(/
              /g,"");m=m.replace(/ /gi," ");m=m.replace(/
              \n?]+>\n?
              [\s\S]*?<\/header>/gi,function(z,B,A,C){var D;if(B){D="[quote='"+A+"','"+B+"']"}else{if(A){D="[quote='"+A+"']"}else{D="[quote]"}}return D});m=m.replace(/(?:\n*)<\/blockquote>/gi,"[/quote]\n");m=m.replace(/]*?href=(["'])mailto:(.+?)\1.*?>([\s\S]+?)<\/a>/gi,"[email=$2]$3[/email]");m=m.replace(/]*?href=(["'])(.+?)\1.*?>([\s\S]+?)<\/a>/gi,function(B,z,A,C){if(A==C){return"[url]"+A+"[/url]"}return"[url='"+A+"']"+C+"[/url]"});m=m.replace(/<(?:b|strong)>/gi,"[b]");m=m.replace(/<\/(?:b|strong)>/gi,"[/b]");m=m.replace(/<(?:i|em)>/gi,"[i]");m=m.replace(/<\/(?:i|em)>/gi,"[/i]");m=m.replace(//gi,"[u]");m=m.replace(/<\/u>/gi,"[/u]");m=m.replace(/<(?:s(trike)?|del)>/gi,"[s]");m=m.replace(/<\/(?:s(trike)?|del)>/gi,"[/s]");m=m.replace(//gi,"[sub]");m=m.replace(/<\/sub>/gi,"[/sub]");m=m.replace(//gi,"[sup]");m=m.replace(/<\/sup>/gi,"[/sup]");m=m.replace(/]*?alt="([^"]+?)" class="smiley".*?>/gi,"$1");m=m.replace(/]*?class="smiley" alt="([^"]+?)".*?>/gi,"$1");m=m.replace(/]*?class="redactorEmbeddedAttachment" data-attachment-id="(\d+)".*?>/gi,"[attach=$1][/attach]");m=m.replace(/]*?src=(["'])([^"']+?)\1 style="float: (left|right)[^"]*".*?>/gi,"[img='$2',$3][/img]");m=m.replace(/]*?src=(["'])([^"']+?)\1.*?>/gi,"[img]$2[/img]");var d=m.split(/(<\/?span[^>]*>)/);var x=[];var p=[];var q="";for(var a=0;a"){var c=p.pop();var g=c.start+x.pop()+c.end;if(x.length){x[x.length-1]+=g}else{q+=g}}else{if(h.match(/^/)){var k=RegExp.$1;var v;var n;if(k.match(/^color: ?rgb\((\d{1,3}), ?(\d{1,3}), ?(\d{1,3})\);?$/i)){var u=RegExp.$1;var b=RegExp.$2;var e=RegExp.$3;var s=("0123456789ABCDEF".charAt((u-u%16)/16)+""+"0123456789ABCDEF".charAt(u%16))+""+("0123456789ABCDEF".charAt((b-b%16)/16)+""+"0123456789ABCDEF".charAt(b%16))+""+("0123456789ABCDEF".charAt((e-e%16)/16)+""+"0123456789ABCDEF".charAt(e%16));v="[color=#"+s+"]";n="[/color]"}else{if(k.match(/^color: ?(.*?);?$/i)){v="[color="+RegExp.$1+"]";n="[/color]"}else{if(k.match(/^font-size: ?(\d+)pt;?$/i)){v="[size="+RegExp.$1+"]";n="[/size]"}else{if(k.match(/^font-family: ?(.*?);?$/)){v="[font="+RegExp.$1.replace(/'/g,"")+"]";n="[/font]"}else{v='';n=""}}}}x[x.length]="";p[x.length]={start:v,end:n}}else{if(h.match(/^/)){x[x.length]="";p[x.length]={start:"[tt]",end:"[/tt]"}}else{if(x.length){x[x.length-1]+=h}else{q+=h}}}}}m=q;m=m.replace(/<(div|p) style="text-align: ?(left|center|right|justify);? ?">([\s\S]*?)\n/gi,function(A,z,C,B){return"[align="+C+"]"+$.trim(B)+"[/align]"});m=m.replace(/
            • /gi,"[*]");m=m.replace(/<\/li>/gi,"");m=m.replace(/
                /gi,"[list]");m=m.replace(/<(ol|ul style="list-style-type: decimal")>/gi,"[list=1]");m=m.replace(/
                  /gi,"[list=$1]");m=m.replace(/<\/(ul|ol)>/gi,"[/list]");m=m.replace(/]*>/gi,"[table]\n");m=m.replace(/<\/table>/gi,"[/table]\n");m=m.replace(/([\s\S]*?)<\/tbody>/,function(z,A){return $.trim(A)});m=m.replace(/<\/tr>/gi,"");m=m.replace(//gi,"[tr]\n");m=m.replace(/<\/tr>/gi,"[/tr]\n");m=m.replace(/([\s\S]*?)<\/td>/gi,"[td][align=$1]$2[/align][/td]");m=m.replace(/(\t)*(\t)*/gi,"[td]");m=m.replace(/(\t)*<\/td>/gi,"[/td]\n");var w={};m.replace(/<\/span>/,function(z){var A=z.hashCode();w[A]=z.replace(/\$/g,"$$$$");return"@@"+A+"@@"});WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","convertFromHtml",{html:m});m=m.replace(/<[^>]+>/g,"");if($.getLength(w)){for(var j in w){var t=new RegExp("@@"+j+"@@","g");data=data.replace(t,w[j])}}m=m.replace(/</g,"<");m=m.replace(/>/g,">");m=m.replace(/&/g,"&");m=m.replace(/%28/g,"(");m=m.replace(/%29/g,")");var r={};for(var a=0,i=__REDACTOR_SOURCE_BBCODES.length;a/g,">");var m={};for(var a=0,f=__REDACTOR_SOURCE_BBCODES.length;a$1');q=q.replace(/\[url\='([^'"]+)'](.+?)\[\/url]/gi,'$2');q=q.replace(/\[url\=([^'"\]]+)](.+?)\[\/url]/gi,'$2');q=q.replace(/\[email\]([^"]+?)\[\/email]/gi,'$1');q=q.replace(/\[email\=([^"\]]+)](.+?)\[\/email]/gi,'$2');q=q.replace(/\[b\](.*?)\[\/b]/gi,"$1");q=q.replace(/\[i\](.*?)\[\/i]/gi,"$1");q=q.replace(/\[u\](.*?)\[\/u]/gi,"$1");q=q.replace(/\[s\](.*?)\[\/s]/gi,"$1");q=q.replace(/\[sub\](.*?)\[\/sub]/gi,"$1");q=q.replace(/\[sup\](.*?)\[\/sup]/gi,"$1");q=q.replace(/\[img\]([^"]+?)\[\/img\]/gi,'');q=q.replace(/\[img='?([^"]*?)'?,'?(left|right)'?\]\[\/img\]/gi,'');q=q.replace(/\[img='?([^"]*?)'?\]\[\/img\]/gi,'');q=q.replace(/\[size=(\d+)\](.*?)\[\/size\]/gi,'$2');q=q.replace(/\[color=([#a-z0-9]*?)\](.*?)\[\/color\]/gi,'$2');q=q.replace(/\[font='?([a-z,\- ]*?)'?\](.*?)\[\/font\]/gi,'$2');q=q.replace(/\[align=(left|right|center|justify)\](.*?)\[\/align\]/gi,'
                  $2
                  ');q=q.replace(/\[\*\](.*?)(?=\[\*\]|\[\/list\])/gi,"
                • $1
                • ");q=q.replace(/\[list\]/gi,"
                    ");q=q.replace(/\[list=1\]/gi,'
                      ');q=q.replace(/\[list=a\]/gi,'
                        ');q=q.replace(/\[list=(none|circle|square|disc|decimal|lower-roman|upper-roman|decimal-leading-zero|lower-greek|lower-latin|upper-latin|armenian|georgian)\]/gi,'
                          ');q=q.replace(/\[\/list]/gi,"
                        ");q=q.replace(/\[table\]([\S\s]*?)\[\/table\]/gi,function(s,t){return"[table]"+$.trim(t)+"[/table]"});q=q.replace(/\[table\]/gi,'');q=q.replace(/\[\/table\]/gi,"
                        ");q=q.replace(/\[tr\]/gi,"");q=q.replace(/\[\/tr\]/gi,"");q=q.replace(/\[td\]/gi,"");q=q.replace(/\[\/td\]/gi,"");q=q.replace(/([\S\s]*?)<\/td>/gi,function(s,u){var t=$.trim(u);if(!t.length){t="​"}return""+t+""});var b=this.getOption("wAttachmentUrl");if(b){var c=this._getImageAttachmentIDs();q=q.replace(/\[attach=(\d+)\]\[\/attach\]/g,function(s,t){t=parseInt(t);if(WCF.inArray(t,c)){return''}return s})}for(var n in __REDACTOR_SMILIES){$smileyCode=n.replace(//g,">");var e=new RegExp("(\\s|>|^)"+WCF.String.escapeRegExp($smileyCode)+"(?=\\s|<|$)","gi");q=q.replace(e,'$1'+$smileyCode+'')}q=q.replace(/(javascript):/gi,"$1:");q=q.replace(/(\r|\r\n)/g,"\n");var p={};q=q.replace(/\[quote.*?\][\S\s]*?\[\/quote\]/gi,function(s){var t=s.hashCode();p[t]=s.replace(/\$/g,"$$$$");return"@@"+t+"@@"});q=q.replace(/(\[quote.*?\])/gi,"$1\n");q=q.replace(/(\[\/quote\])/gi,"\n$1");var d=q.split("\n");q="";for(var a=0,f=d.length;a"}q+="

                        "+l+"

                        "}}if($.getLength(m)){for(var g in m){var o=new RegExp("@@"+g+"@@","g");q=q.replace(o,m[g])}q=q.replace(/\[tt\](.*?)\[\/tt\]/gi,'$1')}q=q.replace(/\[code\][\S\s]*?\[\/code\]/,"
                        $&
                        ");if($.getLength(p)){var r=function(s){return s.replace(/^['"]/,"").replace(/['"]$/,"")};var j=this;var i=function(s){return s.replace(/\[quote([^\]]+)?\]([\S\s]*)\[\/quote\]?/gi,$.proxy(function(v,u,x){var A="";var w="";if(u){u=u.substr(1);u=u.split(",");switch(u.length){case 1:A=u[0];break;case 2:A=u[0];w=u[1];break}A=WCF.String.escapeHTML(r($.trim(A)));w=WCF.String.escapeHTML(r($.trim(w)))}var B='

                        '+j._buildQuoteHeader(A,w)+'

                        ';var z=x.split("\n");var t="";for(var y=0;y"+z[y]+"
                        "}if(!t){t="
                        "+this.opts.invisibleSpace+"
                        "}B+=t;B+="
                        ";return B},this))};for(var g in p){var o=new RegExp("@@"+g+"@@","g");q=q.replace(o,i(p[g]))}}WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","afterConvertToHtml",{data:q});this.$source.val(q)},_wPasteBeforeCallback:function(a){var b={1:24,2:22,3:18,4:14,5:12,6:10};a=a.replace(/]+>/g,function(c,d){return"[size="+b[d]+"]"});a=a.replace(/<\/h[1-6]>/g,"[/size]");a=a.replace(/<(article|header)[^>]+>/g,"
                        ");a=a.replace(/<\/(article|header)>/g,"
                        ");a=a.replace(/<(div|p)([^>]+)?><(div|p)([^>]+)?>/g,"

                        ");a=a.replace(/<\/(div|p)><\/(div|p)>/g,"

                        @@@wcf_break@@@");WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","beforePaste",{html:a});return a},_wPasteAfterCallback:function(a){a=a.replace(/

                        ([\s\S]*?)<\/p>/g,"

                        $1

                        ");a=a.replace(/]*>/g,"");a=a.replace(/<\/header>/g,"");a=a.replace(/
                        .*?<\/div>/g,"

                        $1

                        ");a=a.replace(/<\/?div>/g,"");a=a.replace(/@@@wcf_break@@@/g,"


                        ");a=a.replace(/

                        /g,"

                        ");a=a.replace(/\[size=(\d+)\]/g,'


                        ');a=a.replace(/\[\/size\]/g,"


                        ");a=a.replace(/]+)>/g,function(b,c){b=b.replace(/data-mozilla-paste-image="0"/,'data-mozilla-paste-image="0" style="display:none"');return b});WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","afterPaste",{html:a});return a},insertAttachment:function(d){d=parseInt(d);var b=this.getOption("wAttachmentUrl");var c="[attach="+d+"][/attach]";var a=this._getImageAttachmentIDs();if(b&&WCF.inArray(d,a)){this.insertDynamic('',c)}else{this.insertDynamic(c)}},_getImageAttachmentIDs:function(){var a=this.getOption("wAttachmentImageIDs")||[];if(a.length){delete this.opts.wAttachmentImageIDs;return a}var b={imageAttachmentIDs:[]};WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","getImageAttachments_"+this.$source.wcfIdentify(),b);return b.imageAttachmentIDs},_wKeydownCallback:function(d){if(d.event.which!==$.ui.keyCode.DOWN&&d.event.which!==$.ui.keyCode.UP){return}var b=$(this.getCurrent());var e=this.getParent();e=(e)?$(e):e;var g=(e)?e.closest("blockquote.quoteBox",this.$editor.get()[0]):{length:0};switch(d.event.which){case $.ui.keyCode.DOWN:if(e){if(g.length){var f=b.closest("div",g[0]);if(!f.next().length){this.insertingAfterLastElement(g);d.cancel=true}}else{if(e.next("blockquote.quoteBox").length){this.selectionStart(e.next().find("> div > div:first"));d.cancel=true}}}else{if(b.next("blockquote.quoteBox").length){this.selectionStart(b.next().find("> div > div:first"));d.cancel=true}}break;case $.ui.keyCode.UP:if(!e||!g.length){return}var f=b.closest("div",g[0]);if(f.prev("div").length){return}var c=g.prev();if(c.length===0){var a=$(this.opts.emptyHtml);a.insertBefore(g);this.selectionStart(a)}else{if(c[0].tagName==="BLOCKQUOTE"){this.selectionEnd(c.find("> div > div:last"))}else{if($.trim(c.html())==""){c.html(this.opts.invisibleSpace)}this.selectionEnd(c)}}d.cancel=true;break}},_observeQuotes:function(){this.$editor.find(".redactorQuoteEdit:not(.jsRedactorQuoteEdit)").addClass("jsRedactorQuoteEdit").click($.proxy(this._observeQuotesClick,this))},_observeQuotesClick:function(d){var b=$(d.currentTarget).closest("header");var c=$('');$(''+WCF.Language.get("wcf.bbcode.quote.edit")+"").click($.proxy(function(f){f.preventDefault();this._openQuoteEditOverlay($(d.currentTarget).closest("blockquote.quoteBox"),false);$(".redactor-link-tooltip").remove()},this)).appendTo(c);var a=b.offset();c.css({left:a.left+"px",top:(a.top+20)+"px"});$(".redactor-link-tooltip").remove();c.appendTo(document.body)},_openQuoteEditOverlay:function(a,b){if(b){this.modalInit(WCF.Language.get("wcf.bbcode.quote.insert"),this.opts.modal_quote,300,$.proxy(function(){$("#redactorEditQuote").click($.proxy(function(){var d=$("#redactorQuoteAuthor").val();var c=WCF.String.escapeHTML($("#redactorQuoteLink").val());this.insertQuoteBBCode(d,c);this.modalClose()},this))},this))}else{this.modalInit(WCF.Language.get("wcf.bbcode.quote.edit"),this.opts.modal_quote,300,$.proxy(function(){if(!b){$("#redactorQuoteAuthor").val(a.data("author"));$("#redactorQuoteLink").val(a.attr("cite"))}$("#redactorEditQuote").click($.proxy(function(){var c=$("#redactorQuoteAuthor").val();a.data("author",c);a.attr("data-author",c);a.prop("cite",WCF.String.escapeHTML($("#redactorQuoteLink").val()));this._updateQuoteHeader(a);this.modalClose()},this))},this))}},_updateQuoteHeader:function(b){var c=b.data("author");var a=b.attr("cite");if(a){a=WCF.String.escapeHTML(a)}b.find("> div > header > h3").empty().append(this._buildQuoteHeader(c,a))},insertQuoteBBCode:function(d,f,c,b){if(this.inWysiwygMode()){var a='

                        '+this._buildQuoteHeader(d,f)+'

                        ';this.insertHtml(a);var h=$("#redactorInsertedQuote");var g=$("
                        "+(c?c:this.opts.invisibleSpace)+"
                        ").insertAfter(h.find("> div > header"));h.removeAttr("id");this.selectionStart(g[0]);this._observeQuotes()}else{var e="[quote]";if(d){if(f){e="[quote='"+d+"','"+f+"']"}else{e="[quote='"+d+"']"}}if(b){e+=b}e+="[/quote]";this.insertAtCaret(e)}},_buildQuoteHeader:function(b,c){var a="";if(!b&&c){b=c;c=""}if(b){if(c){a+=''}a+=WCF.Language.get("wcf.bbcode.quote.title.javascript",{quoteAuthor:WCF.String.unescapeHTML(b)});if(c){a+=""}}else{a=""+WCF.Language.get("wcf.bbcode.quote.title.clickToSet")+""}return a},_handleInsertQuote:function(){this._openQuoteEditOverlay(null,true)}}; // wbutton.js if(!RedactorPlugins){var RedactorPlugins={}}RedactorPlugins.wbutton={_bbcodes:{},init:function(){this._bbcodes={};for(var g=0,d=__REDACTOR_BUTTONS.length;g").append(d).insertAfter(this.buttonGet(c).parent());if(a!==null){this.buttonAwesome(b,a)}},_addBBCodeButton:function(b){var c="__wcf_"+b.name;var a=this.buttonAdd(c,b.label,this._insertBBCode);this._bbcodes[c]=b.name;if(b.icon.match(/^fa\-[a-z\-]+$/)){this.buttonAwesome(c,b.icon)}else{a.css("background-image","url("+__REDACTOR_ICON_PATH+b.icon+")")}},_insertBBCode:function(a,g,c,f){var e=this._bbcodes[a];var b={buttonName:a,buttonDOM:g,buttonObj:c,event:f,cancel:false};WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","insertBBCode_"+e+"_"+this.$source.wcfIdentify(),b);if(b.cancel===false){var d=this.getSelectionHtml();if(e==="tt"){var h=(this.getParent())?$(this.getParent()):null;if(h&&h.closest("inline.inlineCode",this.$editor.get()[0]).length){this.inlineRemoveClass("inlineCode")}else{this.inlineSetClass("inlineCode")}}else{this.insertHtml("["+e+"]"+d+"[/"+e+"]")}}f.preventDefault();return false}}; // wfontcolor.js @@ -13,4 +13,4 @@ if(!RedactorPlugins){var RedactorPlugins={}}RedactorPlugins.wmonkeypatch={init:f // wupload.js if(!RedactorPlugins){var RedactorPlugins={}}RedactorPlugins.wupload={_boundGlobalUploadEvents:false,_wUploadDropArea:{},_timer:null,_isDragging:false,init:function(){var a=".redactor_"+this.$source.wcfIdentify();$(document).on("dragover"+a,$.proxy(this._dragOver,this));$(document).on("dragleave"+a,$.proxy(this._dragLeave,this));$(document).on("drop"+a,$.proxy(function(b){b.preventDefault();this._revertDropArea(undefined,this.$source.wcfIdentify())},this));if(!this._boundGlobalUploadEvents){this._boundGlobalUploadEvents=true;$(document).on("dragend",function(b){b.preventDefault()})}WCF.System.Event.addListener("com.woltlab.wcf.attachment","autoInsert_"+this.$source.wcfIdentify(),$.proxy(this.insertPastedImageAttachment,this))},_dragOver:function(c){c=c.originalEvent;if(!c.dataTransfer||!c.dataTransfer.types){return}if(c.dataTransfer.types[0]!=="Files"&&c.dataTransfer.types[0]!=="application/x-moz-file"){return}c.preventDefault();if(!this._isDragging){var b=this.$source.wcfIdentify();if(this._wUploadDropArea[b]===undefined){this._wUploadDropArea[b]=$('
                        '+WCF.Language.get("wcf.attachment.dragAndDrop.dropHere")+"
                        ").hide().appendTo(document.body);this._wUploadDropArea[b].on("dragover",$.proxy(this._hoverDropArea,this)).on("dragleave",$.proxy(this._revertDropArea,this)).on("drop",$.proxy(this._drop,this))}var a=(this.inWysiwygMode())?this.$editor.getDimensions("outer"):this.$source.getDimensions("outer");var d=(this.inWysiwygMode())?this.$editor.getOffsets("offset"):this.$source.getOffsets("offset");this._wUploadDropArea[b].css({height:a.height+"px",left:d.left+"px",lineHeight:a.height+"px",top:d.top+"px",width:a.width+"px"}).show();this._isDragging=true}c.preventDefault()},_hoverDropArea:function(a){this._wUploadDropArea[this.$source.wcfIdentify()].addClass("active").text(WCF.Language.get("wcf.attachment.dragAndDrop.dropNow"))},_revertDropArea:function(c,a){var b=a||this.$source.wcfIdentify();this._wUploadDropArea[b].removeClass("active").text(WCF.Language.get("wcf.attachment.dragAndDrop.dropHere"));if(a){this._wUploadDropArea[b].hide()}},_dragLeave:function(){if(this._timer===null){var a=this;this._timer=new WCF.PeriodicalExecuter(function(b){b.stop();if(!a._isDragging){a._wUploadDropArea[a.$source.wcfIdentify()].hide()}},100)}else{this._timer.resume()}this._isDragging=false},_drop:function(b){b=b.originalEvent||b;if(b.dataTransfer&&b.dataTransfer.files.length==1){b.preventDefault();var a=this.$source.wcfIdentify();this._revertDropArea(undefined,a);WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","upload_"+a,{file:b.dataTransfer.files[0]})}},pasteClipboardUploadMozilla:function(){this.$editor.find("img[data-mozilla-paste-image]").each($.proxy(function(d,g){var f=$(g);var a=f.prop("src").split(",");var e=a[0].split(";")[0].split(":")[1];var c=a[1];var b={blob:WCF.base64toBlob(c,e),uploadID:null};WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","upload_"+this.$source.wcfIdentify(),b);f.replaceWith('')},this))},insertPastedImageAttachment:function(b){var a=this.$editor.find("span.redactor-pastedImageFromClipboard-"+b.uploadID);a.before(b.attachment);a.remove()}}; // wutil.js -if(!RedactorPlugins){var RedactorPlugins={}}RedactorPlugins.wutil={_autosaveWorker:null,init:function(){this.$source.parents("form").submit($.proxy(this.submit,this));if(this.getOption("wautosave").active){this.autosaveEnable();if(this.getOption("wautosave").saveOnInit||this.$source.data("saveOnInit")){this.setOption("wAutosaveOnce",true)}else{this.autosaveRestore()}}this.setOption("autosave",false);var b=this.destroy;var a=this;this.destroy=function(){a.autosaveDisable();b.call(a)}},insertAtCaret:function(b){if(this.opts.visual){console.debug("insertAtCaret() failed: Editor is in WYSIWYG-mode.");return false}this.$source.focus();var c=this.$source.getCaret();if(c==-1){console.debug("insertAtCaret() failed: Source is not input[type=text], input[type=password] or textarea.")}var a=this.$source.val();a=a.substr(0,c)+b+a.substr(c);this.$source.val(a);return true},insertDynamic:function(a,b){if(this.inWysiwygMode()){this.insertHtml(a)}else{if(b===undefined||b===null){b=a}this.insertAtCaret(b)}},setOption:function(a,b){this.opts[a]=b},getOption:function(a){if(this.opts[a]){return this.opts[a]}return null},inPlainMode:function(){return !this.opts.visual},inWysiwygMode:function(){return(this.opts.visual)},replaceRangesWith:function(a){getSelection().removeAllRanges();getSelection().addRange(a)},getText:function(){if(this.inWysiwygMode()){this.wSync()}return this.$source.val()},submit:function(){if(this.inWysiwygMode()){this.wSync()}this.autosavePurge()},reset:function(){if(this.inWysiwygMode()){this.$editor.empty();this.sync()}else{this.$source.val("")}WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","reset",{wysiwygContainerID:this.$source.wcfIdentify()})},autosaveEnable:function(a){if(!this.getOption("wautosave").active){this.setOption("wautosave",{active:true,key:a})}if(this._autosaveWorker===null){this._autosaveWorker=new WCF.PeriodicalExecuter($.proxy(this._saveTextToStorage,this),60*1000)}return true},_saveTextToStorage:function(){localStorage.setItem(this.getOption("wautosave").key,this.getText())},autosaveDisable:function(){if(!this.getOption("wautosave").active){return false}this._autosaveWorker.stop();this._autosaveWorker=null;this.setOption("wautosave",{active:false,key:""});return true},autosavePurge:function(){localStorage.removeItem(this.getOption("wautosave").key)},autosaveRestore:function(){var a=this.getOption("wautosave");var b=localStorage.getItem(a.key);if(b!==null){if(this.inWysiwygMode()){this.toggle(false);this.$source.val(b);this.toggle(false);this.focusEnd()}else{this.$source.val(b)}return true}return false},buttonReplace:function(d,b,e,g,f){var a=this.buttonGet(d);var c=this.buttonAddAfter(d,b,e,g,f);if(a.parent().hasClass("separator")){c.parent().addClass("separator")}a.parent().remove();return c},removeZeroWidthSpace:function(a){var b="";for(var e=0,d=a.length;e"+this.opts.invisibleSpace+"

                        ");this.sync()}else{this.$source.val("")}WCF.System.Event.fireEvent("com.woltlab.wcf.redactor","reset",{wysiwygContainerID:this.$source.wcfIdentify()})},autosaveEnable:function(a){if(!this.getOption("wautosave").active){this.setOption("wautosave",{active:true,key:a})}if(this._autosaveWorker===null){this._autosaveWorker=new WCF.PeriodicalExecuter($.proxy(this._saveTextToStorage,this),60*1000)}return true},_saveTextToStorage:function(){localStorage.setItem(this.getOption("wautosave").key,this.getText())},autosaveDisable:function(){if(!this.getOption("wautosave").active){return false}this._autosaveWorker.stop();this._autosaveWorker=null;this.setOption("wautosave",{active:false,key:""});return true},autosavePurge:function(){localStorage.removeItem(this.getOption("wautosave").key)},autosaveRestore:function(){var a=this.getOption("wautosave");var b=localStorage.getItem(a.key);if(b!==null){if(this.inWysiwygMode()){this.toggle(false);this.$source.val(b);this.toggle(false);this.focusEnd()}else{this.$source.val(b)}return true}return false},buttonReplace:function(d,b,e,g,f){var a=this.buttonGet(d);var c=this.buttonAddAfter(d,b,e,g,f);if(a.parent().hasClass("separator")){c.parent().addClass("separator")}a.parent().remove();return c},removeZeroWidthSpace:function(a){var b="";for(var e=0,d=a.length;e .mobileSidebarToggleButton").click($.proxy(this.refresh,this))},_getDefaultMapOptions:function(){var a={};a.center=new google.maps.LatLng(WCF.Location.GoogleMaps.Settings.get("defaultLatitude"),WCF.Location.GoogleMaps.Settings.get("defaultLongitude"));a.disableDoubleClickZoom=WCF.Location.GoogleMaps.Settings.get("disableDoubleClickZoom");a.draggable=WCF.Location.GoogleMaps.Settings.get("draggable");switch(WCF.Location.GoogleMaps.Settings.get("mapType")){case"map":a.mapTypeId=google.maps.MapTypeId.ROADMAP;break;case"satellite":a.mapTypeId=google.maps.MapTypeId.SATELLITE;break;case"physical":a.mapTypeId=google.maps.MapTypeId.TERRAIN;break;case"hybrid":default:a.mapTypeId=google.maps.MapTypeId.HYBRID;break}a.mapTypeControl=WCF.Location.GoogleMaps.Settings.get("mapTypeControl")!="off";if(a.mapTypeControl){switch(WCF.Location.GoogleMaps.Settings.get("mapTypeControl")){case"dropdown":a.mapTypeControlOptions={style:google.maps.MapTypeControlStyle.DROPDOWN_MENU};break;case"horizontalBar":a.mapTypeControlOptions={style:google.maps.MapTypeControlStyle.HORIZONTAL_BAR};break;default:a.mapTypeControlOptions={style:google.maps.MapTypeControlStyle.DEFAULT};break}}a.scaleControl=WCF.Location.GoogleMaps.Settings.get("scaleControl");a.scrollwheel=WCF.Location.GoogleMaps.Settings.get("scrollwheel");a.zoom=WCF.Location.GoogleMaps.Settings.get("zoom");return a},addDraggableMarker:function(c,b){var a=new google.maps.Marker({clickable:false,draggable:true,map:this._map,position:new google.maps.LatLng(c,b),zIndex:1});this._markers.push(a);return a},addMarker:function(g,e,f,d,c){var b=new google.maps.Marker({map:this._map,position:new google.maps.LatLng(g,e),title:f});if(d){b.setIcon(d)}if(c){var a=new google.maps.InfoWindow({content:c});this._addInfoWindowEventListener(b,a);b.infoWindow=a}this._markers.push(b);return b},getMarkers:function(){return this._markers},getMap:function(){return this._map},refresh:function(){var a=this._map.getCenter();google.maps.event.trigger(this._map,"resize");this._map.setCenter(a)},refreshBounds:function(){var f=null;var c=null;var d=null;var g=null;for(var a in this._markers){var e=this._markers[a];var h=e.getPosition().lat();var b=e.getPosition().lng();if(f===null){f=c=h;d=g=b}else{if(f>h){f=h}else{if(ch){d=h}else{if(g=a.lat()&&this._previousNorthEast.lng()>=a.lng()&&this._previousSouthWest.lat()<=b.lat()&&this._previousSouthWest.lng()<=b.lng()){return}this._previousNorthEast=a;this._previousSouthWest=b;this._proxy.setOption("data",{actionName:"getMapMarkers",className:this._actionClassName,parameters:{excludedObjectIDs:this._objectIDs,eastLongitude:a.lng(),northLatitude:a.lat(),southLatitude:b.lat(),westLongitude:b.lng()}});this._proxy.sendRequest()},_success:function(d,e,c){if(d.returnValues&&d.returnValues.markers){for(var a in d.returnValues.markers){var b=d.returnValues.markers[a];this.addMarker(b.latitude,b.longitude,b.title,null,b.infoWindow);if(b.objectID){this._objectIDs.push(b.objectID)}else{if(b.objectIDs){this._objectIDs=this._objectIDs.concat(b.objectIDs)}}}}},addMarker:function(f,d,e,c,b){var a=this._super(f,d,e,c,b);this._markerClusterer.addMarker(a);this._markerSpiderfier.addMarker(a);return a}});WCF.Location.GoogleMaps.LocationSearch=WCF.Search.Base.extend({_geocoder:null,init:function(b,e,a,c,d){this._super(b,e,a,c,d);this._geocoder=new google.maps.Geocoder()},_createListItem:function(b){var a=$("
                      • "+WCF.String.escapeHTML(b.formatted_address)+"
                      • ").appendTo(this._list);a.data("location",b.geometry.location).data("label",b.formatted_address).click($.proxy(this._executeCallback,this));this._itemCount++;return a},_keyUp:function(b){switch(b.which){case $.ui.keyCode.LEFT:case $.ui.keyCode.RIGHT:return;break;case $.ui.keyCode.UP:this._selectPreviousItem();return;break;case $.ui.keyCode.DOWN:this._selectNextItem();return;break;case $.ui.keyCode.ENTER:return this._selectElement(b);break}var a=this._getSearchString(b);if(a===""){this._clearList(true)}else{if(a.length>=this._triggerLength){this._clearList(false);this._geocoder.geocode({address:a},$.proxy(this._success,this))}else{this._clearList(false)}}},_success:function(d,b){if(b!=google.maps.GeocoderStatus.OK){return}if($.getLength(d)){var c=0;for(var a in d){this._createListItem(d[a]);if(++c==10){break}}}else{if(!this._handleEmptyResult()){return}}WCF.CloseOverlayHandler.addCallback("WCF.Search.Base",$.proxy(function(){this._clearList()},this));var e=this._searchInput.parents(".dropdown").wcfIdentify();if(!WCF.Dropdown.getDropdownMenu(e).hasClass("dropdownOpen")){WCF.Dropdown.toggleDropdown(e)}this._itemIndex=-1;if(!WCF.Dropdown.getDropdown(e).data("disableAutoFocus")){this._selectNextItem()}}});WCF.Location.GoogleMaps.LocationInput=Class.extend({_locationSearch:null,_map:null,_marker:null,init:function(d,b,a,e,c){this._searchInput=a;this._map=new WCF.Location.GoogleMaps.Map(d,b);this._locationSearch=new WCF.Location.GoogleMaps.LocationSearch(a,$.proxy(this._setMarkerByLocation,this));if(e&&c){this._marker=this._map.addDraggableMarker(e,c)}else{this._marker=this._map.addDraggableMarker(WCF.Location.GoogleMaps.Settings.get("defaultLatitude"),WCF.Location.GoogleMaps.Settings.get("defaultLongitude"));WCF.Location.Util.getLocation($.proxy(function(g,f){if(g!==undefined&&f!==undefined){WCF.Location.GoogleMaps.Util.moveMarker(this._marker,g,f);WCF.Location.GoogleMaps.Util.focusMarker(this._marker)}},this))}this._marker.addListener("dragend",$.proxy(this._updateLocation,this))},getMap:function(){return this._map},getMarker:function(){return this._marker},_updateLocation:function(){WCF.Location.GoogleMaps.Util.reverseGeocoding($.proxy(function(a){if(a!==null){$(this._searchInput).val(a)}},this),this._marker)},_setMarkerByLocation:function(a){this._marker.setPosition(a.location);WCF.Location.GoogleMaps.Util.focusMarker(this._marker);$(this._searchInput).val(a.label)}});WCF.Location.GoogleMaps.Util={_geocoder:null,focusMarker:function(a){a.getMap().setCenter(a.getPosition())},getMarkerPosition:function(a){return{latitude:a.getPosition().lat(),longitude:a.getPosition().lng()}},moveMarker:function(a,d,b,c){a.setPosition(new google.maps.LatLng(d,b));if(c){google.maps.event.trigger(a,"dragend")}},reverseGeocoding:function(f,a,e,c,b){if(a){e=a.getPosition().lat();c=a.getPosition().lng()}if(this._geocoder===null){this._geocoder=new google.maps.Geocoder()}var d=new google.maps.LatLng(e,c);this._geocoder.geocode({latLng:d},function(h,g){if(g==google.maps.GeocoderStatus.OK){f((b?h:h[0].formatted_address))}else{f(null)}})}}; // WCF.Message.js -WCF.Message={};WCF.Message.BBCode={};WCF.Message.BBCode.CodeViewer=Class.extend({_dialog:null,init:function(){this._dialog=null;this._initCodeBoxes();WCF.DOMNodeInsertedHandler.addCallback("WCF.Message.BBCode.CodeViewer",$.proxy(this._initCodeBoxes,this));WCF.DOMNodeInsertedHandler.execute()},_initCodeBoxes:function(){$(".codeBox:not(.jsCodeViewer)").each($.proxy(function(a,c){var b=$(c).addClass("jsCodeViewer");$('').appendTo(b.find("div > h3")).click($.proxy(this._click,this))},this))},_click:function(b){var a="";$(b.currentTarget).parents("div").next("ol").children("li").each(function(c,d){if(a){a+="\n"}a+=$(d).text().replace(/\n+$/,"")});if(this._dialog===null){this._dialog=$('