CVE-2023-4653: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') (CWE-79)
value: Cross-site Scripting (XSS) - Stored in GitHub repository instantsoft/icms2 prior to 2.16.1-git.
CWE description: The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
CVSS v3 base score: 4.8
Published: 2023-08-31T01:15Z
Repository: https://github.com/instantsoft/icms2
Language: JavaScript
Files changed: wysiwyg/redactor/files/redactor.js, wysiwyg/redactor/files/redactor.min.js, wysiwyg/redactor/wysiwyg.class.php
Commit date: 2023-08-09 22:41:47 +0300
Commit message: Fix External Imperavi Redactor xss
Diff: diff --git a/wysiwyg/redactor/files/redactor.js b/wysiwyg/redactor/files/redactor.js
index f7fe34a1a..9abb010ef 100644
--- a/wysiwyg/redactor/files/redactor.js
+++ b/wysiwyg/redactor/files/redactor.js
@@ -778,18 +778,54 @@
 			}
 
 			html = html.replace(/&amp;#36;/g, '$');
 
 			html = this.cleanEmpty(html);
+			html = this.sanitizeHTML(html);
 
 			this.$editor.html(html);
 
 			this.setNonEditable();
 			this.setSpansVerified();
 
 			this.sync();
 		},
+        sanitizeHTML:  function(htmlStr)
+		{
+            function stringToHTML () {
+                let parser = new DOMParser();
+                let doc = parser.parseFromString(htmlStr, 'text/html');
+                return doc.body;
+            }
+            function clean (html) {
+                let nodes = html.children;
+                for (let node of nodes) {
+                    removeAttributes(node);
+                    clean(node);
+                }
+            }
+            function removeAttributes (elem) {
+                let atts = elem.attributes;
+                for (let {name, value} of atts) {
+                    if (!isPossiblyDangerous(name, value)) { continue };
+                    elem.removeAttribute(name);
+                }
+
+            }
+            function isPossiblyDangerous (name, value) {
+                let val = value.replace(/\s+/g, '').toLowerCase();
+                if (['src', 'href', 'xlink:href'].includes(name)) {
+                    if (val.includes('javascript:') || val.includes('data:text/html')) { return true; }
+                }
+                if (name.startsWith('on')) { return true; }
+            }
+            let html = stringToHTML();
+
+            clean(html);
+
+            return html.innerHTML;
+        },
 		setCodeIframe: function(html)
 		{
 			var doc = this.iframePage();
 			this.$frame[0].src = "about:blank";
 
@@ -820,10 +856,11 @@
 			}
 
 			html = this.cleanSavePreCode(html, true);
 			html = this.cleanConverters(html);
 			html = this.cleanEmpty(html);
+            html = this.sanitizeHTML(html);
 
 			this.$editor.html(html);
 
 			this.setNonEditable();
 			this.setSpansVerified();
diff --git a/wysiwyg/redactor/files/redactor.min.js b/wysiwyg/redactor/files/redactor.min.js
index b22cb851f..99cdef79d 100644
--- a/wysiwyg/redactor/files/redactor.min.js
+++ b/wysiwyg/redactor/files/redactor.min.js
@@ -1,12 +1 @@
-/*
-	Redactor v9.2.6
-	Updated: Jul 19, 2014
-
-	http://imperavi.com/redactor/
-
-	Copyright (c) 2009-2014, Imperavi LLC.
-	License: http://imperavi.com/redactor/license/
-
-	Usage: $('#content').redactor();
-*/
-eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(B($){q 7F=0;"lV lX";q bI=B(O){c[0]=O.lW;c[1]=O.kj;c.O=O;F c};bI.5o.iz=B(){F c[0]===c[1]};q 8N=/5n?:\\/\\/(?:[0-9A-Z-]+\\.)?(?:lT\\.be\\/|cO\\.7w\\S*[^\\w\\-\\s])([\\w\\-]{11})(?=[^\\w\\-]|$)(?![?=&+%\\w.-]*(?:[\'"][^<>]*>|<\\/a>))[?=&+%\\w.-]*/ig;q 8Q=/5n?:\\/\\/(aA\\.)?cI.7w\\/(\\d+)($|\\/)/;$.fn.U=B(3R){q 1p=[];q hg=i3.5o.jR.5q(hw,1);if(1E 3R==="8I"){c.1u(B(){q 7l=$.1a(c,"U");if(1E 7l!=="1J"&&$.7z(7l[3R])){q aO=7l[3R].bO(7l,hg);if(aO!==1J&&aO!==7l){1p.3d(aO)}}I{F $.3U(\'lP lS 5l "\'+3R+\'" 3z 3J\')}})}I{c.1u(B(){if(!$.1a(c,"U")){$.1a(c,"U",3J(c,3R))}})}if(1p.1m===0){F c}I{if(1p.1m===1){F 1p[0]}I{F 1p}}};B 3J(el,3R){F 2c 3J.5o.77(el,3R)}$.3J=3J;$.3J.mf="9.2.6";$.3J.C={41:E,1Q:E,4n:E,1f:E,1y:"en",63:"mh",4U:E,7X:E,fO:E,g1:N,gw:N,gQ:N,j7:E,a1:N,iO:N,bV:N,dS:E,kt:E,5N:N,2h:E,7c:E,4Y:N,8R:E,dO:E,6j:{"3x+m, 4w+m":"c.26(\'mb\', E)","3x+b, 4w+b":"c.26(\'3m\', E)","3x+i, 4w+i":"c.26(\'3q\', E)","3x+h, 4w+h":"c.26(\'fm\', E)","3x+l, 4w+l":"c.26(\'fy\', E)","3x+k, 4w+k":"c.9N()","3x+7V+7":"c.26(\'8q\', E)","3x+7V+8":"c.26(\'8k\', E)"},jL:E,7C:E,ah:60,cn:E,8a:"aI://",ky:E,7A:50,ec:E,8i:"8Y",6L:E,fR:N,kC:N,3Y:E,an:"25",gF:N,84:E,e5:"25",9p:N,bT:E,dM:["T/gY","T/hc","T/ha"],5Q:E,3H:E,4T:N,5m:N,fb:N,aW:E,i2:N,30:E,gJ:["6x","3m","3q","5H","6f","6a","7m","6m"],1A:N,6B:E,7T:X,bb:0,as:E,7O:E,h9:E,gK:N,4a:["o","6x","3m","3q","5H","6f","6a","7m","6m","T","3y","25","1n","1r","9R","|","7Q"],cU:[],aY:["5H","3q","3m","4K","6f","6a","cf","bn","bs","dB","1n"],cv:{b:"3m",3V:"3m",i:"3q",em:"3q",56:"5H",5F:"5H",2r:"6f",ol:"6a",u:"4K",3j:"1n",1g:"1n",1n:"1n"},gM:["p","2f","2q","h1","h2","h3","h4","h5","h6"],1N:E,5Y:N,9a:N,7d:N,6l:E,75:E,fz:E,8x:E,5G:E,8y:["o","9U","1r","2v","4w","3n","1o","lq"],6r:"3V",6p:"em",9q:20,3E:[],8A:[],64:E,58:"<p>&#9F;</p>",2i:"&#9F;",cu:/^(P|H[1-6]|3h|9e|9f|9Z|9Y|a4|a0)$/i,5t:["P","it","iC","iF","iw","i9","hM","i6","i7","gf","8K","6h","3F","fJ","cA","9e","9f","9Z","9Y","a4","a0"],bL:["fU","2v","9U","hr","i?2Z","1r","4w","le","1o","3n","1n","8c","3T","di"],bJ:["li","dt","dt","h[1-6]","4b","3n"],jM:["2f","12","dl","fV","2t","nx","gc","ol","p","2q","3s","1g","dN","3j","2r"],bg:["P","it","iC","iF","iw","i9","hM","i6","i7","gf","8K","3h","3F","fJ","cA","6i","9e","9f","9Z","9Y","a4","a0","6h"],jG:{en:{o:"kZ",3y:"6b jn",T:"6b kG",1n:"fc",1r:"l2",cz:"6b 1r",fg:"jV 1r",6F:"mO",6x:"mL",jK:"mW Y",ki:"mV",2k:"kr",kp:"7W 1",kn:"7W 2",k3:"7W 3",k1:"7W 4",kb:"7W 5",3m:"mG",3q:"mt",mC:"mE gg",my:"no gg",6f:"nb g7",6a:"lr g7",7m:"ll",6m:"lN",6H:"mg",4y:"6b",7N:"mj",iv:"7L",cd:"6b fc",c5:"7Y f0 m6",c4:"7Y f0 lm",bX:"7Y eW kJ",bW:"7Y eW kz",c2:"7L eW",c0:"7L f0",dW:"7L fc",aF:"nD",aJ:"n8",bU:"7Y kY",bY:"7L kY",1e:"n0",hP:"n7",3r:"ni",1s:"kJ",4Z:"kz",6O:"j4",ip:"kG mr l2",Y:"mU",eH:"mN",mJ:"gN",hF:"jn mn kr",25:"6b mw",8H:"jE",mB:"mz",eo:"mZ",jB:"np eo",jA:"nr 25 nj",bp:"j1 Y iW iZ 1s",bv:"j4 Y",bo:"j1 Y iW iZ 4Z",bu:"ny Y",7Q:"6b n6 n4",5H:"n9",na:"nc",eB:"lz 1r in 2c 52",4K:"lv",9R:"lE",ed:"m9 (m8)",8p:"jV"}}};3J.fn=$.3J.5o={2O:{a2:8,eC:46,dH:40,b9:13,dY:27,iG:9,lR:17,lU:91,mi:37,fw:91},77:B(el,3R){c.8j=E;c.$2j=c.$1v=$(el);c.7F=7F++;q C=$.4W(N,{},$.3J.C);c.C=$.4W({},C,c.$2j.1a(),3R);c.2y=N;c.lY=[];c.a9=c.$1v.1f("22");c.lL=c.$1v.1f("2p");if(c.C.4n){c.C.1Q=N}if(c.C.1N){c.C.5Y=E}if(c.C.5Y){c.C.1N=E}if(c.C.as){c.C.6B=N}c.X=X;c.42=42;c.5S=E;c.kT=2c 2J("^<(/?"+c.C.bL.5V("|/?")+"|"+c.C.bJ.5V("|")+")[ >]");c.kN=2c 2J("^<(br|/?"+c.C.bL.5V("|/?")+"|/"+c.C.bJ.5V("|/")+")[ >]");c.d7=2c 2J("^</?("+c.C.jM.5V("|")+")[ >]");c.ax=2c 2J("^("+c.C.bg.5V("|")+")$","i");if(c.C.1N===E){if(c.C.5G!==E){q bQ=["3V","em","56"];q jC=["b","i","5F"];if($.4O("p",c.C.5G)==="-1"){c.C.5G.3d("p")}3z(i in bQ){if($.4O(bQ[i],c.C.5G)!="-1"){c.C.5G.3d(jC[i])}}}if(c.C.8y!==E){q 3X=$.4O("p",c.C.8y);if(3X!=="-1"){c.C.8y.ap(3X,3X)}}}if(c.1C("3t")||c.1C("94")){c.C.4a=c.iB(c.C.4a,"7Q")}c.C.1F=c.C.jG[c.C.1y];$.4W(c.C.6j,c.C.jL);c.hj();c.g0()},fN:B(1y){F{o:{1e:1y.o,1H:"d0"},6x:{1e:1y.6x,1H:"2M",1R:{p:{1e:1y.jK,1H:"5I"},2f:{1e:1y.ki,1H:"d9",2S:"m3"},2q:{1e:1y.2k,1H:"5I",2S:"nd"},h1:{1e:1y.kp,1H:"5I",2S:"nf"},h2:{1e:1y.kn,1H:"5I",2S:"n2"},h3:{1e:1y.k3,1H:"5I",2S:"mm"},h4:{1e:1y.k1,1H:"5I",2S:"n3"},h5:{1e:1y.kb,1H:"5I",2S:"nz"}}},3m:{1e:1y.3m,2o:"3m"},3q:{1e:1y.3q,2o:"3q"},5H:{1e:1y.5H,2o:"fC"},4K:{1e:1y.4K,2o:"4K"},6f:{1e:"&nB; "+1y.6f,2o:"8k"},6a:{1e:"1. "+1y.6a,2o:"8q"},7m:{1e:"< "+1y.7m,1H:"cy"},6m:{1e:"> "+1y.6m,1H:"cx"},T:{1e:1y.T,1H:"l4"},3y:{1e:1y.3y,1H:"iI"},25:{1e:1y.25,1H:"jg"},1n:{1e:1y.1n,1H:"2M",1R:{cd:{1e:1y.cd,1H:"ko"},nm:{2m:"aN"},c5:{1e:1y.c5,1H:"j3"},c4:{1e:1y.c4,1H:"iV"},bX:{1e:1y.bX,1H:"iM"},bW:{1e:1y.bW,1H:"iL"},nn:{2m:"aN"},bU:{1e:1y.bU,1H:"j2"},bY:{1e:1y.bY,1H:"ey"},nq:{2m:"aN"},c2:{1e:1y.c2,1H:"iY"},c0:{1e:1y.c0,1H:"k8"},dW:{1e:1y.dW,1H:"ka"}}},1r:{1e:1y.1r,1H:"2M",1R:{1r:{1e:1y.cz,1H:"9N"},6F:{1e:1y.6F,2o:"6F"}}},9R:{1e:1y.9R,1H:"2M",1R:{cf:{1e:1y.bp,1H:"dI"},bn:{1e:1y.bv,1H:"dy"},bs:{1e:1y.bo,1H:"dD"},dB:{1e:1y.bu,1H:"dA"}}},cf:{1e:1y.bp,1H:"dI"},bn:{1e:1y.bv,1H:"dy"},bs:{1e:1y.bo,1H:"dD"},mv:{1e:1y.bu,1H:"dA"},7Q:{2o:"fx",1e:1y.7Q}}},1c:B(1G,67,1a){q 1c=c.C[1G+"ms"];if($.7z(1c)){if(67===E){F 1c.5q(c,1a)}I{F 1c.5q(c,67,1a)}}I{F 1a}},mF:B(){hd(c.ah);$(42).3b(".U");c.$1v.3b("U-5s");c.$2j.3b(".U").mT("U");q o=c.2R();if(c.C.64){c.$2C.2I(c.$1v);c.$2C.1w();c.$1v.1p(o).2M()}I{q $1z=c.$K;if(c.C.1Q){$1z=c.$2j}c.$2C.2I($1z);c.$2C.1w();$1z.3c("4d").3c("fM").2B("3K").o(o).2M()}if(c.C.7O){$(c.C.7O).o("")}if(c.C.30){$("#hb"+c.7F).1w()}},mS:B(){F $.4W({},c)},mX:B(){F c.$K},mQ:B(){F c.$2C},mI:B(){F(c.C.1Q)?c.$2Z:E},mK:B(){F(c.$1A)?c.$1A:E},2R:B(){F c.$1v.1p()},ku:B(){c.$K.2B("3K").2B("69");q o=c.3Z(c.$2Z.1Y().4c());c.$K.1i({3K:N,69:c.C.63});F o},6V:B(o,9g,du){o=o.43();o=o.G(/\\$/g,"&#36;");if(c.C.4n){c.kE(o)}I{c.l3(o,9g)}if(o==""){du=E}if(du!==E){c.hs()}},l3:B(o,9g){if(9g!==E){o=c.de(o);o=c.8d(o);o=c.dR(o);o=c.9S(o,N);if(c.C.1N===E){o=c.dK(o)}I{o=o.G(/<p(.*?)>([\\w\\W]*?)<\\/p>/gi,"$2<br>")}}o=o.G(/&9h;#36;/g,"$");o=c.dJ(o);c.$K.o(o);c.8u();c.92();c.1j()},kE:B(o){q 3C=c.cV();c.$2Z[0].3p="mD:mY";o=c.dR(o);o=c.9S(o);o=c.6Z(o);3C.b7();3C.gW(o);3C.h8();if(c.C.4n){c.$K=c.$2Z.1Y().1b("2v").1i({3K:N,69:c.C.63})}c.8u();c.92();c.1j()},d1:B(o){c.7y=o.1U(/^<\\!kH[^>]*>/i);if(c.7y&&c.7y.1m==1){o=o.G(/^<\\!kH[^>]*>/i,"")}o=c.de(o,N);o=c.dK(o);o=c.dJ(o);c.$K.o(o);c.8u();c.92();c.1j()},kw:B(){if(c.7y&&c.7y.1m==1){q 1v=c.7y[0]+"\\n"+c.$1v.1p();c.$1v.1p(1v)}},92:B(){q b4=c.$K.1b("V");q 76="3W";$.1u(b4,B(){q aD=c.jb;q 5y=2c 2J("<"+c.Q,"gi");q 5K=aD.G(5y,"<"+76);5y=2c 2J("</"+c.Q,"gi");5K=5K.G(5y,"</"+76);$(c).2e(5K)})},ad:B(o){o=o.G(/<V(.*?)>/,"<3W$1>");F o.G(/<\\/V>/,"</3W>")},8u:B(){c.$K.1b(".nk").1i("3K",E)},1j:B(e){q o="";c.g5();if(c.C.4n){o=c.ku()}I{o=c.$K.o()}o=c.eE(o);o=c.dq(o);q 1v=c.6Z(c.$1v.1p(),E);q K=c.6Z(o,E);if(1v==K){F E}o=o.G(/<\\/li><(2r|ol)>([\\w\\W]*?)<\\/(2r|ol)>/gi,"<$1>$2</$1></li>");if($.2b(o)==="<br>"){o=""}if(c.C.kt){q ks=["br","hr","1B","1r","2T","4w"];$.1u(ks,B(i,s){o=o.G(2c 2J("<"+s+"(.*?[^/$]?)>","gi"),"<"+s+"$1 />")})}o=c.1c("nt",E,o);c.$1v.1p(o);c.kw();c.1c("nu",E,o);if(c.2y===E){if(1E e!="1J"){kA(e.5X){5u 37:5f;5u 38:5f;5u 39:5f;5u 40:5f;nC:c.1c("68",E,o)}}I{c.1c("68",E,o)}}},eE:B(o){if(!c.C.4n){o=c.8d(o)}o=$.2b(o);o=c.hq(o);o=o.G(/&#9F;/gi,"");o=o.G(/&#nA;/gi,"");o=o.G(/<\\/a>&3u;/gi,"</a> ");o=o.G(/\\7D/g,"");if(o=="<p></p>"||o=="<p> </p>"||o=="<p>&3u;</p>"){o=""}if(c.C.ky){o=o.G(/<a(.*?)4m="kx"(.*?)>/gi,"<a$1$2>");o=o.G(/<a(.*?)>/gi,\'<a$1 4m="kx">\')}o=o.G("<!--?4I","<?4I");o=o.G("?-->","?>");o=o.G(/<(.*?)1x="kI"(.*?) 3K="E"(.*?)>/gi,\'<$nv="kI"$2$3>\');o=o.G(/ 1a-81=""/gi,"");o=o.G(/<br\\s?\\/?>\\n?<\\/(P|H[1-6]|3h|9e|9f|9Z|9Y|a4|a0)>/gi,"</$1>");o=o.G(/<V(.*?)id="U-T-2C"(.*?)>([\\w\\W]*?)<1B(.*?)><\\/V>/gi,"$3<1B$4>");o=o.G(/<V(.*?)id="U-T-ej"(.*?)>(.*?)<\\/V>/gi,"");o=o.G(/<V(.*?)id="U-T-es"(.*?)>(.*?)<\\/V>/gi,"");o=o.G(/<(2r|ol)>\\s*\\t*\\n*<\\/(2r|ol)>/gi,"");if(c.C.bV){o=o.G(/<2A(.*?)>([\\w\\W]*?)<\\/2A>/gi,"$2")}o=o.G(/<V(.*?)>([\\w\\W]*?)<\\/V>/gi,"$2");o=o.G(/<3W>([\\w\\W]*?)<\\/3W>/gi,"$1");o=o.G(/<3W>/gi,"<V>");o=o.G(/<3W /gi,"<V ");o=o.G(/<\\/3W>/gi,"</V>");if(c.C.a1){o=o.G(/<V>([\\w\\W]*?)<\\/V>/gi,"$1")}o=o.G(/<V(.*?)1x="55"(.*?)>([\\w\\W]*?)<\\/V>/gi,"");o=o.G(/<1B(.*?)3K="E"(.*?)>/gi,"<1B$1$2>");o=o.G(/&/gi,"&");o=o.G(/\\ls/gi,"&lF;");o=o.G(/\\lf/gi,"&lh;");o=o.G(/\\lk/gi,"&ma;");o=o.G(/\\lO/gi,"&lM;");o=o.G(/\\lZ/gi,"&m0;");o=c.fL(o);F o},g0:B(){c.3L="";c.$2C=$(\'<12 1x="lQ" />\');if(c.$1v[0].Q==="m2"){c.C.64=N}if(c.C.g1===E&&c.5a()){c.gb()}I{c.iH();if(c.C.1Q){c.C.4Y=E;c.5j()}I{if(c.C.64){c.fZ()}I{c.fY()}}if(!c.C.1Q){c.cJ();c.cH()}}},gb:B(){if(!c.C.64){c.$K=c.$1v;c.$K.2U();c.$1v=c.bd(c.$K);c.$1v.1p(c.3L)}c.$2C.at(c.$1v).1h(c.$1v)},iH:B(){if(c.C.64){c.3L=$.2b(c.$1v.1p())}I{c.3L=$.2b(c.$1v.o())}},fZ:B(){c.$K=$("<12 />");c.$2C.at(c.$1v).1h(c.$K).1h(c.$1v);c.fQ(c.$K);c.dw()},fY:B(){c.$K=c.$1v;c.$1v=c.bd(c.$K);c.$2C.at(c.$K).1h(c.$K).1h(c.$1v);c.dw()},bd:B($1v){F $("<5s />").1i("2m",$1v.1i("id")).1f("22",c.a9)},fQ:B(el){$.1u(c.$1v.2R(0).2S.4o(/\\s+/),B(i,s){el.2z("lo"+s)})},dw:B(){c.$K.2z("4d").1i({3K:N,69:c.C.63});c.$1v.1i("69",c.C.63).2U();c.6V(c.3L,N,E)},cJ:B(){q $1v=c.$K;if(c.C.1Q){$1v=c.$2Z}if(c.C.7c){$1v.1i("7c",c.C.7c)}if(c.C.8R){$1v.1f("fP-22",c.C.8R+"px")}I{if(c.1C("31")&&c.C.1N){c.$K.1f("fP-22","lH")}}if(c.1C("31")&&c.C.1N){c.$K.1f("8X-ft","8Y")}if(c.C.dO){c.C.4Y=E;c.a9=c.C.dO}if(c.C.fO){c.$K.2z("fM")}if(c.C.7X){c.$K.2z("U-K-7X")}if(!c.C.4Y){$1v.1f("22",c.a9)}},cH:B(){c.2y=E;if(c.C.1A){c.C.1A=c.fN(c.C.1F);c.gI()}c.i5();c.iu();c.d2();if(c.C.7C){c.7C()}2V($.M(c.7H,c),4);if(c.1C("31")){eG{c.X.26("ne",E,E);c.X.26("ng",E,E)}fe(e){}}if(c.C.2h){2V($.M(c.2h,c),3O)}if(!c.C.5N){2V($.M(B(){c.C.5N=N;c.d0(E)},c),5k)}c.1c("77")},d2:B(){c.7P=0;if(c.C.fR&&(c.C.3Y!==E||c.C.5Q!==E)){c.$K.on("6w.U",$.M(c.fT,c))}c.$K.on("23.U",$.M(B(){c.5R=E},c));c.$K.on("2T.U",$.M(c.1j,c));c.$K.on("9v.U",$.M(c.gd,c));c.$K.on("5T.U",$.M(c.go,c));c.$K.on("5d.U",$.M(c.hS,c));if($.7z(c.C.fS)){c.$1v.on("5T.U-5s",$.M(c.C.fS,c))}if($.7z(c.C.fX)){c.$K.on("2h.U",$.M(c.C.fX,c))}q a3;$(X).9J(B(e){a3=$(e.1O)});c.$K.on("cN.U",$.M(B(e){if(!$(a3).3v("cW")&&$(a3).8B(".cW").1V()==0){c.5R=E;if($.7z(c.C.n1)){c.1c("cN",e)}}},c))},fT:B(e){e=e.gE||e;if(42.bw===1J||!e.aX){F N}q 1m=e.aX.7I.1m;if(1m==0){F N}e.2u();q 25=e.aX.7I[0];if(c.C.dM!==E&&c.C.dM.44(25.1G)==-1){F N}c.21();c.8C();if(c.C.5Q===E){c.bF(c.C.3Y,25,N,e,c.C.an)}I{c.e1(25)}},gd:B(e){q dL=E;if(c.1C("4s")&&6n.7k.44("n5")===-1){q 2Q=c.1C("9n").4o(".");if(2Q[0]<nh){dL=N}}if(dL){F N}if(c.1C("94")){F N}if(c.C.9p&&c.gz(e)){F N}if(c.C.gw){c.8j=N;c.28();if(!c.5R){if(c.C.4Y===N&&c.c7!==N){c.$K.22(c.$K.22());c.9t=c.X.2v.3e}I{c.9t=c.$K.3e()}}q 4k=c.cE();2V($.M(B(){q gv=c.cE();c.$K.1h(4k);c.1W();q o=c.fF(gv);c.j8(o);if(c.C.4Y===N&&c.c7!==N){c.$K.1f("22","4l")}},c),1)}},gz:B(e){q 67=e.gE||e;c.gk=E;if(1E(67.dT)==="1J"){F E}if(67.dT.gh){q 25=67.dT.gh[0].mA();if(25!==2G){c.21();c.gk=N;q dC=2c mo();dC.jd=$.M(c.jz,c);dC.mq(25);F N}}F E},go:B(e){if(c.8j){F E}q 1k=e.5X;q 3x=e.9P||e.80;q L=c.2E();q 1t=c.3P();q 1l=c.2N();q 2q=E;c.1c("5T",e);if(c.1C("31")&&"dz"in 42.29()){if((3x)&&(e.2O===37||e.2O===39)){q 1I=c.29();q dE=(e.80?"9I":"mu");if(e.2O===37){1I.dz("4W","1s",dE);if(!e.53){1I.ih()}}if(e.2O===39){1I.dz("4W","4Z",dE);if(!e.53){1I.mR()}}e.2u()}}c.6t(E);if((L&&$(L).2R(0).Q==="6i")||(1t&&$(1t).2R(0).Q==="6i")){2q=N;if(1k===c.2O.dH){c.6U(1l)}}if(1k===c.2O.dH){if(L&&$(L)[0].Q==="3F"){c.6U(L)}if(1t&&$(1t)[0].Q==="3F"){c.6U(1t)}if(L&&$(L)[0].Q==="P"&&$(L).L()[0].Q=="3F"){c.6U(L,$(L).L()[0])}if(1t&&$(1t)[0].Q==="P"&&L&&$(L)[0].Q=="3F"){c.6U(1t,L)}}c.6j(e,1k);if(3x&&1k===90&&!e.53&&!e.fk){e.2u();if(c.C.3E.1m){c.k7()}I{c.X.26("mP",E,E)}F}I{if(3x&&1k===90&&e.53&&!e.fk){e.2u();if(c.C.8A.1m!=0){c.k6()}I{c.X.26("mM",E,E)}F}}if(1k==32){c.21()}if(3x&&1k===65){c.21();c.5R=N}I{if(1k!=c.2O.fw&&!3x){c.5R=E}}if(1k==c.2O.b9&&!e.53&&!e.9P&&!e.80){q O=c.3o();if(O&&O.4F===E){1q=c.29();if(1q.4V){O.aC()}}if(c.1C("3t")&&(L.4D==1&&(L.Q=="6h"||L.Q=="mH"))){e.2u();c.21();c.3B(X.4C("br"));c.1c("7x",e);F E}if(1l&&(1l.Q=="3F"||$(1l).L()[0].Q=="3F")){if(c.ck()){if(c.7P==1){q 2j;q 2W;if(1l.Q=="3F"){2W="br";2j=1l}I{2W="p";2j=$(1l).L()[0]}e.2u();c.bt(2j);c.7P=0;if(2W=="p"){$(1l).L().1b("p").2W().1w()}I{q 2L=$.2b($(1l).o());$(1l).o(2L.G(/<br\\s?\\/?>$/i,""))}F}I{c.7P++}}I{c.7P++}}if(2q===N){F c.hZ(e,1t)}I{if(!c.C.1N){if(1l&&1l.Q=="3h"){q 5P=c.2N();if(5P!==E||5P.Q==="3h"){q 9o=$.2b($(1l).Y());q fA=$.2b($(5P).Y());if(9o==""&&fA==""&&$(5P).4f("li").1V()==0&&$(5P).8B("li").1V()==0){c.21();q $3a=$(5P).2g("ol, 2r");$(5P).1w();q J=$("<p>"+c.C.2i+"</p>");$3a.2I(J);c.4g(J);c.1j();c.1c("7x",e);F E}}}if(1l&&c.C.cu.4e(1l.Q)){c.21();2V($.M(B(){q 5e=c.2N();if(5e.Q==="8K"&&!$(5e).3v("4d")){q J=$("<p>"+c.C.2i+"</p>");$(5e).2e(J);c.4g(J)}},c),1)}I{if(1l===E){c.21();q J=$("<p>"+c.C.2i+"</p>");c.3B(J[0]);c.4g(J);c.1c("7x",e);F E}}}if(c.C.1N){if(1l&&c.C.cu.4e(1l.Q)){c.21();2V($.M(B(){q 5e=c.2N();if((5e.Q==="8K"||5e.Q==="P")&&!$(5e).3v("4d")){c.jr(5e)}},c),1)}I{F c.cl(e)}}if(1l.Q=="3F"||1l.Q=="cA"){F c.cl(e)}}c.1c("7x",e)}I{if(1k===c.2O.b9&&(e.9P||e.53)){c.21();e.2u();c.al()}}if((1k===c.2O.iG||e.80&&1k===hi)&&c.C.6j){F c.hY(e,2q,1k)}if(1k===c.2O.a2){c.i4(e,1t,L)}},hZ:B(e,1t){e.2u();c.21();q o=$(1t).L().Y();c.3B(X.82("\\n"));if(o.4G(/\\s$/)==-1){c.3B(X.82("\\n"))}c.1j();c.1c("7x",e);F E},hY:B(e,2q,1k){if(!c.C.i2){F N}if(c.9B(c.2R())&&c.C.aW===E){F N}e.2u();if(2q===N&&!e.53){c.21();c.3B(X.82("\\t"));c.1j();F E}I{if(c.C.aW!==E){c.21();c.3B(X.82(i3(c.C.aW+1).5V("\\mp")));c.1j();F E}I{if(!e.53){c.cx()}I{c.cy()}}}F E},i4:B(e,1t,L){if(L&&1t&&L.4L.Q=="6h"&&L.Q=="fB"&&1t.Q=="3h"&&$(L).4c("li").1V()==1){q Y=$(1t).Y().G(/[\\7D-\\gs\\gB]/g,"");if(Y==""){q J=L.4L;$(L).1w();c.4g(J);c.1j();F E}}if(1E 1t.Q!=="1J"&&/^(H[1-6])$/i.4e(1t.Q)){q J;if(c.C.1N===E){J=$("<p>"+c.C.2i+"</p>")}I{J=$("<br>"+c.C.2i)}$(1t).2e(J);c.4g(J);c.1j()}if(1E 1t.aH!=="1J"&&1t.aH!==2G){if(1t.1w&&1t.4D===3&&1t.aH.1U(/[^\\7D]/g)==2G){$(1t).4M().1w();c.1j()}}},cl:B(e){c.21();e.2u();c.al();c.1c("7x",e);F},hS:B(e){if(c.8j){F E}q 1k=e.5X;q L=c.2E();q 1t=c.3P();if(!c.C.1N&&1t.4D==3&&(L==E||L.Q=="ee")){q J=$("<p>").1h($(1t).6q());$(1t).2e(J);q 4f=$(J).4f();if(1E(4f[0])!=="1J"&&4f[0].Q=="bC"){4f.1w()}c.7G(J)}if((c.C.7d||c.C.6l||c.C.75)&&1k===c.2O.b9){c.ix()}if(1k===c.2O.eC||1k===c.2O.a2){F c.kP(e)}c.1c("5d",e);c.1j(e)},ix:B(){c.e7(c.C.8a,c.C.7d,c.C.6l,c.C.75,c.C.7A);2V($.M(B(){if(c.C.6l){c.4T()}if(c.C.5m){c.5m()}},c),5)},iu:B(){if(!c.C.cn){F}$.1u(c.C.cn,$.M(B(i,s){if(cq[s]){$.4W(c,cq[s]);if($.7z(cq[s].77)){c.77()}}},c))},5j:B(){c.io();if(c.C.64){c.co(c.$1v)}I{c.$cp=c.$1v.2U();c.$1v=c.bd(c.$cp);c.co(c.$cp)}},co:B(el){c.$1v.1i("69",c.C.63).2U();c.$2C.at(el).1h(c.$2Z).1h(c.$1v)},io:B(){c.$2Z=$(\'<1Q 1o="2p: 3O%;" cS="0" />\').b8("jZ",$.M(B(){if(c.C.4n){c.cV();if(c.3L===""){c.3L=c.C.2i}c.$2Z.1Y()[0].gW(c.3L);c.$2Z.1Y()[0].h8();q gV=gS($.M(B(){if(c.$2Z.1Y().1b("2v").o()){hd(gV);c.cZ()}},c),0)}I{c.cZ()}},c))},bG:B(){F c.$2Z[0].bK.X},cV:B(){q 3C=c.bG();if(3C.aE){3C.ly(3C.aE)}F 3C},cK:B(1f){1f=1f||c.C.1f;if(c.kF(1f)){c.$2Z.1Y().1b("9U").1h(\'<1r 4m="lw" 1S="\'+1f+\'" />\')}if($.lu(1f)){$.1u(1f,$.M(B(i,1K){c.cK(1K)},c))}},cZ:B(){c.$K=c.$2Z.1Y().1b("2v").1i({3K:N,69:c.C.63});if(c.$K[0]){c.X=c.$K[0].lK;c.42=c.X.me||42}c.cK();if(c.C.4n){c.d1(c.$1v.1p())}I{c.6V(c.3L,N,E)}c.cJ();c.cH()},hj:B(){if(c.C.4U!==E){c.cR=c.C.4U;c.C.4U=N}I{if(1E c.$2j.1i("4U")=="1J"||c.$2j.1i("4U")==""){c.C.4U=E}I{c.cR=c.$2j.1i("4U");c.C.4U=N}}},gl:B(o){if(c.C.4U===E){F E}if(c.9B(o)){c.C.2h=E;c.cQ();c.cM();F c.cP()}I{c.cM()}F E},cQ:B(){c.$K.on("2h.55",$.M(c.hm,c))},cM:B(){c.$K.on("cN.55",$.M(c.hh,c))},cP:B(){q ph=$(\'<V 1x="55">\').1a("U","9s").1i("3K",E).Y(c.cR);if(c.C.1N===E){F $("<p>").1h(ph)}I{F ph}},hh:B(){q o=c.2R();if(c.9B(o)){c.cQ();c.$K.o(c.cP())}},hm:B(){c.$K.1b("V.55").1w();q o="";if(c.C.1N===E){o=c.C.58}c.$K.3b("2h.55");c.$K.o(o);if(c.C.1N===E){c.4g(c.$K.4c()[0])}I{c.2h()}c.1j()},hs:B(){c.$K.1b("V.55").1w();c.$K.3b("2h.55")},hq:B(o){F o.G(/<V 1x="55"(.*?)>(.*?)<\\/V>/i,"")},6j:B(e,1k){if(!c.C.6j){if((e.9P||e.80)&&(1k===66||1k===73)){e.2u()}F E}$.1u(c.C.6j,$.M(B(4p,hn){q 54=4p.4o(",");3z(q i in 54){if(1E 54[i]==="8I"){c.ho(e,$.2b(54[i]),$.M(B(){m1(hn)},c))}}},c))},ho:B(e,54,hA){q hu={8:"mk",9:"52",10:"F",13:"F",16:"7V",17:"3x",18:"8n",19:"md",20:"mc",27:"m5",32:"6c",33:"m4",34:"m7",35:"3l",36:"ml",37:"1s",38:"lC",39:"4Z",40:"ln",45:"4y",46:"56",59:";",61:"=",96:"0",97:"1",98:"2",99:"3",3O:"4",lp:"5",lj:"6",lg:"7",lJ:"8",lD:"9",lG:"*",lI:"+",lB:"-",lA:".",lx:"/",mx:"f1",rm:"f2",rk:"f3",rp:"f4",rr:"f5",rc:"f6",qs:"f7",qv:"f8",qy:"f9",qe:"ql",qk:"qi",qj:"qV",qY:"qZ",qQ:"h7",qP:"-",qD:";",qE:"=",qu:",",qL:"-",qK:".",qM:"/",qN:"`",hi:"[",qO:"\\\\",qJ:"]",qI:"\'"};q cL={"`":"~","1":"!","2":"@","3":"#","4":"$","5":"%","6":"^","7":"&","8":"*","9":"(","0":")","-":"qF","=":"+",";":": ","\'":\'"\',",":"<",".":">","/":"?","\\\\":"|"};54=54.3N().4o(" ");q aw=hu[e.2O],7S=51.qG(e.5X).3N(),7q="",7u={};$.1u(["8n","3x","4w","7V"],B(2K,az){if(e[az+"qH"]&&aw!==az){7q+=az+"+"}});if(aw){7u[7q+aw]=N}if(7S){7u[7q+7S]=N;7u[7q+cL[7S]]=N;if(7q==="7V+"){7u[cL[7S]]=N}}3z(q i=0,l=54.1m;i<l;i++){if(7u[54[i]]){e.2u();F hA.bO(c,hw)}}},2h:B(){if(!c.1C("94")){c.42.2V($.M(c.aK,c,N),1)}I{c.$K.2h()}},4i:B(){if(c.1C("3t")){q 1T=c.X.aE.3e}c.$K.2h();if(c.1C("3t")){c.X.aE.3e=1T}},cb:B(){if(!c.1C("31")){c.aK()}I{if(c.C.1N===E){q 2W=c.$K.4c().2W();c.$K.2h();c.7G(2W)}I{c.aK()}}},aK:B(5h,2j){c.$K.2h();if(1E 2j=="1J"){2j=c.$K[0]}q O=c.3o();O.aM(2j);O.5h(5h||E);q 1q=c.29();1q.4X();1q.5g(O)},d0:B(aG){if(c.C.5N){c.hz(aG)}I{c.hy()}},hy:B(){q o=c.$1v.2U().1p();if(1E c.6E!=="1J"){q 6E=c.6E.G(/\\n/g,"");q 78=o.G(/\\n/g,"");78=c.6Z(78,E);c.6E=c.6Z(6E,E)!==78}if(c.6E){if(c.C.4n&&o===""){c.d1(o)}I{c.6V(o);if(c.C.4n){c.d2()}}c.1c("68",E,o)}if(c.C.1Q){c.$2Z.2M()}I{c.$K.2M()}if(c.C.4n){c.$K.1i("3K",N)}c.$1v.3b("5T.U-5s-gP");c.$K.2h();c.1W();c.7H();c.hN();c.ct("o");c.C.5N=N},hz:B(aG){if(aG!==E){c.28()}q 22=2G;if(c.C.1Q){22=c.$2Z.22();if(c.C.4n){c.$K.2B("3K")}c.$2Z.2U()}I{22=c.$K.iE();c.$K.2U()}q o=c.$1v.1p();if(o!==""&&c.C.gQ){c.$1v.1p(c.l5(o))}c.6E=o;c.$1v.22(22).2M().2h();c.$1v.on("5T.U-5s-gP",c.gR);c.gG();c.7b("o");c.C.5N=E},gR:B(e){if(e.2O===9){q $el=$(c);q 2y=$el.2R(0).4g;$el.1p($el.1p().aQ(0,2y)+"\\t"+$el.1p().aQ($el.2R(0).7G));$el.2R(0).4g=$el.2R(0).7G=2y+1;F E}},7C:B(){q cY=E;c.ah=gS($.M(B(){q o=c.2R();if(cY!==o){q 2m=c.$1v.1i("2m");$.iU({1K:c.C.7C,1G:"7R",1a:"2m="+2m+"&"+2m+"="+r0(r1(o)),4h:$.M(B(1a){q 1M=$.8J(1a);if(1E 1M.3U=="1J"){c.1c("7C",E,1M)}I{c.1c("r2",E,1M)}cY=o},c)})}},c),c.C.ah*qX)},gI:B(){if(c.5a()&&c.C.cU.1m>0){$.1u(c.C.cU,$.M(B(i,s){q 2K=c.C.4a.44(s);c.C.4a.ap(2K,1)},c))}if(c.C.30){c.C.4a=c.C.gJ}I{if(!c.C.gK){q 2K=c.C.4a.44("o");c.C.4a.ap(2K,1)}}if(c.C.1A){$.1u(c.C.1A.6x.1R,$.M(B(i,s){if($.4O(i,c.C.gM)=="-1"){e9 c.C.1A.6x.1R[i]}},c))}if(c.C.4a.1m===0){F E}c.il();c.$1A=$("<2r>").2z("cW").1i("id","qW"+c.7F);if(c.C.7X){c.$1A.2z("U-1A-7X")}if(c.C.h9&&c.5a()){c.$1A.2z("U-1A-8V")}if(c.C.30){c.$30=$(\'<12 1x="ik">\').1i("id","hb"+c.7F).2U();c.$30.1h(c.$1A);$("2v").1h(c.$30)}I{if(c.C.7O){c.$1A.2z("U-1A-qS");$(c.C.7O).o(c.$1A)}I{c.$2C.6d(c.$1A)}}$.1u(c.C.4a,$.M(B(i,2w){if(c.C.1A[2w]){q 2d=c.C.1A[2w];if(c.C.84===E&&2w==="25"){F N}c.$1A.1h($("<li>").1h(c.7f(2w,2d)))}},c));c.$1A.1b("a").1i("7c","-1");if(c.C.6B){c.cX();$(c.C.7T).on("h7.U",$.M(c.cX,c))}if(c.C.aY){c.$K.on("a8.U 5d.U",$.M(c.8r,c))}},cX:B(){q 3e=$(c.C.7T).3e();q 7M=0;q 1s=0;q 3l=0;if(c.C.7T===X){7M=c.$2C.2Y().1T}I{7M=1}3l=7M+c.$2C.22()+40;if(3e>7M){q 2p="3O%";if(c.C.as){1s=c.$2C.2Y().1s;2p=c.$2C.ic();c.$1A.2z("im")}c.6B=N;if(c.C.7T===X){c.$1A.1f({3k:"ak",2p:2p,9u:h0,1T:c.C.bb+"px",1s:1s})}I{c.$1A.1f({3k:"8T",2p:2p,9u:h0,1T:(c.C.bb+3e)+"px",1s:0})}if(3e<3l){c.$1A.1f("hH","gq")}I{c.$1A.1f("hH","8E")}}I{c.6B=E;c.$1A.1f({3k:"gC",2p:"4l",1T:0,1s:1s});if(c.C.as){c.$1A.3c("im")}}},il:B(){if(!c.C.30){F}c.$K.on("a8.U 5d.U",c,$.M(B(e){q Y=c.aB();if(e.1G==="a8"&&Y!=""){c.cF(e)}if(e.1G==="5d"&&e.53&&Y!=""){q $cG=$(c.8g(c.29().qU)),2Y=$cG.2Y();2Y.22=$cG.22();c.cF(2Y,N)}},c))},cF:B(e,ij){if(!c.C.30){F}c.28();q 1s,1T;$(".ik").2U();if(ij){1s=e.1s;1T=e.1T+e.22+14;if(c.C.1Q){1T+=c.$2C.3k().1T-$(c.X).3e();1s+=c.$2C.3k().1s}}I{q 2p=c.$30.ic();1s=e.jl;if($(c.X).2p()<(1s+2p)){1s-=2p}1T=e.jm+14;if(c.C.1Q){1T+=c.$2C.3k().1T;1s+=c.$2C.3k().1s}I{1T+=$(c.X).3e()}}c.$30.1f({1s:1s+"px",1T:1T+"px"}).2M();c.ie()},ie:B(){if(!c.C.30){F}q 6W=$.M(B(3C){$(3C).on("9J.U",$.M(B(e){if($(e.1O).2g(c.$1A).1m===0){c.$30.6N(3O);c.bA();$(3C).3b(e)}},c)).on("5T.U",$.M(B(e){if(e.5X===c.2O.dY){c.29().ih()}c.$30.6N(3O);$(3C).3b(e)},c))},c);6W(X);if(c.C.1Q){6W(c.X)}},bi:B(){if(!c.C.30){F}q 6W=$.M(B(3C){$(3C).on("l1.U",$.M(B(e){if($(e.1O).2g(c.$1A).1m===0){c.$30.6N(3O);$(3C).3b(e)}},c))},c);6W(X);if(c.C.1Q){6W(c.X)}},hJ:B($1R,ir){$.1u(ir,$.M(B(2w,2d){if(!2d.2S){2d.2S=""}q $6Y;if(2d.2m==="aN"){$6Y=$(\'<a 1x="qC">\')}I{$6Y=$(\'<a 1S="#" 1x="\'+2d.2S+" qB"+2w+\'">\'+2d.1e+"</a>");$6Y.on("23",$.M(B(e){if(c.C.30){c.1W()}if(e.2u){e.2u()}if(c.1C("3t")){e.hU=E}if(2d.1c){2d.1c.5q(c,2w,$6Y,2d,e)}if(2d.2o){c.26(2d.2o,2w)}if(2d.1H){c[2d.1H](2w)}c.8r();if(c.C.30){c.$30.6N(3O)}},c))}$1R.1h($6Y)},c))},cj:B(e,1k){if(!c.C.5N){e.2u();F E}q $1D=c.4q(1k);q $1R=$1D.1a("1R").8P(X.2v);if($1D.3v("7a")){c.bj()}I{c.bj();c.1c("cj",{1R:$1R,1k:1k,1D:$1D});c.7b(1k);$1D.2z("7a");q 7U=$1D.2Y();q cr=$1R.2p();if((7U.1s+cr)>$(X).2p()){7U.1s-=cr}q 1s=7U.1s+"px";q cm=$1D.iE();q 3k="8T";q 1T=(cm+c.C.bb)+"px";if(c.C.6B&&c.6B){3k="ak"}I{1T=7U.1T+cm+"px"}$1R.1f({3k:3k,1s:1s,1T:1T}).2M();c.1c("qm",{1R:$1R,1k:1k,1D:$1D})}q bh=$.M(B(e){c.ci(e,$1R)},c);$(X).b8("23",bh);c.$K.b8("23",bh);c.$K.b8("qh",bh);e.qg();c.4i()},bj:B(){c.$1A.1b("a.7a").3c("8z").3c("7a");$(".hO").2U();c.1c("ci")},ci:B(e,$1R){if(!$(e.1O).3v("7a")){$1R.3c("7a");c.bj()}},7f:B(2w,2d,hT){q $1D=$(\'<a 1S="ab:;" 1e="\'+2d.1e+\'" 7c="-1" 1x="re-aR re-\'+2w+\'"></a>\');if(1E hT!="1J"){$1D.2z("U-2a-T")}$1D.on("23",$.M(B(e){if(e.2u){e.2u()}if(c.1C("3t")){e.hU=E}if($1D.3v("cB")){F E}if(c.7h()===E&&!2d.2o){c.4i()}if(2d.2o){c.4i();c.26(2d.2o,2w);c.bi()}I{if(2d.1H&&2d.1H!=="2M"){c[2d.1H](2w);c.bi()}I{if(2d.1c){2d.1c.5q(c,2w,$1D,2d,e);c.bi()}I{if(2d.1R){c.cj(e,2w)}}}}c.8r(E,2w)},c));if(2d.1R){q $1R=$(\'<12 1x="hO qb\'+2w+\'" 1o="3f: 3r;">\');$1D.1a("1R",$1R);c.hJ($1R,2d.1R)}F $1D},4q:B(1k){if(!c.C.1A){F E}F $(c.$1A.1b("a.re-"+1k))},qa:B(cs,Q){c.C.aY.3d(cs);c.C.cv[Q]=cs},fo:B(1k){q 2a=c.4q(1k);if(2a.3v("8z")){c.ct(1k)}I{c.7b(1k)}},7b:B(1k){q 2a=c.4q(1k);2a.2z("8z")},ct:B(1k){q 2a=c.4q(1k);2a.3c("8z")},fl:B(2w){c.$1A.1b("a.re-aR").ay(".re-"+2w).3c("8z")},hN:B(){c.$1A.1b("a.re-aR").ay("a.re-o").3c("cB")},gG:B(){c.$1A.1b("a.re-aR").ay("a.re-o").2z("cB")},qc:B(1k,aP){c.4q(1k).2z("re-"+aP)},qd:B(1k,aP){c.4q(1k).3c("re-"+aP)},qf:B(1k,2m){q 1D=c.4q(1k);1D.3c("U-2a-T");1D.2z("fa-U-2a");1D.o(\'<i 1x="fa \'+2m+\'"></i>\')},qn:B(1k,1e,1c,1R){if(!c.C.1A){F}q 2a=c.7f(1k,{1e:1e,1c:1c,1R:1R},N);c.$1A.1h($("<li>").1h(2a));F 2a},qo:B(1k,1e,1c,1R){if(!c.C.1A){F}q 2a=c.7f(1k,{1e:1e,1c:1c,1R:1R},N);c.$1A.6d($("<li>").1h(2a))},qx:B(hX,1k,1e,1c,1R){if(!c.C.1A){F}q 2a=c.7f(1k,{1e:1e,1c:1c,1R:1R},N);q $2a=c.4q(hX);if($2a.1V()!==0){$2a.L().2I($("<li>").1h(2a))}I{c.$1A.1h($("<li>").1h(2a))}F 2a},qw:B(i1,1k,1e,1c,1R){if(!c.C.1A){F}q 2a=c.7f(1k,{1e:1e,1c:1c,1R:1R},N);q $2a=c.4q(i1);if($2a.1V()!==0){$2a.L().3S($("<li>").1h(2a))}I{c.$1A.1h($("<li>").1h(2a))}F 2a},qz:B(1k){q $2a=c.4q(1k);$2a.1w()},8r:B(e,2w){q L=c.2E();c.fl(2w);if(e===E&&2w!=="o"){if($.4O(2w,c.C.aY)!=-1){c.fo(2w)}F}if(L&&L.Q==="A"){c.$1A.1b("a.fG").Y(c.C.1F.fg)}I{c.$1A.1b("a.fG").Y(c.C.1F.cz)}$.1u(c.C.cv,$.M(B(1k,2s){if($(L).2g(1k,c.$K.2R()[0]).1m!=0){c.7b(2s)}},c));q $L=$(L).2g(c.C.5t.43().3N(),c.$K[0]);if($L.1m){q 57=$L.1f("Y-57");if(57==""){57="1s"}c.7b("57"+57)}},aL:B(o){q 1q=c.29();if(1q.48&&1q.4V){q O=c.3o();O.aC();q el=c.X.4C("12");el.3Q=o;q 4k=c.X.cD(),J,5v;3w((J=el.8G)){5v=4k.7g(J)}q r4=4k.8G;O.3B(4k);if(5v){O=O.ag();O.ae(5v);O.5h(N)}1q.4X();1q.5g(O)}},2o:B(1P,2F,1j){if(1P==="d8"&&c.1C("3t")){2F="<"+2F+">"}if(1P==="5c"&&c.1C("3t")){if(!c.8L()){c.4i();c.X.1I.5i().do(2F)}I{c.aL(2F)}}I{c.X.26(1P,E,2F)}if(1j!==E){c.1j()}c.1c("26",1P,2F)},26:B(1P,2F,1j){if(!c.C.5N){c.$1v.2h();F E}if(1P==="3m"||1P==="3q"||1P==="4K"||1P==="fC"){c.21()}if(1P==="fm"||1P==="fy"){q L=c.2E();if(L.Q==="qq"||L.Q==="qp"){c.bk(L)}}if(1P==="5c"){c.9i(2F,1j);c.1c("26",1P,2F);F}if(c.74("6i")&&!c.C.fz){F E}if(1P==="8k"||1P==="8q"){F c.fv(1P,2F)}if(1P==="6F"){F c.fu(1P,2F)}c.2o(1P,2F,1j);if(1P==="fx"){c.$K.1b("hr").2B("id")}},fu:B(1P,2F){c.21();q 1r=c.74("A");if(1r){$(1r).2e($(1r).Y());c.1j();c.1c("26",1P,2F);F}},fv:B(1P,2F){c.21();q L=c.2E();q $3a=$(L).2g("ol, 2r");if(!c.4j($3a)&&$3a.1V()!=0){$3a=E}q 1w=E;if($3a&&$3a.1m){1w=N;q 5x=$3a[0].Q;if((1P==="8k"&&5x==="qr")||(1P==="8q"&&5x==="fB")){1w=E}}c.28();if(1w){q 1X=c.7r();q 4t=c.3I(1X);if(1E 1X[0]!="1J"&&1X.1m>1&&1X[0].4D==3){4t.jS(c.2N())}q 1a="",5B="";$.1u(4t,$.M(B(i,s){if(s.Q=="3h"){q $s=$(s);q 7e=$s.6q();7e.1b("2r","ol").1w();if(c.C.1N===E){1a+=c.3Z($("<p>").1h(7e.1Y()))}I{q fH=7e.o().G(/<br\\s?\\/?>$/i,"");1a+=fH+"<br>"}if(i==0){$s.2z("U-5B").6z();5B=c.3Z($s)}I{$s.1w()}}},c));o=c.$K.o().G(5B,"</"+5x+">"+1a+"<"+5x+">");c.$K.o(o);c.$K.1b(5x+":6z").1w()}I{q fh=$(c.2E()).2g("1g");if(c.1C("3t")&&!c.8L()&&c.C.1N){q 3G=c.bx("12");q 9w=$(3G).o();q 7i=$("<2r>");if(1P=="8q"){7i=$("<ol>")}q 8o=$("<li>");if($.2b(9w)==""){8o.1h(9w+\'<V id="1I-1L-1">\'+c.C.2i+"</V>");7i.1h(8o);c.$K.1b("#1I-1L-1").2e(7i)}I{8o.1h(9w);7i.1h(8o);$(3G).2e(7i)}}I{c.X.26(1P)}q L=c.2E();q $3a=$(L).2g("ol, 2r");if(c.C.1N===E){q 9o=$.2b($3a.Y());if(9o==""){$3a.4c("li").1b("br").1w();$3a.4c("li").1h(\'<V id="1I-1L-1">\'+c.C.2i+"</V>")}}if(fh.1V()!=0){$3a.kQ("<1g>")}if($3a.1m){q $7n=$3a.L();if(c.4j($7n)&&$7n[0].Q!="3h"&&c.7v($7n[0])){$7n.2e($7n.1Y())}}if(c.1C("31")){c.$K.2h()}}c.1W();c.$K.1b("#1I-1L-1").2B("id");c.1j();c.1c("26",1P,2F);F},cx:B(){c.d4("6m")},cy:B(){c.d4("7m")},d4:B(1P){c.21();if(1P==="6m"){q 1l=c.2N();c.28();if(1l&&1l.Q=="3h"){q L=c.2E();q $3a=$(L).2g("ol, 2r");q 5x=$3a[0].Q;q 4t=c.3I();$.1u(4t,B(i,s){if(s.Q=="3h"){q $4M=$(s).4M();if($4M.1V()!=0&&$4M[0].Q=="3h"){q $dF=$4M.4c("2r, ol");if($dF.1V()==0){$4M.1h($("<"+5x+">").1h(s))}I{$dF.1h(s)}}}})}I{if(1l===E&&c.C.1N===N){c.2o("6o","2f");q 7j=c.2N();q 1l=$(\'<12 1a-81="">\').o($(7j).o());$(7j).2e(1l);q 1s=c.9M($(1l).1f("2H-1s"))+c.C.9q;$(1l).1f("2H-1s",1s+"px")}I{q 79=c.3I();$.1u(79,$.M(B(i,1z){q $el=E;if(1z.Q==="6h"){F}if($.4O(1z.Q,c.C.5t)!==-1){$el=$(1z)}I{$el=$(1z).2g(c.C.5t.43().3N(),c.$K[0])}q 1s=c.9M($el.1f("2H-1s"))+c.C.9q;$el.1f("2H-1s",1s+"px")},c))}}c.1W()}I{c.28();q 1l=c.2N();if(1l&&1l.Q=="3h"){q 4t=c.3I();q 2K=0;c.dG(1l,2K,4t)}I{q 79=c.3I();$.1u(79,$.M(B(i,1z){q $el=E;if($.4O(1z.Q,c.C.5t)!==-1){$el=$(1z)}I{$el=$(1z).2g(c.C.5t.43().3N(),c.$K[0])}q 1s=c.9M($el.1f("2H-1s"))-c.C.9q;if(1s<=0){if(c.C.1N===N&&1E($el.1a("81"))!=="1J"){$el.2e($el.o()+"<br>")}I{$el.1f("2H-1s","");c.4H($el,"1o")}}I{$el.1f("2H-1s",1s+"px")}},c))}c.1W()}c.1j()},dG:B(li,2K,4t){if(li&&li.Q=="3h"){q $L=$(li).L().L();if($L.1V()!=0&&$L[0].Q=="3h"){$L.2I(li)}I{if(1E 4t[2K]!="1J"){li=4t[2K];2K++;c.dG(li,2K,4t)}I{c.26("8k")}}}},dI:B(){c.8l("","rg")},dD:B(){c.8l("4Z","rA")},dy:B(){c.8l("6O","rz")},dA:B(){c.8l("dB","rB")},8l:B(1G,1P){c.21();if(c.cw()){c.X.26(1P,E,E);F N}c.28();q 1l=c.2N();if(!1l&&c.C.1N){c.2o("d8","12");q 7j=c.2N();q 1l=$(\'<12 1a-81="">\').o($(7j).o());$(7j).2e(1l);$(1l).1f("Y-57",1G);c.4H(1l,"1o");if(1G==""&&1E($(1l).1a("81"))!=="1J"){$(1l).2e($(1l).o())}}I{q 79=c.3I();$.1u(79,$.M(B(i,1z){q $el=E;if($.4O(1z.Q,c.C.5t)!==-1){$el=$(1z)}I{$el=$(1z).2g(c.C.5t.43().3N(),c.$K[0])}if($el){$el.1f("Y-57",1G);c.4H($el,"1o")}},c))}c.1W();c.1j()},dJ:B(o){q ph=c.gl(o);if(ph!==E){F ph}if(c.C.1N===E){if(o===""){o=c.C.58}I{if(o.4G(/^<hr\\s?\\/?>$/gi)!==-1){o="<hr>"+c.C.58}}}F o},dK:B(o){if(c.C.9a&&!c.C.rD){o=o.G(/<12(.*?)>([\\w\\W]*?)<\\/12>/gi,"<p$1>$2</p>")}if(c.C.5Y){o=c.9z(o)}F o},dR:B(o){if(c.C.dS){o=o.G(/\\{\\{(.*?)\\}\\}/gi,"<!-- 9r ge $1 -->");o=o.G(/\\{(.*?)\\}/gi,"<!-- 9r $1 -->")}o=o.G(/<3n(.*?)>([\\w\\W]*?)<\\/3n>/gi,\'<1e 1G="Y/ab" 1o="3f: 3r;" 1x="U-3n-1d"$1>$2</1e>\');o=o.G(/<1o(.*?)>([\\w\\W]*?)<\\/1o>/gi,\'<2l$1 1o="3f: 3r;" 4m="U-1o-1d">$2</2l>\');o=o.G(/<2t(.*?)>([\\w\\W]*?)<\\/2t>/gi,\'<2l$1 4m="U-2t-1d">$2</2l>\');if(c.C.8x){o=o.G(/<\\?4I([\\w\\W]*?)\\?>/gi,\'<2l 1o="3f: 3r;" 4m="U-4I-1d">$1</2l>\')}I{o=o.G(/<\\?4I([\\w\\W]*?)\\?>/gi,"")}F o},fL:B(o){if(c.C.dS){o=o.G(/<!-- 9r ge (.*?) -->/gi,"{{$1}}");o=o.G(/<!-- 9r (.*?) -->/gi,"{$1}")}o=o.G(/<1e 1G="Y\\/ab" 1o="3f: 3r;" 1x="U-3n-1d"(.*?)>([\\w\\W]*?)<\\/1e>/gi,\'<3n$1 1G="Y/ab">$2<\\/3n>\');o=o.G(/<2l(.*?) 1o="3f: 3r;" 4m="U-1o-1d">([\\w\\W]*?)<\\/2l>/gi,"<1o$1>$2</1o>");o=o.G(/<2l(.*?)4m="U-2t-1d"(.*?)>([\\w\\W]*?)<\\/2l>/gi,"<2t$1$2>$3</2t>");if(c.C.8x){o=o.G(/<2l 1o="3f: 3r;" 4m="U-4I-1d">([\\w\\W]*?)<\\/2l>/gi,"<?4I\\r\\n$1\\r\\n?>")}F o},6Z:B(o,3E){if(3E!==E){q 3E=[];q 2x=o.1U(/<(2q|1o|3n|1e)(.*?)>([\\w\\W]*?)<\\/(2q|1o|3n|1e)>/gi);if(2x===2G){2x=[]}if(c.C.8x){q 6X=o.1U(/<\\?4I([\\w\\W]*?)\\?>/gi);if(6X){2x=$.dP(2x,6X)}}if(2x){$.1u(2x,B(i,s){o=o.G(s,"gr"+i);3E.3d(s)})}}o=o.G(/\\n/g," ");o=o.G(/[\\t]*/g,"");o=o.G(/\\n\\s*\\n/g,"\\n");o=o.G(/^[\\s\\n]*/g," ");o=o.G(/[\\s\\n]*$/g," ");o=o.G(/>\\s{2,}</g,"> <");o=c.gj(o,3E);o=o.G(/\\n\\n/g,"\\n");F o},gj:B(o,3E){if(3E===E){F o}$.1u(3E,B(i,s){o=o.G("gr"+i,s)});F o},dq:B(o){o=o.G(/[\\7D-\\gs\\gB]/g,"");q dU=["<b>\\\\s*</b>","<b>&3u;</b>","<em>\\\\s*</em>"];q 70=["<2q></2q>","<2f>\\\\s*</2f>","<dd></dd>","<dt></dt>","<2r></2r>","<ol></ol>","<li></li>","<1n></1n>","<3j></3j>","<V>\\\\s*<V>","<V>&3u;<V>","<p>\\\\s*</p>","<p></p>","<p>&3u;</p>","<p>\\\\s*<br>\\\\s*</p>","<12>\\\\s*</12>","<12>\\\\s*<br>\\\\s*</12>"];if(c.C.a1){70=70.rd(dU)}I{70=dU}q 4P=70.1m;3z(q i=0;i<4P;++i){o=o.G(2c 2J(70[i],"gi"),"")}F o},9z:B(o){o=$.2b(o);if(c.C.1N===N){F o}if(o===""||o==="<p></p>"){F c.C.58}o=o+"\\n";if(c.C.a1===E){F o}q dx=[];q 2x=o.1U(/<(1n|12|2q|3M)(.*?)>([\\w\\W]*?)<\\/(1n|12|2q|3M)>/gi);if(!2x){2x=[]}q dQ=o.1U(/<!--([\\w\\W]*?)-->/gi);if(dQ){2x=$.dP(2x,dQ)}if(c.C.8x){q 6X=o.1U(/<2l(.*?)4m="U-4I-1d">([\\w\\W]*?)<\\/2l>/gi);if(6X){2x=$.dP(2x,6X)}}if(2x){$.1u(2x,B(i,s){dx[i]=s;o=o.G(s,"{G"+i+"}\\n")})}o=o.G(/<br \\/>\\s*<br \\/>/gi,"\\n\\n");o=o.G(/<br><br>/gi,"\\n\\n");B R(4p,gu,r){F o.G(2c 2J(4p,gu),r)}q 3D="(rh|o|2v|9U|1e|4w|1o|3n|1r|1Q|1n|3T|di|ra|r6|r5|8c|3j|1g|dN|12|dl|dd|dt|2r|ol|li|2q|3s|4b|2t|gc|fU|2f|dm|r7|1o|p|h[1-6]|hr|fV|nE|2l|jk|jj|r8|aS|49|r9|ri|rj|rs|rt|ru)";o=R("(<"+3D+"[^>]*>)","gi","\\n$1");o=R("(</"+3D+">)","gi","$1\\n\\n");o=R("\\r\\n","g","\\n");o=R("\\r","g","\\n");o=R("/\\n\\n+/","g","\\n\\n");q 4A=o.4o(2c 2J("\\ns*\\n","g"),-1);o="";3z(q i in 4A){if(4A.rq(i)){if(4A[i].4G("{G")==-1){4A[i]=4A[i].G(/<p>\\n\\t?<\\/p>/gi,"");4A[i]=4A[i].G(/<p><\\/p>/gi,"");if(4A[i]!=""){o+="<p>"+4A[i].G(/^\\n+|\\n+$/g,"")+"</p>"}}I{o+=4A[i]}}}o=R("<p><p>","gi","<p>");o=R("</p></p>","gi","</p>");o=R("<p>s?</p>","gi","");o=R("<p>([^<]+)</(12|dm|2t)>","gi","<p>$1</p></$2>");o=R("<p>(</?"+3D+"[^>]*>)</p>","gi","$1");o=R("<p>(<li.+?)</p>","gi","$1");o=R("<p>s?(</?"+3D+"[^>]*>)","gi","$1");o=R("(</?"+3D+"[^>]*>)s?</p>","gi","$1");o=R("(</?"+3D+"[^>]*>)s?<br />","gi","$1");o=R("<br />(s*</?(?:p|li|12|dl|dd|dt|dN|2q|1g|2r|ol)[^>]*>)","gi","$1");o=R("\\n</p>","gi","</p>");o=R("<li><p>","gi","<li>");o=R("</p></li>","gi","</li>");o=R("</li><p>","gi","</li>");o=R("<p>\\t?\\n?<p>","gi","<p>");o=R("</dt><p>","gi","</dt>");o=R("</dd><p>","gi","</dd>");o=R("<br></p></2f>","gi","</2f>");o=R("<p>\\t*</p>","gi","");$.1u(dx,B(i,s){o=o.G("{G"+i+"}",s)});F $.2b(o)},9S:B(o,6V){q 6r="3V";if(c.C.6r==="b"){6r="b"}q 6p="em";if(c.C.6p==="i"){6p="i"}o=o.G(/<V 1o="2A-1o: 3q;">([\\w\\W]*?)<\\/V>/gi,"<"+6p+">$1</"+6p+">");o=o.G(/<V 1o="2A-7o: 3m;">([\\w\\W]*?)<\\/V>/gi,"<"+6r+">$1</"+6r+">");if(c.C.6r==="3V"){o=o.G(/<b>([\\w\\W]*?)<\\/b>/gi,"<3V>$1</3V>")}I{o=o.G(/<3V>([\\w\\W]*?)<\\/3V>/gi,"<b>$1</b>")}if(c.C.6p==="em"){o=o.G(/<i>([\\w\\W]*?)<\\/i>/gi,"<em>$1</em>")}I{o=o.G(/<em>([\\w\\W]*?)<\\/em>/gi,"<i>$1</i>")}o=o.G(/<V 1o="Y-bZ: 4K;">([\\w\\W]*?)<\\/V>/gi,"<u>$1</u>");if(6V!==N){o=o.G(/<5F>([\\w\\W]*?)<\\/5F>/gi,"<56>$1</56>")}I{o=o.G(/<56>([\\w\\W]*?)<\\/56>/gi,"<5F>$1</5F>")}F o},8d:B(o){if(o==""||1E o=="1J"){F o}q 9T=E;if(c.C.5G!==E){9T=N}q 2Q=9T===N?c.C.5G:c.C.8y;q g8=/<\\/?([a-z][a-eL-9]*)\\b[^>]*>/gi;o=o.G(g8,B($0,$1){if(9T===N){F $.4O($1.3N(),2Q)>"-1"?$0:""}I{F $.4O($1.3N(),2Q)>"-1"?"":$0}});o=c.9S(o);F o},de:B(o,ga){q 2q=o.1U(/<(2q|2k)(.*?)>([\\w\\W]*?)<\\/(2q|2k)>/gi);if(2q!==2G){$.1u(2q,$.M(B(i,s){q 2Q=s.1U(/<(2q|2k)(.*?)>([\\w\\W]*?)<\\/(2q|2k)>/i);2Q[3]=2Q[3].G(/&3u;/g," ");if(ga!==E){2Q[3]=c.ce(2Q[3])}2Q[3]=2Q[3].G(/\\$/g,"&#36;");o=o.G(s,"<"+2Q[1]+2Q[2]+">"+2Q[3]+"</"+2Q[1]+">")},c))}F o},ce:B(4p){4p=51(4p).G(/&9h;/g,"&").G(/&lt;/g,"<").G(/&gt;/g,">").G(/&g6;/g,\'"\');F 4p.G(/&/g,"&9h;").G(/</g,"&lt;").G(/>/g,"&gt;").G(/"/g,"&g6;")},g5:B(){q $1z=c.$K.1b("li, 1B, a, b, 3V, q8, ov, i, em, u, ou, 5F, 56, V, ot");$1z.g2(\'[1o*="8t-6s: g3;"][1o*="9I-22"]\').1f("8t-6s","").1f("9I-22","");$1z.g2(\'[1o*="8t-6s: g3;"]\').1f("8t-6s","");$1z.1f("9I-22","");$.1u($1z,$.M(B(i,s){c.4H(s,"1o")},c));q $cg=c.$K.1b("b, 3V, i, em, u, 5F, 56");$cg.1f("2A-1V","");$.1u($cg,$.M(B(i,s){c.4H(s,"1o")},c));c.$K.1b(\'12[1o="Y-57: -4s-4l;"]\').1Y().l7();c.$K.1b("2r, ol, li").2B("1o")},l5:B(2k){q i=0,9C=2k.1m,3i=0,2y=2G,3l=2G,1d="",1Z="",4N="";c.8v=0;3z(;i<9C;i++){3i=i;if(-1==2k.4R(i).44("<")){1Z+=2k.4R(i);F c.dg(1Z)}3w(3i<9C&&2k.5C(3i)!="<"){3i++}if(i!=3i){4N=2k.4R(i,3i-i);if(!4N.1U(/^\\s{2,}$/g)){if("\\n"==1Z.5C(1Z.1m-1)){1Z+=c.72()}I{if("\\n"==4N.5C(0)){1Z+="\\n"+c.72();4N=4N.G(/^\\s+/,"")}}1Z+=4N}if(4N.1U(/\\n/)){1Z+="\\n"+c.72()}}2y=3i;3w(3i<9C&&">"!=2k.5C(3i)){3i++}1d=2k.4R(2y,3i-2y);i=3i;q t;if("!--"==1d.4R(1,3)){if(!1d.1U(/--$/)){3w("-->"!=2k.4R(3i,3)){3i++}3i+=2;1d=2k.4R(2y,3i-2y);i=3i}if("\\n"!=1Z.5C(1Z.1m-1)){1Z+="\\n"}1Z+=c.72();1Z+=1d+">\\n"}I{if("!"==1d[1]){1Z=c.9L(1d+">",1Z)}I{if("?"==1d[1]){1Z+=1d+">\\n"}I{if(t=1d.1U(/^<(3n|1o|2q)/i)){t[1]=t[1].3N();1d=c.dc(1d);1Z=c.9L(1d,1Z);3l=51(2k.4R(i+1)).3N().44("</"+t[1]);if(3l){4N=2k.4R(i+1,3l);i+=3l;1Z+=4N}}I{1d=c.dc(1d);1Z=c.9L(1d,1Z)}}}}}F c.dg(1Z)},72:B(){q s="";3z(q j=0;j<c.8v;j++){s+="\\t"}F s},dg:B(2k){2k=2k.G(/\\n\\s*\\n/g,"\\n");2k=2k.G(/^[\\s\\n]*/,"");2k=2k.G(/[\\s\\n]*$/,"");2k=2k.G(/<3n(.*?)>\\n<\\/3n>/gi,"<3n$1><\\/3n>");c.8v=0;F 2k},dc:B(1d){q 8w="";1d=1d.G(/\\n/g," ");1d=1d.G(/\\s{2,}/g," ");1d=1d.G(/^\\s+|\\s+$/g," ");q db="";if(1d.1U(/\\/$/)){db="/";1d=1d.G(/\\/+$/,"")}q m;3w(m=/\\s*([^= ]+)(?:=(([\'"\']).*?\\3|[^ ]+))?/.2o(1d)){if(m[2]){8w+=m[1].3N()+"="+m[2]}I{if(m[1]){8w+=m[1].3N()}}8w+=" ";1d=1d.4R(m[0].1m)}F 8w.G(/\\s*$/,"")+db+">"},9L:B(1d,1Z){q nl=1d.1U(c.d7);if(1d.1U(c.kT)||nl){1Z=1Z.G(/\\s*$/,"");1Z+="\\n"}if(nl&&"/"==1d.5C(1)){c.8v--}if("\\n"==1Z.5C(1Z.1m-1)){1Z+=c.72()}if(nl&&"/"!=1d.5C(1)){c.8v++}1Z+=1d;if(1d.1U(c.kN)||1d.1U(c.d7)){1Z=1Z.G(/ *$/,"");1Z+="\\n"}F 1Z},kP:B(e){q o=$.2b(c.$K.o());if(c.C.1N){if(o==""){e.2u();c.$K.o("");c.2h()}}I{o=o.G(/<br\\s?\\/?>/i,"");q 78=o.G(/<p>\\s?<\\/p>/gi,"");if(o===""||78===""){e.2u();q J=$(c.C.58).2R(0);c.$K.o(J);c.2h()}}c.1j()},5I:B(1d){if(c.1C("31")&&c.7h()){c.$K.2h()}c.21();q 1X=c.3I();c.28();$.1u(1X,$.M(B(i,J){if(J.Q!=="3h"){q L=$(J).L();if(1d==="p"){if((J.Q==="P"&&L.1V()!=0&&L[0].Q==="3F")||J.Q==="3F"){c.d9();F}I{if(c.C.1N){if(J&&J.Q.4G(/H[1-6]/)==0){$(J).2e(J.3Q+"<br>")}I{F}}I{c.6o(1d,J)}}}I{c.6o(1d,J)}}},c));c.1W();c.1j()},6o:B(1d,1l){if(1l===E){1l=c.2N()}if(1l===E&&c.C.1N===N){c.26("d8",1d);F N}q 1Y="";if(1d!=="2q"){1Y=$(1l).1Y()}I{1Y=$(1l).o();if($.2b(1Y)===""){1Y=\'<V id="1I-1L-1"></V>\'}}if(1l.Q==="6i"){1d="p"}if(c.C.1N===N&&1d==="p"){$(1l).2e($("<12>").1h(1Y).o()+"<br>")}I{q L=c.2E();q J=$("<"+1d+">").1h(1Y);$(1l).2e(J);if(L&&L.Q=="6h"){$(J).kQ("<1g>")}}},kf:B(kK,kO,7N){if(7N!==E){c.28()}q 8S=$("<"+kO+"/>");$(kK).2e(B(){F 8S.1h($(c).1Y())});if(7N!==E){c.1W()}F 8S},d9:B(){if(c.1C("31")&&c.7h()){c.$K.2h()}c.21();if(c.C.1N===E){c.28();q 3D=c.3I();q 2f=E;q kM=3D.1m;if(3D){q 1a="";q 5B="";q G=E;q da=N;$.1u(3D,B(i,s){if(s.Q!=="P"){da=E}});$.1u(3D,$.M(B(i,s){if(s.Q==="3F"){c.6o("p",s,E)}I{if(s.Q==="P"){2f=$(s).L();if(2f[0].Q=="3F"){q 6G=$(2f).4c("p").1V();if(6G==1){$(2f).2e(s)}I{if(6G==kM){G="2f";1a+=c.3Z(s)}I{G="o";1a+=c.3Z(s);if(i==0){$(s).2z("U-5B").6z();5B=c.3Z(s)}I{$(s).1w()}}}}I{if(da===E||3D.1m==1){c.6o("2f",s,E)}I{G="kS";1a+=c.3Z(s)}}}I{if(s.Q!=="3h"){c.6o("2f",s,E)}}}},c));if(G){if(G=="kS"){$(3D[0]).2e("<2f>"+1a+"</2f>");$(3D).1w()}I{if(G=="2f"){$(2f).2e(1a)}I{if(G=="o"){q o=c.$K.o().G(5B,"</2f>"+1a+"<2f>");c.$K.o(o);c.$K.1b("2f").1u(B(){if($.2b($(c).o())==""){$(c).1w()}})}}}}}c.1W()}I{q 1l=c.2N();if(1l.Q==="3F"){c.28();q o=$.2b($(1l).o());q 1I=$.2b(c.jP());o=o.G(/<V(.*?)id="1I-1L(.*?)<\\/V>/gi,"");if(o==1I){$(1l).2e($(1l).o()+"<br>")}I{c.l6("2L");q 2L=c.$K.1b("2L");2L.6z();q kW=c.$K.o().G("<2L></2L>",\'</2f><V id="1I-1L-1">\'+c.C.2i+"</V>"+1I+"<2f>");c.$K.o(kW);2L.1w();c.$K.1b("2f").1u(B(){if($.2b($(c).o())==""){$(c).1w()}})}c.1W();c.$K.1b("V#1I-1L-1").1i("id",E)}I{q 3G=c.bx("2f");q o=$(3G).o();q kV=["2r","ol","1n","3j","8c","3T","di","dl"];$.1u(kV,B(i,s){o=o.G(2c 2J("<"+s+"(.*?)>","gi"),"");o=o.G(2c 2J("</"+s+">","gi"),"")});q 7p=c.C.bg;$.1u(7p,B(i,s){o=o.G(2c 2J("<"+s+"(.*?)>","gi"),"");o=o.G(2c 2J("</"+s+">","gi"),"<br>")});$(3G).o(o);c.by(3G);q 4f=$(3G).4f();if(4f.1V()!=0&&4f[0].Q==="bC"){4f.1w()}}}c.1j()},oi:B(1i,2s){q 1X=c.3I();$(1X).2B(1i);c.1j()},oh:B(1i,2s){q 1X=c.3I();$(1X).1i(1i,2s);c.1j()},ok:B(5A){q 1X=c.3I();$(1X).1f(5A,"");c.4H(1X,"1o");c.1j()},om:B(5A,2s){q 1X=c.3I();$(1X).1f(5A,2s);c.1j()},oq:B(2S){q 1X=c.3I();$(1X).3c(2S);c.4H(1X,"1x");c.1j()},op:B(2S){q 1X=c.3I();$(1X).2z(2S);c.1j()},oo:B(2S){c.28();c.dr(B(J){$(J).3c(2S);c.4H(J,"1x")});c.1W();c.1j()},q9:B(2S){q 1t=c.3P();if(!$(1t).3v(2S)){c.93("2z",2S)}},oA:B(5A){c.28();c.dr(B(J){$(J).1f(5A,"");c.4H(J,"1o")});c.1W();c.1j()},oB:B(5A,2s){c.93("1f",5A,2s)},oN:B(1i){c.28();q O=c.3o(),J=c.8g(),1X=c.7r();if(O.4F||O.6D===O.8h&&J){1X=$(J)}$(1X).2B(1i);c.ld();c.1W();c.1j()},oM:B(1i,2s){c.93("1i",1i,2s)},93:B(1G,1i,2s){c.21();c.28();q O=c.3o();q el=c.8g();if((O.4F||O.6D===O.8h)&&el&&!c.7v(el)){$(el)[1G](1i,2s)}I{q 1P,dj=2s;kA(1i){5u"2A-1V":1P="8s";dj=4;5f;5u"2A-oP":1P="oQ";5f;5u"6s":1P="oS";5f;5u"8t-6s":1P="oL";5f}c.X.26(1P,E,dj);q aU=c.$K.1b("2A");$.1u(aU,$.M(B(i,s){c.kD(1G,s,1i,2s)},c))}c.1W();c.1j()},kD:B(1G,s,1i,2s){q L=$(s).L(),el;q 9x=c.aB();q 9k=$(L).Y();q 8Z=9x==9k;if(8Z&&L&&L[0].Q==="ds"&&L[0].oK.1m!=0){el=L;$(s).2e($(s).o())}I{el=$("<3W>").1h($(s).1Y());$(s).2e(el)}$(el)[1G](1i,2s);F el},dr:B(1c){q O=c.3o(),J=c.8g(),1X=c.7r(),4F;if(O.4F||O.6D===O.8h&&J){1X=$(J);4F=N}$.1u(1X,$.M(B(i,J){if(!4F&&J.Q!=="ds"){q 9x=c.aB();q 9k=$(J).L().Y();q 8Z=9x==9k;if(8Z&&J.4L.Q==="ds"&&!$(J.4L).3v("4d")){J=J.4L}I{F}}1c.5q(c,J)},c))},ld:B(){q $b4=c.$K.1b("3W");$.1u($b4,$.M(B(i,V){q $V=$(V);if($V.1i("1x")===1J&&$V.1i("1o")===1J){$V.1Y().l7()}},c))},l6:B(1d){c.28();c.X.26("8s",E,4);q aU=c.$K.1b("2A");q 2W;$.1u(aU,B(i,s){q el=$("<"+1d+"/>").1h($(s).1Y());$(s).2e(el);2W=el});c.1W();c.1j()},oE:B(1d){c.28();q dv=1d.oD();q 1X=c.7r();q L=$(c.2E()).L();$.1u(1X,B(i,s){if(s.Q===dv){c.bk(s)}});if(L&&L[0].Q===dv){c.bk(L)}c.1W();c.1j()},bk:B(el){$(el).2e($(el).1Y())},9i:B(o,1j){q 1t=c.3P();q L=1t.4L;c.4i();c.21();q $o=$("<12>").1h($.dn(o));o=$o.o();o=c.dq(o);$o=$("<12>").1h($.dn(o));q dp=c.2N();if($o.1Y().1m==1){q bf=$o.1Y()[0].Q;if(bf!="P"&&bf==dp.Q||bf=="6i"){$o=$("<12>").1h(o)}}if(c.C.1N){o=o.G(/<p(.*?)>([\\w\\W]*?)<\\/p>/gi,"$2<br>")}if(!c.C.1N&&$o.1Y().1m==1&&$o.1Y()[0].4D==3&&(c.cc().1m>2||(!1t||1t.Q=="ee"&&!L||L.Q=="kZ"))){o="<p>"+o+"</p>"}o=c.ad(o);if($o.1Y().1m>1&&dp||$o.1Y().is("p, :aS, 2r, ol, li, 12, 1n, 1g, 2f, 2q, dm, 2l, aS, 49, jj, jk")){if(c.1C("3t")){if(!c.8L()){c.X.1I.5i().do(o)}I{c.aL(o)}}I{c.X.26("5c",E,o)}}I{c.9O(o,E)}if(c.5R){c.42.2V($.M(B(){if(!c.C.1N){c.7G(c.$K.1Y().2W())}I{c.cb()}},c),1)}c.7H();c.8u();if(1j!==E){c.1j()}},9O:B(o,1j){o=c.ad(o);q 1q=c.29();if(1q.48&&1q.4V){q O=1q.48(0);O.aC();q el=X.4C("12");el.3Q=o;q 4k=X.cD(),J,5v;3w((J=el.8G)){5v=4k.7g(J)}O.3B(4k);if(5v){O=O.ag();O.ae(5v);O.5h(N);1q.4X();1q.5g(O)}}if(1j!==E){c.1j()}},oC:B(o){o=c.ad(o);q J=$(o);q 6c=X.4C("V");6c.3Q="\\7D";q O=c.3o();O.3B(6c);O.3B(J[0]);O.5h(E);q 1q=c.29();1q.4X();1q.5g(O);c.1j()},oF:B(o){q $o=$($.dn(o));if($o.1m){o=$o.Y()}c.4i();if(c.1C("3t")){if(!c.8L()){c.X.1I.5i().do(o)}I{c.aL(o)}}I{c.X.26("5c",E,o)}c.1j()},3B:B(J){J=J[0]||J;if(J.Q=="jo"){q 76="3W";q aD=J.jb;q 5y=2c 2J("<"+J.Q,"i");q 5K=aD.G(5y,"<"+76);5y=2c 2J("</"+J.Q,"i");5K=5K.G(5y,"</"+76);J=$(5K)[0]}q 1q=c.29();if(1q.48&&1q.4V){O=1q.48(0);O.aC();O.3B(J);O.oG(J);O.ae(J);1q.4X();1q.5g(O)}F J},js:B(e,J){q O;q x=e.jl,y=e.jm;if(c.X.ju){q 3X=c.X.ju(x,y);O=c.3o();O.86(3X.oJ,3X.2Y);O.5h(N);O.3B(J)}I{if(c.X.jv){O=c.X.jv(x,y);O.3B(J)}I{if(1E X.2v.jw!="1J"){O=c.X.2v.jw();O.jx(x,y);q bq=O.oI();bq.jx(x,y);O.oH("og",bq);O.3s()}}}},6U:B(2j,L){if(1E(L)!="1J"){2j=L}if(c.ck()){if(c.C.1N){q 1Y=$("<12>").1h($.2b(c.$K.o())).1Y();q 2W=1Y.2W()[0];if(2W.Q=="jo"&&2W.3Q==""){2W=1Y.4M()[0]}if(c.3Z(2W)!=c.3Z(2j)){F E}}I{if(c.$K.1Y().2W()[0]!==2j){F E}}c.bt(2j)}},bt:B(2j){c.21();if(c.C.1N===E){q J=$(c.C.58);$(2j).2I(J);c.4g(J)}I{q J=$(\'<V id="1I-1L-1">\'+c.C.2i+"</V>",c.X)[0];$(2j).2I(J);$(J).2I(c.C.2i);c.1W();c.$K.1b("V#1I-1L-1").2B("id")}},al:B(jp){c.28();q br="<br>";if(jp==N){br="<br><br>"}if(c.1C("31")){q V=$("<V>").o(c.C.2i);c.$K.1b("#1I-1L-1").3S(br).3S(V).3S(c.C.2i);c.jF(V[0]);V.1w();c.8b()}I{q L=c.2E();if(L&&L.Q==="A"){q 2Y=c.ch(L);q Y=$.2b($(L).Y()).G(/\\n\\r\\n/g,"");q 4P=Y.1m;if(2Y==4P){c.8b();q J=$(\'<V id="1I-1L-1">\'+c.C.2i+"</V>",c.X)[0];$(L).2I(J);$(J).3S(br+(c.1C("4s")?c.C.2i:""));c.1W();F N}}c.$K.1b("#1I-1L-1").3S(br+(c.1C("4s")?c.C.2i:""));c.1W()}},of:B(){c.al(N)},jr:B(2j){q J=$("<br>"+c.C.2i);$(2j).2e(J);c.4g(J)},j8:B(o){o=c.1c("nR",E,o);if(c.1C("3t")){q 2L=$.2b(o);if(2L.4G(/^<a(.*?)>(.*?)<\\/a>$/i)==0){o=o.G(/^<a(.*?)>(.*?)<\\/a>$/i,"$2")}}if(c.C.j7){q 2L=c.X.4C("12");o=o.G(/<br>|<\\/H[1-6]>|<\\/p>|<\\/12>/gi,"\\n");2L.3Q=o;o=2L.9Q||2L.dh;o=$.2b(o);o=o.G("\\n","<br>");o=c.9z(o);c.8W(o);F E}q 95=E;if(c.74("6h")){95=N;q 7p=c.C.bg;7p.3d("3j");7p.3d("1n");$.1u(7p,B(i,s){o=o.G(2c 2J("<"+s+"(.*?)>","gi"),"");o=o.G(2c 2J("</"+s+">","gi"),"<br>")})}if(c.74("6i")){o=c.j6(o);c.8W(o);F N}o=o.G(/<1B(.*?)v:nQ=(.*?)>/gi,"");o=o.G(/<p(.*?)1x="nP"([\\w\\W]*?)<\\/p>/gi,"<2r><li$2</li>");o=o.G(/<p(.*?)1x="nS"([\\w\\W]*?)<\\/p>/gi,"<li$2</li>");o=o.G(/<p(.*?)1x="nT"([\\w\\W]*?)<\\/p>/gi,"<li$2</li></2r>");o=o.G(/<p(.*?)1x="nV"([\\w\\W]*?)<\\/p>/gi,"<2r><li$2</li></2r>");o=o.G(/·/g,"");o=o.G(/<!--[\\s\\S]*?-->|<\\?(?:4I)?[\\s\\S]*?\\?>/gi,"");if(c.C.iO===N){o=o.G(/(&3u;){2,}/gi,"&3u;");o=o.G(/&3u;/gi," ")}o=o.G(/<b\\nU="iN-1v-1L(.*?)">([\\w\\W]*?)<\\/b>/gi,"$2");o=o.G(/<b(.*?)id="nO-iN-nN(.*?)">([\\w\\W]*?)<\\/b>/gi,"$3");o=o.G(/<V[^>]*(2A-1o: 3q; 2A-7o: 3m|2A-7o: 3m; 2A-1o: 3q)[^>]*>/gi,\'<V 1o="2A-7o: 3m;"><V 1o="2A-1o: 3q;">\');o=o.G(/<V[^>]*2A-1o: 3q[^>]*>/gi,\'<V 1o="2A-1o: 3q;">\');o=o.G(/<V[^>]*2A-7o: 3m[^>]*>/gi,\'<V 1o="2A-7o: 3m;">\');o=o.G(/<V[^>]*Y-bZ: 4K[^>]*>/gi,\'<V 1o="Y-bZ: 4K;">\');o=o.G(/<1g>\\nF*<\\/1g>/gi,"[1g]");o=o.G(/<1g>&3u;<\\/1g>/gi,"[1g]");o=o.G(/<1g><br><\\/1g>/gi,"[1g]");o=o.G(/<1g(.*?)9W="(.*?)"(.*?)>([\\w\\W]*?)<\\/1g>/gi,\'[1g 9W="$2"]$4[/1g]\');o=o.G(/<1g(.*?)9X="(.*?)"(.*?)>([\\w\\W]*?)<\\/1g>/gi,\'[1g 9X="$2"]$4[/1g]\');o=o.G(/<a(.*?)1S="(.*?)"(.*?)>([\\w\\W]*?)<\\/a>/gi,\'[a 1S="$2"]$4[/a]\');o=o.G(/<1Q(.*?)>([\\w\\W]*?)<\\/1Q>/gi,"[1Q$1]$2[/1Q]");o=o.G(/<3y(.*?)>([\\w\\W]*?)<\\/3y>/gi,"[3y$1]$2[/3y]");o=o.G(/<5r(.*?)>([\\w\\W]*?)<\\/5r>/gi,"[5r$1]$2[/5r]");o=o.G(/<4S(.*?)>([\\w\\W]*?)<\\/4S>/gi,"[4S$1]$2[/4S]");o=o.G(/<3M(.*?)>([\\w\\W]*?)<\\/3M>/gi,"[3M$1]$2[/3M]");o=o.G(/<2F(.*?)>/gi,"[2F$1]");o=o.G(/<1B(.*?)>/gi,"[1B$1]");o=o.G(/ 1x="(.*?)"/gi,"");o=o.G(/<(\\w+)([\\w\\W]*?)>/gi,"<$1>");if(c.C.1N){o=o.G(/<3V><\\/3V>/gi,"");o=o.G(/<u><\\/u>/gi,"");if(c.C.bV){o=o.G(/<2A(.*?)>([\\w\\W]*?)<\\/2A>/gi,"$2")}o=o.G(/<[^\\/>][^>]*>(\\s*|\\t*|\\n*|&3u;|<br>)<\\/[^>]+>/gi,"<br>")}I{o=o.G(/<[^\\/>][^>]*>(\\s*|\\t*|\\n*|&3u;|<br>)<\\/[^>]+>/gi,"")}o=o.G(/<12>\\s*?\\t*?\\n*?(<2r>|<ol>|<p>)/gi,"$1");o=o.G(/\\[1g 9W="(.*?)"\\]([\\w\\W]*?)\\[\\/1g\\]/gi,\'<1g 9W="$1">$2</1g>\');o=o.G(/\\[1g 9X="(.*?)"\\]([\\w\\W]*?)\\[\\/1g\\]/gi,\'<1g 9X="$1">$2</1g>\');o=o.G(/\\[1g\\]/gi,"<1g>&3u;</1g>");o=o.G(/\\[a 1S="(.*?)"\\]([\\w\\W]*?)\\[\\/a\\]/gi,\'<a 1S="$1">$2</a>\');o=o.G(/\\[1Q(.*?)\\]([\\w\\W]*?)\\[\\/1Q\\]/gi,"<1Q$1>$2</1Q>");o=o.G(/\\[3y(.*?)\\]([\\w\\W]*?)\\[\\/3y\\]/gi,"<3y$1>$2</3y>");o=o.G(/\\[5r(.*?)\\]([\\w\\W]*?)\\[\\/5r\\]/gi,"<5r$1>$2</5r>");o=o.G(/\\[4S(.*?)\\]([\\w\\W]*?)\\[\\/4S\\]/gi,"<4S$1>$2</4S>");o=o.G(/\\[3M(.*?)\\]([\\w\\W]*?)\\[\\/3M\\]/gi,"<3M$1>$2</3M>");o=o.G(/\\[2F(.*?)\\]/gi,"<2F$1>");o=o.G(/\\[1B(.*?)\\]/gi,"<1B$1>");if(c.C.9a){o=o.G(/<12(.*?)>([\\w\\W]*?)<\\/12>/gi,"<p>$2</p>");o=o.G(/<\\/12><p>/gi,"<p>");o=o.G(/<\\/p><\\/12>/gi,"</p>");o=o.G(/<p><\\/p>/gi,"<br />")}I{o=o.G(/<12><\\/12>/gi,"<br />")}o=c.8d(o);if(c.74("3h")){o=o.G(/<p>([\\w\\W]*?)<\\/p>/gi,"$1<br>")}I{if(95===E){o=c.9z(o)}}o=o.G(/<V(.*?)>([\\w\\W]*?)<\\/V>/gi,"$2");o=o.G(/<1B>/gi,"");o=o.G(/<[^\\/>][^>][^1B|2F|1v|1g][^<]*>(\\s*|\\t*|\\n*| |<br>)<\\/[^>]+>/gi,"");o=o.G(/\\n{3,}/gi,"\\n");o=o.G(/<p><p>/gi,"<p>");o=o.G(/<\\/p><\\/p>/gi,"</p>");o=o.G(/<li>(\\s*|\\t*|\\n*)<p>/gi,"<li>");o=o.G(/<\\/p>(\\s*|\\t*|\\n*)<\\/li>/gi,"</li>");if(c.C.1N===N){o=o.G(/<p(.*?)>([\\w\\W]*?)<\\/p>/gi,"$2<br>")}o=o.G(/<[^\\/>][^>][^1B|2F|1v|1g][^<]*>(\\s*|\\t*|\\n*| |<br>)<\\/[^>]+>/gi,"");o=o.G(/<1B 3p="4s-nJ-1K\\:\\/\\/(.*?)"(.*?)>/gi,"");o=o.G(/<1g(.*?)>(\\s*|\\t*|\\n*)<p>([\\w\\W]*?)<\\/p>(\\s*|\\t*|\\n*)<\\/1g>/gi,"<1g$1>$3</1g>");if(c.C.9a){o=o.G(/<12(.*?)>([\\w\\W]*?)<\\/12>/gi,"$2");o=o.G(/<12(.*?)>([\\w\\W]*?)<\\/12>/gi,"$2")}c.c6=E;if(c.1C("31")){if(c.C.9p){q 2x=o.1U(/<1B 3p="1a:T(.*?)"(.*?)>/gi);if(2x!==2G){c.c6=2x;3z(k in 2x){q 1B=2x[k].G("<1B",\'<1B 1a-31-9v-T="\'+k+\'" \');o=o.G(2x[k],1B)}}}3w(/<br>$/gi.4e(o)){o=o.G(/<br>$/gi,"")}}o=o.G(/<p>•([\\w\\W]*?)<\\/p>/gi,"<li>$1</li>");if(c.1C("3t")){3w(/<2A>([\\w\\W]*?)<\\/2A>/gi.4e(o)){o=o.G(/<2A>([\\w\\W]*?)<\\/2A>/gi,"$1")}}if(95===E){o=o.G(/<1g(.*?)>([\\w\\W]*?)<p(.*?)>([\\w\\W]*?)<\\/1g>/gi,"<1g$1>$2$4</1g>");o=o.G(/<1g(.*?)>([\\w\\W]*?)<\\/p>([\\w\\W]*?)<\\/1g>/gi,"<1g$1>$2$3</1g>");o=o.G(/<1g(.*?)>([\\w\\W]*?)<p(.*?)>([\\w\\W]*?)<\\/1g>/gi,"<1g$1>$2$4</1g>");o=o.G(/<1g(.*?)>([\\w\\W]*?)<\\/p>([\\w\\W]*?)<\\/1g>/gi,"<1g$1>$2$3</1g>")}o=o.G(/\\n/g," ");o=o.G(/<p>\\n?<li>/gi,"<li>");c.8W(o)},j6:B(s){s=s.G(/<br>|<\\/H[1-6]>|<\\/p>|<\\/12>/gi,"\\n");q 2L=c.X.4C("12");2L.3Q=s;F c.ce(2L.9Q||2L.dh)},8W:B(o){o=c.1c("nM",E,o);if(c.5R){c.$K.o(o);c.bA();c.cb();c.1j()}I{c.9i(o)}c.5R=E;2V($.M(B(){c.8j=E;if(c.1C("31")){c.$K.1b("p:6z").1w()}if(c.c6!==E){c.j0()}},c),3O);if(c.C.4Y&&c.c7!==N){$(c.X.2v).3e(c.9t)}I{c.$K.3e(c.9t)}},c9:B(4v){if(c.C.3H!==E&&1E c.C.3H==="3M"){$.1u(c.C.3H,$.M(B(k,v){if(v!=2G&&v.43().44("#")===0){v=$(v).1p()}4v[k]=v},c))}F 4v},j0:B(){q jy=c.$K.1b("1B[1a-31-9v-T]");$.1u(jy,$.M(B(i,s){q $s=$(s);q 2Q=s.3p.4o(",");q 4v={c3:2Q[0].4o(";")[0].4o(":")[1],1a:2Q[1]};4v=c.c9(4v);$.7R(c.C.bT,4v,$.M(B(1a){q 1M=(1E 1a==="8I"?$.8J(1a):1a);$s.1i("3p",1M.6e);$s.2B("1a-31-9v-T");c.1j();c.1c("3Y",$s,1M)},c))},c))},jz:B(e){q 9l=e.1O.9l;q 2Q=9l.4o(",");q 4v={c3:2Q[0].4o(";")[0].4o(":")[1],1a:2Q[1]};if(c.C.9p){4v=c.c9(4v);$.7R(c.C.bT,4v,$.M(B(1a){q 1M=(1E 1a==="8I"?$.8J(1a):1a);q o=\'<1B 3p="\'+1M.6e+\'" id="kc-T-1L" />\';c.26("5c",o,E);q T=$(c.$K.1b("1B#kc-T-1L"));if(T.1m){T.2B("id")}I{T=E}c.1j();if(T){c.1c("3Y",T,1M)}},c))}I{c.9i(\'<1B 3p="\'+9l+\'" />\')}},21:B(28){if(28!==E){c.28()}c.C.3E.3d(c.$K.o());if(28!==E){c.8b("3E")}},k7:B(){if(c.C.3E.1m===0){c.4i();F}c.28();c.C.8A.3d(c.$K.o());c.1W(E,N);c.$K.o(c.C.3E.k2());c.1W();2V($.M(c.7H,c),3O)},k6:B(){if(c.C.8A.1m===0){c.4i();F E}c.28();c.C.3E.3d(c.$K.o());c.1W(E,N);c.$K.o(c.C.8A.k2());c.1W(N);2V($.M(c.7H,c),4)},7H:B(){c.4T();if(c.C.5m){c.5m()}},5m:B(){c.$K.1b("a").on("23",$.M(c.k4,c));c.$K.on("23.U",$.M(B(e){c.7E(e)},c));$(X).on("23.U",$.M(B(e){c.7E(e)},c))},4T:B(){if(c.C.4T===E){F E}c.$K.1b("1B").1u($.M(B(i,1z){if(c.1C("3t")){$(1z).1i("oa","on")}q L=$(1z).L();if(!L.3v("bS")&&!L.3v("bD")){c.kU(1z)}},c));c.$K.1b(".bD, .bS").on("23",$.M(c.o9,c))},k4:B(e){q $1r=$(e.1O);q L=$(e.1O).L();if(L.3v("bS")||L.3v("bD")){F}if($1r.1V()==0||$1r[0].Q!=="A"){F}q 3X=$1r.2Y();if(c.C.1Q){q bE=c.$2Z.2Y();3X.1T=bE.1T+(3X.1T-$(c.X).3e());3X.1s+=bE.1s}q 4E=$(\'<V 1x="U-1r-4E"></V>\');q 1S=$1r.1i("1S");if(1S===1J){1S=""}if(1S.1m>24){1S=1S.aQ(0,24)+"..."}q k5=$(\'<a 1S="\'+$1r.1i("1S")+\'" 1O="6y">\'+1S+"</a>").on("23",$.M(B(e){c.7E(E)},c));q kd=$(\'<a 1S="#">\'+c.C.1F.8p+"</a>").on("23",$.M(B(e){e.2u();c.9N();c.7E(E)},c));q ke=$(\'<a 1S="#">\'+c.C.1F.6F+"</a>").on("23",$.M(B(e){e.2u();c.26("6F");c.7E(E)},c));4E.1h(k5);4E.1h(" | ");4E.1h(kd);4E.1h(" | ");4E.1h(ke);4E.1f({1T:(3X.1T+20)+"px",1s:3X.1s+"px"});$(".U-1r-4E").1w();$("2v").1h(4E)},7E:B(e){if(e!==E&&e.1O.Q=="A"){F E}$(".U-1r-4E").1w()},29:B(){if(!c.C.41){F c.X.29()}I{if(!c.C.1Q){F 41.29()}I{F 41.29(c.$2Z[0])}}},3o:B(){if(!c.C.41){if(c.X.29){q 1q=c.29();if(1q.48&&1q.4V){F 1q.48(0)}}F c.X.5i()}I{if(!c.C.1Q){F 41.5i()}I{F 41.5i(c.bG())}}},by:B(J){c.jH(J)},4g:B(J){c.8e(J[0]||J,0,2G,0)},7G:B(J){c.8e(J[0]||J,1,2G,1)},8e:B(4Q,bB,87,b5){if(87==2G){87=4Q}if(b5==2G){b5=bB}q 1q=c.29();if(!1q){F}if(4Q.Q=="P"&&4Q.3Q==""){4Q.3Q=c.C.2i}if(4Q.Q=="bC"&&c.C.1N===E){q 5U=$(c.C.58)[0];$(4Q).2e(5U);4Q=5U;87=4Q}q O=c.3o();O.86(4Q,bB);O.85(87,b5);eG{1q.4X()}fe(e){}1q.5g(O)},bx:B(1d){1d=1d.3N();q 1l=c.2N();if(1l){q 3G=c.kf(1l,1d);c.1j();F 3G}q 1q=c.29();q O=1q.48(0);q 3G=X.4C(1d);3G.7g(O.oe());O.3B(3G);c.by(3G);F 3G},od:B(){q O=c.3o();O.aM(c.$K[0]);q 1q=c.29();1q.4X();1q.5g(O)},bA:B(){c.29().4X()},ch:B(2j){q bH=0;q O=c.3o();q ba=O.ag();ba.aM(2j);ba.85(O.8h,O.kj);bH=$.2b(ba.43()).1m;F bH},hR:B(){F 2c bI(c.29().48(0))},jH:B(el,2y,3l){if(1E 3l==="1J"){3l=2y}el=el[0]||el;q O=c.3o();O.aM(el);q 4B=c.bN(el);q aq=E;q 7J=0,7K;if(4B.1m==1&&2y){O.86(4B[0],2y);O.85(4B[0],3l)}I{3z(q i=0,88;88=4B[i++];){7K=7J+88.1m;if(!aq&&2y>=7J&&(2y<7K||(2y==7K&&i<4B.1m))){O.86(88,2y-7J);aq=N}if(aq&&3l<=7K){O.85(88,3l-7J);5f}7J=7K}}q 1q=c.29();1q.4X();1q.5g(O)},jF:B(J){c.$K.2h();J=J[0]||J;q O=c.X.5i();q 2y=1;q 3l=-1;O.86(J,2y);O.85(J,3l+2);q 1I=c.42.29();q bR=c.X.5i();q av=c.X.82("\\7D");$(J).2I(av);bR.ae(av);1I.4X();1I.5g(bR);$(av).1w()},bN:B(J){q 4B=[];if(J.4D==3){4B.3d(J)}I{q 4c=J.8F;3z(q i=0,4P=4c.1m;i<4P;++i){4B.3d.bO(4B,c.bN(4c[i]))}}F 4B},3P:B(){q el=E;q 1q=c.29();if(1q&&1q.4V>0){el=1q.48(0).6D}F c.4j(el)},2E:B(1z){1z=1z||c.3P();if(1z){F c.4j($(1z).L()[0])}I{F E}},2N:B(J){if(1E J==="1J"){J=c.3P()}3w(J){if(c.7v(J)){if($(J).3v("4d")){F E}F J}J=J.4L}F E},3I:B(1X){q 89=[];if(1E 1X=="1J"){q O=c.3o();if(O&&O.4F===N){F[c.2N()]}q 1X=c.7r(O)}$.1u(1X,$.M(B(i,J){if(c.C.1Q===E&&$(J).8B("12.4d").1V()==0){F E}if(c.7v(J)){89.3d(J)}},c));if(89.1m===0){89=[c.2N()]}F 89},o5:B(J){if(J.4D!=1){F E}F!c.ax.4e(J.jY)},7v:B(J){F J.4D==1&&c.ax.4e(J.jY)},bM:B(1d){F c.ax.4e(1d)},7r:B(O,1d){if(1E O=="1J"||O==E){q O=c.3o()}if(O&&O.4F===N){if(1E 1d==="1J"&&c.bM(1d)){q 1l=c.2N();if(1l.Q==1d){F[1l]}I{F[]}}I{F[c.3P()]}}q 1X=[],4x=[];q 1q=c.X.29();if(!1q.o4){1X=c.cc(1q.48(0))}$.1u(1X,$.M(B(i,J){if(c.C.1Q===E&&$(J).8B("12.4d").1V()==0){F E}if(1E 1d==="1J"){if($.2b(J.9Q)!=""){4x.3d(J)}}I{if(J.Q==1d){4x.3d(J)}}},c));if(4x.1m==0){if(1E 1d==="1J"&&c.bM(1d)){q 1l=c.2N();if(1l.Q==1d){F 4x.3d(1l)}I{F[]}}I{4x.3d(c.3P())}}q 2W=4x[4x.1m-1];if(c.7v(2W)){4x=4x.jR(0,-1)}F 4x},8g:B(J){if(!J){J=c.3P()}3w(J){if(J.4D==1){if($(J).3v("4d")){F E}F J}J=J.4L}F E},cc:B(O){O=O||c.3o();q J=O.6D;q eK=O.8h;if(J==eK){F[J]}q 9m=[];3w(J&&J!=eK){9m.3d(J=c.jQ(J))}J=O.6D;3w(J&&J!=O.o3){9m.jS(J);J=J.4L}F 9m},jQ:B(J){if(J.oT()){F J.8G}I{3w(J&&!J.jO){J=J.4L}if(!J){F 2G}F J.jO}},aB:B(){F c.29().43()},jP:B(){q o="";q 1q=c.29();if(1q.4V){q eF=c.X.4C("12");q 4P=1q.4V;3z(q i=0;i<4P;++i){eF.7g(1q.48(i).oU())}o=eF.3Q}F c.eE(o)},28:B(){if(!c.7h()){c.4i()}if(!c.C.41){c.jN(c.3o())}I{c.5S=41.pL()}},jN:B(O,1w){if(!O){F}q 5O=$(\'<V id="1I-1L-1" 1x="U-1I-1L">\'+c.C.2i+"</V>",c.X)[0];q 8f=$(\'<V id="1I-1L-2" 1x="U-1I-1L">\'+c.C.2i+"</V>",c.X)[0];if(O.4F===N){c.ai(O,5O,N)}I{c.ai(O,5O,N);c.ai(O,8f,E)}c.5S=c.$K.o();c.1W(E,E)},ai:B(O,J,1G){q ar=O.ag();eG{ar.5h(1G);ar.3B(J);ar.pJ()}fe(e){q o=c.C.58;if(c.C.1N){o="<br>"}c.$K.6d(o);c.2h()}},1W:B(G,1w){if(!c.C.41){if(G===N&&c.5S){c.$K.o(c.5S)}q 5O=c.$K.1b("V#1I-1L-1");q 8f=c.$K.1b("V#1I-1L-2");if(c.1C("31")){c.$K.2h()}I{if(!c.7h()){c.4i()}}if(5O.1m!=0&&8f.1m!=0){c.8e(5O[0],0,8f[0],0)}I{if(5O.1m!=0){c.8e(5O[0],0,2G,0)}}if(1w!==E){c.8b();c.5S=E}}I{41.pN(c.5S)}},8b:B(1G){if(!c.C.41){$.1u(c.$K.1b("V.U-1I-1L"),B(){q o=$.2b($(c).o().G(/[^\\pP-\\pO]/g,""));if(o==""){$(c).1w()}I{$(c).2B("1x").2B("id")}})}I{41.pI(c.5S)}},ko:B(){c.28();c.62(c.C.1F.1n,c.C.hf,pH,$.M(B(){$("#hv").23($.M(c.km,c));2V(B(){$("#eX").2h()},5k)},c))},km:B(){c.21(E);q aF=$("#eX").1p(),aJ=$("#hx").1p(),$e2=$("<12></12>"),ez=4u.kg(4u.kh()*k0),$1n=$(\'<1n id="1n\'+ez+\'"><8c></8c></1n>\'),i,$aZ,z,$b1;3z(i=0;i<aF;i++){$aZ=$("<3j></3j>");3z(z=0;z<aJ;z++){$b1=$("<1g>"+c.C.2i+"</1g>");if(i===0&&z===0){$b1.1h(\'<V id="1I-1L-1">\'+c.C.2i+"</V>")}$($aZ).1h($b1)}$1n.1h($aZ)}$e2.1h($1n);q o=$e2.o();if(c.C.1N===E&&c.1C("31")){o+="<p>"+c.C.2i+"</p>"}c.3g();c.1W();q 1t=c.2N()||c.3P();if(1t&&1t.Q!="ee"){if(1t.Q=="3h"){q 1t=$(1t).2g("2r, ol")}$(1t).2I(o)}I{c.9O(o,E)}c.1W();q 1n=c.$K.1b("#1n"+ez);c.8r();1n.1b("V#1I-1L-1, 3W#1I-1L-1").1w();1n.2B("id");c.1j()},ka:B(){q $1n=$(c.2E()).2g("1n");if(!c.4j($1n)){F E}if($1n.1V()==0){F E}c.21();$1n.1w();c.1j()},k8:B(){q L=c.2E();q $1n=$(L).2g("1n");if(!c.4j($1n)){F E}if($1n.1V()==0){F E}c.21();q $4z=$(L).2g("3j");q $eg=$4z.4M().1m?$4z.4M():$4z.4f();if($eg.1m){q $ek=$eg.4c("1g").j5();if($ek.1m){$ek.6d(\'<V id="1I-1L-1">\'+c.C.2i+"</V>")}}$4z.1w();c.1W();$1n.1b("V#1I-1L-1").1w();c.1j()},iY:B(){q L=c.2E();q $1n=$(L).2g("1n");if(!c.4j($1n)){F E}if($1n.1V()==0){F E}c.21();q $5Z=$(L).2g("1g");if(!($5Z.is("1g"))){$5Z=$5Z.2g("1g")}q 2K=$5Z.2R(0).pC;$1n.1b("3j").1u($.M(B(i,1z){q iX=2K-1<0?2K+1:2K-1;if(i===0){$(1z).1b("1g").eq(iX).6d(\'<V id="1I-1L-1">\'+c.C.2i+"</V>")}$(1z).1b("1g").eq(2K).1w()},c));c.1W();$1n.1b("V#1I-1L-1").1w();c.1j()},j2:B(){q $1n=$(c.2E()).2g("1n");if(!c.4j($1n)){F E}if($1n.1V()==0){F E}c.21();if($1n.1b("3T").1V()!==0){c.ey()}I{q 3j=$1n.1b("3j").j5().6q();3j.1b("1g").o(c.C.2i);$3T=$("<3T></3T>");$3T.1h(3j);$1n.6d($3T);c.1j()}},ey:B(){q $1n=$(c.2E()).2g("1n");if(!c.4j($1n)){F E}q $3T=$1n.1b("3T");if($3T.1V()==0){F E}c.21();$3T.1w();c.1j()},j3:B(){c.ew("3S")},iV:B(){c.ew("2I")},iM:B(){c.e3("3S")},iL:B(){c.e3("2I")},ew:B(1G){q $1n=$(c.2E()).2g("1n");if(!c.4j($1n)){F E}if($1n.1V()==0){F E}c.21();q $4z=$(c.2E()).2g("3j");q 9V=$4z.6q();9V.1b("1g").o(c.C.2i);if(1G==="2I"){$4z.2I(9V)}I{$4z.3S(9V)}c.1j()},e3:B(1G){q L=c.2E();q $1n=$(L).2g("1n");if(!c.4j($1n)){F E}if($1n.1V()==0){F E}c.21();q 2K=0;q 1t=c.3P();q $4z=$(1t).2g("3j");q $5Z=$(1t).2g("1g");$4z.1b("1g").1u($.M(B(i,1z){if($(1z)[0]===$5Z[0]){2K=i}},c));$1n.1b("3j").1u($.M(B(i,1z){q $1t=$(1z).1b("1g").eq(2K);q 1g=$1t.6q();1g.o(c.C.2i);1G==="2I"?$1t.2I(1g):$1t.3S(1g)},c));c.1j()},iI:B(){c.28();c.62(c.C.1F.3y,c.C.hB,pR,$.M(B(){$("#hk").23($.M(c.iJ,c));2V(B(){$("#eD").2h()},5k)},c))},iJ:B(){q 1a=$("#eD").1p();1a=c.8d(1a);q 5j=\'<1Q 2p="cT" 22="hG" 3p="\',7B=\'" cS="0" hE></1Q>\';if(1a.1U(8N)){1a=1a.G(8N,5j+"//aA.cO.7w/4S/$1"+7B)}I{if(1a.1U(8Q)){1a=1a.G(8Q,5j+"//hp.cI.7w/3y/$2"+7B)}}c.1W();q 1t=c.2N()||c.3P();if(1t){$(1t).2I(1a)}I{c.9O(1a,E)}c.1j();c.3g()},9N:B(){c.28();q 1c=$.M(B(){if(c.C.ec!==E){c.9H={};q 4J=c;$.l9(c.C.ec,B(1a){q $3s=$("#U-gU-gL");$3s.o("");$.1u(1a,B(1k,1p){4J.9H[1k]=1p;$3s.1h($("<4b>").1p(1k).o(1p.2m))});$3s.on("68",B(){q 1k=$(c).1p();q 2m="",1K="";if(1k!=0){2m=4J.9H[1k].2m;1K=4J.9H[1k].1K}$("#7Z").1p(1K);$("#aj").1p(2m)});$3s.2M()})}c.6K=E;q 1q=c.29();q 1K="",Y="",1O="";q 1z=c.2E();q 5U=$(1z).L().2R(0);if(5U&&5U.Q==="A"){1z=5U}if(1z&&1z.Q==="A"){1K=1z.1S;Y=$(1z).Y();1O=1z.1O;c.6K=1z}I{Y=1q.43()}$("#aj").1p(Y);q iT=iS.iR.1S.G(/\\/$/i,"");1K=1K.G(iT,"");1K=1K.G(/^\\/#/,"#");1K=1K.G("eH:","");if(c.C.8a===E){q re=2c 2J("^(aI|am|5n)://"+iS.iR.q2,"i");1K=1K.G(re,"")}$("#7Z").1p(1K);if(1O==="6y"){$("#6S").9D("9K",N)}c.eJ=E;$("#he").on("23",$.M(c.iQ,c));2V(B(){$("#7Z").2h()},5k)},c);c.62(c.C.1F.1r,c.C.gX,q1,1c)},iQ:B(){if(c.eJ){F}c.eJ=N;q 1O="",eZ="";q 1r=$("#7Z").1p();q Y=$("#aj").1p();if(1r.4G("@")!=-1&&/(aI|am|5n):\\/\\//i.4e(1r)===E){1r="eH:"+1r}I{if(1r.4G("#")!=0){if($("#6S").9D("9K")){1O=\' 1O="6y"\';eZ="6y"}q eO="((q4--)?[a-eL-9]+(-[a-eL-9]+)*.)+[a-z]{2,}";q re=2c 2J("^(aI|am|5n)://"+eO,"i");q jt=2c 2J("^"+eO,"i");if(1r.4G(re)==-1&&1r.4G(jt)==0&&c.C.8a){1r=c.C.8a+1r}}}Y=Y.G(/<|>/g,"");q eY="&3u;";if(c.1C("31")){eY="&3u;"}c.j9(\'<a 1S="\'+1r+\'"\'+1O+">"+Y+"</a>"+eY,$.2b(Y),1r,eZ)},j9:B(a,Y,1r,1O){c.1W();if(Y!==""){if(c.6K){c.21();$(c.6K).Y(Y).1i("1S",1r);if(1O!==""){$(c.6K).1i("1O",1O)}I{$(c.6K).2B("1O")}}I{q $a=$(a).2z("U-dZ-1r");c.2o("5c",c.3Z($a),E);q 1r=c.$K.1b("a.U-dZ-1r");1r.2B("1o").3c("U-dZ-1r").1u(B(){if(c.2S==""){$(c).2B("1x")}})}c.1j()}2V($.M(B(){if(c.C.5m){c.5m()}},c),5);c.3g()},jg:B(){c.28();q 1c=$.M(B(){q 1q=c.29();q Y="";if(c.cw()){Y=1q.Y}I{Y=1q.43()}$("#e6").1p(Y);if(!c.5a()&&!c.d6()){c.bP("#5p",{1K:c.C.84,3H:c.C.3H,4h:$.M(c.ex,c),3U:$.M(B(71,1M){c.1c("kq",1M)},c),6k:c.C.e5})}c.et("5p",{4l:N,1K:c.C.84,4h:$.M(c.ex,c),3U:$.M(B(71,1M){c.1c("kq",1M)},c)})},c);c.62(c.C.1F.25,c.C.hW,cT,1c)},ex:B(1M){c.1W();if(1M!==E){q Y=$("#e6").1p();if(Y===""){Y=1M.ed}q 1r=\'<a 1S="\'+1M.6e+\'" id="6e-1L">\'+Y+"</a>";if(c.1C("4s")&&!!c.42.d5){1r=1r+"&3u;"}c.26("5c",1r,E);q 83=$(c.$K.1b("a#6e-1L"));if(83.1V()!=0){83.2B("id")}I{83=E}c.1j();c.1c("84",83,1M)}c.3g()},l4:B(){c.28();q 1c=$.M(B(){if(c.C.6L){$.l9(c.C.6L,$.M(B(1a){q 6R={},6G=0;$.1u(1a,$.M(B(1k,1p){if(1E 1p.aV!=="1J"){6G++;6R[1p.aV]=6G}},c));q 9j=E;$.1u(1a,$.M(B(1k,1p){q eh="";if(1E 1p.1e!=="1J"){eh=1p.1e}q b0=0;if(!$.l8(6R)&&1E 1p.aV!=="1J"){b0=6R[1p.aV];if(9j===E){9j=".6T"+b0}}q 1B=$(\'<1B 3p="\'+1p.q6+\'" 1x="6T 6T\'+b0+\'" 4m="\'+1p.T+\'" 1e="\'+eh+\'" />\');$("#eA").1h(1B);$(1B).23($.M(c.fI,c))},c));if(!$.l8(6R)){$(".6T").2U();$(9j).2M();q l0=B(e){$(".6T").2U();$(".6T"+$(e.1O).1p()).2M()};q 3s=$(\'<3s id="q0">\');$.1u(6R,B(k,v){3s.1h($(\'<4b 2s="\'+v+\'">\'+k+"</4b>"))});$("#eA").3S(3s);3s.68(l0)}},c))}I{$("#U-52-6v-2").1w()}if(c.C.3Y||c.C.5Q){if(!c.5a()&&!c.d6()&&c.C.5Q===E){if($("#5p").1m){c.bP("#5p",{1K:c.C.3Y,3H:c.C.3H,4h:$.M(c.eN,c),3U:$.M(B(71,1M){c.1c("dV",1M)},c),6k:c.C.an})}}if(c.C.5Q===E){c.et("5p",{4l:N,1K:c.C.3Y,4h:$.M(c.eN,c),3U:$.M(B(71,1M){c.1c("dV",1M)},c)})}I{$("#5p").on("68.U",$.M(c.gD,c))}}I{$(".5D").2U();if(!c.C.6L){$("#5E").1w();$("#iq").2M()}I{$("#U-52-6v-1").1w();$("#U-52-6v-2").2z("6I");$("#ib").2M()}}if(!c.C.kC&&(c.C.3Y||c.C.6L)){$("#U-52-6v-3").2U()}$("#gZ").23($.M(c.fq,c));if(!c.C.3Y&&!c.C.6L){2V(B(){$("#6C").2h()},5k)}},c);c.62(c.C.1F.T,c.C.iD,pT,1c)},gn:B(T){q $el=T;q L=$el.L().L();q 1c=$.M(B(){$("#e0").1p($el.1i("8n"));$("#pS").1i("1S",$el.1i("3p"));if($el.1f("3f")=="1l"&&$el.1f("5J")=="3r"){$("#bl").1p("6O")}I{$("#bl").1p($el.1f("5J"))}if($(L).2R(0).Q==="A"){$("#6C").1p($(L).1i("1S"));if($(L).1i("1O")=="6y"){$("#6S").9D("9K",N)}}$("#iy").23($.M(B(){c.dX($el)},c));$("#iA").23($.M(B(){c.kL($el)},c))},c);c.62(c.C.1F.8p,c.C.hL,pV,1c)},dX:B(el){q 9b=$(el).L().L();q L=$(el).L();q a7=E;if(9b.1m&&9b[0].Q==="A"){a7=N;$(9b).1w()}I{if(L.1m&&L[0].Q==="A"){a7=N;$(L).1w()}I{$(el).1w()}}if(L.1m&&L[0].Q==="P"){c.4i();if(a7===E){c.4g(L)}}c.1c("pX",el);c.3g();c.1j()},kL:B(el){c.6t(E);q $el=$(el);q L=$el.L();$el.1i("8n",$("#e0").1p());q 9E=$("#bl").1p();q 2H="";if(9E==="1s"){2H="0 "+c.C.8i+" "+c.C.8i+" 0";$el.1f({"5J":"1s",2H:2H})}I{if(9E==="4Z"){2H="0 0 "+c.C.8i+" "+c.C.8i+"";$el.1f({"5J":"4Z",2H:2H})}I{if(9E==="6O"){$el.1f({"5J":"",3f:"1l",2H:"4l"})}I{$el.1f({"5J":"",3f:"",2H:""})}}}q 1r=$.2b($("#6C").1p());if(1r!==""){q 1O=E;if($("#6S").9D("9K")){1O=N}if(L.2R(0).Q!=="A"){q a=$(\'<a 1S="\'+1r+\'">\'+c.3Z(el)+"</a>");if(1O){a.1i("1O","6y")}$el.2e(a)}I{L.1i("1S",1r);if(1O){L.1i("1O","6y")}I{L.2B("1O")}}}I{if(L.2R(0).Q==="A"){L.2e(c.3Z(el))}}c.3g();c.4T();c.1j()},6t:B(e){if(e!==E&&$(e.1O).L().1V()!=0&&$(e.1O).L()[0].id==="U-T-2C"){F E}q 2X=c.$K.1b("#U-T-2C");if(2X.1V()==0){F E}c.$K.1b("#U-T-es, #U-T-ej").1w();2X.1b("1B").1f({5M:2X[0].1o.5M,9c:2X[0].1o.9c,5L:2X[0].1o.5L,9d:2X[0].1o.9d});2X.1f("2H","");2X.1b("1B").1f("gp","");2X.2e(B(){F $(c).1Y()});$(X).3b("23.U-T-8m-2U");c.$K.3b("23.U-T-8m-2U");c.$K.3b("5T.U-T-e9");c.1j()},kU:B(T){q $T=$(T);$T.on("9J",$.M(B(){c.6t(E)},c));$T.on("p6",$.M(B(){c.$K.on("6w.U-T-kv-6w",$.M(B(){2V($.M(B(){c.4T();c.$K.3b("6w.U-T-kv-6w");c.1j()},c),1)},c))},c));$T.on("23",$.M(B(e){if(c.$K.1b("#U-T-2C").1V()!=0){F E}q p5=E,a6,a5,eM=$T.2p()/$T.22(),g9=20,p8=10;q 5z=c.gA($T);q aa=E;if(5z!==E){5z.on("9J",B(e){aa=N;e.2u();eM=$T.2p()/$T.22();a6=4u.6A(e.eS-$T.eq(0).2Y().1s);a5=4u.6A(e.ff-$T.eq(0).2Y().1T)});$(c.X.2v).on("l1",$.M(B(e){if(aa){q p9=4u.6A(e.eS-$T.eq(0).2Y().1s)-a6;q hV=4u.6A(e.ff-$T.eq(0).2Y().1T)-a5;q iP=$T.22();q g4=9y(iP,10)+hV;q 9G=4u.6A(g4*eM);if(9G>g9){$T.2p(9G);if(9G<3O){c.6u.1f({5M:"-aT",5L:"-pb",8s:"pa",8X:"p4 fp"})}I{c.6u.1f({5M:"-8U",5L:"-gm",8s:"8U",8X:"aT 8Y"})}}a6=4u.6A(e.eS-$T.eq(0).2Y().1s);a5=4u.6A(e.ff-$T.eq(0).2Y().1T);c.1j()}},c)).on("a8",B(){aa=E})}c.$K.on("5T.U-T-e9",$.M(B(e){q 1k=e.5X;if(c.2O.a2==1k||c.2O.eC==1k){c.21(E);c.6t(E);c.dX($T)}},c));$(X).on("23.U-T-8m-2U",$.M(c.6t,c));c.$K.on("23.U-T-8m-2U",$.M(c.6t,c))},c))},gA:B($T){q 2X=$(\'<V id="U-T-2C" 1a-U="9s">\');2X.1f({3k:"gC",3f:"3W-1l",ep:0,oX:"fi oW oV(0, 0, 0, .6)","5J":$T.1f("5J")});2X.1i("3K",E);if($T[0].1o.2H!="4l"){2X.1f({5M:$T[0].1o.5M,9c:$T[0].1o.9c,5L:$T[0].1o.5L,9d:$T[0].1o.9d});$T.1f("2H","")}I{2X.1f({3f:"1l",2H:"4l"})}$T.1f("gp",0.5).2I(2X);c.6u=$(\'<V id="U-T-es" 1a-U="9s">\'+c.C.1F.8p+"</V>");c.6u.1f({3k:"8T",9u:5,1T:"50%",1s:"50%",5M:"-8U",5L:"-gm",ep:1,fK:"#fE",6s:"#fj",8s:"8U",8X:"aT 8Y",er:"oZ"});c.6u.1i("3K",E);c.6u.on("23",$.M(B(){c.gn($T)},c));2X.1h(c.6u);if(c.C.gF){q 5z=$(\'<V id="U-T-ej" 1a-U="9s"></V>\');5z.1f({3k:"8T",9u:2,ep:1,er:"nw-8m",ft:"-p1",4Z:"-fp",p0:"fi pc #fj",fK:"#fE",2p:"fD",22:"fD"});5z.1i("3K",E);2X.1h(5z);2X.1h($T);F 5z}I{2X.1h($T);F E}},fI:B(e){q 1B=\'<1B id="T-1L" 3p="\'+$(e.1O).1i("4m")+\'" 8n="\'+$(e.1O).1i("1e")+\'" />\';q L=c.2E();if(c.C.5Y&&$(L).2g("li").1V()==0){1B="<p>"+1B+"</p>"}c.b2(1B,N)},fq:B(){q 1p=$("#6C").1p();if(1p!==""){q 1a=\'<1B id="T-1L" 3p="\'+1p+\'" />\';if(c.C.1N===E){1a="<p>"+1a+"</p>"}c.b2(1a,N)}I{c.3g()}},eN:B(1a){c.b2(1a)},b2:B(1M,1r){c.1W();if(1M!==E){q o="";if(1r!==N){o=\'<1B id="T-1L" 3p="\'+1M.6e+\'" />\';q L=c.2E();if(c.C.5Y&&$(L).2g("li").1V()==0){o="<p>"+o+"</p>"}}I{o=1M}c.26("5c",o,E);q T=$(c.$K.1b("1B#T-1L"));if(T.1m){T.2B("id")}I{T=E}c.1j();1r!==N&&c.1c("3Y",T,1M)}c.3g();c.4T()},i8:B(){if($("#U-8O").1V()!=0){F}c.$i0=$(\'<12 id="U-8O"><V></V></12>\');$(X.2v).1h(c.$i0)},8C:B(){c.i8();$("#U-8O").pr()},b6:B(){$("#U-8O").6N(pq)},i5:B(){$.4W(c.C,{hW:51()+\'<2l id="U-5W-25-4y"><2t id="pp" 5l="7R" 7t="" b3="af/2t-1a"><2D>\'+c.C.1F.ed+\'</2D><2T 1G="Y" id="e6" 1x="6Q" /><12 1o="2H-1T: aT;"><2T 1G="25" id="5p" 2m="\'+c.C.e5+\'" /></12></2t></2l>\',hL:51()+\'<2l id="U-5W-T-8p"><2D>\'+c.C.1F.1e+\'</2D><2T 1G="Y" id="e0" 1x="6Q" /><2D>\'+c.C.1F.1r+\'</2D><2T 1G="Y" id="6C" 1x="6Q" /><2D><2T 1G="gT" id="6S"> \'+c.C.1F.eB+"</2D><2D>"+c.C.1F.hP+\'</2D><3s id="bl"><4b 2s="3r">\'+c.C.1F.3r+\'</4b><4b 2s="1s">\'+c.C.1F.1s+\'</4b><4b 2s="6O">\'+c.C.1F.6O+\'</4b><4b 2s="4Z">\'+c.C.1F.4Z+\'</4b></3s></2l><49><1D id="iy" 1x="4r pt">\'+c.C.1F.iv+\'</1D><1D 1x="4r 6M">\'+c.C.1F.6H+\'</1D><1D id="iA" 1x="4r 6P">\'+c.C.1F.7N+"</1D></49>",iD:51()+\'<2l id="U-5W-T-4y"><12 id="5E"><a 1S="#" id="U-52-6v-1" 1x="6I">\'+c.C.1F.8H+\'</a><a 1S="#" id="U-52-6v-2">\'+c.C.1F.eo+\'</a><a 1S="#" id="U-52-6v-3">\'+c.C.1F.1r+\'</a></12><2t id="pu" 5l="7R" 7t="" b3="af/2t-1a"><12 id="pn" 1x="5D"><2T 1G="25" id="5p" 2m="\'+c.C.an+\'" /></12><12 id="ib" 1x="5D" 1o="3f: 3r;"><12 id="eA"></12></12></2t><12 id="iq" 1x="5D" 1o="3f: 3r;"><2D>\'+c.C.1F.ip+\'</2D><2T 1G="Y" 2m="6C" id="6C" 1x="6Q"  /><br><br></12></2l><49><1D 1x="4r 6M">\'+c.C.1F.6H+\'</1D><1D 1x="4r 6P" id="gZ">\'+c.C.1F.4y+"</1D></49>",gX:51()+\'<2l id="U-5W-1r-4y"><3s id="U-gU-gL" 1o="2p: 99.5%; 3f: 3r;"></3s><2D>gN</2D><2T 1G="Y" 1x="6Q" id="7Z" /><2D>\'+c.C.1F.Y+\'</2D><2T 1G="Y" 1x="6Q" id="aj" /><2D><2T 1G="gT" id="6S"> \'+c.C.1F.eB+\'</2D></2l><49><1D 1x="4r 6M">\'+c.C.1F.6H+\'</1D><1D id="he" 1x="4r 6P">\'+c.C.1F.4y+"</1D></49>",hf:51()+\'<2l id="U-5W-1n-4y"><2D>\'+c.C.1F.aF+\'</2D><2T 1G="Y" 1V="5" 2s="2" id="eX" /><2D>\'+c.C.1F.aJ+\'</2D><2T 1G="Y" 1V="5" 2s="3" id="hx" /></2l><49><1D 1x="4r 6M">\'+c.C.1F.6H+\'</1D><1D id="hv" 1x="4r 6P">\'+c.C.1F.4y+"</1D></49>",hB:51()+\'<2l id="U-5W-3y-4y"><2t id="pf"><2D>\'+c.C.1F.hF+\'</2D><5s id="eD" 1o="2p: 99%; 22: pe;"></5s></2t></2l><49><1D 1x="4r 6M">\'+c.C.1F.6H+\'</1D><1D id="hk" 1x="4r 6P">\'+c.C.1F.4y+"</1D></49>"})},62:B(1e,3L,2p,1c){c.gH();c.$au=2p;c.$2P=$("#eR");if(!c.$2P.1m){c.$2P=$(\'<12 id="eR" 1o="3f: 3r;" />\');c.$2P.1h($(\'<12 id="eP">&pj;</12>\'));c.$2P.1h($(\'<aS id="bc" />\'));c.$2P.1h($(\'<12 id="ac" />\'));c.$2P.8P(X.2v)}$("#eP").on("23",$.M(c.3g,c));$(X).on("5d",$.M(c.8M,c));c.$K.on("5d",$.M(c.8M,c));c.ht(3L);c.hD(1e);c.hI();c.ia();c.gO();c.hC();c.6J=c.X.2v.3e;if(c.C.4Y===E){c.6J=c.$K.3e()}if(c.5a()===E){c.fW()}I{c.hl()}if(1E 1c==="B"){1c()}2V($.M(B(){c.1c("pm",c.$2P)},c),11);$(X).3b("pl.5W");c.$2P.1b("2T[1G=Y]").on("pk",$.M(B(e){if(e.5X===13){c.$2P.1b(".6P").23();e.2u()}},c));F c.$2P},fW:B(){c.$2P.1f({3k:"ak",1T:"-df",1s:"50%",2p:c.$au+"px",5L:"-"+(c.$au/2)+"px"}).2M();c.ei=$(X.2v).1f("8V");$(X.2v).1f("8V","8E");2V($.M(B(){q 22=c.$2P.hQ();c.$2P.1f({1T:"50%",22:"4l",8R:"4l",5M:"-"+(22+10)/2+"px"})},c),15)},hl:B(){c.$2P.1f({3k:"ak",2p:"3O%",22:"3O%",1T:"0",1s:"0",2H:"0",8R:"pi"}).2M()},ht:B(3L){c.6g=E;if(3L.44("#")==0){c.6g=$(3L);$("#ac").6z().1h(c.6g.o());c.6g.o("")}I{$("#ac").6z().1h(3L)}},hD:B(1e){c.$2P.1b("#bc").o(1e)},hC:B(){q 4a=c.$2P.1b("49 1D").ay(".pg");q ea=4a.1V();if(ea>0){$(4a).1f("2p",(c.$au/ea)+"px")}},gO:B(){c.$2P.1b(".6M").on("23",$.M(c.3g,c))},gH:B(){if(c.C.fb){c.$8D=$("#ev");if(!c.$8D.1m){c.$8D=$(\'<12 id="ev" 1o="3f: 3r;"></12>\');$("2v").6d(c.$8D)}c.$8D.2M().on("23",$.M(c.3g,c))}},hI:B(){if(1E $.fn.ii!=="1J"){c.$2P.ii({po:"#bc"});c.$2P.1b("#bc").1f("er","pv")}},ia:B(){q $5E=$("#5E");if(!$5E.1m){F E}q 4J=c;$5E.1b("a").1u(B(i,s){i++;$(s).on("23",B(e){e.2u();$5E.1b("a").3c("6I");$(c).2z("6I");$(".5D").2U();$("#5D"+i).2M();$("#ps").1p(i);if(4J.5a()===E){q 22=4J.$2P.hQ();4J.$2P.1f("2H-1T","-"+(22+10)/2+"px")}})})},8M:B(e){if(e.2O===c.2O.dY){c.3g();F E}},3g:B(){$("#eP").3b("23",c.3g);$("#eR").6N("pd",$.M(B(){q eU=$("#ac");if(c.6g!==E){c.6g.o(eU.o());c.6g=E}eU.o("");if(c.C.fb){$("#ev").2U().3b("23",c.3g)}$(X).3b("5d",c.8M);c.$K.3b("5d",c.8M);c.1W();if(c.C.4Y&&c.6J){$(c.X.2v).3e(c.6J)}I{if(c.C.4Y===E&&c.6J){c.$K.3e(c.6J)}}c.1c("p2")},c));if(c.5a()===E){$(X.2v).1f("8V",c.ei?c.ei:"gq")}F E},oY:B(eu){$(".5D").2U();$("#5E").1b("a").3c("6I").eq(eu-1).2z("6I");$("#5D"+eu).2M()},gD:B(e){q 7I=e.1O.7I;3z(q i=0,f;f=7I[i];i++){c.e1(f)}},e1:B(25){c.gy(25,$.M(B(gx){c.ji(25,gx)},c))},gy:B(25,1c){q 2n=2c la();q eV="?";if(c.C.5Q.4G(/\\?/)!="-1"){eV="&"}2n.b7("p3",c.C.5Q+eV+"2m="+25.2m+"&1G="+25.1G,N);if(2n.kR){2n.kR("Y/p7; pw=x-py-pY")}q 4J=c;2n.pW=B(e){if(c.lc==4&&c.e8==5k){4J.8C();1c(pU(c.pZ))}I{if(c.lc==4&&c.e8!=5k){}}};2n.k9()},ja:B(5l,1K){q 2n=2c la();if("q7"in 2n){2n.b7(5l,1K,N)}I{if(1E lb!="1J"){2n=2c lb();2n.b7(5l,1K)}I{2n=2G}}F 2n},ji:B(25,1K){q 2n=c.ja("q5",1K);if(!2n){}I{2n.jd=$.M(B(){if(2n.e8==5k){c.b6();q eb=1K.4o("?");if(!eb[0]){F E}c.1W();q o="";o=\'<1B id="T-1L" 3p="\'+eb[0]+\'" />\';if(c.C.5Y){o="<p>"+o+"</p>"}c.26("5c",o,E);q T=$(c.$K.1b("1B#T-1L"));if(T.1m){T.2B("id")}I{T=E}c.1j();c.1c("3Y",T,E);c.3g();c.4T()}I{}},c);2n.q3=B(){};2n.8H.pQ=B(e){};2n.iK("pE-pF",25.1G);2n.iK("x-pG-pD","pz-pA");2n.k9(25)}},et:B(el,3R){c.3A={1K:E,4h:E,3U:E,2y:E,ef:E,4l:E,2T:E};$.4W(c.3A,3R);q $el=$("#"+el);if($el.1m&&$el[0].Q==="pB"){c.3A.2T=$el;c.el=$($el[0].2t)}I{c.el=$el}c.jD=c.el.1i("7t");if(c.3A.4l){$(c.3A.2T).68($.M(B(e){c.el.ca(B(e){F E});c.e4(e)},c))}I{if(c.3A.ef){$("#"+c.3A.ef).23($.M(c.e4,c))}}},e4:B(e){c.8C();c.jI(c.2j,c.kl())},kl:B(){c.id="f"+4u.kg(4u.kh()*k0);q d=c.X.4C("12");q 1Q=\'<1Q 1o="3f:3r" id="\'+c.id+\'" 2m="\'+c.id+\'"></1Q>\';d.3Q=1Q;$(d).8P("2v");if(c.3A.2y){c.3A.2y()}$("#"+c.id).jZ($.M(c.jT,c));F c.id},jI:B(f,2m){if(c.3A.2T){q eI="pM"+c.id,jX="pK"+c.id;c.2t=$(\'<2t  7t="\'+c.3A.1K+\'" 5l="c1" 1O="\'+2m+\'" 2m="\'+eI+\'" id="\'+eI+\'" b3="af/2t-1a" />\');if(c.C.3H!==E&&1E c.C.3H==="3M"){$.1u(c.C.3H,$.M(B(k,v){if(v!=2G&&v.43().44("#")===0){v=$(v).1p()}q 8E=$("<2T/>",{1G:"8E",2m:k,2s:v});$(c.2t).1h(8E)},c))}q eT=c.3A.2T;q 8S=$(eT).6q();$(eT).1i("id",jX).3S(8S).8P(c.2t);$(c.2t).1f("3k","8T").1f("1T","-df").1f("1s","-df").8P("2v");c.2t.ca()}I{f.1i("1O",2m).1i("5l","c1").1i("b3","af/2t-1a").1i("7t",c.3A.1K);c.2j.ca()}},jT:B(){q i=$("#"+c.id)[0],d;if(i.jU){d=i.jU}I{if(i.bK){d=i.bK.X}I{d=42.o2[c.id].X}}if(c.3A.4h){c.b6();if(1E d!=="1J"){q jW=d.2v.3Q;q 7s=jW.1U(/\\{(.|\\n)*\\}/)[0];7s=7s.G(/^\\[/,"");7s=7s.G(/\\]$/,"");q 1M=$.8J(7s);if(1E 1M.3U=="1J"){c.3A.4h(1M)}I{c.3A.3U(c,1M);c.3g()}}I{c.3g();o1("jE nY!")}}c.el.1i("7t",c.jD);c.el.1i("1O","")},bP:B(el,3R){c.5w=$.4W({1K:E,4h:E,3U:E,nZ:E,3H:E,Y:c.C.1F.jA,jJ:c.C.1F.jB,6k:E},3R);if(42.bw===1J){F E}c.bz=$(\'<12 1x="o0"></12>\');c.5b=$(\'<12 1x="o6">\'+c.5w.Y+"</12>");c.kk=$(\'<12 1x="o7">\'+c.5w.jJ+"</12>");c.bz.1h(c.5b);$(el).3S(c.bz);$(el).3S(c.kk);c.5b.on("oc",$.M(B(){F c.je()},c));c.5b.on("ob",$.M(B(){F c.jf()},c));c.5b.2R(0).o8=$.M(B(e){e.2u();c.5b.3c("dk").2z("6w");c.8C();c.bF(c.5w.1K,e.aX.7I[0],E,e,c.5w.6k)},c)},bF:B(1K,25,bm,e,6k){if(!bm){q 2n=$.nX.2n();if(2n.8H){2n.8H.nK("8O",$.M(c.jh,c),E)}$.nL({2n:B(){F 2n}})}c.1c("6w",e);q fd=2c bw();if(6k!==E){fd.1h(6k,25)}I{fd.1h("25",25)}if(c.C.3H!==E&&1E c.C.3H==="3M"){$.1u(c.C.3H,$.M(B(k,v){if(v!=2G&&v.43().44("#")===0){v=$(v).1p()}fd.1h(k,v)},c))}$.iU({1K:1K,nI:"o",1a:fd,nG:E,c3:E,nH:E,1G:"c1",4h:$.M(B(1a){1a=1a.G(/^\\[/,"");1a=1a.G(/\\]$/,"");q 1M=(1E 1a==="8I"?$.8J(1a):1a);c.b6();if(bm){q $1B=$("<1B>");$1B.1i("3p",1M.6e).1i("id","jc-T-1L");c.js(e,$1B[0]);q T=$(c.$K.1b("1B#jc-T-1L"));if(T.1m){T.2B("id")}I{T=E}c.1j();c.4T();if(T){c.1c("3Y",T,1M)}if(1E 1M.3U!=="1J"){c.1c("dV",1M)}}I{if(1E 1M.3U=="1J"){c.5w.4h(1M)}I{c.5w.3U(c,1M);c.5w.4h(E)}}},c)})},je:B(){c.5b.2z("dk");F E},jf:B(){c.5b.3c("dk");F E},jh:B(e,Y){q kX=e.kB?9y(e.kB/e.oR*3O,10):e;c.5b.Y("oO "+kX+"% "+(Y||""))},5a:B(){F/(oj|or|os|oy)/.4e(6n.7k)},d6:B(){F/oz/.4e(6n.7k)},9M:B(4p){if(1E(4p)==="1J"){F 0}F 9y(4p.G("px",""),10)},3Z:B(el){F $("<12>").1h($(el).eq(0).6q()).o()},ox:B(o){q 2L=X.4C("8K");2L.3Q=o;F 2L.9Q||2L.dh||""},kF:B(71){F ow.5o.43.5q(71)=="[3M 51]"},9B:B(o){o=o.G(/&#9F;|<br>|<br\\/>|&3u;/gi,"");o=o.G(/\\s/g,"");o=o.G(/^<p>[^\\W\\w\\D\\d]*?<\\/p>$/i,"");F o==""},ro:B(){q rv=E;if(6n.rn=="rl rb rx"){q 47=6n.7k;q re=2c 2J("rf ([0-9]{1,}[.0-9]{0,})");if(re.2o(47)!=2G){rv=rw(2J.$1)}}F rv},8L:B(){F!!6n.7k.1U(/ry\\/7\\./)},1C:B(1C){q 47=6n.7k.3N();q 1U=/(fs)[\\/]([\\w.]+)/.2o(47)||/(d5)[ \\/]([\\w.]+)/.2o(47)||/(4s)[ \\/]([\\w.]+).*(rC)[ \\/]([\\w.]+)/.2o(47)||/(4s)[ \\/]([\\w.]+)/.2o(47)||/(94)(?:.*9n|)[ \\/]([\\w.]+)/.2o(47)||/(3t) ([\\w.]+)/.2o(47)||47.44("r3")>=0&&/(rv)(?::| )([\\w.]+)/.2o(47)||47.44("qt")<0&&/(31)(?:.*? rv:([\\w.]+)|)/.2o(47)||[];if(1C=="9n"){F 1U[2]}if(1C=="4s"){F(1U[1]=="d5"||1U[1]=="4s")}if(1U[1]=="rv"){F 1C=="3t"}if(1U[1]=="fs"){F 1C=="4s"}F 1C==1U[1]},cw:B(){if(c.1C("3t")&&9y(c.1C("9n"),10)<9){F N}F E},fF:B(fr){q 7e=fr.qA(N);q 12=c.X.4C("12");12.7g(7e);F 12.3Q},cE:B(){q J=c.$K[0];q 4k=c.X.cD();q cC;3w((cC=J.8G)){4k.7g(cC)}F 4k},4j:B(el){if(!el){F E}if(c.C.1Q){F el}if($(el).8B("12.4d").1m==0||$(el).3v("4d")){F E}I{F el}},74:B(Q){q L=c.2E(),1t=c.3P();F L&&L.Q===Q?L:1t&&1t.Q===Q?1t:E},ck:B(){q 1t=c.2N();q 2Y=c.ch(1t);q Y=$.2b($(1t).Y()).G(/\\n\\r\\n/g,"");q 4P=Y.1m;if(2Y==4P){F N}I{F E}},7h:B(){q el,1q=c.29();if(1q&&1q.4V&&1q.4V>0){el=1q.48(0).6D}if(!el){F E}if(c.C.1Q){if(c.hR().iz()){F!c.$K.is(el)}I{F N}}F $(el).2g("12.4d").1m!=0},4H:B(el,1i){if($(el).1i(1i)==""){$(el).2B(1i)}},iB:B(ao,2s){q 2K=2G;3w((2K=ao.44(2s))!==-1){ao.ap(2K,1)}F ao}};3J.5o.77.5o=3J.5o;$.3J.fn.e7=B(eQ,7d,6l,75,7A){q 1K=/(((5n?|qT?):\\/\\/)|aA[.][^\\s])(.+?\\..+?)([.),]?)(\\s|\\.\\s+|\\)|$)/gi,hK=/(5n?|am):\\/\\//i,d3=/(5n?:\\/\\/.*\\.(?:gY|qR|hc|ha))/gi;q 8F=(c.$K?c.$K.2R(0):c).8F,i=8F.1m;3w(i--){q n=8F[i];if(n.4D===3){q o=n.aH;if(75&&o){q 5j=\'<1Q 2p="cT" 22="hG" 3p="\',7B=\'" cS="0" hE></1Q>\';if(o.1U(8N)){o=o.G(8N,5j+"//aA.cO.7w/4S/$1"+7B);$(n).2I(o).1w()}I{if(o.1U(8Q)){o=o.G(8Q,5j+"//hp.cI.7w/3y/$2"+7B);$(n).2I(o).1w()}}}if(6l&&o&&o.1U(d3)){o=o.G(d3,\'<1B 3p="$1">\');$(n).2I(o).1w()}if(7d&&o&&o.1U(1K)){q 2x=o.1U(1K);3z(q i in 2x){q 1S=2x[i];q Y=1S;q 6c="";if(1S.1U(/\\s$/)!==2G){6c=" "}q c8=eQ;if(1S.1U(hK)!==2G){c8=""}if(Y.1m>7A){Y=Y.aQ(0,7A)+"..."}Y=Y.G(/&/g,"&9h;").G(/</g,"&lt;").G(/>/g,"&gt;");q jq=Y.G("$","$$$");o=o.G(1S,\'<a 1S="\'+c8+$.2b(1S)+\'">\'+$.2b(jq)+"</a>"+6c)}$(n).2I(o).1w()}}I{if(n.4D===1&&!/^(a|1D|5s)$/i.4e(n.Q)){$.3J.fn.e7.5q(n,eQ,7d,6l,75,7A)}}}}})(nW);',62,1714,'||||||||||||this||||||||||||html||var|||||||||||function|opts||false|return|replace||else|node|editor|parent|proxy|true|range||tagName|||image|redactor|span||document|text||||div||||||||data|find|callback|tag|title|css|td|append|attr|sync|key|block|length|table|style|val|sel|link|left|current|each|source|remove|class|lang|elem|toolbar|img|browser|button|typeof|curLang|type|func|selection|undefined|url|marker|json|linebreaks|target|cmd|iframe|dropdown|href|top|match|size|selectionRestore|nodes|contents|out||bufferSet|height|click||file|execCommand||selectionSave|getSelection|btn|trim|new|btnObject|replaceWith|blockquote|closest|focus|invisibleSpace|element|code|section|name|xhr|exec|width|pre|ul|value|form|preventDefault|body|btnName|matches|start|addClass|font|removeAttr|box|label|getParent|param|null|margin|after|RegExp|index|tmp|show|getBlock|keyCode|redactorModal|arr|get|className|input|hide|setTimeout|last|imageBox|offset|frame|air|mozilla|||||||||list|off|removeClass|push|scrollTop|display|modalClose|LI|point|tr|position|end|bold|script|getRange|src|italic|none|select|msie|nbsp|hasClass|while|ctrl|video|for|uploadOptions|insertNode|doc|blocks|buffer|BLOCKQUOTE|wrapper|uploadFields|getBlocks|Redactor|contenteditable|content|object|toLowerCase|100|getCurrent|innerHTML|options|before|thead|error|strong|inline|pos|imageUpload|outerHtml||rangy|window|toString|indexOf|||ua|getRangeAt|footer|buttons|option|children|redactor_editor|test|next|selectionStart|success|focusWithSaveScroll|isParentRedactor|frag|auto|rel|fullpage|split|str|buttonGet|redactor_modal_btn|webkit|elems|Math|postData|meta|finalnodes|insert|current_tr|htmls|textNodes|createElement|nodeType|tooltip|collapsed|search|removeEmptyAttr|php|that|underline|parentNode|prev|cont|inArray|len|orgn|substr|embed|observeImages|placeholder|rangeCount|extend|removeAllRanges|autoresize|right||String|tab|shiftKey|keys|redactor_placeholder|del|align|emptyHtml||isMobile|dropareabox|inserthtml|keyup|blockElem|break|addRange|collapse|createRange|iframeStart|200|method|observeLinks|https|prototype|redactor_file|call|audio|textarea|alignmentTags|case|lastNode|draguploadOptions|listTag|regex|imageResizer|rule|replaced|charAt|redactor_tab|redactor_tabs|strike|allowedTags|deleted|formatBlocks|float|newTag|marginLeft|marginTop|visual|node1|listCurrent|s3|selectall|savedSel|keydown|par|join|modal|which|paragraphy|current_td|||modalInit|direction|textareamode|||event|change|dir|orderedlist|Insert|space|prepend|filelink|unorderedlist|modalcontent|TD|PRE|shortcuts|uploadParam|convertImageLinks|indent|navigator|formatBlock|italicTag|clone|boldTag|color|imageResizeHide|imageEditter|control|drop|formatting|_blank|empty|round|toolbarFixed|redactor_file_link|startContainer|modified|unlink|count|cancel|redactor_tabs_act|saveModalScroll|insert_link_node|imageGetJson|redactor_btn_modal_close|fadeOut|center|redactor_modal_action_btn|redactor_input|folders|redactor_link_blank|redactorfolder|insertAfterLastElement|set|hideHandler|phpMatches|item|cleanRemoveSpaces|etags|obj|cleanGetTabs||currentOrParentIs|convertVideoLinks|replacementTag|init|thtml|elements|dropact|buttonActive|tabindex|convertLinks|cloned|buttonBuild|appendChild|isFocused|tmpList|newblock|userAgent|instance|outdent|listParent|weight|blocksElems|modif|getNodes|jsonString|action|possible|nodeTestBlocks|com|enter|fullpageDoctype|isFunction|linkSize|iframeEnd|autosave|u200B|linkObserverTooltipClose|uuid|selectionEnd|observeStart|files|charCount|endCharCount|Delete|boxTop|save|toolbarExternal|dblEnter|horizontalrule|post|character|toolbarFixedTarget|keyPosition|shift|Header|typewriter|Add|redactor_link_url|metaKey|tagblock|createTextNode|linkmarker|fileUpload|setEnd|setStart|focn|textNode|newnodes|linkProtocol|selectionRemoveMarkers|tbody|cleanStripTags|selectionSet|node2|getElement|endContainer|imageFloatMargin|rtePaste|insertunorderedlist|alignmentSet|resize|alt|tmpLi|edit|insertorderedlist|buttonActiveObserver|fontSize|background|setNonEditable|cleanlevel|tagout|phpTags|deniedTags|redactor_act|rebuffer|parents|showProgressBar|redactorModalOverlay|hidden|childNodes|firstChild|upload|string|parseJSON|DIV|isIe11|modalCloseHandler|reUrlYoutube|progress|appendTo|reUrlVimeo|minHeight|newElement|absolute|11px|overflow|pasteInsert|padding|10px|selected|||setSpansVerified|inlineMethods|opera|tablePaste|||||convertDivs|parentLink|marginBottom|marginRight|ADDRESS|SECTION|strip|amp|insertHtml|folderclass|parentHtml|result|rangeNodes|version|listText|clipboardUpload|indentValue|template|verified|saveScroll|zIndex|paste|wrapperHtml|selectionHtml|parseInt|cleanParagraphy||isEmpty|codeLength|prop|floating|x200b|new_w|predefinedLinksStorage|line|mousedown|checked|placeTag|normalize|linkShow|insertHtmlAdvanced|ctrlKey|textContent|alignment|cleanConvertInlineTags|allowed|head|new_tr|colspan|rowspan|FOOTER|HEADER|ARTICLE|removeEmptyTags|BACKSPACE|clickedElement|ASIDE|start_y|start_x|parentEl|mouseup|sourceHeight|isResizing|javascript|redactor_modal_inner|setSpansVerifiedHtml|setStartAfter|multipart|cloneRange|autosaveInterval|selectionSetMarker|redactor_link_url_text|fixed|insertLineBreak|ftp|imageUploadParam|array|splice|foundStart|boundaryRange|toolbarFixedBox|insertAfter|redactorModalWidth|emptyElement|special|rTestBlock|not|specialKey|www|getSelectionText|deleteContents|outer|documentElement|rows|direct|nodeValue|http|columns|focusSet|execPasteFrag|selectNodeContents|separator|methodVal|classname|substring|icon|header|7px|fonts|folder|tabSpaces|dataTransfer|activeButtons|row|folderkey|column|imageInsert|enctype|spans|foco|hideProgressBar|open|one|ENTER|preCaretRange|toolbarFixedTopOffset|redactor_modal_header|buildCodearea||htmlTagName|blockLevelElements|hdlHideDropDown|airBindMousemoveHide|dropdownHideAll|inlineRemoveFormatReplace|redactor_form_image_align|directupload|aligncenter|align_right|align_left|endRange||alignright|insertingAfterLastElement|align_justify|align_center|FormData|selectionWrap|selectionElement|droparea|selectionRemove|orgo|BR|fotorama|posFrame|dragUploadAjax|iframeDoc|caretOffset|Range|contOwnLine|contentWindow|ownLine|tagTestBlock|getTextNodesIn|apply|draguploadInit|arrSearch|cursorRange|royalSlider|clipboardUploadUrl|add_head|cleanFontTag|insert_column_right|insert_column_left|delete_head|decoration|delete_row|POST|delete_column|contentType|insert_row_below|insert_row_above|pasteClipboardMozilla|fullscreen|addProtocol|pasteClipboardAppendFields|submit|focusEnd|getRangeSelectedNodes|insert_table|cleanEncodeEntities|alignleft|elem2|getCaretOffset|dropdownHide|dropdownShow|isEndOfElement|buildEventKeydownInsertLineBreak|btnHeight|plugins|iframeAppend|sourceOld|RedactorPlugins|dropdownWidth|buttonName|buttonInactive|rBlockTest|activeButtonsStates|oldIE|indentingIndent|indentingOutdent|link_insert|FIGCAPTION|redactor_button_disabled|child|createDocumentFragment|extractContent|airShow|focusElem|buildAfter|vimeo|buildOptions|iframeAddCss|hotkeysShiftNums|placeholderOnBlur|blur|youtube|placeholderGet|placeholderOnFocus|placeholderText|frameborder|500|buttonsHideOnMobile|iframePage|redactor_toolbar|toolbarObserveScroll|savedHtml|iframeLoad|toggle|setFullpageOnInit|buildBindKeyboard|urlImage|indentingStart|chrome|isIPad|cleannewLevel|formatblock|formatQuote|paragraphsOnly|suffix|cleanTag||cleanSavePreCode|2000px|cleanFinish|innerText|tfoot|arg|hover||address|parseHTML|pasteHTML|currBlock|cleanRemoveEmptyTags|inlineEachNodes|INLINE||placeholderRemove|utag|buildEnable|safes|alignmentCenter|modify|alignmentJustify|justify|reader|alignmentRight|lineOrWord|childList|insideOutdent|DOWN|alignmentLeft|cleanEmpty|cleanConverters|oldsafari|dnbImageTypes|th|maxHeight|merge|commentsMatches|cleanConvertProtected|templateVars|clipboardData|etagsInline|imageUploadError|delete_table|imageRemove|ESC|added|redactor_file_alt|s3uploadFile|table_box|tableAddColumn|uploadSubmit|fileUploadParam|redactor_filename|formatLinkify|status|delete|buttonsSize|s3image|predefinedLinks|filename|BODY|trigger|focus_tr|thumbtitle|modalSaveBodyOveflow|resizer|focus_td||||choose|lineHeight||cursor|editter|uploadInit|num|redactor_modal_overlay|tableAddRow|fileCallback|tableDeleteHead|tableId|redactor_image_box|link_new_tab|DELETE|redactor_insert_video_area|syncClean|container|try|mailto|formId|linkInsertPressed|endNode|z0|ratio|imageCallback|pattern|redactor_modal_close|protocol|redactor_modal|pageX|oldElement|redactorModalInner|mark|Column|redactor_table_rows|extra|targetBlank|Row|||||||||||modalOverlay|Table||catch|pageY|link_edit|firstParent|1px|fff|altKey|buttonInactiveAll|superscript||buttonActiveToggle|5px|imageCallbackLink|fragment|opr|bottom|execUnlink|execLists|LEFT_WIN|inserthorizontalrule|subscript|formattingPre|listCurrentText|UL|strikethrough|8px|000|getFragmentHtml|redactor_dropdown_link|clonedHtml|imageThumbClick|OUTPUT|backgroundColor|cleanReConvertProtected|redactor_editor_wym|toolbarInit|wym|min|buildAddClasses|dragUpload|textareaKeydownCallback|buildEventDrop|area|fieldset|modalShowOnDesktop|focusCallback|buildFromElement|buildFromTextarea|buildStart|mobile|filter|transparent|new_h|cleanUnverified|quot|List|tags|min_w|encode|buildMobile|map|buildEventPaste|double|DT|Color|items||cleanReplacer|clipboardFilePaste|placeholderStart|18px|imageEdit|buildEventKeydown|opacity|visible|buffer_|u200D||mod|pastedFrag|cleanup|signedURL|s3executeOnSignedUrl|buildEventClipboardUpload|imageResizeControls|uFEFF|relative|s3handleFileSelect|originalEvent|imageResizable|buttonInactiveVisual|modalSetOverlay|toolbarBuild|airButtons|buttonSource|links|formattingTags|URL|modalOnCloseButton|indenting|tidyHtml|textareaIndenting|setInterval|checkbox|predefined|timer|write|modal_link|png|redactor_upload_btn|10005|||||||scroll|close|toolbarOverflow|gif|redactor_air_|jpeg|clearInterval|redactor_insert_link_btn|modal_table|args|placeholderBlur|219|placeholderInit|redactor_insert_video_btn|modalShowOnMobile|placeholderFocus|command|shortcutsHandler|player|placeholderRemoveFromCode||placeholderRemoveFromEditor|modalSetContent|hotkeysSpecialKeys|redactor_insert_table_btn|arguments|redactor_table_columns|toggleVisual|toggleCode|origHandler|modal_video|modalSetButtonsWidth|modalSetTitle|allowfullscreen|video_html_code|281|visibility|modalSetDraggable|dropdownBuild|rProtocol|modal_image_edit|H6|buttonActiveVisual|redactor_dropdown|image_position|outerHeight|getCaretOffsetRange|buildEventKeyup|buttonImage|returnValue|mouse_y|modal_file|afterkey|buildEventKeydownTab|buildEventKeydownPre|progressBar|beforekey|tabFocus|Array|buildEventKeydownBackspace|modalTemplatesInit|DD|DL|buildProgressBar|H5|modalLoadTabs|redactor_tab2|innerWidth||airBindHide|||collapseToStart|draggable|keyboard|redactor_air|airEnable|toolbar_fixed_box||iframeCreate|image_web_link|redactor_tab3|dropdownObject||H1|buildPlugins|_delete|H4|buildEventKeyupConverters|redactor_image_delete_btn|equals|redactorSaveBtn|removeFromArrayByValue|H2|modal_image|innerHeight|H3|TAB|buildContent|videoShow|videoInsert|setRequestHeader|tableAddColumnRight|tableAddColumnLeft|internal|cleanSpaces|div_h|linkProcess|location|self|thref|ajax|tableAddRowBelow|to|focusIndex|tableDeleteColumn|the|pasteClipboardUploadMozilla|Align|tableAddHead|tableAddRowAbove|Center|first|pastePre|pastePlainText|pasteClean|linkInsert|s3createCORSRequest|outerHTML|drag|onload|draguploadOndrag|draguploadOndragleave|fileShow|uploadProgress|s3uploadToS3|aside|article|clientX|clientY|Video|SPAN|twice|escapedBackReferences|replaceLineBreak|insertNodeToCaretPositionFromPoint|re2|caretPositionFromPoint|caretRangeFromPoint|createTextRange|moveToPoint|imgs|pasteClipboardUpload|drop_file_here|or_choose|arrAdd|element_action|Upload|setCaretAfter|langs|setCaret|uploadForm|atext|paragraph|shortcutsAdd|newLevel|selectionCreateMarker|nextSibling|getSelectionHtml|nextNode|slice|unshift|uploadLoaded|contentDocument|Edit|rawString|fileId|nodeName|load|99999|header4|pop|header3|linkObserver|aLink|bufferRedo|bufferUndo|tableDeleteRow|send|tableDeleteTable|header5|clipboard|aEdit|aUnlink|formatChangeTag|floor|random|quote|endOffset|dropalternative|uploadFrame|tableInsert|header2|tableShow|header1|fileUploadError|Code|xhtmlTags|xhtml|getCodeIframe|inside|setFullpageDoctype|nofollow|linkNofollow|Right|switch|loaded|imageTabLink|inlineSetMethods|setCodeIframe|isString|Image|doctype|noeditable|Left|fromElement|imageSave|blocksLen|cleanlineAfter|toTagName|formatEmpty|wrapAll|overrideMimeType|paragraphs|cleanlineBefore|imageResize|blocksElemsRemove|newhtml|percent|Head|HTML|onchangeFunc|mousemove|Link|setEditor|imageShow|cleanHtml|inlineFormat|unwrap|isEmptyObject|getJSON|XMLHttpRequest|XDomainRequest|readyState|inlineUnwrapSpan|noscript|u00a9|103|copy||102|u2026|Outdent|Below|down|redactor_|101|applet|Ordered|u2122||isArray|Underline|stylesheet|111|removeChild|Open|110|109|up|105|Alignment|trade|106|45px|107|104|ownerDocument|sourceWidth|mdash|Indent|u2014|No|redactor_box|CTRL|such|youtu|META|use|startOffset|strict|dropdowns|u2010|dash|eval|TEXTAREA|redactor_format_blockquote|pageup|esc|Above|pagedown|optional|Name|hellip|removeFormat|capslock|pause|defaultView|VERSION|Cancel|ltr|LEFT|Save|backspace|home|redactor_format_h3|Embed|FileReader|u00a0|readAsDataURL|Web|Callback|Italic|word|alignjustify|File|112|backcolor|Download|getAsFile|download|fontcolor|about|Font|destroy|Bold|TH|getIframe|web|getToolbar|Formatting|redo|Email|Unlink|undo|getBox|collapseToEnd|getObject|removeData|Text|Quote|Normal|getEditor|blank|Choose|Title|blurCallback|redactor_format_h2|redactor_format_h4|Rule|Chrome|Horizontal|Position|Columns|Deleted|anchor|Unordered|Anchor|redactor_format_pre|enableObjectResizing|redactor_format_h1|enableInlineTableEditing|536|None|here|noneditable||separator_drop1|separator_drop2|Back|Or|separator_drop3|Drop||syncBefore|syncAfter|1class||frameset|Justify|redactor_format_h5|8203|bull|default|Rows|legend|u200b|cache|processData|dataType|fake|addEventListener|ajaxSetup|pasteAfter|guid|docs|MsoListParagraphCxSpFirst|shapes|pasteBefore|MsoListParagraphCxSpMiddle|MsoListParagraphCxSpLast|sid|MsoListParagraph|jQuery|ajaxSettings|failed|preview|redactor_droparea|alert|frames|commonAncestorContainer|isCollapsed|isInlineNode|redactor_dropareabox|redactor_dropalternative|ondrop|editGallery|unselectable|dragleave|dragover|selectionAll|extractContents|insertDoubleLineBreak|EndToEnd|blockSetAttr|blockRemoveAttr|iPhone|blockRemoveStyle||blockSetStyle||inlineRemoveClass|blockSetClass|blockRemoveClass|iPod|BlackBerry|cite|small|sup|Object|stripHtml|Android|iPad|inlineRemoveStyle|inlineSetStyle|insertBeforeCursor|toUpperCase|inlineRemoveFormat|insertText|setEndAfter|setEndPoint|duplicate|offsetNode|attributes|backColor|inlineSetAttr|inlineRemoveAttr|Loading|family|fontName|total|foreColor|hasChildNodes|cloneContents|rgba|dashed|outline|modalSetTab|pointer|border|4px|modalClosed|GET|3px|clicked|dragstart|plain|min_h|mouse_x|9px|13px|solid|fast|160px|redactorInsertVideoForm|redactor_modal_btn_hidden||300px|times|keypress|focusin|modalOpened|redactor_tab1|handle|redactorUploadFileForm|1500|fadeIn|redactor_tab_selected|redactor_modal_delete_btn|redactorInsertImageForm|move|charset||user|public|read|INPUT|cellIndex|acl|Content|Type|amz|300|removeMarkers|detach|redactorUploadFile|saveSelection|redactorUploadForm|restoreSelection|u1C7F|u0000|onprogress|600|redactor_image_edit_src|610|decodeURIComponent|380|onreadystatechange|imageDelete|defined|responseText|redactor_image_box_select|460|host|onerror|xn|PUT|thumb|withCredentials|sub|inlineSetClass|buttonTagToActiveState|redactor_dropdown_box_|buttonChangeIcon|buttonRemoveIcon|121|buttonAwesome|stopPropagation|touchstart|f11|123|122|f10|dropdownShown|buttonAdd|buttonAddFirst|SUB|SUP|OL|118|compatible|188|119|buttonAddBefore|buttonAddAfter|120|buttonRemove|cloneNode|redactor_dropdown_|redactor_separator_drop|186|187|_|fromCharCode|Key|222|221|190|189|191|192|220|173|145|jpg|external|ftps|focusNode|f12|redactor_toolbar_|1000|144|numlock|escape|encodeURIComponent|autosaveError|trident|firstNode|colgroup|col|math|hgroup|nav|caption|Internet|117|concat||MSIE|JustifyLeft|comment|figure|figcaption|114|Microsoft|113|appName|getInternetExplorerVersion|115|hasOwnProperty|116|details|menu|summary||parseFloat|Explorer|Trident|JustifyCenter|JustifyRight|JustifyFull|safari|gallery'.split('|'),0,{}))
\ No newline at end of file
+!function($){var uuid=0;"use strict";var Range=function(t){return this[0]=t.startOffset,this[1]=t.endOffset,this.range=t,this};Range.prototype.equals=function(){return this[0]===this[1]};var reUrlYoutube=/https?:\/\/(?:[0-9A-Z-]+\.)?(?:youtu\.be\/|youtube\.com\S*[^\w\-\s])([\w\-]{11})(?=[^\w\-]|$)(?![?=&+%\w.-]*(?:['"][^<>]*>|<\/a>))[?=&+%\w.-]*/ig,reUrlVimeo=/https?:\/\/(www\.)?vimeo.com\/(\d+)($|\/)/,reUrlFacebook=/^(?:(?:https|http)?:\/\/)?(?:www\.)?(?:facebook\.com(?:\/[^\/]+\/videos\/|\/video\.php\?v=))([0-9]+)(?:.+)?$/,reUrlRutube=/^(?:(?:https|http)?:\/\/)?(?:www\.)?(?:rutube\.ru\/video\/)([a-z0-9]+)(?:.+)?$/;function Redactor(t,e){return new Redactor.prototype.init(t,e)}$.fn.redactor=function(t){var e=[],s=Array.prototype.slice.call(arguments,1);return("string"==typeof t?this.each(function(){var o=$.data(this,"redactor");if(!(void 0!==o&&$.isFunction(o[t])))return $.error('No such method "'+t+'" for Redactor');var r=o[t].apply(o,s);void 0!==r&&r!==o&&e.push(r)}):this.each(function(){$.data(this,"redactor")||$.data(this,"redactor",Redactor(this,t))}),0===e.length)?this:1===e.length?e[0]:e},$.Redactor=Redactor,$.Redactor.VERSION="9.2.6",$.Redactor.opts={rangy:!1,iframe:!1,fullpage:!1,css:!1,lang:"en",direction:"ltr",placeholder:!1,typewriter:!1,wym:!1,mobile:!0,cleanup:!0,tidyHtml:!0,pastePlainText:!1,removeEmptyTags:!0,cleanSpaces:!0,cleanFontTag:!0,templateVars:!1,xhtml:!1,visual:!0,focus:!1,tabindex:!1,autoresize:!0,minHeight:!1,maxHeight:!1,shortcuts:{"ctrl+m, meta+m":"this.execCommand('removeFormat', false)","ctrl+b, meta+b":"this.execCommand('bold', false)","ctrl+i, meta+i":"this.execCommand('italic', false)","ctrl+h, meta+h":"this.execCommand('superscript', false)","ctrl+l, meta+l":"this.execCommand('subscript', false)","ctrl+k, meta+k":"this.linkShow()","ctrl+shift+7":"this.execCommand('insertorderedlist', false)","ctrl+shift+8":"this.execCommand('insertunorderedlist', false)"},shortcutsAdd:!1,autosave:!1,autosaveInterval:60,plugins:!1,linkProtocol:"http://",linkNofollow:!1,linkSize:50,predefinedLinks:!1,imageFloatMargin:"10px",imageGetJson:!1,dragUpload:!0,imageTabLink:!0,imageUpload:!1,imageUploadParam:"file",imageResizable:!0,fileUpload:!1,fileUploadParam:"file",clipboardUpload:!0,clipboardUploadUrl:!1,smilesUrl:"",dnbImageTypes:["image/png","image/jpeg","image/gif"],s3:!1,uploadFields:!1,observeImages:!0,observeLinks:!0,modalOverlay:!0,tabSpaces:!1,tabFocus:!0,air:!1,airButtons:["formatting","bold","italic","deleted","unorderedlist","orderedlist","outdent","indent"],toolbar:!0,toolbarFixed:!1,toolbarFixedTarget:document,toolbarFixedTopOffset:0,toolbarFixedBox:!1,toolbarExternal:!1,toolbarOverflow:!1,buttonSource:!0,buttons:["html","undo","redo","formatting","bold","italic","deleted","unorderedlist","orderedlist","outdent","indent","image","video","file","table","link","alignment","|","horizontalrule"],buttonsHideOnMobile:[],activeButtons:["deleted","italic","bold","underline","unorderedlist","orderedlist","alignleft","aligncenter","alignright","justify","table"],activeButtonsStates:{b:"bold",strong:"bold",i:"italic",em:"italic",del:"deleted",strike:"deleted",ul:"unorderedlist",ol:"orderedlist",u:"underline",tr:"table",td:"table",table:"table"},formattingTags:["p","blockquote","code","h2","h3","h4","h5","h6"],linebreaks:!1,paragraphy:!0,convertDivs:!0,convertLinks:!0,convertImageLinks:!1,convertVideoLinks:!1,formattingPre:!1,phpTags:!1,allowedTags:!1,deniedTags:["html","head","link","body","meta","script","style","applet"],boldTag:"strong",italicTag:"em",indentValue:20,buffer:[],rebuffer:[],textareamode:!1,emptyHtml:"<p>&#x200b;</p>",invisibleSpace:"&#x200b;",rBlockTest:/^(P|H[1-6]|LI|ADDRESS|SECTION|HEADER|FOOTER|ASIDE|ARTICLE)$/i,alignmentTags:["P","H1","H2","H3","H4","H5","H6","DD","DL","DT","DIV","TD","BLOCKQUOTE","OUTPUT","FIGCAPTION","ADDRESS","SECTION","HEADER","FOOTER","ASIDE","ARTICLE"],ownLine:["area","body","head","hr","i?frame","link","meta","noscript","style","script","table","tbody","thead","tfoot"],contOwnLine:["li","dt","dt","h[1-6]","option","script"],newLevel:["blockquote","div","dl","fieldset","form","frameset","map","ol","p","code","select","td","th","tr","ul"],blockLevelElements:["P","H1","H2","H3","H4","H5","H6","DD","DL","DT","DIV","LI","BLOCKQUOTE","OUTPUT","FIGCAPTION","CODE","ADDRESS","SECTION","HEADER","FOOTER","ASIDE","ARTICLE","TD"],langs:{en:{html:"HTML",video:"Insert Video",image:"Insert Image",table:"Table",link:"Link",link_insert:"Insert link",link_edit:"Edit link",unlink:"Unlink",formatting:"Formatting",paragraph:"Normal text",quote:"Quote",code:"Code",header1:"Header 1",header2:"Header 2",header3:"Header 3",header4:"Header 4",header5:"Header 5",bold:"Bold",italic:"Italic",fontcolor:"Font Color",backcolor:"Back Color",unorderedlist:"Unordered List",orderedlist:"Ordered List",outdent:"Outdent",indent:"Indent",cancel:"Cancel",insert:"Insert",save:"Save",_delete:"Delete",insert_table:"Insert Table",insert_row_above:"Add Row Above",insert_row_below:"Add Row Below",insert_column_left:"Add Column Left",insert_column_right:"Add Column Right",delete_column:"Delete Column",delete_row:"Delete Row",delete_table:"Delete Table",rows:"Rows",columns:"Columns",add_head:"Add Head",delete_head:"Delete Head",title:"Title",image_position:"Position",none:"None",left:"Left",right:"Right",center:"Center",image_web_link:"Image Web Link",text:"Text",mailto:"Email",web:"URL",video_html_code:"Video Embed Code",file:"Insert File",upload:"Upload",download:"Download",choose:"Choose",empty_img_list:"You have no images",or_choose:"Or choose",drop_file_here:"Drop file here",align_left:"Align text to the left",align_center:"Center text",align_right:"Align text to the right",align_justify:"Justify text",horizontalrule:"Insert Horizontal Rule",fullscreen:"Full screen",fontsize:"Font size",fontfamily:"Font",remove_font:"Clear Font",image_save_toserver:"Save to the server?",deleted:"Deleted",anchor:"Anchor",link_new_tab:"Open link in new tab",underline:"Underline",alignment:"Alignment",filename:"Name (optional)",edit:"Edit",spoiler:"Spoiler",spoiler_name:"Spoiler name",spoiler_text:"Spoiler text",smiles:"Smiles",undo:"Undo",redo:"Redo",formalize:"Formalize"}}},Redactor.fn=$.Redactor.prototype={keyCode:{BACKSPACE:8,DELETE:46,DOWN:40,ENTER:13,ESC:27,TAB:9,CTRL:17,META:91,LEFT:37,LEFT_WIN:91},init:function(t,e){this.rtePaste=!1,this.$element=this.$source=$(t),this.uuid=uuid++;var s=$.extend(!0,{},$.Redactor.opts);if(this.opts=$.extend({},s,this.$element.data(),e),this.start=!0,this.dropdowns=[],this.sourceHeight=this.$source.css("height"),this.sourceWidth=this.$source.css("width"),this.opts.fullpage&&(this.opts.iframe=!0),this.opts.linebreaks&&(this.opts.paragraphy=!1),this.opts.paragraphy&&(this.opts.linebreaks=!1),this.opts.toolbarFixedBox&&(this.opts.toolbarFixed=!0),this.document=document,this.window=window,this.savedSel=!1,this.cleanlineBefore=RegExp("^<(/?"+this.opts.ownLine.join("|/?")+"|"+this.opts.contOwnLine.join("|")+")[ >]"),this.cleanlineAfter=RegExp("^<(br|/?"+this.opts.ownLine.join("|/?")+"|/"+this.opts.contOwnLine.join("|/")+")[ >]"),this.cleannewLevel=RegExp("^</?("+this.opts.newLevel.join("|")+")[ >]"),this.rTestBlock=RegExp("^("+this.opts.blockLevelElements.join("|")+")$","i"),!1===this.opts.linebreaks){if(!1!==this.opts.allowedTags){var o=["strong","em","del"],r=["b","i","strike"];for(i in"-1"===$.inArray("p",this.opts.allowedTags)&&this.opts.allowedTags.push("p"),o)"-1"!=$.inArray(o[i],this.opts.allowedTags)&&this.opts.allowedTags.push(r[i])}if(!1!==this.opts.deniedTags){var a=$.inArray("p",this.opts.deniedTags);"-1"!==a&&this.opts.deniedTags.splice(a,a)}}(this.browser("msie")||this.browser("opera"))&&(this.opts.buttons=this.removeFromArrayByValue(this.opts.buttons,"horizontalrule")),this.opts.curLang=this.opts.langs[this.opts.lang],$.extend(this.opts.shortcuts,this.opts.shortcutsAdd),this.placeholderInit(),this.buildStart()},toolbarInit:function(t){return{html:{title:t.html,func:"toggle"},undo:{title:t.undo,func:"bufferUndo"},redo:{title:t.redo,func:"bufferRedo"},formatting:{title:t.formatting,func:"show",dropdown:{p:{title:t.paragraph,func:"formatBlocks"},blockquote:{title:t.quote,func:"formatQuote",className:"redactor_format_blockquote"},code:{title:t.code,func:"formatBlocks",className:"redactor_format_code"},h1:{title:t.header1,func:"formatBlocks",className:"redactor_format_h1"},h2:{title:t.header2,func:"formatBlocks",className:"redactor_format_h2"},h3:{title:t.header3,func:"formatBlocks",className:"redactor_format_h3"},h4:{title:t.header4,func:"formatBlocks",className:"redactor_format_h4"},h5:{title:t.header5,func:"formatBlocks",className:"redactor_format_h5"}}},bold:{title:t.bold,exec:"bold"},italic:{title:t.italic,exec:"italic"},deleted:{title:t.deleted,exec:"strikethrough"},underline:{title:t.underline,exec:"underline"},unorderedlist:{title:"&bull; "+t.unorderedlist,exec:"insertunorderedlist"},orderedlist:{title:"1. "+t.orderedlist,exec:"insertorderedlist"},outdent:{title:"< "+t.outdent,func:"indentingOutdent"},indent:{title:"> "+t.indent,func:"indentingIndent"},image:{title:t.image,func:"imageShow"},video:{title:t.video,func:"videoShow"},file:{title:t.file,func:"fileShow"},table:{title:t.table,func:"show",dropdown:{insert_table:{title:t.insert_table,func:"tableShow"},separator_drop1:{name:"separator"},insert_row_above:{title:t.insert_row_above,func:"tableAddRowAbove"},insert_row_below:{title:t.insert_row_below,func:"tableAddRowBelow"},insert_column_left:{title:t.insert_column_left,func:"tableAddColumnLeft"},insert_column_right:{title:t.insert_column_right,func:"tableAddColumnRight"},separator_drop2:{name:"separator"},add_head:{title:t.add_head,func:"tableAddHead"},delete_head:{title:t.delete_head,func:"tableDeleteHead"},separator_drop3:{name:"separator"},delete_column:{title:t.delete_column,func:"tableDeleteColumn"},delete_row:{title:t.delete_row,func:"tableDeleteRow"},delete_table:{title:t.delete_table,func:"tableDeleteTable"}}},link:{title:t.link,func:"show",dropdown:{link:{title:t.link_insert,func:"linkShow"},unlink:{title:t.unlink,exec:"unlink"}}},alignment:{title:t.alignment,func:"show",dropdown:{alignleft:{title:t.align_left,func:"alignmentLeft"},aligncenter:{title:t.align_center,func:"alignmentCenter"},alignright:{title:t.align_right,func:"alignmentRight"},justify:{title:t.align_justify,func:"alignmentJustify"}}},alignleft:{title:t.align_left,func:"alignmentLeft"},aligncenter:{title:t.align_center,func:"alignmentCenter"},alignright:{title:t.align_right,func:"alignmentRight"},alignjustify:{title:t.align_justify,func:"alignmentJustify"},horizontalrule:{exec:"inserthorizontalrule",title:t.horizontalrule}}},callback:function(t,e,s){var o=this.opts[t+"Callback"];return $.isFunction(o)?!1===e?o.call(this,s):o.call(this,e,s):s},destroy:function(){clearInterval(this.autosaveInterval),$(window).off(".redactor"),this.$source.off("redactor-textarea"),this.$element.off(".redactor").removeData("redactor");var t=this.get();if(this.opts.textareamode)this.$box.after(this.$source),this.$box.remove(),this.$source.val(t).show();else{var e=this.$editor;this.opts.iframe&&(e=this.$element),this.$box.after(e),this.$box.remove(),e.removeClass("redactor_editor").removeClass("redactor_editor_wym").removeAttr("contenteditable").html(t).show()}this.opts.toolbarExternal&&$(this.opts.toolbarExternal).html(""),this.opts.air&&$("#redactor_air_"+this.uuid).remove()},getObject:function(){return $.extend({},this)},getEditor:function(){return this.$editor},getBox:function(){return this.$box},getIframe:function(){return!!this.opts.iframe&&this.$frame},getToolbar:function(){return!!this.$toolbar&&this.$toolbar},get:function(){return this.$source.val()},getCodeIframe:function(){this.$editor.removeAttr("contenteditable").removeAttr("dir");var t=this.outerHtml(this.$frame.contents().children());return this.$editor.attr({contenteditable:!0,dir:this.opts.direction}),t},set:function(t,e,s){t=(t=t.toString()).replace(/\$/g,"&#36;"),this.opts.fullpage?this.setCodeIframe(t):this.setEditor(t,e),""==t&&(s=!1),!1!==s&&this.placeholderRemoveFromEditor()},setEditor:function(t,e){!1!==e&&(t=this.cleanSavePreCode(t),t=this.cleanStripTags(t),t=this.cleanConvertProtected(t),t=this.cleanConvertInlineTags(t,!0),t=!1===this.opts.linebreaks?this.cleanConverters(t):t.replace(/<p(.*?)>([\w\W]*?)<\/p>/gi,"$2<br>")),t=t.replace(/&amp;#36;/g,"$"),t=this.cleanEmpty(t),t=this.sanitizeHTML(t),this.$editor.html(t),this.setNonEditable(),this.setSpansVerified(),this.sync()},sanitizeHTML:function(t){function e(){return new DOMParser().parseFromString(t,"text/html").body}function s(t){let e=t.children;for(let r of e)o(r),s(r)}function o(t){let e=t.attributes;for(let{name:s,value:o}of e)r(s,o)&&t.removeAttribute(s)}function r(t,e){let s=e.replace(/\s+/g,"").toLowerCase();if(["src","href","xlink:href"].includes(t)&&(s.includes("javascript:")||s.includes("data:text/html"))||t.startsWith("on"))return!0}let a=e();return s(a),a.innerHTML},setCodeIframe:function(t){var e=this.iframePage();this.$frame[0].src="about:blank",t=this.cleanConvertProtected(t),t=this.cleanConvertInlineTags(t),t=this.cleanRemoveSpaces(t),e.open(),e.write(t),e.close(),this.opts.fullpage&&(this.$editor=this.$frame.contents().find("body").attr({contenteditable:!0,dir:this.opts.direction})),this.setNonEditable(),this.setSpansVerified(),this.sync()},setFullpageOnInit:function(t){this.fullpageDoctype=t.match(/^<\!doctype[^>]*>/i),this.fullpageDoctype&&1==this.fullpageDoctype.length&&(t=t.replace(/^<\!doctype[^>]*>/i,"")),t=this.cleanSavePreCode(t,!0),t=this.cleanConverters(t),t=this.cleanEmpty(t),t=this.sanitizeHTML(t),this.$editor.html(t),this.setNonEditable(),this.setSpansVerified(),this.sync()},setFullpageDoctype:function(){if(this.fullpageDoctype&&1==this.fullpageDoctype.length){var t=this.fullpageDoctype[0]+"\n"+this.$source.val();this.$source.val(t)}},setSpansVerified:function(){var t=this.$editor.find("span"),e="inline";$.each(t,function(){var t=this.outerHTML,s=RegExp("<"+this.tagName,"gi"),o=t.replace(s,"<"+e);s=RegExp("</"+this.tagName,"gi"),o=o.replace(s,"</"+e),$(this).replaceWith(o)})},setSpansVerifiedHtml:function(t){return(t=t.replace(/<span(.*?)>/,"<inline$1>")).replace(/<\/span>/,"</inline>")},setNonEditable:function(){this.$editor.find(".noneditable").attr("contenteditable",!1)},sync:function(t){var e,s="";if(this.cleanUnverified(),s=this.opts.fullpage?this.getCodeIframe():this.$editor.html(),s=this.syncClean(s),s=this.cleanRemoveEmptyTags(s),this.cleanRemoveSpaces(this.$source.val(),!1)==this.cleanRemoveSpaces(s,!1))return!1;if(s=s.replace(/<\/li><(ul|ol)>([\w\W]*?)<\/(ul|ol)>/gi,"<$1>$2</$1></li>"),"<br>"===$.trim(s)&&(s=""),this.opts.xhtml){var o=["br","hr","img","link","input","meta"];$.each(o,function(t,e){s=s.replace(RegExp("<"+e+"(.*?[^/$]?)>","gi"),"<"+e+"$1 />")})}if(s=this.callback("syncBefore",!1,s),this.$source.val(s),this.setFullpageDoctype(),this.callback("syncAfter",!1,s),!1===this.start){if(void 0!==t)switch(t.which){case 37:case 38:case 39:case 40:break;default:this.callback("change",!1,s)}else this.callback("change",!1,s)}},syncClean:function(t){return this.opts.fullpage||(t=this.cleanStripTags(t)),t=$.trim(t),("<p></p>"==(t=(t=(t=(t=(t=this.placeholderRemoveFromCode(t)).replace(/&#x200b;/gi,"")).replace(/&#8203;/gi,"")).replace(/<\/a>&nbsp;/gi,"</a> ")).replace(/\u200B/g,""))||"<p> </p>"==t||"<p>&nbsp;</p>"==t)&&(t=""),this.opts.linkNofollow&&(t=(t=t.replace(/<a(.*?)rel="nofollow"(.*?)>/gi,"<a$1$2>")).replace(/<a(.*?)>/gi,'<a$1 rel="nofollow">')),t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace("<!--?php","<?php")).replace("?-->","?>")).replace(/<(.*?)class="noeditable"(.*?) contenteditable="false"(.*?)>/gi,'<$1class="noeditable"$2$3>')).replace(/ data-tagblock=""/gi,"")).replace(/<br\s?\/?>\n?<\/(P|H[1-6]|LI|ADDRESS|SECTION|HEADER|FOOTER|ASIDE|ARTICLE)>/gi,"</$1>")).replace(/<span(.*?)id="redactor-image-box"(.*?)>([\w\W]*?)<img(.*?)><\/span>/gi,"$3<img$4>")).replace(/<span(.*?)id="redactor-image-resizer"(.*?)>(.*?)<\/span>/gi,"")).replace(/<span(.*?)id="redactor-image-editter"(.*?)>(.*?)<\/span>/gi,"")).replace(/<(ul|ol)>\s*\t*\n*<\/(ul|ol)>/gi,""),this.opts.cleanFontTag&&(t=t.replace(/<font(.*?)>([\w\W]*?)<\/font>/gi,"$2")),t=(t=(t=(t=(t=t.replace(/<span(.*?)>([\w\W]*?)<\/span>/gi,"$2")).replace(/<inline>([\w\W]*?)<\/inline>/gi,"$1")).replace(/<inline>/gi,"<span>")).replace(/<inline /gi,"<span ")).replace(/<\/inline>/gi,"</span>"),this.opts.removeEmptyTags&&(t=t.replace(/<span>([\w\W]*?)<\/span>/gi,"$1")),t=(t=(t=(t=(t=(t=(t=(t=t.replace(/<span(.*?)class="redactor_placeholder"(.*?)>([\w\W]*?)<\/span>/gi,"")).replace(/<img(.*?)contenteditable="false"(.*?)>/gi,"<img$1$2>")).replace(/&/gi,"&")).replace(/\u2122/gi,"&trade;")).replace(/\u00a9/gi,"&copy;")).replace(/\u2026/gi,"&hellip;")).replace(/\u2014/gi,"&mdash;")).replace(/\u2010/gi,"&dash;"),t=this.cleanReConvertProtected(t)},buildStart:function(){this.content="",this.$box=$('<div class="redactor_box" />'),"TEXTAREA"===this.$source[0].tagName&&(this.opts.textareamode=!0),!1===this.opts.mobile&&this.isMobile()?this.buildMobile():(this.buildContent(),this.opts.iframe?(this.opts.autoresize=!1,this.iframeStart()):this.opts.textareamode?this.buildFromTextarea():this.buildFromElement(),this.opts.iframe||(this.buildOptions(),this.buildAfter()))},buildMobile:function(){this.opts.textareamode||(this.$editor=this.$source,this.$editor.hide(),this.$source=this.buildCodearea(this.$editor),this.$source.val(this.content)),this.$box.insertAfter(this.$source).append(this.$source)},buildContent:function(){this.opts.textareamode?this.content=$.trim(this.$source.val()):this.content=$.trim(this.$source.html())},buildFromTextarea:function(){this.$editor=$("<div />"),this.$box.insertAfter(this.$source).append(this.$editor).append(this.$source),this.buildAddClasses(this.$editor),this.buildEnable()},buildFromElement:function(){this.$editor=this.$source,this.$source=this.buildCodearea(this.$editor),this.$box.insertAfter(this.$editor).append(this.$editor).append(this.$source),this.buildEnable()},buildCodearea:function(t){return $("<textarea />").attr("name",t.attr("id")).css("height",this.sourceHeight)},buildAddClasses:function(t){$.each(this.$source.get(0).className.split(/\s+/),function(e,s){t.addClass("redactor_"+s)})},buildEnable:function(){this.$editor.addClass("redactor_editor").attr({contenteditable:!0,dir:this.opts.direction}),this.$source.attr("dir",this.opts.direction).hide(),this.set(this.content,!0,!1)},buildOptions:function(){var t=this.$editor;this.opts.iframe&&(t=this.$frame),this.opts.tabindex&&t.attr("tabindex",this.opts.tabindex),this.opts.minHeight?t.css("min-height",this.opts.minHeight+"px"):this.browser("mozilla")&&this.opts.linebreaks&&this.$editor.css("min-height","45px"),this.browser("mozilla")&&this.opts.linebreaks&&this.$editor.css("padding-bottom","10px"),this.opts.maxHeight&&(this.opts.autoresize=!1,this.sourceHeight=this.opts.maxHeight),this.opts.wym&&this.$editor.addClass("redactor_editor_wym"),this.opts.typewriter&&this.$editor.addClass("redactor-editor-typewriter"),this.opts.autoresize||t.css("height",this.sourceHeight)},buildAfter:function(){if(this.start=!1,this.opts.toolbar&&(this.opts.toolbar=this.toolbarInit(this.opts.curLang),this.toolbarBuild()),this.modalTemplatesInit(),this.buildPlugins(),this.buildBindKeyboard(),this.opts.autosave&&this.autosave(),setTimeout($.proxy(this.observeStart,this),4),this.browser("mozilla"))try{this.document.execCommand("enableObjectResizing",!1,!1),this.document.execCommand("enableInlineTableEditing",!1,!1)}catch(t){}this.opts.focus&&setTimeout($.proxy(this.focus,this),100),this.opts.visual||setTimeout($.proxy(function(){this.opts.visual=!0,this.toggle(!1)},this),200),this.callback("init")},buildBindKeyboard:function(){var t;this.dblEnter=0,this.opts.dragUpload&&(!1!==this.opts.imageUpload||!1!==this.opts.s3)&&this.$editor.on("drop.redactor",$.proxy(this.buildEventDrop,this)),this.$editor.on("click.redactor",$.proxy(function(){this.selectall=!1},this)),this.$editor.on("input.redactor",$.proxy(this.sync,this)),this.$editor.on("paste.redactor",$.proxy(this.buildEventPaste,this)),this.$editor.on("keydown.redactor",$.proxy(this.buildEventKeydown,this)),this.$editor.on("keyup.redactor",$.proxy(this.buildEventKeyup,this)),$.isFunction(this.opts.textareaKeydownCallback)&&this.$source.on("keydown.redactor-textarea",$.proxy(this.opts.textareaKeydownCallback,this)),$.isFunction(this.opts.focusCallback)&&this.$editor.on("focus.redactor",$.proxy(this.opts.focusCallback,this)),$(document).mousedown(function(e){t=$(e.target)}),this.$editor.on("blur.redactor",$.proxy(function(e){!$(t).hasClass("redactor_toolbar")&&0==$(t).parents(".redactor_toolbar").length&&(this.selectall=!1,$.isFunction(this.opts.blurCallback)&&this.callback("blur",e))},this))},buildEventDrop:function(t){if(t=t.originalEvent||t,void 0===window.FormData||!t.dataTransfer||0==t.dataTransfer.files.length)return!0;t.preventDefault();var e=t.dataTransfer.files[0];if(!1!==this.opts.dnbImageTypes&&-1==this.opts.dnbImageTypes.indexOf(e.type))return!0;this.bufferSet(),this.showProgressBar(),!1===this.opts.s3?this.dragUploadAjax(this.opts.imageUpload,e,!0,t,this.opts.imageUploadParam):this.s3uploadFile(e)},buildEventPaste:function(t){var e=!1;if(this.browser("webkit")&&-1===navigator.userAgent.indexOf("Chrome")&&this.browser("version").split(".")[0]<536&&(e=!0),e||this.browser("opera")||this.opts.clipboardUpload&&this.buildEventClipboardUpload(t))return!0;if(this.opts.cleanup){this.rtePaste=!0,this.selectionSave(),this.selectall||(!0===this.opts.autoresize&&!0!==this.fullscreen?(this.$editor.height(this.$editor.height()),this.saveScroll=this.document.body.scrollTop):this.saveScroll=this.$editor.scrollTop());var s=this.extractContent();setTimeout($.proxy(function(){var t=this.extractContent();this.$editor.append(s),this.selectionRestore();var e=this.getFragmentHtml(t);this.pasteClean(e),!0===this.opts.autoresize&&!0!==this.fullscreen&&this.$editor.css("height","auto")},this),1)}},buildEventClipboardUpload:function(t){var e=t.originalEvent||t;if(this.clipboardFilePaste=!1,void 0===e.clipboardData)return!1;if(e.clipboardData.items){var s=e.clipboardData.items[0].getAsFile();if(null!==s){this.bufferSet(),this.clipboardFilePaste=!0;var o=new FileReader;return o.onload=$.proxy(this.pasteClipboardUpload,this),o.readAsDataURL(s),!0}}return!1},buildEventKeydown:function(t){if(this.rtePaste)return!1;var e=t.which,s=t.ctrlKey||t.metaKey,o=this.getParent(),r=this.getCurrent(),a=this.getBlock(),n=!1;if(this.callback("keydown",t),this.browser("mozilla")&&"modify"in window.getSelection()&&s&&(37===t.keyCode||39===t.keyCode)){var l=this.getSelection(),c=t.metaKey?"line":"word";37!==t.keyCode||(l.modify("extend","left",c),t.shiftKey||l.collapseToStart()),39!==t.keyCode||(l.modify("extend","right",c),t.shiftKey||l.collapseToEnd()),t.preventDefault()}if(this.imageResizeHide(!1),(o&&"CODE"===$(o).get(0).tagName||r&&"CODE"===$(r).get(0).tagName)&&(n=!0,e===this.keyCode.DOWN&&this.insertAfterLastElement(a)),e===this.keyCode.DOWN&&(o&&"BLOCKQUOTE"===$(o)[0].tagName&&this.insertAfterLastElement(o),r&&"BLOCKQUOTE"===$(r)[0].tagName&&this.insertAfterLastElement(r),o&&"P"===$(o)[0].tagName&&"BLOCKQUOTE"==$(o).parent()[0].tagName&&this.insertAfterLastElement(o,$(o).parent()[0]),r&&"P"===$(r)[0].tagName&&o&&"BLOCKQUOTE"==$(o)[0].tagName&&this.insertAfterLastElement(r,o)),this.shortcuts(t,e),!s||90!==e||t.shiftKey||t.altKey){if(s&&90===e&&t.shiftKey&&!t.altKey){t.preventDefault(),0!=this.opts.rebuffer.length?this.bufferRedo():this.document.execCommand("redo",!1,!1);return}}else{t.preventDefault(),this.opts.buffer.length?this.bufferUndo():this.document.execCommand("undo",!1,!1);return}if(32==e&&this.bufferSet(),s&&65===e?(this.bufferSet(),this.selectall=!0):e==this.keyCode.LEFT_WIN||s||(this.selectall=!1),e!=this.keyCode.ENTER||t.shiftKey||t.ctrlKey||t.metaKey)e===this.keyCode.ENTER&&(t.ctrlKey||t.shiftKey)&&(this.bufferSet(),t.preventDefault(),this.insertLineBreak());else{var h=this.getRange();if(h&&!1===h.collapsed&&(sel=this.getSelection()).rangeCount&&h.deleteContents(),this.browser("msie")&&1==o.nodeType&&("TD"==o.tagName||"TH"==o.tagName))return t.preventDefault(),this.bufferSet(),this.insertNode(document.createElement("br")),this.callback("enter",t),!1;if(a&&("BLOCKQUOTE"==a.tagName||"BLOCKQUOTE"==$(a).parent()[0].tagName)){if(this.isEndOfElement()){if(1==this.dblEnter){if("BLOCKQUOTE"==a.tagName?(p="br",d=a):(p="p",d=$(a).parent()[0]),t.preventDefault(),this.insertingAfterLastElement(d),this.dblEnter=0,"p"==p)$(a).parent().find("p").last().remove();else{var d,p,u=$.trim($(a).html());$(a).html(u.replace(/<br\s?\/?>$/i,""))}return}this.dblEnter++}else this.dblEnter++}if(!0===n)return this.buildEventKeydownPre(t,r);if(!this.opts.linebreaks){if(a&&"LI"==a.tagName){var f=this.getBlock();if(!1!==f||"LI"===f.tagName){var m=$.trim($(a).text()),g=$.trim($(f).text());if(""==m&&""==g&&0==$(f).next("li").length&&0==$(f).parents("li").length){this.bufferSet();var b=$(f).closest("ol, ul");$(f).remove();var v=$("<p>"+this.opts.invisibleSpace+"</p>");return b.after(v),this.selectionStart(v),this.sync(),this.callback("enter",t),!1}}}if(a&&this.opts.rBlockTest.test(a.tagName))this.bufferSet(),setTimeout($.proxy(function(){var t=this.getBlock();if("DIV"===t.tagName&&!$(t).hasClass("redactor_editor")){var e=$("<p>"+this.opts.invisibleSpace+"</p>");$(t).replaceWith(e),this.selectionStart(e)}},this),1);else if(!1===a){this.bufferSet();var v=$("<p>"+this.opts.invisibleSpace+"</p>");return this.insertNode(v[0]),this.selectionStart(v),this.callback("enter",t),!1}}if(this.opts.linebreaks){if(!(a&&this.opts.rBlockTest.test(a.tagName)))return this.buildEventKeydownInsertLineBreak(t);this.bufferSet(),setTimeout($.proxy(function(){var t=this.getBlock();"DIV"!==t.tagName&&"P"!==t.tagName||$(t).hasClass("redactor_editor")||this.replaceLineBreak(t)},this),1)}if("BLOCKQUOTE"==a.tagName||"FIGCAPTION"==a.tagName)return this.buildEventKeydownInsertLineBreak(t);this.callback("enter",t)}if((e===this.keyCode.TAB||t.metaKey&&219===e)&&this.opts.shortcuts)return this.buildEventKeydownTab(t,n,e);e===this.keyCode.BACKSPACE&&this.buildEventKeydownBackspace(t,r,o)},buildEventKeydownPre:function(t,e){t.preventDefault(),this.bufferSet();var s=$(e).parent().text();return this.insertNode(document.createTextNode("\n")),-1==s.search(/\s$/)&&this.insertNode(document.createTextNode("\n")),this.sync(),this.callback("enter",t),!1},buildEventKeydownTab:function(t,e,s){return!!(!this.opts.tabFocus||this.isEmpty(this.get())&&!1===this.opts.tabSpaces)||(t.preventDefault(),!0!==e||t.shiftKey?!1!==this.opts.tabSpaces?(this.bufferSet(),this.insertNode(document.createTextNode(Array(this.opts.tabSpaces+1).join("\xa0"))),this.sync()):t.shiftKey?this.indentingOutdent():this.indentingIndent():(this.bufferSet(),this.insertNode(document.createTextNode("	")),this.sync()),!1)},buildEventKeydownBackspace:function(t,e,s){if(s&&e&&"TD"==s.parentNode.tagName&&"UL"==s.tagName&&"LI"==e.tagName&&1==$(s).children("li").length){var o;if(""==$(e).text().replace(/[\u200B-\u200D\uFEFF]/g,"")){var o=s.parentNode;return $(s).remove(),this.selectionStart(o),this.sync(),!1}}void 0!==e.tagName&&/^(H[1-6])$/i.test(e.tagName)&&(o=!1===this.opts.linebreaks?$("<p>"+this.opts.invisibleSpace+"</p>"):$("<br>"+this.opts.invisibleSpace),$(e).replaceWith(o),this.selectionStart(o),this.sync()),void 0!==e.nodeValue&&null!==e.nodeValue&&e.remove&&3===e.nodeType&&null==e.nodeValue.match(/[^\u200B]/g)&&($(e).prev().remove(),this.sync())},buildEventKeydownInsertLineBreak:function(t){this.bufferSet(),t.preventDefault(),this.insertLineBreak(),this.callback("enter",t)},buildEventKeyup:function(t){if(this.rtePaste)return!1;var e=t.which,s=this.getParent(),o=this.getCurrent();if(!this.opts.linebreaks&&3==o.nodeType&&(!1==s||"BODY"==s.tagName)){var r=$("<p>").append($(o).clone());$(o).replaceWith(r);var a=$(r).next();void 0!==a[0]&&"BR"==a[0].tagName&&a.remove(),this.selectionEnd(r)}if((this.opts.convertLinks||this.opts.convertImageLinks||this.opts.convertVideoLinks)&&e===this.keyCode.ENTER&&this.buildEventKeyupConverters(),e===this.keyCode.DELETE||e===this.keyCode.BACKSPACE)return this.formatEmpty(t);this.callback("keyup",t),this.sync(t)},buildEventKeyupConverters:function(){this.formatLinkify(this.opts.linkProtocol,this.opts.convertLinks,this.opts.convertImageLinks,this.opts.convertVideoLinks,this.opts.linkSize),setTimeout($.proxy(function(){this.opts.convertImageLinks&&this.observeImages(),this.opts.observeLinks&&this.observeLinks()},this),5)},buildPlugins:function(){this.opts.plugins&&$.each(this.opts.plugins,$.proxy(function(t,e){RedactorPlugins[e]&&($.extend(this,RedactorPlugins[e]),$.isFunction(RedactorPlugins[e].init)&&this.init())},this))},iframeStart:function(){this.iframeCreate(),this.opts.textareamode?this.iframeAppend(this.$source):(this.$sourceOld=this.$source.hide(),this.$source=this.buildCodearea(this.$sourceOld),this.iframeAppend(this.$sourceOld))},iframeAppend:function(t){this.$source.attr("dir",this.opts.direction).hide(),this.$box.insertAfter(t).append(this.$frame).append(this.$source)},iframeCreate:function(){this.$frame=$('<iframe style="width: 100%;" frameborder="0" />').one("load",$.proxy(function(){if(this.opts.fullpage){this.iframePage(),""===this.content&&(this.content=this.opts.invisibleSpace),this.$frame.contents()[0].write(this.content),this.$frame.contents()[0].close();var t=setInterval($.proxy(function(){this.$frame.contents().find("body").html()&&(clearInterval(t),this.iframeLoad())},this),0)}else this.iframeLoad()},this))},iframeDoc:function(){return this.$frame[0].contentWindow.document},iframePage:function(){var t=this.iframeDoc();return t.documentElement&&t.removeChild(t.documentElement),t},iframeAddCss:function(t){t=t||this.opts.css,this.isString(t)&&this.$frame.contents().find("head").append('<link rel="stylesheet" href="'+t+'" />'),$.isArray(t)&&$.each(t,$.proxy(function(t,e){this.iframeAddCss(e)},this))},iframeLoad:function(){this.$editor=this.$frame.contents().find("body").attr({contenteditable:!0,dir:this.opts.direction}),this.$editor[0]&&(this.document=this.$editor[0].ownerDocument,this.window=this.document.defaultView||window),this.iframeAddCss(),this.opts.fullpage?this.setFullpageOnInit(this.$source.val()):this.set(this.content,!0,!1),this.buildOptions(),this.buildAfter()},placeholderInit:function(){!1!==this.opts.placeholder?(this.placeholderText=this.opts.placeholder,this.opts.placeholder=!0):void 0===this.$element.attr("placeholder")||""==this.$element.attr("placeholder")?this.opts.placeholder=!1:(this.placeholderText=this.$element.attr("placeholder"),this.opts.placeholder=!0)},placeholderStart:function(t){return!1!==this.opts.placeholder&&(this.isEmpty(t)?(this.opts.focus=!1,this.placeholderOnFocus(),this.placeholderOnBlur(),this.placeholderGet()):(this.placeholderOnBlur(),!1))},placeholderOnFocus:function(){this.$editor.on("focus.redactor_placeholder",$.proxy(this.placeholderFocus,this))},placeholderOnBlur:function(){this.$editor.on("blur.redactor_placeholder",$.proxy(this.placeholderBlur,this))},placeholderGet:function(){var t=$('<span class="redactor_placeholder">').data("redactor","verified").attr("contenteditable",!1).text(this.placeholderText);return!1===this.opts.linebreaks?$("<p>").append(t):t},placeholderBlur:function(){var t=this.get();this.isEmpty(t)&&(this.placeholderOnFocus(),this.$editor.html(this.placeholderGet()))},placeholderFocus:function(){this.$editor.find("span.redactor_placeholder").remove();var t="";!1===this.opts.linebreaks&&(t=this.opts.emptyHtml),this.$editor.off("focus.redactor_placeholder"),this.$editor.html(t),!1===this.opts.linebreaks?this.selectionStart(this.$editor.children()[0]):this.focus(),this.sync()},placeholderRemoveFromEditor:function(){this.$editor.find("span.redactor_placeholder").remove(),this.$editor.off("focus.redactor_placeholder")},placeholderRemoveFromCode:function(t){return t.replace(/<span class="redactor_placeholder"(.*?)>(.*?)<\/span>/i,"")},shortcuts:function(e,key){if(!this.opts.shortcuts)return(e.ctrlKey||e.metaKey)&&(66===key||73===key)&&e.preventDefault(),!1;$.each(this.opts.shortcuts,$.proxy(function(str,command){var keys=str.split(",");for(var i in keys)"string"==typeof keys[i]&&this.shortcutsHandler(e,$.trim(keys[i]),$.proxy(function(){eval(command)},this))},this))},shortcutsHandler:function(t,e,s){var o={8:"backspace",9:"tab",10:"return",13:"return",16:"shift",17:"ctrl",18:"alt",19:"pause",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"insert",46:"del",59:";",61:"=",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12",144:"numlock",145:"scroll",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},r={"`":"~",1:"!",2:"@",3:"#",4:"$",5:"%",6:"^",7:"&",8:"*",9:"(",0:")","-":"_","=":"+",";":": ","'":'"',",":"<",".":">","/":"?","\\":"|"};e=e.toLowerCase().split(" ");var a=o[t.keyCode],n=String.fromCharCode(t.which).toLowerCase(),l="",c={};$.each(["alt","ctrl","meta","shift"],function(e,s){t[s+"Key"]&&a!==s&&(l+=s+"+")}),a&&(c[l+a]=!0),n&&(c[l+n]=!0,c[l+r[n]]=!0,"shift+"===l&&(c[r[n]]=!0));for(var h=0,d=e.length;h<d;h++)if(c[e[h]])return t.preventDefault(),s.apply(this,arguments)},focus:function(){this.browser("opera")?this.$editor.focus():this.window.setTimeout($.proxy(this.focusSet,this,!0),1)},focusWithSaveScroll:function(){if(this.browser("msie"))var t=this.document.documentElement.scrollTop;this.$editor.focus(),this.browser("msie")&&(this.document.documentElement.scrollTop=t)},focusEnd:function(){if(this.browser("mozilla")){if(!1===this.opts.linebreaks){var t=this.$editor.children().last();this.$editor.focus(),this.selectionEnd(t)}else this.focusSet()}else this.focusSet()},focusSet:function(t,e){this.$editor.focus(),void 0===e&&(e=this.$editor[0]);var s=this.getRange();s.selectNodeContents(e),s.collapse(t||!1);var o=this.getSelection();o.removeAllRanges(),o.addRange(s)},toggle:function(t){this.opts.visual?this.toggleCode(t):this.toggleVisual()},toggleVisual:function(){var t=this.$source.hide().val();if(void 0!==this.modified){var e=this.modified.replace(/\n/g,""),s=t.replace(/\n/g,"");s=this.cleanRemoveSpaces(s,!1),this.modified=this.cleanRemoveSpaces(e,!1)!==s}this.modified&&(this.opts.fullpage&&""===t?this.setFullpageOnInit(t):(this.set(t),this.opts.fullpage&&this.buildBindKeyboard()),this.callback("change",!1,t)),this.opts.iframe?this.$frame.show():this.$editor.show(),this.opts.fullpage&&this.$editor.attr("contenteditable",!0),this.$source.off("keydown.redactor-textarea-indenting"),this.$editor.focus(),this.selectionRestore(),this.observeStart(),this.buttonActiveVisual(),this.buttonInactive("html"),this.opts.visual=!0},toggleCode:function(t){!1!==t&&this.selectionSave();var e=null;this.opts.iframe?(e=this.$frame.height(),this.opts.fullpage&&this.$editor.removeAttr("contenteditable"),this.$frame.hide()):(e=this.$editor.innerHeight(),this.$editor.hide());var s=this.$source.val();""!==s&&this.opts.tidyHtml&&this.$source.val(this.cleanHtml(s)),this.modified=s,this.$source.height(e).show().focus(),this.$source.on("keydown.redactor-textarea-indenting",this.textareaIndenting),this.buttonInactiveVisual(),this.buttonActive("html"),this.opts.visual=!1},textareaIndenting:function(t){if(9===t.keyCode){var e=$(this),s=e.get(0).selectionStart;return e.val(e.val().substring(0,s)+"	"+e.val().substring(e.get(0).selectionEnd)),e.get(0).selectionStart=e.get(0).selectionEnd=s+1,!1}},autosave:function(){var t=!1;this.autosaveInterval=setInterval($.proxy(function(){var e=this.get();if(t!==e){var s=this.$source.attr("name");$.ajax({url:this.opts.autosave,type:"post",data:"name="+s+"&"+s+"="+escape(encodeURIComponent(e)),success:$.proxy(function(s){var o=$.parseJSON(s);void 0===o.error?this.callback("autosave",!1,o):this.callback("autosaveError",!1,o),t=e},this)})}},this),1e3*this.opts.autosaveInterval)},toolbarBuild:function(){if(this.isMobile()&&this.opts.buttonsHideOnMobile.length>0&&$.each(this.opts.buttonsHideOnMobile,$.proxy(function(t,e){var s=this.opts.buttons.indexOf(e);this.opts.buttons.splice(s,1)},this)),this.opts.air)this.opts.buttons=this.opts.airButtons;else if(!this.opts.buttonSource){var t=this.opts.buttons.indexOf("html");this.opts.buttons.splice(t,1)}if(this.opts.toolbar&&$.each(this.opts.toolbar.formatting.dropdown,$.proxy(function(t,e){"-1"==$.inArray(t,this.opts.formattingTags)&&delete this.opts.toolbar.formatting.dropdown[t]},this)),0===this.opts.buttons.length)return!1;this.airEnable(),this.$toolbar=$("<ul>").addClass("redactor_toolbar").attr("id","redactor_toolbar_"+this.uuid),this.opts.typewriter&&this.$toolbar.addClass("redactor-toolbar-typewriter"),this.opts.toolbarOverflow&&this.isMobile()&&this.$toolbar.addClass("redactor-toolbar-overflow"),this.opts.air?(this.$air=$('<div class="redactor_air">').attr("id","redactor_air_"+this.uuid).hide(),this.$air.append(this.$toolbar),$("body").append(this.$air)):this.opts.toolbarExternal?(this.$toolbar.addClass("redactor-toolbar-external"),$(this.opts.toolbarExternal).html(this.$toolbar)):this.$box.prepend(this.$toolbar),$.each(this.opts.buttons,$.proxy(function(t,e){if(this.opts.toolbar[e]){var s=this.opts.toolbar[e];if(!1===this.opts.fileUpload&&"file"===e)return!0;this.$toolbar.append($("<li>").append(this.buttonBuild(e,s)))}},this)),this.$toolbar.find("a").attr("tabindex","-1"),this.opts.toolbarFixed&&(this.toolbarObserveScroll(),$(this.opts.toolbarFixedTarget).on("scroll.redactor",$.proxy(this.toolbarObserveScroll,this))),this.opts.activeButtons&&this.$editor.on("mouseup.redactor keyup.redactor",$.proxy(this.buttonActiveObserver,this))},toolbarObserveScroll:function(){var t=$(this.opts.toolbarFixedTarget).scrollTop(),e=0,s=0,o=0;if(o=(e=this.opts.toolbarFixedTarget===document?this.$box.offset().top:1)+this.$box.height()+40,t>e){var r="100%";this.opts.toolbarFixedBox&&(s=this.$box.offset().left,r=this.$box.innerWidth(),this.$toolbar.addClass("toolbar_fixed_box")),this.toolbarFixed=!0,this.opts.toolbarFixedTarget===document?this.$toolbar.css({position:"fixed",width:r,zIndex:10005,top:this.opts.toolbarFixedTopOffset+"px",left:s}):this.$toolbar.css({position:"absolute",width:r,zIndex:10005,top:this.opts.toolbarFixedTopOffset+t+"px",left:0}),t<o?this.$toolbar.css("visibility","visible"):this.$toolbar.css("visibility","hidden")}else this.toolbarFixed=!1,this.$toolbar.css({position:"relative",width:"auto",top:0,left:s}),this.opts.toolbarFixedBox&&this.$toolbar.removeClass("toolbar_fixed_box")},airEnable:function(){this.opts.air&&this.$editor.on("mouseup.redactor keyup.redactor",this,$.proxy(function(t){var e=this.getSelectionText();if("mouseup"===t.type&&""!=e&&this.airShow(t),"keyup"===t.type&&t.shiftKey&&""!=e){var s=$(this.getElement(this.getSelection().focusNode)),o=s.offset();o.height=s.height(),this.airShow(o,!0)}},this))},airShow:function(t,e){if(this.opts.air){if(this.selectionSave(),$(".redactor_air").hide(),e)s=t.left,o=t.top+t.height+14,this.opts.iframe&&(o+=this.$box.position().top-$(this.document).scrollTop(),s+=this.$box.position().left);else{var s,o,r=this.$air.innerWidth();s=t.clientX,$(this.document).width()<s+r&&(s-=r),o=t.clientY+14,this.opts.iframe?(o+=this.$box.position().top,s+=this.$box.position().left):o+=$(this.document).scrollTop()}this.$air.css({left:s+"px",top:o+"px"}).show(),this.airBindHide()}},airBindHide:function(){if(this.opts.air){var t=$.proxy(function(t){$(t).on("mousedown.redactor",$.proxy(function(e){0===$(e.target).closest(this.$toolbar).length&&(this.$air.fadeOut(100),this.selectionRemove(),$(t).off(e))},this)).on("keydown.redactor",$.proxy(function(e){e.which===this.keyCode.ESC&&this.getSelection().collapseToStart(),this.$air.fadeOut(100),$(t).off(e)},this))},this);t(document),this.opts.iframe&&t(this.document)}},airBindMousemoveHide:function(){if(this.opts.air){var t=$.proxy(function(t){$(t).on("mousemove.redactor",$.proxy(function(e){0===$(e.target).closest(this.$toolbar).length&&(this.$air.fadeOut(100),$(t).off(e))},this))},this);t(document),this.opts.iframe&&t(this.document)}},dropdownBuild:function(t,e){$.each(e,$.proxy(function(e,s){var o;s.className||(s.className=""),"separator"===s.name?o=$('<a class="redactor_separator_drop">'):(o=$('<a href="#" class="'+s.className+" redactor_dropdown_"+e+'">'+s.title+"</a>")).on("click",$.proxy(function(t){this.opts.air&&this.selectionRestore(),t.preventDefault&&t.preventDefault(),this.browser("msie")&&(t.returnValue=!1),s.callback&&s.callback.call(this,e,o,s,t),s.exec&&this.execCommand(s.exec,e),s.func&&this[s.func](e),this.buttonActiveObserver(),this.opts.air&&this.$air.fadeOut(100)},this)),t.append(o)},this))},dropdownShow:function(t,e){if(!this.opts.visual)return t.preventDefault(),!1;var s=this.buttonGet(e),o=s.data("dropdown").appendTo(document.body);if(s.hasClass("dropact"))this.dropdownHideAll();else{this.dropdownHideAll(),this.callback("dropdownShow",{dropdown:o,key:e,button:s}),this.buttonActive(e),s.addClass("dropact");var r=s.offset(),a=o.width();r.left+a>$(document).width()&&(r.left-=a);var n=r.left+"px",l=s.innerHeight(),c="absolute",h=l+this.opts.toolbarFixedTopOffset+"px";this.opts.toolbarFixed&&this.toolbarFixed?c="fixed":h=r.top+l+"px",o.css({position:c,left:n,top:h}).show(),this.callback("dropdownShown",{dropdown:o,key:e,button:s})}var d=$.proxy(function(t){this.dropdownHide(t,o)},this);$(document).one("click",d),this.$editor.one("click",d),this.$editor.one("touchstart",d),t.stopPropagation(),this.focusWithSaveScroll()},dropdownHideAll:function(){this.$toolbar.find("a.dropact").removeClass("redactor_act").removeClass("dropact"),$(".redactor_dropdown").hide(),this.callback("dropdownHide")},dropdownHide:function(t,e){$(t.target).hasClass("dropact")||(e.removeClass("dropact"),this.dropdownHideAll())},buttonBuild:function(t,e,s){var o=$('<a href="javascript:;" title="'+e.title+'" tabindex="-1" class="re-icon re-'+t+'"></a>');if(void 0!==s&&o.addClass("redactor-btn-image"),o.on("click",$.proxy(function(s){if(s.preventDefault&&s.preventDefault(),this.browser("msie")&&(s.returnValue=!1),o.hasClass("redactor_button_disabled"))return!1;!1!==this.isFocused()||e.exec||this.focusWithSaveScroll(),e.exec?(this.focusWithSaveScroll(),this.execCommand(e.exec,t),this.airBindMousemoveHide()):e.func&&"show"!==e.func?(this[e.func](t),this.airBindMousemoveHide()):e.callback?(e.callback.call(this,t,o,e,s),this.airBindMousemoveHide()):e.dropdown&&this.dropdownShow(s,t),this.buttonActiveObserver(!1,t)},this)),e.dropdown){var r=$('<div class="redactor_dropdown redactor_dropdown_box_'+t+'" style="display: none;">');o.data("dropdown",r),this.dropdownBuild(r,e.dropdown)}return o},buttonGet:function(t){return!!this.opts.toolbar&&$(this.$toolbar.find("a.re-"+t))},buttonTagToActiveState:function(t,e){this.opts.activeButtons.push(t),this.opts.activeButtonsStates[e]=t},buttonActiveToggle:function(t){this.buttonGet(t).hasClass("redactor_act")?this.buttonInactive(t):this.buttonActive(t)},buttonActive:function(t){this.buttonGet(t).addClass("redactor_act")},buttonInactive:function(t){this.buttonGet(t).removeClass("redactor_act")},buttonInactiveAll:function(t){this.$toolbar.find("a.re-icon").not(".re-"+t).removeClass("redactor_act")},buttonActiveVisual:function(){this.$toolbar.find("a.re-icon").not("a.re-html").removeClass("redactor_button_disabled")},buttonInactiveVisual:function(){this.$toolbar.find("a.re-icon").not("a.re-html").addClass("redactor_button_disabled")},buttonChangeIcon:function(t,e){this.buttonGet(t).addClass("re-"+e)},buttonRemoveIcon:function(t,e){this.buttonGet(t).removeClass("re-"+e)},buttonAwesome:function(t,e){var s=this.buttonGet(t);s.removeClass("redactor-btn-image"),s.addClass("fa-redactor-btn"),s.html('<i class="fa '+e+'"></i>')},buttonAdd:function(t,e,s,o){if(this.opts.toolbar){var r=this.buttonBuild(t,{title:e,callback:s,dropdown:o},!0);return this.$toolbar.append($("<li>").append(r)),r}},buttonAddFirst:function(t,e,s,o){if(this.opts.toolbar){var r=this.buttonBuild(t,{title:e,callback:s,dropdown:o},!0);this.$toolbar.prepend($("<li>").append(r))}},buttonAddAfter:function(t,e,s,o,r){if(this.opts.toolbar){var a=this.buttonBuild(e,{title:s,callback:o,dropdown:r},!0),n=this.buttonGet(t);return 0!==n.length?n.parent().after($("<li>").append(a)):this.$toolbar.append($("<li>").append(a)),a}},buttonAddBefore:function(t,e,s,o,r){if(this.opts.toolbar){var a=this.buttonBuild(e,{title:s,callback:o,dropdown:r},!0),n=this.buttonGet(t);return 0!==n.length?n.parent().before($("<li>").append(a)):this.$toolbar.append($("<li>").append(a)),a}},buttonRemove:function(t){this.buttonGet(t).remove()},buttonActiveObserver:function(t,e){var s=this.getParent();if(this.buttonInactiveAll(e),!1===t&&"html"!==e){-1!=$.inArray(e,this.opts.activeButtons)&&this.buttonActiveToggle(e);return}s&&"A"===s.tagName?this.$toolbar.find("a.redactor_dropdown_link").text(this.opts.curLang.link_edit):this.$toolbar.find("a.redactor_dropdown_link").text(this.opts.curLang.link_insert),$.each(this.opts.activeButtonsStates,$.proxy(function(t,e){0!=$(s).closest(t,this.$editor.get()[0]).length&&this.buttonActive(e)},this));var o=$(s).closest(this.opts.alignmentTags.toString().toLowerCase(),this.$editor[0]);if(o.length){var r=o.css("text-align");""==r&&(r="left"),this.buttonActive("align"+r)}},execPasteFrag:function(t){var e=this.getSelection();if(e.getRangeAt&&e.rangeCount){var s=this.getRange();s.deleteContents();var o=this.document.createElement("div");o.innerHTML=t;for(var r,a,n=this.document.createDocumentFragment();r=o.firstChild;)a=n.appendChild(r);n.firstChild,s.insertNode(n),a&&((s=s.cloneRange()).setStartAfter(a),s.collapse(!0)),e.removeAllRanges(),e.addRange(s)}},exec:function(t,e,s){"formatblock"===t&&this.browser("msie")&&(e="<"+e+">"),"inserthtml"===t&&this.browser("msie")?this.isIe11()?this.execPasteFrag(e):(this.focusWithSaveScroll(),this.document.selection.createRange().pasteHTML(e)):this.document.execCommand(t,!1,e),!1!==s&&this.sync(),this.callback("execCommand",t,e)},execCommand:function(t,e,s){if(!this.opts.visual)return this.$source.focus(),!1;if(("bold"===t||"italic"===t||"underline"===t||"strikethrough"===t)&&this.bufferSet(),"superscript"===t||"subscript"===t){var o=this.getParent();("SUP"===o.tagName||"SUB"===o.tagName)&&this.inlineRemoveFormatReplace(o)}if("inserthtml"===t){this.insertHtml(e,s),this.callback("execCommand",t,e);return}return(!this.currentOrParentIs("CODE")||!!this.opts.formattingPre)&&("insertunorderedlist"===t||"insertorderedlist"===t?this.execLists(t,e):"unlink"===t?this.execUnlink(t,e):void(this.exec(t,e,s),"inserthorizontalrule"===t&&this.$editor.find("hr").removeAttr("id")))},execUnlink:function(t,e){this.bufferSet();var s=this.currentOrParentIs("A");if(s){$(s).replaceWith($(s).text()),this.sync(),this.callback("execCommand",t,e);return}},execLists:function(t,e){this.bufferSet();var s=this.getParent(),o=$(s).closest("ol, ul");this.isParentRedactor(o)||0==o.length||(o=!1);var r=!1;if(o&&o.length){r=!0;var a=o[0].tagName;("insertunorderedlist"===t&&"OL"===a||"insertorderedlist"===t&&"UL"===a)&&(r=!1)}if(this.selectionSave(),r){var n=this.getNodes(),l=this.getBlocks(n);void 0!==n[0]&&n.length>1&&3==n[0].nodeType&&l.unshift(this.getBlock());var c="",h="";$.each(l,$.proxy(function(t,e){if("LI"==e.tagName){var s=$(e),o=s.clone();(o.find("ul","ol").remove(),!1===this.opts.linebreaks)?c+=this.outerHtml($("<p>").append(o.contents())):c+=o.html().replace(/<br\s?\/?>$/i,"")+"<br>",0==t?(s.addClass("redactor-replaced").empty(),h=this.outerHtml(s)):s.remove()}},this)),html=this.$editor.html().replace(h,"</"+a+">"+c+"<"+a+">"),this.$editor.html(html),this.$editor.find(a+":empty").remove()}else{var d=$(this.getParent()).closest("td");if(this.browser("msie")&&!this.isIe11()&&this.opts.linebreaks){var p=this.selectionWrap("div"),u=$(p).html(),f=$("<ul>");"insertorderedlist"==t&&(f=$("<ol>"));var m=$("<li>");""==$.trim(u)?(m.append(u+'<span id="selection-marker-1">'+this.opts.invisibleSpace+"</span>"),f.append(m),this.$editor.find("#selection-marker-1").replaceWith(f)):(m.append(u),f.append(m),$(p).replaceWith(f))}else this.document.execCommand(t);var s=this.getParent(),o=$(s).closest("ol, ul");if(!1===this.opts.linebreaks&&""==$.trim(o.text())&&(o.children("li").find("br").remove(),o.children("li").append('<span id="selection-marker-1">'+this.opts.invisibleSpace+"</span>")),0!=d.length&&o.wrapAll("<td>"),o.length){var g=o.parent();this.isParentRedactor(g)&&"LI"!=g[0].tagName&&this.nodeTestBlocks(g[0])&&g.replaceWith(g.contents())}this.browser("mozilla")&&this.$editor.focus()}this.selectionRestore(),this.$editor.find("#selection-marker-1").removeAttr("id"),this.sync(),this.callback("execCommand",t,e)},indentingIndent:function(){this.indentingStart("indent")},indentingOutdent:function(){this.indentingStart("outdent")},indentingStart:function(t){if(this.bufferSet(),"indent"===t){var e=this.getBlock();if(this.selectionSave(),e&&"LI"==e.tagName){var s=$(this.getParent()).closest("ol, ul")[0].tagName,o=this.getBlocks();$.each(o,function(t,e){if("LI"==e.tagName){var o=$(e).prev();if(0!=o.length&&"LI"==o[0].tagName){var r=o.children("ul, ol");0==r.length?o.append($("<"+s+">").append(e)):r.append(e)}}})}else if(!1===e&&!0===this.opts.linebreaks){this.exec("formatBlock","blockquote");var r=this.getBlock(),e=$('<div data-tagblock="">').html($(r).html());$(r).replaceWith(e);var a=this.normalize($(e).css("margin-left"))+this.opts.indentValue;$(e).css("margin-left",a+"px")}else{var n=this.getBlocks();$.each(n,$.proxy(function(t,e){var s=!1;if("TD"!==e.tagName){s=-1!==$.inArray(e.tagName,this.opts.alignmentTags)?$(e):$(e).closest(this.opts.alignmentTags.toString().toLowerCase(),this.$editor[0]);var o=this.normalize(s.css("margin-left"))+this.opts.indentValue;s.css("margin-left",o+"px")}},this))}this.selectionRestore()}else{this.selectionSave();var e=this.getBlock();if(e&&"LI"==e.tagName){var o=this.getBlocks(),l=0;this.insideOutdent(e,l,o)}else{var n=this.getBlocks();$.each(n,$.proxy(function(t,e){var s=!1;s=-1!==$.inArray(e.tagName,this.opts.alignmentTags)?$(e):$(e).closest(this.opts.alignmentTags.toString().toLowerCase(),this.$editor[0]);var o=this.normalize(s.css("margin-left"))-this.opts.indentValue;o<=0?!0===this.opts.linebreaks&&void 0!==s.data("tagblock")?s.replaceWith(s.html()+"<br>"):(s.css("margin-left",""),this.removeEmptyAttr(s,"style")):s.css("margin-left",o+"px")},this))}this.selectionRestore()}this.sync()},insideOutdent:function(t,e,s){if(t&&"LI"==t.tagName){var o=$(t).parent().parent();0!=o.length&&"LI"==o[0].tagName?o.after(t):void 0!==s[e]?(t=s[e],e++,this.insideOutdent(t,e,s)):this.execCommand("insertunorderedlist")}},alignmentLeft:function(){this.alignmentSet("","JustifyLeft")},alignmentRight:function(){this.alignmentSet("right","JustifyRight")},alignmentCenter:function(){this.alignmentSet("center","JustifyCenter")},alignmentJustify:function(){this.alignmentSet("justify","JustifyFull")},alignmentSet:function(t,e){if(this.bufferSet(),this.oldIE())return this.document.execCommand(e,!1,!1),!0;this.selectionSave();var s=this.getBlock();if(!s&&this.opts.linebreaks){this.exec("formatblock","div");var o=this.getBlock(),s=$('<div data-tagblock="">').html($(o).html());$(o).replaceWith(s),$(s).css("text-align",t),this.removeEmptyAttr(s,"style"),""==t&&void 0!==$(s).data("tagblock")&&$(s).replaceWith($(s).html())}else{var r=this.getBlocks();$.each(r,$.proxy(function(e,s){var o=!1;(o=-1!==$.inArray(s.tagName,this.opts.alignmentTags)?$(s):$(s).closest(this.opts.alignmentTags.toString().toLowerCase(),this.$editor[0]))&&(o.css("text-align",t),this.removeEmptyAttr(o,"style"))},this))}this.selectionRestore(),this.sync()},cleanEmpty:function(t){var e=this.placeholderStart(t);return!1!==e?e:(!1===this.opts.linebreaks&&(""===t?t=this.opts.emptyHtml:-1!==t.search(/^<hr\s?\/?>$/gi)&&(t="<hr>"+this.opts.emptyHtml)),t)},cleanConverters:function(t){return this.opts.convertDivs&&!this.opts.gallery&&(t=t.replace(/<div(.*?)>([\w\W]*?)<\/div>/gi,"<p$1>$2</p>")),this.opts.paragraphy&&(t=this.cleanParagraphy(t)),t},cleanConvertProtected:function(t){return this.opts.templateVars&&(t=(t=t.replace(/\{\{(.*?)\}\}/gi,"<!-- template double $1 -->")).replace(/\{(.*?)\}/gi,"<!-- template $1 -->")),t=(t=(t=t.replace(/<script(.*?)>([\w\W]*?)<\/script>/gi,'<title type="text/javascript" style="display: none;" class="redactor-script-tag"$1>$2</title>')).replace(/<style(.*?)>([\w\W]*?)<\/style>/gi,'<section$1 style="display: none;" rel="redactor-style-tag">$2</section>')).replace(/<form(.*?)>([\w\W]*?)<\/form>/gi,'<section$1 rel="redactor-form-tag">$2</section>'),t=this.opts.phpTags?t.replace(/<\?php([\w\W]*?)\?>/gi,'<section style="display: none;" rel="redactor-php-tag">$1</section>'):t.replace(/<\?php([\w\W]*?)\?>/gi,"")},cleanReConvertProtected:function(t){return this.opts.templateVars&&(t=(t=t.replace(/<!-- template double (.*?) -->/gi,"{{$1}}")).replace(/<!-- template (.*?) -->/gi,"{$1}")),t=(t=(t=t.replace(/<title type="text\/javascript" style="display: none;" class="redactor-script-tag"(.*?)>([\w\W]*?)<\/title>/gi,'<script$1 type="text/javascript">$2</script>')).replace(/<section(.*?) style="display: none;" rel="redactor-style-tag">([\w\W]*?)<\/section>/gi,"<style$1>$2</style>")).replace(/<section(.*?)rel="redactor-form-tag"(.*?)>([\w\W]*?)<\/section>/gi,"<form$1$2>$3</form>"),this.opts.phpTags&&(t=t.replace(/<section style="display: none;" rel="redactor-php-tag">([\w\W]*?)<\/section>/gi,"<?php\r\n$1\r\n?>")),t},cleanRemoveSpaces:function(t,e){if(!1!==e){var e=[],s=t.match(/<(code|style|script|title)(.*?)>([\w\W]*?)<\/(code|style|script|title)>/gi);if(null===s&&(s=[]),this.opts.phpTags){var o=t.match(/<\?php([\w\W]*?)\?>/gi);o&&(s=$.merge(s,o))}s&&$.each(s,function(s,o){t=t.replace(o,"buffer_"+s),e.push(o)})}return t=(t=(t=(t=(t=(t=t.replace(/\n/g," ")).replace(/[\t]*/g,"")).replace(/\n\s*\n/g,"\n")).replace(/^[\s\n]*/g," ")).replace(/[\s\n]*$/g," ")).replace(/>\s{2,}</g,"> <"),t=(t=this.cleanReplacer(t,e)).replace(/\n\n/g,"\n")},cleanReplacer:function(t,e){return!1===e||$.each(e,function(e,s){t=t.replace("buffer_"+e,s)}),t},cleanRemoveEmptyTags:function(t){t=t.replace(/[\u200B-\u200D\uFEFF]/g,"");for(var e=["<b>\\s*</b>","<b>&nbsp;</b>","<em>\\s*</em>"],s=["<code></code>","<blockquote>\\s*</blockquote>","<dd></dd>","<dt></dt>","<ul></ul>","<ol></ol>","<li></li>","<table></table>","<tr></tr>","<span>\\s*<span>","<span>&nbsp;<span>","<p>\\s*</p>","<p></p>","<p>&nbsp;</p>","<p>\\s*<br>\\s*</p>","<div>\\s*</div>","<div>\\s*<br>\\s*</div>"],o=(s=this.opts.removeEmptyTags?s.concat(e):e).length,r=0;r<o;++r)t=t.replace(RegExp(s[r],"gi"),"");return t},cleanParagraphy:function(t){if(t=$.trim(t),!0===this.opts.linebreaks)return t;if(""===t||"<p></p>"===t)return this.opts.emptyHtml;if(t+="\n",!1===this.opts.removeEmptyTags)return t;var e=[],s=t.match(/<(table|div|code|object)(.*?)>([\w\W]*?)<\/(table|div|code|object)>/gi);s||(s=[]);var o=t.match(/<!--([\w\W]*?)-->/gi);if(o&&(s=$.merge(s,o)),this.opts.phpTags){var r=t.match(/<section(.*?)rel="redactor-php-tag">([\w\W]*?)<\/section>/gi);r&&(s=$.merge(s,r))}function a(e,s,o){return t.replace(RegExp(e,s),o)}s&&$.each(s,function(s,o){e[s]=o,t=t.replace(o,"{replace"+s+"}\n")}),t=(t=t.replace(/<br \/>\s*<br \/>/gi,"\n\n")).replace(/<br><br>/gi,"\n\n");var n="(comment|html|body|head|title|meta|style|script|link|iframe|table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|code|select|option|form|map|area|blockquote|address|math|style|p|h[1-6]|hr|fieldset|legend|section|article|aside|hgroup|header|footer|nav|figure|figcaption|details|menu|summary)";t=a("(<"+n+"[^>]*>)","gi","\n$1"),t=a("(</"+n+">)","gi","$1\n\n"),t=a("\r\n","g","\n"),t=a("\r","g","\n");var l=(t=a("/\n\n+/","g","\n\n")).split(RegExp("\ns*\n","g"),-1);for(var c in t="",l)l.hasOwnProperty(c)&&(-1==l[c].search("{replace")?(l[c]=l[c].replace(/<p>\n\t?<\/p>/gi,""),l[c]=l[c].replace(/<p><\/p>/gi,""),""!=l[c]&&(t+="<p>"+l[c].replace(/^\n+|\n+$/g,"")+"</p>")):t+=l[c]);return t=a("<p><p>","gi","<p>"),t=a("</p></p>","gi","</p>"),t=a("<p>s?</p>","gi",""),t=a("<p>([^<]+)</(div|address|form)>","gi","<p>$1</p></$2>"),t=a("<p>(</?"+n+"[^>]*>)</p>","gi","$1"),t=a("<p>(<li.+?)</p>","gi","$1"),t=a("<p>s?(</?"+n+"[^>]*>)","gi","$1"),t=a("(</?"+n+"[^>]*>)s?</p>","gi","$1"),t=a("(</?"+n+"[^>]*>)s?<br />","gi","$1"),t=a("<br />(s*</?(?:p|li|div|dl|dd|dt|th|code|td|ul|ol)[^>]*>)","gi","$1"),t=a("\n</p>","gi","</p>"),t=a("<li><p>","gi","<li>"),t=a("</p></li>","gi","</li>"),t=a("</li><p>","gi","</li>"),t=a("<p>	?\n?<p>","gi","<p>"),t=a("</dt><p>","gi","</dt>"),t=a("</dd><p>","gi","</dd>"),t=a("<br></p></blockquote>","gi","</blockquote>"),t=a("<p>	*</p>","gi",""),$.each(e,function(e,s){t=t.replace("{replace"+e+"}",s)}),$.trim(t)},cleanConvertInlineTags:function(t,e){var s="strong";"b"===this.opts.boldTag&&(s="b");var o="em";return"i"===this.opts.italicTag&&(o="i"),t=(t=t.replace(/<span style="font-style: italic;">([\w\W]*?)<\/span>/gi,"<"+o+">$1</"+o+">")).replace(/<span style="font-weight: bold;">([\w\W]*?)<\/span>/gi,"<"+s+">$1</"+s+">"),t="strong"===this.opts.boldTag?t.replace(/<b>([\w\W]*?)<\/b>/gi,"<strong>$1</strong>"):t.replace(/<strong>([\w\W]*?)<\/strong>/gi,"<b>$1</b>"),t=(t="em"===this.opts.italicTag?t.replace(/<i>([\w\W]*?)<\/i>/gi,"<em>$1</em>"):t.replace(/<em>([\w\W]*?)<\/em>/gi,"<i>$1</i>")).replace(/<span style="text-decoration: underline;">([\w\W]*?)<\/span>/gi,"<u>$1</u>"),t=!0!==e?t.replace(/<strike>([\w\W]*?)<\/strike>/gi,"<del>$1</del>"):t.replace(/<del>([\w\W]*?)<\/del>/gi,"<strike>$1</strike>")},cleanStripTags:function(t){if(""==t||void 0===t)return t;var e=!1;!1!==this.opts.allowedTags&&(e=!0);var s=!0===e?this.opts.allowedTags:this.opts.deniedTags,o=/<\/?([a-z][a-z0-9]*)\b[^>]*>/gi;return t=t.replace(o,function(t,o){return!0===e?$.inArray(o.toLowerCase(),s)>"-1"?t:"":$.inArray(o.toLowerCase(),s)>"-1"?"":t}),t=this.cleanConvertInlineTags(t)},cleanSavePreCode:function(t,e){var s=t.match(/<(pre|code)(.*?)>([\w\W]*?)<\/(pre|code)>/gi);return null!==s&&$.each(s,$.proxy(function(s,o){var r=o.match(/<(pre|code)(.*?)>([\w\W]*?)<\/(pre|code)>/i);r[3]=r[3].replace(/&nbsp;/g," "),!1!==e&&(r[3]=this.cleanEncodeEntities(r[3])),r[3]=r[3].replace(/\$/g,"&#36;"),t=t.replace(o,"<"+r[1]+r[2]+">"+r[3]+"</"+r[1]+">")},this)),t},cleanEncodeEntities:function(t){return(t=String(t).replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"')).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")},cleanUnverified:function(){var t=this.$editor.find("li, img, a, b, strong, sub, sup, i, em, u, small, strike, del, span, cite");t.filter('[style*="background-color: transparent;"][style*="line-height"]').css("background-color","").css("line-height",""),t.filter('[style*="background-color: transparent;"]').css("background-color",""),t.css("line-height",""),$.each(t,$.proxy(function(t,e){this.removeEmptyAttr(e,"style")},this));var e=this.$editor.find("b, strong, i, em, u, strike, del");e.css("font-size",""),$.each(e,$.proxy(function(t,e){this.removeEmptyAttr(e,"style")},this)),this.$editor.find('div[style="text-align: -webkit-auto;"]').contents().unwrap(),this.$editor.find("ul, ol, li").removeAttr("style")},cleanHtml:function(t){var e,s=0,o=t.length,r=0,a=null,n=null,l="",c="",h="";for(this.cleanlevel=0;s<o;s++){if(r=s,-1==t.substr(s).indexOf("<")){c+=t.substr(s);break}for(;r<o&&"<"!=t.charAt(r);)r++;for(s!=r&&((h=t.substr(s,r-s)).match(/^\s{2,}$/g)||("\n"==c.charAt(c.length-1)?c+=this.cleanGetTabs():"\n"==h.charAt(0)&&(c+="\n"+this.cleanGetTabs(),h=h.replace(/^\s+/,"")),c+=h),h.match(/\n/)&&(c+="\n"+this.cleanGetTabs())),a=r;r<o&&">"!=t.charAt(r);)r++;if(l=t.substr(a,r-a),s=r,"!--"==l.substr(1,3)){if(!l.match(/--$/)){for(;"-->"!=t.substr(r,3);)r++;r+=2,l=t.substr(a,r-a),s=r}"\n"!=c.charAt(c.length-1)&&(c+="\n"),c+=this.cleanGetTabs(),c+=l+">\n"}else"!"==l[1]?c=this.placeTag(l+">",c):"?"==l[1]?c+=l+">\n":(e=l.match(/^<(script|style|pre|code)/i))?(e[1]=e[1].toLowerCase(),l=this.cleanTag(l),c=this.placeTag(l,c),(n=String(t.substr(s+1)).toLowerCase().indexOf("</"+e[1]))&&(h=t.substr(s+1,n),s+=n,c+=h)):(l=this.cleanTag(l),c=this.placeTag(l,c))}return this.cleanFinish(c)},cleanGetTabs:function(){for(var t="",e=0;e<this.cleanlevel;e++)t+="	";return t},cleanFinish:function(t){return t=(t=(t=(t=t.replace(/\n\s*\n/g,"\n")).replace(/^[\s\n]*/,"")).replace(/[\s\n]*$/,"")).replace(/<script(.*?)>\n<\/script>/gi,"<script$1></script>"),this.cleanlevel=0,t},cleanTag:function(t){var e,s="";t=(t=(t=t.replace(/\n/g," ")).replace(/\s{2,}/g," ")).replace(/^\s+|\s+$/g," ");var o="";for(t.match(/\/$/)&&(o="/",t=t.replace(/\/+$/,""));e=/\s*([^= ]+)(?:=((['"']).*?\3|[^ ]+))?/.exec(t);)e[2]?s+=e[1].toLowerCase()+"="+e[2]:e[1]&&(s+=e[1].toLowerCase()),s+=" ",t=t.substr(e[0].length);return s.replace(/\s*$/,"")+o+">"},placeTag:function(t,e){var s=t.match(this.cleannewLevel);return(t.match(this.cleanlineBefore)||s)&&(e=e.replace(/\s*$/,""),e+="\n"),s&&"/"==t.charAt(1)&&this.cleanlevel--,"\n"==e.charAt(e.length-1)&&(e+=this.cleanGetTabs()),s&&"/"!=t.charAt(1)&&this.cleanlevel++,e+=t,(t.match(this.cleanlineAfter)||t.match(this.cleannewLevel))&&(e=e.replace(/ *$/,""),e+="\n"),e},formatEmpty:function(t){var e=$.trim(this.$editor.html());if(this.opts.linebreaks)""==e&&(t.preventDefault(),this.$editor.html(""),this.focus());else{var s=(e=e.replace(/<br\s?\/?>/i,"")).replace(/<p>\s?<\/p>/gi,"");if(""===e||""===s){t.preventDefault();var o=$(this.opts.emptyHtml).get(0);this.$editor.html(o),this.focus()}}this.sync()},formatBlocks:function(t){this.browser("mozilla")&&this.isFocused()&&this.$editor.focus(),this.bufferSet();var e=this.getBlocks();this.selectionSave(),$.each(e,$.proxy(function(e,s){if("LI"!==s.tagName){var o=$(s).parent();if("p"===t){if("P"===s.tagName&&0!=o.length&&"BLOCKQUOTE"===o[0].tagName||"BLOCKQUOTE"===s.tagName){this.formatQuote();return}if(this.opts.linebreaks){if(!s||0!=s.tagName.search(/H[1-6]/))return;$(s).replaceWith(s.innerHTML+"<br>")}else this.formatBlock(t,s)}else this.formatBlock(t,s)}},this)),this.selectionRestore(),this.sync()},formatBlock:function(t,e){if(!1===e&&(e=this.getBlock()),!1===e&&!0===this.opts.linebreaks)return this.execCommand("formatblock",t),!0;var s="";if("code"!==t?s=$(e).contents():(s=$(e).html(),""===$.trim(s)&&(s='<span id="selection-marker-1"></span>')),"CODE"===e.tagName&&(t="p"),!0===this.opts.linebreaks&&"p"===t)$(e).replaceWith($("<div>").append(s).html()+"<br>");else{var o=this.getParent(),r=$("<"+t+">").append(s);$(e).replaceWith(r),o&&"TD"==o.tagName&&$(r).wrapAll("<td>")}},formatChangeTag:function(t,e,s){!1!==s&&this.selectionSave();var o=$("<"+e+"/>");return $(t).replaceWith(function(){return o.append($(this).contents())}),!1!==s&&this.selectionRestore(),o},formatQuote:function(){if(this.browser("mozilla")&&this.isFocused()&&this.$editor.focus(),this.bufferSet(),!1===this.opts.linebreaks){this.selectionSave();var t=this.getBlocks(),e=!1,s=t.length;if(t){var o="",r="",a=!1,n=!0;if($.each(t,function(t,e){"P"!==e.tagName&&(n=!1)}),$.each(t,$.proxy(function(l,c){if("BLOCKQUOTE"===c.tagName)this.formatBlock("p",c,!1);else if("P"===c.tagName){if("BLOCKQUOTE"==(e=$(c).parent())[0].tagName){var h=$(e).children("p").length;1==h?$(e).replaceWith(c):h==s?(a="blockquote",o+=this.outerHtml(c)):(a="html",o+=this.outerHtml(c),0==l?($(c).addClass("redactor-replaced").empty(),r=this.outerHtml(c)):$(c).remove())}else!1===n||1==t.length?this.formatBlock("blockquote",c,!1):(a="paragraphs",o+=this.outerHtml(c))}else"LI"!==c.tagName&&this.formatBlock("blockquote",c,!1)},this)),a){if("paragraphs"==a)$(t[0]).replaceWith("<blockquote>"+o+"</blockquote>"),$(t).remove();else if("blockquote"==a)$(e).replaceWith(o);else if("html"==a){var l=this.$editor.html().replace(r,"</blockquote>"+o+"<blockquote>");this.$editor.html(l),this.$editor.find("blockquote").each(function(){""==$.trim($(this).html())&&$(this).remove()})}}}this.selectionRestore()}else{var c=this.getBlock();if("BLOCKQUOTE"===c.tagName){this.selectionSave();var l=$.trim($(c).html()),h=$.trim(this.getSelectionHtml());if((l=l.replace(/<span(.*?)id="selection-marker(.*?)<\/span>/gi,""))==h)$(c).replaceWith($(c).html()+"<br>");else{this.inlineFormat("tmp");var d=this.$editor.find("tmp");d.empty();var p=this.$editor.html().replace("<tmp></tmp>",'</blockquote><span id="selection-marker-1">'+this.opts.invisibleSpace+"</span>"+h+"<blockquote>");this.$editor.html(p),d.remove(),this.$editor.find("blockquote").each(function(){""==$.trim($(this).html())&&$(this).remove()})}this.selectionRestore(),this.$editor.find("span#selection-marker-1").attr("id",!1)}else{var u=this.selectionWrap("blockquote"),l=$(u).html(),f=["ul","ol","table","tr","tbody","thead","tfoot","dl"];$.each(f,function(t,e){l=(l=l.replace(RegExp("<"+e+"(.*?)>","gi"),"")).replace(RegExp("</"+e+">","gi"),"")});var m=this.opts.blockLevelElements;$.each(m,function(t,e){l=(l=l.replace(RegExp("<"+e+"(.*?)>","gi"),"")).replace(RegExp("</"+e+">","gi"),"<br>")}),$(u).html(l),this.selectionElement(u);var g=$(u).next();0!=g.length&&"BR"===g[0].tagName&&g.remove()}}this.sync()},blockRemoveAttr:function(t,e){$(this.getBlocks()).removeAttr(t),this.sync()},blockSetAttr:function(t,e){$(this.getBlocks()).attr(t,e),this.sync()},blockRemoveStyle:function(t){var e=this.getBlocks();$(e).css(t,""),this.removeEmptyAttr(e,"style"),this.sync()},blockSetStyle:function(t,e){$(this.getBlocks()).css(t,e),this.sync()},blockRemoveClass:function(t){var e=this.getBlocks();$(e).removeClass(t),this.removeEmptyAttr(e,"class"),this.sync()},blockSetClass:function(t){$(this.getBlocks()).addClass(t),this.sync()},inlineRemoveClass:function(t){this.selectionSave(),this.inlineEachNodes(function(e){$(e).removeClass(t),this.removeEmptyAttr(e,"class")}),this.selectionRestore(),this.sync()},inlineSetClass:function(t){$(this.getCurrent()).hasClass(t)||this.inlineMethods("addClass",t)},inlineRemoveStyle:function(t){this.selectionSave(),this.inlineEachNodes(function(e){$(e).css(t,""),this.removeEmptyAttr(e,"style")}),this.selectionRestore(),this.sync()},inlineSetStyle:function(t,e){this.inlineMethods("css",t,e)},inlineRemoveAttr:function(t){this.selectionSave();var e=this.getRange(),s=this.getElement(),o=this.getNodes();(e.collapsed||e.startContainer===e.endContainer&&s)&&(o=$(s)),$(o).removeAttr(t),this.inlineUnwrapSpan(),this.selectionRestore(),this.sync()},inlineSetAttr:function(t,e){this.inlineMethods("attr",t,e)},inlineMethods:function(t,e,s){this.bufferSet(),this.selectionSave();var o=this.getRange(),r=this.getElement();if((o.collapsed||o.startContainer===o.endContainer)&&r&&!this.nodeTestBlocks(r))$(r)[t](e,s);else{var a,n=s;switch(e){case"font-size":a="fontSize",n=4;break;case"font-family":a="fontName";break;case"color":a="foreColor";break;case"background-color":a="backColor"}this.document.execCommand(a,!1,n);var l=this.$editor.find("font");$.each(l,$.proxy(function(o,r){this.inlineSetMethods(t,r,e,s)},this))}this.selectionRestore(),this.sync()},inlineSetMethods:function(t,e,s,o){var r,a=$(e).parent(),n=this.getSelectionText(),l=$(a).text();return n==l&&a&&"INLINE"===a[0].tagName&&0!=a[0].attributes.length?(r=a,$(e).replaceWith($(e).html())):(r=$("<inline>").append($(e).contents()),$(e).replaceWith(r)),$(r)[t](s,o),r},inlineEachNodes:function(t){var e,s=this.getRange(),o=this.getElement(),r=this.getNodes();(s.collapsed||s.startContainer===s.endContainer&&o)&&(r=$(o),e=!0),$.each(r,$.proxy(function(s,o){if(!e&&"INLINE"!==o.tagName){var r=this.getSelectionText(),a=$(o).parent().text();if(r!=a||"INLINE"!==o.parentNode.tagName||$(o.parentNode).hasClass("redactor_editor"))return;o=o.parentNode}t.call(this,o)},this))},inlineUnwrapSpan:function(){var t=this.$editor.find("inline");$.each(t,$.proxy(function(t,e){var s=$(e);void 0===s.attr("class")&&void 0===s.attr("style")&&s.contents().unwrap()},this))},inlineFormat:function(t){this.selectionSave(),this.document.execCommand("fontSize",!1,4);var e,s=this.$editor.find("font");$.each(s,function(s,o){var r=$("<"+t+"/>").append($(o).contents());$(o).replaceWith(r),e=r}),this.selectionRestore(),this.sync()},inlineRemoveFormat:function(t){this.selectionSave();var e=t.toUpperCase(),s=this.getNodes(),o=$(this.getParent()).parent();$.each(s,function(t,s){s.tagName===e&&this.inlineRemoveFormatReplace(s)}),o&&o[0].tagName===e&&this.inlineRemoveFormatReplace(o),this.selectionRestore(),this.sync()},inlineRemoveFormatReplace:function(t){$(t).replaceWith($(t).contents())},insertHtml:function(t,e){var s=this.getCurrent(),o=s.parentNode;this.focusWithSaveScroll(),this.bufferSet();var r=$("<div>").append($.parseHTML(t));t=r.html(),t=this.cleanRemoveEmptyTags(t),r=$("<div>").append($.parseHTML(t));var a=this.getBlock();if(1==r.contents().length){var n=r.contents()[0].tagName;("P"!=n&&n==a.tagName||"CODE"==n)&&(r=$("<div>").append(t))}this.opts.linebreaks&&(t=t.replace(/<p(.*?)>([\w\W]*?)<\/p>/gi,"$2<br>")),this.opts.linebreaks||1!=r.contents().length||3!=r.contents()[0].nodeType||!(this.getRangeSelectedNodes().length>2)&&s&&("BODY"!=s.tagName||o)&&"HTML"!=o.tagName||(t="<p>"+t+"</p>"),t=this.setSpansVerifiedHtml(t),r.contents().length>1&&a||r.contents().is("p, :header, ul, ol, li, div, table, td, blockquote, code, address, section, header, footer, aside, article")?this.browser("msie")?this.isIe11()?this.execPasteFrag(t):this.document.selection.createRange().pasteHTML(t):this.document.execCommand("inserthtml",!1,t):this.insertHtmlAdvanced(t,!1),this.selectall&&this.window.setTimeout($.proxy(function(){this.opts.linebreaks?this.focusEnd():this.selectionEnd(this.$editor.contents().last())},this),1),this.observeStart(),this.setNonEditable(),!1!==e&&this.sync()},insertHtmlAdvanced:function(t,e){t=this.setSpansVerifiedHtml(t);var s=this.getSelection();if(s.getRangeAt&&s.rangeCount){var o=s.getRangeAt(0);o.deleteContents();var r=document.createElement("div");r.innerHTML=t;for(var a,n,l=document.createDocumentFragment();a=r.firstChild;)n=l.appendChild(a);o.insertNode(l),n&&((o=o.cloneRange()).setStartAfter(n),o.collapse(!0),s.removeAllRanges(),s.addRange(o))}!1!==e&&this.sync()},insertBeforeCursor:function(t){t=this.setSpansVerifiedHtml(t);var e=$(t),s=document.createElement("span");s.innerHTML="​";var o=this.getRange();o.insertNode(s),o.insertNode(e[0]),o.collapse(!1);var r=this.getSelection();r.removeAllRanges(),r.addRange(o),this.sync()},insertText:function(t){var e=$($.parseHTML(t));e.length&&(t=e.text()),this.focusWithSaveScroll(),this.browser("msie")?this.isIe11()?this.execPasteFrag(t):this.document.selection.createRange().pasteHTML(t):this.document.execCommand("inserthtml",!1,t),this.sync()},insertNode:function(t){if("SPAN"==(t=t[0]||t).tagName){var e="inline",s=t.outerHTML,o=RegExp("<"+t.tagName,"i"),r=s.replace(o,"<"+e);o=RegExp("</"+t.tagName,"i"),r=r.replace(o,"</"+e),t=$(r)[0]}var a=this.getSelection();return a.getRangeAt&&a.rangeCount&&((range=a.getRangeAt(0)).deleteContents(),range.insertNode(t),range.setEndAfter(t),range.setStartAfter(t),a.removeAllRanges(),a.addRange(range)),t},insertNodeToCaretPositionFromPoint:function(t,e){var s,o=t.clientX,r=t.clientY;if(this.document.caretPositionFromPoint){var a=this.document.caretPositionFromPoint(o,r);(s=this.getRange()).setStart(a.offsetNode,a.offset),s.collapse(!0),s.insertNode(e)}else if(this.document.caretRangeFromPoint)(s=this.document.caretRangeFromPoint(o,r)).insertNode(e);else if(void 0!==document.body.createTextRange){(s=this.document.body.createTextRange()).moveToPoint(o,r);var n=s.duplicate();n.moveToPoint(o,r),s.setEndPoint("EndToEnd",n),s.select()}},insertAfterLastElement:function(t,e){if(void 0!==e&&(t=e),this.isEndOfElement()){if(this.opts.linebreaks){var s=$("<div>").append($.trim(this.$editor.html())).contents(),o=s.last()[0];if("SPAN"==o.tagName&&""==o.innerHTML&&(o=s.prev()[0]),this.outerHtml(o)!=this.outerHtml(t))return!1}else if(this.$editor.contents().last()[0]!==t)return!1;this.insertingAfterLastElement(t)}},insertingAfterLastElement:function(t){if(this.bufferSet(),!1===this.opts.linebreaks){var e=$(this.opts.emptyHtml);$(t).after(e),this.selectionStart(e)}else{var e=$('<span id="selection-marker-1">'+this.opts.invisibleSpace+"</span>",this.document)[0];$(t).after(e),$(e).after(this.opts.invisibleSpace),this.selectionRestore(),this.$editor.find("span#selection-marker-1").removeAttr("id")}},insertLineBreak:function(t){this.selectionSave();var e="<br>";if(!0==t&&(e="<br><br>"),this.browser("mozilla")){var s=$("<span>").html(this.opts.invisibleSpace);this.$editor.find("#selection-marker-1").before(e).before(s).before(this.opts.invisibleSpace),this.setCaretAfter(s[0]),s.remove(),this.selectionRemoveMarkers()}else{var o=this.getParent();if(o&&"A"===o.tagName){var r=this.getCaretOffset(o),a=$.trim($(o).text()).replace(/\n\r\n/g,"").length;if(r==a){this.selectionRemoveMarkers();var n=$('<span id="selection-marker-1">'+this.opts.invisibleSpace+"</span>",this.document)[0];return $(o).after(n),$(n).before(e+(this.browser("webkit")?this.opts.invisibleSpace:"")),this.selectionRestore(),!0}}this.$editor.find("#selection-marker-1").before(e+(this.browser("webkit")?this.opts.invisibleSpace:"")),this.selectionRestore()}},insertDoubleLineBreak:function(){this.insertLineBreak(!0)},replaceLineBreak:function(t){var e=$("<br>"+this.opts.invisibleSpace);$(t).replaceWith(e),this.selectionStart(e)},pasteClean:function(t){if(t=this.callback("pasteBefore",!1,t),this.browser("msie")){var e=$.trim(t);0==e.search(/^<a(.*?)>(.*?)<\/a>$/i)&&(t=t.replace(/^<a(.*?)>(.*?)<\/a>$/i,"$2"))}if(t=t.replace(/on([a-z]+)=|javascript\:/gi,""),this.opts.pastePlainText){var e=this.document.createElement("div");return t=t.replace(/<br>|<\/H[1-6]>|<\/p>|<\/div>/gi,"\n"),e.innerHTML=t,t=e.textContent||e.innerText,t=(t=$.trim(t)).replace("\n","<br>"),t=this.cleanParagraphy(t),this.pasteInsert(t),!1}var s=!1;if(this.currentOrParentIs("TD")){s=!0;var o=this.opts.blockLevelElements;o.push("tr"),o.push("table"),$.each(o,function(e,s){t=(t=t.replace(RegExp("<"+s+"(.*?)>","gi"),"")).replace(RegExp("</"+s+">","gi"),"<br>")})}if(this.currentOrParentIs("CODE"))return t=this.pastePre(t),this.pasteInsert(t),!0;if(t=(t=(t=(t=(t=(t=(t=t.replace(/<img(.*?)v:shapes=(.*?)>/gi,"")).replace(/<p(.*?)class="MsoListParagraphCxSpFirst"([\w\W]*?)<\/p>/gi,"<ul><li$2</li>")).replace(/<p(.*?)class="MsoListParagraphCxSpMiddle"([\w\W]*?)<\/p>/gi,"<li$2</li>")).replace(/<p(.*?)class="MsoListParagraphCxSpLast"([\w\W]*?)<\/p>/gi,"<li$2</li></ul>")).replace(/<p(.*?)class="MsoListParagraph"([\w\W]*?)<\/p>/gi,"<ul><li$2</li></ul>")).replace(/·/g,"")).replace(/<!--[\s\S]*?-->|<\?(?:php)?[\s\S]*?\?>/gi,""),!0===this.opts.cleanSpaces&&(t=(t=t.replace(/(&nbsp;){2,}/gi,"&nbsp;")).replace(/&nbsp;/gi," ")),t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace(/<b\sid="internal-source-marker(.*?)">([\w\W]*?)<\/b>/gi,"$2")).replace(/<b(.*?)id="docs-internal-guid(.*?)">([\w\W]*?)<\/b>/gi,"$3")).replace(/<span[^>]*(font-style: italic; font-weight: bold|font-weight: bold; font-style: italic)[^>]*>/gi,'<span style="font-weight: bold;"><span style="font-style: italic;">')).replace(/<span[^>]*font-style: italic[^>]*>/gi,'<span style="font-style: italic;">')).replace(/<span[^>]*font-weight: bold[^>]*>/gi,'<span style="font-weight: bold;">')).replace(/<span[^>]*text-decoration: underline[^>]*>/gi,'<span style="text-decoration: underline;">')).replace(/<td>\u200b*<\/td>/gi,"[td]")).replace(/<td>&nbsp;<\/td>/gi,"[td]")).replace(/<td><br><\/td>/gi,"[td]")).replace(/<td(.*?)colspan="(.*?)"(.*?)>([\w\W]*?)<\/td>/gi,'[td colspan="$2"]$4[/td]')).replace(/<td(.*?)rowspan="(.*?)"(.*?)>([\w\W]*?)<\/td>/gi,'[td rowspan="$2"]$4[/td]')).replace(/<a(.*?)href="(.*?)"(.*?)>([\w\W]*?)<\/a>/gi,'[a href="$2"]$4[/a]')).replace(/<iframe(.*?)>([\w\W]*?)<\/iframe>/gi,"[iframe$1]$2[/iframe]")).replace(/<video(.*?)>([\w\W]*?)<\/video>/gi,"[video$1]$2[/video]")).replace(/<audio(.*?)>([\w\W]*?)<\/audio>/gi,"[audio$1]$2[/audio]")).replace(/<embed(.*?)>([\w\W]*?)<\/embed>/gi,"[embed$1]$2[/embed]")).replace(/<object(.*?)>([\w\W]*?)<\/object>/gi,"[object$1]$2[/object]")).replace(/<param(.*?)>/gi,"[param$1]")).replace(/<img(.*?)>/gi,"[img$1]")).replace(/ class="(.*?)"/gi,"")).replace(/<(\w+)([\w\W]*?)>/gi,"<$1>"),this.opts.linebreaks?(t=(t=t.replace(/<strong><\/strong>/gi,"")).replace(/<u><\/u>/gi,""),this.opts.cleanFontTag&&(t=t.replace(/<font(.*?)>([\w\W]*?)<\/font>/gi,"$2")),t=t.replace(/<[^\/>][^>]*>(\s*|\t*|\n*|&nbsp;|<br>)<\/[^>]+>/gi,"<br>")):t=t.replace(/<[^\/>][^>]*>(\s*|\t*|\n*|&nbsp;|<br>)<\/[^>]+>/gi,""),t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace(/<div>\s*?\t*?\n*?(<ul>|<ol>|<p>)/gi,"$1")).replace(/\[td colspan="(.*?)"\]([\w\W]*?)\[\/td\]/gi,'<td colspan="$1">$2</td>')).replace(/\[td rowspan="(.*?)"\]([\w\W]*?)\[\/td\]/gi,'<td rowspan="$1">$2</td>')).replace(/\[td\]/gi,"<td>&nbsp;</td>")).replace(/\[a href="(.*?)"\]([\w\W]*?)\[\/a\]/gi,'<a href="$1">$2</a>')).replace(/\[iframe(.*?)\]([\w\W]*?)\[\/iframe\]/gi,"<iframe$1>$2</iframe>")).replace(/\[video(.*?)\]([\w\W]*?)\[\/video\]/gi,"<video$1>$2</video>")).replace(/\[audio(.*?)\]([\w\W]*?)\[\/audio\]/gi,"<audio$1>$2</audio>")).replace(/\[embed(.*?)\]([\w\W]*?)\[\/embed\]/gi,"<embed$1>$2</embed>")).replace(/\[object(.*?)\]([\w\W]*?)\[\/object\]/gi,"<object$1>$2</object>")).replace(/\[param(.*?)\]/gi,"<param$1>")).replace(/\[img(.*?)\]/gi,"<img$1>"),t=this.opts.convertDivs?(t=(t=(t=t.replace(/<div(.*?)>([\w\W]*?)<\/div>/gi,"<p>$2</p>")).replace(/<\/div><p>/gi,"<p>")).replace(/<\/p><\/div>/gi,"</p>")).replace(/<p><\/p>/gi,"<br />"):t.replace(/<div><\/div>/gi,"<br />"),t=this.cleanStripTags(t),this.currentOrParentIs("LI")?t=t.replace(/<p>([\w\W]*?)<\/p>/gi,"$1<br>"):!1===s&&(t=this.cleanParagraphy(t)),t=(t=(t=(t=(t=(t=(t=(t=t.replace(/<span(.*?)>([\w\W]*?)<\/span>/gi,"$2")).replace(/<img>/gi,"")).replace(/<[^\/>][^>][^img|param|source|td][^<]*>(\s*|\t*|\n*| |<br>)<\/[^>]+>/gi,"")).replace(/\n{3,}/gi,"\n")).replace(/<p><p>/gi,"<p>")).replace(/<\/p><\/p>/gi,"</p>")).replace(/<li>(\s*|\t*|\n*)<p>/gi,"<li>")).replace(/<\/p>(\s*|\t*|\n*)<\/li>/gi,"</li>"),!0===this.opts.linebreaks&&(t=t.replace(/<p(.*?)>([\w\W]*?)<\/p>/gi,"$2<br>")),t=(t=(t=t.replace(/<[^\/>][^>][^img|param|source|td][^<]*>(\s*|\t*|\n*| |<br>)<\/[^>]+>/gi,"")).replace(/<img src="webkit-fake-url\:\/\/(.*?)"(.*?)>/gi,"")).replace(/<td(.*?)>(\s*|\t*|\n*)<p>([\w\W]*?)<\/p>(\s*|\t*|\n*)<\/td>/gi,"<td$1>$3</td>"),this.opts.convertDivs&&(t=(t=t.replace(/<div(.*?)>([\w\W]*?)<\/div>/gi,"$2")).replace(/<div(.*?)>([\w\W]*?)<\/div>/gi,"$2")),this.pasteClipboardMozilla=!1,this.browser("mozilla")){if(this.opts.clipboardUpload){var r=t.match(/<img src="data:image(.*?)"(.*?)>/gi);if(null!==r)for(var a in this.pasteClipboardMozilla=r,r){var n=r[a].replace("<img",'<img data-mozilla-paste-image="'+a+'" ');t=t.replace(r[a],n)}}for(;/<br>$/gi.test(t);)t=t.replace(/<br>$/gi,"")}if(t=t.replace(/<p>•([\w\W]*?)<\/p>/gi,"<li>$1</li>"),this.browser("msie"))for(;/<font>([\w\W]*?)<\/font>/gi.test(t);)t=t.replace(/<font>([\w\W]*?)<\/font>/gi,"$1");!1===s&&(t=(t=(t=(t=t.replace(/<td(.*?)>([\w\W]*?)<p(.*?)>([\w\W]*?)<\/td>/gi,"<td$1>$2$4</td>")).replace(/<td(.*?)>([\w\W]*?)<\/p>([\w\W]*?)<\/td>/gi,"<td$1>$2$3</td>")).replace(/<td(.*?)>([\w\W]*?)<p(.*?)>([\w\W]*?)<\/td>/gi,"<td$1>$2$4</td>")).replace(/<td(.*?)>([\w\W]*?)<\/p>([\w\W]*?)<\/td>/gi,"<td$1>$2$3</td>")),t=(t=t.replace(/\n/g," ")).replace(/<p>\n?<li>/gi,"<li>"),this.pasteInsert(t)},pastePre:function(t){t=t.replace(/<br>|<\/H[1-6]>|<\/p>|<\/div>/gi,"\n");var e=this.document.createElement("div");return e.innerHTML=t,this.cleanEncodeEntities(e.textContent||e.innerText)},pasteInsert:function(t){t=this.callback("pasteAfter",!1,t),this.selectall?(this.$editor.html(t),this.selectionRemove(),this.focusEnd(),this.sync()):this.insertHtml(t),this.selectall=!1,setTimeout($.proxy(function(){this.rtePaste=!1,this.browser("mozilla")&&this.$editor.find("p:empty").remove(),!1!==this.pasteClipboardMozilla&&this.pasteClipboardUploadMozilla()},this),100),this.opts.autoresize&&!0!==this.fullscreen?$(this.document.body).scrollTop(this.saveScroll):this.$editor.scrollTop(this.saveScroll)},pasteClipboardAppendFields:function(t){return!1!==this.opts.uploadFields&&"object"==typeof this.opts.uploadFields&&$.each(this.opts.uploadFields,$.proxy(function(e,s){null!=s&&0===s.toString().indexOf("#")&&(s=$(s).val()),t[e]=s},this)),t},pasteClipboardUploadMozilla:function(){var t=this.$editor.find("img[data-mozilla-paste-image]");$.each(t,$.proxy(function(t,e){var s=$(e),o=e.src.split(","),r={contentType:o[0].split(";")[0].split(":")[1],data:o[1]};r=this.pasteClipboardAppendFields(r),$.post(this.opts.clipboardUploadUrl,r,$.proxy(function(t){var e="string"==typeof t?$.parseJSON(t):t;s.attr("src",e.image.url),s.removeAttr("data-mozilla-paste-image"),this.sync(),this.callback("imageUpload",s,e)},this))},this))},pasteClipboardUpload:function(t){var e=t.target.result,s=e.split(","),o={contentType:s[0].split(";")[0].split(":")[1],data:s[1]};this.opts.clipboardUpload?(o=this.pasteClipboardAppendFields(o),$.post(this.opts.clipboardUploadUrl,o,$.proxy(function(t){var e="string"==typeof t?$.parseJSON(t):t,s='<img src="'+e.image.url+'" id="clipboard-image-marker" />';this.execCommand("inserthtml",s,!1);var o=$(this.$editor.find("img#clipboard-image-marker"));o.length?o.removeAttr("id"):o=!1,this.sync(),o&&this.callback("imageUpload",o,e)},this))):this.insertHtml('<img src="'+e+'" />')},bufferSet:function(t){!1!==t&&this.selectionSave(),this.opts.buffer.push(this.$editor.html()),!1!==t&&this.selectionRemoveMarkers("buffer")},bufferUndo:function(){if(0===this.opts.buffer.length){this.focusWithSaveScroll();return}this.selectionSave(),this.opts.rebuffer.push(this.$editor.html()),this.selectionRestore(!1,!0),this.$editor.html(this.opts.buffer.pop()),this.selectionRestore(),setTimeout($.proxy(this.observeStart,this),100)},bufferRedo:function(){if(0===this.opts.rebuffer.length)return this.focusWithSaveScroll(),!1;this.selectionSave(),this.opts.buffer.push(this.$editor.html()),this.selectionRestore(!1,!0),this.$editor.html(this.opts.rebuffer.pop()),this.selectionRestore(!0),setTimeout($.proxy(this.observeStart,this),4)},observeStart:function(){this.observeImages(),this.opts.observeLinks&&this.observeLinks()},observeLinks:function(){this.$editor.find("a").on("click",$.proxy(this.linkObserver,this)),this.$editor.on("click.redactor",$.proxy(function(t){this.linkObserverTooltipClose(t)},this)),$(document).on("click.redactor",$.proxy(function(t){this.linkObserverTooltipClose(t)},this))},observeImages:function(){if(!1===this.opts.observeImages)return!1;this.$editor.find("img").each($.proxy(function(t,e){this.browser("msie")&&$(e).attr("unselectable","on");var s=$(e).parent();s.hasClass("royalSlider")||s.hasClass("fotorama")||this.imageResize(e)},this)),this.$editor.find(".fotorama, .royalSlider").on("click",$.proxy(this.editGallery,this))},linkObserver:function(t){var e=$(t.target),s=$(t.target).parent();if(!(s.hasClass("royalSlider")||s.hasClass("fotorama"))&&0!=e.length&&"A"===e[0].tagName){var o=e.offset();if(this.opts.iframe){var r=this.$frame.offset();o.top=r.top+(o.top-$(this.document).scrollTop()),o.left+=r.left}var a=$('<span class="redactor-link-tooltip"></span>'),n=e.attr("href");void 0===n&&(n=""),n.length>24&&(n=n.substring(0,24)+"...");var l=$('<a href="'+e.attr("href")+'" target="_blank">'+n+"</a>").on("click",$.proxy(function(t){this.linkObserverTooltipClose(!1)},this)),c=$('<a href="#">'+this.opts.curLang.edit+"</a>").on("click",$.proxy(function(t){t.preventDefault(),this.linkShow(),this.linkObserverTooltipClose(!1)},this)),h=$('<a href="#">'+this.opts.curLang.unlink+"</a>").on("click",$.proxy(function(t){t.preventDefault(),this.execCommand("unlink"),this.linkObserverTooltipClose(!1)},this));a.append(l),a.append(" | "),a.append(c),a.append(" | "),a.append(h),a.css({top:o.top+20+"px",left:o.left+"px"}),$(".redactor-link-tooltip").remove(),$("body").append(a)}},linkObserverTooltipClose:function(t){if(!1!==t&&"A"==t.target.tagName)return!1;$(".redactor-link-tooltip").remove()},getSelection:function(){return this.opts.rangy?this.opts.iframe?rangy.getSelection(this.$frame[0]):rangy.getSelection():this.document.getSelection()},getRange:function(){if(this.opts.rangy)return this.opts.iframe?rangy.createRange(this.iframeDoc()):rangy.createRange();if(this.document.getSelection){var t=this.getSelection();if(t.getRangeAt&&t.rangeCount)return t.getRangeAt(0)}return this.document.createRange()},selectionElement:function(t){this.setCaret(t)},selectionStart:function(t){this.selectionSet(t[0]||t,0,null,0)},selectionEnd:function(t){this.selectionSet(t[0]||t,1,null,1)},selectionSet:function(t,e,s,o){null==s&&(s=t),null==o&&(o=e);var r=this.getSelection();if(r){if("P"==t.tagName&&""==t.innerHTML&&(t.innerHTML=this.opts.invisibleSpace),"BR"==t.tagName&&!1===this.opts.linebreaks){var a=$(this.opts.emptyHtml)[0];$(t).replaceWith(a),s=t=a}var n=this.getRange();n.setStart(t,e),n.setEnd(s,o);try{r.removeAllRanges()}catch(l){}r.addRange(n)}},selectionWrap:function(t){t=t.toLowerCase();var e=this.getBlock();if(e){var s=this.formatChangeTag(e,t);return this.sync(),s}var o=this.getSelection().getRangeAt(0),s=document.createElement(t);return s.appendChild(o.extractContents()),o.insertNode(s),this.selectionElement(s),s},selectionAll:function(){var t=this.getRange();t.selectNodeContents(this.$editor[0]);var e=this.getSelection();e.removeAllRanges(),e.addRange(t)},selectionRemove:function(){this.getSelection().removeAllRanges()},getCaretOffset:function(t){var e=0,s=this.getRange(),o=s.cloneRange();return o.selectNodeContents(t),o.setEnd(s.endContainer,s.endOffset),e=$.trim(o.toString()).length},getCaretOffsetRange:function(){return new Range(this.getSelection().getRangeAt(0))},setCaret:function(t,e,s){void 0===s&&(s=e),t=t[0]||t;var o=this.getRange();o.selectNodeContents(t);var r,a=this.getTextNodesIn(t),n=!1,l=0;if(1==a.length&&e)o.setStart(a[0],e),o.setEnd(a[0],s);else for(var c,h=0;c=a[h++];){if(r=l+c.length,!n&&e>=l&&(e<r||e==r&&h<a.length)&&(o.setStart(c,e-l),n=!0),n&&s<=r){o.setEnd(c,s-l);break}l=r}var d=this.getSelection();d.removeAllRanges(),d.addRange(o)},setCaretAfter:function(t){this.$editor.focus(),t=t[0]||t;var e=this.document.createRange(),s=1,o=-1;e.setStart(t,s),e.setEnd(t,o+2);var r=this.window.getSelection(),a=this.document.createRange(),n=this.document.createTextNode("​");$(t).after(n),a.setStartAfter(n),r.removeAllRanges(),r.addRange(a),$(n).remove()},getTextNodesIn:function(t){var e=[];if(3==t.nodeType)e.push(t);else for(var s=t.childNodes,o=0,r=s.length;o<r;++o)e.push.apply(e,this.getTextNodesIn(s[o]));return e},getCurrent:function(){var t=!1,e=this.getSelection();return e&&e.rangeCount>0&&(t=e.getRangeAt(0).startContainer),this.isParentRedactor(t)},getParent:function(t){return!!(t=t||this.getCurrent())&&this.isParentRedactor($(t).parent()[0])},getBlock:function(t){for(void 0===t&&(t=this.getCurrent());t;){if(this.nodeTestBlocks(t)){if($(t).hasClass("redactor_editor"))return!1;return t}t=t.parentNode}return!1},getBlocks:function(t){var e=[];if(void 0===t){var s=this.getRange();if(s&&!0===s.collapsed)return[this.getBlock()];var t=this.getNodes(s)}return $.each(t,$.proxy(function(t,s){if(!1===this.opts.iframe&&0==$(s).parents("div.redactor_editor").length)return!1;this.nodeTestBlocks(s)&&e.push(s)},this)),0===e.length&&(e=[this.getBlock()]),e},isInlineNode:function(t){return 1==t.nodeType&&!this.rTestBlock.test(t.nodeName)},nodeTestBlocks:function(t){return 1==t.nodeType&&this.rTestBlock.test(t.nodeName)},tagTestBlock:function(t){return this.rTestBlock.test(t)},getNodes:function(t,e){if(void 0===t||!1==t)var t=this.getRange();if(t&&!0===t.collapsed){if(!(void 0===e&&this.tagTestBlock(e)))return[this.getCurrent()];var s=this.getBlock();return s.tagName==e?[s]:[]}var o=[],r=[],a=this.document.getSelection();if(a.isCollapsed||(o=this.getRangeSelectedNodes(a.getRangeAt(0))),$.each(o,$.proxy(function(t,s){if(!1===this.opts.iframe&&0==$(s).parents("div.redactor_editor").length)return!1;void 0===e?""!=$.trim(s.textContent)&&r.push(s):s.tagName==e&&r.push(s)},this)),0==r.length){if(void 0===e&&this.tagTestBlock(e)){var s=this.getBlock();return s.tagName==e?r.push(s):[]}r.push(this.getCurrent())}var n=r[r.length-1];return this.nodeTestBlocks(n)&&(r=r.slice(0,-1)),r},getElement:function(t){for(t||(t=this.getCurrent());t;){if(1==t.nodeType){if($(t).hasClass("redactor_editor"))return!1;return t}t=t.parentNode}return!1},getRangeSelectedNodes:function(t){var e=(t=t||this.getRange()).startContainer,s=t.endContainer;if(e==s)return[e];for(var o=[];e&&e!=s;)o.push(e=this.nextNode(e));for(e=t.startContainer;e&&e!=t.commonAncestorContainer;)o.unshift(e),e=e.parentNode;return o},nextNode:function(t){if(t.hasChildNodes())return t.firstChild;for(;t&&!t.nextSibling;)t=t.parentNode;return t?t.nextSibling:null},getSelectionText:function(){return this.getSelection().toString()},getSelectionHtml:function(){var t="",e=this.getSelection();if(e.rangeCount){for(var s=this.document.createElement("div"),o=e.rangeCount,r=0;r<o;++r)s.appendChild(e.getRangeAt(r).cloneContents());t=s.innerHTML}return this.syncClean(t)},selectionSave:function(){this.isFocused()||this.focusWithSaveScroll(),this.opts.rangy?this.savedSel=rangy.saveSelection():this.selectionCreateMarker(this.getRange())},selectionCreateMarker:function(t,e){if(t){var s=$('<span id="selection-marker-1" class="redactor-selection-marker">'+this.opts.invisibleSpace+"</span>",this.document)[0],o=$('<span id="selection-marker-2" class="redactor-selection-marker">'+this.opts.invisibleSpace+"</span>",this.document)[0];!0===t.collapsed?this.selectionSetMarker(t,s,!0):(this.selectionSetMarker(t,s,!0),this.selectionSetMarker(t,o,!1)),this.savedSel=this.$editor.html(),this.selectionRestore(!1,!1)}},selectionSetMarker:function(t,e,s){var o=t.cloneRange();try{o.collapse(s),o.insertNode(e),o.detach()}catch(r){var a=this.opts.emptyHtml;this.opts.linebreaks&&(a="<br>"),this.$editor.prepend(a),this.focus()}},selectionRestore:function(t,e){if(this.opts.rangy)rangy.restoreSelection(this.savedSel);else{!0===t&&this.savedSel&&this.$editor.html(this.savedSel);var s=this.$editor.find("span#selection-marker-1"),o=this.$editor.find("span#selection-marker-2");this.browser("mozilla")?this.$editor.focus():this.isFocused()||this.focusWithSaveScroll(),0!=s.length&&0!=o.length?this.selectionSet(s[0],0,o[0],0):0!=s.length&&this.selectionSet(s[0],0,null,0),!1!==e&&(this.selectionRemoveMarkers(),this.savedSel=!1)}},selectionRemoveMarkers:function(t){this.opts.rangy?rangy.removeMarkers(this.savedSel):$.each(this.$editor.find("span.redactor-selection-marker"),function(){""==$.trim($(this).html().replace(/[^\u0000-\u1C7F]/g,""))?$(this).remove():$(this).removeAttr("class").removeAttr("id")})},tableShow:function(){this.selectionSave(),this.modalInit(this.opts.curLang.table,this.opts.modal_table,300,$.proxy(function(){$("#redactor_insert_table_btn").on("click",$.proxy(this.tableInsert,this)),setTimeout(function(){$("#redactor_table_rows").focus()},200)},this))},tableInsert:function(){this.bufferSet(!1);var t,e,s,o,r=$("#redactor_table_rows").val(),a=$("#redactor_table_columns").val(),n=$("<div></div>"),l=Math.floor(99999*Math.random()),c=$('<table id="table'+l+'"><tbody></tbody></table>');for(t=0;t<r;t++){for(s=0,e=$("<tr></tr>");s<a;s++)o=$("<td>"+this.opts.invisibleSpace+"</td>"),0===t&&0===s&&o.append('<span id="selection-marker-1">'+this.opts.invisibleSpace+"</span>"),$(e).append(o);c.append(e)}n.append(c);var h=n.html();!1===this.opts.linebreaks&&this.browser("mozilla")&&(h+="<p>"+this.opts.invisibleSpace+"</p>"),this.modalClose(),this.selectionRestore();var d=this.getBlock()||this.getCurrent();if(d&&"BODY"!=d.tagName){if("LI"==d.tagName)var d=$(d).closest("ul, ol");$(d).after(h)}else this.insertHtmlAdvanced(h,!1);this.selectionRestore();var p=this.$editor.find("#table"+l);this.buttonActiveObserver(),p.find("span#selection-marker-1, inline#selection-marker-1").remove(),p.removeAttr("id"),this.sync()},tableDeleteTable:function(){var t=$(this.getParent()).closest("table");if(!this.isParentRedactor(t)||0==t.length)return!1;this.bufferSet(),t.remove(),this.sync()},tableDeleteRow:function(){var t=this.getParent(),e=$(t).closest("table");if(!this.isParentRedactor(e)||0==e.length)return!1;this.bufferSet();var s=$(t).closest("tr"),o=s.prev().length?s.prev():s.next();if(o.length){var r=o.children("td").first();r.length&&r.prepend('<span id="selection-marker-1">'+this.opts.invisibleSpace+"</span>")}s.remove(),this.selectionRestore(),e.find("span#selection-marker-1").remove(),this.sync()},tableDeleteColumn:function(){var t=this.getParent(),e=$(t).closest("table");if(!this.isParentRedactor(e)||0==e.length)return!1;this.bufferSet();var s=$(t).closest("td");s.is("td")||(s=s.closest("td"));var o=s.get(0).cellIndex;e.find("tr").each($.proxy(function(t,e){var s=o-1<0?o+1:o-1;0===t&&$(e).find("td").eq(s).prepend('<span id="selection-marker-1">'+this.opts.invisibleSpace+"</span>"),$(e).find("td").eq(o).remove()},this)),this.selectionRestore(),e.find("span#selection-marker-1").remove(),this.sync()},tableAddHead:function(){var t=$(this.getParent()).closest("table");if(!this.isParentRedactor(t)||0==t.length)return!1;if(this.bufferSet(),0!==t.find("thead").length)this.tableDeleteHead();else{var e=t.find("tr").first().clone();e.find("td").replaceWith("<th></th>").html(this.opts.invisibleSpace),($thead=$("<thead></thead>")).append(e),t.prepend($thead),this.sync()}},tableDeleteHead:function(){var t=$(this.getParent()).closest("table");if(!this.isParentRedactor(t))return!1;var e=t.find("thead");if(0==e.length)return!1;this.bufferSet(),e.remove(),this.sync()},tableAddRowAbove:function(){this.tableAddRow("before")},tableAddRowBelow:function(){this.tableAddRow("after")},tableAddColumnLeft:function(){this.tableAddColumn("before")},tableAddColumnRight:function(){this.tableAddColumn("after")},tableAddRow:function(t){var e=$(this.getParent()).closest("table");if(!this.isParentRedactor(e)||0==e.length)return!1;this.bufferSet();var s=$(this.getParent()).closest("tr"),o=s.clone();o.find("td").html(this.opts.invisibleSpace),"after"===t?s.after(o):s.before(o),this.sync()},tableAddColumn:function(t){var e=$(this.getParent()).closest("table");if(!this.isParentRedactor(e)||0==e.length)return!1;this.bufferSet();var s=0,o=this.getCurrent(),r=$(o).closest("tr"),a=$(o).closest("td");r.find("td").each($.proxy(function(t,e){$(e)[0]===a[0]&&(s=t)},this)),e.find("tr").each($.proxy(function(e,o){var r=$(o).find("td").eq(s),a=r.clone();a.html(this.opts.invisibleSpace),"after"===t?r.after(a):r.before(a)},this)),this.sync()},videoShow:function(){this.selectionSave(),this.modalInit(this.opts.curLang.video,this.opts.modal_video,600,$.proxy(function(){$("#redactor_insert_video_btn").on("click",$.proxy(this.videoInsert,this)),setTimeout(function(){$("#redactor_insert_video_area").focus()},200)},this))},videoInsert:function(){var t=$("#redactor_insert_video_area").val();t=this.cleanStripTags(t);var e='<iframe width="500" height="281" src="',s='" frameborder="0" allowfullscreen></iframe>';t.match(reUrlYoutube)?t=t.replace(reUrlYoutube,e+"//www.youtube.com/embed/$1"+s):t.match(reUrlVimeo)?t=t.replace(reUrlVimeo,e+"//player.vimeo.com/video/$2"+s):t.match(reUrlFacebook)?t=t.replace(reUrlFacebook,e+"https://www.facebook.com/video/embed?video_id=$1"+s):t.match(reUrlRutube)&&(t=t.replace(reUrlRutube,e+"//rutube.ru/play/embed/$1"+s)),this.selectionRestore();var o=this.getBlock()||this.getCurrent();o?$(o).after(t):this.insertHtmlAdvanced(t,!1),this.sync(),this.modalClose()},linkShow:function(){this.selectionSave();var t=$.proxy(function(){if(!1!==this.opts.predefinedLinks){this.predefinedLinksStorage={};var t=this;$.getJSON(this.opts.predefinedLinks,function(e){if(0!==Object.keys(e).length){var s=$("#redactor-predefined-links");s.html(""),$.each(e,function(e,o){t.predefinedLinksStorage[e]=o,s.append($("<option>").val(e).html(o.name))}),s.on("change",function(){var e=$(this).val(),s="",o="";0!=e&&(s=t.predefinedLinksStorage[e].name,o=t.predefinedLinksStorage[e].url),$("#redactor_link_url").val(o),1!=$("#redactor_link_url_text").data("is_selected_text")&&$("#redactor_link_url_text").val(s)}),s.show()}})}this.insert_link_node=!1;var e=this.getSelection(),s="",o="",r="",a=this.getParent(),n=$(a).parent().get(0);n&&"A"===n.tagName&&(a=n),a&&"A"===a.tagName?(s=a.href,o=$(a).text(),r=a.target,this.insert_link_node=a):o=e.toString(),$("#redactor_link_url_text").val(o),o.length>0&&$("#redactor_link_url_text").data("is_selected_text",1);var l=self.location.href.replace(/\/$/i,"");if(s=(s=(s=s.replace(l,"")).replace(/^\/#/,"#")).replace("mailto:",""),!1===this.opts.linkProtocol){var c=RegExp("^(http|ftp|https)://"+self.location.host,"i");s=s.replace(c,"")}$("#redactor_link_url").val(s),"_blank"===r&&$("#redactor_link_blank").prop("checked",!0),this.linkInsertPressed=!1,$("#redactor_insert_link_btn").on("click",$.proxy(this.linkProcess,this)),setTimeout(function(){$("#redactor_link_url").focus()},200)},this);this.modalInit(this.opts.curLang.link,this.opts.modal_link,460,t)},linkProcess:function(){if(!this.linkInsertPressed){this.linkInsertPressed=!0;var t="",e="",s=$("#redactor_link_url").val(),o=$("#redactor_link_url_text").val();if(-1!=s.search("@")&&!1===/(http|ftp|https):\/\//i.test(s))s="mailto:"+s;else if(0!=s.search("#")){$("#redactor_link_blank").prop("checked")&&(t=' target="_blank"',e="_blank");var r="((xn--)?[a-z0-9]+(-[a-z0-9]+)*.)+[a-z]{2,}",a=RegExp("^(http|ftp|https)://"+r,"i"),n=RegExp("^"+r,"i");-1==s.search(a)&&0==s.search(n)&&this.opts.linkProtocol&&(s=this.opts.linkProtocol+s)}o=o.replace(/<|>/g,"");var l="&nbsp;";this.browser("mozilla")&&(l="&nbsp;"),this.linkInsert('<a href="'+s+'"'+t+">"+o+"</a>"+l,$.trim(o),s,e)}},linkInsert:function(t,e,s,o){if(this.selectionRestore(),""!==e){if(this.insert_link_node)this.bufferSet(),$(this.insert_link_node).text(e).attr("href",s),""!==o?$(this.insert_link_node).attr("target",o):$(this.insert_link_node).removeAttr("target");else{var r=$(t).addClass("redactor-added-link");this.exec("inserthtml",this.outerHtml(r),!1);var s=this.$editor.find("a.redactor-added-link");s.removeAttr("style").removeClass("redactor-added-link").each(function(){""==this.className&&$(this).removeAttr("class")})}this.sync()}setTimeout($.proxy(function(){this.opts.observeLinks&&this.observeLinks()},this),5),this.modalClose()},fileShow:function(){this.selectionSave();var t=$.proxy(function(){var t=this.getSelection(),e="";e=this.oldIE()?t.text:t.toString(),$("#redactor_filename").val(e),this.isMobile()||this.isIPad()||this.draguploadInit("#redactor_file",{url:this.opts.fileUpload,uploadFields:this.opts.uploadFields,success:$.proxy(this.fileCallback,this),error:$.proxy(function(t,e){this.callback("fileUploadError",e)},this),uploadParam:this.opts.fileUploadParam}),this.uploadInit("redactor_file",{auto:!0,url:this.opts.fileUpload,success:$.proxy(this.fileCallback,this),error:$.proxy(function(t,e){this.callback("fileUploadError",e)},this)})},this);this.modalInit(this.opts.curLang.file,this.opts.modal_file,500,t)},fileCallback:function(t){if(this.selectionRestore(),!1!==t){var e=$("#redactor_filename").val();""===e&&(e=t.filename);var s='<a href="'+t.filelink+'" id="filelink-marker">'+e+"</a>";this.browser("webkit")&&this.window.chrome&&(s+="&nbsp;"),this.execCommand("inserthtml",s,!1);var o=$(this.$editor.find("a#filelink-marker"));0!=o.length?o.removeAttr("id"):o=!1,this.sync(),this.callback("fileUpload",o,t)}this.modalClose()},imageShow:function(){this.selectionSave();var t=$.proxy(function(){this.opts.imageGetJson?$.getJSON(this.opts.imageGetJson,$.proxy(function(t){if(t.error){alert(t.message);return}var e={},s=0;$.each(t,$.proxy(function(t,o){void 0!==o.folder&&(s++,e[o.folder]=s)},this)),$("#redactor_image_box .empty_list").show();var o=!1;if($.each(t,$.proxy(function(t,s){var r="";void 0!==s.title&&(r=s.title);var a=0;$.isEmptyObject(e)||void 0===s.folder||(a=e[s.folder],!1!==o||(o=".redactorfolder"+a));var n=$('<img src="'+s.thumb+'" class="redactorfolder redactorfolder'+a+'" rel="'+s.image+'" title="'+r+'" />');$("#redactor_image_box").append(n),$(n).on("click",$.proxy(this.imageThumbClick,this)),$("#redactor_image_box .empty_list").hide()},this)),!$.isEmptyObject(e)){$(".redactorfolder").hide(),$(o).show();var r=function(t){$(".redactorfolder").hide(),$(".redactorfolder"+$(t.target).val()).show()},a=$('<select id="redactor_image_box_select">');$.each(e,function(t,e){a.append($('<option value="'+e+'">'+t+"</option>"))}),$("#redactor_image_box").before(a),a.change(r)}},this)):$("#redactor-tab-control-2").remove(),this.opts.imageUpload||this.opts.s3?(this.isMobile()||this.isIPad()||!1!==this.opts.s3||!$("#redactor_file").length||this.draguploadInit("#redactor_file",{url:this.opts.imageUpload,uploadFields:this.opts.uploadFields,success:$.proxy(this.imageCallback,this),error:$.proxy(function(t,e){this.callback("imageUploadError",e)},this),uploadParam:this.opts.imageUploadParam}),!1===this.opts.s3?this.uploadInit("redactor_file",{auto:!0,url:this.opts.imageUpload,success:$.proxy(this.imageCallback,this),error:$.proxy(function(t,e){this.callback("imageUploadError",e)},this)}):$("#redactor_file").on("change.redactor",$.proxy(this.s3handleFileSelect,this))):($(".redactor_tab").hide(),this.opts.imageGetJson?($("#redactor-tab-control-1").remove(),$("#redactor-tab-control-2").addClass("redactor_tabs_act"),$("#redactor_tab2").show()):($("#redactor_tabs").remove(),$("#redactor_tab3").show())),!this.opts.imageTabLink&&(this.opts.imageUpload||this.opts.imageGetJson)&&$("#redactor-tab-control-3").hide(),$("#redactor_upload_btn").on("click",$.proxy(this.imageCallbackLink,this)),this.opts.imageUpload||this.opts.imageGetJson||setTimeout(function(){$("#redactor_file_link").focus()},200)},this);this.modalInit(this.opts.curLang.image,this.opts.modal_image,610,t)},imageEdit:function(t){var e=t,s=e.parent().parent(),o=$.proxy(function(){$("#redactor_file_alt").val(e.attr("alt")),$("#redactor_image_edit_src").attr("href",e.attr("src")),"block"==e.css("display")&&"none"==e.css("float")?$("#redactor_form_image_align").val("center"):$("#redactor_form_image_align").val(e.css("float")),"A"===$(s).get(0).tagName&&($("#redactor_file_link").val($(s).attr("href")),"_blank"==$(s).attr("target")&&$("#redactor_link_blank").prop("checked",!0)),$("#redactor_image_delete_btn").on("click",$.proxy(function(){this.imageRemove(e)},this)),$("#redactorSaveBtn").on("click",$.proxy(function(){this.imageSave(e)},this))},this);this.modalInit(this.opts.curLang.edit,this.opts.modal_image_edit,380,o)},imageRemove:function(t){var e=$(t).parent().parent(),s=$(t).parent(),o=!1;e.length&&"A"===e[0].tagName?(o=!0,$(e).remove()):s.length&&"A"===s[0].tagName?(o=!0,$(s).remove()):$(t).remove(),s.length&&"P"===s[0].tagName&&(this.focusWithSaveScroll(),!1===o&&this.selectionStart(s)),this.callback("imageDelete",t),this.modalClose(),this.sync()},imageSave:function(t){this.imageResizeHide(!1);var e=$(t),s=e.parent();e.attr("alt",$("#redactor_file_alt").val());var o=$("#redactor_form_image_align").val(),r="";"left"===o?(r="0 "+this.opts.imageFloatMargin+" "+this.opts.imageFloatMargin+" 0",e.css({float:"left",margin:r})):"right"===o?(r="0 0 "+this.opts.imageFloatMargin+" "+this.opts.imageFloatMargin,e.css({float:"right",margin:r})):"center"===o?e.css({float:"",display:"block",margin:"auto"}):e.css({float:"",display:"",margin:""});var a=$.trim($("#redactor_file_link").val());if(""!==a){var n=!1;if($("#redactor_link_blank").prop("checked")&&(n=!0),"A"!==s.get(0).tagName){var l=$('<a href="'+a+'">'+this.outerHtml(t)+"</a>");n&&l.attr("target","_blank"),e.replaceWith(l)}else s.attr("href",a),n?s.attr("target","_blank"):s.removeAttr("target")}else"A"===s.get(0).tagName&&s.replaceWith(this.outerHtml(t));this.modalClose(),this.observeImages(),this.sync()},imageResizeHide:function(t){if(!1!==t&&0!=$(t.target).parent().length&&"redactor-image-box"===$(t.target).parent()[0].id)return!1;var e=this.$editor.find("#redactor-image-box");if(0==e.length)return!1;this.$editor.find("#redactor-image-editter, #redactor-image-resizer").remove(),e.find("img").css({marginTop:e[0].style.marginTop,marginBottom:e[0].style.marginBottom,marginLeft:e[0].style.marginLeft,marginRight:e[0].style.marginRight}),e.css("margin",""),e.find("img").css("opacity",""),e.replaceWith(function(){return $(this).contents()}),$(document).off("click.redactor-image-resize-hide"),this.$editor.off("click.redactor-image-resize-hide"),this.$editor.off("keydown.redactor-image-delete"),this.sync()},imageResize:function(t){var e=$(t);e.on("mousedown",$.proxy(function(){this.imageResizeHide(!1)},this)),e.on("dragstart",$.proxy(function(){this.$editor.on("drop.redactor-image-inside-drop",$.proxy(function(){setTimeout($.proxy(function(){this.observeImages(),this.$editor.off("drop.redactor-image-inside-drop"),this.sync()},this),1)},this))},this)),e.on("click",$.proxy(function(t){if(0!=this.$editor.find("#redactor-image-box").length)return!1;var s,o,r=e.width()/e.height(),a=20,n=this.imageResizeControls(e),l=!1;!1!==n&&(n.on("mousedown",function(t){l=!0,t.preventDefault(),r=e.width()/e.height(),s=Math.round(t.pageX-e.eq(0).offset().left),o=Math.round(t.pageY-e.eq(0).offset().top)}),$(this.document.body).on("mousemove",$.proxy(function(t){if(l){t.pageX,e.eq(0).offset().left;var n=Math.round(t.pageY-e.eq(0).offset().top)-o,c=Math.round((parseInt(e.height(),10)+n)*r);c>a&&(e.width(c),c<100?this.imageEditter.css({marginTop:"-7px",marginLeft:"-13px",fontSize:"9px",padding:"3px 5px"}):this.imageEditter.css({marginTop:"-11px",marginLeft:"-18px",fontSize:"11px",padding:"7px 10px"})),s=Math.round(t.pageX-e.eq(0).offset().left),o=Math.round(t.pageY-e.eq(0).offset().top),this.sync()}},this)).on("mouseup",function(){l=!1})),this.$editor.on("keydown.redactor-image-delete",$.proxy(function(t){var s=t.which;(this.keyCode.BACKSPACE==s||this.keyCode.DELETE==s)&&(this.bufferSet(!1),this.imageResizeHide(!1),this.imageRemove(e))},this)),$(document).on("click.redactor-image-resize-hide",$.proxy(this.imageResizeHide,this)),this.$editor.on("click.redactor-image-resize-hide",$.proxy(this.imageResizeHide,this))},this))},imageResizeControls:function(t){var e=$('<span id="redactor-image-box" data-redactor="verified">');if(e.css({position:"relative",display:"inline-block",lineHeight:0,outline:"1px dashed rgba(0, 0, 0, .6)",float:t.css("float")}),e.attr("contenteditable",!1),"auto"!=t[0].style.margin?(e.css({marginTop:t[0].style.marginTop,marginBottom:t[0].style.marginBottom,marginLeft:t[0].style.marginLeft,marginRight:t[0].style.marginRight}),t.css("margin","")):e.css({display:"block",margin:"auto"}),t.css("opacity",.5).after(e),this.imageEditter=$('<span id="redactor-image-editter" data-redactor="verified">'+this.opts.curLang.edit+"</span>"),this.imageEditter.css({position:"absolute",zIndex:5,top:"50%",left:"50%",marginTop:"-11px",marginLeft:"-18px",lineHeight:1,backgroundColor:"#000",color:"#fff",fontSize:"11px",padding:"7px 10px",cursor:"pointer"}),this.imageEditter.attr("contenteditable",!1),this.imageEditter.on("click",$.proxy(function(){this.imageEdit(t)},this)),e.append(this.imageEditter),!this.opts.imageResizable)return e.append(t),!1;var s=$('<span id="redactor-image-resizer" data-redactor="verified"></span>');return s.css({position:"absolute",zIndex:2,lineHeight:1,cursor:"nw-resize",bottom:"-4px",right:"-5px",border:"1px solid #fff",backgroundColor:"#000",width:"8px",height:"8px"}),s.attr("contenteditable",!1),e.append(s),e.append(t),s},imageThumbClick:function(t){var e='<img id="image-marker" src="'+$(t.target).attr("rel")+'" alt="'+$(t.target).attr("title")+'" />',s=this.getParent();this.opts.paragraphy&&0==$(s).closest("li").length&&(e="<p>"+e+"</p>"),this.imageInsert(e,!0)},imageCallbackLink:function(){var t=$("#redactor_file_link").val();if(""!==t){var e='<img id="image-marker" src="'+t+'" />';!1===this.opts.linebreaks&&(e="<p>"+e+"</p>"),this.imageInsert(e,!0)}else this.modalClose()},imageCallback:function(t){this.imageInsert(t)},imageInsert:function(t,e){if(this.selectionRestore(),!1!==t){var s="";if(!0!==e){s='<img id="image-marker" src="'+t.image.url+'" />';var o=this.getParent();this.opts.paragraphy&&0==$(o).closest("li").length&&(s="<p>"+s+"</p>")}else s=t;this.execCommand("inserthtml",s,!1);var r=$(this.$editor.find("img#image-marker"));r.length?r.removeAttr("id"):r=!1,this.sync(),!0!==e&&this.callback("imageUpload",r,t)}this.modalClose(),this.observeImages()},buildProgressBar:function(){0==$("#redactor-progress").length&&(this.$progressBar=$('<div id="redactor-progress"><span></span></div>'),$(document.body).append(this.$progressBar))},showProgressBar:function(){this.buildProgressBar(),$("#redactor-progress").fadeIn()},hideProgressBar:function(){$("#redactor-progress").fadeOut(1500)},modalTemplatesInit:function(){$.extend(this.opts,{modal_file:String()+'<section id="redactor-modal-file-insert"><form id="redactorUploadFileForm" method="post" action="" enctype="multipart/form-data"><label>'+this.opts.curLang.filename+'</label><input type="text" id="redactor_filename" class="redactor_input" /><div style="margin-top: 7px;"><input type="file" id="redactor_file" name="'+this.opts.fileUploadParam+'" /></div></form></section>',modal_image_edit:String()+'<section id="redactor-modal-image-edit"><label>'+this.opts.curLang.title+'</label><input type="text" id="redactor_file_alt" class="redactor_input" /><label>'+this.opts.curLang.link+'</label><input type="text" id="redactor_file_link" class="redactor_input" /><label><input type="checkbox" id="redactor_link_blank"> '+this.opts.curLang.link_new_tab+"</label><label>"+this.opts.curLang.image_position+'</label><select id="redactor_form_image_align"><option value="none">'+this.opts.curLang.none+'</option><option value="left">'+this.opts.curLang.left+'</option><option value="center">'+this.opts.curLang.center+'</option><option value="right">'+this.opts.curLang.right+'</option></select></section><footer><button id="redactor_image_delete_btn" class="redactor_modal_btn redactor_modal_delete_btn">'+this.opts.curLang._delete+'</button><button class="redactor_modal_btn redactor_btn_modal_close">'+this.opts.curLang.cancel+'</button><button id="redactorSaveBtn" class="redactor_modal_btn redactor_modal_action_btn">'+this.opts.curLang.save+"</button></footer>",modal_image:String()+'<section id="redactor-modal-image-insert"><div id="redactor_tabs"><a href="#" id="redactor-tab-control-1" class="redactor_tabs_act">'+this.opts.curLang.upload+'</a><a href="#" id="redactor-tab-control-2">'+this.opts.curLang.choose+'</a><a href="#" id="redactor-tab-control-3">'+this.opts.curLang.link+'</a></div><form id="redactorInsertImageForm" method="post" action="" enctype="multipart/form-data"><div id="redactor_tab1" class="redactor_tab"><input type="file" id="redactor_file" name="'+this.opts.imageUploadParam+'" /></div><div id="redactor_tab2" class="redactor_tab" style="display: none;"><div id="redactor_image_box"><span class="empty_list">'+this.opts.curLang.empty_img_list+'</span></div></div></form><div id="redactor_tab3" class="redactor_tab" style="display: none;"><label>'+this.opts.curLang.image_web_link+'</label><input type="text" name="redactor_file_link" id="redactor_file_link" class="redactor_input"  /><br><br></div></section><footer><button class="redactor_modal_btn redactor_btn_modal_close">'+this.opts.curLang.cancel+'</button><button class="redactor_modal_btn redactor_modal_action_btn" id="redactor_upload_btn">'+this.opts.curLang.insert+"</button></footer>",modal_link:String()+'<section id="redactor-modal-link-insert"><select id="redactor-predefined-links" style="width: 99.5%; display: none;"></select><label>URL</label><input type="text" class="redactor_input" id="redactor_link_url" /><label>'+this.opts.curLang.text+'</label><input type="text" class="redactor_input" id="redactor_link_url_text" /><label><input type="checkbox" id="redactor_link_blank"> '+this.opts.curLang.link_new_tab+'</label></section><footer><button class="redactor_modal_btn redactor_btn_modal_close">'+this.opts.curLang.cancel+'</button><button id="redactor_insert_link_btn" class="redactor_modal_btn redactor_modal_action_btn">'+this.opts.curLang.insert+"</button></footer>",modal_table:String()+'<section id="redactor-modal-table-insert"><label>'+this.opts.curLang.rows+'</label><input type="text" size="5" value="2" id="redactor_table_rows" /><label>'+this.opts.curLang.columns+'</label><input type="text" size="5" value="3" id="redactor_table_columns" /></section><footer><button class="redactor_modal_btn redactor_btn_modal_close">'+this.opts.curLang.cancel+'</button><button id="redactor_insert_table_btn" class="redactor_modal_btn redactor_modal_action_btn">'+this.opts.curLang.insert+"</button></footer>",modal_video:String()+'<section id="redactor-modal-video-insert"><form id="redactorInsertVideoForm"><label>'+this.opts.curLang.video_html_code+'</label><textarea id="redactor_insert_video_area" style="width: 99%; height: 160px;"></textarea></form></section><footer><button class="redactor_modal_btn redactor_btn_modal_close">'+this.opts.curLang.cancel+'</button><button id="redactor_insert_video_btn" class="redactor_modal_btn redactor_modal_action_btn">'+this.opts.curLang.insert+"</button></footer>"})},modalInit:function(t,e,s,o){return this.modalSetOverlay(),this.$redactorModalWidth=s,this.$redactorModal=$("#redactor_modal"),this.$redactorModal.length||(this.$redactorModal=$('<div id="redactor_modal" style="display: none;" />'),this.$redactorModal.append($('<div id="redactor_modal_close">&times;</div>')),this.$redactorModal.append($('<header id="redactor_modal_header" />')),this.$redactorModal.append($('<div id="redactor_modal_inner" />')),this.$redactorModal.appendTo(document.body)),$("#redactor_modal_close").on("click",$.proxy(this.modalClose,this)),$(document).on("keyup",$.proxy(this.modalCloseHandler,this)),this.$editor.on("keyup",$.proxy(this.modalCloseHandler,this)),this.modalSetContent(e),this.modalSetTitle(t),this.modalSetDraggable(),this.modalLoadTabs(),this.modalOnCloseButton(),this.modalSetButtonsWidth(),this.saveModalScroll=this.document.body.scrollTop,!1===this.opts.autoresize&&(this.saveModalScroll=this.$editor.scrollTop()),!1===this.isMobile()?this.modalShowOnDesktop():this.modalShowOnMobile(),"function"==typeof o&&o(),setTimeout($.proxy(function(){this.callback("modalOpened",this.$redactorModal)},this),11),$(document).off("focusin.modal"),this.$redactorModal.find("input[type=text]").on("keypress",$.proxy(function(t){13===t.which&&(this.$redactorModal.find(".redactor_modal_action_btn").trigger("click"),t.preventDefault())},this)),this.$redactorModal},modalShowOnDesktop:function(){this.$redactorModal.css({position:"fixed",top:"-2000px",left:"50%",width:this.$redactorModalWidth+"px",marginLeft:"-"+this.$redactorModalWidth/2+"px"}).show(),this.modalSaveBodyOveflow=$(document.body).css("overflow"),$(document.body).css("overflow","hidden"),setTimeout($.proxy(function(){var t=this.$redactorModal.outerHeight();this.$redactorModal.css({top:"50%",height:"auto",minHeight:"auto",marginTop:"-"+(t+10)/2+"px"})},this),15)},modalShowOnMobile:function(){this.$redactorModal.css({position:"fixed",width:"100%",height:"100%",top:"0",left:"0",margin:"0",minHeight:"300px"}).show()},modalSetContent:function(t){this.modalcontent=!1,0==t.indexOf("#")?(this.modalcontent=$(t),$("#redactor_modal_inner").empty().append(this.modalcontent.html()),this.modalcontent.html("")):$("#redactor_modal_inner").empty().append(t)},modalSetTitle:function(t){this.$redactorModal.find("#redactor_modal_header").html(t)},modalSetButtonsWidth:function(){},modalOnCloseButton:function(){this.$redactorModal.find(".redactor_btn_modal_close").on("click",$.proxy(this.modalClose,this))},modalSetOverlay:function(){this.opts.modalOverlay&&(this.$redactorModalOverlay=$("#redactor_modal_overlay"),this.$redactorModalOverlay.length||(this.$redactorModalOverlay=$('<div id="redactor_modal_overlay" style="display: none;"></div>'),$("body").prepend(this.$redactorModalOverlay)),this.$redactorModalOverlay.show().on("click",$.proxy(this.modalClose,this)))},modalSetDraggable:function(){void 0!==$.fn.draggable&&(this.$redactorModal.draggable({handle:"#redactor_modal_header"}),this.$redactorModal.find("#redactor_modal_header").css("cursor","move"))},modalLoadTabs:function(){var t=$("#redactor_tabs");if(!t.length)return!1;var e=this;t.find("a").each(function(s,o){s++,$(o).on("click",function(o){if(o.preventDefault(),t.find("a").removeClass("redactor_tabs_act"),$(this).addClass("redactor_tabs_act"),$(".redactor_tab").hide(),$("#redactor_tab"+s).show(),$("#redactor_tab_selected").val(s),!1===e.isMobile()){var r=e.$redactorModal.outerHeight();e.$redactorModal.css("margin-top","-"+(r+10)/2+"px")}})})},modalCloseHandler:function(t){if(t.keyCode===this.keyCode.ESC)return this.modalClose(),!1},modalClose:function(){return $("#redactor_modal_close").off("click",this.modalClose),$("#redactor_modal").fadeOut("fast",$.proxy(function(){var t=$("#redactor_modal_inner");!1!==this.modalcontent&&(this.modalcontent.html(t.html()),this.modalcontent=!1),t.html(""),this.opts.modalOverlay&&$("#redactor_modal_overlay").hide().off("click",this.modalClose),$(document).off("keyup",this.modalCloseHandler),this.$editor.off("keyup",this.modalCloseHandler),this.selectionRestore(),this.opts.autoresize&&this.saveModalScroll?$(this.document.body).scrollTop(this.saveModalScroll):!1===this.opts.autoresize&&this.saveModalScroll&&this.$editor.scrollTop(this.saveModalScroll),this.callback("modalClosed")},this)),!1===this.isMobile()&&$(document.body).css("overflow",this.modalSaveBodyOveflow?this.modalSaveBodyOveflow:"visible"),!1},modalSetTab:function(t){$(".redactor_tab").hide(),$("#redactor_tabs").find("a").removeClass("redactor_tabs_act").eq(t-1).addClass("redactor_tabs_act"),$("#redactor_tab"+t).show()},s3handleFileSelect:function(t){for(var e,s=t.target.files,o=0;e=s[o];o++)this.s3uploadFile(e)},s3uploadFile:function(t){this.s3executeOnSignedUrl(t,$.proxy(function(e){this.s3uploadToS3(t,e)},this))},s3executeOnSignedUrl:function(t,e){var s=new XMLHttpRequest,o="?";"-1"!=this.opts.s3.search(/\?/)&&(o="&"),s.open("GET",this.opts.s3+o+"name="+t.name+"&type="+t.type,!0),s.overrideMimeType&&s.overrideMimeType("text/plain; charset=x-user-defined");var r=this;s.onreadystatechange=function(t){4==this.readyState&&200==this.status?(r.showProgressBar(),e(decodeURIComponent(this.responseText))):4==this.readyState&&this.status},s.send()},s3createCORSRequest:function(t,e){var s=new XMLHttpRequest;return"withCredentials"in s?s.open(t,e,!0):"undefined"!=typeof XDomainRequest?(s=new XDomainRequest).open(t,e):s=null,s},s3uploadToS3:function(t,e){var s=this.s3createCORSRequest("PUT",e);s&&(s.onload=$.proxy(function(){if(200==s.status){this.hideProgressBar();var t=e.split("?");if(!t[0])return!1;this.selectionRestore();var o="";o='<img id="image-marker" src="'+t[0]+'" />',this.opts.paragraphy&&(o="<p>"+o+"</p>"),this.execCommand("inserthtml",o,!1);var r=$(this.$editor.find("img#image-marker"));r.length?r.removeAttr("id"):r=!1,this.sync(),this.callback("imageUpload",r,!1),this.modalClose(),this.observeImages()}},this),s.onerror=function(){},s.upload.onprogress=function(t){},s.setRequestHeader("Content-Type",t.type),s.setRequestHeader("x-amz-acl","public-read"),s.send(t))},uploadInit:function(t,e){this.uploadOptions={url:!1,success:!1,error:!1,start:!1,trigger:!1,auto:!1,input:!1},$.extend(this.uploadOptions,e);var s=$("#"+t);s.length&&"INPUT"===s[0].tagName?(this.uploadOptions.input=s,this.el=$(s[0].form)):this.el=s,this.element_action=this.el.attr("action"),this.uploadOptions.auto?$(this.uploadOptions.input).change($.proxy(function(t){this.el.submit(function(t){return!1}),this.uploadSubmit(t)},this)):this.uploadOptions.trigger&&$("#"+this.uploadOptions.trigger).on("click",$.proxy(this.uploadSubmit,this))},uploadSubmit:function(t){this.showProgressBar(),this.uploadForm(this.element,this.uploadFrame())},uploadFrame:function(){this.id="f"+Math.floor(99999*Math.random());var t=this.document.createElement("div"),e='<iframe style="display:none" id="'+this.id+'" name="'+this.id+'"></iframe>';return t.innerHTML=e,$(t).appendTo("body"),this.uploadOptions.start&&this.uploadOptions.start(),$("#"+this.id).one("load",$.proxy(this.uploadLoaded,this)),this.id},uploadForm:function(t,e){if(this.uploadOptions.input){var s="redactorUploadForm"+this.id,o="redactorUploadFile"+this.id;this.form=$('<form  action="'+this.uploadOptions.url+'" method="POST" target="'+e+'" name="'+s+'" id="'+s+'" enctype="multipart/form-data" />'),!1!==this.opts.uploadFields&&"object"==typeof this.opts.uploadFields&&$.each(this.opts.uploadFields,$.proxy(function(t,e){null!=e&&0===e.toString().indexOf("#")&&(e=$(e).val());var s=$("<input/>",{type:"hidden",name:t,value:e});$(this.form).append(s)},this));var r=this.uploadOptions.input,a=$(r).clone();$(r).attr("id",o).before(a).appendTo(this.form),$(this.form).css("position","absolute").css("top","-2000px").css("left","-2000px").appendTo("body"),this.form.submit()}else t.attr("target",e).attr("method","POST").attr("enctype","multipart/form-data").attr("action",this.uploadOptions.url),this.element.submit()},uploadLoaded:function(){var t,e=$("#"+this.id)[0];if(t=e.contentDocument?e.contentDocument:e.contentWindow?e.contentWindow.document:window.frames[this.id].document,this.uploadOptions.success){if(this.hideProgressBar(),void 0!==t){var s=t.body.innerHTML.match(/\{(.|\n)*\}/)[0];s=(s=s.replace(/^\[/,"")).replace(/\]$/,"");var o=$.parseJSON(s);void 0===o.error?this.uploadOptions.success(o):(console.log(o),this.uploadOptions.error(this,o),this.modalClose())}else this.modalClose(),alert("Upload failed!")}this.el.attr("action",this.element_action),this.el.attr("target","")},draguploadInit:function(t,e){if(this.draguploadOptions=$.extend({url:!1,success:!1,error:!1,preview:!1,uploadFields:!1,text:this.opts.curLang.drop_file_here,atext:this.opts.curLang.or_choose,uploadParam:!1},e),void 0===window.FormData)return!1;this.droparea=$('<div class="redactor_droparea"></div>'),this.dropareabox=$('<div class="redactor_dropareabox">'+this.draguploadOptions.text+"</div>"),this.dropalternative=$('<div class="redactor_dropalternative">'+this.draguploadOptions.atext+"</div>"),this.droparea.append(this.dropareabox),$(t).before(this.droparea),$(t).before(this.dropalternative),this.dropareabox.on("dragover",$.proxy(function(){return this.draguploadOndrag()},this)),this.dropareabox.on("dragleave",$.proxy(function(){return this.draguploadOndragleave()},this)),this.dropareabox.get(0).ondrop=$.proxy(function(t){for(var e in t.preventDefault(),this.dropareabox.removeClass("hover").addClass("drop"),this.showProgressBar(),t.dataTransfer.files)t.dataTransfer.files.hasOwnProperty(e)&&this.dragUploadAjax(this.draguploadOptions.url,t.dataTransfer.files[e],!1,t,this.draguploadOptions.uploadParam)},this)},dragUploadAjax:function(t,e,s,o,r){if(!s){var a=$.ajaxSettings.xhr();a.upload&&a.upload.addEventListener("progress",$.proxy(this.uploadProgress,this),!1),$.ajaxSetup({xhr:function(){return a}})}this.callback("drop",o);var n=new FormData;!1!==r?n.append(r,e):n.append("file",e),!1!==this.opts.uploadFields&&"object"==typeof this.opts.uploadFields&&$.each(this.opts.uploadFields,$.proxy(function(t,e){null!=e&&0===e.toString().indexOf("#")&&(e=$(e).val()),n.append(t,e)},this)),$.ajax({url:t,dataType:"html",async:!1,data:n,cache:!1,contentType:!1,processData:!1,type:"POST",success:$.proxy(function(t){var e="string"==typeof(t=(t=t.replace(/^\[/,"")).replace(/\]$/,""))?$.parseJSON(t):t;if(this.hideProgressBar(),s){var r=$("<img>");r.attr("src",e.image.url).attr("id","drag-image-marker"),this.insertNodeToCaretPositionFromPoint(o,r[0]);var a=$(this.$editor.find("img#drag-image-marker"));a.length?a.removeAttr("id"):a=!1,this.sync(),this.observeImages(),a&&this.callback("imageUpload",a,e),void 0!==e.error&&this.callback("imageUploadError",e)}else void 0===e.error?this.draguploadOptions.success(e):(this.draguploadOptions.error(this,e),this.draguploadOptions.success(!1))},this)})},draguploadOndrag:function(){return this.dropareabox.addClass("hover"),!1},draguploadOndragleave:function(){return this.dropareabox.removeClass("hover"),!1},uploadProgress:function(t,e){var s=t.loaded?parseInt(t.loaded/t.total*100,10):t;this.dropareabox.text("Loading "+s+"% "+(e||""))},isMobile:function(){return/(iPhone|iPod|BlackBerry|Android)/.test(navigator.userAgent)},isIPad:function(){return/iPad/.test(navigator.userAgent)},normalize:function(t){return void 0===t?0:parseInt(t.replace("px",""),10)},outerHtml:function(t){return $("<div>").append($(t).eq(0).clone()).html()},stripHtml:function(t){var e=document.createElement("DIV");return e.innerHTML=t,e.textContent||e.innerText||""},isString:function(t){return"[object String]"==Object.prototype.toString.call(t)},isEmpty:function(t){return""==(t=(t=(t=t.replace(/&#x200b;|<br>|<br\/>|&nbsp;/gi,"")).replace(/\s/g,"")).replace(/^<p>[^\W\w\D\d]*?<\/p>$/i,""))},getInternetExplorerVersion:function(){var t=!1;if("Microsoft Internet Explorer"==navigator.appName){var e=navigator.userAgent;null!=RegExp("MSIE ([0-9]{1,}[.0-9]{0,})").exec(e)&&(t=parseFloat(RegExp.$1))}return t},isIe11:function(){return!!navigator.userAgent.match(/Trident\/7\./)},browser:function(t){var e=navigator.userAgent.toLowerCase(),s=/(opr)[\/]([\w.]+)/.exec(e)||/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("trident")>=0&&/(rv)(?::| )([\w.]+)/.exec(e)||0>e.indexOf("compatible")&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return"version"==t?s[2]:"webkit"==t?"chrome"==s[1]||"webkit"==s[1]:"rv"==s[1]?"msie"==t:"opr"==s[1]?"webkit"==t:t==s[1]},oldIE:function(){return!!(this.browser("msie")&&9>parseInt(this.browser("version"),10))},getFragmentHtml:function(t){var e=t.cloneNode(!0),s=this.document.createElement("div");return s.appendChild(e),s.innerHTML},extractContent:function(){for(var t,e=this.$editor[0],s=this.document.createDocumentFragment();t=e.firstChild;)s.appendChild(t);return s},isParentRedactor:function(t){return!!t&&(this.opts.iframe?t:!(0==$(t).parents("div.redactor_editor").length||$(t).hasClass("redactor_editor"))&&t)},currentOrParentIs:function(t){var e=this.getParent(),s=this.getCurrent();return e&&e.tagName===t?e:!!s&&s.tagName===t&&s},isEndOfElement:function(){var t=this.getBlock(),e=this.getCaretOffset(t),s=$.trim($(t).text()).replace(/\n\r\n/g,"").length;return e==s},isFocused:function(){var t,e=this.getSelection();return e&&e.rangeCount&&e.rangeCount>0&&(t=e.getRangeAt(0).startContainer),!!t&&(this.opts.iframe?!this.getCaretOffsetRange().equals()||!this.$editor.is(t):0!=$(t).closest("div.redactor_editor").length)},removeEmptyAttr:function(t,e){""==$(t).attr(e)&&$(t).removeAttr(e)},removeFromArrayByValue:function(t,e){for(var s=null;-1!==(s=t.indexOf(e));)t.splice(s,1);return t}},Redactor.prototype.init.prototype=Redactor.prototype,$.Redactor.fn.formatLinkify=function(t,e,s,o,r){for(var a=/(((https?|ftps?):\/\/)|www[.][^\s])(.+?\..+?)([.),]?)(\s|\.\s+|\)|$)/gi,n=/(https?|ftp):\/\//i,l=/(https?:\/\/.*\.(?:png|jpg|jpeg|gif))/gi,c=(this.$editor?this.$editor.get(0):this).childNodes,h=c.length;h--;){var d=c[h];if(3===d.nodeType){var p=d.nodeValue;if(o&&p){var u='<iframe width="500" height="281" src="',f='" frameborder="0" allowfullscreen></iframe>';p.match(reUrlYoutube)?(p=p.replace(reUrlYoutube,u+"//www.youtube.com/embed/$1"+f),$(d).after(p).remove()):p.match(reUrlVimeo)&&(p=p.replace(reUrlVimeo,u+"//player.vimeo.com/video/$2"+f),$(d).after(p).remove())}if(s&&p&&p.match(l)&&(p=p.replace(l,'<img src="$1">'),$(d).after(p).remove()),e&&p&&p.match(a)){var m=p.match(a);for(var h in m){var g=m[h],b=g,v="";null!==g.match(/\s$/)&&(v=" ");var _=t;null!==g.match(n)&&(_=""),b.length>r&&(b=b.substring(0,r)+"...");var y=(b=b.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")).replace("$","$$$");p=p.replace(g,'<a href="'+_+$.trim(g)+'">'+$.trim(y)+"</a>"+v)}$(d).after(p).remove()}}else 1!==d.nodeType||/^(a|button|textarea)$/i.test(d.tagName)||$.Redactor.fn.formatLinkify.call(d,t,e,s,o,r)}}}(jQuery);
\ No newline at end of file
diff --git a/wysiwyg/redactor/wysiwyg.class.php b/wysiwyg/redactor/wysiwyg.class.php
index 960544c66..b403dc380 100755
--- a/wysiwyg/redactor/wysiwyg.class.php
+++ b/wysiwyg/redactor/wysiwyg.class.php
@@ -107,11 +107,11 @@ class cmsWysiwygRedactor {
 
         if(self::$redactor_loaded){ return false; }
 
         $template = cmsTemplate::getInstance();
 
-        $template->addJSFromContext('wysiwyg/redactor/files/redactor.js');
+        $template->addJSFromContext('wysiwyg/redactor/files/redactor.min.js');
         $template->addTplJSNameFromContext('files');
 
         $css_file = 'wysiwyg/redactor/files/redactor.css';
         $tpl_css_file = $template->getTplFilePath('css/wysiwyg/redactor/styles.css', false);
         if($tpl_css_file){

Vulnerable code: /*
	Redactor v9.2.6
	Updated: Jul 19, 2014

	http://imperavi.com/redactor/

	Copyright (c) 2009-2014, Imperavi LLC.
	License: http://imperavi.com/redactor/license/

	Usage: $('#content').redactor();
*/
eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('(B($){q 7F=0;"lV lX";q bI=B(O){c[0]=O.lW;c[1]=O.kj;c.O=O;F c};bI.5o.iz=B(){F c[0]===c[1]};q 8N=/5n?:\\/\\/(?:[0-9A-Z-]+\\.)?(?:lT\\.be\\/|cO\\.7w\\S*[^\\w\\-\\s])([\\w\\-]{11})(?=[^\\w\\-]|$)(?![?=&+%\\w.-]*(?:[\'"][^<>]*>|<\\/a>))[?=&+%\\w.-]*/ig;q 8Q=/5n?:\\/\\/(aA\\.)?cI.7w\\/(\\d+)($|\\/)/;$.fn.U=B(3R){q 1p=[];q hg=i3.5o.jR.5q(hw,1);if(1E 3R==="8I"){c.1u(B(){q 7l=$.1a(c,"U");if(1E 7l!=="1J"&&$.7z(7l[3R])){q aO=7l[3R].bO(7l,hg);if(aO!==1J&&aO!==7l){1p.3d(aO)}}I{F $.3U(\'lP lS 5l "\'+3R+\'" 3z 3J\')}})}I{c.1u(B(){if(!$.1a(c,"U")){$.1a(c,"U",3J(c,3R))}})}if(1p.1m===0){F c}I{if(1p.1m===1){F 1p[0]}I{F 1p}}};B 3J(el,3R){F 2c 3J.5o.77(el,3R)}$.3J=3J;$.3J.mf="9.2.6";$.3J.C={41:E,1Q:E,4n:E,1f:E,1y:"en",63:"mh",4U:E,7X:E,fO:E,g1:N,gw:N,gQ:N,j7:E,a1:N,iO:N,bV:N,dS:E,kt:E,5N:N,2h:E,7c:E,4Y:N,8R:E,dO:E,6j:{"3x+m, 4w+m":"c.26(\'mb\', E)","3x+b, 4w+b":"c.26(\'3m\', E)","3x+i, 4w+i":"c.26(\'3q\', E)","3x+h, 4w+h":"c.26(\'fm\', E)","3x+l, 4w+l":"c.26(\'fy\', E)","3x+k, 4w+k":"c.9N()","3x+7V+7":"c.26(\'8q\', E)","3x+7V+8":"c.26(\'8k\', E)"},jL:E,7C:E,ah:60,cn:E,8a:"aI://",ky:E,7A:50,ec:E,8i:"8Y",6L:E,fR:N,kC:N,3Y:E,an:"25",gF:N,84:E,e5:"25",9p:N,bT:E,dM:["T/gY","T/hc","T/ha"],5Q:E,3H:E,4T:N,5m:N,fb:N,aW:E,i2:N,30:E,gJ:["6x","3m","3q","5H","6f","6a","7m","6m"],1A:N,6B:E,7T:X,bb:0,as:E,7O:E,h9:E,gK:N,4a:["o","6x","3m","3q","5H","6f","6a","7m","6m","T","3y","25","1n","1r","9R","|","7Q"],cU:[],aY:["5H","3q","3m","4K","6f","6a","cf","bn","bs","dB","1n"],cv:{b:"3m",3V:"3m",i:"3q",em:"3q",56:"5H",5F:"5H",2r:"6f",ol:"6a",u:"4K",3j:"1n",1g:"1n",1n:"1n"},gM:["p","2f","2q","h1","h2","h3","h4","h5","h6"],1N:E,5Y:N,9a:N,7d:N,6l:E,75:E,fz:E,8x:E,5G:E,8y:["o","9U","1r","2v","4w","3n","1o","lq"],6r:"3V",6p:"em",9q:20,3E:[],8A:[],64:E,58:"<p>&#9F;</p>",2i:"&#9F;",cu:/^(P|H[1-6]|3h|9e|9f|9Z|9Y|a4|a0)$/i,5t:["P","it","iC","iF","iw","i9","hM","i6","i7","gf","8K","6h","3F","fJ","cA","9e","9f","9Z","9Y","a4","a0"],bL:["fU","2v","9U","hr","i?2Z","1r","4w","le","1o","3n","1n","8c","3T","di"],bJ:["li","dt","dt","h[1-6]","4b","3n"],jM:["2f","12","dl","fV","2t","nx","gc","ol","p","2q","3s","1g","dN","3j","2r"],bg:["P","it","iC","iF","iw","i9","hM","i6","i7","gf","8K","3h","3F","fJ","cA","6i","9e","9f","9Z","9Y","a4","a0","6h"],jG:{en:{o:"kZ",3y:"6b jn",T:"6b kG",1n:"fc",1r:"l2",cz:"6b 1r",fg:"jV 1r",6F:"mO",6x:"mL",jK:"mW Y",ki:"mV",2k:"kr",kp:"7W 1",kn:"7W 2",k3:"7W 3",k1:"7W 4",kb:"7W 5",3m:"mG",3q:"mt",mC:"mE gg",my:"no gg",6f:"nb g7",6a:"lr g7",7m:"ll",6m:"lN",6H:"mg",4y:"6b",7N:"mj",iv:"7L",cd:"6b fc",c5:"7Y f0 m6",c4:"7Y f0 lm",bX:"7Y eW kJ",bW:"7Y eW kz",c2:"7L eW",c0:"7L f0",dW:"7L fc",aF:"nD",aJ:"n8",bU:"7Y kY",bY:"7L kY",1e:"n0",hP:"n7",3r:"ni",1s:"kJ",4Z:"kz",6O:"j4",ip:"kG mr l2",Y:"mU",eH:"mN",mJ:"gN",hF:"jn mn kr",25:"6b mw",8H:"jE",mB:"mz",eo:"mZ",jB:"np eo",jA:"nr 25 nj",bp:"j1 Y iW iZ 1s",bv:"j4 Y",bo:"j1 Y iW iZ 4Z",bu:"ny Y",7Q:"6b n6 n4",5H:"n9",na:"nc",eB:"lz 1r in 2c 52",4K:"lv",9R:"lE",ed:"m9 (m8)",8p:"jV"}}};3J.fn=$.3J.5o={2O:{a2:8,eC:46,dH:40,b9:13,dY:27,iG:9,lR:17,lU:91,mi:37,fw:91},77:B(el,3R){c.8j=E;c.$2j=c.$1v=$(el);c.7F=7F++;q C=$.4W(N,{},$.3J.C);c.C=$.4W({},C,c.$2j.1a(),3R);c.2y=N;c.lY=[];c.a9=c.$1v.1f("22");c.lL=c.$1v.1f("2p");if(c.C.4n){c.C.1Q=N}if(c.C.1N){c.C.5Y=E}if(c.C.5Y){c.C.1N=E}if(c.C.as){c.C.6B=N}c.X=X;c.42=42;c.5S=E;c.kT=2c 2J("^<(/?"+c.C.bL.5V("|/?")+"|"+c.C.bJ.5V("|")+")[ >]");c.kN=2c 2J("^<(br|/?"+c.C.bL.5V("|/?")+"|/"+c.C.bJ.5V("|/")+")[ >]");c.d7=2c 2J("^</?("+c.C.jM.5V("|")+")[ >]");c.ax=2c 2J("^("+c.C.bg.5V("|")+")$","i");if(c.C.1N===E){if(c.C.5G!==E){q bQ=["3V","em","56"];q jC=["b","i","5F"];if($.4O("p",c.C.5G)==="-1"){c.C.5G.3d("p")}3z(i in bQ){if($.4O(bQ[i],c.C.5G)!="-1"){c.C.5G.3d(jC[i])}}}if(c.C.8y!==E){q 3X=$.4O("p",c.C.8y);if(3X!=="-1"){c.C.8y.ap(3X,3X)}}}if(c.1C("3t")||c.1C("94")){c.C.4a=c.iB(c.C.4a,"7Q")}c.C.1F=c.C.jG[c.C.1y];$.4W(c.C.6j,c.C.jL);c.hj();c.g0()},fN:B(1y){F{o:{1e:1y.o,1H:"d0"},6x:{1e:1y.6x,1H:"2M",1R:{p:{1e:1y.jK,1H:"5I"},2f:{1e:1y.ki,1H:"d9",2S:"m3"},2q:{1e:1y.2k,1H:"5I",2S:"nd"},h1:{1e:1y.kp,1H:"5I",2S:"nf"},h2:{1e:1y.kn,1H:"5I",2S:"n2"},h3:{1e:1y.k3,1H:"5I",2S:"mm"},h4:{1e:1y.k1,1H:"5I",2S:"n3"},h5:{1e:1y.kb,1H:"5I",2S:"nz"}}},3m:{1e:1y.3m,2o:"3m"},3q:{1e:1y.3q,2o:"3q"},5H:{1e:1y.5H,2o:"fC"},4K:{1e:1y.4K,2o:"4K"},6f:{1e:"&nB; "+1y.6f,2o:"8k"},6a:{1e:"1. "+1y.6a,2o:"8q"},7m:{1e:"< "+1y.7m,1H:"cy"},6m:{1e:"> "+1y.6m,1H:"cx"},T:{1e:1y.T,1H:"l4"},3y:{1e:1y.3y,1H:"iI"},25:{1e:1y.25,1H:"jg"},1n:{1e:1y.1n,1H:"2M",1R:{cd:{1e:1y.cd,1H:"ko"},nm:{2m:"aN"},c5:{1e:1y.c5,1H:"j3"},c4:{1e:1y.c4,1H:"iV"},bX:{1e:1y.bX,1H:"iM"},bW:{1e:1y.bW,1H:"iL"},nn:{2m:"aN"},bU:{1e:1y.bU,1H:"j2"},bY:{1e:1y.bY,1H:"ey"},nq:{2m:"aN"},c2:{1e:1y.c2,1H:"iY"},c0:{1e:1y.c0,1H:"k8"},dW:{1e:1y.dW,1H:"ka"}}},1r:{1e:1y.1r,1H:"2M",1R:{1r:{1e:1y.cz,1H:"9N"},6F:{1e:1y.6F,2o:"6F"}}},9R:{1e:1y.9R,1H:"2M",1R:{cf:{1e:1y.bp,1H:"dI"},bn:{1e:1y.bv,1H:"dy"},bs:{1e:1y.bo,1H:"dD"},dB:{1e:1y.bu,1H:"dA"}}},cf:{1e:1y.bp,1H:"dI"},bn:{1e:1y.bv,1H:"dy"},bs:{1e:1y.bo,1H:"dD"},mv:{1e:1y.bu,1H:"dA"},7Q:{2o:"fx",1e:1y.7Q}}},1c:B(1G,67,1a){q 1c=c.C[1G+"ms"];if($.7z(1c)){if(67===E){F 1c.5q(c,1a)}I{F 1c.5q(c,67,1a)}}I{F 1a}},mF:B(){hd(c.ah);$(42).3b(".U");c.$1v.3b("U-5s");c.$2j.3b(".U").mT("U");q o=c.2R();if(c.C.64){c.$2C.2I(c.$1v);c.$2C.1w();c.$1v.1p(o).2M()}I{q $1z=c.$K;if(c.C.1Q){$1z=c.$2j}c.$2C.2I($1z);c.$2C.1w();$1z.3c("4d").3c("fM").2B("3K").o(o).2M()}if(c.C.7O){$(c.C.7O).o("")}if(c.C.30){$("#hb"+c.7F).1w()}},mS:B(){F $.4W({},c)},mX:B(){F c.$K},mQ:B(){F c.$2C},mI:B(){F(c.C.1Q)?c.$2Z:E},mK:B(){F(c.$1A)?c.$1A:E},2R:B(){F c.$1v.1p()},ku:B(){c.$K.2B("3K").2B("69");q o=c.3Z(c.$2Z.1Y().4c());c.$K.1i({3K:N,69:c.C.63});F o},6V:B(o,9g,du){o=o.43();o=o.G(/\\$/g,"&#36;");if(c.C.4n){c.kE(o)}I{c.l3(o,9g)}if(o==""){du=E}if(du!==E){c.hs()}},l3:B(o,9g){if(9g!==E){o=c.de(o);o=c.8d(o);o=c.dR(o);o=c.9S(o,N);if(c.C.1N===E){o=c.dK(o)}I{o=o.G(/<p(.*?)>([\\w\\W]*?)<\\/p>/gi,"$2<br>")}}o=o.G(/&9h;#36;/g,"$");o=c.dJ(o);c.$K.o(o);c.8u();c.92();c.1j()},kE:B(o){q 3C=c.cV();c.$2Z[0].3p="mD:mY";o=c.dR(o);o=c.9S(o);o=c.6Z(o);3C.b7();3C.gW(o);3C.h8();if(c.C.4n){c.$K=c.$2Z.1Y().1b("2v").1i({3K:N,69:c.C.63})}c.8u();c.92();c.1j()},d1:B(o){c.7y=o.1U(/^<\\!kH[^>]*>/i);if(c.7y&&c.7y.1m==1){o=o.G(/^<\\!kH[^>]*>/i,"")}o=c.de(o,N);o=c.dK(o);o=c.dJ(o);c.$K.o(o);c.8u();c.92();c.1j()},kw:B(){if(c.7y&&c.7y.1m==1){q 1v=c.7y[0]+"\\n"+c.$1v.1p();c.$1v.1p(1v)}},92:B(){q b4=c.$K.1b("V");q 76="3W";$.1u(b4,B(){q aD=c.jb;q 5y=2c 2J("<"+c.Q,"gi");q 5K=aD.G(5y,"<"+76);5y=2c 2J("</"+c.Q,"gi");5K=5K.G(5y,"</"+76);$(c).2e(5K)})},ad:B(o){o=o.G(/<V(.*?)>/,"<3W$1>");F o.G(/<\\/V>/,"</3W>")},8u:B(){c.$K.1b(".nk").1i("3K",E)},1j:B(e){q o="";c.g5();if(c.C.4n){o=c.ku()}I{o=c.$K.o()}o=c.eE(o);o=c.dq(o);q 1v=c.6Z(c.$1v.1p(),E);q K=c.6Z(o,E);if(1v==K){F E}o=o.G(/<\\/li><(2r|ol)>([\\w\\W]*?)<\\/(2r|ol)>/gi,"<$1>$2</$1></li>");if($.2b(o)==="<br>"){o=""}if(c.C.kt){q ks=["br","hr","1B","1r","2T","4w"];$.1u(ks,B(i,s){o=o.G(2c 2J("<"+s+"(.*?[^/$]?)>","gi"),"<"+s+"$1 />")})}o=c.1c("nt",E,o);c.$1v.1p(o);c.kw();c.1c("nu",E,o);if(c.2y===E){if(1E e!="1J"){kA(e.5X){5u 37:5f;5u 38:5f;5u 39:5f;5u 40:5f;nC:c.1c("68",E,o)}}I{c.1c("68",E,o)}}},eE:B(o){if(!c.C.4n){o=c.8d(o)}o=$.2b(o);o=c.hq(o);o=o.G(/&#9F;/gi,"");o=o.G(/&#nA;/gi,"");o=o.G(/<\\/a>&3u;/gi,"</a> ");o=o.G(/\\7D/g,"");if(o=="<p></p>"||o=="<p> </p>"||o=="<p>&3u;</p>"){o=""}if(c.C.ky){o=o.G(/<a(.*?)4m="kx"(.*?)>/gi,"<a$1$2>");o=o.G(/<a(.*?)>/gi,\'<a$1 4m="kx">\')}o=o.G("<!--?4I","<?4I");o=o.G("?-->","?>");o=o.G(/<(.*?)1x="kI"(.*?) 3K="E"(.*?)>/gi,\'<$nv="kI"$2$3>\');o=o.G(/ 1a-81=""/gi,"");o=o.G(/<br\\s?\\/?>\\n?<\\/(P|H[1-6]|3h|9e|9f|9Z|9Y|a4|a0)>/gi,"</$1>");o=o.G(/<V(.*?)id="U-T-2C"(.*?)>([\\w\\W]*?)<1B(.*?)><\\/V>/gi,"$3<1B$4>");o=o.G(/<V(.*?)id="U-T-ej"(.*?)>(.*?)<\\/V>/gi,"");o=o.G(/<V(.*?)id="U-T-es"(.*?)>(.*?)<\\/V>/gi,"");o=o.G(/<(2r|ol)>\\s*\\t*\\n*<\\/(2r|ol)>/gi,"");if(c.C.bV){o=o.G(/<2A(.*?)>([\\w\\W]*?)<\\/2A>/gi,"$2")}o=o.G(/<V(.*?)>([\\w\\W]*?)<\\/V>/gi,"$2");o=o.G(/<3W>([\\w\\W]*?)<\\/3W>/gi,"$1");o=o.G(/<3W>/gi,"<V>");o=o.G(/<3W /gi,"<V ");o=o.G(/<\\/3W>/gi,"</V>");if(c.C.a1){o=o.G(/<V>([\\w\\W]*?)<\\/V>/gi,"$1")}o=o.G(/<V(.*?)1x="55"(.*?)>([\\w\\W]*?)<\\/V>/gi,"");o=o.G(/<1B(.*?)3K="E"(.*?)>/gi,"<1B$1$2>");o=o.G(/&/gi,"&");o=o.G(/\\ls/gi,"&lF;");o=o.G(/\\lf/gi,"&lh;");o=o.G(/\\lk/gi,"&ma;");o=o.G(/\\lO/gi,"&lM;");o=o.G(/\\lZ/gi,"&m0;");o=c.fL(o);F o},g0:B(){c.3L="";c.$2C=$(\'<12 1x="lQ" />\');if(c.$1v[0].Q==="m2"){c.C.64=N}if(c.C.g1===E&&c.5a()){c.gb()}I{c.iH();if(c.C.1Q){c.C.4Y=E;c.5j()}I{if(c.C.64){c.fZ()}I{c.fY()}}if(!c.C.1Q){c.cJ();c.cH()}}},gb:B(){if(!c.C.64){c.$K=c.$1v;c.$K.2U();c.$1v=c.bd(c.$K);c.$1v.1p(c.3L)}c.$2C.at(c.$1v).1h(c.$1v)},iH:B(){if(c.C.64){c.3L=$.2b(c.$1v.1p())}I{c.3L=$.2b(c.$1v.o())}},fZ:B(){c.$K=$("<12 />");c.$2C.at(c.$1v).1h(c.$K).1h(c.$1v);c.fQ(c.$K);c.dw()},fY:B(){c.$K=c.$1v;c.$1v=c.bd(c.$K);c.$2C.at(c.$K).1h(c.$K).1h(c.$1v);c.dw()},bd:B($1v){F $("<5s />").1i("2m",$1v.1i("id")).1f("22",c.a9)},fQ:B(el){$.1u(c.$1v.2R(0).2S.4o(/\\s+/),B(i,s){el.2z("lo"+s)})},dw:B(){c.$K.2z("4d").1i({3K:N,69:c.C.63});c.$1v.1i("69",c.C.63).2U();c.6V(c.3L,N,E)},cJ:B(){q $1v=c.$K;if(c.C.1Q){$1v=c.$2Z}if(c.C.7c){$1v.1i("7c",c.C.7c)}if(c.C.8R){$1v.1f("fP-22",c.C.8R+"px")}I{if(c.1C("31")&&c.C.1N){c.$K.1f("fP-22","lH")}}if(c.1C("31")&&c.C.1N){c.$K.1f("8X-ft","8Y")}if(c.C.dO){c.C.4Y=E;c.a9=c.C.dO}if(c.C.fO){c.$K.2z("fM")}if(c.C.7X){c.$K.2z("U-K-7X")}if(!c.C.4Y){$1v.1f("22",c.a9)}},cH:B(){c.2y=E;if(c.C.1A){c.C.1A=c.fN(c.C.1F);c.gI()}c.i5();c.iu();c.d2();if(c.C.7C){c.7C()}2V($.M(c.7H,c),4);if(c.1C("31")){eG{c.X.26("ne",E,E);c.X.26("ng",E,E)}fe(e){}}if(c.C.2h){2V($.M(c.2h,c),3O)}if(!c.C.5N){2V($.M(B(){c.C.5N=N;c.d0(E)},c),5k)}c.1c("77")},d2:B(){c.7P=0;if(c.C.fR&&(c.C.3Y!==E||c.C.5Q!==E)){c.$K.on("6w.U",$.M(c.fT,c))}c.$K.on("23.U",$.M(B(){c.5R=E},c));c.$K.on("2T.U",$.M(c.1j,c));c.$K.on("9v.U",$.M(c.gd,c));c.$K.on("5T.U",$.M(c.go,c));c.$K.on("5d.U",$.M(c.hS,c));if($.7z(c.C.fS)){c.$1v.on("5T.U-5s",$.M(c.C.fS,c))}if($.7z(c.C.fX)){c.$K.on("2h.U",$.M(c.C.fX,c))}q a3;$(X).9J(B(e){a3=$(e.1O)});c.$K.on("cN.U",$.M(B(e){if(!$(a3).3v("cW")&&$(a3).8B(".cW").1V()==0){c.5R=E;if($.7z(c.C.n1)){c.1c("cN",e)}}},c))},fT:B(e){e=e.gE||e;if(42.bw===1J||!e.aX){F N}q 1m=e.aX.7I.1m;if(1m==0){F N}e.2u();q 25=e.aX.7I[0];if(c.C.dM!==E&&c.C.dM.44(25.1G)==-1){F N}c.21();c.8C();if(c.C.5Q===E){c.bF(c.C.3Y,25,N,e,c.C.an)}I{c.e1(25)}},gd:B(e){q dL=E;if(c.1C("4s")&&6n.7k.44("n5")===-1){q 2Q=c.1C("9n").4o(".");if(2Q[0]<nh){dL=N}}if(dL){F N}if(c.1C("94")){F N}if(c.C.9p&&c.gz(e)){F N}if(c.C.gw){c.8j=N;c.28();if(!c.5R){if(c.C.4Y===N&&c.c7!==N){c.$K.22(c.$K.22());c.9t=c.X.2v.3e}I{c.9t=c.$K.3e()}}q 4k=c.cE();2V($.M(B(){q gv=c.cE();c.$K.1h(4k);c.1W();q o=c.fF(gv);c.j8(o);if(c.C.4Y===N&&c.c7!==N){c.$K.1f("22","4l")}},c),1)}},gz:B(e){q 67=e.gE||e;c.gk=E;if(1E(67.dT)==="1J"){F E}if(67.dT.gh){q 25=67.dT.gh[0].mA();if(25!==2G){c.21();c.gk=N;q dC=2c mo();dC.jd=$.M(c.jz,c);dC.mq(25);F N}}F E},go:B(e){if(c.8j){F E}q 1k=e.5X;q 3x=e.9P||e.80;q L=c.2E();q 1t=c.3P();q 1l=c.2N();q 2q=E;c.1c("5T",e);if(c.1C("31")&&"dz"in 42.29()){if((3x)&&(e.2O===37||e.2O===39)){q 1I=c.29();q dE=(e.80?"9I":"mu");if(e.2O===37){1I.dz("4W","1s",dE);if(!e.53){1I.ih()}}if(e.2O===39){1I.dz("4W","4Z",dE);if(!e.53){1I.mR()}}e.2u()}}c.6t(E);if((L&&$(L).2R(0).Q==="6i")||(1t&&$(1t).2R(0).Q==="6i")){2q=N;if(1k===c.2O.dH){c.6U(1l)}}if(1k===c.2O.dH){if(L&&$(L)[0].Q==="3F"){c.6U(L)}if(1t&&$(1t)[0].Q==="3F"){c.6U(1t)}if(L&&$(L)[0].Q==="P"&&$(L).L()[0].Q=="3F"){c.6U(L,$(L).L()[0])}if(1t&&$(1t)[0].Q==="P"&&L&&$(L)[0].Q=="3F"){c.6U(1t,L)}}c.6j(e,1k);if(3x&&1k===90&&!e.53&&!e.fk){e.2u();if(c.C.3E.1m){c.k7()}I{c.X.26("mP",E,E)}F}I{if(3x&&1k===90&&e.53&&!e.fk){e.2u();if(c.C.8A.1m!=0){c.k6()}I{c.X.26("mM",E,E)}F}}if(1k==32){c.21()}if(3x&&1k===65){c.21();c.5R=N}I{if(1k!=c.2O.fw&&!3x){c.5R=E}}if(1k==c.2O.b9&&!e.53&&!e.9P&&!e.80){q O=c.3o();if(O&&O.4F===E){1q=c.29();if(1q.4V){O.aC()}}if(c.1C("3t")&&(L.4D==1&&(L.Q=="6h"||L.Q=="mH"))){e.2u();c.21();c.3B(X.4C("br"));c.1c("7x",e);F E}if(1l&&(1l.Q=="3F"||$(1l).L()[0].Q=="3F")){if(c.ck()){if(c.7P==1){q 2j;q 2W;if(1l.Q=="3F"){2W="br";2j=1l}I{2W="p";2j=$(1l).L()[0]}e.2u();c.bt(2j);c.7P=0;if(2W=="p"){$(1l).L().1b("p").2W().1w()}I{q 2L=$.2b($(1l).o());$(1l).o(2L.G(/<br\\s?\\/?>$/i,""))}F}I{c.7P++}}I{c.7P++}}if(2q===N){F c.hZ(e,1t)}I{if(!c.C.1N){if(1l&&1l.Q=="3h"){q 5P=c.2N();if(5P!==E||5P.Q==="3h"){q 9o=$.2b($(1l).Y());q fA=$.2b($(5P).Y());if(9o==""&&fA==""&&$(5P).4f("li").1V()==0&&$(5P).8B("li").1V()==0){c.21();q $3a=$(5P).2g("ol, 2r");$(5P).1w();q J=$("<p>"+c.C.2i+"</p>");$3a.2I(J);c.4g(J);c.1j();c.1c("7x",e);F E}}}if(1l&&c.C.cu.4e(1l.Q)){c.21();2V($.M(B(){q 5e=c.2N();if(5e.Q==="8K"&&!$(5e).3v("4d")){q J=$("<p>"+c.C.2i+"</p>");$(5e).2e(J);c.4g(J)}},c),1)}I{if(1l===E){c.21();q J=$("<p>"+c.C.2i+"</p>");c.3B(J[0]);c.4g(J);c.1c("7x",e);F E}}}if(c.C.1N){if(1l&&c.C.cu.4e(1l.Q)){c.21();2V($.M(B(){q 5e=c.2N();if((5e.Q==="8K"||5e.Q==="P")&&!$(5e).3v("4d")){c.jr(5e)}},c),1)}I{F c.cl(e)}}if(1l.Q=="3F"||1l.Q=="cA"){F c.cl(e)}}c.1c("7x",e)}I{if(1k===c.2O.b9&&(e.9P||e.53)){c.21();e.2u();c.al()}}if((1k===c.2O.iG||e.80&&1k===hi)&&c.C.6j){F c.hY(e,2q,1k)}if(1k===c.2O.a2){c.i4(e,1t,L)}},hZ:B(e,1t){e.2u();c.21();q o=$(1t).L().Y();c.3B(X.82("\\n"));if(o.4G(/\\s$/)==-1){c.3B(X.82("\\n"))}c.1j();c.1c("7x",e);F E},hY:B(e,2q,1k){if(!c.C.i2){F N}if(c.9B(c.2R())&&c.C.aW===E){F N}e.2u();if(2q===N&&!e.53){c.21();c.3B(X.82("\\t"));c.1j();F E}I{if(c.C.aW!==E){c.21();c.3B(X.82(i3(c.C.aW+1).5V("\\mp")));c.1j();F E}I{if(!e.53){c.cx()}I{c.cy()}}}F E},i4:B(e,1t,L){if(L&&1t&&L.4L.Q=="6h"&&L.Q=="fB"&&1t.Q=="3h"&&$(L).4c("li").1V()==1){q Y=$(1t).Y().G(/[\\7D-\\gs\\gB]/g,"");if(Y==""){q J=L.4L;$(L).1w();c.4g(J);c.1j();F E}}if(1E 1t.Q!=="1J"&&/^(H[1-6])$/i.4e(1t.Q)){q J;if(c.C.1N===E){J=$("<p>"+c.C.2i+"</p>")}I{J=$("<br>"+c.C.2i)}$(1t).2e(J);c.4g(J);c.1j()}if(1E 1t.aH!=="1J"&&1t.aH!==2G){if(1t.1w&&1t.4D===3&&1t.aH.1U(/[^\\7D]/g)==2G){$(1t).4M().1w();c.1j()}}},cl:B(e){c.21();e.2u();c.al();c.1c("7x",e);F},hS:B(e){if(c.8j){F E}q 1k=e.5X;q L=c.2E();q 1t=c.3P();if(!c.C.1N&&1t.4D==3&&(L==E||L.Q=="ee")){q J=$("<p>").1h($(1t).6q());$(1t).2e(J);q 4f=$(J).4f();if(1E(4f[0])!=="1J"&&4f[0].Q=="bC"){4f.1w()}c.7G(J)}if((c.C.7d||c.C.6l||c.C.75)&&1k===c.2O.b9){c.ix()}if(1k===c.2O.eC||1k===c.2O.a2){F c.kP(e)}c.1c("5d",e);c.1j(e)},ix:B(){c.e7(c.C.8a,c.C.7d,c.C.6l,c.C.75,c.C.7A);2V($.M(B(){if(c.C.6l){c.4T()}if(c.C.5m){c.5m()}},c),5)},iu:B(){if(!c.C.cn){F}$.1u(c.C.cn,$.M(B(i,s){if(cq[s]){$.4W(c,cq[s]);if($.7z(cq[s].77)){c.77()}}},c))},5j:B(){c.io();if(c.C.64){c.co(c.$1v)}I{c.$cp=c.$1v.2U();c.$1v=c.bd(c.$cp);c.co(c.$cp)}},co:B(el){c.$1v.1i("69",c.C.63).2U();c.$2C.at(el).1h(c.$2Z).1h(c.$1v)},io:B(){c.$2Z=$(\'<1Q 1o="2p: 3O%;" cS="0" />\').b8("jZ",$.M(B(){if(c.C.4n){c.cV();if(c.3L===""){c.3L=c.C.2i}c.$2Z.1Y()[0].gW(c.3L);c.$2Z.1Y()[0].h8();q gV=gS($.M(B(){if(c.$2Z.1Y().1b("2v").o()){hd(gV);c.cZ()}},c),0)}I{c.cZ()}},c))},bG:B(){F c.$2Z[0].bK.X},cV:B(){q 3C=c.bG();if(3C.aE){3C.ly(3C.aE)}F 3C},cK:B(1f){1f=1f||c.C.1f;if(c.kF(1f)){c.$2Z.1Y().1b("9U").1h(\'<1r 4m="lw" 1S="\'+1f+\'" />\')}if($.lu(1f)){$.1u(1f,$.M(B(i,1K){c.cK(1K)},c))}},cZ:B(){c.$K=c.$2Z.1Y().1b("2v").1i({3K:N,69:c.C.63});if(c.$K[0]){c.X=c.$K[0].lK;c.42=c.X.me||42}c.cK();if(c.C.4n){c.d1(c.$1v.1p())}I{c.6V(c.3L,N,E)}c.cJ();c.cH()},hj:B(){if(c.C.4U!==E){c.cR=c.C.4U;c.C.4U=N}I{if(1E c.$2j.1i("4U")=="1J"||c.$2j.1i("4U")==""){c.C.4U=E}I{c.cR=c.$2j.1i("4U");c.C.4U=N}}},gl:B(o){if(c.C.4U===E){F E}if(c.9B(o)){c.C.2h=E;c.cQ();c.cM();F c.cP()}I{c.cM()}F E},cQ:B(){c.$K.on("2h.55",$.M(c.hm,c))},cM:B(){c.$K.on("cN.55",$.M(c.hh,c))},cP:B(){q ph=$(\'<V 1x="55">\').1a("U","9s").1i("3K",E).Y(c.cR);if(c.C.1N===E){F $("<p>").1h(ph)}I{F ph}},hh:B(){q o=c.2R();if(c.9B(o)){c.cQ();c.$K.o(c.cP())}},hm:B(){c.$K.1b("V.55").1w();q o="";if(c.C.1N===E){o=c.C.58}c.$K.3b("2h.55");c.$K.o(o);if(c.C.1N===E){c.4g(c.$K.4c()[0])}I{c.2h()}c.1j()},hs:B(){c.$K.1b("V.55").1w();c.$K.3b("2h.55")},hq:B(o){F o.G(/<V 1x="55"(.*?)>(.*?)<\\/V>/i,"")},6j:B(e,1k){if(!c.C.6j){if((e.9P||e.80)&&(1k===66||1k===73)){e.2u()}F E}$.1u(c.C.6j,$.M(B(4p,hn){q 54=4p.4o(",");3z(q i in 54){if(1E 54[i]==="8I"){c.ho(e,$.2b(54[i]),$.M(B(){m1(hn)},c))}}},c))},ho:B(e,54,hA){q hu={8:"mk",9:"52",10:"F",13:"F",16:"7V",17:"3x",18:"8n",19:"md",20:"mc",27:"m5",32:"6c",33:"m4",34:"m7",35:"3l",36:"ml",37:"1s",38:"lC",39:"4Z",40:"ln",45:"4y",46:"56",59:";",61:"=",96:"0",97:"1",98:"2",99:"3",3O:"4",lp:"5",lj:"6",lg:"7",lJ:"8",lD:"9",lG:"*",lI:"+",lB:"-",lA:".",lx:"/",mx:"f1",rm:"f2",rk:"f3",rp:"f4",rr:"f5",rc:"f6",qs:"f7",qv:"f8",qy:"f9",qe:"ql",qk:"qi",qj:"qV",qY:"qZ",qQ:"h7",qP:"-",qD:";",qE:"=",qu:",",qL:"-",qK:".",qM:"/",qN:"`",hi:"[",qO:"\\\\",qJ:"]",qI:"\'"};q cL={"`":"~","1":"!","2":"@","3":"#","4":"$","5":"%","6":"^","7":"&","8":"*","9":"(","0":")","-":"qF","=":"+",";":": ","\'":\'"\',",":"<",".":">","/":"?","\\\\":"|"};54=54.3N().4o(" ");q aw=hu[e.2O],7S=51.qG(e.5X).3N(),7q="",7u={};$.1u(["8n","3x","4w","7V"],B(2K,az){if(e[az+"qH"]&&aw!==az){7q+=az+"+"}});if(aw){7u[7q+aw]=N}if(7S){7u[7q+7S]=N;7u[7q+cL[7S]]=N;if(7q==="7V+"){7u[cL[7S]]=N}}3z(q i=0,l=54.1m;i<l;i++){if(7u[54[i]]){e.2u();F hA.bO(c,hw)}}},2h:B(){if(!c.1C("94")){c.42.2V($.M(c.aK,c,N),1)}I{c.$K.2h()}},4i:B(){if(c.1C("3t")){q 1T=c.X.aE.3e}c.$K.2h();if(c.1C("3t")){c.X.aE.3e=1T}},cb:B(){if(!c.1C("31")){c.aK()}I{if(c.C.1N===E){q 2W=c.$K.4c().2W();c.$K.2h();c.7G(2W)}I{c.aK()}}},aK:B(5h,2j){c.$K.2h();if(1E 2j=="1J"){2j=c.$K[0]}q O=c.3o();O.aM(2j);O.5h(5h||E);q 1q=c.29();1q.4X();1q.5g(O)},d0:B(aG){if(c.C.5N){c.hz(aG)}I{c.hy()}},hy:B(){q o=c.$1v.2U().1p();if(1E c.6E!=="1J"){q 6E=c.6E.G(/\\n/g,"");q 78=o.G(/\\n/g,"");78=c.6Z(78,E);c.6E=c.6Z(6E,E)!==78}if(c.6E){if(c.C.4n&&o===""){c.d1(o)}I{c.6V(o);if(c.C.4n){c.d2()}}c.1c("68",E,o)}if(c.C.1Q){c.$2Z.2M()}I{c.$K.2M()}if(c.C.4n){c.$K.1i("3K",N)}c.$1v.3b("5T.U-5s-gP");c.$K.2h();c.1W();c.7H();c.hN();c.ct("o");c.C.5N=N},hz:B(aG){if(aG!==E){c.28()}q 22=2G;if(c.C.1Q){22=c.$2Z.22();if(c.C.4n){c.$K.2B("3K")}c.$2Z.2U()}I{22=c.$K.iE();c.$K.2U()}q o=c.$1v.1p();if(o!==""&&c.C.gQ){c.$1v.1p(c.l5(o))}c.6E=o;c.$1v.22(22).2M().2h();c.$1v.on("5T.U-5s-gP",c.gR);c.gG();c.7b("o");c.C.5N=E},gR:B(e){if(e.2O===9){q $el=$(c);q 2y=$el.2R(0).4g;$el.1p($el.1p().aQ(0,2y)+"\\t"+$el.1p().aQ($el.2R(0).7G));$el.2R(0).4g=$el.2R(0).7G=2y+1;F E}},7C:B(){q cY=E;c.ah=gS($.M(B(){q o=c.2R();if(cY!==o){q 2m=c.$1v.1i("2m");$.iU({1K:c.C.7C,1G:"7R",1a:"2m="+2m+"&"+2m+"="+r0(r1(o)),4h:$.M(B(1a){q 1M=$.8J(1a);if(1E 1M.3U=="1J"){c.1c("7C",E,1M)}I{c.1c("r2",E,1M)}cY=o},c)})}},c),c.C.ah*qX)},gI:B(){if(c.5a()&&c.C.cU.1m>0){$.1u(c.C.cU,$.M(B(i,s){q 2K=c.C.4a.44(s);c.C.4a.ap(2K,1)},c))}if(c.C.30){c.C.4a=c.C.gJ}I{if(!c.C.gK){q 2K=c.C.4a.44("o");c.C.4a.ap(2K,1)}}if(c.C.1A){$.1u(c.C.1A.6x.1R,$.M(B(i,s){if($.4O(i,c.C.gM)=="-1"){e9 c.C.1A.6x.1R[i]}},c))}if(c.C.4a.1m===0){F E}c.il();c.$1A=$("<2r>").2z("cW").1i("id","qW"+c.7F);if(c.C.7X){c.$1A.2z("U-1A-7X")}if(c.C.h9&&c.5a()){c.$1A.2z("U-1A-8V")}if(c.C.30){c.$30=$(\'<12 1x="ik">\').1i("id","hb"+c.7F).2U();c.$30.1h(c.$1A);$("2v").1h(c.$30)}I{if(c.C.7O){c.$1A.2z("U-1A-qS");$(c.C.7O).o(c.$1A)}I{c.$2C.6d(c.$1A)}}$.1u(c.C.4a,$.M(B(i,2w){if(c.C.1A[2w]){q 2d=c.C.1A[2w];if(c.C.84===E&&2w==="25"){F N}c.$1A.1h($("<li>").1h(c.7f(2w,2d)))}},c));c.$1A.1b("a").1i("7c","-1");if(c.C.6B){c.cX();$(c.C.7T).on("h7.U",$.M(c.cX,c))}if(c.C.aY){c.$K.on("a8.U 5d.U",$.M(c.8r,c))}},cX:B(){q 3e=$(c.C.7T).3e();q 7M=0;q 1s=0;q 3l=0;if(c.C.7T===X){7M=c.$2C.2Y().1T}I{7M=1}3l=7M+c.$2C.22()+40;if(3e>7M){q 2p="3O%";if(c.C.as){1s=c.$2C.2Y().1s;2p=c.$2C.ic();c.$1A.2z("im")}c.6B=N;if(c.C.7T===X){c.$1A.1f({3k:"ak",2p:2p,9u:h0,1T:c.C.bb+"px",1s:1s})}I{c.$1A.1f({3k:"8T",2p:2p,9u:h0,1T:(c.C.bb+3e)+"px",1s:0})}if(3e<3l){c.$1A.1f("hH","gq")}I{c.$1A.1f("hH","8E")}}I{c.6B=E;c.$1A.1f({3k:"gC",2p:"4l",1T:0,1s:1s});if(c.C.as){c.$1A.3c("im")}}},il:B(){if(!c.C.30){F}c.$K.on("a8.U 5d.U",c,$.M(B(e){q Y=c.aB();if(e.1G==="a8"&&Y!=""){c.cF(e)}if(e.1G==="5d"&&e.53&&Y!=""){q $cG=$(c.8g(c.29().qU)),2Y=$cG.2Y();2Y.22=$cG.22();c.cF(2Y,N)}},c))},cF:B(e,ij){if(!c.C.30){F}c.28();q 1s,1T;$(".ik").2U();if(ij){1s=e.1s;1T=e.1T+e.22+14;if(c.C.1Q){1T+=c.$2C.3k().1T-$(c.X).3e();1s+=c.$2C.3k().1s}}I{q 2p=c.$30.ic();1s=e.jl;if($(c.X).2p()<(1s+2p)){1s-=2p}1T=e.jm+14;if(c.C.1Q){1T+=c.$2C.3k().1T;1s+=c.$2C.3k().1s}I{1T+=$(c.X).3e()}}c.$30.1f({1s:1s+"px",1T:1T+"px"}).2M();c.ie()},ie:B(){if(!c.C.30){F}q 6W=$.M(B(3C){$(3C).on("9J.U",$.M(B(e){if($(e.1O).2g(c.$1A).1m===0){c.$30.6N(3O);c.bA();$(3C).3b(e)}},c)).on("5T.U",$.M(B(e){if(e.5X===c.2O.dY){c.29().ih()}c.$30.6N(3O);$(3C).3b(e)},c))},c);6W(X);if(c.C.1Q){6W(c.X)}},bi:B(){if(!c.C.30){F}q 6W=$.M(B(3C){$(3C).on("l1.U",$.M(B(e){if($(e.1O).2g(c.$1A).1m===0){c.$30.6N(3O);$(3C).3b(e)}},c))},c);6W(X);if(c.C.1Q){6W(c.X)}},hJ:B($1R,ir){$.1u(ir,$.M(B(2w,2d){if(!2d.2S){2d.2S=""}q $6Y;if(2d.2m==="aN"){$6Y=$(\'<a 1x="qC">\')}I{$6Y=$(\'<a 1S="#" 1x="\'+2d.2S+" qB"+2w+\'">\'+2d.1e+"</a>");$6Y.on("23",$.M(B(e){if(c.C.30){c.1W()}if(e.2u){e.2u()}if(c.1C("3t")){e.hU=E}if(2d.1c){2d.1c.5q(c,2w,$6Y,2d,e)}if(2d.2o){c.26(2d.2o,2w)}if(2d.1H){c[2d.1H](2w)}c.8r();if(c.C.30){c.$30.6N(3O)}},c))}$1R.1h($6Y)},c))},cj:B(e,1k){if(!c.C.5N){e.2u();F E}q $1D=c.4q(1k);q $1R=$1D.1a("1R").8P(X.2v);if($1D.3v("7a")){c.bj()}I{c.bj();c.1c("cj",{1R:$1R,1k:1k,1D:$1D});c.7b(1k);$1D.2z("7a");q 7U=$1D.2Y();q cr=$1R.2p();if((7U.1s+cr)>$(X).2p()){7U.1s-=cr}q 1s=7U.1s+"px";q cm=$1D.iE();q 3k="8T";q 1T=(cm+c.C.bb)+"px";if(c.C.6B&&c.6B){3k="ak"}I{1T=7U.1T+cm+"px"}$1R.1f({3k:3k,1s:1s,1T:1T}).2M();c.1c("qm",{1R:$1R,1k:1k,1D:$1D})}q bh=$.M(B(e){c.ci(e,$1R)},c);$(X).b8("23",bh);c.$K.b8("23",bh);c.$K.b8("qh",bh);e.qg();c.4i()},bj:B(){c.$1A.1b("a.7a").3c("8z").3c("7a");$(".hO").2U();c.1c("ci")},ci:B(e,$1R){if(!$(e.1O).3v("7a")){$1R.3c("7a");c.bj()}},7f:B(2w,2d,hT){q $1D=$(\'<a 1S="ab:;" 1e="\'+2d.1e+\'" 7c="-1" 1x="re-aR re-\'+2w+\'"></a>\');if(1E hT!="1J"){$1D.2z("U-2a-T")}$1D.on("23",$.M(B(e){if(e.2u){e.2u()}if(c.1C("3t")){e.hU=E}if($1D.3v("cB")){F E}if(c.7h()===E&&!2d.2o){c.4i()}if(2d.2o){c.4i();c.26(2d.2o,2w);c.bi()}I{if(2d.1H&&2d.1H!=="2M"){c[2d.1H](2w);c.bi()}I{if(2d.1c){2d.1c.5q(c,2w,$1D,2d,e);c.bi()}I{if(2d.1R){c.cj(e,2w)}}}}c.8r(E,2w)},c));if(2d.1R){q $1R=$(\'<12 1x="hO qb\'+2w+\'" 1o="3f: 3r;">\');$1D.1a("1R",$1R);c.hJ($1R,2d.1R)}F $1D},4q:B(1k){if(!c.C.1A){F E}F $(c.$1A.1b("a.re-"+1k))},qa:B(cs,Q){c.C.aY.3d(cs);c.C.cv[Q]=cs},fo:B(1k){q 2a=c.4q(1k);if(2a.3v("8z")){c.ct(1k)}I{c.7b(1k)}},7b:B(1k){q 2a=c.4q(1k);2a.2z("8z")},ct:B(1k){q 2a=c.4q(1k);2a.3c("8z")},fl:B(2w){c.$1A.1b("a.re-aR").ay(".re-"+2w).3c("8z")},hN:B(){c.$1A.1b("a.re-aR").ay("a.re-o").3c("cB")},gG:B(){c.$1A.1b("a.re-aR").ay("a.re-o").2z("cB")},qc:B(1k,aP){c.4q(1k).2z("re-"+aP)},qd:B(1k,aP){c.4q(1k).3c("re-"+aP)},qf:B(1k,2m){q 1D=c.4q(1k);1D.3c("U-2a-T");1D.2z("fa-U-2a");1D.o(\'<i 1x="fa \'+2m+\'"></i>\')},qn:B(1k,1e,1c,1R){if(!c.C.1A){F}q 2a=c.7f(1k,{1e:1e,1c:1c,1R:1R},N);c.$1A.1h($("<li>").1h(2a));F 2a},qo:B(1k,1e,1c,1R){if(!c.C.1A){F}q 2a=c.7f(1k,{1e:1e,1c:1c,1R:1R},N);c.$1A.6d($("<li>").1h(2a))},qx:B(hX,1k,1e,1c,1R){if(!c.C.1A){F}q 2a=c.7f(1k,{1e:1e,1c:1c,1R:1R},N);q $2a=c.4q(hX);if($2a.1V()!==0){$2a.L().2I($("<li>").1h(2a))}I{c.$1A.1h($("<li>").1h(2a))}F 2a},qw:B(i1,1k,1e,1c,1R){if(!c.C.1A){F}q 2a=c.7f(1k,{1e:1e,1c:1c,1R:1R},N);q $2a=c.4q(i1);if($2a.1V()!==0){$2a.L().3S($("<li>").1h(2a))}I{c.$1A.1h($("<li>").1h(2a))}F 2a},qz:B(1k){q $2a=c.4q(1k);$2a.1w()},8r:B(e,2w){q L=c.2E();c.fl(2w);if(e===E&&2w!=="o"){if($.4O(2w,c.C.aY)!=-1){c.fo(2w)}F}if(L&&L.Q==="A"){c.$1A.1b("a.fG").Y(c.C.1F.fg)}I{c.$1A.1b("a.fG").Y(c.C.1F.cz)}$.1u(c.C.cv,$.M(B(1k,2s){if($(L).2g(1k,c.$K.2R()[0]).1m!=0){c.7b(2s)}},c));q $L=$(L).2g(c.C.5t.43().3N(),c.$K[0]);if($L.1m){q 57=$L.1f("Y-57");if(57==""){57="1s"}c.7b("57"+57)}},aL:B(o){q 1q=c.29();if(1q.48&&1q.4V){q O=c.3o();O.aC();q el=c.X.4C("12");el.3Q=o;q 4k=c.X.cD(),J,5v;3w((J=el.8G)){5v=4k.7g(J)}q r4=4k.8G;O.3B(4k);if(5v){O=O.ag();O.ae(5v);O.5h(N)}1q.4X();1q.5g(O)}},2o:B(1P,2F,1j){if(1P==="d8"&&c.1C("3t")){2F="<"+2F+">"}if(1P==="5c"&&c.1C("3t")){if(!c.8L()){c.4i();c.X.1I.5i().do(2F)}I{c.aL(2F)}}I{c.X.26(1P,E,2F)}if(1j!==E){c.1j()}c.1c("26",1P,2F)},26:B(1P,2F,1j){if(!c.C.5N){c.$1v.2h();F E}if(1P==="3m"||1P==="3q"||1P==="4K"||1P==="fC"){c.21()}if(1P==="fm"||1P==="fy"){q L=c.2E();if(L.Q==="qq"||L.Q==="qp"){c.bk(L)}}if(1P==="5c"){c.9i(2F,1j);c.1c("26",1P,2F);F}if(c.74("6i")&&!c.C.fz){F E}if(1P==="8k"||1P==="8q"){F c.fv(1P,2F)}if(1P==="6F"){F c.fu(1P,2F)}c.2o(1P,2F,1j);if(1P==="fx"){c.$K.1b("hr").2B("id")}},fu:B(1P,2F){c.21();q 1r=c.74("A");if(1r){$(1r).2e($(1r).Y());c.1j();c.1c("26",1P,2F);F}},fv:B(1P,2F){c.21();q L=c.2E();q $3a=$(L).2g("ol, 2r");if(!c.4j($3a)&&$3a.1V()!=0){$3a=E}q 1w=E;if($3a&&$3a.1m){1w=N;q 5x=$3a[0].Q;if((1P==="8k"&&5x==="qr")||(1P==="8q"&&5x==="fB")){1w=E}}c.28();if(1w){q 1X=c.7r();q 4t=c.3I(1X);if(1E 1X[0]!="1J"&&1X.1m>1&&1X[0].4D==3){4t.jS(c.2N())}q 1a="",5B="";$.1u(4t,$.M(B(i,s){if(s.Q=="3h"){q $s=$(s);q 7e=$s.6q();7e.1b("2r","ol").1w();if(c.C.1N===E){1a+=c.3Z($("<p>").1h(7e.1Y()))}I{q fH=7e.o().G(/<br\\s?\\/?>$/i,"");1a+=fH+"<br>"}if(i==0){$s.2z("U-5B").6z();5B=c.3Z($s)}I{$s.1w()}}},c));o=c.$K.o().G(5B,"</"+5x+">"+1a+"<"+5x+">");c.$K.o(o);c.$K.1b(5x+":6z").1w()}I{q fh=$(c.2E()).2g("1g");if(c.1C("3t")&&!c.8L()&&c.C.1N){q 3G=c.bx("12");q 9w=$(3G).o();q 7i=$("<2r>");if(1P=="8q"){7i=$("<ol>")}q 8o=$("<li>");if($.2b(9w)==""){8o.1h(9w+\'<V id="1I-1L-1">\'+c.C.2i+"</V>");7i.1h(8o);c.$K.1b("#1I-1L-1").2e(7i)}I{8o.1h(9w);7i.1h(8o);$(3G).2e(7i)}}I{c.X.26(1P)}q L=c.2E();q $3a=$(L).2g("ol, 2r");if(c.C.1N===E){q 9o=$.2b($3a.Y());if(9o==""){$3a.4c("li").1b("br").1w();$3a.4c("li").1h(\'<V id="1I-1L-1">\'+c.C.2i+"</V>")}}if(fh.1V()!=0){$3a.kQ("<1g>")}if($3a.1m){q $7n=$3a.L();if(c.4j($7n)&&$7n[0].Q!="3h"&&c.7v($7n[0])){$7n.2e($7n.1Y())}}if(c.1C("31")){c.$K.2h()}}c.1W();c.$K.1b("#1I-1L-1").2B("id");c.1j();c.1c("26",1P,2F);F},cx:B(){c.d4("6m")},cy:B(){c.d4("7m")},d4:B(1P){c.21();if(1P==="6m"){q 1l=c.2N();c.28();if(1l&&1l.Q=="3h"){q L=c.2E();q $3a=$(L).2g("ol, 2r");q 5x=$3a[0].Q;q 4t=c.3I();$.1u(4t,B(i,s){if(s.Q=="3h"){q $4M=$(s).4M();if($4M.1V()!=0&&$4M[0].Q=="3h"){q $dF=$4M.4c("2r, ol");if($dF.1V()==0){$4M.1h($("<"+5x+">").1h(s))}I{$dF.1h(s)}}}})}I{if(1l===E&&c.C.1N===N){c.2o("6o","2f");q 7j=c.2N();q 1l=$(\'<12 1a-81="">\').o($(7j).o());$(7j).2e(1l);q 1s=c.9M($(1l).1f("2H-1s"))+c.C.9q;$(1l).1f("2H-1s",1s+"px")}I{q 79=c.3I();$.1u(79,$.M(B(i,1z){q $el=E;if(1z.Q==="6h"){F}if($.4O(1z.Q,c.C.5t)!==-1){$el=$(1z)}I{$el=$(1z).2g(c.C.5t.43().3N(),c.$K[0])}q 1s=c.9M($el.1f("2H-1s"))+c.C.9q;$el.1f("2H-1s",1s+"px")},c))}}c.1W()}I{c.28();q 1l=c.2N();if(1l&&1l.Q=="3h"){q 4t=c.3I();q 2K=0;c.dG(1l,2K,4t)}I{q 79=c.3I();$.1u(79,$.M(B(i,1z){q $el=E;if($.4O(1z.Q,c.C.5t)!==-1){$el=$(1z)}I{$el=$(1z).2g(c.C.5t.43().3N(),c.$K[0])}q 1s=c.9M($el.1f("2H-1s"))-c.C.9q;if(1s<=0){if(c.C.1N===N&&1E($el.1a("81"))!=="1J"){$el.2e($el.o()+"<br>")}I{$el.1f("2H-1s","");c.4H($el,"1o")}}I{$el.1f("2H-1s",1s+"px")}},c))}c.1W()}c.1j()},dG:B(li,2K,4t){if(li&&li.Q=="3h"){q $L=$(li).L().L();if($L.1V()!=0&&$L[0].Q=="3h"){$L.2I(li)}I{if(1E 4t[2K]!="1J"){li=4t[2K];2K++;c.dG(li,2K,4t)}I{c.26("8k")}}}},dI:B(){c.8l("","rg")},dD:B(){c.8l("4Z","rA")},dy:B(){c.8l("6O","rz")},dA:B(){c.8l("dB","rB")},8l:B(1G,1P){c.21();if(c.cw()){c.X.26(1P,E,E);F N}c.28();q 1l=c.2N();if(!1l&&c.C.1N){c.2o("d8","12");q 7j=c.2N();q 1l=$(\'<12 1a-81="">\').o($(7j).o());$(7j).2e(1l);$(1l).1f("Y-57",1G);c.4H(1l,"1o");if(1G==""&&1E($(1l).1a("81"))!=="1J"){$(1l).2e($(1l).o())}}I{q 79=c.3I();$.1u(79,$.M(B(i,1z){q $el=E;if($.4O(1z.Q,c.C.5t)!==-1){$el=$(1z)}I{$el=$(1z).2g(c.C.5t.43().3N(),c.$K[0])}if($el){$el.1f("Y-57",1G);c.4H($el,"1o")}},c))}c.1W();c.1j()},dJ:B(o){q ph=c.gl(o);if(ph!==E){F ph}if(c.C.1N===E){if(o===""){o=c.C.58}I{if(o.4G(/^<hr\\s?\\/?>$/gi)!==-1){o="<hr>"+c.C.58}}}F o},dK:B(o){if(c.C.9a&&!c.C.rD){o=o.G(/<12(.*?)>([\\w\\W]*?)<\\/12>/gi,"<p$1>$2</p>")}if(c.C.5Y){o=c.9z(o)}F o},dR:B(o){if(c.C.dS){o=o.G(/\\{\\{(.*?)\\}\\}/gi,"<!-- 9r ge $1 -->");o=o.G(/\\{(.*?)\\}/gi,"<!-- 9r $1 -->")}o=o.G(/<3n(.*?)>([\\w\\W]*?)<\\/3n>/gi,\'<1e 1G="Y/ab" 1o="3f: 3r;" 1x="U-3n-1d"$1>$2</1e>\');o=o.G(/<1o(.*?)>([\\w\\W]*?)<\\/1o>/gi,\'<2l$1 1o="3f: 3r;" 4m="U-1o-1d">$2</2l>\');o=o.G(/<2t(.*?)>([\\w\\W]*?)<\\/2t>/gi,\'<2l$1 4m="U-2t-1d">$2</2l>\');if(c.C.8x){o=o.G(/<\\?4I([\\w\\W]*?)\\?>/gi,\'<2l 1o="3f: 3r;" 4m="U-4I-1d">$1</2l>\')}I{o=o.G(/<\\?4I([\\w\\W]*?)\\?>/gi,"")}F o},fL:B(o){if(c.C.dS){o=o.G(/<!-- 9r ge (.*?) -->/gi,"{{$1}}");o=o.G(/<!-- 9r (.*?) -->/gi,"{$1}")}o=o.G(/<1e 1G="Y\\/ab" 1o="3f: 3r;" 1x="U-3n-1d"(.*?)>([\\w\\W]*?)<\\/1e>/gi,\'<3n$1 1G="Y/ab">$2<\\/3n>\');o=o.G(/<2l(.*?) 1o="3f: 3r;" 4m="U-1o-1d">([\\w\\W]*?)<\\/2l>/gi,"<1o$1>$2</1o>");o=o.G(/<2l(.*?)4m="U-2t-1d"(.*?)>([\\w\\W]*?)<\\/2l>/gi,"<2t$1$2>$3</2t>");if(c.C.8x){o=o.G(/<2l 1o="3f: 3r;" 4m="U-4I-1d">([\\w\\W]*?)<\\/2l>/gi,"<?4I\\r\\n$1\\r\\n?>")}F o},6Z:B(o,3E){if(3E!==E){q 3E=[];q 2x=o.1U(/<(2q|1o|3n|1e)(.*?)>([\\w\\W]*?)<\\/(2q|1o|3n|1e)>/gi);if(2x===2G){2x=[]}if(c.C.8x){q 6X=o.1U(/<\\?4I([\\w\\W]*?)\\?>/gi);if(6X){2x=$.dP(2x,6X)}}if(2x){$.1u(2x,B(i,s){o=o.G(s,"gr"+i);3E.3d(s)})}}o=o.G(/\\n/g," ");o=o.G(/[\\t]*/g,"");o=o.G(/\\n\\s*\\n/g,"\\n");o=o.G(/^[\\s\\n]*/g," ");o=o.G(/[\\s\\n]*$/g," ");o=o.G(/>\\s{2,}</g,"> <");o=c.gj(o,3E);o=o.G(/\\n\\n/g,"\\n");F o},gj:B(o,3E){if(3E===E){F o}$.1u(3E,B(i,s){o=o.G("gr"+i,s)});F o},dq:B(o){o=o.G(/[\\7D-\\gs\\gB]/g,"");q dU=["<b>\\\\s*</b>","<b>&3u;</b>","<em>\\\\s*</em>"];q 70=["<2q></2q>","<2f>\\\\s*</2f>","<dd></dd>","<dt></dt>","<2r></2r>","<ol></ol>","<li></li>","<1n></1n>","<3j></3j>","<V>\\\\s*<V>","<V>&3u;<V>","<p>\\\\s*</p>","<p></p>","<p>&3u;</p>","<p>\\\\s*<br>\\\\s*</p>","<12>\\\\s*</12>","<12>\\\\s*<br>\\\\s*</12>"];if(c.C.a1){70=70.rd(dU)}I{70=dU}q 4P=70.1m;3z(q i=0;i<4P;++i){o=o.G(2c 2J(70[i],"gi"),"")}F o},9z:B(o){o=$.2b(o);if(c.C.1N===N){F o}if(o===""||o==="<p></p>"){F c.C.58}o=o+"\\n";if(c.C.a1===E){F o}q dx=[];q 2x=o.1U(/<(1n|12|2q|3M)(.*?)>([\\w\\W]*?)<\\/(1n|12|2q|3M)>/gi);if(!2x){2x=[]}q dQ=o.1U(/<!--([\\w\\W]*?)-->/gi);if(dQ){2x=$.dP(2x,dQ)}if(c.C.8x){q 6X=o.1U(/<2l(.*?)4m="U-4I-1d">([\\w\\W]*?)<\\/2l>/gi);if(6X){2x=$.dP(2x,6X)}}if(2x){$.1u(2x,B(i,s){dx[i]=s;o=o.G(s,"{G"+i+"}\\n")})}o=o.G(/<br \\/>\\s*<br \\/>/gi,"\\n\\n");o=o.G(/<br><br>/gi,"\\n\\n");B R(4p,gu,r){F o.G(2c 2J(4p,gu),r)}q 3D="(rh|o|2v|9U|1e|4w|1o|3n|1r|1Q|1n|3T|di|ra|r6|r5|8c|3j|1g|dN|12|dl|dd|dt|2r|ol|li|2q|3s|4b|2t|gc|fU|2f|dm|r7|1o|p|h[1-6]|hr|fV|nE|2l|jk|jj|r8|aS|49|r9|ri|rj|rs|rt|ru)";o=R("(<"+3D+"[^>]*>)","gi","\\n$1");o=R("(</"+3D+">)","gi","$1\\n\\n");o=R("\\r\\n","g","\\n");o=R("\\r","g","\\n");o=R("/\\n\\n+/","g","\\n\\n");q 4A=o.4o(2c 2J("\\ns*\\n","g"),-1);o="";3z(q i in 4A){if(4A.rq(i)){if(4A[i].4G("{G")==-1){4A[i]=4A[i].G(/<p>\\n\\t?<\\/p>/gi,"");4A[i]=4A[i].G(/<p><\\/p>/gi,"");if(4A[i]!=""){o+="<p>"+4A[i].G(/^\\n+|\\n+$/g,"")+"</p>"}}I{o+=4A[i]}}}o=R("<p><p>","gi","<p>");o=R("</p></p>","gi","</p>");o=R("<p>s?</p>","gi","");o=R("<p>([^<]+)</(12|dm|2t)>","gi","<p>$1</p></$2>");o=R("<p>(</?"+3D+"[^>]*>)</p>","gi","$1");o=R("<p>(<li.+?)</p>","gi","$1");o=R("<p>s?(</?"+3D+"[^>]*>)","gi","$1");o=R("(</?"+3D+"[^>]*>)s?</p>","gi","$1");o=R("(</?"+3D+"[^>]*>)s?<br />","gi","$1");o=R("<br />(s*</?(?:p|li|12|dl|dd|dt|dN|2q|1g|2r|ol)[^>]*>)","gi","$1");o=R("\\n</p>","gi","</p>");o=R("<li><p>","gi","<li>");o=R("</p></li>","gi","</li>");o=R("</li><p>","gi","</li>");o=R("<p>\\t?\\n?<p>","gi","<p>");o=R("</dt><p>","gi","</dt>");o=R("</dd><p>","gi","</dd>");o=R("<br></p></2f>","gi","</2f>");o=R("<p>\\t*</p>","gi","");$.1u(dx,B(i,s){o=o.G("{G"+i+"}",s)});F $.2b(o)},9S:B(o,6V){q 6r="3V";if(c.C.6r==="b"){6r="b"}q 6p="em";if(c.C.6p==="i"){6p="i"}o=o.G(/<V 1o="2A-1o: 3q;">([\\w\\W]*?)<\\/V>/gi,"<"+6p+">$1</"+6p+">");o=o.G(/<V 1o="2A-7o: 3m;">([\\w\\W]*?)<\\/V>/gi,"<"+6r+">$1</"+6r+">");if(c.C.6r==="3V"){o=o.G(/<b>([\\w\\W]*?)<\\/b>/gi,"<3V>$1</3V>")}I{o=o.G(/<3V>([\\w\\W]*?)<\\/3V>/gi,"<b>$1</b>")}if(c.C.6p==="em"){o=o.G(/<i>([\\w\\W]*?)<\\/i>/gi,"<em>$1</em>")}I{o=o.G(/<em>([\\w\\W]*?)<\\/em>/gi,"<i>$1</i>")}o=o.G(/<V 1o="Y-bZ: 4K;">([\\w\\W]*?)<\\/V>/gi,"<u>$1</u>");if(6V!==N){o=o.G(/<5F>([\\w\\W]*?)<\\/5F>/gi,"<56>$1</56>")}I{o=o.G(/<56>([\\w\\W]*?)<\\/56>/gi,"<5F>$1</5F>")}F o},8d:B(o){if(o==""||1E o=="1J"){F o}q 9T=E;if(c.C.5G!==E){9T=N}q 2Q=9T===N?c.C.5G:c.C.8y;q g8=/<\\/?([a-z][a-eL-9]*)\\b[^>]*>/gi;o=o.G(g8,B($0,$1){if(9T===N){F $.4O($1.3N(),2Q)>"-1"?$0:""}I{F $.4O($1.3N(),2Q)>"-1"?"":$0}});o=c.9S(o);F o},de:B(o,ga){q 2q=o.1U(/<(2q|2k)(.*?)>([\\w\\W]*?)<\\/(2q|2k)>/gi);if(2q!==2G){$.1u(2q,$.M(B(i,s){q 2Q=s.1U(/<(2q|2k)(.*?)>([\\w\\W]*?)<\\/(2q|2k)>/i);2Q[3]=2Q[3].G(/&3u;/g," ");if(ga!==E){2Q[3]=c.ce(2Q[3])}2Q[3]=2Q[3].G(/\\$/g,"&#36;");o=o.G(s,"<"+2Q[1]+2Q[2]+">"+2Q[3]+"</"+2Q[1]+">")},c))}F o},ce:B(4p){4p=51(4p).G(/&9h;/g,"&").G(/&lt;/g,"<").G(/&gt;/g,">").G(/&g6;/g,\'"\');F 4p.G(/&/g,"&9h;").G(/</g,"&lt;").G(/>/g,"&gt;").G(/"/g,"&g6;")},g5:B(){q $1z=c.$K.1b("li, 1B, a, b, 3V, q8, ov, i, em, u, ou, 5F, 56, V, ot");$1z.g2(\'[1o*="8t-6s: g3;"][1o*="9I-22"]\').1f("8t-6s","").1f("9I-22","");$1z.g2(\'[1o*="8t-6s: g3;"]\').1f("8t-6s","");$1z.1f("9I-22","");$.1u($1z,$.M(B(i,s){c.4H(s,"1o")},c));q $cg=c.$K.1b("b, 3V, i, em, u, 5F, 56");$cg.1f("2A-1V","");$.1u($cg,$.M(B(i,s){c.4H(s,"1o")},c));c.$K.1b(\'12[1o="Y-57: -4s-4l;"]\').1Y().l7();c.$K.1b("2r, ol, li").2B("1o")},l5:B(2k){q i=0,9C=2k.1m,3i=0,2y=2G,3l=2G,1d="",1Z="",4N="";c.8v=0;3z(;i<9C;i++){3i=i;if(-1==2k.4R(i).44("<")){1Z+=2k.4R(i);F c.dg(1Z)}3w(3i<9C&&2k.5C(3i)!="<"){3i++}if(i!=3i){4N=2k.4R(i,3i-i);if(!4N.1U(/^\\s{2,}$/g)){if("\\n"==1Z.5C(1Z.1m-1)){1Z+=c.72()}I{if("\\n"==4N.5C(0)){1Z+="\\n"+c.72();4N=4N.G(/^\\s+/,"")}}1Z+=4N}if(4N.1U(/\\n/)){1Z+="\\n"+c.72()}}2y=3i;3w(3i<9C&&">"!=2k.5C(3i)){3i++}1d=2k.4R(2y,3i-2y);i=3i;q t;if("!--"==1d.4R(1,3)){if(!1d.1U(/--$/)){3w("-->"!=2k.4R(3i,3)){3i++}3i+=2;1d=2k.4R(2y,3i-2y);i=3i}if("\\n"!=1Z.5C(1Z.1m-1)){1Z+="\\n"}1Z+=c.72();1Z+=1d+">\\n"}I{if("!"==1d[1]){1Z=c.9L(1d+">",1Z)}I{if("?"==1d[1]){1Z+=1d+">\\n"}I{if(t=1d.1U(/^<(3n|1o|2q)/i)){t[1]=t[1].3N();1d=c.dc(1d);1Z=c.9L(1d,1Z);3l=51(2k.4R(i+1)).3N().44("</"+t[1]);if(3l){4N=2k.4R(i+1,3l);i+=3l;1Z+=4N}}I{1d=c.dc(1d);1Z=c.9L(1d,1Z)}}}}}F c.dg(1Z)},72:B(){q s="";3z(q j=0;j<c.8v;j++){s+="\\t"}F s},dg:B(2k){2k=2k.G(/\\n\\s*\\n/g,"\\n");2k=2k.G(/^[\\s\\n]*/,"");2k=2k.G(/[\\s\\n]*$/,"");2k=2k.G(/<3n(.*?)>\\n<\\/3n>/gi,"<3n$1><\\/3n>");c.8v=0;F 2k},dc:B(1d){q 8w="";1d=1d.G(/\\n/g," ");1d=1d.G(/\\s{2,}/g," ");1d=1d.G(/^\\s+|\\s+$/g," ");q db="";if(1d.1U(/\\/$/)){db="/";1d=1d.G(/\\/+$/,"")}q m;3w(m=/\\s*([^= ]+)(?:=(([\'"\']).*?\\3|[^ ]+))?/.2o(1d)){if(m[2]){8w+=m[1].3N()+"="+m[2]}I{if(m[1]){8w+=m[1].3N()}}8w+=" ";1d=1d.4R(m[0].1m)}F 8w.G(/\\s*$/,"")+db+">"},9L:B(1d,1Z){q nl=1d.1U(c.d7);if(1d.1U(c.kT)||nl){1Z=1Z.G(/\\s*$/,"");1Z+="\\n"}if(nl&&"/"==1d.5C(1)){c.8v--}if("\\n"==1Z.5C(1Z.1m-1)){1Z+=c.72()}if(nl&&"/"!=1d.5C(1)){c.8v++}1Z+=1d;if(1d.1U(c.kN)||1d.1U(c.d7)){1Z=1Z.G(/ *$/,"");1Z+="\\n"}F 1Z},kP:B(e){q o=$.2b(c.$K.o());if(c.C.1N){if(o==""){e.2u();c.$K.o("");c.2h()}}I{o=o.G(/<br\\s?\\/?>/i,"");q 78=o.G(/<p>\\s?<\\/p>/gi,"");if(o===""||78===""){e.2u();q J=$(c.C.58).2R(0);c.$K.o(J);c.2h()}}c.1j()},5I:B(1d){if(c.1C("31")&&c.7h()){c.$K.2h()}c.21();q 1X=c.3I();c.28();$.1u(1X,$.M(B(i,J){if(J.Q!=="3h"){q L=$(J).L();if(1d==="p"){if((J.Q==="P"&&L.1V()!=0&&L[0].Q==="3F")||J.Q==="3F"){c.d9();F}I{if(c.C.1N){if(J&&J.Q.4G(/H[1-6]/)==0){$(J).2e(J.3Q+"<br>")}I{F}}I{c.6o(1d,J)}}}I{c.6o(1d,J)}}},c));c.1W();c.1j()},6o:B(1d,1l){if(1l===E){1l=c.2N()}if(1l===E&&c.C.1N===N){c.26("d8",1d);F N}q 1Y="";if(1d!=="2q"){1Y=$(1l).1Y()}I{1Y=$(1l).o();if($.2b(1Y)===""){1Y=\'<V id="1I-1L-1"></V>\'}}if(1l.Q==="6i"){1d="p"}if(c.C.1N===N&&1d==="p"){$(1l).2e($("<12>").1h(1Y).o()+"<br>")}I{q L=c.2E();q J=$("<"+1d+">").1h(1Y);$(1l).2e(J);if(L&&L.Q=="6h"){$(J).kQ("<1g>")}}},kf:B(kK,kO,7N){if(7N!==E){c.28()}q 8S=$("<"+kO+"/>");$(kK).2e(B(){F 8S.1h($(c).1Y())});if(7N!==E){c.1W()}F 8S},d9:B(){if(c.1C("31")&&c.7h()){c.$K.2h()}c.21();if(c.C.1N===E){c.28();q 3D=c.3I();q 2f=E;q kM=3D.1m;if(3D){q 1a="";q 5B="";q G=E;q da=N;$.1u(3D,B(i,s){if(s.Q!=="P"){da=E}});$.1u(3D,$.M(B(i,s){if(s.Q==="3F"){c.6o("p",s,E)}I{if(s.Q==="P"){2f=$(s).L();if(2f[0].Q=="3F"){q 6G=$(2f).4c("p").1V();if(6G==1){$(2f).2e(s)}I{if(6G==kM){G="2f";1a+=c.3Z(s)}I{G="o";1a+=c.3Z(s);if(i==0){$(s).2z("U-5B").6z();5B=c.3Z(s)}I{$(s).1w()}}}}I{if(da===E||3D.1m==1){c.6o("2f",s,E)}I{G="kS";1a+=c.3Z(s)}}}I{if(s.Q!=="3h"){c.6o("2f",s,E)}}}},c));if(G){if(G=="kS"){$(3D[0]).2e("<2f>"+1a+"</2f>");$(3D).1w()}I{if(G=="2f"){$(2f).2e(1a)}I{if(G=="o"){q o=c.$K.o().G(5B,"</2f>"+1a+"<2f>");c.$K.o(o);c.$K.1b("2f").1u(B(){if($.2b($(c).o())==""){$(c).1w()}})}}}}}c.1W()}I{q 1l=c.2N();if(1l.Q==="3F"){c.28();q o=$.2b($(1l).o());q 1I=$.2b(c.jP());o=o.G(/<V(.*?)id="1I-1L(.*?)<\\/V>/gi,"");if(o==1I){$(1l).2e($(1l).o()+"<br>")}I{c.l6("2L");q 2L=c.$K.1b("2L");2L.6z();q kW=c.$K.o().G("<2L></2L>",\'</2f><V id="1I-1L-1">\'+c.C.2i+"</V>"+1I+"<2f>");c.$K.o(kW);2L.1w();c.$K.1b("2f").1u(B(){if($.2b($(c).o())==""){$(c).1w()}})}c.1W();c.$K.1b("V#1I-1L-1").1i("id",E)}I{q 3G=c.bx("2f");q o=$(3G).o();q kV=["2r","ol","1n","3j","8c","3T","di","dl"];$.1u(kV,B(i,s){o=o.G(2c 2J("<"+s+"(.*?)>","gi"),"");o=o.G(2c 2J("</"+s+">","gi"),"")});q 7p=c.C.bg;$.1u(7p,B(i,s){o=o.G(2c 2J("<"+s+"(.*?)>","gi"),"");o=o.G(2c 2J("</"+s+">","gi"),"<br>")});$(3G).o(o);c.by(3G);q 4f=$(3G).4f();if(4f.1V()!=0&&4f[0].Q==="bC"){4f.1w()}}}c.1j()},oi:B(1i,2s){q 1X=c.3I();$(1X).2B(1i);c.1j()},oh:B(1i,2s){q 1X=c.3I();$(1X).1i(1i,2s);c.1j()},ok:B(5A){q 1X=c.3I();$(1X).1f(5A,"");c.4H(1X,"1o");c.1j()},om:B(5A,2s){q 1X=c.3I();$(1X).1f(5A,2s);c.1j()},oq:B(2S){q 1X=c.3I();$(1X).3c(2S);c.4H(1X,"1x");c.1j()},op:B(2S){q 1X=c.3I();$(1X).2z(2S);c.1j()},oo:B(2S){c.28();c.dr(B(J){$(J).3c(2S);c.4H(J,"1x")});c.1W();c.1j()},q9:B(2S){q 1t=c.3P();if(!$(1t).3v(2S)){c.93("2z",2S)}},oA:B(5A){c.28();c.dr(B(J){$(J).1f(5A,"");c.4H(J,"1o")});c.1W();c.1j()},oB:B(5A,2s){c.93("1f",5A,2s)},oN:B(1i){c.28();q O=c.3o(),J=c.8g(),1X=c.7r();if(O.4F||O.6D===O.8h&&J){1X=$(J)}$(1X).2B(1i);c.ld();c.1W();c.1j()},oM:B(1i,2s){c.93("1i",1i,2s)},93:B(1G,1i,2s){c.21();c.28();q O=c.3o();q el=c.8g();if((O.4F||O.6D===O.8h)&&el&&!c.7v(el)){$(el)[1G](1i,2s)}I{q 1P,dj=2s;kA(1i){5u"2A-1V":1P="8s";dj=4;5f;5u"2A-oP":1P="oQ";5f;5u"6s":1P="oS";5f;5u"8t-6s":1P="oL";5f}c.X.26(1P,E,dj);q aU=c.$K.1b("2A");$.1u(aU,$.M(B(i,s){c.kD(1G,s,1i,2s)},c))}c.1W();c.1j()},kD:B(1G,s,1i,2s){q L=$(s).L(),el;q 9x=c.aB();q 9k=$(L).Y();q 8Z=9x==9k;if(8Z&&L&&L[0].Q==="ds"&&L[0].oK.1m!=0){el=L;$(s).2e($(s).o())}I{el=$("<3W>").1h($(s).1Y());$(s).2e(el)}$(el)[1G](1i,2s);F el},dr:B(1c){q O=c.3o(),J=c.8g(),1X=c.7r(),4F;if(O.4F||O.6D===O.8h&&J){1X=$(J);4F=N}$.1u(1X,$.M(B(i,J){if(!4F&&J.Q!=="ds"){q 9x=c.aB();q 9k=$(J).L().Y();q 8Z=9x==9k;if(8Z&&J.4L.Q==="ds"&&!$(J.4L).3v("4d")){J=J.4L}I{F}}1c.5q(c,J)},c))},ld:B(){q $b4=c.$K.1b("3W");$.1u($b4,$.M(B(i,V){q $V=$(V);if($V.1i("1x")===1J&&$V.1i("1o")===1J){$V.1Y().l7()}},c))},l6:B(1d){c.28();c.X.26("8s",E,4);q aU=c.$K.1b("2A");q 2W;$.1u(aU,B(i,s){q el=$("<"+1d+"/>").1h($(s).1Y());$(s).2e(el);2W=el});c.1W();c.1j()},oE:B(1d){c.28();q dv=1d.oD();q 1X=c.7r();q L=$(c.2E()).L();$.1u(1X,B(i,s){if(s.Q===dv){c.bk(s)}});if(L&&L[0].Q===dv){c.bk(L)}c.1W();c.1j()},bk:B(el){$(el).2e($(el).1Y())},9i:B(o,1j){q 1t=c.3P();q L=1t.4L;c.4i();c.21();q $o=$("<12>").1h($.dn(o));o=$o.o();o=c.dq(o);$o=$("<12>").1h($.dn(o));q dp=c.2N();if($o.1Y().1m==1){q bf=$o.1Y()[0].Q;if(bf!="P"&&bf==dp.Q||bf=="6i"){$o=$("<12>").1h(o)}}if(c.C.1N){o=o.G(/<p(.*?)>([\\w\\W]*?)<\\/p>/gi,"$2<br>")}if(!c.C.1N&&$o.1Y().1m==1&&$o.1Y()[0].4D==3&&(c.cc().1m>2||(!1t||1t.Q=="ee"&&!L||L.Q=="kZ"))){o="<p>"+o+"</p>"}o=c.ad(o);if($o.1Y().1m>1&&dp||$o.1Y().is("p, :aS, 2r, ol, li, 12, 1n, 1g, 2f, 2q, dm, 2l, aS, 49, jj, jk")){if(c.1C("3t")){if(!c.8L()){c.X.1I.5i().do(o)}I{c.aL(o)}}I{c.X.26("5c",E,o)}}I{c.9O(o,E)}if(c.5R){c.42.2V($.M(B(){if(!c.C.1N){c.7G(c.$K.1Y().2W())}I{c.cb()}},c),1)}c.7H();c.8u();if(1j!==E){c.1j()}},9O:B(o,1j){o=c.ad(o);q 1q=c.29();if(1q.48&&1q.4V){q O=1q.48(0);O.aC();q el=X.4C("12");el.3Q=o;q 4k=X.cD(),J,5v;3w((J=el.8G)){5v=4k.7g(J)}O.3B(4k);if(5v){O=O.ag();O.ae(5v);O.5h(N);1q.4X();1q.5g(O)}}if(1j!==E){c.1j()}},oC:B(o){o=c.ad(o);q J=$(o);q 6c=X.4C("V");6c.3Q="\\7D";q O=c.3o();O.3B(6c);O.3B(J[0]);O.5h(E);q 1q=c.29();1q.4X();1q.5g(O);c.1j()},oF:B(o){q $o=$($.dn(o));if($o.1m){o=$o.Y()}c.4i();if(c.1C("3t")){if(!c.8L()){c.X.1I.5i().do(o)}I{c.aL(o)}}I{c.X.26("5c",E,o)}c.1j()},3B:B(J){J=J[0]||J;if(J.Q=="jo"){q 76="3W";q aD=J.jb;q 5y=2c 2J("<"+J.Q,"i");q 5K=aD.G(5y,"<"+76);5y=2c 2J("</"+J.Q,"i");5K=5K.G(5y,"</"+76);J=$(5K)[0]}q 1q=c.29();if(1q.48&&1q.4V){O=1q.48(0);O.aC();O.3B(J);O.oG(J);O.ae(J);1q.4X();1q.5g(O)}F J},js:B(e,J){q O;q x=e.jl,y=e.jm;if(c.X.ju){q 3X=c.X.ju(x,y);O=c.3o();O.86(3X.oJ,3X.2Y);O.5h(N);O.3B(J)}I{if(c.X.jv){O=c.X.jv(x,y);O.3B(J)}I{if(1E X.2v.jw!="1J"){O=c.X.2v.jw();O.jx(x,y);q bq=O.oI();bq.jx(x,y);O.oH("og",bq);O.3s()}}}},6U:B(2j,L){if(1E(L)!="1J"){2j=L}if(c.ck()){if(c.C.1N){q 1Y=$("<12>").1h($.2b(c.$K.o())).1Y();q 2W=1Y.2W()[0];if(2W.Q=="jo"&&2W.3Q==""){2W=1Y.4M()[0]}if(c.3Z(2W)!=c.3Z(2j)){F E}}I{if(c.$K.1Y().2W()[0]!==2j){F E}}c.bt(2j)}},bt:B(2j){c.21();if(c.C.1N===E){q J=$(c.C.58);$(2j).2I(J);c.4g(J)}I{q J=$(\'<V id="1I-1L-1">\'+c.C.2i+"</V>",c.X)[0];$(2j).2I(J);$(J).2I(c.C.2i);c.1W();c.$K.1b("V#1I-1L-1").2B("id")}},al:B(jp){c.28();q br="<br>";if(jp==N){br="<br><br>"}if(c.1C("31")){q V=$("<V>").o(c.C.2i);c.$K.1b("#1I-1L-1").3S(br).3S(V).3S(c.C.2i);c.jF(V[0]);V.1w();c.8b()}I{q L=c.2E();if(L&&L.Q==="A"){q 2Y=c.ch(L);q Y=$.2b($(L).Y()).G(/\\n\\r\\n/g,"");q 4P=Y.1m;if(2Y==4P){c.8b();q J=$(\'<V id="1I-1L-1">\'+c.C.2i+"</V>",c.X)[0];$(L).2I(J);$(J).3S(br+(c.1C("4s")?c.C.2i:""));c.1W();F N}}c.$K.1b("#1I-1L-1").3S(br+(c.1C("4s")?c.C.2i:""));c.1W()}},of:B(){c.al(N)},jr:B(2j){q J=$("<br>"+c.C.2i);$(2j).2e(J);c.4g(J)},j8:B(o){o=c.1c("nR",E,o);if(c.1C("3t")){q 2L=$.2b(o);if(2L.4G(/^<a(.*?)>(.*?)<\\/a>$/i)==0){o=o.G(/^<a(.*?)>(.*?)<\\/a>$/i,"$2")}}if(c.C.j7){q 2L=c.X.4C("12");o=o.G(/<br>|<\\/H[1-6]>|<\\/p>|<\\/12>/gi,"\\n");2L.3Q=o;o=2L.9Q||2L.dh;o=$.2b(o);o=o.G("\\n","<br>");o=c.9z(o);c.8W(o);F E}q 95=E;if(c.74("6h")){95=N;q 7p=c.C.bg;7p.3d("3j");7p.3d("1n");$.1u(7p,B(i,s){o=o.G(2c 2J("<"+s+"(.*?)>","gi"),"");o=o.G(2c 2J("</"+s+">","gi"),"<br>")})}if(c.74("6i")){o=c.j6(o);c.8W(o);F N}o=o.G(/<1B(.*?)v:nQ=(.*?)>/gi,"");o=o.G(/<p(.*?)1x="nP"([\\w\\W]*?)<\\/p>/gi,"<2r><li$2</li>");o=o.G(/<p(.*?)1x="nS"([\\w\\W]*?)<\\/p>/gi,"<li$2</li>");o=o.G(/<p(.*?)1x="nT"([\\w\\W]*?)<\\/p>/gi,"<li$2</li></2r>");o=o.G(/<p(.*?)1x="nV"([\\w\\W]*?)<\\/p>/gi,"<2r><li$2</li></2r>");o=o.G(/·/g,"");o=o.G(/<!--[\\s\\S]*?-->|<\\?(?:4I)?[\\s\\S]*?\\?>/gi,"");if(c.C.iO===N){o=o.G(/(&3u;){2,}/gi,"&3u;");o=o.G(/&3u;/gi," ")}o=o.G(/<b\\nU="iN-1v-1L(.*?)">([\\w\\W]*?)<\\/b>/gi,"$2");o=o.G(/<b(.*?)id="nO-iN-nN(.*?)">([\\w\\W]*?)<\\/b>/gi,"$3");o=o.G(/<V[^>]*(2A-1o: 3q; 2A-7o: 3m|2A-7o: 3m; 2A-1o: 3q)[^>]*>/gi,\'<V 1o="2A-7o: 3m;"><V 1o="2A-1o: 3q;">\');o=o.G(/<V[^>]*2A-1o: 3q[^>]*>/gi,\'<V 1o="2A-1o: 3q;">\');o=o.G(/<V[^>]*2A-7o: 3m[^>]*>/gi,\'<V 1o="2A-7o: 3m;">\');o=o.G(/<V[^>]*Y-bZ: 4K[^>]*>/gi,\'<V 1o="Y-bZ: 4K;">\');o=o.G(/<1g>\\nF*<\\/1g>/gi,"[1g]");o=o.G(/<1g>&3u;<\\/1g>/gi,"[1g]");o=o.G(/<1g><br><\\/1g>/gi,"[1g]");o=o.G(/<1g(.*?)9W="(.*?)"(.*?)>([\\w\\W]*?)<\\/1g>/gi,\'[1g 9W="$2"]$4[/1g]\');o=o.G(/<1g(.*?)9X="(.*?)"(.*?)>([\\w\\W]*?)<\\/1g>/gi,\'[1g 9X="$2"]$4[/1g]\');o=o.G(/<a(.*?)1S="(.*?)"(.*?)>([\\w\\W]*?)<\\/a>/gi,\'[a 1S="$2"]$4[/a]\');o=o.G(/<1Q(.*?)>([\\w\\W]*?)<\\/1Q>/gi,"[1Q$1]$2[/1Q]");o=o.G(/<3y(.*?)>([\\w\\W]*?)<\\/3y>/gi,"[3y$1]$2[/3y]");o=o.G(/<5r(.*?)>([\\w\\W]*?)<\\/5r>/gi,"[5r$1]$2[/5r]");o=o.G(/<4S(.*?)>([\\w\\W]*?)<\\/4S>/gi,"[4S$1]$2[/4S]");o=o.G(/<3M(.*?)>([\\w\\W]*?)<\\/3M>/gi,"[3M$1]$2[/3M]");o=o.G(/<2F(.*?)>/gi,"[2F$1]");o=o.G(/<1B(.*?)>/gi,"[1B$1]");o=o.G(/ 1x="(.*?)"/gi,"");o=o.G(/<(\\w+)([\\w\\W]*?)>/gi,"<$1>");if(c.C.1N){o=o.G(/<3V><\\/3V>/gi,"");o=o.G(/<u><\\/u>/gi,"");if(c.C.bV){o=o.G(/<2A(.*?)>([\\w\\W]*?)<\\/2A>/gi,"$2")}o=o.G(/<[^\\/>][^>]*>(\\s*|\\t*|\\n*|&3u;|<br>)<\\/[^>]+>/gi,"<br>")}I{o=o.G(/<[^\\/>][^>]*>(\\s*|\\t*|\\n*|&3u;|<br>)<\\/[^>]+>/gi,"")}o=o.G(/<12>\\s*?\\t*?\\n*?(<2r>|<ol>|<p>)/gi,"$1");o=o.G(/\\[1g 9W="(.*?)"\\]([\\w\\W]*?)\\[\\/1g\\]/gi,\'<1g 9W="$1">$2</1g>\');o=o.G(/\\[1g 9X="(.*?)"\\]([\\w\\W]*?)\\[\\/1g\\]/gi,\'<1g 9X="$1">$2</1g>\');o=o.G(/\\[1g\\]/gi,"<1g>&3u;</1g>");o=o.G(/\\[a 1S="(.*?)"\\]([\\w\\W]*?)\\[\\/a\\]/gi,\'<a 1S="$1">$2</a>\');o=o.G(/\\[1Q(.*?)\\]([\\w\\W]*?)\\[\\/1Q\\]/gi,"<1Q$1>$2</1Q>");o=o.G(/\\[3y(.*?)\\]([\\w\\W]*?)\\[\\/3y\\]/gi,"<3y$1>$2</3y>");o=o.G(/\\[5r(.*?)\\]([\\w\\W]*?)\\[\\/5r\\]/gi,"<5r$1>$2</5r>");o=o.G(/\\[4S(.*?)\\]([\\w\\W]*?)\\[\\/4S\\]/gi,"<4S$1>$2</4S>");o=o.G(/\\[3M(.*?)\\]([\\w\\W]*?)\\[\\/3M\\]/gi,"<3M$1>$2</3M>");o=o.G(/\\[2F(.*?)\\]/gi,"<2F$1>");o=o.G(/\\[1B(.*?)\\]/gi,"<1B$1>");if(c.C.9a){o=o.G(/<12(.*?)>([\\w\\W]*?)<\\/12>/gi,"<p>$2</p>");o=o.G(/<\\/12><p>/gi,"<p>");o=o.G(/<\\/p><\\/12>/gi,"</p>");o=o.G(/<p><\\/p>/gi,"<br />")}I{o=o.G(/<12><\\/12>/gi,"<br />")}o=c.8d(o);if(c.74("3h")){o=o.G(/<p>([\\w\\W]*?)<\\/p>/gi,"$1<br>")}I{if(95===E){o=c.9z(o)}}o=o.G(/<V(.*?)>([\\w\\W]*?)<\\/V>/gi,"$2");o=o.G(/<1B>/gi,"");o=o.G(/<[^\\/>][^>][^1B|2F|1v|1g][^<]*>(\\s*|\\t*|\\n*| |<br>)<\\/[^>]+>/gi,"");o=o.G(/\\n{3,}/gi,"\\n");o=o.G(/<p><p>/gi,"<p>");o=o.G(/<\\/p><\\/p>/gi,"</p>");o=o.G(/<li>(\\s*|\\t*|\\n*)<p>/gi,"<li>");o=o.G(/<\\/p>(\\s*|\\t*|\\n*)<\\/li>/gi,"</li>");if(c.C.1N===N){o=o.G(/<p(.*?)>([\\w\\W]*?)<\\/p>/gi,"$2<br>")}o=o.G(/<[^\\/>][^>][^1B|2F|1v|1g][^<]*>(\\s*|\\t*|\\n*| |<br>)<\\/[^>]+>/gi,"");o=o.G(/<1B 3p="4s-nJ-1K\\:\\/\\/(.*?)"(.*?)>/gi,"");o=o.G(/<1g(.*?)>(\\s*|\\t*|\\n*)<p>([\\w\\W]*?)<\\/p>(\\s*|\\t*|\\n*)<\\/1g>/gi,"<1g$1>$3</1g>");if(c.C.9a){o=o.G(/<12(.*?)>([\\w\\W]*?)<\\/12>/gi,"$2");o=o.G(/<12(.*?)>([\\w\\W]*?)<\\/12>/gi,"$2")}c.c6=E;if(c.1C("31")){if(c.C.9p){q 2x=o.1U(/<1B 3p="1a:T(.*?)"(.*?)>/gi);if(2x!==2G){c.c6=2x;3z(k in 2x){q 1B=2x[k].G("<1B",\'<1B 1a-31-9v-T="\'+k+\'" \');o=o.G(2x[k],1B)}}}3w(/<br>$/gi.4e(o)){o=o.G(/<br>$/gi,"")}}o=o.G(/<p>•([\\w\\W]*?)<\\/p>/gi,"<li>$1</li>");if(c.1C("3t")){3w(/<2A>([\\w\\W]*?)<\\/2A>/gi.4e(o)){o=o.G(/<2A>([\\w\\W]*?)<\\/2A>/gi,"$1")}}if(95===E){o=o.G(/<1g(.*?)>([\\w\\W]*?)<p(.*?)>([\\w\\W]*?)<\\/1g>/gi,"<1g$1>$2$4</1g>");o=o.G(/<1g(.*?)>([\\w\\W]*?)<\\/p>([\\w\\W]*?)<\\/1g>/gi,"<1g$1>$2$3</1g>");o=o.G(/<1g(.*?)>([\\w\\W]*?)<p(.*?)>([\\w\\W]*?)<\\/1g>/gi,"<1g$1>$2$4</1g>");o=o.G(/<1g(.*?)>([\\w\\W]*?)<\\/p>([\\w\\W]*?)<\\/1g>/gi,"<1g$1>$2$3</1g>")}o=o.G(/\\n/g," ");o=o.G(/<p>\\n?<li>/gi,"<li>");c.8W(o)},j6:B(s){s=s.G(/<br>|<\\/H[1-6]>|<\\/p>|<\\/12>/gi,"\\n");q 2L=c.X.4C("12");2L.3Q=s;F c.ce(2L.9Q||2L.dh)},8W:B(o){o=c.1c("nM",E,o);if(c.5R){c.$K.o(o);c.bA();c.cb();c.1j()}I{c.9i(o)}c.5R=E;2V($.M(B(){c.8j=E;if(c.1C("31")){c.$K.1b("p:6z").1w()}if(c.c6!==E){c.j0()}},c),3O);if(c.C.4Y&&c.c7!==N){$(c.X.2v).3e(c.9t)}I{c.$K.3e(c.9t)}},c9:B(4v){if(c.C.3H!==E&&1E c.C.3H==="3M"){$.1u(c.C.3H,$.M(B(k,v){if(v!=2G&&v.43().44("#")===0){v=$(v).1p()}4v[k]=v},c))}F 4v},j0:B(){q jy=c.$K.1b("1B[1a-31-9v-T]");$.1u(jy,$.M(B(i,s){q $s=$(s);q 2Q=s.3p.4o(",");q 4v={c3:2Q[0].4o(";")[0].4o(":")[1],1a:2Q[1]};4v=c.c9(4v);$.7R(c.C.bT,4v,$.M(B(1a){q 1M=(1E 1a==="8I"?$.8J(1a):1a);$s.1i("3p",1M.6e);$s.2B("1a-31-9v-T");c.1j();c.1c("3Y",$s,1M)},c))},c))},jz:B(e){q 9l=e.1O.9l;q 2Q=9l.4o(",");q 4v={c3:2Q[0].4o(";")[0].4o(":")[1],1a:2Q[1]};if(c.C.9p){4v=c.c9(4v);$.7R(c.C.bT,4v,$.M(B(1a){q 1M=(1E 1a==="8I"?$.8J(1a):1a);q o=\'<1B 3p="\'+1M.6e+\'" id="kc-T-1L" />\';c.26("5c",o,E);q T=$(c.$K.1b("1B#kc-T-1L"));if(T.1m){T.2B("id")}I{T=E}c.1j();if(T){c.1c("3Y",T,1M)}},c))}I{c.9i(\'<1B 3p="\'+9l+\'" />\')}},21:B(28){if(28!==E){c.28()}c.C.3E.3d(c.$K.o());if(28!==E){c.8b("3E")}},k7:B(){if(c.C.3E.1m===0){c.4i();F}c.28();c.C.8A.3d(c.$K.o());c.1W(E,N);c.$K.o(c.C.3E.k2());c.1W();2V($.M(c.7H,c),3O)},k6:B(){if(c.C.8A.1m===0){c.4i();F E}c.28();c.C.3E.3d(c.$K.o());c.1W(E,N);c.$K.o(c.C.8A.k2());c.1W(N);2V($.M(c.7H,c),4)},7H:B(){c.4T();if(c.C.5m){c.5m()}},5m:B(){c.$K.1b("a").on("23",$.M(c.k4,c));c.$K.on("23.U",$.M(B(e){c.7E(e)},c));$(X).on("23.U",$.M(B(e){c.7E(e)},c))},4T:B(){if(c.C.4T===E){F E}c.$K.1b("1B").1u($.M(B(i,1z){if(c.1C("3t")){$(1z).1i("oa","on")}q L=$(1z).L();if(!L.3v("bS")&&!L.3v("bD")){c.kU(1z)}},c));c.$K.1b(".bD, .bS").on("23",$.M(c.o9,c))},k4:B(e){q $1r=$(e.1O);q L=$(e.1O).L();if(L.3v("bS")||L.3v("bD")){F}if($1r.1V()==0||$1r[0].Q!=="A"){F}q 3X=$1r.2Y();if(c.C.1Q){q bE=c.$2Z.2Y();3X.1T=bE.1T+(3X.1T-$(c.X).3e());3X.1s+=bE.1s}q 4E=$(\'<V 1x="U-1r-4E"></V>\');q 1S=$1r.1i("1S");if(1S===1J){1S=""}if(1S.1m>24){1S=1S.aQ(0,24)+"..."}q k5=$(\'<a 1S="\'+$1r.1i("1S")+\'" 1O="6y">\'+1S+"</a>").on("23",$.M(B(e){c.7E(E)},c));q kd=$(\'<a 1S="#">\'+c.C.1F.8p+"</a>").on("23",$.M(B(e){e.2u();c.9N();c.7E(E)},c));q ke=$(\'<a 1S="#">\'+c.C.1F.6F+"</a>").on("23",$.M(B(e){e.2u();c.26("6F");c.7E(E)},c));4E.1h(k5);4E.1h(" | ");4E.1h(kd);4E.1h(" | ");4E.1h(ke);4E.1f({1T:(3X.1T+20)+"px",1s:3X.1s+"px"});$(".U-1r-4E").1w();$("2v").1h(4E)},7E:B(e){if(e!==E&&e.1O.Q=="A"){F E}$(".U-1r-4E").1w()},29:B(){if(!c.C.41){F c.X.29()}I{if(!c.C.1Q){F 41.29()}I{F 41.29(c.$2Z[0])}}},3o:B(){if(!c.C.41){if(c.X.29){q 1q=c.29();if(1q.48&&1q.4V){F 1q.48(0)}}F c.X.5i()}I{if(!c.C.1Q){F 41.5i()}I{F 41.5i(c.bG())}}},by:B(J){c.jH(J)},4g:B(J){c.8e(J[0]||J,0,2G,0)},7G:B(J){c.8e(J[0]||J,1,2G,1)},8e:B(4Q,bB,87,b5){if(87==2G){87=4Q}if(b5==2G){b5=bB}q 1q=c.29();if(!1q){F}if(4Q.Q=="P"&&4Q.3Q==""){4Q.3Q=c.C.2i}if(4Q.Q=="bC"&&c.C.1N===E){q 5U=$(c.C.58)[0];$(4Q).2e(5U);4Q=5U;87=4Q}q O=c.3o();O.86(4Q,bB);O.85(87,b5);eG{1q.4X()}fe(e){}1q.5g(O)},bx:B(1d){1d=1d.3N();q 1l=c.2N();if(1l){q 3G=c.kf(1l,1d);c.1j();F 3G}q 1q=c.29();q O=1q.48(0);q 3G=X.4C(1d);3G.7g(O.oe());O.3B(3G);c.by(3G);F 3G},od:B(){q O=c.3o();O.aM(c.$K[0]);q 1q=c.29();1q.4X();1q.5g(O)},bA:B(){c.29().4X()},ch:B(2j){q bH=0;q O=c.3o();q ba=O.ag();ba.aM(2j);ba.85(O.8h,O.kj);bH=$.2b(ba.43()).1m;F bH},hR:B(){F 2c bI(c.29().48(0))},jH:B(el,2y,3l){if(1E 3l==="1J"){3l=2y}el=el[0]||el;q O=c.3o();O.aM(el);q 4B=c.bN(el);q aq=E;q 7J=0,7K;if(4B.1m==1&&2y){O.86(4B[0],2y);O.85(4B[0],3l)}I{3z(q i=0,88;88=4B[i++];){7K=7J+88.1m;if(!aq&&2y>=7J&&(2y<7K||(2y==7K&&i<4B.1m))){O.86(88,2y-7J);aq=N}if(aq&&3l<=7K){O.85(88,3l-7J);5f}7J=7K}}q 1q=c.29();1q.4X();1q.5g(O)},jF:B(J){c.$K.2h();J=J[0]||J;q O=c.X.5i();q 2y=1;q 3l=-1;O.86(J,2y);O.85(J,3l+2);q 1I=c.42.29();q bR=c.X.5i();q av=c.X.82("\\7D");$(J).2I(av);bR.ae(av);1I.4X();1I.5g(bR);$(av).1w()},bN:B(J){q 4B=[];if(J.4D==3){4B.3d(J)}I{q 4c=J.8F;3z(q i=0,4P=4c.1m;i<4P;++i){4B.3d.bO(4B,c.bN(4c[i]))}}F 4B},3P:B(){q el=E;q 1q=c.29();if(1q&&1q.4V>0){el=1q.48(0).6D}F c.4j(el)},2E:B(1z){1z=1z||c.3P();if(1z){F c.4j($(1z).L()[0])}I{F E}},2N:B(J){if(1E J==="1J"){J=c.3P()}3w(J){if(c.7v(J)){if($(J).3v("4d")){F E}F J}J=J.4L}F E},3I:B(1X){q 89=[];if(1E 1X=="1J"){q O=c.3o();if(O&&O.4F===N){F[c.2N()]}q 1X=c.7r(O)}$.1u(1X,$.M(B(i,J){if(c.C.1Q===E&&$(J).8B("12.4d").1V()==0){F E}if(c.7v(J)){89.3d(J)}},c));if(89.1m===0){89=[c.2N()]}F 89},o5:B(J){if(J.4D!=1){F E}F!c.ax.4e(J.jY)},7v:B(J){F J.4D==1&&c.ax.4e(J.jY)},bM:B(1d){F c.ax.4e(1d)},7r:B(O,1d){if(1E O=="1J"||O==E){q O=c.3o()}if(O&&O.4F===N){if(1E 1d==="1J"&&c.bM(1d)){q 1l=c.2N();if(1l.Q==1d){F[1l]}I{F[]}}I{F[c.3P()]}}q 1X=[],4x=[];q 1q=c.X.29();if(!1q.o4){1X=c.cc(1q.48(0))}$.1u(1X,$.M(B(i,J){if(c.C.1Q===E&&$(J).8B("12.4d").1V()==0){F E}if(1E 1d==="1J"){if($.2b(J.9Q)!=""){4x.3d(J)}}I{if(J.Q==1d){4x.3d(J)}}},c));if(4x.1m==0){if(1E 1d==="1J"&&c.bM(1d)){q 1l=c.2N();if(1l.Q==1d){F 4x.3d(1l)}I{F[]}}I{4x.3d(c.3P())}}q 2W=4x[4x.1m-1];if(c.7v(2W)){4x=4x.jR(0,-1)}F 4x},8g:B(J){if(!J){J=c.3P()}3w(J){if(J.4D==1){if($(J).3v("4d")){F E}F J}J=J.4L}F E},cc:B(O){O=O||c.3o();q J=O.6D;q eK=O.8h;if(J==eK){F[J]}q 9m=[];3w(J&&J!=eK){9m.3d(J=c.jQ(J))}J=O.6D;3w(J&&J!=O.o3){9m.jS(J);J=J.4L}F 9m},jQ:B(J){if(J.oT()){F J.8G}I{3w(J&&!J.jO){J=J.4L}if(!J){F 2G}F J.jO}},aB:B(){F c.29().43()},jP:B(){q o="";q 1q=c.29();if(1q.4V){q eF=c.X.4C("12");q 4P=1q.4V;3z(q i=0;i<4P;++i){eF.7g(1q.48(i).oU())}o=eF.3Q}F c.eE(o)},28:B(){if(!c.7h()){c.4i()}if(!c.C.41){c.jN(c.3o())}I{c.5S=41.pL()}},jN:B(O,1w){if(!O){F}q 5O=$(\'<V id="1I-1L-1" 1x="U-1I-1L">\'+c.C.2i+"</V>",c.X)[0];q 8f=$(\'<V id="1I-1L-2" 1x="U-1I-1L">\'+c.C.2i+"</V>",c.X)[0];if(O.4F===N){c.ai(O,5O,N)}I{c.ai(O,5O,N);c.ai(O,8f,E)}c.5S=c.$K.o();c.1W(E,E)},ai:B(O,J,1G){q ar=O.ag();eG{ar.5h(1G);ar.3B(J);ar.pJ()}fe(e){q o=c.C.58;if(c.C.1N){o="<br>"}c.$K.6d(o);c.2h()}},1W:B(G,1w){if(!c.C.41){if(G===N&&c.5S){c.$K.o(c.5S)}q 5O=c.$K.1b("V#1I-1L-1");q 8f=c.$K.1b("V#1I-1L-2");if(c.1C("31")){c.$K.2h()}I{if(!c.7h()){c.4i()}}if(5O.1m!=0&&8f.1m!=0){c.8e(5O[0],0,8f[0],0)}I{if(5O.1m!=0){c.8e(5O[0],0,2G,0)}}if(1w!==E){c.8b();c.5S=E}}I{41.pN(c.5S)}},8b:B(1G){if(!c.C.41){$.1u(c.$K.1b("V.U-1I-1L"),B(){q o=$.2b($(c).o().G(/[^\\pP-\\pO]/g,""));if(o==""){$(c).1w()}I{$(c).2B("1x").2B("id")}})}I{41.pI(c.5S)}},ko:B(){c.28();c.62(c.C.1F.1n,c.C.hf,pH,$.M(B(){$("#hv").23($.M(c.km,c));2V(B(){$("#eX").2h()},5k)},c))},km:B(){c.21(E);q aF=$("#eX").1p(),aJ=$("#hx").1p(),$e2=$("<12></12>"),ez=4u.kg(4u.kh()*k0),$1n=$(\'<1n id="1n\'+ez+\'"><8c></8c></1n>\'),i,$aZ,z,$b1;3z(i=0;i<aF;i++){$aZ=$("<3j></3j>");3z(z=0;z<aJ;z++){$b1=$("<1g>"+c.C.2i+"</1g>");if(i===0&&z===0){$b1.1h(\'<V id="1I-1L-1">\'+c.C.2i+"</V>")}$($aZ).1h($b1)}$1n.1h($aZ)}$e2.1h($1n);q o=$e2.o();if(c.C.1N===E&&c.1C("31")){o+="<p>"+c.C.2i+"</p>"}c.3g();c.1W();q 1t=c.2N()||c.3P();if(1t&&1t.Q!="ee"){if(1t.Q=="3h"){q 1t=$(1t).2g("2r, ol")}$(1t).2I(o)}I{c.9O(o,E)}c.1W();q 1n=c.$K.1b("#1n"+ez);c.8r();1n.1b("V#1I-1L-1, 3W#1I-1L-1").1w();1n.2B("id");c.1j()},ka:B(){q $1n=$(c.2E()).2g("1n");if(!c.4j($1n)){F E}if($1n.1V()==0){F E}c.21();$1n.1w();c.1j()},k8:B(){q L=c.2E();q $1n=$(L).2g("1n");if(!c.4j($1n)){F E}if($1n.1V()==0){F E}c.21();q $4z=$(L).2g("3j");q $eg=$4z.4M().1m?$4z.4M():$4z.4f();if($eg.1m){q $ek=$eg.4c("1g").j5();if($ek.1m){$ek.6d(\'<V id="1I-1L-1">\'+c.C.2i+"</V>")}}$4z.1w();c.1W();$1n.1b("V#1I-1L-1").1w();c.1j()},iY:B(){q L=c.2E();q $1n=$(L).2g("1n");if(!c.4j($1n)){F E}if($1n.1V()==0){F E}c.21();q $5Z=$(L).2g("1g");if(!($5Z.is("1g"))){$5Z=$5Z.2g("1g")}q 2K=$5Z.2R(0).pC;$1n.1b("3j").1u($.M(B(i,1z){q iX=2K-1<0?2K+1:2K-1;if(i===0){$(1z).1b("1g").eq(iX).6d(\'<V id="1I-1L-1">\'+c.C.2i+"</V>")}$(1z).1b("1g").eq(2K).1w()},c));c.1W();$1n.1b("V#1I-1L-1").1w();c.1j()},j2:B(){q $1n=$(c.2E()).2g("1n");if(!c.4j($1n)){F E}if($1n.1V()==0){F E}c.21();if($1n.1b("3T").1V()!==0){c.ey()}I{q 3j=$1n.1b("3j").j5().6q();3j.1b("1g").o(c.C.2i);$3T=$("<3T></3T>");$3T.1h(3j);$1n.6d($3T);c.1j()}},ey:B(){q $1n=$(c.2E()).2g("1n");if(!c.4j($1n)){F E}q $3T=$1n.1b("3T");if($3T.1V()==0){F E}c.21();$3T.1w();c.1j()},j3:B(){c.ew("3S")},iV:B(){c.ew("2I")},iM:B(){c.e3("3S")},iL:B(){c.e3("2I")},ew:B(1G){q $1n=$(c.2E()).2g("1n");if(!c.4j($1n)){F E}if($1n.1V()==0){F E}c.21();q $4z=$(c.2E()).2g("3j");q 9V=$4z.6q();9V.1b("1g").o(c.C.2i);if(1G==="2I"){$4z.2I(9V)}I{$4z.3S(9V)}c.1j()},e3:B(1G){q L=c.2E();q $1n=$(L).2g("1n");if(!c.4j($1n)){F E}if($1n.1V()==0){F E}c.21();q 2K=0;q 1t=c.3P();q $4z=$(1t).2g("3j");q $5Z=$(1t).2g("1g");$4z.1b("1g").1u($.M(B(i,1z){if($(1z)[0]===$5Z[0]){2K=i}},c));$1n.1b("3j").1u($.M(B(i,1z){q $1t=$(1z).1b("1g").eq(2K);q 1g=$1t.6q();1g.o(c.C.2i);1G==="2I"?$1t.2I(1g):$1t.3S(1g)},c));c.1j()},iI:B(){c.28();c.62(c.C.1F.3y,c.C.hB,pR,$.M(B(){$("#hk").23($.M(c.iJ,c));2V(B(){$("#eD").2h()},5k)},c))},iJ:B(){q 1a=$("#eD").1p();1a=c.8d(1a);q 5j=\'<1Q 2p="cT" 22="hG" 3p="\',7B=\'" cS="0" hE></1Q>\';if(1a.1U(8N)){1a=1a.G(8N,5j+"//aA.cO.7w/4S/$1"+7B)}I{if(1a.1U(8Q)){1a=1a.G(8Q,5j+"//hp.cI.7w/3y/$2"+7B)}}c.1W();q 1t=c.2N()||c.3P();if(1t){$(1t).2I(1a)}I{c.9O(1a,E)}c.1j();c.3g()},9N:B(){c.28();q 1c=$.M(B(){if(c.C.ec!==E){c.9H={};q 4J=c;$.l9(c.C.ec,B(1a){q $3s=$("#U-gU-gL");$3s.o("");$.1u(1a,B(1k,1p){4J.9H[1k]=1p;$3s.1h($("<4b>").1p(1k).o(1p.2m))});$3s.on("68",B(){q 1k=$(c).1p();q 2m="",1K="";if(1k!=0){2m=4J.9H[1k].2m;1K=4J.9H[1k].1K}$("#7Z").1p(1K);$("#aj").1p(2m)});$3s.2M()})}c.6K=E;q 1q=c.29();q 1K="",Y="",1O="";q 1z=c.2E();q 5U=$(1z).L().2R(0);if(5U&&5U.Q==="A"){1z=5U}if(1z&&1z.Q==="A"){1K=1z.1S;Y=$(1z).Y();1O=1z.1O;c.6K=1z}I{Y=1q.43()}$("#aj").1p(Y);q iT=iS.iR.1S.G(/\\/$/i,"");1K=1K.G(iT,"");1K=1K.G(/^\\/#/,"#");1K=1K.G("eH:","");if(c.C.8a===E){q re=2c 2J("^(aI|am|5n)://"+iS.iR.q2,"i");1K=1K.G(re,"")}$("#7Z").1p(1K);if(1O==="6y"){$("#6S").9D("9K",N)}c.eJ=E;$("#he").on("23",$.M(c.iQ,c));2V(B(){$("#7Z").2h()},5k)},c);c.62(c.C.1F.1r,c.C.gX,q1,1c)},iQ:B(){if(c.eJ){F}c.eJ=N;q 1O="",eZ="";q 1r=$("#7Z").1p();q Y=$("#aj").1p();if(1r.4G("@")!=-1&&/(aI|am|5n):\\/\\//i.4e(1r)===E){1r="eH:"+1r}I{if(1r.4G("#")!=0){if($("#6S").9D("9K")){1O=\' 1O="6y"\';eZ="6y"}q eO="((q4--)?[a-eL-9]+(-[a-eL-9]+)*.)+[a-z]{2,}";q re=2c 2J("^(aI|am|5n)://"+eO,"i");q jt=2c 2J("^"+eO,"i");if(1r.4G(re)==-1&&1r.4G(jt)==0&&c.C.8a){1r=c.C.8a+1r}}}Y=Y.G(/<|>/g,"");q eY="&3u;";if(c.1C("31")){eY="&3u;"}c.j9(\'<a 1S="\'+1r+\'"\'+1O+">"+Y+"</a>"+eY,$.2b(Y),1r,eZ)},j9:B(a,Y,1r,1O){c.1W();if(Y!==""){if(c.6K){c.21();$(c.6K).Y(Y).1i("1S",1r);if(1O!==""){$(c.6K).1i("1O",1O)}I{$(c.6K).2B("1O")}}I{q $a=$(a).2z("U-dZ-1r");c.2o("5c",c.3Z($a),E);q 1r=c.$K.1b("a.U-dZ-1r");1r.2B("1o").3c("U-dZ-1r").1u(B(){if(c.2S==""){$(c).2B("1x")}})}c.1j()}2V($.M(B(){if(c.C.5m){c.5m()}},c),5);c.3g()},jg:B(){c.28();q 1c=$.M(B(){q 1q=c.29();q Y="";if(c.cw()){Y=1q.Y}I{Y=1q.43()}$("#e6").1p(Y);if(!c.5a()&&!c.d6()){c.bP("#5p",{1K:c.C.84,3H:c.C.3H,4h:$.M(c.ex,c),3U:$.M(B(71,1M){c.1c("kq",1M)},c),6k:c.C.e5})}c.et("5p",{4l:N,1K:c.C.84,4h:$.M(c.ex,c),3U:$.M(B(71,1M){c.1c("kq",1M)},c)})},c);c.62(c.C.1F.25,c.C.hW,cT,1c)},ex:B(1M){c.1W();if(1M!==E){q Y=$("#e6").1p();if(Y===""){Y=1M.ed}q 1r=\'<a 1S="\'+1M.6e+\'" id="6e-1L">\'+Y+"</a>";if(c.1C("4s")&&!!c.42.d5){1r=1r+"&3u;"}c.26("5c",1r,E);q 83=$(c.$K.1b("a#6e-1L"));if(83.1V()!=0){83.2B("id")}I{83=E}c.1j();c.1c("84",83,1M)}c.3g()},l4:B(){c.28();q 1c=$.M(B(){if(c.C.6L){$.l9(c.C.6L,$.M(B(1a){q 6R={},6G=0;$.1u(1a,$.M(B(1k,1p){if(1E 1p.aV!=="1J"){6G++;6R[1p.aV]=6G}},c));q 9j=E;$.1u(1a,$.M(B(1k,1p){q eh="";if(1E 1p.1e!=="1J"){eh=1p.1e}q b0=0;if(!$.l8(6R)&&1E 1p.aV!=="1J"){b0=6R[1p.aV];if(9j===E){9j=".6T"+b0}}q 1B=$(\'<1B 3p="\'+1p.q6+\'" 1x="6T 6T\'+b0+\'" 4m="\'+1p.T+\'" 1e="\'+eh+\'" />\');$("#eA").1h(1B);$(1B).23($.M(c.fI,c))},c));if(!$.l8(6R)){$(".6T").2U();$(9j).2M();q l0=B(e){$(".6T").2U();$(".6T"+$(e.1O).1p()).2M()};q 3s=$(\'<3s id="q0">\');$.1u(6R,B(k,v){3s.1h($(\'<4b 2s="\'+v+\'">\'+k+"</4b>"))});$("#eA").3S(3s);3s.68(l0)}},c))}I{$("#U-52-6v-2").1w()}if(c.C.3Y||c.C.5Q){if(!c.5a()&&!c.d6()&&c.C.5Q===E){if($("#5p").1m){c.bP("#5p",{1K:c.C.3Y,3H:c.C.3H,4h:$.M(c.eN,c),3U:$.M(B(71,1M){c.1c("dV",1M)},c),6k:c.C.an})}}if(c.C.5Q===E){c.et("5p",{4l:N,1K:c.C.3Y,4h:$.M(c.eN,c),3U:$.M(B(71,1M){c.1c("dV",1M)},c)})}I{$("#5p").on("68.U",$.M(c.gD,c))}}I{$(".5D").2U();if(!c.C.6L){$("#5E").1w();$("#iq").2M()}I{$("#U-52-6v-1").1w();$("#U-52-6v-2").2z("6I");$("#ib").2M()}}if(!c.C.kC&&(c.C.3Y||c.C.6L)){$("#U-52-6v-3").2U()}$("#gZ").23($.M(c.fq,c));if(!c.C.3Y&&!c.C.6L){2V(B(){$("#6C").2h()},5k)}},c);c.62(c.C.1F.T,c.C.iD,pT,1c)},gn:B(T){q $el=T;q L=$el.L().L();q 1c=$.M(B(){$("#e0").1p($el.1i("8n"));$("#pS").1i("1S",$el.1i("3p"));if($el.1f("3f")=="1l"&&$el.1f("5J")=="3r"){$("#bl").1p("6O")}I{$("#bl").1p($el.1f("5J"))}if($(L).2R(0).Q==="A"){$("#6C").1p($(L).1i("1S"));if($(L).1i("1O")=="6y"){$("#6S").9D("9K",N)}}$("#iy").23($.M(B(){c.dX($el)},c));$("#iA").23($.M(B(){c.kL($el)},c))},c);c.62(c.C.1F.8p,c.C.hL,pV,1c)},dX:B(el){q 9b=$(el).L().L();q L=$(el).L();q a7=E;if(9b.1m&&9b[0].Q==="A"){a7=N;$(9b).1w()}I{if(L.1m&&L[0].Q==="A"){a7=N;$(L).1w()}I{$(el).1w()}}if(L.1m&&L[0].Q==="P"){c.4i();if(a7===E){c.4g(L)}}c.1c("pX",el);c.3g();c.1j()},kL:B(el){c.6t(E);q $el=$(el);q L=$el.L();$el.1i("8n",$("#e0").1p());q 9E=$("#bl").1p();q 2H="";if(9E==="1s"){2H="0 "+c.C.8i+" "+c.C.8i+" 0";$el.1f({"5J":"1s",2H:2H})}I{if(9E==="4Z"){2H="0 0 "+c.C.8i+" "+c.C.8i+"";$el.1f({"5J":"4Z",2H:2H})}I{if(9E==="6O"){$el.1f({"5J":"",3f:"1l",2H:"4l"})}I{$el.1f({"5J":"",3f:"",2H:""})}}}q 1r=$.2b($("#6C").1p());if(1r!==""){q 1O=E;if($("#6S").9D("9K")){1O=N}if(L.2R(0).Q!=="A"){q a=$(\'<a 1S="\'+1r+\'">\'+c.3Z(el)+"</a>");if(1O){a.1i("1O","6y")}$el.2e(a)}I{L.1i("1S",1r);if(1O){L.1i("1O","6y")}I{L.2B("1O")}}}I{if(L.2R(0).Q==="A"){L.2e(c.3Z(el))}}c.3g();c.4T();c.1j()},6t:B(e){if(e!==E&&$(e.1O).L().1V()!=0&&$(e.1O).L()[0].id==="U-T-2C"){F E}q 2X=c.$K.1b("#U-T-2C");if(2X.1V()==0){F E}c.$K.1b("#U-T-es, #U-T-ej").1w();2X.1b("1B").1f({5M:2X[0].1o.5M,9c:2X[0].1o.9c,5L:2X[0].1o.5L,9d:2X[0].1o.9d});2X.1f("2H","");2X.1b("1B").1f("gp","");2X.2e(B(){F $(c).1Y()});$(X).3b("23.U-T-8m-2U");c.$K.3b("23.U-T-8m-2U");c.$K.3b("5T.U-T-e9");c.1j()},kU:B(T){q $T=$(T);$T.on("9J",$.M(B(){c.6t(E)},c));$T.on("p6",$.M(B(){c.$K.on("6w.U-T-kv-6w",$.M(B(){2V($.M(B(){c.4T();c.$K.3b("6w.U-T-kv-6w");c.1j()},c),1)},c))},c));$T.on("23",$.M(B(e){if(c.$K.1b("#U-T-2C").1V()!=0){F E}q p5=E,a6,a5,eM=$T.2p()/$T.22(),g9=20,p8=10;q 5z=c.gA($T);q aa=E;if(5z!==E){5z.on("9J",B(e){aa=N;e.2u();eM=$T.2p()/$T.22();a6=4u.6A(e.eS-$T.eq(0).2Y().1s);a5=4u.6A(e.ff-$T.eq(0).2Y().1T)});$(c.X.2v).on("l1",$.M(B(e){if(aa){q p9=4u.6A(e.eS-$T.eq(0).2Y().1s)-a6;q hV=4u.6A(e.ff-$T.eq(0).2Y().1T)-a5;q iP=$T.22();q g4=9y(iP,10)+hV;q 9G=4u.6A(g4*eM);if(9G>g9){$T.2p(9G);if(9G<3O){c.6u.1f({5M:"-aT",5L:"-pb",8s:"pa",8X:"p4 fp"})}I{c.6u.1f({5M:"-8U",5L:"-gm",8s:"8U",8X:"aT 8Y"})}}a6=4u.6A(e.eS-$T.eq(0).2Y().1s);a5=4u.6A(e.ff-$T.eq(0).2Y().1T);c.1j()}},c)).on("a8",B(){aa=E})}c.$K.on("5T.U-T-e9",$.M(B(e){q 1k=e.5X;if(c.2O.a2==1k||c.2O.eC==1k){c.21(E);c.6t(E);c.dX($T)}},c));$(X).on("23.U-T-8m-2U",$.M(c.6t,c));c.$K.on("23.U-T-8m-2U",$.M(c.6t,c))},c))},gA:B($T){q 2X=$(\'<V id="U-T-2C" 1a-U="9s">\');2X.1f({3k:"gC",3f:"3W-1l",ep:0,oX:"fi oW oV(0, 0, 0, .6)","5J":$T.1f("5J")});2X.1i("3K",E);if($T[0].1o.2H!="4l"){2X.1f({5M:$T[0].1o.5M,9c:$T[0].1o.9c,5L:$T[0].1o.5L,9d:$T[0].1o.9d});$T.1f("2H","")}I{2X.1f({3f:"1l",2H:"4l"})}$T.1f("gp",0.5).2I(2X);c.6u=$(\'<V id="U-T-es" 1a-U="9s">\'+c.C.1F.8p+"</V>");c.6u.1f({3k:"8T",9u:5,1T:"50%",1s:"50%",5M:"-8U",5L:"-gm",ep:1,fK:"#fE",6s:"#fj",8s:"8U",8X:"aT 8Y",er:"oZ"});c.6u.1i("3K",E);c.6u.on("23",$.M(B(){c.gn($T)},c));2X.1h(c.6u);if(c.C.gF){q 5z=$(\'<V id="U-T-ej" 1a-U="9s"></V>\');5z.1f({3k:"8T",9u:2,ep:1,er:"nw-8m",ft:"-p1",4Z:"-fp",p0:"fi pc #fj",fK:"#fE",2p:"fD",22:"fD"});5z.1i("3K",E);2X.1h(5z);2X.1h($T);F 5z}I{2X.1h($T);F E}},fI:B(e){q 1B=\'<1B id="T-1L" 3p="\'+$(e.1O).1i("4m")+\'" 8n="\'+$(e.1O).1i("1e")+\'" />\';q L=c.2E();if(c.C.5Y&&$(L).2g("li").1V()==0){1B="<p>"+1B+"</p>"}c.b2(1B,N)},fq:B(){q 1p=$("#6C").1p();if(1p!==""){q 1a=\'<1B id="T-1L" 3p="\'+1p+\'" />\';if(c.C.1N===E){1a="<p>"+1a+"</p>"}c.b2(1a,N)}I{c.3g()}},eN:B(1a){c.b2(1a)},b2:B(1M,1r){c.1W();if(1M!==E){q o="";if(1r!==N){o=\'<1B id="T-1L" 3p="\'+1M.6e+\'" />\';q L=c.2E();if(c.C.5Y&&$(L).2g("li").1V()==0){o="<p>"+o+"</p>"}}I{o=1M}c.26("5c",o,E);q T=$(c.$K.1b("1B#T-1L"));if(T.1m){T.2B("id")}I{T=E}c.1j();1r!==N&&c.1c("3Y",T,1M)}c.3g();c.4T()},i8:B(){if($("#U-8O").1V()!=0){F}c.$i0=$(\'<12 id="U-8O"><V></V></12>\');$(X.2v).1h(c.$i0)},8C:B(){c.i8();$("#U-8O").pr()},b6:B(){$("#U-8O").6N(pq)},i5:B(){$.4W(c.C,{hW:51()+\'<2l id="U-5W-25-4y"><2t id="pp" 5l="7R" 7t="" b3="af/2t-1a"><2D>\'+c.C.1F.ed+\'</2D><2T 1G="Y" id="e6" 1x="6Q" /><12 1o="2H-1T: aT;"><2T 1G="25" id="5p" 2m="\'+c.C.e5+\'" /></12></2t></2l>\',hL:51()+\'<2l id="U-5W-T-8p"><2D>\'+c.C.1F.1e+\'</2D><2T 1G="Y" id="e0" 1x="6Q" /><2D>\'+c.C.1F.1r+\'</2D><2T 1G="Y" id="6C" 1x="6Q" /><2D><2T 1G="gT" id="6S"> \'+c.C.1F.eB+"</2D><2D>"+c.C.1F.hP+\'</2D><3s id="bl"><4b 2s="3r">\'+c.C.1F.3r+\'</4b><4b 2s="1s">\'+c.C.1F.1s+\'</4b><4b 2s="6O">\'+c.C.1F.6O+\'</4b><4b 2s="4Z">\'+c.C.1F.4Z+\'</4b></3s></2l><49><1D id="iy" 1x="4r pt">\'+c.C.1F.iv+\'</1D><1D 1x="4r 6M">\'+c.C.1F.6H+\'</1D><1D id="iA" 1x="4r 6P">\'+c.C.1F.7N+"</1D></49>",iD:51()+\'<2l id="U-5W-T-4y"><12 id="5E"><a 1S="#" id="U-52-6v-1" 1x="6I">\'+c.C.1F.8H+\'</a><a 1S="#" id="U-52-6v-2">\'+c.C.1F.eo+\'</a><a 1S="#" id="U-52-6v-3">\'+c.C.1F.1r+\'</a></12><2t id="pu" 5l="7R" 7t="" b3="af/2t-1a"><12 id="pn" 1x="5D"><2T 1G="25" id="5p" 2m="\'+c.C.an+\'" /></12><12 id="ib" 1x="5D" 1o="3f: 3r;"><12 id="eA"></12></12></2t><12 id="iq" 1x="5D" 1o="3f: 3r;"><2D>\'+c.C.1F.ip+\'</2D><2T 1G="Y" 2m="6C" id="6C" 1x="6Q"  /><br><br></12></2l><49><1D 1x="4r 6M">\'+c.C.1F.6H+\'</1D><1D 1x="4r 6P" id="gZ">\'+c.C.1F.4y+"</1D></49>",gX:51()+\'<2l id="U-5W-1r-4y"><3s id="U-gU-gL" 1o="2p: 99.5%; 3f: 3r;"></3s><2D>gN</2D><2T 1G="Y" 1x="6Q" id="7Z" /><2D>\'+c.C.1F.Y+\'</2D><2T 1G="Y" 1x="6Q" id="aj" /><2D><2T 1G="gT" id="6S"> \'+c.C.1F.eB+\'</2D></2l><49><1D 1x="4r 6M">\'+c.C.1F.6H+\'</1D><1D id="he" 1x="4r 6P">\'+c.C.1F.4y+"</1D></49>",hf:51()+\'<2l id="U-5W-1n-4y"><2D>\'+c.C.1F.aF+\'</2D><2T 1G="Y" 1V="5" 2s="2" id="eX" /><2D>\'+c.C.1F.aJ+\'</2D><2T 1G="Y" 1V="5" 2s="3" id="hx" /></2l><49><1D 1x="4r 6M">\'+c.C.1F.6H+\'</1D><1D id="hv" 1x="4r 6P">\'+c.C.1F.4y+"</1D></49>",hB:51()+\'<2l id="U-5W-3y-4y"><2t id="pf"><2D>\'+c.C.1F.hF+\'</2D><5s id="eD" 1o="2p: 99%; 22: pe;"></5s></2t></2l><49><1D 1x="4r 6M">\'+c.C.1F.6H+\'</1D><1D id="hk" 1x="4r 6P">\'+c.C.1F.4y+"</1D></49>"})},62:B(1e,3L,2p,1c){c.gH();c.$au=2p;c.$2P=$("#eR");if(!c.$2P.1m){c.$2P=$(\'<12 id="eR" 1o="3f: 3r;" />\');c.$2P.1h($(\'<12 id="eP">&pj;</12>\'));c.$2P.1h($(\'<aS id="bc" />\'));c.$2P.1h($(\'<12 id="ac" />\'));c.$2P.8P(X.2v)}$("#eP").on("23",$.M(c.3g,c));$(X).on("5d",$.M(c.8M,c));c.$K.on("5d",$.M(c.8M,c));c.ht(3L);c.hD(1e);c.hI();c.ia();c.gO();c.hC();c.6J=c.X.2v.3e;if(c.C.4Y===E){c.6J=c.$K.3e()}if(c.5a()===E){c.fW()}I{c.hl()}if(1E 1c==="B"){1c()}2V($.M(B(){c.1c("pm",c.$2P)},c),11);$(X).3b("pl.5W");c.$2P.1b("2T[1G=Y]").on("pk",$.M(B(e){if(e.5X===13){c.$2P.1b(".6P").23();e.2u()}},c));F c.$2P},fW:B(){c.$2P.1f({3k:"ak",1T:"-df",1s:"50%",2p:c.$au+"px",5L:"-"+(c.$au/2)+"px"}).2M();c.ei=$(X.2v).1f("8V");$(X.2v).1f("8V","8E");2V($.M(B(){q 22=c.$2P.hQ();c.$2P.1f({1T:"50%",22:"4l",8R:"4l",5M:"-"+(22+10)/2+"px"})},c),15)},hl:B(){c.$2P.1f({3k:"ak",2p:"3O%",22:"3O%",1T:"0",1s:"0",2H:"0",8R:"pi"}).2M()},ht:B(3L){c.6g=E;if(3L.44("#")==0){c.6g=$(3L);$("#ac").6z().1h(c.6g.o());c.6g.o("")}I{$("#ac").6z().1h(3L)}},hD:B(1e){c.$2P.1b("#bc").o(1e)},hC:B(){q 4a=c.$2P.1b("49 1D").ay(".pg");q ea=4a.1V();if(ea>0){$(4a).1f("2p",(c.$au/ea)+"px")}},gO:B(){c.$2P.1b(".6M").on("23",$.M(c.3g,c))},gH:B(){if(c.C.fb){c.$8D=$("#ev");if(!c.$8D.1m){c.$8D=$(\'<12 id="ev" 1o="3f: 3r;"></12>\');$("2v").6d(c.$8D)}c.$8D.2M().on("23",$.M(c.3g,c))}},hI:B(){if(1E $.fn.ii!=="1J"){c.$2P.ii({po:"#bc"});c.$2P.1b("#bc").1f("er","pv")}},ia:B(){q $5E=$("#5E");if(!$5E.1m){F E}q 4J=c;$5E.1b("a").1u(B(i,s){i++;$(s).on("23",B(e){e.2u();$5E.1b("a").3c("6I");$(c).2z("6I");$(".5D").2U();$("#5D"+i).2M();$("#ps").1p(i);if(4J.5a()===E){q 22=4J.$2P.hQ();4J.$2P.1f("2H-1T","-"+(22+10)/2+"px")}})})},8M:B(e){if(e.2O===c.2O.dY){c.3g();F E}},3g:B(){$("#eP").3b("23",c.3g);$("#eR").6N("pd",$.M(B(){q eU=$("#ac");if(c.6g!==E){c.6g.o(eU.o());c.6g=E}eU.o("");if(c.C.fb){$("#ev").2U().3b("23",c.3g)}$(X).3b("5d",c.8M);c.$K.3b("5d",c.8M);c.1W();if(c.C.4Y&&c.6J){$(c.X.2v).3e(c.6J)}I{if(c.C.4Y===E&&c.6J){c.$K.3e(c.6J)}}c.1c("p2")},c));if(c.5a()===E){$(X.2v).1f("8V",c.ei?c.ei:"gq")}F E},oY:B(eu){$(".5D").2U();$("#5E").1b("a").3c("6I").eq(eu-1).2z("6I");$("#5D"+eu).2M()},gD:B(e){q 7I=e.1O.7I;3z(q i=0,f;f=7I[i];i++){c.e1(f)}},e1:B(25){c.gy(25,$.M(B(gx){c.ji(25,gx)},c))},gy:B(25,1c){q 2n=2c la();q eV="?";if(c.C.5Q.4G(/\\?/)!="-1"){eV="&"}2n.b7("p3",c.C.5Q+eV+"2m="+25.2m+"&1G="+25.1G,N);if(2n.kR){2n.kR("Y/p7; pw=x-py-pY")}q 4J=c;2n.pW=B(e){if(c.lc==4&&c.e8==5k){4J.8C();1c(pU(c.pZ))}I{if(c.lc==4&&c.e8!=5k){}}};2n.k9()},ja:B(5l,1K){q 2n=2c la();if("q7"in 2n){2n.b7(5l,1K,N)}I{if(1E lb!="1J"){2n=2c lb();2n.b7(5l,1K)}I{2n=2G}}F 2n},ji:B(25,1K){q 2n=c.ja("q5",1K);if(!2n){}I{2n.jd=$.M(B(){if(2n.e8==5k){c.b6();q eb=1K.4o("?");if(!eb[0]){F E}c.1W();q o="";o=\'<1B id="T-1L" 3p="\'+eb[0]+\'" />\';if(c.C.5Y){o="<p>"+o+"</p>"}c.26("5c",o,E);q T=$(c.$K.1b("1B#T-1L"));if(T.1m){T.2B("id")}I{T=E}c.1j();c.1c("3Y",T,E);c.3g();c.4T()}I{}},c);2n.q3=B(){};2n.8H.pQ=B(e){};2n.iK("pE-pF",25.1G);2n.iK("x-pG-pD","pz-pA");2n.k9(25)}},et:B(el,3R){c.3A={1K:E,4h:E,3U:E,2y:E,ef:E,4l:E,2T:E};$.4W(c.3A,3R);q $el=$("#"+el);if($el.1m&&$el[0].Q==="pB"){c.3A.2T=$el;c.el=$($el[0].2t)}I{c.el=$el}c.jD=c.el.1i("7t");if(c.3A.4l){$(c.3A.2T).68($.M(B(e){c.el.ca(B(e){F E});c.e4(e)},c))}I{if(c.3A.ef){$("#"+c.3A.ef).23($.M(c.e4,c))}}},e4:B(e){c.8C();c.jI(c.2j,c.kl())},kl:B(){c.id="f"+4u.kg(4u.kh()*k0);q d=c.X.4C("12");q 1Q=\'<1Q 1o="3f:3r" id="\'+c.id+\'" 2m="\'+c.id+\'"></1Q>\';d.3Q=1Q;$(d).8P("2v");if(c.3A.2y){c.3A.2y()}$("#"+c.id).jZ($.M(c.jT,c));F c.id},jI:B(f,2m){if(c.3A.2T){q eI="pM"+c.id,jX="pK"+c.id;c.2t=$(\'<2t  7t="\'+c.3A.1K+\'" 5l="c1" 1O="\'+2m+\'" 2m="\'+eI+\'" id="\'+eI+\'" b3="af/2t-1a" />\');if(c.C.3H!==E&&1E c.C.3H==="3M"){$.1u(c.C.3H,$.M(B(k,v){if(v!=2G&&v.43().44("#")===0){v=$(v).1p()}q 8E=$("<2T/>",{1G:"8E",2m:k,2s:v});$(c.2t).1h(8E)},c))}q eT=c.3A.2T;q 8S=$(eT).6q();$(eT).1i("id",jX).3S(8S).8P(c.2t);$(c.2t).1f("3k","8T").1f("1T","-df").1f("1s","-df").8P("2v");c.2t.ca()}I{f.1i("1O",2m).1i("5l","c1").1i("b3","af/2t-1a").1i("7t",c.3A.1K);c.2j.ca()}},jT:B(){q i=$("#"+c.id)[0],d;if(i.jU){d=i.jU}I{if(i.bK){d=i.bK.X}I{d=42.o2[c.id].X}}if(c.3A.4h){c.b6();if(1E d!=="1J"){q jW=d.2v.3Q;q 7s=jW.1U(/\\{(.|\\n)*\\}/)[0];7s=7s.G(/^\\[/,"");7s=7s.G(/\\]$/,"");q 1M=$.8J(7s);if(1E 1M.3U=="1J"){c.3A.4h(1M)}I{c.3A.3U(c,1M);c.3g()}}I{c.3g();o1("jE nY!")}}c.el.1i("7t",c.jD);c.el.1i("1O","")},bP:B(el,3R){c.5w=$.4W({1K:E,4h:E,3U:E,nZ:E,3H:E,Y:c.C.1F.jA,jJ:c.C.1F.jB,6k:E},3R);if(42.bw===1J){F E}c.bz=$(\'<12 1x="o0"></12>\');c.5b=$(\'<12 1x="o6">\'+c.5w.Y+"</12>");c.kk=$(\'<12 1x="o7">\'+c.5w.jJ+"</12>");c.bz.1h(c.5b);$(el).3S(c.bz);$(el).3S(c.kk);c.5b.on("oc",$.M(B(){F c.je()},c));c.5b.on("ob",$.M(B(){F c.jf()},c));c.5b.2R(0).o8=$.M(B(e){e.2u();c.5b.3c("dk").2z("6w");c.8C();c.bF(c.5w.1K,e.aX.7I[0],E,e,c.5w.6k)},c)},bF:B(1K,25,bm,e,6k){if(!bm){q 2n=$.nX.2n();if(2n.8H){2n.8H.nK("8O",$.M(c.jh,c),E)}$.nL({2n:B(){F 2n}})}c.1c("6w",e);q fd=2c bw();if(6k!==E){fd.1h(6k,25)}I{fd.1h("25",25)}if(c.C.3H!==E&&1E c.C.3H==="3M"){$.1u(c.C.3H,$.M(B(k,v){if(v!=2G&&v.43().44("#")===0){v=$(v).1p()}fd.1h(k,v)},c))}$.iU({1K:1K,nI:"o",1a:fd,nG:E,c3:E,nH:E,1G:"c1",4h:$.M(B(1a){1a=1a.G(/^\\[/,"");1a=1a.G(/\\]$/,"");q 1M=(1E 1a==="8I"?$.8J(1a):1a);c.b6();if(bm){q $1B=$("<1B>");$1B.1i("3p",1M.6e).1i("id","jc-T-1L");c.js(e,$1B[0]);q T=$(c.$K.1b("1B#jc-T-1L"));if(T.1m){T.2B("id")}I{T=E}c.1j();c.4T();if(T){c.1c("3Y",T,1M)}if(1E 1M.3U!=="1J"){c.1c("dV",1M)}}I{if(1E 1M.3U=="1J"){c.5w.4h(1M)}I{c.5w.3U(c,1M);c.5w.4h(E)}}},c)})},je:B(){c.5b.2z("dk");F E},jf:B(){c.5b.3c("dk");F E},jh:B(e,Y){q kX=e.kB?9y(e.kB/e.oR*3O,10):e;c.5b.Y("oO "+kX+"% "+(Y||""))},5a:B(){F/(oj|or|os|oy)/.4e(6n.7k)},d6:B(){F/oz/.4e(6n.7k)},9M:B(4p){if(1E(4p)==="1J"){F 0}F 9y(4p.G("px",""),10)},3Z:B(el){F $("<12>").1h($(el).eq(0).6q()).o()},ox:B(o){q 2L=X.4C("8K");2L.3Q=o;F 2L.9Q||2L.dh||""},kF:B(71){F ow.5o.43.5q(71)=="[3M 51]"},9B:B(o){o=o.G(/&#9F;|<br>|<br\\/>|&3u;/gi,"");o=o.G(/\\s/g,"");o=o.G(/^<p>[^\\W\\w\\D\\d]*?<\\/p>$/i,"");F o==""},ro:B(){q rv=E;if(6n.rn=="rl rb rx"){q 47=6n.7k;q re=2c 2J("rf ([0-9]{1,}[.0-9]{0,})");if(re.2o(47)!=2G){rv=rw(2J.$1)}}F rv},8L:B(){F!!6n.7k.1U(/ry\\/7\\./)},1C:B(1C){q 47=6n.7k.3N();q 1U=/(fs)[\\/]([\\w.]+)/.2o(47)||/(d5)[ \\/]([\\w.]+)/.2o(47)||/(4s)[ \\/]([\\w.]+).*(rC)[ \\/]([\\w.]+)/.2o(47)||/(4s)[ \\/]([\\w.]+)/.2o(47)||/(94)(?:.*9n|)[ \\/]([\\w.]+)/.2o(47)||/(3t) ([\\w.]+)/.2o(47)||47.44("r3")>=0&&/(rv)(?::| )([\\w.]+)/.2o(47)||47.44("qt")<0&&/(31)(?:.*? rv:([\\w.]+)|)/.2o(47)||[];if(1C=="9n"){F 1U[2]}if(1C=="4s"){F(1U[1]=="d5"||1U[1]=="4s")}if(1U[1]=="rv"){F 1C=="3t"}if(1U[1]=="fs"){F 1C=="4s"}F 1C==1U[1]},cw:B(){if(c.1C("3t")&&9y(c.1C("9n"),10)<9){F N}F E},fF:B(fr){q 7e=fr.qA(N);q 12=c.X.4C("12");12.7g(7e);F 12.3Q},cE:B(){q J=c.$K[0];q 4k=c.X.cD();q cC;3w((cC=J.8G)){4k.7g(cC)}F 4k},4j:B(el){if(!el){F E}if(c.C.1Q){F el}if($(el).8B("12.4d").1m==0||$(el).3v("4d")){F E}I{F el}},74:B(Q){q L=c.2E(),1t=c.3P();F L&&L.Q===Q?L:1t&&1t.Q===Q?1t:E},ck:B(){q 1t=c.2N();q 2Y=c.ch(1t);q Y=$.2b($(1t).Y()).G(/\\n\\r\\n/g,"");q 4P=Y.1m;if(2Y==4P){F N}I{F E}},7h:B(){q el,1q=c.29();if(1q&&1q.4V&&1q.4V>0){el=1q.48(0).6D}if(!el){F E}if(c.C.1Q){if(c.hR().iz()){F!c.$K.is(el)}I{F N}}F $(el).2g("12.4d").1m!=0},4H:B(el,1i){if($(el).1i(1i)==""){$(el).2B(1i)}},iB:B(ao,2s){q 2K=2G;3w((2K=ao.44(2s))!==-1){ao.ap(2K,1)}F ao}};3J.5o.77.5o=3J.5o;$.3J.fn.e7=B(eQ,7d,6l,75,7A){q 1K=/(((5n?|qT?):\\/\\/)|aA[.][^\\s])(.+?\\..+?)([.),]?)(\\s|\\.\\s+|\\)|$)/gi,hK=/(5n?|am):\\/\\//i,d3=/(5n?:\\/\\/.*\\.(?:gY|qR|hc|ha))/gi;q 8F=(c.$K?c.$K.2R(0):c).8F,i=8F.1m;3w(i--){q n=8F[i];if(n.4D===3){q o=n.aH;if(75&&o){q 5j=\'<1Q 2p="cT" 22="hG" 3p="\',7B=\'" cS="0" hE></1Q>\';if(o.1U(8N)){o=o.G(8N,5j+"//aA.cO.7w/4S/$1"+7B);$(n).2I(o).1w()}I{if(o.1U(8Q)){o=o.G(8Q,5j+"//hp.cI.7w/3y/$2"+7B);$(n).2I(o).1w()}}}if(6l&&o&&o.1U(d3)){o=o.G(d3,\'<1B 3p="$1">\');$(n).2I(o).1w()}if(7d&&o&&o.1U(1K)){q 2x=o.1U(1K);3z(q i in 2x){q 1S=2x[i];q Y=1S;q 6c="";if(1S.1U(/\\s$/)!==2G){6c=" "}q c8=eQ;if(1S.1U(hK)!==2G){c8=""}if(Y.1m>7A){Y=Y.aQ(0,7A)+"..."}Y=Y.G(/&/g,"&9h;").G(/</g,"&lt;").G(/>/g,"&gt;");q jq=Y.G("$","$$$");o=o.G(1S,\'<a 1S="\'+c8+$.2b(1S)+\'">\'+$.2b(jq)+"</a>"+6c)}$(n).2I(o).1w()}}I{if(n.4D===1&&!/^(a|1D|5s)$/i.4e(n.Q)){$.3J.fn.e7.5q(n,eQ,7d,6l,75,7A)}}}}})(nW);',62,1714,'||||||||||||this||||||||||||html||var|||||||||||function|opts||false|return|replace||else|node|editor|parent|proxy|true|range||tagName|||image|redactor|span||document|text||||div||||||||data|find|callback|tag|title|css|td|append|attr|sync|key|block|length|table|style|val|sel|link|left|current|each|source|remove|class|lang|elem|toolbar|img|browser|button|typeof|curLang|type|func|selection|undefined|url|marker|json|linebreaks|target|cmd|iframe|dropdown|href|top|match|size|selectionRestore|nodes|contents|out||bufferSet|height|click||file|execCommand||selectionSave|getSelection|btn|trim|new|btnObject|replaceWith|blockquote|closest|focus|invisibleSpace|element|code|section|name|xhr|exec|width|pre|ul|value|form|preventDefault|body|btnName|matches|start|addClass|font|removeAttr|box|label|getParent|param|null|margin|after|RegExp|index|tmp|show|getBlock|keyCode|redactorModal|arr|get|className|input|hide|setTimeout|last|imageBox|offset|frame|air|mozilla|||||||||list|off|removeClass|push|scrollTop|display|modalClose|LI|point|tr|position|end|bold|script|getRange|src|italic|none|select|msie|nbsp|hasClass|while|ctrl|video|for|uploadOptions|insertNode|doc|blocks|buffer|BLOCKQUOTE|wrapper|uploadFields|getBlocks|Redactor|contenteditable|content|object|toLowerCase|100|getCurrent|innerHTML|options|before|thead|error|strong|inline|pos|imageUpload|outerHtml||rangy|window|toString|indexOf|||ua|getRangeAt|footer|buttons|option|children|redactor_editor|test|next|selectionStart|success|focusWithSaveScroll|isParentRedactor|frag|auto|rel|fullpage|split|str|buttonGet|redactor_modal_btn|webkit|elems|Math|postData|meta|finalnodes|insert|current_tr|htmls|textNodes|createElement|nodeType|tooltip|collapsed|search|removeEmptyAttr|php|that|underline|parentNode|prev|cont|inArray|len|orgn|substr|embed|observeImages|placeholder|rangeCount|extend|removeAllRanges|autoresize|right||String|tab|shiftKey|keys|redactor_placeholder|del|align|emptyHtml||isMobile|dropareabox|inserthtml|keyup|blockElem|break|addRange|collapse|createRange|iframeStart|200|method|observeLinks|https|prototype|redactor_file|call|audio|textarea|alignmentTags|case|lastNode|draguploadOptions|listTag|regex|imageResizer|rule|replaced|charAt|redactor_tab|redactor_tabs|strike|allowedTags|deleted|formatBlocks|float|newTag|marginLeft|marginTop|visual|node1|listCurrent|s3|selectall|savedSel|keydown|par|join|modal|which|paragraphy|current_td|||modalInit|direction|textareamode|||event|change|dir|orderedlist|Insert|space|prepend|filelink|unorderedlist|modalcontent|TD|PRE|shortcuts|uploadParam|convertImageLinks|indent|navigator|formatBlock|italicTag|clone|boldTag|color|imageResizeHide|imageEditter|control|drop|formatting|_blank|empty|round|toolbarFixed|redactor_file_link|startContainer|modified|unlink|count|cancel|redactor_tabs_act|saveModalScroll|insert_link_node|imageGetJson|redactor_btn_modal_close|fadeOut|center|redactor_modal_action_btn|redactor_input|folders|redactor_link_blank|redactorfolder|insertAfterLastElement|set|hideHandler|phpMatches|item|cleanRemoveSpaces|etags|obj|cleanGetTabs||currentOrParentIs|convertVideoLinks|replacementTag|init|thtml|elements|dropact|buttonActive|tabindex|convertLinks|cloned|buttonBuild|appendChild|isFocused|tmpList|newblock|userAgent|instance|outdent|listParent|weight|blocksElems|modif|getNodes|jsonString|action|possible|nodeTestBlocks|com|enter|fullpageDoctype|isFunction|linkSize|iframeEnd|autosave|u200B|linkObserverTooltipClose|uuid|selectionEnd|observeStart|files|charCount|endCharCount|Delete|boxTop|save|toolbarExternal|dblEnter|horizontalrule|post|character|toolbarFixedTarget|keyPosition|shift|Header|typewriter|Add|redactor_link_url|metaKey|tagblock|createTextNode|linkmarker|fileUpload|setEnd|setStart|focn|textNode|newnodes|linkProtocol|selectionRemoveMarkers|tbody|cleanStripTags|selectionSet|node2|getElement|endContainer|imageFloatMargin|rtePaste|insertunorderedlist|alignmentSet|resize|alt|tmpLi|edit|insertorderedlist|buttonActiveObserver|fontSize|background|setNonEditable|cleanlevel|tagout|phpTags|deniedTags|redactor_act|rebuffer|parents|showProgressBar|redactorModalOverlay|hidden|childNodes|firstChild|upload|string|parseJSON|DIV|isIe11|modalCloseHandler|reUrlYoutube|progress|appendTo|reUrlVimeo|minHeight|newElement|absolute|11px|overflow|pasteInsert|padding|10px|selected|||setSpansVerified|inlineMethods|opera|tablePaste|||||convertDivs|parentLink|marginBottom|marginRight|ADDRESS|SECTION|strip|amp|insertHtml|folderclass|parentHtml|result|rangeNodes|version|listText|clipboardUpload|indentValue|template|verified|saveScroll|zIndex|paste|wrapperHtml|selectionHtml|parseInt|cleanParagraphy||isEmpty|codeLength|prop|floating|x200b|new_w|predefinedLinksStorage|line|mousedown|checked|placeTag|normalize|linkShow|insertHtmlAdvanced|ctrlKey|textContent|alignment|cleanConvertInlineTags|allowed|head|new_tr|colspan|rowspan|FOOTER|HEADER|ARTICLE|removeEmptyTags|BACKSPACE|clickedElement|ASIDE|start_y|start_x|parentEl|mouseup|sourceHeight|isResizing|javascript|redactor_modal_inner|setSpansVerifiedHtml|setStartAfter|multipart|cloneRange|autosaveInterval|selectionSetMarker|redactor_link_url_text|fixed|insertLineBreak|ftp|imageUploadParam|array|splice|foundStart|boundaryRange|toolbarFixedBox|insertAfter|redactorModalWidth|emptyElement|special|rTestBlock|not|specialKey|www|getSelectionText|deleteContents|outer|documentElement|rows|direct|nodeValue|http|columns|focusSet|execPasteFrag|selectNodeContents|separator|methodVal|classname|substring|icon|header|7px|fonts|folder|tabSpaces|dataTransfer|activeButtons|row|folderkey|column|imageInsert|enctype|spans|foco|hideProgressBar|open|one|ENTER|preCaretRange|toolbarFixedTopOffset|redactor_modal_header|buildCodearea||htmlTagName|blockLevelElements|hdlHideDropDown|airBindMousemoveHide|dropdownHideAll|inlineRemoveFormatReplace|redactor_form_image_align|directupload|aligncenter|align_right|align_left|endRange||alignright|insertingAfterLastElement|align_justify|align_center|FormData|selectionWrap|selectionElement|droparea|selectionRemove|orgo|BR|fotorama|posFrame|dragUploadAjax|iframeDoc|caretOffset|Range|contOwnLine|contentWindow|ownLine|tagTestBlock|getTextNodesIn|apply|draguploadInit|arrSearch|cursorRange|royalSlider|clipboardUploadUrl|add_head|cleanFontTag|insert_column_right|insert_column_left|delete_head|decoration|delete_row|POST|delete_column|contentType|insert_row_below|insert_row_above|pasteClipboardMozilla|fullscreen|addProtocol|pasteClipboardAppendFields|submit|focusEnd|getRangeSelectedNodes|insert_table|cleanEncodeEntities|alignleft|elem2|getCaretOffset|dropdownHide|dropdownShow|isEndOfElement|buildEventKeydownInsertLineBreak|btnHeight|plugins|iframeAppend|sourceOld|RedactorPlugins|dropdownWidth|buttonName|buttonInactive|rBlockTest|activeButtonsStates|oldIE|indentingIndent|indentingOutdent|link_insert|FIGCAPTION|redactor_button_disabled|child|createDocumentFragment|extractContent|airShow|focusElem|buildAfter|vimeo|buildOptions|iframeAddCss|hotkeysShiftNums|placeholderOnBlur|blur|youtube|placeholderGet|placeholderOnFocus|placeholderText|frameborder|500|buttonsHideOnMobile|iframePage|redactor_toolbar|toolbarObserveScroll|savedHtml|iframeLoad|toggle|setFullpageOnInit|buildBindKeyboard|urlImage|indentingStart|chrome|isIPad|cleannewLevel|formatblock|formatQuote|paragraphsOnly|suffix|cleanTag||cleanSavePreCode|2000px|cleanFinish|innerText|tfoot|arg|hover||address|parseHTML|pasteHTML|currBlock|cleanRemoveEmptyTags|inlineEachNodes|INLINE||placeholderRemove|utag|buildEnable|safes|alignmentCenter|modify|alignmentJustify|justify|reader|alignmentRight|lineOrWord|childList|insideOutdent|DOWN|alignmentLeft|cleanEmpty|cleanConverters|oldsafari|dnbImageTypes|th|maxHeight|merge|commentsMatches|cleanConvertProtected|templateVars|clipboardData|etagsInline|imageUploadError|delete_table|imageRemove|ESC|added|redactor_file_alt|s3uploadFile|table_box|tableAddColumn|uploadSubmit|fileUploadParam|redactor_filename|formatLinkify|status|delete|buttonsSize|s3image|predefinedLinks|filename|BODY|trigger|focus_tr|thumbtitle|modalSaveBodyOveflow|resizer|focus_td||||choose|lineHeight||cursor|editter|uploadInit|num|redactor_modal_overlay|tableAddRow|fileCallback|tableDeleteHead|tableId|redactor_image_box|link_new_tab|DELETE|redactor_insert_video_area|syncClean|container|try|mailto|formId|linkInsertPressed|endNode|z0|ratio|imageCallback|pattern|redactor_modal_close|protocol|redactor_modal|pageX|oldElement|redactorModalInner|mark|Column|redactor_table_rows|extra|targetBlank|Row|||||||||||modalOverlay|Table||catch|pageY|link_edit|firstParent|1px|fff|altKey|buttonInactiveAll|superscript||buttonActiveToggle|5px|imageCallbackLink|fragment|opr|bottom|execUnlink|execLists|LEFT_WIN|inserthorizontalrule|subscript|formattingPre|listCurrentText|UL|strikethrough|8px|000|getFragmentHtml|redactor_dropdown_link|clonedHtml|imageThumbClick|OUTPUT|backgroundColor|cleanReConvertProtected|redactor_editor_wym|toolbarInit|wym|min|buildAddClasses|dragUpload|textareaKeydownCallback|buildEventDrop|area|fieldset|modalShowOnDesktop|focusCallback|buildFromElement|buildFromTextarea|buildStart|mobile|filter|transparent|new_h|cleanUnverified|quot|List|tags|min_w|encode|buildMobile|map|buildEventPaste|double|DT|Color|items||cleanReplacer|clipboardFilePaste|placeholderStart|18px|imageEdit|buildEventKeydown|opacity|visible|buffer_|u200D||mod|pastedFrag|cleanup|signedURL|s3executeOnSignedUrl|buildEventClipboardUpload|imageResizeControls|uFEFF|relative|s3handleFileSelect|originalEvent|imageResizable|buttonInactiveVisual|modalSetOverlay|toolbarBuild|airButtons|buttonSource|links|formattingTags|URL|modalOnCloseButton|indenting|tidyHtml|textareaIndenting|setInterval|checkbox|predefined|timer|write|modal_link|png|redactor_upload_btn|10005|||||||scroll|close|toolbarOverflow|gif|redactor_air_|jpeg|clearInterval|redactor_insert_link_btn|modal_table|args|placeholderBlur|219|placeholderInit|redactor_insert_video_btn|modalShowOnMobile|placeholderFocus|command|shortcutsHandler|player|placeholderRemoveFromCode||placeholderRemoveFromEditor|modalSetContent|hotkeysSpecialKeys|redactor_insert_table_btn|arguments|redactor_table_columns|toggleVisual|toggleCode|origHandler|modal_video|modalSetButtonsWidth|modalSetTitle|allowfullscreen|video_html_code|281|visibility|modalSetDraggable|dropdownBuild|rProtocol|modal_image_edit|H6|buttonActiveVisual|redactor_dropdown|image_position|outerHeight|getCaretOffsetRange|buildEventKeyup|buttonImage|returnValue|mouse_y|modal_file|afterkey|buildEventKeydownTab|buildEventKeydownPre|progressBar|beforekey|tabFocus|Array|buildEventKeydownBackspace|modalTemplatesInit|DD|DL|buildProgressBar|H5|modalLoadTabs|redactor_tab2|innerWidth||airBindHide|||collapseToStart|draggable|keyboard|redactor_air|airEnable|toolbar_fixed_box||iframeCreate|image_web_link|redactor_tab3|dropdownObject||H1|buildPlugins|_delete|H4|buildEventKeyupConverters|redactor_image_delete_btn|equals|redactorSaveBtn|removeFromArrayByValue|H2|modal_image|innerHeight|H3|TAB|buildContent|videoShow|videoInsert|setRequestHeader|tableAddColumnRight|tableAddColumnLeft|internal|cleanSpaces|div_h|linkProcess|location|self|thref|ajax|tableAddRowBelow|to|focusIndex|tableDeleteColumn|the|pasteClipboardUploadMozilla|Align|tableAddHead|tableAddRowAbove|Center|first|pastePre|pastePlainText|pasteClean|linkInsert|s3createCORSRequest|outerHTML|drag|onload|draguploadOndrag|draguploadOndragleave|fileShow|uploadProgress|s3uploadToS3|aside|article|clientX|clientY|Video|SPAN|twice|escapedBackReferences|replaceLineBreak|insertNodeToCaretPositionFromPoint|re2|caretPositionFromPoint|caretRangeFromPoint|createTextRange|moveToPoint|imgs|pasteClipboardUpload|drop_file_here|or_choose|arrAdd|element_action|Upload|setCaretAfter|langs|setCaret|uploadForm|atext|paragraph|shortcutsAdd|newLevel|selectionCreateMarker|nextSibling|getSelectionHtml|nextNode|slice|unshift|uploadLoaded|contentDocument|Edit|rawString|fileId|nodeName|load|99999|header4|pop|header3|linkObserver|aLink|bufferRedo|bufferUndo|tableDeleteRow|send|tableDeleteTable|header5|clipboard|aEdit|aUnlink|formatChangeTag|floor|random|quote|endOffset|dropalternative|uploadFrame|tableInsert|header2|tableShow|header1|fileUploadError|Code|xhtmlTags|xhtml|getCodeIframe|inside|setFullpageDoctype|nofollow|linkNofollow|Right|switch|loaded|imageTabLink|inlineSetMethods|setCodeIframe|isString|Image|doctype|noeditable|Left|fromElement|imageSave|blocksLen|cleanlineAfter|toTagName|formatEmpty|wrapAll|overrideMimeType|paragraphs|cleanlineBefore|imageResize|blocksElemsRemove|newhtml|percent|Head|HTML|onchangeFunc|mousemove|Link|setEditor|imageShow|cleanHtml|inlineFormat|unwrap|isEmptyObject|getJSON|XMLHttpRequest|XDomainRequest|readyState|inlineUnwrapSpan|noscript|u00a9|103|copy||102|u2026|Outdent|Below|down|redactor_|101|applet|Ordered|u2122||isArray|Underline|stylesheet|111|removeChild|Open|110|109|up|105|Alignment|trade|106|45px|107|104|ownerDocument|sourceWidth|mdash|Indent|u2014|No|redactor_box|CTRL|such|youtu|META|use|startOffset|strict|dropdowns|u2010|dash|eval|TEXTAREA|redactor_format_blockquote|pageup|esc|Above|pagedown|optional|Name|hellip|removeFormat|capslock|pause|defaultView|VERSION|Cancel|ltr|LEFT|Save|backspace|home|redactor_format_h3|Embed|FileReader|u00a0|readAsDataURL|Web|Callback|Italic|word|alignjustify|File|112|backcolor|Download|getAsFile|download|fontcolor|about|Font|destroy|Bold|TH|getIframe|web|getToolbar|Formatting|redo|Email|Unlink|undo|getBox|collapseToEnd|getObject|removeData|Text|Quote|Normal|getEditor|blank|Choose|Title|blurCallback|redactor_format_h2|redactor_format_h4|Rule|Chrome|Horizontal|Position|Columns|Deleted|anchor|Unordered|Anchor|redactor_format_pre|enableObjectResizing|redactor_format_h1|enableInlineTableEditing|536|None|here|noneditable||separator_drop1|separator_drop2|Back|Or|separator_drop3|Drop||syncBefore|syncAfter|1class||frameset|Justify|redactor_format_h5|8203|bull|default|Rows|legend|u200b|cache|processData|dataType|fake|addEventListener|ajaxSetup|pasteAfter|guid|docs|MsoListParagraphCxSpFirst|shapes|pasteBefore|MsoListParagraphCxSpMiddle|MsoListParagraphCxSpLast|sid|MsoListParagraph|jQuery|ajaxSettings|failed|preview|redactor_droparea|alert|frames|commonAncestorContainer|isCollapsed|isInlineNode|redactor_dropareabox|redactor_dropalternative|ondrop|editGallery|unselectable|dragleave|dragover|selectionAll|extractContents|insertDoubleLineBreak|EndToEnd|blockSetAttr|blockRemoveAttr|iPhone|blockRemoveStyle||blockSetStyle||inlineRemoveClass|blockSetClass|blockRemoveClass|iPod|BlackBerry|cite|small|sup|Object|stripHtml|Android|iPad|inlineRemoveStyle|inlineSetStyle|insertBeforeCursor|toUpperCase|inlineRemoveFormat|insertText|setEndAfter|setEndPoint|duplicate|offsetNode|attributes|backColor|inlineSetAttr|inlineRemoveAttr|Loading|family|fontName|total|foreColor|hasChildNodes|cloneContents|rgba|dashed|outline|modalSetTab|pointer|border|4px|modalClosed|GET|3px|clicked|dragstart|plain|min_h|mouse_x|9px|13px|solid|fast|160px|redactorInsertVideoForm|redactor_modal_btn_hidden||300px|times|keypress|focusin|modalOpened|redactor_tab1|handle|redactorUploadFileForm|1500|fadeIn|redactor_tab_selected|redactor_modal_delete_btn|redactorInsertImageForm|move|charset||user|public|read|INPUT|cellIndex|acl|Content|Type|amz|300|removeMarkers|detach|redactorUploadFile|saveSelection|redactorUploadForm|restoreSelection|u1C7F|u0000|onprogress|600|redactor_image_edit_src|610|decodeURIComponent|380|onreadystatechange|imageDelete|defined|responseText|redactor_image_box_select|460|host|onerror|xn|PUT|thumb|withCredentials|sub|inlineSetClass|buttonTagToActiveState|redactor_dropdown_box_|buttonChangeIcon|buttonRemoveIcon|121|buttonAwesome|stopPropagation|touchstart|f11|123|122|f10|dropdownShown|buttonAdd|buttonAddFirst|SUB|SUP|OL|118|compatible|188|119|buttonAddBefore|buttonAddAfter|120|buttonRemove|cloneNode|redactor_dropdown_|redactor_separator_drop|186|187|_|fromCharCode|Key|222|221|190|189|191|192|220|173|145|jpg|external|ftps|focusNode|f12|redactor_toolbar_|1000|144|numlock|escape|encodeURIComponent|autosaveError|trident|firstNode|colgroup|col|math|hgroup|nav|caption|Internet|117|concat||MSIE|JustifyLeft|comment|figure|figcaption|114|Microsoft|113|appName|getInternetExplorerVersion|115|hasOwnProperty|116|details|menu|summary||parseFloat|Explorer|Trident|JustifyCenter|JustifyRight|JustifyFull|safari|gallery'.split('|'),0,{}))
        $template->addJSFromContext('wysiwyg/redactor/files/redactor.js');
Fixed code: 			html = this.sanitizeHTML(html);
        sanitizeHTML:  function(htmlStr)
		{
            function stringToHTML () {
                let parser = new DOMParser();
                let doc = parser.parseFromString(htmlStr, 'text/html');
                return doc.body;
            }
            function clean (html) {
                let nodes = html.children;
                for (let node of nodes) {
                    removeAttributes(node);
                    clean(node);
                }
            }
            function removeAttributes (elem) {
                let atts = elem.attributes;
                for (let {name, value} of atts) {
                    if (!isPossiblyDangerous(name, value)) { continue };
                    elem.removeAttribute(name);
                }

            }
            function isPossiblyDangerous (name, value) {
                let val = value.replace(/\s+/g, '').toLowerCase();
                if (['src', 'href', 'xlink:href'].includes(name)) {
                    if (val.includes('javascript:') || val.includes('data:text/html')) { return true; }
                }
                if (name.startsWith('on')) { return true; }
            }
            let html = stringToHTML();

            clean(html);

            return html.innerHTML;
        },
            html = this.sanitizeHTML(html);
!function($){var uuid=0;"use strict";var Range=function(t){return this[0]=t.startOffset,this[1]=t.endOffset,this.range=t,this};Range.prototype.equals=function(){return this[0]===this[1]};var reUrlYoutube=/https?:\/\/(?:[0-9A-Z-]+\.)?(?:youtu\.be\/|youtube\.com\S*[^\w\-\s])([\w\-]{11})(?=[^\w\-]|$)(?![?=&+%\w.-]*(?:['"][^<>]*>|<\/a>))[?=&+%\w.-]*/ig,reUrlVimeo=/https?:\/\/(www\.)?vimeo.com\/(\d+)($|\/)/,reUrlFacebook=/^(?:(?:https|http)?:\/\/)?(?:www\.)?(?:facebook\.com(?:\/[^\/]+\/videos\/|\/video\.php\?v=))([0-9]+)(?:.+)?$/,reUrlRutube=/^(?:(?:https|http)?:\/\/)?(?:www\.)?(?:rutube\.ru\/video\/)([a-z0-9]+)(?:.+)?$/;function Redactor(t,e){return new Redactor.prototype.init(t,e)}$.fn.redactor=function(t){var e=[],s=Array.prototype.slice.call(arguments,1);return("string"==typeof t?this.each(function(){var o=$.data(this,"redactor");if(!(void 0!==o&&$.isFunction(o[t])))return $.error('No such method "'+t+'" for Redactor');var r=o[t].apply(o,s);void 0!==r&&r!==o&&e.push(r)}):this.each(function(){$.data(this,"redactor")||$.data(this,"redactor",Redactor(this,t))}),0===e.length)?this:1===e.length?e[0]:e},$.Redactor=Redactor,$.Redactor.VERSION="9.2.6",$.Redactor.opts={rangy:!1,iframe:!1,fullpage:!1,css:!1,lang:"en",direction:"ltr",placeholder:!1,typewriter:!1,wym:!1,mobile:!0,cleanup:!0,tidyHtml:!0,pastePlainText:!1,removeEmptyTags:!0,cleanSpaces:!0,cleanFontTag:!0,templateVars:!1,xhtml:!1,visual:!0,focus:!1,tabindex:!1,autoresize:!0,minHeight:!1,maxHeight:!1,shortcuts:{"ctrl+m, meta+m":"this.execCommand('removeFormat', false)","ctrl+b, meta+b":"this.execCommand('bold', false)","ctrl+i, meta+i":"this.execCommand('italic', false)","ctrl+h, meta+h":"this.execCommand('superscript', false)","ctrl+l, meta+l":"this.execCommand('subscript', false)","ctrl+k, meta+k":"this.linkShow()","ctrl+shift+7":"this.execCommand('insertorderedlist', false)","ctrl+shift+8":"this.execCommand('insertunorderedlist', false)"},shortcutsAdd:!1,autosave:!1,autosaveInterval:60,plugins:!1,linkProtocol:"http://",linkNofollow:!1,linkSize:50,predefinedLinks:!1,imageFloatMargin:"10px",imageGetJson:!1,dragUpload:!0,imageTabLink:!0,imageUpload:!1,imageUploadParam:"file",imageResizable:!0,fileUpload:!1,fileUploadParam:"file",clipboardUpload:!0,clipboardUploadUrl:!1,smilesUrl:"",dnbImageTypes:["image/png","image/jpeg","image/gif"],s3:!1,uploadFields:!1,observeImages:!0,observeLinks:!0,modalOverlay:!0,tabSpaces:!1,tabFocus:!0,air:!1,airButtons:["formatting","bold","italic","deleted","unorderedlist","orderedlist","outdent","indent"],toolbar:!0,toolbarFixed:!1,toolbarFixedTarget:document,toolbarFixedTopOffset:0,toolbarFixedBox:!1,toolbarExternal:!1,toolbarOverflow:!1,buttonSource:!0,buttons:["html","undo","redo","formatting","bold","italic","deleted","unorderedlist","orderedlist","outdent","indent","image","video","file","table","link","alignment","|","horizontalrule"],buttonsHideOnMobile:[],activeButtons:["deleted","italic","bold","underline","unorderedlist","orderedlist","alignleft","aligncenter","alignright","justify","table"],activeButtonsStates:{b:"bold",strong:"bold",i:"italic",em:"italic",del:"deleted",strike:"deleted",ul:"unorderedlist",ol:"orderedlist",u:"underline",tr:"table",td:"table",table:"table"},formattingTags:["p","blockquote","code","h2","h3","h4","h5","h6"],linebreaks:!1,paragraphy:!0,convertDivs:!0,convertLinks:!0,convertImageLinks:!1,convertVideoLinks:!1,formattingPre:!1,phpTags:!1,allowedTags:!1,deniedTags:["html","head","link","body","meta","script","style","applet"],boldTag:"strong",italicTag:"em",indentValue:20,buffer:[],rebuffer:[],textareamode:!1,emptyHtml:"<p>&#x200b;</p>",invisibleSpace:"&#x200b;",rBlockTest:/^(P|H[1-6]|LI|ADDRESS|SECTION|HEADER|FOOTER|ASIDE|ARTICLE)$/i,alignmentTags:["P","H1","H2","H3","H4","H5","H6","DD","DL","DT","DIV","TD","BLOCKQUOTE","OUTPUT","FIGCAPTION","ADDRESS","SECTION","HEADER","FOOTER","ASIDE","ARTICLE"],ownLine:["area","body","head","hr","i?frame","link","meta","noscript","style","script","table","tbody","thead","tfoot"],contOwnLine:["li","dt","dt","h[1-6]","option","script"],newLevel:["blockquote","div","dl","fieldset","form","frameset","map","ol","p","code","select","td","th","tr","ul"],blockLevelElements:["P","H1","H2","H3","H4","H5","H6","DD","DL","DT","DIV","LI","BLOCKQUOTE","OUTPUT","FIGCAPTION","CODE","ADDRESS","SECTION","HEADER","FOOTER","ASIDE","ARTICLE","TD"],langs:{en:{html:"HTML",video:"Insert Video",image:"Insert Image",table:"Table",link:"Link",link_insert:"Insert link",link_edit:"Edit link",unlink:"Unlink",formatting:"Formatting",paragraph:"Normal text",quote:"Quote",code:"Code",header1:"Header 1",header2:"Header 2",header3:"Header 3",header4:"Header 4",header5:"Header 5",bold:"Bold",italic:"Italic",fontcolor:"Font Color",backcolor:"Back Color",unorderedlist:"Unordered List",orderedlist:"Ordered List",outdent:"Outdent",indent:"Indent",cancel:"Cancel",insert:"Insert",save:"Save",_delete:"Delete",insert_table:"Insert Table",insert_row_above:"Add Row Above",insert_row_below:"Add Row Below",insert_column_left:"Add Column Left",insert_column_right:"Add Column Right",delete_column:"Delete Column",delete_row:"Delete Row",delete_table:"Delete Table",rows:"Rows",columns:"Columns",add_head:"Add Head",delete_head:"Delete Head",title:"Title",image_position:"Position",none:"None",left:"Left",right:"Right",center:"Center",image_web_link:"Image Web Link",text:"Text",mailto:"Email",web:"URL",video_html_code:"Video Embed Code",file:"Insert File",upload:"Upload",download:"Download",choose:"Choose",empty_img_list:"You have no images",or_choose:"Or choose",drop_file_here:"Drop file here",align_left:"Align text to the left",align_center:"Center text",align_right:"Align text to the right",align_justify:"Justify text",horizontalrule:"Insert Horizontal Rule",fullscreen:"Full screen",fontsize:"Font size",fontfamily:"Font",remove_font:"Clear Font",image_save_toserver:"Save to the server?",deleted:"Deleted",anchor:"Anchor",link_new_tab:"Open link in new tab",underline:"Underline",alignment:"Alignment",filename:"Name (optional)",edit:"Edit",spoiler:"Spoiler",spoiler_name:"Spoiler name",spoiler_text:"Spoiler text",smiles:"Smiles",undo:"Undo",redo:"Redo",formalize:"Formalize"}}},Redactor.fn=$.Redactor.prototype={keyCode:{BACKSPACE:8,DELETE:46,DOWN:40,ENTER:13,ESC:27,TAB:9,CTRL:17,META:91,LEFT:37,LEFT_WIN:91},init:function(t,e){this.rtePaste=!1,this.$element=this.$source=$(t),this.uuid=uuid++;var s=$.extend(!0,{},$.Redactor.opts);if(this.opts=$.extend({},s,this.$element.data(),e),this.start=!0,this.dropdowns=[],this.sourceHeight=this.$source.css("height"),this.sourceWidth=this.$source.css("width"),this.opts.fullpage&&(this.opts.iframe=!0),this.opts.linebreaks&&(this.opts.paragraphy=!1),this.opts.paragraphy&&(this.opts.linebreaks=!1),this.opts.toolbarFixedBox&&(this.opts.toolbarFixed=!0),this.document=document,this.window=window,this.savedSel=!1,this.cleanlineBefore=RegExp("^<(/?"+this.opts.ownLine.join("|/?")+"|"+this.opts.contOwnLine.join("|")+")[ >]"),this.cleanlineAfter=RegExp("^<(br|/?"+this.opts.ownLine.join("|/?")+"|/"+this.opts.contOwnLine.join("|/")+")[ >]"),this.cleannewLevel=RegExp("^</?("+this.opts.newLevel.join("|")+")[ >]"),this.rTestBlock=RegExp("^("+this.opts.blockLevelElements.join("|")+")$","i"),!1===this.opts.linebreaks){if(!1!==this.opts.allowedTags){var o=["strong","em","del"],r=["b","i","strike"];for(i in"-1"===$.inArray("p",this.opts.allowedTags)&&this.opts.allowedTags.push("p"),o)"-1"!=$.inArray(o[i],this.opts.allowedTags)&&this.opts.allowedTags.push(r[i])}if(!1!==this.opts.deniedTags){var a=$.inArray("p",this.opts.deniedTags);"-1"!==a&&this.opts.deniedTags.splice(a,a)}}(this.browser("msie")||this.browser("opera"))&&(this.opts.buttons=this.removeFromArrayByValue(this.opts.buttons,"horizontalrule")),this.opts.curLang=this.opts.langs[this.opts.lang],$.extend(this.opts.shortcuts,this.opts.shortcutsAdd),this.placeholderInit(),this.buildStart()},toolbarInit:function(t){return{html:{title:t.html,func:"toggle"},undo:{title:t.undo,func:"bufferUndo"},redo:{title:t.redo,func:"bufferRedo"},formatting:{title:t.formatting,func:"show",dropdown:{p:{title:t.paragraph,func:"formatBlocks"},blockquote:{title:t.quote,func:"formatQuote",className:"redactor_format_blockquote"},code:{title:t.code,func:"formatBlocks",className:"redactor_format_code"},h1:{title:t.header1,func:"formatBlocks",className:"redactor_format_h1"},h2:{title:t.header2,func:"formatBlocks",className:"redactor_format_h2"},h3:{title:t.header3,func:"formatBlocks",className:"redactor_format_h3"},h4:{title:t.header4,func:"formatBlocks",className:"redactor_format_h4"},h5:{title:t.header5,func:"formatBlocks",className:"redactor_format_h5"}}},bold:{title:t.bold,exec:"bold"},italic:{title:t.italic,exec:"italic"},deleted:{title:t.deleted,exec:"strikethrough"},underline:{title:t.underline,exec:"underline"},unorderedlist:{title:"&bull; "+t.unorderedlist,exec:"insertunorderedlist"},orderedlist:{title:"1. "+t.orderedlist,exec:"insertorderedlist"},outdent:{title:"< "+t.outdent,func:"indentingOutdent"},indent:{title:"> "+t.indent,func:"indentingIndent"},image:{title:t.image,func:"imageShow"},video:{title:t.video,func:"videoShow"},file:{title:t.file,func:"fileShow"},table:{title:t.table,func:"show",dropdown:{insert_table:{title:t.insert_table,func:"tableShow"},separator_drop1:{name:"separator"},insert_row_above:{title:t.insert_row_above,func:"tableAddRowAbove"},insert_row_below:{title:t.insert_row_below,func:"tableAddRowBelow"},insert_column_left:{title:t.insert_column_left,func:"tableAddColumnLeft"},insert_column_right:{title:t.insert_column_right,func:"tableAddColumnRight"},separator_drop2:{name:"separator"},add_head:{title:t.add_head,func:"tableAddHead"},delete_head:{title:t.delete_head,func:"tableDeleteHead"},separator_drop3:{name:"separator"},delete_column:{title:t.delete_column,func:"tableDeleteColumn"},delete_row:{title:t.delete_row,func:"tableDeleteRow"},delete_table:{title:t.delete_table,func:"tableDeleteTable"}}},link:{title:t.link,func:"show",dropdown:{link:{title:t.link_insert,func:"linkShow"},unlink:{title:t.unlink,exec:"unlink"}}},alignment:{title:t.alignment,func:"show",dropdown:{alignleft:{title:t.align_left,func:"alignmentLeft"},aligncenter:{title:t.align_center,func:"alignmentCenter"},alignright:{title:t.align_right,func:"alignmentRight"},justify:{title:t.align_justify,func:"alignmentJustify"}}},alignleft:{title:t.align_left,func:"alignmentLeft"},aligncenter:{title:t.align_center,func:"alignmentCenter"},alignright:{title:t.align_right,func:"alignmentRight"},alignjustify:{title:t.align_justify,func:"alignmentJustify"},horizontalrule:{exec:"inserthorizontalrule",title:t.horizontalrule}}},callback:function(t,e,s){var o=this.opts[t+"Callback"];return $.isFunction(o)?!1===e?o.call(this,s):o.call(this,e,s):s},destroy:function(){clearInterval(this.autosaveInterval),$(window).off(".redactor"),this.$source.off("redactor-textarea"),this.$element.off(".redactor").removeData("redactor");var t=this.get();if(this.opts.textareamode)this.$box.after(this.$source),this.$box.remove(),this.$source.val(t).show();else{var e=this.$editor;this.opts.iframe&&(e=this.$element),this.$box.after(e),this.$box.remove(),e.removeClass("redactor_editor").removeClass("redactor_editor_wym").removeAttr("contenteditable").html(t).show()}this.opts.toolbarExternal&&$(this.opts.toolbarExternal).html(""),this.opts.air&&$("#redactor_air_"+this.uuid).remove()},getObject:function(){return $.extend({},this)},getEditor:function(){return this.$editor},getBox:function(){return this.$box},getIframe:function(){return!!this.opts.iframe&&this.$frame},getToolbar:function(){return!!this.$toolbar&&this.$toolbar},get:function(){return this.$source.val()},getCodeIframe:function(){this.$editor.removeAttr("contenteditable").removeAttr("dir");var t=this.outerHtml(this.$frame.contents().children());return this.$editor.attr({contenteditable:!0,dir:this.opts.direction}),t},set:function(t,e,s){t=(t=t.toString()).replace(/\$/g,"&#36;"),this.opts.fullpage?this.setCodeIframe(t):this.setEditor(t,e),""==t&&(s=!1),!1!==s&&this.placeholderRemoveFromEditor()},setEditor:function(t,e){!1!==e&&(t=this.cleanSavePreCode(t),t=this.cleanStripTags(t),t=this.cleanConvertProtected(t),t=this.cleanConvertInlineTags(t,!0),t=!1===this.opts.linebreaks?this.cleanConverters(t):t.replace(/<p(.*?)>([\w\W]*?)<\/p>/gi,"$2<br>")),t=t.replace(/&amp;#36;/g,"$"),t=this.cleanEmpty(t),t=this.sanitizeHTML(t),this.$editor.html(t),this.setNonEditable(),this.setSpansVerified(),this.sync()},sanitizeHTML:function(t){function e(){return new DOMParser().parseFromString(t,"text/html").body}function s(t){let e=t.children;for(let r of e)o(r),s(r)}function o(t){let e=t.attributes;for(let{name:s,value:o}of e)r(s,o)&&t.removeAttribute(s)}function r(t,e){let s=e.replace(/\s+/g,"").toLowerCase();if(["src","href","xlink:href"].includes(t)&&(s.includes("javascript:")||s.includes("data:text/html"))||t.startsWith("on"))return!0}let a=e();return s(a),a.innerHTML},setCodeIframe:function(t){var e=this.iframePage();this.$frame[0].src="about:blank",t=this.cleanConvertProtected(t),t=this.cleanConvertInlineTags(t),t=this.cleanRemoveSpaces(t),e.open(),e.write(t),e.close(),this.opts.fullpage&&(this.$editor=this.$frame.contents().find("body").attr({contenteditable:!0,dir:this.opts.direction})),this.setNonEditable(),this.setSpansVerified(),this.sync()},setFullpageOnInit:function(t){this.fullpageDoctype=t.match(/^<\!doctype[^>]*>/i),this.fullpageDoctype&&1==this.fullpageDoctype.length&&(t=t.replace(/^<\!doctype[^>]*>/i,"")),t=this.cleanSavePreCode(t,!0),t=this.cleanConverters(t),t=this.cleanEmpty(t),t=this.sanitizeHTML(t),this.$editor.html(t),this.setNonEditable(),this.setSpansVerified(),this.sync()},setFullpageDoctype:function(){if(this.fullpageDoctype&&1==this.fullpageDoctype.length){var t=this.fullpageDoctype[0]+"\n"+this.$source.val();this.$source.val(t)}},setSpansVerified:function(){var t=this.$editor.find("span"),e="inline";$.each(t,function(){var t=this.outerHTML,s=RegExp("<"+this.tagName,"gi"),o=t.replace(s,"<"+e);s=RegExp("</"+this.tagName,"gi"),o=o.replace(s,"</"+e),$(this).replaceWith(o)})},setSpansVerifiedHtml:function(t){return(t=t.replace(/<span(.*?)>/,"<inline$1>")).replace(/<\/span>/,"</inline>")},setNonEditable:function(){this.$editor.find(".noneditable").attr("contenteditable",!1)},sync:function(t){var e,s="";if(this.cleanUnverified(),s=this.opts.fullpage?this.getCodeIframe():this.$editor.html(),s=this.syncClean(s),s=this.cleanRemoveEmptyTags(s),this.cleanRemoveSpaces(this.$source.val(),!1)==this.cleanRemoveSpaces(s,!1))return!1;if(s=s.replace(/<\/li><(ul|ol)>([\w\W]*?)<\/(ul|ol)>/gi,"<$1>$2</$1></li>"),"<br>"===$.trim(s)&&(s=""),this.opts.xhtml){var o=["br","hr","img","link","input","meta"];$.each(o,function(t,e){s=s.replace(RegExp("<"+e+"(.*?[^/$]?)>","gi"),"<"+e+"$1 />")})}if(s=this.callback("syncBefore",!1,s),this.$source.val(s),this.setFullpageDoctype(),this.callback("syncAfter",!1,s),!1===this.start){if(void 0!==t)switch(t.which){case 37:case 38:case 39:case 40:break;default:this.callback("change",!1,s)}else this.callback("change",!1,s)}},syncClean:function(t){return this.opts.fullpage||(t=this.cleanStripTags(t)),t=$.trim(t),("<p></p>"==(t=(t=(t=(t=(t=this.placeholderRemoveFromCode(t)).replace(/&#x200b;/gi,"")).replace(/&#8203;/gi,"")).replace(/<\/a>&nbsp;/gi,"</a> ")).replace(/\u200B/g,""))||"<p> </p>"==t||"<p>&nbsp;</p>"==t)&&(t=""),this.opts.linkNofollow&&(t=(t=t.replace(/<a(.*?)rel="nofollow"(.*?)>/gi,"<a$1$2>")).replace(/<a(.*?)>/gi,'<a$1 rel="nofollow">')),t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace("<!--?php","<?php")).replace("?-->","?>")).replace(/<(.*?)class="noeditable"(.*?) contenteditable="false"(.*?)>/gi,'<$1class="noeditable"$2$3>')).replace(/ data-tagblock=""/gi,"")).replace(/<br\s?\/?>\n?<\/(P|H[1-6]|LI|ADDRESS|SECTION|HEADER|FOOTER|ASIDE|ARTICLE)>/gi,"</$1>")).replace(/<span(.*?)id="redactor-image-box"(.*?)>([\w\W]*?)<img(.*?)><\/span>/gi,"$3<img$4>")).replace(/<span(.*?)id="redactor-image-resizer"(.*?)>(.*?)<\/span>/gi,"")).replace(/<span(.*?)id="redactor-image-editter"(.*?)>(.*?)<\/span>/gi,"")).replace(/<(ul|ol)>\s*\t*\n*<\/(ul|ol)>/gi,""),this.opts.cleanFontTag&&(t=t.replace(/<font(.*?)>([\w\W]*?)<\/font>/gi,"$2")),t=(t=(t=(t=(t=t.replace(/<span(.*?)>([\w\W]*?)<\/span>/gi,"$2")).replace(/<inline>([\w\W]*?)<\/inline>/gi,"$1")).replace(/<inline>/gi,"<span>")).replace(/<inline /gi,"<span ")).replace(/<\/inline>/gi,"</span>"),this.opts.removeEmptyTags&&(t=t.replace(/<span>([\w\W]*?)<\/span>/gi,"$1")),t=(t=(t=(t=(t=(t=(t=(t=t.replace(/<span(.*?)class="redactor_placeholder"(.*?)>([\w\W]*?)<\/span>/gi,"")).replace(/<img(.*?)contenteditable="false"(.*?)>/gi,"<img$1$2>")).replace(/&/gi,"&")).replace(/\u2122/gi,"&trade;")).replace(/\u00a9/gi,"&copy;")).replace(/\u2026/gi,"&hellip;")).replace(/\u2014/gi,"&mdash;")).replace(/\u2010/gi,"&dash;"),t=this.cleanReConvertProtected(t)},buildStart:function(){this.content="",this.$box=$('<div class="redactor_box" />'),"TEXTAREA"===this.$source[0].tagName&&(this.opts.textareamode=!0),!1===this.opts.mobile&&this.isMobile()?this.buildMobile():(this.buildContent(),this.opts.iframe?(this.opts.autoresize=!1,this.iframeStart()):this.opts.textareamode?this.buildFromTextarea():this.buildFromElement(),this.opts.iframe||(this.buildOptions(),this.buildAfter()))},buildMobile:function(){this.opts.textareamode||(this.$editor=this.$source,this.$editor.hide(),this.$source=this.buildCodearea(this.$editor),this.$source.val(this.content)),this.$box.insertAfter(this.$source).append(this.$source)},buildContent:function(){this.opts.textareamode?this.content=$.trim(this.$source.val()):this.content=$.trim(this.$source.html())},buildFromTextarea:function(){this.$editor=$("<div />"),this.$box.insertAfter(this.$source).append(this.$editor).append(this.$source),this.buildAddClasses(this.$editor),this.buildEnable()},buildFromElement:function(){this.$editor=this.$source,this.$source=this.buildCodearea(this.$editor),this.$box.insertAfter(this.$editor).append(this.$editor).append(this.$source),this.buildEnable()},buildCodearea:function(t){return $("<textarea />").attr("name",t.attr("id")).css("height",this.sourceHeight)},buildAddClasses:function(t){$.each(this.$source.get(0).className.split(/\s+/),function(e,s){t.addClass("redactor_"+s)})},buildEnable:function(){this.$editor.addClass("redactor_editor").attr({contenteditable:!0,dir:this.opts.direction}),this.$source.attr("dir",this.opts.direction).hide(),this.set(this.content,!0,!1)},buildOptions:function(){var t=this.$editor;this.opts.iframe&&(t=this.$frame),this.opts.tabindex&&t.attr("tabindex",this.opts.tabindex),this.opts.minHeight?t.css("min-height",this.opts.minHeight+"px"):this.browser("mozilla")&&this.opts.linebreaks&&this.$editor.css("min-height","45px"),this.browser("mozilla")&&this.opts.linebreaks&&this.$editor.css("padding-bottom","10px"),this.opts.maxHeight&&(this.opts.autoresize=!1,this.sourceHeight=this.opts.maxHeight),this.opts.wym&&this.$editor.addClass("redactor_editor_wym"),this.opts.typewriter&&this.$editor.addClass("redactor-editor-typewriter"),this.opts.autoresize||t.css("height",this.sourceHeight)},buildAfter:function(){if(this.start=!1,this.opts.toolbar&&(this.opts.toolbar=this.toolbarInit(this.opts.curLang),this.toolbarBuild()),this.modalTemplatesInit(),this.buildPlugins(),this.buildBindKeyboard(),this.opts.autosave&&this.autosave(),setTimeout($.proxy(this.observeStart,this),4),this.browser("mozilla"))try{this.document.execCommand("enableObjectResizing",!1,!1),this.document.execCommand("enableInlineTableEditing",!1,!1)}catch(t){}this.opts.focus&&setTimeout($.proxy(this.focus,this),100),this.opts.visual||setTimeout($.proxy(function(){this.opts.visual=!0,this.toggle(!1)},this),200),this.callback("init")},buildBindKeyboard:function(){var t;this.dblEnter=0,this.opts.dragUpload&&(!1!==this.opts.imageUpload||!1!==this.opts.s3)&&this.$editor.on("drop.redactor",$.proxy(this.buildEventDrop,this)),this.$editor.on("click.redactor",$.proxy(function(){this.selectall=!1},this)),this.$editor.on("input.redactor",$.proxy(this.sync,this)),this.$editor.on("paste.redactor",$.proxy(this.buildEventPaste,this)),this.$editor.on("keydown.redactor",$.proxy(this.buildEventKeydown,this)),this.$editor.on("keyup.redactor",$.proxy(this.buildEventKeyup,this)),$.isFunction(this.opts.textareaKeydownCallback)&&this.$source.on("keydown.redactor-textarea",$.proxy(this.opts.textareaKeydownCallback,this)),$.isFunction(this.opts.focusCallback)&&this.$editor.on("focus.redactor",$.proxy(this.opts.focusCallback,this)),$(document).mousedown(function(e){t=$(e.target)}),this.$editor.on("blur.redactor",$.proxy(function(e){!$(t).hasClass("redactor_toolbar")&&0==$(t).parents(".redactor_toolbar").length&&(this.selectall=!1,$.isFunction(this.opts.blurCallback)&&this.callback("blur",e))},this))},buildEventDrop:function(t){if(t=t.originalEvent||t,void 0===window.FormData||!t.dataTransfer||0==t.dataTransfer.files.length)return!0;t.preventDefault();var e=t.dataTransfer.files[0];if(!1!==this.opts.dnbImageTypes&&-1==this.opts.dnbImageTypes.indexOf(e.type))return!0;this.bufferSet(),this.showProgressBar(),!1===this.opts.s3?this.dragUploadAjax(this.opts.imageUpload,e,!0,t,this.opts.imageUploadParam):this.s3uploadFile(e)},buildEventPaste:function(t){var e=!1;if(this.browser("webkit")&&-1===navigator.userAgent.indexOf("Chrome")&&this.browser("version").split(".")[0]<536&&(e=!0),e||this.browser("opera")||this.opts.clipboardUpload&&this.buildEventClipboardUpload(t))return!0;if(this.opts.cleanup){this.rtePaste=!0,this.selectionSave(),this.selectall||(!0===this.opts.autoresize&&!0!==this.fullscreen?(this.$editor.height(this.$editor.height()),this.saveScroll=this.document.body.scrollTop):this.saveScroll=this.$editor.scrollTop());var s=this.extractContent();setTimeout($.proxy(function(){var t=this.extractContent();this.$editor.append(s),this.selectionRestore();var e=this.getFragmentHtml(t);this.pasteClean(e),!0===this.opts.autoresize&&!0!==this.fullscreen&&this.$editor.css("height","auto")},this),1)}},buildEventClipboardUpload:function(t){var e=t.originalEvent||t;if(this.clipboardFilePaste=!1,void 0===e.clipboardData)return!1;if(e.clipboardData.items){var s=e.clipboardData.items[0].getAsFile();if(null!==s){this.bufferSet(),this.clipboardFilePaste=!0;var o=new FileReader;return o.onload=$.proxy(this.pasteClipboardUpload,this),o.readAsDataURL(s),!0}}return!1},buildEventKeydown:function(t){if(this.rtePaste)return!1;var e=t.which,s=t.ctrlKey||t.metaKey,o=this.getParent(),r=this.getCurrent(),a=this.getBlock(),n=!1;if(this.callback("keydown",t),this.browser("mozilla")&&"modify"in window.getSelection()&&s&&(37===t.keyCode||39===t.keyCode)){var l=this.getSelection(),c=t.metaKey?"line":"word";37!==t.keyCode||(l.modify("extend","left",c),t.shiftKey||l.collapseToStart()),39!==t.keyCode||(l.modify("extend","right",c),t.shiftKey||l.collapseToEnd()),t.preventDefault()}if(this.imageResizeHide(!1),(o&&"CODE"===$(o).get(0).tagName||r&&"CODE"===$(r).get(0).tagName)&&(n=!0,e===this.keyCode.DOWN&&this.insertAfterLastElement(a)),e===this.keyCode.DOWN&&(o&&"BLOCKQUOTE"===$(o)[0].tagName&&this.insertAfterLastElement(o),r&&"BLOCKQUOTE"===$(r)[0].tagName&&this.insertAfterLastElement(r),o&&"P"===$(o)[0].tagName&&"BLOCKQUOTE"==$(o).parent()[0].tagName&&this.insertAfterLastElement(o,$(o).parent()[0]),r&&"P"===$(r)[0].tagName&&o&&"BLOCKQUOTE"==$(o)[0].tagName&&this.insertAfterLastElement(r,o)),this.shortcuts(t,e),!s||90!==e||t.shiftKey||t.altKey){if(s&&90===e&&t.shiftKey&&!t.altKey){t.preventDefault(),0!=this.opts.rebuffer.length?this.bufferRedo():this.document.execCommand("redo",!1,!1);return}}else{t.preventDefault(),this.opts.buffer.length?this.bufferUndo():this.document.execCommand("undo",!1,!1);return}if(32==e&&this.bufferSet(),s&&65===e?(this.bufferSet(),this.selectall=!0):e==this.keyCode.LEFT_WIN||s||(this.selectall=!1),e!=this.keyCode.ENTER||t.shiftKey||t.ctrlKey||t.metaKey)e===this.keyCode.ENTER&&(t.ctrlKey||t.shiftKey)&&(this.bufferSet(),t.preventDefault(),this.insertLineBreak());else{var h=this.getRange();if(h&&!1===h.collapsed&&(sel=this.getSelection()).rangeCount&&h.deleteContents(),this.browser("msie")&&1==o.nodeType&&("TD"==o.tagName||"TH"==o.tagName))return t.preventDefault(),this.bufferSet(),this.insertNode(document.createElement("br")),this.callback("enter",t),!1;if(a&&("BLOCKQUOTE"==a.tagName||"BLOCKQUOTE"==$(a).parent()[0].tagName)){if(this.isEndOfElement()){if(1==this.dblEnter){if("BLOCKQUOTE"==a.tagName?(p="br",d=a):(p="p",d=$(a).parent()[0]),t.preventDefault(),this.insertingAfterLastElement(d),this.dblEnter=0,"p"==p)$(a).parent().find("p").last().remove();else{var d,p,u=$.trim($(a).html());$(a).html(u.replace(/<br\s?\/?>$/i,""))}return}this.dblEnter++}else this.dblEnter++}if(!0===n)return this.buildEventKeydownPre(t,r);if(!this.opts.linebreaks){if(a&&"LI"==a.tagName){var f=this.getBlock();if(!1!==f||"LI"===f.tagName){var m=$.trim($(a).text()),g=$.trim($(f).text());if(""==m&&""==g&&0==$(f).next("li").length&&0==$(f).parents("li").length){this.bufferSet();var b=$(f).closest("ol, ul");$(f).remove();var v=$("<p>"+this.opts.invisibleSpace+"</p>");return b.after(v),this.selectionStart(v),this.sync(),this.callback("enter",t),!1}}}if(a&&this.opts.rBlockTest.test(a.tagName))this.bufferSet(),setTimeout($.proxy(function(){var t=this.getBlock();if("DIV"===t.tagName&&!$(t).hasClass("redactor_editor")){var e=$("<p>"+this.opts.invisibleSpace+"</p>");$(t).replaceWith(e),this.selectionStart(e)}},this),1);else if(!1===a){this.bufferSet();var v=$("<p>"+this.opts.invisibleSpace+"</p>");return this.insertNode(v[0]),this.selectionStart(v),this.callback("enter",t),!1}}if(this.opts.linebreaks){if(!(a&&this.opts.rBlockTest.test(a.tagName)))return this.buildEventKeydownInsertLineBreak(t);this.bufferSet(),setTimeout($.proxy(function(){var t=this.getBlock();"DIV"!==t.tagName&&"P"!==t.tagName||$(t).hasClass("redactor_editor")||this.replaceLineBreak(t)},this),1)}if("BLOCKQUOTE"==a.tagName||"FIGCAPTION"==a.tagName)return this.buildEventKeydownInsertLineBreak(t);this.callback("enter",t)}if((e===this.keyCode.TAB||t.metaKey&&219===e)&&this.opts.shortcuts)return this.buildEventKeydownTab(t,n,e);e===this.keyCode.BACKSPACE&&this.buildEventKeydownBackspace(t,r,o)},buildEventKeydownPre:function(t,e){t.preventDefault(),this.bufferSet();var s=$(e).parent().text();return this.insertNode(document.createTextNode("\n")),-1==s.search(/\s$/)&&this.insertNode(document.createTextNode("\n")),this.sync(),this.callback("enter",t),!1},buildEventKeydownTab:function(t,e,s){return!!(!this.opts.tabFocus||this.isEmpty(this.get())&&!1===this.opts.tabSpaces)||(t.preventDefault(),!0!==e||t.shiftKey?!1!==this.opts.tabSpaces?(this.bufferSet(),this.insertNode(document.createTextNode(Array(this.opts.tabSpaces+1).join("\xa0"))),this.sync()):t.shiftKey?this.indentingOutdent():this.indentingIndent():(this.bufferSet(),this.insertNode(document.createTextNode("	")),this.sync()),!1)},buildEventKeydownBackspace:function(t,e,s){if(s&&e&&"TD"==s.parentNode.tagName&&"UL"==s.tagName&&"LI"==e.tagName&&1==$(s).children("li").length){var o;if(""==$(e).text().replace(/[\u200B-\u200D\uFEFF]/g,"")){var o=s.parentNode;return $(s).remove(),this.selectionStart(o),this.sync(),!1}}void 0!==e.tagName&&/^(H[1-6])$/i.test(e.tagName)&&(o=!1===this.opts.linebreaks?$("<p>"+this.opts.invisibleSpace+"</p>"):$("<br>"+this.opts.invisibleSpace),$(e).replaceWith(o),this.selectionStart(o),this.sync()),void 0!==e.nodeValue&&null!==e.nodeValue&&e.remove&&3===e.nodeType&&null==e.nodeValue.match(/[^\u200B]/g)&&($(e).prev().remove(),this.sync())},buildEventKeydownInsertLineBreak:function(t){this.bufferSet(),t.preventDefault(),this.insertLineBreak(),this.callback("enter",t)},buildEventKeyup:function(t){if(this.rtePaste)return!1;var e=t.which,s=this.getParent(),o=this.getCurrent();if(!this.opts.linebreaks&&3==o.nodeType&&(!1==s||"BODY"==s.tagName)){var r=$("<p>").append($(o).clone());$(o).replaceWith(r);var a=$(r).next();void 0!==a[0]&&"BR"==a[0].tagName&&a.remove(),this.selectionEnd(r)}if((this.opts.convertLinks||this.opts.convertImageLinks||this.opts.convertVideoLinks)&&e===this.keyCode.ENTER&&this.buildEventKeyupConverters(),e===this.keyCode.DELETE||e===this.keyCode.BACKSPACE)return this.formatEmpty(t);this.callback("keyup",t),this.sync(t)},buildEventKeyupConverters:function(){this.formatLinkify(this.opts.linkProtocol,this.opts.convertLinks,this.opts.convertImageLinks,this.opts.convertVideoLinks,this.opts.linkSize),setTimeout($.proxy(function(){this.opts.convertImageLinks&&this.observeImages(),this.opts.observeLinks&&this.observeLinks()},this),5)},buildPlugins:function(){this.opts.plugins&&$.each(this.opts.plugins,$.proxy(function(t,e){RedactorPlugins[e]&&($.extend(this,RedactorPlugins[e]),$.isFunction(RedactorPlugins[e].init)&&this.init())},this))},iframeStart:function(){this.iframeCreate(),this.opts.textareamode?this.iframeAppend(this.$source):(this.$sourceOld=this.$source.hide(),this.$source=this.buildCodearea(this.$sourceOld),this.iframeAppend(this.$sourceOld))},iframeAppend:function(t){this.$source.attr("dir",this.opts.direction).hide(),this.$box.insertAfter(t).append(this.$frame).append(this.$source)},iframeCreate:function(){this.$frame=$('<iframe style="width: 100%;" frameborder="0" />').one("load",$.proxy(function(){if(this.opts.fullpage){this.iframePage(),""===this.content&&(this.content=this.opts.invisibleSpace),this.$frame.contents()[0].write(this.content),this.$frame.contents()[0].close();var t=setInterval($.proxy(function(){this.$frame.contents().find("body").html()&&(clearInterval(t),this.iframeLoad())},this),0)}else this.iframeLoad()},this))},iframeDoc:function(){return this.$frame[0].contentWindow.document},iframePage:function(){var t=this.iframeDoc();return t.documentElement&&t.removeChild(t.documentElement),t},iframeAddCss:function(t){t=t||this.opts.css,this.isString(t)&&this.$frame.contents().find("head").append('<link rel="stylesheet" href="'+t+'" />'),$.isArray(t)&&$.each(t,$.proxy(function(t,e){this.iframeAddCss(e)},this))},iframeLoad:function(){this.$editor=this.$frame.contents().find("body").attr({contenteditable:!0,dir:this.opts.direction}),this.$editor[0]&&(this.document=this.$editor[0].ownerDocument,this.window=this.document.defaultView||window),this.iframeAddCss(),this.opts.fullpage?this.setFullpageOnInit(this.$source.val()):this.set(this.content,!0,!1),this.buildOptions(),this.buildAfter()},placeholderInit:function(){!1!==this.opts.placeholder?(this.placeholderText=this.opts.placeholder,this.opts.placeholder=!0):void 0===this.$element.attr("placeholder")||""==this.$element.attr("placeholder")?this.opts.placeholder=!1:(this.placeholderText=this.$element.attr("placeholder"),this.opts.placeholder=!0)},placeholderStart:function(t){return!1!==this.opts.placeholder&&(this.isEmpty(t)?(this.opts.focus=!1,this.placeholderOnFocus(),this.placeholderOnBlur(),this.placeholderGet()):(this.placeholderOnBlur(),!1))},placeholderOnFocus:function(){this.$editor.on("focus.redactor_placeholder",$.proxy(this.placeholderFocus,this))},placeholderOnBlur:function(){this.$editor.on("blur.redactor_placeholder",$.proxy(this.placeholderBlur,this))},placeholderGet:function(){var t=$('<span class="redactor_placeholder">').data("redactor","verified").attr("contenteditable",!1).text(this.placeholderText);return!1===this.opts.linebreaks?$("<p>").append(t):t},placeholderBlur:function(){var t=this.get();this.isEmpty(t)&&(this.placeholderOnFocus(),this.$editor.html(this.placeholderGet()))},placeholderFocus:function(){this.$editor.find("span.redactor_placeholder").remove();var t="";!1===this.opts.linebreaks&&(t=this.opts.emptyHtml),this.$editor.off("focus.redactor_placeholder"),this.$editor.html(t),!1===this.opts.linebreaks?this.selectionStart(this.$editor.children()[0]):this.focus(),this.sync()},placeholderRemoveFromEditor:function(){this.$editor.find("span.redactor_placeholder").remove(),this.$editor.off("focus.redactor_placeholder")},placeholderRemoveFromCode:function(t){return t.replace(/<span class="redactor_placeholder"(.*?)>(.*?)<\/span>/i,"")},shortcuts:function(e,key){if(!this.opts.shortcuts)return(e.ctrlKey||e.metaKey)&&(66===key||73===key)&&e.preventDefault(),!1;$.each(this.opts.shortcuts,$.proxy(function(str,command){var keys=str.split(",");for(var i in keys)"string"==typeof keys[i]&&this.shortcutsHandler(e,$.trim(keys[i]),$.proxy(function(){eval(command)},this))},this))},shortcutsHandler:function(t,e,s){var o={8:"backspace",9:"tab",10:"return",13:"return",16:"shift",17:"ctrl",18:"alt",19:"pause",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"insert",46:"del",59:";",61:"=",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12",144:"numlock",145:"scroll",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},r={"`":"~",1:"!",2:"@",3:"#",4:"$",5:"%",6:"^",7:"&",8:"*",9:"(",0:")","-":"_","=":"+",";":": ","'":'"',",":"<",".":">","/":"?","\\":"|"};e=e.toLowerCase().split(" ");var a=o[t.keyCode],n=String.fromCharCode(t.which).toLowerCase(),l="",c={};$.each(["alt","ctrl","meta","shift"],function(e,s){t[s+"Key"]&&a!==s&&(l+=s+"+")}),a&&(c[l+a]=!0),n&&(c[l+n]=!0,c[l+r[n]]=!0,"shift+"===l&&(c[r[n]]=!0));for(var h=0,d=e.length;h<d;h++)if(c[e[h]])return t.preventDefault(),s.apply(this,arguments)},focus:function(){this.browser("opera")?this.$editor.focus():this.window.setTimeout($.proxy(this.focusSet,this,!0),1)},focusWithSaveScroll:function(){if(this.browser("msie"))var t=this.document.documentElement.scrollTop;this.$editor.focus(),this.browser("msie")&&(this.document.documentElement.scrollTop=t)},focusEnd:function(){if(this.browser("mozilla")){if(!1===this.opts.linebreaks){var t=this.$editor.children().last();this.$editor.focus(),this.selectionEnd(t)}else this.focusSet()}else this.focusSet()},focusSet:function(t,e){this.$editor.focus(),void 0===e&&(e=this.$editor[0]);var s=this.getRange();s.selectNodeContents(e),s.collapse(t||!1);var o=this.getSelection();o.removeAllRanges(),o.addRange(s)},toggle:function(t){this.opts.visual?this.toggleCode(t):this.toggleVisual()},toggleVisual:function(){var t=this.$source.hide().val();if(void 0!==this.modified){var e=this.modified.replace(/\n/g,""),s=t.replace(/\n/g,"");s=this.cleanRemoveSpaces(s,!1),this.modified=this.cleanRemoveSpaces(e,!1)!==s}this.modified&&(this.opts.fullpage&&""===t?this.setFullpageOnInit(t):(this.set(t),this.opts.fullpage&&this.buildBindKeyboard()),this.callback("change",!1,t)),this.opts.iframe?this.$frame.show():this.$editor.show(),this.opts.fullpage&&this.$editor.attr("contenteditable",!0),this.$source.off("keydown.redactor-textarea-indenting"),this.$editor.focus(),this.selectionRestore(),this.observeStart(),this.buttonActiveVisual(),this.buttonInactive("html"),this.opts.visual=!0},toggleCode:function(t){!1!==t&&this.selectionSave();var e=null;this.opts.iframe?(e=this.$frame.height(),this.opts.fullpage&&this.$editor.removeAttr("contenteditable"),this.$frame.hide()):(e=this.$editor.innerHeight(),this.$editor.hide());var s=this.$source.val();""!==s&&this.opts.tidyHtml&&this.$source.val(this.cleanHtml(s)),this.modified=s,this.$source.height(e).show().focus(),this.$source.on("keydown.redactor-textarea-indenting",this.textareaIndenting),this.buttonInactiveVisual(),this.buttonActive("html"),this.opts.visual=!1},textareaIndenting:function(t){if(9===t.keyCode){var e=$(this),s=e.get(0).selectionStart;return e.val(e.val().substring(0,s)+"	"+e.val().substring(e.get(0).selectionEnd)),e.get(0).selectionStart=e.get(0).selectionEnd=s+1,!1}},autosave:function(){var t=!1;this.autosaveInterval=setInterval($.proxy(function(){var e=this.get();if(t!==e){var s=this.$source.attr("name");$.ajax({url:this.opts.autosave,type:"post",data:"name="+s+"&"+s+"="+escape(encodeURIComponent(e)),success:$.proxy(function(s){var o=$.parseJSON(s);void 0===o.error?this.callback("autosave",!1,o):this.callback("autosaveError",!1,o),t=e},this)})}},this),1e3*this.opts.autosaveInterval)},toolbarBuild:function(){if(this.isMobile()&&this.opts.buttonsHideOnMobile.length>0&&$.each(this.opts.buttonsHideOnMobile,$.proxy(function(t,e){var s=this.opts.buttons.indexOf(e);this.opts.buttons.splice(s,1)},this)),this.opts.air)this.opts.buttons=this.opts.airButtons;else if(!this.opts.buttonSource){var t=this.opts.buttons.indexOf("html");this.opts.buttons.splice(t,1)}if(this.opts.toolbar&&$.each(this.opts.toolbar.formatting.dropdown,$.proxy(function(t,e){"-1"==$.inArray(t,this.opts.formattingTags)&&delete this.opts.toolbar.formatting.dropdown[t]},this)),0===this.opts.buttons.length)return!1;this.airEnable(),this.$toolbar=$("<ul>").addClass("redactor_toolbar").attr("id","redactor_toolbar_"+this.uuid),this.opts.typewriter&&this.$toolbar.addClass("redactor-toolbar-typewriter"),this.opts.toolbarOverflow&&this.isMobile()&&this.$toolbar.addClass("redactor-toolbar-overflow"),this.opts.air?(this.$air=$('<div class="redactor_air">').attr("id","redactor_air_"+this.uuid).hide(),this.$air.append(this.$toolbar),$("body").append(this.$air)):this.opts.toolbarExternal?(this.$toolbar.addClass("redactor-toolbar-external"),$(this.opts.toolbarExternal).html(this.$toolbar)):this.$box.prepend(this.$toolbar),$.each(this.opts.buttons,$.proxy(function(t,e){if(this.opts.toolbar[e]){var s=this.opts.toolbar[e];if(!1===this.opts.fileUpload&&"file"===e)return!0;this.$toolbar.append($("<li>").append(this.buttonBuild(e,s)))}},this)),this.$toolbar.find("a").attr("tabindex","-1"),this.opts.toolbarFixed&&(this.toolbarObserveScroll(),$(this.opts.toolbarFixedTarget).on("scroll.redactor",$.proxy(this.toolbarObserveScroll,this))),this.opts.activeButtons&&this.$editor.on("mouseup.redactor keyup.redactor",$.proxy(this.buttonActiveObserver,this))},toolbarObserveScroll:function(){var t=$(this.opts.toolbarFixedTarget).scrollTop(),e=0,s=0,o=0;if(o=(e=this.opts.toolbarFixedTarget===document?this.$box.offset().top:1)+this.$box.height()+40,t>e){var r="100%";this.opts.toolbarFixedBox&&(s=this.$box.offset().left,r=this.$box.innerWidth(),this.$toolbar.addClass("toolbar_fixed_box")),this.toolbarFixed=!0,this.opts.toolbarFixedTarget===document?this.$toolbar.css({position:"fixed",width:r,zIndex:10005,top:this.opts.toolbarFixedTopOffset+"px",left:s}):this.$toolbar.css({position:"absolute",width:r,zIndex:10005,top:this.opts.toolbarFixedTopOffset+t+"px",left:0}),t<o?this.$toolbar.css("visibility","visible"):this.$toolbar.css("visibility","hidden")}else this.toolbarFixed=!1,this.$toolbar.css({position:"relative",width:"auto",top:0,left:s}),this.opts.toolbarFixedBox&&this.$toolbar.removeClass("toolbar_fixed_box")},airEnable:function(){this.opts.air&&this.$editor.on("mouseup.redactor keyup.redactor",this,$.proxy(function(t){var e=this.getSelectionText();if("mouseup"===t.type&&""!=e&&this.airShow(t),"keyup"===t.type&&t.shiftKey&&""!=e){var s=$(this.getElement(this.getSelection().focusNode)),o=s.offset();o.height=s.height(),this.airShow(o,!0)}},this))},airShow:function(t,e){if(this.opts.air){if(this.selectionSave(),$(".redactor_air").hide(),e)s=t.left,o=t.top+t.height+14,this.opts.iframe&&(o+=this.$box.position().top-$(this.document).scrollTop(),s+=this.$box.position().left);else{var s,o,r=this.$air.innerWidth();s=t.clientX,$(this.document).width()<s+r&&(s-=r),o=t.clientY+14,this.opts.iframe?(o+=this.$box.position().top,s+=this.$box.position().left):o+=$(this.document).scrollTop()}this.$air.css({left:s+"px",top:o+"px"}).show(),this.airBindHide()}},airBindHide:function(){if(this.opts.air){var t=$.proxy(function(t){$(t).on("mousedown.redactor",$.proxy(function(e){0===$(e.target).closest(this.$toolbar).length&&(this.$air.fadeOut(100),this.selectionRemove(),$(t).off(e))},this)).on("keydown.redactor",$.proxy(function(e){e.which===this.keyCode.ESC&&this.getSelection().collapseToStart(),this.$air.fadeOut(100),$(t).off(e)},this))},this);t(document),this.opts.iframe&&t(this.document)}},airBindMousemoveHide:function(){if(this.opts.air){var t=$.proxy(function(t){$(t).on("mousemove.redactor",$.proxy(function(e){0===$(e.target).closest(this.$toolbar).length&&(this.$air.fadeOut(100),$(t).off(e))},this))},this);t(document),this.opts.iframe&&t(this.document)}},dropdownBuild:function(t,e){$.each(e,$.proxy(function(e,s){var o;s.className||(s.className=""),"separator"===s.name?o=$('<a class="redactor_separator_drop">'):(o=$('<a href="#" class="'+s.className+" redactor_dropdown_"+e+'">'+s.title+"</a>")).on("click",$.proxy(function(t){this.opts.air&&this.selectionRestore(),t.preventDefault&&t.preventDefault(),this.browser("msie")&&(t.returnValue=!1),s.callback&&s.callback.call(this,e,o,s,t),s.exec&&this.execCommand(s.exec,e),s.func&&this[s.func](e),this.buttonActiveObserver(),this.opts.air&&this.$air.fadeOut(100)},this)),t.append(o)},this))},dropdownShow:function(t,e){if(!this.opts.visual)return t.preventDefault(),!1;var s=this.buttonGet(e),o=s.data("dropdown").appendTo(document.body);if(s.hasClass("dropact"))this.dropdownHideAll();else{this.dropdownHideAll(),this.callback("dropdownShow",{dropdown:o,key:e,button:s}),this.buttonActive(e),s.addClass("dropact");var r=s.offset(),a=o.width();r.left+a>$(document).width()&&(r.left-=a);var n=r.left+"px",l=s.innerHeight(),c="absolute",h=l+this.opts.toolbarFixedTopOffset+"px";this.opts.toolbarFixed&&this.toolbarFixed?c="fixed":h=r.top+l+"px",o.css({position:c,left:n,top:h}).show(),this.callback("dropdownShown",{dropdown:o,key:e,button:s})}var d=$.proxy(function(t){this.dropdownHide(t,o)},this);$(document).one("click",d),this.$editor.one("click",d),this.$editor.one("touchstart",d),t.stopPropagation(),this.focusWithSaveScroll()},dropdownHideAll:function(){this.$toolbar.find("a.dropact").removeClass("redactor_act").removeClass("dropact"),$(".redactor_dropdown").hide(),this.callback("dropdownHide")},dropdownHide:function(t,e){$(t.target).hasClass("dropact")||(e.removeClass("dropact"),this.dropdownHideAll())},buttonBuild:function(t,e,s){var o=$('<a href="javascript:;" title="'+e.title+'" tabindex="-1" class="re-icon re-'+t+'"></a>');if(void 0!==s&&o.addClass("redactor-btn-image"),o.on("click",$.proxy(function(s){if(s.preventDefault&&s.preventDefault(),this.browser("msie")&&(s.returnValue=!1),o.hasClass("redactor_button_disabled"))return!1;!1!==this.isFocused()||e.exec||this.focusWithSaveScroll(),e.exec?(this.focusWithSaveScroll(),this.execCommand(e.exec,t),this.airBindMousemoveHide()):e.func&&"show"!==e.func?(this[e.func](t),this.airBindMousemoveHide()):e.callback?(e.callback.call(this,t,o,e,s),this.airBindMousemoveHide()):e.dropdown&&this.dropdownShow(s,t),this.buttonActiveObserver(!1,t)},this)),e.dropdown){var r=$('<div class="redactor_dropdown redactor_dropdown_box_'+t+'" style="display: none;">');o.data("dropdown",r),this.dropdownBuild(r,e.dropdown)}return o},buttonGet:function(t){return!!this.opts.toolbar&&$(this.$toolbar.find("a.re-"+t))},buttonTagToActiveState:function(t,e){this.opts.activeButtons.push(t),this.opts.activeButtonsStates[e]=t},buttonActiveToggle:function(t){this.buttonGet(t).hasClass("redactor_act")?this.buttonInactive(t):this.buttonActive(t)},buttonActive:function(t){this.buttonGet(t).addClass("redactor_act")},buttonInactive:function(t){this.buttonGet(t).removeClass("redactor_act")},buttonInactiveAll:function(t){this.$toolbar.find("a.re-icon").not(".re-"+t).removeClass("redactor_act")},buttonActiveVisual:function(){this.$toolbar.find("a.re-icon").not("a.re-html").removeClass("redactor_button_disabled")},buttonInactiveVisual:function(){this.$toolbar.find("a.re-icon").not("a.re-html").addClass("redactor_button_disabled")},buttonChangeIcon:function(t,e){this.buttonGet(t).addClass("re-"+e)},buttonRemoveIcon:function(t,e){this.buttonGet(t).removeClass("re-"+e)},buttonAwesome:function(t,e){var s=this.buttonGet(t);s.removeClass("redactor-btn-image"),s.addClass("fa-redactor-btn"),s.html('<i class="fa '+e+'"></i>')},buttonAdd:function(t,e,s,o){if(this.opts.toolbar){var r=this.buttonBuild(t,{title:e,callback:s,dropdown:o},!0);return this.$toolbar.append($("<li>").append(r)),r}},buttonAddFirst:function(t,e,s,o){if(this.opts.toolbar){var r=this.buttonBuild(t,{title:e,callback:s,dropdown:o},!0);this.$toolbar.prepend($("<li>").append(r))}},buttonAddAfter:function(t,e,s,o,r){if(this.opts.toolbar){var a=this.buttonBuild(e,{title:s,callback:o,dropdown:r},!0),n=this.buttonGet(t);return 0!==n.length?n.parent().after($("<li>").append(a)):this.$toolbar.append($("<li>").append(a)),a}},buttonAddBefore:function(t,e,s,o,r){if(this.opts.toolbar){var a=this.buttonBuild(e,{title:s,callback:o,dropdown:r},!0),n=this.buttonGet(t);return 0!==n.length?n.parent().before($("<li>").append(a)):this.$toolbar.append($("<li>").append(a)),a}},buttonRemove:function(t){this.buttonGet(t).remove()},buttonActiveObserver:function(t,e){var s=this.getParent();if(this.buttonInactiveAll(e),!1===t&&"html"!==e){-1!=$.inArray(e,this.opts.activeButtons)&&this.buttonActiveToggle(e);return}s&&"A"===s.tagName?this.$toolbar.find("a.redactor_dropdown_link").text(this.opts.curLang.link_edit):this.$toolbar.find("a.redactor_dropdown_link").text(this.opts.curLang.link_insert),$.each(this.opts.activeButtonsStates,$.proxy(function(t,e){0!=$(s).closest(t,this.$editor.get()[0]).length&&this.buttonActive(e)},this));var o=$(s).closest(this.opts.alignmentTags.toString().toLowerCase(),this.$editor[0]);if(o.length){var r=o.css("text-align");""==r&&(r="left"),this.buttonActive("align"+r)}},execPasteFrag:function(t){var e=this.getSelection();if(e.getRangeAt&&e.rangeCount){var s=this.getRange();s.deleteContents();var o=this.document.createElement("div");o.innerHTML=t;for(var r,a,n=this.document.createDocumentFragment();r=o.firstChild;)a=n.appendChild(r);n.firstChild,s.insertNode(n),a&&((s=s.cloneRange()).setStartAfter(a),s.collapse(!0)),e.removeAllRanges(),e.addRange(s)}},exec:function(t,e,s){"formatblock"===t&&this.browser("msie")&&(e="<"+e+">"),"inserthtml"===t&&this.browser("msie")?this.isIe11()?this.execPasteFrag(e):(this.focusWithSaveScroll(),this.document.selection.createRange().pasteHTML(e)):this.document.execCommand(t,!1,e),!1!==s&&this.sync(),this.callback("execCommand",t,e)},execCommand:function(t,e,s){if(!this.opts.visual)return this.$source.focus(),!1;if(("bold"===t||"italic"===t||"underline"===t||"strikethrough"===t)&&this.bufferSet(),"superscript"===t||"subscript"===t){var o=this.getParent();("SUP"===o.tagName||"SUB"===o.tagName)&&this.inlineRemoveFormatReplace(o)}if("inserthtml"===t){this.insertHtml(e,s),this.callback("execCommand",t,e);return}return(!this.currentOrParentIs("CODE")||!!this.opts.formattingPre)&&("insertunorderedlist"===t||"insertorderedlist"===t?this.execLists(t,e):"unlink"===t?this.execUnlink(t,e):void(this.exec(t,e,s),"inserthorizontalrule"===t&&this.$editor.find("hr").removeAttr("id")))},execUnlink:function(t,e){this.bufferSet();var s=this.currentOrParentIs("A");if(s){$(s).replaceWith($(s).text()),this.sync(),this.callback("execCommand",t,e);return}},execLists:function(t,e){this.bufferSet();var s=this.getParent(),o=$(s).closest("ol, ul");this.isParentRedactor(o)||0==o.length||(o=!1);var r=!1;if(o&&o.length){r=!0;var a=o[0].tagName;("insertunorderedlist"===t&&"OL"===a||"insertorderedlist"===t&&"UL"===a)&&(r=!1)}if(this.selectionSave(),r){var n=this.getNodes(),l=this.getBlocks(n);void 0!==n[0]&&n.length>1&&3==n[0].nodeType&&l.unshift(this.getBlock());var c="",h="";$.each(l,$.proxy(function(t,e){if("LI"==e.tagName){var s=$(e),o=s.clone();(o.find("ul","ol").remove(),!1===this.opts.linebreaks)?c+=this.outerHtml($("<p>").append(o.contents())):c+=o.html().replace(/<br\s?\/?>$/i,"")+"<br>",0==t?(s.addClass("redactor-replaced").empty(),h=this.outerHtml(s)):s.remove()}},this)),html=this.$editor.html().replace(h,"</"+a+">"+c+"<"+a+">"),this.$editor.html(html),this.$editor.find(a+":empty").remove()}else{var d=$(this.getParent()).closest("td");if(this.browser("msie")&&!this.isIe11()&&this.opts.linebreaks){var p=this.selectionWrap("div"),u=$(p).html(),f=$("<ul>");"insertorderedlist"==t&&(f=$("<ol>"));var m=$("<li>");""==$.trim(u)?(m.append(u+'<span id="selection-marker-1">'+this.opts.invisibleSpace+"</span>"),f.append(m),this.$editor.find("#selection-marker-1").replaceWith(f)):(m.append(u),f.append(m),$(p).replaceWith(f))}else this.document.execCommand(t);var s=this.getParent(),o=$(s).closest("ol, ul");if(!1===this.opts.linebreaks&&""==$.trim(o.text())&&(o.children("li").find("br").remove(),o.children("li").append('<span id="selection-marker-1">'+this.opts.invisibleSpace+"</span>")),0!=d.length&&o.wrapAll("<td>"),o.length){var g=o.parent();this.isParentRedactor(g)&&"LI"!=g[0].tagName&&this.nodeTestBlocks(g[0])&&g.replaceWith(g.contents())}this.browser("mozilla")&&this.$editor.focus()}this.selectionRestore(),this.$editor.find("#selection-marker-1").removeAttr("id"),this.sync(),this.callback("execCommand",t,e)},indentingIndent:function(){this.indentingStart("indent")},indentingOutdent:function(){this.indentingStart("outdent")},indentingStart:function(t){if(this.bufferSet(),"indent"===t){var e=this.getBlock();if(this.selectionSave(),e&&"LI"==e.tagName){var s=$(this.getParent()).closest("ol, ul")[0].tagName,o=this.getBlocks();$.each(o,function(t,e){if("LI"==e.tagName){var o=$(e).prev();if(0!=o.length&&"LI"==o[0].tagName){var r=o.children("ul, ol");0==r.length?o.append($("<"+s+">").append(e)):r.append(e)}}})}else if(!1===e&&!0===this.opts.linebreaks){this.exec("formatBlock","blockquote");var r=this.getBlock(),e=$('<div data-tagblock="">').html($(r).html());$(r).replaceWith(e);var a=this.normalize($(e).css("margin-left"))+this.opts.indentValue;$(e).css("margin-left",a+"px")}else{var n=this.getBlocks();$.each(n,$.proxy(function(t,e){var s=!1;if("TD"!==e.tagName){s=-1!==$.inArray(e.tagName,this.opts.alignmentTags)?$(e):$(e).closest(this.opts.alignmentTags.toString().toLowerCase(),this.$editor[0]);var o=this.normalize(s.css("margin-left"))+this.opts.indentValue;s.css("margin-left",o+"px")}},this))}this.selectionRestore()}else{this.selectionSave();var e=this.getBlock();if(e&&"LI"==e.tagName){var o=this.getBlocks(),l=0;this.insideOutdent(e,l,o)}else{var n=this.getBlocks();$.each(n,$.proxy(function(t,e){var s=!1;s=-1!==$.inArray(e.tagName,this.opts.alignmentTags)?$(e):$(e).closest(this.opts.alignmentTags.toString().toLowerCase(),this.$editor[0]);var o=this.normalize(s.css("margin-left"))-this.opts.indentValue;o<=0?!0===this.opts.linebreaks&&void 0!==s.data("tagblock")?s.replaceWith(s.html()+"<br>"):(s.css("margin-left",""),this.removeEmptyAttr(s,"style")):s.css("margin-left",o+"px")},this))}this.selectionRestore()}this.sync()},insideOutdent:function(t,e,s){if(t&&"LI"==t.tagName){var o=$(t).parent().parent();0!=o.length&&"LI"==o[0].tagName?o.after(t):void 0!==s[e]?(t=s[e],e++,this.insideOutdent(t,e,s)):this.execCommand("insertunorderedlist")}},alignmentLeft:function(){this.alignmentSet("","JustifyLeft")},alignmentRight:function(){this.alignmentSet("right","JustifyRight")},alignmentCenter:function(){this.alignmentSet("center","JustifyCenter")},alignmentJustify:function(){this.alignmentSet("justify","JustifyFull")},alignmentSet:function(t,e){if(this.bufferSet(),this.oldIE())return this.document.execCommand(e,!1,!1),!0;this.selectionSave();var s=this.getBlock();if(!s&&this.opts.linebreaks){this.exec("formatblock","div");var o=this.getBlock(),s=$('<div data-tagblock="">').html($(o).html());$(o).replaceWith(s),$(s).css("text-align",t),this.removeEmptyAttr(s,"style"),""==t&&void 0!==$(s).data("tagblock")&&$(s).replaceWith($(s).html())}else{var r=this.getBlocks();$.each(r,$.proxy(function(e,s){var o=!1;(o=-1!==$.inArray(s.tagName,this.opts.alignmentTags)?$(s):$(s).closest(this.opts.alignmentTags.toString().toLowerCase(),this.$editor[0]))&&(o.css("text-align",t),this.removeEmptyAttr(o,"style"))},this))}this.selectionRestore(),this.sync()},cleanEmpty:function(t){var e=this.placeholderStart(t);return!1!==e?e:(!1===this.opts.linebreaks&&(""===t?t=this.opts.emptyHtml:-1!==t.search(/^<hr\s?\/?>$/gi)&&(t="<hr>"+this.opts.emptyHtml)),t)},cleanConverters:function(t){return this.opts.convertDivs&&!this.opts.gallery&&(t=t.replace(/<div(.*?)>([\w\W]*?)<\/div>/gi,"<p$1>$2</p>")),this.opts.paragraphy&&(t=this.cleanParagraphy(t)),t},cleanConvertProtected:function(t){return this.opts.templateVars&&(t=(t=t.replace(/\{\{(.*?)\}\}/gi,"<!-- template double $1 -->")).replace(/\{(.*?)\}/gi,"<!-- template $1 -->")),t=(t=(t=t.replace(/<script(.*?)>([\w\W]*?)<\/script>/gi,'<title type="text/javascript" style="display: none;" class="redactor-script-tag"$1>$2</title>')).replace(/<style(.*?)>([\w\W]*?)<\/style>/gi,'<section$1 style="display: none;" rel="redactor-style-tag">$2</section>')).replace(/<form(.*?)>([\w\W]*?)<\/form>/gi,'<section$1 rel="redactor-form-tag">$2</section>'),t=this.opts.phpTags?t.replace(/<\?php([\w\W]*?)\?>/gi,'<section style="display: none;" rel="redactor-php-tag">$1</section>'):t.replace(/<\?php([\w\W]*?)\?>/gi,"")},cleanReConvertProtected:function(t){return this.opts.templateVars&&(t=(t=t.replace(/<!-- template double (.*?) -->/gi,"{{$1}}")).replace(/<!-- template (.*?) -->/gi,"{$1}")),t=(t=(t=t.replace(/<title type="text\/javascript" style="display: none;" class="redactor-script-tag"(.*?)>([\w\W]*?)<\/title>/gi,'<script$1 type="text/javascript">$2</script>')).replace(/<section(.*?) style="display: none;" rel="redactor-style-tag">([\w\W]*?)<\/section>/gi,"<style$1>$2</style>")).replace(/<section(.*?)rel="redactor-form-tag"(.*?)>([\w\W]*?)<\/section>/gi,"<form$1$2>$3</form>"),this.opts.phpTags&&(t=t.replace(/<section style="display: none;" rel="redactor-php-tag">([\w\W]*?)<\/section>/gi,"<?php\r\n$1\r\n?>")),t},cleanRemoveSpaces:function(t,e){if(!1!==e){var e=[],s=t.match(/<(code|style|script|title)(.*?)>([\w\W]*?)<\/(code|style|script|title)>/gi);if(null===s&&(s=[]),this.opts.phpTags){var o=t.match(/<\?php([\w\W]*?)\?>/gi);o&&(s=$.merge(s,o))}s&&$.each(s,function(s,o){t=t.replace(o,"buffer_"+s),e.push(o)})}return t=(t=(t=(t=(t=(t=t.replace(/\n/g," ")).replace(/[\t]*/g,"")).replace(/\n\s*\n/g,"\n")).replace(/^[\s\n]*/g," ")).replace(/[\s\n]*$/g," ")).replace(/>\s{2,}</g,"> <"),t=(t=this.cleanReplacer(t,e)).replace(/\n\n/g,"\n")},cleanReplacer:function(t,e){return!1===e||$.each(e,function(e,s){t=t.replace("buffer_"+e,s)}),t},cleanRemoveEmptyTags:function(t){t=t.replace(/[\u200B-\u200D\uFEFF]/g,"");for(var e=["<b>\\s*</b>","<b>&nbsp;</b>","<em>\\s*</em>"],s=["<code></code>","<blockquote>\\s*</blockquote>","<dd></dd>","<dt></dt>","<ul></ul>","<ol></ol>","<li></li>","<table></table>","<tr></tr>","<span>\\s*<span>","<span>&nbsp;<span>","<p>\\s*</p>","<p></p>","<p>&nbsp;</p>","<p>\\s*<br>\\s*</p>","<div>\\s*</div>","<div>\\s*<br>\\s*</div>"],o=(s=this.opts.removeEmptyTags?s.concat(e):e).length,r=0;r<o;++r)t=t.replace(RegExp(s[r],"gi"),"");return t},cleanParagraphy:function(t){if(t=$.trim(t),!0===this.opts.linebreaks)return t;if(""===t||"<p></p>"===t)return this.opts.emptyHtml;if(t+="\n",!1===this.opts.removeEmptyTags)return t;var e=[],s=t.match(/<(table|div|code|object)(.*?)>([\w\W]*?)<\/(table|div|code|object)>/gi);s||(s=[]);var o=t.match(/<!--([\w\W]*?)-->/gi);if(o&&(s=$.merge(s,o)),this.opts.phpTags){var r=t.match(/<section(.*?)rel="redactor-php-tag">([\w\W]*?)<\/section>/gi);r&&(s=$.merge(s,r))}function a(e,s,o){return t.replace(RegExp(e,s),o)}s&&$.each(s,function(s,o){e[s]=o,t=t.replace(o,"{replace"+s+"}\n")}),t=(t=t.replace(/<br \/>\s*<br \/>/gi,"\n\n")).replace(/<br><br>/gi,"\n\n");var n="(comment|html|body|head|title|meta|style|script|link|iframe|table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|code|select|option|form|map|area|blockquote|address|math|style|p|h[1-6]|hr|fieldset|legend|section|article|aside|hgroup|header|footer|nav|figure|figcaption|details|menu|summary)";t=a("(<"+n+"[^>]*>)","gi","\n$1"),t=a("(</"+n+">)","gi","$1\n\n"),t=a("\r\n","g","\n"),t=a("\r","g","\n");var l=(t=a("/\n\n+/","g","\n\n")).split(RegExp("\ns*\n","g"),-1);for(var c in t="",l)l.hasOwnProperty(c)&&(-1==l[c].search("{replace")?(l[c]=l[c].replace(/<p>\n\t?<\/p>/gi,""),l[c]=l[c].replace(/<p><\/p>/gi,""),""!=l[c]&&(t+="<p>"+l[c].replace(/^\n+|\n+$/g,"")+"</p>")):t+=l[c]);return t=a("<p><p>","gi","<p>"),t=a("</p></p>","gi","</p>"),t=a("<p>s?</p>","gi",""),t=a("<p>([^<]+)</(div|address|form)>","gi","<p>$1</p></$2>"),t=a("<p>(</?"+n+"[^>]*>)</p>","gi","$1"),t=a("<p>(<li.+?)</p>","gi","$1"),t=a("<p>s?(</?"+n+"[^>]*>)","gi","$1"),t=a("(</?"+n+"[^>]*>)s?</p>","gi","$1"),t=a("(</?"+n+"[^>]*>)s?<br />","gi","$1"),t=a("<br />(s*</?(?:p|li|div|dl|dd|dt|th|code|td|ul|ol)[^>]*>)","gi","$1"),t=a("\n</p>","gi","</p>"),t=a("<li><p>","gi","<li>"),t=a("</p></li>","gi","</li>"),t=a("</li><p>","gi","</li>"),t=a("<p>	?\n?<p>","gi","<p>"),t=a("</dt><p>","gi","</dt>"),t=a("</dd><p>","gi","</dd>"),t=a("<br></p></blockquote>","gi","</blockquote>"),t=a("<p>	*</p>","gi",""),$.each(e,function(e,s){t=t.replace("{replace"+e+"}",s)}),$.trim(t)},cleanConvertInlineTags:function(t,e){var s="strong";"b"===this.opts.boldTag&&(s="b");var o="em";return"i"===this.opts.italicTag&&(o="i"),t=(t=t.replace(/<span style="font-style: italic;">([\w\W]*?)<\/span>/gi,"<"+o+">$1</"+o+">")).replace(/<span style="font-weight: bold;">([\w\W]*?)<\/span>/gi,"<"+s+">$1</"+s+">"),t="strong"===this.opts.boldTag?t.replace(/<b>([\w\W]*?)<\/b>/gi,"<strong>$1</strong>"):t.replace(/<strong>([\w\W]*?)<\/strong>/gi,"<b>$1</b>"),t=(t="em"===this.opts.italicTag?t.replace(/<i>([\w\W]*?)<\/i>/gi,"<em>$1</em>"):t.replace(/<em>([\w\W]*?)<\/em>/gi,"<i>$1</i>")).replace(/<span style="text-decoration: underline;">([\w\W]*?)<\/span>/gi,"<u>$1</u>"),t=!0!==e?t.replace(/<strike>([\w\W]*?)<\/strike>/gi,"<del>$1</del>"):t.replace(/<del>([\w\W]*?)<\/del>/gi,"<strike>$1</strike>")},cleanStripTags:function(t){if(""==t||void 0===t)return t;var e=!1;!1!==this.opts.allowedTags&&(e=!0);var s=!0===e?this.opts.allowedTags:this.opts.deniedTags,o=/<\/?([a-z][a-z0-9]*)\b[^>]*>/gi;return t=t.replace(o,function(t,o){return!0===e?$.inArray(o.toLowerCase(),s)>"-1"?t:"":$.inArray(o.toLowerCase(),s)>"-1"?"":t}),t=this.cleanConvertInlineTags(t)},cleanSavePreCode:function(t,e){var s=t.match(/<(pre|code)(.*?)>([\w\W]*?)<\/(pre|code)>/gi);return null!==s&&$.each(s,$.proxy(function(s,o){var r=o.match(/<(pre|code)(.*?)>([\w\W]*?)<\/(pre|code)>/i);r[3]=r[3].replace(/&nbsp;/g," "),!1!==e&&(r[3]=this.cleanEncodeEntities(r[3])),r[3]=r[3].replace(/\$/g,"&#36;"),t=t.replace(o,"<"+r[1]+r[2]+">"+r[3]+"</"+r[1]+">")},this)),t},cleanEncodeEntities:function(t){return(t=String(t).replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"')).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")},cleanUnverified:function(){var t=this.$editor.find("li, img, a, b, strong, sub, sup, i, em, u, small, strike, del, span, cite");t.filter('[style*="background-color: transparent;"][style*="line-height"]').css("background-color","").css("line-height",""),t.filter('[style*="background-color: transparent;"]').css("background-color",""),t.css("line-height",""),$.each(t,$.proxy(function(t,e){this.removeEmptyAttr(e,"style")},this));var e=this.$editor.find("b, strong, i, em, u, strike, del");e.css("font-size",""),$.each(e,$.proxy(function(t,e){this.removeEmptyAttr(e,"style")},this)),this.$editor.find('div[style="text-align: -webkit-auto;"]').contents().unwrap(),this.$editor.find("ul, ol, li").removeAttr("style")},cleanHtml:function(t){var e,s=0,o=t.length,r=0,a=null,n=null,l="",c="",h="";for(this.cleanlevel=0;s<o;s++){if(r=s,-1==t.substr(s).indexOf("<")){c+=t.substr(s);break}for(;r<o&&"<"!=t.charAt(r);)r++;for(s!=r&&((h=t.substr(s,r-s)).match(/^\s{2,}$/g)||("\n"==c.charAt(c.length-1)?c+=this.cleanGetTabs():"\n"==h.charAt(0)&&(c+="\n"+this.cleanGetTabs(),h=h.replace(/^\s+/,"")),c+=h),h.match(/\n/)&&(c+="\n"+this.cleanGetTabs())),a=r;r<o&&">"!=t.charAt(r);)r++;if(l=t.substr(a,r-a),s=r,"!--"==l.substr(1,3)){if(!l.match(/--$/)){for(;"-->"!=t.substr(r,3);)r++;r+=2,l=t.substr(a,r-a),s=r}"\n"!=c.charAt(c.length-1)&&(c+="\n"),c+=this.cleanGetTabs(),c+=l+">\n"}else"!"==l[1]?c=this.placeTag(l+">",c):"?"==l[1]?c+=l+">\n":(e=l.match(/^<(script|style|pre|code)/i))?(e[1]=e[1].toLowerCase(),l=this.cleanTag(l),c=this.placeTag(l,c),(n=String(t.substr(s+1)).toLowerCase().indexOf("</"+e[1]))&&(h=t.substr(s+1,n),s+=n,c+=h)):(l=this.cleanTag(l),c=this.placeTag(l,c))}return this.cleanFinish(c)},cleanGetTabs:function(){for(var t="",e=0;e<this.cleanlevel;e++)t+="	";return t},cleanFinish:function(t){return t=(t=(t=(t=t.replace(/\n\s*\n/g,"\n")).replace(/^[\s\n]*/,"")).replace(/[\s\n]*$/,"")).replace(/<script(.*?)>\n<\/script>/gi,"<script$1></script>"),this.cleanlevel=0,t},cleanTag:function(t){var e,s="";t=(t=(t=t.replace(/\n/g," ")).replace(/\s{2,}/g," ")).replace(/^\s+|\s+$/g," ");var o="";for(t.match(/\/$/)&&(o="/",t=t.replace(/\/+$/,""));e=/\s*([^= ]+)(?:=((['"']).*?\3|[^ ]+))?/.exec(t);)e[2]?s+=e[1].toLowerCase()+"="+e[2]:e[1]&&(s+=e[1].toLowerCase()),s+=" ",t=t.substr(e[0].length);return s.replace(/\s*$/,"")+o+">"},placeTag:function(t,e){var s=t.match(this.cleannewLevel);return(t.match(this.cleanlineBefore)||s)&&(e=e.replace(/\s*$/,""),e+="\n"),s&&"/"==t.charAt(1)&&this.cleanlevel--,"\n"==e.charAt(e.length-1)&&(e+=this.cleanGetTabs()),s&&"/"!=t.charAt(1)&&this.cleanlevel++,e+=t,(t.match(this.cleanlineAfter)||t.match(this.cleannewLevel))&&(e=e.replace(/ *$/,""),e+="\n"),e},formatEmpty:function(t){var e=$.trim(this.$editor.html());if(this.opts.linebreaks)""==e&&(t.preventDefault(),this.$editor.html(""),this.focus());else{var s=(e=e.replace(/<br\s?\/?>/i,"")).replace(/<p>\s?<\/p>/gi,"");if(""===e||""===s){t.preventDefault();var o=$(this.opts.emptyHtml).get(0);this.$editor.html(o),this.focus()}}this.sync()},formatBlocks:function(t){this.browser("mozilla")&&this.isFocused()&&this.$editor.focus(),this.bufferSet();var e=this.getBlocks();this.selectionSave(),$.each(e,$.proxy(function(e,s){if("LI"!==s.tagName){var o=$(s).parent();if("p"===t){if("P"===s.tagName&&0!=o.length&&"BLOCKQUOTE"===o[0].tagName||"BLOCKQUOTE"===s.tagName){this.formatQuote();return}if(this.opts.linebreaks){if(!s||0!=s.tagName.search(/H[1-6]/))return;$(s).replaceWith(s.innerHTML+"<br>")}else this.formatBlock(t,s)}else this.formatBlock(t,s)}},this)),this.selectionRestore(),this.sync()},formatBlock:function(t,e){if(!1===e&&(e=this.getBlock()),!1===e&&!0===this.opts.linebreaks)return this.execCommand("formatblock",t),!0;var s="";if("code"!==t?s=$(e).contents():(s=$(e).html(),""===$.trim(s)&&(s='<span id="selection-marker-1"></span>')),"CODE"===e.tagName&&(t="p"),!0===this.opts.linebreaks&&"p"===t)$(e).replaceWith($("<div>").append(s).html()+"<br>");else{var o=this.getParent(),r=$("<"+t+">").append(s);$(e).replaceWith(r),o&&"TD"==o.tagName&&$(r).wrapAll("<td>")}},formatChangeTag:function(t,e,s){!1!==s&&this.selectionSave();var o=$("<"+e+"/>");return $(t).replaceWith(function(){return o.append($(this).contents())}),!1!==s&&this.selectionRestore(),o},formatQuote:function(){if(this.browser("mozilla")&&this.isFocused()&&this.$editor.focus(),this.bufferSet(),!1===this.opts.linebreaks){this.selectionSave();var t=this.getBlocks(),e=!1,s=t.length;if(t){var o="",r="",a=!1,n=!0;if($.each(t,function(t,e){"P"!==e.tagName&&(n=!1)}),$.each(t,$.proxy(function(l,c){if("BLOCKQUOTE"===c.tagName)this.formatBlock("p",c,!1);else if("P"===c.tagName){if("BLOCKQUOTE"==(e=$(c).parent())[0].tagName){var h=$(e).children("p").length;1==h?$(e).replaceWith(c):h==s?(a="blockquote",o+=this.outerHtml(c)):(a="html",o+=this.outerHtml(c),0==l?($(c).addClass("redactor-replaced").empty(),r=this.outerHtml(c)):$(c).remove())}else!1===n||1==t.length?this.formatBlock("blockquote",c,!1):(a="paragraphs",o+=this.outerHtml(c))}else"LI"!==c.tagName&&this.formatBlock("blockquote",c,!1)},this)),a){if("paragraphs"==a)$(t[0]).replaceWith("<blockquote>"+o+"</blockquote>"),$(t).remove();else if("blockquote"==a)$(e).replaceWith(o);else if("html"==a){var l=this.$editor.html().replace(r,"</blockquote>"+o+"<blockquote>");this.$editor.html(l),this.$editor.find("blockquote").each(function(){""==$.trim($(this).html())&&$(this).remove()})}}}this.selectionRestore()}else{var c=this.getBlock();if("BLOCKQUOTE"===c.tagName){this.selectionSave();var l=$.trim($(c).html()),h=$.trim(this.getSelectionHtml());if((l=l.replace(/<span(.*?)id="selection-marker(.*?)<\/span>/gi,""))==h)$(c).replaceWith($(c).html()+"<br>");else{this.inlineFormat("tmp");var d=this.$editor.find("tmp");d.empty();var p=this.$editor.html().replace("<tmp></tmp>",'</blockquote><span id="selection-marker-1">'+this.opts.invisibleSpace+"</span>"+h+"<blockquote>");this.$editor.html(p),d.remove(),this.$editor.find("blockquote").each(function(){""==$.trim($(this).html())&&$(this).remove()})}this.selectionRestore(),this.$editor.find("span#selection-marker-1").attr("id",!1)}else{var u=this.selectionWrap("blockquote"),l=$(u).html(),f=["ul","ol","table","tr","tbody","thead","tfoot","dl"];$.each(f,function(t,e){l=(l=l.replace(RegExp("<"+e+"(.*?)>","gi"),"")).replace(RegExp("</"+e+">","gi"),"")});var m=this.opts.blockLevelElements;$.each(m,function(t,e){l=(l=l.replace(RegExp("<"+e+"(.*?)>","gi"),"")).replace(RegExp("</"+e+">","gi"),"<br>")}),$(u).html(l),this.selectionElement(u);var g=$(u).next();0!=g.length&&"BR"===g[0].tagName&&g.remove()}}this.sync()},blockRemoveAttr:function(t,e){$(this.getBlocks()).removeAttr(t),this.sync()},blockSetAttr:function(t,e){$(this.getBlocks()).attr(t,e),this.sync()},blockRemoveStyle:function(t){var e=this.getBlocks();$(e).css(t,""),this.removeEmptyAttr(e,"style"),this.sync()},blockSetStyle:function(t,e){$(this.getBlocks()).css(t,e),this.sync()},blockRemoveClass:function(t){var e=this.getBlocks();$(e).removeClass(t),this.removeEmptyAttr(e,"class"),this.sync()},blockSetClass:function(t){$(this.getBlocks()).addClass(t),this.sync()},inlineRemoveClass:function(t){this.selectionSave(),this.inlineEachNodes(function(e){$(e).removeClass(t),this.removeEmptyAttr(e,"class")}),this.selectionRestore(),this.sync()},inlineSetClass:function(t){$(this.getCurrent()).hasClass(t)||this.inlineMethods("addClass",t)},inlineRemoveStyle:function(t){this.selectionSave(),this.inlineEachNodes(function(e){$(e).css(t,""),this.removeEmptyAttr(e,"style")}),this.selectionRestore(),this.sync()},inlineSetStyle:function(t,e){this.inlineMethods("css",t,e)},inlineRemoveAttr:function(t){this.selectionSave();var e=this.getRange(),s=this.getElement(),o=this.getNodes();(e.collapsed||e.startContainer===e.endContainer&&s)&&(o=$(s)),$(o).removeAttr(t),this.inlineUnwrapSpan(),this.selectionRestore(),this.sync()},inlineSetAttr:function(t,e){this.inlineMethods("attr",t,e)},inlineMethods:function(t,e,s){this.bufferSet(),this.selectionSave();var o=this.getRange(),r=this.getElement();if((o.collapsed||o.startContainer===o.endContainer)&&r&&!this.nodeTestBlocks(r))$(r)[t](e,s);else{var a,n=s;switch(e){case"font-size":a="fontSize",n=4;break;case"font-family":a="fontName";break;case"color":a="foreColor";break;case"background-color":a="backColor"}this.document.execCommand(a,!1,n);var l=this.$editor.find("font");$.each(l,$.proxy(function(o,r){this.inlineSetMethods(t,r,e,s)},this))}this.selectionRestore(),this.sync()},inlineSetMethods:function(t,e,s,o){var r,a=$(e).parent(),n=this.getSelectionText(),l=$(a).text();return n==l&&a&&"INLINE"===a[0].tagName&&0!=a[0].attributes.length?(r=a,$(e).replaceWith($(e).html())):(r=$("<inline>").append($(e).contents()),$(e).replaceWith(r)),$(r)[t](s,o),r},inlineEachNodes:function(t){var e,s=this.getRange(),o=this.getElement(),r=this.getNodes();(s.collapsed||s.startContainer===s.endContainer&&o)&&(r=$(o),e=!0),$.each(r,$.proxy(function(s,o){if(!e&&"INLINE"!==o.tagName){var r=this.getSelectionText(),a=$(o).parent().text();if(r!=a||"INLINE"!==o.parentNode.tagName||$(o.parentNode).hasClass("redactor_editor"))return;o=o.parentNode}t.call(this,o)},this))},inlineUnwrapSpan:function(){var t=this.$editor.find("inline");$.each(t,$.proxy(function(t,e){var s=$(e);void 0===s.attr("class")&&void 0===s.attr("style")&&s.contents().unwrap()},this))},inlineFormat:function(t){this.selectionSave(),this.document.execCommand("fontSize",!1,4);var e,s=this.$editor.find("font");$.each(s,function(s,o){var r=$("<"+t+"/>").append($(o).contents());$(o).replaceWith(r),e=r}),this.selectionRestore(),this.sync()},inlineRemoveFormat:function(t){this.selectionSave();var e=t.toUpperCase(),s=this.getNodes(),o=$(this.getParent()).parent();$.each(s,function(t,s){s.tagName===e&&this.inlineRemoveFormatReplace(s)}),o&&o[0].tagName===e&&this.inlineRemoveFormatReplace(o),this.selectionRestore(),this.sync()},inlineRemoveFormatReplace:function(t){$(t).replaceWith($(t).contents())},insertHtml:function(t,e){var s=this.getCurrent(),o=s.parentNode;this.focusWithSaveScroll(),this.bufferSet();var r=$("<div>").append($.parseHTML(t));t=r.html(),t=this.cleanRemoveEmptyTags(t),r=$("<div>").append($.parseHTML(t));var a=this.getBlock();if(1==r.contents().length){var n=r.contents()[0].tagName;("P"!=n&&n==a.tagName||"CODE"==n)&&(r=$("<div>").append(t))}this.opts.linebreaks&&(t=t.replace(/<p(.*?)>([\w\W]*?)<\/p>/gi,"$2<br>")),this.opts.linebreaks||1!=r.contents().length||3!=r.contents()[0].nodeType||!(this.getRangeSelectedNodes().length>2)&&s&&("BODY"!=s.tagName||o)&&"HTML"!=o.tagName||(t="<p>"+t+"</p>"),t=this.setSpansVerifiedHtml(t),r.contents().length>1&&a||r.contents().is("p, :header, ul, ol, li, div, table, td, blockquote, code, address, section, header, footer, aside, article")?this.browser("msie")?this.isIe11()?this.execPasteFrag(t):this.document.selection.createRange().pasteHTML(t):this.document.execCommand("inserthtml",!1,t):this.insertHtmlAdvanced(t,!1),this.selectall&&this.window.setTimeout($.proxy(function(){this.opts.linebreaks?this.focusEnd():this.selectionEnd(this.$editor.contents().last())},this),1),this.observeStart(),this.setNonEditable(),!1!==e&&this.sync()},insertHtmlAdvanced:function(t,e){t=this.setSpansVerifiedHtml(t);var s=this.getSelection();if(s.getRangeAt&&s.rangeCount){var o=s.getRangeAt(0);o.deleteContents();var r=document.createElement("div");r.innerHTML=t;for(var a,n,l=document.createDocumentFragment();a=r.firstChild;)n=l.appendChild(a);o.insertNode(l),n&&((o=o.cloneRange()).setStartAfter(n),o.collapse(!0),s.removeAllRanges(),s.addRange(o))}!1!==e&&this.sync()},insertBeforeCursor:function(t){t=this.setSpansVerifiedHtml(t);var e=$(t),s=document.createElement("span");s.innerHTML="​";var o=this.getRange();o.insertNode(s),o.insertNode(e[0]),o.collapse(!1);var r=this.getSelection();r.removeAllRanges(),r.addRange(o),this.sync()},insertText:function(t){var e=$($.parseHTML(t));e.length&&(t=e.text()),this.focusWithSaveScroll(),this.browser("msie")?this.isIe11()?this.execPasteFrag(t):this.document.selection.createRange().pasteHTML(t):this.document.execCommand("inserthtml",!1,t),this.sync()},insertNode:function(t){if("SPAN"==(t=t[0]||t).tagName){var e="inline",s=t.outerHTML,o=RegExp("<"+t.tagName,"i"),r=s.replace(o,"<"+e);o=RegExp("</"+t.tagName,"i"),r=r.replace(o,"</"+e),t=$(r)[0]}var a=this.getSelection();return a.getRangeAt&&a.rangeCount&&((range=a.getRangeAt(0)).deleteContents(),range.insertNode(t),range.setEndAfter(t),range.setStartAfter(t),a.removeAllRanges(),a.addRange(range)),t},insertNodeToCaretPositionFromPoint:function(t,e){var s,o=t.clientX,r=t.clientY;if(this.document.caretPositionFromPoint){var a=this.document.caretPositionFromPoint(o,r);(s=this.getRange()).setStart(a.offsetNode,a.offset),s.collapse(!0),s.insertNode(e)}else if(this.document.caretRangeFromPoint)(s=this.document.caretRangeFromPoint(o,r)).insertNode(e);else if(void 0!==document.body.createTextRange){(s=this.document.body.createTextRange()).moveToPoint(o,r);var n=s.duplicate();n.moveToPoint(o,r),s.setEndPoint("EndToEnd",n),s.select()}},insertAfterLastElement:function(t,e){if(void 0!==e&&(t=e),this.isEndOfElement()){if(this.opts.linebreaks){var s=$("<div>").append($.trim(this.$editor.html())).contents(),o=s.last()[0];if("SPAN"==o.tagName&&""==o.innerHTML&&(o=s.prev()[0]),this.outerHtml(o)!=this.outerHtml(t))return!1}else if(this.$editor.contents().last()[0]!==t)return!1;this.insertingAfterLastElement(t)}},insertingAfterLastElement:function(t){if(this.bufferSet(),!1===this.opts.linebreaks){var e=$(this.opts.emptyHtml);$(t).after(e),this.selectionStart(e)}else{var e=$('<span id="selection-marker-1">'+this.opts.invisibleSpace+"</span>",this.document)[0];$(t).after(e),$(e).after(this.opts.invisibleSpace),this.selectionRestore(),this.$editor.find("span#selection-marker-1").removeAttr("id")}},insertLineBreak:function(t){this.selectionSave();var e="<br>";if(!0==t&&(e="<br><br>"),this.browser("mozilla")){var s=$("<span>").html(this.opts.invisibleSpace);this.$editor.find("#selection-marker-1").before(e).before(s).before(this.opts.invisibleSpace),this.setCaretAfter(s[0]),s.remove(),this.selectionRemoveMarkers()}else{var o=this.getParent();if(o&&"A"===o.tagName){var r=this.getCaretOffset(o),a=$.trim($(o).text()).replace(/\n\r\n/g,"").length;if(r==a){this.selectionRemoveMarkers();var n=$('<span id="selection-marker-1">'+this.opts.invisibleSpace+"</span>",this.document)[0];return $(o).after(n),$(n).before(e+(this.browser("webkit")?this.opts.invisibleSpace:"")),this.selectionRestore(),!0}}this.$editor.find("#selection-marker-1").before(e+(this.browser("webkit")?this.opts.invisibleSpace:"")),this.selectionRestore()}},insertDoubleLineBreak:function(){this.insertLineBreak(!0)},replaceLineBreak:function(t){var e=$("<br>"+this.opts.invisibleSpace);$(t).replaceWith(e),this.selectionStart(e)},pasteClean:function(t){if(t=this.callback("pasteBefore",!1,t),this.browser("msie")){var e=$.trim(t);0==e.search(/^<a(.*?)>(.*?)<\/a>$/i)&&(t=t.replace(/^<a(.*?)>(.*?)<\/a>$/i,"$2"))}if(t=t.replace(/on([a-z]+)=|javascript\:/gi,""),this.opts.pastePlainText){var e=this.document.createElement("div");return t=t.replace(/<br>|<\/H[1-6]>|<\/p>|<\/div>/gi,"\n"),e.innerHTML=t,t=e.textContent||e.innerText,t=(t=$.trim(t)).replace("\n","<br>"),t=this.cleanParagraphy(t),this.pasteInsert(t),!1}var s=!1;if(this.currentOrParentIs("TD")){s=!0;var o=this.opts.blockLevelElements;o.push("tr"),o.push("table"),$.each(o,function(e,s){t=(t=t.replace(RegExp("<"+s+"(.*?)>","gi"),"")).replace(RegExp("</"+s+">","gi"),"<br>")})}if(this.currentOrParentIs("CODE"))return t=this.pastePre(t),this.pasteInsert(t),!0;if(t=(t=(t=(t=(t=(t=(t=t.replace(/<img(.*?)v:shapes=(.*?)>/gi,"")).replace(/<p(.*?)class="MsoListParagraphCxSpFirst"([\w\W]*?)<\/p>/gi,"<ul><li$2</li>")).replace(/<p(.*?)class="MsoListParagraphCxSpMiddle"([\w\W]*?)<\/p>/gi,"<li$2</li>")).replace(/<p(.*?)class="MsoListParagraphCxSpLast"([\w\W]*?)<\/p>/gi,"<li$2</li></ul>")).replace(/<p(.*?)class="MsoListParagraph"([\w\W]*?)<\/p>/gi,"<ul><li$2</li></ul>")).replace(/·/g,"")).replace(/<!--[\s\S]*?-->|<\?(?:php)?[\s\S]*?\?>/gi,""),!0===this.opts.cleanSpaces&&(t=(t=t.replace(/(&nbsp;){2,}/gi,"&nbsp;")).replace(/&nbsp;/gi," ")),t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace(/<b\sid="internal-source-marker(.*?)">([\w\W]*?)<\/b>/gi,"$2")).replace(/<b(.*?)id="docs-internal-guid(.*?)">([\w\W]*?)<\/b>/gi,"$3")).replace(/<span[^>]*(font-style: italic; font-weight: bold|font-weight: bold; font-style: italic)[^>]*>/gi,'<span style="font-weight: bold;"><span style="font-style: italic;">')).replace(/<span[^>]*font-style: italic[^>]*>/gi,'<span style="font-style: italic;">')).replace(/<span[^>]*font-weight: bold[^>]*>/gi,'<span style="font-weight: bold;">')).replace(/<span[^>]*text-decoration: underline[^>]*>/gi,'<span style="text-decoration: underline;">')).replace(/<td>\u200b*<\/td>/gi,"[td]")).replace(/<td>&nbsp;<\/td>/gi,"[td]")).replace(/<td><br><\/td>/gi,"[td]")).replace(/<td(.*?)colspan="(.*?)"(.*?)>([\w\W]*?)<\/td>/gi,'[td colspan="$2"]$4[/td]')).replace(/<td(.*?)rowspan="(.*?)"(.*?)>([\w\W]*?)<\/td>/gi,'[td rowspan="$2"]$4[/td]')).replace(/<a(.*?)href="(.*?)"(.*?)>([\w\W]*?)<\/a>/gi,'[a href="$2"]$4[/a]')).replace(/<iframe(.*?)>([\w\W]*?)<\/iframe>/gi,"[iframe$1]$2[/iframe]")).replace(/<video(.*?)>([\w\W]*?)<\/video>/gi,"[video$1]$2[/video]")).replace(/<audio(.*?)>([\w\W]*?)<\/audio>/gi,"[audio$1]$2[/audio]")).replace(/<embed(.*?)>([\w\W]*?)<\/embed>/gi,"[embed$1]$2[/embed]")).replace(/<object(.*?)>([\w\W]*?)<\/object>/gi,"[object$1]$2[/object]")).replace(/<param(.*?)>/gi,"[param$1]")).replace(/<img(.*?)>/gi,"[img$1]")).replace(/ class="(.*?)"/gi,"")).replace(/<(\w+)([\w\W]*?)>/gi,"<$1>"),this.opts.linebreaks?(t=(t=t.replace(/<strong><\/strong>/gi,"")).replace(/<u><\/u>/gi,""),this.opts.cleanFontTag&&(t=t.replace(/<font(.*?)>([\w\W]*?)<\/font>/gi,"$2")),t=t.replace(/<[^\/>][^>]*>(\s*|\t*|\n*|&nbsp;|<br>)<\/[^>]+>/gi,"<br>")):t=t.replace(/<[^\/>][^>]*>(\s*|\t*|\n*|&nbsp;|<br>)<\/[^>]+>/gi,""),t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace(/<div>\s*?\t*?\n*?(<ul>|<ol>|<p>)/gi,"$1")).replace(/\[td colspan="(.*?)"\]([\w\W]*?)\[\/td\]/gi,'<td colspan="$1">$2</td>')).replace(/\[td rowspan="(.*?)"\]([\w\W]*?)\[\/td\]/gi,'<td rowspan="$1">$2</td>')).replace(/\[td\]/gi,"<td>&nbsp;</td>")).replace(/\[a href="(.*?)"\]([\w\W]*?)\[\/a\]/gi,'<a href="$1">$2</a>')).replace(/\[iframe(.*?)\]([\w\W]*?)\[\/iframe\]/gi,"<iframe$1>$2</iframe>")).replace(/\[video(.*?)\]([\w\W]*?)\[\/video\]/gi,"<video$1>$2</video>")).replace(/\[audio(.*?)\]([\w\W]*?)\[\/audio\]/gi,"<audio$1>$2</audio>")).replace(/\[embed(.*?)\]([\w\W]*?)\[\/embed\]/gi,"<embed$1>$2</embed>")).replace(/\[object(.*?)\]([\w\W]*?)\[\/object\]/gi,"<object$1>$2</object>")).replace(/\[param(.*?)\]/gi,"<param$1>")).replace(/\[img(.*?)\]/gi,"<img$1>"),t=this.opts.convertDivs?(t=(t=(t=t.replace(/<div(.*?)>([\w\W]*?)<\/div>/gi,"<p>$2</p>")).replace(/<\/div><p>/gi,"<p>")).replace(/<\/p><\/div>/gi,"</p>")).replace(/<p><\/p>/gi,"<br />"):t.replace(/<div><\/div>/gi,"<br />"),t=this.cleanStripTags(t),this.currentOrParentIs("LI")?t=t.replace(/<p>([\w\W]*?)<\/p>/gi,"$1<br>"):!1===s&&(t=this.cleanParagraphy(t)),t=(t=(t=(t=(t=(t=(t=(t=t.replace(/<span(.*?)>([\w\W]*?)<\/span>/gi,"$2")).replace(/<img>/gi,"")).replace(/<[^\/>][^>][^img|param|source|td][^<]*>(\s*|\t*|\n*| |<br>)<\/[^>]+>/gi,"")).replace(/\n{3,}/gi,"\n")).replace(/<p><p>/gi,"<p>")).replace(/<\/p><\/p>/gi,"</p>")).replace(/<li>(\s*|\t*|\n*)<p>/gi,"<li>")).replace(/<\/p>(\s*|\t*|\n*)<\/li>/gi,"</li>"),!0===this.opts.linebreaks&&(t=t.replace(/<p(.*?)>([\w\W]*?)<\/p>/gi,"$2<br>")),t=(t=(t=t.replace(/<[^\/>][^>][^img|param|source|td][^<]*>(\s*|\t*|\n*| |<br>)<\/[^>]+>/gi,"")).replace(/<img src="webkit-fake-url\:\/\/(.*?)"(.*?)>/gi,"")).replace(/<td(.*?)>(\s*|\t*|\n*)<p>([\w\W]*?)<\/p>(\s*|\t*|\n*)<\/td>/gi,"<td$1>$3</td>"),this.opts.convertDivs&&(t=(t=t.replace(/<div(.*?)>([\w\W]*?)<\/div>/gi,"$2")).replace(/<div(.*?)>([\w\W]*?)<\/div>/gi,"$2")),this.pasteClipboardMozilla=!1,this.browser("mozilla")){if(this.opts.clipboardUpload){var r=t.match(/<img src="data:image(.*?)"(.*?)>/gi);if(null!==r)for(var a in this.pasteClipboardMozilla=r,r){var n=r[a].replace("<img",'<img data-mozilla-paste-image="'+a+'" ');t=t.replace(r[a],n)}}for(;/<br>$/gi.test(t);)t=t.replace(/<br>$/gi,"")}if(t=t.replace(/<p>•([\w\W]*?)<\/p>/gi,"<li>$1</li>"),this.browser("msie"))for(;/<font>([\w\W]*?)<\/font>/gi.test(t);)t=t.replace(/<font>([\w\W]*?)<\/font>/gi,"$1");!1===s&&(t=(t=(t=(t=t.replace(/<td(.*?)>([\w\W]*?)<p(.*?)>([\w\W]*?)<\/td>/gi,"<td$1>$2$4</td>")).replace(/<td(.*?)>([\w\W]*?)<\/p>([\w\W]*?)<\/td>/gi,"<td$1>$2$3</td>")).replace(/<td(.*?)>([\w\W]*?)<p(.*?)>([\w\W]*?)<\/td>/gi,"<td$1>$2$4</td>")).replace(/<td(.*?)>([\w\W]*?)<\/p>([\w\W]*?)<\/td>/gi,"<td$1>$2$3</td>")),t=(t=t.replace(/\n/g," ")).replace(/<p>\n?<li>/gi,"<li>"),this.pasteInsert(t)},pastePre:function(t){t=t.replace(/<br>|<\/H[1-6]>|<\/p>|<\/div>/gi,"\n");var e=this.document.createElement("div");return e.innerHTML=t,this.cleanEncodeEntities(e.textContent||e.innerText)},pasteInsert:function(t){t=this.callback("pasteAfter",!1,t),this.selectall?(this.$editor.html(t),this.selectionRemove(),this.focusEnd(),this.sync()):this.insertHtml(t),this.selectall=!1,setTimeout($.proxy(function(){this.rtePaste=!1,this.browser("mozilla")&&this.$editor.find("p:empty").remove(),!1!==this.pasteClipboardMozilla&&this.pasteClipboardUploadMozilla()},this),100),this.opts.autoresize&&!0!==this.fullscreen?$(this.document.body).scrollTop(this.saveScroll):this.$editor.scrollTop(this.saveScroll)},pasteClipboardAppendFields:function(t){return!1!==this.opts.uploadFields&&"object"==typeof this.opts.uploadFields&&$.each(this.opts.uploadFields,$.proxy(function(e,s){null!=s&&0===s.toString().indexOf("#")&&(s=$(s).val()),t[e]=s},this)),t},pasteClipboardUploadMozilla:function(){var t=this.$editor.find("img[data-mozilla-paste-image]");$.each(t,$.proxy(function(t,e){var s=$(e),o=e.src.split(","),r={contentType:o[0].split(";")[0].split(":")[1],data:o[1]};r=this.pasteClipboardAppendFields(r),$.post(this.opts.clipboardUploadUrl,r,$.proxy(function(t){var e="string"==typeof t?$.parseJSON(t):t;s.attr("src",e.image.url),s.removeAttr("data-mozilla-paste-image"),this.sync(),this.callback("imageUpload",s,e)},this))},this))},pasteClipboardUpload:function(t){var e=t.target.result,s=e.split(","),o={contentType:s[0].split(";")[0].split(":")[1],data:s[1]};this.opts.clipboardUpload?(o=this.pasteClipboardAppendFields(o),$.post(this.opts.clipboardUploadUrl,o,$.proxy(function(t){var e="string"==typeof t?$.parseJSON(t):t,s='<img src="'+e.image.url+'" id="clipboard-image-marker" />';this.execCommand("inserthtml",s,!1);var o=$(this.$editor.find("img#clipboard-image-marker"));o.length?o.removeAttr("id"):o=!1,this.sync(),o&&this.callback("imageUpload",o,e)},this))):this.insertHtml('<img src="'+e+'" />')},bufferSet:function(t){!1!==t&&this.selectionSave(),this.opts.buffer.push(this.$editor.html()),!1!==t&&this.selectionRemoveMarkers("buffer")},bufferUndo:function(){if(0===this.opts.buffer.length){this.focusWithSaveScroll();return}this.selectionSave(),this.opts.rebuffer.push(this.$editor.html()),this.selectionRestore(!1,!0),this.$editor.html(this.opts.buffer.pop()),this.selectionRestore(),setTimeout($.proxy(this.observeStart,this),100)},bufferRedo:function(){if(0===this.opts.rebuffer.length)return this.focusWithSaveScroll(),!1;this.selectionSave(),this.opts.buffer.push(this.$editor.html()),this.selectionRestore(!1,!0),this.$editor.html(this.opts.rebuffer.pop()),this.selectionRestore(!0),setTimeout($.proxy(this.observeStart,this),4)},observeStart:function(){this.observeImages(),this.opts.observeLinks&&this.observeLinks()},observeLinks:function(){this.$editor.find("a").on("click",$.proxy(this.linkObserver,this)),this.$editor.on("click.redactor",$.proxy(function(t){this.linkObserverTooltipClose(t)},this)),$(document).on("click.redactor",$.proxy(function(t){this.linkObserverTooltipClose(t)},this))},observeImages:function(){if(!1===this.opts.observeImages)return!1;this.$editor.find("img").each($.proxy(function(t,e){this.browser("msie")&&$(e).attr("unselectable","on");var s=$(e).parent();s.hasClass("royalSlider")||s.hasClass("fotorama")||this.imageResize(e)},this)),this.$editor.find(".fotorama, .royalSlider").on("click",$.proxy(this.editGallery,this))},linkObserver:function(t){var e=$(t.target),s=$(t.target).parent();if(!(s.hasClass("royalSlider")||s.hasClass("fotorama"))&&0!=e.length&&"A"===e[0].tagName){var o=e.offset();if(this.opts.iframe){var r=this.$frame.offset();o.top=r.top+(o.top-$(this.document).scrollTop()),o.left+=r.left}var a=$('<span class="redactor-link-tooltip"></span>'),n=e.attr("href");void 0===n&&(n=""),n.length>24&&(n=n.substring(0,24)+"...");var l=$('<a href="'+e.attr("href")+'" target="_blank">'+n+"</a>").on("click",$.proxy(function(t){this.linkObserverTooltipClose(!1)},this)),c=$('<a href="#">'+this.opts.curLang.edit+"</a>").on("click",$.proxy(function(t){t.preventDefault(),this.linkShow(),this.linkObserverTooltipClose(!1)},this)),h=$('<a href="#">'+this.opts.curLang.unlink+"</a>").on("click",$.proxy(function(t){t.preventDefault(),this.execCommand("unlink"),this.linkObserverTooltipClose(!1)},this));a.append(l),a.append(" | "),a.append(c),a.append(" | "),a.append(h),a.css({top:o.top+20+"px",left:o.left+"px"}),$(".redactor-link-tooltip").remove(),$("body").append(a)}},linkObserverTooltipClose:function(t){if(!1!==t&&"A"==t.target.tagName)return!1;$(".redactor-link-tooltip").remove()},getSelection:function(){return this.opts.rangy?this.opts.iframe?rangy.getSelection(this.$frame[0]):rangy.getSelection():this.document.getSelection()},getRange:function(){if(this.opts.rangy)return this.opts.iframe?rangy.createRange(this.iframeDoc()):rangy.createRange();if(this.document.getSelection){var t=this.getSelection();if(t.getRangeAt&&t.rangeCount)return t.getRangeAt(0)}return this.document.createRange()},selectionElement:function(t){this.setCaret(t)},selectionStart:function(t){this.selectionSet(t[0]||t,0,null,0)},selectionEnd:function(t){this.selectionSet(t[0]||t,1,null,1)},selectionSet:function(t,e,s,o){null==s&&(s=t),null==o&&(o=e);var r=this.getSelection();if(r){if("P"==t.tagName&&""==t.innerHTML&&(t.innerHTML=this.opts.invisibleSpace),"BR"==t.tagName&&!1===this.opts.linebreaks){var a=$(this.opts.emptyHtml)[0];$(t).replaceWith(a),s=t=a}var n=this.getRange();n.setStart(t,e),n.setEnd(s,o);try{r.removeAllRanges()}catch(l){}r.addRange(n)}},selectionWrap:function(t){t=t.toLowerCase();var e=this.getBlock();if(e){var s=this.formatChangeTag(e,t);return this.sync(),s}var o=this.getSelection().getRangeAt(0),s=document.createElement(t);return s.appendChild(o.extractContents()),o.insertNode(s),this.selectionElement(s),s},selectionAll:function(){var t=this.getRange();t.selectNodeContents(this.$editor[0]);var e=this.getSelection();e.removeAllRanges(),e.addRange(t)},selectionRemove:function(){this.getSelection().removeAllRanges()},getCaretOffset:function(t){var e=0,s=this.getRange(),o=s.cloneRange();return o.selectNodeContents(t),o.setEnd(s.endContainer,s.endOffset),e=$.trim(o.toString()).length},getCaretOffsetRange:function(){return new Range(this.getSelection().getRangeAt(0))},setCaret:function(t,e,s){void 0===s&&(s=e),t=t[0]||t;var o=this.getRange();o.selectNodeContents(t);var r,a=this.getTextNodesIn(t),n=!1,l=0;if(1==a.length&&e)o.setStart(a[0],e),o.setEnd(a[0],s);else for(var c,h=0;c=a[h++];){if(r=l+c.length,!n&&e>=l&&(e<r||e==r&&h<a.length)&&(o.setStart(c,e-l),n=!0),n&&s<=r){o.setEnd(c,s-l);break}l=r}var d=this.getSelection();d.removeAllRanges(),d.addRange(o)},setCaretAfter:function(t){this.$editor.focus(),t=t[0]||t;var e=this.document.createRange(),s=1,o=-1;e.setStart(t,s),e.setEnd(t,o+2);var r=this.window.getSelection(),a=this.document.createRange(),n=this.document.createTextNode("​");$(t).after(n),a.setStartAfter(n),r.removeAllRanges(),r.addRange(a),$(n).remove()},getTextNodesIn:function(t){var e=[];if(3==t.nodeType)e.push(t);else for(var s=t.childNodes,o=0,r=s.length;o<r;++o)e.push.apply(e,this.getTextNodesIn(s[o]));return e},getCurrent:function(){var t=!1,e=this.getSelection();return e&&e.rangeCount>0&&(t=e.getRangeAt(0).startContainer),this.isParentRedactor(t)},getParent:function(t){return!!(t=t||this.getCurrent())&&this.isParentRedactor($(t).parent()[0])},getBlock:function(t){for(void 0===t&&(t=this.getCurrent());t;){if(this.nodeTestBlocks(t)){if($(t).hasClass("redactor_editor"))return!1;return t}t=t.parentNode}return!1},getBlocks:function(t){var e=[];if(void 0===t){var s=this.getRange();if(s&&!0===s.collapsed)return[this.getBlock()];var t=this.getNodes(s)}return $.each(t,$.proxy(function(t,s){if(!1===this.opts.iframe&&0==$(s).parents("div.redactor_editor").length)return!1;this.nodeTestBlocks(s)&&e.push(s)},this)),0===e.length&&(e=[this.getBlock()]),e},isInlineNode:function(t){return 1==t.nodeType&&!this.rTestBlock.test(t.nodeName)},nodeTestBlocks:function(t){return 1==t.nodeType&&this.rTestBlock.test(t.nodeName)},tagTestBlock:function(t){return this.rTestBlock.test(t)},getNodes:function(t,e){if(void 0===t||!1==t)var t=this.getRange();if(t&&!0===t.collapsed){if(!(void 0===e&&this.tagTestBlock(e)))return[this.getCurrent()];var s=this.getBlock();return s.tagName==e?[s]:[]}var o=[],r=[],a=this.document.getSelection();if(a.isCollapsed||(o=this.getRangeSelectedNodes(a.getRangeAt(0))),$.each(o,$.proxy(function(t,s){if(!1===this.opts.iframe&&0==$(s).parents("div.redactor_editor").length)return!1;void 0===e?""!=$.trim(s.textContent)&&r.push(s):s.tagName==e&&r.push(s)},this)),0==r.length){if(void 0===e&&this.tagTestBlock(e)){var s=this.getBlock();return s.tagName==e?r.push(s):[]}r.push(this.getCurrent())}var n=r[r.length-1];return this.nodeTestBlocks(n)&&(r=r.slice(0,-1)),r},getElement:function(t){for(t||(t=this.getCurrent());t;){if(1==t.nodeType){if($(t).hasClass("redactor_editor"))return!1;return t}t=t.parentNode}return!1},getRangeSelectedNodes:function(t){var e=(t=t||this.getRange()).startContainer,s=t.endContainer;if(e==s)return[e];for(var o=[];e&&e!=s;)o.push(e=this.nextNode(e));for(e=t.startContainer;e&&e!=t.commonAncestorContainer;)o.unshift(e),e=e.parentNode;return o},nextNode:function(t){if(t.hasChildNodes())return t.firstChild;for(;t&&!t.nextSibling;)t=t.parentNode;return t?t.nextSibling:null},getSelectionText:function(){return this.getSelection().toString()},getSelectionHtml:function(){var t="",e=this.getSelection();if(e.rangeCount){for(var s=this.document.createElement("div"),o=e.rangeCount,r=0;r<o;++r)s.appendChild(e.getRangeAt(r).cloneContents());t=s.innerHTML}return this.syncClean(t)},selectionSave:function(){this.isFocused()||this.focusWithSaveScroll(),this.opts.rangy?this.savedSel=rangy.saveSelection():this.selectionCreateMarker(this.getRange())},selectionCreateMarker:function(t,e){if(t){var s=$('<span id="selection-marker-1" class="redactor-selection-marker">'+this.opts.invisibleSpace+"</span>",this.document)[0],o=$('<span id="selection-marker-2" class="redactor-selection-marker">'+this.opts.invisibleSpace+"</span>",this.document)[0];!0===t.collapsed?this.selectionSetMarker(t,s,!0):(this.selectionSetMarker(t,s,!0),this.selectionSetMarker(t,o,!1)),this.savedSel=this.$editor.html(),this.selectionRestore(!1,!1)}},selectionSetMarker:function(t,e,s){var o=t.cloneRange();try{o.collapse(s),o.insertNode(e),o.detach()}catch(r){var a=this.opts.emptyHtml;this.opts.linebreaks&&(a="<br>"),this.$editor.prepend(a),this.focus()}},selectionRestore:function(t,e){if(this.opts.rangy)rangy.restoreSelection(this.savedSel);else{!0===t&&this.savedSel&&this.$editor.html(this.savedSel);var s=this.$editor.find("span#selection-marker-1"),o=this.$editor.find("span#selection-marker-2");this.browser("mozilla")?this.$editor.focus():this.isFocused()||this.focusWithSaveScroll(),0!=s.length&&0!=o.length?this.selectionSet(s[0],0,o[0],0):0!=s.length&&this.selectionSet(s[0],0,null,0),!1!==e&&(this.selectionRemoveMarkers(),this.savedSel=!1)}},selectionRemoveMarkers:function(t){this.opts.rangy?rangy.removeMarkers(this.savedSel):$.each(this.$editor.find("span.redactor-selection-marker"),function(){""==$.trim($(this).html().replace(/[^\u0000-\u1C7F]/g,""))?$(this).remove():$(this).removeAttr("class").removeAttr("id")})},tableShow:function(){this.selectionSave(),this.modalInit(this.opts.curLang.table,this.opts.modal_table,300,$.proxy(function(){$("#redactor_insert_table_btn").on("click",$.proxy(this.tableInsert,this)),setTimeout(function(){$("#redactor_table_rows").focus()},200)},this))},tableInsert:function(){this.bufferSet(!1);var t,e,s,o,r=$("#redactor_table_rows").val(),a=$("#redactor_table_columns").val(),n=$("<div></div>"),l=Math.floor(99999*Math.random()),c=$('<table id="table'+l+'"><tbody></tbody></table>');for(t=0;t<r;t++){for(s=0,e=$("<tr></tr>");s<a;s++)o=$("<td>"+this.opts.invisibleSpace+"</td>"),0===t&&0===s&&o.append('<span id="selection-marker-1">'+this.opts.invisibleSpace+"</span>"),$(e).append(o);c.append(e)}n.append(c);var h=n.html();!1===this.opts.linebreaks&&this.browser("mozilla")&&(h+="<p>"+this.opts.invisibleSpace+"</p>"),this.modalClose(),this.selectionRestore();var d=this.getBlock()||this.getCurrent();if(d&&"BODY"!=d.tagName){if("LI"==d.tagName)var d=$(d).closest("ul, ol");$(d).after(h)}else this.insertHtmlAdvanced(h,!1);this.selectionRestore();var p=this.$editor.find("#table"+l);this.buttonActiveObserver(),p.find("span#selection-marker-1, inline#selection-marker-1").remove(),p.removeAttr("id"),this.sync()},tableDeleteTable:function(){var t=$(this.getParent()).closest("table");if(!this.isParentRedactor(t)||0==t.length)return!1;this.bufferSet(),t.remove(),this.sync()},tableDeleteRow:function(){var t=this.getParent(),e=$(t).closest("table");if(!this.isParentRedactor(e)||0==e.length)return!1;this.bufferSet();var s=$(t).closest("tr"),o=s.prev().length?s.prev():s.next();if(o.length){var r=o.children("td").first();r.length&&r.prepend('<span id="selection-marker-1">'+this.opts.invisibleSpace+"</span>")}s.remove(),this.selectionRestore(),e.find("span#selection-marker-1").remove(),this.sync()},tableDeleteColumn:function(){var t=this.getParent(),e=$(t).closest("table");if(!this.isParentRedactor(e)||0==e.length)return!1;this.bufferSet();var s=$(t).closest("td");s.is("td")||(s=s.closest("td"));var o=s.get(0).cellIndex;e.find("tr").each($.proxy(function(t,e){var s=o-1<0?o+1:o-1;0===t&&$(e).find("td").eq(s).prepend('<span id="selection-marker-1">'+this.opts.invisibleSpace+"</span>"),$(e).find("td").eq(o).remove()},this)),this.selectionRestore(),e.find("span#selection-marker-1").remove(),this.sync()},tableAddHead:function(){var t=$(this.getParent()).closest("table");if(!this.isParentRedactor(t)||0==t.length)return!1;if(this.bufferSet(),0!==t.find("thead").length)this.tableDeleteHead();else{var e=t.find("tr").first().clone();e.find("td").replaceWith("<th></th>").html(this.opts.invisibleSpace),($thead=$("<thead></thead>")).append(e),t.prepend($thead),this.sync()}},tableDeleteHead:function(){var t=$(this.getParent()).closest("table");if(!this.isParentRedactor(t))return!1;var e=t.find("thead");if(0==e.length)return!1;this.bufferSet(),e.remove(),this.sync()},tableAddRowAbove:function(){this.tableAddRow("before")},tableAddRowBelow:function(){this.tableAddRow("after")},tableAddColumnLeft:function(){this.tableAddColumn("before")},tableAddColumnRight:function(){this.tableAddColumn("after")},tableAddRow:function(t){var e=$(this.getParent()).closest("table");if(!this.isParentRedactor(e)||0==e.length)return!1;this.bufferSet();var s=$(this.getParent()).closest("tr"),o=s.clone();o.find("td").html(this.opts.invisibleSpace),"after"===t?s.after(o):s.before(o),this.sync()},tableAddColumn:function(t){var e=$(this.getParent()).closest("table");if(!this.isParentRedactor(e)||0==e.length)return!1;this.bufferSet();var s=0,o=this.getCurrent(),r=$(o).closest("tr"),a=$(o).closest("td");r.find("td").each($.proxy(function(t,e){$(e)[0]===a[0]&&(s=t)},this)),e.find("tr").each($.proxy(function(e,o){var r=$(o).find("td").eq(s),a=r.clone();a.html(this.opts.invisibleSpace),"after"===t?r.after(a):r.before(a)},this)),this.sync()},videoShow:function(){this.selectionSave(),this.modalInit(this.opts.curLang.video,this.opts.modal_video,600,$.proxy(function(){$("#redactor_insert_video_btn").on("click",$.proxy(this.videoInsert,this)),setTimeout(function(){$("#redactor_insert_video_area").focus()},200)},this))},videoInsert:function(){var t=$("#redactor_insert_video_area").val();t=this.cleanStripTags(t);var e='<iframe width="500" height="281" src="',s='" frameborder="0" allowfullscreen></iframe>';t.match(reUrlYoutube)?t=t.replace(reUrlYoutube,e+"//www.youtube.com/embed/$1"+s):t.match(reUrlVimeo)?t=t.replace(reUrlVimeo,e+"//player.vimeo.com/video/$2"+s):t.match(reUrlFacebook)?t=t.replace(reUrlFacebook,e+"https://www.facebook.com/video/embed?video_id=$1"+s):t.match(reUrlRutube)&&(t=t.replace(reUrlRutube,e+"//rutube.ru/play/embed/$1"+s)),this.selectionRestore();var o=this.getBlock()||this.getCurrent();o?$(o).after(t):this.insertHtmlAdvanced(t,!1),this.sync(),this.modalClose()},linkShow:function(){this.selectionSave();var t=$.proxy(function(){if(!1!==this.opts.predefinedLinks){this.predefinedLinksStorage={};var t=this;$.getJSON(this.opts.predefinedLinks,function(e){if(0!==Object.keys(e).length){var s=$("#redactor-predefined-links");s.html(""),$.each(e,function(e,o){t.predefinedLinksStorage[e]=o,s.append($("<option>").val(e).html(o.name))}),s.on("change",function(){var e=$(this).val(),s="",o="";0!=e&&(s=t.predefinedLinksStorage[e].name,o=t.predefinedLinksStorage[e].url),$("#redactor_link_url").val(o),1!=$("#redactor_link_url_text").data("is_selected_text")&&$("#redactor_link_url_text").val(s)}),s.show()}})}this.insert_link_node=!1;var e=this.getSelection(),s="",o="",r="",a=this.getParent(),n=$(a).parent().get(0);n&&"A"===n.tagName&&(a=n),a&&"A"===a.tagName?(s=a.href,o=$(a).text(),r=a.target,this.insert_link_node=a):o=e.toString(),$("#redactor_link_url_text").val(o),o.length>0&&$("#redactor_link_url_text").data("is_selected_text",1);var l=self.location.href.replace(/\/$/i,"");if(s=(s=(s=s.replace(l,"")).replace(/^\/#/,"#")).replace("mailto:",""),!1===this.opts.linkProtocol){var c=RegExp("^(http|ftp|https)://"+self.location.host,"i");s=s.replace(c,"")}$("#redactor_link_url").val(s),"_blank"===r&&$("#redactor_link_blank").prop("checked",!0),this.linkInsertPressed=!1,$("#redactor_insert_link_btn").on("click",$.proxy(this.linkProcess,this)),setTimeout(function(){$("#redactor_link_url").focus()},200)},this);this.modalInit(this.opts.curLang.link,this.opts.modal_link,460,t)},linkProcess:function(){if(!this.linkInsertPressed){this.linkInsertPressed=!0;var t="",e="",s=$("#redactor_link_url").val(),o=$("#redactor_link_url_text").val();if(-1!=s.search("@")&&!1===/(http|ftp|https):\/\//i.test(s))s="mailto:"+s;else if(0!=s.search("#")){$("#redactor_link_blank").prop("checked")&&(t=' target="_blank"',e="_blank");var r="((xn--)?[a-z0-9]+(-[a-z0-9]+)*.)+[a-z]{2,}",a=RegExp("^(http|ftp|https)://"+r,"i"),n=RegExp("^"+r,"i");-1==s.search(a)&&0==s.search(n)&&this.opts.linkProtocol&&(s=this.opts.linkProtocol+s)}o=o.replace(/<|>/g,"");var l="&nbsp;";this.browser("mozilla")&&(l="&nbsp;"),this.linkInsert('<a href="'+s+'"'+t+">"+o+"</a>"+l,$.trim(o),s,e)}},linkInsert:function(t,e,s,o){if(this.selectionRestore(),""!==e){if(this.insert_link_node)this.bufferSet(),$(this.insert_link_node).text(e).attr("href",s),""!==o?$(this.insert_link_node).attr("target",o):$(this.insert_link_node).removeAttr("target");else{var r=$(t).addClass("redactor-added-link");this.exec("inserthtml",this.outerHtml(r),!1);var s=this.$editor.find("a.redactor-added-link");s.removeAttr("style").removeClass("redactor-added-link").each(function(){""==this.className&&$(this).removeAttr("class")})}this.sync()}setTimeout($.proxy(function(){this.opts.observeLinks&&this.observeLinks()},this),5),this.modalClose()},fileShow:function(){this.selectionSave();var t=$.proxy(function(){var t=this.getSelection(),e="";e=this.oldIE()?t.text:t.toString(),$("#redactor_filename").val(e),this.isMobile()||this.isIPad()||this.draguploadInit("#redactor_file",{url:this.opts.fileUpload,uploadFields:this.opts.uploadFields,success:$.proxy(this.fileCallback,this),error:$.proxy(function(t,e){this.callback("fileUploadError",e)},this),uploadParam:this.opts.fileUploadParam}),this.uploadInit("redactor_file",{auto:!0,url:this.opts.fileUpload,success:$.proxy(this.fileCallback,this),error:$.proxy(function(t,e){this.callback("fileUploadError",e)},this)})},this);this.modalInit(this.opts.curLang.file,this.opts.modal_file,500,t)},fileCallback:function(t){if(this.selectionRestore(),!1!==t){var e=$("#redactor_filename").val();""===e&&(e=t.filename);var s='<a href="'+t.filelink+'" id="filelink-marker">'+e+"</a>";this.browser("webkit")&&this.window.chrome&&(s+="&nbsp;"),this.execCommand("inserthtml",s,!1);var o=$(this.$editor.find("a#filelink-marker"));0!=o.length?o.removeAttr("id"):o=!1,this.sync(),this.callback("fileUpload",o,t)}this.modalClose()},imageShow:function(){this.selectionSave();var t=$.proxy(function(){this.opts.imageGetJson?$.getJSON(this.opts.imageGetJson,$.proxy(function(t){if(t.error){alert(t.message);return}var e={},s=0;$.each(t,$.proxy(function(t,o){void 0!==o.folder&&(s++,e[o.folder]=s)},this)),$("#redactor_image_box .empty_list").show();var o=!1;if($.each(t,$.proxy(function(t,s){var r="";void 0!==s.title&&(r=s.title);var a=0;$.isEmptyObject(e)||void 0===s.folder||(a=e[s.folder],!1!==o||(o=".redactorfolder"+a));var n=$('<img src="'+s.thumb+'" class="redactorfolder redactorfolder'+a+'" rel="'+s.image+'" title="'+r+'" />');$("#redactor_image_box").append(n),$(n).on("click",$.proxy(this.imageThumbClick,this)),$("#redactor_image_box .empty_list").hide()},this)),!$.isEmptyObject(e)){$(".redactorfolder").hide(),$(o).show();var r=function(t){$(".redactorfolder").hide(),$(".redactorfolder"+$(t.target).val()).show()},a=$('<select id="redactor_image_box_select">');$.each(e,function(t,e){a.append($('<option value="'+e+'">'+t+"</option>"))}),$("#redactor_image_box").before(a),a.change(r)}},this)):$("#redactor-tab-control-2").remove(),this.opts.imageUpload||this.opts.s3?(this.isMobile()||this.isIPad()||!1!==this.opts.s3||!$("#redactor_file").length||this.draguploadInit("#redactor_file",{url:this.opts.imageUpload,uploadFields:this.opts.uploadFields,success:$.proxy(this.imageCallback,this),error:$.proxy(function(t,e){this.callback("imageUploadError",e)},this),uploadParam:this.opts.imageUploadParam}),!1===this.opts.s3?this.uploadInit("redactor_file",{auto:!0,url:this.opts.imageUpload,success:$.proxy(this.imageCallback,this),error:$.proxy(function(t,e){this.callback("imageUploadError",e)},this)}):$("#redactor_file").on("change.redactor",$.proxy(this.s3handleFileSelect,this))):($(".redactor_tab").hide(),this.opts.imageGetJson?($("#redactor-tab-control-1").remove(),$("#redactor-tab-control-2").addClass("redactor_tabs_act"),$("#redactor_tab2").show()):($("#redactor_tabs").remove(),$("#redactor_tab3").show())),!this.opts.imageTabLink&&(this.opts.imageUpload||this.opts.imageGetJson)&&$("#redactor-tab-control-3").hide(),$("#redactor_upload_btn").on("click",$.proxy(this.imageCallbackLink,this)),this.opts.imageUpload||this.opts.imageGetJson||setTimeout(function(){$("#redactor_file_link").focus()},200)},this);this.modalInit(this.opts.curLang.image,this.opts.modal_image,610,t)},imageEdit:function(t){var e=t,s=e.parent().parent(),o=$.proxy(function(){$("#redactor_file_alt").val(e.attr("alt")),$("#redactor_image_edit_src").attr("href",e.attr("src")),"block"==e.css("display")&&"none"==e.css("float")?$("#redactor_form_image_align").val("center"):$("#redactor_form_image_align").val(e.css("float")),"A"===$(s).get(0).tagName&&($("#redactor_file_link").val($(s).attr("href")),"_blank"==$(s).attr("target")&&$("#redactor_link_blank").prop("checked",!0)),$("#redactor_image_delete_btn").on("click",$.proxy(function(){this.imageRemove(e)},this)),$("#redactorSaveBtn").on("click",$.proxy(function(){this.imageSave(e)},this))},this);this.modalInit(this.opts.curLang.edit,this.opts.modal_image_edit,380,o)},imageRemove:function(t){var e=$(t).parent().parent(),s=$(t).parent(),o=!1;e.length&&"A"===e[0].tagName?(o=!0,$(e).remove()):s.length&&"A"===s[0].tagName?(o=!0,$(s).remove()):$(t).remove(),s.length&&"P"===s[0].tagName&&(this.focusWithSaveScroll(),!1===o&&this.selectionStart(s)),this.callback("imageDelete",t),this.modalClose(),this.sync()},imageSave:function(t){this.imageResizeHide(!1);var e=$(t),s=e.parent();e.attr("alt",$("#redactor_file_alt").val());var o=$("#redactor_form_image_align").val(),r="";"left"===o?(r="0 "+this.opts.imageFloatMargin+" "+this.opts.imageFloatMargin+" 0",e.css({float:"left",margin:r})):"right"===o?(r="0 0 "+this.opts.imageFloatMargin+" "+this.opts.imageFloatMargin,e.css({float:"right",margin:r})):"center"===o?e.css({float:"",display:"block",margin:"auto"}):e.css({float:"",display:"",margin:""});var a=$.trim($("#redactor_file_link").val());if(""!==a){var n=!1;if($("#redactor_link_blank").prop("checked")&&(n=!0),"A"!==s.get(0).tagName){var l=$('<a href="'+a+'">'+this.outerHtml(t)+"</a>");n&&l.attr("target","_blank"),e.replaceWith(l)}else s.attr("href",a),n?s.attr("target","_blank"):s.removeAttr("target")}else"A"===s.get(0).tagName&&s.replaceWith(this.outerHtml(t));this.modalClose(),this.observeImages(),this.sync()},imageResizeHide:function(t){if(!1!==t&&0!=$(t.target).parent().length&&"redactor-image-box"===$(t.target).parent()[0].id)return!1;var e=this.$editor.find("#redactor-image-box");if(0==e.length)return!1;this.$editor.find("#redactor-image-editter, #redactor-image-resizer").remove(),e.find("img").css({marginTop:e[0].style.marginTop,marginBottom:e[0].style.marginBottom,marginLeft:e[0].style.marginLeft,marginRight:e[0].style.marginRight}),e.css("margin",""),e.find("img").css("opacity",""),e.replaceWith(function(){return $(this).contents()}),$(document).off("click.redactor-image-resize-hide"),this.$editor.off("click.redactor-image-resize-hide"),this.$editor.off("keydown.redactor-image-delete"),this.sync()},imageResize:function(t){var e=$(t);e.on("mousedown",$.proxy(function(){this.imageResizeHide(!1)},this)),e.on("dragstart",$.proxy(function(){this.$editor.on("drop.redactor-image-inside-drop",$.proxy(function(){setTimeout($.proxy(function(){this.observeImages(),this.$editor.off("drop.redactor-image-inside-drop"),this.sync()},this),1)},this))},this)),e.on("click",$.proxy(function(t){if(0!=this.$editor.find("#redactor-image-box").length)return!1;var s,o,r=e.width()/e.height(),a=20,n=this.imageResizeControls(e),l=!1;!1!==n&&(n.on("mousedown",function(t){l=!0,t.preventDefault(),r=e.width()/e.height(),s=Math.round(t.pageX-e.eq(0).offset().left),o=Math.round(t.pageY-e.eq(0).offset().top)}),$(this.document.body).on("mousemove",$.proxy(function(t){if(l){t.pageX,e.eq(0).offset().left;var n=Math.round(t.pageY-e.eq(0).offset().top)-o,c=Math.round((parseInt(e.height(),10)+n)*r);c>a&&(e.width(c),c<100?this.imageEditter.css({marginTop:"-7px",marginLeft:"-13px",fontSize:"9px",padding:"3px 5px"}):this.imageEditter.css({marginTop:"-11px",marginLeft:"-18px",fontSize:"11px",padding:"7px 10px"})),s=Math.round(t.pageX-e.eq(0).offset().left),o=Math.round(t.pageY-e.eq(0).offset().top),this.sync()}},this)).on("mouseup",function(){l=!1})),this.$editor.on("keydown.redactor-image-delete",$.proxy(function(t){var s=t.which;(this.keyCode.BACKSPACE==s||this.keyCode.DELETE==s)&&(this.bufferSet(!1),this.imageResizeHide(!1),this.imageRemove(e))},this)),$(document).on("click.redactor-image-resize-hide",$.proxy(this.imageResizeHide,this)),this.$editor.on("click.redactor-image-resize-hide",$.proxy(this.imageResizeHide,this))},this))},imageResizeControls:function(t){var e=$('<span id="redactor-image-box" data-redactor="verified">');if(e.css({position:"relative",display:"inline-block",lineHeight:0,outline:"1px dashed rgba(0, 0, 0, .6)",float:t.css("float")}),e.attr("contenteditable",!1),"auto"!=t[0].style.margin?(e.css({marginTop:t[0].style.marginTop,marginBottom:t[0].style.marginBottom,marginLeft:t[0].style.marginLeft,marginRight:t[0].style.marginRight}),t.css("margin","")):e.css({display:"block",margin:"auto"}),t.css("opacity",.5).after(e),this.imageEditter=$('<span id="redactor-image-editter" data-redactor="verified">'+this.opts.curLang.edit+"</span>"),this.imageEditter.css({position:"absolute",zIndex:5,top:"50%",left:"50%",marginTop:"-11px",marginLeft:"-18px",lineHeight:1,backgroundColor:"#000",color:"#fff",fontSize:"11px",padding:"7px 10px",cursor:"pointer"}),this.imageEditter.attr("contenteditable",!1),this.imageEditter.on("click",$.proxy(function(){this.imageEdit(t)},this)),e.append(this.imageEditter),!this.opts.imageResizable)return e.append(t),!1;var s=$('<span id="redactor-image-resizer" data-redactor="verified"></span>');return s.css({position:"absolute",zIndex:2,lineHeight:1,cursor:"nw-resize",bottom:"-4px",right:"-5px",border:"1px solid #fff",backgroundColor:"#000",width:"8px",height:"8px"}),s.attr("contenteditable",!1),e.append(s),e.append(t),s},imageThumbClick:function(t){var e='<img id="image-marker" src="'+$(t.target).attr("rel")+'" alt="'+$(t.target).attr("title")+'" />',s=this.getParent();this.opts.paragraphy&&0==$(s).closest("li").length&&(e="<p>"+e+"</p>"),this.imageInsert(e,!0)},imageCallbackLink:function(){var t=$("#redactor_file_link").val();if(""!==t){var e='<img id="image-marker" src="'+t+'" />';!1===this.opts.linebreaks&&(e="<p>"+e+"</p>"),this.imageInsert(e,!0)}else this.modalClose()},imageCallback:function(t){this.imageInsert(t)},imageInsert:function(t,e){if(this.selectionRestore(),!1!==t){var s="";if(!0!==e){s='<img id="image-marker" src="'+t.image.url+'" />';var o=this.getParent();this.opts.paragraphy&&0==$(o).closest("li").length&&(s="<p>"+s+"</p>")}else s=t;this.execCommand("inserthtml",s,!1);var r=$(this.$editor.find("img#image-marker"));r.length?r.removeAttr("id"):r=!1,this.sync(),!0!==e&&this.callback("imageUpload",r,t)}this.modalClose(),this.observeImages()},buildProgressBar:function(){0==$("#redactor-progress").length&&(this.$progressBar=$('<div id="redactor-progress"><span></span></div>'),$(document.body).append(this.$progressBar))},showProgressBar:function(){this.buildProgressBar(),$("#redactor-progress").fadeIn()},hideProgressBar:function(){$("#redactor-progress").fadeOut(1500)},modalTemplatesInit:function(){$.extend(this.opts,{modal_file:String()+'<section id="redactor-modal-file-insert"><form id="redactorUploadFileForm" method="post" action="" enctype="multipart/form-data"><label>'+this.opts.curLang.filename+'</label><input type="text" id="redactor_filename" class="redactor_input" /><div style="margin-top: 7px;"><input type="file" id="redactor_file" name="'+this.opts.fileUploadParam+'" /></div></form></section>',modal_image_edit:String()+'<section id="redactor-modal-image-edit"><label>'+this.opts.curLang.title+'</label><input type="text" id="redactor_file_alt" class="redactor_input" /><label>'+this.opts.curLang.link+'</label><input type="text" id="redactor_file_link" class="redactor_input" /><label><input type="checkbox" id="redactor_link_blank"> '+this.opts.curLang.link_new_tab+"</label><label>"+this.opts.curLang.image_position+'</label><select id="redactor_form_image_align"><option value="none">'+this.opts.curLang.none+'</option><option value="left">'+this.opts.curLang.left+'</option><option value="center">'+this.opts.curLang.center+'</option><option value="right">'+this.opts.curLang.right+'</option></select></section><footer><button id="redactor_image_delete_btn" class="redactor_modal_btn redactor_modal_delete_btn">'+this.opts.curLang._delete+'</button><button class="redactor_modal_btn redactor_btn_modal_close">'+this.opts.curLang.cancel+'</button><button id="redactorSaveBtn" class="redactor_modal_btn redactor_modal_action_btn">'+this.opts.curLang.save+"</button></footer>",modal_image:String()+'<section id="redactor-modal-image-insert"><div id="redactor_tabs"><a href="#" id="redactor-tab-control-1" class="redactor_tabs_act">'+this.opts.curLang.upload+'</a><a href="#" id="redactor-tab-control-2">'+this.opts.curLang.choose+'</a><a href="#" id="redactor-tab-control-3">'+this.opts.curLang.link+'</a></div><form id="redactorInsertImageForm" method="post" action="" enctype="multipart/form-data"><div id="redactor_tab1" class="redactor_tab"><input type="file" id="redactor_file" name="'+this.opts.imageUploadParam+'" /></div><div id="redactor_tab2" class="redactor_tab" style="display: none;"><div id="redactor_image_box"><span class="empty_list">'+this.opts.curLang.empty_img_list+'</span></div></div></form><div id="redactor_tab3" class="redactor_tab" style="display: none;"><label>'+this.opts.curLang.image_web_link+'</label><input type="text" name="redactor_file_link" id="redactor_file_link" class="redactor_input"  /><br><br></div></section><footer><button class="redactor_modal_btn redactor_btn_modal_close">'+this.opts.curLang.cancel+'</button><button class="redactor_modal_btn redactor_modal_action_btn" id="redactor_upload_btn">'+this.opts.curLang.insert+"</button></footer>",modal_link:String()+'<section id="redactor-modal-link-insert"><select id="redactor-predefined-links" style="width: 99.5%; display: none;"></select><label>URL</label><input type="text" class="redactor_input" id="redactor_link_url" /><label>'+this.opts.curLang.text+'</label><input type="text" class="redactor_input" id="redactor_link_url_text" /><label><input type="checkbox" id="redactor_link_blank"> '+this.opts.curLang.link_new_tab+'</label></section><footer><button class="redactor_modal_btn redactor_btn_modal_close">'+this.opts.curLang.cancel+'</button><button id="redactor_insert_link_btn" class="redactor_modal_btn redactor_modal_action_btn">'+this.opts.curLang.insert+"</button></footer>",modal_table:String()+'<section id="redactor-modal-table-insert"><label>'+this.opts.curLang.rows+'</label><input type="text" size="5" value="2" id="redactor_table_rows" /><label>'+this.opts.curLang.columns+'</label><input type="text" size="5" value="3" id="redactor_table_columns" /></section><footer><button class="redactor_modal_btn redactor_btn_modal_close">'+this.opts.curLang.cancel+'</button><button id="redactor_insert_table_btn" class="redactor_modal_btn redactor_modal_action_btn">'+this.opts.curLang.insert+"</button></footer>",modal_video:String()+'<section id="redactor-modal-video-insert"><form id="redactorInsertVideoForm"><label>'+this.opts.curLang.video_html_code+'</label><textarea id="redactor_insert_video_area" style="width: 99%; height: 160px;"></textarea></form></section><footer><button class="redactor_modal_btn redactor_btn_modal_close">'+this.opts.curLang.cancel+'</button><button id="redactor_insert_video_btn" class="redactor_modal_btn redactor_modal_action_btn">'+this.opts.curLang.insert+"</button></footer>"})},modalInit:function(t,e,s,o){return this.modalSetOverlay(),this.$redactorModalWidth=s,this.$redactorModal=$("#redactor_modal"),this.$redactorModal.length||(this.$redactorModal=$('<div id="redactor_modal" style="display: none;" />'),this.$redactorModal.append($('<div id="redactor_modal_close">&times;</div>')),this.$redactorModal.append($('<header id="redactor_modal_header" />')),this.$redactorModal.append($('<div id="redactor_modal_inner" />')),this.$redactorModal.appendTo(document.body)),$("#redactor_modal_close").on("click",$.proxy(this.modalClose,this)),$(document).on("keyup",$.proxy(this.modalCloseHandler,this)),this.$editor.on("keyup",$.proxy(this.modalCloseHandler,this)),this.modalSetContent(e),this.modalSetTitle(t),this.modalSetDraggable(),this.modalLoadTabs(),this.modalOnCloseButton(),this.modalSetButtonsWidth(),this.saveModalScroll=this.document.body.scrollTop,!1===this.opts.autoresize&&(this.saveModalScroll=this.$editor.scrollTop()),!1===this.isMobile()?this.modalShowOnDesktop():this.modalShowOnMobile(),"function"==typeof o&&o(),setTimeout($.proxy(function(){this.callback("modalOpened",this.$redactorModal)},this),11),$(document).off("focusin.modal"),this.$redactorModal.find("input[type=text]").on("keypress",$.proxy(function(t){13===t.which&&(this.$redactorModal.find(".redactor_modal_action_btn").trigger("click"),t.preventDefault())},this)),this.$redactorModal},modalShowOnDesktop:function(){this.$redactorModal.css({position:"fixed",top:"-2000px",left:"50%",width:this.$redactorModalWidth+"px",marginLeft:"-"+this.$redactorModalWidth/2+"px"}).show(),this.modalSaveBodyOveflow=$(document.body).css("overflow"),$(document.body).css("overflow","hidden"),setTimeout($.proxy(function(){var t=this.$redactorModal.outerHeight();this.$redactorModal.css({top:"50%",height:"auto",minHeight:"auto",marginTop:"-"+(t+10)/2+"px"})},this),15)},modalShowOnMobile:function(){this.$redactorModal.css({position:"fixed",width:"100%",height:"100%",top:"0",left:"0",margin:"0",minHeight:"300px"}).show()},modalSetContent:function(t){this.modalcontent=!1,0==t.indexOf("#")?(this.modalcontent=$(t),$("#redactor_modal_inner").empty().append(this.modalcontent.html()),this.modalcontent.html("")):$("#redactor_modal_inner").empty().append(t)},modalSetTitle:function(t){this.$redactorModal.find("#redactor_modal_header").html(t)},modalSetButtonsWidth:function(){},modalOnCloseButton:function(){this.$redactorModal.find(".redactor_btn_modal_close").on("click",$.proxy(this.modalClose,this))},modalSetOverlay:function(){this.opts.modalOverlay&&(this.$redactorModalOverlay=$("#redactor_modal_overlay"),this.$redactorModalOverlay.length||(this.$redactorModalOverlay=$('<div id="redactor_modal_overlay" style="display: none;"></div>'),$("body").prepend(this.$redactorModalOverlay)),this.$redactorModalOverlay.show().on("click",$.proxy(this.modalClose,this)))},modalSetDraggable:function(){void 0!==$.fn.draggable&&(this.$redactorModal.draggable({handle:"#redactor_modal_header"}),this.$redactorModal.find("#redactor_modal_header").css("cursor","move"))},modalLoadTabs:function(){var t=$("#redactor_tabs");if(!t.length)return!1;var e=this;t.find("a").each(function(s,o){s++,$(o).on("click",function(o){if(o.preventDefault(),t.find("a").removeClass("redactor_tabs_act"),$(this).addClass("redactor_tabs_act"),$(".redactor_tab").hide(),$("#redactor_tab"+s).show(),$("#redactor_tab_selected").val(s),!1===e.isMobile()){var r=e.$redactorModal.outerHeight();e.$redactorModal.css("margin-top","-"+(r+10)/2+"px")}})})},modalCloseHandler:function(t){if(t.keyCode===this.keyCode.ESC)return this.modalClose(),!1},modalClose:function(){return $("#redactor_modal_close").off("click",this.modalClose),$("#redactor_modal").fadeOut("fast",$.proxy(function(){var t=$("#redactor_modal_inner");!1!==this.modalcontent&&(this.modalcontent.html(t.html()),this.modalcontent=!1),t.html(""),this.opts.modalOverlay&&$("#redactor_modal_overlay").hide().off("click",this.modalClose),$(document).off("keyup",this.modalCloseHandler),this.$editor.off("keyup",this.modalCloseHandler),this.selectionRestore(),this.opts.autoresize&&this.saveModalScroll?$(this.document.body).scrollTop(this.saveModalScroll):!1===this.opts.autoresize&&this.saveModalScroll&&this.$editor.scrollTop(this.saveModalScroll),this.callback("modalClosed")},this)),!1===this.isMobile()&&$(document.body).css("overflow",this.modalSaveBodyOveflow?this.modalSaveBodyOveflow:"visible"),!1},modalSetTab:function(t){$(".redactor_tab").hide(),$("#redactor_tabs").find("a").removeClass("redactor_tabs_act").eq(t-1).addClass("redactor_tabs_act"),$("#redactor_tab"+t).show()},s3handleFileSelect:function(t){for(var e,s=t.target.files,o=0;e=s[o];o++)this.s3uploadFile(e)},s3uploadFile:function(t){this.s3executeOnSignedUrl(t,$.proxy(function(e){this.s3uploadToS3(t,e)},this))},s3executeOnSignedUrl:function(t,e){var s=new XMLHttpRequest,o="?";"-1"!=this.opts.s3.search(/\?/)&&(o="&"),s.open("GET",this.opts.s3+o+"name="+t.name+"&type="+t.type,!0),s.overrideMimeType&&s.overrideMimeType("text/plain; charset=x-user-defined");var r=this;s.onreadystatechange=function(t){4==this.readyState&&200==this.status?(r.showProgressBar(),e(decodeURIComponent(this.responseText))):4==this.readyState&&this.status},s.send()},s3createCORSRequest:function(t,e){var s=new XMLHttpRequest;return"withCredentials"in s?s.open(t,e,!0):"undefined"!=typeof XDomainRequest?(s=new XDomainRequest).open(t,e):s=null,s},s3uploadToS3:function(t,e){var s=this.s3createCORSRequest("PUT",e);s&&(s.onload=$.proxy(function(){if(200==s.status){this.hideProgressBar();var t=e.split("?");if(!t[0])return!1;this.selectionRestore();var o="";o='<img id="image-marker" src="'+t[0]+'" />',this.opts.paragraphy&&(o="<p>"+o+"</p>"),this.execCommand("inserthtml",o,!1);var r=$(this.$editor.find("img#image-marker"));r.length?r.removeAttr("id"):r=!1,this.sync(),this.callback("imageUpload",r,!1),this.modalClose(),this.observeImages()}},this),s.onerror=function(){},s.upload.onprogress=function(t){},s.setRequestHeader("Content-Type",t.type),s.setRequestHeader("x-amz-acl","public-read"),s.send(t))},uploadInit:function(t,e){this.uploadOptions={url:!1,success:!1,error:!1,start:!1,trigger:!1,auto:!1,input:!1},$.extend(this.uploadOptions,e);var s=$("#"+t);s.length&&"INPUT"===s[0].tagName?(this.uploadOptions.input=s,this.el=$(s[0].form)):this.el=s,this.element_action=this.el.attr("action"),this.uploadOptions.auto?$(this.uploadOptions.input).change($.proxy(function(t){this.el.submit(function(t){return!1}),this.uploadSubmit(t)},this)):this.uploadOptions.trigger&&$("#"+this.uploadOptions.trigger).on("click",$.proxy(this.uploadSubmit,this))},uploadSubmit:function(t){this.showProgressBar(),this.uploadForm(this.element,this.uploadFrame())},uploadFrame:function(){this.id="f"+Math.floor(99999*Math.random());var t=this.document.createElement("div"),e='<iframe style="display:none" id="'+this.id+'" name="'+this.id+'"></iframe>';return t.innerHTML=e,$(t).appendTo("body"),this.uploadOptions.start&&this.uploadOptions.start(),$("#"+this.id).one("load",$.proxy(this.uploadLoaded,this)),this.id},uploadForm:function(t,e){if(this.uploadOptions.input){var s="redactorUploadForm"+this.id,o="redactorUploadFile"+this.id;this.form=$('<form  action="'+this.uploadOptions.url+'" method="POST" target="'+e+'" name="'+s+'" id="'+s+'" enctype="multipart/form-data" />'),!1!==this.opts.uploadFields&&"object"==typeof this.opts.uploadFields&&$.each(this.opts.uploadFields,$.proxy(function(t,e){null!=e&&0===e.toString().indexOf("#")&&(e=$(e).val());var s=$("<input/>",{type:"hidden",name:t,value:e});$(this.form).append(s)},this));var r=this.uploadOptions.input,a=$(r).clone();$(r).attr("id",o).before(a).appendTo(this.form),$(this.form).css("position","absolute").css("top","-2000px").css("left","-2000px").appendTo("body"),this.form.submit()}else t.attr("target",e).attr("method","POST").attr("enctype","multipart/form-data").attr("action",this.uploadOptions.url),this.element.submit()},uploadLoaded:function(){var t,e=$("#"+this.id)[0];if(t=e.contentDocument?e.contentDocument:e.contentWindow?e.contentWindow.document:window.frames[this.id].document,this.uploadOptions.success){if(this.hideProgressBar(),void 0!==t){var s=t.body.innerHTML.match(/\{(.|\n)*\}/)[0];s=(s=s.replace(/^\[/,"")).replace(/\]$/,"");var o=$.parseJSON(s);void 0===o.error?this.uploadOptions.success(o):(console.log(o),this.uploadOptions.error(this,o),this.modalClose())}else this.modalClose(),alert("Upload failed!")}this.el.attr("action",this.element_action),this.el.attr("target","")},draguploadInit:function(t,e){if(this.draguploadOptions=$.extend({url:!1,success:!1,error:!1,preview:!1,uploadFields:!1,text:this.opts.curLang.drop_file_here,atext:this.opts.curLang.or_choose,uploadParam:!1},e),void 0===window.FormData)return!1;this.droparea=$('<div class="redactor_droparea"></div>'),this.dropareabox=$('<div class="redactor_dropareabox">'+this.draguploadOptions.text+"</div>"),this.dropalternative=$('<div class="redactor_dropalternative">'+this.draguploadOptions.atext+"</div>"),this.droparea.append(this.dropareabox),$(t).before(this.droparea),$(t).before(this.dropalternative),this.dropareabox.on("dragover",$.proxy(function(){return this.draguploadOndrag()},this)),this.dropareabox.on("dragleave",$.proxy(function(){return this.draguploadOndragleave()},this)),this.dropareabox.get(0).ondrop=$.proxy(function(t){for(var e in t.preventDefault(),this.dropareabox.removeClass("hover").addClass("drop"),this.showProgressBar(),t.dataTransfer.files)t.dataTransfer.files.hasOwnProperty(e)&&this.dragUploadAjax(this.draguploadOptions.url,t.dataTransfer.files[e],!1,t,this.draguploadOptions.uploadParam)},this)},dragUploadAjax:function(t,e,s,o,r){if(!s){var a=$.ajaxSettings.xhr();a.upload&&a.upload.addEventListener("progress",$.proxy(this.uploadProgress,this),!1),$.ajaxSetup({xhr:function(){return a}})}this.callback("drop",o);var n=new FormData;!1!==r?n.append(r,e):n.append("file",e),!1!==this.opts.uploadFields&&"object"==typeof this.opts.uploadFields&&$.each(this.opts.uploadFields,$.proxy(function(t,e){null!=e&&0===e.toString().indexOf("#")&&(e=$(e).val()),n.append(t,e)},this)),$.ajax({url:t,dataType:"html",async:!1,data:n,cache:!1,contentType:!1,processData:!1,type:"POST",success:$.proxy(function(t){var e="string"==typeof(t=(t=t.replace(/^\[/,"")).replace(/\]$/,""))?$.parseJSON(t):t;if(this.hideProgressBar(),s){var r=$("<img>");r.attr("src",e.image.url).attr("id","drag-image-marker"),this.insertNodeToCaretPositionFromPoint(o,r[0]);var a=$(this.$editor.find("img#drag-image-marker"));a.length?a.removeAttr("id"):a=!1,this.sync(),this.observeImages(),a&&this.callback("imageUpload",a,e),void 0!==e.error&&this.callback("imageUploadError",e)}else void 0===e.error?this.draguploadOptions.success(e):(this.draguploadOptions.error(this,e),this.draguploadOptions.success(!1))},this)})},draguploadOndrag:function(){return this.dropareabox.addClass("hover"),!1},draguploadOndragleave:function(){return this.dropareabox.removeClass("hover"),!1},uploadProgress:function(t,e){var s=t.loaded?parseInt(t.loaded/t.total*100,10):t;this.dropareabox.text("Loading "+s+"% "+(e||""))},isMobile:function(){return/(iPhone|iPod|BlackBerry|Android)/.test(navigator.userAgent)},isIPad:function(){return/iPad/.test(navigator.userAgent)},normalize:function(t){return void 0===t?0:parseInt(t.replace("px",""),10)},outerHtml:function(t){return $("<div>").append($(t).eq(0).clone()).html()},stripHtml:function(t){var e=document.createElement("DIV");return e.innerHTML=t,e.textContent||e.innerText||""},isString:function(t){return"[object String]"==Object.prototype.toString.call(t)},isEmpty:function(t){return""==(t=(t=(t=t.replace(/&#x200b;|<br>|<br\/>|&nbsp;/gi,"")).replace(/\s/g,"")).replace(/^<p>[^\W\w\D\d]*?<\/p>$/i,""))},getInternetExplorerVersion:function(){var t=!1;if("Microsoft Internet Explorer"==navigator.appName){var e=navigator.userAgent;null!=RegExp("MSIE ([0-9]{1,}[.0-9]{0,})").exec(e)&&(t=parseFloat(RegExp.$1))}return t},isIe11:function(){return!!navigator.userAgent.match(/Trident\/7\./)},browser:function(t){var e=navigator.userAgent.toLowerCase(),s=/(opr)[\/]([\w.]+)/.exec(e)||/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("trident")>=0&&/(rv)(?::| )([\w.]+)/.exec(e)||0>e.indexOf("compatible")&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return"version"==t?s[2]:"webkit"==t?"chrome"==s[1]||"webkit"==s[1]:"rv"==s[1]?"msie"==t:"opr"==s[1]?"webkit"==t:t==s[1]},oldIE:function(){return!!(this.browser("msie")&&9>parseInt(this.browser("version"),10))},getFragmentHtml:function(t){var e=t.cloneNode(!0),s=this.document.createElement("div");return s.appendChild(e),s.innerHTML},extractContent:function(){for(var t,e=this.$editor[0],s=this.document.createDocumentFragment();t=e.firstChild;)s.appendChild(t);return s},isParentRedactor:function(t){return!!t&&(this.opts.iframe?t:!(0==$(t).parents("div.redactor_editor").length||$(t).hasClass("redactor_editor"))&&t)},currentOrParentIs:function(t){var e=this.getParent(),s=this.getCurrent();return e&&e.tagName===t?e:!!s&&s.tagName===t&&s},isEndOfElement:function(){var t=this.getBlock(),e=this.getCaretOffset(t),s=$.trim($(t).text()).replace(/\n\r\n/g,"").length;return e==s},isFocused:function(){var t,e=this.getSelection();return e&&e.rangeCount&&e.rangeCount>0&&(t=e.getRangeAt(0).startContainer),!!t&&(this.opts.iframe?!this.getCaretOffsetRange().equals()||!this.$editor.is(t):0!=$(t).closest("div.redactor_editor").length)},removeEmptyAttr:function(t,e){""==$(t).attr(e)&&$(t).removeAttr(e)},removeFromArrayByValue:function(t,e){for(var s=null;-1!==(s=t.indexOf(e));)t.splice(s,1);return t}},Redactor.prototype.init.prototype=Redactor.prototype,$.Redactor.fn.formatLinkify=function(t,e,s,o,r){for(var a=/(((https?|ftps?):\/\/)|www[.][^\s])(.+?\..+?)([.),]?)(\s|\.\s+|\)|$)/gi,n=/(https?|ftp):\/\//i,l=/(https?:\/\/.*\.(?:png|jpg|jpeg|gif))/gi,c=(this.$editor?this.$editor.get(0):this).childNodes,h=c.length;h--;){var d=c[h];if(3===d.nodeType){var p=d.nodeValue;if(o&&p){var u='<iframe width="500" height="281" src="',f='" frameborder="0" allowfullscreen></iframe>';p.match(reUrlYoutube)?(p=p.replace(reUrlYoutube,u+"//www.youtube.com/embed/$1"+f),$(d).after(p).remove()):p.match(reUrlVimeo)&&(p=p.replace(reUrlVimeo,u+"//player.vimeo.com/video/$2"+f),$(d).after(p).remove())}if(s&&p&&p.match(l)&&(p=p.replace(l,'<img src="$1">'),$(d).after(p).remove()),e&&p&&p.match(a)){var m=p.match(a);for(var h in m){var g=m[h],b=g,v="";null!==g.match(/\s$/)&&(v=" ");var _=t;null!==g.match(n)&&(_=""),b.length>r&&(b=b.substring(0,r)+"...");var y=(b=b.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")).replace("$","$$$");p=p.replace(g,'<a href="'+_+$.trim(g)+'">'+$.trim(y)+"</a>"+v)}$(d).after(p).remove()}}else 1!==d.nodeType||/^(a|button|textarea)$/i.test(d.tagName)||$.Redactor.fn.formatLinkify.call(d,t,e,s,o,r)}}}(jQuery);
        $template->addJSFromContext('wysiwyg/redactor/files/redactor.min.js');