Вход Регистрация
Файл: addons/markitup/jquery.markitup.pack.js
Строк: 165
<?php
// ----------------------------------------------------------------------------
// markItUp! Universal MarkUp Engine, JQuery plugin
// v 1.1.2 beta
// Dual licensed under the MIT and GPL licenses.
// ----------------------------------------------------------------------------
// Copyright (C) 2007-2008 Jay Salvat
// http://markitup.jaysalvat.com/
// ----------------------------------------------------------------------------
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
// 
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
// 
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
// ----------------------------------------------------------------------------
eval(function(p,a,c,k,e,r){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--)r[e(c)]=k[c]||e(c);k=[function(e){return r[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}('(3($){$.23.T=3(f,g){E k,v,A,K;v=A=K=7;k={C:'',12:'',U:'',1k:'',1B:o,24:'25',1l:'~/2P/1C.14',1c:'',26:'27',1m:o,1D:'',1E:'',1F:{},1G:{},1H:{},1I:{},28:[{}]};$.V(k,f,g);2(!k.U){$('2Q').1d(3(a,b){1J=$(b).15(0).2R.2S(/(.*)2T\.2U(\.2V)?\.2W$/);2(1J!==29){k.U=1J[1]}})}4 F.1d(3(){E d,u,16,17,p,G,L,P,18,1n,w,1o,M,19;d=$(F);u=F;16=[];19=7;17=p=0;G=-1;k.1c=1e(k.1c);k.1l=1e(k.1l);3 1e(a,b){2(b){4 a.W(/("|')~\//g,"$1"+k.U)}4 a.W(/^~\//,k.U)}3 2a(){C='';12='';2(k.C){C='C="'+k.C+'"'}8 2(d.1K("C")){C='C="T'+(d.1K("C").2b(0,1).2X())+(d.1K("C").2b(1))+'"'}2(k.12){12='N="'+k.12+'"'}d.1L('<z '+12+'"></z>');d.1L('<z '+C+' N="T"></z>');d.1L('<z N="2Y"></z>');d.2c("2d");18=$('<z N="2Z"></z>').2e(d);$(1M(k.28)).1N(18);1n=$('<z N="30"></z>').1O(d);2(k.1m===o&&$.X.31!==o){1m=$('<z N="32"></z>').1O(d).1f("33",3(e){E h=d.2f(),y=e.2g,1p,1q;1p=3(e){d.2h("2f",34.35(20,e.2g+h-y)+"36");4 7};1q=3(e){$("14").1P("2i",1p).1P("1r",1q);4 7};$("14").1f("2i",1p).1f("1r",1q)});1n.2j(1m)}d.2k(1Q).37(1Q);d.1f("1R",3(e,a){2(a.1s!==7){15()}2(u===$.T.2l){Y(a)}});d.1g(3(){$.T.2l=F})}3 1M(b){E c=$('<Z></Z>'),i=0;$('B:2m > Z',c).2h('38','q');$(b).1d(3(){E a=F,t='',1t,B,j;1t=(a.1a)?(a.1S||'')+' [39+'+a.1a+']':(a.1S||'');1a=(a.1a)?'2n="'+a.1a+'"':'';2(a.2o){B=$('<B N="3a">'+(a.2o||'')+'</B>').1N(c)}8{i++;2p(j=16.6-1;j>=0;j--){t+=16[j]+"-"}B=$('<B N="2q 2q'+t+(i)+' '+(a.3b||'')+'"><a 3c="" '+1a+' 1t="'+1t+'">'+(a.1S||'')+'</a></B>').1f("3d",3(){4 7}).2r(3(){4 7}).1r(3(){2(a.2s){3e(a.2s)()}Y(a);4 7}).2m(3(){$('> Z',F).3f();$(D).3g('2r',3(){$('Z Z',18).2t()})},3(){$('> Z',F).2t()}).1N(c);2(a.2u){16.3h(i);$(B).2c('3i').2j(1M(a.2u))}}});16.3j();4 c}3 2v(c){2(c){c=c.3k();c=c.W(/\(\!\(([\s\S]*?)\)\!\)/g,3(x,a){E b=a.1T('|!|');2(K===o){4(b[1]!==2w)?b[1]:b[0]}8{4(b[1]===2w)?"":b[0]}});c=c.W(/\[\!\[([\s\S]*?)\]\!\]/g,3(x,a){E b=a.1T(':!:');2(19===o){4 7}1U=3l(b[0],(b[1])?b[1]:'');2(1U===29){19=o}4 1U});4 c}4""}3 H(a){2($.3m(a)){a=a(P)}4 2v(a)}3 1h(a){I=H(L.I);1b=H(L.1b);Q=H(L.Q);O=H(L.O);2(Q!==""){q=I+Q+O}8 2(l===''&&1b!==''){q=I+1b+O}8{q=I+(a||l)+O}4{q:q,I:I,Q:Q,1b:1b,O:O}}3 Y(a){E b,j,n,i;P=L=a;15();$.V(P,{1u:"",U:k.U,u:u,l:(l||''),p:p,v:v,A:A,K:K});H(k.1D);H(L.1D);2(v===o&&A===o){H(L.3n)}$.V(P,{1u:1});2(v===o&&A===o){R=l.1T(/\r?\n/);2p(j=0,n=R.6,i=0;i<n;i++){2($.3o(R[i])!==''){$.V(P,{1u:++j,l:R[i]});R[i]=1h(R[i]).q}8{R[i]=""}}m={q:R.3p('\n')};11=p;b=m.q.6+(($.X.1V)?n:0)}8 2(v===o){m=1h(l);11=p+m.I.6;b=m.q.6-m.I.6-m.O.6;b-=1v(m.q)}8 2(A===o){m=1h(l);11=p;b=m.q.6;b-=1v(m.q)}8{m=1h(l);11=p+m.q.6;b=0;11-=1v(m.q)}2((l===''&&m.Q==='')){G+=1W(m.q);11=p+m.I.6;b=m.q.6-m.I.6-m.O.6;G=d.J().1i(p,d.J().6).6;G-=1W(d.J().1i(0,p))}$.V(P,{p:p,17:17});2(m.q!==l&&19===7){2x(m.q);1X(11,b)}8{G=-1}15();$.V(P,{1u:'',l:l});2(v===o&&A===o){H(L.3q)}H(L.1E);H(k.1E);2(w&&k.1B){1Y()}A=K=v=19=7}3 1W(a){2($.X.1V){4 a.6-a.W(/\n*/g,'').6}4 0}3 1v(a){2($.X.2y){4 a.6-a.W(/\r*/g,'').6}4 0}3 2x(a){2(D.l){E b=D.l.1Z();b.2z=a}8{d.J(d.J().1i(0,p)+a+d.J().1i(p+l.6,d.J().6))}}3 1X(a,b){2(u.2A){2($.X.1V&&$.X.3r>=9.5&&b==0){4 7}1j=u.2A();1j.3s(o);1j.2B('21',a);1j.3t('21',b);1j.3u()}8 2(u.2C){u.2C(a,a+b)}u.1w=17;u.1g()}3 15(){u.1g();17=u.1w;2(D.l){l=D.l.1Z().2z;2($.X.2y){E a=D.l.1Z(),1x=a.3v();1x.3w(u);p=-1;3x(1x.3y(a)){1x.2B('21');p++}}8{p=u.2D}}8{p=u.2D;l=d.J().1i(p,u.3z)}4 l}3 1C(){2(!w||w.3A){2(k.1k){w=3B.2E('','1C',k.1k)}8{M=$('<2F N="3C"></2F>');2(k.24=='25'){M.1O(1n)}8{M.2e(18)}w=M[M.6-1].3D||3E[M.6-1]}}8 2(K===o){2(M){M.3F()}w.2G();w=M=7}2(!k.1B){1Y()}}3 1Y(){2(w.D){3G{22=w.D.2H.1w}3H(e){22=0}w.D.2E();w.D.3I(2I());w.D.2G();w.D.2H.1w=22}2(k.1k){w.1g()}}3 2I(){2(k.1c!==''){$.2J({2K:'3J',2L:7,2M:k.1c,27:k.26+'='+3K(d.J()),2N:3(a){14=1e(a,1)}})}8{2(!1o){$.2J({2L:7,2M:k.1l,2N:3(a){1o=1e(a,1)}})}14=1o.W(/<!-- 3L -->/g,d.J())}4 14}3 1Q(e){A=e.A;K=e.K;v=(!(e.K&&e.v))?e.v:7;2(e.2K==='2k'){2(v===o){B=$("a[2n="+3M.3N(e.1y)+"]",18).1z('B');2(B.6!==0){v=7;B.3O('1r');4 7}}2(e.1y===13||e.1y===10){2(v===o){v=7;Y(k.1H);4 k.1H.1A}8 2(A===o){A=7;Y(k.1G);4 k.1G.1A}8{Y(k.1F);4 k.1F.1A}}2(e.1y===9){2(G!==-1){15();G=d.J().6-G;1X(G,0);G=-1;4 7}8{Y(k.1I);4 k.1I.1A}}}}2a()})};$.23.3P=3(){4 F.1d(3(){$$=$(F).1P().3Q('2d');$$.1z('z').1z('z.T').1z('z').Q($$)})};$.T=3(a){E b={1s:7};$.V(b,a);2(b.1s){4 $(b.1s).1d(3(){$(F).1g();$(F).2O('1R',[b])})}8{$('u').2O('1R',[b])}}})(3R);',62,240,'||if|function|return||length|false|else|||||||||||||selection|string||true|caretPosition|block||||textarea|ctrlKey|previewWindow|||div|shiftKey|li|id|document|var|this|caretOffset|prepare|openWith|val|altKey|clicked|iFrame|class|closeWith|hash|replaceWith|lines||markItUp|root|extend|replace|browser|markup|ul||start|nameSpace||html|get|levels|scrollPosition|header|abort|key|placeHolder|previewParserPath|each|localize|bind|focus|build|substring|range|previewInWindow|previewTemplatePath|resizeHandle|footer|template|mouseMove|mouseUp|mouseup|target|title|line|fixIeBug|scrollTop|rangeCopy|keyCode|parent|keepDefault|previewAutoRefresh|preview|beforeInsert|afterInsert|onEnter|onShiftEnter|onCtrlEnter|onTab|miuScript|attr|wrap|dropMenus|appendTo|insertAfter|unbind|keyPressed|insertion|name|split|value|opera|fixOperaBug|set|refreshPreview|createRange||character|sp|fn|previewPosition|after|previewParserVar|data|markupSet|null|init|substr|addClass|markItUpEditor|insertBefore|height|clientY|css|mousemove|append|keydown|focused|hover|accesskey|separator|for|markItUpButton|click|call|hide|dropMenu|magicMarkups|undefined|insert|msie|text|createTextRange|moveStart|setSelectionRange|selectionStart|open|iframe|close|documentElement|renderPreview|ajax|type|async|url|success|trigger|templates|script|src|match|jquery|markitup|pack|js|toUpperCase|markItUpContainer|markItUpHeader|markItUpFooter|safari|markItUpResizeHandle|mousedown|Math|max|px|keyup|display|Ctrl|markItUpSeparator|className|href|contextmenu|eval|show|one|push|markItUpDropMenu|pop|toString|prompt|isFunction|beforeMultiInsert|trim|join|afterMultiInsert|version|collapse|moveEnd|select|duplicate|moveToElementText|while|inRange|selectionEnd|closed|window|markItUpPreviewFrame|contentWindow|frame|remove|try|catch|write|POST|encodeURIComponent|content|String|fromCharCode|triggerHandler|markItUpRemove|removeClass|jQuery'.split('|'),0,{}))
?>
Онлайн: 2
Реклама