Commit 4a1fae7fbdc5943b5a12615632ccb9aa41630706

Editor in place

  Add visual interface for editing the website. Using timymce wysiwyg editor
for editing html.
Also, moving to ObjectIds of Mongo to use in models.
And, M.type_map is now called M.types
  • Diff rendering mode:
  • inline
  • side by side

server.py

1#!/usr/bin/python1#!/usr/bin/python
2# Mouchak Server - Flask Application
2# Mouchak Server -
3# A Flask Application (http://flask.pocoo.org/)
4
3import flask5import flask
6import pymongo
7import bson
48
5app = flask.Flask(__name__)9app = flask.Flask(__name__)
610
11dbClient = pymongo.MongoClient()
12db = dbClient['mouchak']
13collection = db['content']
14# handy reference to otherwise long name
15bson.ObjId = bson.objectid.ObjectId
16
17def getContent():
18 content = []
19 for i in collection.find():
20 objId = bson.ObjId(i['_id'])
21 del(i['_id'])
22 i['id'] = str(objId)
23 content.append(i)
24 return content
25
26
7@app.route('/', methods=['GET'])27@app.route('/', methods=['GET'])
8def index():28def index():
9 return flask.render_template('index.html')
29 return flask.render_template('index.html', content=getContent())
30
31
32@app.route('/edit', methods=['GET', 'POST'])
33def edit():
34 if flask.request.method == 'GET':
35 return flask.render_template('editor.html', content=getContent())
36
37 elif flask.request.method == 'POST':
38 newpage = flask.request.json
39 print newpage
40 res = collection.insert(newpage)
41 print res
42 return flask.jsonify(status='success')#, content=getContent())
43
44
45@app.route('/edit/<_id>', methods=['PUT', 'DELETE'])
46def editPage(_id):
47 if flask.request.method == 'PUT':
48 changedPage = flask.request.json
49 print changedPage
50 res = collection.update({'_id' : bson.ObjId(_id)},
51 changedPage)
52 print res
53 #print collection.find({'name': changed['name']})
54 #for i in collection.find({'name': changed['name']}):
55 #print i
56 return flask.jsonify(status='success')#, content=getContent())
57
58 elif flask.request.method == 'DELETE':
59 delPage = flask.request.url
60 print delPage
61 print _id
62 res = collection.remove({'_id': bson.ObjId(_id)})
63 print res
64 return flask.jsonify(status='success', msg='removed')
65
1066
11if __name__ == "__main__":67if __name__ == "__main__":
12 app.run(debug=True, host='0.0.0.0')68 app.run(debug=True, host='0.0.0.0')

static/css/main.css

93 Author's custom styles93 Author's custom styles
94 ========================================================================== */94 ========================================================================== */
9595
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
96.page {
97 border: 1px solid #999;
98 padding: 20px;
99 width: 400px;
100 height: 400px;
101}
102#pages {
103 position: absolute;
104 left: 20px;
105 top: 20px;
106 border: 1px solid black;
107 padding: 10px;
108 width: 300px;
109 height: 80%;
110}
111#page {
112 position: absolute;
113 left: 500px;
114 top: 90px;
115}
116#pagelist {
117 padding: 10px;
118}
119#content {
120 padding: 10px;
121 margin: 3px;
122 margin-bottom: 10px;
123 max-height: 120px;
124 overflow-y: auto;
125}
126.content-item:hover {
127 cursor: pointer;
128 cursor: hand;
129}
130#contentview {
131 border: 1px solid #999;
132 padding: 10px;
133 margin: 10px;
134}
135.contentview {
136}
137#specific-content {
138 padding: 3px;
139 margin-bottom: 10px;
140}
111141
112/* ==========================================================================142/* ==========================================================================
113 Helper classes143 Helper classes

static/img/glyphicons-halflings-white.png

1PNG
2
3 IHDRӳ{PLTEmmmⰰᒒttt󻻻bbbeeeggg𶶶xxx󛛛Ƽ몪֢UUU鿿rOtRNS#_
4/oS?C kDOS_6>4!~a @1_'onҋM3BQjp&%!l"Xqr; A[<`am}43/0IPCM!6(*gK&YQGDP,`{VP-x)h7e1]W$1bzSܕcO]U;Zi<N# ) 86pV:h#0ZQJNEDT~^-IDATx^읇#Ǚb' 4A$Ah )p3<MF9Y9X,riھ|st9s޿X kjv@l_I*~h>'y"؆K 64Y*.v@c.};tN%DI !ZЏ5LH26 ɯ" -bE,,)ʏ B>mn6pmRO
5wm@V#?'CȑZ#qb|$:)/E%nRqChn%i̓}lm
6?idd",`H"r.z~(bQU&)5X#EMR<*p[[%.Ọk7lIoJF lV!̡ăuH`&,zRk$|$lXbjߪdU?Σ$HW$U'HE3*խU\}(
7zhVk}guRk$%|T|ck獳"D_W+.Q)@ƽHbslTDR2Xm#a 3lYzj㒚#! 4J8(cvt]aT D ΅Q?^-_^$:\V $N|=(vZ'q6Z׆B5V!y3K㱿bv4xR]al!IoP@tVyL٪mlڿIUb|[*lke'*WddDӝ}\W_WߝrN?vޫ۲X%0uoui*JVƦb%}i5IYlNE-wςf_W3mI-mQ)S kTC7m<"܌bT|'$ҘR&>O p6tSN\ׯLm\r@3uT
8b7t.5.q3r0=8TiJ\6uF
9R32^'ŪxI F8O{%8kJMSȴdBEdWCYO:/ON/I_=xFE! =i:o~ y?''[͓[͓[͓[͓[ͭ.U>$PƦc%]\c:| ,eSZ,oXrX!R@Zv 0>?* <|N60;{ad2v+D^t[q!۞V}fۨϏYeॗ)Vyl|" fUq@Ǽ4Y-Y-!6aB:o%JIUQ|UKO`=\ :0x Pau@!KPdxhw1>$j΍vZdxSUA&[URd7øzk/rU^w:I.VǮc>q.!zSr&2)Wg R -iQ 8Pa\ОU%iݡU_=p Lu(N?0?Æ:]άtB%U|NsorNf ,P !v"
10Y6hL_@@bscqgv4||0lϟ$S9bʱj#~?o}}7sAPm:IV=n
11!{{hEࢪ8suoLT$;VscqD3 ༂3.DBB4&V' T `D6Ϸqyj8V*X%@s\jrN$|=5Ά 'mUiKi%CI:ssaƅ`*`=l)>u՘MeuSI_OL_}o&jzp{lu:O)s%Q@$<]f xO%PCbhr2PKpf5Në3^o]eJiB464^tuٲU֌:G4'22YpuG'/Py4?.SBP_>I 1t3ΓBɭɭɭɭVVVVVs]!67(g y@ 4>Q VF}^Xׇڼje26 L%YGh lC})<
12!EEPZWZV+@†R 5{@ouɐ4&H6ey V݀VťcqZޒrJyByFzFN$Hb*+jՏqэ ګkݿUXle1d0d^-B%} {Y%r*j5Ak5u",:~ҸY~
13hSA~6 fulՇf{ȵQtATHZkƭ/_Sn
14u']b]|m`BāJ,O$du]Zs FL:aǙT4o~by?wpj滥A(x]†f~an֧/^dڲcՇ,!1i&xi_VK@ip̓9Vi%a; L?0J*Ū5U'x^6V[^ {eU|:0=0d۫o*Jq%[YN.sQLud[29I:WnmXlڃ6!lNlVէKUjV\J%UߊBLcKfb>a=b~R]aG%[js@<i[Х*^.d;UIR+OD2eܶ QN34"1g0u\I}wFV4y/Djjjn5On5On5On5On5h,ҷUr]]L^%JDiɭGԝ ߴ/%='qå):Q<X.'[@Pv/ɼ>/9MطݘU>yɲX@} Ftg^vO\Ӹwvpz3K5i!$P>ā'VƛL2r@UMKZ6tw맟¦bm1h||]}~0MjA(JJP68C&yr׉e}j_cJ?I0k>šW |Bޝ."TEXd 8!cw*E(J)![W"j_ТeX_XB;oO0~?:PC (.[!Wq%*leY)E<^KZT60.#A\5;Rmtkd/8)5~^0 #Ckgey)ͶԺ6ĥ<(?&uAVm0^h.txR*a':,H|ō l5z;8+e#b'#|}2w(|KcJ l6 w^Տoi3H R ̔9,YgPְ:N [5SR![)]i}`mN4Хv`|;f(FltL8÷Z#AO%Y)NU5YedJE3dZذ<xɝe @PڧFTR 2S·Φ/uZ~C3XzUx\2se DD.fBO&en'iR%?FyVsS~$umw()ro0*Di!3:On[B!sʇBp>ݣHT1 ;8MjnʏӤqp 1h^<<<jjjjjnq(qpOk}I?TY8HmhyK̝u5ItenQBޗ`R`EP ڦx>>yt{?|'j)}YUU{@V/J1F+7䀉[OWO[ yUY!?BD%DWj>-Ai6xz)U R7 d@g\so)a4zf[W+> P>
15|qLG8vȣlj2Zt+VA6g</Q HSrΣd}Yqg]sY];]FC@5YՖ5C38o)k1'd6>T *ʆUz(m)CD `He/.:zN9pgo &NC׃އ>Wհ_Hj)Xe6F7pm-`'c.AZ=^e8F;<J1{+8'ɪ'և\A*[ R$UY)V AyɃw)Ec#<T\vW<U1IؘCDoYo]wmaw:B :'Z+v}|0q1P΃*uT7 F39A}$f+o[I5ʰ޽x(&iʼY:cPp*b¸JjV7ljtsNkv[fy3g]u鲱gJE0)Viłù\vW<Ugte~B[AHJ'.n& 1Ԕ o%gͱ_N
165.W3y/Ddyr<<<<<jܪ{waw:6dJ;&3p tlasW_UT_'9{?aԬl/0dHgqllc8Rym=ˢ_ͺ[Է71x""SIfVrx33y)h hՠ0?r5x_ -j чoO:$XBXJѣ1#ֈu7`zu2{\;uܗ9@0V$2XS&Ba[O~jN2ߠȪ/jz_nA~ uh@GLOeɵ ?Tf<Ve@*-}e@ 0Zt /~Xm0**H'\uSEmLֻ6;+{l5۽?u*_ Ni-:I@,;]WY` *߀nSO~nWP.cZTuPo^ǃ7wBRBW_mdjB6:*H]dQ>{Rtn(z!S7o
17Iew3]bܗ85|iϠRJkʱZRO+8U&:]ZieR<I~|d,j릟{;7U݌XB`[u5~=zq굵Ű޹ebc5o{;ߩ@;n*T ĵ2$ܨ0'Y-?
18j[Zjӭvi-*rD{mL-,L=ymxc:WevұoÏń
19"dF8[T}ӵF-IVlV[P)DV C8ݪ}|kZ {Y|xrrxaG_>(JMޗ7Z@5a^\GzsρU*rMezT^:ɬͦX=>$
20bi>U&XQoybbGk8
21Ҙn).Սo ^MmdZi$soo*{4eLbLٳ""mx:`:mk[geTެ)'0*TB{!I ''''[͓[͓[͓[͓[]Zj Q.e '/yvQ71(Z&X?(_Z){tڀmZWϏ)-C jqn,̋"IvUL!h꛿skAcrN佚фVE40yX~4zʸV㳰%,)fqtpu~  *^0:ܲ33JO(ZB?K^ v]unlWi0p6[착C_5X#[wX3b廫R{NKAe Se|wxso>P\儔ԕ6;nVmfI$V͓J-J%֌0UwYЎSnum藮xz˗VƫIvnW_qLZ"_Xz 8]Ap?C543zw({7e*Ȳ`۰!AQ:KUnz]1yVGaCm0PY
22ٚUx6TT&hV9V
23ӬzÑ 1[XzZ9erqJND/gX*9oN6D` {I%Mz9—TQ7f\"j_3~xB'ܷY]*KЌ%"5"qxq~ƕ=jS>jV&~]2xzF1X_yD<#NRB}K/iy !V^˿eJ}/FkA7 S+.(ecJ:zWZ몖wQ~ä́p6,e5,+,tv%O^OO}ן -O7>ekC6wa_C |9*WA)UJg8<Zx^?2uY*^?ڇKCZ[0.C@m$-/~|Y[eweQ׶&cO4s|cJwsX8/6/ ڼ;'FLN^8]eadZ 1'^LsBd%+M`SK8פ*)gl#3"gъS qtcxx|H>=:mjUvqysܒLglC6+[FSWg9wV31A ND<$5e(s[ ۨbaF.]KIENDB`

static/img/glyphicons-halflings.png

1PNG
2
3 IHDRtEXtSoftwareAdobe ImageReadyqe<1IDATx}ml\EW^ɺD$|nw';vю8m0k<f8ـ<h3$  b,mn ғ0L Y`6s'>QSnSV;1KGsԩ>UoTU1cƖYuּca&#C,pؚ>kں ULW
4-sn3Vq~NocI~L{- H8%_M£wB6EW,ĢpY2+(Y@&A/3kXhߍ-aA<>P'\J;(}#Qz:4%m?nfntK*l9J+DIYu1YZ^(]YYEf@ОlXz]Ut u &5-PW}@t|#LY=s܂,w#+R+?Ƌax X0"ea)tG*ԡwVwV^rf%xB(qּ4>WG#lWU<ЁXJVѶlR$kDVrI7:X<s>%X1NEzw;y9z9O%~~uɗ*=Ixcy}Y(ou
5±N$^j e\iX񝜬];Y-rѲ&>!zlYaVHVN԰9=]=mRMdOUC JUiT}rWW'ڹu)ʢF"YU#P׾&ܑЅROwyzm$Os? +^FTIEq%&~ >M}]ԖwA?
6[Nteexn(措BdMTpʥnqqS?bWXmW6x*{V_!VjΧsVL^j XkQjU6sk̩n~[qǸ-` O:G7l"ksRe2vQ=QƼJUX`gQy~ ďKȰE]#P:td\T/u;س:Jc-%'e q
7?j"/yh48Zi1|JUu>_N;hxwNU JQU7\j̮bT:B?6oJ1Ί%I
8UY-Ii4{=rǤ7@)HKJ+f4X8Cd?'j1 N< 39E<w߬VzE}^_e檴 pt붾39,?glYO<xx|a؎UeF 1;{ EF0`DR+UYiD4?Y`|Bs2yipIq>Wo VTGzg#
9%D0#ܠ3[tiآ( U,]125|Ṋfw7w u+Š]Db]K xbW ՛7|ВX㕛{UcGXk¬|(h)IUa)lp 3luPU]D)/7~4Wt5J}V
10X0z VM;>Gԙ^|gF:jaZ^)74C#jwr,еSlGu;1vm><)}<VZ ue۠D+jyJ6V{j K>ZQՖ&mZ:1UMB~
11a:/᜗:KWWOҠ&Y2f7cƌ3f̘1cƌ3f̘1cƌ3f̘1cƌ3f̘g*3fF5LbN2#Tf=C`!ZGUe꣇e2V<1mkS4iϗ*.{N8Xaj~ڀnAx,%fE:|YDVj
12¢lg6(:k~MM5?4 ]WO>诋WZiG|QGJeK[YcյpmjE\f/ǎ8&OQ3 .3tt2'-V8pXSrY#J!Q ",ub@FK:u^iy[]<.Cw+W\)b
13kr-.MtڀMqʄ۰#$^X$"V`T4m~w%Pp1|+&UxY8*r8:k7QЃҀT$Ўƙ
14S>~Sjs:5q.w&_Z.X=:ވbw` _kd{'0:ds#qi!224nq\9-KUTsSUuVo@;Uz>^=Np>oPO
15@I@'Gj5o*U>^*ew>ͫʧ᫠Q5 ̈́<$#5Jٻj6e)_ d]2B:^(*:8JYS鬆Kݗ ]U4_rj{5ׇaǑ/yV?GtGb@xPU7O3|鍪 IQ5QGw *(;wf0*PUU<YƔvbt5{2!,}Ҧ:)j2OkΪ' ֊0I.q\(%ojQĖՇa<ԍexAgt'[d;׸`rcdjPFU$UeJI6T&Z}z(z vfuz {}ۿߝݞlxUZ謊.Y岟b%nw@ǩS9|źs%>_o#9\EU~/ځt(r[QZuOo;!MrU]0TcpDő?.cPuF;L_Sb}R/J_+h2$ai UǩS9>Є}76rzu~国4oĨ
161J
17^̘~iC޸55<Pھr/GYk૵5mK
182姪Ϊ5,?1'jÓQpT뾺
19*~I?Hם):\J:3ѴUGo)X.Ë*j\?}㉎G~A{Y#W/3鬶!ʼ=Cgu *u_ޮ+Qe5w:UK?UW1j\S5/<z7P^<,SjUU8v,2__i뻊^R5^vNl>G׹]gwsn zTuO=?/zƲc>Οb#7ֻcgkޛTUj*-T=]uu}>ݨNЭ [ ]:%/_ Sz]6D.mD7Uƌ3f̘1cƌ3f̘1cƌ3f̘1cƌ3f̘1cƌ3f̘1c>J4hPP+A;'G_XKmL5I.},wFFum$S-E-;Õ
20C3I-`BRx1ғTJݕ;hΊ8 DYJo;Yš5MKɰM;%Pd9KhnD[zgVh,'C
21p!^M(WK2X>UQ%^p8 ˽^#Ζ؄+.@gCz%ɔ-Pr
22KX
23n>=ՔѨeSvRLz5%9UQS \WիK'hp)ô
24Jrh M0F (f_R5///G+x 1"eS 5
25:Tf=+7Qɧ\TEs༬rYs8&k#pSՊ5MTbD܊[Ng5Q\s5PB@[8ɨV1&4Wsy[Ǿ
26wU2V77jމd^~YfC_h;a.&M
27i UWpzs`>/"'OI۲y:BzdTq£=йb:"m/-/PWDQǴ͐57m`H%AV!Hԛ׿@"Qzދ|ߒT-*OU^Ҧ6!Cwk|h&Hd5LEYy'ƣ7%*<C'@lb!wLWW(%C43\x*QFҨ<m߃g?߉^)D}{U֘|Q=C'@|uwLׂQE=?x+x "gS OҨj׈ .fqj[YGͤC焓m>{=)Z%ٝP *G]/8Lw$?8M)\į/#7Ufd7'6\h1
28vIfEIr=1w\WKVZHKgZ͡$mx % `j}TuTQJZ*H>*QxkLFTyU-)ôbiA|q`F'+ 4^Qy xH)#t^?@]^`ARSqjgB:r<h̆RnzPΦ)[+n MXH!0Ir sKϡէUR2T XgƴڳEcƌ3f̘1cƌ3f̘1cƌ3f̘1cƌ3f̘1cnjǴyƌIxQq7fM4EF.34<.i;eВi1c%9K ͠2JCnw E¤cF`5v6%˿]3Ty`~a[[J>K۷l<2-4YKhgQLxVwP~M Φ0l 3ƅaŊITȀhwJmxIMչ|U7xˆS~2ߕ?kW1kC3];YnSґAeXYz8,'x< k7Kx]$x$vgT#w;o@ z_Vmn|HֵhZg-^TAn- )@4[*9xKƋj>!,Vt:eqn8%ohS(2\Q^aigF3vTUDVlQꅧWc%Ueq4ҝº/U $_Q!>t| ,țG<tC[xTXmf|<OڡMT|(w:_Xj7wt
29AXͦp$^xZRjx`3=^ll+˗eQ8g8V +9M/o14snb tX܍svEl+@\e,,cѮ<(iHVYrQ O7aI>Q%d#jUՆ|; H[bά#,Ws7NT1~m&ǻ{' \㟾 bBKJo8%!$Qj:/RX)$Sy޳ 䍧RDUg_D軦J\jN֖SU;~?Ohssdƣ}6(T <_4b5 ^N N%8QejF7toMyө`)g[/|?өJuGL坕/=CTܠhdifHcǞG4,`D՞{'xG_p/5@m +$jVH3a"*ũ,,HJҵȸT^Qyo&IÉJUVwWLeM~3tA6rwɤ6տ \0HL%LX5c@HHÃZ|NV+7WM{cig*ȸU7iÉбzd * ?gtX8̝OX:]2ɍ]p^++>AVڛE{ DB.&/56ArxY#ܕy)cKQtȪ~! ;C}ʃtf{6$NVsj wupZ)zŁ|-wg+nMVj/d+U~ͯi:_ix whqr>駃-x뼬)ݷyR=! ì:J/lIkV@n74758Z KJ(Uxz1w)^\ԣzȪ󲦨c2f؍v+6f̘1cƌ3f̘1cƌ3f̘1cƌ3f̘1cƌ3f̘2N oC\F1ִ UZJV̚\4Mgq1z{&YT
30,HX~D u\g}x>+YdN̮ol ZX+F[/j+S~2/jV8Jr^ԉ]J}J*ۏ<2԰&JݣjOM@ѯ#0O[SXB^ uze\]dd./xXE
31f'vO_H${%;kt7ށmő|d{aފ^ǛڎE5ʋBr]W=_SAf(0 oU5q ,_\luz˪uz㻲o=Yi~|
320+=VJت /ލzM\zCL[U:|k*^8"\Wٚ\ .XTjX5 SkFu\1 q'mģ/QUؕ*AɽDNZ׮?_[# ˍ4:^j|5LG ||øBW{6[uQF.1$qF9IHg)\5>C#uXZ$#*<ߐsRv1Tj>Jm>*#(
33[Fhsש5*jQʼ&&&P犛L[Q1* ;X}Iΰ[Q?qQZ Hݙ֞VEsBCZ9JTK tup˷ /O,.kUdsOHMg4=-)+ؿh2Nw/r|WQn=GIU;'j,vfdzpe$V GTYsBZO1pj:r"nTUSCgr veAۘ˜FC+Ֆ#[JTe'v9-3 Dmӻuuz?0 o hxuY &_54=f07kלU0]D:jdw/+PGUVS<\2uatc^zYRąmC+7#,|:iNw*|^sm|X>Ъ^1\#͹ &%{,2U>ݎ.c05z#
34ogNO+Q쓭 ,˗-%K\[S_`y+b_94"U+Ύap}I[M,B.NtwHj漬E L߀ 0DX(kڵ NoU{gquz
35RwkէRx'uZ[3'zyyד%<UhN[tzx1 cc]F ݯB"]a[JDս[cƌ3f̘1cƌ3f̘1cƌ3f̘1cƌ3f̘1cƌ3Ves{L+3VH ]YPA >sƕ3jYF\s=m1&VAɼ?k\+]6yモ1gtOIW7al|1 >$]e 7؝WIe?ަL#>|
36ҭ]
37pM5MUdI61ԠeǼYGhOn3խR:^k_'Yuuq#p#
38J2xl>OjcY馃!ڡ+sZ/ D}2AY mpc#<'xSKx`*W[,e|6BH)㶤kjpDU(2qzx9*tqa/,
39 Z[ 0>Ө֜xN)fă@qըFU՝w(a;ˋ>|Tc|w2eiT]*!_\WG{
40 ]^݅Z5t|6oYHaO@= my^akE.uz]#٥hWv(:,6A߉JFa\ wWex>v<?|&i_qz ] eR_7|& c*kր4f,J U_h\1Au\-L\Ϝ^~Phr*tqa0fT:MU;q>etuMYA>).,;ɦCbwjE)W Fӫ@s4e6^Q9oI}4x<.B?B߫#$Hx.x9,a!RTpgd5xBe.L7@*
41AsduttSVUaRU|I xG߃$T񭟬#_IFMŒ_X@foQIDII?|%$r {ENĸwޕqq?Dؽ}}o/`ӣCTi <QR{\yYFQJkh^?Us:E|]V)Z|HjsW |H'|o=d|߼j #T%O W!N#w1[iH(SVs[=Ɉ71ȳT]A G換3CT׻lRݕCV9Q\V#ܛNӏjˇ1/slR %^s1nUj,x}fW|JuKwpSm,<7<
42Ȼ[R<&p?',Й\;5bH$3#Q4\_>/ywO rD 9YUD] Ή@s]+'UaL} hrU'7:sU|k)H@hNq#ϵ8y˭Xű#w
431!흉R'7fuד0p!WÖW+Nmp\-ioD$g٠˅%%ÐmV]̱rw*Z}y+L
44Nouj}xt)lStuqxmNyKUOnDbhf}k>6ufT%{ <񐮸mjFcmUïc;w8@dGFUA& =nq5]iP}z:k⼶-ʓ Κl*'UzaxWFdZzTNRs+# wzgi:MBqtM l#^'Gߣ*^t{=rERnQ$adJl02%Tڊ^<~g?Of*U^?:N+o[PUs|QR']V-L)H K䐞 mYn\4}YVD hR;g-'3aסM Dh}1cƌ3f̘1cƌ3f̘1cƌ3f̘1cƌ3f̘1cƌk*Ț4`L$b U4\dt'>HȄ|.+Y+/Gy2OCWv3v,'kia W O6߯E=Hv
45$LlxI躍/}^]x\3 ɮ5 QT&G9Ay^i}O[5ޱwq4,s JJI.myE^%'VB~dׯ}*j* ~uTk\fKЬ*Y]_v'I˨鑩6Xo'j&uɧngT]oڌ9\*wVHӖ| >:5EF'J ɝ`!A
46e~_;5ױϊ镋m_&OVi<}"靍hW9X6KPƣ G"ƭ?/O^hCHLciPj)}QQզ#tMg9 xGw~d;_J+RỲ<;e 5/Qs/5N[!a+NPb+ѺI}-t_qU=MKʞY5no*vvbʊ{]| ~ Z{-끇^FVviϵ3Ya=6ndS;-ʹ^;uꪪ^ |=_w+"i&4l#wir|W3U$"J~O@]~tRJVMHw:̦@?>O?vdrtS*$&~1>Z}^nL(]f*&*QaIꝄ|3*O?r?*4Gyz[k/tkQϖWCCKk/x5|S*`ϹγQEwy
47o KYqTb$-/PtsZNKQ*>ݢU@Џ"JQ;¹&
48Lx;+T /+O赟> (T?ķD^N*'p$IW֐W~ =J|_UTe7ְP`;CYjk=sU[mߙ-;};2|wo1p0~>0m
49@Jrǟcٷ4͜?q\UUIV?2L/+Шꄾ< ܇^T ?tj\JrҀB*=km X,n}aՒIadp׷ll{\6v8RꅟҲf1F|Տ;e=\D ,D:ψrxQT◎*|{nS
509~=}ӕG~%j:Dj<ឫ:jO%
51$T8!jvm|'OЗ¹➱z\vsIv`Ȕʨj-^$-^G Q{m`T#c֞㸝|n.ߪN$O JUVʼt,jg-mסּNV z:(Ι*|1Ux=Yk*t MNNDUhK ؞X(刄Rv!#B_cxRŹoE5Dg>?fXQQ˔|@"աMveC>mO$H#]Y I=)_`k*
52:a>!X!W^wҒl'<;vwgIt_?Jh`#E:fdx=6Wu<Ӌd2di˂c#h¬c4?<HFYoVpN;ݷJ\ >` (t3{>⦊;;qFx4YcS$w.da*k|Q,+xs^K߫P^nO֮L5mIwl?-.ʲJ8 F B.-:2Ȕ!/A#b_m%I($|PZ[1G{^#o>3mw?'cx[^:Wk/`'=~֥W(gQbfv7UzM3+؍K:4|GCtA+Kʨ{@Ɩ [05E|yn4MIENDB`

static/js/editor.js

1(function (M) {
2 var PageListView = Backbone.View.extend({
3 tagName: 'div',
4 className: '',
5 id: 'pages',
6 events: {
7 'click .pagename .disp': 'showPage',
8 'click #addPage': 'addPage',
9 'click .pagename .remove': 'removePage'
10 },
11 initialize: function() {
12 _.bindAll(this);
13 _.bind(this.render, this);
14 this.template = _.template($('#page-list-template').html());
15 this.listTemplate = _.template($('#page-list-item-template').html());
16 // append this.el to container #pages
17 $('#content-container').append(this.$el);
18 this.$el.append(this.template());
19 this.$pagelist = $('#pagelist');
20 },
21 render: function() {
22 // append the page list
23 this.$pagelist.html('');
24 _.each(M.pages.models, function(page) {
25 this.$pagelist.append(this.listTemplate({
26 name: page.get('name') || 'newpage',
27 id: page.id
28 }));
29 }, this);
30 },
31 showPage: function(event) {
32 var id = $(event.target).attr('id');
33 pageview = new PageView({model: M.pages.get(id)});
34 pageview.render();
35 M.editor.pageview = pageview;
36 },
37 addPage: function() {
38 var newpage = new Page();
39 M.pages.add(newpage);
40 var newpageview = new PageView({model: newpage});
41 newpageview.render();
42 M.editor.pageview = newpageview;
43 },
44 removePage: function(event) {
45 var id = $(event.target).parent('.remove').attr('for');
46 console.log('remove', id);
47 M.pages.get(id).destroy({
48 success: function(model, response) {
49 console.log('deleted', model, response);
50 M.pages.remove(id);
51 M.pagelistview.render();
52 if(M.editor.pageview) {
53 M.editor.pageview.remove();
54 }
55 },
56 error: function(model, xhr) {
57 console.log('failed', model, xhr);
58 }
59 });
60 }
61 });
62
63 var Page = Backbone.Model.extend({
64 defaults: {
65 name: '',
66 title: '',
67 children: [],
68 content: []
69 },
70 initialize: function() {
71 this.id = this.get('id');
72 }
73 });
74
75 var Pages = Backbone.Collection.extend({
76 model: Page,
77 url: '/edit'
78 });
79
80 var PageView = Backbone.View.extend({
81 tagName: 'div',
82 id: 'page',
83 events: {
84 'click #updatePage': 'updatePage',
85 'click .addContent' : 'addContent',
86 'click .content-item': 'showContent',
87 'click .content .remove': 'removeContent'
88 },
89 initialize: function() {
90 _.bindAll(this);
91 _.bind(this.render, this);
92 $('#page').remove();
93 $('#content-container').append(this.$el);
94 this.template = _.template($('#page-template').html());
95 this.contentListTemplate =
96 _.template($('#content-list-template').html());
97 //this.model.bind('change', this.modelChanged);
98 //this.model.bind('change:content', this.contentChanged);
99 this.model.bind('change:name', this.nameChanged);
100 },
101 modelChanged: function(page) {
102 console.log('model changed ', page.id, ' re-rendering...');
103 this.render();
104 },
105 contentChanged: function(page) {
106 console.log('content changed', page);
107 this.render();
108 },
109 nameChanged: function(page) {
110 M.pagelistview.render();
111 console.log('name changed', page);
112 },
113 render: function() {
114 console.log(this.$el);
115 $('#page').html('');
116 console.log('content: ', this.model.get('content'));
117
118 this.$el.html(this.template({
119 name: this.model.get('name'),
120 title: this.model.get('title'),
121 children: this.model.get('children'),
122 content: this.listContent()
123 }));
124
125 //hover effect
126 $('.content-item').hover(function(event) {
127 $(event.target).closest('.content-item').addClass('alert-error')
128 }, function(event) {
129 $(event.target).closest('.content-item').removeClass('alert-error')
130 });
131 console.log('done');
132 },
133 listContent: function() {
134 var content = '';
135 _.each(this.model.get('content'), function(element, idx) {
136 content += this.contentListTemplate({
137 no: idx,
138 type: element.type,
139 more: element.src ||
140 escapeHtml(element.data.substring(0, 30) + '..'),
141 title: (element.title) ? element.title + ',' : ''
142 });
143 }, this);
144 return content;
145 },
146 showContent: function(event) {
147 var idx = $(event.target).closest('.content-item').attr('id').
148 split('-')[1];
149 this.edit = {on: true, idx: idx};
150 var content = this.model.get('content')[idx];
151 content = new M.types.model[content.type](content);
152 var contentview = new ContentView({model: content});
153 contentview.render();
154 M.editor.contentview = contentview;
155 return false;
156 },
157 addContent: function() {
158 console.log('addContent');
159 var content = new M.types.model.text({
160 type: 'text',
161 title: '',
162 data: ''
163 });
164 this.model.get('content').push(content.toJSON());
165 var idx = this.model.get('content').length;
166 this.edit = {on: true, idx: idx};
167 var contentview = new ContentView({model: content});
168 contentview.render();
169 M.editor.contentview = contentview;
170 return false;
171 },
172 updateContent: function(json) {
173 if(!this.edit.on && this.edit.idx < 0) {
174 return;
175 }
176 var content = this.model.get('content');
177 content[this.edit.idx] = json;
178 this.edit = {on: false, idx: -1};
179 this.model.set({'content': content});
180 this.render();
181 },
182 removeContent: function(event) {
183 console.log('recvd remove event..about to process..');
184 var content = this.model.get('content');
185 var idx = $(event.target).parent().attr('for');
186 idx = Number(idx);
187 console.log('remove content: ', content[idx]);
188 content.splice(idx, 1);
189 this.model.set({'content': content});
190 console.log('after removing: ', this.model.get('content'));
191 this.render();
192 return false;
193 },
194 updatePage: function() {
195 var name = $('#name').val();
196 var title = $('#title').val();
197 var children = $('#children').val();
198 children = (children === '') ? [] : children.split(',');
199 this.model.set({'name': name, 'title': title, 'children': children});
200
201 this.model.save({}, {
202 success: function(model, response) {
203 console.log('saved', model, response);
204 },
205 error: function(model, xhr) {
206 console.log('failed', model, xhr);
207 }
208 });
209 return false;
210 }
211 });
212
213 var ContentView = Backbone.View.extend({
214 id: 'contentview',
215 events: {
216 'click #done': 'done',
217 'click #updateContent': 'update',
218 'change .contentview select': 'typeChanged'
219 },
220 initialize: function() {
221 _.bindAll(this);
222 _.bind(this.render, this);
223
224 $('#pages').hide();
225 $('#page').hide();
226 $('#content-container').append(this.$el);
227 this.template = _.template($('#content-template').html());
228 },
229 render: function() {
230 this.$el.html('');
231 console.log(this.model);
232 var type = this.model.get('type');
233 this.$el.append(this.template({
234 type: this.model.get('type'),
235 title: this.model.get('title'),
236 tags: this.model.get('tags')
237 }));
238
239 this.$select = $('.contentview select');
240 //this.$select.bind('change', this.typeChanged);
241 this.$select.val(type);
242
243 if(type === 'text') {
244 var template = _.template($('#text-template').html());
245 $('#specific-content').html(template({
246 data: this.model.get('data')
247 }));
248 // init the tinymce editor
249 tinymce.init({
250 selector: '#edit',
251 theme: 'modern',
252 height: 300,
253 plugins: ["advlist autolink link image lists charmap print preview hr",
254 "anchor pagebreak spellchecker searchreplace wordcount",
255 "visualblocks visualchars code fullscreen insertdatetime",
256 "media nonbreaking save table contextmenu directionality",
257 "emoticons template paste textcolor"
258 ],
259 toolbar: "undo redo | styleselect | bold italic | " +
260 "alignleft aligncenter alignright alignjustify | " +
261 "bullist numlist outdent indent | link image | " +
262 "print preview media fullpage | forecolor backcolor emoticons"
263
264 });
265 }
266 else if(type === 'image' || type === 'video' || type === 'audio') {
267 var template = _.template($('#media-template').html());
268 $('#specific-content').html(template({
269 src: this.model.get('src')
270 }));
271
272 //provide the users a preview
273 /*var view = new M.types.view[type]({model: this.model});
274 //$('#specific-content.preview').html();
275 view.render('.preview');*/
276 }
277 },
278 typeChanged: function(event) {
279 var type = this.$select.val();
280 //TODO: do validation on type - a list of valid models is in
281 //M.types.model
282 this.model.set({'type': type});
283 this.render();
284 },
285 update: function() {
286 var prop, val, new_attrs = {};
287 $('#contentview [m-data-target]').each(function(idx, elem) {
288 prop = $(elem).attr('m-data-target');
289 if(prop === 'tags') {
290 val = $(elem).val().split(',');
291 }
292 else {
293 val = $(elem).val();
294 }
295 new_attrs[prop] = val;
296 });
297 new_attrs['type'] = this.$select.val();
298 if($('#edit').length) {
299 tinymce.triggerSave(false, true);
300 new_attrs['data'] = $('#edit').val();
301 }
302 this.model.set(new_attrs);
303 M.editor.pageview.updateContent(this.model.toJSON());
304 },
305 cleanUp: function() {
306 //this.$el.remove();
307 this.remove();
308 $('#pages').show();
309 $('#page').show();
310 },
311 done: function() {
312 this.update();
313 this.cleanUp();
314 }
315 });
316
317 M.editor = {
318 init: function() {
319 M.pages = new Pages();
320 _.each(M.site_content, function(page) {
321 M.pages.add(new Page(page));
322 });
323 var pagelistview = new PageListView();
324 pagelistview.render();
325 M.pages.on('add', function(page) {
326 pagelistview.render();
327 });
328 M.pagelistview = pagelistview;
329 }
330 };
331
332 function escapeHtml(string) {
333 var entityMap = {
334 "&": "&amp;",
335 "<": "&lt;",
336 ">": "&gt;",
337 '"': '&quot;',
338 "'": '&#39;',
339 "/": '&#x2F;'
340 };
341 return String(string).replace(/[&<>"'\/]/g, function (s) {
342 return entityMap[s];
343 });
344 }
345
346})(M);

static/js/lib/backbone-1.0.0.js

1// Backbone.js 1.0.0
2
3// (c) 2010-2013 Jeremy Ashkenas, DocumentCloud Inc.
4// Backbone may be freely distributed under the MIT license.
5// For all details and documentation:
6// http://backbonejs.org
7
8(function(){
9
10 // Initial Setup
11 // -------------
12
13 // Save a reference to the global object (`window` in the browser, `exports`
14 // on the server).
15 var root = this;
16
17 // Save the previous value of the `Backbone` variable, so that it can be
18 // restored later on, if `noConflict` is used.
19 var previousBackbone = root.Backbone;
20
21 // Create local references to array methods we'll want to use later.
22 var array = [];
23 var push = array.push;
24 var slice = array.slice;
25 var splice = array.splice;
26
27 // The top-level namespace. All public Backbone classes and modules will
28 // be attached to this. Exported for both the browser and the server.
29 var Backbone;
30 if (typeof exports !== 'undefined') {
31 Backbone = exports;
32 } else {
33 Backbone = root.Backbone = {};
34 }
35
36 // Current version of the library. Keep in sync with `package.json`.
37 Backbone.VERSION = '1.0.0';
38
39 // Require Underscore, if we're on the server, and it's not already present.
40 var _ = root._;
41 if (!_ && (typeof require !== 'undefined')) _ = require('underscore');
42
43 // For Backbone's purposes, jQuery, Zepto, Ender, or My Library (kidding) owns
44 // the `$` variable.
45 Backbone.$ = root.jQuery || root.Zepto || root.ender || root.$;
46
47 // Runs Backbone.js in *noConflict* mode, returning the `Backbone` variable
48 // to its previous owner. Returns a reference to this Backbone object.
49 Backbone.noConflict = function() {
50 root.Backbone = previousBackbone;
51 return this;
52 };
53
54 // Turn on `emulateHTTP` to support legacy HTTP servers. Setting this option
55 // will fake `"PUT"` and `"DELETE"` requests via the `_method` parameter and
56 // set a `X-Http-Method-Override` header.
57 Backbone.emulateHTTP = false;
58
59 // Turn on `emulateJSON` to support legacy servers that can't deal with direct
60 // `application/json` requests ... will encode the body as
61 // `application/x-www-form-urlencoded` instead and will send the model in a
62 // form param named `model`.
63 Backbone.emulateJSON = false;
64
65 // Backbone.Events
66 // ---------------
67
68 // A module that can be mixed in to *any object* in order to provide it with
69 // custom events. You may bind with `on` or remove with `off` callback
70 // functions to an event; `trigger`-ing an event fires all callbacks in
71 // succession.
72 //
73 // var object = {};
74 // _.extend(object, Backbone.Events);
75 // object.on('expand', function(){ alert('expanded'); });
76 // object.trigger('expand');
77 //
78 var Events = Backbone.Events = {
79
80 // Bind an event to a `callback` function. Passing `"all"` will bind
81 // the callback to all events fired.
82 on: function(name, callback, context) {
83 if (!eventsApi(this, 'on', name, [callback, context]) || !callback) return this;
84 this._events || (this._events = {});
85 var events = this._events[name] || (this._events[name] = []);
86 events.push({callback: callback, context: context, ctx: context || this});
87 return this;
88 },
89
90 // Bind an event to only be triggered a single time. After the first time
91 // the callback is invoked, it will be removed.
92 once: function(name, callback, context) {
93 if (!eventsApi(this, 'once', name, [callback, context]) || !callback) return this;
94 var self = this;
95 var once = _.once(function() {
96 self.off(name, once);
97 callback.apply(this, arguments);
98 });
99 once._callback = callback;
100 return this.on(name, once, context);
101 },
102
103 // Remove one or many callbacks. If `context` is null, removes all
104 // callbacks with that function. If `callback` is null, removes all
105 // callbacks for the event. If `name` is null, removes all bound
106 // callbacks for all events.
107 off: function(name, callback, context) {
108 var retain, ev, events, names, i, l, j, k;
109 if (!this._events || !eventsApi(this, 'off', name, [callback, context])) return this;
110 if (!name && !callback && !context) {
111 this._events = {};
112 return this;
113 }
114
115 names = name ? [name] : _.keys(this._events);
116 for (i = 0, l = names.length; i < l; i++) {
117 name = names[i];
118 if (events = this._events[name]) {
119 this._events[name] = retain = [];
120 if (callback || context) {
121 for (j = 0, k = events.length; j < k; j++) {
122 ev = events[j];
123 if ((callback && callback !== ev.callback && callback !== ev.callback._callback) ||
124 (context && context !== ev.context)) {
125 retain.push(ev);
126 }
127 }
128 }
129 if (!retain.length) delete this._events[name];
130 }
131 }
132
133 return this;
134 },
135
136 // Trigger one or many events, firing all bound callbacks. Callbacks are
137 // passed the same arguments as `trigger` is, apart from the event name
138 // (unless you're listening on `"all"`, which will cause your callback to
139 // receive the true name of the event as the first argument).
140 trigger: function(name) {
141 if (!this._events) return this;
142 var args = slice.call(arguments, 1);
143 if (!eventsApi(this, 'trigger', name, args)) return this;
144 var events = this._events[name];
145 var allEvents = this._events.all;
146 if (events) triggerEvents(events, args);
147 if (allEvents) triggerEvents(allEvents, arguments);
148 return this;
149 },
150
151 // Tell this object to stop listening to either specific events ... or
152 // to every object it's currently listening to.
153 stopListening: function(obj, name, callback) {
154 var listeners = this._listeners;
155 if (!listeners) return this;
156 var deleteListener = !name && !callback;
157 if (typeof name === 'object') callback = this;
158 if (obj) (listeners = {})[obj._listenerId] = obj;
159 for (var id in listeners) {
160 listeners[id].off(name, callback, this);
161 if (deleteListener) delete this._listeners[id];
162 }
163 return this;
164 }
165
166 };
167
168 // Regular expression used to split event strings.
169 var eventSplitter = /\s+/;
170
171 // Implement fancy features of the Events API such as multiple event
172 // names `"change blur"` and jQuery-style event maps `{change: action}`
173 // in terms of the existing API.
174 var eventsApi = function(obj, action, name, rest) {
175 if (!name) return true;
176
177 // Handle event maps.
178 if (typeof name === 'object') {
179 for (var key in name) {
180 obj[action].apply(obj, [key, name[key]].concat(rest));
181 }
182 return false;
183 }
184
185 // Handle space separated event names.
186 if (eventSplitter.test(name)) {
187 var names = name.split(eventSplitter);
188 for (var i = 0, l = names.length; i < l; i++) {
189 obj[action].apply(obj, [names[i]].concat(rest));
190 }
191 return false;
192 }
193
194 return true;
195 };
196
197 // A difficult-to-believe, but optimized internal dispatch function for
198 // triggering events. Tries to keep the usual cases speedy (most internal
199 // Backbone events have 3 arguments).
200 var triggerEvents = function(events, args) {
201 var ev, i = -1, l = events.length, a1 = args[0], a2 = args[1], a3 = args[2];
202 switch (args.length) {
203 case 0: while (++i < l) (ev = events[i]).callback.call(ev.ctx); return;
204 case 1: while (++i < l) (ev = events[i]).callback.call(ev.ctx, a1); return;
205 case 2: while (++i < l) (ev = events[i]).callback.call(ev.ctx, a1, a2); return;
206 case 3: while (++i < l) (ev = events[i]).callback.call(ev.ctx, a1, a2, a3); return;
207 default: while (++i < l) (ev = events[i]).callback.apply(ev.ctx, args);
208 }
209 };
210
211 var listenMethods = {listenTo: 'on', listenToOnce: 'once'};
212
213 // Inversion-of-control versions of `on` and `once`. Tell *this* object to
214 // listen to an event in another object ... keeping track of what it's
215 // listening to.
216 _.each(listenMethods, function(implementation, method) {
217 Events[method] = function(obj, name, callback) {
218 var listeners = this._listeners || (this._listeners = {});
219 var id = obj._listenerId || (obj._listenerId = _.uniqueId('l'));
220 listeners[id] = obj;
221 if (typeof name === 'object') callback = this;
222 obj[implementation](name, callback, this);
223 return this;
224 };
225 });
226
227 // Aliases for backwards compatibility.
228 Events.bind = Events.on;
229 Events.unbind = Events.off;
230
231 // Allow the `Backbone` object to serve as a global event bus, for folks who
232 // want global "pubsub" in a convenient place.
233 _.extend(Backbone, Events);
234
235 // Backbone.Model
236 // --------------
237
238 // Backbone **Models** are the basic data object in the framework --
239 // frequently representing a row in a table in a database on your server.
240 // A discrete chunk of data and a bunch of useful, related methods for
241 // performing computations and transformations on that data.
242
243 // Create a new model with the specified attributes. A client id (`cid`)
244 // is automatically generated and assigned for you.
245 var Model = Backbone.Model = function(attributes, options) {
246 var defaults;
247 var attrs = attributes || {};
248 options || (options = {});
249 this.cid = _.uniqueId('c');
250 this.attributes = {};
251 _.extend(this, _.pick(options, modelOptions));
252 if (options.parse) attrs = this.parse(attrs, options) || {};
253 if (defaults = _.result(this, 'defaults')) {
254 attrs = _.defaults({}, attrs, defaults);
255 }
256 this.set(attrs, options);
257 this.changed = {};
258 this.initialize.apply(this, arguments);
259 };
260
261 // A list of options to be attached directly to the model, if provided.
262 var modelOptions = ['url', 'urlRoot', 'collection'];
263
264 // Attach all inheritable methods to the Model prototype.
265 _.extend(Model.prototype, Events, {
266
267 // A hash of attributes whose current and previous value differ.
268 changed: null,
269
270 // The value returned during the last failed validation.
271 validationError: null,
272
273 // The default name for the JSON `id` attribute is `"id"`. MongoDB and
274 // CouchDB users may want to set this to `"_id"`.
275 idAttribute: 'id',
276
277 // Initialize is an empty function by default. Override it with your own
278 // initialization logic.
279 initialize: function(){},
280
281 // Return a copy of the model's `attributes` object.
282 toJSON: function(options) {
283 return _.clone(this.attributes);
284 },
285
286 // Proxy `Backbone.sync` by default -- but override this if you need
287 // custom syncing semantics for *this* particular model.
288 sync: function() {
289 return Backbone.sync.apply(this, arguments);
290 },
291
292 // Get the value of an attribute.
293 get: function(attr) {
294 return this.attributes[attr];
295 },
296
297 // Get the HTML-escaped value of an attribute.
298 escape: function(attr) {
299 return _.escape(this.get(attr));
300 },
301
302 // Returns `true` if the attribute contains a value that is not null
303 // or undefined.
304 has: function(attr) {
305 return this.get(attr) != null;
306 },
307
308 // Set a hash of model attributes on the object, firing `"change"`. This is
309 // the core primitive operation of a model, updating the data and notifying
310 // anyone who needs to know about the change in state. The heart of the beast.
311 set: function(key, val, options) {
312 var attr, attrs, unset, changes, silent, changing, prev, current;
313 if (key == null) return this;
314
315 // Handle both `"key", value` and `{key: value}` -style arguments.
316 if (typeof key === 'object') {
317 attrs = key;
318 options = val;
319 } else {
320 (attrs = {})[key] = val;
321 }
322
323 options || (options = {});
324
325 // Run validation.
326 if (!this._validate(attrs, options)) return false;
327
328 // Extract attributes and options.
329 unset = options.unset;
330 silent = options.silent;
331 changes = [];
332 changing = this._changing;
333 this._changing = true;
334
335 if (!changing) {
336 this._previousAttributes = _.clone(this.attributes);
337 this.changed = {};
338 }
339 current = this.attributes, prev = this._previousAttributes;
340
341 // Check for changes of `id`.
342 if (this.idAttribute in attrs) this.id = attrs[this.idAttribute];
343
344 // For each `set` attribute, update or delete the current value.
345 for (attr in attrs) {
346 val = attrs[attr];
347 if (!_.isEqual(current[attr], val)) changes.push(attr);
348 if (!_.isEqual(prev[attr], val)) {
349 this.changed[attr] = val;
350 } else {
351 delete this.changed[attr];
352 }
353 unset ? delete current[attr] : current[attr] = val;
354 }
355
356 // Trigger all relevant attribute changes.
357 if (!silent) {
358 if (changes.length) this._pending = true;
359 for (var i = 0, l = changes.length; i < l; i++) {
360 this.trigger('change:' + changes[i], this, current[changes[i]], options);
361 }
362 }
363
364 // You might be wondering why there's a `while` loop here. Changes can
365 // be recursively nested within `"change"` events.
366 if (changing) return this;
367 if (!silent) {
368 while (this._pending) {
369 this._pending = false;
370 this.trigger('change', this, options);
371 }
372 }
373 this._pending = false;
374 this._changing = false;
375 return this;
376 },
377
378 // Remove an attribute from the model, firing `"change"`. `unset` is a noop
379 // if the attribute doesn't exist.
380 unset: function(attr, options) {
381 return this.set(attr, void 0, _.extend({}, options, {unset: true}));
382 },
383
384 // Clear all attributes on the model, firing `"change"`.
385 clear: function(options) {
386 var attrs = {};
387 for (var key in this.attributes) attrs[key] = void 0;
388 return this.set(attrs, _.extend({}, options, {unset: true}));
389 },
390
391 // Determine if the model has changed since the last `"change"` event.
392 // If you specify an attribute name, determine if that attribute has changed.
393 hasChanged: function(attr) {
394 if (attr == null) return !_.isEmpty(this.changed);
395 return _.has(this.changed, attr);
396 },
397
398 // Return an object containing all the attributes that have changed, or
399 // false if there are no changed attributes. Useful for determining what
400 // parts of a view need to be updated and/or what attributes need to be
401 // persisted to the server. Unset attributes will be set to undefined.
402 // You can also pass an attributes object to diff against the model,
403 // determining if there *would be* a change.
404 changedAttributes: function(diff) {
405 if (!diff) return this.hasChanged() ? _.clone(this.changed) : false;
406 var val, changed = false;
407 var old = this._changing ? this._previousAttributes : this.attributes;
408 for (var attr in diff) {
409 if (_.isEqual(old[attr], (val = diff[attr]))) continue;
410 (changed || (changed = {}))[attr] = val;
411 }
412 return changed;
413 },
414
415 // Get the previous value of an attribute, recorded at the time the last
416 // `"change"` event was fired.
417 previous: function(attr) {
418 if (attr == null || !this._previousAttributes) return null;
419 return this._previousAttributes[attr];
420 },
421
422 // Get all of the attributes of the model at the time of the previous
423 // `"change"` event.
424 previousAttributes: function() {
425 return _.clone(this._previousAttributes);
426 },
427
428 // Fetch the model from the server. If the server's representation of the
429 // model differs from its current attributes, they will be overridden,
430 // triggering a `"change"` event.
431 fetch: function(options) {
432 options = options ? _.clone(options) : {};
433 if (options.parse === void 0) options.parse = true;
434 var model = this;
435 var success = options.success;
436 options.success = function(resp) {
437 if (!model.set(model.parse(resp, options), options)) return false;
438 if (success) success(model, resp, options);
439 model.trigger('sync', model, resp, options);
440 };
441 wrapError(this, options);
442 return this.sync('read', this, options);
443 },
444
445 // Set a hash of model attributes, and sync the model to the server.
446 // If the server returns an attributes hash that differs, the model's
447 // state will be `set` again.
448 save: function(key, val, options) {
449 var attrs, method, xhr, attributes = this.attributes;
450
451 // Handle both `"key", value` and `{key: value}` -style arguments.
452 if (key == null || typeof key === 'object') {
453 attrs = key;
454 options = val;
455 } else {
456 (attrs = {})[key] = val;
457 }
458
459 // If we're not waiting and attributes exist, save acts as `set(attr).save(null, opts)`.
460 if (attrs && (!options || !options.wait) && !this.set(attrs, options)) return false;
461
462 options = _.extend({validate: true}, options);
463
464 // Do not persist invalid models.
465 if (!this._validate(attrs, options)) return false;
466
467 // Set temporary attributes if `{wait: true}`.
468 if (attrs && options.wait) {
469 this.attributes = _.extend({}, attributes, attrs);
470 }
471
472 // After a successful server-side save, the client is (optionally)
473 // updated with the server-side state.
474 if (options.parse === void 0) options.parse = true;
475 var model = this;
476 var success = options.success;
477 options.success = function(resp) {
478 // Ensure attributes are restored during synchronous saves.
479 model.attributes = attributes;
480 var serverAttrs = model.parse(resp, options);
481 if (options.wait) serverAttrs = _.extend(attrs || {}, serverAttrs);
482 if (_.isObject(serverAttrs) && !model.set(serverAttrs, options)) {
483 return false;
484 }
485 if (success) success(model, resp, options);
486 model.trigger('sync', model, resp, options);
487 };
488 wrapError(this, options);
489
490 method = this.isNew() ? 'create' : (options.patch ? 'patch' : 'update');
491 if (method === 'patch') options.attrs = attrs;
492 xhr = this.sync(method, this, options);
493
494 // Restore attributes.
495 if (attrs && options.wait) this.attributes = attributes;
496
497 return xhr;
498 },
499
500 // Destroy this model on the server if it was already persisted.
501 // Optimistically removes the model from its collection, if it has one.
502 // If `wait: true` is passed, waits for the server to respond before removal.
503 destroy: function(options) {
504 options = options ? _.clone(options) : {};
505 var model = this;
506 var success = options.success;
507
508 var destroy = function() {
509 model.trigger('destroy', model, model.collection, options);
510 };
511
512 options.success = function(resp) {
513 if (options.wait || model.isNew()) destroy();
514 if (success) success(model, resp, options);
515 if (!model.isNew()) model.trigger('sync', model, resp, options);
516 };
517
518 if (this.isNew()) {
519 options.success();
520 return false;
521 }
522 wrapError(this, options);
523
524 var xhr = this.sync('delete', this, options);
525 if (!options.wait) destroy();
526 return xhr;
527 },
528
529 // Default URL for the model's representation on the server -- if you're
530 // using Backbone's restful methods, override this to change the endpoint
531 // that will be called.
532 url: function() {
533 var base = _.result(this, 'urlRoot') || _.result(this.collection, 'url') || urlError();
534 if (this.isNew()) return base;
535 return base + (base.charAt(base.length - 1) === '/' ? '' : '/') + encodeURIComponent(this.id);
536 },
537
538 // **parse** converts a response into the hash of attributes to be `set` on
539 // the model. The default implementation is just to pass the response along.
540 parse: function(resp, options) {
541 return resp;
542 },
543
544 // Create a new model with identical attributes to this one.
545 clone: function() {
546 return new this.constructor(this.attributes);
547 },
548
549 // A model is new if it has never been saved to the server, and lacks an id.
550 isNew: function() {
551 return this.id == null;
552 },
553
554 // Check if the model is currently in a valid state.
555 isValid: function(options) {
556 return this._validate({}, _.extend(options || {}, { validate: true }));
557 },
558
559 // Run validation against the next complete set of model attributes,
560 // returning `true` if all is well. Otherwise, fire an `"invalid"` event.
561 _validate: function(attrs, options) {
562 if (!options.validate || !this.validate) return true;
563 attrs = _.extend({}, this.attributes, attrs);
564 var error = this.validationError = this.validate(attrs, options) || null;
565 if (!error) return true;
566 this.trigger('invalid', this, error, _.extend(options || {}, {validationError: error}));
567 return false;
568 }
569
570 });
571
572 // Underscore methods that we want to implement on the Model.
573 var modelMethods = ['keys', 'values', 'pairs', 'invert', 'pick', 'omit'];
574
575 // Mix in each Underscore method as a proxy to `Model#attributes`.
576 _.each(modelMethods, function(method) {
577 Model.prototype[method] = function() {
578 var args = slice.call(arguments);
579 args.unshift(this.attributes);
580 return _[method].apply(_, args);
581 };
582 });
583
584 // Backbone.Collection
585 // -------------------
586
587 // If models tend to represent a single row of data, a Backbone Collection is
588 // more analagous to a table full of data ... or a small slice or page of that
589 // table, or a collection of rows that belong together for a particular reason
590 // -- all of the messages in this particular folder, all of the documents
591 // belonging to this particular author, and so on. Collections maintain
592 // indexes of their models, both in order, and for lookup by `id`.
593
594 // Create a new **Collection**, perhaps to contain a specific type of `model`.
595 // If a `comparator` is specified, the Collection will maintain
596 // its models in sort order, as they're added and removed.
597 var Collection = Backbone.Collection = function(models, options) {
598 options || (options = {});
599 if (options.url) this.url = options.url;
600 if (options.model) this.model = options.model;
601 if (options.comparator !== void 0) this.comparator = options.comparator;
602 this._reset();
603 this.initialize.apply(this, arguments);
604 if (models) this.reset(models, _.extend({silent: true}, options));
605 };
606
607 // Default options for `Collection#set`.
608 var setOptions = {add: true, remove: true, merge: true};
609 var addOptions = {add: true, merge: false, remove: false};
610
611 // Define the Collection's inheritable methods.
612 _.extend(Collection.prototype, Events, {
613
614 // The default model for a collection is just a **Backbone.Model**.
615 // This should be overridden in most cases.
616 model: Model,
617
618 // Initialize is an empty function by default. Override it with your own
619 // initialization logic.
620 initialize: function(){},
621
622 // The JSON representation of a Collection is an array of the
623 // models' attributes.
624 toJSON: function(options) {
625 return this.map(function(model){ return model.toJSON(options); });
626 },
627
628 // Proxy `Backbone.sync` by default.
629 sync: function() {
630 return Backbone.sync.apply(this, arguments);
631 },
632
633 // Add a model, or list of models to the set.
634 add: function(models, options) {
635 return this.set(models, _.defaults(options || {}, addOptions));
636 },
637
638 // Remove a model, or a list of models from the set.
639 remove: function(models, options) {
640 models = _.isArray(models) ? models.slice() : [models];
641 options || (options = {});
642 var i, l, index, model;
643 for (i = 0, l = models.length; i < l; i++) {
644 model = this.get(models[i]);
645 if (!model) continue;
646 delete this._byId[model.id];
647 delete this._byId[model.cid];
648 index = this.indexOf(model);
649 this.models.splice(index, 1);
650 this.length--;
651 if (!options.silent) {
652 options.index = index;
653 model.trigger('remove', model, this, options);
654 }
655 this._removeReference(model);
656 }
657 return this;
658 },
659
660 // Update a collection by `set`-ing a new list of models, adding new ones,
661 // removing models that are no longer present, and merging models that
662 // already exist in the collection, as necessary. Similar to **Model#set**,
663 // the core operation for updating the data contained by the collection.
664 set: function(models, options) {
665 options = _.defaults(options || {}, setOptions);
666 if (options.parse) models = this.parse(models, options);
667 if (!_.isArray(models)) models = models ? [models] : [];
668 var i, l, model, attrs, existing, sort;
669 var at = options.at;
670 var sortable = this.comparator && (at == null) && options.sort !== false;
671 var sortAttr = _.isString(this.comparator) ? this.comparator : null;
672 var toAdd = [], toRemove = [], modelMap = {};
673
674 // Turn bare objects into model references, and prevent invalid models
675 // from being added.
676 for (i = 0, l = models.length; i < l; i++) {
677 if (!(model = this._prepareModel(models[i], options))) continue;
678
679 // If a duplicate is found, prevent it from being added and
680 // optionally merge it into the existing model.
681 if (existing = this.get(model)) {
682 if (options.remove) modelMap[existing.cid] = true;
683 if (options.merge) {
684 existing.set(model.attributes, options);
685 if (sortable && !sort && existing.hasChanged(sortAttr)) sort = true;
686 }
687
688 // This is a new model, push it to the `toAdd` list.
689 } else if (options.add) {
690 toAdd.push(model);
691
692 // Listen to added models' events, and index models for lookup by
693 // `id` and by `cid`.
694 model.on('all', this._onModelEvent, this);
695 this._byId[model.cid] = model;
696 if (model.id != null) this._byId[model.id] = model;
697 }
698 }
699
700 // Remove nonexistent models if appropriate.
701 if (options.remove) {
702 for (i = 0, l = this.length; i < l; ++i) {
703 if (!modelMap[(model = this.models[i]).cid]) toRemove.push(model);
704 }
705 if (toRemove.length) this.remove(toRemove, options);
706 }
707
708 // See if sorting is needed, update `length` and splice in new models.
709 if (toAdd.length) {
710 if (sortable) sort = true;
711 this.length += toAdd.length;
712 if (at != null) {
713 splice.apply(this.models, [at, 0].concat(toAdd));
714 } else {
715 push.apply(this.models, toAdd);
716 }
717 }
718
719 // Silently sort the collection if appropriate.
720 if (sort) this.sort({silent: true});
721
722 if (options.silent) return this;
723
724 // Trigger `add` events.
725 for (i = 0, l = toAdd.length; i < l; i++) {
726 (model = toAdd[i]).trigger('add', model, this, options);
727 }
728
729 // Trigger `sort` if the collection was sorted.
730 if (sort) this.trigger('sort', this, options);
731 return this;
732 },
733
734 // When you have more items than you want to add or remove individually,
735 // you can reset the entire set with a new list of models, without firing
736 // any granular `add` or `remove` events. Fires `reset` when finished.
737 // Useful for bulk operations and optimizations.
738 reset: function(models, options) {
739 options || (options = {});
740 for (var i = 0, l = this.models.length; i < l; i++) {
741 this._removeReference(this.models[i]);
742 }
743 options.previousModels = this.models;
744 this._reset();
745 this.add(models, _.extend({silent: true}, options));
746 if (!options.silent) this.trigger('reset', this, options);
747 return this;
748 },
749
750 // Add a model to the end of the collection.
751 push: function(model, options) {
752 model = this._prepareModel(model, options);
753 this.add(model, _.extend({at: this.length}, options));
754 return model;
755 },
756
757 // Remove a model from the end of the collection.
758 pop: function(options) {
759 var model = this.at(this.length - 1);
760 this.remove(model, options);
761 return model;
762 },
763
764 // Add a model to the beginning of the collection.
765 unshift: function(model, options) {
766 model = this._prepareModel(model, options);
767 this.add(model, _.extend({at: 0}, options));
768 return model;
769 },
770
771 // Remove a model from the beginning of the collection.
772 shift: function(options) {
773 var model = this.at(0);
774 this.remove(model, options);
775 return model;
776 },
777
778 // Slice out a sub-array of models from the collection.
779 slice: function(begin, end) {
780 return this.models.slice(begin, end);
781 },
782
783 // Get a model from the set by id.
784 get: function(obj) {
785 if (obj == null) return void 0;
786 return this._byId[obj.id != null ? obj.id : obj.cid || obj];
787 },
788
789 // Get the model at the given index.
790 at: function(index) {
791 return this.models[index];
792 },
793
794 // Return models with matching attributes. Useful for simple cases of
795 // `filter`.
796 where: function(attrs, first) {
797 if (_.isEmpty(attrs)) return first ? void 0 : [];
798 return this[first ? 'find' : 'filter'](function(model) {
799 for (var key in attrs) {
800 if (attrs[key] !== model.get(key)) return false;
801 }
802 return true;
803 });
804 },
805
806 // Return the first model with matching attributes. Useful for simple cases
807 // of `find`.
808 findWhere: function(attrs) {
809 return this.where(attrs, true);
810 },
811
812 // Force the collection to re-sort itself. You don't need to call this under
813 // normal circumstances, as the set will maintain sort order as each item
814 // is added.
815 sort: function(options) {
816 if (!this.comparator) throw new Error('Cannot sort a set without a comparator');
817 options || (options = {});
818
819 // Run sort based on type of `comparator`.
820 if (_.isString(this.comparator) || this.comparator.length === 1) {
821 this.models = this.sortBy(this.comparator, this);
822 } else {
823 this.models.sort(_.bind(this.comparator, this));
824 }
825
826 if (!options.silent) this.trigger('sort', this, options);
827 return this;
828 },
829
830 // Figure out the smallest index at which a model should be inserted so as
831 // to maintain order.
832 sortedIndex: function(model, value, context) {
833 value || (value = this.comparator);
834 var iterator = _.isFunction(value) ? value : function(model) {
835 return model.get(value);
836 };
837 return _.sortedIndex(this.models, model, iterator, context);
838 },
839
840 // Pluck an attribute from each model in the collection.
841 pluck: function(attr) {
842 return _.invoke(this.models, 'get', attr);
843 },
844
845 // Fetch the default set of models for this collection, resetting the
846 // collection when they arrive. If `reset: true` is passed, the response
847 // data will be passed through the `reset` method instead of `set`.
848 fetch: function(options) {
849 options = options ? _.clone(options) : {};
850 if (options.parse === void 0) options.parse = true;
851 var success = options.success;
852 var collection = this;
853 options.success = function(resp) {
854 var method = options.reset ? 'reset' : 'set';
855 collection[method](resp, options);
856 if (success) success(collection, resp, options);
857 collection.trigger('sync', collection, resp, options);
858 };
859 wrapError(this, options);
860 return this.sync('read', this, options);
861 },
862
863 // Create a new instance of a model in this collection. Add the model to the
864 // collection immediately, unless `wait: true` is passed, in which case we
865 // wait for the server to agree.
866 create: function(model, options) {
867 options = options ? _.clone(options) : {};
868 if (!(model = this._prepareModel(model, options))) return false;
869 if (!options.wait) this.add(model, options);
870 var collection = this;
871 var success = options.success;
872 options.success = function(resp) {
873 if (options.wait) collection.add(model, options);
874 if (success) success(model, resp, options);
875 };
876 model.save(null, options);
877 return model;
878 },
879
880 // **parse** converts a response into a list of models to be added to the
881 // collection. The default implementation is just to pass it through.
882 parse: function(resp, options) {
883 return resp;
884 },
885
886 // Create a new collection with an identical list of models as this one.
887 clone: function() {
888 return new this.constructor(this.models);
889 },
890
891 // Private method to reset all internal state. Called when the collection
892 // is first initialized or reset.
893 _reset: function() {
894 this.length = 0;
895 this.models = [];
896 this._byId = {};
897 },
898
899 // Prepare a hash of attributes (or other model) to be added to this
900 // collection.
901 _prepareModel: function(attrs, options) {
902 if (attrs instanceof Model) {
903 if (!attrs.collection) attrs.collection = this;
904 return attrs;
905 }
906 options || (options = {});
907 options.collection = this;
908 var model = new this.model(attrs, options);
909 if (!model._validate(attrs, options)) {
910 this.trigger('invalid', this, attrs, options);
911 return false;
912 }
913 return model;
914 },
915
916 // Internal method to sever a model's ties to a collection.
917 _removeReference: function(model) {
918 if (this === model.collection) delete model.collection;
919 model.off('all', this._onModelEvent, this);
920 },
921
922 // Internal method called every time a model in the set fires an event.
923 // Sets need to update their indexes when models change ids. All other
924 // events simply proxy through. "add" and "remove" events that originate
925 // in other collections are ignored.
926 _onModelEvent: function(event, model, collection, options) {
927 if ((event === 'add' || event === 'remove') && collection !== this) return;
928 if (event === 'destroy') this.remove(model, options);
929 if (model && event === 'change:' + model.idAttribute) {
930 delete this._byId[model.previous(model.idAttribute)];
931 if (model.id != null) this._byId[model.id] = model;
932 }
933 this.trigger.apply(this, arguments);
934 }
935
936 });
937
938 // Underscore methods that we want to implement on the Collection.
939 // 90% of the core usefulness of Backbone Collections is actually implemented
940 // right here:
941 var methods = ['forEach', 'each', 'map', 'collect', 'reduce', 'foldl',
942 'inject', 'reduceRight', 'foldr', 'find', 'detect', 'filter', 'select',
943 'reject', 'every', 'all', 'some', 'any', 'include', 'contains', 'invoke',
944 'max', 'min', 'toArray', 'size', 'first', 'head', 'take', 'initial', 'rest',
945 'tail', 'drop', 'last', 'without', 'indexOf', 'shuffle', 'lastIndexOf',
946 'isEmpty', 'chain'];
947
948 // Mix in each Underscore method as a proxy to `Collection#models`.
949 _.each(methods, function(method) {
950 Collection.prototype[method] = function() {
951 var args = slice.call(arguments);
952 args.unshift(this.models);
953 return _[method].apply(_, args);
954 };
955 });
956
957 // Underscore methods that take a property name as an argument.
958 var attributeMethods = ['groupBy', 'countBy', 'sortBy'];
959
960 // Use attributes instead of properties.
961 _.each(attributeMethods, function(method) {
962 Collection.prototype[method] = function(value, context) {
963 var iterator = _.isFunction(value) ? value : function(model) {
964 return model.get(value);
965 };
966 return _[method](this.models, iterator, context);
967 };
968 });
969
970 // Backbone.View
971 // -------------
972
973 // Backbone Views are almost more convention than they are actual code. A View
974 // is simply a JavaScript object that represents a logical chunk of UI in the
975 // DOM. This might be a single item, an entire list, a sidebar or panel, or
976 // even the surrounding frame which wraps your whole app. Defining a chunk of
977 // UI as a **View** allows you to define your DOM events declaratively, without
978 // having to worry about render order ... and makes it easy for the view to
979 // react to specific changes in the state of your models.
980
981 // Creating a Backbone.View creates its initial element outside of the DOM,
982 // if an existing element is not provided...
983 var View = Backbone.View = function(options) {
984 this.cid = _.uniqueId('view');
985 this._configure(options || {});
986 this._ensureElement();
987 this.initialize.apply(this, arguments);
988 this.delegateEvents();
989 };
990
991 // Cached regex to split keys for `delegate`.
992 var delegateEventSplitter = /^(\S+)\s*(.*)$/;
993
994 // List of view options to be merged as properties.
995 var viewOptions = ['model', 'collection', 'el', 'id', 'attributes', 'className', 'tagName', 'events'];
996
997 // Set up all inheritable **Backbone.View** properties and methods.
998 _.extend(View.prototype, Events, {
999
1000 // The default `tagName` of a View's element is `"div"`.
1001 tagName: 'div',
1002
1003 // jQuery delegate for element lookup, scoped to DOM elements within the
1004 // current view. This should be prefered to global lookups where possible.
1005 $: function(selector) {
1006 return this.$el.find(selector);
1007 },
1008
1009 // Initialize is an empty function by default. Override it with your own
1010 // initialization logic.
1011 initialize: function(){},
1012
1013 // **render** is the core function that your view should override, in order
1014 // to populate its element (`this.el`), with the appropriate HTML. The
1015 // convention is for **render** to always return `this`.
1016 render: function() {
1017 return this;
1018 },
1019
1020 // Remove this view by taking the element out of the DOM, and removing any
1021 // applicable Backbone.Events listeners.
1022 remove: function() {
1023 this.$el.remove();
1024 this.stopListening();
1025 return this;
1026 },
1027
1028 // Change the view's element (`this.el` property), including event
1029 // re-delegation.
1030 setElement: function(element, delegate) {
1031 if (this.$el) this.undelegateEvents();
1032 this.$el = element instanceof Backbone.$ ? element : Backbone.$(element);
1033 this.el = this.$el[0];
1034 if (delegate !== false) this.delegateEvents();
1035 return this;
1036 },
1037
1038 // Set callbacks, where `this.events` is a hash of
1039 //
1040 // *{"event selector": "callback"}*
1041 //
1042 // {
1043 // 'mousedown .title': 'edit',
1044 // 'click .button': 'save'
1045 // 'click .open': function(e) { ... }
1046 // }
1047 //
1048 // pairs. Callbacks will be bound to the view, with `this` set properly.
1049 // Uses event delegation for efficiency.
1050 // Omitting the selector binds the event to `this.el`.
1051 // This only works for delegate-able events: not `focus`, `blur`, and
1052 // not `change`, `submit`, and `reset` in Internet Explorer.
1053 delegateEvents: function(events) {
1054 if (!(events || (events = _.result(this, 'events')))) return this;
1055 this.undelegateEvents();
1056 for (var key in events) {
1057 var method = events[key];
1058 if (!_.isFunction(method)) method = this[events[key]];
1059 if (!method) continue;
1060
1061 var match = key.match(delegateEventSplitter);
1062 var eventName = match[1], selector = match[2];
1063 method = _.bind(method, this);
1064 eventName += '.delegateEvents' + this.cid;
1065 if (selector === '') {
1066 this.$el.on(eventName, method);
1067 } else {
1068 this.$el.on(eventName, selector, method);
1069 }
1070 }
1071 return this;
1072 },
1073
1074 // Clears all callbacks previously bound to the view with `delegateEvents`.
1075 // You usually don't need to use this, but may wish to if you have multiple
1076 // Backbone views attached to the same DOM element.
1077 undelegateEvents: function() {
1078 this.$el.off('.delegateEvents' + this.cid);
1079 return this;
1080 },
1081
1082 // Performs the initial configuration of a View with a set of options.
1083 // Keys with special meaning *(e.g. model, collection, id, className)* are
1084 // attached directly to the view. See `viewOptions` for an exhaustive
1085 // list.
1086 _configure: function(options) {
1087 if (this.options) options = _.extend({}, _.result(this, 'options'), options);
1088 _.extend(this, _.pick(options, viewOptions));
1089 this.options = options;
1090 },
1091
1092 // Ensure that the View has a DOM element to render into.
1093 // If `this.el` is a string, pass it through `$()`, take the first
1094 // matching element, and re-assign it to `el`. Otherwise, create
1095 // an element from the `id`, `className` and `tagName` properties.
1096 _ensureElement: function() {
1097 if (!this.el) {
1098 var attrs = _.extend({}, _.result(this, 'attributes'));
1099 if (this.id) attrs.id = _.result(this, 'id');
1100 if (this.className) attrs['class'] = _.result(this, 'className');
1101 var $el = Backbone.$('<' + _.result(this, 'tagName') + '>').attr(attrs);
1102 this.setElement($el, false);
1103 } else {
1104 this.setElement(_.result(this, 'el'), false);
1105 }
1106 }
1107
1108 });
1109
1110 // Backbone.sync
1111 // -------------
1112
1113 // Override this function to change the manner in which Backbone persists
1114 // models to the server. You will be passed the type of request, and the
1115 // model in question. By default, makes a RESTful Ajax request
1116 // to the model's `url()`. Some possible customizations could be:
1117 //
1118 // * Use `setTimeout` to batch rapid-fire updates into a single request.
1119 // * Send up the models as XML instead of JSON.
1120 // * Persist models via WebSockets instead of Ajax.
1121 //
1122 // Turn on `Backbone.emulateHTTP` in order to send `PUT` and `DELETE` requests
1123 // as `POST`, with a `_method` parameter containing the true HTTP method,
1124 // as well as all requests with the body as `application/x-www-form-urlencoded`
1125 // instead of `application/json` with the model in a param named `model`.
1126 // Useful when interfacing with server-side languages like **PHP** that make
1127 // it difficult to read the body of `PUT` requests.
1128 Backbone.sync = function(method, model, options) {
1129 var type = methodMap[method];
1130
1131 // Default options, unless specified.
1132 _.defaults(options || (options = {}), {
1133 emulateHTTP: Backbone.emulateHTTP,
1134 emulateJSON: Backbone.emulateJSON
1135 });
1136
1137 // Default JSON-request options.
1138 var params = {type: type, dataType: 'json'};
1139
1140 // Ensure that we have a URL.
1141 if (!options.url) {
1142 params.url = _.result(model, 'url') || urlError();
1143 }
1144
1145 // Ensure that we have the appropriate request data.
1146 if (options.data == null && model && (method === 'create' || method === 'update' || method === 'patch')) {
1147 params.contentType = 'application/json';
1148 params.data = JSON.stringify(options.attrs || model.toJSON(options));
1149 }
1150
1151 // For older servers, emulate JSON by encoding the request into an HTML-form.
1152 if (options.emulateJSON) {
1153 params.contentType = 'application/x-www-form-urlencoded';
1154 params.data = params.data ? {model: params.data} : {};
1155 }
1156
1157 // For older servers, emulate HTTP by mimicking the HTTP method with `_method`
1158 // And an `X-HTTP-Method-Override` header.
1159 if (options.emulateHTTP && (type === 'PUT' || type === 'DELETE' || type === 'PATCH')) {
1160 params.type = 'POST';
1161 if (options.emulateJSON) params.data._method = type;
1162 var beforeSend = options.beforeSend;
1163 options.beforeSend = function(xhr) {
1164 xhr.setRequestHeader('X-HTTP-Method-Override', type);
1165 if (beforeSend) return beforeSend.apply(this, arguments);
1166 };
1167 }
1168
1169 // Don't process data on a non-GET request.
1170 if (params.type !== 'GET' && !options.emulateJSON) {
1171 params.processData = false;
1172 }
1173
1174 // If we're sending a `PATCH` request, and we're in an old Internet Explorer
1175 // that still has ActiveX enabled by default, override jQuery to use that
1176 // for XHR instead. Remove this line when jQuery supports `PATCH` on IE8.
1177 if (params.type === 'PATCH' && window.ActiveXObject &&
1178 !(window.external && window.external.msActiveXFilteringEnabled)) {
1179 params.xhr = function() {
1180 return new ActiveXObject("Microsoft.XMLHTTP");
1181 };
1182 }
1183
1184 // Make the request, allowing the user to override any Ajax options.
1185 var xhr = options.xhr = Backbone.ajax(_.extend(params, options));
1186 model.trigger('request', model, xhr, options);
1187 return xhr;
1188 };
1189
1190 // Map from CRUD to HTTP for our default `Backbone.sync` implementation.
1191 var methodMap = {
1192 'create': 'POST',
1193 'update': 'PUT',
1194 'patch': 'PATCH',
1195 'delete': 'DELETE',
1196 'read': 'GET'
1197 };
1198
1199 // Set the default implementation of `Backbone.ajax` to proxy through to `$`.
1200 // Override this if you'd like to use a different library.
1201 Backbone.ajax = function() {
1202 return Backbone.$.ajax.apply(Backbone.$, arguments);
1203 };
1204
1205 // Backbone.Router
1206 // ---------------
1207
1208 // Routers map faux-URLs to actions, and fire events when routes are
1209 // matched. Creating a new one sets its `routes` hash, if not set statically.
1210 var Router = Backbone.Router = function(options) {
1211 options || (options = {});
1212 if (options.routes) this.routes = options.routes;
1213 this._bindRoutes();
1214 this.initialize.apply(this, arguments);
1215 };
1216
1217 // Cached regular expressions for matching named param parts and splatted
1218 // parts of route strings.
1219 var optionalParam = /\((.*?)\)/g;
1220 var namedParam = /(\(\?)?:\w+/g;
1221 var splatParam = /\*\w+/g;
1222 var escapeRegExp = /[\-{}\[\]+?.,\\\^$|#\s]/g;
1223
1224 // Set up all inheritable **Backbone.Router** properties and methods.
1225 _.extend(Router.prototype, Events, {
1226
1227 // Initialize is an empty function by default. Override it with your own
1228 // initialization logic.
1229 initialize: function(){},
1230
1231 // Manually bind a single named route to a callback. For example:
1232 //
1233 // this.route('search/:query/p:num', 'search', function(query, num) {
1234 // ...
1235 // });
1236 //
1237 route: function(route, name, callback) {
1238 if (!_.isRegExp(route)) route = this._routeToRegExp(route);
1239 if (_.isFunction(name)) {
1240 callback = name;
1241 name = '';
1242 }
1243 if (!callback) callback = this[name];
1244 var router = this;
1245 Backbone.history.route(route, function(fragment) {
1246 var args = router._extractParameters(route, fragment);
1247 callback && callback.apply(router, args);
1248 router.trigger.apply(router, ['route:' + name].concat(args));
1249 router.trigger('route', name, args);
1250 Backbone.history.trigger('route', router, name, args);
1251 });
1252 return this;
1253 },
1254
1255 // Simple proxy to `Backbone.history` to save a fragment into the history.
1256 navigate: function(fragment, options) {
1257 Backbone.history.navigate(fragment, options);
1258 return this;
1259 },
1260
1261 // Bind all defined routes to `Backbone.history`. We have to reverse the
1262 // order of the routes here to support behavior where the most general
1263 // routes can be defined at the bottom of the route map.
1264 _bindRoutes: function() {
1265 if (!this.routes) return;
1266 this.routes = _.result(this, 'routes');
1267 var route, routes = _.keys(this.routes);
1268 while ((route = routes.pop()) != null) {
1269 this.route(route, this.routes[route]);
1270 }
1271 },
1272
1273 // Convert a route string into a regular expression, suitable for matching
1274 // against the current location hash.
1275 _routeToRegExp: function(route) {
1276 route = route.replace(escapeRegExp, '\\$&')
1277 .replace(optionalParam, '(?:$1)?')
1278 .replace(namedParam, function(match, optional){
1279 return optional ? match : '([^\/]+)';
1280 })
1281 .replace(splatParam, '(.*?)');
1282 return new RegExp('^' + route + '$');
1283 },
1284
1285 // Given a route, and a URL fragment that it matches, return the array of
1286 // extracted decoded parameters. Empty or unmatched parameters will be
1287 // treated as `null` to normalize cross-browser behavior.
1288 _extractParameters: function(route, fragment) {
1289 var params = route.exec(fragment).slice(1);
1290 return _.map(params, function(param) {
1291 return param ? decodeURIComponent(param) : null;
1292 });
1293 }
1294
1295 });
1296
1297 // Backbone.History
1298 // ----------------
1299
1300 // Handles cross-browser history management, based on either
1301 // [pushState](http://diveintohtml5.info/history.html) and real URLs, or
1302 // [onhashchange](https://developer.mozilla.org/en-US/docs/DOM/window.onhashchange)
1303 // and URL fragments. If the browser supports neither (old IE, natch),
1304 // falls back to polling.
1305 var History = Backbone.History = function() {
1306 this.handlers = [];
1307 _.bindAll(this, 'checkUrl');
1308
1309 // Ensure that `History` can be used outside of the browser.
1310 if (typeof window !== 'undefined') {
1311 this.location = window.location;
1312 this.history = window.history;
1313 }
1314 };
1315
1316 // Cached regex for stripping a leading hash/slash and trailing space.
1317 var routeStripper = /^[#\/]|\s+$/g;
1318
1319 // Cached regex for stripping leading and trailing slashes.
1320 var rootStripper = /^\/+|\/+$/g;
1321
1322 // Cached regex for detecting MSIE.
1323 var isExplorer = /msie [\w.]+/;
1324
1325 // Cached regex for removing a trailing slash.
1326 var trailingSlash = /\/$/;
1327
1328 // Has the history handling already been started?
1329 History.started = false;
1330
1331 // Set up all inheritable **Backbone.History** properties and methods.
1332 _.extend(History.prototype, Events, {
1333
1334 // The default interval to poll for hash changes, if necessary, is
1335 // twenty times a second.
1336 interval: 50,
1337
1338 // Gets the true hash value. Cannot use location.hash directly due to bug
1339 // in Firefox where location.hash will always be decoded.
1340 getHash: function(window) {
1341 var match = (window || this).location.href.match(/#(.*)$/);
1342 return match ? match[1] : '';
1343 },
1344
1345 // Get the cross-browser normalized URL fragment, either from the URL,
1346 // the hash, or the override.
1347 getFragment: function(fragment, forcePushState) {
1348 if (fragment == null) {
1349 if (this._hasPushState || !this._wantsHashChange || forcePushState) {
1350 fragment = this.location.pathname;
1351 var root = this.root.replace(trailingSlash, '');
1352 if (!fragment.indexOf(root)) fragment = fragment.substr(root.length);
1353 } else {
1354 fragment = this.getHash();
1355 }
1356 }
1357 return fragment.replace(routeStripper, '');
1358 },
1359
1360 // Start the hash change handling, returning `true` if the current URL matches
1361 // an existing route, and `false` otherwise.
1362 start: function(options) {
1363 if (History.started) throw new Error("Backbone.history has already been started");
1364 History.started = true;
1365
1366 // Figure out the initial configuration. Do we need an iframe?
1367 // Is pushState desired ... is it available?
1368 this.options = _.extend({}, {root: '/'}, this.options, options);
1369 this.root = this.options.root;
1370 this._wantsHashChange = this.options.hashChange !== false;
1371 this._wantsPushState = !!this.options.pushState;
1372 this._hasPushState = !!(this.options.pushState && this.history && this.history.pushState);
1373 var fragment = this.getFragment();
1374 var docMode = document.documentMode;
1375 var oldIE = (isExplorer.exec(navigator.userAgent.toLowerCase()) && (!docMode || docMode <= 7));
1376
1377 // Normalize root to always include a leading and trailing slash.
1378 this.root = ('/' + this.root + '/').replace(rootStripper, '/');
1379
1380 if (oldIE && this._wantsHashChange) {
1381 this.iframe = Backbone.$('<iframe src="javascript:0" tabindex="-1" />').hide().appendTo('body')[0].contentWindow;
1382 this.navigate(fragment);
1383 }
1384
1385 // Depending on whether we're using pushState or hashes, and whether
1386 // 'onhashchange' is supported, determine how we check the URL state.
1387 if (this._hasPushState) {
1388 Backbone.$(window).on('popstate', this.checkUrl);
1389 } else if (this._wantsHashChange && ('onhashchange' in window) && !oldIE) {
1390 Backbone.$(window).on('hashchange', this.checkUrl);
1391 } else if (this._wantsHashChange) {
1392 this._checkUrlInterval = setInterval(this.checkUrl, this.interval);
1393 }
1394
1395 // Determine if we need to change the base url, for a pushState link
1396 // opened by a non-pushState browser.
1397 this.fragment = fragment;
1398 var loc = this.location;
1399 var atRoot = loc.pathname.replace(/[^\/]$/, '$&/') === this.root;
1400
1401 // If we've started off with a route from a `pushState`-enabled browser,
1402 // but we're currently in a browser that doesn't support it...
1403 if (this._wantsHashChange && this._wantsPushState && !this._hasPushState && !atRoot) {
1404 this.fragment = this.getFragment(null, true);
1405 this.location.replace(this.root + this.location.search + '#' + this.fragment);
1406 // Return immediately as browser will do redirect to new url
1407 return true;
1408
1409 // Or if we've started out with a hash-based route, but we're currently
1410 // in a browser where it could be `pushState`-based instead...
1411 } else if (this._wantsPushState && this._hasPushState && atRoot && loc.hash) {
1412 this.fragment = this.getHash().replace(routeStripper, '');
1413 this.history.replaceState({}, document.title, this.root + this.fragment + loc.search);
1414 }
1415
1416 if (!this.options.silent) return this.loadUrl();
1417 },
1418
1419 // Disable Backbone.history, perhaps temporarily. Not useful in a real app,
1420 // but possibly useful for unit testing Routers.
1421 stop: function() {
1422 Backbone.$(window).off('popstate', this.checkUrl).off('hashchange', this.checkUrl);
1423 clearInterval(this._checkUrlInterval);
1424 History.started = false;
1425 },
1426
1427 // Add a route to be tested when the fragment changes. Routes added later
1428 // may override previous routes.
1429 route: function(route, callback) {
1430 this.handlers.unshift({route: route, callback: callback});
1431 },
1432
1433 // Checks the current URL to see if it has changed, and if it has,
1434 // calls `loadUrl`, normalizing across the hidden iframe.
1435 checkUrl: function(e) {
1436 var current = this.getFragment();
1437 if (current === this.fragment && this.iframe) {
1438 current = this.getFragment(this.getHash(this.iframe));
1439 }
1440 if (current === this.fragment) return false;
1441 if (this.iframe) this.navigate(current);
1442 this.loadUrl() || this.loadUrl(this.getHash());
1443 },
1444
1445 // Attempt to load the current URL fragment. If a route succeeds with a
1446 // match, returns `true`. If no defined routes matches the fragment,
1447 // returns `false`.
1448 loadUrl: function(fragmentOverride) {
1449 var fragment = this.fragment = this.getFragment(fragmentOverride);
1450 var matched = _.any(this.handlers, function(handler) {
1451 if (handler.route.test(fragment)) {
1452 handler.callback(fragment);
1453 return true;
1454 }
1455 });
1456 return matched;
1457 },
1458
1459 // Save a fragment into the hash history, or replace the URL state if the
1460 // 'replace' option is passed. You are responsible for properly URL-encoding
1461 // the fragment in advance.
1462 //
1463 // The options object can contain `trigger: true` if you wish to have the
1464 // route callback be fired (not usually desirable), or `replace: true`, if
1465 // you wish to modify the current URL without adding an entry to the history.
1466 navigate: function(fragment, options) {
1467 if (!History.started) return false;
1468 if (!options || options === true) options = {trigger: options};
1469 fragment = this.getFragment(fragment || '');
1470 if (this.fragment === fragment) return;
1471 this.fragment = fragment;
1472 var url = this.root + fragment;
1473
1474 // If pushState is available, we use it to set the fragment as a real URL.
1475 if (this._hasPushState) {
1476 this.history[options.replace ? 'replaceState' : 'pushState']({}, document.title, url);
1477
1478 // If hash changes haven't been explicitly disabled, update the hash
1479 // fragment to store history.
1480 } else if (this._wantsHashChange) {
1481 this._updateHash(this.location, fragment, options.replace);
1482 if (this.iframe && (fragment !== this.getFragment(this.getHash(this.iframe)))) {
1483 // Opening and closing the iframe tricks IE7 and earlier to push a
1484 // history entry on hash-tag change. When replace is true, we don't
1485 // want this.
1486 if(!options.replace) this.iframe.document.open().close();
1487 this._updateHash(this.iframe.location, fragment, options.replace);
1488 }
1489
1490 // If you've told us that you explicitly don't want fallback hashchange-
1491 // based history, then `navigate` becomes a page refresh.
1492 } else {
1493 return this.location.assign(url);
1494 }
1495 if (options.trigger) this.loadUrl(fragment);
1496 },
1497
1498 // Update the hash location, either replacing the current entry, or adding
1499 // a new one to the browser history.
1500 _updateHash: function(location, fragment, replace) {
1501 if (replace) {
1502 var href = location.href.replace(/(javascript:|#).*$/, '');
1503 location.replace(href + '#' + fragment);
1504 } else {
1505 // Some browsers require that `hash` contains a leading #.
1506 location.hash = '#' + fragment;
1507 }
1508 }
1509
1510 });
1511
1512 // Create the default Backbone.history.
1513 Backbone.history = new History;
1514
1515 // Helpers
1516 // -------
1517
1518 // Helper function to correctly set up the prototype chain, for subclasses.
1519 // Similar to `goog.inherits`, but uses a hash of prototype properties and
1520 // class properties to be extended.
1521 var extend = function(protoProps, staticProps) {
1522 var parent = this;
1523 var child;
1524
1525 // The constructor function for the new subclass is either defined by you
1526 // (the "constructor" property in your `extend` definition), or defaulted
1527 // by us to simply call the parent's constructor.
1528 if (protoProps && _.has(protoProps, 'constructor')) {
1529 child = protoProps.constructor;
1530 } else {
1531 child = function(){ return parent.apply(this, arguments); };
1532 }
1533
1534 // Add static properties to the constructor function, if supplied.
1535 _.extend(child, parent, staticProps);
1536
1537 // Set the prototype chain to inherit from `parent`, without calling
1538 // `parent`'s constructor function.
1539 var Surrogate = function(){ this.constructor = child; };
1540 Surrogate.prototype = parent.prototype;
1541 child.prototype = new Surrogate;
1542
1543 // Add prototype properties (instance properties) to the subclass,
1544 // if supplied.
1545 if (protoProps) _.extend(child.prototype, protoProps);
1546
1547 // Set a convenience property in case the parent's prototype is needed
1548 // later.
1549 child.__super__ = parent.prototype;
1550
1551 return child;
1552 };
1553
1554 // Set up inheritance for the model, collection, router, view and history.
1555 Model.extend = Collection.extend = Router.extend = View.extend = History.extend = extend;
1556
1557 // Throw an error when a URL is needed, and none is supplied.
1558 var urlError = function() {
1559 throw new Error('A "url" property or function must be specified');
1560 };
1561
1562 // Wrap an optional error callback with a fallback error event.
1563 var wrapError = function (model, options) {
1564 var error = options.error;
1565 options.error = function(resp) {
1566 if (error) error(model, resp, options);
1567 model.trigger('error', model, resp, options);
1568 };
1569 };
1570
1571}).call(this);

static/js/lib/tinymce/jquery.tinymce.min.js

1(function(e){function t(){function t(e){"remove"===e&&this.each(function(e,t){var n=i(t);n&&n.remove()}),this.find("span.mceEditor,div.mceEditor").each(function(e,t){var n=tinymce.get(t.id.replace(/_parent$/,""));n&&n.remove()})}function r(e){var r,i=this;if(e!==n)t.call(i),i.each(function(t,n){var r;(r=tinymce.get(n.id))&&r.setContent(e)});else if(i.length>0&&(r=tinymce.get(i[0].id)))return r.getContent()}function i(e){var t=null;return e&&e.id&&o.tinymce&&(t=tinymce.get(e.id)),t}function a(e){return!!(e&&e.length&&o.tinymce&&e.is(":tinymce"))}var s={};e.each(["text","html","val"],function(t,o){var l=s[o]=e.fn[o],c="text"===o;e.fn[o]=function(t){var o=this;if(!a(o))return l.apply(o,arguments);if(t!==n)return r.call(o.filter(":tinymce"),t),l.apply(o.not(":tinymce"),arguments),o;var s="",u=arguments;return(c?o:o.eq(0)).each(function(t,n){var r=i(n);s+=r?c?r.getContent().replace(/<(?:"[^"]*"|'[^']*'|[^'">])*>/g,""):r.getContent({save:!0}):l.apply(e(n),u)}),s}}),e.each(["append","prepend"],function(t,r){var o=s[r]=e.fn[r],l="prepend"===r;e.fn[r]=function(e){var t=this;return a(t)?e!==n?(t.filter(":tinymce").each(function(t,n){var r=i(n);r&&r.setContent(l?e+r.getContent():r.getContent()+e)}),o.apply(t.not(":tinymce"),arguments),t):void 0:o.apply(t,arguments)}}),e.each(["remove","replaceWith","replaceAll","empty"],function(n,r){var i=s[r]=e.fn[r];e.fn[r]=function(){return t.call(this,r),i.apply(this,arguments)}}),s.attr=e.fn.attr,e.fn.attr=function(t,o){var l=this,c=arguments;if(!t||"value"!==t||!a(l))return o!==n?s.attr.apply(l,c):s.attr.apply(l,c);if(o!==n)return r.call(l.filter(":tinymce"),o),s.attr.apply(l.not(":tinymce"),c),l;var u=l[0],d=i(u);return d?d.getContent({save:!0}):s.attr.apply(e(u),c)}}var n,r,i=[],o=window;e.fn.tinymce=function(n){function a(){var r=[],i=0;t&&(t(),t=null),u.each(function(e,t){var o,a=t.id,s=n.oninit;a||(t.id=a=tinymce.DOM.uniqueId()),o=new tinymce.Editor(a,n,tinymce.EditorManager),r.push(o),o.on("init",function(){var e,t=s;u.css("visibility",""),s&&++i==r.length&&("string"==typeof t&&(e=-1===t.indexOf(".")?null:tinymce.resolve(t.replace(/\.\w+$/,"")),t=tinymce.resolve(t)),t.apply(e||tinymce,r))})}),e.each(r,function(e,t){t.render()})}var s,l,c,u=this,d="";if(!u.length)return u;if(!n)return tinymce.get(u[0].id);if(u.css("visibility","hidden"),o.tinymce||r||!(s=n.script_url))1===r?i.push(a):a();else{r=1,l=s.substring(0,s.lastIndexOf("/")),-1!=s.indexOf(".min")&&(d=".min"),o.tinymce=o.tinyMCEPreInit||{base:l,suffix:d},-1!=s.indexOf("gzip")&&(c=n.language||"en",s=s+(/\?/.test(s)?"&":"?")+"js=true&core=true&suffix="+escape(d)+"&themes="+escape(n.theme)+"&plugins="+escape(n.plugins)+"&languages="+c,o.tinyMCE_GZ||(o.tinyMCE_GZ={start:function(){function t(e){tinymce.ScriptLoader.markDone(tinymce.baseURI.toAbsolute(e))}t("langs/"+c+".js"),t("themes/"+n.theme+"/theme"+d+".js"),t("themes/"+n.theme+"/langs/"+c+".js"),e.each(n.plugins.split(","),function(e,n){n&&(t("plugins/"+n+"/plugin"+d+".js"),t("plugins/"+n+"/langs/"+c+".js"))})},end:function(){}}));var f=document.createElement("script");f.type="text/javascript",f.onload=f.onreadystatechange=function(t){t=t||event,("load"==t.type||/complete|loaded/.test(f.readyState))&&(tinymce.dom.Event.domLoaded=1,r=2,n.script_loaded&&n.script_loaded(),a(),e.each(i,function(e,t){t()}))},f.src=s,document.body.appendChild(f)}return u},e.extend(e.expr[":"],{tinymce:function(e){return!!(e.id&&"tinymce"in window&&tinymce.get(e.id))}})})(jQuery);

static/js/lib/tinymce/langs/readme.md

1This is where language files should be placed.

static/js/lib/tinymce/license.txt

1 GNU LESSER GENERAL PUBLIC LICENSE
2 Version 2.1, February 1999
3
4 Copyright (C) 1991, 1999 Free Software Foundation, Inc.
5 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
6 Everyone is permitted to copy and distribute verbatim copies
7 of this license document, but changing it is not allowed.
8
9[This is the first released version of the Lesser GPL. It also counts
10 as the successor of the GNU Library Public License, version 2, hence
11 the version number 2.1.]
12
13 Preamble
14
15 The licenses for most software are designed to take away your
16freedom to share and change it. By contrast, the GNU General Public
17Licenses are intended to guarantee your freedom to share and change
18free software--to make sure the software is free for all its users.
19
20 This license, the Lesser General Public License, applies to some
21specially designated software packages--typically libraries--of the
22Free Software Foundation and other authors who decide to use it. You
23can use it too, but we suggest you first think carefully about whether
24this license or the ordinary General Public License is the better
25strategy to use in any particular case, based on the explanations below.
26
27 When we speak of free software, we are referring to freedom of use,
28not price. Our General Public Licenses are designed to make sure that
29you have the freedom to distribute copies of free software (and charge
30for this service if you wish); that you receive source code or can get
31it if you want it; that you can change the software and use pieces of
32it in new free programs; and that you are informed that you can do
33these things.
34
35 To protect your rights, we need to make restrictions that forbid
36distributors to deny you these rights or to ask you to surrender these
37rights. These restrictions translate to certain responsibilities for
38you if you distribute copies of the library or if you modify it.
39
40 For example, if you distribute copies of the library, whether gratis
41or for a fee, you must give the recipients all the rights that we gave
42you. You must make sure that they, too, receive or can get the source
43code. If you link other code with the library, you must provide
44complete object files to the recipients, so that they can relink them
45with the library after making changes to the library and recompiling
46it. And you must show them these terms so they know their rights.
47
48 We protect your rights with a two-step method: (1) we copyright the
49library, and (2) we offer you this license, which gives you legal
50permission to copy, distribute and/or modify the library.
51
52 To protect each distributor, we want to make it very clear that
53there is no warranty for the free library. Also, if the library is
54modified by someone else and passed on, the recipients should know
55that what they have is not the original version, so that the original
56author's reputation will not be affected by problems that might be
57introduced by others.
58
59 Finally, software patents pose a constant threat to the existence of
60any free program. We wish to make sure that a company cannot
61effectively restrict the users of a free program by obtaining a
62restrictive license from a patent holder. Therefore, we insist that
63any patent license obtained for a version of the library must be
64consistent with the full freedom of use specified in this license.
65
66 Most GNU software, including some libraries, is covered by the
67ordinary GNU General Public License. This license, the GNU Lesser
68General Public License, applies to certain designated libraries, and
69is quite different from the ordinary General Public License. We use
70this license for certain libraries in order to permit linking those
71libraries into non-free programs.
72
73 When a program is linked with a library, whether statically or using
74a shared library, the combination of the two is legally speaking a
75combined work, a derivative of the original library. The ordinary
76General Public License therefore permits such linking only if the
77entire combination fits its criteria of freedom. The Lesser General
78Public License permits more lax criteria for linking other code with
79the library.
80
81 We call this license the "Lesser" General Public License because it
82does Less to protect the user's freedom than the ordinary General
83Public License. It also provides other free software developers Less
84of an advantage over competing non-free programs. These disadvantages
85are the reason we use the ordinary General Public License for many
86libraries. However, the Lesser license provides advantages in certain
87special circumstances.
88
89 For example, on rare occasions, there may be a special need to
90encourage the widest possible use of a certain library, so that it becomes
91a de-facto standard. To achieve this, non-free programs must be
92allowed to use the library. A more frequent case is that a free
93library does the same job as widely used non-free libraries. In this
94case, there is little to gain by limiting the free library to free
95software only, so we use the Lesser General Public License.
96
97 In other cases, permission to use a particular library in non-free
98programs enables a greater number of people to use a large body of
99free software. For example, permission to use the GNU C Library in
100non-free programs enables many more people to use the whole GNU
101operating system, as well as its variant, the GNU/Linux operating
102system.
103
104 Although the Lesser General Public License is Less protective of the
105users' freedom, it does ensure that the user of a program that is
106linked with the Library has the freedom and the wherewithal to run
107that program using a modified version of the Library.
108
109 The precise terms and conditions for copying, distribution and
110modification follow. Pay close attention to the difference between a
111"work based on the library" and a "work that uses the library". The
112former contains code derived from the library, whereas the latter must
113be combined with the library in order to run.
114
115 GNU LESSER GENERAL PUBLIC LICENSE
116 TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
117
118 0. This License Agreement applies to any software library or other
119program which contains a notice placed by the copyright holder or
120other authorized party saying it may be distributed under the terms of
121this Lesser General Public License (also called "this License").
122Each licensee is addressed as "you".
123
124 A "library" means a collection of software functions and/or data
125prepared so as to be conveniently linked with application programs
126(which use some of those functions and data) to form executables.
127
128 The "Library", below, refers to any such software library or work
129which has been distributed under these terms. A "work based on the
130Library" means either the Library or any derivative work under
131copyright law: that is to say, a work containing the Library or a
132portion of it, either verbatim or with modifications and/or translated
133straightforwardly into another language. (Hereinafter, translation is
134included without limitation in the term "modification".)
135
136 "Source code" for a work means the preferred form of the work for
137making modifications to it. For a library, complete source code means
138all the source code for all modules it contains, plus any associated
139interface definition files, plus the scripts used to control compilation
140and installation of the library.
141
142 Activities other than copying, distribution and modification are not
143covered by this License; they are outside its scope. The act of
144running a program using the Library is not restricted, and output from
145such a program is covered only if its contents constitute a work based
146on the Library (independent of the use of the Library in a tool for
147writing it). Whether that is true depends on what the Library does
148and what the program that uses the Library does.
149
150 1. You may copy and distribute verbatim copies of the Library's
151complete source code as you receive it, in any medium, provided that
152you conspicuously and appropriately publish on each copy an
153appropriate copyright notice and disclaimer of warranty; keep intact
154all the notices that refer to this License and to the absence of any
155warranty; and distribute a copy of this License along with the
156Library.
157
158 You may charge a fee for the physical act of transferring a copy,
159and you may at your option offer warranty protection in exchange for a
160fee.
161
162 2. You may modify your copy or copies of the Library or any portion
163of it, thus forming a work based on the Library, and copy and
164distribute such modifications or work under the terms of Section 1
165above, provided that you also meet all of these conditions:
166
167 a) The modified work must itself be a software library.
168
169 b) You must cause the files modified to carry prominent notices
170 stating that you changed the files and the date of any change.
171
172 c) You must cause the whole of the work to be licensed at no
173 charge to all third parties under the terms of this License.
174
175 d) If a facility in the modified Library refers to a function or a
176 table of data to be supplied by an application program that uses
177 the facility, other than as an argument passed when the facility
178 is invoked, then you must make a good faith effort to ensure that,
179 in the event an application does not supply such function or
180 table, the facility still operates, and performs whatever part of
181 its purpose remains meaningful.
182
183 (For example, a function in a library to compute square roots has
184 a purpose that is entirely well-defined independent of the
185 application. Therefore, Subsection 2d requires that any
186 application-supplied function or table used by this function must
187 be optional: if the application does not supply it, the square
188 root function must still compute square roots.)
189
190These requirements apply to the modified work as a whole. If
191identifiable sections of that work are not derived from the Library,
192and can be reasonably considered independent and separate works in
193themselves, then this License, and its terms, do not apply to those
194sections when you distribute them as separate works. But when you
195distribute the same sections as part of a whole which is a work based
196on the Library, the distribution of the whole must be on the terms of
197this License, whose permissions for other licensees extend to the
198entire whole, and thus to each and every part regardless of who wrote
199it.
200
201Thus, it is not the intent of this section to claim rights or contest
202your rights to work written entirely by you; rather, the intent is to
203exercise the right to control the distribution of derivative or
204collective works based on the Library.
205
206In addition, mere aggregation of another work not based on the Library
207with the Library (or with a work based on the Library) on a volume of
208a storage or distribution medium does not bring the other work under
209the scope of this License.
210
211 3. You may opt to apply the terms of the ordinary GNU General Public
212License instead of this License to a given copy of the Library. To do
213this, you must alter all the notices that refer to this License, so
214that they refer to the ordinary GNU General Public License, version 2,
215instead of to this License. (If a newer version than version 2 of the
216ordinary GNU General Public License has appeared, then you can specify
217that version instead if you wish.) Do not make any other change in
218these notices.
219
220 Once this change is made in a given copy, it is irreversible for
221that copy, so the ordinary GNU General Public License applies to all
222subsequent copies and derivative works made from that copy.
223
224 This option is useful when you wish to copy part of the code of
225the Library into a program that is not a library.
226
227 4. You may copy and distribute the Library (or a portion or
228derivative of it, under Section 2) in object code or executable form
229under the terms of Sections 1 and 2 above provided that you accompany
230it with the complete corresponding machine-readable source code, which
231must be distributed under the terms of Sections 1 and 2 above on a
232medium customarily used for software interchange.
233
234 If distribution of object code is made by offering access to copy
235from a designated place, then offering equivalent access to copy the
236source code from the same place satisfies the requirement to
237distribute the source code, even though third parties are not
238compelled to copy the source along with the object code.
239
240 5. A program that contains no derivative of any portion of the
241Library, but is designed to work with the Library by being compiled or
242linked with it, is called a "work that uses the Library". Such a
243work, in isolation, is not a derivative work of the Library, and
244therefore falls outside the scope of this License.
245
246 However, linking a "work that uses the Library" with the Library
247creates an executable that is a derivative of the Library (because it
248contains portions of the Library), rather than a "work that uses the
249library". The executable is therefore covered by this License.
250Section 6 states terms for distribution of such executables.
251
252 When a "work that uses the Library" uses material from a header file
253that is part of the Library, the object code for the work may be a
254derivative work of the Library even though the source code is not.
255Whether this is true is especially significant if the work can be
256linked without the Library, or if the work is itself a library. The
257threshold for this to be true is not precisely defined by law.
258
259 If such an object file uses only numerical parameters, data
260structure layouts and accessors, and small macros and small inline
261functions (ten lines or less in length), then the use of the object
262file is unrestricted, regardless of whether it is legally a derivative
263work. (Executables containing this object code plus portions of the
264Library will still fall under Section 6.)
265
266 Otherwise, if the work is a derivative of the Library, you may
267distribute the object code for the work under the terms of Section 6.
268Any executables containing that work also fall under Section 6,
269whether or not they are linked directly with the Library itself.
270
271 6. As an exception to the Sections above, you may also combine or
272link a "work that uses the Library" with the Library to produce a
273work containing portions of the Library, and distribute that work
274under terms of your choice, provided that the terms permit
275modification of the work for the customer's own use and reverse
276engineering for debugging such modifications.
277
278 You must give prominent notice with each copy of the work that the
279Library is used in it and that the Library and its use are covered by
280this License. You must supply a copy of this License. If the work
281during execution displays copyright notices, you must include the
282copyright notice for the Library among them, as well as a reference
283directing the user to the copy of this License. Also, you must do one
284of these things:
285
286 a) Accompany the work with the complete corresponding
287 machine-readable source code for the Library including whatever
288 changes were used in the work (which must be distributed under
289 Sections 1 and 2 above); and, if the work is an executable linked
290 with the Library, with the complete machine-readable "work that
291 uses the Library", as object code and/or source code, so that the
292 user can modify the Library and then relink to produce a modified
293 executable containing the modified Library. (It is understood
294 that the user who changes the contents of definitions files in the
295 Library will not necessarily be able to recompile the application
296 to use the modified definitions.)
297
298 b) Use a suitable shared library mechanism for linking with the
299 Library. A suitable mechanism is one that (1) uses at run time a
300 copy of the library already present on the user's computer system,
301 rather than copying library functions into the executable, and (2)
302 will operate properly with a modified version of the library, if
303 the user installs one, as long as the modified version is
304 interface-compatible with the version that the work was made with.
305
306 c) Accompany the work with a written offer, valid for at
307 least three years, to give the same user the materials
308 specified in Subsection 6a, above, for a charge no more
309 than the cost of performing this distribution.
310
311 d) If distribution of the work is made by offering access to copy
312 from a designated place, offer equivalent access to copy the above
313 specified materials from the same place.
314
315 e) Verify that the user has already received a copy of these
316 materials or that you have already sent this user a copy.
317
318 For an executable, the required form of the "work that uses the
319Library" must include any data and utility programs needed for
320reproducing the executable from it. However, as a special exception,
321the materials to be distributed need not include anything that is
322normally distributed (in either source or binary form) with the major
323components (compiler, kernel, and so on) of the operating system on
324which the executable runs, unless that component itself accompanies
325the executable.
326
327 It may happen that this requirement contradicts the license
328restrictions of other proprietary libraries that do not normally
329accompany the operating system. Such a contradiction means you cannot
330use both them and the Library together in an executable that you
331distribute.
332
333 7. You may place library facilities that are a work based on the
334Library side-by-side in a single library together with other library
335facilities not covered by this License, and distribute such a combined
336library, provided that the separate distribution of the work based on
337the Library and of the other library facilities is otherwise
338permitted, and provided that you do these two things:
339
340 a) Accompany the combined library with a copy of the same work
341 based on the Library, uncombined with any other library
342 facilities. This must be distributed under the terms of the
343 Sections above.
344
345 b) Give prominent notice with the combined library of the fact
346 that part of it is a work based on the Library, and explaining
347 where to find the accompanying uncombined form of the same work.
348
349 8. You may not copy, modify, sublicense, link with, or distribute
350the Library except as expressly provided under this License. Any
351attempt otherwise to copy, modify, sublicense, link with, or
352distribute the Library is void, and will automatically terminate your
353rights under this License. However, parties who have received copies,
354or rights, from you under this License will not have their licenses
355terminated so long as such parties remain in full compliance.
356
357 9. You are not required to accept this License, since you have not
358signed it. However, nothing else grants you permission to modify or
359distribute the Library or its derivative works. These actions are
360prohibited by law if you do not accept this License. Therefore, by
361modifying or distributing the Library (or any work based on the
362Library), you indicate your acceptance of this License to do so, and
363all its terms and conditions for copying, distributing or modifying
364the Library or works based on it.
365
366 10. Each time you redistribute the Library (or any work based on the
367Library), the recipient automatically receives a license from the
368original licensor to copy, distribute, link with or modify the Library
369subject to these terms and conditions. You may not impose any further
370restrictions on the recipients' exercise of the rights granted herein.
371You are not responsible for enforcing compliance by third parties with
372this License.
373
374 11. If, as a consequence of a court judgment or allegation of patent
375infringement or for any other reason (not limited to patent issues),
376conditions are imposed on you (whether by court order, agreement or
377otherwise) that contradict the conditions of this License, they do not
378excuse you from the conditions of this License. If you cannot
379distribute so as to satisfy simultaneously your obligations under this
380License and any other pertinent obligations, then as a consequence you
381may not distribute the Library at all. For example, if a patent
382license would not permit royalty-free redistribution of the Library by
383all those who receive copies directly or indirectly through you, then
384the only way you could satisfy both it and this License would be to
385refrain entirely from distribution of the Library.
386
387If any portion of this section is held invalid or unenforceable under any
388particular circumstance, the balance of the section is intended to apply,
389and the section as a whole is intended to apply in other circumstances.
390
391It is not the purpose of this section to induce you to infringe any
392patents or other property right claims or to contest validity of any
393such claims; this section has the sole purpose of protecting the
394integrity of the free software distribution system which is
395implemented by public license practices. Many people have made
396generous contributions to the wide range of software distributed
397through that system in reliance on consistent application of that
398system; it is up to the author/donor to decide if he or she is willing
399to distribute software through any other system and a licensee cannot
400impose that choice.
401
402This section is intended to make thoroughly clear what is believed to
403be a consequence of the rest of this License.
404
405 12. If the distribution and/or use of the Library is restricted in
406certain countries either by patents or by copyrighted interfaces, the
407original copyright holder who places the Library under this License may add
408an explicit geographical distribution limitation excluding those countries,
409so that distribution is permitted only in or among countries not thus
410excluded. In such case, this License incorporates the limitation as if
411written in the body of this License.
412
413 13. The Free Software Foundation may publish revised and/or new
414versions of the Lesser General Public License from time to time.
415Such new versions will be similar in spirit to the present version,
416but may differ in detail to address new problems or concerns.
417
418Each version is given a distinguishing version number. If the Library
419specifies a version number of this License which applies to it and
420"any later version", you have the option of following the terms and
421conditions either of that version or of any later version published by
422the Free Software Foundation. If the Library does not specify a
423license version number, you may choose any version ever published by
424the Free Software Foundation.
425
426 14. If you wish to incorporate parts of the Library into other free
427programs whose distribution conditions are incompatible with these,
428write to the author to ask for permission. For software which is
429copyrighted by the Free Software Foundation, write to the Free
430Software Foundation; we sometimes make exceptions for this. Our
431decision will be guided by the two goals of preserving the free status
432of all derivatives of our free software and of promoting the sharing
433and reuse of software generally.
434
435 NO WARRANTY
436
437 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
438WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
439EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
440OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
441KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
442IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
443PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
444LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
445THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
446
447 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
448WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
449AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
450FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
451CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
452LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
453RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
454FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
455SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
456DAMAGES.
457
458 END OF TERMS AND CONDITIONS
459
460 How to Apply These Terms to Your New Libraries
461
462 If you develop a new library, and you want it to be of the greatest
463possible use to the public, we recommend making it free software that
464everyone can redistribute and change. You can do so by permitting
465redistribution under these terms (or, alternatively, under the terms of the
466ordinary General Public License).
467
468 To apply these terms, attach the following notices to the library. It is
469safest to attach them to the start of each source file to most effectively
470convey the exclusion of warranty; and each file should have at least the
471"copyright" line and a pointer to where the full notice is found.
472
473 <one line to give the library's name and a brief idea of what it does.>
474 Copyright (C) <year> <name of author>
475
476 This library is free software; you can redistribute it and/or
477 modify it under the terms of the GNU Lesser General Public
478 License as published by the Free Software Foundation; either
479 version 2.1 of the License, or (at your option) any later version.
480
481 This library is distributed in the hope that it will be useful,
482 but WITHOUT ANY WARRANTY; without even the implied warranty of
483 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
484 Lesser General Public License for more details.
485
486 You should have received a copy of the GNU Lesser General Public
487 License along with this library; if not, write to the Free Software
488 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
489
490Also add information on how to contact you by electronic and paper mail.
491
492You should also get your employer (if you work as a programmer) or your
493school, if any, to sign a "copyright disclaimer" for the library, if
494necessary. Here is a sample; alter the names:
495
496 Yoyodyne, Inc., hereby disclaims all copyright interest in the
497 library `Frob' (a library for tweaking knobs) written by James Random Hacker.
498
499 <signature of Ty Coon>, 1 April 1990
500 Ty Coon, President of Vice
501
502That's all there is to it!

static/js/lib/tinymce/plugins/advlist/plugin.min.js

1tinymce.PluginManager.add("advlist",function(e){function t(e,t){var n=[];return tinymce.each(t.split(/[ ,]/),function(e){n.push({text:e.replace(/\-/g," ").replace(/\b\w/g,function(e){return e.toUpperCase()}),data:"default"==e?"":e})}),n}function n(t,n){var r,i=e.dom,o=e.selection;r=i.getParent(o.getNode(),"ol,ul"),r&&r.nodeName==t&&n!==!1||e.execCommand("UL"==t?"InsertUnorderedList":"InsertOrderedList"),n=n===!1?a[t]:n,a[t]=n,r=i.getParent(o.getNode(),"ol,ul"),r&&(i.setStyle(r,"listStyleType",n),r.removeAttribute("data-mce-style")),e.focus()}function r(t){var n=e.dom.getStyle(e.dom.getParent(e.selection.getNode(),"ol,ul"),"listStyleType")||"";t.control.items().each(function(e){e.active(e.settings.data===n)})}var i,o,a={};i=t("OL",e.getParam("advlist_number_styles","default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman")),o=t("UL",e.getParam("advlist_bullet_styles","default,circle,disc,square")),e.addButton("numlist",{type:"splitbutton",tooltip:"Numbered list",menu:i,onshow:r,onselect:function(e){n("OL",e.control.settings.data)},onclick:function(){n("OL",!1)}}),e.addButton("bullist",{type:"splitbutton",tooltip:"Bullet list",menu:o,onshow:r,onselect:function(e){n("UL",e.control.settings.data)},onclick:function(){n("UL",!1)}})});

static/js/lib/tinymce/plugins/anchor/plugin.min.js

1tinymce.PluginManager.add("anchor",function(e){function t(){e.windowManager.open({title:"Anchor",body:{type:"textbox",name:"name",size:40,label:"Name",value:e.selection.getNode().id},onsubmit:function(t){e.execCommand("mceInsertContent",!1,e.dom.createHTML("a",{id:t.data.name}))}})}e.addButton("anchor",{icon:"anchor",tooltip:"Anchor",onclick:t,stateSelector:"a:not([href])"}),e.addMenuItem("anchor",{icon:"anchor",text:"Anchor",context:"insert",onclick:t})});

static/js/lib/tinymce/plugins/autolink/plugin.min.js

1tinymce.PluginManager.add("autolink",function(e){function t(e){i(e,-1,"(",!0)}function n(e){i(e,0,"",!0)}function r(e){i(e,-1,"",!1)}function i(e,t,n){var r,i,o,a,s,l,c,u,d;if(r=e.selection.getRng(!0).cloneRange(),5>r.startOffset){if(u=r.endContainer.previousSibling,!u){if(!r.endContainer.firstChild||!r.endContainer.firstChild.nextSibling)return;u=r.endContainer.firstChild.nextSibling}if(d=u.length,r.setStart(u,d),r.setEnd(u,d),5>r.endOffset)return;i=r.endOffset,a=u}else{if(a=r.endContainer,3!=a.nodeType&&a.firstChild){for(;3!=a.nodeType&&a.firstChild;)a=a.firstChild;3==a.nodeType&&(r.setStart(a,0),r.setEnd(a,a.nodeValue.length))}i=1==r.endOffset?2:r.endOffset-1-t}o=i;do r.setStart(a,i>=2?i-2:0),r.setEnd(a,i>=1?i-1:0),i-=1;while(" "!=""+r&&""!=""+r&&160!=(""+r).charCodeAt(0)&&i-2>=0&&""+r!=n);if(""+r==n||160==(""+r).charCodeAt(0)?(r.setStart(a,i),r.setEnd(a,o),i+=1):0===r.startOffset?(r.setStart(a,0),r.setEnd(a,o)):(r.setStart(a,i),r.setEnd(a,o)),l=""+r,"."==l.charAt(l.length-1)&&r.setEnd(a,o-1),l=""+r,c=l.match(/^(https?:\/\/|ssh:\/\/|ftp:\/\/|file:\/|www\.|(?:mailto:)?[A-Z0-9._%+\-]+@)(.+)$/i),c&&("www."==c[1]?c[1]="http://www.":/@$/.test(c[1])&&!/^mailto:/.test(c[1])&&(c[1]="mailto:"+c[1]),s=e.selection.getBookmark(),e.selection.setRng(r),e.execCommand("createlink",!1,c[1]+c[2]),e.selection.moveToBookmark(s),e.nodeChanged(),tinymce.Env.webkit)){e.selection.collapse(!1);var f=Math.min(a.length,o+1);r.setStart(a,f),r.setEnd(a,f),e.selection.setRng(r)}}e.on("keydown",function(t){return 13==t.keyCode?r(e):void 0}),tinymce.Env.ie||(e.on("keypress",function(n){return 41==n.which?t(e):void 0}),e.on("keyup",function(t){return 32==t.keyCode?n(e):void 0}))});

static/js/lib/tinymce/plugins/autoresize/plugin.min.js

1tinymce.PluginManager.add("autoresize",function(e){function t(i){var o,a,s=e.getDoc(),l=s.body,c=s.documentElement,u=tinymce.DOM,d=n.autoresize_min_height;"setcontent"==i.type&&i.initial||e.plugins.fullscreen&&e.plugins.fullscreen.isFullscreen()||(a=tinymce.Env.ie?l.scrollHeight:tinymce.Env.webkit&&0===l.clientHeight?0:l.offsetHeight,a>n.autoresize_min_height&&(d=a),n.autoresize_max_height&&a>n.autoresize_max_height?(d=n.autoresize_max_height,l.style.overflowY="auto",c.style.overflowY="auto"):(l.style.overflowY="hidden",c.style.overflowY="hidden",l.scrollTop=0),d!==r&&(o=d-r,u.setStyle(u.get(e.id+"_ifr"),"height",d+"px"),r=d,tinymce.isWebKit&&0>o&&t(i)))}var n=e.settings,r=0;n.autoresize_min_height=parseInt(e.getParam("autoresize_min_height",e.getElement().offsetHeight),10),n.autoresize_max_height=parseInt(e.getParam("autoresize_max_height",0),10),e.on("init",function(){e.dom.setStyle(e.getBody(),"paddingBottom",e.getParam("autoresize_bottom_margin",50)+"px")}),e.on("change setcontent paste keyup",t),e.getParam("autoresize_on_init",!0)&&e.on("load",t),e.addCommand("mceAutoResize",t)});

static/js/lib/tinymce/plugins/autosave/plugin.min.js

1tinymce.PluginManager.add("autosave",function(e){function t(e,t){var n={s:1e3,m:6e4};return e=/^(\d+)([ms]?)$/.exec(""+(e||t)),(e[2]?n[e[2]]:1)*parseInt(e,10)}function n(){var e=parseInt(f.getItem(p+"autosave.time"),10)||0;return(new Date).getTime()-e>d.autosave_retention?(r(),!1):!0}function r(){f.removeItem(p+"autosave.draft"),f.removeItem(p+"autosave.time")}function i(){u&&e.isDirty()&&(f.setItem(p+"autosave.draft",e.getContent({format:"raw",no_events:!0})),f.setItem(p+"autosave.time",(new Date).getTime()),e.fire("StoreDraft"))}function o(){n()&&(e.setContent(f.getItem(p+"autosave.draft"),{format:"raw"}),r(),e.fire("RestoreDraft"))}function a(){u||(setInterval(function(){e.removed||i()},d.autosave_interval),u=!0)}function s(){var t=this;t.disabled(!n()),e.on("StoreDraft RestoreDraft",function(){t.disabled(!n())}),a()}function l(){e.undoManager.beforeChange(),o(),e.undoManager.add()}function c(){var e;return tinymce.each(tinymce.editors,function(t){t.plugins.autosave&&t.plugins.autosave.storeDraft(),!e&&t.isDirty()&&t.getParam("autosave_ask_before_unload",!0)&&(e=t.translate("You have unsaved changes are you sure you want to navigate away?"))}),e}var u,d=e.settings,f=tinymce.util.LocalStorage,p=e.id;d.autosave_interval=t(d.autosave_interval,"30s"),d.autosave_retention=t(d.autosave_retention,"20m"),e.addButton("restoredraft",{title:"Restore last draft",onclick:l,onPostRender:s}),e.addMenuItem("restoredraft",{text:"Restore last draft",onclick:l,onPostRender:s,context:"file"}),this.storeDraft=i,window.onbeforeunload=c});

static/js/lib/tinymce/plugins/bbcode/plugin.min.js

1(function(){tinymce.create("tinymce.plugins.BBCodePlugin",{init:function(e){var t=this,n=e.getParam("bbcode_dialect","punbb").toLowerCase();e.on("beforeSetContent",function(e){e.content=t["_"+n+"_bbcode2html"](e.content)}),e.on("postProcess",function(e){e.set&&(e.content=t["_"+n+"_bbcode2html"](e.content)),e.get&&(e.content=t["_"+n+"_html2bbcode"](e.content))})},getInfo:function(){return{longname:"BBCode Plugin",author:"Moxiecode Systems AB",authorurl:"http://www.tinymce.com",infourl:"http://www.tinymce.com/wiki.php/Plugin:bbcode"}},_punbb_html2bbcode:function(e){function t(t,n){e=e.replace(t,n)}return e=tinymce.trim(e),t(/<a.*?href=\"(.*?)\".*?>(.*?)<\/a>/gi,"[url=$1]$2[/url]"),t(/<font.*?color=\"(.*?)\".*?class=\"codeStyle\".*?>(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]"),t(/<font.*?color=\"(.*?)\".*?class=\"quoteStyle\".*?>(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]"),t(/<font.*?class=\"codeStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]"),t(/<font.*?class=\"quoteStyle\".*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]"),t(/<span style=\"color: ?(.*?);\">(.*?)<\/span>/gi,"[color=$1]$2[/color]"),t(/<font.*?color=\"(.*?)\".*?>(.*?)<\/font>/gi,"[color=$1]$2[/color]"),t(/<span style=\"font-size:(.*?);\">(.*?)<\/span>/gi,"[size=$1]$2[/size]"),t(/<font>(.*?)<\/font>/gi,"$1"),t(/<img.*?src=\"(.*?)\".*?\/>/gi,"[img]$1[/img]"),t(/<span class=\"codeStyle\">(.*?)<\/span>/gi,"[code]$1[/code]"),t(/<span class=\"quoteStyle\">(.*?)<\/span>/gi,"[quote]$1[/quote]"),t(/<strong class=\"codeStyle\">(.*?)<\/strong>/gi,"[code][b]$1[/b][/code]"),t(/<strong class=\"quoteStyle\">(.*?)<\/strong>/gi,"[quote][b]$1[/b][/quote]"),t(/<em class=\"codeStyle\">(.*?)<\/em>/gi,"[code][i]$1[/i][/code]"),t(/<em class=\"quoteStyle\">(.*?)<\/em>/gi,"[quote][i]$1[/i][/quote]"),t(/<u class=\"codeStyle\">(.*?)<\/u>/gi,"[code][u]$1[/u][/code]"),t(/<u class=\"quoteStyle\">(.*?)<\/u>/gi,"[quote][u]$1[/u][/quote]"),t(/<\/(strong|b)>/gi,"[/b]"),t(/<(strong|b)>/gi,"[b]"),t(/<\/(em|i)>/gi,"[/i]"),t(/<(em|i)>/gi,"[i]"),t(/<\/u>/gi,"[/u]"),t(/<span style=\"text-decoration: ?underline;\">(.*?)<\/span>/gi,"[u]$1[/u]"),t(/<u>/gi,"[u]"),t(/<blockquote[^>]*>/gi,"[quote]"),t(/<\/blockquote>/gi,"[/quote]"),t(/<br \/>/gi,"\n"),t(/<br\/>/gi,"\n"),t(/<br>/gi,"\n"),t(/<p>/gi,""),t(/<\/p>/gi,"\n"),t(/&nbsp;|\u00a0/gi," "),t(/&quot;/gi,'"'),t(/&lt;/gi,"<"),t(/&gt;/gi,">"),t(/&amp;/gi,"&"),e},_punbb_bbcode2html:function(e){function t(t,n){e=e.replace(t,n)}return e=tinymce.trim(e),t(/\n/gi,"<br />"),t(/\[b\]/gi,"<strong>"),t(/\[\/b\]/gi,"</strong>"),t(/\[i\]/gi,"<em>"),t(/\[\/i\]/gi,"</em>"),t(/\[u\]/gi,"<u>"),t(/\[\/u\]/gi,"</u>"),t(/\[url=([^\]]+)\](.*?)\[\/url\]/gi,'<a href="$1">$2</a>'),t(/\[url\](.*?)\[\/url\]/gi,'<a href="$1">$1</a>'),t(/\[img\](.*?)\[\/img\]/gi,'<img src="$1" />'),t(/\[color=(.*?)\](.*?)\[\/color\]/gi,'<font color="$1">$2</font>'),t(/\[code\](.*?)\[\/code\]/gi,'<span class="codeStyle">$1</span>&nbsp;'),t(/\[quote.*?\](.*?)\[\/quote\]/gi,'<span class="quoteStyle">$1</span>&nbsp;'),e}}),tinymce.PluginManager.add("bbcode",tinymce.plugins.BBCodePlugin)})();

static/js/lib/tinymce/plugins/charmap/plugin.min.js

1tinymce.PluginManager.add("charmap",function(e){function t(){function t(e){for(;e;){if("TD"==e.nodeName)return e;e=e.parentNode}}var r,i,o,a;r='<table role="presentation" cellspacing="0" class="mce-charmap"><tbody>';var s=25;for(o=0;10>o;o++){for(r+="<tr>",i=0;s>i;i++){var l=n[o*s+i],c="g"+(o*s+i);r+='<td title="'+l[1]+'"><div id="'+c+'" tabIndex="-1">'+(l?String.fromCharCode(parseInt(l[0],10)):"&nbsp;")+"</div></td>"}r+="</tr>"}r+="</tbody></table>";var u={type:"container",html:r,onclick:function(t){var n=t.target;"DIV"==n.nodeName&&e.execCommand("mceInsertContent",!1,n.firstChild.nodeValue)},onmouseover:function(e){var n=t(e.target);n&&a.find("#preview").text(n.firstChild.firstChild.data)}};a=e.windowManager.open({title:"Special characters",spacing:10,padding:10,items:[u,{type:"label",name:"preview",text:" ",style:"font-size: 40px; text-align: center",border:1,minWidth:100,minHeight:80}],buttons:[{text:"Close",onclick:function(){a.close()}}]})}var n=[["160","no-break space"],["38","ampersand"],["34","quotation mark"],["162","cent sign"],["8364","euro sign"],["163","pound sign"],["165","yen sign"],["169","copyright sign"],["174","registered sign"],["8482","trade mark sign"],["8240","per mille sign"],["181","micro sign"],["183","middle dot"],["8226","bullet"],["8230","three dot leader"],["8242","minutes / feet"],["8243","seconds / inches"],["167","section sign"],["182","paragraph sign"],["223","sharp s / ess-zed"],["8249","single left-pointing angle quotation mark"],["8250","single right-pointing angle quotation mark"],["171","left pointing guillemet"],["187","right pointing guillemet"],["8216","left single quotation mark"],["8217","right single quotation mark"],["8220","left double quotation mark"],["8221","right double quotation mark"],["8218","single low-9 quotation mark"],["8222","double low-9 quotation mark"],["60","less-than sign"],["62","greater-than sign"],["8804","less-than or equal to"],["8805","greater-than or equal to"],["8211","en dash"],["8212","em dash"],["175","macron"],["8254","overline"],["164","currency sign"],["166","broken bar"],["168","diaeresis"],["161","inverted exclamation mark"],["191","turned question mark"],["710","circumflex accent"],["732","small tilde"],["176","degree sign"],["8722","minus sign"],["177","plus-minus sign"],["247","division sign"],["8260","fraction slash"],["215","multiplication sign"],["185","superscript one"],["178","superscript two"],["179","superscript three"],["188","fraction one quarter"],["189","fraction one half"],["190","fraction three quarters"],["402","function / florin"],["8747","integral"],["8721","n-ary sumation"],["8734","infinity"],["8730","square root"],["8764","similar to"],["8773","approximately equal to"],["8776","almost equal to"],["8800","not equal to"],["8801","identical to"],["8712","element of"],["8713","not an element of"],["8715","contains as member"],["8719","n-ary product"],["8743","logical and"],["8744","logical or"],["172","not sign"],["8745","intersection"],["8746","union"],["8706","partial differential"],["8704","for all"],["8707","there exists"],["8709","diameter"],["8711","backward difference"],["8727","asterisk operator"],["8733","proportional to"],["8736","angle"],["180","acute accent"],["184","cedilla"],["170","feminine ordinal indicator"],["186","masculine ordinal indicator"],["8224","dagger"],["8225","double dagger"],["192","A - grave"],["193","A - acute"],["194","A - circumflex"],["195","A - tilde"],["196","A - diaeresis"],["197","A - ring above"],["198","ligature AE"],["199","C - cedilla"],["200","E - grave"],["201","E - acute"],["202","E - circumflex"],["203","E - diaeresis"],["204","I - grave"],["205","I - acute"],["206","I - circumflex"],["207","I - diaeresis"],["208","ETH"],["209","N - tilde"],["210","O - grave"],["211","O - acute"],["212","O - circumflex"],["213","O - tilde"],["214","O - diaeresis"],["216","O - slash"],["338","ligature OE"],["352","S - caron"],["217","U - grave"],["218","U - acute"],["219","U - circumflex"],["220","U - diaeresis"],["221","Y - acute"],["376","Y - diaeresis"],["222","THORN"],["224","a - grave"],["225","a - acute"],["226","a - circumflex"],["227","a - tilde"],["228","a - diaeresis"],["229","a - ring above"],["230","ligature ae"],["231","c - cedilla"],["232","e - grave"],["233","e - acute"],["234","e - circumflex"],["235","e - diaeresis"],["236","i - grave"],["237","i - acute"],["238","i - circumflex"],["239","i - diaeresis"],["240","eth"],["241","n - tilde"],["242","o - grave"],["243","o - acute"],["244","o - circumflex"],["245","o - tilde"],["246","o - diaeresis"],["248","o slash"],["339","ligature oe"],["353","s - caron"],["249","u - grave"],["250","u - acute"],["251","u - circumflex"],["252","u - diaeresis"],["253","y - acute"],["254","thorn"],["255","y - diaeresis"],["913","Alpha"],["914","Beta"],["915","Gamma"],["916","Delta"],["917","Epsilon"],["918","Zeta"],["919","Eta"],["920","Theta"],["921","Iota"],["922","Kappa"],["923","Lambda"],["924","Mu"],["925","Nu"],["926","Xi"],["927","Omicron"],["928","Pi"],["929","Rho"],["931","Sigma"],["932","Tau"],["933","Upsilon"],["934","Phi"],["935","Chi"],["936","Psi"],["937","Omega"],["945","alpha"],["946","beta"],["947","gamma"],["948","delta"],["949","epsilon"],["950","zeta"],["951","eta"],["952","theta"],["953","iota"],["954","kappa"],["955","lambda"],["956","mu"],["957","nu"],["958","xi"],["959","omicron"],["960","pi"],["961","rho"],["962","final sigma"],["963","sigma"],["964","tau"],["965","upsilon"],["966","phi"],["967","chi"],["968","psi"],["969","omega"],["8501","alef symbol"],["982","pi symbol"],["8476","real part symbol"],["978","upsilon - hook symbol"],["8472","Weierstrass p"],["8465","imaginary part"],["8592","leftwards arrow"],["8593","upwards arrow"],["8594","rightwards arrow"],["8595","downwards arrow"],["8596","left right arrow"],["8629","carriage return"],["8656","leftwards double arrow"],["8657","upwards double arrow"],["8658","rightwards double arrow"],["8659","downwards double arrow"],["8660","left right double arrow"],["8756","therefore"],["8834","subset of"],["8835","superset of"],["8836","not a subset of"],["8838","subset of or equal to"],["8839","superset of or equal to"],["8853","circled plus"],["8855","circled times"],["8869","perpendicular"],["8901","dot operator"],["8968","left ceiling"],["8969","right ceiling"],["8970","left floor"],["8971","right floor"],["9001","left-pointing angle bracket"],["9002","right-pointing angle bracket"],["9674","lozenge"],["9824","black spade suit"],["9827","black club suit"],["9829","black heart suit"],["9830","black diamond suit"],["8194","en space"],["8195","em space"],["8201","thin space"],["8204","zero width non-joiner"],["8205","zero width joiner"],["8206","left-to-right mark"],["8207","right-to-left mark"],["173","soft hyphen"]];e.addButton("charmap",{icon:"charmap",tooltip:"Insert special character",onclick:t}),e.addMenuItem("charmap",{icon:"charmap",text:"Special character",onclick:t,context:"insert"})});

static/js/lib/tinymce/plugins/code/plugin.min.js

1tinymce.PluginManager.add("code",function(e){function t(){e.windowManager.open({title:"Source code",body:{type:"textbox",name:"code",multiline:!0,minWidth:600,minHeight:500,value:e.getContent(),spellcheck:!1},onSubmit:function(t){e.setContent(t.data.code)}})}e.addButton("code",{icon:"code",tooltip:"Source code",onclick:t}),e.addMenuItem("code",{icon:"code",text:"Source code",context:"tools",onclick:t})});

static/js/lib/tinymce/plugins/compat3x/editable_selects.js

1/**
2 * editable_selects.js
3 *
4 * Copyright, Moxiecode Systems AB
5 * Released under LGPL License.
6 *
7 * License: http://www.tinymce.com/license
8 * Contributing: http://www.tinymce.com/contributing
9 */
10
11var TinyMCE_EditableSelects = {
12 editSelectElm : null,
13
14 init : function() {
15 var nl = document.getElementsByTagName("select"), i, d = document, o;
16
17 for (i=0; i<nl.length; i++) {
18 if (nl[i].className.indexOf('mceEditableSelect') != -1) {
19 o = new Option(tinyMCEPopup.editor.translate('value'), '__mce_add_custom__');
20
21 o.className = 'mceAddSelectValue';
22
23 nl[i].options[nl[i].options.length] = o;
24 nl[i].onchange = TinyMCE_EditableSelects.onChangeEditableSelect;
25 }
26 }
27 },
28
29 onChangeEditableSelect : function(e) {
30 var d = document, ne, se = window.event ? window.event.srcElement : e.target;
31
32 if (se.options[se.selectedIndex].value == '__mce_add_custom__') {
33 ne = d.createElement("input");
34 ne.id = se.id + "_custom";
35 ne.name = se.name + "_custom";
36 ne.type = "text";
37
38 ne.style.width = se.offsetWidth + 'px';
39 se.parentNode.insertBefore(ne, se);
40 se.style.display = 'none';
41 ne.focus();
42 ne.onblur = TinyMCE_EditableSelects.onBlurEditableSelectInput;
43 ne.onkeydown = TinyMCE_EditableSelects.onKeyDown;
44 TinyMCE_EditableSelects.editSelectElm = se;
45 }
46 },
47
48 onBlurEditableSelectInput : function() {
49 var se = TinyMCE_EditableSelects.editSelectElm;
50
51 if (se) {
52 if (se.previousSibling.value != '') {
53 addSelectValue(document.forms[0], se.id, se.previousSibling.value, se.previousSibling.value);
54 selectByValue(document.forms[0], se.id, se.previousSibling.value);
55 } else
56 selectByValue(document.forms[0], se.id, '');
57
58 se.style.display = 'inline';
59 se.parentNode.removeChild(se.previousSibling);
60 TinyMCE_EditableSelects.editSelectElm = null;
61 }
62 },
63
64 onKeyDown : function(e) {
65 e = e || window.event;
66
67 if (e.keyCode == 13)
68 TinyMCE_EditableSelects.onBlurEditableSelectInput();
69 }
70};

static/js/lib/tinymce/plugins/compat3x/form_utils.js

1/**
2 * form_utils.js
3 *
4 * Copyright, Moxiecode Systems AB
5 * Released under LGPL License.
6 *
7 * License: http://www.tinymce.com/license
8 * Contributing: http://www.tinymce.com/contributing
9 */
10
11var themeBaseURL = tinyMCEPopup.editor.baseURI.toAbsolute('themes/' + tinyMCEPopup.getParam("theme"));
12
13function getColorPickerHTML(id, target_form_element) {
14 var h = "", dom = tinyMCEPopup.dom;
15
16 if (label = dom.select('label[for=' + target_form_element + ']')[0]) {
17 label.id = label.id || dom.uniqueId();
18 }
19
20 h += '<a role="button" aria-labelledby="' + id + '_label" id="' + id + '_link" href="javascript:;" onclick="tinyMCEPopup.pickColor(event,\'' + target_form_element +'\');" onmousedown="return false;" class="pickcolor">';
21 h += '<span id="' + id + '" title="' + tinyMCEPopup.getLang('browse') + '">&nbsp;<span id="' + id + '_label" class="mceVoiceLabel mceIconOnly" style="display:none;">' + tinyMCEPopup.getLang('browse') + '</span></span></a>';
22
23 return h;
24}
25
26function updateColor(img_id, form_element_id) {
27 document.getElementById(img_id).style.backgroundColor = document.forms[0].elements[form_element_id].value;
28}
29
30function setBrowserDisabled(id, state) {
31 var img = document.getElementById(id);
32 var lnk = document.getElementById(id + "_link");
33
34 if (lnk) {
35 if (state) {
36 lnk.setAttribute("realhref", lnk.getAttribute("href"));
37 lnk.removeAttribute("href");
38 tinyMCEPopup.dom.addClass(img, 'disabled');
39 } else {
40 if (lnk.getAttribute("realhref"))
41 lnk.setAttribute("href", lnk.getAttribute("realhref"));
42
43 tinyMCEPopup.dom.removeClass(img, 'disabled');
44 }
45 }
46}
47
48function getBrowserHTML(id, target_form_element, type, prefix) {
49 var option = prefix + "_" + type + "_browser_callback", cb, html;
50
51 cb = tinyMCEPopup.getParam(option, tinyMCEPopup.getParam("file_browser_callback"));
52
53 if (!cb)
54 return "";
55
56 html = "";
57 html += '<a id="' + id + '_link" href="javascript:openBrowser(\'' + id + '\',\'' + target_form_element + '\', \'' + type + '\',\'' + option + '\');" onmousedown="return false;" class="browse">';
58 html += '<span id="' + id + '" title="' + tinyMCEPopup.getLang('browse') + '">&nbsp;</span></a>';
59
60 return html;
61}
62
63function openBrowser(img_id, target_form_element, type, option) {
64 var img = document.getElementById(img_id);
65
66 if (img.className != "mceButtonDisabled")
67 tinyMCEPopup.openBrowser(target_form_element, type, option);
68}
69
70function selectByValue(form_obj, field_name, value, add_custom, ignore_case) {
71 if (!form_obj || !form_obj.elements[field_name])
72 return;
73
74 if (!value)
75 value = "";
76
77 var sel = form_obj.elements[field_name];
78
79 var found = false;
80 for (var i=0; i<sel.options.length; i++) {
81 var option = sel.options[i];
82
83 if (option.value == value || (ignore_case && option.value.toLowerCase() == value.toLowerCase())) {
84 option.selected = true;
85 found = true;
86 } else
87 option.selected = false;
88 }
89
90 if (!found && add_custom && value != '') {
91 var option = new Option(value, value);
92 option.selected = true;
93 sel.options[sel.options.length] = option;
94 sel.selectedIndex = sel.options.length - 1;
95 }
96
97 return found;
98}
99
100function getSelectValue(form_obj, field_name) {
101 var elm = form_obj.elements[field_name];
102
103 if (elm == null || elm.options == null || elm.selectedIndex === -1)
104 return "";
105
106 return elm.options[elm.selectedIndex].value;
107}
108
109function addSelectValue(form_obj, field_name, name, value) {
110 var s = form_obj.elements[field_name];
111 var o = new Option(name, value);
112 s.options[s.options.length] = o;
113}
114
115function addClassesToList(list_id, specific_option) {
116 // Setup class droplist
117 var styleSelectElm = document.getElementById(list_id);
118 var styles = tinyMCEPopup.getParam('theme_advanced_styles', false);
119 styles = tinyMCEPopup.getParam(specific_option, styles);
120
121 if (styles) {
122 var stylesAr = styles.split(';');
123
124 for (var i=0; i<stylesAr.length; i++) {
125 if (stylesAr != "") {
126 var key, value;
127
128 key = stylesAr[i].split('=')[0];
129 value = stylesAr[i].split('=')[1];
130
131 styleSelectElm.options[styleSelectElm.length] = new Option(key, value);
132 }
133 }
134 } else {
135 tinymce.each(tinyMCEPopup.editor.dom.getClasses(), function(o) {
136 styleSelectElm.options[styleSelectElm.length] = new Option(o.title || o['class'], o['class']);
137 });
138 }
139}
140
141function isVisible(element_id) {
142 var elm = document.getElementById(element_id);
143
144 return elm && elm.style.display != "none";
145}
146
147function convertRGBToHex(col) {
148 var re = new RegExp("rgb\\s*\\(\\s*([0-9]+).*,\\s*([0-9]+).*,\\s*([0-9]+).*\\)", "gi");
149
150 var rgb = col.replace(re, "$1,$2,$3").split(',');
151 if (rgb.length == 3) {
152 r = parseInt(rgb[0]).toString(16);
153 g = parseInt(rgb[1]).toString(16);
154 b = parseInt(rgb[2]).toString(16);
155
156 r = r.length == 1 ? '0' + r : r;
157 g = g.length == 1 ? '0' + g : g;
158 b = b.length == 1 ? '0' + b : b;
159
160 return "#" + r + g + b;
161 }
162
163 return col;
164}
165
166function convertHexToRGB(col) {
167 if (col.indexOf('#') != -1) {
168 col = col.replace(new RegExp('[^0-9A-F]', 'gi'), '');
169
170 r = parseInt(col.substring(0, 2), 16);
171 g = parseInt(col.substring(2, 4), 16);
172 b = parseInt(col.substring(4, 6), 16);
173
174 return "rgb(" + r + "," + g + "," + b + ")";
175 }
176
177 return col;
178}
179
180function trimSize(size) {
181 return size.replace(/([0-9\.]+)(px|%|in|cm|mm|em|ex|pt|pc)/i, '$1$2');
182}
183
184function getCSSSize(size) {
185 size = trimSize(size);
186
187 if (size == "")
188 return "";
189
190 // Add px
191 if (/^[0-9]+$/.test(size))
192 size += 'px';
193 // Sanity check, IE doesn't like broken values
194 else if (!(/^[0-9\.]+(px|%|in|cm|mm|em|ex|pt|pc)$/i.test(size)))
195 return "";
196
197 return size;
198}
199
200function getStyle(elm, attrib, style) {
201 var val = tinyMCEPopup.dom.getAttrib(elm, attrib);
202
203 if (val != '')
204 return '' + val;
205
206 if (typeof(style) == 'undefined')
207 style = attrib;
208
209 return tinyMCEPopup.dom.getStyle(elm, style);
210}

static/js/lib/tinymce/plugins/compat3x/mctabs.js

1/**
2 * mctabs.js
3 *
4 * Copyright, Moxiecode Systems AB
5 * Released under LGPL License.
6 *
7 * License: http://www.tinymce.com/license
8 * Contributing: http://www.tinymce.com/contributing
9 */
10
11function MCTabs() {
12 this.settings = [];
13 this.onChange = tinyMCEPopup.editor.windowManager.createInstance('tinymce.util.Dispatcher');
14};
15
16MCTabs.prototype.init = function(settings) {
17 this.settings = settings;
18};
19
20MCTabs.prototype.getParam = function(name, default_value) {
21 var value = null;
22
23 value = (typeof(this.settings[name]) == "undefined") ? default_value : this.settings[name];
24
25 // Fix bool values
26 if (value == "true" || value == "false")
27 return (value == "true");
28
29 return value;
30};
31
32MCTabs.prototype.showTab =function(tab){
33 tab.className = 'current';
34 tab.setAttribute("aria-selected", true);
35 tab.setAttribute("aria-expanded", true);
36 tab.tabIndex = 0;
37};
38
39MCTabs.prototype.hideTab =function(tab){
40 var t=this;
41
42 tab.className = '';
43 tab.setAttribute("aria-selected", false);
44 tab.setAttribute("aria-expanded", false);
45 tab.tabIndex = -1;
46};
47
48MCTabs.prototype.showPanel = function(panel) {
49 panel.className = 'current';
50 panel.setAttribute("aria-hidden", false);
51};
52
53MCTabs.prototype.hidePanel = function(panel) {
54 panel.className = 'panel';
55 panel.setAttribute("aria-hidden", true);
56};
57
58MCTabs.prototype.getPanelForTab = function(tabElm) {
59 return tinyMCEPopup.dom.getAttrib(tabElm, "aria-controls");
60};
61
62MCTabs.prototype.displayTab = function(tab_id, panel_id, avoid_focus) {
63 var panelElm, panelContainerElm, tabElm, tabContainerElm, selectionClass, nodes, i, t = this;
64
65 tabElm = document.getElementById(tab_id);
66
67 if (panel_id === undefined) {
68 panel_id = t.getPanelForTab(tabElm);
69 }
70
71 panelElm= document.getElementById(panel_id);
72 panelContainerElm = panelElm ? panelElm.parentNode : null;
73 tabContainerElm = tabElm ? tabElm.parentNode : null;
74 selectionClass = t.getParam('selection_class', 'current');
75
76 if (tabElm && tabContainerElm) {
77 nodes = tabContainerElm.childNodes;
78
79 // Hide all other tabs
80 for (i = 0; i < nodes.length; i++) {
81 if (nodes[i].nodeName == "LI") {
82 t.hideTab(nodes[i]);
83 }
84 }
85
86 // Show selected tab
87 t.showTab(tabElm);
88 }
89
90 if (panelElm && panelContainerElm) {
91 nodes = panelContainerElm.childNodes;
92
93 // Hide all other panels
94 for (i = 0; i < nodes.length; i++) {
95 if (nodes[i].nodeName == "DIV")
96 t.hidePanel(nodes[i]);
97 }
98
99 if (!avoid_focus) {
100 tabElm.focus();
101 }
102
103 // Show selected panel
104 t.showPanel(panelElm);
105 }
106};
107
108MCTabs.prototype.getAnchor = function() {
109 var pos, url = document.location.href;
110
111 if ((pos = url.lastIndexOf('#')) != -1)
112 return url.substring(pos + 1);
113
114 return "";
115};
116
117
118//Global instance
119var mcTabs = new MCTabs();
120
121tinyMCEPopup.onInit.add(function() {
122 var tinymce = tinyMCEPopup.getWin().tinymce, dom = tinyMCEPopup.dom, each = tinymce.each;
123
124 each(dom.select('div.tabs'), function(tabContainerElm) {
125 var keyNav;
126
127 dom.setAttrib(tabContainerElm, "role", "tablist");
128
129 var items = tinyMCEPopup.dom.select('li', tabContainerElm);
130 var action = function(id) {
131 mcTabs.displayTab(id, mcTabs.getPanelForTab(id));
132 mcTabs.onChange.dispatch(id);
133 };
134
135 each(items, function(item) {
136 dom.setAttrib(item, 'role', 'tab');
137 dom.bind(item, 'click', function(evt) {
138 action(item.id);
139 });
140 });
141
142 dom.bind(dom.getRoot(), 'keydown', function(evt) {
143 if (evt.keyCode === 9 && evt.ctrlKey && !evt.altKey) { // Tab
144 keyNav.moveFocus(evt.shiftKey ? -1 : 1);
145 tinymce.dom.Event.cancel(evt);
146 }
147 });
148
149 each(dom.select('a', tabContainerElm), function(a) {
150 dom.setAttrib(a, 'tabindex', '-1');
151 });
152
153 keyNav = tinyMCEPopup.editor.windowManager.createInstance('tinymce.ui.KeyboardNavigation', {
154 root: tabContainerElm,
155 items: items,
156 onAction: action,
157 actOnFocus: true,
158 enableLeftRight: true,
159 enableUpDown: true
160 }, tinyMCEPopup.dom);
161 });
162});

static/js/lib/tinymce/plugins/compat3x/tiny_mce_popup.js

1/**
2 * Popup.js
3 *
4 * Copyright, Moxiecode Systems AB
5 * Released under LGPL License.
6 *
7 * License: http://www.tinymce.com/license
8 * Contributing: http://www.tinymce.com/contributing
9 */
10
11// Some global instances
12var tinymce = null, tinyMCEPopup, tinyMCE;
13
14/**
15 * TinyMCE popup/dialog helper class. This gives you easy access to the
16 * parent editor instance and a bunch of other things. It's higly recommended
17 * that you load this script into your dialogs.
18 *
19 * @static
20 * @class tinyMCEPopup
21 */
22tinyMCEPopup = {
23 /**
24 * Initializes the popup this will be called automatically.
25 *
26 * @method init
27 */
28 init : function() {
29 var t = this, w, ti, settings;
30
31 // Find window & API
32 w = t.getWin();
33 tinymce = w.tinymce;
34 tinyMCE = w.tinyMCE;
35 t.editor = tinymce.EditorManager.activeEditor;
36 t.params = t.editor.windowManager.params;
37 t.features = t.editor.windowManager.features;
38 settings = t.editor.settings;
39
40 // Setup popup CSS path(s)
41 if (settings.popup_css !== false) {
42 if (settings.popup_css) {
43 settings.popup_css = t.documentBaseURI.toAbsolute(settings.popup_css);
44 } else {
45 settings.popup_css = t.baseURI.toAbsolute("themes/" + settings.theme + "/skins/" + settings.skin + "/dialog.css");
46 }
47 }
48
49 if (settings.popup_css_add) {
50 settings.popup_css += ',' + t.documentBaseURI.toAbsolute(settings.popup_css_add);
51 }
52
53 // Setup local DOM
54 t.dom = t.editor.windowManager.createInstance('tinymce.dom.DOMUtils', document, {ownEvents: true, proxy: tinyMCEPopup._eventProxy});
55 t.dom.bind(window, 'ready', t._onDOMLoaded, t);
56
57 // Enables you to skip loading the default css
58 if (t.features.popup_css !== false)
59 t.dom.loadCSS(t.features.popup_css || t.editor.settings.popup_css);
60
61 // Setup on init listeners
62 t.listeners = [];
63
64 /**
65 * Fires when the popup is initialized.
66 *
67 * @event onInit
68 * @param {tinymce.Editor} editor Editor instance.
69 * @example
70 * // Alerts the selected contents when the dialog is loaded
71 * tinyMCEPopup.onInit.add(function(ed) {
72 * alert(ed.selection.getContent());
73 * });
74 *
75 * // Executes the init method on page load in some object using the SomeObject scope
76 * tinyMCEPopup.onInit.add(SomeObject.init, SomeObject);
77 */
78 t.onInit = {
79 add : function(f, s) {
80 t.listeners.push({func : f, scope : s});
81 }
82 };
83
84 t.isWindow = !t.getWindowArg('mce_inline');
85 t.id = t.getWindowArg('mce_window_id');
86 },
87
88 /**
89 * Returns the reference to the parent window that opened the dialog.
90 *
91 * @method getWin
92 * @return {Window} Reference to the parent window that opened the dialog.
93 */
94 getWin : function() {
95 // Added frameElement check to fix bug: #2817583
96 return (!window.frameElement && window.dialogArguments) || opener || parent || top;
97 },
98
99 /**
100 * Returns a window argument/parameter by name.
101 *
102 * @method getWindowArg
103 * @param {String} n Name of the window argument to retrive.
104 * @param {String} dv Optional default value to return.
105 * @return {String} Argument value or default value if it wasn't found.
106 */
107 getWindowArg : function(n, dv) {
108 var v = this.params[n];
109
110 return tinymce.is(v) ? v : dv;
111 },
112
113 /**
114 * Returns a editor parameter/config option value.
115 *
116 * @method getParam
117 * @param {String} n Name of the editor config option to retrive.
118 * @param {String} dv Optional default value to return.
119 * @return {String} Parameter value or default value if it wasn't found.
120 */
121 getParam : function(n, dv) {
122 return this.editor.getParam(n, dv);
123 },
124
125 /**
126 * Returns a language item by key.
127 *
128 * @method getLang
129 * @param {String} n Language item like mydialog.something.
130 * @param {String} dv Optional default value to return.
131 * @return {String} Language value for the item like "my string" or the default value if it wasn't found.
132 */
133 getLang : function(n, dv) {
134 return this.editor.getLang(n, dv);
135 },
136
137 /**
138 * Executed a command on editor that opened the dialog/popup.
139 *
140 * @method execCommand
141 * @param {String} cmd Command to execute.
142 * @param {Boolean} ui Optional boolean value if the UI for the command should be presented or not.
143 * @param {Object} val Optional value to pass with the comman like an URL.
144 * @param {Object} a Optional arguments object.
145 */
146 execCommand : function(cmd, ui, val, a) {
147 a = a || {};
148 a.skip_focus = 1;
149
150 this.restoreSelection();
151 return this.editor.execCommand(cmd, ui, val, a);
152 },
153
154 /**
155 * Resizes the dialog to the inner size of the window. This is needed since various browsers
156 * have different border sizes on windows.
157 *
158 * @method resizeToInnerSize
159 */
160 resizeToInnerSize : function() {
161 var t = this;
162
163 // Detach it to workaround a Chrome specific bug
164 // https://sourceforge.net/tracker/?func=detail&atid=635682&aid=2926339&group_id=103281
165 setTimeout(function() {
166 var vp = t.dom.getViewPort(window);
167
168 t.editor.windowManager.resizeBy(
169 t.getWindowArg('mce_width') - vp.w,
170 t.getWindowArg('mce_height') - vp.h,
171 t.id || window
172 );
173 }, 10);
174 },
175
176 /**
177 * Will executed the specified string when the page has been loaded. This function
178 * was added for compatibility with the 2.x branch.
179 *
180 * @method executeOnLoad
181 * @param {String} s String to evalutate on init.
182 */
183 executeOnLoad : function(s) {
184 this.onInit.add(function() {
185 eval(s);
186 });
187 },
188
189 /**
190 * Stores the current editor selection for later restoration. This can be useful since some browsers
191 * looses it's selection if a control element is selected/focused inside the dialogs.
192 *
193 * @method storeSelection
194 */
195 storeSelection : function() {
196 this.editor.windowManager.bookmark = tinyMCEPopup.editor.selection.getBookmark(1);
197 },
198
199 /**
200 * Restores any stored selection. This can be useful since some browsers
201 * looses it's selection if a control element is selected/focused inside the dialogs.
202 *
203 * @method restoreSelection
204 */
205 restoreSelection : function() {
206 var t = tinyMCEPopup;
207
208 if (!t.isWindow && tinymce.isIE)
209 t.editor.selection.moveToBookmark(t.editor.windowManager.bookmark);
210 },
211
212 /**
213 * Loads a specific dialog language pack. If you pass in plugin_url as a arugment
214 * when you open the window it will load the <plugin url>/langs/<code>_dlg.js lang pack file.
215 *
216 * @method requireLangPack
217 */
218 requireLangPack : function() {
219 var t = this, u = t.getWindowArg('plugin_url') || t.getWindowArg('theme_url');
220
221 if (u && t.editor.settings.language && t.features.translate_i18n !== false && t.editor.settings.language_load !== false) {
222 u += '/langs/' + t.editor.settings.language + '_dlg.js';
223
224 if (!tinymce.ScriptLoader.isDone(u)) {
225 document.write('<script type="text/javascript" src="' + u + '"></script>');
226 tinymce.ScriptLoader.markDone(u);
227 }
228 }
229 },
230
231 /**
232 * Executes a color picker on the specified element id. When the user
233 * then selects a color it will be set as the value of the specified element.
234 *
235 * @method pickColor
236 * @param {DOMEvent} e DOM event object.
237 * @param {string} element_id Element id to be filled with the color value from the picker.
238 */
239 pickColor : function(e, element_id) {
240 this.execCommand('mceColorPicker', true, {
241 color : document.getElementById(element_id).value,
242 func : function(c) {
243 document.getElementById(element_id).value = c;
244
245 try {
246 document.getElementById(element_id).onchange();
247 } catch (ex) {
248 // Try fire event, ignore errors
249 }
250 }
251 });
252 },
253
254 /**
255 * Opens a filebrowser/imagebrowser this will set the output value from
256 * the browser as a value on the specified element.
257 *
258 * @method openBrowser
259 * @param {string} element_id Id of the element to set value in.
260 * @param {string} type Type of browser to open image/file/flash.
261 * @param {string} option Option name to get the file_broswer_callback function name from.
262 */
263 openBrowser : function(element_id, type, option) {
264 tinyMCEPopup.restoreSelection();
265 this.editor.execCallback('file_browser_callback', element_id, document.getElementById(element_id).value, type, window);
266 },
267
268 /**
269 * Creates a confirm dialog. Please don't use the blocking behavior of this
270 * native version use the callback method instead then it can be extended.
271 *
272 * @method confirm
273 * @param {String} t Title for the new confirm dialog.
274 * @param {function} cb Callback function to be executed after the user has selected ok or cancel.
275 * @param {Object} s Optional scope to execute the callback in.
276 */
277 confirm : function(t, cb, s) {
278 this.editor.windowManager.confirm(t, cb, s, window);
279 },
280
281 /**
282 * Creates a alert dialog. Please don't use the blocking behavior of this
283 * native version use the callback method instead then it can be extended.
284 *
285 * @method alert
286 * @param {String} t Title for the new alert dialog.
287 * @param {function} cb Callback function to be executed after the user has selected ok.
288 * @param {Object} s Optional scope to execute the callback in.
289 */
290 alert : function(tx, cb, s) {
291 this.editor.windowManager.alert(tx, cb, s, window);
292 },
293
294 /**
295 * Closes the current window.
296 *
297 * @method close
298 */
299 close : function() {
300 var t = this;
301
302 // To avoid domain relaxing issue in Opera
303 function close() {
304 t.editor.windowManager.close(window);
305 tinymce = tinyMCE = t.editor = t.params = t.dom = t.dom.doc = null; // Cleanup
306 };
307
308 if (tinymce.isOpera)
309 t.getWin().setTimeout(close, 0);
310 else
311 close();
312 },
313
314 // Internal functions
315
316 _restoreSelection : function() {
317 var e = window.event.srcElement;
318
319 if (e.nodeName == 'INPUT' && (e.type == 'submit' || e.type == 'button'))
320 tinyMCEPopup.restoreSelection();
321 },
322
323/* _restoreSelection : function() {
324 var e = window.event.srcElement;
325
326 // If user focus a non text input or textarea
327 if ((e.nodeName != 'INPUT' && e.nodeName != 'TEXTAREA') || e.type != 'text')
328 tinyMCEPopup.restoreSelection();
329 },*/
330
331 _onDOMLoaded : function() {
332 var t = tinyMCEPopup, ti = document.title, bm, h, nv;
333
334 // Translate page
335 if (t.features.translate_i18n !== false) {
336 h = document.body.innerHTML;
337
338 // Replace a=x with a="x" in IE
339 if (tinymce.isIE)
340 h = h.replace(/ (value|title|alt)=([^"][^\s>]+)/gi, ' $1="$2"')
341
342 document.dir = t.editor.getParam('directionality','');
343
344 if ((nv = t.editor.translate(h)) && nv != h)
345 document.body.innerHTML = nv;
346
347 if ((nv = t.editor.translate(ti)) && nv != ti)
348 document.title = ti = nv;
349 }
350
351 if (!t.editor.getParam('browser_preferred_colors', false) || !t.isWindow)
352 t.dom.addClass(document.body, 'forceColors');
353
354 document.body.style.display = '';
355
356 // Restore selection in IE when focus is placed on a non textarea or input element of the type text
357 if (tinymce.isIE) {
358 document.attachEvent('onmouseup', tinyMCEPopup._restoreSelection);
359
360 // Add base target element for it since it would fail with modal dialogs
361 t.dom.add(t.dom.select('head')[0], 'base', {target : '_self'});
362 }
363
364 t.restoreSelection();
365 t.resizeToInnerSize();
366
367 // Set inline title
368 if (!t.isWindow)
369 t.editor.windowManager.setTitle(window, ti);
370 else
371 window.focus();
372
373 if (!tinymce.isIE && !t.isWindow) {
374 t.dom.bind(document, 'focus', function() {
375 t.editor.windowManager.focus(t.id);
376 });
377 }
378
379 // Patch for accessibility
380 tinymce.each(t.dom.select('select'), function(e) {
381 e.onkeydown = tinyMCEPopup._accessHandler;
382 });
383
384 // Call onInit
385 // Init must be called before focus so the selection won't get lost by the focus call
386 tinymce.each(t.listeners, function(o) {
387 o.func.call(o.scope, t.editor);
388 });
389
390 // Move focus to window
391 if (t.getWindowArg('mce_auto_focus', true)) {
392 window.focus();
393
394 // Focus element with mceFocus class
395 tinymce.each(document.forms, function(f) {
396 tinymce.each(f.elements, function(e) {
397 if (t.dom.hasClass(e, 'mceFocus') && !e.disabled) {
398 e.focus();
399 return false; // Break loop
400 }
401 });
402 });
403 }
404
405 document.onkeyup = tinyMCEPopup._closeWinKeyHandler;
406 },
407
408 _accessHandler : function(e) {
409 e = e || window.event;
410
411 if (e.keyCode == 13 || e.keyCode == 32) {
412 var elm = e.target || e.srcElement;
413
414 if (elm.onchange)
415 elm.onchange();
416
417 return tinymce.dom.Event.cancel(e);
418 }
419 },
420
421 _closeWinKeyHandler : function(e) {
422 e = e || window.event;
423
424 if (e.keyCode == 27)
425 tinyMCEPopup.close();
426 },
427
428 _eventProxy: function(id) {
429 return function(evt) {
430 tinyMCEPopup.dom.events.callNativeHandler(id, evt);
431 };
432 }
433};
434
435tinyMCEPopup.init();

static/js/lib/tinymce/plugins/compat3x/validate.js

1/**
2 * validate.js
3 *
4 * Copyright, Moxiecode Systems AB
5 * Released under LGPL License.
6 *
7 * License: http://www.tinymce.com/license
8 * Contributing: http://www.tinymce.com/contributing
9 */
10
11/**
12 // String validation:
13
14 if (!Validator.isEmail('myemail'))
15 alert('Invalid email.');
16
17 // Form validation:
18
19 var f = document.forms['myform'];
20
21 if (!Validator.isEmail(f.myemail))
22 alert('Invalid email.');
23*/
24
25var Validator = {
26 isEmail : function(s) {
27 return this.test(s, '^[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+@[-!#$%&\'*+\\/0-9=?A-Z^_`a-z{|}~]+\.[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+$');
28 },
29
30 isAbsUrl : function(s) {
31 return this.test(s, '^(news|telnet|nttp|file|http|ftp|https)://[-A-Za-z0-9\\.]+\\/?.*$');
32 },
33
34 isSize : function(s) {
35 return this.test(s, '^[0-9.]+(%|in|cm|mm|em|ex|pt|pc|px)?$');
36 },
37
38 isId : function(s) {
39 return this.test(s, '^[A-Za-z_]([A-Za-z0-9_])*$');
40 },
41
42 isEmpty : function(s) {
43 var nl, i;
44
45 if (s.nodeName == 'SELECT' && s.selectedIndex < 1)
46 return true;
47
48 if (s.type == 'checkbox' && !s.checked)
49 return true;
50
51 if (s.type == 'radio') {
52 for (i=0, nl = s.form.elements; i<nl.length; i++) {
53 if (nl[i].type == "radio" && nl[i].name == s.name && nl[i].checked)
54 return false;
55 }
56
57 return true;
58 }
59
60 return new RegExp('^\\s*$').test(s.nodeType == 1 ? s.value : s);
61 },
62
63 isNumber : function(s, d) {
64 return !isNaN(s.nodeType == 1 ? s.value : s) && (!d || !this.test(s, '^-?[0-9]*\\.[0-9]*$'));
65 },
66
67 test : function(s, p) {
68 s = s.nodeType == 1 ? s.value : s;
69
70 return s == '' || new RegExp(p).test(s);
71 }
72};
73
74var AutoValidator = {
75 settings : {
76 id_cls : 'id',
77 int_cls : 'int',
78 url_cls : 'url',
79 number_cls : 'number',
80 email_cls : 'email',
81 size_cls : 'size',
82 required_cls : 'required',
83 invalid_cls : 'invalid',
84 min_cls : 'min',
85 max_cls : 'max'
86 },
87
88 init : function(s) {
89 var n;
90
91 for (n in s)
92 this.settings[n] = s[n];
93 },
94
95 validate : function(f) {
96 var i, nl, s = this.settings, c = 0;
97
98 nl = this.tags(f, 'label');
99 for (i=0; i<nl.length; i++) {
100 this.removeClass(nl[i], s.invalid_cls);
101 nl[i].setAttribute('aria-invalid', false);
102 }
103
104 c += this.validateElms(f, 'input');
105 c += this.validateElms(f, 'select');
106 c += this.validateElms(f, 'textarea');
107
108 return c == 3;
109 },
110
111 invalidate : function(n) {
112 this.mark(n.form, n);
113 },
114
115 getErrorMessages : function(f) {
116 var nl, i, s = this.settings, field, msg, values, messages = [], ed = tinyMCEPopup.editor;
117 nl = this.tags(f, "label");
118 for (i=0; i<nl.length; i++) {
119 if (this.hasClass(nl[i], s.invalid_cls)) {
120 field = document.getElementById(nl[i].getAttribute("for"));
121 values = { field: nl[i].textContent };
122 if (this.hasClass(field, s.min_cls, true)) {
123 message = ed.getLang('invalid_data_min');
124 values.min = this.getNum(field, s.min_cls);
125 } else if (this.hasClass(field, s.number_cls)) {
126 message = ed.getLang('invalid_data_number');
127 } else if (this.hasClass(field, s.size_cls)) {
128 message = ed.getLang('invalid_data_size');
129 } else {
130 message = ed.getLang('invalid_data');
131 }
132
133 message = message.replace(/{\#([^}]+)\}/g, function(a, b) {
134 return values[b] || '{#' + b + '}';
135 });
136 messages.push(message);
137 }
138 }
139 return messages;
140 },
141
142 reset : function(e) {
143 var t = ['label', 'input', 'select', 'textarea'];
144 var i, j, nl, s = this.settings;
145
146 if (e == null)
147 return;
148
149 for (i=0; i<t.length; i++) {
150 nl = this.tags(e.form ? e.form : e, t[i]);
151 for (j=0; j<nl.length; j++) {
152 this.removeClass(nl[j], s.invalid_cls);
153 nl[j].setAttribute('aria-invalid', false);
154 }
155 }
156 },
157
158 validateElms : function(f, e) {
159 var nl, i, n, s = this.settings, st = true, va = Validator, v;
160
161 nl = this.tags(f, e);
162 for (i=0; i<nl.length; i++) {
163 n = nl[i];
164
165 this.removeClass(n, s.invalid_cls);
166
167 if (this.hasClass(n, s.required_cls) && va.isEmpty(n))
168 st = this.mark(f, n);
169
170 if (this.hasClass(n, s.number_cls) && !va.isNumber(n))
171 st = this.mark(f, n);
172
173 if (this.hasClass(n, s.int_cls) && !va.isNumber(n, true))
174 st = this.mark(f, n);
175
176 if (this.hasClass(n, s.url_cls) && !va.isAbsUrl(n))
177 st = this.mark(f, n);
178
179 if (this.hasClass(n, s.email_cls) && !va.isEmail(n))
180 st = this.mark(f, n);
181
182 if (this.hasClass(n, s.size_cls) && !va.isSize(n))
183 st = this.mark(f, n);
184
185 if (this.hasClass(n, s.id_cls) && !va.isId(n))
186 st = this.mark(f, n);
187
188 if (this.hasClass(n, s.min_cls, true)) {
189 v = this.getNum(n, s.min_cls);
190
191 if (isNaN(v) || parseInt(n.value) < parseInt(v))
192 st = this.mark(f, n);
193 }
194
195 if (this.hasClass(n, s.max_cls, true)) {
196 v = this.getNum(n, s.max_cls);
197
198 if (isNaN(v) || parseInt(n.value) > parseInt(v))
199 st = this.mark(f, n);
200 }
201 }
202
203 return st;
204 },
205
206 hasClass : function(n, c, d) {
207 return new RegExp('\\b' + c + (d ? '[0-9]+' : '') + '\\b', 'g').test(n.className);
208 },
209
210 getNum : function(n, c) {
211 c = n.className.match(new RegExp('\\b' + c + '([0-9]+)\\b', 'g'))[0];
212 c = c.replace(/[^0-9]/g, '');
213
214 return c;
215 },
216
217 addClass : function(n, c, b) {
218 var o = this.removeClass(n, c);
219 n.className = b ? c + (o != '' ? (' ' + o) : '') : (o != '' ? (o + ' ') : '') + c;
220 },
221
222 removeClass : function(n, c) {
223 c = n.className.replace(new RegExp("(^|\\s+)" + c + "(\\s+|$)"), ' ');
224 return n.className = c != ' ' ? c : '';
225 },
226
227 tags : function(f, s) {
228 return f.getElementsByTagName(s);
229 },
230
231 mark : function(f, n) {
232 var s = this.settings;
233
234 this.addClass(n, s.invalid_cls);
235 n.setAttribute('aria-invalid', 'true');
236 this.markLabels(f, n, s.invalid_cls);
237
238 return false;
239 },
240
241 markLabels : function(f, n, ic) {
242 var nl, i;
243
244 nl = this.tags(f, "label");
245 for (i=0; i<nl.length; i++) {
246 if (nl[i].getAttribute("for") == n.id || nl[i].htmlFor == n.id)
247 this.addClass(nl[i], ic);
248 }
249
250 return null;
251 }
252};

static/js/lib/tinymce/plugins/contextmenu/plugin.min.js

1tinymce.PluginManager.add("contextmenu",function(e){var t;e.on("contextmenu",function(n){var r;if(n.preventDefault(),r=e.settings.contextmenu||"link image inserttable | cell row column deletetable",t)t.show();else{var i=[];tinymce.each(r.split(/[ ,]/),function(t){var n=e.menuItems[t];"|"==t&&(n={text:t}),n&&(n.shortcut="",i.push(n))});for(var o=0;i.length>o;o++)"|"==i[o].text&&(0===o||o==i.length-1)&&i.splice(o,1);t=new tinymce.ui.Menu({items:i,context:"contextmenu"}),t.renderTo(document.body)}var a=tinymce.DOM.getPos(e.getContentAreaContainer());a.x+=n.clientX,a.y+=n.clientY,t.moveTo(a.x,a.y),e.on("remove",function(){t.remove(),t=null})})});

static/js/lib/tinymce/plugins/directionality/plugin.min.js

1tinymce.PluginManager.add("directionality",function(e){function t(t){var n,r=e.dom,i=e.selection.getSelectedBlocks();i.length&&(n=r.getAttrib(i[0],"dir"),tinymce.each(i,function(e){r.getParent(e.parentNode,"*[dir='"+t+"']",r.getRoot())||(n!=t?r.setAttrib(e,"dir",t):r.setAttrib(e,"dir",null))}),e.nodeChanged())}function n(e){var t=[];return tinymce.each("h1 h2 h3 h4 h5 h6 div p".split(" "),function(n){t.push(n+"[dir="+e+"]")}),t.join(",")}e.addCommand("mceDirectionLTR",function(){t("ltr")}),e.addCommand("mceDirectionRTL",function(){t("rtl")}),e.addButton("ltr",{title:"Left to right",cmd:"mceDirectionLTR",stateSelector:n("ltr")}),e.addButton("rtl",{title:"Right to left",cmd:"mceDirectionRTL",stateSelector:n("rtl")})});

static/js/lib/tinymce/plugins/emoticons/img/smiley-cool.gif

1GIF89a z\V<N:8ѿ#[[WY#!1,//, &
2ɿbA_z`
3  !,'UicJRqGBU*ѣiOt`Be]GUZCqn P@~=@pLAx;d@~}{r} hr=       E   %  4  A F M) DK fP(J;

static/js/lib/tinymce/plugins/emoticons/img/smiley-cry.gif

1GIF89a.. P2!O#r簗!ϻ8rX
2ž{ֵưR>
3vʶjZj!,'XicJR#@a* y!dQ®~0pAƀ<+
4fPer>zြXc| %
5%q  %       \ { A9;=# ݄5N!;

static/js/lib/tinymce/plugins/emoticons/img/smiley-embarassed.gif

1GIF89a*ļLTԿ( AT«!:l:v[wX87d$|(*=غ$W°bQ!,'RicJj&I*!8ʃtdUn ~$bcA
2 ǂ@h \T@• L2AN&zxMv 
3% Cu y
4 % 
5
6 ] #  J;s B Q *N!;

static/js/lib/tinymce/plugins/emoticons/img/smiley-foot-in-mouth.gif

1GIF89aƖ~ʶj MR: Zѽ1mT +HغoļO'ª60:"
26&
37!,@'Pix6M1C]Xbr xd0B&Ţj21 E"d PwQ=5  9;b   E)sr#?
4c9,O~
5. x.
6+-58  \ |bT* GB;

static/js/lib/tinymce/plugins/emoticons/img/smiley-frown.gif

1GIF89aA'Ơ2ʶjNXν"7hT -qZA
2غGīļ7Z"%x`0!,'QicJJ&!E*Y08ԡAA`&
34!x<đ0"FU$Jc&%`..cރ1w~bp
4 z
5r r 
6x% ] ̘ AKGP)DN5!;

static/js/lib/tinymce/plugins/emoticons/img/smiley-innocent.gif

1GIF89a8*˭q˱ZU쳏 8wi٫T̵ qN*aK
2z0-VھB2u"!,'RixeHdbK,R=ɣ !Q<6Ph'0*di;pgP:t|NR RUR}  
3
4 m _Q w  
5  %ΗQS*
6P
78)<MV )##!;

static/js/lib/tinymce/plugins/emoticons/img/smiley-kiss.gif

1GIF89aR= 44sYʶj
22!N*)"mqغ>9)ښļ9ֽ)Y!,'TicJVsRQ*Y!IrT3!x Cp#ʂ!X׫Q*y$0.9@8nH5q}M a}  {
3/
4 H 
5
6 J % S \  A  HJ P) DN 5!;

static/js/lib/tinymce/plugins/emoticons/img/smiley-laughing.gif

1GIF89a¦2,Nr^HYҾëjSļGغq7uZӺ.ʶj2yc1R= Z!,@'SihHT#OI8], q&Ḛ`8A(1. g02NBIp$:{PW 8s
2   
3E)sr# 9, {Q .. 8+45   ~bS*  G\ J;

static/js/lib/tinymce/plugins/emoticons/img/smiley-money-mouth.gif

1GIF89a)¨"¬QnX6Rj1>^*
2n9$J3s VMw9ZF>2B噚6Ѿ&ӿrx$~!,'TicJn0Q*I041n~( D>tsh8",n0f!$lw2*ۑW]Hm %x%D%opu%
3Q Y
44
5 #B
6 *N!;

static/js/lib/tinymce/plugins/emoticons/img/smiley-sealed.gif

1GIF89a ھRIͷJʶj5 (\lU Nû?:o"ֶR= /!,@'SiZRT"B-8]"p&fy2f0NbN~#a4ɫ3wIՕ$rO 8on$*?A9o,.NZr.tO7[,
2][_x
3;E* Q G
4)!;

static/js/lib/tinymce/plugins/emoticons/img/smiley-smile.gif

1GIF89ay`Ɩz ʶj2NYнR= 6hTīغqGļ.17¦2Z&
2!,@'Pix,2 go1Beh@@RCB2\ D0!&x;A9 B"A\'Yظ{)X 6:< 0  F)sr#P:,
3P S . +-059  6  ~ [bU*H
4;

static/js/lib/tinymce/plugins/emoticons/img/smiley-surprised.gif

1GIF89aƝ(#ʶjNR; Z&2,kS §غ7o7ļF>"RX( ĸD!,@'Pixh:Ti]<r DШ* Da0B, xa1
2f2,4wgQ=<5^9;
3
4
5
6 E)s r#?  A9, + .x. 8+-ς 5^IZ3aT*  G!;

static/js/lib/tinymce/plugins/emoticons/img/smiley-tongue-out.gif

1GIF89a&
2Ɨ} ʶj#NҾXR= 
32.::nXFqغZ/'ļ71"RT!,'TicJV4QQ*Y42M
4aQ($H@(Dh4U$qQ*&5 P\e ptE9*-aWW
5 xn vE
6%
7
8\ A-1N)5!;

static/js/lib/tinymce/plugins/emoticons/img/smiley-undecided.gif

1GIF89a*Ɗyʶj%NYֺdN 2 -GqغB/ê9ļYVC 7vbο$!,'QicJJF !E*I4LA AId#8A&@HUD h[0NT} `r
2 y   tw %“[  A KG P)DN5!;

static/js/lib/tinymce/plugins/emoticons/img/smiley-wink.gif

1GIF89a)Ɲ 2ʶjNYdzP: , ,u\Gqغļ6־2Y( :!,@'Ri0Z fk 2JXe4JPHRC"8=#0%qtWCI$ho¢P4V  6 :< 1  F)ts#@MB:, 
2  ..+-15961 w*H`@0T!;

static/js/lib/tinymce/plugins/emoticons/img/smiley-yell.gif

1GIF89a2e{ NYѿ(R4
24ʶj+3͎nT<غ9sJqHļժ*lL §!,'RicJRVAI*hq]ǣ590
3q FCLZ1&h 51̢Ir:Eo(* Ku p  E  r%R9Z =AKGO)DM5!;

static/js/lib/tinymce/plugins/emoticons/plugin.min.js

1tinymce.PluginManager.add("emoticons",function(e,t){function n(){var e;return e='<table role="presentation" class="mce-grid">',tinymce.each(r,function(n){e+="<tr>",tinymce.each(n,function(n){var r=t+"/img/smiley-"+n+".gif";e+='<td><a href="#" data-mce-url="'+r+'" tabindex="-1"><img src="'+r+'" style="width: 18px; height: 18px"></a></td>'}),e+="</tr>"}),e+="</table>"}var r=[["cool","cry","embarassed","foot-in-mouth"],["frown","innocent","kiss","laughing"],["money-mouth","sealed","smile","surprised"],["tongue-out","undecided","wink","yell"]];e.addButton("emoticons",{type:"panelbutton",popoverAlign:"bc-tl",panel:{autohide:!0,html:n,onclick:function(t){var n=e.dom.getParent(t.target,"a");n&&(e.insertContent('<img src="'+n.getAttribute("data-mce-url")+'" />'),this.hide())}},tooltip:"Emoticons"})});

static/js/lib/tinymce/plugins/example/plugin.min.js

1tinymce.PluginManager.add("example",function(){});

static/js/lib/tinymce/plugins/example_dependency/plugin.min.js

1tinymce.PluginManager.add("example_dependency",function(){},["example"]);

static/js/lib/tinymce/plugins/fullpage/plugin.min.js

1tinymce.PluginManager.add("fullpage",function(e){function t(){var t=n();e.windowManager.open({title:"Document properties",data:t,defaults:{type:"textbox",size:40},body:[{name:"title",label:"Title"},{name:"keywords",label:"Keywords"},{name:"description",label:"Description"},{name:"robots",label:"Robots"},{name:"author",label:"Author"},{name:"docencoding",label:"Encoding"}],onSubmit:function(e){r(tinymce.extend(t,e.data))}})}function n(){function t(e,t){var n=e.attr(t);return n||""}var n,r,o=i(),a={};return a.fontface=e.getParam("fullpage_default_fontface",""),a.fontsize=e.getParam("fullpage_default_fontsize",""),n=o.firstChild,7==n.type&&(a.xml_pi=!0,r=/encoding="([^"]+)"/.exec(n.value),r&&(a.docencoding=r[1])),n=o.getAll("#doctype")[0],n&&(a.doctype="<!DOCTYPE"+n.value+">"),n=o.getAll("title")[0],n&&n.firstChild&&(a.title=n.firstChild.value),u(o.getAll("meta"),function(e){var t,n=e.attr("name"),r=e.attr("http-equiv");n?a[n.toLowerCase()]=e.attr("content"):"Content-Type"==r&&(t=/charset\s*=\s*(.*)\s*/gi.exec(e.attr("content")),t&&(a.docencoding=t[1]))}),n=o.getAll("html")[0],n&&(a.langcode=t(n,"lang")||t(n,"xml:lang")),n=o.getAll("link")[0],n&&"stylesheet"==n.attr("rel")&&(a.stylesheet=n.attr("href")),n=o.getAll("body")[0],n&&(a.langdir=t(n,"dir"),a.style=t(n,"style"),a.visited_color=t(n,"vlink"),a.link_color=t(n,"link"),a.active_color=t(n,"alink")),a}function r(t){function n(e,t,n){e.attr(t,n?n:void 0)}function r(e){a.firstChild?a.insert(e,a.firstChild):a.append(e)}var o,a,s,c,f,p=e.dom;o=i(),a=o.getAll("head")[0],a||(c=o.getAll("html")[0],a=new d("head",1),c.firstChild?c.insert(a,c.firstChild,!0):c.append(a)),c=o.firstChild,t.xml_pi?(f='version="1.0"',t.docencoding&&(f+=' encoding="'+t.docencoding+'"'),7!=c.type&&(c=new d("xml",7),o.insert(c,o.firstChild,!0)),c.value=f):c&&7==c.type&&c.remove(),c=o.getAll("#doctype")[0],t.doctype?(c||(c=new d("#doctype",10),t.xml_pi?o.insert(c,o.firstChild):r(c)),c.value=t.doctype.substring(9,t.doctype.length-1)):c&&c.remove(),t.docencoding&&(c=null,u(o.getAll("meta"),function(e){"Content-Type"==e.attr("http-equiv")&&(c=e)}),c||(c=new d("meta",1),c.attr("http-equiv","Content-Type"),c.shortEnded=!0,r(c)),c.attr("content","text/html; charset="+t.docencoding)),c=o.getAll("title")[0],t.title?c||(c=new d("title",1),c.append(new d("#text",3)).value=t.title,r(c)):c&&c.remove(),u("keywords,description,author,copyright,robots".split(","),function(e){var n,i,a=o.getAll("meta"),s=t[e];for(n=0;a.length>n;n++)if(i=a[n],i.attr("name")==e)return s?i.attr("content",s):i.remove(),void 0;s&&(c=new d("meta",1),c.attr("name",e),c.attr("content",s),c.shortEnded=!0,r(c))}),c=o.getAll("link")[0],c&&"stylesheet"==c.attr("rel")?t.stylesheet?c.attr("href",t.stylesheet):c.remove():t.stylesheet&&(c=new d("link",1),c.attr({rel:"stylesheet",text:"text/css",href:t.stylesheet}),c.shortEnded=!0,r(c)),c=o.getAll("body")[0],c&&(n(c,"dir",t.langdir),n(c,"style",t.style),n(c,"vlink",t.visited_color),n(c,"link",t.link_color),n(c,"alink",t.active_color),p.setAttribs(e.getBody(),{style:t.style,dir:t.dir,vLink:t.visited_color,link:t.link_color,aLink:t.active_color})),c=o.getAll("html")[0],c&&(n(c,"lang",t.langcode),n(c,"xml:lang",t.langcode)),a.firstChild||a.remove(),s=new tinymce.html.Serializer({validate:!1,indent:!0,apply_source_formatting:!0,indent_before:"head,html,body,meta,title,script,link,style",indent_after:"head,html,body,meta,title,script,link,style"}).serialize(o),l=s.substring(0,s.indexOf("</body>"))}function i(){return new tinymce.html.DomParser({validate:!1,root_name:"#document"}).parse(l)}function o(t){function n(e){return e.replace(/<\/?[A-Z]+/g,function(e){return e.toLowerCase()})}var r,o,s,d,f=t.content,p="",m=e.dom;"raw"==t.format&&l||t.source_view&&e.getParam("fullpage_hide_in_source_view")||(f=f.replace(/<(\/?)BODY/gi,"<$1body"),r=f.indexOf("<body"),-1!=r?(r=f.indexOf(">",r),l=n(f.substring(0,r+1)),o=f.indexOf("</body",r),-1==o&&(o=f.length),t.content=f.substring(r+1,o),c=n(f.substring(o))):(l=a(),c="\n</body>\n</html>"),s=i(),u(s.getAll("style"),function(e){e.firstChild&&(p+=e.firstChild.value)}),d=s.getAll("body")[0],d&&m.setAttribs(e.getBody(),{style:d.attr("style")||"",dir:d.attr("dir")||"",vLink:d.attr("vlink")||"",link:d.attr("link")||"",aLink:d.attr("alink")||""}),m.remove("fullpage_styles"),p&&(m.add(e.getDoc().getElementsByTagName("head")[0],"style",{id:"fullpage_styles"},p),d=m.get("fullpage_styles"),d.styleSheet&&(d.styleSheet.cssText=p)))}function a(){var t,n="",r="";return e.getParam("fullpage_default_xml_pi")&&(n+='<?xml version="1.0" encoding="'+e.getParam("fullpage_default_encoding","ISO-8859-1")+'" ?>\n'),n+=e.getParam("fullpage_default_doctype","<!DOCTYPE html>"),n+="\n<html>\n<head>\n",(t=e.getParam("fullpage_default_title"))&&(n+="<title>"+t+"</title>\n"),(t=e.getParam("fullpage_default_encoding"))&&(n+='<meta http-equiv="Content-Type" content="text/html; charset='+t+'" />\n'),(t=e.getParam("fullpage_default_font_family"))&&(r+="font-family: "+t+";"),(t=e.getParam("fullpage_default_font_size"))&&(r+="font-size: "+t+";"),(t=e.getParam("fullpage_default_text_color"))&&(r+="color: "+t+";"),n+="</head>\n<body"+(r?' style="'+r+'"':"")+">\n"}function s(t){t.selection||t.source_view&&e.getParam("fullpage_hide_in_source_view")||(t.content=tinymce.trim(l)+"\n"+tinymce.trim(t.content)+"\n"+tinymce.trim(c))}var l,c,u=tinymce.each,d=tinymce.html.Node;e.addCommand("mceFullPageProperties",t),e.addButton("fullpage",{title:"Document properties",cmd:"mceFullPageProperties"}),e.addMenuItem("fullpage",{text:"Document properties",cmd:"mceFullPageProperties",context:"file"}),e.on("BeforeSetContent",o),e.on("GetContent",s)});

static/js/lib/tinymce/plugins/fullscreen/plugin.min.js

1tinymce.PluginManager.add("fullscreen",function(e){function t(){var e,t,n=window,r=document,i=r.body;return i.offsetWidth&&(e=i.offsetWidth,t=i.offsetHeight),n.innerWidth&&n.innerHeight&&(e=n.innerWidth,t=n.innerHeight),{w:e,h:t}}function n(){function n(){s.setStyle(c,"height",t().h-(l.clientHeight-c.clientHeight))}var l,c,u,d=document.body,f=document.documentElement;a=!a,l=e.getContainer().firstChild,c=e.getContentAreaContainer().firstChild,u=c.style,a?(i=u.width,o=u.height,r=l.clientHeight-c.clientHeight,u.width=u.height="100%",s.addClass(d,"mce-fullscreen"),s.addClass(f,"mce-fullscreen"),s.addClass(l,"mce-fullscreen"),s.bind(window,"resize",n),n()):(u.width=i,u.height=o,s.removeClass(d,"mce-fullscreen"),s.removeClass(f,"mce-fullscreen"),s.removeClass(l,"mce-fullscreen"),s.unbind(window,"resize",n)),e.fire("FullscreenStateChanged",{state:a})}var r,i,o,a=!1,s=tinymce.DOM;if(!e.settings.inline)return e.on("init",function(){e.addShortcut("Ctrl+Alt+F","",n)}),e.addMenuItem("fullscreen",{text:"Fullscreen",shortcut:"Ctrl+Alt+F",selectable:!0,onClick:n,onPostRender:function(){var t=this;e.on("FullscreenStateChanged",function(e){t.active(e.state)})},context:"view"}),e.addButton("fullscreen",{tooltip:"Fullscreen",shortcut:"Ctrl+Alt+F",onClick:n,onPostRender:function(){var t=this;e.on("FullscreenStateChanged",function(e){t.active(e.state)})}}),{isFullscreen:function(){return a}}});

static/js/lib/tinymce/plugins/hr/plugin.min.js

1tinymce.PluginManager.add("hr",function(e){e.addCommand("InsertHorizontalRule",function(){e.execCommand("mceInsertContent",!1,"<hr />")}),e.addButton("hr",{icon:"hr",tooltip:"Insert horizontal ruler",cmd:"InsertHorizontalRule"}),e.addMenuItem("hr",{icon:"hr",text:"Horizontal line",cmd:"InsertHorizontalRule",context:"insert"})});

static/js/lib/tinymce/plugins/image/plugin.min.js

1tinymce.PluginManager.add("image",function(e){function t(){function t(){var t=[{text:"None",value:""}];return tinymce.each(e.settings.image_list,function(e){t.push({text:e.text||e.title,value:e.value||e.url,menu:e.menu})}),t}function n(e){var t,n,i,s;t=r.find("#width")[0],n=r.find("#height")[0],i=t.value(),s=n.value(),r.find("#constrain")[0].checked()&&o&&a&&i&&s&&(e.control==t?(s=Math.round(i/o*s),n.value(s)):(i=Math.round(s/a*i),t.value(i))),o=i,a=s}var r,i,o,a,s,l=e.dom,c=e.selection.getNode();o=l.getAttrib(c,"width"),a=l.getAttrib(c,"height"),"IMG"!=c.nodeName||c.getAttribute("data-mce-object")?c=null:i={src:l.getAttrib(c,"src"),alt:l.getAttrib(c,"alt"),width:o,height:a},e.settings.image_list&&(s={name:"target",type:"listbox",label:"Image list",values:t(),onselect:function(e){var t=r.find("#alt");(!t.value()||e.lastControl&&t.value()==e.lastControl.text())&&t.value(e.control.text()),r.find("#src").value(e.control.value())}}),r=e.windowManager.open({title:"Edit image",data:i,body:[{name:"src",type:"filepicker",filetype:"image",label:"Source",autofocus:!0},s,{name:"alt",type:"textbox",label:"Image description"},{type:"container",label:"Dimensions",layout:"flex",direction:"row",align:"center",spacing:5,items:[{name:"width",type:"textbox",maxLength:3,size:3,onchange:n},{type:"label",text:"x"},{name:"height",type:"textbox",maxLength:3,size:3,onchange:n},{name:"constrain",type:"checkbox",checked:!0,text:"Constrain proportions"}]}],onSubmit:function(t){var n=t.data;""===n.width&&delete n.width,""===n.height&&delete n.height,c?l.setAttribs(c,n):e.insertContent(l.createHTML("img",n))}})}e.addButton("image",{icon:"image",tooltip:"Insert/edit image",onclick:t,stateSelector:"img:not([data-mce-object])"}),e.addMenuItem("image",{icon:"image",text:"Insert image",onclick:t,context:"insert",prependToContext:!0})});

static/js/lib/tinymce/plugins/insertdatetime/plugin.min.js

1tinymce.PluginManager.add("insertdatetime",function(e){function t(t,n){function s(e,t){if(e=""+e,t>e.length)for(var n=0;t-e.length>n;n++)e="0"+e;return e}return n=n||new Date,t=t.replace("%D","%m/%d/%Y"),t=t.replace("%r","%I:%M:%S %p"),t=t.replace("%Y",""+n.getFullYear()),t=t.replace("%y",""+n.getYear()),t=t.replace("%m",s(n.getMonth()+1,2)),t=t.replace("%d",s(n.getDate(),2)),t=t.replace("%H",""+s(n.getHours(),2)),t=t.replace("%M",""+s(n.getMinutes(),2)),t=t.replace("%S",""+s(n.getSeconds(),2)),t=t.replace("%I",""+((n.getHours()+11)%12+1)),t=t.replace("%p",""+(12>n.getHours()?"AM":"PM")),t=t.replace("%B",""+e.translate(a[n.getMonth()])),t=t.replace("%b",""+e.translate(o[n.getMonth()])),t=t.replace("%A",""+e.translate(i[n.getDay()])),t=t.replace("%a",""+e.translate(r[n.getDay()])),t=t.replace("%%","%")}var n,r="Sun Mon Tue Wed Thu Fri Sat Sun".split(" "),i="Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday".split(" "),o="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),a="January February March April May June July August September October November December".split(" "),s=[];e.addCommand("mceInsertDate",function(){var n=t(e.getParam("plugin_insertdate_dateFormat",e.translate("%Y-%m-%d")));e.execCommand("mceInsertContent",!1,n)}),e.addCommand("mceInsertTime",function(){var n=t(e.getParam("plugin_insertdate_timeFormat",e.translate("%H:%M:%S")));e.execCommand("mceInsertContent",!1,n)}),e.addButton("inserttime",{type:"splitbutton",title:"Insert time",onclick:function(){e.insertContent(t(n||"%H:%M:%S"))},menu:s}),tinymce.each(["%H:%M:%S","%Y-%m-%d","%I:%M:%S %p","%D"],function(r){s.push({text:t(r),onclick:function(){n=r,e.insertContent(t(r))}})}),e.addMenuItem("insertdatetime",{icon:"date",text:"Insert date/time",menu:s,context:"insert"})});

static/js/lib/tinymce/plugins/layer/plugin.min.js

1tinymce.PluginManager.add("layer",function(e){function t(e){do if(e.className&&-1!=e.className.indexOf("mceItemLayer"))return e;while(e=e.parentNode)}function n(t){var n=e.dom;tinymce.each(n.select("div,p",t),function(e){/^(absolute|relative|fixed)$/i.test(e.style.position)&&(e.hasVisual?n.addClass(e,"mceItemVisualAid"):n.removeClass(e,"mceItemVisualAid"),n.addClass(e,"mceItemLayer"))})}function r(n){var r,i,o=[],a=t(e.selection.getNode()),s=-1,l=-1;for(i=[],tinymce.walk(e.getBody(),function(e){1==e.nodeType&&/^(absolute|relative|static)$/i.test(e.style.position)&&i.push(e)},"childNodes"),r=0;i.length>r;r++)o[r]=i[r].style.zIndex?parseInt(i[r].style.zIndex,10):0,0>s&&i[r]==a&&(s=r);if(0>n){for(r=0;o.length>r;r++)if(o[r]<o[s]){l=r;break}l>-1?(i[s].style.zIndex=o[l],i[l].style.zIndex=o[s]):o[s]>0&&(i[s].style.zIndex=o[s]-1)}else{for(r=0;o.length>r;r++)if(o[r]>o[s]){l=r;break}l>-1?(i[s].style.zIndex=o[l],i[l].style.zIndex=o[s]):i[s].style.zIndex=o[s]+1}e.execCommand("mceRepaint")}function i(){var t=e.dom,n=t.getPos(t.getParent(e.selection.getNode(),"*")),r=e.getBody();e.dom.add(r,"div",{style:{position:"absolute",left:n.x,top:n.y>20?n.y:20,width:100,height:100},"class":"mceItemVisualAid mceItemLayer"},e.selection.getContent()||e.getLang("layer.content")),tinymce.Env.ie&&t.setHTML(r,r.innerHTML)}function o(){var n=t(e.selection.getNode());n||(n=e.dom.getParent(e.selection.getNode(),"DIV,P,IMG")),n&&("absolute"==n.style.position.toLowerCase()?(e.dom.setStyles(n,{position:"",left:"",top:"",width:"",height:""}),e.dom.removeClass(n,"mceItemVisualAid"),e.dom.removeClass(n,"mceItemLayer")):(n.style.left||(n.style.left="20px"),n.style.top||(n.style.top="20px"),n.style.width||(n.style.width=n.width?n.width+"px":"100px"),n.style.height||(n.style.height=n.height?n.height+"px":"100px"),n.style.position="absolute",e.dom.setAttrib(n,"data-mce-style",""),e.addVisual(e.getBody())),e.execCommand("mceRepaint"),e.nodeChanged())}e.addCommand("mceInsertLayer",i),e.addCommand("mceMoveForward",function(){r(1)}),e.addCommand("mceMoveBackward",function(){r(-1)}),e.addCommand("mceMakeAbsolute",function(){o()}),e.addButton("moveforward",{title:"layer.forward_desc",cmd:"mceMoveForward"}),e.addButton("movebackward",{title:"layer.backward_desc",cmd:"mceMoveBackward"}),e.addButton("absolute",{title:"layer.absolute_desc",cmd:"mceMakeAbsolute"}),e.addButton("insertlayer",{title:"layer.insertlayer_desc",cmd:"mceInsertLayer"}),e.on("init",function(){tinymce.Env.ie&&e.getDoc().execCommand("2D-Position",!1,!0)}),e.on("mouseup",function(n){var r=t(n.target);r&&e.dom.setAttrib(r,"data-mce-style","")}),e.on("mousedown",function(n){var r,i=n.target,o=e.getDoc();tinymce.Env.gecko&&(t(i)?"on"!==o.designMode&&(o.designMode="on",i=o.body,r=i.parentNode,r.removeChild(i),r.appendChild(i)):"on"==o.designMode&&(o.designMode="off"))}),e.on("NodeChange",n)});

static/js/lib/tinymce/plugins/legacyoutput/plugin.min.js

1(function(e){e.on("AddEditor",function(e){e.editor.settings.inline_styles=!1}),e.PluginManager.add("legacyoutput",function(t){t.on("init",function(){var n="p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img",r=e.explode(t.settings.font_size_style_values),i=t.schema;t.formatter.register({alignleft:{selector:n,attributes:{align:"left"}},aligncenter:{selector:n,attributes:{align:"center"}},alignright:{selector:n,attributes:{align:"right"}},alignjustify:{selector:n,attributes:{align:"justify"}},bold:[{inline:"b",remove:"all"},{inline:"strong",remove:"all"},{inline:"span",styles:{fontWeight:"bold"}}],italic:[{inline:"i",remove:"all"},{inline:"em",remove:"all"},{inline:"span",styles:{fontStyle:"italic"}}],underline:[{inline:"u",remove:"all"},{inline:"span",styles:{textDecoration:"underline"},exact:!0}],strikethrough:[{inline:"strike",remove:"all"},{inline:"span",styles:{textDecoration:"line-through"},exact:!0}],fontname:{inline:"font",attributes:{face:"%value"}},fontsize:{inline:"font",attributes:{size:function(t){return e.inArray(r,t.value)+1}}},forecolor:{inline:"font",attributes:{color:"%value"}},hilitecolor:{inline:"font",styles:{backgroundColor:"%value"}}}),e.each("b,i,u,strike".split(","),function(e){i.addValidElements(e+"[*]")}),i.getElementRule("font")||i.addValidElements("font[face|size|color|style]"),e.each(n.split(","),function(e){var t=i.getElementRule(e);t&&(t.attributes.align||(t.attributes.align={},t.attributesOrder.push("align")))})})})})(tinymce);

static/js/lib/tinymce/plugins/link/plugin.min.js

1tinymce.PluginManager.add("link",function(e){function t(){function t(){var t=[{text:"None",value:""}];return tinymce.each(e.settings.link_list,function(e){t.push({text:e.text||e.title,value:e.value||e.url,menu:e.menu})}),t}function n(t){var n=[{text:"None",value:""}];return tinymce.each(e.settings.rel_list,function(e){n.push({text:e.text||e.title,value:e.value,selected:t===e.value})}),n}function r(t){var n=[{text:"None",value:""}];return e.settings.target_list||n.push({text:"New window",value:"_blank"}),tinymce.each(e.settings.target_list,function(e){n.push({text:e.text||e.title,value:e.value,selected:t===e.value})}),n}function i(){s||0!==f.text.length||this.parent().parent().find("#text")[0].value(this.value())}var o,a,s,l,c,u,d,f={},p=e.selection,h=e.dom;o=p.getNode(),a=h.getParent(o,"a[href]"),a&&p.select(a),f.text=s=p.getContent({format:"text"}),f.href=a?h.getAttrib(a,"href"):"",f.target=a?h.getAttrib(a,"target"):"",f.rel=a?h.getAttrib(a,"rel"):"","IMG"==o.nodeName&&(f.text=s=" "),e.settings.link_list&&(c={type:"listbox",label:"Link list",values:t(),onselect:function(e){var t=l.find("#text");(!t.value()||e.lastControl&&t.value()==e.lastControl.text())&&t.value(e.control.text()),l.find("#href").value(e.control.value())}}),e.settings.target_list!==!1&&(d={name:"target",type:"listbox",label:"Target",values:r(f.target)}),e.settings.rel_list&&(u={name:"rel",type:"listbox",label:"Rel",values:n(f.rel)}),l=e.windowManager.open({title:"Insert link",data:f,body:[{name:"href",type:"filepicker",filetype:"file",size:40,autofocus:!0,label:"Url",onchange:i,onkeyup:i},{name:"text",type:"textbox",size:40,label:"Text to display",onchange:function(){f.text=this.value()}},c,u,d],onSubmit:function(t){var n=t.data;return n.href?(n.text!=s?a?(e.focus(),a.innerHTML=n.text,h.setAttribs(a,{href:n.href,target:n.target?n.target:null,rel:n.rel?n.rel:null}),p.select(a)):e.insertContent(h.createHTML("a",{href:n.href,target:n.target?n.target:null,rel:n.rel?n.rel:null},n.text)):e.execCommand("mceInsertLink",!1,{href:n.href,target:n.target,rel:n.rel?n.rel:null}),void 0):(e.execCommand("unlink"),void 0)}})}e.addButton("link",{icon:"link",tooltip:"Insert/edit link",shortcut:"Ctrl+K",onclick:t,stateSelector:"a[href]"}),e.addButton("unlink",{icon:"unlink",tooltip:"Remove link(s)",cmd:"unlink",stateSelector:"a[href]"}),e.addShortcut("Ctrl+K","",t),this.showDialog=t,e.addMenuItem("link",{icon:"link",text:"Insert link",shortcut:"Ctrl+K",onclick:t,stateSelector:"a[href]",context:"insert",prependToContext:!0})});

static/js/lib/tinymce/plugins/lists/plugin.min.js

1tinymce.PluginManager.add("lists",function(e){var t=this;e.on("init",function(){function n(e){function t(t){var r,i,o;i=e[t?"startContainer":"endContainer"],o=e[t?"startOffset":"endOffset"],1==i.nodeType&&(r=b.create("span",{"data-mce-type":"bookmark"}),i.hasChildNodes()?(o=Math.min(o,i.childNodes.length-1),i.insertBefore(r,i.childNodes[o])):i.appendChild(r),i=r,o=0),n[t?"startContainer":"endContainer"]=i,n[t?"startOffset":"endOffset"]=o}var n={};return t(!0),t(),n}function r(e){function t(t){function n(e){for(var t=e.parentNode.firstChild,n=0;t;){if(t==e)return n;(1!=t.nodeType||"bookmark"!=t.getAttribute("data-mce-type"))&&n++,t=t.nextSibling}return-1}var r,i,o;r=o=e[t?"startContainer":"endContainer"],i=e[t?"startOffset":"endOffset"],1==r.nodeType&&(t?(i=n(r),r=r.parentNode):(i=n(r),r=r.parentNode),b.remove(o)),e[t?"startContainer":"endContainer"]=r,e[t?"startOffset":"endOffset"]=i}t(!0),t();var n=b.createRng();n.setStart(e.startContainer,e.startOffset),n.setEnd(e.endContainer,e.endOffset),C.setRng(n)}function i(e){return e&&/^(OL|UL)$/.test(e.nodeName)}function o(e){return e.parentNode.firstChild==e}function a(e){return e.parentNode.lastChild==e}function s(t){return t&&!!e.schema.getTextBlockElements()[t.nodeName]}function l(t,n){var r,i;if(e.settings.forced_root_block&&(n=n||e.settings.forced_root_block),i=n?b.create(n):b.createFragment(),t)for(;r=t.firstChild;)i.appendChild(r);return e.settings.forced_root_block||i.appendChild(b.create("br")),i.hasChildNodes()||tinymce.isIE||(i.innerHTML='<br data-mce-bogus="1">'),i}function c(){return tinymce.grep(C.getSelectedBlocks(),function(e){return"LI"==e.nodeName})}function u(){return tinymce.grep(C.getSelectedBlocks(),s)}function d(e,t,n){var r,i;n=n||l(t),r=b.createRng(),r.setStartAfter(t),r.setEndAfter(e),i=r.extractContents(),b.isEmpty(i)||b.insertAfter(i,e),b.isEmpty(n)||b.insertAfter(n,e),b.isEmpty(t.parentNode)&&b.remove(t.parentNode),b.remove(t)}function f(e){var t,n;if(t=e.nextSibling,t&&i(t)&&t.nodeName==e.nodeName){for(;n=t.firstChild;)e.appendChild(n);b.remove(t)}if(t=e.previousSibling,t&&i(t)&&t.nodeName==e.nodeName){for(;n=t.firstChild;)e.insertBefore(n,e.firstChild);b.remove(t)}}function m(e){tinymce.each(tinymce.grep(b.select("ol,ul",e)),function(e){var t,n=e.parentNode;"LI"==n.nodeName&&n.firstChild==e&&(t=n.previousSibling,t&&"LI"==t.nodeName&&(t.appendChild(e),b.isEmpty(n)&&b.remove(n))),i(n)&&(t=n.previousSibling,t&&"LI"==t.nodeName&&t.appendChild(e))})}function p(){var e,t=n(C.getRng(!0));return tinymce.each(c(),function(t){var n,r;return n=t.previousSibling,n&&"UL"==n.nodeName?(n.appendChild(t),void 0):n&&"LI"==n.nodeName&&i(n.lastChild)?(n.lastChild.appendChild(t),void 0):(n=t.nextSibling,n&&"UL"==n.nodeName?(n.insertBefore(t,n.firstChild),void 0):(n&&"LI"==n.nodeName&&i(t.lastChild)||(n=t.previousSibling,n&&"LI"==n.nodeName&&(r=b.create(t.parentNode.nodeName),n.appendChild(r),r.appendChild(t)),e=!0),void 0))}),r(t),e}function h(){var e,t=n(C.getRng(!0));return tinymce.each(c(),function(t){var n,r=t.parentNode,s=r.parentNode;if(o(t)&&a(t))if("LI"==s.nodeName)b.insertAfter(t,s);else{if(!i(s))return;b.remove(r,!0)}else if(o(t))if("LI"==s.nodeName)b.insertAfter(t,s),n=b.create("LI"),n.appendChild(r),b.insertAfter(n,t);else{if(!i(s))return;s.insertBefore(t,r)}else if(a(t))if("LI"==s.nodeName)b.insertAfter(t,s);else{if(!i(s))return;b.insertAfter(t,r)}else{if("LI"==s.nodeName)r=s,n=l(t,"LI");else{if(!i(s))return;n=l(t,"LI")}d(r,t,n),m(r.parentNode)}e=!0}),r(t),e}function g(t){function o(){function t(t){var n,r,i=e.getBody();for(n=a[t?"startContainer":"endContainer"],r=a[t?"startOffset":"endOffset"],1==n.nodeType&&(n=n.childNodes[Math.min(r,n.childNodes.length-1)]||n);n.parentNode!=i;){if(s(n))return n;if(/^(TD|TH)$/.test(n.parentNode.nodeName))return n;n=n.parentNode}return n}function n(e,t){var n,r=[];if(!s(e)){for(;e&&(n=e[t?"previousSibling":"nextSibling"],!b.isBlock(n)&&n);)e=n;for(;e;)r.push(e),e=e[t?"nextSibling":"previousSibling"]}return r}var r,i,o=t(!0),l=t();i=n(o,!0),o!=l&&(i=i.concat(n(l).reverse())),tinymce.each(i,function(e){if(!b.isBlock(e)||"BR"==e.nodeName){if(!r||"BR"==e.nodeName){if("BR"==e.nodeName&&(!e.nextSibling||b.isBlock(e.nextSibling)&&"BR"!=e.nextSibling.nodeName))return b.remove(e),!1;r=b.create("p"),c.push(r),e.parentNode.insertBefore(r,e)}return"BR"!=e.nodeName?r.appendChild(e):b.remove(e),e==l?!1:void 0}})}var a=C.getRng(!0),l=n(a),c=u();o(),tinymce.each(c,function(e){var n,r;r=e.previousSibling,r&&i(r)&&r.nodeName==t?(n=r,e=b.rename(e,"LI"),r.appendChild(e)):(n=b.create(t),e.parentNode.insertBefore(n,e),n.appendChild(e),e=b.rename(e,"LI")),f(n)}),r(l)}function v(){var e=n(C.getRng(!0));tinymce.each(c(),function(e){var t,n;for(t=e;t;t=t.parentNode)i(t)&&(n=t);d(n,e)}),r(e)}function y(e){var t=b.getParent(C.getStart(),"OL,UL");if(t)if(t.nodeName==e)v(e);else{var i=n(C.getRng(!0));f(b.rename(t,e)),r(i)}else g(e)}var b=e.dom,C=e.selection;t.backspaceDelete=function(e){function t(e,t){var n=e.startContainer,r=e.startOffset;if(3==n.nodeType&&(t?n.data.length>r:r>0))return n;for(var i=new tinymce.dom.TreeWalker(e.startContainer);n=i[t?"next":"prev"]();)if(3==n.nodeType&&n.data.length>0)return n}function o(e,t){var n,r,o=e.parentNode;for(i(t.lastChild)&&(r=t.lastChild),n=t.lastChild,n&&"BR"==n.nodeName&&e.hasChildNodes()&&b.remove(n);n=e.firstChild;)t.appendChild(n);r&&t.appendChild(r),b.remove(e),b.isEmpty(o)&&b.remove(o)}if(C.isCollapsed()){var a=b.getParent(C.getStart(),"LI");if(a){var s=C.getRng(!0),l=b.getParent(t(s,e),"LI");if(l&&l!=a){var c=n(s);return e?o(l,a):o(a,l),r(c),!0}if(!l&&!e&&v(a.parentNode.nodeName))return!0}}},e.addCommand("Indent",function(){return p()?void 0:!0}),e.addCommand("Outdent",function(){return h()?void 0:!0}),e.addCommand("InsertUnorderedList",function(){y("UL")}),e.addCommand("InsertOrderedList",function(){y("OL")})}),e.on("keydown",function(e){e.keyCode==tinymce.util.VK.BACKSPACE?t.backspaceDelete()&&e.preventDefault():e.keyCode==tinymce.util.VK.DELETE&&t.backspaceDelete(!0)&&e.preventDefault()})});

static/js/lib/tinymce/plugins/media/moxieplayer.swf

1CWS
2xݽ XS8<3&7 (⎊q"BX*K$MuZ]oukwjukwMBPpr̙3g{R0S!QPLCdqH( 6l9aa
3$Ԓ/qV#""F#lvplk(Fު5L@ZfXlmT3u.9yfF2S76kX@(SifimQڜI7-FjlVHL6>*:Ӓ36 .ϰEYh4wΒkO :w$r2&Q= 2HrZ,Q]YxQ]-Mԁ\a-/
4uPZRRR򩂃 xb?~-皚)MY9f}`Y;DJ*j| u[س|}跩84v>[g4ekS;9)Qm<([[mC@Sfy6%v Sئv5M67h䴩 uau6Ҭ6b n@\K^v&H}ͳ/=bҧO&l^ɐg6Чqx9$Kg4Xam{s3ځVP=Yځ:ْۦv8$-f)7O؆& Pgfx;FeY2Ek)W9Z Fϵ N+9pblL$2, 9Yee)͸TCSqvo#o 9:TrthVۿyϦAEm&mCʙ?r1̬\VRٹU1 mnJ\(:hUV4ꄳl,]f%({DV^<A^6?7'(jnqv͚srwwB,o'IR&ԸtM-GWW"_R%~χƠ d#fySF53)K7ksNjcpYnYz5({֘'A6q!x9l}16[6q*,Sf٥Su`KPӖ*) k^Ky5|AM aӦnYmɮ6trayV79oF'A4-ﰓ9re[mfDfɤrRfuטMѢt9ڏR_1z[];8m%cRYT^,T}޼[ͦL7$Xt;79|7Vt}j=Ns8}.lzQ6feF)c
5lm,ǎB㲎n6-ʺ.R9?hތD Iz_7ϸU^n1?Cn!‡Å+[{aO?Cu㈴Qq'6qxN׷?֖sbGU
6[+.j7H3oH6R~tVv~zybU>745!u:Nh>-zw>I[8m~FCN?J*:gS})}v/^L5w>>yww[>mwVor,0/B^?40geq3:%}w3qz-ι0ϟ0J/ѠRD:7s~|zԃktPC{z_QCj8w3_9Drگ=d_ߟe;qYџ^j׮]'׳KSj ۴yKz|IoOOh&=D̩'Yk;:sܝewݓԊU[<{pyca{D`F߹{WG]{~v2y[[^G-=1yy_s]>r5V֫d}W_IJ-Ϭؙz+U7^XcիWl߳ڛӸ!5ӂwo=[?qЪ4m/}Ǖ ۾ #Q}nTzkhȩE7'?i2;ꋙ]nu䧒ޟ|es3Y~ScLﶶz"ɶGa߸8/~U7.vN]'W^4%k[A(:5bec K<G=Աmɛ& IE}oMh7_kYuX{tτu.^i0׸'ս7|{؋=yjUݻgi]Qzg/pyF~~-|aϵ_Z u{}S־{Wպ7*<<}lJC[!˭Q7OgŜh{vpؿ%<j19w檓Xfhvo7jUImNyn̻~J*ݻ{W<Ug嚯6ʉ^ڛ!uk}}CѶi'd^ӭ;7O֭;dvuKS~5&߮1n&xzϼ7&F5 ƾhr]?V`k~l3+Z:Tl{*.߹RQSnB}?2hqG׏|RժQg wԋϮOyݩ_o>skf\T{>ù9G{,02VLkY\2мDXcݫ +Vg6;u֢ Qc|dGXj~bq3ac8yŻZd]yɟd既Çmi}kۘO//#Q/ |t\ٝS|vq;}{/x|UovY\ӳF;?&TsCtJҋ7#Ok;o+_}x“ٕ/rJ7Z[6./fly钺ͬv~ɼעcwD m?V}ŭGG++|-?ڞgj?Zs|U
7:ϦW_ŻD\L+z`uﮎ Դ˖cTjb}K>>E cTP=N?M:/D^gفVUIʂA͟|wpMƜ}Jv.{ѩ&ܻ_nT^~W\=!~mΛEi sׯl}n==%jI/Z_dph|?fW|pu7>TVmNɾۃ^~V+˅ǷmѢEjTpyL:'\7<^ rryV/~#œgo?MW/=68Ǜ=jCCpy COE)T>tWx2Ou:6pǭaEr:}lSsۤ\3`◱C^MzkMG۷Ov ~VOMƎ¤z&}w;:큺ie1*ϞwoeCTL͙}$̜~e͒ si_ye)vlxkuHD|]#7=3dtzo+cw86=̣IFX`BBրIܮsy;K|Wu}Mc-?筛g%Og70Sڼx;tdQp͞[o5ol[ߧy*%=\W5b~^#R;Oxf5ͭ?Bs۶=Rr&YK_/>n?L~zf8s=&4!I7eV\i:64MWjO/ۼ5?1KՌL ^uIи™!m<ЁeOP}˔k{ϛ6muˊ~5xgҲ%lmSG.zAJ +a6ozVz +)aπ+OpbY؃S|O;ں/\ٔ{ݚ(†Y恵OxCdZ~޼Oݫ_MO'5
8wǩnbw_P빗ϊO[30&쵫?m:;aգU5ڞ ϝ+o5=dӵLɎ_ngft>*g̾fl뗾tO7n?_>+<~=QnT`+qOm36%yj'+[g`y87N|JBH/YI7a+-ZgmWt+sG^|^[AKjKN=5j#n|Wc}}AZ{/T8t rNg>0#3g=@l%7~<d9oFb{Vuy%?lOjiX\f<pFbiKЊW+x<VT|?P!^;hr>ckf|z 7O%-̹F6\n
9ͿO=kp&߀gooS4O<&wj4믯&9s?U؞jڨc4uquo]:\M[-(K U撃ϓ_4pu/[卟|XMPZ]ҼU.aaھ{*4o ,}cBHVn̜A=#>bT
10B!XζY%l
11ao=cAh˅ R*^H5:WW-Ѧ8qyfs"G`eY\^6AYL6>i׼ Bd dCJۛlYWΊ.<#ED"rMkl"1 pO_NGkX!Ooɒw/\yR6J?t;s ?V[ dR)ڽ-גϵV!Q =()Xk劃˓ 3͙7RqޒD6G/,M:YCu\w|wvύ1`|>A*H`
12XtUr\&ق'l3^mjkliNY<D,}I+Akdη2$y2lڍgMD%'G)ody+_% 1:^UZ5;,*L&Ik6 իH>mf&&MeUXuZqkNth,xga,C҃Y PDKE!Wϔw>˒6Y8PI }hl~p[a=~wZ<QP,Q=M7#9G,bˠlB)V©*}U@/u7^; 6R1W:䥛6[oE5&٭V̒9ED渒XHUeY$q X,@ Pd"0BxS)p+{ Yft(= QQϴР9Q:odim!<[Sxb/j:ClueSv>-{|OewCjodTL(֦3sF/k$V|l?m.=YZ
13Cl{޲\Dk1j%R*^AzAUPeӷw]kI1S.LfЅV9\nsvkgdhI44ґUm)Y9JTavOɖ*[(1QI[UkyN\Şt<= :[֜C%?皻׉JX.*[W!av.S
14irʝK˕}*Χ3r`"=
15ձљl>Xr2ݪuJ+5K^3%f2[&׊A\>a0oCI2#Huץ"2oli0< ܹ68UZn9 #-n~ʩlU-GM;SiJŗPnn^WYdNQ]A3{\ZJs(wی`Ta٫SohVF]v{]p. J,3Ĭz&,*ptz6PSΥz++e bLd]AQqD:ka9'MON/dzdp^ޥOʼW^SXNdֽ۽D{IdmA!CVe͵ʨ˙+Ϧ{tuDQJ% ryj<yd2nd CZڲ)!LhZc/ׁh;րR?I) 2:116)1{ltZVj3(u9>c9l +*Īut(x:5ztN:EwtbĦn~Η䬟JlUl.p@DK91{l jw)P1roξf[5 =b'kz4 mڸyx*?f[xz0XYCUOrỲWC{$1){x>$vd:Չ'&i)X @^A\m͊~Iӡݑ= `g2)6jiΉJŘOܽS`2yic$E?z6KPP]y^;fuդ%Dw[U :4<Y˱D܂<aL^FU3(H n2\,Fӥ[ؤXe&T1פv鮀túXmܑ *[Y~\,R<],OEĪB=C{ϵ4c'JRdR9y Ogz #._ͨ79)zVM#Wh+-lGX) +k©#&aGi6J f^?+*''e-Sa83e|O 2G U&c{*|MX lU󢙉`YR{Ew!- D*)c ɜ)۬R@\ P(5Ta^I^x=2
16T|hi’ _KKc*Y5625){Z\.
17s`Yq\)[":Nm<]?1-zu m 28Wfug5^ <U
18f5IR|^,Ms S>OODTB',pcr`js&DzLfzB,Vxde1>!qy,zɻk@"`\rY0Yn4(JT{}"  9?06bN~d 5b,'8Rf [bX+h3?Z$)2\p9zsb6ho[ 4RY+,P`˥!X4n(YfD?W8k9:ĐaҚK!tX4ڒf1i3: ,w,#CdYOS<9`zx
19oɵraTC=8,ֲ! aPF]/vptZmd>}Ii A[7~ RBDumנcE76IOj:}RB5JENPFdyz0t9zҷ!Zד~l :P}ϑn<(|+Mz b@-wEa2g&o %v ~*2e?A?HU/a]q=~DoD*keO+xd H>R~_Ery&b\9MXQp|@`
20v ,ZBN$쏛xN<&R<3QuO蚔yFgLR)#k {::fg
21QR)8`T !IjN_T?IlB<d"|l╌><alT>\*~
22({X 32RѾA$XLDgks:KΐnTKYUܞLӝ!t>k$Rk^C
23pPsc@m8 !)}S6NzPqp,2ol:k0@OKŐ?%>_?,
24H i@ DzX6Pڍ{q>hbp〿C˞Ddl9}Ҹ)RN*EJ1" -VJ)%UR*ᠸW~@Uh𸏫!bTM6kޢe+TḵMX2maYOFs1 :'2;WRk+,Q.&[VemZ=lL TQCJ{
25KV RA |%,U . ZPGY= .D5x m$HCE |l"ংl.([ʖgHl-(^me;e (ce((; xA (?eAUAMP~"( 8I% %#ྂ_S.M_s2?)?O3
26~&7@3 ~Y_gr,Wq
27&< ~ ~gB_
280,XP|@[,4V,`DI|0`tf0`\y,X` Re?,X`jk ɿŜk 7 0t&xx3v1vx”1 a S0v0,TP<BQc?Ϗ8 p
29 \!T8r u u[uCE_o|w?\:  p.0v z
30,x
315J!d8F|-(cA=L BÉDh4`
32SAtX` 2" B*P^`z!l;<]Dws `/>h@t1>D#P>
33p qx'9/xD49"?Ox$(^_q \;PT?tM[D ; p><x )PK":CD_KP5"f 0N P F 0`<'qB$D>'$K699W )|ϩsB8y=P38wD&@dpel9sX`b%K9!fz`Mfo
34 `;Oqh90 bwɇ(`?WU琎 Gy z`PS$'_zb7> }
35V
36\9(n pP'o({ \"% '`r^8/sP5/!-]j)5p`% ㅘVy3_I@jd#! 0`</P/ȿT^>L9Oɼ|
37}N{aL<Oi7`&gs6^~<x}yy\;/f—E]ռ_s[c ͅz:v^UAHAHRUv=?UUB~/8 p(Rcoq {tpOAry88!V*i8 `}m0'
38
39RfDEPpVH0/+H)Y9 J?JZt˸b? =Jw4QrefKJk4aރ&JQ%9Y-C>)82.ė.]_/#T+1-r?X3HUH?Tf*gRבʐC+rQP*l*Å9?ked'%6, Ͽ!ʔ'u »d)a91_HH
40 )j@C\5TI ԤI $\-^B,eBr"PxxP
41OJ<kS}clӿ JT6djL$vي*8T}`N
427<Yp+׭'@r0BQ T6DF(0PcP)V(Aќ-@x%H@VZ^H0ƨR{b0*{8WOBNP`<F}PCQ4ʠyHghtEHQQݝPuDdIOQ/MOФ/B5Q
43BP*]4J:sZfTPR'(Tϡ0A5ǡ~51r f1j;vf0jQ9 ĨcB-q-V)>yP| "(yz ƨ$!C?NP/%A)_r(+҆IiC.c8t# 9r!gH 9Hș
44 ׿r[HFA=
45,Ѣѐ8rc g 9X千\8 !7; rM D}9r_M0=94OF@ʡ!h$ę੐~A-D?@~4Drhx69:υt"mJ|/a*!]R8yS!ʩei3 f吟i4b]*+fļu\xkyA!@Z-k :0Z/ ~!:hA
46q M0Րrh DXucbp6nĀ6n;!݂wvv=X^ Ѹڃ/X"`'b0h]hD;c#>A6O@I1:Bj*"1=JtTŨf=yt@t$K)(zB_8ElYz9Xgo,9H/@U+%HĿAz_M;Bz_һ:p ,MP/1G]`v7J-#oâT*ƐT!%h$i܇[HAȏ1FEc!%hyG)AcO @J)BJ4 !%3 %h&yY4ty\yrh>yrh!y Erh1y%ҥj5yCHsEJ0ɫא&#!]C`yY!h=)uɷnC(oC[h U!R@X"%L)&x<\#R ? D*<H~1T/%x2 2uAJq%Iѧ`Yragٲnć߇ > MϢ n!x6epg0:ѯ= F/Iw\ ¯| h9kTu9\W7VIG8GdH
47axrPh0 $x3?Sy_0= 1iOx g}5<}q&a|Ux!Y-AMEX%_ *Dp\c,sp/=<pBr&p"r֞ ?cc{<J_LҗR]F >җ
48]IWjbXC손8(?\n YRpaB:N 롽a İʑa3IDE$a.ҷVFt>~EN"i N"*BvM$@k+@+*텆a1$ mhxG!g0 S،i]$ RLAOQȹY85X]u&{Bf$<A ۃ"/$n/.j0rEO3
49n`G{JFȨԁ}x
50lB62MBĞ812 TM[J^ Lo:-׃AF H>ДhW.!9LPj`c@AFІzfP'!"~696(sQzA0lqAR[@Ezh N=I,="(S3vP:H,{Q}S:h:0Y=E v-=>h)rxӹVPLۃЂ4IB=,0I'>x!aMR&z7!g7`7Ԃpt5㦳jI:gX|q F R^w[ <$l9-<糪D8{J* A 90cY:o9Db"9XN% H;0
51ߑv
52Wai*L$픮$ULy9
53p vCK=[ |!Ƃ\6J@Q5H/eW<AB,AqIAO]G,4\!!g-dD"T;1AԯHCA@.#4&z&(bBU JQJ G+ьoll
54*P
55NiiқTjh ,s@r,
56\9PFR9;COz'kotCӥ[C<v~PHiWAUEP6&GC|-",wEqw ɣ]Kl/\w$l9.\K)-^/y).i{Z2."XkLO[`'bִ>TEae
575 JPw|L*KuUl jv}o:vC -RIE)Y!@cJrֵQ$<$O OD+׃^:1j": 1$u,Q$Ʊ$uQ&q$u<Q%$;Oߑ D'ԉD'ID'D#1N;^$ROM1^O#"0BjZ@TBzW%ccaQW&N=LtCd= YU PK)Êt,4<!3Bl/.,x;ơe#]z֏8/0yaU $ ׾#P_ *0T"p _@+,<<N ^ko`A]!l豝5 T?)@)n`:!oh#ޑvu9%]=GQ3r9=B@AX ΢E : ,``Bd6t2n_v Y4X!}e[-8Uwlk5ш5c%%eHPO<!3 zpCD '^x5pW-o,<é< $vçԏ@ Np79>7B=ʋ%/9\Y4VEꙘVpaURI I{C(3'u#ގcI5qM1Z[ 'Ɂ"f ơf jʪxKƚ,Kʩ_'NVO'cvf͞)*NcW^gH4g1oG)aBtzo Yv\
58ь3xV֌P1d7 > PܵzT(tY(RR80rNZU |yF]щBK?1:ZV!lBr IK 6$pQQ7Q9Y Z%ԃJf M(D7Bm8e[KTn-map_9хZAF}Q v*m`lLR|P)Iȵk/ZĵkI 9!Q^<OƱkM}(Dݯd7$I,'2F_t_5T۵ S?2Zekh=톞XH6SCta&U_uY"\l7$zRޒv9V="B8^vC/ƉRn-"DOz3^QD׈}j-tXvېhF1 5f ;
59"3Mdڻ-qn1`5IL$Q)JThehNG Z*SqS9Tz
60 @k?vZԊէƪ>
61hłv1zqD[WwbAQ B-WnLEcFڻ WŢ&E*ȍPoj>C6L1$"鄤`h:l!Nfp5L}4CRH ^0]"Y=UUꄩLX1t_BxVN +WdOIh@N t=&8c{Jf]wN$F`:N@;9};"<[ $&)ASŀ| ]
62~C>1$00(.
63zRG<^üm(BۘF5WwzMWzEWP )q`/
64U
65*N!8J'T@VLJ;dJNqǖ:x.u.%8[g镏N|$q&-q{7G\R r; bt '!V>O~{I٬lesVZP)}L&cgh@LG|oC"Po`1!(ҿ'X3,D[a
661ORgeNz=Q ?R*C4iD9 TF&N7|1@uK:1y"0!2b-Ņ؅ P<EBmlTZCz;Cz;.3!黌R?CG7w]ga ''ѝ8#S/ǝҧ1vJBΪ5-b݃# +hNFg!5 ٘>-/XvrDi.؂Ey*"3}bx?02'+sÝ(+ax%V5
67KSٹUn; ;tV3*{"ҫH?b^]nH/*7ҏťהCz.K!KKI-rI/+:7OX!j9I?aUͅTN-/gn=eí`ñ Ӌq8ұ6Tc,g nc=cc*] 匵m՞HF6Rkd/"BF2|? 9vJ }וӶѶL>kaΨ
68oͣlmā+!
69fF_ VN?[J^`05M%1"kqN:!{P|X1R_RSۀ H
70KHPk\Ik7eԥe36L%E]LڙBqѢQ%>+̸SVfW>!"ٛJ( ՛JY?HX
713k2"*ET(x=OpdaUD"j2*QEMe?*ER0-LZ8ϯC^b
72Kv-G/]5v%:J681lK.zOPpvL/\??Q*@eTa
73OlK|{R.JyOzyݔn.RgUR ntu͠3 x^%p0)NmԅSsӜ >˩qHبzx ?SƵ6q 6sxOF$:INnK3 a G$CR*-!>KJ2 `@8Ϥ\ٔ"m0wNמrq8R'} cptZ Dqި`fqTKQlJ& I⦒"t?(Poȇ"8MX5-W 5%}:HS9%<{s^<Vx4> > 'n؋<;8l<5pP 2e£+02Ψ_0L}'fALŮ
74T(性l8d܋}j 1`ãZA켢*AJ88Ѯ)5pX{+|ωٸAtl#߽{J 6KFH q?N银iŭA{WiwL@y2d0}y'4vbCy`Nj2ŎJW ӱKE;#]80 Qwwt@$54G0*3Ec<& 胰PؓL:AK_;9enT]XRuuhP"0lw*:vt |;om3.ELBAqIIԛq&IE[qIMۈq6e4S`ݕ7 3nlY}ΥUctVLJE9/6>.ʛXq*N
75
76=t;dMcjL\E"UOQn47O"ewiq!fF@7B6ph˘v?!_яyBp^VЏ6 8qv0}Fp4!`7ر7xN~SG=jdB<D~K?Z4CȐkpe
77<B&d2!C*A9 AvC!shNPʼn6Na4CqER5;k!^W?j`Z@sg#'Ȥ v,Xs s.p+z+X"ʷ;s$xX5WCRJFt%X !D'rSpq4X̤V!B*9 Je ^;F2sq9ۘ.^=J^#4߄6v} 4y;LST<ɡ1'HCo(8 BpHݐBU8T/rY{z8??ƾm@BtRVh,b_LvqH;HԣӂӅdKjwL,P MVլC/56?artK%
78VoW".dgS\sEة' U\U H k/.+\L)ܮaN&K'IP vV,S2T Ow;etʐ09,2)੖_b-x2'?54PhXRfoxpIA.w8(rg-ssRlxWSDױR*nHP q6o.o ;'IJ'A)|z/Iqi|pg*89frg,Ӿ`˼HQ WW^|Q5FqW 278rl7@R%nNyιlgSj&DB*jw tJ'h<1#I8Ѝp`B  ;oV7-6|P+V Wa4z 7}¯W geRүۨ'>xAC1B|˃^89z_(ǃZfdboS1_I]b0!}NXKd|̩DFƩ#}7 8.n q!/kxP2a<)7 KbLōz&Zfif}oaH#h\ @-Lx4Ǹ\`ǃ@yākncB"-\`(RlR7ʟ~s@0U1hHZhD#2 PԹ W\9[Q2SaElGZ0R\oRY"EPTZ_l;;;AEXC.KxyzX .cPط2#CRmہb8ߴO,7vG~%jǥ쇼z9^AWPH\*vlEڄI<=7Лn@ɐWҳjt
798Dŵ"zԟq" V2G:R)Dո(~:gQZI΢\΢B5SEH(w<(NĎiV/UODώU(T8߉C1諪
80ŽQ׉Ѡ
81u WB%-mɷ%7#/ƻt_w%П07H=M!vQ.RO.SLȦGN'A 4TfGm.]ї΀j-I0NaTC2VC! {38[*ePztz CS1խȋ7#wI| 8?7\|Itv_ ?ØH.C؉p);!E<qq gځ0[(wJsR⢼((Y%hiШ}ӏ#i< YaWAP h{l 7y<{j FQ_YSds+H!|BY? Qh<g<֩"B9w62z<(@a0UUdP"FaKT~4i<9}v1O_@$ ] 9N*xޤ_ jY`#C/^ob'O^oB7,]ż׋G7iHp)K\ `ˏ^d e/ԟ.ԗt^qpc"z9z\OC)C8nm;, lz7O \qP }wZTDߡL[ (Aķ8|P54W(e`$!=
82<c^,uImSɜ43gXÍps -5v%ә[3G+7PРưϧJm=+`-hmJs<,=ķ^bK<>ϟ_$i3V@߽0<B/(p|D9V+)Q ]qd1Y!<¾h OZPh( ^|[vPodZZ;e[vYCm}ƿoP~$;%}7.I駾+lj_#7B0bO"n`lNt%_9VNI7AW5# IVpP\JJȥ(O]9v.}a@ǧ+SJ&~̾kfXjh,qmЏjP 2ViYk3l^#x"{.5[xRH[V&hfX$CN© iFD` MdFz?"#t'ŽΨ?dp

static/js/lib/tinymce/plugins/media/plugin.min.js

1tinymce.PluginManager.add("media",function(e,t){function n(e){return-1!=e.indexOf(".mp3")?"audio/mpeg":-1!=e.indexOf(".wav")?"audio/wav":-1!=e.indexOf(".mp4")?"video/mp4":-1!=e.indexOf(".webm")?"video/webm":-1!=e.indexOf(".ogg")?"video/ogg":""}function r(){function t(e){var t,i,o,a;t=n.find("#width")[0],i=n.find("#height")[0],o=t.value(),a=i.value(),n.find("#constrain")[0].checked()&&r&&l&&o&&a&&(e.control==t?(a=Math.round(o/r*a),i.value(a)):(o=Math.round(a/l*o),t.value(o))),r=o,l=a}var n,r,l,c;c=s(e.selection.getNode()),r=c.width,l=c.height,n=e.windowManager.open({title:"Insert/edit video",data:c,bodyType:"tabpanel",body:[{title:"General",type:"form",onShowTab:function(){this.fromJSON(a(this.next().find("#embed").value()))},items:[{name:"source1",type:"filepicker",filetype:"image",size:40,autofocus:!0,label:"Source"},{name:"source2",type:"filepicker",filetype:"image",size:40,label:"Alternative source"},{name:"poster",type:"filepicker",filetype:"image",size:40,label:"Poster"},{type:"container",label:"Dimensions",layout:"flex",direction:"row",align:"center",spacing:5,items:[{name:"width",type:"textbox",maxLength:3,size:3,onchange:t},{type:"label",text:"x"},{name:"height",type:"textbox",maxLength:3,size:3,onchange:t},{name:"constrain",type:"checkbox",checked:!0,text:"Constrain proportions"}]}]},{title:"Embed",type:"panel",layout:"flex",direction:"column",align:"stretch",padding:10,spacing:10,onShowTab:function(){this.find("#embed").value(o(this.parent().toJSON()))},items:[{type:"label",text:"Paste your embed code below:"},{type:"textbox",flex:1,name:"embed",value:i(),multiline:!0,label:"Source"}]}],onSubmit:function(){e.insertContent(o(this.toJSON()))}})}function i(){var t=e.selection.getNode();return t.getAttribute("data-mce-object")?e.selection.getContent():void 0}function o(r){var i="";return r.source1||(tinymce.extend(r,a(r.embed)),r.source1)?(r.source1=e.convertURL(r.source1,"source"),r.source2=e.convertURL(r.source2,"source"),r.source1mime=n(r.source1),r.source2mime=n(r.source2),r.poster=e.convertURL(r.poster,"poster"),r.flashPlayerUrl=e.convertURL(t+"/moxieplayer.swf","movie"),r.embed?i=l(r.embed,r,!0):(tinymce.each(c,function(e){var t,n,i;if(t=e.regex.exec(r.source1)){for(i=e.url,n=0;t[n];n++)i=i.replace("$"+n,function(){return t[n]});r.source1=i,r.type=e.type,r.width=e.w,r.height=e.h}}),r.width=r.width||300,r.height=r.height||150,tinymce.each(r,function(t,n){r[n]=e.dom.encode(t)}),"iframe"==r.type?i+='<iframe src="'+r.source1+'" width="'+r.width+'" height="'+r.height+'"></iframe>':-1!=r.source1mime.indexOf("audio")?e.settings.audio_template_callback?i=e.settings.audio_template_callback(r):i+='<audio controls="controls" src="'+r.source1+'">'+(r.source2?'\n<source src="'+r.source2+'"'+(r.source2mime?' type="'+r.source2mime+'"':"")+" />\n":"")+"</audio>":i=e.settings.video_template_callback?e.settings.video_template_callback(r):'<video width="'+r.width+'" height="'+r.height+'"'+(r.poster?' poster="'+r.poster+'"':"")+' controls="controls">\n'+'<source src="'+r.source1+'"'+(r.source1mime?' type="'+r.source1mime+'"':"")+" />\n"+(r.source2?'<source src="'+r.source2+'"'+(r.source2mime?' type="'+r.source2mime+'"':"")+" />\n":"")+"</video>"),i):""}function a(e){var t={};return new tinymce.html.SaxParser({validate:!1,special:"script,noscript",start:function(e,n){t.source1||"param"!=e||(t.source1=n.map.movie),("iframe"==e||"object"==e||"embed"==e||"video"==e||"audio"==e)&&(t=tinymce.extend(n.map,t)),"source"==e&&(t.source1?t.source2||(t.source2=n.map.src):t.source1=n.map.src)}}).parse(e),t.source1=t.source1||t.src||t.data,t.source2=t.source2||"",t.poster=t.poster||"",t}function s(t){return t.getAttribute("data-mce-object")?a(e.serializer.serialize(t,{selection:!0})):{}}function l(e,t,n){function r(e,t){var n,r,i,o;for(n in t)if(i=""+t[n],e.map[n])for(r=e.length;r--;)o=e[r],o.name==n&&(i?(e.map[n]=i,o.value=i):(delete e.map[n],e.splice(r,1)));else i&&(e.push({name:n,value:i}),e.map[n]=i)}var i=new tinymce.html.Writer,o=0;return new tinymce.html.SaxParser({validate:!1,special:"script,noscript",comment:function(e){i.comment(e)},cdata:function(e){i.cdata(e)},text:function(e,t){i.text(e,t)},start:function(e,a,s){switch(e){case"video":case"object":case"img":case"iframe":r(a,{width:t.width,height:t.height})}if(n)switch(e){case"video":r(a,{poster:t.poster,src:""}),t.source2&&r(a,{src:""});break;case"iframe":r(a,{src:t.source1});break;case"source":if(o++,2>=o&&(r(a,{src:t["source"+o],type:t["source"+o+"mime"]}),!t["source"+o]))return}i.start(e,a,s)},end:function(e){if("video"==e&&n)for(var a=1;2>=a;a++)if(t["source"+a]){var s=[];s.map={},a>o&&(r(s,{src:t["source"+a],type:t["source"+a+"mime"]}),i.start("source",s,!0))}i.end(e)}},new tinymce.html.Schema({})).parse(e),i.getContent()}var c=[{regex:/youtu\.be\/([a-z1-9.-_]+)/,type:"iframe",w:425,h:350,url:"http://www.youtube.com/embed/$1"},{regex:/youtube\.com(.+)v=([^&]+)/,type:"iframe",w:425,h:350,url:"http://www.youtube.com/embed/$2"},{regex:/vimeo\.com\/([0-9]+)/,type:"iframe",w:425,h:350,url:"http://player.vimeo.com/video/$1?title=0&byline=0&portrait=0&color=8dc7dc"},{regex:/maps\.google\.([a-z]{2,3})\/maps\/(.+)msid=(.+)/,type:"iframe",w:425,h:350,url:'http://maps.google.com/maps/ms?msid=$2&output=embed"'}];e.on("ResolveName",function(e){var t;(t=e.target.getAttribute("data-mce-object"))&&(e.name=t)}),e.on("preInit",function(){var t=e.schema.getSpecialElements();tinymce.each("video audio iframe object".split(" "),function(e){t[e]=RegExp("</"+e+"[^>]*>","gi")}),e.schema.addValidElements("object[id|style|width|height|classid|codebase|*],embed[id|style|width|height|type|src|*],video[*],audio[*]");var n=e.schema.getBoolAttrs();tinymce.each("webkitallowfullscreen mozallowfullscreen allowfullscreen".split(" "),function(e){n[e]={}}),e.parser.addNodeFilter("iframe,video,audio,object,embed",function(t,n){for(var r,i,o,a,s,l,c,u=t.length;u--;){for(i=t[u],o=new tinymce.html.Node("img",1),o.shortEnded=!0,l=i.attributes,r=l.length;r--;)a=l[r].name,s=l[r].value,"width"!==a&&"height"!==a&&"style"!==a&&(("data"==a||"src"==a)&&(s=e.convertURL(s,a)),o.attr("data-mce-p-"+a,s));c=i.firstChild&&i.firstChild.value,c&&(o.attr("data-mce-html",escape(c)),o.firstChild=null),o.attr({width:i.attr("width")||"300",height:i.attr("height")||("audio"==n?"30":"150"),style:i.attr("style"),src:tinymce.Env.transparentSrc,"data-mce-object":n,"class":"mce-object mce-object-"+n}),i.replace(o)}}),e.serializer.addAttributeFilter("data-mce-object",function(e,t){for(var n,r,i,o,a,s,l=e.length;l--;){for(n=e[l],r=new tinymce.html.Node(n.attr(t),1),"audio"!=n.attr(t)&&r.attr({width:n.attr("width"),height:n.attr("height")}),r.attr({style:n.attr("style")}),o=n.attributes,i=o.length;i--;){var c=o[i].name;0===c.indexOf("data-mce-p-")&&r.attr(c.substr(11),o[i].value)}a=n.attr("data-mce-html"),a&&(s=new tinymce.html.Node("#text",3),s.raw=!0,s.value=unescape(a),r.append(s)),n.replace(r)}})}),e.on("ObjectSelected",function(e){"audio"==e.target.getAttribute("data-mce-object")&&e.preventDefault()}),e.on("objectResized",function(e){var t,n=e.target;n.getAttribute("data-mce-object")&&(t=n.getAttribute("data-mce-html"),t&&(t=unescape(t),n.setAttribute("data-mce-html",escape(l(t,{width:e.width,height:e.height})))))}),e.addButton("media",{tooltip:"Insert/edit video",onclick:r,stateSelector:"img[data-mce-object=video]"}),e.addMenuItem("media",{icon:"media",text:"Insert video",onclick:r,context:"insert",prependToContext:!0})});

static/js/lib/tinymce/plugins/nonbreaking/plugin.min.js

1tinymce.PluginManager.add("nonbreaking",function(e){e.addCommand("mceNonBreaking",function(){e.insertContent(e.plugins.visualchars&&e.plugins.visualchars.state?'<span data-mce-bogus="1" class="mce-nbsp">&nbsp;</span>':"&nbsp;")}),e.addButton("nonbreaking",{title:"Insert nonbreaking space",cmd:"mceNonBreaking"}),e.addMenuItem("nonbreaking",{text:"Nonbreaking space",cmd:"mceNonBreaking",context:"insert"}),e.getParam("nonbreaking_force_tab")&&e.on("keydown",function(t){9==t.keyCode&&(t.preventDefault(),e.execCommand("mceNonBreaking"),e.execCommand("mceNonBreaking"),e.execCommand("mceNonBreaking"))})});

static/js/lib/tinymce/plugins/noneditable/plugin.min.js

1tinymce.PluginManager.add("noneditable",function(e){function t(){function t(e){var t;if(1===e.nodeType){if(t=e.getAttribute(l),t&&"inherit"!==t)return t;if(t=e.contentEditable,"inherit"!==t)return t}return null}function n(e){for(var n;e;){if(n=t(e))return"false"===n?e:null;e=e.parentNode}}function r(e){for(;e;){if(e.id===p)return e;e=e.parentNode}}function i(e){var t;if(e)for(t=new a(e,e),e=t.current();e;e=t.next())if(3===e.nodeType)return e}function o(n,r){var i,o;return"false"===t(n)&&f.isBlock(n)?(m.select(n),void 0):(o=f.createRng(),"true"===t(n)&&(n.firstChild||n.appendChild(e.getDoc().createTextNode(" ")),n=n.firstChild,r=!0),i=f.create("span",{id:p,"data-mce-bogus":!0},h),r?n.parentNode.insertBefore(i,n):f.insertAfter(i,n),o.setStart(i.firstChild,1),o.collapse(!0),m.setRng(o),i)}function s(e){var t,n,o,a;if(e)t=m.getRng(!0),t.setStartBefore(e),t.setEndBefore(e),n=i(e),n&&n.nodeValue.charAt(0)==h&&(n=n.deleteData(0,1)),f.remove(e,!0),m.setRng(t);else for(o=r(m.getStart());(e=f.get(p))&&e!==a;)o!==e&&(n=i(e),n&&n.nodeValue.charAt(0)==h&&(n=n.deleteData(0,1)),f.remove(e,!0)),a=e}function u(){function e(e,n){var r,i,o,s,l;if(r=c.startContainer,i=c.startOffset,3==r.nodeType){if(l=r.nodeValue.length,i>0&&l>i||(n?i==l:0===i))return}else{if(!(r.childNodes.length>i))return n?null:e;var u=!n&&i>0?i-1:i;r=r.childNodes[u],r.hasChildNodes()&&(r=r.firstChild)}for(o=new a(r,e);s=o[n?"prev":"next"]();){if(3===s.nodeType&&s.nodeValue.length>0)return;if("true"===t(s))return s}return e}var r,i,l,c,u;s(),l=m.isCollapsed(),r=n(m.getStart()),i=n(m.getEnd()),(r||i)&&(c=m.getRng(!0),l?(r=r||i,(u=e(r,!0))?o(u,!0):(u=e(r,!1))?o(u,!1):m.select(r)):(c=m.getRng(!0),r&&c.setStartBefore(r),i&&c.setEndAfter(i),m.setRng(c)))}function d(i){function o(e,t){for(;e=e[t?"previousSibling":"nextSibling"];)if(3!==e.nodeType||e.nodeValue.length>0)return e}function l(e,t){m.select(e),m.collapse(t)}function d(i){function o(e){for(var t=l;t;){if(t===e)return;t=t.parentNode}f.remove(e),u()}function a(){var r,a,s=e.schema.getNonEmptyElements();for(a=new tinymce.dom.TreeWalker(l,e.getBody());(r=i?a.prev():a.next())&&!s[r.nodeName.toLowerCase()]&&!(3===r.nodeType&&tinymce.trim(r.nodeValue).length>0);)if("false"===t(r))return o(r),!0;return n(r)?!0:!1}var s,l,c,d;if(m.isCollapsed()){if(s=m.getRng(!0),l=s.startContainer,c=s.startOffset,l=r(l)||l,d=n(l))return o(d),!1;if(3==l.nodeType&&(i?c>0:l.nodeValue.length>c))return!0;if(1==l.nodeType&&(l=l.childNodes[c]||l),a())return!1}return!0}var p,h,g,v,y=i.keyCode;if(g=m.getStart(),v=m.getEnd(),p=n(g)||n(v),p&&(112>y||y>124)&&y!=c.DELETE&&y!=c.BACKSPACE){if((tinymce.isMac?i.metaKey:i.ctrlKey)&&(67==y||88==y||86==y))return;if(i.preventDefault(),y==c.LEFT||y==c.RIGHT){var b=y==c.LEFT;if(e.dom.isBlock(p)){var C=b?p.previousSibling:p.nextSibling,x=new a(C,C),w=b?x.prev():x.next();l(w,!b)}else l(p,b)}}else if(y==c.LEFT||y==c.RIGHT||y==c.BACKSPACE||y==c.DELETE){if(h=r(g)){if(y==c.LEFT||y==c.BACKSPACE)if(p=o(h,!0),p&&"false"===t(p)){if(i.preventDefault(),y!=c.LEFT)return f.remove(p),void 0;l(p,!0)}else s(h);if(y==c.RIGHT||y==c.DELETE)if(p=o(h),p&&"false"===t(p)){if(i.preventDefault(),y!=c.RIGHT)return f.remove(p),void 0;l(p,!1)}else s(h)}if((y==c.BACKSPACE||y==c.DELETE)&&!d(y==c.BACKSPACE))return i.preventDefault(),!1}}var f=e.dom,m=e.selection,p="mce_noneditablecaret",h="";e.on("mousedown",function(n){var r=e.selection.getNode();"false"===t(r)&&r==n.target&&u()}),e.on("mouseup keyup",u),e.on("keydown",d)}function n(t){var n=o.length,r=t.content,a=tinymce.trim(i);if("raw"!=t.format){for(;n--;)r=r.replace(o[n],function(t){var n=arguments,i=n[n.length-2];return i>0&&'"'==r.charAt(i-1)?t:'<span class="'+a+'" data-mce-content="'+e.dom.encode(n[0])+'">'+e.dom.encode("string"==typeof n[1]?n[1]:n[0])+"</span>"});t.content=r}}var r,i,o,a=tinymce.dom.TreeWalker,s="contenteditable",l="data-mce-"+s,c=tinymce.util.VK;r=" "+tinymce.trim(e.getParam("noneditable_editable_class","mceEditable"))+" ",i=" "+tinymce.trim(e.getParam("noneditable_noneditable_class","mceNonEditable"))+" ",o=e.getParam("noneditable_regexp"),o&&!o.length&&(o=[o]),e.on("PreInit",function(){t(),o&&e.on("BeforeSetContent",n),e.parser.addAttributeFilter("class",function(e){for(var t,n,o=e.length;o--;)n=e[o],t=" "+n.attr("class")+" ",-1!==t.indexOf(r)?n.attr(l,"true"):-1!==t.indexOf(i)&&n.attr(l,"false")}),e.serializer.addAttributeFilter(l,function(e){for(var t,n=e.length;n--;)t=e[n],o&&t.attr("data-mce-content")?(t.name="#text",t.type=3,t.raw=!0,t.value=t.attr("data-mce-content")):(t.attr(s,null),t.attr(l,null))}),e.parser.addAttributeFilter(s,function(e){for(var t,n=e.length;n--;)t=e[n],t.attr(l,t.attr(s)),t.attr(s,null)})})});

static/js/lib/tinymce/plugins/pagebreak/plugin.min.js

1tinymce.PluginManager.add("pagebreak",function(e){var t,n="mce-pagebreak",r=e.getParam("pagebreak_separator","<!-- pagebreak -->"),i='<img src="'+tinymce.Env.transparentSrc+'" class="'+n+'" data-mce-resize="false" />';t=RegExp(r.replace(/[\?\.\*\[\]\(\)\{\}\+\^\$\:]/g,function(e){return"\\"+e}),"g"),e.addCommand("mcePageBreak",function(){e.execCommand("mceInsertContent",0,i)}),e.addButton("pagebreak",{title:"Page break",cmd:"mcePageBreak"}),e.addMenuItem("pagebreak",{text:"Page break",icon:"pagebreak",cmd:"mcePageBreak",context:"insert"}),e.on("ResolveName",function(t){"IMG"==t.target.nodeName&&e.dom.hasClass(t.target,n)&&(t.name="pagebreak")}),e.on("click",function(t){t=t.target,"IMG"===t.nodeName&&e.dom.hasClass(t,n)&&e.selection.select(t)}),e.on("PreInit",function(){e.parser.addNodeFilter("#comment",function(e){for(var t,n,r=e.length;r--;)t=e[r],-1!==t.value.indexOf("pagebreak")&&(n=new tinymce.html.Node("img",1),n.attr({src:tinymce.Env.transparentSrc,"class":"mce-pagebreak","data-mce-resize":"false"}),t.replace(n))}),e.serializer.addNodeFilter("img",function(e){for(var t,n,r=e.length;r--;)t=e[r],n=t.attr("class"),n&&-1!==n.indexOf("mce-pagebreak")&&(t.type=8,t.value="pagebreak")})})});

static/js/lib/tinymce/plugins/paste/plugin.min.js

1(function(e,t){"use strict";function n(e,t){for(var n,r=[],i=0;e.length>i;++i){if(n=s[e[i]]||o(e[i]),!n)throw"module definition dependecy not found: "+e[i];r.push(n)}t.apply(null,r)}function r(e,r,i){if("string"!=typeof e)throw"invalid module definition, module id must be defined and be a string";if(r===t)throw"invalid module definition, dependencies must be specified";if(i===t)throw"invalid module definition, definition function must be specified";n(r,function(){s[e]=i.apply(null,arguments)})}function i(e){return!!s[e]}function o(t){for(var n=e,r=t.split(/[.\/]/),i=0;r.length>i;++i){if(!n[r[i]])return;n=n[r[i]]}return n}function a(n){for(var r=0;n.length>r;r++){for(var i=e,o=n[r],a=o.split(/[.\/]/),l=0;a.length-1>l;++l)i[a[l]]===t&&(i[a[l]]={}),i=i[a[l]];i[a[a.length-1]]=s[o]}}var s={},l="tinymce/pasteplugin/Clipboard",c="tinymce/Env",u="tinymce/util/Tools",d="tinymce/util/VK",f="tinymce/pasteplugin/WordFilter",p="tinymce/html/DomParser",m="tinymce/html/Schema",h="tinymce/html/Serializer",g="tinymce/html/Node",v="tinymce/pasteplugin/Quirks",y="tinymce/pasteplugin/Plugin",b="tinymce/PluginManager";r(l,[c,u,d],function(e,n,r){function i(){return!e.gecko&&("ClipboardEvent"in window||e.webkit&&"FocusEvent"in window)}return function(o){function a(){return 100>(new Date).getTime()-f}function s(e,t){return n.each(t,function(t){e=t.constructor==RegExp?e.replace(t,""):e.replace(t[0],t[1])}),e}function l(t){var n=o.fire("PastePreProcess",{content:t});(o.settings.paste_remove_styles||o.settings.paste_remove_styles_if_webkit!==!1&&e.webkit)&&(n.content=n.content.replace(/ style=\"[^\"]+\"/g,"")),n.isDefaultPrevented()||o.insertContent(n.content)}function c(e){e=o.dom.encode(e),e=s(e,[[/\n\n/g,"</p><p>"],[/^(.*<\/p>)(<p>)$/,"<p>$1"],[/\n/g,"<br />"]]);var t=o.fire("PastePreProcess",{content:e});t.isDefaultPrevented()||o.insertContent(t.content)}function u(){var e=(o.inline?o.getBody():o.getDoc().documentElement).scrollTop,t=o.dom.add(o.getBody(),"div",{id:"mcePasteBin",contentEditable:!1,style:"position: absolute; top: "+e+"px; left: 0; background: red; width: 1px; height: 1px; overflow: hidden"},'<div contentEditable="true">X</div>');return t}function d(){var e=o.dom.get("mcePasteBin");o.dom.unbind(e),o.dom.remove(e)}var f;o.on("keydown",function(e){e.shiftKey&&86==e.keyCode&&(f=(new Date).getTime())}),i()?o.on("paste",function(e){function t(e,t){for(var r=0;n.types.length>r;r++)if(n.types[r]==e)return t(n.getData(e)),!0}var n=e.clipboardData;n&&(e.preventDefault(),a()?t("text/plain",c)||t("text/html",l):t("text/html",l)||t("text/plain",c))}):e.ie?o.on("init",function(){var e=o.dom;o.dom.bind(o.getBody(),"paste",function(n){var r;if(n.preventDefault(),a()&&e.doc.dataTransfer)return c(e.doc.dataTransfer.getData("Text")),t;var i=u();e.bind(i,"paste",function(e){e.stopPropagation(),r=!0});var s=o.selection.getRng(),f=e.doc.body.createTextRange();if(f.moveToElementText(i.firstChild),f.execCommand("Paste"),d(),!r)return o.windowManager.alert("Clipboard access not possible."),t;var p=i.firstChild.innerHTML;o.selection.setRng(s),l(p)})}):(o.on("init",function(){o.dom.bind(o.getBody(),"paste",function(e){e.preventDefault(),o.windowManager.alert("Please use Ctrl+V/Cmd+V keyboard shortcuts to paste contents.")})}),o.on("keydown",function(e){if(r.metaKeyPressed(e)&&86==e.keyCode&&!e.isDefaultPrevented()){var t=u(),n=o.selection.getRng();o.selection.select(t,!0),o.dom.bind(t,"paste",function(e){e.stopPropagation(),setTimeout(function(){d(),o.lastRng=n,o.selection.setRng(n),l(t.firstChild.innerHTML)},0)})}})),o.paste_block_drop&&o.on("dragend dragover draggesture dragdrop drop drag",function(e){e.preventDefault(),e.stopPropagation()}),this.paste=l,this.pasteText=c}}),r(f,[u,p,m,h,g],function(e,n,r,i,o){return function(a){var s=e.each;a.on("PastePreProcess",function(l){function c(e){s(e,function(e){f=e.constructor==RegExp?f.replace(e,""):f.replace(e[0],e[1])})}function u(e){function t(e,t,a,s){var l=e._listLevel||i;l!=i&&(i>l?n&&(n=n.parent.parent):(r=n,n=null)),n&&n.name==a?n.append(e):(r=r||n,n=new o(a,1),s>1&&n.attr("start",""+s),e.wrap(n)),e.name="li",t.value="";var c=t.next;c&&3==c.type&&(c.value=c.value.replace(/^\u00a0+/,"")),l>i&&r.lastChild.append(n),i=l}for(var n,r,i=1,a=e.getAll("p"),s=0;a.length>s;s++)if(e=a[s],"p"==e.name&&e.firstChild){for(var l="",c=e.firstChild;c&&!(l=c.value);)c=c.firstChild;if(/^\s*[\u2022\u00b7\u00a7\u00d8o\u25CF]\s*$/.test(l)){t(e,c,"ul");continue}if(/^\s*\w+\./.test(l)){var u=/([0-9])\./.exec(l),d=1;u&&(d=parseInt(u[1],10)),t(e,c,"ol",d);continue}n=null}}function d(n,r){if("p"===n.name){var i=/mso-list:\w+ \w+([0-9]+)/.exec(r);i&&(n._listLevel=parseInt(i[1],10))}if(a.getParam("paste_retain_style_properties","none")){var o="";if(e.each(a.dom.parseStyle(r),function(e,n){switch(n){case"horiz-align":return n="text-align",t;case"vert-align":return n="vertical-align",t;case"font-color":case"mso-foreground":return n="color",t;case"mso-background":case"mso-highlight":n="background"}("all"==p||m&&m[n])&&(o+=n+":"+e+";")}),o)return o}return null}var f=l.content,p,m;if(p=a.settings.paste_retain_style_properties,p&&(m=e.makeMap(p)),a.settings.paste_enable_default_filters!==!1&&/class="?Mso|style="[^"]*\bmso-|style='[^'']*\bmso-|w:WordDocument/i.test(l.content)){l.wordContent=!0,c([/<!--[\s\S]+?-->/gi,/<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi,[/<(\/?)s>/gi,"<$1strike>"],[/&nbsp;/gi,"\u00a0"],[/<span\s+style\s*=\s*"\s*mso-spacerun\s*:\s*yes\s*;?\s*"\s*>([\s\u00a0]*)<\/span>/gi,function(e,t){return t.length>0?t.replace(/./," ").slice(Math.floor(t.length/2)).split("").join("\u00a0"):""}]]);var h=new r({valid_elements:"@[style],-strong/b,-em/i,-span,-p,-ol,-ul,-li,-h1,-h2,-h3,-h4,-h5,-h6,-table,-tr,-td[colspan|rowspan],-th,-thead,-tfoot,-tbody,-a[!href]"}),g=new n({},h);g.addAttributeFilter("style",function(e){for(var t=e.length,n;t--;)n=e[t],n.attr("style",d(n,n.attr("style"))),"span"!=n.name||n.attributes.length||n.unwrap()});var v=g.parse(f);u(v),l.content=new i({},h).serialize(v)}})}}),r(v,[c,u],function(e,t){return function(n){function r(e){n.on("PastePreProcess",function(t){t.content=e(t.content)})}function i(e,n){return t.each(n,function(t){e=t.constructor==RegExp?e.replace(t,""):e.replace(t[0],t[1])}),e}function o(e){return e=i(e,[/^[\s\S]*<!--StartFragment-->|<!--EndFragment-->[\s\S]*$/g,[/<span class="Apple-converted-space">\u00a0<\/span>/g,"\u00a0"],/<br>$/])}function a(e){if(!this.explorerBlocksRegExp){var r=[];t.each(n.schema.getBlockElements(),function(e,t){r.push(t)}),this.explorerBlocksRegExp=RegExp("(?:<br>&nbsp;[\\s\\r\\n]+|<br>)*(</?("+r.join("|")+")[^>]*>)(?:<br>&nbsp;[\\s\\r\\n]+|<br>)*","g")}return e=i(e,[[this.explorerBlocksRegExp,"$1"]]),e=i(e,[[/<br><br>/g,"<BR><BR>"],[/<br>/g," "],[/<BR><BR>/g,"<br>"]])}e.webkit&&r(o),e.ie&&r(a)}}),r(y,[b,l,f,v],function(e,t,n,r){e.add("paste",function(e){var i=this;i.clipboard=new t(e),i.quirks=new r(e),i.wordFilter=new n(e),e.addCommand("mceInsertClipboardContent",function(e,t){t.content&&i.clipboard.paste(t.content),t.text&&i.clipboard.pasteText(t.text)})})}),a([l,f,v,y])})(this);

static/js/lib/tinymce/plugins/preview/plugin.min.js

1tinymce.PluginManager.add("preview",function(e){e.addCommand("mcePreview",function(){e.windowManager.open({title:"Preview",width:parseInt(e.getParam("plugin_preview_width","650"),10),height:parseInt(e.getParam("plugin_preview_height","500"),10),html:'<iframe src="javascript:\'\'" frameborder="0"></iframe>',buttons:{text:"Close",onclick:function(){this.parent().parent().close()}},onPostRender:function(){var t,n=this.getEl("body").firstChild.contentWindow.document,r="";tinymce.each(tinymce.explode(e.settings.content_css),function(t){r+='<link type="text/css" rel="stylesheet" href="'+e.documentBaseURI.toAbsolute(t)+'">'}),t="<!DOCTYPE html><html><head>"+r+"</head>"+"<body>"+e.getContent()+"</body>"+"</html>",n.open(),n.write(t),n.close()}})}),e.addButton("preview",{title:"Preview",cmd:"mcePreview"}),e.addMenuItem("preview",{text:"Preview",cmd:"mcePreview",context:"view"})});

static/js/lib/tinymce/plugins/print/plugin.min.js

1tinymce.PluginManager.add("print",function(e){e.addCommand("mcePrint",function(){e.getWin().print()}),e.addButton("print",{title:"Print",cmd:"mcePrint"}),e.addMenuItem("print",{text:"Print",cmd:"mcePrint",icon:"print",shortcut:"Ctrl+P",context:"file"})});

static/js/lib/tinymce/plugins/save/plugin.min.js

1tinymce.PluginManager.add("save",function(e){function t(){var t,n;return t=tinymce.DOM.getParent(e.id,"form"),!e.getParam("save_enablewhendirty")||e.isDirty()?(tinymce.triggerSave(),(n=e.getParam("save_onsavecallback"))?(e.execCallback("save_onsavecallback",e)&&(e.startContent=tinymce.trim(e.getContent({format:"raw"})),e.nodeChanged()),void 0):(t?(e.isNotDirty=!0,(!t.onsubmit||t.onsubmit())&&("function"==typeof t.submit?t.submit():e.windowManager.alert("Error: Form submit field collision.")),e.nodeChanged()):e.windowManager.alert("Error: No form element found."),void 0)):void 0}function n(){var t,n=tinymce.trim(e.startContent);return(t=e.getParam("save_oncancelcallback"))?(e.execCallback("save_oncancelcallback",e),void 0):(e.setContent(n),e.undoManager.clear(),e.nodeChanged(),void 0)}function r(){var t=this;e.on("nodeChange",function(){t.disabled(!e.isDirty())})}e.addCommand("mceSave",t),e.addCommand("mceCancel",n),e.addButton("save",{text:"Save",cmd:"mceSave",disabled:!0,onPostRender:r}),e.addButton("cancel",{text:"Cancel",icon:!1,cmd:"mceCancel",disabled:!0,onPostRender:r}),e.addShortcut("ctrl+s","","mceSave")});

static/js/lib/tinymce/plugins/searchreplace/plugin.min.js

1(function(){function e(e,t,n,r,i){function o(e,t){if(t=t||0,!e[0])throw"findAndReplaceDOMText cannot handle zero-length matches";var n=e.index;if(t>0){var r=e[t];if(!r)throw"Invalid capture group";n+=e[0].indexOf(r),e[0]=r}return[n,n+e[0].length,[e[0]]]}function a(e){var t;if(3===e.nodeType)return e.data;if(m[e.nodeName])return"";if(t="",(f[e.nodeName]||p[e.nodeName])&&(t+="\n"),e=e.firstChild)do t+=a(e);while(e=e.nextSibling);return t}function s(e,t,n){var r,i,o,a,s=[],l=0,c=e,u=t.shift(),d=0;e:for(;;){if((f[c.nodeName]||p[c.nodeName])&&l++,3===c.nodeType&&(!i&&c.length+l>=u[1]?(i=c,a=u[1]-l):r&&s.push(c),!r&&c.length+l>u[0]&&(r=c,o=u[0]-l),l+=c.length),r&&i){if(c=n({startNode:r,startNodeIndex:o,endNode:i,endNodeIndex:a,innerNodes:s,match:u[2],matchIndex:d}),l-=i.length-a,r=null,i=null,s=[],u=t.shift(),d++,!u)break}else{if(!m[c.nodeName]&&c.firstChild){c=c.firstChild;continue}if(c.nextSibling){c=c.nextSibling;continue}}for(;;){if(c.nextSibling){c=c.nextSibling;break}if(c.parentNode===e)break e;c=c.parentNode}}}function l(e){var t;if("function"!=typeof e){var n=e.nodeType?e:d.createElement(e);t=function(e,t){var r=n.cloneNode(!1);return r.setAttribute("data-mce-index",t),e&&r.appendChild(d.createTextNode(e)),r}}else t=e;return function(e){var n,r,i,o=e.startNode,a=e.endNode,s=e.matchIndex;if(o===a){var l=o;i=l.parentNode,e.startNodeIndex>0&&(n=d.createTextNode(l.data.substring(0,e.startNodeIndex)),i.insertBefore(n,l));var c=t(e.match[0],s);return i.insertBefore(c,l),e.endNodeIndex<l.length&&(r=d.createTextNode(l.data.substring(e.endNodeIndex)),i.insertBefore(r,l)),l.parentNode.removeChild(l),c}n=d.createTextNode(o.data.substring(0,e.startNodeIndex)),r=d.createTextNode(a.data.substring(e.endNodeIndex));for(var u=t(o.data.substring(e.startNodeIndex),s),f=[],m=0,p=e.innerNodes.length;p>m;++m){var h=e.innerNodes[m],g=t(h.data,s);h.parentNode.replaceChild(g,h),f.push(g)}var v=t(a.data.substring(0,e.endNodeIndex),s);return i=o.parentNode,i.insertBefore(n,o),i.insertBefore(u,o),i.removeChild(o),i=a.parentNode,i.insertBefore(v,a),i.insertBefore(r,a),i.removeChild(a),v}}var c,u,d,f,m,p,h=[],g=0;if(d=t.ownerDocument,f=i.getBlockElements(),m=i.getWhiteSpaceElements(),p=i.getShortEndedElements(),u=a(t)){if(e.global)for(;c=e.exec(u);)h.push(o(c,r));else c=u.match(e),h.push(o(c,r));return h.length&&(g=h.length,s(t,h,l(n))),g}}function t(t){function n(){var e=tinymce.ui.Factory.create({type:"window",layout:"flex",pack:"center",align:"center",onClose:function(){t.focus(),a=!1,s.unmarkAllMatches()},buttons:[{text:"Find",onclick:function(){e.find("form")[0].submit()}},{text:"Replace",disabled:!0,onclick:function(){s.replace(e.find("#replace").value())||e.statusbar.items().slice(1).disabled(!0)}},{text:"Replace all",disabled:!0,onclick:function(){s.replaceAll(e.find("#replace").value()),e.statusbar.items().slice(1).disabled(!0)}},{type:"spacer",flex:1},{text:"Prev",disabled:!0,onclick:function(){s.prev()}},{text:"Next",disabled:!0,onclick:function(){s.next()}}],title:"Find and replace",items:{type:"form",padding:20,labelGap:30,spacing:10,onsubmit:function(t){var n,r,i,o,a;return t.preventDefault(),i=e.find("#case").checked(),a=e.find("#words").checked(),o=e.find("#find").value(),o.length?(o=o.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),o=a?"\\b"+o+"\\b":o,r=RegExp(o,i?"g":"gi"),n=s.markAllMatches(r),n?s.first():tinymce.ui.MessageBox.alert("Could not find the specified string."),e.statusbar.items().slice(1).disabled(0===n),void 0):(s.unmarkAllMatches(),e.statusbar.items().slice(1).disabled(!0),void 0)},items:[{type:"textbox",name:"find",size:40,label:"Find",value:t.selection.getNode().src},{type:"textbox",name:"replace",size:40,label:"Replace with"},{type:"checkbox",name:"case",text:"Match case",label:" "},{type:"checkbox",name:"words",text:"Whole words",label:" "}]}}).renderTo().reflow();a=!0}function r(e){var t=e.parentNode;t.insertBefore(e.firstChild,e),e.parentNode.removeChild(e)}function i(e,n){function r(){var r,a;for(r=n?t.getBody()[e?"firstChild":"lastChild"]:s[e?"endContainer":"startContainer"],a=new tinymce.dom.TreeWalker(r,t.getBody());r=a.current();){if(1==r.nodeType&&"SPAN"==r.nodeName&&null!==r.getAttribute("data-mce-index"))for(l=r.getAttribute("data-mce-index"),i=r.firstChild;r=a.current();){if(1==r.nodeType&&"SPAN"==r.nodeName&&null!==r.getAttribute("data-mce-index")){if(r.getAttribute("data-mce-index")!==l)return;o=r.firstChild}a[e?"next":"prev"]()}a[e?"next":"prev"]()}}var i,o,a=t.selection,s=a.getRng(!0),l=-1;return e=e!==!1,r(),i&&o&&(t.focus(),e?(s.setStart(i,0),s.setEnd(o,o.length)):(s.setStart(o,0),s.setEnd(i,i.length)),a.scrollIntoView(i.parentNode),a.setRng(s)),l}function o(e){e.parentNode.removeChild(e)}var a,s=this,l=-1;s.init=function(e){e.addMenuItem("searchreplace",{text:"Find and replace",shortcut:"Ctrl+F",onclick:n,separator:"before",context:"edit"}),e.addButton("searchreplace",{tooltip:"Find and replace",shortcut:"Ctrl+F",onclick:n}),e.shortcuts.add("Ctrl+F","",n)},s.markAllMatches=function(n){var r,i;return i=t.dom.create("span",{"class":"mce-match-marker","data-mce-bogus":1}),r=t.getBody(),s.unmarkAllMatches(r),e(n,r,i,!1,t.schema)},s.first=function(){return l=i(!0,!0),-1!==l},s.next=function(){return l=i(!0),-1!==l},s.prev=function(){return l=i(!1),-1!==l},s.replace=function(e,n,a){var s,c,u,d,f,m;if(-1===l&&(l=i(n)),m=i(n),u=t.getBody(),c=tinymce.toArray(u.getElementsByTagName("span")),c.length)for(s=0;c.length>s;s++)if(d=f=c[s].getAttribute("data-mce-index"),a||d===l)for(e.length?(c[s].firstChild.nodeValue=e,r(c[s])):o(c[s]);c[++s];){if(d=c[s].getAttribute("data-mce-index"),d!==f){s--;break}o(c[s])}return-1==m&&(m=i(n,!0)),l=m,a&&t.selection.setCursorLocation(t.getBody(),0),t.undoManager.add(),-1!==l},s.replaceAll=function(e){s.replace(e,!0,!0)},s.unmarkAllMatches=function(){var e,n,i;for(i=t.getBody(),n=i.getElementsByTagName("span"),e=n.length;e--;)i=n[e],i.getAttribute("data-mce-index")&&r(i)},t.on("beforeaddundo keydown",function(e){return a?(e.preventDefault(),!1):void 0})}tinymce.PluginManager.add("searchreplace",t)})();

static/js/lib/tinymce/plugins/spellchecker/plugin.min.js

1(function(e,t){"use strict";function n(e,t){for(var n,r=[],i=0;e.length>i;++i){if(n=s[e[i]]||o(e[i]),!n)throw"module definition dependecy not found: "+e[i];r.push(n)}t.apply(null,r)}function r(e,r,i){if("string"!=typeof e)throw"invalid module definition, module id must be defined and be a string";if(r===t)throw"invalid module definition, dependencies must be specified";if(i===t)throw"invalid module definition, definition function must be specified";n(r,function(){s[e]=i.apply(null,arguments)})}function i(e){return!!s[e]}function o(t){for(var n=e,r=t.split(/[.\/]/),i=0;r.length>i;++i){if(!n[r[i]])return;n=n[r[i]]}return n}function a(n){for(var r=0;n.length>r;r++){for(var i=e,o=n[r],a=o.split(/[.\/]/),l=0;a.length-1>l;++l)i[a[l]]===t&&(i[a[l]]={}),i=i[a[l]];i[a[a.length-1]]=s[o]}}var s={},l="tinymce/spellcheckerplugin/DomTextMatcher",c="tinymce/spellcheckerplugin/Plugin",u="tinymce/PluginManager",d="tinymce/util/Tools",f="tinymce/ui/Menu",p="tinymce/dom/DOMUtils",m="tinymce/util/JSONRequest";r(l,[],function(){return function(e,t,n){function r(e){if(!e[0])throw"findAndReplaceDOMText cannot handle zero-length matches";var t=e.index;return[t,t+e[0].length,[e[0]]]}function i(e){var t;if(3===e.nodeType)return e.data;if(g[e.nodeName])return"";if(t="",(h[e.nodeName]||v[e.nodeName])&&(t+="\n"),e=e.firstChild)do t+=i(e);while(e=e.nextSibling);return t}function o(e,t,n){var r,i,o,a,s=[],l=0,c=e,u=t.shift(),d=0;e:for(;;){if((h[c.nodeName]||v[c.nodeName])&&l++,3===c.nodeType&&(!i&&c.length+l>=u[1]?(i=c,a=u[1]-l):r&&s.push(c),!r&&c.length+l>u[0]&&(r=c,o=u[0]-l),l+=c.length),r&&i){if(c=n({startNode:r,startNodeIndex:o,endNode:i,endNodeIndex:a,innerNodes:s,match:u[2],matchIndex:d}),l-=i.length-a,r=null,i=null,s=[],u=t.shift(),d++,!u)break}else{if(!g[c.nodeName]&&c.firstChild){c=c.firstChild;continue}if(c.nextSibling){c=c.nextSibling;continue}}for(;;){if(c.nextSibling){c=c.nextSibling;break}if(c.parentNode===e)break e;c=c.parentNode}}}function a(e){var t;if("function"!=typeof e){var n=e.nodeType?e:m.createElement(e);t=function(e,t){var r=n.cloneNode(!1);return r.setAttribute("data-mce-index",t),e&&r.appendChild(m.createTextNode(e)),r}}else t=e;return function r(e){var n,r,i,o=e.startNode,a=e.endNode,s=e.matchIndex;if(o===a){var l=o;i=l.parentNode,e.startNodeIndex>0&&(n=m.createTextNode(l.data.substring(0,e.startNodeIndex)),i.insertBefore(n,l));var c=t(e.match[0],s);return i.insertBefore(c,l),e.endNodeIndex<l.length&&(r=m.createTextNode(l.data.substring(e.endNodeIndex)),i.insertBefore(r,l)),l.parentNode.removeChild(l),c}n=m.createTextNode(o.data.substring(0,e.startNodeIndex)),r=m.createTextNode(a.data.substring(e.endNodeIndex));for(var u=t(o.data.substring(e.startNodeIndex),s),d=[],f=0,p=e.innerNodes.length;p>f;++f){var h=e.innerNodes[f],g=t(h.data,s);h.parentNode.replaceChild(g,h),d.push(g)}var v=t(a.data.substring(0,e.endNodeIndex),s);return i=o.parentNode,i.insertBefore(n,o),i.insertBefore(u,o),i.removeChild(o),i=a.parentNode,i.insertBefore(v,a),i.insertBefore(r,a),i.removeChild(a),v}}function s(e){var t=[];return l(function(n,r){e(n,r)&&t.push(n)}),d=t,this}function l(e){for(var t=0,n=d.length;n>t&&e(d[t],t)!==!1;t++);return this}function c(e){return d.length&&(p=d.length,o(t,d,a(e))),this}var u,d=[],f,p=0,m,h,g,v;if(m=t.ownerDocument,h=n.getBlockElements(),g=n.getWhiteSpaceElements(),v=n.getShortEndedElements(),f=i(t),f&&e.global)for(;u=e.exec(f);)d.push(r(u));return{text:f,count:p,matches:d,each:l,filter:s,mark:c}}}),r(c,[l,u,d,f,p,m],function(e,n,r,i,o,a){n.add("spellchecker",function(n){function s(e){for(var t in e)return!1;return!0}function l(e,t){var a=[],s=h[t];r.each(s,function(e){a.push({text:e,onclick:function(){n.insertContent(e),u()}})}),a.push.apply(a,[{text:"-"},{text:"Ignore",onclick:function(){f(e,t)}},{text:"Ignore all",onclick:function(){f(e,t,!0)}},{text:"Finish",onclick:p}]);var l=new i({items:a,context:"contextmenu",onhide:function(){l.remove()}});l.renderTo(document.body);var c=o.DOM.getPos(n.getContentAreaContainer()),d=n.dom.getPos(e);c.x+=d.x,c.y+=d.y,l.moveTo(c.x,c.y+e.offsetHeight)}function c(){function r(e){return n.setProgressState(!1),s(e)?(n.windowManager.alert("No misspellings found"),t):(h=e,i.filter(function(t){return!!e[t[2][0]]}).mark(n.dom.create("span",{"class":"mce-spellchecker-word","data-mce-bogus":1})),i=null,n.fire("SpellcheckStart"),t)}var i,o=[],l={};return g?(p(),t):(g=!0,i=new e(/\w+/g,n.getBody(),n.schema).each(function(e){l[e[2][0]]||(o.push(e[2][0]),l[e[2][0]]=!0)}),n.settings.spellcheck_callback=function(e,t,r){a.sendRPC({url:n.settings.spellchecker_rpc_url,method:e,params:{lang:"en",words:t},success:function(e){r(e)},error:function(e,t){n.windowManager.alert("Error: "+e+"\nData:"+t.responseText),n.setProgressState(!1),i=null}})},n.setProgressState(!0),n.settings.spellcheck_callback("spellcheck",o,r),t)}function u(){n.dom.select("span.mce-spellchecker-word").length||p()}function d(e){var t=e.parentNode;t.insertBefore(e.firstChild,e),e.parentNode.removeChild(e)}function f(e,t,i){i?r.each(n.dom.select("span.mce-spellchecker-word"),function(e){var n=e.innerText||e.textContent;n==t&&d(e)}):d(e),u()}function p(){var e,t,r;for(g=!1,r=n.getBody(),t=r.getElementsByTagName("span"),e=t.length;e--;)r=t[e],r.getAttribute("data-mce-index")&&d(r);n.fire("SpellcheckEnd")}function m(e){var t,r,i,o=-1,a,s;for(e=""+e,t=n.getBody().getElementsByTagName("span"),r=0;t.length>r&&(i=t[r],"mce-spellchecker-word"!=i.className||(o=i.getAttribute("data-mce-index"),o===e&&(o=e,a||(a=i.firstChild),s=i.firstChild),o===e||!s));r++);var l=n.dom.createRng();return l.setStart(a,0),l.setEnd(s,s.length),n.selection.setRng(l),l}var h,g;n.on("click",function(e){if("mce-spellchecker-word"==e.target.className){e.preventDefault();var t=m(e.target.getAttribute("data-mce-index"));l(e.target,""+t)}}),n.addMenuItem("spellchecker",{text:"Spellcheck",context:"tools",onclick:c,selectable:!0,onPostRender:function(){var e=this;n.on("SpellcheckStart SpellcheckEnd",function(){e.active(g)})}}),n.addButton("spellchecker",{tooltip:"Spellcheck",onclick:c,onPostRender:function(){var e=this;n.on("SpellcheckStart SpellcheckEnd",function(){e.active(g)})}})})}),a([l,c])})(this);

static/js/lib/tinymce/plugins/tabfocus/plugin.min.js

1tinymce.PluginManager.add("tabfocus",function(e){function t(e){9===e.keyCode&&e.preventDefault()}function n(t){function n(t){function n(e){return"BODY"===e.nodeName||"hidden"!=e.type&&"none"!=e.style.display&&"hidden"!=e.style.visibility&&n(e.parentNode)}function o(e){return e.attributes.tabIndex.specified||"INPUT"==e.nodeName||"TEXTAREA"==e.nodeName}function l(e){return!o(e)&&"-1"!=e.getAttribute("tabindex")&&n(e)}if(s=r.select(":input:enabled,*[tabindex]:not(iframe)"),i(s,function(t,n){return t.id==e.id?(a=n,!1):void 0}),t>0){for(c=a+1;s.length>c;c++)if(l(s[c]))return s[c]}else for(c=a-1;c>=0;c--)if(l(s[c]))return s[c];return null}var a,s,l,c;9===t.keyCode&&(l=o(e.getParam("tab_focus",e.getParam("tabfocus_elements",":prev,:next"))),1==l.length&&(l[1]=l[0],l[0]=":prev"),s=t.shiftKey?":prev"==l[0]?n(-1):r.get(l[0]):":next"==l[1]?n(1):r.get(l[1]),s&&(s.id&&(e=tinymce.get(s.id||s.name))?e.focus():window.setTimeout(function(){tinymce.Env.webkit||window.focus(),s.focus()},10),t.preventDefault()))}var r=tinymce.DOM,i=tinymce.each,o=tinymce.explode;e.on("keyup",t),tinymce.Env.gecko?e.on("keypress keydown",n):e.on("keydown",n)});

static/js/lib/tinymce/plugins/table/plugin.min.js

1(function(e,t){"use strict";function n(e,t){for(var n,r=[],i=0;e.length>i;++i){if(n=s[e[i]]||o(e[i]),!n)throw"module definition dependecy not found: "+e[i];r.push(n)}t.apply(null,r)}function r(e,r,i){if("string"!=typeof e)throw"invalid module definition, module id must be defined and be a string";if(r===t)throw"invalid module definition, dependencies must be specified";if(i===t)throw"invalid module definition, definition function must be specified";n(r,function(){s[e]=i.apply(null,arguments)})}function i(e){return!!s[e]}function o(t){for(var n=e,r=t.split(/[.\/]/),i=0;r.length>i;++i){if(!n[r[i]])return;n=n[r[i]]}return n}function a(n){for(var r=0;n.length>r;r++){for(var i=e,o=n[r],a=o.split(/[.\/]/),l=0;a.length-1>l;++l)i[a[l]]===t&&(i[a[l]]={}),i=i[a[l]];i[a[a.length-1]]=s[o]}}var s={},l="tinymce/tableplugin/TableGrid",c="tinymce/util/Tools",u="tinymce/Env",d="tinymce/tableplugin/Quirks",f="tinymce/util/VK",p="tinymce/tableplugin/CellSelection",m="tinymce/dom/TreeWalker",h="tinymce/tableplugin/Plugin",g="tinymce/PluginManager";r(l,[c,u],function(e,n){function r(e,t){return parseInt(e.getAttribute(t)||1,10)}var i=e.each;return function(o,a){function s(){var e=0;A=[],i(["thead","tbody","tfoot"],function(t){var n=D.select("> "+t+" tr",a);i(n,function(n,o){o+=e,i(D.select("> td, > th",n),function(e,n){var i,a,s,l;if(A[o])for(;A[o][n];)n++;for(s=r(e,"rowspan"),l=r(e,"colspan"),a=o;o+s>a;a++)for(A[a]||(A[a]=[]),i=n;n+l>i;i++)A[a][i]={part:t,real:a==o&&i==n,elm:e,rowspan:s,colspan:l}})}),e+=n.length})}function l(e,t){return e=e.cloneNode(t),e.removeAttribute("id"),e}function c(e,n){var r;return r=A[n],r?r[e]:t}function u(e,t,n){e&&(n=parseInt(n,10),1===n?e.removeAttribute(t,1):e.setAttribute(t,n,1))}function d(e){return e&&(D.hasClass(e.elm,"mce-item-selected")||e==L)}function f(){var e=[];return i(a.rows,function(n){i(n.cells,function(r){return D.hasClass(r,"mce-item-selected")||r==L.elm?(e.push(n),!1):t})}),e}function p(){var e=D.createRng();e.setStartAfter(a),e.setEndAfter(a),o.setRng(e),D.remove(a)}function m(r){var o;return e.walk(r,function(e){var a;return 3==e.nodeType?(i(D.getParents(e.parentNode,null,r).reverse(),function(e){e=l(e,!1),o?a&&a.appendChild(e):o=a=e,a=e}),a&&(a.innerHTML=n.ie?"&nbsp;":'<br data-mce-bogus="1" />'),!1):t},"childNodes"),r=l(r,!1),u(r,"rowSpan",1),u(r,"colSpan",1),o?r.appendChild(o):n.ie||(r.innerHTML='<br data-mce-bogus="1" />'),r}function h(){var e=D.createRng(),n;return i(D.select("tr",a),function(e){0===e.cells.length&&D.remove(e)}),0===D.select("tr",a).length?(e.setStartAfter(a),e.setEndAfter(a),o.setRng(e),D.remove(a),t):(i(D.select("thead,tbody,tfoot",a),function(e){0===e.rows.length&&D.remove(e)}),s(),n=A[Math.min(A.length-1,B.y)],n&&(o.select(n[Math.min(n.length-1,B.x)].elm,!0),o.collapse(!0)),t)}function g(e,t,n,r){var i,o,a,s,l;for(i=A[t][e].elm.parentNode,a=1;n>=a;a++)if(i=D.getNext(i,"tr")){for(o=e;o>=0;o--)if(l=A[t+a][o].elm,l.parentNode==i){for(s=1;r>=s;s++)D.insertAfter(m(l),l);break}if(-1==o)for(s=1;r>=s;s++)i.insertBefore(m(i.cells[0]),i.cells[0])}}function v(){i(A,function(e,t){i(e,function(e,n){var i,o,a;if(d(e)&&(e=e.elm,i=r(e,"colspan"),o=r(e,"rowspan"),i>1||o>1)){for(u(e,"rowSpan",1),u(e,"colSpan",1),a=0;i-1>a;a++)D.insertAfter(m(e),e);g(n,t,o-1,i)}})})}function y(t,n,r){var o,a,l,f,p,m,g,y,b,C,x;if(t?(o=S(t),a=o.x,l=o.y,f=a+(n-1),p=l+(r-1)):(B=M=null,i(A,function(e,t){i(e,function(e,n){d(e)&&(B||(B={x:n,y:t}),M={x:n,y:t})})}),a=B.x,l=B.y,f=M.x,p=M.y),y=c(a,l),b=c(f,p),y&&b&&y.part==b.part){for(v(),s(),y=c(a,l).elm,u(y,"colSpan",f-a+1),u(y,"rowSpan",p-l+1),g=l;p>=g;g++)for(m=a;f>=m;m++)A[g]&&A[g][m]&&(t=A[g][m].elm,t!=y&&(C=e.grep(t.childNodes),i(C,function(e){y.appendChild(e)}),C.length&&(C=e.grep(y.childNodes),x=0,i(C,function(e){"BR"==e.nodeName&&D.getAttrib(e,"data-mce-bogus")&&x++<C.length-1&&y.removeChild(e)})),D.remove(t)));h()}}function b(e){var n,o,a,s,c,f,p,h,g;for(i(A,function(r,o){return i(r,function(r){return d(r)&&(r=r.elm,c=r.parentNode,f=l(c,!1),n=o,e)?!1:t}),e?!n:t}),s=0;A[0].length>s;s++)if(A[n][s]&&(o=A[n][s].elm,o!=a)){if(e){if(n>0&&A[n-1][s]&&(h=A[n-1][s].elm,g=r(h,"rowSpan"),g>1)){u(h,"rowSpan",g+1);continue}}else if(g=r(o,"rowspan"),g>1){u(o,"rowSpan",g+1);continue}p=m(o),u(p,"colSpan",o.colSpan),f.appendChild(p),a=o}f.hasChildNodes()&&(e?c.parentNode.insertBefore(f,c):D.insertAfter(f,c))}function C(e){var n,o;i(A,function(r){return i(r,function(r,i){return d(r)&&(n=i,e)?!1:t}),e?!n:t}),i(A,function(t,i){var a,s,l;t[n]&&(a=t[n].elm,a!=o&&(l=r(a,"colspan"),s=r(a,"rowspan"),1==l?e?(a.parentNode.insertBefore(m(a),a),g(n,i,s-1,l)):(D.insertAfter(m(a),a),g(n,i,s-1,l)):u(a,"colSpan",a.colSpan+1),o=a))})}function x(){var t=[];i(A,function(n){i(n,function(n,o){d(n)&&-1===e.inArray(t,o)&&(i(A,function(e){var t=e[o].elm,n;n=r(t,"colSpan"),n>1?u(t,"colSpan",n-1):D.remove(t)}),t.push(o))})}),h()}function w(){function e(e){var t,n,o;t=D.getNext(e,"tr"),i(e.cells,function(e){var t=r(e,"rowSpan");t>1&&(u(e,"rowSpan",t-1),n=S(e),g(n.x,n.y,1,1))}),n=S(e.cells[0]),i(A[n.y],function(e){var t;e=e.elm,e!=o&&(t=r(e,"rowSpan"),1>=t?D.remove(e):u(e,"rowSpan",t-1),o=e)})}var t;t=f(),i(t.reverse(),function(t){e(t)}),h()}function _(){var e=f();return D.remove(e),h(),e}function N(){var e=f();return i(e,function(t,n){e[n]=l(t,!0)}),e}function E(e,n){var r=f(),o=r[n?0:r.length-1],a=o.cells.length;e&&(i(A,function(e){var n;return a=0,i(e,function(e){e.real&&(a+=e.colspan),e.elm.parentNode==o&&(n=1)}),n?!1:t}),n||e.reverse(),i(e,function(e){var t,r=e.cells.length,i;for(t=0;r>t;t++)i=e.cells[t],u(i,"colSpan",1),u(i,"rowSpan",1);for(t=r;a>t;t++)e.appendChild(m(e.cells[r-1]));for(t=a;r>t;t++)D.remove(e.cells[t]);n?o.parentNode.insertBefore(e,o):D.insertAfter(e,o)}),D.removeClass(D.select("td.mce-item-selected,th.mce-item-selected"),"mce-item-selected"))}function S(e){var n;return i(A,function(r,o){return i(r,function(r,i){return r.elm==e?(n={x:i,y:o},!1):t}),!n}),n}function k(e){B=S(e)}function T(){var e,t;return e=t=0,i(A,function(n,r){i(n,function(n,i){var o,a;d(n)&&(n=A[r][i],i>e&&(e=i),r>t&&(t=r),n.real&&(o=n.colspan-1,a=n.rowspan-1,o&&i+o>e&&(e=i+o),a&&r+a>t&&(t=r+a)))})}),{x:e,y:t}}function R(e){var t,n,r,i,o,a,s,l,c,u;if(M=S(e),B&&M){for(t=Math.min(B.x,M.x),n=Math.min(B.y,M.y),r=Math.max(B.x,M.x),i=Math.max(B.y,M.y),o=r,a=i,u=n;a>=u;u++)e=A[u][t],e.real||t>t-(e.colspan-1)&&(t-=e.colspan-1);for(c=t;o>=c;c++)e=A[n][c],e.real||n>n-(e.rowspan-1)&&(n-=e.rowspan-1);for(u=n;i>=u;u++)for(c=t;r>=c;c++)e=A[u][c],e.real&&(s=e.colspan-1,l=e.rowspan-1,s&&c+s>o&&(o=c+s),l&&u+l>a&&(a=u+l));for(D.removeClass(D.select("td.mce-item-selected,th.mce-item-selected"),"mce-item-selected"),u=n;a>=u;u++)for(c=t;o>=c;c++)A[u][c]&&D.addClass(A[u][c].elm,"mce-item-selected")}}var A,B,M,L,D=o.dom;a=a||D.getParent(o.getStart(),"table"),s(),L=D.getParent(o.getStart(),"th,td"),L&&(B=S(L),M=T(),L=c(B.x,B.y)),e.extend(this,{deleteTable:p,split:v,merge:y,insertRow:b,insertCol:C,deleteCols:x,deleteRows:w,cutRows:_,copyRows:N,pasteRows:E,getPos:S,setStartCell:k,setEndCell:R})}}),r(d,[f,u,c],function(e,n,r){function i(e,t){return parseInt(e.getAttribute(t)||1,10)}var o=r.each;return function(r){function a(){function n(n){function a(e,t){var i=e?"previousSibling":"nextSibling",o=r.dom.getParent(t,"tr"),a=o[i];if(a)return v(r,t,a,e),n.preventDefault(),!0;var l=r.dom.getParent(o,"table"),d=o.parentNode,f=d.nodeName.toLowerCase();if("tbody"===f||f===(e?"tfoot":"thead")){var p=s(e,l,d,"tbody");if(null!==p)return c(e,p,t)}return u(e,o,i,l)}function s(e,t,n,i){var o=r.dom.select(">"+i,t),a=o.indexOf(n);if(e&&0===a||!e&&a===o.length-1)return l(e,t);if(-1===a){var s="thead"===n.tagName.toLowerCase()?0:o.length-1;return o[s]}return o[a+(e?-1:1)]}function l(e,t){var n=e?"thead":"tfoot",i=r.dom.select(">"+n,t);return 0!==i.length?i[0]:null}function c(e,t,i){var o=d(t,e);return o&&v(r,i,o,e),n.preventDefault(),!0}function u(e,t,i,o){var s=o[i];if(s)return f(s),!0;var l=r.dom.getParent(o,"td,th");if(l)return a(e,l,n);var c=d(t,!e);return f(c),n.preventDefault(),!1}function d(e,t){var n=e&&e[t?"lastChild":"firstChild"];return n&&"BR"===n.nodeName?r.dom.getParent(n,"td,th"):n}function f(e){r.selection.setCursorLocation(e,0)}function p(){return C==e.UP||C==e.DOWN}function m(e){var t=e.selection.getNode(),n=e.dom.getParent(t,"tr");return null!==n}function h(e){for(var t=0,n=e;n.previousSibling;)n=n.previousSibling,t+=i(n,"colspan");return t}function g(e,n){var r=0,a=0;return o(e.children,function(e,o){return r+=i(e,"colspan"),a=o,r>n?!1:t}),a}function v(e,t,n,i){var o=h(r.dom.getParent(t,"td,th")),a=g(n,o),s=n.childNodes[a],l=d(s,i);f(l||s)}function y(e){var t=r.selection.getNode(),n=r.dom.getParent(t,"td,th"),i=r.dom.getParent(e,"td,th");return n&&n!==i&&b(n,i)}function b(e,t){return r.dom.getParent(e,"TABLE")===r.dom.getParent(t,"TABLE")}var C=n.keyCode;if(p()&&m(r)){var x=r.selection.getNode();setTimeout(function(){y(x)&&a(!n.shiftKey&&C===e.UP,x,n)},0)}}r.on("KeyDown",function(e){n(e)})}function s(){function e(e,t){var n=t.ownerDocument,r=n.createRange(),i;return r.setStartBefore(t),r.setEnd(e.endContainer,e.endOffset),i=n.createElement("body"),i.appendChild(r.cloneContents()),0===i.innerHTML.replace(/<(br|img|object|embed|input|textarea)[^>]*>/gi,"-").replace(/<[^>]+>/g,"").length}r.on("KeyDown",function(t){var n,i,o=r.dom;(37==t.keyCode||38==t.keyCode)&&(n=r.selection.getRng(),i=o.getParent(n.startContainer,"table"),i&&r.getBody().firstChild==i&&e(n,i)&&(n=o.createRng(),n.setStartBefore(i),n.setEndBefore(i),r.selection.setRng(n),t.preventDefault()))})}function l(){r.on("KeyDown SetContent VisualAid",function(){var e;for(e=r.getBody().lastChild;e;e=e.previousSibling)if(3==e.nodeType){if(e.nodeValue.length>0)break}else if(1==e.nodeType&&!e.getAttribute("data-mce-bogus"))break;e&&"TABLE"==e.nodeName&&(r.settings.forced_root_block?r.dom.add(r.getBody(),r.settings.forced_root_block,null,n.ie?"&nbsp;":'<br data-mce-bogus="1" />'):r.dom.add(r.getBody(),"br",{"data-mce-bogus":"1"}))}),r.on("PreProcess",function(e){var t=e.node.lastChild;t&&("BR"==t.nodeName||1==t.childNodes.length&&("BR"==t.firstChild.nodeName||"\u00a0"==t.firstChild.nodeValue))&&t.previousSibling&&"TABLE"==t.previousSibling.nodeName&&r.dom.remove(t)})}function c(){function e(e,t,n,r){var i=3,o=e.dom.getParent(t.startContainer,"TABLE"),a,s,l;return o&&(a=o.parentNode),s=t.startContainer.nodeType==i&&0===t.startOffset&&0===t.endOffset&&r&&("TR"==n.nodeName||n==a),l=("TD"==n.nodeName||"TH"==n.nodeName)&&!r,s||l}function t(){var t=r.selection.getRng(),n=r.selection.getNode(),i=r.dom.getParent(t.startContainer,"TD,TH");if(e(r,t,n,i)){i||(i=n);for(var o=i.lastChild;o.lastChild;)o=o.lastChild;t.setEnd(o,o.nodeValue.length),r.selection.setRng(t)}}r.on("KeyDown",function(){t()}),r.on("MouseDown",function(e){2!=e.button&&t()})}n.webkit&&(a(),c()),n.gecko&&(s(),l())}}),r(p,[l,m,c],function(e,n,r){return function(i){function o(){i.getBody().style.webkitUserSelect="",u&&(i.dom.removeClass(i.dom.select("td.mce-item-selected,th.mce-item-selected"),"mce-item-selected"),u=!1)}var a=i.dom,s,l,c,u=!0;return i.on("MouseDown",function(e){2!=e.button&&(o(),l=a.getParent(e.target,"td,th"),c=a.getParent(l,"table"))}),a.bind(i.getDoc(),"mouseover",function(t){var n,r,o=t.target;if(l&&(s||o!=l)&&("TD"==o.nodeName||"TH"==o.nodeName)){r=a.getParent(o,"table"),r==c&&(s||(s=new e(i.selection,r),s.setStartCell(l),i.getBody().style.webkitUserSelect="none"),s.setEndCell(o),u=!0),n=i.selection.getSel();try{n.removeAllRanges?n.removeAllRanges():n.empty()}catch(d){}t.preventDefault()}}),i.on("MouseUp",function(){function e(e,i){var a=new n(e,e);do{if(3==e.nodeType&&0!==r.trim(e.nodeValue).length)return i?o.setStart(e,0):o.setEnd(e,e.nodeValue.length),t;if("BR"==e.nodeName)return i?o.setStartBefore(e):o.setEndBefore(e),t}while(e=i?a.next():a.prev())}var o,u=i.selection,d,f,p,m,h;if(l){if(s&&(i.getBody().style.webkitUserSelect=""),d=a.select("td.mce-item-selected,th.mce-item-selected"),d.length>0){o=a.createRng(),p=d[0],h=d[d.length-1],o.setStartBefore(p),o.setEndAfter(p),e(p,1),f=new n(p,a.getParent(d[0],"table"));do if("TD"==p.nodeName||"TH"==p.nodeName){if(!a.hasClass(p,"mce-item-selected"))break;m=p}while(p=f.next());e(m),u.setRng(o)}i.nodeChanged(),l=s=c=null}}),i.on("KeyUp",function(){o()}),{clear:o}}}),r(h,[l,d,p,c,m,u,g],function(e,n,r,i,o,a,s){function l(i){function o(e){return e?e.replace(/px$/,""):""}function s(e){return/^[0-9]+$/.test(e)&&(e+="px"),e}function l(){var e=i.dom,t,n;t=i.dom.getParent(i.selection.getStart(),"table"),n={width:o(e.getStyle(t,"width")||e.getAttrib(t,"width")),height:o(e.getStyle(t,"height")||e.getAttrib(t,"height")),cellspacing:e.getAttrib(t,"cellspacing"),cellpadding:e.getAttrib(t,"cellpadding"),border:e.getAttrib(t,"border"),caption:!!e.select("caption",t)[0]},c("left center right".split(" "),function(e){i.formatter.matchNode(t,"align"+e)&&(n.align=e)}),i.windowManager.open({title:"Table properties",items:{type:"form",layout:"grid",columns:2,data:n,defaults:{type:"textbox",maxWidth:50},items:[{label:"Cols",name:"cols",disabled:!0},{label:"Rows",name:"rows",disabled:!0},{label:"Width",name:"width"},{label:"Height",name:"height"},{label:"Cell spacing",name:"cellspacing"},{label:"Cell padding",name:"cellpadding"},{label:"Border",name:"border"},{label:"Caption",name:"caption",type:"checkbox"},{label:"Alignment",minWidth:90,name:"align",type:"listbox",text:"None",maxWidth:null,values:[{text:"None",value:""},{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}]}]},onsubmit:function(){var n=this.toJSON(),r;i.undoManager.transact(function(){i.dom.setAttribs(t,{cellspacing:n.cellspacing,cellpadding:n.cellpadding,border:n.border}),i.dom.setStyles(t,{width:s(n.width),height:s(n.height)}),r=e.select("caption",t)[0],r&&!n.caption&&e.remove(r),!r&&n.caption&&(r=e.create("caption"),a.ie||(r.innerHTML='<br data-mce-bogus="1"/>'),t.insertBefore(r,t.firstChild)),n.align?i.formatter.apply("align"+n.align,{},t):c("left center right".split(" "),function(e){i.formatter.remove("align"+e,{},t)}),i.focus(),i.addVisual()})}})}function u(e,t){i.windowManager.open({title:"Merge cells",body:[{label:"Cols",name:"cols",type:"textbox",size:10},{label:"Rows",name:"rows",type:"textbox",size:10}],onsubmit:function(){var n=this.toJSON();i.undoManager.transact(function(){e.merge(t,n.cols,n.rows)})}})}function d(){var e=i.dom,t,n,r=[];r=i.dom.select("td.mce-item-selected,th.mce-item-selected"),t=i.dom.getParent(i.selection.getStart(),"td,th"),!r.length&&t&&r.push(t),t=t||r[0],n={width:o(e.getStyle(t,"width")||e.getAttrib(t,"width")),height:o(e.getStyle(t,"height")||e.getAttrib(t,"height")),scope:e.getAttrib(t,"scope")},n.type=t.nodeName.toLowerCase(),c("left center right".split(" "),function(e){i.formatter.matchNode(t,"align"+e)&&(n.align=e)}),i.windowManager.open({title:"Cell properties",items:{type:"form",data:n,layout:"grid",columns:2,defaults:{type:"textbox",maxWidth:50},items:[{label:"Width",name:"width"},{label:"Height",name:"height"},{label:"Cell type",name:"type",type:"listbox",text:"None",minWidth:90,maxWidth:null,menu:[{text:"Cell",value:"td"},{text:"Header cell",value:"th"}]},{label:"Scope",name:"scope",type:"listbox",text:"None",minWidth:90,maxWidth:null,menu:[{text:"None",value:""},{text:"Row",value:"row"},{text:"Column",value:"col"},{text:"Row group",value:"rowgroup"},{text:"Column group",value:"colgroup"}]},{label:"Alignment",name:"align",type:"listbox",text:"None",minWidth:90,maxWidth:null,values:[{text:"None",value:""},{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}]}]},onsubmit:function(){var t=this.toJSON();i.undoManager.transact(function(){c(r,function(n){i.dom.setAttrib(n,"scope",t.scope),i.dom.setStyles(n,{width:s(t.width),height:s(t.height)}),t.type&&n.nodeName.toLowerCase()!=t.type&&(n=e.rename(n,t.type)),t.align?i.formatter.apply("align"+t.align,{},n):c("left center right".split(" "),function(e){i.formatter.remove("align"+e,{},n)})}),i.focus()})}})}function f(){var e=i.dom,n,r,a,l,u=[];n=i.dom.getParent(i.selection.getStart(),"table"),r=i.dom.getParent(i.selection.getStart(),"td,th"),c(n.rows,function(n){c(n.cells,function(i){return e.hasClass(i,"mce-item-selected")||i==r?(u.push(n),!1):t})}),a=u[0],l={height:o(e.getStyle(a,"height")||e.getAttrib(a,"height")),scope:e.getAttrib(a,"scope")},l.type=a.parentNode.nodeName.toLowerCase(),c("left center right".split(" "),function(e){i.formatter.matchNode(a,"align"+e)&&(l.align=e)}),i.windowManager.open({title:"Row properties",items:{type:"form",data:l,columns:2,defaults:{type:"textbox"},items:[{type:"listbox",name:"type",label:"Row type",text:"None",maxWidth:null,menu:[{text:"Header",value:"thead"},{text:"Body",value:"tbody"},{text:"Footer",value:"tfoot"}]},{type:"listbox",name:"align",label:"Alignment",text:"None",maxWidth:null,menu:[{text:"None",value:""},{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}]},{label:"Height",name:"height"}]},onsubmit:function(){var t=this.toJSON(),n,r,o;i.undoManager.transact(function(){c(u,function(a){i.dom.setAttrib(a,"scope",t.scope),i.dom.setStyles(a,{height:s(t.height)}),t.type!=a.parentNode.nodeName.toLowerCase()&&(n=e.getParent(a,"table"),r=a.parentNode,o=e.select(n,t.type)[0],o||(o=e.create(t.type),n.firstChild?n.insertBefore(o,n.firstChild):n.appendChild(o)),o.insertBefore(a,o.firstChild),r.hasChildNodes()||e.remove(r)),t.align?i.formatter.apply("align"+t.align,{},a):c("left center right".split(" "),function(e){i.formatter.remove("align"+e,{},a)})}),i.focus()})}})}function p(e){return function(){i.execCommand(e)}}function m(e,t){var n,r,o;for(o="<table><tbody>",n=0;t>n;n++){for(o+="<tr>",r=0;e>r;r++)o+="<td>"+(a.ie?" ":"<br>")+"</td>";o+="</tr>"}o+="</tbody></table>",i.insertContent(o)}function h(e,t){function n(){e.disabled(!i.dom.getParent(i.selection.getStart(),t)),i.selection.selectorChanged(t,function(t){e.disabled(!t)})}i.initialized?n():i.on("init",n)}function g(){h(this,"table")}function v(){h(this,"td,th")}function y(){var e="";e='<table role="presentation" class="mce-grid mce-grid-border">';for(var t=0;10>t;t++){e+="<tr>";for(var n=0;10>n;n++)e+='<td><a href="#" data-mce-index="'+n+","+t+'"></a></td>';e+="</tr>"}return e+="</table>",e+='<div class="mce-text-center">0 x 0</div>'}var b,C,x=this;c([["table","Insert/edit table","mceInsertTable",g],["delete_table","Delete table","mceTableDelete",g],["delete_col","Delete column","mceTableDeleteCol",v],["delete_row","Delete row","mceTableDeleteRow",v],["col_after","Insert column after","mceTableInsertColAfter",v],["col_before","Insert column before","mceTableInsertColBefore",v],["row_after","Insert row after","mceTableInsertRowAfter",v],["row_before","Insert row before","mceTableInsertRowBefore",v],["row_props","Row properties","mceTableRowProps",v],["cell_props","Cell properties","mceTableCellProps",v],["split_cells","Split cells","mceTableSplitCells",v],["merge_cells","Merge cells","mceTableMergeCells",v]],function(e){i.addButton(e[0],{title:e[1],cmd:e[2],onPostRender:e[3]})}),i.addMenuItem("inserttable",{text:"Insert table",icon:"table",context:"table",onhide:function(){i.dom.removeClass(this.menu.items()[0].getEl().getElementsByTagName("a"),"mce-active")},menu:[{type:"container",html:y(),onmousemove:function(e){var t=e.target;if("A"==t.nodeName){var n=i.dom.getParent(t,"table"),r=t.getAttribute("data-mce-index");if(r!=this.lastPos){r=r.split(","),r[0]=parseInt(r[0],10),r[1]=parseInt(r[1],10);for(var o=0;10>o;o++)for(var a=0;10>a;a++)i.dom.toggleClass(n.rows[o].childNodes[a].firstChild,"mce-active",r[0]>=a&&r[1]>=o);n.nextSibling.innerHTML=r[0]+1+" x "+(r[1]+1),this.lastPos=r}}},onclick:function(e){"A"==e.target.nodeName&&this.lastPos&&(e.preventDefault(),m(this.lastPos[0]+1,this.lastPos[1]+1),this.parent().cancel())}}]}),i.addMenuItem("tableprops",{text:"Table properties",context:"table",onPostRender:g,onclick:l}),i.addMenuItem("deletetable",{text:"Delete table",context:"table",onPostRender:g,cmd:"mceTableDelete"}),i.addMenuItem("cell",{separator:"before",text:"Cell",context:"table",menu:[{text:"Cell properties",onclick:p("mceTableCellProps"),onPostRender:v},{text:"Merge cells",onclick:p("mceTableMergeCells"),onPostRender:v},{text:"Split cell",onclick:p("mceTableSplitCells"),onPostRender:v}]}),i.addMenuItem("row",{text:"Row",context:"table",menu:[{text:"Insert row before",onclick:p("mceTableInsertRowBefore"),onPostRender:v},{text:"Insert row after",onclick:p("mceTableInsertRowAfter"),onPostRender:v},{text:"Delete row",onclick:p("mceTableDeleteRow"),onPostRender:v},{text:"Row properties",onclick:p("mceTableRowProps"),onPostRender:v},{text:"-"},{text:"Cut row",onclick:p("mceTableCutRow"),onPostRender:v},{text:"Copy row",onclick:p("mceTableCopyRow"),onPostRender:v},{text:"Paste row before",onclick:p("mceTablePasteRowBefore"),onPostRender:v},{text:"Paste row after",onclick:p("mceTablePasteRowAfter"),onPostRender:v}]}),i.addMenuItem("column",{text:"Column",context:"table",menu:[{text:"Insert column before",onclick:p("mceTableInsertColBefore"),onPostRender:v},{text:"Insert column after",onclick:p("mceTableInsertColAfter"),onPostRender:v},{text:"Delete column",onclick:p("mceTableDeleteCol"),onPostRender:v}]}),a.isIE||i.on("click",function(e){e=e.target,"TABLE"===e.nodeName&&(i.selection.select(e),i.nodeChanged())}),x.quirks=new n(i),i.on("Init",function(){b=i.windowManager,x.cellSelection=new r(i)}),c({mceTableSplitCells:function(e){e.split()},mceTableMergeCells:function(e){var t,n,r;r=i.dom.getParent(i.selection.getStart(),"th,td"),r&&(t=r.rowSpan,n=r.colSpan),i.dom.select("td.mce-item-selected,th.mce-item-selected").length?e.merge():u(e,r)},mceTableInsertRowBefore:function(e){e.insertRow(!0)},mceTableInsertRowAfter:function(e){e.insertRow()},mceTableInsertColBefore:function(e){e.insertCol(!0)},mceTableInsertColAfter:function(e){e.insertCol()},mceTableDeleteCol:function(e){e.deleteCols()},mceTableDeleteRow:function(e){e.deleteRows()},mceTableCutRow:function(e){C=e.cutRows()},mceTableCopyRow:function(e){C=e.copyRows()},mceTablePasteRowBefore:function(e){e.pasteRows(C,!0)},mceTablePasteRowAfter:function(e){e.pasteRows(C)},mceTableDelete:function(e){e.deleteTable()}},function(t,n){i.addCommand(n,function(){var n=new e(i.selection);n&&(t(n),i.execCommand("mceRepaint"),x.cellSelection.clear())})}),c({mceInsertTable:function(){l()},mceTableRowProps:f,mceTableCellProps:d},function(e,t){i.addCommand(t,function(t,n){e(n)})})}var c=i.each;s.add("table",l)}),a([l,d,p,h])})(this);

static/js/lib/tinymce/plugins/template/plugin.min.js

1tinymce.PluginManager.add("template",function(e){function t(){function t(e){var t=e.control.value();t.url?tinymce.util.XHR.send({url:t.url,success:function(e){r=e,n.find("iframe")[0].html(e)}}):(r=t.content,n.find("iframe")[0].html(t.content)),n.find("#description")[0].text(e.control.value().description)}var n,r,o=[];return e.settings.templates?(tinymce.each(e.settings.templates,function(e){o.push({text:e.title,value:{url:e.url,content:e.content,description:e.description}})}),n=e.windowManager.open({title:"Insert template",body:[{type:"listbox",name:"template",flex:0,label:"Templates",values:o,onselect:t},{type:"label",name:"description",label:"Description",text:""},{type:"iframe",minWidth:600,minHeight:400,border:1}],onsubmit:function(){i(!1,r)}}),void 0):(e.windowManager.alert("No templates defined"),void 0)}function n(t,n){function r(e,t){if(e=""+e,t>e.length)for(var n=0;t-e.length>n;n++)e="0"+e;return e}var i="Sun Mon Tue Wed Thu Fri Sat Sun".split(" "),o="Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday".split(" "),a="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),s="January February March April May June July August September October November December".split(" ");return n=n||new Date,t=t.replace("%D","%m/%d/%Y"),t=t.replace("%r","%I:%M:%S %p"),t=t.replace("%Y",""+n.getFullYear()),t=t.replace("%y",""+n.getYear()),t=t.replace("%m",r(n.getMonth()+1,2)),t=t.replace("%d",r(n.getDate(),2)),t=t.replace("%H",""+r(n.getHours(),2)),t=t.replace("%M",""+r(n.getMinutes(),2)),t=t.replace("%S",""+r(n.getSeconds(),2)),t=t.replace("%I",""+((n.getHours()+11)%12+1)),t=t.replace("%p",""+(12>n.getHours()?"AM":"PM")),t=t.replace("%B",""+e.translate(s[n.getMonth()])),t=t.replace("%b",""+e.translate(a[n.getMonth()])),t=t.replace("%A",""+e.translate(o[n.getDay()])),t=t.replace("%a",""+e.translate(i[n.getDay()])),t=t.replace("%%","%")}function r(t){var n=e.dom,r=e.getParam("template_replace_values");o(n.select("*",t),function(e){o(r,function(t,i){n.hasClass(e,i)&&"function"==typeof r[i]&&r[i](e)})})}function i(t,i){function a(e,t){return RegExp("\\b"+t+"\\b","g").test(e.className)}var s,l,c=e.dom,u=e.selection.getContent();o(e.getParam("template_replace_values"),function(e,t){"function"!=typeof e&&(i=i.replace(RegExp("\\{\\$"+t+"\\}","g"),e))}),s=c.create("div",null,i),l=c.select(".mceTmpl",s),l&&l.length>0&&(s=c.create("div",null),s.appendChild(l[0].cloneNode(!0))),o(c.select("*",s),function(t){a(t,e.getParam("template_cdate_classes","cdate").replace(/\s+/g,"|"))&&(t.innerHTML=n(e.getParam("template_cdate_format",e.getLang("template.cdate_format")))),a(t,e.getParam("template_mdate_classes","mdate").replace(/\s+/g,"|"))&&(t.innerHTML=n(e.getParam("template_mdate_format",e.getLang("template.mdate_format")))),a(t,e.getParam("template_selected_content_classes","selcontent").replace(/\s+/g,"|"))&&(t.innerHTML=u)}),r(s),e.execCommand("mceInsertContent",!1,s.innerHTML),e.addVisual()}var o=tinymce.each;e.addCommand("mceInsertTemplate",i),e.addButton("template",{title:"Insert template",onclick:t}),e.addMenuItem("image",{text:"Insert template",onclick:t,context:"insert"}),e.on("PreProcess",function(t){var i=e.dom;o(i.select("div",t.node),function(t){i.hasClass(t,"mceTmpl")&&(o(i.select("*",t),function(t){i.hasClass(t,e.getParam("template_mdate_classes","mdate").replace(/\s+/g,"|"))&&(t.innerHTML=n(e.getParam("template_mdate_format",e.getLang("template.mdate_format"))))}),r(t))})})});

static/js/lib/tinymce/plugins/textcolor/plugin.min.js

1tinymce.PluginManager.add("textcolor",function(e){function t(){var e,t,n=[];for(t=["000000","Black","993300","Burnt orange","333300","Dark olive","003300","Dark green","003366","Dark azure","000080","Navy Blue","333399","Indigo","333333","Very dark gray","800000","Maroon","FF6600","Orange","808000","Olive","008000","Green","008080","Teal","0000FF","Blue","666699","Grayish blue","808080","Gray","FF0000","Red","FF9900","Amber","99CC00","Yellow green","339966","Sea green","33CCCC","Turquoise","3366FF","Royal blue","800080","Purple","999999","Medium gray","FF00FF","Magenta","FFCC00","Gold","FFFF00","Yellow","00FF00","Lime","00FFFF","Aqua","00CCFF","Sky blue","993366","Brown","C0C0C0","Silver","FF99CC","Pink","FFCC99","Peach","FFFF99","Light yellow","CCFFCC","Pale green","CCFFFF","Pale cyan","99CCFF","Light sky blue","CC99FF","Plum","FFFFFF","White"],e=0;t.length>e;e+=2)n.push({text:t[e+1],color:t[e]});return n}function n(){var e,n,r,i,o,a=this;for(e=t(),n='<table class="mce-grid mce-colorbutton-grid" role="presentation" cellspacing="0"><tbody>',r=Math.ceil(Math.sqrt(e.length)),o=0;5>o;o++){for(n+="<tr>",i=0;8>i;i++){var s=e[8*o+i];n+='<td><div id="'+a._id+"-"+(8*o+i)+'"'+' data-mce-color="'+s.color+'"'+' role="option"'+' tabIndex="-1"'+' style="'+(s?"background-color: #"+s.color:"")+'"'+' title="'+s.text+'">'+"</div>"+"</td>"}n+="</tr>"}return n+="</tbody></table>"}function r(t){var n,r=this.parent();(n=t.target.getAttribute("data-mce-color"))&&(r.hidePanel(),n="#"+n,r.showPreview(n),r.hidePanel(),e.execCommand(r.settings.selectcmd,!1,n))}e.addButton("forecolor",{type:"colorbutton",tooltip:"Text color",popoverAlign:"bc-tl",selectcmd:"ForeColor",panel:{html:n,onclick:r}}),e.addButton("backcolor",{type:"colorbutton",tooltip:"Background color",popoverAlign:"bc-tl",selectcmd:"HiliteColor",panel:{html:n,onclick:r}})});

static/js/lib/tinymce/plugins/visualblocks/css/visualblocks.css

1.mce-visualblocks p {
2 padding-top: 10px;
3 border: 1px dashed #BBB;
4 margin-left: 3px;
5 background: transparent no-repeat url(data:image/gif;base64,R0lGODlhCQAJAJEAAAAAAP///7u7u////yH5BAEAAAMALAAAAAAJAAkAAAIQnG+CqCN/mlyvsRUpThG6AgA7);
6}
7
8.mce-visualblocks h1 {
9 padding-top: 10px;
10 border: 1px dashed #BBB;
11 margin-left: 3px;
12 background: transparent no-repeat url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybGu1JuxHoAfRNRW3TWXyF2YiRUAOw==);
13}
14
15.mce-visualblocks h2 {
16 padding-top: 10px;
17 border: 1px dashed #BBB;
18 margin-left: 3px;
19 background: transparent no-repeat url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8Hybbx4oOuqgTynJd6bGlWg3DkJzoaUAAAOw==);
20}
21
22.mce-visualblocks h3 {
23 padding-top: 10px;
24 border: 1px dashed #BBB;
25 margin-left: 3px;
26 background: transparent no-repeat url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIZjI8Hybbx4oOuqgTynJf2Ln2NOHpQpmhAAQA7);
27}
28
29.mce-visualblocks h4 {
30 padding-top: 10px;
31 border: 1px dashed #BBB;
32 margin-left: 3px;
33 background: transparent no-repeat url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxInR0zqeAdhtJlXwV1oCll2HaWgAAOw==);
34}
35
36.mce-visualblocks h5 {
37 padding-top: 10px;
38 border: 1px dashed #BBB;
39 margin-left: 3px;
40 background: transparent no-repeat url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxIoiuwjane4iq5GlW05GgIkIZUAAAOw==);
41}
42
43.mce-visualblocks h6 {
44 padding-top: 10px;
45 border: 1px dashed #BBB;
46 margin-left: 3px;
47 background: transparent no-repeat url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxIoiuwjan04jep1iZ1XRlAo5bVgAAOw==);
48}
49
50.mce-visualblocks div {
51 padding-top: 10px;
52 border: 1px dashed #BBB;
53 margin-left: 3px;
54 background: transparent no-repeat url(data:image/gif;base64,R0lGODlhEgAKAIABALu7u////yH5BAEAAAEALAAAAAASAAoAAAIfjI9poI0cgDywrhuxfbrzDEbQM2Ei5aRjmoySW4pAAQA7);
55}
56
57.mce-visualblocks section {
58 padding-top: 10px;
59 border: 1px dashed #BBB;
60 margin: 0 0 1em 3px;
61 background: transparent no-repeat url(data:image/gif;base64,R0lGODlhKAAKAIABALu7u////yH5BAEAAAEALAAAAAAoAAoAAAI5jI+pywcNY3sBWHdNrplytD2ellDeSVbp+GmWqaDqDMepc8t17Y4vBsK5hDyJMcI6KkuYU+jpjLoKADs=);
62}
63
64.mce-visualblocks article {
65 padding-top: 10px;
66 border: 1px dashed #BBB;
67 margin: 0 0 1em 3px;
68 background: transparent no-repeat url(data:image/gif;base64,R0lGODlhKgAKAIABALu7u////yH5BAEAAAEALAAAAAAqAAoAAAI6jI+pywkNY3wG0GBvrsd2tXGYSGnfiF7ikpXemTpOiJScasYoDJJrjsG9gkCJ0ag6KhmaIe3pjDYBBQA7);
69}
70
71.mce-visualblocks blockquote {
72 padding-top: 10px;
73 border: 1px dashed #BBB;
74 background: transparent no-repeat url(data:image/gif;base64,R0lGODlhPgAKAIABALu7u////yH5BAEAAAEALAAAAAA+AAoAAAJPjI+py+0Knpz0xQDyuUhvfoGgIX5iSKZYgq5uNL5q69asZ8s5rrf0yZmpNkJZzFesBTu8TOlDVAabUyatguVhWduud3EyiUk45xhTTgMBBQA7);
75}
76
77.mce-visualblocks address {
78 padding-top: 10px;
79 border: 1px dashed #BBB;
80 margin: 0 0 1em 3px;
81 background: transparent no-repeat url(data:image/gif;base64,R0lGODlhLQAKAIABALu7u////yH5BAEAAAEALAAAAAAtAAoAAAI/jI+pywwNozSP1gDyyZcjb3UaRpXkWaXmZW4OqKLhBmLs+K263DkJK7OJeifh7FicKD9A1/IpGdKkyFpNmCkAADs=);
82}
83
84.mce-visualblocks pre {
85 padding-top: 10px;
86 border: 1px dashed #BBB;
87 margin-left: 3px;
88 background: transparent no-repeat url(data:image/gif;base64,R0lGODlhFQAKAIABALu7uwAAACH5BAEAAAEALAAAAAAVAAoAAAIjjI+ZoN0cgDwSmnpz1NCueYERhnibZVKLNnbOq8IvKpJtVQAAOw==);
89}
90
91.mce-visualblocks figure {
92 padding-top: 10px;
93 border: 1px dashed #BBB;
94 margin: 0 0 1em 3px;
95 background: transparent no-repeat url(data:image/gif;base64,R0lGODlhJAAKAIAAALu7u////yH5BAEAAAEALAAAAAAkAAoAAAI0jI+py+2fwAHUSFvD3RlvG4HIp4nX5JFSpnZUJ6LlrM52OE7uSWosBHScgkSZj7dDKnWAAgA7);
96}
97
98.mce-visualblocks hgroup {
99 padding-top: 10px;
100 border: 1px dashed #BBB;
101 margin: 0 0 1em 3px;
102 background: transparent no-repeat url(data:image/gif;base64,R0lGODlhJwAKAIABALu7uwAAACH5BAEAAAEALAAAAAAnAAoAAAI3jI+pywYNI3uB0gpsRtt5fFnfNZaVSYJil4Wo03Hv6Z62uOCgiXH1kZIIJ8NiIxRrAZNMZAtQAAA7);
103}
104
105.mce-visualblocks aside {
106 padding-top: 10px;
107 border: 1px dashed #BBB;
108 margin: 0 0 1em 3px;
109 background: transparent no-repeat url(data:image/gif;base64,R0lGODlhHgAKAIABAKqqqv///yH5BAEAAAEALAAAAAAeAAoAAAItjI+pG8APjZOTzgtqy7I3f1yehmQcFY4WKZbqByutmW4aHUd6vfcVbgudgpYCADs=);
110}
111
112.mce-visualblocks figcaption {
113 border: 1px dashed #BBB;
114}

static/js/lib/tinymce/plugins/visualblocks/plugin.min.js

1tinymce.PluginManager.add("visualblocks",function(e,t){var n,r,i;window.NodeList&&(e.addCommand("mceVisualBlocks",function(){var o,a=e.dom;n||(n=a.uniqueId(),o=a.create("link",{id:n,rel:"stylesheet",href:t+"/css/visualblocks.css"}),e.getDoc().getElementsByTagName("head")[0].appendChild(o)),e.on("PreviewFormats AfterPreviewFormats",function(t){i&&a.toggleClass(e.getBody(),"mce-visualblocks","afterpreviewformats"==t.type)}),a.toggleClass(e.getBody(),"mce-visualblocks"),i=e.dom.hasClass(e.getBody(),"mce-visualblocks"),r&&r.active(a.hasClass(e.getBody(),"mce-visualblocks"))}),e.addButton("visualblocks",{title:"visualblocks.desc",cmd:"mceVisualBlocks"}),e.addMenuItem("visualblocks",{text:"Show blocks",cmd:"mceVisualBlocks",onPostRender:function(){r=this,r.active(e.dom.hasClass(e.getBody(),"mce-visualblocks"))},selectable:!0,context:"view",prependToContext:!0}),e.on("init",function(){e.settings.visualblocks_default_state&&e.execCommand("mceVisualBlocks",!1,null,{skip_focus:!0})}))});

static/js/lib/tinymce/plugins/visualchars/plugin.min.js

1tinymce.PluginManager.add("visualchars",function(e){function t(t){var i,o,a,s,l,c,u=e.getBody(),d=e.selection;if(n=!n,r.active(n),t&&(c=d.getBookmark()),n)for(o=[],tinymce.walk(u,function(e){3==e.nodeType&&e.nodeValue&&-1!=e.nodeValue.indexOf(" ")&&o.push(e)},"childNodes"),a=0;o.length>a;a++){for(s=o[a].nodeValue,s=s.replace(/(\u00a0)/g,'<span data-mce-bogus="1" class="mce-nbsp">$1</span>'),l=e.dom.create("div",null,s);i=l.lastChild;)e.dom.insertAfter(i,o[a]);e.dom.remove(o[a])}else for(o=e.dom.select("span.mce-nbsp",u),a=o.length-1;a>=0;a--)e.dom.remove(o[a],1);d.moveToBookmark(c)}var n,r;e.addCommand("mceVisualChars",t),e.addButton("visualchars",{title:"Show invisible characters",cmd:"mceVisualChars"}),e.addMenuItem("visualchars",{text:"Show invisible characters",cmd:"mceVisualChars",onPostRender:function(){r=this},selectable:!0,context:"view",prependToContext:!0}),e.on("beforegetcontent",function(e){n&&"raw"!=e.format&&!e.draft&&(n=!0,t(!1))})});

static/js/lib/tinymce/plugins/wordcount/plugin.min.js

1tinymce.PluginManager.add("wordcount",function(e){function t(){e.theme.panel.find("#wordcount").text(["Words: {0}",i.getCount()])}var n,r,i=this;n=e.getParam("wordcount_countregex",/[\w\u2019\x27\-]+/g),r=e.getParam("wordcount_cleanregex",/[0-9.(),;:!?%#$?\x27\x22_+=\\\/\-]*/g),e.on("init",function(){var n=e.theme.panel&&e.theme.panel.find("#statusbar")[0];n&&(n.insert({type:"label",name:"wordcount",text:["Words: {0}",i.getCount()],classes:"wordcount"},0),e.on("setcontent beforeaddundo",t),e.on("keyup",function(e){32==e.keyCode&&t()}))}),i.getCount=function(){var t=e.getContent({format:"raw"}),i=0;if(t){t=t.replace(/\.\.\./g," "),t=t.replace(/<.[^<>]*?>/g," ").replace(/&nbsp;|&#160;/gi," "),t=t.replace(/(\w+)(&.+?;)+(\w+)/,"$1$3").replace(/&.+?;/g," "),t=t.replace(r,"");var o=t.match(n);o&&(i=o.length)}return i}});

static/js/lib/tinymce/skins/lightgray/content.min.css

1body.mce-content-body{background-color:#fff;font-family:Verdana,Arial,Helvetica,sans-serif;font-size:11px;scrollbar-3dlight-color:#f0f0ee;scrollbar-arrow-color:#676662;scrollbar-base-color:#f0f0ee;scrollbar-darkshadow-color:#ddd;scrollbar-face-color:#e0e0dd;scrollbar-highlight-color:#f0f0ee;scrollbar-shadow-color:#f0f0ee;scrollbar-track-color:#f5f5f5}td,th{font-family:Verdana,Arial,Helvetica,sans-serif;font-size:11px}.mce-object{border:1px dotted #3a3a3a;background:#d5d5d5 url(img/object.gif) no-repeat center}.mce-pagebreak{cursor:default;display:block;border:0;width:100%;height:5px;border:1px dashed #666;margin-top:15px}.mce-item-anchor{cursor:default;display:inline-block;-webkit-user-select:all;-webkit-user-modify:read-only;-moz-user-select:all;-moz-user-modify:read-only;width:9px!important;height:9px!important;border:1px dotted #3a3a3a;background:#d5d5d5 url(img/anchor.gif) no-repeat center}.mce-nbsp{background:#AAA}hr{cursor:default}.mce-match-marker{background:green;color:#fff}.mce-spellchecker-word{background:url(img/wline.gif) repeat-x bottom left;cursor:default}.mce-item-table,.mce-item-table td,.mce-item-table th,.mce-item-table caption{border:1px dashed #BBB}td.mce-item-selected,th.mce-item-selected{background-color:#39f!important}.mce-edit-focus{outline:1px dotted #333}

static/js/lib/tinymce/skins/lightgray/fonts/icomoon.eot

1 `LP!4icomoonRegularVersion 1.0icomoon PFFTMf{,DGDEFf$ OS/2/XVcmap}ԫgaspglyf#PheadNQ6hhea$hmtxlloca~Ptmaxpa8 nameOPpostJGD4!_< ...99^@LfGLfPfEd@.! P`@`` h `1     @486543210/.-,+*)('&%$#"! 
2 7L2n&b>pDjd*Tlr>z b
3
4,
5R
6x
7  ( 8 F(0#'#!37!3.5462'654&"3272?64&"&462 & (2PpP-c8P88(W  4$$4$ @F,8PP8yW(88P8c  S$4$$4@` #'+/37;3#3#3#3#'3#3#'3#73#3#3#3#'3#'3#'3#'3# @ @ @ @ @ @ @ ` `  #5'#3!'#'#'33!!53533``@`3333``@`` ` 333@```!####5"&46'7@@@@.BB@B\B`pp !####5"&46@@@@.BB@B\BppP!####5"&46@@@@.BB@B\B#'%"'&53264&#"'&4762#4&"32!!n22..2@9N99'@.22..2@9N99'@%p%##%8&&4&#%p%##%8&&4& `3"&=32765!!`@^^@T@<TT<@@ #3#53#5@@@@  `!%654&+;2654&'32+#532bK5@@ @`5K"33PPP#/5K@K5";&4&&4&`73#2#575!5```@``@``@`2#5264&"3'3>#53 ]]Igg3'
8]ppR ~@0gg4&6Rn@` #53#73#73#73#73#!73!7'!#'!@@```@@```@@@  #'/37?CG3#73#7#535#53#73#'3#533#73#7#535#53#73#'3#53!!!@@`@@`@ @@`@@ @` @@`@@`@ @@`@@ @`@@  @ ` `@ @ ` `@  @` 7#53533##%!53!5``@``@ @@``@`@  .26<3354&+"353#%5#";5#554&+326=4#2#535#53'77@@  @  @@`  ``@ ``  @@@@p)G``  @@   00  0 P@ @#J ''7''537#7'7#57Ej6jEj6jEEEj6ljEEjEj6jEEj6jE{EEj66jEEj#!!!";!5326=4&#536"&462`@  ``   @   z  )"264"&462$"&462"&462267"&'jԖԖfVZzZԖ$AWWA!%37#5>54&"#535.5462` 2>gg>2 GYԖYG @kb=PooP=bk@pF]]Fp` 3#575#53#'#373'@`@@`nD^^DD^^Dy I I7^^^^` %3#575#53#'#373'@`@@`nD^^DD^^D I I)^^^^ 5!!!!''7'77 ``+f>bAAAAAAAA @@`AAAAAAAA!!@
9 #'!53#5#5##53#%3#=33#!53 @@@@`` ``````````````h@ ?33#3#9`p`$^@``@`@ -="267&$2"&4"'&'&'67672654''&"67625&M----!!F!!0$$08P80$$QQ-%*6KK6*%@E;;EE;;n(( (88( ((**"7-&&-7"#"264"&462/67&'#7'Pppp0TxTTxTL&+U+&L> PJpppTTxTT~+&L>>L&+;`@< `` 3'73#37@@@`73#2#575#56"264$2"&4@@ `@`zzzԖԖ@  `@ @ @PzzzԖ  "!#535#535#53!!#535#535#537`@@@@@@ `@@@@@@@@@@@@@@@@@@`!!!462"!7 @((D`@``d((0` 7'!` M"EIMQUY]7"/&4?6327&#"2?>'7'&"7&54?62#"'32?64'773#3#'3#73#
10Q
11
121
13
14Q
15!!Q1AQ1AQ!
16Q
17
181
19
20Q
21!!Qu``5 ````U ``
22Q
23
241
25
26Q
27!QA1Q;1Q;!
28Q
29
301
31
32Q
33!QA,``u`` ```  .Q66?>&"/&4?6327&#"2?>'7'&"7&54?62#"'32?64T
34Q
35
361
37
38Q
39!!Q1AQ1AQ!
40Q
41
421
43
44Q
45!!Q 
46Q
47
481
49
50Q
51!QA1Q;1Q;!
52Q
53
541
55
56Q
57!QA155&.> @V%#) 8bd| 5FD!%YWQ<# >.'76}%V@Ab8 ) !DF5 |#<QWY #2"&=463"6!2"&=463"6p/AA]B]B/  (/AA]B]B/  B\BB.]@/ B\BB.]@/  !!!!!!!!!!'@@@@ @ @ @ @@` !!!!!!!!!!=@@@@ @ @ @ @`  )7!!!!!!'#5#53#575#53#535#535#5@@@` @`@@``@@@@@@@@``  I Iw  #!!!!!!462"462"462"@@@&4&&4&&4&&4&&4&&4@@@4&&4&4&&4&4&&4&)5AM3#%3##5##5##";26=3;2654&#"&46;27#"&46;2#"&46;2 @| | [    | |          #&,54&+54&+"#";37%3#5!537##! p @ p `@@`@3 `@P   `` @ 3 `  %9AU%&+'764''#"3276'73276&#"&547>76326"&462#"'.'&54632"-  -"",#)!!)#,"  ]&&  }# PP #O#)3!!3)#O&   N&&   !!!!!!!!!!@ @ @ @ @ !!!!!!'!!!!@@@ @@@@ !!!!!!'!!!!`@@`@ @@@@ !!!!!!5!!!!@@@ @@@@'/%5'&'7'&/#'737677'67'#'573P 48@P@84 PP 48@P@84 P@@@@@@P@84 PP 48@P@84 PP 48@@@@@@ *'.+"3!2654&#5#!"54;23H )p"RZ|H P0( R[!!!3#!3!53@@@  %@@p77''@@PА@P! (#x    F0   icomoonicomoonRegularRegularFontForge 2.0 : icomoon : 18-1-2013FontForge 2.0 : icomoon : 18-1-2013icomoonicomoonVersion 1.0Version 1.0icomoonicomoon9 
58    !"#$%&'()*+,-./01234567uniE034uniE032uniE031uniE030uniE02FuniE02EuniE02DuniE02CuniE02BuniE02AuniE029uniE028uniE027uniE026uniE025uniE024uniE023uniE022uniE021uniE020uniE01FuniE01EuniE01DuniE01CuniE01BuniE01AuniE019uniE018uniE017uniE016uniE015uniE014uniE013uniE012uniE011uniE010uniE00FuniE00EuniE00DuniE00CuniE00BuniE00AuniE009uniE008uniE007uniE006uniE005uniE004uniE003uniE002uniE001uniE000uniE033uniF0008=..

static/js/lib/tinymce/skins/lightgray/fonts/icomoon.svg

1<?xml version="1.0" standalone="no"?>
2<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
3<svg xmlns="http://www.w3.org/2000/svg">
4<metadata>
5This is a custom SVG font generated by IcoMoon.
6<iconset grid="16"></iconset>
7</metadata>
8<defs>
9<font id="icomoon" horiz-adv-x="512" >
10<font-face units-per-em="512" ascent="480" descent="-32" />
11<missing-glyph horiz-adv-x="512" />
12<glyph unicode="&#xe034;" d="M 464.00,416.00L 256.00,416.00L 240.00,448.00L 64.00,448.00L 32.00,384.00L 480.00,384.00 zM 452.17,128.00l 37.43,0.00 L 512.00,352.00L0.00,352.00 l 32.00-320.00l 242.04,0.00 C 221.599,50.888, 184.00,101.133, 184.00,160.00c0.00,74.991, 61.009,136.00, 136.00,136.00
13 c 74.99,0.00, 136.00-61.009, 136.00-136.00C 456.00,149.161, 454.689,138.425, 452.17,128.00zM 501.498,23.125l-99.248,87.346C 410.977,124.931, 416.00,141.878, 416.00,160.00c0.00,53.02-42.98,96.00-96.00,96.00s-96.00-42.98-96.00-96.00
14 s 42.98-96.00, 96.00-96.00c 18.122,0.00, 35.069,5.023, 49.529,13.75l 87.346-99.248c 11.481-13.339, 31.059-14.07, 43.503-1.626l 2.746,2.746
15 C 515.568-7.934, 514.837,11.644, 501.498,23.125z M 320.00,98.00c-34.242,0.00-62.00,27.758-62.00,62.00s 27.758,62.00, 62.00,62.00s 62.00-27.758, 62.00-62.00
16 S 354.242,98.00, 320.00,98.00z" />
17<glyph unicode="&#xe032;" d="M 384.00,352.00L 416.00,352.00L 416.00,320.00L 384.00,320.00zM 320.00,288.00L 352.00,288.00L 352.00,256.00L 320.00,256.00zM 320.00,224.00L 352.00,224.00L 352.00,192.00L 320.00,192.00zM 320.00,160.00L 352.00,160.00L 352.00,128.00L 320.00,128.00zM 256.00,224.00L 288.00,224.00L 288.00,192.00L 256.00,192.00zM 256.00,160.00L 288.00,160.00L 288.00,128.00L 256.00,128.00zM 192.00,160.00L 224.00,160.00L 224.00,128.00L 192.00,128.00zM 384.00,288.00L 416.00,288.00L 416.00,256.00L 384.00,256.00zM 384.00,224.00L 416.00,224.00L 416.00,192.00L 384.00,192.00zM 384.00,160.00L 416.00,160.00L 416.00,128.00L 384.00,128.00zM 384.00,96.00L 416.00,96.00L 416.00,64.00L 384.00,64.00zM 320.00,96.00L 352.00,96.00L 352.00,64.00L 320.00,64.00zM 256.00,96.00L 288.00,96.00L 288.00,64.00L 256.00,64.00zM 192.00,96.00L 224.00,96.00L 224.00,64.00L 192.00,64.00zM 128.00,96.00L 160.00,96.00L 160.00,64.00L 128.00,64.00z" />
18<glyph unicode="&#xe031;" d="M 416.00,352.00l-96.00,0.00 L 320.00,384.00 L 224.00,480.00L0.00,480.00 l0.00-384.00 l 192.00,0.00 l0.00-128.00 l 320.00,0.00 L 512.00,256.00 L 416.00,352.00z M 416.00,306.745L 466.745,256.00L 416.00,256.00 L 416.00,306.745 z M 224.00,434.745L 274.745,384.00L 224.00,384.00
19 L 224.00,434.745 z M 32.00,448.00l 160.00,0.00 l0.00-96.00 l 96.00,0.00 l0.00-224.00 L 32.00,128.00 L 32.00,448.00 z M 480.00,0.00L 224.00,0.00 l0.00,96.00 l 96.00,0.00 L 320.00,320.00 l 64.00,0.00 l0.00-96.00 l 96.00,0.00 L 480.00,0.00 z" />
20<glyph unicode="&#xe030;" d="M 128.00,448.00 L 384.00,448.00 L 384.00,384.00 L 320.00,384.00 L 320.00,0.00 L 256.00,0.00 L 256.00,384.00 L 192.00,384.00 L 192.00,0.00 L 128.00,0.00 L 128.00,224.00 C 66.144,224.00 16.00,274.144 16.00,336.00 C 16.00,397.856 66.144,448.00 128.00,448.00 ZM 480.00,32.00L 352.00,144.00L 480.00,256.00 z" />
21<glyph unicode="&#xe02f;" d="M 224.00,448.00 L 480.00,448.00 L 480.00,384.00 L 416.00,384.00 L 416.00,0.00 L 352.00,0.00 L 352.00,384.00 L 288.00,384.00 L 288.00,0.00 L 224.00,0.00 L 224.00,224.00 C 162.144,224.00 112.00,274.144 112.00,336.00 C 112.00,397.856 162.144,448.00 224.00,448.00 ZM 32.00,256.00L 160.00,144.00L 32.00,32.00 z" />
22<glyph unicode="&#xe02e;" d="M 192.00,448.00 L 448.00,448.00 L 448.00,384.00 L 384.00,384.00 L 384.00,0.00 L 320.00,0.00 L 320.00,384.00 L 256.00,384.00 L 256.00,0.00 L 192.00,0.00 L 192.00,224.00 C 130.144,224.00 80.00,274.144 80.00,336.00 C 80.00,397.856 130.144,448.00 192.00,448.00 Z" />
23<glyph unicode="&#xe02d;" d="M 365.71,221.482 C 397.67,197.513 416.00,163.439 416.00,128.00 C 416.00,92.561 397.67,58.487 365.71,34.518 C 336.031,12.259 297.068,0.00 256.00,0.00 C 214.931,0.00 175.969,12.259 146.29,34.518 C 114.33,58.487 96.00,92.561 96.00,128.00 L 160.00,128.00 C 160.00,93.309 203.963,64.00 256.00,64.00 C 308.037,64.00 352.00,93.309 352.00,128.00 C 352.00,162.691 308.037,192.00 256.00,192.00 C 214.931,192.00 175.969,204.259 146.29,226.518 C 114.33,250.488 96.00,284.561 96.00,320.00 C 96.00,355.439 114.33,389.512 146.29,413.482 C 175.969,435.741 214.931,448.00 256.00,448.00 C 297.068,448.00 336.031,435.741 365.71,413.482 C 397.67,389.512 416.00,355.439 416.00,320.00 L 352.00,320.00 C 352.00,354.691 308.037,384.00 256.00,384.00 C 203.963,384.00 160.00,354.691 160.00,320.00 C 160.00,285.309 203.963,256.00 256.00,256.00 C 297.068,256.00 336.031,243.741 365.71,221.482 ZM0.00,224.00L 512.00,224.00L 512.00,192.00L0.00,192.00z" />
24<glyph unicode="&#xe02c;" d="M 352.00,448.00 L 416.00,448.00 L 416.00,240.00 C 416.00,160.471 344.366,96.00 256.00,96.00 C 167.635,96.00 96.00,160.471 96.00,240.00 L 96.00,448.00 L 160.00,448.00 L 160.00,240.00 C 160.00,219.917 169.119,200.648 185.677,185.747 C 204.125,169.145 229.10,160.00 256.00,160.00 C 282.90,160.00 307.875,169.145 326.323,185.747 C 342.881,200.648 352.00,219.917 352.00,240.00 L 352.00,448.00 ZM 96.00,64.00L 416.00,64.00L 416.00,0.00L 96.00,0.00z" />
25<glyph unicode="&#xe02b;" d="M 448.00,448.00 L 448.00,416.00 L 384.00,416.00 L 224.00,32.00 L 288.00,32.00 L 288.00,0.00 L 64.00,0.00 L 64.00,32.00 L 128.00,32.00 L 288.00,416.00 L 224.00,416.00 L 224.00,448.00 Z" />
26<glyph unicode="&#xe02a;" d="M 353.94,237.674C 372.689,259.945, 384.00,288.678, 384.00,320.00c0.00,70.58-57.421,128.00-128.00,128.00l-64.00,0.00 l-64.00,0.00 L 96.00,448.00 l0.00-448.00 l 32.00,0.00 l 64.00,0.00 l 96.00,0.00
27 c 70.579,0.00, 128.00,57.421, 128.00,128.00C 416.00,174.478, 391.101,215.248, 353.94,237.674z M 192.00,384.00l 50.75,0.00 c 27.984,0.00, 50.75-28.71, 50.75-64.00
28 s-22.766-64.00-50.75-64.00L 192.00,256.00 L 192.00,384.00 z M 271.50,64.00L 192.00,64.00 L 192.00,192.00 l 79.50,0.00 c 29.225,0.00, 53.00-28.71, 53.00-64.00S 300.725,64.00, 271.50,64.00z" />
29<glyph unicode="&#xe029;" d="M 192.00,64.00L 288.00,64.00L 288.00-32.00L 192.00-32.00zM 400.00,448.00 C 426.51,448.00 448.00,426.51 448.00,400.00 L 448.00,256.00 L 288.00,160.00 L 288.00,96.00 L 192.00,96.00 L 192.00,192.00 L 352.00,288.00 L 352.00,352.00 L 96.00,352.00 L 96.00,448.00 L 400.00,448.00 Z" />
30<glyph unicode="&#xe028;" d="M 288.00,448.00 C 411.712,448.00 512.00,347.712 512.00,224.00 C 512.00,100.288 411.712,0.00 288.00,0.00 L 288.00,48.00 C 335.012,48.00 379.209,66.307 412.451,99.549 C 445.693,132.791 464.00,176.988 464.00,224.00 C 464.00,271.011 445.693,315.209 412.451,348.451 C 379.209,381.693 335.012,400.00 288.00,400.00 C 240.989,400.00 196.791,381.693 163.549,348.451 C 137.979,322.882 121.258,290.828 114.896,256.00 L 208.00,256.00 L 96.00,128.00 L -16.00,256.00 L 66.285,256.00 C 81.815,364.551 175.154,448.00 288.00,448.00 ZM 384.00,256.00 L 384.00,192.00 L 256.00,192.00 L 256.00,352.00 L 320.00,352.00 L 320.00,256.00 Z" />
31<glyph unicode="&#xe027;" d="M0.00,224.00L 64.00,224.00L 64.00,192.00L0.00,192.00zM 96.00,224.00L 192.00,224.00L 192.00,192.00L 96.00,192.00zM 224.00,224.00L 288.00,224.00L 288.00,192.00L 224.00,192.00zM 320.00,224.00L 416.00,224.00L 416.00,192.00L 320.00,192.00zM 448.00,224.00L 512.00,224.00L 512.00,192.00L 448.00,192.00zM 440.00,480.00 L 448.00,256.00 L 64.00,256.00 L 72.00,480.00 L 88.00,480.00 L 96.00,288.00 L 416.00,288.00 L 424.00,480.00 ZM 72.00-32.00 L 64.00,160.00 L 448.00,160.00 L 440.00-32.00 L 424.00-32.00 L 416.00,128.00 L 96.00,128.00 L 88.00-32.00 Z" />
32<glyph unicode="&#xe026;" d="M 192.00,384.00L 256.00,384.00L 256.00,352.00L 192.00,352.00zM 288.00,384.00L 352.00,384.00L 352.00,352.00L 288.00,352.00zM 448.00,384.00 L 448.00,256.00 L 352.00,256.00 L 352.00,288.00 L 416.00,288.00 L 416.00,352.00 L 384.00,352.00 L 384.00,384.00 ZM 160.00,288.00L 224.00,288.00L 224.00,256.00L 160.00,256.00zM 256.00,288.00L 320.00,288.00L 320.00,256.00L 256.00,256.00zM 96.00,352.00 L 96.00,288.00 L 128.00,288.00 L 128.00,256.00 L 64.00,256.00 L 64.00,384.00 L 160.00,384.00 L 160.00,352.00 ZM 192.00,192.00L 256.00,192.00L 256.00,160.00L 192.00,160.00zM 288.00,192.00L 352.00,192.00L 352.00,160.00L 288.00,160.00zM 448.00,192.00 L 448.00,64.00 L 352.00,64.00 L 352.00,96.00 L 416.00,96.00 L 416.00,160.00 L 384.00,160.00 L 384.00,192.00 ZM 160.00,96.00L 224.00,96.00L 224.00,64.00L 160.00,64.00zM 256.00,96.00L 320.00,96.00L 320.00,64.00L 256.00,64.00zM 96.00,160.00 L 96.00,96.00 L 128.00,96.00 L 128.00,64.00 L 64.00,64.00 L 64.00,192.00 L 160.00,192.00 L 160.00,160.00 ZM 480.00,448.00 L 32.00,448.00 L 32.00,0.00 L 480.00,0.00 L 480.00,448.00 Z M 512.00,480.00 L 512.00,480.00 L 512.00-32.00 L 0.00-32.00 L 0.00,480.00 L 512.00,480.00 Z" />
33<glyph unicode="&#xe025;" d="M 224.00,192.00 L 128.00,192.00 L 128.00,256.00 L 224.00,256.00 L 224.00,352.00 L 288.00,352.00 L 288.00,256.00 L 384.00,256.00 L 384.00,192.00 L 288.00,192.00 L 288.00,96.00 L 224.00,96.00 ZM 512.00,160.00 L 512.00-32.00 L 0.00-32.00 L 0.00,160.00 L 64.00,160.00 L 64.00,32.00 L 448.00,32.00 L 448.00,160.00 Z" />
34<glyph unicode="&#xe024;" d="M 64.00,352.00l 64.00,0.00 l0.00-96.00 l 32.00,0.00 L 160.00,448.00 c0.00,17.60-14.40,32.00-32.00,32.00L 64.00,480.00 C 46.40,480.00, 32.00,465.60, 32.00,448.00l0.00-192.00 l 32.00,0.00 L 64.00,352.00 z M 64.00,448.00l 64.00,0.00 l0.00-64.00 L 64.00,384.00 L 64.00,448.00 z M 480.00,448.00L 480.00,480.00 l-96.00,0.00
35 c-17.601,0.00-32.00-14.40-32.00-32.00l0.00-160.00 c0.00-17.60, 14.399-32.00, 32.00-32.00l 96.00,0.00 l0.00,32.00 l-96.00,0.00 L 384.00,448.00 L 480.00,448.00 z M 320.00,400.00L 320.00,448.00 c0.00,17.60-14.40,32.00-32.00,32.00l-96.00,0.00 l0.00-224.00 l 96.00,0.00
36 c 17.60,0.00, 32.00,14.40, 32.00,32.00l0.00,48.00 c0.00,17.60-4.40,32.00-22.00,32.00C 315.60,368.00, 320.00,382.40, 320.00,400.00z M 288.00,288.00l-64.00,0.00 l0.00,64.00 l 64.00,0.00 L 288.00,288.00 z M 288.00,384.00l-64.00,0.00 L 224.00,448.00 l 64.00,0.00 L 288.00,384.00 zM 416.00,192.00 L 208.00-32.00 L 96.00,112.00 L 137.00,147.00 L 208.00,73.00 L 384.00,224.00 Z" />
37<glyph unicode="&#xe023;" d="M 512.00,480.00 L 512.00,288.00 L 442.87,357.13 L 336.87,251.13 L 283.13,304.87 L 389.13,410.87 L 320.00,480.00 ZM 122.87,410.87 L 228.87,304.87 L 175.13,251.13 L 69.13,357.13 L 0.00,288.00 L 0.00,480.00 L 192.00,480.00 ZM 442.87,90.87 L 512.00,160.00 L 512.00-32.00 L 320.00-32.00 L 389.13,37.13 L 283.13,143.13 L 336.87,196.87 ZM 228.87,143.13 L 122.87,37.13 L 192.00-32.00 L 0.00-32.00 L 0.00,160.00 L 69.13,90.87 L 175.13,196.87 Z" />
38<glyph unicode="&#xe022;" d="M 128.00,448.00L 384.00,448.00L 384.00,384.00L 128.00,384.00zM 480.00,352.00L 32.00,352.00 C 14.40,352.00,0.00,337.60,0.00,320.00l0.00-160.00 c0.00-17.60, 14.398-32.00, 32.00-32.00l 96.00,0.00 l0.00-128.00 l 256.00,0.00 L 384.00,128.00 l 96.00,0.00 c 17.60,0.00, 32.00,14.40, 32.00,32.00L 512.00,320.00
39 C 512.00,337.60, 497.60,352.00, 480.00,352.00z M 352.00,32.00L 160.00,32.00 L 160.00,192.00 l 192.00,0.00 L 352.00,32.00 z M 487.20,304.00c0.00-12.813-10.387-23.20-23.199-23.20
40 c-12.813,0.00-23.201,10.387-23.201,23.20s 10.388,23.20, 23.201,23.20C 476.814,327.20, 487.20,316.813, 487.20,304.00z" />
41<glyph unicode="&#xe021;" d="M 256.00,480.00C 114.615,480.00,0.00,365.386,0.00,224.00c0.00-141.385, 114.614-256.00, 256.00-256.00c 141.385,0.00, 256.00,114.615, 256.00,256.00
42 C 512.00,365.386, 397.385,480.00, 256.00,480.00z M 256.00,8.00c-119.293,0.00-216.00,96.706-216.00,216.00c0.00,119.293, 96.707,216.00, 216.00,216.00c 119.295,0.00, 216.00-96.707, 216.00-216.00
43 C 472.00,104.706, 375.295,8.00, 256.00,8.00z M 192.00,320.00c0.00-17.673-14.327-32.00-32.00-32.00s-32.00,14.327-32.00,32.00s 14.327,32.00, 32.00,32.00S 192.00,337.673, 192.00,320.00z
44 M 384.00,320.00c0.00-17.673-14.326-32.00-32.00-32.00s-32.00,14.327-32.00,32.00s 14.326,32.00, 32.00,32.00S 384.00,337.673, 384.00,320.00zM 256.00,154.00 C 326.537,154.00 387.344,182.766 415.231,215.596 C 404.795,129.986 337.087,64.00 256.00,64.00 C 174.941,64.00 107.251,130.013 96.778,215.584 C 124.671,182.761 185.471,154.00 256.00,154.00 Z" />
45<glyph unicode="&#xe020;" d="M 352.00,32.00 L 480.00,32.00 L 512.00,96.00 L 512.00-32.00 L 320.00-32.00 L 320.00,75.107 C 385.556,103.349 432.00,173.688 432.00,256.00 C 432.00,363.216 353.201,447.133 256.00,447.133 C 158.797,447.133 80.00,363.217 80.00,256.00 C 80.00,173.688 126.443,103.349 192.00,75.107 L 192.00-32.00 L 0.00-32.00 L 0.00,96.00 L 32.00,32.00 L 160.00,32.00 L 160.00,48.295 C 66.185,81.525 0.00,161.996 0.00,256.00 C 0.00,379.712 114.615,480.00 256.00,480.00 C 397.385,480.00 512.00,379.712 512.00,256.00 C 512.00,161.996 445.815,81.525 352.00,48.295 L 352.00,32.00 Z" />
46<glyph unicode="&#xe01f;" d="M 384.00,377.00 L 384.00,352.00 L 448.00,352.00 L 448.00,320.00 L 352.00,320.00 L 352.00,393.00 L 416.00,423.00 L 416.00,448.00 L 352.00,448.00 L 352.00,480.00 L 448.00,480.00 L 448.00,407.00 ZM 338.00,352.00L 270.00,352.00L 176.00,258.00L 82.00,352.00L 14.00,352.00L 142.00,224.00L 14.00,96.00L 82.00,96.00L 176.00,190.00L 270.00,96.00L 338.00,96.00L 210.00,224.00 z" />
47<glyph unicode="&#xe01e;" d="M 384.00,25.00 L 384.00,0.00 L 448.00,0.00 L 448.00-32.00 L 352.00-32.00 L 352.00,41.00 L 416.00,71.00 L 416.00,96.00 L 352.00,96.00 L 352.00,128.00 L 448.00,128.00 L 448.00,55.00 ZM 338.00,352.00L 270.00,352.00L 176.00,258.00L 82.00,352.00L 14.00,352.00L 142.00,224.00L 14.00,96.00L 82.00,96.00L 176.00,190.00L 270.00,96.00L 338.00,96.00L 210.00,224.00 z" />
48<glyph unicode="&#xe01d;" d="M0.00,32.00L 288.00,32.00L 288.00-32.00L0.00-32.00zM 96.00,480.00L 448.00,480.00L 448.00,416.00L 96.00,416.00zM 138.694,64.00 L 241.038,456.082 L 302.963,439.918 L 204.838,64.00 ZM 464.887-32.00 L 400.00,32.887 L 335.113-32.00 L 304.00-0.887 L 368.887,64.00 L 304.00,128.887 L 335.113,160.00 L 400.00,95.113 L 464.887,160.00 L 496.00,128.887 L 431.113,64.00 L 496.00-0.887 Z" />
49<glyph unicode="&#xe01c;" d="M0.00,256.00L 512.00,256.00L 512.00,192.00L0.00,192.00z" />
50<glyph unicode="&#xe01b;" d="M0.00,448.00l0.00-448.00 l 512.00,0.00 L 512.00,448.00 L0.00,448.00 z M 192.00,160.00l0.00,96.00 l 128.00,0.00 l0.00-96.00 L 192.00,160.00 z M 320.00,128.00l0.00-96.00 L 192.00,32.00 l0.00,96.00 L 320.00,128.00 z M 320.00,384.00l0.00-96.00 L 192.00,288.00 L 192.00,384.00 L 320.00,384.00 z M 160.00,384.00l0.00-96.00 L 32.00,288.00 L 32.00,384.00 L 160.00,384.00 z
51 M 32.00,256.00l 128.00,0.00 l0.00-96.00 L 32.00,160.00 L 32.00,256.00 z M 352.00,256.00l 128.00,0.00 l0.00-96.00 L 352.00,160.00 L 352.00,256.00 z M 352.00,288.00L 352.00,384.00 l 128.00,0.00 l0.00-96.00 L 352.00,288.00 z M 32.00,128.00l 128.00,0.00 l0.00-96.00 L 32.00,32.00 L 32.00,128.00 z M 352.00,32.00l0.00,96.00 l 128.00,0.00 l0.00-96.00 L 352.00,32.00 z" />
52<glyph unicode="&#xe01a;" d="M 161.009,64.00l 28.80,96.00l 132.382,0.00 l 28.80-96.00l 56.816,0.00 L 311.809,384.00L 200.191,384.00 l-96.00-320.00L 161.009,64.00 z M 237.809,320.00l 36.382,0.00 l 28.80-96.00l-93.982,0.00
53 L 237.809,320.00z" />
54<glyph unicode="&#xe019;" d="M 256.00,320.00C 151.316,320.00, 58.378,269.722,0.00,192.00c 58.378-77.723, 151.316-128.00, 256.00-128.00c 104.684,0.00, 197.622,50.277, 256.00,128.00
55 C 453.622,269.722, 360.684,320.00, 256.00,320.00z M 224.00,256.00c 17.673,0.00, 32.00-14.327, 32.00-32.00s-14.327-32.00-32.00-32.00s-32.00,14.327-32.00,32.00S 206.327,256.00, 224.00,256.00z
56 M 386.808,127.352c-19.824-10.129-40.826-17.931-62.423-23.188C 302.141,98.746, 279.134,96.00, 256.00,96.00
57 c-23.133,0.00-46.141,2.746-68.384,8.162c-21.597,5.259-42.599,13.061-62.423,23.188c-31.51,16.101-60.111,38.205-83.82,64.649
58 c 23.709,26.444, 52.31,48.55, 83.82,64.649c 16.168,8.261, 33.121,14.973, 50.541,20.02C 165.79,261.547, 160.00,243.451, 160.00,224.00
59 c0.00-53.02, 42.981-96.00, 96.00-96.00c 53.019,0.00, 96.00,42.98, 96.00,96.00c0.00,19.451-5.791,37.547-15.733,52.67c 17.419-5.048, 34.372-11.76, 50.541-20.021
60 c 31.511-16.099, 60.109-38.204, 83.819-64.649C 446.917,165.557, 418.318,143.45, 386.808,127.352z M 430.459,358.139
61 C 376.099,385.916, 317.403,400.00, 256.00,400.00c-61.403,0.00-120.099-14.084-174.459-41.861C 52.155,343.123, 24.675,324.187,0.00,302.101l0.00-54.603
62 c 27.669,29.283, 60.347,53.877, 96.097,72.145C 145.907,345.095, 199.706,358.00, 256.00,358.00s 110.093-12.905, 159.902-38.358
63 c 35.751-18.268, 68.429-42.862, 96.098-72.145L 512.00,302.10 C 487.325,324.187, 459.846,343.123, 430.459,358.139z" />
64<glyph unicode="&#xe018;" d="M 256.00,384.00C 149.962,384.00, 64.00,298.039, 64.00,192.00s 85.961-192.00, 192.00-192.00c 106.037,0.00, 192.00,85.961, 192.00,192.00S 362.037,384.00, 256.00,384.00z
65 M 357.822,90.177C 330.626,62.979, 294.464,48.00, 256.00,48.00s-74.625,14.979-101.823,42.177C 126.979,117.374, 112.00,153.536, 112.00,192.00
66 s 14.979,74.625, 42.177,101.823C 181.375,321.021, 217.536,336.00, 256.00,336.00s 74.626-14.979, 101.821-42.177
67 C 385.022,266.625, 400.00,230.464, 400.00,192.00S 385.021,117.374, 357.822,90.177zM 162.965,378.069l-21.47,42.939C 92.058,396.24, 51.76,355.942, 26.992,306.504l 42.938-21.47
68 C 90.054,325.202, 122.796,357.945, 162.965,378.069zM 442.067,285.035l 42.939,21.469C 460.24,355.942, 419.943,396.24, 370.504,421.008l-21.472-42.939
69 C 389.201,357.945, 421.944,325.203, 442.067,285.035zM 256.00,288.00l-32.00,0.00 l0.00-96.00 c0.00-5.055, 2.35-9.555, 6.011-12.486l-0.006-0.008l 80.00-64.00l 19.988,24.988L 256.00,199.689L 256.00,288.00 z" />
70<glyph unicode="&#xe017;" d="M 160.00,352.00L 32.00,224.00L 160.00,96.00L 224.00,96.00L 96.00,224.00L 224.00,352.00 zM 352.00,352.00L 288.00,352.00L 416.00,224.00L 288.00,96.00L 352.00,96.00L 480.00,224.00 z" />
71<glyph unicode="&#xe016;" d="M 224.00,128.00L 288.00,128.00L 288.00,64.00L 224.00,64.00zM 352.00,352.00 C 369.673,352.00 384.00,337.673 384.00,320.00 L 384.00,224.00 L 288.00,160.00 L 224.00,160.00 L 224.00,192.00 L 320.00,256.00 L 320.00,288.00 L 160.00,288.00 L 160.00,352.00 L 352.00,352.00 ZM 256.00,432.00 C 200.441,432.00 148.208,410.364 108.922,371.078 C 69.636,331.792 48.00,279.559 48.00,224.00 C 48.00,168.441 69.636,116.208 108.922,76.922 C 148.208,37.636 200.441,16.00 256.00,16.00 C 311.559,16.00 363.792,37.636 403.078,76.922 C 442.364,116.208 464.00,168.441 464.00,224.00 C 464.00,279.559 442.364,331.792 403.078,371.078 C 363.792,410.364 311.559,432.00 256.00,432.00 Z M 256.00,480.00 L 256.00,480.00 C 397.385,480.00 512.00,365.385 512.00,224.00 C 512.00,82.615 397.385-32.00 256.00-32.00 C 114.615-32.00 0.00,82.615 0.00,224.00 C 0.00,365.385 114.615,480.00 256.00,480.00 Z" />
72<glyph unicode="&#xe015;" d="M0.00,416.00l0.00-384.00 l 512.00,0.00 L 512.00,416.00 L0.00,416.00 z M 96.00,64.00L 32.00,64.00 l0.00,64.00 l 64.00,0.00 L 96.00,64.00 z M 96.00,192.00L 32.00,192.00 l0.00,64.00 l 64.00,0.00 L 96.00,192.00 z M 96.00,320.00L 32.00,320.00 L 32.00,384.00 l 64.00,0.00 L 96.00,320.00 z M 384.00,64.00L 128.00,64.00 L 128.00,384.00 l 256.00,0.00 L 384.00,64.00 z
73 M 480.00,64.00l-64.00,0.00 l0.00,64.00 l 64.00,0.00 L 480.00,64.00 z M 480.00,192.00l-64.00,0.00 l0.00,64.00 l 64.00,0.00 L 480.00,192.00 z M 480.00,320.00l-64.00,0.00 L 416.00,384.00 l 64.00,0.00 L 480.00,320.00 zM 192.00,320.00L 192.00,128.00L 320.00,224.00 z" />
74<glyph unicode="&#xe014;" d="M0.00,416.00l0.00-416.00 l 512.00,0.00 L 512.00,416.00 L0.00,416.00 z M 480.00,32.00L 32.00,32.00 L 32.00,384.00 l 448.00,0.00 L 480.00,32.00 zM 352.00,304.00A48.00,48.00 1620.00 1,0 448.00,304A48.00,48.00 1620.00 1,0 352.00,304zM 448.00,64.00 L 64.00,64.00 L 160.00,320.00 L 288.00,160.00 L 352.00,208.00 Z" />
75<glyph unicode="&#xe013;" d="M 96.00,480.00l0.00-512.00 l 160.00,160.00l 160.00-160.00L 416.00,480.00 L 96.00,480.00 z M 384.00,45.255l-128.00,128.00l-128.00-128.00L 128.00,448.00 l 256.00,0.00 L 384.00,45.255 z" />
76<glyph unicode="&#xe012;" d="M 238.444,142.443c 2.28-4.524, 3.495-9.579, 3.495-14.848c0.00-8.808-3.372-17.029-9.496-23.154l-81.69-81.69
77 c-6.124-6.124-14.348-9.496-23.154-9.496s-17.03,3.372-23.154,9.496l-49.69,49.69c-6.124,6.125-9.496,14.348-9.496,23.154
78 s 3.372,17.03, 9.496,23.154l 81.69,81.691c 6.124,6.123, 14.348,9.496, 23.154,9.496c 5.269,0.00, 10.322-1.215, 14.848-3.494l 32.669,32.668
79 c-13.935,10.705-30.72,16.08-47.517,16.08c-19.993,0.00-39.986-7.583-55.154-22.751l-81.69-81.691
80 c-30.335-30.335-30.335-79.975,0.00-110.309l 49.69-49.691c 15.167-15.166, 35.16-22.75, 55.153-22.75
81 c 19.994,0.00, 39.987,7.584, 55.154,22.751l 81.69,81.69c 27.91,27.91, 30.119,72.149, 6.672,102.673L 238.444,142.443zM 489.248,407.558l-49.69,49.691C 424.391,472.417, 404.398,480.00, 384.404,480.00c-19.993,0.00-39.985-7.583-55.153-22.751l-81.691-81.691
82 c-27.91-27.91-30.119-72.149-6.671-102.671l 32.669,32.67c-2.279,4.525-3.494,9.58-3.494,14.847c0.00,8.808, 3.372,17.03, 9.496,23.154
83 l 81.691,81.691c 6.123,6.124, 14.347,9.497, 23.153,9.497c 8.808,0.00, 17.03-3.373, 23.154-9.497l 49.69-49.691
84 c 6.124-6.124, 9.496-14.347, 9.496-23.154c0.00-8.807-3.372-17.03-9.496-23.154l-81.69-81.691c-6.124-6.124-14.347-9.496-23.154-9.496
85 c-5.268,0.00-10.322,1.215-14.848,3.495l-32.669-32.669c 13.936-10.705, 30.72-16.08, 47.517-16.08c 19.994,0.00, 39.987,7.584, 55.154,22.752
86 l 81.69,81.69C 519.584,327.584, 519.584,377.223, 489.248,407.558zM 116.684,340.688L 20.687,436.685L 43.315,459.313L 139.312,363.316zM 192.00,480.00L 224.00,480.00L 224.00,384.00L 192.00,384.00zM0.00,288.00L 96.00,288.00L 96.00,256.00L0.00,256.00zM 395.316,107.312L 491.314,11.314L 468.686-11.314L 372.688,84.684zM 288.00,64.00L 320.00,64.00L 320.00-32.00L 288.00-32.00zM 416.00,192.00L 512.00,192.00L 512.00,160.00L 416.00,160.00z" />
87<glyph unicode="&#xe011;" d="M 160.00,128.00c 8.80-8.80, 23.637-8.363, 32.971,0.971L 351.03,287.029C 360.364,296.363, 360.80,311.20, 352.00,320.00
88 s-23.637,8.363-32.971-0.971L 160.971,160.971C 151.637,151.637, 151.20,136.80, 160.00,128.00zM 238.444,142.444c 2.28-4.525, 3.495-9.58, 3.495-14.848c0.00-8.808-3.372-17.03-9.496-23.154l-81.691-81.691
89 c-6.124-6.124-14.347-9.496-23.154-9.496s-17.03,3.372-23.154,9.496l-49.691,49.691c-6.124,6.124-9.496,14.347-9.496,23.154
90 s 3.372,17.03, 9.496,23.154l 81.691,81.691c 6.124,6.124, 14.347,9.497, 23.154,9.497c 5.268,0.00, 10.322-1.215, 14.848-3.495l 32.669,32.669
91 c-13.935,10.705-30.72,16.08-47.517,16.08c-19.993,0.00-39.986-7.583-55.154-22.751l-81.691-81.691
92 c-30.335-30.335-30.335-79.974,0.00-110.309l 49.691-49.691C 87.611-24.416, 107.604-32.00, 127.597-32.00
93 c 19.994,0.00, 39.987,7.584, 55.154,22.751l 81.691,81.691c 27.91,27.91, 30.119,72.149, 6.672,102.672L 238.444,142.444zM 489.249,407.558l-49.691,49.691C 424.391,472.417, 404.398,480.00, 384.404,480.00c-19.993,0.00-39.986-7.583-55.154-22.751l-81.691-81.691
94 c-27.91-27.91-30.119-72.149-6.671-102.671l 32.669,32.67c-2.279,4.525-3.494,9.58-3.494,14.847c0.00,8.808, 3.372,17.03, 9.496,23.154
95 l 81.691,81.691c 6.124,6.124, 14.347,9.497, 23.154,9.497s 17.03-3.373, 23.154-9.497l 49.691-49.691
96 c 6.124-6.124, 9.496-14.347, 9.496-23.154s-3.372-17.03-9.496-23.154l-81.691-81.691c-6.124-6.124-14.347-9.496-23.154-9.496
97 c-5.268,0.00-10.322,1.215-14.848,3.495l-32.669-32.669c 13.936-10.705, 30.72-16.08, 47.517-16.08c 19.994,0.00, 39.987,7.584, 55.154,22.751
98 l 81.691,81.691C 519.584,327.584, 519.584,377.223, 489.249,407.558z" />
99<glyph unicode="&#xe010;" d="M 288.00,355.814L 288.00,480.00 l 192.00-192.00L 288.00,96.00L 288.00,222.912 C 64.625,228.153, 74.206,71.016, 131.07-32.00
100 C-9.286,119.707, 20.52,362.785, 288.00,355.814z" />
101<glyph unicode="&#xe00f;" d="M 380.931-32.00C 437.794,71.016, 447.375,228.153, 224.00,222.912L 224.00,96.00 L 32.00,288.00L 224.00,480.00l0.00-124.186
102 C 491.481,362.785, 521.285,119.707, 380.931-32.00z" />
103<glyph unicode="&#xe00e;" d="M 112.50,256.00 C 174.356,256.00 224.50,205.855 224.50,144.00 C 224.50,82.144 174.356,32.00 112.50,32.00 C 50.644,32.00 0.50,82.144 0.50,144.00 L 0.00,160.00 C 0.00,283.712 100.288,384.00 224.00,384.00 L 224.00,320.00 C 181.263,320.00 141.083,303.357 110.863,273.137 C 105.046,267.319 99.737,261.129 94.948,254.627 C 100.667,255.527 106.528,256.00 112.50,256.00 ZM 400.50,256.00 C 462.355,256.00 512.50,205.855 512.50,144.00 C 512.50,82.144 462.355,32.00 400.50,32.00 C 338.645,32.00 288.50,82.144 288.50,144.00 L 288.00,160.00 C 288.00,283.712 388.288,384.00 512.00,384.00 L 512.00,320.00 C 469.263,320.00 429.083,303.357 398.863,273.137 C 393.045,267.319 387.736,261.129 382.947,254.627 C 388.667,255.527 394.527,256.00 400.50,256.00 Z" />
104<glyph unicode="&#xe00d;" d="M0.00,448.00L 512.00,448.00L 512.00,384.00L0.00,384.00zM 192.00,352.00L 512.00,352.00L 512.00,288.00L 192.00,288.00zM 192.00,256.00L 512.00,256.00L 512.00,192.00L 192.00,192.00zM 192.00,160.00L 512.00,160.00L 512.00,96.00L 192.00,96.00zM0.00,64.00L 512.00,64.00L 512.00,0.00L0.00,0.00zM 128.00,320.00 L 128.00,128.00 L 0.00,224.00 Z" />
105<glyph unicode="&#xe00c;" d="M0.00,448.00L 512.00,448.00L 512.00,384.00L0.00,384.00zM 192.00,352.00L 512.00,352.00L 512.00,288.00L 192.00,288.00zM 192.00,256.00L 512.00,256.00L 512.00,192.00L 192.00,192.00zM 192.00,160.00L 512.00,160.00L 512.00,96.00L 192.00,96.00zM0.00,64.00L 512.00,64.00L 512.00,0.00L0.00,0.00zM 0.00,128.00 L 0.00,320.00 L 128.00,224.00 Z" />
106<glyph unicode="&#xe00b;" d="M 192.00,64.00L 512.00,64.00L 512.00,0.00L 192.00,0.00zM 192.00,256.00L 512.00,256.00L 512.00,192.00L 192.00,192.00zM 192.00,448.00L 512.00,448.00L 512.00,384.00L 192.00,384.00zM 96.00,480.00 L 96.00,352.00 L 64.00,352.00 L 64.00,448.00 L 32.00,448.00 L 32.00,480.00 ZM 64.00,217.00 L 64.00,192.00 L 128.00,192.00 L 128.00,160.00 L 32.00,160.00 L 32.00,233.00 L 96.00,263.00 L 96.00,288.00 L 32.00,288.00 L 32.00,320.00 L 128.00,320.00 L 128.00,247.00 ZM 128.00,128.00 L 128.00-32.00 L 32.00-32.00 L 32.00,0.00 L 96.00,0.00 L 96.00,32.00 L 32.00,32.00 L 32.00,64.00 L 96.00,64.00 L 96.00,96.00 L 32.00,96.00 L 32.00,128.00 Z" />
107<glyph unicode="&#xe00a;" d="M 192.00,448.00l 320.00,0.00 l0.00-64.00 L 192.00,384.00 L 192.00,448.00 z M 192.00,256.00l 320.00,0.00 l0.00-64.00 L 192.00,192.00 L 192.00,256.00 z M 192.00,64.00l 320.00,0.00 l0.00-64.00 L 192.00,0.00 L 192.00,64.00 zM0.00,416.00A64.00,64.00 1620.00 1,0 128.00,416A64.00,64.00 1620.00 1,0 0.00,416zM0.00,224.00A64.00,64.00 1620.00 1,0 128.00,224A64.00,64.00 1620.00 1,0 0.00,224zM0.00,32.00A64.00,64.00 1620.00 1,0 128.00,32A64.00,64.00 1620.00 1,0 0.00,32z" />
108<glyph unicode="&#xe009;" d="M 32.00,480.00L 224.00,480.00L 224.00,448.00L 32.00,448.00zM 288.00,480.00L 480.00,480.00L 480.00,448.00L 288.00,448.00zM 476.00,320.00l-28.00,0.00 L 448.00,448.00 L 320.00,448.00 l0.00-128.00 L 192.00,320.00 L 192.00,448.00 L 64.00,448.00 l0.00-128.00 L 36.00,320.00 c-19.80,0.00-36.00-16.20-36.00-36.00l0.00-280.00 c0.00-19.80, 16.20-36.00, 36.00-36.00l 152.00,0.00 c 19.80,0.00, 36.00,16.20, 36.00,36.00L 224.00,192.00 l 64.00,0.00
109 l0.00-188.00 c0.00-19.80, 16.20-36.00, 36.00-36.00l 152.00,0.00 c 19.80,0.00, 36.00,16.20, 36.00,36.00L 512.00,284.00 C 512.00,303.80, 495.80,320.00, 476.00,320.00z M 174.00,0.00L 50.00,0.00 c-9.90,0.00-18.00,7.20-18.00,16.00
110 s 8.10,16.00, 18.00,16.00l 124.00,0.00 c 9.90,0.00, 18.00-7.20, 18.00-16.00S 183.90,0.00, 174.00,0.00z M 272.00,224.00l-32.00,0.00 c-8.80,0.00-16.00,7.20-16.00,16.00s 7.20,16.00, 16.00,16.00l 32.00,0.00 c 8.80,0.00, 16.00-7.20, 16.00-16.00
111 S 280.80,224.00, 272.00,224.00z M 462.00,0.00L 338.00,0.00 c-9.90,0.00-18.00,7.20-18.00,16.00s 8.10,16.00, 18.00,16.00l 124.00,0.00 c 9.90,0.00, 18.00-7.20, 18.00-16.00S 471.90,0.00, 462.00,0.00z" />
112<glyph unicode="&#xe008;" d="M 416.00,320.00L 416.00,400.00 c0.00,8.80-7.20,16.00-16.00,16.00L 288.00,416.00 L 288.00,448.00 c0.00,17.60-14.40,32.00-32.00,32.00l-64.00,0.00 c-17.602,0.00-32.00-14.40-32.00-32.00l0.00-32.00 L 48.00,416.00 c-8.801,0.00-16.00-7.20-16.00-16.00l0.00-320.00
113 c0.00-8.80, 7.199-16.00, 16.00-16.00l 144.00,0.00 l0.00-96.00 l 224.00,0.00 l 96.00,96.00L 512.00,320.00 L 416.00,320.00 z M 192.00,447.943c 0.017,0.019, 0.036,0.039, 0.057,0.057l 63.884,0.00
114 c 0.021-0.018, 0.041-0.038, 0.059-0.057L 256.00,416.00 l-64.00,0.00 L 192.00,447.943 z M 96.00,352.00L 96.00,384.00 l 256.00,0.00 l0.00-32.00 L 96.00,352.00 z M 416.00,13.255L 416.00,64.00 l 50.745,0.00 L 416.00,13.255z M 480.00,96.00l-96.00,0.00 l0.00-96.00
115 L 224.00,0.00 L 224.00,288.00 l 256.00,0.00 L 480.00,96.00 z" />
116<glyph unicode="&#xe007;" d="M 445.387,125.423c-22.827,22.778-51.864,34.536-78.973,34.536l-14.556,0.00 l-31.952,32.004l 127.81,128.019
117 c 31.952,32.005, 31.952,96.014,0.00,128.019L 256.001,255.973L 64.285,448.00c-31.952-32.004-31.952-96.014,0.00-128.019l 127.811-128.017
118 l-31.953-32.004l-14.557,0.00 c-27.11,0.00-56.146-11.759-78.974-34.538c-40.811-40.721-46.325-101.242-12.315-135.175
119 C 69.282-24.704, 89.441-32.00, 110.795-32.00c 27.108,0.00, 56.145,11.757, 78.973,34.536c 26.792,26.732, 38.371,62.00, 33.542,92.674l 32.692,32.744
120 l 32.688-32.744c-4.828-30.674, 6.753-65.941, 33.542-92.674C 345.063-20.243, 374.098-32.00, 401.206-32.00
121 c 21.354,0.00, 41.512,7.296, 56.497,22.248C 491.713,24.181, 486.197,84.702, 445.387,125.423z M 176.512,57.231
122 c-3.849-8.941-9.505-17.173-16.813-24.463c-7.318-7.302-15.586-12.959-24.574-16.812c-8.066-3.458-16.48-5.284-24.331-5.284
123 c-7.573,0.00-18.306,1.701-26.431,9.806c-8.068,8.052-9.76,18.659-9.76,26.144c0.00,7.771, 1.821,16.105, 5.263,24.106
124 c 3.85,8.942, 9.507,17.173, 16.813,24.463c 7.317,7.303, 15.586,12.957, 24.575,16.812c 8.067,3.457, 16.48,5.284, 24.332,5.284
125 c 7.573,0.00, 18.306-1.70, 26.429-9.807c 8.067-8.049, 9.761-18.658, 9.761-26.142C 181.777,73.567, 179.957,65.23, 176.512,57.231z
126 M 256.002,146.702c-24.957,0.00-45.188,20.266-45.188,45.263c0.00,24.996, 20.231,45.26, 45.188,45.26s 45.186-20.264, 45.186-45.26
127 C 301.188,166.966, 280.958,146.702, 256.002,146.702z M 427.636,20.479c-8.124-8.104-18.856-9.806-26.43-9.806
128 c-7.852,0.00-16.265,1.826-24.333,5.284c-8.986,3.853-17.254,9.51-24.571,16.812c-7.307,7.29-12.963,15.521-16.813,24.463
129 c-3.443,7.999-5.263,16.336-5.263,24.106c0.00,7.483, 1.692,18.094, 9.76,26.143c 8.123,8.104, 18.856,9.807, 26.43,9.807
130 c 7.85,0.00, 16.265-1.827, 24.33-5.284c 8.989-3.854, 17.258-9.509, 24.575-16.812c 7.305-7.29, 12.962-15.521, 16.813-24.463
131 c 3.442-7.999, 5.263-16.335, 5.263-24.106C 437.396,39.138, 435.702,28.53, 427.636,20.479z" />
132<glyph unicode="&#xe006;" d="M0.00,448.00L 512.00,448.00L 512.00,384.00L0.00,384.00zM0.00,352.00L 512.00,352.00L 512.00,288.00L0.00,288.00zM0.00,256.00L 512.00,256.00L 512.00,192.00L0.00,192.00zM0.00,160.00L 512.00,160.00L 512.00,96.00L0.00,96.00zM0.00,64.00L 512.00,64.00L 512.00,0.00L0.00,0.00z" />
133<glyph unicode="&#xe005;" d="M0.00,448.00L 512.00,448.00L 512.00,384.00L0.00,384.00zM 192.00,352.00L 512.00,352.00L 512.00,288.00L 192.00,288.00zM 192.00,160.00L 512.00,160.00L 512.00,96.00L 192.00,96.00zM0.00,256.00L 512.00,256.00L 512.00,192.00L0.00,192.00zM0.00,64.00L 512.00,64.00L 512.00,0.00L0.00,0.00z" />
134<glyph unicode="&#xe004;" d="M0.00,448.00L 512.00,448.00L 512.00,384.00L0.00,384.00zM 96.00,352.00L 416.00,352.00L 416.00,288.00L 96.00,288.00zM 96.00,160.00L 416.00,160.00L 416.00,96.00L 96.00,96.00zM0.00,256.00L 512.00,256.00L 512.00,192.00L0.00,192.00zM0.00,64.00L 512.00,64.00L 512.00,0.00L0.00,0.00z" />
135<glyph unicode="&#xe003;" d="M0.00,448.00L 512.00,448.00L 512.00,384.00L0.00,384.00zM0.00,352.00L 320.00,352.00L 320.00,288.00L0.00,288.00zM0.00,160.00L 320.00,160.00L 320.00,96.00L0.00,96.00zM0.00,256.00L 512.00,256.00L 512.00,192.00L0.00,192.00zM0.00,64.00L 512.00,64.00L 512.00,0.00L0.00,0.00z" />
136<glyph unicode="&#xe002;" d="M 512.00,183.771l0.00,80.458 l-79.572,7.957c-4.093,15.021-10.044,29.274-17.605,42.49l 52.298,63.919L 410.595,435.12l-63.918-52.298
137 c-13.217,7.562-27.471,13.513-42.491,17.604L 296.229,480.00l-80.458,0.00 l-7.957-79.573c-15.021-4.093-29.274-10.043-42.49-17.604
138 L 101.405,435.12L 44.88,378.595l 52.298-63.918c-7.562-13.216-13.513-27.47-17.605-42.49L0.00,264.229l0.00-80.458 l 79.573-7.957
139 c 4.093-15.021, 10.043-29.274, 17.605-42.491L 44.88,69.405l 56.524-56.524l 63.919,52.298c 13.216-7.562, 27.47-13.514, 42.49-17.605
140 L 215.771-32.00l 80.458,0.00 l 7.957,79.572c 15.021,4.093, 29.274,10.044, 42.491,17.605l 63.918-52.298l 56.524,56.524l-52.298,63.918
141 c 7.562,13.217, 13.514,27.471, 17.605,42.49L 512.00,183.771z M 352.00,192.00l-64.00-64.00l-64.00,0.00 l-64.00,64.00l0.00,64.00 l 64.00,64.00l 64.00,0.00 l 64.00-64.00L 352.00,192.00 z" />
142<glyph unicode="&#xe001;" d="M 451.716,380.285l-71.432,71.431C 364.728,467.272, 334.00,480.00, 312.00,480.00L 72.00,480.00 C 50.00,480.00, 32.00,462.00, 32.00,440.00l0.00-432.00 c0.00-22.00, 18.00-40.00, 40.00-40.00l 368.00,0.00 c 22.00,0.00, 40.00,18.00, 40.00,40.00
143 L 480.00,312.00 C 480.00,334.00, 467.272,364.729, 451.716,380.285z M 429.089,357.657c 1.565-1.565, 3.125-3.487, 4.64-5.657L 352.00,352.00 L 352.00,433.728
144 c 2.17-1.515, 4.092-3.075, 5.657-4.64L 429.089,357.657z M 448.00,8.00c0.00-4.336-3.664-8.00-8.00-8.00L 72.00,0.00 c-4.336,0.00-8.00,3.664-8.00,8.00L 64.00,440.00 c0.00,4.336, 3.664,8.00, 8.00,8.00
145 l 240.00,0.00 c 2.416,0.00, 5.127-0.305, 8.00-0.852L 320.00,320.00 l 127.148,0.00 c 0.547-2.873, 0.852-5.583, 0.852-8.00L 448.00,8.00 z" />
146<glyph unicode="&#xe000;" d="M 448.00,480.00L0.00,480.00 l0.00-512.00 l 512.00,0.00 L 512.00,416.00 L 448.00,480.00z M 256.00,416.00l 64.00,0.00 l0.00-128.00 l-64.00,0.00 L 256.00,416.00 z M 448.00,32.00L 64.00,32.00 L 64.00,416.00 l 32.00,0.00 l0.00-160.00 l 288.00,0.00 L 384.00,416.00 l 37.489,0.00 L 448.00,389.491L 448.00,32.00 z" />
147<glyph unicode="&#xe033;" d="M 64.00,208.00L 208.00,64.00L 448.00,304.00L 384.00,368.00L 208.00,192.00L 128.00,272.00 z" />
148<glyph unicode="&#x20;" horiz-adv-x="256" />
149<glyph class="hidden" unicode="&#xf000;" d="M0,480L 512 -32L0 -32 z" horiz-adv-x="0" />
150</font></defs></svg>

static/js/lib/tinymce/skins/lightgray/fonts/icomoon.ttf

1 PFFTMf{,DGDEFf$ OS/2/XVcmap}ԫgaspglyf#PheadNQ6hhea$hmtxlloca~Ptmaxpa8 nameOPpostJGD4!_< ...99^@LfGLfPfEd@.! P`@`` h `1     @486543210/.-,+*)('&%$#"! 
2 7L2n&b>pDjd*Tlr>z b
3
4,
5R
6x
7  ( 8 F(0#'#!37!3.5462'654&"3272?64&"&462 & (2PpP-c8P88(W  4$$4$ @F,8PP8yW(88P8c  S$4$$4@` #'+/37;3#3#3#3#'3#3#'3#73#3#3#3#'3#'3#'3#'3# @ @ @ @ @ @ @ ` `  #5'#3!'#'#'33!!53533``@`3333``@`` ` 333@```!####5"&46'7@@@@.BB@B\B`pp !####5"&46@@@@.BB@B\BppP!####5"&46@@@@.BB@B\B#'%"'&53264&#"'&4762#4&"32!!n22..2@9N99'@.22..2@9N99'@%p%##%8&&4&#%p%##%8&&4& `3"&=32765!!`@^^@T@<TT<@@ #3#53#5@@@@  `!%654&+;2654&'32+#532bK5@@ @`5K"33PPP#/5K@K5";&4&&4&`73#2#575!5```@``@``@`2#5264&"3'3>#53 ]]Igg3'
8]ppR ~@0gg4&6Rn@` #53#73#73#73#73#!73!7'!#'!@@```@@```@@@  #'/37?CG3#73#7#535#53#73#'3#533#73#7#535#53#73#'3#53!!!@@`@@`@ @@`@@ @` @@`@@`@ @@`@@ @`@@  @ ` `@ @ ` `@  @` 7#53533##%!53!5``@``@ @@``@`@  .26<3354&+"353#%5#";5#554&+326=4#2#535#53'77@@  @  @@`  ``@ ``  @@@@p)G``  @@   00  0 P@ @#J ''7''537#7'7#57Ej6jEj6jEEEj6ljEEjEj6jEEj6jE{EEj66jEEj#!!!";!5326=4&#536"&462`@  ``   @   z  )"264"&462$"&462"&462267"&'jԖԖfVZzZԖ$AWWA!%37#5>54&"#535.5462` 2>gg>2 GYԖYG @kb=PooP=bk@pF]]Fp` 3#575#53#'#373'@`@@`nD^^DD^^Dy I I7^^^^` %3#575#53#'#373'@`@@`nD^^DD^^D I I)^^^^ 5!!!!''7'77 ``+f>bAAAAAAAA @@`AAAAAAAA!!@
9 #'!53#5#5##53#%3#=33#!53 @@@@`` ``````````````h@ ?33#3#9`p`$^@``@`@ -="267&$2"&4"'&'&'67672654''&"67625&M----!!F!!0$$08P80$$QQ-%*6KK6*%@E;;EE;;n(( (88( ((**"7-&&-7"#"264"&462/67&'#7'Pppp0TxTTxTL&+U+&L> PJpppTTxTT~+&L>>L&+;`@< `` 3'73#37@@@`73#2#575#56"264$2"&4@@ `@`zzzԖԖ@  `@ @ @PzzzԖ  "!#535#535#53!!#535#535#537`@@@@@@ `@@@@@@@@@@@@@@@@@@`!!!462"!7 @((D`@``d((0` 7'!` M"EIMQUY]7"/&4?6327&#"2?>'7'&"7&54?62#"'32?64'773#3#'3#73#
10Q
11
121
13
14Q
15!!Q1AQ1AQ!
16Q
17
181
19
20Q
21!!Qu``5 ````U ``
22Q
23
241
25
26Q
27!QA1Q;1Q;!
28Q
29
301
31
32Q
33!QA,``u`` ```  .Q66?>&"/&4?6327&#"2?>'7'&"7&54?62#"'32?64T
34Q
35
361
37
38Q
39!!Q1AQ1AQ!
40Q
41
421
43
44Q
45!!Q 
46Q
47
481
49
50Q
51!QA1Q;1Q;!
52Q
53
541
55
56Q
57!QA155&.> @V%#) 8bd| 5FD!%YWQ<# >.'76}%V@Ab8 ) !DF5 |#<QWY #2"&=463"6!2"&=463"6p/AA]B]B/  (/AA]B]B/  B\BB.]@/ B\BB.]@/  !!!!!!!!!!'@@@@ @ @ @ @@` !!!!!!!!!!=@@@@ @ @ @ @`  )7!!!!!!'#5#53#575#53#535#535#5@@@` @`@@``@@@@@@@@``  I Iw  #!!!!!!462"462"462"@@@&4&&4&&4&&4&&4&&4@@@4&&4&4&&4&4&&4&)5AM3#%3##5##5##";26=3;2654&#"&46;27#"&46;2#"&46;2 @| | [    | |          #&,54&+54&+"#";37%3#5!537##! p @ p `@@`@3 `@P   `` @ 3 `  %9AU%&+'764''#"3276'73276&#"&547>76326"&462#"'.'&54632"-  -"",#)!!)#,"  ]&&  }# PP #O#)3!!3)#O&   N&&   !!!!!!!!!!@ @ @ @ @ !!!!!!'!!!!@@@ @@@@ !!!!!!'!!!!`@@`@ @@@@ !!!!!!5!!!!@@@ @@@@'/%5'&'7'&/#'737677'67'#'573P 48@P@84 PP 48@P@84 P@@@@@@P@84 PP 48@P@84 PP 48@@@@@@ *'.+"3!2654&#5#!"54;23H )p"RZ|H P0( R[!!!3#!3!53@@@  %@@p77''@@PА@P! (#x    F0   icomoonicomoonRegularRegularFontForge 2.0 : icomoon : 18-1-2013FontForge 2.0 : icomoon : 18-1-2013icomoonicomoonVersion 1.0Version 1.0icomoonicomoon9 
58    !"#$%&'()*+,-./01234567uniE034uniE032uniE031uniE030uniE02FuniE02EuniE02DuniE02CuniE02BuniE02AuniE029uniE028uniE027uniE026uniE025uniE024uniE023uniE022uniE021uniE020uniE01FuniE01EuniE01DuniE01CuniE01BuniE01AuniE019uniE018uniE017uniE016uniE015uniE014uniE013uniE012uniE011uniE010uniE00FuniE00EuniE00DuniE00CuniE00BuniE00AuniE009uniE008uniE007uniE006uniE005uniE004uniE003uniE002uniE001uniE000uniE033uniF0008=..

static/js/lib/tinymce/skins/lightgray/fonts/icomoon.woff

1wOFFOTTO 8 CFF 2i4FFTMf{,GDEF dOS/20K`/@cmap|@whead06MQhhea8$hmtxXFlmaxp7PnameOpost xZxշ‚J. )4b(J]ѧHYbO8"M@D$("MDAC m5ߙ; {r9s)3+1IdyAɤ&'B]bB]K*Rr˪te9ڈ30&t+XĘ%XSaaX<j1KeX+֞udϱ76l![ξ`Y{`;.6#2RT]#="5H/HJAR4Z(Mm*)⑬=RۉG[H'ţxfT<ǣX<4RT/EKR/EKR/EKR/EKR/YKd/YKd/YKd/YKd/ڡ[NĀIJӥ$Y!/͔fI9\/͓>>KK "iDDZ*-KJ+Ϥ* i)JY:)[VN^Z/ m6JXiKL1bVĬ1L060>kz4<|eTcaqʮ-n뿬cyTaԶ?QxR݄;T5&&Zst7޲z?;:ְNA '4>!}/3Jglkm,f1bp&uZ֦2_,=}g 񘎜3@G[t2;8 ԁ3sy[d .3p/}7s6@,9;Ѽڤct@z-<A$Wn9{sYίyaa"6]֞Bp~):ȘCrDdNjt`_neܴ8Q%lӁ%F&(8((geNkȦ}fG{zw *nvԻp !7]ʲbS 2| WJ[C; WЬdvjy lUl!Fl0JjS F.MA6hҠoqv|t;移>Y|#8+I8-=jBRYt„sӬn b;UuL0CzASByqV)< vit4ya6IS+/wQ&uYK䬂w6ʙ6ɪ}y@fn'(zs>9A8w~SN(kILsVo'ɔ'HZ7፨ [xќ Dz aYJ1coK?q~{t}W
2_wF/nyS?9y~r(+])0Yt znQYؕҢY#r~,6^J`hhӴAY I١ Tw2d9#+- a][_kdBssVס槰}S@|udÝfk&0GTr3y_kdAg_y[ +zp6pj,u+3[9KS$O_lqAp[=Wkjُ&&h Lp3vWW.l\+(Z8IՉ }lUɆ,9Ug&yfs }Tx$S5!(yeaU>XY rh8F1F*4
3}ݟ`'ȣ:ZVtĆ~L0|EcPV:
4eKq :кgW 9f|Lsf/{O*~hyxpBy.z<WuSL@@0x|AYb\.w~09i@
5{c|vj GJk]> =1گuL%u~4{vO `V
6];sha+TŔkEǏ9p"w FsG膒P@^R2ߢOu9
72_]h2숡с 'רb3sOٷnyѨ9Q~UoqQ׸jh4`ճ4pF5t<@-E(r +vb &T{JZ a@ڧ`{uo-F pQn-ZC
8uOӖhXKcC  [ w·-N&ug@[܈XF+Dј3<ٿ<~=GDt1"&8E4w&}ӣJb_4ݾ<zdxLhE52A]⍏Ҝ'͌(:bvsX#~~NKCض&/~ؑ8_=gOf}0|zr ]>m+Zs"Ξ[Tٓo{ypx]ق"r)3zw͑ihy* d.XӗumF4L2+ˊ
9zv@ADH=Z}Q 3_B["$R7]_0յIp5Y_vigdDފsleV Z[)Ł"ū*kr|-#ԄE'Qfի]҂z5RkqWuK
10ULNO~U
11 kHVg*<ZbP<+P=(ڲLڔPB~ t[I 6R` y}HE)7^{L}#s.} a}YLq#A%KCqj.FUϤQŒd ` Wik5g=6﹝u1]rA9?ģ|N&/If4OYkٳD5xTق?s=;/&'6WEq~V<7QXueeUsMȯn*L\gH&g]!lp"R<IjU|k8GZ\z)"ޥ9;PdPt)?ӯ62ݳ, &ďb6'a :9*y(knT ?y@%x*%QUV) Y#$AePQ}1 ZIÜYa5+V/(F`T BhrX+6yqKegq "T_%]KB"&E&$'m:weo#pOpD] N ȱV 6#QJ~Ep᧿ >3#7ޠ
12WᖫQ,g@qhz +i!͎>K&@Q܍QԛUPܵ}
13եÜϻmj*gwcaB6вCM^tagNHAMp)gꍤ2_Ďi,10Qk[GN MDQmaO`Bm(Qt@у",rXδb%v[ZFNHmKγ/1ʅyN1ۚ&G9:]*o_Y?uyZ)O" yKvZ?AU\@`\6 ȡ=ߢC|G*îf_k\"*{Qη;\
14V~TȜ!չwg%?x6KlU\D]P\f)ƩiA@ۣ}&?uduw(V_wK_v9|ї] PX"Q'ITc+ɴ*jj6A;5eA9h;;ΎCJi )bʁK>a~5
15(΍:97QjE'qpU((r~\LPT'#9y Vv~5_onF%5J"iΖ jhVddl^z0Jp}NDPg<ǵ܄:L@P=YkWŒ!rXRaȎR>?؆%k|/aE9kI-xJfT~mW[)rIo#El?H79&8Jƚ؟q[":MIŧL0@k}*t*^z9^D0B;*qnD DّeowsyL`(>
16LuMjK;IG*PcwZ sstaPD@4(S%jZ`g'"p٣-d00Un@*?EVk)ţ:ЋhKڒ>Հ!<)ISUDd"aNеWՀ16#
177dJɨ[(@iSc#j8 549nʚQWs칕fٔР俕.VR hsuL'I/R~EȌgvF\tu^aweȠW5L3\qtN̤(8{x޵K4
18AbPkk=s4s.ր&z w xC{{8 @]Czzc(!m$ŻǎĬCW;)Q'6*1ĢQß.ܗpeQ'֦؉UljmӜ؇Z؉ko:M{,+rb Nferb%;> A@\:^*vW;'VIxBˏJ\J/wpbzkN,[ubGN +X]H.'AԉX81RWN,&WN̊\D{/;/*e
19Q! >%u${{A5kV$)p[G>!~⥗Њ>P "G~t*}b|&*<nؘFKTmzőFAFp⽎5W/X ?l"֜35Л_PÁI&̸.*G.`u7z+PdߴFڻ9-]U=6":Y*9ZEgF&1nҷB,s(0B%m>Nnt]li?6,&hõzgV;Vuٓa^;6le\xEFﵼmV?LǗ4{؀|$ZR{8Vt`DS@Ɋg<.354PǢ4ZT:{KrK"KK":MqQ<MJ5^'VЗ
20Lh0'Cb"M NIY @si:VH_TOȵUR3d9֒aJ X9\sdJCی%P OP}D>,g>`.q  ]GeQ8hK8cF"x­֙hC&uOSk%$ u]gJ./z+e<u@EQsi3};i` P{"?ӋwPxV
217z࡙8Nv3{]>{*J,ge~Br ^<QdUy˚ =ٱ^O씇_hu<LASEx۴f67)_lu{\[Bgѯy o.!fa(g5 3NcSzYWxU+ھ̶)Eu&GM T Ɉ /pku[&4$g8ow%jA$[.'c?үh=-D;g8w ߌIQ8-}l?Id7#l{+5Ԥ}A]0
22ho*h}9CH,0,qn- }בro _̈́jN<- c T6
23 _ 0Z7kx@َH~uqL */jxWONƤak[Yh9|XgDs>F ҁhGPj82XK
24ZG^A+ČRq, 3썙ϯ^:<r-*4vg5U.D?eiK=!iEeNU墿ap;z~Lt&d6"ĝ尒 ;/+-[ZIC+ tFpV $#-$Շ1v4QOv@: }'v6is-iw
25r)D
26=܏0* k-d!IQ
27Nt8?$/j#ӻ/69Bw!֚:TDHp?_4R&Kh 47kn7#O 0Y< %K-"G(GѠ6Nd>.9U25<k'}
28 ! [}K!fTG-3j*v<҄z/,1"i_$D5hkJ ;KJCgKf$rcw67$d4b/eX&k2X"Z[X"k6KFEPCgo@[ȃWIXbIӍyVQ#"C,e0&BF З Xٽ le'aKMKl{~ۢؔj]#LJ BR6zsaUrR<~34m\riq^A8kSnQ96\J7/[xClZ8fū6u&_v,j8k)?qf!p֤?""]6,EZQ4  }/tZB9] .6E˟kWTE E cN u;ҏOA ~
29f:ye:a`pYRIfnp &!@I?˰CZC~ (6b 2]GmK߻ueYuٲ}=8BIWu:hCՔ7&&B?/2&쨔KZd.#~H "PVD l`\ƣs]2}yme"X /6l>U7bËe<!x[Mi?>
301!3 :pVj{l&vNIk{lZ/lsoþ>|xc```d3΃z0>}xc`d``b `b`B3 fixc`fb`Ø2H20001230(4000(!#B x厇@ 1919g RPPhtIx5`ɸ9S=L;ENSݦgȍ+Μ8r`ώ-֬X`Ό)ЧGmZ4iPF
31eJ)''~FxrrD#bl ffxc`d``b{Lq6_@<&@.X
32xc`d``|\T`xcb```(-
33@'zj0#e@i),zXXDV P7xu1j1EkR4iv6)#$U2r#iRX0x
34nx0_<s2.Om<+gQJ^y$~2K2JgMbJ_mJ7"G6:Y wz#hXϻh9JN1iwhSkjrEa^Ak[*5%# ,cj9xc`f }

static/js/lib/tinymce/skins/lightgray/fonts/readme.md

1Icons are generated and provided by the http://icomoon.io service.

static/js/lib/tinymce/skins/lightgray/img/anchor.gif

1GIF89a!, at4V;

static/js/lib/tinymce/skins/lightgray/img/loader.gif

1GIF89aҼܸت666&&&PPPpppVVVhhhFFFHHH222! NETSCAPE2.0!Created with ajaxload.info!
2,@pH b$Ĩtx@$W@e8>S-k\'<\0f4`
3/yXg{w Q
4o X
5h
6Dd aeTyvkyBVevCpyCyFpQpGpPCpHpͫpIppJe
7֝XϧepX%䀪ia6Ž'_S$jtEY<Mzh*AY I8ظqJ6cN8/fs !
8,@pH P Ĩtx@$W8L
9'p0g B hewf! Q
10mx[
11
12[ Dbd jxBitiBV[tCfCcCgcDccټ[cL
13cMcN[OfPbalB-Nƌ!t
14"`Q$}`̙bJ,{԰q GÈܠV .xI:A!
15,@pH P Ĩtx@$W8L
16'p0g B hewfusD
17mx[
18
19[e iCbd jXTjif^V[tC[fCfFcQ[GcDcHc
20cIcBcJشX cŪXX!FJϗt4qC
21hQGx!J@cPJ
228*Q&9 !b2Xcpu$ɒ&O!
23,@pH P Ĩtx@$W8L
24'p0g B hewfusD
25mx[
26
27[e iCbd jXTjif^V[tC[fCfFcQ[GcDcHc
28cIcBcJ؍[M[NXOӺcPXcWPFӗ :TjH7X-u!
29^@ICb"CdJ 
30eJ ~Uc3#A !
31,@pH P Ĩtx@$W8L
32'p0g B hewfusD
33mx[
34
35[e iCbd jXTjif^V[tC[fCfFcQ[GcDcHc
36cIcBcJ؍[M[NXOӺcPXccPBtt%ԐB+HԐG$] C#K(Gn٣ UndNC%M !
37,@pH P Ĩtx@$W8L
38'p0g B hewfusD
39mx[
40
41[e iCbd jXTjif^V[tC[fCfFcQ[GcDcHc
42cIcBcJP[[[bX׿cph/Xcfp+ScP}`M&N6@5z( BRRARie63yx4ƪ
43$J8%!
44,@pH P Ĩtx@$W8L
45'p0g B hewcusD 
46
47[e iBZjx[Cjif^tC[JCf D[DcC
48cPڏccc[McԤcXOf>I6-&(5f 1dx%OmmFaYQ$"-EYE2 I=jԄ#V7/H"EmF(a$ܗ !
49,@pH|$0
50P ĨTqp*X, "ө-o]"<df4`B/yYg{ uD
51 \eP
52hg kCahC{vk{`rBh{C{rDhhCFr
53rrBrhhLhMrih]OrBS+X.9+98c 0Q%85D.(6%.ȐCa,B{$;0 /z5۶;A;

static/js/lib/tinymce/skins/lightgray/img/object.gif

1GIF89a ???oooWWW򝝝333!, EI{Y5Oi#E
2ȩ1GJS};e|+% 4Ht,gLnD;

static/js/lib/tinymce/skins/lightgray/img/trans.gif

1GIF89a!,D;

static/js/lib/tinymce/skins/lightgray/img/wline.gif

1GIF89a**!,Df;

static/js/lib/tinymce/skins/lightgray/skin.classic.min.css

1.mce-container,.mce-container *,.mce-widget,.mce-widget *{margin:0;padding:0;border:0;outline:0;vertical-align:top;background:transparent;text-decoration:none;color:#000;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;text-shadow:none;float:none;position:static;width:auto;height:auto;white-space:nowrap;cursor:inherit;-webkit-tap-highlight-color:transparent;line-height:normal}.mce-container *[unselectable]{-moz-user-select:none;-webkit-user-select:none;-o-user-select:none;user-select:none}.mce-container ::-webkit-scrollbar{width:8px;height:8px;-webkit-border-radius:4px}.mce-container ::-webkit-scrollbar-track,.mce-container ::-webkit-scrollbar-track-piece{background-color:transparent}.mce-container ::-webkit-scrollbar-thumb{background-color:rgba(53,57,71,0.3);width:6px;height:6px;-webkit-border-radius:4px}.mce-fade{opacity:0;-webkit-transition:opacity .15s linear;transition:opacity .15s linear}.mce-fade.mce-in{opacity:1}.mce-tinymce{visibility:visible!important;position:relative}.mce-fullscreen{border:0;padding:0;margin:0;overflow:hidden;background:#FFF;height:100%;z-index:100}div.mce-fullscreen{position:fixed;top:0;left:0;width:100%;height:auto}.mce-tinymce{display:block;border-radius:2px}.mce-wordcount{float:right;padding:8px}.mce-edit-area{background:#FFF;filter:none}.mce-statusbar{position:relative}.mce-statusbar .mce-container-body{position:relative}.mce-fullscreen .mce-resizehandle{display:none}.mce-charmap{border-collapse:collapse}.mce-charmap td{cursor:default;border:1px solid #c5c5c5;width:20px;height:20px;line-height:20px;text-align:center;vertical-align:center;padding:2px}.mce-charmap td:hover{background:#d9d9d9}.mce-grid{border-spacing:2px;border-collapse:separate}.mce-grid a{display:block;border:1px solid transparent}.mce-grid a:hover{border-color:#c5c5c5}.mce-grid-border{margin:0 4px 0 4px}.mce-grid-border a{border-color:#e8e8e8;width:13px;height:13px}.mce-grid-border a:hover,.mce-grid-border a.mce-active{border-color:#c4daff;background:#deeafa}.mce-text-center{text-align:center}div.mce-tinymce-inline{width:100%;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.mce-container,.mce-container-body{display:block}.mce-autoscroll{overflow:hidden}.mce-scrollbar{position:absolute;width:7px;height:100%;top:2px;right:2px;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-scrollbar-h{top:auto;right:auto;left:2px;bottom:2px;width:100%;height:7px}.mce-scrollbar-thumb{position:absolute;background-color:#000;border:1px solid #888;border-color:rgba(85,85,85,0.6);width:5px;height:100%;-webkit-border-radius:7px;-moz-border-radius:7px;border-radius:7px}.mce-scrollbar-h .mce-scrollbar-thumb{width:100%;height:5px}.mce-scrollbar:hover,.mce-scrollbar.mce-active{background-color:#AAA;opacity:.6;filter:alpha(opacity=60);zoom:1;-webkit-border-radius:7px;-moz-border-radius:7px;border-radius:7px}.mce-scroll{position:relative}.mce-panel{border:0 solid #9e9e9e;background-color:#f0f0f0;background-image:-moz-linear-gradient(top,#fdfdfd,#ddd);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fdfdfd),to(#ddd));background-image:-webkit-linear-gradient(top,#fdfdfd,#ddd);background-image:-o-linear-gradient(top,#fdfdfd,#ddd);background-image:linear-gradient(to bottom,#fdfdfd,#ddd);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffdfdfd',endColorstr='#ffdddddd',GradientType=0);zoom:1}.mce-floatpanel{position:absolute;-webkit-box-shadow:#ccc 5px 5px 5px;-moz-box-shadow:#ccc 5px 5px 5px;box-shadow:#ccc 5px 5px 5px}.mce-floatpanel .mce-arrow,.mce-floatpanel .mce-arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.mce-floatpanel .mce-arrow{border-width:11px}.mce-floatpanel .mce-arrow:after{border-width:10px;content:""}.mce-floatpanel.mce-popover{position:absolute;top:0;left:0;background:#fff;-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.2);-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,0.2);-moz-box-shadow:0 5px 10px rgba(0,0,0,0.2);box-shadow:0 5px 10px rgba(0,0,0,0.2)}.mce-floatpanel.mce-popover.mce-bottom{margin-top:10px}.mce-floatpanel.mce-popover.mce-bottom>.mce-arrow{left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,0.25);top:-11px}.mce-floatpanel.mce-popover.mce-bottom>.mce-arrow:after{top:1px;margin-left:-10px;border-top-width:0;border-bottom-color:#fff}.mce-floatpanel.mce-popover.mce-bottom.mce-start{margin-left:-22px}.mce-floatpanel.mce-popover.mce-bottom.mce-start>.mce-arrow{left:20px}.mce-floatpanel.mce-popover.mce-bottom.mce-end{margin-left:22px}.mce-floatpanel.mce-popover.mce-bottom.mce-end>.mce-arrow{right:10px;left:auto}.mce-fullscreen{border:0;padding:0;margin:0;overflow:hidden;background:#FFF;height:100%}div.mce-fullscreen{position:fixed;top:0;left:0}#mce-modal-block{opacity:0;filter:alpha(opacity=0);zoom:1;position:fixed;left:0;top:0;width:100%;height:100%;background:#000}#mce-modal-block.mce-in{opacity:.3;filter:alpha(opacity=30);zoom:1}.mce-window-move{cursor:move}.mce-window{-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 3px 7px rgba(0,0,0,0.3);-moz-box-shadow:0 3px 7px rgba(0,0,0,0.3);box-shadow:0 3px 7px rgba(0,0,0,0.3);filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);background:transparent;background:#FFF;position:fixed;top:0;left:0;opacity:0;-webkit-transition:opacity 150ms ease-in;transition:opacity 150ms ease-in}.mce-window.mce-in{opacity:1}.mce-window-head{padding:9px 15px;border-bottom:1px solid #EEE;position:relative}.mce-window-head .mce-close{position:absolute;right:15px;top:9px;font-size:20px;font-weight:bold;line-height:20px;color:#CCC;text-shadow:0 1px 0 white;cursor:pointer;height:20px;overflow:hidden}.mce-close:hover{color:#AAA}.mce-window-head .mce-title{display:inline-block;*display:inline;*zoom:1;line-height:20px;font-size:20px;font-weight:bold;text-rendering:optimizelegibility;padding-right:10px}.mce-window .mce-container-body{display:block}.mce-foot{display:block;background-color:whiteSmoke;border-top:1px solid #DDD;-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px;-webkit-box-shadow:inset 0 1px 0 #fff;-moz-box-shadow:inset 0 1px 0 #fff;box-shadow:inset 0 1px 0 #fff}.mce-window-head .mce-dragh{position:absolute;top:0;left:0;cursor:move;width:90%;height:100%}.mce-window iframe{width:100%;height:100%}.mce-window.mce-fullscreen,.mce-window.mce-fullscreen .mce-foot{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.mce-abs-layout{position:relative}body .mce-abs-layout-item,.mce-abs-end{position:absolute}.mce-abs-end{width:1px;height:1px}.mce-container-body.mce-abs-layout{overflow:hidden}.mce-tooltip{position:absolute;padding:5px;opacity:.8;filter:alpha(opacity=80);zoom:1}.mce-tooltip-inner{font-size:11px;background-color:#000;color:#fff;max-width:200px;padding:5px 8px 4px 8px;text-align:center;white-space:normal}.mce-tooltip-inner{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.mce-tooltip-inner{-webkit-box-shadow:0 0 5px #000;-moz-box-shadow:0 0 5px #000;box-shadow:0 0 5px #000}.mce-tooltip-arrow{position:absolute;width:0;height:0;line-height:0;border:5px dashed #000}.mce-tooltip-arrow-n{border-bottom-color:#000}.mce-tooltip-arrow-s{border-top-color:#000}.mce-tooltip-arrow-e{border-left-color:#000}.mce-tooltip-arrow-w{border-right-color:#000}.mce-tooltip-n .mce-tooltip-arrow{top:0;left:50%;margin-left:-5px;border-bottom-style:solid;border-top:0;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-nw .mce-tooltip-arrow{top:0;left:10px;border-bottom-style:solid;border-top:0;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-ne .mce-tooltip-arrow{top:0;right:10px;border-bottom-style:solid;border-top:0;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-s .mce-tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-top-style:solid;border-bottom:0;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-sw .mce-tooltip-arrow{bottom:0;left:10px;border-top-style:solid;border-bottom:0;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-se .mce-tooltip-arrow{bottom:0;right:10px;border-top-style:solid;border-bottom:0;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-e .mce-tooltip-arrow{right:0;top:50%;margin-top:-5px;border-left-style:solid;border-right:0;border-top-color:transparent;border-bottom-color:transparent}.mce-tooltip-w .mce-tooltip-arrow{left:0;top:50%;margin-top:-5px;border-right-style:solid;border-left:none;border-top-color:transparent;border-bottom-color:transparent}.mce-btn{border:1px solid #c5c5c5;position:relative;color:#333;text-shadow:0 1px 1px rgba(255,255,255,0.75);background-color:#f0f0f0;background-image:-moz-linear-gradient(top,#fff,#d9d9d9);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#d9d9d9));background-image:-webkit-linear-gradient(top,#fff,#d9d9d9);background-image:-o-linear-gradient(top,#fff,#d9d9d9);background-image:linear-gradient(to bottom,#fff,#d9d9d9);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff',endColorstr='#ffd9d9d9',GradientType=0);zoom:1;border-color:#d9d9d9 #d9d9d9 #b3b3b3;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);display:inline-block;*display:inline;*zoom:1;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05)}.mce-btn:hover,.mce-btn:focus{text-decoration:none;color:#333;text-shadow:0 1px 1px rgba(255,255,255,0.75);background-color:#e3e3e3;background-image:-moz-linear-gradient(top,#f2f2f2,#ccc);background-image:-webkit-gradient(linear,0 0,0 100%,from(#f2f2f2),to(#ccc));background-image:-webkit-linear-gradient(top,#f2f2f2,#ccc);background-image:-o-linear-gradient(top,#f2f2f2,#ccc);background-image:linear-gradient(to bottom,#f2f2f2,#ccc);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2f2f2',endColorstr='#ffcccccc',GradientType=0);zoom:1;border-color:#ccc #ccc #a6a6a6;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25)}.mce-btn.mce-disabled,.mce-btn.mce-disabled:hover{cursor:default;background-image:none;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;opacity:.65;filter:alpha(opacity=65);zoom:1}.mce-btn.mce-active,.mce-btn.mce-active:hover{color:#333;text-shadow:0 1px 1px rgba(255,255,255,0.75);background-color:#d6d6d6;background-image:-moz-linear-gradient(top,#e6e6e6,#bfbfbf);background-image:-webkit-gradient(linear,0 0,0 100%,from(#e6e6e6),to(#bfbfbf));background-image:-webkit-linear-gradient(top,#e6e6e6,#bfbfbf);background-image:-o-linear-gradient(top,#e6e6e6,#bfbfbf);background-image:linear-gradient(to bottom,#e6e6e6,#bfbfbf);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe6e6e6',endColorstr='#ffbfbfbf',GradientType=0);zoom:1;border-color:#bfbfbf #bfbfbf #999;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05)}.mce-btn button{padding:4px 10px;font-size:14px;line-height:20px;*line-height:16px;cursor:pointer;color:#333;overflow:visible;-webkit-appearance:none}.mce-btn button::-moz-focus-inner{border:0;padding:0}.mce-btn i{text-shadow:1px 1px #fff}.mce-primary{color:#fff;text-shadow:0 1px 1px rgba(255,255,255,0.75);background-color:#006dcc;background-image:-moz-linear-gradient(top,#08c,#04c);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#04c));background-image:-webkit-linear-gradient(top,#08c,#04c);background-image:-o-linear-gradient(top,#08c,#04c);background-image:linear-gradient(to bottom,#08c,#04c);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc',endColorstr='#ff0044cc',GradientType=0);zoom:1;border-color:#04c #04c #002b80;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25)}.mce-primary:hover,.mce-primary:focus{color:#fff;text-shadow:0 1px 1px rgba(255,255,255,0.75);background-color:#005fb3;background-image:-moz-linear-gradient(top,#0077b3,#003cb3);background-image:-webkit-gradient(linear,0 0,0 100%,from(#0077b3),to(#003cb3));background-image:-webkit-linear-gradient(top,#0077b3,#003cb3);background-image:-o-linear-gradient(top,#0077b3,#003cb3);background-image:linear-gradient(to bottom,#0077b3,#003cb3);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0077b3',endColorstr='#ff003cb3',GradientType=0);zoom:1;border-color:#003cb3 #003cb3 #026;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25)}.mce-primary button{color:#fff}.mce-btn-large button{padding:9px 14px;font-size:16px;line-height:normal;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.mce-btn-large i{margin-top:2px}.mce-btn-small button{padding:3px 5px;font-size:12px;line-height:15px}.mce-btn-small i{margin-top:0}.mce-btn .mce-caret{margin-top:8px;*margin-top:6px;margin-left:0}.mce-btn-small .mce-caret{margin-top:6px;*margin-top:4px;margin-left:0}.mce-caret{display:inline-block;*display:inline;*zoom:1;width:0;height:0;vertical-align:top;border-top:4px solid #444;border-right:4px solid transparent;border-left:4px solid transparent;content:""}.mce-disabled .mce-caret{border-top-color:#999}.mce-caret.mce-up{border-bottom:4px solid #444;border-top:0}.mce-btn-group .mce-btn{border-width:1px 0 1px 0;margin:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.mce-btn-group .mce-btn:hover,.mce-btn-group .mce-btn:focus{color:#333;text-shadow:0 1px 1px rgba(255,255,255,0.75);background-color:#e3e3e3;background-image:-moz-linear-gradient(top,#f2f2f2,#ccc);background-image:-webkit-gradient(linear,0 0,0 100%,from(#f2f2f2),to(#ccc));background-image:-webkit-linear-gradient(top,#f2f2f2,#ccc);background-image:-o-linear-gradient(top,#f2f2f2,#ccc);background-image:linear-gradient(to bottom,#f2f2f2,#ccc);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2f2f2',endColorstr='#ffcccccc',GradientType=0);zoom:1;border-color:#ccc #ccc #a6a6a6;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25)}.mce-btn-group .mce-btn.mce-disabled,.mce-btn-group .mce-btn.mce-disabled:hover{-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);color:#333;text-shadow:0 1px 1px rgba(255,255,255,0.75);background-color:#f0f0f0;background-image:-moz-linear-gradient(top,#fff,#d9d9d9);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#d9d9d9));background-image:-webkit-linear-gradient(top,#fff,#d9d9d9);background-image:-o-linear-gradient(top,#fff,#d9d9d9);background-image:linear-gradient(to bottom,#fff,#d9d9d9);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff',endColorstr='#ffd9d9d9',GradientType=0);zoom:1;border-color:#d9d9d9 #d9d9d9 #b3b3b3;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25)}.mce-btn-group .mce-btn.mce-active,.mce-btn-group .mce-btn.mce-active:hover,.mce-btn-group .mce-btn:active{color:#333;text-shadow:0 1px 1px rgba(255,255,255,0.75);background-color:#d6d6d6;background-image:-moz-linear-gradient(top,#e6e6e6,#bfbfbf);background-image:-webkit-gradient(linear,0 0,0 100%,from(#e6e6e6),to(#bfbfbf));background-image:-webkit-linear-gradient(top,#e6e6e6,#bfbfbf);background-image:-o-linear-gradient(top,#e6e6e6,#bfbfbf);background-image:linear-gradient(to bottom,#e6e6e6,#bfbfbf);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe6e6e6',endColorstr='#ffbfbfbf',GradientType=0);zoom:1;border-color:#bfbfbf #bfbfbf #999;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05)}.mce-btn-group .mce-btn.mce-disabled button{opacity:.65;filter:alpha(opacity=65);zoom:1}.mce-btn-group .mce-first{border-left:1px solid #c5c5c5;-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px}.mce-btn-group .mce-last{border-right:1px solid #c5c5c5;-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0}.mce-btn-group .mce-first.mce-last{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.mce-btn-group .mce-btn.mce-flow-layout-item{margin:0}.mce-checkbox{cursor:pointer}i.mce-i-checkbox{margin:0 3px 0 0;border:1px solid #c5c5c5;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);background-color:#f0f0f0;background-image:-moz-linear-gradient(top,#fdfdfd,#ddd);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fdfdfd),to(#ddd));background-image:-webkit-linear-gradient(top,#fdfdfd,#ddd);background-image:-o-linear-gradient(top,#fdfdfd,#ddd);background-image:linear-gradient(to bottom,#fdfdfd,#ddd);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffdfdfd',endColorstr='#ffdddddd',GradientType=0);zoom:1;text-indent:-10em;*font-size:0;*line-height:0;*text-indent:0}.mce-checked i.mce-i-checkbox{color:#000;font-size:16px;line-height:16px;text-indent:0}.mce-checkbox:focus i.mce-i-checkbox{border:1px solid #59a5e1;border:1px solid rgba(82,168,236,0.8);-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6)}.mce-colorbutton .mce-ico{position:relative}.mce-colorpicker{background:#FFF}.mce-colorbutton-grid{margin:4px}.mce-grid td div{border:1px solid #808080;width:12px;height:12px;margin:2px;cursor:pointer}.mce-grid td div:hover{border-color:black}.mce-grid td div:focus{border-color:#59a5e1;outline:1px solid rgba(82,168,236,0.8);border-color:rgba(82,168,236,0.8)}.mce-colorbutton{position:relative}.mce-colorbutton .mce-preview{display:block;position:absolute;left:50%;top:50%;margin-left:-8px;margin-top:7px;background:gray;width:16px;height:2px;overflow:hidden}.mce-combobox{display:inline-block;*display:inline;*zoom:1;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;width:100px;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05)}.mce-combobox input{border-color:1px solid #c5c5c5;border-right-color:rgba(0,0,0,0.15);height:28px}.mce-combobox.mce-has-open input{-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.mce-combobox .mce-btn{border-left:0;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.mce-combobox button{padding-right:8px;padding-left:8px}.mce-combobox *:focus{border-color:#59a5e1;border-color:rgba(82,168,236,0.8);-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6)}.mce-path{display:inline-block;*display:inline;*zoom:1;padding:8px;white-space:normal}.mce-path .mce-txt{display:inline-block;padding-right:3px}.mce-path .mce-path-body{display:inline-block}.mce-path-item{display:inline-block;*display:inline;*zoom:1;cursor:pointer;color:#000}.mce-path-item:hover{text-decoration:underline}.mce-path-item:focus{background:gray;color:white}.mce-path .mce-divider{display:inline}.mce-fieldset{border:0 solid #9e9e9e;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.mce-fieldset>.mce-container-body{margin-top:-15px}.mce-fieldset-title{margin-left:5px;padding:0 5px 0 5px}.mce-fit-layout{display:inline-block;*display:inline;*zoom:1}.mce-fit-layout-item{position:absolute}.mce-flow-layout-item{display:inline-block;*display:inline;*zoom:1}.mce-flow-layout-item{margin:2px 0 2px 2px}.mce-flow-layout-item.mce-last{margin-right:2px}.mce-flow-layout{white-space:normal}.mce-iframe{border:0 solid #c5c5c5;width:100%;height:100%}.mce-label{display:inline-block;*display:inline;*zoom:1;text-shadow:0 1px 1px rgba(255,255,255,0.75);border:0 solid #c5c5c5;overflow:hidden}.mce-label.mce-autoscroll{overflow:auto}.mce-label-disabled .mce-text{color:#999}.mce-label.mce-multiline{white-space:pre-wrap}.mce-menubar .mce-menubtn{border-color:transparent;background:transparent;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;filter:none}.mce-menubar{border:1px solid #ddd}.mce-menubar .mce-menubtn button{color:#000}.mce-menubar .mce-menubtn:hover,.mce-menubar .mce-menubtn.mce-active,.mce-menubtn:focus{border-color:transparent;background:#ddd;filter:none}.mce-menubtn.mce-disabled span{color:#999}.mce-listbox button{text-align:left;padding-right:20px;position:relative}.mce-listbox .mce-caret{position:absolute;margin-top:-2px;right:8px;top:50%}.mce-listbox span{width:100%;display:block;overflow:hidden}.mce-menu-item{display:block;padding:6px 20px;clear:both;font-weight:normal;line-height:20px;color:#333;white-space:nowrap;cursor:pointer;line-height:normal}.mce-menu-item.mce-disabled .mce-text{color:#999}.mce-menu-item:hover,.mce-menu-item.mce-selected,.mce-menu-item:focus{text-decoration:none;color:#fff;background-color:#0081c2;background-image:-moz-linear-gradient(top,#08c,#0077b3);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#0077b3));background-image:-webkit-linear-gradient(top,#08c,#0077b3);background-image:-o-linear-gradient(top,#08c,#0077b3);background-image:linear-gradient(to bottom,#08c,#0077b3);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc',endColorstr='#ff0077b3',GradientType=0);zoom:1}.mce-menu-item:hover .mce-text,.mce-menu-item.mce-selected .mce-text{color:#fff}.mce-menu-item:hover .mce-ico,.mce-menu-item.mce-selected .mce-ico,.mce-menu-item:focus .mce-ico{color:white}.mce-menu-shortcut{display:inline-block;color:#999}.mce-menu-shortcut{display:inline-block;*display:inline;*zoom:1;padding:0 20px 0 20px}.mce-menu-item .mce-caret{margin-top:6px;*margin-top:3px;margin-right:6px;border-top:4px solid transparent;border-bottom:4px solid transparent;border-left:4px solid #666}.mce-menu-item.mce-selected .mce-caret,.mce-menu-item:focus .mce-caret{border-left-color:#FFF}.mce-menu-align .mce-menu-shortcut{*margin-top:-2px}.mce-menu-align .mce-menu-shortcut,.mce-menu-align .mce-caret{position:absolute;right:0}.mce-menu-item-sep,.mce-menu-item-sep:hover{padding:0;height:1px;margin:9px 1px;overflow:hidden;background:#e5e5e5;border-bottom:1px solid white;cursor:default;filter:none}.mce-menu-item.mce-active i{visibility:visible}.mce-menu-item.mce-active{background-color:#c8def4;outline:1px solid #c5c5c5}.mce-menu-item-checkbox.mce-active{background-color:#FFF;outline:0}.mce-menu{filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);background:transparent;z-index:1000;padding:5px 0 5px 0;margin:2px 0 0;min-width:160px;background:#FFF;border:1px solid #CCC;border:1px solid rgba(0,0,0,0.2);z-index:1002;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,0.2);-moz-box-shadow:0 5px 10px rgba(0,0,0,0.2);box-shadow:0 5px 10px rgba(0,0,0,0.2)}.mce-menu i{display:none}.mce-menu-has-icons i{display:inline-block;*display:inline;*zoom:1}.mce-menu-sub{margin-top:-6px;margin-left:-1px;-webkit-border-radius:0 6px 6px 6px;-moz-border-radius:0 6px 6px 6px;border-radius:0 6px 6px 6px}i.mce-radio{padding:1px;margin:0 3px 0 0;background-color:#fafafa;border:1px solid #cacece;-webkit-border-radius:8px;-moz-border-radius:8px;border-radius:8px;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);background-color:#f0f0f0;background-image:-moz-linear-gradient(top,#fdfdfd,#ddd);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fdfdfd),to(#ddd));background-image:-webkit-linear-gradient(top,#fdfdfd,#ddd);background-image:-o-linear-gradient(top,#fdfdfd,#ddd);background-image:linear-gradient(to bottom,#fdfdfd,#ddd);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffdfdfd',endColorstr='#ffdddddd',GradientType=0);zoom:1}i.mce-radio:after{font-family:Arial;font-size:12px;color:#000;content:'\25cf'}.mce-container-body .mce-resizehandle{position:absolute;right:0;bottom:0;width:16px;height:16px;visibility:visible;cursor:s-resize;margin:0}.mce-resizehandle-both{cursor:se-resize}i.mce-i-resize{color:#000}.mce-spacer{visibility:hidden}.mce-splitbtn .mce-open{border-left:1px solid transparent;border-right:1px solid transparent}.mce-splitbtn:hover .mce-open{border-left-color:#c5c5c5;border-right-color:#c5c5c5}.mce-splitbtn button{padding-right:4px}.mce-splitbtn .mce-open{padding-left:4px}.mce-splitbtn .mce-open.mce-active{-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05)}.mce-stack-layout-item{display:block}.mce-tabs{display:block;border-bottom:1px solid #ccc}.mce-tab{display:inline-block;*display:inline;*zoom:1;border:1px solid #ccc;border-width:1px 1px 0 0;background:#e3e3e3;padding:8px;text-shadow:0 1px 1px rgba(255,255,255,0.75);height:13px;cursor:pointer}.mce-tab:hover{background:#fdfdfd}.mce-tab.mce-active{background:#fdfdfd;border-bottom-color:transparent;margin-bottom:-1px;height:14px}.mce-textbox{background:#FFF;border:1px solid #c5c5c5;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);display:inline-block;-webkit-transition:border linear .2s,box-shadow linear .2s;transition:border linear .2s,box-shadow linear .2s;height:28px;resize:none;padding:0 4px 0 4px;white-space:normal;color:#000}.mce-textbox:focus{border-color:rgba(82,168,236,0.8);-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6)}.mce-placeholder .mce-textbox{color:#aaa}.mce-textbox.mce-multiline{padding:4px}.mce-throbber{position:absolute;top:0;left:0;width:100%;height:100%;opacity:.6;filter:alpha(opacity=60);zoom:1;background:#fff url('img/loader.gif') no-repeat center center}@font-face{font-family:'tinymce';src:url('fonts/icomoon.eot');src:url('fonts/icomoon.eot?#iefix') format('embedded-opentype'),url('fonts/icomoon.svg#icomoon') format('svg'),url('fonts/icomoon.woff') format('woff'),url('fonts/icomoon.ttf') format('truetype');font-weight:normal;font-style:normal}.mce-ico{font-family:'tinymce',Arial;font-style:normal;font-weight:normal;font-size:16px;line-height:16px;vertical-align:text-top;-webkit-font-smoothing:antialiased;display:inline-block;background:transparent center center;width:16px;height:16px;color:#333}.mce-i-save:before{content:"\e000"}.mce-i-newdocument:before{content:"\e001"}.mce-i-fullpage:before{content:"\e002"}.mce-i-alignleft:before{content:"\e003"}.mce-i-aligncenter:before{content:"\e004"}.mce-i-alignright:before{content:"\e005"}.mce-i-alignjustify:before{content:"\e006"}.mce-i-cut:before{content:"\e007"}.mce-i-paste:before{content:"\e008"}.mce-i-searchreplace:before{content:"\e009"}.mce-i-bullist:before{content:"\e00a"}.mce-i-numlist:before{content:"\e00b"}.mce-i-indent:before{content:"\e00c"}.mce-i-outdent:before{content:"\e00d"}.mce-i-blockquote:before{content:"\e00e"}.mce-i-undo:before{content:"\e00f"}.mce-i-redo:before{content:"\e010"}.mce-i-link:before{content:"\e011"}.mce-i-unlink:before{content:"\e012"}.mce-i-anchor:before{content:"\e013"}.mce-i-image:before{content:"\e014"}.mce-i-media:before{content:"\e015"}.mce-i-help:before{content:"\e016"}.mce-i-code:before{content:"\e017"}.mce-i-inserttime:before{content:"\e018"}.mce-i-preview:before{content:"\e019"}.mce-i-forecolor:before{content:"\e01a"}.mce-i-backcolor:before{content:"\e01a"}.mce-i-table:before{content:"\e01b"}.mce-i-hr:before{content:"\e01c"}.mce-i-removeformat:before{content:"\e01d"}.mce-i-subscript:before{content:"\e01e"}.mce-i-superscript:before{content:"\e01f"}.mce-i-charmap:before{content:"\e020"}.mce-i-emoticons:before{content:"\e021"}.mce-i-print:before{content:"\e022"}.mce-i-fullscreen:before{content:"\e023"}.mce-i-spellchecker:before{content:"\e024"}.mce-i-nonbreaking:before{content:"\e025"}.mce-i-template:before{content:"\e026"}.mce-i-pagebreak:before{content:"\e027"}.mce-i-restoredraft:before{content:"\e028"}.mce-i-untitled:before{content:"\e029"}.mce-i-bold:before{content:"\e02a"}.mce-i-italic:before{content:"\e02b"}.mce-i-underline:before{content:"\e02c"}.mce-i-strikethrough:before{content:"\e02d"}.mce-i-visualchars:before{content:"\e02e"}.mce-i-ltr:before{content:"\e02f"}.mce-i-rtl:before{content:"\e030"}.mce-i-copy:before{content:"\e031"}.mce-i-resize:before{content:"\e032"}.mce-i-browse:before{content:"\e034"}.mce-i-checkbox:before,.mce-i-selected:before{content:"\e033"}.mce-i-selected{visibility:hidden}i.mce-i-backcolor{text-shadow:none;background:#BBB}

static/js/lib/tinymce/skins/lightgray/skin.ie7.min.css

1.mce-container,.mce-container *,.mce-widget,.mce-widget *{margin:0;padding:0;border:0;outline:0;vertical-align:top;background:transparent;text-decoration:none;color:#000;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;text-shadow:none;float:none;position:static;width:auto;height:auto;white-space:nowrap;cursor:inherit;-webkit-tap-highlight-color:transparent;line-height:normal}.mce-container *[unselectable]{-moz-user-select:none;-webkit-user-select:none;-o-user-select:none;user-select:none}.mce-container ::-webkit-scrollbar{width:8px;height:8px;-webkit-border-radius:4px}.mce-container ::-webkit-scrollbar-track,.mce-container ::-webkit-scrollbar-track-piece{background-color:transparent}.mce-container ::-webkit-scrollbar-thumb{background-color:rgba(53,57,71,0.3);width:6px;height:6px;-webkit-border-radius:4px}.mce-fade{opacity:0;-webkit-transition:opacity .15s linear;transition:opacity .15s linear}.mce-fade.mce-in{opacity:1}.mce-tinymce{visibility:visible!important;position:relative}.mce-fullscreen{border:0;padding:0;margin:0;overflow:hidden;background:#FFF;height:100%;z-index:100}div.mce-fullscreen{position:fixed;top:0;left:0;width:100%;height:auto}.mce-tinymce{display:block;border-radius:2px}.mce-wordcount{float:right;padding:8px}.mce-edit-area{background:#FFF;filter:none}.mce-statusbar{position:relative}.mce-statusbar .mce-container-body{position:relative}.mce-fullscreen .mce-resizehandle{display:none}.mce-charmap{border-collapse:collapse}.mce-charmap td{cursor:default;border:1px solid #c5c5c5;width:20px;height:20px;line-height:20px;text-align:center;vertical-align:center;padding:2px}.mce-charmap td:hover{background:#d9d9d9}.mce-grid{border-spacing:2px;border-collapse:separate}.mce-grid a{display:block;border:1px solid transparent}.mce-grid a:hover{border-color:#c5c5c5}.mce-grid-border{margin:0 4px 0 4px}.mce-grid-border a{border-color:#e8e8e8;width:13px;height:13px}.mce-grid-border a:hover,.mce-grid-border a.mce-active{border-color:#c4daff;background:#deeafa}.mce-text-center{text-align:center}div.mce-tinymce-inline{width:100%;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.mce-container,.mce-container-body{display:block}.mce-autoscroll{overflow:hidden}.mce-scrollbar{position:absolute;width:7px;height:100%;top:2px;right:2px;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-scrollbar-h{top:auto;right:auto;left:2px;bottom:2px;width:100%;height:7px}.mce-scrollbar-thumb{position:absolute;background-color:#000;border:1px solid #888;border-color:rgba(85,85,85,0.6);width:5px;height:100%;-webkit-border-radius:7px;-moz-border-radius:7px;border-radius:7px}.mce-scrollbar-h .mce-scrollbar-thumb{width:100%;height:5px}.mce-scrollbar:hover,.mce-scrollbar.mce-active{background-color:#AAA;opacity:.6;filter:alpha(opacity=60);zoom:1;-webkit-border-radius:7px;-moz-border-radius:7px;border-radius:7px}.mce-scroll{position:relative}.mce-panel{border:0 solid #9e9e9e;background-color:#f0f0f0;background-image:-moz-linear-gradient(top,#fdfdfd,#ddd);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fdfdfd),to(#ddd));background-image:-webkit-linear-gradient(top,#fdfdfd,#ddd);background-image:-o-linear-gradient(top,#fdfdfd,#ddd);background-image:linear-gradient(to bottom,#fdfdfd,#ddd);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffdfdfd',endColorstr='#ffdddddd',GradientType=0);zoom:1}.mce-floatpanel{position:absolute;-webkit-box-shadow:#ccc 5px 5px 5px;-moz-box-shadow:#ccc 5px 5px 5px;box-shadow:#ccc 5px 5px 5px}.mce-floatpanel .mce-arrow,.mce-floatpanel .mce-arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.mce-floatpanel .mce-arrow{border-width:11px}.mce-floatpanel .mce-arrow:after{border-width:10px;content:""}.mce-floatpanel.mce-popover{position:absolute;top:0;left:0;background:#fff;-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.2);-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,0.2);-moz-box-shadow:0 5px 10px rgba(0,0,0,0.2);box-shadow:0 5px 10px rgba(0,0,0,0.2)}.mce-floatpanel.mce-popover.mce-bottom{margin-top:10px}.mce-floatpanel.mce-popover.mce-bottom>.mce-arrow{left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,0.25);top:-11px}.mce-floatpanel.mce-popover.mce-bottom>.mce-arrow:after{top:1px;margin-left:-10px;border-top-width:0;border-bottom-color:#fff}.mce-floatpanel.mce-popover.mce-bottom.mce-start{margin-left:-22px}.mce-floatpanel.mce-popover.mce-bottom.mce-start>.mce-arrow{left:20px}.mce-floatpanel.mce-popover.mce-bottom.mce-end{margin-left:22px}.mce-floatpanel.mce-popover.mce-bottom.mce-end>.mce-arrow{right:10px;left:auto}.mce-fullscreen{border:0;padding:0;margin:0;overflow:hidden;background:#FFF;height:100%}div.mce-fullscreen{position:fixed;top:0;left:0}#mce-modal-block{opacity:0;filter:alpha(opacity=0);zoom:1;position:fixed;left:0;top:0;width:100%;height:100%;background:#000}#mce-modal-block.mce-in{opacity:.3;filter:alpha(opacity=30);zoom:1}.mce-window-move{cursor:move}.mce-window{-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 3px 7px rgba(0,0,0,0.3);-moz-box-shadow:0 3px 7px rgba(0,0,0,0.3);box-shadow:0 3px 7px rgba(0,0,0,0.3);filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);background:transparent;background:#FFF;position:fixed;top:0;left:0;opacity:0;-webkit-transition:opacity 150ms ease-in;transition:opacity 150ms ease-in}.mce-window.mce-in{opacity:1}.mce-window-head{padding:9px 15px;border-bottom:1px solid #EEE;position:relative}.mce-window-head .mce-close{position:absolute;right:15px;top:9px;font-size:20px;font-weight:bold;line-height:20px;color:#CCC;text-shadow:0 1px 0 white;cursor:pointer;height:20px;overflow:hidden}.mce-close:hover{color:#AAA}.mce-window-head .mce-title{display:inline-block;*display:inline;*zoom:1;line-height:20px;font-size:20px;font-weight:bold;text-rendering:optimizelegibility;padding-right:10px}.mce-window .mce-container-body{display:block}.mce-foot{display:block;background-color:whiteSmoke;border-top:1px solid #DDD;-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px;-webkit-box-shadow:inset 0 1px 0 #fff;-moz-box-shadow:inset 0 1px 0 #fff;box-shadow:inset 0 1px 0 #fff}.mce-window-head .mce-dragh{position:absolute;top:0;left:0;cursor:move;width:90%;height:100%}.mce-window iframe{width:100%;height:100%}.mce-window.mce-fullscreen,.mce-window.mce-fullscreen .mce-foot{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.mce-abs-layout{position:relative}body .mce-abs-layout-item,.mce-abs-end{position:absolute}.mce-abs-end{width:1px;height:1px}.mce-container-body.mce-abs-layout{overflow:hidden}.mce-tooltip{position:absolute;padding:5px;opacity:.8;filter:alpha(opacity=80);zoom:1}.mce-tooltip-inner{font-size:11px;background-color:#000;color:#fff;max-width:200px;padding:5px 8px 4px 8px;text-align:center;white-space:normal}.mce-tooltip-inner{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.mce-tooltip-inner{-webkit-box-shadow:0 0 5px #000;-moz-box-shadow:0 0 5px #000;box-shadow:0 0 5px #000}.mce-tooltip-arrow{position:absolute;width:0;height:0;line-height:0;border:5px dashed #000}.mce-tooltip-arrow-n{border-bottom-color:#000}.mce-tooltip-arrow-s{border-top-color:#000}.mce-tooltip-arrow-e{border-left-color:#000}.mce-tooltip-arrow-w{border-right-color:#000}.mce-tooltip-n .mce-tooltip-arrow{top:0;left:50%;margin-left:-5px;border-bottom-style:solid;border-top:0;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-nw .mce-tooltip-arrow{top:0;left:10px;border-bottom-style:solid;border-top:0;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-ne .mce-tooltip-arrow{top:0;right:10px;border-bottom-style:solid;border-top:0;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-s .mce-tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-top-style:solid;border-bottom:0;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-sw .mce-tooltip-arrow{bottom:0;left:10px;border-top-style:solid;border-bottom:0;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-se .mce-tooltip-arrow{bottom:0;right:10px;border-top-style:solid;border-bottom:0;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-e .mce-tooltip-arrow{right:0;top:50%;margin-top:-5px;border-left-style:solid;border-right:0;border-top-color:transparent;border-bottom-color:transparent}.mce-tooltip-w .mce-tooltip-arrow{left:0;top:50%;margin-top:-5px;border-right-style:solid;border-left:none;border-top-color:transparent;border-bottom-color:transparent}.mce-btn{border:1px solid #c5c5c5;position:relative;color:#333;text-shadow:0 1px 1px rgba(255,255,255,0.75);background-color:#f0f0f0;background-image:-moz-linear-gradient(top,#fff,#d9d9d9);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#d9d9d9));background-image:-webkit-linear-gradient(top,#fff,#d9d9d9);background-image:-o-linear-gradient(top,#fff,#d9d9d9);background-image:linear-gradient(to bottom,#fff,#d9d9d9);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff',endColorstr='#ffd9d9d9',GradientType=0);zoom:1;border-color:#d9d9d9 #d9d9d9 #b3b3b3;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);display:inline-block;*display:inline;*zoom:1;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05)}.mce-btn:hover,.mce-btn:focus{text-decoration:none;color:#333;text-shadow:0 1px 1px rgba(255,255,255,0.75);background-color:#e3e3e3;background-image:-moz-linear-gradient(top,#f2f2f2,#ccc);background-image:-webkit-gradient(linear,0 0,0 100%,from(#f2f2f2),to(#ccc));background-image:-webkit-linear-gradient(top,#f2f2f2,#ccc);background-image:-o-linear-gradient(top,#f2f2f2,#ccc);background-image:linear-gradient(to bottom,#f2f2f2,#ccc);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2f2f2',endColorstr='#ffcccccc',GradientType=0);zoom:1;border-color:#ccc #ccc #a6a6a6;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25)}.mce-btn.mce-disabled,.mce-btn.mce-disabled:hover{cursor:default;background-image:none;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;opacity:.65;filter:alpha(opacity=65);zoom:1}.mce-btn.mce-active,.mce-btn.mce-active:hover{color:#333;text-shadow:0 1px 1px rgba(255,255,255,0.75);background-color:#d6d6d6;background-image:-moz-linear-gradient(top,#e6e6e6,#bfbfbf);background-image:-webkit-gradient(linear,0 0,0 100%,from(#e6e6e6),to(#bfbfbf));background-image:-webkit-linear-gradient(top,#e6e6e6,#bfbfbf);background-image:-o-linear-gradient(top,#e6e6e6,#bfbfbf);background-image:linear-gradient(to bottom,#e6e6e6,#bfbfbf);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe6e6e6',endColorstr='#ffbfbfbf',GradientType=0);zoom:1;border-color:#bfbfbf #bfbfbf #999;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05)}.mce-btn button{padding:4px 10px;font-size:14px;line-height:20px;*line-height:16px;cursor:pointer;color:#333;overflow:visible;-webkit-appearance:none}.mce-btn button::-moz-focus-inner{border:0;padding:0}.mce-btn i{text-shadow:1px 1px #fff}.mce-primary{color:#fff;text-shadow:0 1px 1px rgba(255,255,255,0.75);background-color:#006dcc;background-image:-moz-linear-gradient(top,#08c,#04c);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#04c));background-image:-webkit-linear-gradient(top,#08c,#04c);background-image:-o-linear-gradient(top,#08c,#04c);background-image:linear-gradient(to bottom,#08c,#04c);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc',endColorstr='#ff0044cc',GradientType=0);zoom:1;border-color:#04c #04c #002b80;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25)}.mce-primary:hover,.mce-primary:focus{color:#fff;text-shadow:0 1px 1px rgba(255,255,255,0.75);background-color:#005fb3;background-image:-moz-linear-gradient(top,#0077b3,#003cb3);background-image:-webkit-gradient(linear,0 0,0 100%,from(#0077b3),to(#003cb3));background-image:-webkit-linear-gradient(top,#0077b3,#003cb3);background-image:-o-linear-gradient(top,#0077b3,#003cb3);background-image:linear-gradient(to bottom,#0077b3,#003cb3);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0077b3',endColorstr='#ff003cb3',GradientType=0);zoom:1;border-color:#003cb3 #003cb3 #026;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25)}.mce-primary button{color:#fff}.mce-btn-large button{padding:9px 14px;font-size:16px;line-height:normal;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.mce-btn-large i{margin-top:2px}.mce-btn-small button{padding:3px 5px;font-size:12px;line-height:15px}.mce-btn-small i{margin-top:0}.mce-btn .mce-caret{margin-top:8px;*margin-top:6px;margin-left:0}.mce-btn-small .mce-caret{margin-top:6px;*margin-top:4px;margin-left:0}.mce-caret{display:inline-block;*display:inline;*zoom:1;width:0;height:0;vertical-align:top;border-top:4px solid #444;border-right:4px solid transparent;border-left:4px solid transparent;content:""}.mce-disabled .mce-caret{border-top-color:#999}.mce-caret.mce-up{border-bottom:4px solid #444;border-top:0}.mce-btn-group .mce-btn{border-width:1px 0 1px 0;margin:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.mce-btn-group .mce-btn:hover,.mce-btn-group .mce-btn:focus{color:#333;text-shadow:0 1px 1px rgba(255,255,255,0.75);background-color:#e3e3e3;background-image:-moz-linear-gradient(top,#f2f2f2,#ccc);background-image:-webkit-gradient(linear,0 0,0 100%,from(#f2f2f2),to(#ccc));background-image:-webkit-linear-gradient(top,#f2f2f2,#ccc);background-image:-o-linear-gradient(top,#f2f2f2,#ccc);background-image:linear-gradient(to bottom,#f2f2f2,#ccc);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2f2f2',endColorstr='#ffcccccc',GradientType=0);zoom:1;border-color:#ccc #ccc #a6a6a6;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25)}.mce-btn-group .mce-btn.mce-disabled,.mce-btn-group .mce-btn.mce-disabled:hover{-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);color:#333;text-shadow:0 1px 1px rgba(255,255,255,0.75);background-color:#f0f0f0;background-image:-moz-linear-gradient(top,#fff,#d9d9d9);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#d9d9d9));background-image:-webkit-linear-gradient(top,#fff,#d9d9d9);background-image:-o-linear-gradient(top,#fff,#d9d9d9);background-image:linear-gradient(to bottom,#fff,#d9d9d9);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff',endColorstr='#ffd9d9d9',GradientType=0);zoom:1;border-color:#d9d9d9 #d9d9d9 #b3b3b3;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25)}.mce-btn-group .mce-btn.mce-active,.mce-btn-group .mce-btn.mce-active:hover,.mce-btn-group .mce-btn:active{color:#333;text-shadow:0 1px 1px rgba(255,255,255,0.75);background-color:#d6d6d6;background-image:-moz-linear-gradient(top,#e6e6e6,#bfbfbf);background-image:-webkit-gradient(linear,0 0,0 100%,from(#e6e6e6),to(#bfbfbf));background-image:-webkit-linear-gradient(top,#e6e6e6,#bfbfbf);background-image:-o-linear-gradient(top,#e6e6e6,#bfbfbf);background-image:linear-gradient(to bottom,#e6e6e6,#bfbfbf);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe6e6e6',endColorstr='#ffbfbfbf',GradientType=0);zoom:1;border-color:#bfbfbf #bfbfbf #999;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05)}.mce-btn-group .mce-btn.mce-disabled button{opacity:.65;filter:alpha(opacity=65);zoom:1}.mce-btn-group .mce-first{border-left:1px solid #c5c5c5;-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px}.mce-btn-group .mce-last{border-right:1px solid #c5c5c5;-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0}.mce-btn-group .mce-first.mce-last{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.mce-btn-group .mce-btn.mce-flow-layout-item{margin:0}.mce-checkbox{cursor:pointer}i.mce-i-checkbox{margin:0 3px 0 0;border:1px solid #c5c5c5;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);background-color:#f0f0f0;background-image:-moz-linear-gradient(top,#fdfdfd,#ddd);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fdfdfd),to(#ddd));background-image:-webkit-linear-gradient(top,#fdfdfd,#ddd);background-image:-o-linear-gradient(top,#fdfdfd,#ddd);background-image:linear-gradient(to bottom,#fdfdfd,#ddd);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffdfdfd',endColorstr='#ffdddddd',GradientType=0);zoom:1;text-indent:-10em;*font-size:0;*line-height:0;*text-indent:0}.mce-checked i.mce-i-checkbox{color:#000;font-size:16px;line-height:16px;text-indent:0}.mce-checkbox:focus i.mce-i-checkbox{border:1px solid #59a5e1;border:1px solid rgba(82,168,236,0.8);-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6)}.mce-colorbutton .mce-ico{position:relative}.mce-colorpicker{background:#FFF}.mce-colorbutton-grid{margin:4px}.mce-grid td div{border:1px solid #808080;width:12px;height:12px;margin:2px;cursor:pointer}.mce-grid td div:hover{border-color:black}.mce-grid td div:focus{border-color:#59a5e1;outline:1px solid rgba(82,168,236,0.8);border-color:rgba(82,168,236,0.8)}.mce-colorbutton{position:relative}.mce-colorbutton .mce-preview{display:block;position:absolute;left:50%;top:50%;margin-left:-8px;margin-top:7px;background:gray;width:16px;height:2px;overflow:hidden}.mce-combobox{display:inline-block;*display:inline;*zoom:1;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;width:100px;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05)}.mce-combobox input{border-color:1px solid #c5c5c5;border-right-color:rgba(0,0,0,0.15);height:28px}.mce-combobox.mce-has-open input{-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.mce-combobox .mce-btn{border-left:0;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.mce-combobox button{padding-right:8px;padding-left:8px}.mce-combobox *:focus{border-color:#59a5e1;border-color:rgba(82,168,236,0.8);-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6)}.mce-path{display:inline-block;*display:inline;*zoom:1;padding:8px;white-space:normal}.mce-path .mce-txt{display:inline-block;padding-right:3px}.mce-path .mce-path-body{display:inline-block}.mce-path-item{display:inline-block;*display:inline;*zoom:1;cursor:pointer;color:#000}.mce-path-item:hover{text-decoration:underline}.mce-path-item:focus{background:gray;color:white}.mce-path .mce-divider{display:inline}.mce-fieldset{border:0 solid #9e9e9e;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.mce-fieldset>.mce-container-body{margin-top:-15px}.mce-fieldset-title{margin-left:5px;padding:0 5px 0 5px}.mce-fit-layout{display:inline-block;*display:inline;*zoom:1}.mce-fit-layout-item{position:absolute}.mce-flow-layout-item{display:inline-block;*display:inline;*zoom:1}.mce-flow-layout-item{margin:2px 0 2px 2px}.mce-flow-layout-item.mce-last{margin-right:2px}.mce-flow-layout{white-space:normal}.mce-iframe{border:0 solid #c5c5c5;width:100%;height:100%}.mce-label{display:inline-block;*display:inline;*zoom:1;text-shadow:0 1px 1px rgba(255,255,255,0.75);border:0 solid #c5c5c5;overflow:hidden}.mce-label.mce-autoscroll{overflow:auto}.mce-label-disabled .mce-text{color:#999}.mce-label.mce-multiline{white-space:pre-wrap}.mce-menubar .mce-menubtn{border-color:transparent;background:transparent;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;filter:none}.mce-menubar{border:1px solid #ddd}.mce-menubar .mce-menubtn button{color:#000}.mce-menubar .mce-menubtn:hover,.mce-menubar .mce-menubtn.mce-active,.mce-menubtn:focus{border-color:transparent;background:#ddd;filter:none}.mce-menubtn.mce-disabled span{color:#999}.mce-listbox button{text-align:left;padding-right:20px;position:relative}.mce-listbox .mce-caret{position:absolute;margin-top:-2px;right:8px;top:50%}.mce-listbox span{width:100%;display:block;overflow:hidden}.mce-menu-item{display:block;padding:6px 20px;clear:both;font-weight:normal;line-height:20px;color:#333;white-space:nowrap;cursor:pointer;line-height:normal}.mce-menu-item.mce-disabled .mce-text{color:#999}.mce-menu-item:hover,.mce-menu-item.mce-selected,.mce-menu-item:focus{text-decoration:none;color:#fff;background-color:#0081c2;background-image:-moz-linear-gradient(top,#08c,#0077b3);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#0077b3));background-image:-webkit-linear-gradient(top,#08c,#0077b3);background-image:-o-linear-gradient(top,#08c,#0077b3);background-image:linear-gradient(to bottom,#08c,#0077b3);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc',endColorstr='#ff0077b3',GradientType=0);zoom:1}.mce-menu-item:hover .mce-text,.mce-menu-item.mce-selected .mce-text{color:#fff}.mce-menu-item:hover .mce-ico,.mce-menu-item.mce-selected .mce-ico,.mce-menu-item:focus .mce-ico{color:white}.mce-menu-shortcut{display:inline-block;color:#999}.mce-menu-shortcut{display:inline-block;*display:inline;*zoom:1;padding:0 20px 0 20px}.mce-menu-item .mce-caret{margin-top:6px;*margin-top:3px;margin-right:6px;border-top:4px solid transparent;border-bottom:4px solid transparent;border-left:4px solid #666}.mce-menu-item.mce-selected .mce-caret,.mce-menu-item:focus .mce-caret{border-left-color:#FFF}.mce-menu-align .mce-menu-shortcut{*margin-top:-2px}.mce-menu-align .mce-menu-shortcut,.mce-menu-align .mce-caret{position:absolute;right:0}.mce-menu-item-sep,.mce-menu-item-sep:hover{padding:0;height:1px;margin:9px 1px;overflow:hidden;background:#e5e5e5;border-bottom:1px solid white;cursor:default;filter:none}.mce-menu-item.mce-active i{visibility:visible}.mce-menu-item.mce-active{background-color:#c8def4;outline:1px solid #c5c5c5}.mce-menu-item-checkbox.mce-active{background-color:#FFF;outline:0}.mce-menu{filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);background:transparent;z-index:1000;padding:5px 0 5px 0;margin:2px 0 0;min-width:160px;background:#FFF;border:1px solid #CCC;border:1px solid rgba(0,0,0,0.2);z-index:1002;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,0.2);-moz-box-shadow:0 5px 10px rgba(0,0,0,0.2);box-shadow:0 5px 10px rgba(0,0,0,0.2)}.mce-menu i{display:none}.mce-menu-has-icons i{display:inline-block;*display:inline;*zoom:1}.mce-menu-sub{margin-top:-6px;margin-left:-1px;-webkit-border-radius:0 6px 6px 6px;-moz-border-radius:0 6px 6px 6px;border-radius:0 6px 6px 6px}i.mce-radio{padding:1px;margin:0 3px 0 0;background-color:#fafafa;border:1px solid #cacece;-webkit-border-radius:8px;-moz-border-radius:8px;border-radius:8px;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);background-color:#f0f0f0;background-image:-moz-linear-gradient(top,#fdfdfd,#ddd);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fdfdfd),to(#ddd));background-image:-webkit-linear-gradient(top,#fdfdfd,#ddd);background-image:-o-linear-gradient(top,#fdfdfd,#ddd);background-image:linear-gradient(to bottom,#fdfdfd,#ddd);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffdfdfd',endColorstr='#ffdddddd',GradientType=0);zoom:1}i.mce-radio:after{font-family:Arial;font-size:12px;color:#000;content:'\25cf'}.mce-container-body .mce-resizehandle{position:absolute;right:0;bottom:0;width:16px;height:16px;visibility:visible;cursor:s-resize;margin:0}.mce-resizehandle-both{cursor:se-resize}i.mce-i-resize{color:#000}.mce-spacer{visibility:hidden}.mce-splitbtn .mce-open{border-left:1px solid transparent;border-right:1px solid transparent}.mce-splitbtn:hover .mce-open{border-left-color:#c5c5c5;border-right-color:#c5c5c5}.mce-splitbtn button{padding-right:4px}.mce-splitbtn .mce-open{padding-left:4px}.mce-splitbtn .mce-open.mce-active{-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05)}.mce-stack-layout-item{display:block}.mce-tabs{display:block;border-bottom:1px solid #ccc}.mce-tab{display:inline-block;*display:inline;*zoom:1;border:1px solid #ccc;border-width:1px 1px 0 0;background:#e3e3e3;padding:8px;text-shadow:0 1px 1px rgba(255,255,255,0.75);height:13px;cursor:pointer}.mce-tab:hover{background:#fdfdfd}.mce-tab.mce-active{background:#fdfdfd;border-bottom-color:transparent;margin-bottom:-1px;height:14px}.mce-textbox{background:#FFF;border:1px solid #c5c5c5;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);display:inline-block;-webkit-transition:border linear .2s,box-shadow linear .2s;transition:border linear .2s,box-shadow linear .2s;height:28px;resize:none;padding:0 4px 0 4px;white-space:normal;color:#000}.mce-textbox:focus{border-color:rgba(82,168,236,0.8);-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6)}.mce-placeholder .mce-textbox{color:#aaa}.mce-textbox.mce-multiline{padding:4px}.mce-throbber{position:absolute;top:0;left:0;width:100%;height:100%;opacity:.6;filter:alpha(opacity=60);zoom:1;background:#fff url('img/loader.gif') no-repeat center center}@font-face{font-family:'icomoon';src:url('fonts/icomoon.eot');src:url('fonts/icomoon.eot?#iefix') format('embedded-opentype'),url('fonts/icomoon.svg#icomoon') format('svg'),url('fonts/icomoon.woff') format('woff'),url('fonts/icomoon.ttf') format('truetype');font-weight:normal;font-style:normal}.mce-ico{font-family:'icomoon';font-style:normal;font-weight:normal;font-size:16px;line-height:16px;vertical-align:text-top;-webkit-font-smoothing:antialiased;display:inline-block;background:transparent center center;width:16px;height:16px;color:#333;-ie7-icon:' '}.mce-ico,i.mce-i-checkbox{zoom:expression(this.runtimeStyle['zoom'] = '1',this.innerHTML = this.currentStyle['-ie7-icon'].substr(1,1)+'&nbsp;')}.mce-i-save{-ie7-icon:"\e000"}.mce-i-newdocument{-ie7-icon:"\e001"}.mce-i-fullpage{-ie7-icon:"\e002"}.mce-i-alignleft{-ie7-icon:"\e003"}.mce-i-aligncenter{-ie7-icon:"\e004"}.mce-i-alignright{-ie7-icon:"\e005"}.mce-i-alignjustify{-ie7-icon:"\e006"}.mce-i-cut{-ie7-icon:"\e007"}.mce-i-paste{-ie7-icon:"\e008"}.mce-i-searchreplace{-ie7-icon:"\e009"}.mce-i-bullist{-ie7-icon:"\e00a"}.mce-i-numlist{-ie7-icon:"\e00b"}.mce-i-indent{-ie7-icon:"\e00c"}.mce-i-outdent{-ie7-icon:"\e00d"}.mce-i-blockquote{-ie7-icon:"\e00e"}.mce-i-undo{-ie7-icon:"\e00f"}.mce-i-redo{-ie7-icon:"\e010"}.mce-i-link{-ie7-icon:"\e011"}.mce-i-unlink{-ie7-icon:"\e012"}.mce-i-anchor{-ie7-icon:"\e013"}.mce-i-image{-ie7-icon:"\e014"}.mce-i-media{-ie7-icon:"\e015"}.mce-i-help{-ie7-icon:"\e016"}.mce-i-code{-ie7-icon:"\e017"}.mce-i-inserttime{-ie7-icon:"\e018"}.mce-i-preview{-ie7-icon:"\e019"}.mce-i-forecolor{-ie7-icon:"\e01a"}.mce-i-backcolor{-ie7-icon:"\e01a"}.mce-i-table{-ie7-icon:"\e01b"}.mce-i-hr{-ie7-icon:"\e01c"}.mce-i-removeformat{-ie7-icon:"\e01d"}.mce-i-subscript{-ie7-icon:"\e01e"}.mce-i-superscript{-ie7-icon:"\e01f"}.mce-i-charmap{-ie7-icon:"\e020"}.mce-i-emoticons{-ie7-icon:"\e021"}.mce-i-print{-ie7-icon:"\e022"}.mce-i-fullscreen{-ie7-icon:"\e023"}.mce-i-spellchecker{-ie7-icon:"\e024"}.mce-i-nonbreaking{-ie7-icon:"\e025"}.mce-i-template{-ie7-icon:"\e026"}.mce-i-pagebreak{-ie7-icon:"\e027"}.mce-i-restoredraft{-ie7-icon:"\e028"}.mce-i-untitled{-ie7-icon:"\e029"}.mce-i-bold{-ie7-icon:"\e02a"}.mce-i-italic{-ie7-icon:"\e02b"}.mce-i-underline{-ie7-icon:"\e02c"}.mce-i-strikethrough{-ie7-icon:"\e02d"}.mce-i-visualchars{-ie7-icon:"\e02e"}.mce-i-ltr{-ie7-icon:"\e02f"}.mce-i-rtl{-ie7-icon:"\e030"}.mce-i-copy{-ie7-icon:"\e031"}.mce-i-resize{-ie7-icon:"\e032"}.mce-i-browse{-ie7-icon:"\e034"}.mce-i-checkbox,.mce-i-selected{-ie7-icon:"\e033"}.mce-i-selected{visibility:hidden}.mce-i-backcolor{background:#BBB}

static/js/lib/tinymce/skins/lightgray/skin.min.css

1.mce-container,.mce-container *,.mce-widget,.mce-widget *{margin:0;padding:0;border:0;outline:0;vertical-align:top;background:transparent;text-decoration:none;color:#000;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;text-shadow:none;float:none;position:static;width:auto;height:auto;white-space:nowrap;cursor:inherit;-webkit-tap-highlight-color:transparent;line-height:normal}.mce-container *[unselectable]{-moz-user-select:none;-webkit-user-select:none;-o-user-select:none;user-select:none}.mce-container ::-webkit-scrollbar{width:8px;height:8px;-webkit-border-radius:4px}.mce-container ::-webkit-scrollbar-track,.mce-container ::-webkit-scrollbar-track-piece{background-color:transparent}.mce-container ::-webkit-scrollbar-thumb{background-color:rgba(53,57,71,0.3);width:6px;height:6px;-webkit-border-radius:4px}.mce-fade{opacity:0;-webkit-transition:opacity .15s linear;transition:opacity .15s linear}.mce-fade.mce-in{opacity:1}.mce-tinymce{visibility:visible!important;position:relative}.mce-fullscreen{border:0;padding:0;margin:0;overflow:hidden;background:#FFF;height:100%;z-index:100}div.mce-fullscreen{position:fixed;top:0;left:0;width:100%;height:auto}.mce-tinymce{display:block;border-radius:2px}.mce-wordcount{float:right;padding:8px}.mce-edit-area{background:#FFF;filter:none}.mce-statusbar{position:relative}.mce-statusbar .mce-container-body{position:relative}.mce-fullscreen .mce-resizehandle{display:none}.mce-charmap{border-collapse:collapse}.mce-charmap td{cursor:default;border:1px solid #c5c5c5;width:20px;height:20px;line-height:20px;text-align:center;vertical-align:center;padding:2px}.mce-charmap td:hover{background:#d9d9d9}.mce-grid{border-spacing:2px;border-collapse:separate}.mce-grid a{display:block;border:1px solid transparent}.mce-grid a:hover{border-color:#c5c5c5}.mce-grid-border{margin:0 4px 0 4px}.mce-grid-border a{border-color:#e8e8e8;width:13px;height:13px}.mce-grid-border a:hover,.mce-grid-border a.mce-active{border-color:#c4daff;background:#deeafa}.mce-text-center{text-align:center}div.mce-tinymce-inline{width:100%;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.mce-container,.mce-container-body{display:block}.mce-autoscroll{overflow:hidden}.mce-scrollbar{position:absolute;width:7px;height:100%;top:2px;right:2px;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-scrollbar-h{top:auto;right:auto;left:2px;bottom:2px;width:100%;height:7px}.mce-scrollbar-thumb{position:absolute;background-color:#000;border:1px solid #888;border-color:rgba(85,85,85,0.6);width:5px;height:100%;-webkit-border-radius:7px;-moz-border-radius:7px;border-radius:7px}.mce-scrollbar-h .mce-scrollbar-thumb{width:100%;height:5px}.mce-scrollbar:hover,.mce-scrollbar.mce-active{background-color:#AAA;opacity:.6;filter:alpha(opacity=60);zoom:1;-webkit-border-radius:7px;-moz-border-radius:7px;border-radius:7px}.mce-scroll{position:relative}.mce-panel{border:0 solid #9e9e9e;background-color:#f0f0f0;background-image:-moz-linear-gradient(top,#fdfdfd,#ddd);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fdfdfd),to(#ddd));background-image:-webkit-linear-gradient(top,#fdfdfd,#ddd);background-image:-o-linear-gradient(top,#fdfdfd,#ddd);background-image:linear-gradient(to bottom,#fdfdfd,#ddd);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffdfdfd',endColorstr='#ffdddddd',GradientType=0);zoom:1}.mce-floatpanel{position:absolute;-webkit-box-shadow:#ccc 5px 5px 5px;-moz-box-shadow:#ccc 5px 5px 5px;box-shadow:#ccc 5px 5px 5px}.mce-floatpanel .mce-arrow,.mce-floatpanel .mce-arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.mce-floatpanel .mce-arrow{border-width:11px}.mce-floatpanel .mce-arrow:after{border-width:10px;content:""}.mce-floatpanel.mce-popover{position:absolute;top:0;left:0;background:#fff;-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.2);-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,0.2);-moz-box-shadow:0 5px 10px rgba(0,0,0,0.2);box-shadow:0 5px 10px rgba(0,0,0,0.2)}.mce-floatpanel.mce-popover.mce-bottom{margin-top:10px}.mce-floatpanel.mce-popover.mce-bottom>.mce-arrow{left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,0.25);top:-11px}.mce-floatpanel.mce-popover.mce-bottom>.mce-arrow:after{top:1px;margin-left:-10px;border-top-width:0;border-bottom-color:#fff}.mce-floatpanel.mce-popover.mce-bottom.mce-start{margin-left:-22px}.mce-floatpanel.mce-popover.mce-bottom.mce-start>.mce-arrow{left:20px}.mce-floatpanel.mce-popover.mce-bottom.mce-end{margin-left:22px}.mce-floatpanel.mce-popover.mce-bottom.mce-end>.mce-arrow{right:10px;left:auto}.mce-fullscreen{border:0;padding:0;margin:0;overflow:hidden;background:#FFF;height:100%}div.mce-fullscreen{position:fixed;top:0;left:0}#mce-modal-block{opacity:0;filter:alpha(opacity=0);zoom:1;position:fixed;left:0;top:0;width:100%;height:100%;background:#000}#mce-modal-block.mce-in{opacity:.3;filter:alpha(opacity=30);zoom:1}.mce-window-move{cursor:move}.mce-window{-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 3px 7px rgba(0,0,0,0.3);-moz-box-shadow:0 3px 7px rgba(0,0,0,0.3);box-shadow:0 3px 7px rgba(0,0,0,0.3);filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);background:transparent;background:#FFF;position:fixed;top:0;left:0;opacity:0;-webkit-transition:opacity 150ms ease-in;transition:opacity 150ms ease-in}.mce-window.mce-in{opacity:1}.mce-window-head{padding:9px 15px;border-bottom:1px solid #EEE;position:relative}.mce-window-head .mce-close{position:absolute;right:15px;top:9px;font-size:20px;font-weight:bold;line-height:20px;color:#CCC;text-shadow:0 1px 0 white;cursor:pointer;height:20px;overflow:hidden}.mce-close:hover{color:#AAA}.mce-window-head .mce-title{display:inline-block;*display:inline;*zoom:1;line-height:20px;font-size:20px;font-weight:bold;text-rendering:optimizelegibility;padding-right:10px}.mce-window .mce-container-body{display:block}.mce-foot{display:block;background-color:whiteSmoke;border-top:1px solid #DDD;-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px;-webkit-box-shadow:inset 0 1px 0 #fff;-moz-box-shadow:inset 0 1px 0 #fff;box-shadow:inset 0 1px 0 #fff}.mce-window-head .mce-dragh{position:absolute;top:0;left:0;cursor:move;width:90%;height:100%}.mce-window iframe{width:100%;height:100%}.mce-window.mce-fullscreen,.mce-window.mce-fullscreen .mce-foot{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.mce-abs-layout{position:relative}body .mce-abs-layout-item,.mce-abs-end{position:absolute}.mce-abs-end{width:1px;height:1px}.mce-container-body.mce-abs-layout{overflow:hidden}.mce-tooltip{position:absolute;padding:5px;opacity:.8;filter:alpha(opacity=80);zoom:1}.mce-tooltip-inner{font-size:11px;background-color:#000;color:#fff;max-width:200px;padding:5px 8px 4px 8px;text-align:center;white-space:normal}.mce-tooltip-inner{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.mce-tooltip-inner{-webkit-box-shadow:0 0 5px #000;-moz-box-shadow:0 0 5px #000;box-shadow:0 0 5px #000}.mce-tooltip-arrow{position:absolute;width:0;height:0;line-height:0;border:5px dashed #000}.mce-tooltip-arrow-n{border-bottom-color:#000}.mce-tooltip-arrow-s{border-top-color:#000}.mce-tooltip-arrow-e{border-left-color:#000}.mce-tooltip-arrow-w{border-right-color:#000}.mce-tooltip-n .mce-tooltip-arrow{top:0;left:50%;margin-left:-5px;border-bottom-style:solid;border-top:0;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-nw .mce-tooltip-arrow{top:0;left:10px;border-bottom-style:solid;border-top:0;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-ne .mce-tooltip-arrow{top:0;right:10px;border-bottom-style:solid;border-top:0;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-s .mce-tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-top-style:solid;border-bottom:0;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-sw .mce-tooltip-arrow{bottom:0;left:10px;border-top-style:solid;border-bottom:0;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-se .mce-tooltip-arrow{bottom:0;right:10px;border-top-style:solid;border-bottom:0;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-e .mce-tooltip-arrow{right:0;top:50%;margin-top:-5px;border-left-style:solid;border-right:0;border-top-color:transparent;border-bottom-color:transparent}.mce-tooltip-w .mce-tooltip-arrow{left:0;top:50%;margin-top:-5px;border-right-style:solid;border-left:none;border-top-color:transparent;border-bottom-color:transparent}.mce-btn{border:1px solid #c5c5c5;position:relative;color:#333;text-shadow:0 1px 1px rgba(255,255,255,0.75);background-color:#f0f0f0;background-image:-moz-linear-gradient(top,#fff,#d9d9d9);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#d9d9d9));background-image:-webkit-linear-gradient(top,#fff,#d9d9d9);background-image:-o-linear-gradient(top,#fff,#d9d9d9);background-image:linear-gradient(to bottom,#fff,#d9d9d9);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff',endColorstr='#ffd9d9d9',GradientType=0);zoom:1;border-color:#d9d9d9 #d9d9d9 #b3b3b3;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);display:inline-block;*display:inline;*zoom:1;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05)}.mce-btn:hover,.mce-btn:focus{text-decoration:none;color:#333;text-shadow:0 1px 1px rgba(255,255,255,0.75);background-color:#e3e3e3;background-image:-moz-linear-gradient(top,#f2f2f2,#ccc);background-image:-webkit-gradient(linear,0 0,0 100%,from(#f2f2f2),to(#ccc));background-image:-webkit-linear-gradient(top,#f2f2f2,#ccc);background-image:-o-linear-gradient(top,#f2f2f2,#ccc);background-image:linear-gradient(to bottom,#f2f2f2,#ccc);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2f2f2',endColorstr='#ffcccccc',GradientType=0);zoom:1;border-color:#ccc #ccc #a6a6a6;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25)}.mce-btn.mce-disabled,.mce-btn.mce-disabled:hover{cursor:default;background-image:none;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;opacity:.65;filter:alpha(opacity=65);zoom:1}.mce-btn.mce-active,.mce-btn.mce-active:hover{color:#333;text-shadow:0 1px 1px rgba(255,255,255,0.75);background-color:#d6d6d6;background-image:-moz-linear-gradient(top,#e6e6e6,#bfbfbf);background-image:-webkit-gradient(linear,0 0,0 100%,from(#e6e6e6),to(#bfbfbf));background-image:-webkit-linear-gradient(top,#e6e6e6,#bfbfbf);background-image:-o-linear-gradient(top,#e6e6e6,#bfbfbf);background-image:linear-gradient(to bottom,#e6e6e6,#bfbfbf);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe6e6e6',endColorstr='#ffbfbfbf',GradientType=0);zoom:1;border-color:#bfbfbf #bfbfbf #999;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05)}.mce-btn button{padding:4px 10px;font-size:14px;line-height:20px;*line-height:16px;cursor:pointer;color:#333;overflow:visible;-webkit-appearance:none}.mce-btn button::-moz-focus-inner{border:0;padding:0}.mce-btn i{text-shadow:1px 1px #fff}.mce-primary{color:#fff;text-shadow:0 1px 1px rgba(255,255,255,0.75);background-color:#006dcc;background-image:-moz-linear-gradient(top,#08c,#04c);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#04c));background-image:-webkit-linear-gradient(top,#08c,#04c);background-image:-o-linear-gradient(top,#08c,#04c);background-image:linear-gradient(to bottom,#08c,#04c);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc',endColorstr='#ff0044cc',GradientType=0);zoom:1;border-color:#04c #04c #002b80;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25)}.mce-primary:hover,.mce-primary:focus{color:#fff;text-shadow:0 1px 1px rgba(255,255,255,0.75);background-color:#005fb3;background-image:-moz-linear-gradient(top,#0077b3,#003cb3);background-image:-webkit-gradient(linear,0 0,0 100%,from(#0077b3),to(#003cb3));background-image:-webkit-linear-gradient(top,#0077b3,#003cb3);background-image:-o-linear-gradient(top,#0077b3,#003cb3);background-image:linear-gradient(to bottom,#0077b3,#003cb3);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0077b3',endColorstr='#ff003cb3',GradientType=0);zoom:1;border-color:#003cb3 #003cb3 #026;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25)}.mce-primary button{color:#fff}.mce-btn-large button{padding:9px 14px;font-size:16px;line-height:normal;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.mce-btn-large i{margin-top:2px}.mce-btn-small button{padding:3px 5px;font-size:12px;line-height:15px}.mce-btn-small i{margin-top:0}.mce-btn .mce-caret{margin-top:8px;*margin-top:6px;margin-left:0}.mce-btn-small .mce-caret{margin-top:6px;*margin-top:4px;margin-left:0}.mce-caret{display:inline-block;*display:inline;*zoom:1;width:0;height:0;vertical-align:top;border-top:4px solid #444;border-right:4px solid transparent;border-left:4px solid transparent;content:""}.mce-disabled .mce-caret{border-top-color:#999}.mce-caret.mce-up{border-bottom:4px solid #444;border-top:0}.mce-btn-group .mce-btn{border-width:1px 0 1px 0;margin:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.mce-btn-group .mce-btn:hover,.mce-btn-group .mce-btn:focus{color:#333;text-shadow:0 1px 1px rgba(255,255,255,0.75);background-color:#e3e3e3;background-image:-moz-linear-gradient(top,#f2f2f2,#ccc);background-image:-webkit-gradient(linear,0 0,0 100%,from(#f2f2f2),to(#ccc));background-image:-webkit-linear-gradient(top,#f2f2f2,#ccc);background-image:-o-linear-gradient(top,#f2f2f2,#ccc);background-image:linear-gradient(to bottom,#f2f2f2,#ccc);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2f2f2',endColorstr='#ffcccccc',GradientType=0);zoom:1;border-color:#ccc #ccc #a6a6a6;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25)}.mce-btn-group .mce-btn.mce-disabled,.mce-btn-group .mce-btn.mce-disabled:hover{-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);color:#333;text-shadow:0 1px 1px rgba(255,255,255,0.75);background-color:#f0f0f0;background-image:-moz-linear-gradient(top,#fff,#d9d9d9);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#d9d9d9));background-image:-webkit-linear-gradient(top,#fff,#d9d9d9);background-image:-o-linear-gradient(top,#fff,#d9d9d9);background-image:linear-gradient(to bottom,#fff,#d9d9d9);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff',endColorstr='#ffd9d9d9',GradientType=0);zoom:1;border-color:#d9d9d9 #d9d9d9 #b3b3b3;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25)}.mce-btn-group .mce-btn.mce-active,.mce-btn-group .mce-btn.mce-active:hover,.mce-btn-group .mce-btn:active{color:#333;text-shadow:0 1px 1px rgba(255,255,255,0.75);background-color:#d6d6d6;background-image:-moz-linear-gradient(top,#e6e6e6,#bfbfbf);background-image:-webkit-gradient(linear,0 0,0 100%,from(#e6e6e6),to(#bfbfbf));background-image:-webkit-linear-gradient(top,#e6e6e6,#bfbfbf);background-image:-o-linear-gradient(top,#e6e6e6,#bfbfbf);background-image:linear-gradient(to bottom,#e6e6e6,#bfbfbf);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe6e6e6',endColorstr='#ffbfbfbf',GradientType=0);zoom:1;border-color:#bfbfbf #bfbfbf #999;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05)}.mce-btn-group .mce-btn.mce-disabled button{opacity:.65;filter:alpha(opacity=65);zoom:1}.mce-btn-group .mce-first{border-left:1px solid #c5c5c5;-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px}.mce-btn-group .mce-last{border-right:1px solid #c5c5c5;-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0}.mce-btn-group .mce-first.mce-last{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.mce-btn-group .mce-btn.mce-flow-layout-item{margin:0}.mce-checkbox{cursor:pointer}i.mce-i-checkbox{margin:0 3px 0 0;border:1px solid #c5c5c5;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);background-color:#f0f0f0;background-image:-moz-linear-gradient(top,#fdfdfd,#ddd);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fdfdfd),to(#ddd));background-image:-webkit-linear-gradient(top,#fdfdfd,#ddd);background-image:-o-linear-gradient(top,#fdfdfd,#ddd);background-image:linear-gradient(to bottom,#fdfdfd,#ddd);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffdfdfd',endColorstr='#ffdddddd',GradientType=0);zoom:1;text-indent:-10em;*font-size:0;*line-height:0;*text-indent:0}.mce-checked i.mce-i-checkbox{color:#000;font-size:16px;line-height:16px;text-indent:0}.mce-checkbox:focus i.mce-i-checkbox{border:1px solid #59a5e1;border:1px solid rgba(82,168,236,0.8);-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6)}.mce-colorbutton .mce-ico{position:relative}.mce-colorpicker{background:#FFF}.mce-colorbutton-grid{margin:4px}.mce-grid td div{border:1px solid #808080;width:12px;height:12px;margin:2px;cursor:pointer}.mce-grid td div:hover{border-color:black}.mce-grid td div:focus{border-color:#59a5e1;outline:1px solid rgba(82,168,236,0.8);border-color:rgba(82,168,236,0.8)}.mce-colorbutton{position:relative}.mce-colorbutton .mce-preview{display:block;position:absolute;left:50%;top:50%;margin-left:-8px;margin-top:7px;background:gray;width:16px;height:2px;overflow:hidden}.mce-combobox{display:inline-block;*display:inline;*zoom:1;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;width:100px;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05)}.mce-combobox input{border-color:1px solid #c5c5c5;border-right-color:rgba(0,0,0,0.15);height:28px}.mce-combobox.mce-has-open input{-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.mce-combobox .mce-btn{border-left:0;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.mce-combobox button{padding-right:8px;padding-left:8px}.mce-combobox *:focus{border-color:#59a5e1;border-color:rgba(82,168,236,0.8);-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6)}.mce-path{display:inline-block;*display:inline;*zoom:1;padding:8px;white-space:normal}.mce-path .mce-txt{display:inline-block;padding-right:3px}.mce-path .mce-path-body{display:inline-block}.mce-path-item{display:inline-block;*display:inline;*zoom:1;cursor:pointer;color:#000}.mce-path-item:hover{text-decoration:underline}.mce-path-item:focus{background:gray;color:white}.mce-path .mce-divider{display:inline}.mce-fieldset{border:0 solid #9e9e9e;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.mce-fieldset>.mce-container-body{margin-top:-15px}.mce-fieldset-title{margin-left:5px;padding:0 5px 0 5px}.mce-fit-layout{display:inline-block;*display:inline;*zoom:1}.mce-fit-layout-item{position:absolute}.mce-flow-layout-item{display:inline-block;*display:inline;*zoom:1}.mce-flow-layout-item{margin:2px 0 2px 2px}.mce-flow-layout-item.mce-last{margin-right:2px}.mce-flow-layout{white-space:normal}.mce-iframe{border:0 solid #c5c5c5;width:100%;height:100%}.mce-label{display:inline-block;*display:inline;*zoom:1;text-shadow:0 1px 1px rgba(255,255,255,0.75);border:0 solid #c5c5c5;overflow:hidden}.mce-label.mce-autoscroll{overflow:auto}.mce-label-disabled .mce-text{color:#999}.mce-label.mce-multiline{white-space:pre-wrap}.mce-menubar .mce-menubtn{border-color:transparent;background:transparent;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;filter:none}.mce-menubar{border:1px solid #ddd}.mce-menubar .mce-menubtn button{color:#000}.mce-menubar .mce-menubtn:hover,.mce-menubar .mce-menubtn.mce-active,.mce-menubtn:focus{border-color:transparent;background:#ddd;filter:none}.mce-menubtn.mce-disabled span{color:#999}.mce-listbox button{text-align:left;padding-right:20px;position:relative}.mce-listbox .mce-caret{position:absolute;margin-top:-2px;right:8px;top:50%}.mce-listbox span{width:100%;display:block;overflow:hidden}.mce-menu-item{display:block;padding:6px 20px;clear:both;font-weight:normal;line-height:20px;color:#333;white-space:nowrap;cursor:pointer;line-height:normal}.mce-menu-item.mce-disabled .mce-text{color:#999}.mce-menu-item:hover,.mce-menu-item.mce-selected,.mce-menu-item:focus{text-decoration:none;color:#fff;background-color:#0081c2;background-image:-moz-linear-gradient(top,#08c,#0077b3);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#0077b3));background-image:-webkit-linear-gradient(top,#08c,#0077b3);background-image:-o-linear-gradient(top,#08c,#0077b3);background-image:linear-gradient(to bottom,#08c,#0077b3);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc',endColorstr='#ff0077b3',GradientType=0);zoom:1}.mce-menu-item:hover .mce-text,.mce-menu-item.mce-selected .mce-text{color:#fff}.mce-menu-item:hover .mce-ico,.mce-menu-item.mce-selected .mce-ico,.mce-menu-item:focus .mce-ico{color:white}.mce-menu-shortcut{display:inline-block;color:#999}.mce-menu-shortcut{display:inline-block;*display:inline;*zoom:1;padding:0 20px 0 20px}.mce-menu-item .mce-caret{margin-top:6px;*margin-top:3px;margin-right:6px;border-top:4px solid transparent;border-bottom:4px solid transparent;border-left:4px solid #666}.mce-menu-item.mce-selected .mce-caret,.mce-menu-item:focus .mce-caret{border-left-color:#FFF}.mce-menu-align .mce-menu-shortcut{*margin-top:-2px}.mce-menu-align .mce-menu-shortcut,.mce-menu-align .mce-caret{position:absolute;right:0}.mce-menu-item-sep,.mce-menu-item-sep:hover{padding:0;height:1px;margin:9px 1px;overflow:hidden;background:#e5e5e5;border-bottom:1px solid white;cursor:default;filter:none}.mce-menu-item.mce-active i{visibility:visible}.mce-menu-item.mce-active{background-color:#c8def4;outline:1px solid #c5c5c5}.mce-menu-item-checkbox.mce-active{background-color:#FFF;outline:0}.mce-menu{filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);background:transparent;z-index:1000;padding:5px 0 5px 0;margin:2px 0 0;min-width:160px;background:#FFF;border:1px solid #CCC;border:1px solid rgba(0,0,0,0.2);z-index:1002;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,0.2);-moz-box-shadow:0 5px 10px rgba(0,0,0,0.2);box-shadow:0 5px 10px rgba(0,0,0,0.2)}.mce-menu i{display:none}.mce-menu-has-icons i{display:inline-block;*display:inline;*zoom:1}.mce-menu-sub{margin-top:-6px;margin-left:-1px;-webkit-border-radius:0 6px 6px 6px;-moz-border-radius:0 6px 6px 6px;border-radius:0 6px 6px 6px}i.mce-radio{padding:1px;margin:0 3px 0 0;background-color:#fafafa;border:1px solid #cacece;-webkit-border-radius:8px;-moz-border-radius:8px;border-radius:8px;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);background-color:#f0f0f0;background-image:-moz-linear-gradient(top,#fdfdfd,#ddd);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fdfdfd),to(#ddd));background-image:-webkit-linear-gradient(top,#fdfdfd,#ddd);background-image:-o-linear-gradient(top,#fdfdfd,#ddd);background-image:linear-gradient(to bottom,#fdfdfd,#ddd);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffdfdfd',endColorstr='#ffdddddd',GradientType=0);zoom:1}i.mce-radio:after{font-family:Arial;font-size:12px;color:#000;content:'\25cf'}.mce-container-body .mce-resizehandle{position:absolute;right:0;bottom:0;width:16px;height:16px;visibility:visible;cursor:s-resize;margin:0}.mce-resizehandle-both{cursor:se-resize}i.mce-i-resize{color:#000}.mce-spacer{visibility:hidden}.mce-splitbtn .mce-open{border-left:1px solid transparent;border-right:1px solid transparent}.mce-splitbtn:hover .mce-open{border-left-color:#c5c5c5;border-right-color:#c5c5c5}.mce-splitbtn button{padding-right:4px}.mce-splitbtn .mce-open{padding-left:4px}.mce-splitbtn .mce-open.mce-active{-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05)}.mce-stack-layout-item{display:block}.mce-tabs{display:block;border-bottom:1px solid #ccc}.mce-tab{display:inline-block;*display:inline;*zoom:1;border:1px solid #ccc;border-width:1px 1px 0 0;background:#e3e3e3;padding:8px;text-shadow:0 1px 1px rgba(255,255,255,0.75);height:13px;cursor:pointer}.mce-tab:hover{background:#fdfdfd}.mce-tab.mce-active{background:#fdfdfd;border-bottom-color:transparent;margin-bottom:-1px;height:14px}.mce-textbox{background:#FFF;border:1px solid #c5c5c5;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);display:inline-block;-webkit-transition:border linear .2s,box-shadow linear .2s;transition:border linear .2s,box-shadow linear .2s;height:28px;resize:none;padding:0 4px 0 4px;white-space:normal;color:#000}.mce-textbox:focus{border-color:rgba(82,168,236,0.8);-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6)}.mce-placeholder .mce-textbox{color:#aaa}.mce-textbox.mce-multiline{padding:4px}.mce-throbber{position:absolute;top:0;left:0;width:100%;height:100%;opacity:.6;filter:alpha(opacity=60);zoom:1;background:#fff url('img/loader.gif') no-repeat center center}@font-face{font-family:'tinymce';src:url('fonts/icomoon.eot');src:url('fonts/icomoon.eot?#iefix') format('embedded-opentype'),url('fonts/icomoon.svg#icomoon') format('svg'),url('fonts/icomoon.woff') format('woff'),url('fonts/icomoon.ttf') format('truetype');font-weight:normal;font-style:normal}.mce-ico{font-family:'tinymce',Arial;font-style:normal;font-weight:normal;font-size:16px;line-height:16px;vertical-align:text-top;-webkit-font-smoothing:antialiased;display:inline-block;background:transparent center center;width:16px;height:16px;color:#333}.mce-i-save:before{content:"\e000"}.mce-i-newdocument:before{content:"\e001"}.mce-i-fullpage:before{content:"\e002"}.mce-i-alignleft:before{content:"\e003"}.mce-i-aligncenter:before{content:"\e004"}.mce-i-alignright:before{content:"\e005"}.mce-i-alignjustify:before{content:"\e006"}.mce-i-cut:before{content:"\e007"}.mce-i-paste:before{content:"\e008"}.mce-i-searchreplace:before{content:"\e009"}.mce-i-bullist:before{content:"\e00a"}.mce-i-numlist:before{content:"\e00b"}.mce-i-indent:before{content:"\e00c"}.mce-i-outdent:before{content:"\e00d"}.mce-i-blockquote:before{content:"\e00e"}.mce-i-undo:before{content:"\e00f"}.mce-i-redo:before{content:"\e010"}.mce-i-link:before{content:"\e011"}.mce-i-unlink:before{content:"\e012"}.mce-i-anchor:before{content:"\e013"}.mce-i-image:before{content:"\e014"}.mce-i-media:before{content:"\e015"}.mce-i-help:before{content:"\e016"}.mce-i-code:before{content:"\e017"}.mce-i-inserttime:before{content:"\e018"}.mce-i-preview:before{content:"\e019"}.mce-i-forecolor:before{content:"\e01a"}.mce-i-backcolor:before{content:"\e01a"}.mce-i-table:before{content:"\e01b"}.mce-i-hr:before{content:"\e01c"}.mce-i-removeformat:before{content:"\e01d"}.mce-i-subscript:before{content:"\e01e"}.mce-i-superscript:before{content:"\e01f"}.mce-i-charmap:before{content:"\e020"}.mce-i-emoticons:before{content:"\e021"}.mce-i-print:before{content:"\e022"}.mce-i-fullscreen:before{content:"\e023"}.mce-i-spellchecker:before{content:"\e024"}.mce-i-nonbreaking:before{content:"\e025"}.mce-i-template:before{content:"\e026"}.mce-i-pagebreak:before{content:"\e027"}.mce-i-restoredraft:before{content:"\e028"}.mce-i-untitled:before{content:"\e029"}.mce-i-bold:before{content:"\e02a"}.mce-i-italic:before{content:"\e02b"}.mce-i-underline:before{content:"\e02c"}.mce-i-strikethrough:before{content:"\e02d"}.mce-i-visualchars:before{content:"\e02e"}.mce-i-ltr:before{content:"\e02f"}.mce-i-rtl:before{content:"\e030"}.mce-i-copy:before{content:"\e031"}.mce-i-resize:before{content:"\e032"}.mce-i-browse:before{content:"\e034"}.mce-i-checkbox:before,.mce-i-selected:before{content:"\e033"}.mce-i-selected{visibility:hidden}i.mce-i-backcolor{text-shadow:none;background:#BBB}

static/js/lib/tinymce/themes/modern/theme.min.js

1tinymce.ThemeManager.add("modern",function(e){function t(){function t(t){var r,i=[];if(t)return c(t.split(/[ ,]/),function(t){function n(){var n=e.selection;"bullist"==o&&n.selectorChanged("ul > li",function(e,n){for(var r,i=n.parents.length;i--&&(r=n.parents[i].nodeName,"OL"!=r&&"UL"!=r););t.active("UL"==r)}),"numlist"==o&&n.selectorChanged("ol > li",function(e,n){for(var r,i=n.parents.length;i--&&(r=n.parents[i].nodeName,"OL"!=r&&"UL"!=r););t.active("OL"==r)}),t.settings.stateSelector&&n.selectorChanged(t.settings.stateSelector,function(e){t.active(e)},!0),t.settings.disabledStateSelector&&n.selectorChanged(t.settings.disabledStateSelector,function(e){t.disabled(e)})}var o;"|"==t?r=null:l.has(t)?(t={type:t},s.toolbar_items_size&&(t.size=s.toolbar_items_size),i.push(t),r=null):(r||(r={type:"buttongroup",items:[]},i.push(r)),e.buttons[t]&&(o=t,t=e.buttons[o],t.type=t.type||"button",s.toolbar_items_size&&(t.size=s.toolbar_items_size),t=l.create(t),r.items.push(t),e.initialized?n():e.on("init",n)))}),n.push({type:"toolbar",layout:"flow",items:i}),!0}for(var n=[],r=1;10>r&&t(s["toolbar"+r]);r++);return n.length||t(s.toolbar||f),n}function n(){function t(t){var n;return"|"==t?{text:"|"}:n=e.menuItems[t]}function n(n){var r,i,o,a;if(s.menu?(i=s.menu[n],a=!0):i=d[n],i){r={text:i.title},o=[],c((i.items||"").split(/[ ,]/),function(e){var n=t(e);n&&o.push(t(e))}),a||c(e.menuItems,function(e){e.context==n&&("before"==e.separator&&o.push({text:"|"}),e.prependToContext?o.unshift(e):o.push(e),"after"==e.separator&&o.push({text:"|"}))});for(var l=0;o.length>l;l++)"|"==o[l].text&&(0===l||l==o.length-1)&&o.splice(l,1);if(r.menu=o,!r.menu.length)return null}return r}var r=[],i=s.menubar?tinymce.makeMap(s.menubar,/[ ,]/):!1;for(var o in d)(!i||i[o])&&(o=n(o),o&&r.push(o));return r}function r(t){function n(e){var n=t.find(e)[0];n&&n.focus()}e.shortcuts.add("Alt+F9","",function(){n("menubar")}),e.shortcuts.add("Alt+F10","",function(){n("toolbar")}),e.shortcuts.add("Alt+F11","",function(){n("elementpath")}),t.on("cancel",function(){e.focus()})}function i(){function i(){if(f&&f.visible()){var t=u.getPos(e.getBody());f.moveTo(t.x,t.y-f.layoutRect().h)}}function o(){f&&(f.show(),i(),u.addClass(e.getBody(),"mce-edit-focus"))}function c(){f&&(f.hide(),u.removeClass(e.getBody(),"mce-edit-focus"),document.activeElement&&-1==document.activeElement.className.indexOf("mce-content-body")&&u.setStyle(document.body,"padding-top",0))}function d(){return f?(f.visible()||o(),void 0):(f=a.panel=l.create({type:"floatpanel",classes:"tinymce tinymce-inline",layout:"flex",direction:"column",autohide:!1,autofix:!0,border:1,items:[s.menubar===!1?null:{type:"menubar",border:"0 0 1 0",items:n()},{type:"panel",name:"toolbar",layout:"stack",items:t()}]}),f.renderTo(document.body).reflow(),r(f),o(),e.on("nodeChange",i),e.on("activate",o),e.on("deactivate",c),void 0)}var f;return s.content_editable=!0,e.on("focus",d),e.on("blur",c),e.on("remove",function(){f.remove(),f=null}),{}}function o(i){var o;return o=a.panel=l.create({type:"panel",classes:"tinymce",style:"visibility: hidden",layout:"stack",border:1,items:[s.menubar===!1?null:{type:"menubar",border:"0 0 1 0",items:n()},{type:"panel",layout:"stack",items:t()},{type:"panel",name:"iframe",layout:"stack",classes:"edit-area",html:"",border:"1 0 0 0"}]}),s.statusbar!==!1&&o.add({type:"panel",name:"statusbar",classes:"statusbar",layout:"flow",border:"1 0 0 0",items:[{type:"elementpath"},s.resize!==!1?{type:"resizehandle",editor:e}:null]}),o.renderBefore(i.targetNode).reflow(),s.width&&tinymce.DOM.setStyle(o.getEl(),"width",s.width),e.on("remove",function(){o.remove(),o=null}),r(o),{iframeContainer:o.find("#iframe")[0].getEl(),editorContainer:o.getEl()}}var a=this,s=e.settings,l=tinymce.ui.Factory,c=tinymce.each,u=tinymce.DOM,d={file:{title:"File",items:"newdocument"},edit:{title:"Edit",items:"undo redo | cut copy paste | selectall"},insert:{title:"Insert",items:"|"},view:{title:"View",items:"visualaid |"},format:{title:"Format",items:"bold italic underline strikethrough superscript subscript | formats | removeformat"},table:{title:"Table"},tools:{title:"Tools"}},f="undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image";a.renderUI=function(t){var n=s.skin!==!1?s.skin||"lightgray":!1;return n&&(tinymce.Env.ie&&7>=tinymce.Env.ie?tinymce.DOM.loadCSS(tinymce.baseURL+"/skins/"+n+"/skin.ie7.min.css"):tinymce.DOM.loadCSS(tinymce.baseURL+"/skins/"+n+"/skin.min.css"),e.contentCSS.push(tinymce.baseURL+"/skins/"+n+"/content.min.css")),e.on("ProgressState",function(e){a.throbber=a.throbber||new tinymce.ui.Throbber(a.panel.getEl("body")),e.state?a.throbber.show(e.time):a.throbber.hide()}),s.inline?i(t):o(t)}});

static/js/lib/tinymce/tinymce.min.js

1// 4.0b2 (2013-04-24)
2(function(e,t){"use strict";function n(e,t){for(var n,r=[],i=0;e.length>i;++i){if(n=s[e[i]]||o(e[i]),!n)throw"module definition dependecy not found: "+e[i];r.push(n)}t.apply(null,r)}function r(e,r,i){if("string"!=typeof e)throw"invalid module definition, module id must be defined and be a string";if(r===t)throw"invalid module definition, dependencies must be specified";if(i===t)throw"invalid module definition, definition function must be specified";n(r,function(){s[e]=i.apply(null,arguments)})}function i(e){return!!s[e]}function o(t){for(var n=e,r=t.split(/[.\/]/),i=0;r.length>i;++i){if(!n[r[i]])return;n=n[r[i]]}return n}function a(n){for(var r=0;n.length>r;r++){for(var i=e,o=n[r],a=o.split(/[.\/]/),l=0;a.length-1>l;++l)i[a[l]]===t&&(i[a[l]]={}),i=i[a[l]];i[a[a.length-1]]=s[o]}}var s={},l="tinymce/dom/Sizzle",c="tinymce/html/Styles",u="tinymce/dom/EventUtils",d="tinymce/dom/TreeWalker",f="tinymce/util/Tools",p="tinymce/dom/Range",h="tinymce/html/Entities",m="tinymce/Env",g="tinymce/dom/DOMUtils",v="tinymce/dom/ScriptLoader",y="tinymce/AddOnManager",b="tinymce/html/Node",C="tinymce/html/Schema",x="tinymce/html/SaxParser",w="tinymce/html/DomParser",_="tinymce/html/Writer",N="tinymce/html/Serializer",E="tinymce/dom/Serializer",k="tinymce/dom/TridentSelection",S="tinymce/util/VK",T="tinymce/dom/ControlSelection",R="tinymce/dom/Selection",A="tinymce/dom/RangeUtils",B="tinymce/Formatter",L="tinymce/UndoManager",H="tinymce/EnterKey",M="tinymce/ForceBlocks",D="tinymce/EditorCommands",P="tinymce/util/URI",O="tinymce/util/Class",I="tinymce/ui/Selector",F="tinymce/ui/Collection",W="tinymce/ui/DomUtils",z="tinymce/ui/Control",V="tinymce/ui/Factory",U="tinymce/ui/Container",q="tinymce/ui/DragHelper",$="tinymce/ui/Scrollable",j="tinymce/ui/Panel",K="tinymce/ui/Movable",G="tinymce/ui/Resizable",Y="tinymce/ui/FloatPanel",X="tinymce/ui/KeyboardNavigation",J="tinymce/ui/Window",Q="tinymce/ui/MessageBox",Z="tinymce/WindowManager",et="tinymce/util/Quirks",tt="tinymce/util/Observable",nt="tinymce/Shortcuts",rt="tinymce/Editor",it="tinymce/util/I18n",ot="tinymce/FocusManager",at="tinymce/EditorManager",st="tinymce/LegacyInput",lt="tinymce/util/XHR",ct="tinymce/util/JSON",ut="tinymce/util/JSONRequest",dt="tinymce/util/JSONP",ft="tinymce/util/LocalStorage",pt="tinymce/Compat",ht="tinymce/ui/Layout",mt="tinymce/ui/AbsoluteLayout",gt="tinymce/ui/Tooltip",vt="tinymce/ui/Widget",yt="tinymce/ui/Button",bt="tinymce/ui/ButtonGroup",Ct="tinymce/ui/Checkbox",xt="tinymce/ui/CheckboxGroup",wt="tinymce/ui/PanelButton",_t="tinymce/ui/ColorButton",Nt="tinymce/ui/ComboBox",Et="tinymce/ui/Path",kt="tinymce/ui/ElementPath",St="tinymce/ui/FormItem",Tt="tinymce/ui/Form",Rt="tinymce/ui/FieldSet",At="tinymce/ui/FilePicker",Bt="tinymce/ui/FitLayout",Lt="tinymce/ui/FlexLayout",Ht="tinymce/ui/FlowLayout",Mt="tinymce/ui/FormatControls",Dt="tinymce/ui/GridLayout",Pt="tinymce/ui/Iframe",Ot="tinymce/ui/Label",It="tinymce/ui/Toolbar",Ft="tinymce/ui/MenuBar",Wt="tinymce/ui/MenuButton",zt="tinymce/ui/ListBox",Vt="tinymce/ui/MenuItem",Ut="tinymce/ui/Menu",qt="tinymce/ui/Radio",$t="tinymce/ui/RadioGroup",jt="tinymce/ui/ResizeHandle",Kt="tinymce/ui/Spacer",Gt="tinymce/ui/SplitButton",Yt="tinymce/ui/StackLayout",Xt="tinymce/ui/TabPanel",Jt="tinymce/ui/TextBox",Qt="tinymce/ui/Throbber";r(l,[],function(){function e(e){return gt.test(e+"")}function n(){var e,t=[];return e=function(n,r){return t.push(n+=" ")>N.cacheLength&&delete e[t.shift()],e[n]=r,r}}function i(e){return e[F]=!0,e}function o(e){var t=L.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t=null}}function a(e,t,n,r){var i,o,a,s,l,c,u,p,h,m;if((t?t.ownerDocument||t:W)!==L&&B(t),t=t||L,n=n||[],!e||"string"!=typeof e)return n;if(1!==(s=t.nodeType)&&9!==s)return[];if(M&&!r){if(i=vt.exec(e))if(a=i[1]){if(9===s){if(o=t.getElementById(a),!o||!o.parentNode)return n;if(o.id===a)return n.push(o),n}else if(t.ownerDocument&&(o=t.ownerDocument.getElementById(a))&&I(t,o)&&o.id===a)return n.push(o),n}else{if(i[2])return et.apply(n,t.getElementsByTagName(e)),n;if((a=i[3])&&z.getElementsByClassName&&t.getElementsByClassName)return et.apply(n,t.getElementsByClassName(a)),n}if(z.qsa&&!D.test(e)){if(u=!0,p=F,h=t,m=9===s&&e,1===s&&"object"!==t.nodeName.toLowerCase()){for(c=d(e),(u=t.getAttribute("id"))?p=u.replace(Ct,"\\$&"):t.setAttribute("id",p),p="[id='"+p+"'] ",l=c.length;l--;)c[l]=p+f(c[l]);h=mt.test(e)&&t.parentNode||t,m=c.join(",")}if(m)try{return et.apply(n,h.querySelectorAll(m)),n}catch(g){}finally{u||t.removeAttribute("id")}}}return C(e.replace(ct,"$1"),t,n,r)}function s(e,t){var n=t&&e,r=n&&(~t.sourceIndex||X)-(~e.sourceIndex||X);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function l(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function c(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function u(e){return i(function(t){return t=+t,i(function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function d(e,t){var n,r,i,o,s,l,c,u=$[e+" "];if(u)return t?0:u.slice(0);for(s=e,l=[],c=N.preFilter;s;){(!n||(r=ut.exec(s)))&&(r&&(s=s.slice(r[0].length)||s),l.push(i=[])),n=!1,(r=dt.exec(s))&&(n=r.shift(),i.push({value:n,type:r[0].replace(ct," ")}),s=s.slice(n.length));for(o in N.filter)!(r=ht[o].exec(s))||c[o]&&!(r=c[o](r))||(n=r.shift(),i.push({value:n,type:o,matches:r}),s=s.slice(n.length));if(!n)break}return t?s.length:s?a.error(e):$(e,l).slice(0)}function f(e){for(var t=0,n=e.length,r="";n>t;t++)r+=e[t].value;return r}function p(e,t,n){var r=t.dir,i=n&&"parentNode"===r,o=U++;return t.first?function(t,n,o){for(;t=t[r];)if(1===t.nodeType||i)return e(t,n,o)}:function(t,n,a){var s,l,c,u=V+" "+o;if(a){for(;t=t[r];)if((1===t.nodeType||i)&&e(t,n,a))return!0}else for(;t=t[r];)if(1===t.nodeType||i)if(c=t[F]||(t[F]={}),(l=c[r])&&l[0]===u){if((s=l[1])===!0||s===_)return s===!0}else if(l=c[r]=[u],l[1]=e(t,n,a)||_,l[1]===!0)return!0}}function h(e){return e.length>1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function m(e,t,n,r,i){for(var o,a=[],s=0,l=e.length,c=null!=t;l>s;s++)(o=e[s])&&(!n||n(o,r,i))&&(a.push(o),c&&t.push(s));return a}function g(e,t,n,r,o,a){return r&&!r[F]&&(r=g(r)),o&&!o[F]&&(o=g(o,a)),i(function(i,a,s,l){var c,u,d,f=[],p=[],h=a.length,g=i||b(t||"*",s.nodeType?[s]:s,[]),v=!e||!i&&t?g:m(g,f,e,s,l),y=n?o||(i?e:h||r)?[]:a:v;if(n&&n(v,y,s,l),r)for(c=m(y,p),r(c,[],s,l),u=c.length;u--;)(d=c[u])&&(y[p[u]]=!(v[p[u]]=d));if(i){if(o||e){if(o){for(c=[],u=y.length;u--;)(d=y[u])&&c.push(v[u]=d);o(null,y=[],c,l)}for(u=y.length;u--;)(d=y[u])&&(c=o?nt.call(i,d):f[u])>-1&&(i[c]=!(a[c]=d))}}else y=m(y===a?y.splice(h,y.length):y),o?o(null,a,y,l):et.apply(a,y)})}function v(e){for(var t,n,r,i=e.length,o=N.relative[e[0].type],a=o||N.relative[" "],s=o?1:0,l=p(function(e){return e===t},a,!0),c=p(function(e){return nt.call(t,e)>-1},a,!0),u=[function(e,n,r){return!o&&(r||n!==T)||((t=n).nodeType?l(e,n,r):c(e,n,r))}];i>s;s++)if(n=N.relative[e[s].type])u=[p(h(u),n)];else{if(n=N.filter[e[s].type].apply(null,e[s].matches),n[F]){for(r=++s;i>r&&!N.relative[e[r].type];r++);return g(s>1&&h(u),s>1&&f(e.slice(0,s-1)).replace(ct,"$1"),n,r>s&&v(e.slice(s,r)),i>r&&v(e=e.slice(r)),i>r&&f(e))}u.push(n)}return h(u)}function y(e,t){var n=0,r=t.length>0,o=e.length>0,s=function(i,s,l,c,u){var d,f,p,h=[],g=0,v="0",y=i&&[],b=null!=u,C=T,x=i||o&&N.find.TAG("*",u&&s.parentNode||s),w=V+=null==C?1:Math.random()||.1;for(b&&(T=s!==L&&s,_=n);null!=(d=x[v]);v++){if(o&&d){for(f=0;p=e[f++];)if(p(d,s,l)){c.push(d);break}b&&(V=w,_=++n)}r&&((d=!p&&d)&&g--,i&&y.push(d))}if(g+=v,r&&v!==g){for(f=0;p=t[f++];)p(y,h,s,l);if(i){if(g>0)for(;v--;)y[v]||h[v]||(h[v]=Q.call(c));h=m(h)}et.apply(c,h),b&&!i&&h.length>0&&g+t.length>1&&a.uniqueSort(c)}return b&&(V=w,T=C),y};return r?i(s):s}function b(e,t,n){for(var r=0,i=t.length;i>r;r++)a(e,t[r],n);return n}function C(e,t,n,r){var i,o,a,s,l,c=d(e);if(!r&&1===c.length){if(o=c[0]=c[0].slice(0),o.length>2&&"ID"===(a=o[0]).type&&9===t.nodeType&&M&&N.relative[o[1].type]){if(t=(N.find.ID(a.matches[0].replace(wt,_t),t)||[])[0],!t)return n;e=e.slice(o.shift().value.length)}for(i=ht.needsContext.test(e)?0:o.length;i--&&(a=o[i],!N.relative[s=a.type]);)if((l=N.find[s])&&(r=l(a.matches[0].replace(wt,_t),mt.test(o[0].type)&&t.parentNode||t))){if(o.splice(i,1),e=r.length&&f(o),!e)return et.apply(n,r),n;break}}return S(e,c)(r,t,!M,n,mt.test(e)),n}function x(){}var w,_,N,E,k,S,T,R,A,B,L,H,M,D,P,O,I,F="sizzle"+-new Date,W=window.document,z={},V=0,U=0,q=n(),$=n(),j=n(),K=!1,G=function(){return 0},Y=typeof t,X=1<<31,J=[],Q=J.pop,Z=J.push,et=J.push,tt=J.slice,nt=J.indexOf||function(e){for(var t=0,n=this.length;n>t;t++)if(this[t]===e)return t;return-1},rt="[\\x20\\t\\r\\n\\f]",it="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",ot=it.replace("w","w#"),at="([*^$|!~]?=)",st="\\["+rt+"*("+it+")"+rt+"*(?:"+at+rt+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+ot+")|)|)"+rt+"*\\]",lt=":("+it+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+st.replace(3,8)+")*)|.*)\\)|)",ct=RegExp("^"+rt+"+|((?:^|[^\\\\])(?:\\\\.)*)"+rt+"+$","g"),ut=RegExp("^"+rt+"*,"+rt+"*"),dt=RegExp("^"+rt+"*([\\x20\\t\\r\\n\\f>+~])"+rt+"*"),ft=RegExp(lt),pt=RegExp("^"+ot+"$"),ht={ID:RegExp("^#("+it+")"),CLASS:RegExp("^\\.("+it+")"),NAME:RegExp("^\\[name=['\"]?("+it+")['\"]?\\]"),TAG:RegExp("^("+it.replace("w","w*")+")"),ATTR:RegExp("^"+st),PSEUDO:RegExp("^"+lt),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+rt+"*(even|odd|(([+-]|)(\\d*)n|)"+rt+"*(?:([+-]|)"+rt+"*(\\d+)|))"+rt+"*\\)|)","i"),needsContext:RegExp("^"+rt+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+rt+"*((?:-\\d)?\\d*)"+rt+"*\\)|)(?=[^-]|$)","i")},mt=/[\x20\t\r\n\f]*[+~]/,gt=/^[^{]+\{\s*\[native code/,vt=/^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,yt=/^(?:input|select|textarea|button)$/i,bt=/^h\d$/i,Ct=/'|\\/g,xt=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,wt=/\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g,_t=function(e,t){var n="0x"+t-65536;return n!==n?t:0>n?String.fromCharCode(n+65536):String.fromCharCode(55296|n>>10,56320|1023&n)};try{et.apply(J=tt.call(W.childNodes),W.childNodes),J[W.childNodes.length].nodeType}catch(Nt){et={apply:J.length?function(e,t){Z.apply(e,tt.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}k=a.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},B=a.setDocument=function(n){var r=n?n.ownerDocument||n:W;return r!==L&&9===r.nodeType&&r.documentElement?(L=r,H=r.documentElement,M=!k(r),z.getElementsByTagName=o(function(e){return e.appendChild(r.createComment("")),!e.getElementsByTagName("*").length}),z.attributes=o(function(e){e.innerHTML="<select></select>";var t=typeof e.lastChild.getAttribute("multiple");return"boolean"!==t&&"string"!==t}),z.getElementsByClassName=o(function(e){return e.innerHTML="<div class='hidden e'></div><div class='hidden'></div>",e.getElementsByClassName&&e.getElementsByClassName("e").length?(e.lastChild.className="e",2===e.getElementsByClassName("e").length):!1}),z.getByName=o(function(e){e.id=F+0,e.appendChild(L.createElement("a")).setAttribute("name",F),e.appendChild(L.createElement("i")).setAttribute("name",F),H.appendChild(e);var t=r.getElementsByName&&r.getElementsByName(F).length===2+r.getElementsByName(F+0).length;return H.removeChild(e),t}),z.sortDetached=o(function(e){return e.compareDocumentPosition&&1&e.compareDocumentPosition(L.createElement("div"))}),N.attrHandle=o(function(e){return e.innerHTML="<a href='#'></a>",e.firstChild&&typeof e.firstChild.getAttribute!==Y&&"#"===e.firstChild.getAttribute("href")})?{}:{href:function(e){return e.getAttribute("href",2)},type:function(e){return e.getAttribute("type")}},z.getByName?(N.find.ID=function(e,t){if(typeof t.getElementById!==Y&&M){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},N.filter.ID=function(e){var t=e.replace(wt,_t);return function(e){return e.getAttribute("id")===t}}):(N.find.ID=function(e,n){if(typeof n.getElementById!==Y&&M){var r=n.getElementById(e);return r?r.id===e||typeof r.getAttributeNode!==Y&&r.getAttributeNode("id").value===e?[r]:t:[]}},N.filter.ID=function(e){var t=e.replace(wt,_t);return function(e){var n=typeof e.getAttributeNode!==Y&&e.getAttributeNode("id");return n&&n.value===t}}),N.find.TAG=z.getElementsByTagName?function(e,n){return typeof n.getElementsByTagName!==Y?n.getElementsByTagName(e):t}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},N.find.NAME=z.getByName&&function(e,n){return typeof n.getElementsByName!==Y?n.getElementsByName(name):t},N.find.CLASS=z.getElementsByClassName&&function(e,n){return typeof n.getElementsByClassName!==Y&&M?n.getElementsByClassName(e):t},P=[],D=[":focus"],(z.qsa=e(r.querySelectorAll))&&(o(function(e){e.innerHTML="<select><option selected=''></option></select>",e.querySelectorAll("[selected]").length||D.push("\\["+rt+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),e.querySelectorAll(":checked").length||D.push(":checked")}),o(function(e){e.innerHTML="<input type='hidden' i=''/>",e.querySelectorAll("[i^='']").length&&D.push("[*^$]="+rt+"*(?:\"\"|'')"),e.querySelectorAll(":enabled").length||D.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),D.push(",.*:")})),(z.matchesSelector=e(O=H.matchesSelector||H.mozMatchesSelector||H.webkitMatchesSelector||H.oMatchesSelector||H.msMatchesSelector))&&o(function(e){z.disconnectedMatch=O.call(e,"div"),O.call(e,"[s!='']:x"),P.push("!=",lt)}),D=RegExp(D.join("|")),P=P.length&&RegExp(P.join("|")),I=e(H.contains)||H.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},G=H.compareDocumentPosition?function(e,t){if(e===t)return K=!0,0;var n=t.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(t);return n?1&n||R&&t.compareDocumentPosition(e)===n?e===r||I(W,e)?-1:t===r||I(W,t)?1:A?nt.call(A,e)-nt.call(A,t):0:4&n?-1:1:e.compareDocumentPosition?-1:1}:function(e,t){var n,i=0,o=e.parentNode,a=t.parentNode,l=[e],c=[t];if(e===t)return K=!0,0;if(!o||!a)return e===r?-1:t===r?1:o?-1:a?1:0;if(o===a)return s(e,t);for(n=e;n=n.parentNode;)l.unshift(n);for(n=t;n=n.parentNode;)c.unshift(n);for(;l[i]===c[i];)i++;return i?s(l[i],c[i]):l[i]===W?-1:c[i]===W?1:0},L):L},a.matches=function(e,t){return a(e,null,null,t)},a.matchesSelector=function(e,t){if((e.ownerDocument||e)!==L&&B(e),t=t.replace(xt,"='$1']"),z.matchesSelector&&M&&(!P||!P.test(t))&&!D.test(t))try{var n=O.call(e,t);if(n||z.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(r){}return a(t,L,null,[e]).length>0},a.contains=function(e,t){return(e.ownerDocument||e)!==L&&B(e),I(e,t)},a.attr=function(e,t){var n;return(e.ownerDocument||e)!==L&&B(e),M&&(t=t.toLowerCase()),(n=N.attrHandle[t])?n(e):!M||z.attributes?e.getAttribute(t):((n=e.getAttributeNode(t))||e.getAttribute(t))&&e[t]===!0?t:n&&n.specified?n.value:null},a.error=function(e){throw Error("Syntax error, unrecognized expression: "+e)},a.uniqueSort=function(e){var t,n=[],r=0,i=0;if(K=!z.detectDuplicates,R=!z.sortDetached,A=!z.sortStable&&e.slice(0),e.sort(G),K){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)e.splice(n[r],1)}return e},E=a.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=E(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r];r++)n+=E(t);return n},N=a.selectors={cacheLength:50,createPseudo:i,match:ht,find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(wt,_t),e[3]=(e[4]||e[5]||"").replace(wt,_t),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||a.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&a.error(e[0]),e},PSEUDO:function(e){var t,n=!e[5]&&e[2];return ht.CHILD.test(e[0])?null:(e[4]?e[2]=e[4]:n&&ft.test(n)&&(t=d(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){return"*"===e?function(){return!0}:(e=e.replace(wt,_t).toLowerCase(),function(t){return t.nodeName&&t.nodeName.toLowerCase()===e})},CLASS:function(e){var t=q[e+" "];return t||(t=RegExp("(^|"+rt+")"+e+"("+rt+"|$)"))&&q(e,function(e){return t.test(e.className||typeof e.getAttribute!==Y&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=a.attr(r,e);return null==i?"!="===t:t?(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i+" ").indexOf(n)>-1:"|="===t?i===n||i.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,l){var c,u,d,f,p,h,m=o!==a?"nextSibling":"previousSibling",g=t.parentNode,v=s&&t.nodeName.toLowerCase(),y=!l&&!s;if(g){if(o){for(;m;){for(d=t;d=d[m];)if(s?d.nodeName.toLowerCase()===v:1===d.nodeType)return!1;h=m="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?g.firstChild:g.lastChild],a&&y){for(u=g[F]||(g[F]={}),c=u[e]||[],p=c[0]===V&&c[1],f=c[0]===V&&c[2],d=p&&g.childNodes[p];d=++p&&d&&d[m]||(f=p=0)||h.pop();)if(1===d.nodeType&&++f&&d===t){u[e]=[V,p,f];break}}else if(y&&(c=(t[F]||(t[F]={}))[e])&&c[0]===V)f=c[1];else for(;(d=++p&&d&&d[m]||(f=p=0)||h.pop())&&((s?d.nodeName.toLowerCase()!==v:1!==d.nodeType)||!++f||(y&&((d[F]||(d[F]={}))[e]=[V,f]),d!==t)););return f-=i,f===r||0===f%r&&f/r>=0}}},PSEUDO:function(e,t){var n,r=N.pseudos[e]||N.setFilters[e.toLowerCase()]||a.error("unsupported pseudo: "+e);return r[F]?r(t):r.length>1?(n=[e,e,"",t],N.setFilters.hasOwnProperty(e.toLowerCase())?i(function(e,n){for(var i,o=r(e,t),a=o.length;a--;)i=nt.call(e,o[a]),e[i]=!(n[i]=o[a])}):function(e){return r(e,0,n)}):r}},pseudos:{not:i(function(e){var t=[],n=[],r=S(e.replace(ct,"$1"));return r[F]?i(function(e,t,n,i){for(var o,a=r(e,null,i,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:i(function(e){return function(t){return a(e,t).length>0}}),contains:i(function(e){return function(t){return(t.textContent||t.innerText||E(t)).indexOf(e)>-1}}),lang:i(function(e){return pt.test(e||"")||a.error("unsupported lang: "+e),e=e.replace(wt,_t).toLowerCase(),function(t){var n;do if(n=M?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(e){var t=window.location&&window.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===H},focus:function(e){return e===L.activeElement&&(!L.hasFocus||L.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!N.pseudos.empty(e)},header:function(e){return bt.test(e.nodeName)},input:function(e){return yt.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:u(function(){return[0]}),last:u(function(e,t){return[t-1]}),eq:u(function(e,t,n){return[0>n?n+t:n]}),even:u(function(e,t){for(var n=0;t>n;n+=2)e.push(n);return e}),odd:u(function(e,t){for(var n=1;t>n;n+=2)e.push(n);return e}),lt:u(function(e,t,n){for(var r=0>n?n+t:n;--r>=0;)e.push(r);return e}),gt:u(function(e,t,n){for(var r=0>n?n+t:n;t>++r;)e.push(r);return e})}};for(w in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})N.pseudos[w]=l(w);for(w in{submit:!0,reset:!0})N.pseudos[w]=c(w);return S=a.compile=function(e,t){var n,r=[],i=[],o=j[e+" "];if(!o){for(t||(t=d(e)),n=t.length;n--;)o=v(t[n]),o[F]?r.push(o):i.push(o);o=j(e,y(i,r))}return o},N.pseudos.nth=N.pseudos.eq,x.prototype=N.filters=N.pseudos,N.setFilters=new x,z.sortStable=F.split("").sort(G).join("")===F,B(),[0,0].sort(G),z.detectDuplicates=K,"function"==typeof r&&r.amd?r(function(){return a}):window.Sizzle=a,a}),r(c,[],function(){return function(e,t){function n(e,t,n,r){function i(e){return e=parseInt(e,10).toString(16),e.length>1?e:"0"+e}return"#"+i(t)+i(n)+i(r)}var r=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/gi,i=/(?:url(?:(?:\(\s*\"([^\"]+)\"\s*\))|(?:\(\s*\'([^\']+)\'\s*\))|(?:\(\s*([^)\s]+)\s*\))))|(?:\'([^\']+)\')|(?:\"([^\"]+)\")/gi,o=/\s*([^:]+):\s*([^;]+);?/g,a=/\s+$/,s,l,c={},u,d="\ufeff";for(e=e||{},u=("\\\" \\' \\; \\: ; : "+d).split(" "),l=0;u.length>l;l++)c[u[l]]=d+l,c[d+l]=u[l];return{toHex:function(e){return e.replace(r,n)},parse:function(t){function s(e,t){var n,r,i,o;n=h[e+"-top"+t],n&&(r=h[e+"-right"+t],n==r&&(i=h[e+"-bottom"+t],r==i&&(o=h[e+"-left"+t],i==o&&(h[e+t]=o,delete h[e+"-top"+t],delete h[e+"-right"+t],delete h[e+"-bottom"+t],delete h[e+"-left"+t]))))}function l(e){var t=h[e],n;if(t&&!(0>t.indexOf(" "))){for(t=t.split(" "),n=t.length;n--;)if(t[n]!==t[0])return!1;return h[e]=t[0],!0}}function u(e,t,n,r){l(t)&&l(n)&&l(r)&&(h[e]=h[t]+" "+h[n]+" "+h[r],delete h[t],delete h[n],delete h[r])}function d(e){return y=!0,c[e]}function f(e,t){return y&&(e=e.replace(/\uFEFF[0-9]/g,function(e){return c[e]})),t||(e=e.replace(/\\([\'\";:])/g,"$1")),e}function p(e,t,n,r,i,o){return(i=i||o)?(i=f(i),"'"+i.replace(/\'/g,"\\'")+"'"):(t=f(t||n||r),b&&(t=b.call(C,t,"style")),"url('"+t.replace(/\'/g,"\\'")+"')")}var h={},m,g,v,y,b=e.url_converter,C=e.url_converter_scope||this;if(t){for(t=t.replace(/\\[\"\';:\uFEFF]/g,d).replace(/\"[^\"]+\"|\'[^\']+\'/g,function(e){return e.replace(/[;:]/g,d)});m=o.exec(t);)g=m[1].replace(a,"").toLowerCase(),v=m[2].replace(a,""),g&&v.length>0&&("font-weight"===g&&"700"===v?v="bold":("color"===g||"background-color"===g)&&(v=v.toLowerCase()),v=v.replace(r,n),v=v.replace(i,p),h[g]=y?f(v,!0):v),o.lastIndex=m.index+m[0].length;s("border",""),s("border","-width"),s("border","-color"),s("border","-style"),s("padding",""),s("margin",""),u("border","border-width","border-style","border-color"),"medium none"===h.border&&delete h.border}return h},serialize:function(e,n){function r(n){var r,o,a,l;if(r=t.styles[n])for(o=0,a=r.length;a>o;o++)n=r[o],l=e[n],l!==s&&l.length>0&&(i+=(i.length>0?" ":"")+n+": "+l+";")}var i="",o,a;if(n&&t&&t.styles)r("*"),r(n);else for(o in e)a=e[o],a!==s&&a.length>0&&(i+=(i.length>0?" ":"")+o+": "+a+";");return i}}}}),r(u,[],function(){function e(e,t,n,r){e.addEventListener?e.addEventListener(t,n,r||!1):e.attachEvent&&e.attachEvent("on"+t,n)}function n(e,t,n,r){e.removeEventListener?e.removeEventListener(t,n,r||!1):e.detachEvent&&e.detachEvent("on"+t,n)}function r(e,t){function n(){return!1}function r(){return!0}var i,o=t||{};for(i in e)"layerX"!==i&&"layerY"!==i&&(o[i]=e[i]);return o.target||(o.target=o.srcElement||document),o.preventDefault=function(){o.isDefaultPrevented=r,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},o.stopPropagation=function(){o.isPropagationStopped=r,e&&(e.stopPropagation?e.stopPropagation():e.cancelBubble=!0)},o.stopImmediatePropagation=function(){o.isImmediatePropagationStopped=r,o.stopPropagation()},o.isDefaultPrevented||(o.isDefaultPrevented=n,o.isPropagationStopped=n,o.isImmediatePropagationStopped=n),o}function i(r,i,o){function a(){o.domLoaded||(o.domLoaded=!0,i(u))}function s(){"complete"===c.readyState&&(n(c,"readystatechange",s),a())}function l(){try{c.documentElement.doScroll("left")}catch(e){return setTimeout(l,0),t}a()}var c=r.document,u={type:"ready"};return o.domLoaded?(i(u),t):(c.addEventListener?e(r,"DOMContentLoaded",a):(e(c,"readystatechange",s),c.documentElement.doScroll&&r===r.top&&l()),e(r,"load",a),t)}function o(){function t(e,t){var n,r,i,o;if(n=s[t][e.type])for(r=0,i=n.length;i>r;r++)if(o=n[r],o&&o.func.call(o.scope,e)===!1&&e.preventDefault(),e.isImmediatePropagationStopped())return}var o=this,s={},l,c,u,d,f;c=a+(+new Date).toString(32),d="onmouseenter"in document.documentElement,u="onfocusin"in document.documentElement,f={mouseenter:"mouseover",mouseleave:"mouseout"},l=1,o.domLoaded=!1,o.events=s,o.bind=function(n,a,p,h){function m(e){t(r(e||_.event),g)}var g,v,y,b,C,x,w,_=window;if(n&&3!==n.nodeType&&8!==n.nodeType){for(n[c]?g=n[c]:(g=l++,n[c]=g,s[g]={}),h=h||n,a=a.split(" "),y=a.length;y--;)b=a[y],x=m,C=w=!1,"DOMContentLoaded"===b&&(b="ready"),o.domLoaded&&"ready"===b&&"complete"==n.readyState?p.call(h,r({type:b})):(d||(C=f[b],C&&(x=function(e){var n,i;if(n=e.currentTarget,i=e.relatedTarget,i&&n.contains)i=n.contains(i);else for(;i&&i!==n;)i=i.parentNode;i||(e=r(e||_.event),e.type="mouseout"===e.type?"mouseleave":"mouseenter",e.target=n,t(e,g))})),u||"focusin"!==b&&"focusout"!==b||(w=!0,C="focusin"===b?"focus":"blur",x=function(e){e=r(e||_.event),e.type="focus"===e.type?"focusin":"focusout",t(e,g)}),v=s[g][b],v?"ready"===b&&o.domLoaded?p({type:b}):v.push({func:p,scope:h}):(s[g][b]=v=[{func:p,scope:h}],v.fakeName=C,v.capture=w,v.nativeHandler=x,"ready"===b?i(n,x,o):e(n,C||b,x,w)));return n=v=0,p}},o.unbind=function(e,t,r){var i,a,l,u,d,f;if(!e||3===e.nodeType||8===e.nodeType)return o;if(i=e[c]){if(f=s[i],t){for(t=t.split(" "),l=t.length;l--;)if(d=t[l],a=f[d]){if(r)for(u=a.length;u--;)a[u].func===r&&a.splice(u,1);r&&0!==a.length||(delete f[d],n(e,a.fakeName||d,a.nativeHandler,a.capture))}}else{for(d in f)a=f[d],n(e,a.fakeName||d,a.nativeHandler,a.capture);f={}}for(d in f)return o;delete s[i];try{delete e[c]}catch(p){e[c]=null}}return o},o.fire=function(e,n,i){var a;if(!e||3===e.nodeType||8===e.nodeType)return o;i=r(null,i),i.type=n,i.target=e;do a=e[c],a&&t(i,a),e=e.parentNode||e.ownerDocument||e.defaultView||e.parentWindow;while(e&&!i.isPropagationStopped());return o},o.clean=function(e){var t,n,r=o.unbind;if(!e||3===e.nodeType||8===e.nodeType)return o;if(e[c]&&r(e),e.getElementsByTagName||(e=e.document),e&&e.getElementsByTagName)for(r(e),n=e.getElementsByTagName("*"),t=n.length;t--;)e=n[t],e[c]&&r(e);return o},o.destory=function(){s={}},o.cancel=function(e){return e&&(e.preventDefault(),e.stopImmediatePropagation()),!1}}var a="mce-data-";return o.Event=new o,o.Event.bind(window,"ready",function(){}),o}),r(d,[],function(){return function(e,t){function n(e,n,r,i){var o,a;if(e){if(!i&&e[n])return e[n];if(e!=t){if(o=e[r])return o;for(a=e.parentNode;a&&a!=t;a=a.parentNode)if(o=a[r])return o}}}var r=e;this.current=function(){return r},this.next=function(e){return r=n(r,"firstChild","nextSibling",e)},this.prev=function(e){return r=n(r,"lastChild","previousSibling",e)}}}),r(f,[],function(){function e(e,n){return n?"array"==n&&g(e)?!0:typeof e==n:e!==t}function n(e){var t=[],n,r;for(n=0,r=e.length;r>n;n++)t[n]=e[n];return t}function r(e,t,n){var r;for(e=e||[],t=t||",","string"==typeof e&&(e=e.split(t)),n=n||{},r=e.length;r--;)n[e[r]]={};return n}function i(e,n,r){var i,o;if(!e)return 0;if(r=r||e,e.length!==t){for(i=0,o=e.length;o>i;i++)if(n.call(r,e[i],i,e)===!1)return 0}else for(i in e)if(e.hasOwnProperty(i)&&n.call(r,e[i],i,e)===!1)return 0;return 1}function o(e,t){var n=[];return i(e,function(e){n.push(t(e))}),n}function a(e,t){var n=[];return i(e,function(e){(!t||t(e))&&n.push(e)}),n}function s(e,n,r){var i=this,o,a,s,l,c,u=0;if(e=/^((static) )?([\w.]+)(:([\w.]+))?/.exec(e),s=e[3].match(/(^|\.)(\w+)$/i)[2],a=i.createNS(e[3].replace(/\.\w+$/,""),r),!a[s]){if("static"==e[2])return a[s]=n,this.onCreate&&this.onCreate(e[2],e[3],a[s]),t;n[s]||(n[s]=function(){},u=1),a[s]=n[s],i.extend(a[s].prototype,n),e[5]&&(o=i.resolve(e[5]).prototype,l=e[5].match(/\.(\w+)$/i)[1],c=a[s],a[s]=u?function(){return o[l].apply(this,arguments)}:function(){return this.parent=o[l],c.apply(this,arguments)},a[s].prototype[s]=a[s],i.each(o,function(e,t){a[s].prototype[t]=o[t]}),i.each(n,function(e,t){o[t]?a[s].prototype[t]=function(){return this.parent=o[t],e.apply(this,arguments)}:t!=s&&(a[s].prototype[t]=e)})),i.each(n["static"],function(e,t){a[s][t]=e})}}function l(e,t){var n,r;if(e)for(n=0,r=e.length;r>n;n++)if(e[n]===t)return n;return-1}function c(e,n){var r,i,o,a=arguments,s;for(r=1,i=a.length;i>r;r++){n=a[r];for(o in n)n.hasOwnProperty(o)&&(s=n[o],s!==t&&(e[o]=s))}return e}function u(e,n,r,o){o=o||this,e&&(r&&(e=e[r]),i(e,function(e,i){return n.call(o,e,i,r)===!1?!1:(u(e,n,r,o),t)}))}function d(e,t){var n,r;for(t=t||window,e=e.split("."),n=0;e.length>n;n++)r=e[n],t[r]||(t[r]={}),t=t[r];return t}function f(e,t){var n,r;for(t=t||window,e=e.split("."),n=0,r=e.length;r>n&&(t=t[e[n]],t);n++);return t}function p(t,n){return!t||e(t,"array")?t:o(t.split(n||","),m)}var h=/^\s*|\s*$/g,m=function(e){return null===e||e===t?"":(""+e).replace(h,"")},g=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};return{trim:m,isArray:g,is:e,toArray:n,makeMap:r,each:i,map:o,grep:a,inArray:l,extend:c,create:s,walk:u,createNS:d,resolve:f,explode:p}}),r(p,[f],function(e){function n(r){function i(){return P.createDocumentFragment()}function o(e,t){N(W,e,t)}function a(e,t){N(z,e,t)}function s(e){o(e.parentNode,K(e))}function l(e){o(e.parentNode,K(e)+1)}function c(e){a(e.parentNode,K(e))}function u(e){a(e.parentNode,K(e)+1)}function d(e){e?(D[q]=D[U],D[$]=D[V]):(D[U]=D[q],D[V]=D[$]),D.collapsed=W}function f(e){s(e),u(e)}function p(e){o(e,0),a(e,1===e.nodeType?e.childNodes.length:e.nodeValue.length)}function h(e,n){var r=D[U],i=D[V],o=D[q],a=D[$],s=n.startContainer,l=n.startOffset,c=n.endContainer,u=n.endOffset;return 0===e?_(r,i,s,l):1===e?_(o,a,s,l):2===e?_(o,a,c,u):3===e?_(r,i,c,u):t}function m(){E(F)}function g(){return E(O)}function v(){return E(I)}function y(e){var t=this[U],n=this[V],i,o;3!==t.nodeType&&4!==t.nodeType||!t.nodeValue?(t.childNodes.length>0&&(o=t.childNodes[n]),o?t.insertBefore(e,o):t.appendChild(e)):n?n>=t.nodeValue.length?r.insertAfter(e,t):(i=t.splitText(n),t.parentNode.insertBefore(e,i)):t.parentNode.insertBefore(e,t)}function b(e){var t=D.extractContents();D.insertNode(e),e.appendChild(t),D.selectNode(e)}function C(){return j(new n(r),{startContainer:D[U],startOffset:D[V],endContainer:D[q],endOffset:D[$],collapsed:D.collapsed,commonAncestorContainer:D.commonAncestorContainer})}function x(e,t){var n;if(3==e.nodeType)return e;if(0>t)return e;for(n=e.firstChild;n&&t>0;)--t,n=n.nextSibling;return n?n:e}function w(){return D[U]==D[q]&&D[V]==D[$]}function _(e,t,n,i){var o,a,s,l,c,u;if(e==n)return t==i?0:i>t?-1:1;for(o=n;o&&o.parentNode!=e;)o=o.parentNode;if(o){for(a=0,s=e.firstChild;s!=o&&t>a;)a++,s=s.nextSibling;return a>=t?-1:1}for(o=e;o&&o.parentNode!=n;)o=o.parentNode;if(o){for(a=0,s=n.firstChild;s!=o&&i>a;)a++,s=s.nextSibling;return i>a?-1:1}for(l=r.findCommonAncestor(e,n),c=e;c&&c.parentNode!=l;)c=c.parentNode;for(c||(c=l),u=n;u&&u.parentNode!=l;)u=u.parentNode;if(u||(u=l),c==u)return 0;for(s=l.firstChild;s;){if(s==c)return-1;if(s==u)return 1;s=s.nextSibling}}function N(e,t,n){var i,o;for(e?(D[U]=t,D[V]=n):(D[q]=t,D[$]=n),i=D[q];i.parentNode;)i=i.parentNode;for(o=D[U];o.parentNode;)o=o.parentNode;o==i?_(D[U],D[V],D[q],D[$])>0&&D.collapse(e):D.collapse(e),D.collapsed=w(),D.commonAncestorContainer=r.findCommonAncestor(D[U],D[q])}function E(e){var t,n=0,r=0,i,o,a,s,l,c;if(D[U]==D[q])return k(e);for(t=D[q],i=t.parentNode;i;t=i,i=i.parentNode){if(i==D[U])return S(t,e);
3++n}for(t=D[U],i=t.parentNode;i;t=i,i=i.parentNode){if(i==D[q])return T(t,e);++r}for(o=r-n,a=D[U];o>0;)a=a.parentNode,o--;for(s=D[q];0>o;)s=s.parentNode,o++;for(l=a.parentNode,c=s.parentNode;l!=c;l=l.parentNode,c=c.parentNode)a=l,s=c;return R(a,s,e)}function k(e){var t,n,r,o,a,s,l,c,u;if(e!=F&&(t=i()),D[V]==D[$])return t;if(3==D[U].nodeType){if(n=D[U].nodeValue,r=n.substring(D[V],D[$]),e!=I&&(o=D[U],c=D[V],u=D[$]-D[V],0===c&&u>=o.nodeValue.length-1?o.parentNode.removeChild(o):o.deleteData(c,u),D.collapse(W)),e==F)return;return r.length>0&&t.appendChild(P.createTextNode(r)),t}for(o=x(D[U],D[V]),a=D[$]-D[V];o&&a>0;)s=o.nextSibling,l=H(o,e),t&&t.appendChild(l),--a,o=s;return e!=I&&D.collapse(W),t}function S(e,t){var n,r,o,a,s,l;if(t!=F&&(n=i()),r=A(e,t),n&&n.appendChild(r),o=K(e),a=o-D[V],0>=a)return t!=I&&(D.setEndBefore(e),D.collapse(z)),n;for(r=e.previousSibling;a>0;)s=r.previousSibling,l=H(r,t),n&&n.insertBefore(l,n.firstChild),--a,r=s;return t!=I&&(D.setEndBefore(e),D.collapse(z)),n}function T(e,t){var n,r,o,a,s,l;for(t!=F&&(n=i()),o=B(e,t),n&&n.appendChild(o),r=K(e),++r,a=D[$]-r,o=e.nextSibling;o&&a>0;)s=o.nextSibling,l=H(o,t),n&&n.appendChild(l),--a,o=s;return t!=I&&(D.setStartAfter(e),D.collapse(W)),n}function R(e,t,n){var r,o,a,s,l,c,u,d;for(n!=F&&(o=i()),r=B(e,n),o&&o.appendChild(r),a=e.parentNode,s=K(e),l=K(t),++s,c=l-s,u=e.nextSibling;c>0;)d=u.nextSibling,r=H(u,n),o&&o.appendChild(r),u=d,--c;return r=A(t,n),o&&o.appendChild(r),n!=I&&(D.setStartAfter(e),D.collapse(W)),o}function A(e,t){var n=x(D[q],D[$]-1),r,i,o,a,s,l=n!=D[q];if(n==e)return L(n,l,z,t);for(r=n.parentNode,i=L(r,z,z,t);r;){for(;n;)o=n.previousSibling,a=L(n,l,z,t),t!=F&&i.insertBefore(a,i.firstChild),l=W,n=o;if(r==e)return i;n=r.previousSibling,r=r.parentNode,s=L(r,z,z,t),t!=F&&s.appendChild(i),i=s}}function B(e,t){var n=x(D[U],D[V]),r=n!=D[U],i,o,a,s,l;if(n==e)return L(n,r,W,t);for(i=n.parentNode,o=L(i,z,W,t);i;){for(;n;)a=n.nextSibling,s=L(n,r,W,t),t!=F&&o.appendChild(s),r=W,n=a;if(i==e)return o;n=i.nextSibling,i=i.parentNode,l=L(i,z,W,t),t!=F&&l.appendChild(o),o=l}}function L(e,t,n,i){var o,a,s,l,c;if(t)return H(e,i);if(3==e.nodeType){if(o=e.nodeValue,n?(l=D[V],a=o.substring(l),s=o.substring(0,l)):(l=D[$],a=o.substring(0,l),s=o.substring(l)),i!=I&&(e.nodeValue=s),i==F)return;return c=r.clone(e,z),c.nodeValue=a,c}if(i!=F)return r.clone(e,z)}function H(e,n){return n!=F?n==I?r.clone(e,W):e:(e.parentNode.removeChild(e),t)}function M(){return r.create("body",null,v()).outerText}var D=this,P=r.doc,O=0,I=1,F=2,W=!0,z=!1,V="startOffset",U="startContainer",q="endContainer",$="endOffset",j=e.extend,K=r.nodeIndex;return j(D,{startContainer:P,startOffset:0,endContainer:P,endOffset:0,collapsed:W,commonAncestorContainer:P,START_TO_START:0,START_TO_END:1,END_TO_END:2,END_TO_START:3,setStart:o,setEnd:a,setStartBefore:s,setStartAfter:l,setEndBefore:c,setEndAfter:u,collapse:d,selectNode:f,selectNodeContents:p,compareBoundaryPoints:h,deleteContents:m,extractContents:g,cloneContents:v,insertNode:y,surroundContents:b,cloneRange:C,toStringIE:M}),D}return n.prototype.toString=function(){return this.toStringIE()},n}),r(h,[f],function(e){function t(e){var t;return t=document.createElement("div"),t.innerHTML=e,t.textContent||t.innerText||e}function n(e,t){var n,r,i,a={};if(e){for(e=e.split(","),t=t||10,n=0;e.length>n;n+=2)r=String.fromCharCode(parseInt(e[n],t)),o[r]||(i="&"+e[n+1]+";",a[r]=i,a[i]=r);return a}}var r=e.makeMap,i,o,a,s=/[&<>\"\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,l=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,c=/[<>&\"\']/g,u=/&(#x|#)?([\w]+);/g,d={128:"\u20ac",130:"\u201a",131:"\u0192",132:"\u201e",133:"\u2026",134:"\u2020",135:"\u2021",136:"\u02c6",137:"\u2030",138:"\u0160",139:"\u2039",140:"\u0152",142:"\u017d",145:"\u2018",146:"\u2019",147:"\u201c",148:"\u201d",149:"\u2022",150:"\u2013",151:"\u2014",152:"\u02dc",153:"\u2122",154:"\u0161",155:"\u203a",156:"\u0153",158:"\u017e",159:"\u0178"};o={'"':"&quot;","'":"&#39;","<":"&lt;",">":"&gt;","&":"&amp;"},a={"&lt;":"<","&gt;":">","&amp;":"&","&quot;":'"',"&apos;":"'"},i=n("50,nbsp,51,iexcl,52,cent,53,pound,54,curren,55,yen,56,brvbar,57,sect,58,uml,59,copy,5a,ordf,5b,laquo,5c,not,5d,shy,5e,reg,5f,macr,5g,deg,5h,plusmn,5i,sup2,5j,sup3,5k,acute,5l,micro,5m,para,5n,middot,5o,cedil,5p,sup1,5q,ordm,5r,raquo,5s,frac14,5t,frac12,5u,frac34,5v,iquest,60,Agrave,61,Aacute,62,Acirc,63,Atilde,64,Auml,65,Aring,66,AElig,67,Ccedil,68,Egrave,69,Eacute,6a,Ecirc,6b,Euml,6c,Igrave,6d,Iacute,6e,Icirc,6f,Iuml,6g,ETH,6h,Ntilde,6i,Ograve,6j,Oacute,6k,Ocirc,6l,Otilde,6m,Ouml,6n,times,6o,Oslash,6p,Ugrave,6q,Uacute,6r,Ucirc,6s,Uuml,6t,Yacute,6u,THORN,6v,szlig,70,agrave,71,aacute,72,acirc,73,atilde,74,auml,75,aring,76,aelig,77,ccedil,78,egrave,79,eacute,7a,ecirc,7b,euml,7c,igrave,7d,iacute,7e,icirc,7f,iuml,7g,eth,7h,ntilde,7i,ograve,7j,oacute,7k,ocirc,7l,otilde,7m,ouml,7n,divide,7o,oslash,7p,ugrave,7q,uacute,7r,ucirc,7s,uuml,7t,yacute,7u,thorn,7v,yuml,ci,fnof,sh,Alpha,si,Beta,sj,Gamma,sk,Delta,sl,Epsilon,sm,Zeta,sn,Eta,so,Theta,sp,Iota,sq,Kappa,sr,Lambda,ss,Mu,st,Nu,su,Xi,sv,Omicron,t0,Pi,t1,Rho,t3,Sigma,t4,Tau,t5,Upsilon,t6,Phi,t7,Chi,t8,Psi,t9,Omega,th,alpha,ti,beta,tj,gamma,tk,delta,tl,epsilon,tm,zeta,tn,eta,to,theta,tp,iota,tq,kappa,tr,lambda,ts,mu,tt,nu,tu,xi,tv,omicron,u0,pi,u1,rho,u2,sigmaf,u3,sigma,u4,tau,u5,upsilon,u6,phi,u7,chi,u8,psi,u9,omega,uh,thetasym,ui,upsih,um,piv,812,bull,816,hellip,81i,prime,81j,Prime,81u,oline,824,frasl,88o,weierp,88h,image,88s,real,892,trade,89l,alefsym,8cg,larr,8ch,uarr,8ci,rarr,8cj,darr,8ck,harr,8dl,crarr,8eg,lArr,8eh,uArr,8ei,rArr,8ej,dArr,8ek,hArr,8g0,forall,8g2,part,8g3,exist,8g5,empty,8g7,nabla,8g8,isin,8g9,notin,8gb,ni,8gf,prod,8gh,sum,8gi,minus,8gn,lowast,8gq,radic,8gt,prop,8gu,infin,8h0,ang,8h7,and,8h8,or,8h9,cap,8ha,cup,8hb,int,8hk,there4,8hs,sim,8i5,cong,8i8,asymp,8j0,ne,8j1,equiv,8j4,le,8j5,ge,8k2,sub,8k3,sup,8k4,nsub,8k6,sube,8k7,supe,8kl,oplus,8kn,otimes,8l5,perp,8m5,sdot,8o8,lceil,8o9,rceil,8oa,lfloor,8ob,rfloor,8p9,lang,8pa,rang,9ea,loz,9j0,spades,9j3,clubs,9j5,hearts,9j6,diams,ai,OElig,aj,oelig,b0,Scaron,b1,scaron,bo,Yuml,m6,circ,ms,tilde,802,ensp,803,emsp,809,thinsp,80c,zwnj,80d,zwj,80e,lrm,80f,rlm,80j,ndash,80k,mdash,80o,lsquo,80p,rsquo,80q,sbquo,80s,ldquo,80t,rdquo,80u,bdquo,810,dagger,811,Dagger,81g,permil,81p,lsaquo,81q,rsaquo,85c,euro",32);var f={encodeRaw:function(e,t){return e.replace(t?s:l,function(e){return o[e]||e})},encodeAllRaw:function(e){return(""+e).replace(c,function(e){return o[e]||e})},encodeNumeric:function(e,t){return e.replace(t?s:l,function(e){return e.length>1?"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";":o[e]||"&#"+e.charCodeAt(0)+";"})},encodeNamed:function(e,t,n){return n=n||i,e.replace(t?s:l,function(e){return o[e]||n[e]||e})},getEncodeFunc:function(e,t){function a(e,n){return e.replace(n?s:l,function(e){return o[e]||t[e]||"&#"+e.charCodeAt(0)+";"||e})}function c(e,n){return f.encodeNamed(e,n,t)}return t=n(t)||i,e=r(e.replace(/\+/g,",")),e.named&&e.numeric?a:e.named?t?c:f.encodeNamed:e.numeric?f.encodeNumeric:f.encodeRaw},decode:function(e){return e.replace(u,function(e,n,r){return n?(r=parseInt(r,2===n.length?16:10),r>65535?(r-=65536,String.fromCharCode(55296+(r>>10),56320+(1023&r))):d[r]||String.fromCharCode(r)):a[e]||i[e]||t(e)})}};return f}),r(m,[],function(){var e=navigator,t=e.userAgent,n,r,i,o,a,s;n=window.opera&&window.opera.buildNumber,r=/WebKit/.test(t),i=!r&&!n&&/MSIE/gi.test(t)&&/Explorer/gi.test(e.appName),i=i&&/MSIE (\w+)\./.exec(t)[1],o=!r&&/Gecko/.test(t),a=-1!=t.indexOf("Mac"),s=/(iPad|iPhone)/.test(t);var l=!s||t.match(/AppleWebKit\/(\d*)/)[1]>=534;return{opera:n,webkit:r,ie:i,gecko:o,mac:a,iOS:s,contentEditable:l,transparentSrc:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",caretAfter:8!=i,range:window.getSelection&&"Range"in window}}),r(g,[l,c,u,d,p,h,m,f],function(e,n,r,i,o,a,s,l){function c(e,t){var i=this,o;i.doc=e,i.win=window,i.files={},i.counter=0,i.stdMode=!g||e.documentMode>=8,i.boxModel=!g||"CSS1Compat"==e.compatMode||i.stdMode,i.hasOuterHTML="outerHTML"in e.createElement("a"),i.settings=t=h({keep_values:!1,hex_colors:1},t),i.schema=t.schema,i.styles=new n({url_converter:t.url_converter,url_converter_scope:t.url_converter_scope},t.schema),i.fixDoc(e),i.events=t.ownEvents?new r(t.proxy):r.Event,o=t.schema?t.schema.getBlockElements():{},i.isBlock=function(e){if(!e)return!1;var t=e.nodeType;return t?!(1!==t||!o[e.nodeName]):!!o[e]}}var u=l.each,d=l.is,f=l.grep,p=l.trim,h=l.extend,m=s.webkit,g=s.ie,v=/^([a-z0-9],?)+$/i,y=/^[ \t\r\n]*$/,b=l.makeMap("fillOpacity fontWeight lineHeight opacity orphans widows zIndex zoom"," ");return c.prototype={root:null,props:{"for":"htmlFor","class":"className",className:"className",checked:"checked",disabled:"disabled",maxlength:"maxLength",readonly:"readOnly",selected:"selected",value:"value",id:"id",name:"name",type:"type"},fixDoc:function(e){var t=this.settings,n;if(g&&t.schema){"abbr article aside audio canvas details figcaption figure footer header hgroup mark menu meter nav output progress section summary time video".replace(/\w+/g,function(t){e.createElement(t)});for(n in t.schema.getCustomElements())e.createElement(n)}},clone:function(e,t){var n=this,r,i;return!g||1!==e.nodeType||t?e.cloneNode(t):(i=n.doc,t?r.firstChild:(r=i.createElement(e.nodeName),u(n.getAttribs(e),function(t){n.setAttrib(r,t.nodeName,n.getAttrib(e,t.nodeName))}),r))},getRoot:function(){var e=this;return e.get(e.settings.root_element)||e.doc.body},getViewPort:function(e){var t,n;return e=e?e:this.win,t=e.document,n=this.boxModel?t.documentElement:t.body,{x:e.pageXOffset||n.scrollLeft,y:e.pageYOffset||n.scrollTop,w:e.innerWidth||n.clientWidth,h:e.innerHeight||n.clientHeight}},getRect:function(e){var t=this,n,r;return e=t.get(e),n=t.getPos(e),r=t.getSize(e),{x:n.x,y:n.y,w:r.w,h:r.h}},getSize:function(e){var t=this,n,r;return e=t.get(e),n=t.getStyle(e,"width"),r=t.getStyle(e,"height"),-1===n.indexOf("px")&&(n=0),-1===r.indexOf("px")&&(r=0),{w:parseInt(n,10)||e.offsetWidth||e.clientWidth,h:parseInt(r,10)||e.offsetHeight||e.clientHeight}},getParent:function(e,t,n){return this.getParents(e,t,n,!1)},getParents:function(e,n,r,i){var o=this,a,s=[];for(e=o.get(e),i=i===t,r=r||("BODY"!=o.getRoot().nodeName?o.getRoot().parentNode:null),d(n,"string")&&(a=n,n="*"===n?function(e){return 1==e.nodeType}:function(e){return o.is(e,a)});e&&e!=r&&e.nodeType&&9!==e.nodeType;){if(!n||n(e)){if(!i)return e;s.push(e)}e=e.parentNode}return i?s:null},get:function(e){var t;return e&&this.doc&&"string"==typeof e&&(t=e,e=this.doc.getElementById(e),e&&e.id!==t)?this.doc.getElementsByName(t)[1]:e},getNext:function(e,t){return this._findSib(e,t,"nextSibling")},getPrev:function(e,t){return this._findSib(e,t,"previousSibling")},select:function(t,n){var r=this;return e(t,r.get(n)||r.get(r.settings.root_element)||r.doc,[])},is:function(n,r){var i;if(n.length===t){if("*"===r)return 1==n.nodeType;if(v.test(r)){for(r=r.toLowerCase().split(/,/),n=n.nodeName.toLowerCase(),i=r.length-1;i>=0;i--)if(r[i]==n)return!0;return!1}}return e.matches(r,n.nodeType?[n]:n).length>0},add:function(e,t,n,r,i){var o=this;return this.run(e,function(e){var a;return a=d(t,"string")?o.doc.createElement(t):t,o.setAttribs(a,n),r&&(r.nodeType?a.appendChild(r):o.setHTML(a,r)),i?a:e.appendChild(a)})},create:function(e,t,n){return this.add(this.doc.createElement(e),e,t,n,1)},createHTML:function(e,n,r){var i="",o;i+="<"+e;for(o in n)n.hasOwnProperty(o)&&null!==n[o]&&(i+=" "+o+'="'+this.encode(n[o])+'"');return r!==t?i+">"+r+"</"+e+">":i+" />"},createFragment:function(e){var t,n,r=this.doc,i;for(i=r.createElement("div"),t=r.createDocumentFragment(),e&&(i.innerHTML=e);n=i.firstChild;)t.appendChild(n);return t},remove:function(e,t){return this.run(e,function(e){var n,r=e.parentNode;if(!r)return null;if(t)for(;n=e.firstChild;)!g||3!==n.nodeType||n.nodeValue?r.insertBefore(n,e):e.removeChild(n);return r.removeChild(e)})},setStyle:function(e,n,r){return this.run(e,function(e){var i=this,o,a;if(n)if("string"==typeof n){o=e.style,n=n.replace(/-(\D)/g,function(e,t){return t.toUpperCase()}),"number"!=typeof r||b[n]||(r+="px"),"opacity"===n&&e.runtimeStyle&&e.runtimeStyle.opacity===t&&(o.filter=""===r?"":"alpha(opacity="+100*r+")"),"float"==n&&(n="cssFloat"in e.style?"cssFloat":"styleFloat");try{o[n]=r}catch(s){}i.settings.update_styles&&e.removeAttribute("data-mce-style")}else for(a in n)i.setStyle(e,a,n[a])})},getStyle:function(e,n,r){if(e=this.get(e)){if(this.doc.defaultView&&r){n=n.replace(/[A-Z]/g,function(e){return"-"+e});try{return this.doc.defaultView.getComputedStyle(e,null).getPropertyValue(n)}catch(i){return null}}return n=n.replace(/-(\D)/g,function(e,t){return t.toUpperCase()}),"float"==n&&(n=g?"styleFloat":"cssFloat"),n.currentStyle&&r?e.currentStyle[n]:e.style?e.style[n]:t}},setStyles:function(e,t){this.setStyle(e,t)},css:function(e,t,n){this.setStyle(e,t,n)},removeAllAttribs:function(e){return this.run(e,function(e){var t,n=e.attributes;for(t=n.length-1;t>=0;t--)e.removeAttributeNode(n.item(t))})},setAttrib:function(e,n,r){var i=this;if(e&&n)return this.run(e,function(e){var o=i.settings,a=e.getAttribute(n);if(null!==r)switch(n){case"style":if(!d(r,"string"))return u(r,function(t,n){i.setStyle(e,n,t)}),t;o.keep_values&&(r?e.setAttribute("data-mce-style",r,2):e.removeAttribute("data-mce-style",2)),e.style.cssText=r;break;case"class":e.className=r||"";break;case"src":case"href":o.keep_values&&(o.url_converter&&(r=o.url_converter.call(o.url_converter_scope||i,r,n,e)),i.setAttrib(e,"data-mce-"+n,r,2));break;case"shape":e.setAttribute("data-mce-style",r)}d(r)&&null!==r&&0!==r.length?e.setAttribute(n,""+r,2):e.removeAttribute(n,2),a!=r&&o.onSetAttrib&&o.onSetAttrib({attrElm:e,attrName:n,attrValue:r})})},setAttribs:function(e,t){var n=this;return this.run(e,function(e){u(t,function(t,r){n.setAttrib(e,r,t)})})},getAttrib:function(e,t,n){var r,i=this,o;if(e=i.get(e),!e||1!==e.nodeType)return n===o?!1:n;if(d(n)||(n=""),/^(src|href|style|coords|shape)$/.test(t)&&(r=e.getAttribute("data-mce-"+t)))return r;if(g&&i.props[t]&&(r=e[i.props[t]],r=r&&r.nodeValue?r.nodeValue:r),r||(r=e.getAttribute(t,2)),/^(checked|compact|declare|defer|disabled|ismap|multiple|nohref|noshade|nowrap|readonly|selected)$/.test(t))return e[i.props[t]]===!0&&""===r?t:r?t:"";if("FORM"===e.nodeName&&e.getAttributeNode(t))return e.getAttributeNode(t).nodeValue;if("style"===t&&(r=r||e.style.cssText,r&&(r=i.serializeStyle(i.parseStyle(r),e.nodeName),i.settings.keep_values&&e.setAttribute("data-mce-style",r))),m&&"class"===t&&r&&(r=r.replace(/(apple|webkit)\-[a-z\-]+/gi,"")),g)switch(t){case"rowspan":case"colspan":1===r&&(r="");break;case"size":("+0"===r||20===r||0===r)&&(r="");break;case"width":case"height":case"vspace":case"checked":case"disabled":case"readonly":0===r&&(r="");break;case"hspace":-1===r&&(r="");break;case"maxlength":case"tabindex":(32768===r||2147483647===r||"32768"===r)&&(r="");break;case"multiple":case"compact":case"noshade":case"nowrap":return 65535===r?t:n;case"shape":r=r.toLowerCase();break;default:0===t.indexOf("on")&&r&&(r=(""+r).replace(/^function\s+\w+\(\)\s+\{\s+(.*)\s+\}$/,"$1"))}return r!==o&&null!==r&&""!==r?""+r:n},getPos:function(e,t){var n=this,r=0,i=0,o,a=n.doc,s;if(e=n.get(e),t=t||a.body,e){if(t===a.body&&e.getBoundingClientRect)return s=e.getBoundingClientRect(),t=n.boxModel?a.documentElement:a.body,r=s.left+(a.documentElement.scrollLeft||a.body.scrollLeft)-t.clientTop,i=s.top+(a.documentElement.scrollTop||a.body.scrollTop)-t.clientLeft,{x:r,y:i};for(o=e;o&&o!=t&&o.nodeType;)r+=o.offsetLeft||0,i+=o.offsetTop||0,o=o.offsetParent;for(o=e.parentNode;o&&o!=t&&o.nodeType;)r-=o.scrollLeft||0,i-=o.scrollTop||0,o=o.parentNode}return{x:r,y:i}},parseStyle:function(e){return this.styles.parse(e)},serializeStyle:function(e,t){return this.styles.serialize(e,t)},addStyle:function(e){var t=this,n=t.doc,r,i;if(t!==c.DOM&&n===document){var o=c.DOM.addedStyles;if(o=o||[],o[e])return;o[e]=!0,c.DOM.addedStyles=o}i=n.getElementById("mceDefaultStyles"),i||(i=n.createElement("style"),i.id="mceDefaultStyles",i.type="text/css",r=n.getElementsByTagName("head")[0],r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i)),i.styleSheet?i.styleSheet.cssText+=e:i.appendChild(n.createTextNode(e))},loadCSS:function(e){var n=this,r=n.doc,i;return n!==c.DOM&&r===document?(c.DOM.loadCSS(e),t):(e||(e=""),i=r.getElementsByTagName("head")[0],u(e.split(","),function(e){var t;n.files[e]||(n.files[e]=!0,t=n.create("link",{rel:"stylesheet",href:e}),g&&r.documentMode&&r.recalc&&(t.onload=function(){r.recalc&&r.recalc(),t.onload=null}),i.appendChild(t))}),t)},addClass:function(e,t){return this.run(e,function(e){var n;return t?this.hasClass(e,t)?e.className:(n=this.removeClass(e,t),e.className=n=(""!==n?n+" ":"")+t,n):0})},removeClass:function(e,t){var n=this,r;return n.run(e,function(e){var i;return n.hasClass(e,t)?(r||(r=RegExp("(^|\\s+)"+t+"(\\s+|$)","g")),i=e.className.replace(r," "),i=p(" "!=i?i:""),e.className=i,i||(e.removeAttribute("class"),e.removeAttribute("className")),i):e.className})},hasClass:function(e,t){return e=this.get(e),e&&t?-1!==(" "+e.className+" ").indexOf(" "+t+" "):!1},toggleClass:function(e,n,r){r=r===t?!this.hasClass(e,n):r,this.hasClass(e,n)!==r&&(r?this.addClass(e,n):this.removeClass(e,n))},show:function(e){return this.setStyle(e,"display","block")},hide:function(e){return this.setStyle(e,"display","none")},isHidden:function(e){return e=this.get(e),!e||"none"==e.style.display||"none"==this.getStyle(e,"display")},uniqueId:function(e){return(e?e:"mce_")+this.counter++},setHTML:function(e,t){var n=this;return n.run(e,function(e){if(g){for(;e.firstChild;)e.removeChild(e.firstChild);try{e.innerHTML="<br />"+t,e.removeChild(e.firstChild)}catch(r){var i=n.create("div");i.innerHTML="<br />"+t,u(f(i.childNodes),function(t,n){n&&e.canHaveHTML&&e.appendChild(t)})}}else e.innerHTML=t;return t})},getOuterHTML:function(e){var t,n=this;return(e=n.get(e))?1===e.nodeType&&n.hasOuterHTML?e.outerHTML:(t=(e.ownerDocument||n.doc).createElement("body"),t.appendChild(e.cloneNode(!0)),t.innerHTML):null},setOuterHTML:function(e,t,n){var r=this;return r.run(e,function(e){function i(){var i,o;for(o=n.createElement("body"),o.innerHTML=t,i=o.lastChild;i;)r.insertAfter(i.cloneNode(!0),e),i=i.previousSibling;r.remove(e)}if(1==e.nodeType)if(n=n||e.ownerDocument||r.doc,g)try{1==e.nodeType&&r.hasOuterHTML?e.outerHTML=t:i()}catch(o){i()}else i()})},decode:a.decode,encode:a.encodeAllRaw,insertAfter:function(e,t){return t=this.get(t),this.run(e,function(e){var n,r;return n=t.parentNode,r=t.nextSibling,r?n.insertBefore(e,r):n.appendChild(e),e})},replace:function(e,t,n){var r=this;return r.run(t,function(t){return d(t,"array")&&(e=e.cloneNode(!0)),n&&u(f(t.childNodes),function(t){e.appendChild(t)}),t.parentNode.replaceChild(e,t)})},rename:function(e,t){var n=this,r;return e.nodeName!=t.toUpperCase()&&(r=n.create(t),u(n.getAttribs(e),function(t){n.setAttrib(r,t.nodeName,n.getAttrib(e,t.nodeName))}),n.replace(r,e,1)),r||e},findCommonAncestor:function(e,t){for(var n=e,r;n;){for(r=t;r&&n!=r;)r=r.parentNode;if(n==r)break;n=n.parentNode}return!n&&e.ownerDocument?e.ownerDocument.documentElement:n},toHex:function(e){return this.styles.toHex(l.trim(e))},getClasses:function(){function e(t){u(t.imports,function(t){e(t)}),u(t.cssRules||t.rules,function(t){switch(t.type||1){case 1:t.selectorText&&u(t.selectorText.split(","),function(e){e=e.replace(/^\s*|\s*$|^\s\./g,""),!/\.mce/.test(e)&&/\.[\w\-]+$/.test(e)&&(o=e,e=e.replace(/.*\.([a-z0-9_\-]+).*/i,"$1"),(!i||(e=i(e,o)))&&(r[e]||(n.push({"class":e}),r[e]=1)))});break;case 3:e(t.styleSheet)}})}var t=this,n=[],r={},i=t.settings.class_filter,o;if(t.classes)return t.classes;try{u(t.doc.styleSheets,e)}catch(a){}return n.length>0&&(t.classes=n),n},run:function(e,t,n){var r=this,i;return"string"==typeof e&&(e=r.get(e)),e?(n=n||this,e.nodeType||!e.length&&0!==e.length?t.call(n,e):(i=[],u(e,function(e,o){e&&("string"==typeof e&&(e=r.get(e)),i.push(t.call(n,e,o)))}),i)):!1},getAttribs:function(e){var t;if(e=this.get(e),!e)return[];if(g){if(t=[],"OBJECT"==e.nodeName)return e.attributes;"OPTION"===e.nodeName&&this.getAttrib(e,"selected")&&t.push({specified:1,nodeName:"selected"});var n=/<\/?[\w:\-]+ ?|=[\"][^\"]+\"|=\'[^\']+\'|=[\w\-]+|>/gi;return e.cloneNode(!1).outerHTML.replace(n,"").replace(/[\w:\-]+/gi,function(e){t.push({specified:1,nodeName:e})}),t}return e.attributes},isEmpty:function(e,t){var n=this,r,o,a,s,l,c=0;if(e=e.firstChild){s=new i(e,e.parentNode),t=t||n.schema?n.schema.getNonEmptyElements():null;do{if(a=e.nodeType,1===a){if(e.getAttribute("data-mce-bogus"))continue;if(l=e.nodeName.toLowerCase(),t&&t[l]){if("br"===l){c++;continue}return!1}for(o=n.getAttribs(e),r=e.attributes.length;r--;)if(l=e.attributes[r].nodeName,"name"===l||"data-mce-bookmark"===l)return!1}if(8==a)return!1;if(3===a&&!y.test(e.nodeValue))return!1}while(e=s.next())}return 1>=c},createRng:function(){var e=this.doc;return e.createRange?e.createRange():new o(this)},nodeIndex:function(e,t){var n=0,r,i,o;if(e)for(r=e.nodeType,e=e.previousSibling,i=e;e;e=e.previousSibling)o=e.nodeType,(!t||3!=o||o!=r&&e.nodeValue.length)&&(n++,r=o);return n},split:function(e,n,r){function i(e){function t(e){var t=e.previousSibling&&"SPAN"==e.previousSibling.nodeName,n=e.nextSibling&&"SPAN"==e.nextSibling.nodeName;return t&&n}var n,r=e.childNodes,a=e.nodeType;if(1!=a||"bookmark"!=e.getAttribute("data-mce-type")){for(n=r.length-1;n>=0;n--)i(r[n]);if(9!=a){if(3==a&&e.nodeValue.length>0){var s=p(e.nodeValue).length;if(!o.isBlock(e.parentNode)||s>0||0===s&&t(e))return}else if(1==a&&(r=e.childNodes,1==r.length&&r[0]&&1==r[0].nodeType&&"bookmark"==r[0].getAttribute("data-mce-type")&&e.parentNode.insertBefore(r[0],e),r.length||/^(br|hr|input|img)$/i.test(e.nodeName)))return;o.remove(e)}return e}}var o=this,a=o.createRng(),s,l,c;return e&&n?(a.setStart(e.parentNode,o.nodeIndex(e)),a.setEnd(n.parentNode,o.nodeIndex(n)),s=a.extractContents(),a=o.createRng(),a.setStart(n.parentNode,o.nodeIndex(n)+1),a.setEnd(e.parentNode,o.nodeIndex(e)+1),l=a.extractContents(),c=e.parentNode,c.insertBefore(i(s),e),r?c.replaceChild(r,n):c.insertBefore(n,e),c.insertBefore(i(l),e),o.remove(e),r||n):t},bind:function(e,t,n,r){return this.events.bind(e,t,n,r||this)},unbind:function(e,t,n){return this.events.unbind(e,t,n)},fire:function(e,t,n){return this.events.fire(e,t,n)},getContentEditable:function(e){var t;return 1!=e.nodeType?null:(t=e.getAttribute("data-mce-contenteditable"),t&&"inherit"!==t?t:"inherit"!==e.contentEditable?e.contentEditable:null)},destroy:function(){var e=this;e.win=e.doc=e.root=e.events=e.frag=null},dumpRng:function(e){return"startContainer: "+e.startContainer.nodeName+", startOffset: "+e.startOffset+", endContainer: "+e.endContainer.nodeName+", endOffset: "+e.endOffset},_findSib:function(e,t,n){var r=this,i=t;if(e)for("string"==typeof i&&(i=function(e){return r.is(e,t)}),e=e[n];e;e=e[n])if(i(e))return e;return null}},c.DOM=new c(document),c}),r(v,[g,f],function(e,n){function r(){function e(e,t){function n(){o.remove(s),a&&(a.onreadystatechange=a.onload=a=null),t()}function r(){"undefined"!=typeof console&&console.log&&console.log("Failed to load: "+e)}var o=i,a,s;s=o.uniqueId(),a=document.createElement("script"),a.id=s,a.type="text/javascript",a.src=e,a.onload=n,a.onreadystatechange=function(){/loaded|complete/.test(a.readyState)&&n()},a.onerror=r,(document.getElementsByTagName("head")[0]||document.body).appendChild(a)}var n=0,r=1,s=2,l={},c=[],u={},d=[],f=0,p;this.isDone=function(e){return l[e]==s},this.markDone=function(e){l[e]=s},this.add=this.load=function(e,t,r){var i=l[e];i==p&&(c.push(e),l[e]=n),t&&(u[e]||(u[e]=[]),u[e].push({func:t,scope:r||this}))},this.loadQueue=function(e,t){this.loadScripts(c,e,t)},this.loadScripts=function(n,i,c){function h(e){o(u[e],function(e){e.func.call(e.scope)}),u[e]=p}var m;d.push({func:i,scope:c||this}),m=function(){var i=a(n);n.length=0,o(i,function(n){return l[n]==s?(h(n),t):(l[n]!=r&&(l[n]=r,f++,e(n,function(){l[n]=s,f--,h(n),m()})),t)}),f||(o(d,function(e){e.func.call(e.scope)}),d.length=0)},m()}}var i=e.DOM,o=n.each,a=n.grep;return r.ScriptLoader=new r,r}),r(y,[v,f],function(e,n){function r(){var e=this;e.items=[],e.urls={},e.lookup={}}var i=n.each;return r.prototype={get:function(e){return this.lookup[e]?this.lookup[e].instance:t},dependencies:function(e){var t;return this.lookup[e]&&(t=this.lookup[e].dependencies),t||[]},requireLangPack:function(t){var n=r.settings;n&&n.language&&n.language_load!==!1&&e.ScriptLoader.add(this.urls[t]+"/langs/"+n.language+".js")},add:function(e,t,n){return this.items.push(t),this.lookup[e]={instance:t,dependencies:n},t},createUrl:function(e,t){return"object"==typeof t?t:{prefix:e.prefix,resource:t,suffix:e.suffix}},addComponents:function(t,n){var r=this.urls[t];i(n,function(t){e.ScriptLoader.add(r+"/"+t)})},load:function(n,o,a,s){function l(){var r=c.dependencies(n);i(r,function(e){var n=c.createUrl(o,e);c.load(n.resource,n,t,t)}),a&&(s?a.call(s):a.call(e))}var c=this,u=o;c.urls[n]||("object"==typeof o&&(u=o.prefix+o.resource+o.suffix),0!==u.indexOf("/")&&-1==u.indexOf("://")&&(u=r.baseURL+"/"+u),c.urls[n]=u.substring(0,u.lastIndexOf("/")),c.lookup[n]?l():e.ScriptLoader.add(u,l,s))}},r.PluginManager=new r,r.ThemeManager=new r,r}),r(b,[],function(){function e(e,t,n){var r,i,o=n?"lastChild":"firstChild",a=n?"prev":"next";if(e[o])return e[o];if(e!==t){if(r=e[a])return r;for(i=e.parent;i&&i!==t;i=i.parent)if(r=i[a])return r}}function t(e,t){this.name=e,this.type=t,1===t&&(this.attributes=[],this.attributes.map={})}var n=/^[ \t\r\n]*$/,r={"#text":3,"#comment":8,"#cdata":4,"#pi":7,"#doctype":10,"#document-fragment":11};return t.prototype={replace:function(e){var t=this;return e.parent&&e.remove(),t.insert(e,t),t.remove(),t},attr:function(e,t){var n=this,r,i,o;if("string"!=typeof e){for(i in e)n.attr(i,e[i]);return n}if(r=n.attributes){if(t!==o){if(null===t){if(e in r.map)for(delete r.map[e],i=r.length;i--;)if(r[i].name===e)return r=r.splice(i,1),n;return n}if(e in r.map){for(i=r.length;i--;)if(r[i].name===e){r[i].value=t;break}}else r.push({name:e,value:t});return r.map[e]=t,n}return r.map[e]}},clone:function(){var e=this,n=new t(e.name,e.type),r,i,o,a,s;if(o=e.attributes){for(s=[],s.map={},r=0,i=o.length;i>r;r++)a=o[r],"id"!==a.name&&(s[s.length]={name:a.name,value:a.value},s.map[a.name]=a.value);n.attributes=s}return n.value=e.value,n.shortEnded=e.shortEnded,n},wrap:function(e){var t=this;return t.parent.insert(e,t),e.append(t),t},unwrap:function(){var e=this,t,n;for(t=e.firstChild;t;)n=t.next,e.insert(t,e,!0),t=n;e.remove()},remove:function(){var e=this,t=e.parent,n=e.next,r=e.prev;return t&&(t.firstChild===e?(t.firstChild=n,n&&(n.prev=null)):r.next=n,t.lastChild===e?(t.lastChild=r,r&&(r.next=null)):n.prev=r,e.parent=e.next=e.prev=null),e},append:function(e){var t=this,n;return e.parent&&e.remove(),n=t.lastChild,n?(n.next=e,e.prev=n,t.lastChild=e):t.lastChild=t.firstChild=e,e.parent=t,e},insert:function(e,t,n){var r;return e.parent&&e.remove(),r=t.parent||this,n?(t===r.firstChild?r.firstChild=e:t.prev.next=e,e.prev=t.prev,e.next=t,t.prev=e):(t===r.lastChild?r.lastChild=e:t.next.prev=e,e.next=t.next,e.prev=t,t.next=e),e.parent=r,e},getAll:function(t){var n=this,r,i=[];for(r=n.firstChild;r;r=e(r,n))r.name===t&&i.push(r);return i},empty:function(){var t=this,n,r,i;if(t.firstChild){for(n=[],i=t.firstChild;i;i=e(i,t))n.push(i);for(r=n.length;r--;)i=n[r],i.parent=i.firstChild=i.lastChild=i.next=i.prev=null}return t.firstChild=t.lastChild=null,t},isEmpty:function(t){var r=this,i=r.firstChild,o,a;if(i)do{if(1===i.type){if(i.attributes.map["data-mce-bogus"])continue;if(t[i.name])return!1;for(o=i.attributes.length;o--;)if(a=i.attributes[o].name,"name"===a||0===a.indexOf("data-mce-"))return!1}if(8===i.type)return!1;if(3===i.type&&!n.test(i.value))return!1}while(i=e(i,r));return!0},walk:function(t){return e(this,null,t)}},t.create=function(e,n){var i,o;if(i=new t(e,r[e]||1),n)for(o in n)i.attr(o,n[o]);return i},t}),r(C,[f],function(e){function t(e,t){return e?e.split(t||" "):[]}function n(e){function n(e,n,r){function i(e){var t={},n,r;for(n=0,r=e.length;r>n;n++)t[e[n]]={};return t}var o,l,c,u=arguments;for(r=r||[],n=n||"","string"==typeof r&&(r=t(r)),l=3;u.length>l;l++)"string"==typeof u[l]&&(u[l]=t(u[l])),r.push.apply(r,u[l]);for(e=t(e),o=e.length;o--;)c=[].concat(s,t(n)),a[e[o]]={attributes:i(c),attributesOrder:c,children:i(r)}}function i(e,n){var r,i,o,s;for(e=t(e),r=e.length,n=t(n);r--;)for(i=a[e[r]],o=0,s=n.length;s>o;o++)i.attributes[n[o]]={},i.attributesOrder.push(n[o])}var a={},s,l,c,u,d,f,p;return r[e]?r[e]:(s=t("id accesskey class dir lang style tabindex title"),l=t("onabort onblur oncancel oncanplay oncanplaythrough onchange onclick onclose oncontextmenu oncuechange ondblclick ondrag ondragend ondragenter ondragleave ondragover ondragstart ondrop ondurationchange onemptied onended onerror onfocus oninput oninvalid onkeydown onkeypress onkeyup onload onloadeddata onloadedmetadata onloadstart onmousedown onmousemove onmouseout onmouseover onmouseup onmousewheel onpause onplay onplaying onprogress onratechange onreset onscroll onseeked onseeking onseeking onselect onshow onstalled onsubmit onsuspend ontimeupdate onvolumechange onwaiting"),c=t("address blockquote div dl fieldset form h1 h2 h3 h4 h5 h6 hr menu ol p pre table ul"),u=t("a abbr b bdo br button cite code del dfn em embed i iframe img input ins kbd label map noscript object q s samp script select small span strong sub sup textarea u var #text #comment"),"html4"!=e&&(s.push.apply(s,t("contenteditable contextmenu draggable dropzone hidden spellcheck translate")),c.push.apply(c,t("article aside details dialog figure header footer hgroup section nav")),u.push.apply(u,t("audio canvas command datalist mark meter output progress time wbr video ruby bdi keygen"))),"html5-strict"!=e&&(s.push("xml:lang"),p=t("acronym applet basefont big font strike tt"),u.push.apply(u,p),o(p,function(e){n(e,"",u)}),f=t("center dir isindex noframes"),c.push.apply(c,f),d=[].concat(c,u),o(f,function(e){n(e,"",d)})),d=d||[].concat(c,u),n("html","manifest","head body"),n("head","","base command link meta noscript script style title"),n("title hr noscript br"),n("base","href target"),n("link","href rel media hreflang type sizes hreflang"),n("meta","name http-equiv content charset"),n("style","media type scoped"),n("script","src async defer type charset"),n("body","onafterprint onbeforeprint onbeforeunload onblur onerror onfocus onhashchange onload onmessage onoffline ononline onpagehide onpageshow onpopstate onresize onscroll onstorage onunload",d),n("address dt dd div caption","",d),n("h1 h2 h3 h4 h5 h6 pre p abbr code var samp kbd sub sup i b u bdo span legend em strong small s cite dfn","",u),n("blockquote","cite",d),n("ol","reversed start type","li"),n("ul","","li"),n("li","value",d),n("dl","","dt dd"),n("a","href target rel media hreflang type",u),n("q","cite",u),n("ins del","cite datetime",d),n("img","src alt usemap ismap width height"),n("iframe","src name width height",d),n("embed","src type width height"),n("object","data type typemustmatch name usemap form width height",d,"param"),n("param","name value"),n("map","name",d,"area"),n("area","alt coords shape href target rel media hreflang type"),n("table","border","caption colgroup thead tfoot tbody tr"+("html4"==e?" col":"")),n("colgroup","span","col"),n("col","span"),n("tbody thead tfoot","","tr"),n("tr","","td th"),n("td","colspan rowspan headers",d),n("th","colspan rowspan headers scope abbr",d),n("form","accept-charset action autocomplete enctype method name novalidate target",d),n("fieldset","disabled form name",d,"legend"),n("label","form for",u),n("input","accept alt autocomplete checked dirname disabled form formaction formenctype formmethod formnovalidate formtarget height list max maxlength min multiple name pattern readonly required size src step type value width"),n("button","disabled form formaction formenctype formmethod formnovalidate formtarget name type value","html4"==e?d:u),n("select","disabled form multiple name required size","option optgroup"),n("optgroup","disabled label","option"),n("option","disabled label selected value"),n("textarea","cols dirname disabled form maxlength name readonly required rows wrap"),n("menu","type label",d,"li"),n("noscript","",d),"html4"!=e&&(n("wbr"),n("ruby","",u,"rt rp"),n("figcaption","",d),n("mark rt rp summary bdi","",u),n("canvas","width height",d),n("video","src crossorigin poster preload autoplay mediagroup loop muted controls width height",d,"track source"),n("audio","src crossorigin preload autoplay mediagroup loop muted controls",d,"track source"),n("source","src type media"),n("track","kind src srclang label default"),n("datalist","",u,"option"),n("article section nav aside header footer","",d),n("hgroup","","h1 h2 h3 h4 h5 h6"),n("figure","",d,"figcaption"),n("time","datetime",u),n("dialog","open",d),n("command","type label icon disabled checked radiogroup command"),n("output","for form name",u),n("progress","value max",u),n("meter","value min max low high optimum",u),n("details","open",d,"summary"),n("keygen","autofocus challenge disabled form keytype name")),"html5-strict"!=e&&(i("script","language xml:space"),i("style","xml:space"),i("object","declare classid codebase codetype archive standby align border hspace vspace"),i("param","valuetype type"),i("a","charset name rev shape coords"),i("br","clear"),i("applet","codebase archive code object alt name width height align hspace vspace"),i("img","name longdesc align border hspace vspace"),i("iframe","longdesc frameborder marginwidth marginheight scrolling align"),i("font basefont","size color face"),i("input","usemap align"),i("select","onchange"),i("textarea"),i("h1 h2 h3 h4 h5 h6 div p legend caption","align"),i("ul","type compact"),i("li","type"),i("ol dl menu dir","compact"),i("pre","width xml:space"),i("hr","align noshade size width"),i("isindex","prompt"),i("table","summary width frame rules cellspacing cellpadding align bgcolor"),i("col","width align char charoff valign"),i("colgroup","width align char charoff valign"),i("thead","align char charoff valign"),i("tr","align char charoff valign bgcolor"),i("th","axis align char charoff valign nowrap bgcolor width height"),i("form","accept"),i("td","abbr axis scope align char charoff valign nowrap bgcolor width height"),i("tfoot","align char charoff valign"),i("tbody","align char charoff valign"),i("area","nohref"),i("body","background bgcolor text link vlink alink")),"html4"!=e&&(i("input button select textarea","autofocus"),i("input textarea","placeholder"),i("a","download"),i("link script img","crossorigin"),i("iframe","srcdoc sandbox seamless allowfullscreen")),o(t("a form meter progress dfn"),function(e){a[e]&&delete a[e].children[e]
4}),delete a.caption.children.table,r[e]=a,a)}var r={},i=e.makeMap,o=e.each,a=e.extend,s=e.explode,l=e.inArray;return function(e){function c(t,n,o){var s=e[t];return s?s=i(s,",",i(s.toUpperCase()," ")):(s=r[t],s||(s=i(n," ",i(n.toUpperCase()," ")),s=a(s,o),r[t]=s)),s}function u(e){return RegExp("^"+e.replace(/([?+*])/g,".$1")+"$")}function d(e){var n,r,o,a,s,c,d,f,p,h,m,g,y,C,x,w,_,N,E,k=/^([#+\-])?([^\[!\/]+)(?:\/([^\[!]+))?(?:(!?)\[([^\]]+)\])?$/,S=/^([!\-])?(\w+::\w+|[^=:<]+)?(?:([=:<])(.*))?$/,T=/[*?+]/;if(e)for(e=t(e,","),v["@"]&&(w=v["@"].attributes,_=v["@"].attributesOrder),n=0,r=e.length;r>n;n++)if(s=k.exec(e[n])){if(C=s[1],p=s[2],x=s[3],f=s[5],g={},y=[],c={attributes:g,attributesOrder:y},"#"===C&&(c.paddEmpty=!0),"-"===C&&(c.removeEmpty=!0),"!"===s[4]&&(c.removeEmptyAttrs=!0),w){for(N in w)g[N]=w[N];y.push.apply(y,_)}if(f)for(f=t(f,"|"),o=0,a=f.length;a>o;o++)if(s=S.exec(f[o])){if(d={},m=s[1],h=s[2].replace(/::/g,":"),C=s[3],E=s[4],"!"===m&&(c.attributesRequired=c.attributesRequired||[],c.attributesRequired.push(h),d.required=!0),"-"===m){delete g[h],y.splice(l(y,h),1);continue}C&&("="===C&&(c.attributesDefault=c.attributesDefault||[],c.attributesDefault.push({name:h,value:E}),d.defaultValue=E),":"===C&&(c.attributesForced=c.attributesForced||[],c.attributesForced.push({name:h,value:E}),d.forcedValue=E),"<"===C&&(d.validValues=i(E,"?"))),T.test(h)?(c.attributePatterns=c.attributePatterns||[],d.pattern=u(h),c.attributePatterns.push(d)):(g[h]||y.push(h),g[h]=d)}w||"@"!=p||(w=g,_=y),x&&(c.outputName=p,v[x]=c),T.test(p)?(c.pattern=u(p),b.push(c)):v[p]=c}}function f(e){v={},b=[],d(e),o(x,function(e,t){y[t]=e.children})}function p(e){var n=/^(~)?(.+)$/;e&&o(t(e,","),function(e){var t=n.exec(e),r="~"===t[1],i=r?"span":"div",a=t[2];y[a]=y[i],R[a]=i,r||(k[a.toUpperCase()]={},k[a]={}),v[a]||(v[a]=v[i]),o(y,function(e){e[i]&&(e[a]=e[i])})})}function h(e){var n=/^([+\-]?)(\w+)\[([^\]]+)\]$/;e&&o(t(e,","),function(e){var r=n.exec(e),i,a;r&&(a=r[1],i=a?y[r[2]]:y[r[2]]={"#comment":{}},i=y[r[2]],o(t(r[3],"|"),function(e){"-"===a?delete i[e]:i[e]={}}))})}function m(e){var t=v[e],n;if(t)return t;for(n=b.length;n--;)if(t=b[n],t.pattern.test(e))return t}var g=this,v={},y={},b=[],C,x,w,_,N,E,k,S,T,R={},A={};e=e||{},x=n(e.schema),e.verify_html===!1&&(e.valid_elements="*[*]"),e.valid_styles&&(C={},o(e.valid_styles,function(e,t){C[t]=s(e)})),w=c("whitespace_elements","pre script noscript style textarea video audio iframe object"),_=c("self_closing_elements","colgroup dd dt li option p td tfoot th thead tr"),N=c("short_ended_elements","area base basefont br col frame hr img input isindex link meta param embed source wbr track"),E=c("boolean_attributes","checked compact declare defer disabled ismap multiple nohref noresize noshade nowrap readonly selected autoplay loop controls"),S=c("non_empty_elements","td th iframe video audio object",N),T=c("text_block_elements","h1 h2 h3 h4 h5 h6 p div address pre form blockquote center dir fieldset header footer article section hgroup aside nav figure"),k=c("block_elements","hr table tbody thead tfoot th tr td li ol ul caption dl dt dd noscript menu isindex samp option datalist select optgroup",T),o((e.special||"script noscript style textarea").split(" "),function(e){A[e]=RegExp("</"+e+"[^>]*>","gi")}),e.valid_elements?f(e.valid_elements):(o(x,function(e,t){v[t]={attributes:e.attributes,attributesOrder:e.attributesOrder},y[t]=e.children}),"html5"!=e.schema&&o(t("strong/b em/i"),function(e){e=t(e,"/"),v[e[1]].outputName=e[0]}),v.img.attributesDefault=[{name:"alt",value:""}],o(t("ol ul sub sup blockquote span font a table tbody tr strong em b i"),function(e){v[e]&&(v[e].removeEmpty=!0)}),o(t("p h1 h2 h3 h4 h5 h6 th td pre div address caption"),function(e){v[e].paddEmpty=!0}),o(t("span"),function(e){v[e].removeEmptyAttrs=!0})),p(e.custom_elements),h(e.valid_children),d(e.extended_valid_elements),h("+ol[ul|ol],+ul[ul|ol]"),e.invalid_elements&&o(s(e.invalid_elements),function(e){v[e]&&delete v[e]}),m("span")||d("span[!data-mce-type|*]"),g.children=y,g.styles=C,g.getBoolAttrs=function(){return E},g.getBlockElements=function(){return k},g.getTextBlockElements=function(){return T},g.getShortEndedElements=function(){return N},g.getSelfClosingElements=function(){return _},g.getNonEmptyElements=function(){return S},g.getWhiteSpaceElements=function(){return w},g.getSpecialElements=function(){return A},g.isValidChild=function(e,t){var n=y[e];return!(!n||!n[t])},g.isValid=function(e,t){var n,r,i=m(e);if(i){if(!t)return!0;if(i.attributes[t])return!0;if(n=i.attributePatterns)for(r=n.length;r--;)if(n[r].pattern.test(e))return!0}return!1},g.getElementRule=m,g.getCustomElements=function(){return R},g.addValidElements=d,g.setValidElements=f,g.addCustomElements=p,g.addValidChildren=h,g.elements=v}}),r(x,[C,h,f],function(e,t,n){var r=n.each;return function(n,i){var o=this,a=function(){};n=n||{},o.schema=i=i||new e,n.fix_self_closing!==!1&&(n.fix_self_closing=!0),r("comment cdata text start end pi doctype".split(" "),function(e){e&&(o[e]=n[e]||a)}),o.parse=function(e){function r(e){var t,n;for(t=d.length;t--&&d[t].name!==e;);if(t>=0){for(n=d.length-1;n>=t;n--)e=d[n],e.valid&&a.end(e.name);d.length=t}}function o(e,t,n,r,i){var o,a;if(t=t.toLowerCase(),n=t in b?t:I(n||r||i||""),x&&!g&&0!==t.indexOf("data-mce-")){if(o=k[t],!o&&S){for(a=S.length;a--&&(o=S[a],!o.pattern.test(t)););-1===a&&(o=null)}if(!o)return;if(o.validValues&&!(n in o.validValues))return}f.map[t]=n,f.push({name:t,value:n})}var a=this,s,l=0,c,u,d=[],f,p,h,m,g,v,y,b,C,x,w,_,N,E,k,S,T,R,A,B,L,H,M,D,P,O=0,I=t.decode,F;for(H=RegExp("<(?:(?:!--([\\w\\W]*?)-->)|(?:!\\[CDATA\\[([\\w\\W]*?)\\]\\]>)|(?:!DOCTYPE([\\w\\W]*?)>)|(?:\\?([^\\s\\/<>]+) ?([\\w\\W]*?)[?/]>)|(?:\\/([^>]+)>)|(?:([A-Za-z0-9\\-\\:\\.]+)((?:\\s+[^\"'>]+(?:(?:\"[^\"]*\")|(?:'[^']*')|[^>]*))*|\\/|\\s+)>))","g"),M=/([\w:\-]+)(?:\s*=\s*(?:(?:\"((?:[^\"])*)\")|(?:\'((?:[^\'])*)\')|([^>\s]+)))?/g,y=i.getShortEndedElements(),L=n.self_closing_elements||i.getSelfClosingElements(),b=i.getBoolAttrs(),x=n.validate,v=n.remove_internals,F=n.fix_self_closing,D=i.getSpecialElements();s=H.exec(e);){if(s.index>l&&a.text(I(e.substr(l,s.index-l))),c=s[6])c=c.toLowerCase(),":"===c.charAt(0)&&(c=c.substr(1)),r(c);else if(c=s[7]){if(c=c.toLowerCase(),":"===c.charAt(0)&&(c=c.substr(1)),C=c in y,F&&L[c]&&d.length>0&&d[d.length-1].name===c&&r(c),!x||(w=i.getElementRule(c))){if(_=!0,x&&(k=w.attributes,S=w.attributePatterns),(E=s[8])?(g=-1!==E.indexOf("data-mce-type"),g&&v&&(_=!1),f=[],f.map={},E.replace(M,o)):(f=[],f.map={}),x&&!g){if(T=w.attributesRequired,R=w.attributesDefault,A=w.attributesForced,B=w.removeEmptyAttrs,B&&!f.length&&(_=!1),A)for(p=A.length;p--;)N=A[p],m=N.name,P=N.value,"{$uid}"===P&&(P="mce_"+O++),f.map[m]=P,f.push({name:m,value:P});if(R)for(p=R.length;p--;)N=R[p],m=N.name,m in f.map||(P=N.value,"{$uid}"===P&&(P="mce_"+O++),f.map[m]=P,f.push({name:m,value:P}));if(T){for(p=T.length;p--&&!(T[p]in f.map););-1===p&&(_=!1)}f.map["data-mce-bogus"]&&(_=!1)}_&&a.start(c,f,C)}else _=!1;if(u=D[c]){u.lastIndex=l=s.index+s[0].length,(s=u.exec(e))?(_&&(h=e.substr(l,s.index-l)),l=s.index+s[0].length):(h=e.substr(l),l=e.length),_&&(h.length>0&&a.text(h,!0),a.end(c)),H.lastIndex=l;continue}C||(E&&E.indexOf("/")==E.length-1?_&&a.end(c):d.push({name:c,valid:_}))}else(c=s[1])?a.comment(c):(c=s[2])?a.cdata(c):(c=s[3])?a.doctype(c):(c=s[4])&&a.pi(c,s[5]);l=s.index+s[0].length}for(e.length>l&&a.text(I(e.substr(l))),p=d.length-1;p>=0;p--)c=d[p],c.valid&&a.end(c.name)}}}),r(w,[b,C,x,f],function(e,n,r,i){var o=i.makeMap,a=i.each,s=i.explode,l=i.extend;return function(i,c){function u(t){var n,r,i,a,s,l,u,f,p,h,m,g,v,y;for(m=o("tr,td,th,tbody,thead,tfoot,table"),h=c.getNonEmptyElements(),g=c.getTextBlockElements(),n=0;t.length>n;n++)if(r=t[n],r.parent&&!r.fixed)if(g[r.name]&&"li"==r.parent.name){for(v=r.next;v&&g[v.name];)v.name="li",v.fixed=!0,r.parent.insert(v,r.parent),v=v.next;r.unwrap(r)}else{for(a=[r],i=r.parent;i&&!c.isValidChild(i.name,r.name)&&!m[i.name];i=i.parent)a.push(i);if(i&&a.length>1){for(a.reverse(),s=l=d.filterNode(a[0].clone()),p=0;a.length-1>p;p++){for(c.isValidChild(l.name,a[p].name)?(u=d.filterNode(a[p].clone()),l.append(u)):u=l,f=a[p].firstChild;f&&f!=a[p+1];)y=f.next,u.append(f),f=y;l=u}s.isEmpty(h)?i.insert(r,a[0],!0):(i.insert(s,a[0],!0),i.insert(r,s)),i=a[0],(i.isEmpty(h)||i.firstChild===i.lastChild&&"br"===i.firstChild.name)&&i.empty().remove()}else if(r.parent){if("li"===r.name){if(v=r.prev,v&&("ul"===v.name||"ul"===v.name)){v.append(r);continue}if(v=r.next,v&&("ul"===v.name||"ul"===v.name)){v.insert(r,v.firstChild,!0);continue}r.wrap(d.filterNode(new e("ul",1)));continue}c.isValidChild(r.parent.name,"div")&&c.isValidChild("div",r.name)?r.wrap(d.filterNode(new e("div",1))):"style"===r.name||"script"===r.name?r.empty().remove():r.unwrap()}}}var d=this,f={},p=[],h={},m={};i=i||{},i.validate="validate"in i?i.validate:!0,i.root_name=i.root_name||"body",d.schema=c=c||new n,d.filterNode=function(e){var t,n,r;n in f&&(r=h[n],r?r.push(e):h[n]=[e]),t=p.length;for(;t--;)n=p[t].name,n in e.attributes.map&&(r=m[n],r?r.push(e):m[n]=[e]);return e},d.addNodeFilter=function(e,t){a(s(e),function(e){var n=f[e];n||(f[e]=n=[]),n.push(t)})},d.addAttributeFilter=function(e,n){a(s(e),function(e){var r;for(r=0;p.length>r;r++)if(p[r].name===e)return p[r].callbacks.push(n),t;p.push({name:e,callbacks:[n]})})},d.parse=function(n,a){function s(){function e(e){e&&(t=e.firstChild,t&&3==t.type&&(t.value=t.value.replace(A,"")),t=e.lastChild,t&&3==t.type&&(t.value=t.value.replace(H,"")))}var t=b.firstChild,n,r;if(c.isValidChild(b.name,F.toLowerCase())){for(;t;)n=t.next,3==t.type||1==t.type&&"p"!==t.name&&!R[t.name]&&!t.attr("data-mce-type")?r?r.append(t):(r=d(F,1),b.insert(r,t),r.append(t)):(e(r),r=null),t=n;e(r)}}function d(t,n){var r=new e(t,n),i;return t in f&&(i=h[t],i?i.push(r):h[t]=[r]),r}function g(e){var t,n,r;for(t=e.prev;t&&3===t.type;)n=t.value.replace(H,""),n.length>0?(t.value=n,t=t.prev):(r=t.prev,t.remove(),t=r)}function v(e){var t,n={};for(t in e)"li"!==t&&"p"!=t&&(n[t]=e[t]);return n}var y,b,C,x,w,_,N,E,k,S,T,R,A,B=[],L,H,M,D,P,O,I,F;if(a=a||{},h={},m={},R=l(o("script,style,head,html,body,title,meta,param"),c.getBlockElements()),I=c.getNonEmptyElements(),O=c.children,T=i.validate,F="forced_root_block"in a?a.forced_root_block:i.forced_root_block,P=c.getWhiteSpaceElements(),A=/^[ \t\r\n]+/,H=/[ \t\r\n]+$/,M=/[ \t\r\n]+/g,D=/^[ \t\r\n]+$/,y=new r({validate:T,self_closing_elements:v(c.getSelfClosingElements()),cdata:function(e){C.append(d("#cdata",4)).value=e},text:function(e,t){var n;L||(e=e.replace(M," "),C.lastChild&&R[C.lastChild.name]&&(e=e.replace(A,""))),0!==e.length&&(n=d("#text",3),n.raw=!!t,C.append(n).value=e)},comment:function(e){C.append(d("#comment",8)).value=e},pi:function(e,t){C.append(d(e,7)).value=t,g(C)},doctype:function(e){var t;t=C.append(d("#doctype",10)),t.value=e,g(C)},start:function(e,t,n){var r,i,o,a,s;if(o=T?c.getElementRule(e):{}){for(r=d(o.outputName||e,1),r.attributes=t,r.shortEnded=n,C.append(r),s=O[C.name],s&&O[r.name]&&!s[r.name]&&B.push(r),i=p.length;i--;)a=p[i].name,a in t.map&&(k=m[a],k?k.push(r):m[a]=[r]);R[e]&&g(r),n||(C=r),!L&&P[e]&&(L=!0)}},end:function(n){var r,i,o,a,s;if(i=T?c.getElementRule(n):{}){if(R[n]&&!L){if(r=C.firstChild,r&&3===r.type)if(o=r.value.replace(A,""),o.length>0)r.value=o,r=r.next;else for(a=r.next,r.remove(),r=a;r&&3===r.type;)o=r.value,a=r.next,(0===o.length||D.test(o))&&(r.remove(),r=a),r=a;if(r=C.lastChild,r&&3===r.type)if(o=r.value.replace(H,""),o.length>0)r.value=o,r=r.prev;else for(a=r.prev,r.remove(),r=a;r&&3===r.type;)o=r.value,a=r.prev,(0===o.length||D.test(o))&&(r.remove(),r=a),r=a}if(L&&P[n]&&(L=!1),(i.removeEmpty||i.paddEmpty)&&C.isEmpty(I))if(i.paddEmpty)C.empty().append(new e("#text","3")).value="\u00a0";else if(!C.attributes.map.name&&!C.attributes.map.id)return s=C.parent,C.empty().remove(),C=s,t;C=C.parent}}},c),b=C=new e(a.context||i.root_name,11),y.parse(n),T&&B.length&&(a.context?a.invalid=!0:u(B)),F&&("body"==b.name||a.isRootContent)&&s(),!a.invalid){for(S in h){for(k=f[S],x=h[S],N=x.length;N--;)x[N].parent||x.splice(N,1);for(w=0,_=k.length;_>w;w++)k[w](x,S,a)}for(w=0,_=p.length;_>w;w++)if(k=p[w],k.name in m){for(x=m[k.name],N=x.length;N--;)x[N].parent||x.splice(N,1);for(N=0,E=k.callbacks.length;E>N;N++)k.callbacks[N](x,k.name,a)}}return b},i.remove_trailing_brs&&d.addNodeFilter("br",function(t){var n,r=t.length,i,o=l({},c.getBlockElements()),a=c.getNonEmptyElements(),s,u,d,f,p,h;for(o.body=1,n=0;r>n;n++)if(i=t[n],s=i.parent,o[i.parent.name]&&i===s.lastChild){for(d=i.prev;d;){if(f=d.name,"span"!==f||"bookmark"!==d.attr("data-mce-type")){if("br"!==f)break;if("br"===f){i=null;break}}d=d.prev}i&&(i.remove(),s.isEmpty(a)&&(p=c.getElementRule(s.name),p&&(p.removeEmpty?s.remove():p.paddEmpty&&(s.empty().append(new e("#text",3)).value="\u00a0"))))}else{for(u=i;s.firstChild===u&&s.lastChild===u&&(u=s,!o[s.name]);)s=s.parent;u===s&&(h=new e("#text",3),h.value="\u00a0",i.replace(h))}}),i.allow_html_in_named_anchor||d.addAttributeFilter("id,name",function(e){for(var t=e.length,n,r,i,o;t--;)if(o=e[t],"a"===o.name&&o.firstChild&&!o.attr("href")){i=o.parent,n=o.lastChild;do r=n.prev,i.insert(n,o),n=r;while(n)}})}}),r(_,[h,f],function(e,t){var n=t.makeMap;return function(t){var r=[],i,o,a,s,l;return t=t||{},i=t.indent,o=n(t.indent_before||""),a=n(t.indent_after||""),s=e.getEncodeFunc(t.entity_encoding||"raw",t.entities),l="html"==t.element_format,{start:function(e,t,n){var c,u,d,f;if(i&&o[e]&&r.length>0&&(f=r[r.length-1],f.length>0&&"\n"!==f&&r.push("\n")),r.push("<",e),t)for(c=0,u=t.length;u>c;c++)d=t[c],r.push(" ",d.name,'="',s(d.value,!0),'"');r[r.length]=!n||l?">":" />",n&&i&&a[e]&&r.length>0&&(f=r[r.length-1],f.length>0&&"\n"!==f&&r.push("\n"))},end:function(e){var t;r.push("</",e,">"),i&&a[e]&&r.length>0&&(t=r[r.length-1],t.length>0&&"\n"!==t&&r.push("\n"))},text:function(e,t){e.length>0&&(r[r.length]=t?e:s(e))},cdata:function(e){r.push("<![CDATA[",e,"]]>")},comment:function(e){r.push("<!--",e,"-->")},pi:function(e,t){t?r.push("<?",e," ",t,"?>"):r.push("<?",e,"?>"),i&&r.push("\n")},doctype:function(e){r.push("<!DOCTYPE",e,">",i?"\n":"")},reset:function(){r.length=0},getContent:function(){return r.join("").replace(/\n$/,"")}}}}),r(N,[_,C],function(e,t){return function(n,r){var i=this,o=new e(n);n=n||{},n.validate="validate"in n?n.validate:!0,i.schema=r=r||new t,i.writer=o,i.serialize=function(e){function t(e){var n=i[e.type],s,l,c,u,d,f,p,h,m;if(n)n(e);else{if(s=e.name,l=e.shortEnded,c=e.attributes,a&&c&&c.length>1){for(f=[],f.map={},m=r.getElementRule(e.name),p=0,h=m.attributesOrder.length;h>p;p++)u=m.attributesOrder[p],u in c.map&&(d=c.map[u],f.map[u]=d,f.push({name:u,value:d}));for(p=0,h=c.length;h>p;p++)u=c[p].name,u in f.map||(d=c.map[u],f.map[u]=d,f.push({name:u,value:d}));c=f}if(o.start(e.name,c,l),!l){if(e=e.firstChild)do t(e);while(e=e.next);o.end(s)}}}var i,a;return a=n.validate,i={3:function(e){o.text(e.value,e.raw)},8:function(e){o.comment(e.value)},7:function(e){o.pi(e.name,e.value)},10:function(e){o.doctype(e.value)},4:function(e){o.cdata(e.value)},11:function(e){if(e=e.firstChild)do t(e);while(e=e.next)}},o.reset(),1!=e.type||n.inner?i[11](e):t(e),o.getContent()}}}),r(E,[g,w,h,N,b,C,m,f],function(e,t,n,r,i,o,a,s){var l=s.each,c=s.trim,u=e.DOM;return function(e,i){var s,d,f;return i&&(s=i.dom,d=i.schema),s=s||u,d=d||new o(e),e.entity_encoding=e.entity_encoding||"named",e.remove_trailing_brs="remove_trailing_brs"in e?e.remove_trailing_brs:!0,f=new t(e,d),f.addAttributeFilter("src,href,style",function(t,n){for(var r=t.length,i,o,a="data-mce-"+n,l=e.url_converter,c=e.url_converter_scope,u;r--;)i=t[r],o=i.attributes.map[a],o!==u?(i.attr(n,o.length>0?o:null),i.attr(a,null)):(o=i.attributes.map[n],"style"===n?o=s.serializeStyle(s.parseStyle(o),i.name):l&&(o=l.call(c,o,n,i.name)),i.attr(n,o.length>0?o:null))}),f.addAttributeFilter("class",function(e){for(var t=e.length,n,r;t--;)n=e[t],r=n.attr("class").replace(/(?:^|\s)mce-item-\w+(?!\S)/g,""),n.attr("class",r.length>0?r:null)}),f.addAttributeFilter("data-mce-type",function(e,t,n){for(var r=e.length,i;r--;)i=e[r],"bookmark"!==i.attributes.map["data-mce-type"]||n.cleanup||i.remove()}),f.addAttributeFilter("data-mce-expando",function(e,t){for(var n=e.length;n--;)e[n].attr(t,null)}),f.addNodeFilter("noscript",function(e){for(var t=e.length,r;t--;)r=e[t].firstChild,r&&(r.value=n.decode(r.value))}),f.addNodeFilter("script,style",function(e,t){function n(e){return e.replace(/(<!--\[CDATA\[|\]\]-->)/g,"\n").replace(/^[\r\n]*|[\r\n]*$/g,"").replace(/^\s*((<!--)?(\s*\/\/)?\s*<!\[CDATA\[|(<!--\s*)?\/\*\s*<!\[CDATA\[\s*\*\/|(\/\/)?\s*<!--|\/\*\s*<!--\s*\*\/)\s*[\r\n]*/gi,"").replace(/\s*(\/\*\s*\]\]>\s*\*\/(-->)?|\s*\/\/\s*\]\]>(-->)?|\/\/\s*(-->)?|\]\]>|\/\*\s*-->\s*\*\/|\s*-->\s*)\s*$/g,"")}for(var r=e.length,i,o;r--;)i=e[r],o=i.firstChild?i.firstChild.value:"","script"===t?(i.attr("type",(i.attr("type")||"text/javascript").replace(/^mce\-/,"")),o.length>0&&(i.firstChild.value="// <![CDATA[\n"+n(o)+"\n// ]]>")):o.length>0&&(i.firstChild.value="<!--\n"+n(o)+"\n-->")}),f.addNodeFilter("#comment",function(e){for(var t=e.length,n;t--;)n=e[t],0===n.value.indexOf("[CDATA[")?(n.name="#cdata",n.type=4,n.value=n.value.replace(/^\[CDATA\[|\]\]$/g,"")):0===n.value.indexOf("mce:protected ")&&(n.name="#text",n.type=3,n.raw=!0,n.value=unescape(n.value).substr(14))}),f.addNodeFilter("xml:namespace,input",function(e,t){for(var n=e.length,r;n--;)r=e[n],7===r.type?r.remove():1===r.type&&("input"!==t||"type"in r.attributes.map||r.attr("type","text"))}),e.fix_list_elements&&f.addNodeFilter("ul,ol",function(e){for(var t=e.length,n,r;t--;)n=e[t],r=n.parent,("ul"===r.name||"ol"===r.name)&&n.prev&&"li"===n.prev.name&&n.prev.append(n)}),f.addAttributeFilter("data-mce-src,data-mce-href,data-mce-style,data-mce-selected",function(e,t){for(var n=e.length;n--;)e[n].attr(t,null)}),{schema:d,addNodeFilter:f.addNodeFilter,addAttributeFilter:f.addAttributeFilter,serialize:function(t,n){var i=this,o,u,p,h,m;return a.ie&&s.select("script,style,select,map").length>0?(m=t.innerHTML,t=t.cloneNode(!1),s.setHTML(t,m)):t=t.cloneNode(!0),o=t.ownerDocument.implementation,o.createHTMLDocument&&(u=o.createHTMLDocument(""),l("BODY"==t.nodeName?t.childNodes:[t],function(e){u.body.appendChild(u.importNode(e,!0))}),t="BODY"!=t.nodeName?u.body.firstChild:u.body,p=s.doc,s.doc=u),n=n||{},n.format=n.format||"html",n.selection&&(n.forced_root_block=""),n.no_events||(n.node=t,i.onPreProcess(n)),h=new r(e,d),n.content=h.serialize(f.parse(c(n.getInner?t.innerHTML:s.getOuterHTML(t)),n)),n.cleanup||(n.content=n.content.replace(/\uFEFF/g,"")),n.no_events||i.onPostProcess(n),p&&(s.doc=p),n.node=null,n.content},addRules:function(e){d.addValidElements(e)},setRules:function(e){d.setValidElements(e)},onPreProcess:function(e){i&&i.fire("PreProcess",e)},onPostProcess:function(e){i&&i.fire("PostProcess",e)}}}}),r(k,[],function(){function e(e){function n(t,n){var r,i=0,o,a,s,l,c,u,d=-1,f;if(r=t.duplicate(),r.collapse(n),f=r.parentElement(),f.ownerDocument===e.dom.doc){for(;"false"===f.contentEditable;)f=f.parentNode;if(!f.hasChildNodes())return{node:f,inside:1};for(s=f.children,o=s.length-1;o>=i;)if(u=Math.floor((i+o)/2),l=s[u],r.moveToElementText(l),d=r.compareEndPoints(n?"StartToStart":"EndToEnd",t),d>0)o=u-1;else{if(!(0>d))return{node:l};i=u+1}if(0>d)for(l?r.collapse(!1):(r.moveToElementText(f),r.collapse(!0),l=f,a=!0),c=0;0!==r.compareEndPoints(n?"StartToStart":"StartToEnd",t)&&0!==r.move("character",1)&&f==r.parentElement();)c++;else for(r.collapse(!0),c=0;0!==r.compareEndPoints(n?"StartToStart":"StartToEnd",t)&&0!==r.move("character",-1)&&f==r.parentElement();)c++;return{node:l,position:d,offset:c,inside:a}}}function r(){function r(e){var r=n(a,e),i,o,l=0,c,u,d;if(i=r.node,o=r.offset,r.inside&&!i.hasChildNodes())return s[e?"setStart":"setEnd"](i,0),t;if(o===u)return s[e?"setStartBefore":"setEndAfter"](i),t;if(0>r.position){if(c=r.inside?i.firstChild:i.nextSibling,!c)return s[e?"setStartAfter":"setEndAfter"](i),t;if(!o)return 3==c.nodeType?s[e?"setStart":"setEnd"](c,0):s[e?"setStartBefore":"setEndBefore"](c),t;for(;c;){if(d=c.nodeValue,l+=d.length,l>=o){i=c,l-=o,l=d.length-l;break}c=c.nextSibling}}else{if(c=i.previousSibling,!c)return s[e?"setStartBefore":"setEndBefore"](i);if(!o)return 3==i.nodeType?s[e?"setStart":"setEnd"](c,i.nodeValue.length):s[e?"setStartAfter":"setEndAfter"](c),t;for(;c;){if(l+=c.nodeValue.length,l>=o){i=c,l-=o;break}c=c.previousSibling}}s[e?"setStart":"setEnd"](i,l)}var a=e.getRng(),s=o.createRng(),l,c,u,d,f;if(l=a.item?a.item(0):a.parentElement(),l.ownerDocument!=o.doc)return s;if(c=e.isCollapsed(),a.item)return s.setStart(l.parentNode,o.nodeIndex(l)),s.setEnd(s.startContainer,s.startOffset+1),s;try{r(!0),c||r()}catch(p){if(-2147024809!=p.number)throw p;f=i.getBookmark(2),u=a.duplicate(),u.collapse(!0),l=u.parentElement(),c||(u=a.duplicate(),u.collapse(!1),d=u.parentElement(),d.innerHTML=d.innerHTML),l.innerHTML=l.innerHTML,i.moveToBookmark(f),a=e.getRng(),r(!0),c||r()}return s}var i=this,o=e.dom,a=!1;this.getBookmark=function(r){function i(e){var t,n,r,i,a=[];for(t=e.parentNode,n=o.getRoot().parentNode;t!=n&&9!==t.nodeType;){for(r=t.children,i=r.length;i--;)if(e===r[i]){a.push(i);break}e=t,t=t.parentNode}return a}function a(e){var r;return r=n(s,e),r?{position:r.position,offset:r.offset,indexes:i(r.node),inside:r.inside}:t}var s=e.getRng(),l={};return 2===r&&(s.item?l.start={ctrl:!0,indexes:i(s.item(0))}:(l.start=a(!0),e.isCollapsed()||(l.end=a()))),l},this.moveToBookmark=function(e){function t(e){var t,n,r,i;for(t=o.getRoot(),n=e.length-1;n>=0;n--)i=t.children,r=e[n],i.length-1>=r&&(t=i[r]);return t}function n(n){var o=e[n?"start":"end"],a,s,l,c;o&&(a=o.position>0,s=i.createTextRange(),s.moveToElementText(t(o.indexes)),c=o.offset,c!==l?(s.collapse(o.inside||a),s.moveStart("character",a?-c:c)):s.collapse(n),r.setEndPoint(n?"StartToStart":"EndToStart",s),n&&r.collapse(!0))}var r,i=o.doc.body;e.start&&(e.start.ctrl?(r=i.createControlRange(),r.addElement(t(e.start.indexes)),r.select()):(r=i.createTextRange(),n(!0),n(),r.select()))},this.addRange=function(n){function r(e){var t,n,r,s,f;r=o.create("a"),t=e?l:u,n=e?c:d,s=i.duplicate(),(t==p||t==p.documentElement)&&(t=h,n=0),3==t.nodeType?(t.parentNode.insertBefore(r,t),s.moveToElementText(r),s.moveStart("character",n),o.remove(r),i.setEndPoint(e?"StartToStart":"EndToEnd",s)):(f=t.childNodes,f.length?(n>=f.length?o.insertAfter(r,f[f.length-1]):t.insertBefore(r,f[n]),s.moveToElementText(r)):t.canHaveHTML&&(t.innerHTML="<span>&#xFEFF;</span>",r=t.firstChild,s.moveToElementText(r),s.collapse(a)),i.setEndPoint(e?"StartToStart":"EndToEnd",s),o.remove(r))}var i,s,l,c,u,d,f,p=e.dom.doc,h=p.body,m,g;if(l=n.startContainer,c=n.startOffset,u=n.endContainer,d=n.endOffset,i=h.createTextRange(),l==u&&1==l.nodeType){if(c==d&&!l.hasChildNodes()){if(l.canHaveHTML)return f=l.previousSibling,f&&!f.hasChildNodes()&&o.isBlock(f)?f.innerHTML="&#xFEFF;":f=null,l.innerHTML="<span>&#xFEFF;</span><span>&#xFEFF;</span>",i.moveToElementText(l.lastChild),i.select(),o.doc.selection.clear(),l.innerHTML="",f&&(f.innerHTML=""),t;c=o.nodeIndex(l),l=l.parentNode}if(c==d-1)try{if(g=l.childNodes[c],s=h.createControlRange(),s.addElement(g),s.select(),m=e.getRng(),m.item&&g===m.item(0))return}catch(v){}}r(!0),r(),i.select()},this.getRangeAt=r}return e}),r(S,[m],function(e){return{BACKSPACE:8,DELETE:46,DOWN:40,ENTER:13,LEFT:37,RIGHT:39,SPACEBAR:32,TAB:9,UP:38,modifierPressed:function(e){return e.shiftKey||e.ctrlKey||e.altKey},metaKeyPressed:function(t){return e.mac?t.metaKey:t.ctrlKey&&!t.altKey}}}),r(T,[S,f,m],function(e,n,r){return function(i,o){function a(e){return o.settings.object_resizing===!1?!1:/TABLE|IMG|DIV/.test(e.nodeName)?"false"===e.getAttribute("data-mce-resize")?!1:!0:!1}function s(t){var n,r;n=t.screenX-E,r=t.screenY-k,H=n*N[2]+R,M=r*N[3]+A,H=5>H?5:H,M=5>M?5:M,(e.modifierPressed(t)||"IMG"==x.nodeName&&0!==N[2]*N[3])&&(H=Math.round(M/B),M=Math.round(H*B)),b.setStyles(w,{width:H,height:M}),0>N[2]&&H>=w.clientWidth&&b.setStyle(w,"left",S+(R-H)),0>N[3]&&M>=w.clientHeight&&b.setStyle(w,"top",T+(A-M)),L||(o.fire("ObjectResizeStart",{target:x,width:R,height:A}),L=!0)}function l(){function e(e,t){t&&(x.style[e]||!o.schema.isValid(x.nodeName.toLowerCase(),e)?b.setStyle(x,e,t):b.setAttrib(x,e,t))}L=!1,e("width",H),e("height",M),b.unbind(D,"mousemove",s),b.unbind(D,"mouseup",l),P!=D&&(b.unbind(P,"mousemove",s),b.unbind(P,"mouseup",l)),b.remove(w),O&&"TABLE"!=x.nodeName||c(x),o.fire("ObjectResized",{target:x,width:H,height:M}),o.nodeChanged()}function c(e,n,r){var i,c,d,f,p;i=b.getPos(e,o.getBody()),S=i.x,T=i.y,p=e.getBoundingClientRect(),c=p.width||p.right-p.left,d=p.height||p.bottom-p.top,x!=e&&(g(),x=e,H=M=0),f=o.fire("ObjectSelected",{target:e}),a(e)&&!f.isDefaultPrevented()?C(_,function(e,i){function a(t){L=!0,E=t.screenX,k=t.screenY,R=x.clientWidth,A=x.clientHeight,B=A/R,N=e,w=x.cloneNode(!0),b.addClass(w,"mce-clonedresizable"),w.contentEditable=!1,w.unSelectabe=!0,b.setStyles(w,{left:S,top:T,margin:0}),w.removeAttribute("data-mce-selected"),o.getBody().appendChild(w),b.bind(D,"mousemove",s),b.bind(D,"mouseup",l),P!=D&&(b.bind(P,"mousemove",s),b.bind(P,"mouseup",l))}var u,f;return n?(i==n&&a(r),t):(u=b.get("mceResizeHandle"+i),u?b.show(u):(f=o.getBody(),u=b.add(f,"div",{id:"mceResizeHandle"+i,"data-mce-bogus":!0,"class":"mce-resizehandle",contentEditable:!1,unSelectabe:!0,style:"cursor:"+i+"-resize; margin:0; padding:0"}),b.bind(u,"mousedown",function(e){e.preventDefault(),a(e)})),b.setStyles(u,{left:c*e[0]+S-u.offsetWidth/2,top:d*e[1]+T-u.offsetHeight/2}),t)}):u(),x.setAttribute("data-mce-selected","1")}function u(){var e,t;x&&x.removeAttribute("data-mce-selected");for(e in _)t=b.get("mceResizeHandle"+e),t&&(b.unbind(t),b.remove(t))}function d(e){function n(e,t){do if(e===t)return!0;while(e=e.parentNode)}var r;return C(b.select("img[data-mce-selected],hr[data-mce-selected]"),function(e){e.removeAttribute("data-mce-selected")}),r="mousedown"==e.type?e.target:i.getNode(),r=b.getParent(r,O?"table":"table,img,hr"),r&&n(i.getStart(),r)&&n(i.getEnd(),r)&&(!O||r!=i.getStart()&&"IMG"!==i.getStart().nodeName)?(c(r),t):(u(),t)}function f(e,t,n){e&&e.attachEvent&&e.attachEvent("on"+t,n)}function p(e,t,n){e&&e.detachEvent&&e.detachEvent("on"+t,n)}function h(e){var t=e.srcElement,n,r,i,a,s,l,u;n=t.getBoundingClientRect(),l=e.clientX-n.left,u=e.clientY-n.top;for(r in _)if(i=_[r],a=t.offsetWidth*i[0],s=t.offsetHeight*i[1],8>Math.abs(a-l)&&8>Math.abs(s-u)){N=i;break}L=!0,o.getDoc().selection.empty(),c(t,r,e)}function m(e){var n=e.srcElement;if(n!=x){if(g(),0===n.id.indexOf("mceResizeHandle"))return e.returnValue=!1,t;("IMG"==n.nodeName||"TABLE"==n.nodeName)&&(u(),x=n,f(n,"resizestart",h))}}function g(){p(x,"resizestart",h)}function v(e){var t;if(O){t=D.body.createControlRange();try{return t.addElement(e),t.select(),!0}catch(n){}}}function y(){x=w=null,O&&(g(),p(o.getBody(),"controlselect",m))}var b=o.dom,C=n.each,x,w,_,N,E,k,S,T,R,A,B,L,H,M,D=o.getDoc(),P=document,O=r.ie;_={n:[.5,0,0,-1],e:[1,.5,1,0],s:[.5,1,0,1],w:[0,.5,-1,0],nw:[0,0,-1,-1],ne:[1,0,1,-1],se:[1,1,1,1],sw:[0,1,-1,1]};var I=".mce-content-body";return o.contentStyles.push(I+" div.mce-resizehandle {"+"position: absolute;"+"border: 1px solid black;"+"background: #FFF;"+"width: 5px;"+"height: 5px;"+"z-index: 10000"+"}"+I+" .mce-resizehandle:hover {"+"background: #000"+"}"+I+" img[data-mce-selected], hr[data-mce-selected] {"+"outline: 1px solid black;"+"resize: none"+"}"+I+" .mce-clonedresizable {"+"position: absolute;"+(r.gecko?"":"outline: 1px dashed black;")+"opacity: .5;"+"filter: alpha(opacity=50);"+"z-index: 10000"+"}"),o.on("init",function(){if(O)o.on("ObjectResized",function(e){"TABLE"!=e.target.nodeName&&(u(),v(e.target))}),f(o.getBody(),"controlselect",m);else try{o.getDoc().execCommand("enableObjectResizing",!1,!1)}catch(e){}o.on("nodechange mousedown ResizeEditor",d),o.on("keydown keyup",function(e){x&&"TABLE"==x.nodeName&&d(e)})}),{controlSelect:v,destroy:y}}}),r(R,[d,k,T,m,f],function(e,n,r,i,o){function a(e,t,i,o){var a=this;a.dom=e,a.win=t,a.serializer=i,a.editor=o,a.controlSelection=new r(a,o),a.win.getSelection||(a.tridentSel=new n(a))}var s=o.each,l=o.grep,c=o.trim,u=i.ie,d=i.opera;return a.prototype={setCursorLocation:function(e,t){var n=this,r=n.dom.createRng();r.setStart(e,t),r.setEnd(e,t),n.setRng(r),n.collapse(!1)},getContent:function(e){var n=this,r=n.getRng(),i=n.dom.create("body"),o=n.getSel(),a,s,l;return e=e||{},a=s="",e.get=!0,e.format=e.format||"html",e.selection=!0,n.editor.fire("BeforeGetContent",e),"text"==e.format?n.isCollapsed()?"":r.text||(o.toString?""+o:""):(r.cloneContents?(l=r.cloneContents(),l&&i.appendChild(l)):r.item!==t||r.htmlText!==t?(i.innerHTML="<br>"+(r.item?r.item(0).outerHTML:r.htmlText),i.removeChild(i.firstChild)):i.innerHTML=""+r,/^\s/.test(i.innerHTML)&&(a=" "),/\s+$/.test(i.innerHTML)&&(s=" "),e.getInner=!0,e.content=n.isCollapsed()?"":a+n.serializer.serialize(i,e)+s,n.editor.fire("GetContent",e),e.content)},setContent:function(e,t){var n=this,r=n.getRng(),i,o=n.win.document,a,s;if(t=t||{format:"html"},t.set=!0,t.selection=!0,e=t.content=e,t.no_events||n.editor.fire("BeforeSetContent",t),e=t.content,r.insertNode){e+='<span id="__caret">_</span>',r.startContainer==o&&r.endContainer==o?o.body.innerHTML=e:(r.deleteContents(),0===o.body.childNodes.length?o.body.innerHTML=e:r.createContextualFragment?r.insertNode(r.createContextualFragment(e)):(a=o.createDocumentFragment(),s=o.createElement("div"),a.appendChild(s),s.outerHTML=e,r.insertNode(a))),i=n.dom.get("__caret"),r=o.createRange(),r.setStartBefore(i),r.setEndBefore(i),n.setRng(r),n.dom.remove("__caret");try{n.setRng(r)}catch(l){}}else r.item&&(o.execCommand("Delete",!1,null),r=n.getRng()),/^\s+/.test(e)?(r.pasteHTML('<span id="__mce_tmp">_</span>'+e),n.dom.remove("__mce_tmp")):r.pasteHTML(e);t.no_events||n.editor.fire("SetContent",t)},getStart:function(){var e=this,t=e.getRng(),n,r,i,o;if(t.duplicate||t.item){if(t.item)return t.item(0);for(i=t.duplicate(),i.collapse(1),n=i.parentElement(),n.ownerDocument!==e.dom.doc&&(n=e.dom.getRoot()),r=o=t.parentElement();o=o.parentNode;)if(o==n){n=r;break}return n}return n=t.startContainer,1==n.nodeType&&n.hasChildNodes()&&(n=n.childNodes[Math.min(n.childNodes.length-1,t.startOffset)]),n&&3==n.nodeType?n.parentNode:n},getEnd:function(){var e=this,t=e.getRng(),n,r;return t.duplicate||t.item?t.item?t.item(0):(t=t.duplicate(),t.collapse(0),n=t.parentElement(),n.ownerDocument!==e.dom.doc&&(n=e.dom.getRoot()),n&&"BODY"==n.nodeName?n.lastChild||n:n):(n=t.endContainer,r=t.endOffset,1==n.nodeType&&n.hasChildNodes()&&(n=n.childNodes[r>0?r-1:r]),n&&3==n.nodeType?n.parentNode:n)},getBookmark:function(e,t){function n(e,t){var n=0;return s(a.select(e),function(e,r){e==t&&(n=r)}),n}function r(e){function t(t){var n,r,i,o=t?"start":"end";n=e[o+"Container"],r=e[o+"Offset"],1==n.nodeType&&"TR"==n.nodeName&&(i=n.childNodes,n=i[Math.min(t?r:r-1,i.length-1)],n&&(r=t?0:n.childNodes.length,e["set"+(t?"Start":"End")](n,r)))}return t(!0),t(),e}function i(){function e(e,n){var i=e[n?"startContainer":"endContainer"],a=e[n?"startOffset":"endOffset"],s=[],l,c,u=0;if(3==i.nodeType){if(t)for(l=i.previousSibling;l&&3==l.nodeType;l=l.previousSibling)a+=l.nodeValue.length;s.push(a)}else c=i.childNodes,a>=c.length&&c.length&&(u=1,a=Math.max(0,c.length-1)),s.push(o.dom.nodeIndex(c[a],t)+u);for(;i&&i!=r;i=i.parentNode)s.push(o.dom.nodeIndex(i,t));return s}var n=o.getRng(!0),r=a.getRoot(),i={};return i.start=e(n,!0),o.isCollapsed()||(i.end=e(n)),i}var o=this,a=o.dom,l,c,u,d,f,p,h="&#xFEFF;",m;if(2==e)return p=o.getNode(),f=p.nodeName,"IMG"==f?{name:f,index:n(f,p)}:o.tridentSel?o.tridentSel.getBookmark(e):i();if(e)return{rng:o.getRng()};if(l=o.getRng(),u=a.uniqueId(),d=o.isCollapsed(),m="overflow:hidden;line-height:0px",l.duplicate||l.item){if(l.item)return p=l.item(0),f=p.nodeName,{name:f,index:n(f,p)};c=l.duplicate();try{l.collapse(),l.pasteHTML('<span data-mce-type="bookmark" id="'+u+'_start" style="'+m+'">'+h+"</span>"),d||(c.collapse(!1),l.moveToElementText(c.parentElement()),0===l.compareEndPoints("StartToEnd",c)&&c.move("character",-1),c.pasteHTML('<span data-mce-type="bookmark" id="'+u+'_end" style="'+m+'">'+h+"</span>"))
5}catch(g){return null}}else{if(p=o.getNode(),f=p.nodeName,"IMG"==f)return{name:f,index:n(f,p)};c=r(l.cloneRange()),d||(c.collapse(!1),c.insertNode(a.create("span",{"data-mce-type":"bookmark",id:u+"_end",style:m},h))),l=r(l),l.collapse(!0),l.insertNode(a.create("span",{"data-mce-type":"bookmark",id:u+"_start",style:m},h))}return o.moveToBookmark({id:u,keep:1}),{id:u}},moveToBookmark:function(e){function t(t){var n=e[t?"start":"end"],r,i,o,s;if(n){for(o=n[0],i=c,r=n.length-1;r>=1;r--){if(s=i.childNodes,n[r]>s.length-1)return;i=s[n[r]]}3===i.nodeType&&(o=Math.min(n[0],i.nodeValue.length)),1===i.nodeType&&(o=Math.min(n[0],i.childNodes.length)),t?a.setStart(i,o):a.setEnd(i,o)}return!0}function n(t){var n=o.get(e.id+"_"+t),r,i,a,c,u=e.keep;if(n&&(r=n.parentNode,"start"==t?(u?(r=n.firstChild,i=1):i=o.nodeIndex(n),f=p=r,h=m=i):(u?(r=n.firstChild,i=1):i=o.nodeIndex(n),p=r,m=i),!u)){for(c=n.previousSibling,a=n.nextSibling,s(l(n.childNodes),function(e){3==e.nodeType&&(e.nodeValue=e.nodeValue.replace(/\uFEFF/g,""))});n=o.get(e.id+"_"+t);)o.remove(n,1);c&&a&&c.nodeType==a.nodeType&&3==c.nodeType&&!d&&(i=c.nodeValue.length,c.appendData(a.nodeValue),o.remove(a),"start"==t?(f=p=c,h=m=i):(p=c,m=i))}}function r(e){return!o.isBlock(e)||e.innerHTML||u||(e.innerHTML='<br data-mce-bogus="1" />'),e}var i=this,o=i.dom,a,c,f,p,h,m;if(e)if(e.start){if(a=o.createRng(),c=o.getRoot(),i.tridentSel)return i.tridentSel.moveToBookmark(e);t(!0)&&t()&&i.setRng(a)}else e.id?(n("start"),n("end"),f&&(a=o.createRng(),a.setStart(r(f),h),a.setEnd(r(p),m),i.setRng(a))):e.name?i.select(o.select(e.name)[e.index]):e.rng&&i.setRng(e.rng)},select:function(n,r){function i(n,r){var i=new e(n,n);do{if(3==n.nodeType&&0!==c(n.nodeValue).length)return r?s.setStart(n,0):s.setEnd(n,n.nodeValue.length),t;if("BR"==n.nodeName)return r?s.setStartBefore(n):s.setEndBefore(n),t}while(n=r?i.next():i.prev())}var o=this,a=o.dom,s=a.createRng(),l;if(n){if(!r&&o.controlSelection.controlSelect(n))return;l=a.nodeIndex(n),s.setStart(n.parentNode,l),s.setEnd(n.parentNode,l+1),r&&(i(n,1),i(n)),o.setRng(s)}return n},isCollapsed:function(){var e=this,t=e.getRng(),n=e.getSel();return!t||t.item?!1:t.compareEndPoints?0===t.compareEndPoints("StartToEnd",t):!n||t.collapsed},collapse:function(e){var t=this,n=t.getRng(),r;n.item&&(r=n.item(0),n=t.win.document.body.createTextRange(),n.moveToElementText(r)),n.collapse(!!e),t.setRng(n)},getSel:function(){var e=this.win;return e.getSelection?e.getSelection():e.document.selection},getRng:function(e){var t=this,n,r,i,o=t.win.document;if(e&&t.tridentSel)return t.tridentSel.getRangeAt(0);try{(n=t.getSel())&&(r=n.rangeCount>0?n.getRangeAt(0):n.createRange?n.createRange():o.createRange())}catch(a){}return u&&r&&r.setStart&&o.selection.createRange().item&&(i=o.selection.createRange().item(0),r=o.createRange(),r.setStartBefore(i),r.setEndAfter(i)),r||(r=o.createRange?o.createRange():o.body.createTextRange()),r.setStart&&9===r.startContainer.nodeType&&r.collapsed&&(i=t.dom.getRoot(),r.setStart(i,0),r.setEnd(i,0)),t.selectedRange&&t.explicitRange&&(0===r.compareBoundaryPoints(r.START_TO_START,t.selectedRange)&&0===r.compareBoundaryPoints(r.END_TO_END,t.selectedRange)?r=t.explicitRange:(t.selectedRange=null,t.explicitRange=null)),r},setRng:function(e,n){var r=this,i;if(e.select)try{e.select()}catch(o){}else if(r.tridentSel){if(e.cloneRange)try{return r.tridentSel.addRange(e),t}catch(o){}}else if(i=r.getSel()){r.explicitRange=e;try{i.removeAllRanges()}catch(o){}i.addRange(e),n===!1&&i.extend&&(i.collapse(e.endContainer,e.endOffset),i.extend(e.startContainer,e.startOffset)),r.selectedRange=i.rangeCount>0?i.getRangeAt(0):null}},setNode:function(e){var t=this;return t.setContent(t.dom.getOuterHTML(e)),e},getNode:function(){function e(e,t){for(var n=e;e&&3===e.nodeType&&0===e.length;)e=t?e.nextSibling:e.previousSibling;return e||n}var t=this,n=t.getRng(),r,i=n.startContainer,o=n.endContainer,a=n.startOffset,s=n.endOffset;return n?n.setStart?(r=n.commonAncestorContainer,!n.collapsed&&(i==o&&2>s-a&&i.hasChildNodes()&&(r=i.childNodes[a]),3===i.nodeType&&3===o.nodeType&&(i=i.length===a?e(i.nextSibling,!0):i.parentNode,o=0===s?e(o.previousSibling,!1):o.parentNode,i&&i===o))?i:r&&3==r.nodeType?r.parentNode:r):n.item?n.item(0):n.parentElement():t.dom.getRoot()},getSelectedBlocks:function(t,n){var r=this,i=r.dom,o,a=[];if(t=i.getParent(t||r.getStart(),i.isBlock),n=i.getParent(n||r.getEnd(),i.isBlock),t&&a.push(t),t&&n&&t!=n){o=t;for(var s=new e(t,i.getRoot());(o=s.next())&&o!=n;)i.isBlock(o)&&a.push(o)}return n&&t!=n&&a.push(n),a},isForward:function(){var e=this.dom,t=this.getSel(),n,r;return t&&t.anchorNode&&t.focusNode?(n=e.createRng(),n.setStart(t.anchorNode,t.anchorOffset),n.collapse(!0),r=e.createRng(),r.setStart(t.focusNode,t.focusOffset),r.collapse(!0),0>=n.compareBoundaryPoints(n.START_TO_START,r)):!0},normalize:function(){function n(n){function s(t,n){for(var r=new e(t,p.getParent(t.parentNode,p.isBlock)||h);t=r[n?"prev":"next"]();)if("BR"===t.nodeName)return!0}function l(e,t){return e.previousSibling&&e.previousSibling.nodeName==t}function c(n,r){var i,s;for(r=r||u,i=new e(r,p.getParent(r.parentNode,p.isBlock)||h);m=i[n?"prev":"next"]();){if(3===m.nodeType&&m.nodeValue.length>0)return u=m,d=n?m.nodeValue.length:0,o=!0,t;if(p.isBlock(m)||g[m.nodeName.toLowerCase()])return;s=m}a&&s&&(u=s,o=!0,d=0)}var u,d,f,p=r.dom,h=p.getRoot(),m,g,v;if(u=i[(n?"start":"end")+"Container"],d=i[(n?"start":"end")+"Offset"],g=p.schema.getNonEmptyElements(),9===u.nodeType&&(u=p.getRoot(),d=0),u===h){if(n&&(m=u.childNodes[d>0?d-1:0],m&&(v=m.nodeName.toLowerCase(),g[m.nodeName]||"TABLE"==m.nodeName)))return;if(u.hasChildNodes()&&(d=Math.min(!n&&d>0?d-1:d,u.childNodes.length-1),u=u.childNodes[d],d=0,u.hasChildNodes()&&!/TABLE/.test(u.nodeName))){m=u,f=new e(u,h);do{if(3===m.nodeType&&m.nodeValue.length>0){d=n?0:m.nodeValue.length,u=m,o=!0;break}if(g[m.nodeName.toLowerCase()]){d=p.nodeIndex(m),u=m.parentNode,"IMG"!=m.nodeName||n||d++,o=!0;break}}while(m=n?f.next():f.prev())}}a&&(3===u.nodeType&&0===d&&c(!0),1===u.nodeType&&(m=u.childNodes[d],!m||"BR"!==m.nodeName||l(m,"A")||s(m)||s(m,!0)||c(!0,u.childNodes[d]))),n&&!a&&3===u.nodeType&&d===u.nodeValue.length&&c(!1),o&&i["set"+(n?"Start":"End")](u,d)}var r=this,i,o,a;u||(i=r.getRng(),a=i.collapsed,n(!0),a||n(),o&&(a&&i.collapse(!0),r.setRng(i,r.isForward())))},selectorChanged:function(e,n){var r=this,i;return r.selectorChangedData||(r.selectorChangedData={},i={},r.editor.on("NodeChange",function(e){var n=e.element,o=r.dom,a=o.getParents(n,null,o.getRoot()),l={};s(r.selectorChangedData,function(e,n){s(a,function(r){return o.is(r,n)?(i[n]||(s(e,function(e){e(!0,{node:r,selector:n,parents:a})}),i[n]=e),l[n]=e,!1):t})}),s(i,function(e,t){l[t]||(delete i[t],s(e,function(e){e(!1,{node:n,selector:t,parents:a})}))})})),r.selectorChangedData[e]||(r.selectorChangedData[e]=[]),r.selectorChangedData[e].push(n),r},scrollIntoView:function(e){var t,n,r=this,i=r.dom;n=i.getViewPort(r.editor.getWin()),t=i.getPos(e).y,(n.y>t||t+25>n.y+n.h)&&r.editor.getWin().scrollTo(0,n.y>t?t:t-n.h+25)},destroy:function(){this.win=null,this.controlSelection.destroy()}},a}),r(A,[f],function(e){function n(e){this.walk=function(n,i){function o(e){var t;return t=e[0],3===t.nodeType&&t===c&&u>=t.nodeValue.length&&e.splice(0,1),t=e[e.length-1],0===f&&e.length>0&&t===d&&3===t.nodeType&&e.splice(e.length-1,1),e}function a(e,t,n){for(var r=[];e&&e!=n;e=e[t])r.push(e);return r}function s(e,t){do{if(e.parentNode==t)return e;e=e.parentNode}while(e)}function l(e,t,n){var r=n?"nextSibling":"previousSibling";for(g=e,v=g.parentNode;g&&g!=t;g=v)v=g.parentNode,y=a(g==e?g:g[r],r),y.length&&(n||y.reverse(),i(o(y)))}var c=n.startContainer,u=n.startOffset,d=n.endContainer,f=n.endOffset,p,h,m,g,v,y,b;if(b=e.select("td.mce-item-selected,th.mce-item-selected"),b.length>0)return r(b,function(e){i([e])}),t;if(1==c.nodeType&&c.hasChildNodes()&&(c=c.childNodes[u]),1==d.nodeType&&d.hasChildNodes()&&(d=d.childNodes[Math.min(f-1,d.childNodes.length-1)]),c==d)return i(o([c]));for(p=e.findCommonAncestor(c,d),g=c;g;g=g.parentNode){if(g===d)return l(c,p,!0);if(g===p)break}for(g=d;g;g=g.parentNode){if(g===c)return l(d,p);if(g===p)break}h=s(c,p)||c,m=s(d,p)||d,l(c,h,!0),y=a(h==c?h:h.nextSibling,"nextSibling",m==d?m.nextSibling:m),y.length&&i(o(y)),l(d,m)},this.split=function(e){function t(e,t){return e.splitText(t)}var n=e.startContainer,r=e.startOffset,i=e.endContainer,o=e.endOffset;return n==i&&3==n.nodeType?r>0&&n.nodeValue.length>r&&(i=t(n,r),n=i.previousSibling,o>r?(o-=r,n=i=t(i,o).previousSibling,o=i.nodeValue.length,r=0):o=0):(3==n.nodeType&&r>0&&n.nodeValue.length>r&&(n=t(n,r),r=0),3==i.nodeType&&o>0&&i.nodeValue.length>o&&(i=t(i,o).previousSibling,o=i.nodeValue.length)),{startContainer:n,startOffset:r,endContainer:i,endOffset:o}}}var r=e.each;return n.compareRanges=function(e,t){if(e&&t){if(!e.item&&!e.duplicate)return e.startContainer==t.startContainer&&e.startOffset==t.startOffset;if(e.item&&t.item&&e.item(0)===t.item(0))return!0;if(e.isEqual&&t.isEqual&&t.isEqual(e))return!0}return!1},n}),r(B,[d,A,f],function(e,n,r){return function(i){function o(e){return e.nodeType&&(e=e.nodeName),!!i.schema.getTextBlockElements()[e.toLowerCase()]}function a(e,t){return I.getParents(e,t,I.getRoot())}function s(e){return 1===e.nodeType&&"_mce_caret"===e.id}function l(){d({alignleft:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"left"},defaultBlock:"div"},{selector:"img,table",collapsed:!1,styles:{"float":"left"}}],aligncenter:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"center"},defaultBlock:"div"},{selector:"img",collapsed:!1,styles:{display:"block",marginLeft:"auto",marginRight:"auto"}},{selector:"table",collapsed:!1,styles:{marginLeft:"auto",marginRight:"auto"}}],alignright:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"right"},defaultBlock:"div"},{selector:"img,table",collapsed:!1,styles:{"float":"right"}}],alignjustify:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"justify"},defaultBlock:"div"}],bold:[{inline:"strong",remove:"all"},{inline:"span",styles:{fontWeight:"bold"}},{inline:"b",remove:"all"}],italic:[{inline:"em",remove:"all"},{inline:"span",styles:{fontStyle:"italic"}},{inline:"i",remove:"all"}],underline:[{inline:"span",styles:{textDecoration:"underline"},exact:!0},{inline:"u",remove:"all"}],strikethrough:[{inline:"span",styles:{textDecoration:"line-through"},exact:!0},{inline:"strike",remove:"all"}],forecolor:{inline:"span",styles:{color:"%value"},wrap_links:!1},hilitecolor:{inline:"span",styles:{backgroundColor:"%value"},wrap_links:!1},fontname:{inline:"span",styles:{fontFamily:"%value"}},fontsize:{inline:"span",styles:{fontSize:"%value"}},fontsize_class:{inline:"span",attributes:{"class":"%value"}},blockquote:{block:"blockquote",wrapper:1,remove:"all"},subscript:{inline:"sub"},superscript:{inline:"sup"},code:{inline:"code"},link:{inline:"a",selector:"a",remove:"all",split:!0,deep:!0,onmatch:function(){return!0},onformat:function(e,t,n){et(n,function(t,n){I.setAttrib(e,n,t)})}},removeformat:[{selector:"b,strong,em,i,font,u,strike",remove:"all",split:!0,expand:!1,block_expand:!0,deep:!0},{selector:"span",attributes:["style","class"],remove:"empty",split:!0,expand:!1,deep:!0},{selector:"*",attributes:["style","class"],split:!1,expand:!1,deep:!0}]}),et("p h1 h2 h3 h4 h5 h6 div address pre div dt dd samp".split(/\s/),function(e){d(e,{block:e,remove:"all"})}),d(i.settings.formats)}function c(){i.addShortcut("ctrl+b","bold_desc","Bold"),i.addShortcut("ctrl+i","italic_desc","Italic"),i.addShortcut("ctrl+u","underline_desc","Underline");for(var e=1;6>=e;e++)i.addShortcut("ctrl+"+e,"",["FormatBlock",!1,"h"+e]);i.addShortcut("ctrl+7","",["FormatBlock",!1,"p"]),i.addShortcut("ctrl+8","",["FormatBlock",!1,"div"]),i.addShortcut("ctrl+9","",["FormatBlock",!1,"address"])}function u(e){return e?O[e]:O}function d(e,t){e&&("string"!=typeof e?et(e,function(e,t){d(t,e)}):(t=t.length?t:[t],et(t,function(e){e.deep===X&&(e.deep=!e.selector),e.split===X&&(e.split=!e.selector||e.inline),e.remove===X&&e.selector&&!e.inline&&(e.remove="none"),e.selector&&e.inline&&(e.mixed=!0,e.block_expand=!0),"string"==typeof e.classes&&(e.classes=e.classes.split(/\s+/))}),O[e]=t))}function f(e){var t;return i.dom.getParent(e,function(e){return t=i.dom.getStyle(e,"text-decoration"),t&&"none"!==t}),t}function p(e){var t;1===e.nodeType&&e.parentNode&&1===e.parentNode.nodeType&&(t=f(e.parentNode),i.dom.getStyle(e,"color")&&t?i.dom.setStyle(e,"text-decoration",t):i.dom.getStyle(e,"textdecoration")===t&&i.dom.setStyle(e,"text-decoration",null))}function h(n,r,a){function l(e,t){t=t||g,e&&(t.onformat&&t.onformat(e,t,r,a),et(t.styles,function(t,n){I.setStyle(e,n,E(t,r))}),et(t.attributes,function(t,n){I.setAttrib(e,n,E(t,r))}),et(t.classes,function(t){t=E(t,r),I.hasClass(e,t)||I.addClass(e,t)}))}function c(){function t(t,n){var r=new e(n);for(a=r.current();a;a=r.prev())if(a.childNodes.length>1||a==t||"BR"==a.tagName)return a}var n=i.selection.getRng(),r=n.startContainer,o=n.endContainer;if(r!=o&&0===n.endOffset){var s=t(r,o),l=3==s.nodeType?s.length:s.childNodes.length;n.setEnd(s,l)}return n}function d(e,n,r,i,o){var a=[],s=-1,l,c=-1,u=-1,d;return et(e.childNodes,function(e,n){return"UL"===e.nodeName||"OL"===e.nodeName?(s=n,l=e,!1):t}),et(e.childNodes,function(e,t){"SPAN"===e.nodeName&&"bookmark"==I.getAttrib(e,"data-mce-type")&&(e.id==n.id+"_start"?c=t:e.id==n.id+"_end"&&(u=t))}),0>=s||s>c&&u>s?(et(tt(e.childNodes),o),0):(d=I.clone(r,K),et(tt(e.childNodes),function(e,t){(s>c&&s>t||c>s&&t>s)&&(a.push(e),e.parentNode.removeChild(e))}),s>c?e.insertBefore(d,l):c>s&&e.insertBefore(d,l.nextSibling),i.push(d),et(a,function(e){d.appendChild(e)}),d)}function f(e,i,a){var c=[],u,f,p=!0;u=g.inline||g.block,f=I.create(u),l(f),W.walk(e,function(e){function h(e){var b,x,w,N,E;return E=p,b=e.nodeName.toLowerCase(),x=e.parentNode.nodeName.toLowerCase(),1===e.nodeType&&J(e)&&(E=p,p="true"===J(e),N=!0),_(b,"br")?(y=0,g.block&&I.remove(e),t):g.wrapper&&v(e,n,r)?(y=0,t):p&&!N&&g.block&&!g.wrapper&&o(b)&&z(x,u)?(e=I.rename(e,u),l(e),c.push(e),y=0,t):g.selector&&(et(m,function(t){"collapsed"in t&&t.collapsed!==C||I.is(e,t.selector)&&!s(e)&&(l(e,t),w=!0)}),!g.inline||w)?(y=0,t):(!p||N||!z(u,b)||!z(x,u)||!a&&3===e.nodeType&&1===e.nodeValue.length&&65279===e.nodeValue.charCodeAt(0)||s(e)||g.inline&&V(e)?"li"==b&&i?y=d(e,i,f,c,h):(y=0,et(tt(e.childNodes),h),N&&(p=E),y=0):(y||(y=I.clone(f,K),e.parentNode.insertBefore(y,e),c.push(y)),y.appendChild(e)),t)}var y;et(e,h)}),g.wrap_links===!1&&et(c,function(e){function t(e){var n,r,i;if("A"===e.nodeName){for(r=I.clone(f,K),c.push(r),i=tt(e.childNodes),n=0;i.length>n;n++)r.appendChild(i[n]);e.appendChild(r)}et(tt(e.childNodes),t)}t(e)}),et(c,function(e){function i(e){var t=0;return et(e.childNodes,function(e){k(e)||L(e)||t++}),t}function o(e){var n,r;return et(e.childNodes,function(e){return 1!=e.nodeType||L(e)||s(e)?t:(n=e,K)}),n&&w(n,g)&&(r=I.clone(n,K),l(r),I.replace(r,e,G),I.remove(n,1)),r||e}var a;if(a=i(e),(c.length>1||!V(e))&&0===a)return I.remove(e,1),t;if(g.inline||g.wrapper){if(g.exact||1!==a||(e=o(e)),et(m,function(t){et(I.select(t.inline,e),function(e){var n;if(t.wrap_links===!1){n=e.parentNode;do if("A"===n.nodeName)return;while(n=n.parentNode)}R(t,r,e,t.exact?e:null)})}),v(e.parentNode,n,r))return I.remove(e,1),e=0,G;g.merge_with_parents&&I.getParent(e.parentNode,function(i){return v(i,n,r)?(I.remove(e,1),e=0,G):t}),e&&g.merge_siblings!==!1&&(e=H(B(e),e),e=H(e,B(e,G)))}})}var m=u(n),g=m[0],y,b,C=!a&&F.isCollapsed();if(g)if(a)a.nodeType?(b=I.createRng(),b.setStartBefore(a),b.setEndAfter(a),f(T(b,m),null,!0)):f(a,null,!0);else if(C&&g.inline&&!I.select("td.mce-item-selected,th.mce-item-selected").length)D("apply",n,r);else{var x=i.selection.getNode();U||!m[0].defaultBlock||I.getParent(x,I.isBlock)||h(m[0].defaultBlock),i.selection.setRng(c()),y=F.getBookmark(),f(T(F.getRng(G),m),y),g.styles&&(g.styles.color||g.styles.textDecoration)&&(nt(x,p,"childNodes"),p(x)),F.moveToBookmark(y),P(F.getRng(G)),i.nodeChanged()}}function m(e,n,r){function o(e){var t,r,i,a,s;if(1===e.nodeType&&J(e)&&(a=C,C="true"===J(e),s=!0),t=tt(e.childNodes),C&&!s)for(r=0,i=h.length;i>r&&!R(h[r],n,e,e);r++);if(m.deep&&t.length){for(r=0,i=t.length;i>r;r++)o(t[r]);s&&(C=a)}}function s(t){var r;return et(a(t.parentNode).reverse(),function(t){var i;r||"_start"==t.id||"_end"==t.id||(i=v(t,e,n),i&&i.split!==!1&&(r=t))}),r}function l(e,t,r,i){var o,a,s,l,c,u;if(e){for(u=e.parentNode,o=t.parentNode;o&&o!=u;o=o.parentNode){for(a=I.clone(o,K),c=0;h.length>c;c++)if(R(h[c],n,a,a)){a=0;break}a&&(s&&a.appendChild(s),l||(l=a),s=a)}!i||m.mixed&&V(e)||(t=I.split(e,t)),s&&(r.parentNode.insertBefore(s,r),l.appendChild(r))}return t}function c(e){return l(s(e),e,e,!0)}function d(e){var t=I.get(e?"_start":"_end"),n=t[e?"firstChild":"lastChild"];return L(n)&&(n=n[e?"firstChild":"lastChild"]),I.remove(t,!0),n}function p(e){var t,n;e=T(e,h,G),m.split&&(t=M(e,G),n=M(e),t!=n?(/^(TR|TD)$/.test(t.nodeName)&&t.firstChild&&(t="TD"==t.nodeName?t.firstChild||t:t.firstChild.firstChild||t),t=S(t,"span",{id:"_start","data-mce-type":"bookmark"}),n=S(n,"span",{id:"_end","data-mce-type":"bookmark"}),c(t),c(n),t=d(G),n=d()):t=n=c(t),e.startContainer=t.parentNode,e.startOffset=q(t),e.endContainer=n.parentNode,e.endOffset=q(n)+1),W.walk(e,function(e){et(e,function(e){o(e),1===e.nodeType&&"underline"===i.dom.getStyle(e,"text-decoration")&&e.parentNode&&"underline"===f(e.parentNode)&&R({deep:!1,exact:!0,inline:"span",styles:{textDecoration:"underline"}},null,e)})})}var h=u(e),m=h[0],g,b,C=!0;return r?(r.nodeType?(b=I.createRng(),b.setStartBefore(r),b.setEndAfter(r),p(b)):p(r),t):(F.isCollapsed()&&m.inline&&!I.select("td.mce-item-selected,th.mce-item-selected").length?D("remove",e,n):(g=F.getBookmark(),p(F.getRng(G)),F.moveToBookmark(g),m.inline&&y(e,n,F.getStart())&&P(F.getRng(!0)),i.nodeChanged()),t)}function g(e,t,n){var r=u(e);!y(e,t,n)||"toggle"in r[0]&&!r[0].toggle?h(e,t,n):m(e,t,n)}function v(e,t,n,r){function i(e,t,i){var o,a,s=t[i],l;if(t.onmatch)return t.onmatch(e,t,i);if(s)if(s.length===X){for(o in s)if(s.hasOwnProperty(o)){if(a="attributes"===i?I.getAttrib(e,o):N(e,o),r&&!a&&!t.exact)return;if((!r||t.exact)&&!_(a,E(s[o],n)))return}}else for(l=0;s.length>l;l++)if("attributes"===i?I.getAttrib(e,s[l]):N(e,s[l]))return t;return t}var o=u(t),a,s,l;if(o&&e)for(s=0;o.length>s;s++)if(a=o[s],w(e,a)&&i(e,a,"attributes")&&i(e,a,"styles")){if(l=a.classes)for(s=0;l.length>s;s++)if(!I.hasClass(e,l[s]))return;return a}}function y(e,t,n){function r(n){return n=I.getParent(n,function(n){return!!v(n,e,t,!0)}),v(n,e,t)}var i;return n?r(n):(n=F.getNode(),r(n)?G:(i=F.getStart(),i!=n&&r(i)?G:K))}function b(e,t){var n,r=[],i={};return n=F.getStart(),I.getParent(n,function(n){var o,a;for(o=0;e.length>o;o++)a=e[o],!i[a]&&v(n,a,t)&&(i[a]=!0,r.push(a))},I.getRoot()),r}function C(e){var t=u(e),n,r,i,o,s;if(t)for(n=F.getStart(),r=a(n),o=t.length-1;o>=0;o--){if(s=t[o].selector,!s)return G;for(i=r.length-1;i>=0;i--)if(I.is(r[i],s))return G}return K}function x(e,n,r){var o;return Y||(Y={},o={},i.on("NodeChange",function(e){var n=a(e.element),r={};et(Y,function(e,i){et(n,function(a){return v(a,i,{},e.similar)?(o[i]||(et(e,function(e){e(!0,{node:a,format:i,parents:n})}),o[i]=e),r[i]=e,!1):t})}),et(o,function(t,i){r[i]||(delete o[i],et(t,function(t){t(!1,{node:e.element,format:i,parents:n})}))})})),et(e.split(","),function(e){Y[e]||(Y[e]=[],Y[e].similar=r),Y[e].push(n)}),this}function w(e,n){return _(e,n.inline)?G:_(e,n.block)?G:n.selector?1==e.nodeType&&I.is(e,n.selector):t}function _(e,t){return e=e||"",t=t||"",e=""+(e.nodeName||e),t=""+(t.nodeName||t),e.toLowerCase()==t.toLowerCase()}function N(e,t){var n=I.getStyle(e,t);return("color"==t||"backgroundColor"==t)&&(n=I.toHex(n)),"fontWeight"==t&&700==n&&(n="bold"),""+n}function E(e,t){return"string"!=typeof e?e=e(t):t&&(e=e.replace(/%(\w+)/g,function(e,n){return t[n]||e})),e}function k(e){return e&&3===e.nodeType&&/^([\t \r\n]+|)$/.test(e.nodeValue)}function S(e,t,n){var r=I.create(t,n);return e.parentNode.insertBefore(r,e),r.appendChild(e),r}function T(n,r,s){function l(e){function t(e){return"BR"==e.nodeName&&e.getAttribute("data-mce-bogus")&&!e.nextSibling}var n,i,o,a,s;if(n=i=e?v:b,a=e?"previousSibling":"nextSibling",s=I.getRoot(),3==n.nodeType&&!k(n)&&(e?y>0:n.nodeValue.length>C))return n;for(;;){if(!r[0].block_expand&&V(i))return i;for(o=i[a];o;o=o[a])if(!L(o)&&!k(o)&&!t(o))return i;if(i.parentNode==s){n=i;break}i=i.parentNode}return n}function c(e,t){for(t===X&&(t=3===e.nodeType?e.length:e.childNodes.length);e&&e.hasChildNodes();)e=e.childNodes[t],e&&(t=3===e.nodeType?e.length:e.childNodes.length);return{node:e,offset:t}}function u(e){for(var t=e;t;){if(1===t.nodeType&&J(t))return"false"===J(t)?t:e;t=t.parentNode}return e}function d(n,r,o){function a(e,n){var r,i,a=e.nodeValue;return n===t&&(n=o?a.length:0),o?(r=a.lastIndexOf(" ",n),i=a.lastIndexOf("\u00a0",n),r=r>i?r:i,-1===r||s||r++):(r=a.indexOf(" ",n),i=a.indexOf("\u00a0",n),r=-1!==r&&(-1===i||i>r)?r:i),r}var l,c,u,d;if(3===n.nodeType){if(u=a(n,r),-1!==u)return{container:n,offset:u};d=n}for(l=new e(n,I.getParent(n,V)||i.getBody());c=l[o?"prev":"next"]();)if(3===c.nodeType){if(d=c,u=a(c),-1!==u)return{container:c,offset:u}}else if(V(c))break;return d?(r=o?0:d.length,{container:d,offset:r}):t}function f(e,t){var i,o,s,l;for(3==e.nodeType&&0===e.nodeValue.length&&e[t]&&(e=e[t]),i=a(e),o=0;i.length>o;o++)for(s=0;r.length>s;s++)if(l=r[s],!("collapsed"in l&&l.collapsed!==n.collapsed)&&I.is(i[o],l.selector))return i[o];return e}function p(e,t){var n;if(r[0].wrapper||(n=I.getParent(e,r[0].block)),n||(n=I.getParent(3==e.nodeType?e.parentNode:e,o)),n&&r[0].wrapper&&(n=a(n,"ul,ol").reverse()[0]||n),!n)for(n=e;n[t]&&!V(n[t])&&(n=n[t],!_(n,"br")););return n||e}var h,m,g,v=n.startContainer,y=n.startOffset,b=n.endContainer,C=n.endOffset;if(1==v.nodeType&&v.hasChildNodes()&&(h=v.childNodes.length-1,v=v.childNodes[y>h?h:y],3==v.nodeType&&(y=0)),1==b.nodeType&&b.hasChildNodes()&&(h=b.childNodes.length-1,b=b.childNodes[C>h?h:C-1],3==b.nodeType&&(C=b.nodeValue.length)),v=u(v),b=u(b),(L(v.parentNode)||L(v))&&(v=L(v)?v:v.parentNode,v=v.nextSibling||v,3==v.nodeType&&(y=0)),(L(b.parentNode)||L(b))&&(b=L(b)?b:b.parentNode,b=b.previousSibling||b,3==b.nodeType&&(C=b.length)),r[0].inline&&(n.collapsed&&(g=d(v,y,!0),g&&(v=g.container,y=g.offset),g=d(b,C),g&&(b=g.container,C=g.offset)),m=c(b,C),m.node)){for(;m.node&&0===m.offset&&m.node.previousSibling;)m=c(m.node.previousSibling);m.node&&m.offset>0&&3===m.node.nodeType&&" "===m.node.nodeValue.charAt(m.offset-1)&&m.offset>1&&(b=m.node,b.splitText(m.offset-1))}return(r[0].inline||r[0].block_expand)&&(r[0].inline&&3==v.nodeType&&0!==y||(v=l(!0)),r[0].inline&&3==b.nodeType&&C!==b.nodeValue.length||(b=l())),r[0].selector&&r[0].expand!==K&&!r[0].inline&&(v=f(v,"previousSibling"),b=f(b,"nextSibling")),(r[0].block||r[0].selector)&&(v=p(v,"previousSibling"),b=p(b,"nextSibling"),r[0].block&&(V(v)||(v=l(!0)),V(b)||(b=l()))),1==v.nodeType&&(y=q(v),v=v.parentNode),1==b.nodeType&&(C=q(b)+1,b=b.parentNode),{startContainer:v,startOffset:y,endContainer:b,endOffset:C}}function R(e,n,r,i){var o,a,s;if(!w(r,e))return K;if("all"!=e.remove)for(et(e.styles,function(e,t){e=E(e,n),"number"==typeof t&&(t=e,i=0),(!i||_(N(i,t),e))&&I.setStyle(r,t,""),s=1}),s&&""===I.getAttrib(r,"style")&&(r.removeAttribute("style"),r.removeAttribute("data-mce-style")),et(e.attributes,function(e,o){var a;if(e=E(e,n),"number"==typeof o&&(o=e,i=0),!i||_(I.getAttrib(i,o),e)){if("class"==o&&(e=I.getAttrib(r,o),e&&(a="",et(e.split(/\s+/),function(e){/mce\w+/.test(e)&&(a+=(a?" ":"")+e)}),a)))return I.setAttrib(r,o,a),t;"class"==o&&r.removeAttribute("className"),j.test(o)&&r.removeAttribute("data-mce-"+o),r.removeAttribute(o)}}),et(e.classes,function(e){e=E(e,n),(!i||I.hasClass(i,e))&&I.removeClass(r,e)}),a=I.getAttribs(r),o=0;a.length>o;o++)if(0!==a[o].nodeName.indexOf("_"))return K;return"none"!=e.remove?(A(r,e),G):t}function A(e,t){function n(e,t,n){return e=B(e,t,n),!e||"BR"==e.nodeName||V(e)}var r=e.parentNode,i;t.block&&(U?r==I.getRoot()&&(t.list_block&&_(e,t.list_block)||et(tt(e.childNodes),function(e){z(U,e.nodeName.toLowerCase())?i?i.appendChild(e):i=S(e,U):i=0})):V(e)&&!V(r)&&(n(e,K)||n(e.firstChild,G,1)||e.insertBefore(I.create("br"),e.firstChild),n(e,G)||n(e.lastChild,K,1)||e.appendChild(I.create("br")))),t.selector&&t.inline&&!_(t.inline,e)||I.remove(e,1)}function B(e,t,n){if(e)for(t=t?"nextSibling":"previousSibling",e=n?e:e[t];e;e=e[t])if(1==e.nodeType||!k(e))return e}function L(e){return e&&1==e.nodeType&&"bookmark"==e.getAttribute("data-mce-type")}function H(e,t){function n(e,t){function n(e){var t={};return et(I.getAttribs(e),function(n){var r=n.nodeName.toLowerCase();0!==r.indexOf("_")&&"style"!==r&&(t[r]=I.getAttrib(e,r))}),t}function r(e,t){var n,r;for(r in e)if(e.hasOwnProperty(r)){if(n=t[r],n===X)return K;if(e[r]!=n)return K;delete t[r]}for(r in t)if(t.hasOwnProperty(r))return K;return G}return e.nodeName!=t.nodeName?K:r(n(e),n(t))?r(I.parseStyle(I.getAttrib(e,"style")),I.parseStyle(I.getAttrib(t,"style")))?G:K:K}function r(e,t){for(i=e;i;i=i[t]){if(3==i.nodeType&&0!==i.nodeValue.length)return e;if(1==i.nodeType&&!L(i))return i}return e}var i,o;if(e&&t&&(e=r(e,"previousSibling"),t=r(t,"nextSibling"),n(e,t))){for(i=e.nextSibling;i&&i!=t;)o=i,i=i.nextSibling,e.appendChild(o);return I.remove(t),et(tt(t.childNodes),function(t){e.appendChild(t)}),e}return t}function M(t,n){var r,o,a;return r=t[n?"startContainer":"endContainer"],o=t[n?"startOffset":"endOffset"],1==r.nodeType&&(a=r.childNodes.length-1,!n&&o&&o--,r=r.childNodes[o>a?a:o]),3===r.nodeType&&n&&o>=r.nodeValue.length&&(r=new e(r,i.getBody()).next()||r),3!==r.nodeType||n||0!==o||(r=new e(r,i.getBody()).prev()||r),r}function D(t,n,r){function o(e){var t=I.create("span",{id:g,"data-mce-bogus":!0,style:y?"color:red":""});return e&&t.appendChild(i.getDoc().createTextNode($)),t}function a(e,t){for(;e;){if(3===e.nodeType&&e.nodeValue!==$||e.childNodes.length>1)return!1;t&&1===e.nodeType&&t.push(e),e=e.firstChild}return!0}function s(e){for(;e;){if(e.id===g)return e;e=e.parentNode}}function l(t){var n;if(t)for(n=new e(t,t),t=n.current();t;t=n.next())if(3===t.nodeType)return t}function c(e,t){var n,r;if(e)r=F.getRng(!0),a(e)?(t!==!1&&(r.setStartBefore(e),r.setEndBefore(e)),I.remove(e)):(n=l(e),n.nodeValue.charAt(0)===$&&(n=n.deleteData(0,1)),I.remove(e,1)),F.setRng(r);else if(e=s(F.getStart()),!e)for(;e=I.get(g);)c(e,!1)}function d(){var e,t,i,a,c,d,f;e=F.getRng(!0),a=e.startOffset,d=e.startContainer,f=d.nodeValue,t=s(F.getStart()),t&&(i=l(t)),f&&a>0&&f.length>a&&/\w/.test(f.charAt(a))&&/\w/.test(f.charAt(a-1))?(c=F.getBookmark(),e.collapse(!0),e=T(e,u(n)),e=W.split(e),h(n,r,e),F.moveToBookmark(c)):(t&&i.nodeValue===$?h(n,r,t):(t=o(!0),i=t.firstChild,e.insertNode(t),a=1,h(n,r,t)),F.setCursorLocation(i,a))}function f(){var e=F.getRng(!0),t,i,a,s,l,c,d=[],f,p;for(t=e.startContainer,i=e.startOffset,l=t,3==t.nodeType&&((i!=t.nodeValue.length||t.nodeValue===$)&&(s=!0),l=l.parentNode);l;){if(v(l,n,r)){c=l;break}l.nextSibling&&(s=!0),d.push(l),l=l.parentNode}if(c)if(s)a=F.getBookmark(),e.collapse(!0),e=T(e,u(n),!0),e=W.split(e),m(n,r,e),F.moveToBookmark(a);else{for(p=o(),l=p,f=d.length-1;f>=0;f--)l.appendChild(I.clone(d[f],!1)),l=l.firstChild;l.appendChild(I.doc.createTextNode($)),l=l.firstChild,I.insertAfter(p,c),F.setCursorLocation(l,1)}}function p(){var e;e=s(F.getStart()),e&&!I.isEmpty(e)&&nt(e,function(e){1!=e.nodeType||e.id===g||I.isEmpty(e)||I.setAttrib(e,"data-mce-bogus",null)},"childNodes")}var g="_mce_caret",y=i.settings.caret_debug;i._hasCaretEvents||(Z=function(){var e=[],t;if(a(s(F.getStart()),e))for(t=e.length;t--;)I.setAttrib(e[t],"data-mce-bogus","1")},Q=function(e){var t=e.keyCode;c(),(8==t||37==t||39==t)&&c(s(F.getStart())),p()},i.on("SetContent",function(e){e.selection&&p()}),i._hasCaretEvents=!0),"apply"==t?d():f()}function P(n){var r=n.startContainer,i=n.startOffset,o,a,s,l,c;if(3==r.nodeType&&i>=r.nodeValue.length&&(i=q(r),r=r.parentNode,o=!0),1==r.nodeType)for(l=r.childNodes,r=l[Math.min(i,l.length-1)],a=new e(r,I.getParent(r,I.isBlock)),(i>l.length-1||o)&&a.next(),s=a.current();s;s=a.next())if(3==s.nodeType&&!k(s))return c=I.create("a",null,$),s.parentNode.insertBefore(c,s),n.setStart(s,0),F.setRng(n),I.remove(c),t}var O={},I=i.dom,F=i.selection,W=new n(I),z=i.schema.isValidChild,V=I.isBlock,U=i.settings.forced_root_block,q=I.nodeIndex,$="\ufeff",j=/^(src|href|style)$/,K=!1,G=!0,Y,X,J=I.getContentEditable,Q,Z,et=r.each,tt=r.grep,nt=r.walk,rt=r.extend;rt(this,{get:u,register:d,apply:h,remove:m,toggle:g,match:y,matchAll:b,matchNode:v,canApply:C,formatChanged:x}),l(),c(),i.on("BeforeGetContent",function(){Z&&Z()}),i.on("mouseup keydown",function(e){Q&&Q(e)})}}),r(L,[m,f],function(e,n){var r=n.trim,i;return i=RegExp(["<span[^>]+data-mce-bogus[^>]+>[\u200b\ufeff]+<\\/span>","<div[^>]+data-mce-bogus[^>]+><\\/div>",'\\s?data-mce-selected="[^"]+"'].join("|"),"gi"),function(n){function o(){return r(n.getContent({format:"raw",no_events:1}).replace(i,""))}function a(){s.typing=!1,s.add()}var s,l=0,c=[],u;return n.on("init",function(){s.add()}),n.on("BeforeExecCommand",function(e){var t=e.command;"Undo"!=t&&"Redo"!=t&&"mceRepaint"!=t&&s.beforeChange()}),n.on("ExecCommand",function(e){var t=e.command;"Undo"!=t&&"Redo"!=t&&"mceRepaint"!=t&&s.add()}),n.on("ObjectResizeStart",function(){s.beforeChange()}),n.on("SaveContent ObjectResized",a),n.dom.bind(n.dom.getRoot(),"dragend",a),n.dom.bind(n.getBody(),"focusout",function(){!n.removed&&s.typing&&a()}),n.on("KeyUp",function(t){var r=t.keyCode;(r>=33&&36>=r||r>=37&&40>=r||45==r||13==r||t.ctrlKey)&&(a(),n.nodeChanged()),(46==r||8==r||e.isMac&&(91==r||93==r))&&n.nodeChanged()}),n.on("KeyDown",function(e){var n=e.keyCode;return n>=33&&36>=n||n>=37&&40>=n||45==n?(s.typing&&a(),t):((16>n||n>20)&&224!=n&&91!=n&&!s.typing&&(s.beforeChange(),s.typing=!0,s.add()),t)}),n.on("MouseDown",function(){s.typing&&a()}),n.addShortcut("ctrl+z","undo_desc","Undo"),n.addShortcut("ctrl+y","redo_desc","Redo"),n.on("AddUndo Undo Redo ClearUndos MouseUp",function(e){e.isDefaultPrevented()||n.nodeChanged()}),s={data:c,typing:!1,beforeChange:function(){u=n.selection.getBookmark(2,!0)},add:function(e){var t,r=n.settings,i;if(e=e||{},e.content=o(),n.fire("BeforeAddUndo",{level:e}).isDefaultPrevented())return null;if(i=c[l],i&&i.content==e.content)return null;if(c[l]&&(c[l].beforeBookmark=u),r.custom_undo_redo_levels&&c.length>r.custom_undo_redo_levels){for(t=0;c.length-1>t;t++)c[t]=c[t+1];c.length--,l=c.length}return e.bookmark=n.selection.getBookmark(2,!0),c.length-1>l&&(c.length=l+1),c.push(e),l=c.length-1,n.fire("AddUndo",{level:e,lastLevel:i}),n.isNotDirty=0,e},undo:function(){var e;return s.typing&&(s.add(),s.typing=!1),l>0&&(e=c[--l],n.setContent(e.content,{format:"raw"}),n.selection.moveToBookmark(e.beforeBookmark),n.fire("undo",{level:e})),e},redo:function(){var e;return c.length-1>l&&(e=c[++l],n.setContent(e.content,{format:"raw"}),n.selection.moveToBookmark(e.bookmark),n.fire("redo",{level:e})),e},clear:function(){c=[],l=0,s.typing=!1,n.fire("ClearUndos")},hasUndo:function(){return l>0||s.typing&&c[0]&&o()!=c[0].content},hasRedo:function(){return c.length-1>l&&!this.typing},transact:function(e){s.beforeChange(),e(),s.add()}}}}),r(H,[d,m],function(e,n){var r=n.ie;return function(n){function i(i){function d(e){return e&&o.isBlock(e)&&!/^(TD|TH|CAPTION|FORM)$/.test(e.nodeName)&&!/^(fixed|absolute)/i.test(e.style.position)&&"true"!==o.getContentEditable(e)}function f(e){var t;o.isBlock(e)&&(t=a.getRng(),e.appendChild(o.create("span",null,"\u00a0")),a.select(e),e.lastChild.outerHTML="",a.setRng(t))}function p(e){for(var t=e,n=[],r;t=t.firstChild;){if(o.isBlock(t))return;1!=t.nodeType||u[t.nodeName.toLowerCase()]||n.push(t)}for(r=n.length;r--;)t=n[r],!t.hasChildNodes()||t.firstChild==t.lastChild&&""===t.firstChild.nodeValue?o.remove(t):"A"==t.nodeName&&" "===(t.innerText||t.textContent)&&o.remove(t)
6}function h(t){var n,r,i,s=t,l;if(i=o.createRng(),t.hasChildNodes()){for(n=new e(t,t);r=n.current();){if(3==r.nodeType){i.setStart(r,0),i.setEnd(r,0);break}if(u[r.nodeName.toLowerCase()]){i.setStartBefore(r),i.setEndBefore(r);break}s=r,r=n.next()}r||(i.setStart(s,0),i.setEnd(s,0))}else"BR"==t.nodeName?t.nextSibling&&o.isBlock(t.nextSibling)?((!A||9>A)&&(l=o.create("br"),t.parentNode.insertBefore(l,t)),i.setStartBefore(t),i.setEndBefore(t)):(i.setStartAfter(t),i.setEndAfter(t)):(i.setStart(t,0),i.setEnd(t,0));a.setRng(i),o.remove(l),a.scrollIntoView(t)}function m(e){var t=S,n,i,a;if(n=e||"TABLE"==D?o.create(e||O):R.cloneNode(!1),a=n,s.keep_styles!==!1)do if(/^(SPAN|STRONG|B|EM|I|FONT|STRIKE|U)$/.test(t.nodeName)){if("_mce_caret"==t.id)continue;i=t.cloneNode(!1),o.setAttrib(i,"id",""),n.hasChildNodes()?(i.appendChild(n.firstChild),n.appendChild(i)):(a=i,n.appendChild(i))}while(t=t.parentNode);return r||(a.innerHTML='<br data-mce-bogus="1">'),n}function g(t){var n,r,i;if(3==S.nodeType&&(t?T>0:S.nodeValue.length>T))return!1;if(S.parentNode==R&&I&&!t)return!0;if(t&&1==S.nodeType&&S==R.firstChild)return!0;if("TABLE"===S.nodeName||S.previousSibling&&"TABLE"==S.previousSibling.nodeName)return I&&!t||!I&&t;for(n=new e(S,R),3==S.nodeType&&(t&&0===T?n.prev():t||T!=S.nodeValue.length||n.next());r=n.current();){if(1===r.nodeType){if(!r.getAttribute("data-mce-bogus")&&(i=r.nodeName.toLowerCase(),u[i]&&"br"!==i))return!1}else if(3===r.nodeType&&!/^[ \t\r\n]*$/.test(r.nodeValue))return!1;t?n.prev():n.next()}return!0}function v(e,t){var r,i,a,s,l,u,f=O||"P";if(i=o.getParent(e,o.isBlock),u=n.getBody().nodeName.toLowerCase(),!i||!d(i)){if(i=i||k,!i.hasChildNodes())return r=o.create(f),i.appendChild(r),N.setStart(r,0),N.setEnd(r,0),r;for(s=e;s.parentNode!=i;)s=s.parentNode;for(;s&&!o.isBlock(s);)a=s,s=s.previousSibling;if(a&&c.isValidChild(u,f.toLowerCase())){for(r=o.create(f),a.parentNode.insertBefore(r,a),s=a;s&&!o.isBlock(s);)l=s.nextSibling,r.appendChild(s),s=l;N.setStart(e,t),N.setEnd(e,t)}}return e}function y(){function e(e){for(var t=M[e?"firstChild":"lastChild"];t&&1!=t.nodeType;)t=t[e?"nextSibling":"previousSibling"];return t===R}function t(){var e=M.parentNode;return"LI"==e.nodeName?e:M}var n=M.parentNode.nodeName;/^(OL|UL|LI)$/.test(n)&&(O="LI"),L=O?m(O):o.create("BR"),e(!0)&&e()?"LI"==n?o.insertAfter(L,t()):o.replace(L,M):e(!0)?"LI"==n?(o.insertAfter(L,t()),L.appendChild(o.doc.createTextNode(" ")),L.appendChild(M)):M.parentNode.insertBefore(L,M):e()?(o.insertAfter(L,t()),f(L)):(M=t(),E=N.cloneRange(),E.setStartAfter(R),E.setEndAfter(M),H=E.extractContents(),o.insertAfter(H,M),o.insertAfter(L,M)),o.remove(R),h(L),l.add()}function b(){for(var t=new e(S,R),n;n=t.next();)if(u[n.nodeName.toLowerCase()]||n.length>0)return!0}function C(){var e,t,n;S&&3==S.nodeType&&T>=S.nodeValue.length&&(r||b()||(e=o.create("br"),N.insertNode(e),N.setStartAfter(e),N.setEndAfter(e),t=!0)),e=o.create("br"),N.insertNode(e),r&&"PRE"==D&&(!A||8>A)&&e.parentNode.insertBefore(o.doc.createTextNode("\r"),e),n=o.create("span",{},"&nbsp;"),e.parentNode.insertBefore(n,e),a.scrollIntoView(n),o.remove(n),t?(N.setStartBefore(e),N.setEndBefore(e)):(N.setStartAfter(e),N.setEndAfter(e)),a.setRng(N),l.add()}function x(e){do 3===e.nodeType&&(e.nodeValue=e.nodeValue.replace(/^[\r\n]+/,"")),e=e.firstChild;while(e)}function w(e){var t=o.getRoot(),n,r;for(n=e;n!==t&&"false"!==o.getContentEditable(n);)"true"===o.getContentEditable(n)&&(r=n),n=n.parentNode;return n!==t?r:t}function _(e){var t;r||(e.normalize(),t=e.lastChild,(!t||/^(left|right)$/gi.test(o.getStyle(t,"float",!0)))&&o.add(e,"br"))}var N=a.getRng(!0),E,k,S,T,R,A,B,L,H,M,D,P,O,I;if(!N.collapsed)return n.execCommand("Delete"),t;if(!i.isDefaultPrevented()&&(S=N.startContainer,T=N.startOffset,O=(s.force_p_newlines?"p":"")||s.forced_root_block,O=O?O.toUpperCase():"",A=o.doc.documentMode,B=i.shiftKey,1==S.nodeType&&S.hasChildNodes()&&(I=T>S.childNodes.length-1,S=S.childNodes[Math.min(T,S.childNodes.length-1)]||S,T=I&&3==S.nodeType?S.nodeValue.length:0),k=w(S))){if(l.beforeChange(),!o.isBlock(k)&&k!=o.getRoot())return(!O||B)&&C(),t;if((O&&!B||!O&&B)&&(S=v(S,T)),R=o.getParent(S,o.isBlock),M=R?o.getParent(R.parentNode,o.isBlock):null,D=R?R.nodeName.toUpperCase():"",P=M?M.nodeName.toUpperCase():"","LI"!=P||i.ctrlKey||(R=M,D=P),"LI"==D){if(!O&&B)return C(),t;if(o.isEmpty(R))return y(),t}if("PRE"==D&&s.br_in_pre!==!1){if(!B)return C(),t}else if(!O&&!B&&"LI"!=D||O&&B)return C(),t;O&&R===n.getBody()||(O=O||"P",g()?(L=/^(H[1-6]|PRE|FIGURE)$/.test(D)&&"HGROUP"!=P?m(O):m(),s.end_container_on_empty_block&&d(M)&&o.isEmpty(R)?L=o.split(M,R):o.insertAfter(L,R),h(L)):g(!0)?(L=R.parentNode.insertBefore(m(),R),f(L)):(E=N.cloneRange(),E.setEndAfter(R),H=E.extractContents(),x(H),L=H.firstChild,o.insertAfter(H,R),p(L),_(R),h(L)),o.setAttrib(L,"id",""),l.add())}}var o=n.dom,a=n.selection,s=n.settings,l=n.undoManager,c=n.schema,u=c.getNonEmptyElements();n.on("keydown",function(e){13==e.keyCode&&i(e)!==!1&&e.preventDefault()})}}),r(M,[],function(){return function(e){function t(){var t=i.getStart(),s=e.getBody(),l,c,u,d,f,p,h,m=-16777215,g,v,y,b,C;if(C=n.forced_root_block,t&&1===t.nodeType&&C){for(;t&&t!=s;){if(a[t.nodeName])return;t=t.parentNode}if(l=i.getRng(),l.setStart){c=l.startContainer,u=l.startOffset,d=l.endContainer,f=l.endOffset;try{v=e.getDoc().activeElement===s}catch(x){}}else l.item&&(t=l.item(0),l=e.getDoc().body.createTextRange(),l.moveToElementText(t)),v=l.parentElement().ownerDocument===e.getDoc(),y=l.duplicate(),y.collapse(!0),u=-1*y.move("character",m),y.collapsed||(y=l.duplicate(),y.collapse(!1),f=-1*y.move("character",m)-u);for(t=s.firstChild,b=s.nodeName.toLowerCase();t;)if((3===t.nodeType||1==t.nodeType&&!a[t.nodeName])&&o.isValidChild(b,C.toLowerCase())){if(3===t.nodeType&&0===t.nodeValue.length){h=t,t=t.nextSibling,r.remove(h);continue}p||(p=r.create(C),t.parentNode.insertBefore(p,t),g=!0),h=t,t=t.nextSibling,p.appendChild(h)}else p=null,t=t.nextSibling;if(g&&v){if(l.setStart)l.setStart(c,u),l.setEnd(d,f),i.setRng(l);else try{l=e.getDoc().body.createTextRange(),l.moveToElementText(s),l.collapse(!0),l.moveStart("character",u),f>0&&l.moveEnd("character",f),l.select()}catch(x){}e.nodeChanged()}}}var n=e.settings,r=e.dom,i=e.selection,o=e.schema,a=o.getBlockElements();n.forced_root_block&&e.on("KeyUp NodeChange",t)}}),r(D,[N,m,f],function(e,n,r){var i=r.each,o=r.extend,a=r.map,s=r.inArray,l=r.explode,c=n.gecko,u=n.ie,d=!0,f=!1;return function(n){function r(e,t,n){var r;return e=e.toLowerCase(),(r=_.exec[e])?(r(e,t,n),d):f}function p(e){var t;return e=e.toLowerCase(),(t=_.state[e])?t(e):-1}function h(e){var t;return e=e.toLowerCase(),(t=_.value[e])?t(e):f}function m(e,t){t=t||"exec",i(e,function(e,n){i(n.toLowerCase().split(","),function(n){_[t][n]=e})})}function g(e,r,i){return r===t&&(r=f),i===t&&(i=null),n.getDoc().execCommand(e,r,i)}function v(e){return E.match(e)}function y(e,r){E.toggle(e,r?{value:r}:t),n.nodeChanged()}function b(e){k=w.getBookmark(e)}function C(){w.moveToBookmark(k)}var x=n.dom,w=n.selection,_={state:{},exec:{},value:{}},N=n.settings,E=n.formatter,k;o(this,{execCommand:r,queryCommandState:p,queryCommandValue:h,addCommands:m}),m({"mceResetDesignMode,mceBeginUndoLevel":function(){},"mceEndUndoLevel,mceAddUndoLevel":function(){n.undoManager.add()},"Cut,Copy,Paste":function(e){var t=n.getDoc(),r;try{g(e)}catch(i){r=d}(r||!t.queryCommandSupported(e))&&(c?n.windowManager.confirm(n.getLang("clipboard_msg"),function(e){e&&window.open("http://www.mozilla.org/editor/midasdemo/securityprefs.html","_blank")}):n.windowManager.alert("Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X/C/V keyboard shortcuts instead."))},unlink:function(e){w.isCollapsed()&&w.select(w.getNode()),g(e),w.collapse(f)},"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull":function(e){var t=e.substring(7);"full"==t&&(t="justify"),i("left,center,right,justify".split(","),function(e){t!=e&&E.remove("align"+e)}),y("align"+t),r("mceRepaint")},"InsertUnorderedList,InsertOrderedList":function(e){var t,n;g(e),t=x.getParent(w.getNode(),"ol,ul"),t&&(n=t.parentNode,/^(H[1-6]|P|ADDRESS|PRE)$/.test(n.nodeName)&&(b(),x.split(n,t),C()))},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(e){y(e)},"ForeColor,HiliteColor,FontName":function(e,t,n){y(e,n)},FontSize:function(e,t,n){var r,i;n>=1&&7>=n&&(i=l(N.font_size_style_values),r=l(N.font_size_classes),n=r?r[n-1]||n:i[n-1]||n),y(e,n)},RemoveFormat:function(e){E.remove(e)},mceBlockQuote:function(){y("blockquote")},FormatBlock:function(e,t,n){return y(n||"p")},mceCleanup:function(){var e=w.getBookmark();n.setContent(n.getContent({cleanup:d}),{cleanup:d}),w.moveToBookmark(e)},mceRemoveNode:function(e,t,r){var i=r||w.getNode();i!=n.getBody()&&(b(),n.dom.remove(i,d),C())},mceSelectNodeDepth:function(e,r,i){var o=0;x.getParent(w.getNode(),function(e){return 1==e.nodeType&&o++==i?(w.select(e),f):t},n.getBody())},mceSelectNode:function(e,t,n){w.select(n)},mceInsertContent:function(t,r,i){function o(e){function t(e){return r[e]&&3==r[e].nodeType}var n,r,i;return n=w.getRng(!0),r=n.startContainer,i=n.startOffset,3==r.nodeType&&(i>0?e=e.replace(/^&nbsp;/," "):t("previousSibling")||(e=e.replace(/^ /,"&nbsp;")),r.length>i?e=e.replace(/&nbsp;(<br>|)$/," "):t("nextSibling")||(e=e.replace(/(&nbsp;| )(<br>|)$/,"&nbsp;"))),e}var a,s,l,c,d,f,p,h,m,g,v,y,b,C;if(/^ | $/.test(i)&&(i=o(i)),a=n.parser,s=new e({},n.schema),b='<span id="mce_marker" data-mce-type="bookmark">&#xFEFF;</span>',f={content:i,format:"html",selection:!0},n.fire("BeforeSetContent",f),i=f.content,-1==i.indexOf("{$caret}")&&(i+="{$caret}"),i=i.replace(/\{\$caret\}/,b),w.isCollapsed()||n.getDoc().execCommand("Delete",!1,null),l=w.getNode(),f={context:l.nodeName.toLowerCase()},d=a.parse(i,f),v=d.lastChild,"mce_marker"==v.attr("id"))for(p=v,v=v.prev;v;v=v.walk(!0))if(3==v.type||!x.isBlock(v.name)){v.parent.insert(p,v,"br"===v.name);break}if(f.invalid){for(w.setContent(b),l=w.getNode(),c=n.getBody(),9==l.nodeType?l=v=c:v=l;v!==c;)l=v,v=v.parentNode;i=l==c?c.innerHTML:x.getOuterHTML(l),i=s.serialize(a.parse(i.replace(/<span (id="mce_marker"|id=mce_marker).+?<\/span>/i,function(){return s.serialize(d)}))),l==c?x.setHTML(c,i):x.setOuterHTML(l,i)}else i=s.serialize(d),v=l.firstChild,y=l.lastChild,!v||v===y&&"BR"===v.nodeName?x.setHTML(l,i):w.setContent(i);p=x.get("mce_marker"),h=x.getRect(p),m=x.getViewPort(n.getWin()),(h.y+h.h>m.y+m.h||h.y<m.y||h.x>m.x+m.w||h.x<m.x)&&(C=u?n.getDoc().documentElement:n.getBody(),C.scrollLeft=h.x,C.scrollTop=h.y-m.h+25),g=x.createRng(),v=p.previousSibling,v&&3==v.nodeType?(g.setStart(v,v.nodeValue.length),u||(y=p.nextSibling,y&&3==y.nodeType&&(v.appendData(y.data),y.parentNode.removeChild(y)))):(g.setStartBefore(p),g.setEndBefore(p)),x.remove(p),w.setRng(g),n.fire("SetContent",f),n.addVisual()},mceInsertRawHTML:function(e,t,r){w.setContent("tiny_mce_marker"),n.setContent(n.getContent().replace(/tiny_mce_marker/g,function(){return r}))},mceToggleFormat:function(e,t,n){y(n)},mceSetContent:function(e,t,r){n.setContent(r)},"Indent,Outdent":function(e){var t,n,r;t=N.indentation,n=/[a-z%]+$/i.exec(t),t=parseInt(t,10),p("InsertUnorderedList")||p("InsertOrderedList")?g(e):(N.forced_root_block||x.getParent(w.getNode(),x.isBlock)||E.apply("div"),i(w.getSelectedBlocks(),function(i){var o;"LI"!=i.nodeName&&(o="rtl"==x.getStyle(i,"direction",!0)?"paddingRight":"paddingLeft","outdent"==e?(r=Math.max(0,parseInt(i.style[o]||0,10)-t),x.setStyle(i,o,r?r+n:"")):(r=parseInt(i.style[o]||0,10)+t+n,x.setStyle(i,o,r)))}))},mceRepaint:function(){if(c)try{b(d),w.getSel()&&w.getSel().selectAllChildren(n.getBody()),w.collapse(d),C()}catch(e){}},InsertHorizontalRule:function(){n.execCommand("mceInsertContent",!1,"<hr />")},mceToggleVisualAid:function(){n.hasVisual=!n.hasVisual,n.addVisual()},mceReplaceContent:function(e,t,r){n.execCommand("mceInsertContent",!1,r.replace(/\{\$selection\}/g,w.getContent({format:"text"})))},mceInsertLink:function(e,t,n){var r;"string"==typeof n&&(n={href:n}),r=x.getParent(w.getNode(),"a"),n.href=n.href.replace(" ","%20"),r&&n.href||E.remove("link"),n.href&&E.apply("link",n,r)},selectAll:function(){var e=x.getRoot(),t=x.createRng();w.getRng().setStart?(t.setStart(e,0),t.setEnd(e,e.childNodes.length),w.setRng(t)):g("SelectAll")},mceNewDocument:function(){n.setContent("")}}),m({"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull":function(e){var t="align"+e.substring(7),n=w.isCollapsed()?[x.getParent(w.getNode(),x.isBlock)]:w.getSelectedBlocks(),r=a(n,function(e){return!!E.matchNode(e,t)});return-1!==s(r,d)},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(e){return v(e)},mceBlockQuote:function(){return v("blockquote")},Outdent:function(){var e;if(N.inline_styles){if((e=x.getParent(w.getStart(),x.isBlock))&&parseInt(e.style.paddingLeft,10)>0)return d;if((e=x.getParent(w.getEnd(),x.isBlock))&&parseInt(e.style.paddingLeft,10)>0)return d}return p("InsertUnorderedList")||p("InsertOrderedList")||!N.inline_styles&&!!x.getParent(w.getNode(),"BLOCKQUOTE")},"InsertUnorderedList,InsertOrderedList":function(e){var t=x.getParent(w.getNode(),"ul,ol");return t&&("insertunorderedlist"===e&&"UL"===t.tagName||"insertorderedlist"===e&&"OL"===t.tagName)}},"state"),m({"FontSize,FontName":function(e){var t=0,n;return(n=x.getParent(w.getNode(),"span"))&&(t="fontsize"==e?n.style.fontSize:n.style.fontFamily.replace(/, /g,",").replace(/[\'\"]/g,"").toLowerCase()),t}},"value"),m({Undo:function(){n.undoManager.undo()},Redo:function(){n.undoManager.redo()}})}}),r(P,[f],function(e){function n(e,o){var a=this,s,l;return e=i(e),o=a.settings=o||{},/^([\w\-]+):([^\/]{2})/i.test(e)||/^\s*#/.test(e)?(a.source=e,t):(0===e.indexOf("/")&&0!==e.indexOf("//")&&(e=(o.base_uri?o.base_uri.protocol||"http":"http")+"://mce_host"+e),/^[\w\-]*:?\/\//.test(e)||(l=o.base_uri?o.base_uri.path:new n(location.href).directory,e=(o.base_uri&&o.base_uri.protocol||"http")+"://mce_host"+a.toAbsPath(l,e)),e=e.replace(/@@/g,"(mce_at)"),e=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*):?([^:@\/]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(e),r(["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],function(t,n){var r=e[n];r&&(r=r.replace(/\(mce_at\)/g,"@@")),a[t]=r}),s=o.base_uri,s&&(a.protocol||(a.protocol=s.protocol),a.userInfo||(a.userInfo=s.userInfo),a.port||"mce_host"!==a.host||(a.port=s.port),a.host&&"mce_host"!==a.host||(a.host=s.host),a.source=""),t)}var r=e.each,i=e.trim;return n.prototype={setPath:function(e){var t=this;e=/^(.*?)\/?(\w+)?$/.exec(e),t.path=e[0],t.directory=e[1],t.file=e[2],t.source="",t.getURI()},toRelative:function(e){var t=this,r;if("./"===e)return e;if(e=new n(e,{base_uri:t}),"mce_host"!=e.host&&t.host!=e.host&&e.host||t.port!=e.port||t.protocol!=e.protocol)return e.getURI();var i=t.getURI(),o=e.getURI();return i==o||"/"==i.charAt(i.length-1)&&i.substr(0,i.length-1)==o?i:(r=t.toRelPath(t.path,e.path),e.query&&(r+="?"+e.query),e.anchor&&(r+="#"+e.anchor),r)},toAbsolute:function(e,t){return e=new n(e,{base_uri:this}),e.getURI(this.host==e.host&&this.protocol==e.protocol?t:0)},toRelPath:function(e,t){var n,r=0,i="",o,a;if(e=e.substring(0,e.lastIndexOf("/")),e=e.split("/"),n=t.split("/"),e.length>=n.length)for(o=0,a=e.length;a>o;o++)if(o>=n.length||e[o]!=n[o]){r=o+1;break}if(e.length<n.length)for(o=0,a=n.length;a>o;o++)if(o>=e.length||e[o]!=n[o]){r=o+1;break}if(1===r)return t;for(o=0,a=e.length-(r-1);a>o;o++)i+="../";for(o=r-1,a=n.length;a>o;o++)i+=o!=r-1?"/"+n[o]:n[o];return i},toAbsPath:function(e,t){var n,i=0,o=[],a,s;for(a=/\/$/.test(t)?"/":"",e=e.split("/"),t=t.split("/"),r(e,function(e){e&&o.push(e)}),e=o,n=t.length-1,o=[];n>=0;n--)0!==t[n].length&&"."!==t[n]&&(".."!==t[n]?i>0?i--:o.push(t[n]):i++);return n=e.length-i,s=0>=n?o.reverse().join("/"):e.slice(0,n).join("/")+"/"+o.reverse().join("/"),0!==s.indexOf("/")&&(s="/"+s),a&&s.lastIndexOf("/")!==s.length-1&&(s+=a),s},getURI:function(e){var t,n=this;return(!n.source||e)&&(t="",e||(n.protocol&&(t+=n.protocol+"://"),n.userInfo&&(t+=n.userInfo+"@"),n.host&&(t+=n.host),n.port&&(t+=":"+n.port)),n.path&&(t+=n.path),n.query&&(t+="?"+n.query),n.anchor&&(t+="#"+n.anchor),n.source=t),n.source}},n}),r(O,[f],function(e){function t(){}var n=e.each,r=e.extend,i,o;return t.extend=i=function(e){function t(){var e,t,n,r;if(!o&&(r=this,r.init&&r.init.apply(r,arguments),t=r.Mixins))for(e=t.length;e--;)n=t[e],n.init&&n.init.apply(r,arguments)}function a(){return this}function s(e,t){return function(){var n=this,r=n._super,i;return n._super=c[e],i=t.apply(n,arguments),n._super=r,i}}var l=this,c=l.prototype,u,d,f;o=!0,u=new l,o=!1,e.Mixins&&(n(e.Mixins,function(t){t=t;for(var n in t)"init"!==n&&(e[n]=t[n])}),c.Mixins&&(e.Mixins=c.Mixins.concat(e.Mixins))),e.Methods&&n(e.Methods.split(","),function(t){e[t]=a}),e.Properties&&n(e.Properties.split(","),function(t){var n="_"+t;e[t]=function(e){var t=this,r;return e!==r?(t[n]=e,t):t[n]}}),e.Statics&&n(e.Statics,function(e,n){t[n]=e}),e.Defaults&&c.Defaults&&(e.Defaults=r({},c.Defaults,e.Defaults));for(d in e)f=e[d],u[d]="function"==typeof f&&c[d]?s(d,f):f;return t.prototype=u,t.constructor=t,t.extend=i,t},t}),r(I,[O,f],function(e,n){function r(e){for(var t=[],n=e.length,r;n--;)r=e[n],r.__checked||(t.push(r),r.__checked=1);for(n=t.length;n--;)delete t[n].__checked;return t}var i=/^([\w\\*]+)?(?:#([\w\\]+))?(?:\.([\w\\\.]+))?(?:\[\@?([\w\\]+)([\^\$\*!~]?=)([\w\\]+)\])?(?:\:(.+))?/i,o=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,a=/^\s*|\s*$/g,s,l=e.extend({init:function(e){function n(e){return e?(e=e.toLowerCase(),function(t){return"*"===e||t.type===e}):t}function r(e){return e?function(t){return t._name===e}:t}function s(e){return e?(e=e.split("."),function(t){for(var n=e.length;n--;)if(!t.hasClass(e[n]))return!1;return!0}):t}function l(e,n,r){return e?function(t){var i=t[e]?t[e]():"";return n?"="===n?i===r:"*="===n?i.indexOf(r)>=0:"~="===n?(" "+i+" ").indexOf(" "+r+" ")>=0:"!="===n?i!=r:"^="===n?0===i.indexOf(r):"$="===n?i.substr(i.length-r.length)===r:!1:!!r}:t}function c(e){var n;return e?(e=/(?:not\((.+)\))|(.+)/i.exec(e),e[1]?(n=d(e[1],[]),function(e){return!f(e,n)}):(e=e[2],function(t,n,r){return"first"===e?0===n:"last"===e?n===r-1:"even"===e?0===n%2:"odd"===e?1===n%2:t[e]?t[e]():!1})):t}function u(e,t,o){function u(e){e&&t.push(e)}var d;return d=i.exec(e.replace(a,"")),u(n(d[1])),u(r(d[2])),u(s(d[3])),u(l(d[4],d[5],d[6])),u(c(d[7])),t.psuedo=!!d[7],t.direct=o,t}function d(e,t){var n=[],r,i,a;do if(o.exec(""),i=o.exec(e),i&&(e=i[3],n.push(i[1]),i[2])){r=i[3];break}while(i);for(r&&d(r,t),e=[],a=0;n.length>a;a++)">"!=n[a]&&e.push(u(n[a],[],">"===n[a-1]));return t.push(e),t}var f=this.match;this._selectors=d(e,[])},match:function(e,t){var r,i,o,a,s,l,c,u,d,f,p,h,m;for(t=t||this._selectors,r=0,i=t.length;i>r;r++){for(s=t[r],a=s.length,m=e,h=0,o=a-1;o>=0;o--)for(u=s[o];m;){for(u.psuedo&&(p=m.parent().items(),d=n.inArray(m,p),f=p.length),l=0,c=u.length;c>l;l++)if(!u[l](m,d,f)){l=c+1;break}if(l===c){h++;break}if(o===a-1)break;m=m.parent()}if(h===a)return!0}return!1},find:function(e){function t(e,r,i){var o,a,s,l,c,u=r[i];for(o=0,a=e.length;a>o;o++){for(c=e[o],s=0,l=u.length;l>s;s++)if(!u[s](c,o,a)){s=l+1;break}if(s===l)i==r.length-1?n.push(c):c.items&&t(c.items(),r,i+1);else if(u.direct)return;c.items&&t(c.items(),r,i)}}var n=[],i,o,a=this._selectors;if(e.items){for(i=0,o=a.length;o>i;i++)t(e.items(),a[i],0);o>1&&(n=r(n))}return s||(s=l.Collection),new s(n)}});return l}),r(F,[f,I,O],function(e,n,r){var i,o,a=Array.prototype.push,s=Array.prototype.slice;return o={length:0,init:function(e){e&&this.add(e)},add:function(t){var n=this;return e.isArray(t)?a.apply(n,t):t instanceof i?n.add(t.toArray()):a.call(n,t),n},set:function(e){var t=this,n=t.length,r;for(t.length=0,t.add(e),r=t.length;n>r;r++)delete t[r];return t},filter:function(e){var t=this,r,o,a=[],s,l;for("string"==typeof e?(e=new n(e),l=function(t){return e.match(t)}):l=e,r=0,o=t.length;o>r;r++)s=t[r],l(s)&&a.push(s);return new i(a)},slice:function(){return new i(s.apply(this,arguments))},eq:function(e){return-1===e?this.slice(e):this.slice(e,+e+1)},each:function(t){return e.each(this,t),this},toArray:function(){return e.toArray(this)},indexOf:function(e){for(var t=this,n=t.length;n--&&t[n]!==e;);return n},reverse:function(){return new i(e.toArray(this).reverse())},hasClass:function(e){return this[0]?this[0].hasClass(e):!1},prop:function(e,n){var r=this,i,o;return n!==i?(r.each(function(t){t[e]&&t[e](n)}),r):(o=r[0],o&&o[e]?o[e]():t)},exec:function(t){var n=this,r=e.toArray(arguments).slice(1);return n.each(function(e){e[t]&&e[t].apply(e,r)}),n}},e.each("fire on off show hide addClass removeClass append prepend before after reflow".split(" "),function(t){o[t]=function(){var n=e.toArray(arguments);return this.each(function(e){t in e&&e[t].apply(e,n)}),this}}),e.each("text name width height disabled active selected checked visible parent value data".split(" "),function(e){o[e]=function(t){return this.prop(e,t)}}),i=r.extend(o),n.Collection=i,i}),r(W,[f,g],function(e,t){return{id:function(){return t.DOM.uniqueId()},createFragment:function(e){return t.DOM.createFragment(e)},getWindowSize:function(){return t.DOM.getViewPort()},getSize:function(e){return t.DOM.getSize(e)},getPos:function(e,n){return t.DOM.getPos(e,n)},get:function(e){return document.getElementById(e)},addClass:function(e,n){return t.DOM.addClass(e,n)},removeClass:function(e,n){return t.DOM.removeClass(e,n)},hasClass:function(e,n){return t.DOM.hasClass(e,n)},toggleClass:function(e,n,r){return t.DOM.toggleClass(e,n,r)},css:function(e,n,r){return t.DOM.setStyle(e,n,r)},on:function(e,n,r,i){return t.DOM.bind(e,n,r,i)},off:function(e,n,r){return t.DOM.unbind(e,n,r)},fire:function(e,n,r){return t.DOM.fire(e,n,r)}}}),r(z,[O,f,F,W],function(e,n,r,i){var o=n.makeMap("focusin focusout scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave wheel keydown keypress keyup contextmenu"," "),a={},s="onmousewheel"in document,l=!1,c=e.extend({Statics:{controlIdLookup:{}},classPrefix:"mce-",getContainerElm:function(){return document.body},getParentCtrl:function(e){for(var t;e&&!(t=c.controlIdLookup[e.id]);)e=e.parentNode;return t},init:function(e){var r=this,o,a;if(r.settings=e=n.extend({},r.Defaults,e),r._id=i.id(),r._text=r._name="",r._width=r._height=0,r._aria={role:e.role},o=e.classes)for(o=o.split(" "),o.map={},a=o.length;a--;)o.map[o[a]]=!0;r._classes=o||[],r.visible(!0),n.each("title text width height name classes visible disabled active value".split(" "),function(t){var n=e[t],i;n!==i?r[t](n):r["_"+t]===i&&(r["_"+t]=!1)}),r.on("click",function(){return r.disabled()?!1:t}),e.classes&&n.each(e.classes.split(" "),function(e){r.addClass(e)}),r.settings=e,r._borderBox=r.parseBox(e.border),r._paddingBox=r.parseBox(e.padding),r._marginBox=r.parseBox(e.margin),e.hidden&&r.hide()},Properties:"parent,title,text,width,height,disabled,active,name,value",Methods:"renderHtml,refresh",parseBox:function(e){var t,n=10;if(e)return"number"==typeof e?(e=e||0,{top:e,left:e,bottom:e,right:e}):(e=e.split(" "),t=e.length,1===t?e[1]=e[2]=e[3]=e[0]:2===t?(e[2]=e[0],e[3]=e[1]):3===t&&(e[3]=e[1]),{top:parseInt(e[0],n)||0,right:parseInt(e[1],n)||0,bottom:parseInt(e[2],n)||0,left:parseInt(e[3],n)||0})},borderBox:function(){return this._borderBox},paddingBox:function(){return this._paddingBox},marginBox:function(){return this._marginBox},measureBox:function(e,t){function n(t){var n=document.defaultView;return n?(t=t.replace(/[A-Z]/g,function(e){return"-"+e}),n.getComputedStyle(e,null).getPropertyValue(t)):e.currentStyle[t]}function r(e){var t=parseInt(n(e),10);return isNaN(t)?0:t}return{top:r(t+"TopWidth"),right:r(t+"RightWidth"),bottom:r(t+"BottomWidth"),left:r(t+"LeftWidth")}},initLayoutRect:function(){var e=this,n=e.settings,r,i,o=e.getEl(),a,s,l,c,u,d,f;r=e._borderBox=e._borderBox||e.measureBox(o,"border"),e._paddingBox=e._paddingBox||e.measureBox(o,"padding"),e._marginBox=e._marginBox||e.measureBox(o,"margin"),d=n.minWidth,f=n.minHeight,l=d||o.offsetWidth,c=f||o.offsetHeight,a=n.width,s=n.height,u=n.autoResize,u=u!==t?u:!a&&!s,a=a||l,s=s||c;var p=r.left+r.right,h=r.top+r.bottom,m=n.maxWidth||65535,g=n.maxHeight||65535;return e._layoutRect=i={x:n.x||0,y:n.y||0,w:a,h:s,deltaW:p,deltaH:h,contentW:a-p,contentH:s-h,innerW:a-p,innerH:s-h,startMinWidth:d||0,startMinHeight:f||0,minW:Math.min(l,m),minH:Math.min(c,g),maxW:m,maxH:g,autoResize:u,scrollW:0},e._lastLayoutRect={},i},layoutRect:function(e){var t=this,n=t._layoutRect,r,i,o,a,s,l;return n||(n=t.initLayoutRect()),e?(o=n.deltaW,a=n.deltaH,e.x!==s&&(n.x=e.x),e.y!==s&&(n.y=e.y),e.minW!==s&&(n.minW=e.minW),e.minH!==s&&(n.minH=e.minH),i=e.w,i!==s&&(i=n.minW>i?n.minW:i,i=i>n.maxW?n.maxW:i,n.w=i,n.innerW=i-o),i=e.h,i!==s&&(i=n.minH>i?n.minH:i,i=i>n.maxH?n.maxH:i,n.h=i,n.innerH=i-a),i=e.innerW,i!==s&&(i=n.minW-o>i?n.minW-o:i,i=i>n.maxW-o?n.maxW-o:i,n.innerW=i,n.w=i+o),i=e.innerH,i!==s&&(i=n.minH-a>i?n.minH-a:i,i=i>n.maxH-a?n.maxH-a:i,n.innerH=i,n.h=i+a),e.contentW!==s&&(n.contentW=e.contentW),e.contentH!==s&&(n.contentH=e.contentH),r=t._lastLayoutRect,(r.x!==n.x||r.y!==n.y||r.w!==n.w||r.h!==n.h)&&(l=c.repaintControls,l&&l.map&&!l.map[t._id]&&(l.push(t),l.map[t._id]=!0),r.x=n.x,r.y=n.y,r.w=n.w,r.h=n.h),t):n},repaint:function(){var e=this,t,n,r,i,o=0,a=0,s;t=e.getEl().style,r=e._layoutRect,s=e._lastRepaintRect||{},i=e._borderBox,o=i.left+i.right,a=i.top+i.bottom,r.x!==s.x&&(t.left=r.x+"px",s.x=r.x),r.y!==s.y&&(t.top=r.y+"px",s.y=r.y),r.w!==s.w&&(t.width=r.w-o+"px",s.w=r.w),r.h!==s.h&&(t.height=r.h-a+"px",s.h=r.h),e._hasBody&&r.innerW!==s.innerW&&(n=e.getEl("body").style,n.width=r.innerW+"px",s.innerW=r.innerW),e._hasBody&&r.innerH!==s.innerH&&(n=n||e.getEl("body").style,n.height=r.innerH+"px",s.innerH=r.innerH),e._lastRepaintRect=s,e.fire("repaint",{},!1)},on:function(e,n){function r(e){var n,r;return function(o){return n||i.parents().each(function(i){var o=i.settings.callbacks;return o&&(n=o[e])?(r=i,!1):t}),n.call(r,o)}}var i=this,a,s,l,c;if(n)for("string"==typeof n&&(n=r(n)),l=e.toLowerCase().split(" "),c=l.length;c--;)e=l[c],a=i._bindings,a||(a=i._bindings={}),s=a[e],s||(s=a[e]=[]),s.push(n),o[e]&&(i._nativeEvents?i._nativeEvents[e]=!0:i._nativeEvents={name:!0},i._rendered&&i.bindPendingEvents());return i},off:function(e,t){var n=this,r,i=n._bindings,o,a,s,l;if(i)if(e)for(s=e.toLowerCase().split(" "),r=s.length;r--;){if(e=s[r],o=i[e],!e){for(a in i)i[a].length=0;return n}if(o)if(t)for(l=o.length;l--;)o[l]===t&&o.splice(l,1);else o.length=0}else n._bindings=[];return n},fire:function(e,t,n){function r(){return!1}function i(){return!0}var o=this,a,s,l,c;if(e=e.toLowerCase(),t=t||{},t.type||(t.type=e),t.control||(t.control=o),t.preventDefault||(t.preventDefault=function(){t.isDefaultPrevented=i},t.stopPropagation=function(){t.isPropagationStopped=i},t.stopImmediatePropagation=function(){t.isImmediatePropagationStopped=i},t.isDefaultPrevented=r,t.isPropagationStopped=r,t.isImmediatePropagationStopped=r),o._bindings&&(l=o._bindings[e]))for(a=0,s=l.length;s>a&&(t.isImmediatePropagationStopped()||l[a].call(o,t)!==!1);a++);if(n!==!1)for(c=o.parent();c&&!t.isPropagationStopped();)c.fire(e,t,!1),c=c.parent();return t},parents:function(e){var t=this,n=new r;for(t=t.parent();t;t=t.parent())n.add(t);return e&&(n=n.filter(e)),n},next:function(){var e=this.parent().items();return e[e.indexOf(this)+1]},prev:function(){var e=this.parent().items();return e[e.indexOf(this)-1]},findCommonAncestor:function(e,t){for(var n;e;){for(n=t;n&&e!=n;)n=n.parent();if(e==n)break;e=e.parent()}return e},hasClass:function(e,t){var n=this._classes[t||"control"];return e=this.classPrefix+e,n&&!!n.map[e]},addClass:function(e,t){var n=this,r,i;return e=this.classPrefix+e,r=n._classes[t||"control"],r||(r=[],r.map={},n._classes[t||"control"]=r),r.map[e]||(r.map[e]=e,r.push(e),n._rendered&&(i=n.getEl(t),i&&(i.className=r.join(" ")))),n},removeClass:function(e,t){var n=this,r,i,o;if(e=this.classPrefix+e,r=n._classes[t||"control"],r&&r.map[e])for(delete r.map[e],i=r.length;i--;)r[i]===e&&r.splice(i,1);return n._rendered&&(o=n.getEl(t),o&&(o.className=r.join(" "))),n},toggleClass:function(e,t,n){var r=this;return t?r.addClass(e,n):r.removeClass(e,n),r},classes:function(e){var t=this._classes[e||"control"];return t?t.join(" "):""},getEl:function(e,t){var n,r=e?this._id+"-"+e:this._id;return n=a[r]=(t===!0?null:a[r])||i.get(r)},visible:function(e){var n=this,r;return e!==t?(n._visible!==e&&(n._rendered&&(n.getEl().style.display=e?"":"none"),n._visible=e,r=n.parent(),r&&(r._lastRect=null),n.fire(e?"show":"hide")),n):n._visible},show:function(){return this.visible(!0)},hide:function(){return this.visible(!1)},focus:function(){try{this.getEl().focus()}catch(e){}},blur:function(){this.getEl().blur()},aria:function(e,n){var r=this,i=r.getEl();return n===t?r._aria[e]:(r._aria[e]=n,r._rendered&&("label"==e&&i.setAttribute("aria-labeledby",r._id),i.setAttribute("role"==e?e:"aria-"+e,n)),r)},encode:function(e,t){return t!==!1&&c.translate&&(e=c.translate(e)),(e||"").replace(/[&<>"]/g,function(e){return"&#"+e.charCodeAt(0)+";"})},before:function(e){var t=this,n=t.parent();return n&&n.insert(e,n.items().indexOf(t),!0),t},after:function(e){var t=this,n=t.parent();return n&&n.insert(e,n.items().indexOf(t)),t},remove:function(){var e=this,t=e.getEl(),n=e.parent(),r;if(e.items)for(var o=e.items().toArray(),a=o.length;a--;)o[a].remove();return n&&n.items&&(r=[],n.items().each(function(t){t!==e&&r.push(t)}),n.items().set(r),n._lastRect=null),e._eventsRoot&&e._eventsRoot==e&&i.off(t),delete c.controlIdLookup[e._id],t.parentNode&&t.parentNode.removeChild(t),e},renderBefore:function(e){var t=this;return e.parentNode.insertBefore(i.createFragment(t.renderHtml()),e),t.postRender(),t},renderTo:function(e){var t=this;return e=e||t.getContainerElm(),e.appendChild(i.createFragment(t.renderHtml())),t.postRender(),t},postRender:function(){var e=this,t=e.settings,n,r,o,a,s;for(a in t)0===a.indexOf("on")&&e.on(a.substr(2),t[a]);if(e._eventsRoot){for(o=e.parent();!s&&o;o=o.parent())s=o._eventsRoot;if(s)for(a in s._nativeEvents)e._nativeEvents[a]=!0}e.bindPendingEvents(),t.style&&(n=e.getEl(),n&&(n.setAttribute("style",t.style),n.style.cssText=t.style)),e._visible||i.css(e.getEl(),"display","none"),e.settings.border&&(r=e.borderBox(),i.css(e.getEl(),{"border-top-width":r.top,"border-right-width":r.right,"border-bottom-width":r.bottom,"border-left-width":r.left})),c.controlIdLookup[e._id]=e;for(var l in e._aria)e.aria(l,e._aria[l]);e.fire("postrender",{},!1)},scrollIntoView:function(e){function t(e,t){var n,r,i=e;for(n=r=0;i&&i!=t&&i.nodeType;)n+=i.offsetLeft||0,r+=i.offsetTop||0,i=i.offsetParent;return{x:n,y:r}}var n=this.getEl(),r=n.parentNode,i,o,a,s,l,c,u=t(n,r);i=u.x,o=u.y,a=n.offsetWidth,s=n.offsetHeight,l=r.clientWidth,c=r.clientHeight,"end"==e?(i-=l-a,o-=c-s):"center"==e&&(i-=l/2-a/2,o-=c/2-s/2),r.scrollLeft=i,r.scrollTop=o},bindPendingEvents:function(){function e(e){var t=o.getParentCtrl(e.target);t&&t.fire(e.type,e)}function t(){var e=d._lastHoverCtrl;e&&(e.fire("mouseleave",{target:e.getEl()}),e.parents().each(function(e){e.fire("mouseleave",{target:e.getEl()})}),d._lastHoverCtrl=null)}function n(e){var t=o.getParentCtrl(e.target),n=d._lastHoverCtrl,r=0,i,a,s;if(t!==n){if(d._lastHoverCtrl=t,a=t.parents().toArray().reverse(),a.push(t),n){for(s=n.parents().toArray().reverse(),s.push(n),r=0;s.length>r&&a[r]===s[r];r++);for(i=s.length-1;i>=r;i--)n=s[i],n.fire("mouseleave",{target:n.getEl()})}for(i=r;a.length>i;i++)t=a[i],t.fire("mouseenter",{target:t.getEl()})}}function r(e){e.preventDefault(),"mousewheel"==e.type?(e.deltaY=-1/40*e.wheelDelta,e.wheelDeltaX&&(e.deltaX=-1/40*e.wheelDeltaX)):(e.deltaX=0,e.deltaY=e.detail),e=o.fire("wheel",e)}var o=this,a,c,u,d,f,p;
7if(o._rendered=!0,f=o._nativeEvents){for(u=o.parents().toArray(),u.unshift(o),a=0,c=u.length;!d&&c>a;a++)d=u[a]._eventsRoot;for(d||(d=u[u.length-1]||o),o._eventsRoot=d,c=a,a=0;c>a;a++)u[a]._eventsRoot=d;for(p in f){if(!f)return!1;"wheel"!==p||l?("mouseenter"===p||"mouseleave"===p?d._hasMouseEnter||(i.on(d.getEl(),"mouseleave",t),i.on(d.getEl(),"mouseover",n),d._hasMouseEnter=1):d[p]||(i.on(d.getEl(),p,e),d[p]=!0),f[p]=!1):s?i.on(o.getEl(),"mousewheel",r):i.on(o.getEl(),"DOMMouseScroll",r)}}},reflow:function(){return this.repaint(),this}});return c}),r(V,[],function(){var e={},t;return{add:function(t,n){e[t.toLowerCase()]=n},has:function(t){return!!e[t.toLowerCase()]},create:function(n,r){var i,o,a;if(!t){a=tinymce.ui;for(o in a)e[o.toLowerCase()]=a[o];t=!0}if("string"==typeof n?(r=r||{},r.type=n):(r=n,n=r.type),n=n.toLowerCase(),i=e[n],!i)throw Error("Could not find control by type: "+n);return i=new i(r),i.type=n,i}}}),r(U,[z,F,I,V,f,W],function(e,n,r,i,o,a){var s={};return e.extend({layout:"",innerClass:"container-inner",init:function(e){var t=this;t._super(e),e=t.settings,t._items=new n,t.addClass("container"),t.addClass("container-body","body"),e.containerCls&&t.addClass(e.containerCls),t._layout=i.create((e.layout||t.layout)+"layout"),t.settings.items&&t.add(t.settings.items),t._hasBody=!0},items:function(){return this._items},find:function(e){return e=s[e]=s[e]||new r(e),e.find(this)},add:function(e){var t=this;return t.items().add(t.create(e)).parent(t),t},focus:function(){var e=this;return e.keyNav?e.keyNav.focusFirst():e._super(),e},replace:function(e,t){for(var n,r=this.items(),i=r.length;i--;)if(r[i]===e){r[i]=t;break}i>=0&&(n=t.getEl(),n&&n.parentNode.removeChild(n),n=e.getEl(),n&&n.parentNode.removeChild(n)),t.parent(this)},create:function(t){var n=this,r,a=[];return o.isArray(t)||(t=[t]),o.each(t,function(t){t&&(t instanceof e||("string"==typeof t&&(t={type:t}),r=o.extend({},n.settings.defaults,t),t.type=r.type=r.type||t.type||n.settings.defaultType||(r.defaults?r.defaults.type:null),t=i.create(r)),a.push(t))}),a},renderNew:function(){var e=this;return e.items().each(function(t,n){var r,i;t.parent(e),t._rendered||(r=e.getEl("body"),i=a.createFragment(t.renderHtml()),r.hasChildNodes()&&r.childNodes.length-1>=n?r.insertBefore(i,r.childNodes[n]):r.appendChild(i),t.postRender())}),e._layout.applyClasses(e),e._lastRect=null,e},append:function(e){return this.add(e).renderNew()},prepend:function(e){var t=this;return t.items().set(t.create(e).concat(t.items().toArray())),t.renderNew()},insert:function(e,t,n){var r=this,i,o,a;return e=r.create(e),i=r.items(),n||(t+=1),t>=0&&i.length>t&&(o=i.slice(0,t).toArray(),a=i.slice(t).toArray(),i.set(o.concat(e,a))),r.renderNew()},preRender:function(){},renderHtml:function(){var e=this,t=e._layout;return e.preRender(),t.preRender(e),'<div id="'+e._id+'" class="'+e.classes()+'" role="'+this.settings.role+'">'+'<div id="'+e._id+'-body" class="'+e.classes("body")+'">'+(e.settings.html||"")+t.renderHtml(e)+"</div>"+"</div>"},postRender:function(){var e=this,t;return e.items().exec("postRender"),e._super(),e._layout.postRender(e),e._rendered=!0,e.settings.style&&a.css(e.getEl(),e.settings.style),e.settings.border&&(t=e.borderBox(),a.css(e.getEl(),{"border-top-width":t.top,"border-right-width":t.right,"border-bottom-width":t.bottom,"border-left-width":t.left})),e},initLayoutRect:function(){var e=this,t=e._super();return e._layout.recalc(e),t},recalc:function(){var e=this,n=e._layoutRect,r=e._lastRect;return r&&r.w==n.w&&r.h==n.h?t:(e._layout.recalc(e),n=e.layoutRect(),e._lastRect={x:n.x,y:n.y,w:n.w,h:n.h},!0)},reflow:function(){var t,n;if(this.visible()){for(e.repaintControls=[],e.repaintControls.map={},n=this.recalc(),t=e.repaintControls.length;t--;)e.repaintControls[t].repaint();"flow"!==this.settings.layout&&"stack"!==this.settings.layout&&this.repaint(),e.repaintControls=[]}return this}})}),r(q,[W],function(e){function n(){var e=document,t,n,r,i,o,a,s,l,c=Math.max;return t=e.documentElement,n=e.body,r=c(t.scrollWidth,n.scrollWidth),i=c(t.clientWidth,n.clientWidth),o=c(t.offsetWidth,n.offsetWidth),a=c(t.scrollHeight,n.scrollHeight),s=c(t.clientHeight,n.clientHeight),l=c(t.offsetHeight,n.offsetHeight),{width:o>r?i:r,height:l>a?s:a}}return function(r,i){function o(){return s.getElementById(i.handle||r)}var a,s=document,l,c,u,d,f,p;i=i||{},c=function(t){var r=n(),c,h;t.preventDefault(),l=t.button,c=o(),f=t.screenX,p=t.screenY,h=window.getComputedStyle?window.getComputedStyle(c,null).getPropertyValue("cursor"):c.runtimeStyle.cursor,a=s.createElement("div"),e.css(a,{position:"absolute",top:0,left:0,width:r.width,height:r.height,zIndex:65535,opacity:1e-4,background:"red",cursor:h}),s.body.appendChild(a),e.on(s,"mousemove",d),e.on(s,"mouseup",u),i.start(t)},d=function(e){return e.button!==l?u(e):(e.deltaX=e.screenX-f,e.deltaY=e.screenY-p,e.preventDefault(),i.drag(e),t)},u=function(t){e.off(s,"mousemove",d),e.off(s,"mouseup",u),a.parentNode.removeChild(a),i.stop&&i.stop(t)},this.destroy=function(){e.off(o())},e.on(o(),"mousedown",c)}}),r($,[W,q],function(e,n){return{init:function(){var e=this;e.on("repaint",e.renderScroll)},renderScroll:function(){function r(){function n(n,s,l,c,u,d){var f,p,h,m,g,v,y,b,C;if(p=o.getEl("scroll"+n)){if(b=s.toLowerCase(),C=l.toLowerCase(),o.getEl("absend")&&e.css(o.getEl("absend"),b,o.layoutRect()[c]-1),!u)return e.css(p,"display","none"),t;e.css(p,"display","block"),f=o.getEl("body"),h=o.getEl("scroll"+n+"t"),m=f["client"+l]-2*a,m-=r&&i?p["client"+d]:0,g=f["scroll"+l],v=m/g,y={},y[b]=f["offset"+s]+a,y[C]=m,e.css(p,y),y={},y[b]=f["scroll"+s]*v,y[C]=m*v,e.css(h,y)}}var r,i,s;s=o.getEl("body"),r=s.scrollWidth>s.clientWidth,i=s.scrollHeight>s.clientHeight,n("h","Left","Width","contentW",r,"Height"),n("v","Top","Height","contentH",i,"Width")}function i(){function t(t,r,i,s,l){var c,u=o._id+"-scroll"+t,d=o.classPrefix;o.getEl().appendChild(e.createFragment('<div id="'+u+'" class="'+d+"scrollbar "+d+"scrollbar-"+t+'">'+'<div id="'+u+'t" class="'+d+'scrollbar-thumb"></div>'+"</div>")),o.draghelper=new n(u+"t",{start:function(){c=o.getEl("body")["scroll"+r],e.addClass(e.get(u),d+"active")},drag:function(e){var n,u,d,f,p=o.layoutRect();u=p.contentW>p.innerW,d=p.contentH>p.innerH,f=o.getEl("body")["client"+i]-2*a,f-=u&&d?o.getEl("scroll"+t)["client"+l]:0,n=f/o.getEl("body")["scroll"+i],o.getEl("body")["scroll"+r]=c+e["delta"+s]/n},stop:function(){e.removeClass(e.get(u),d+"active")}})}o.addClass("scroll"),t("v","Top","Height","Y","Width"),t("h","Left","Width","X","Height")}var o=this,a=2;o.settings.autoScroll&&(o._hasScroll||(o._hasScroll=!0,i(),o.on("wheel",function(e){var t=o.getEl("body");t.scrollLeft+=10*(e.deltaX||0),t.scrollTop+=10*e.deltaY,r()}),e.on(o.getEl("body"),"scroll",r)),r())}}}),r(j,[U,$],function(e,n){var r=e.extend({Defaults:{layout:"fit",containerCls:"panel"},Mixins:[n],fromJSON:function(e){var t=this;for(var n in e)t.find("#"+n).value(e[n]);return t},toJSON:function(){var e=this,n={};return e.find("*").each(function(e){var r=e.name(),i=e.value();r&&i!==t&&(n[r]=i)}),n},renderHtml:function(){var e=this,n=e._layout,r=e.settings.html;return e.preRender(),n.preRender(e),r===t?r='<div id="'+e._id+'-body" class="'+e.classes("body")+'">'+n.renderHtml(e)+"</div>":("function"==typeof r&&(r=r.call(e)),e._hasBody=!1),'<div id="'+e._id+'" class="'+e.classes()+'" hideFocus="1" tabIndex="-1">'+(e._preBodyHtml||"")+r+"</div>"}});return r}),r(K,[W],function(e){return{moveRel:function(t,n){var r=this,i,o,a,s,l,c,u,d;return o=e.getPos(t),a=o.x,s=o.y,i=r.getEl(),l=i.offsetWidth,c=i.offsetHeight,u=t.offsetWidth,d=t.offsetHeight,n=(n||"").split(""),"b"===n[0]&&(s+=d),"r"===n[1]&&(a+=u),"c"===n[0]&&(s+=Math.round(d/2)),"c"===n[1]&&(a+=Math.round(u/2)),"b"===n[3]&&(s-=c),"r"===n[4]&&(a-=l),"c"===n[3]&&(s-=Math.round(c/2)),"c"===n[4]&&(a-=Math.round(l/2)),r.moveTo(a,s),r},moveBy:function(e,t){var n=this,r=n.layoutRect();return n.moveTo(r.x+e,r.y+t),n},moveTo:function(e,t){var n=this;return n._rendered?n.layoutRect({x:e,y:t}).repaint():(n.settings.x=e,n.settings.y=t),n.fire("move",{x:e,y:t}),n}}}),r(G,[W],function(e){return{resizeToContent:function(){this._layoutRect.autoResize=!0,this._lastRect=null,this.reflow()},resizeTo:function(t,n){if(1>=t||1>=n){var r=e.getWindowSize();t=1>=t?t*r.w:t,n=1>=n?n*r.h:n}return this._layoutRect.autoResize=!1,this.layoutRect({minW:t,minH:n,w:t,h:n}).reflow()},resizeBy:function(e,t){var n=this,r=n.layoutRect();return n.resizeTo(r.w+e,r.h+t)}}}),r(Y,[j,K,G,W],function(e,t,n,r){function i(e){var t;for(t=s.length;t--;)s[t]===e&&s.splice(t,1)}var o,a,s=[],l=[],c,u=e.extend({Mixins:[t,n],init:function(e){function t(){var e,t=u.zIndex||65535,n;if(l.length)for(e=0;l.length>e;e++)l[e].modal&&(t++,n=l[e]),l[e].getEl().style.zIndex=t,l[e].zIndex=t,t++;var i=document.getElementById(d.classPrefix+"modal-block");n?r.css(i,"z-index",n.zIndex-1):i&&(i.parentNode.removeChild(i),c=!1),u.currentZIndex=t}function n(e,t){for(;e;){if(e==t)return!0;e=e.parent()}}function i(e){var t=document.body.scrollTop||window.pageYOffset||document.documentElement.scrollTop;e.settings.autofix&&(t>(e._absY||e.layoutRect().y)?(e._absY=e._absY||e.layoutRect().y,e.getEl().style.position="fixed",e.layoutRect({y:0}).repaint()):(e.getEl().style.position="absolute",e.layoutRect({y:e._absY}).repaint()))}var d=this;d._super(e),d._eventsRoot=d,d.addClass("floatpanel"),e.autohide&&(o||(o=function(e){var t,r=d.getParentCtrl(e.target);for(t=s.length;t--;){var i=s[t];if(i.settings.autohide){if(r&&(n(r,i)||i.parent()===r))continue;i.hide()}}},r.on(document,"click",o)),s.push(d)),e.autofix&&(a||(a=function(){var e;for(e=s.length;e--;)i(s[e])},r.on(window,"scroll",a)),d.on("move",function(){i(this)})),d.on("postrender show",function(e){if(e.control==d){var n,i=d.classPrefix;d.modal&&!c&&(n=r.createFragment('<div id="'+i+'modal-block" class="'+i+"reset "+i+'fade"></div>'),n=n.firstChild,d.getContainerElm().appendChild(n),setTimeout(function(){r.addClass(n,i+"in"),r.addClass(d.getEl(),i+"in")},0),c=!0),l.push(d),t()}}),d.on("close hide",function(e){if(e.control==d){for(var n=l.length;n--;)l[n]===d&&l.splice(n,1);t()}}),e.popover&&(d._preBodyHtml='<div class="'+d.classPrefix+'arrow"></div>',d.addClass("popover").addClass("bottom").addClass("start"))},show:function(){var e=this,t,n=e._super();for(t=s.length;t--&&s[t]!==e;);return-1===t&&s.push(e),n},hide:function(){return i(this),this._super()},hideAll:function(){u.hideAll()},close:function(){var e=this;return e.fire("close"),e.remove()},remove:function(){i(this),this._super()}});return u.hideAll=function(){for(var e=s.length;e--;){var t=s[e];t.settings.autohide&&(t.fire("cancel",{},!1),t.hide(),s.splice(e,1))}},u}),r(X,[W],function(e){return function(n){function r(){if(!m)if(m=[],f.find)f.find("*").each(function(e){e.canFocus&&m.push(e.getEl())});else for(var e=f.getEl().getElementsByTagName("*"),t=0;e.length>t;t++)e[t].id&&e[t]&&m.push(e[t])}function i(){return document.getElementById(g)}function o(e){return e=e||i(),e&&e.getAttribute("role")}function a(e){for(var t,n=e||i();n=n.parentNode;)if(t=o(n))return t}function s(e){var n=document.getElementById(g);return n?n.getAttribute("aria-"+e):t}function l(){var t=i();if(!t||"TEXTAREA"!=t.nodeName&&"text"!=t.type)return n.onAction?n.onAction(g):e.fire(i(),"click",{keyboard:!0}),!0}function c(){var e;n.onCancel?((e=i())&&e.blur(),n.onCancel()):n.root.fire("cancel")}function u(e){var t=-1,i,o;for(r(),o=m.length;o--;)if(m[o].id===g){t=o;break}t+=e,0>t?t=m.length-1:t>=m.length&&(t=0),i=m[t],i.focus(),g=i.id,n.actOnFocus&&l()}function d(){var e,i;for(i=o(n.root.getEl()),r(),e=m.length;e--;)if("toolbar"==i&&m[e].id===g)return m[e].focus(),t;m[0].focus()}var f=n.root,p=n.enableUpDown!==!1,h=n.enableLeftRight!==!1,m=n.items,g;return f.on("keydown",function(e){var t=37,r=39,i=38,d=40,f=27,m=14,g=13,v=32,y=9,b;switch(e.keyCode){case t:h&&(n.leftAction?n.leftAction():u(-1),b=!0);break;case r:h&&("menuitem"==o()&&"menu"==a()?s("haspopup")&&l():u(1),b=!0);break;case i:p&&(u(-1),b=!0);break;case d:p&&("menuitem"==o()&&"menubar"==a()?l():"button"==o()&&s("haspopup")?l():u(1),b=!0);break;case y:b=!0,e.shiftKey?u(-1):u(1);break;case f:b=!0,c();break;case m:case g:case v:b=l()}b&&(e.stopPropagation(),e.preventDefault())}),f.on("focusin",function(e){r(),g=e.target.id}),{moveFocus:u,focusFirst:d,cancel:c}}}),r(J,[Y,j,W,X,q],function(e,n,r,i,o){var a=e.extend({modal:!0,Defaults:{border:1,layout:"flex",containerCls:"panel",role:"dialog",callbacks:{submit:function(){this.fire("submit",{data:this.toJSON()})},close:function(){this.close()}}},init:function(e){var t=this;t._super(e),t.addClass("window"),e.buttons&&(t.statusbar=new n({layout:"flex",border:"1 0 0 0",spacing:3,padding:10,align:"center",pack:"end",defaults:{type:"button"},items:e.buttons}),t.statusbar.addClass("foot"),t.statusbar.parent(t)),t.on("click",function(e){-1!=e.target.className.indexOf(t.classPrefix+"close")&&t.close()}),t.aria("label",e.title),t._fullscreen=!1},recalc:function(){var e=this,t=e.statusbar,n,i,o;e._fullscreen&&(e.layoutRect(r.getWindowSize()),e.layoutRect().contentH=e.layoutRect().innerH),e._super(),n=e.layoutRect(),e.settings.title&&!e._fullscreen&&(i=n.headerW,i>n.w&&(e.layoutRect({w:i}),o=!0)),t&&(t.layoutRect({w:e.layoutRect().innerW}).recalc(),i=t.layoutRect().minW+n.deltaW,i>n.w&&(e.layoutRect({w:i}),o=!0)),o&&e.recalc()},initLayoutRect:function(){var e=this,t=e._super(),n=0,i;e.settings.title&&!e._fullscreen&&(i=e.getEl("head"),t.headerW=i.offsetWidth,t.headerH=i.offsetHeight,n+=t.headerH),e.statusbar&&(n+=e.statusbar.layoutRect().h),t.deltaH+=n,t.minH+=n,t.h+=n;var o=r.getWindowSize();return t.x=Math.max(0,o.w/2-t.w/2),t.y=Math.max(0,o.h/2-t.h/2),t},renderHtml:function(){var e=this,n=e._layout,r=e._id,i=e.classPrefix,o=e.settings,a="",s="",l=o.html;return e.preRender(),n.preRender(e),o.title&&(a='<div id="'+r+'-head" class="'+i+'window-head">'+'<div class="'+i+'title">'+e.encode(o.title)+"</div>"+'<button type="button" class="'+i+'close" aria-hidden="true">&times;</button>'+'<div id="'+r+'-dragh" class="'+i+'dragh"></div>'+"</div>"),o.url&&(l='<iframe src="'+o.url+'" tabindex="-1"></iframe>'),l===t&&(l=n.renderHtml(e)),e.statusbar&&(s=e.statusbar.renderHtml()),'<div id="'+r+'" class="'+e.classes()+'" hideFocus="1" tabIndex="-1">'+a+'<div id="'+r+'-body" class="'+e.classes("body")+'">'+l+"</div>"+s+"</div>"},fullscreen:function(e){var t=this,n=document.documentElement,i,o=t.classPrefix,a;if(e!=t._fullscreen)if(r.on(window,"resize",function(){var e;if(t._fullscreen)if(i)t._timer||(t._timer=setTimeout(function(){var e=r.getWindowSize();t.moveTo(0,0).resizeTo(e.w,e.h),t._timer=0},50));else{e=(new Date).getTime();var n=r.getWindowSize();t.moveTo(0,0).resizeTo(n.w,n.h),(new Date).getTime()-e>50&&(i=!0)}}),a=t.layoutRect(),t._fullscreen=e,e){t._initial={x:a.x,y:a.y,w:a.w,h:a.h},t._borderBox=t.parseBox("0"),t.getEl("head").style.display="none",a.deltaH-=a.headerH+2,r.addClass(n,o+"fullscreen"),r.addClass(document.body,o+"fullscreen"),t.addClass("fullscreen");var s=r.getWindowSize();t.moveTo(0,0).resizeTo(s.w,s.h)}else t._borderBox=t.parseBox(t.settings.border),t.getEl("head").style.display="",a.deltaH+=a.headerH,r.removeClass(n,o+"fullscreen"),r.removeClass(document.body,o+"fullscreen"),t.removeClass("fullscreen"),t.moveTo(t._initial.x,t._initial.y).resizeTo(t._initial.w,t._initial.h);return t.reflow()},postRender:function(){var e=this,t=[],n,r,a;setTimeout(function(){e.addClass("in")},0),e.keyboardNavigation=new i({root:e,enableLeftRight:!1,enableUpDown:!1,items:t,onCancel:function(){e.close()}}),e.find("*").each(function(e){e.canFocus&&(r=r||e.settings.autofocus,n=n||e,"filepicker"==e.type?(t.push(e.getEl("inp")),e.getEl("open")&&t.push(e.getEl("open").firstChild)):t.push(e.getEl()))}),e.statusbar&&e.statusbar.find("*").each(function(e){e.canFocus&&(r=r||e.settings.autofocus,n=n||e,t.push(e.getEl()))}),e._super(),e.statusbar&&e.statusbar.postRender(),!r&&n&&n.focus(),this.dragHelger=new o(e._id+"-dragh",{start:function(){a={x:e.layoutRect().x,y:e.layoutRect().y}},drag:function(t){e.moveTo(a.x+t.deltaX,a.y+t.deltaY)}}),e.on("submit",function(t){t.isDefaultPrevented()||e.close()})},submit:function(){return this.fire("submit",{data:this.toJSON()})},remove:function(){var e=this;e._super(),e.dragHelger.destroy(),e.statusbar&&this.statusbar.remove()}});return a}),r(Q,[J],function(e){var t=e.extend({init:function(e){e={border:1,padding:20,layout:"flex",pack:"center",align:"center",containerCls:"panel",autoScroll:!0,buttons:{type:"button",text:"Ok",action:"ok"},items:{type:"label",multiline:!0,maxWidth:500,maxHeight:200}},this._super(e)},Statics:{OK:1,OK_CANCEL:2,YES_NO:3,YES_NO_CANCEL:4,msgBox:function(n){var r,i=n.callback||function(){};switch(n.buttons){case t.OK_CANCEL:r=[{type:"button",text:"Ok",subtype:"primary",onClick:function(e){e.control.parents()[1].close(),i(!0)}},{type:"button",text:"Cancel",onClick:function(e){e.control.parents()[1].close(),i(!1)}}];break;case t.YES_NO:r=[{type:"button",text:"Ok",subtype:"primary",onClick:function(e){e.control.parents()[1].close(),i(!0)}}];break;case t.YES_NO_CANCEL:r=[{type:"button",text:"Ok",subtype:"primary",onClick:function(e){e.control.parents()[1].close()}}];break;default:r=[{type:"button",text:"Ok",subtype:"primary",onClick:function(e){e.control.parents()[1].close()}}]}return new e({padding:20,x:n.x,y:n.y,minWidth:300,minHeight:100,layout:"flex",pack:"center",align:"center",buttons:r,title:n.title,items:{type:"label",multiline:!0,maxWidth:500,maxHeight:200,text:n.text},onClose:n.onClose}).renderTo(document.body).reflow()},alert:function(e,n){return"string"==typeof e&&(e={text:e}),e.callback=n,t.msgBox(e)},confirm:function(e,n){return"string"==typeof e&&(e={text:e}),e.callback=n,e.buttons=t.OK_CANCEL,t.msgBox(e)}}});return t}),r(Z,[J,Q],function(e,t){return function(n){var r=this,i=[];r.windows=i,r.open=function(t){var r;return t.url=t.url||t.file,t.url&&(t.width=parseInt(t.width||320,10),t.height=parseInt(t.height||240,10)),t.body&&(t.items={defaults:t.defaults,type:t.bodyType||"form",items:t.body}),t.url||t.buttons||(t.buttons=[{text:"Ok",subtype:"primary",minWidth:50,onclick:function(){r.find("form")[0].submit(),r.close()}},{text:"Cancel",onclick:function(){r.close()}}]),r=new e(t),i.push(r),r.on("close",function(){for(var e=i.length;e--;)i[e]===r&&i.splice(e,1);n.focus()}),t.data&&r.on("postRender",function(){this.find("*").each(function(e){var n=e.name();n in t.data&&e.value(t.data[n])})}),n.nodeChanged(),r.renderTo(document.body).reflow()},r.alert=function(e,n,r){t.alert(e,function(){n.call(r||this)})},r.confirm=function(e,n,r){t.confirm(e,function(e){n.call(r||this,e)})},r.close=function(){i.length&&i[window.length-1].win.close()}}}),r(et,[S,A,b,h,m,f],function(e,n,r,i,o,a){return function(s){function l(e,t){try{s.getDoc().execCommand(e,!1,t)}catch(n){}}function c(){var e=s.getDoc().documentMode;return e?e:6}function u(e){return e.isDefaultPrevented()}function d(){function t(e){function t(){if(3==l.nodeType){if(e&&c==l.length)return!0;if(!e&&0===c)return!0}}var n,r,i,o,l,c,u;n=F.getRng();var d=[n.startContainer,n.startOffset,n.endContainer,n.endOffset];if(n.collapsed||(e=!0),l=n[(e?"start":"end")+"Container"],c=n[(e?"start":"end")+"Offset"],3==l.nodeType&&(r=I.getParent(n.startContainer,I.isBlock),e&&(r=I.getNext(r,I.isBlock)),!r||!t()&&n.collapsed||(i=I.create("em",{id:"__mceDel"}),D(a.grep(r.childNodes),function(e){i.appendChild(e)}),r.appendChild(i))),n=I.createRng(),n.setStart(d[0],d[1]),n.setEnd(d[2],d[3]),F.setRng(n),s.getDoc().execCommand(e?"ForwardDelete":"Delete",!1,null),i){for(o=F.getBookmark();u=I.get("__mceDel");)I.remove(u,!0);F.moveToBookmark(o)}}s.on("keydown",function(n){var r;r=n.keyCode==O,u(n)||!r&&n.keyCode!=P||e.modifierPressed(n)||(n.preventDefault(),t(r))}),s.addCommand("Delete",function(){t()})}function f(){function e(e){var t=I.create("body"),n=e.cloneContents();return t.appendChild(n),F.serializer.serialize(t,{format:"html"})}function t(t){var n=e(t),r=I.createRng();r.selectNode(s.getBody());var i=e(r);return n===i}s.on("keydown",function(e){var n=e.keyCode,r;if(!u(e)&&(n==O||n==P)){if(r=s.selection.isCollapsed(),r&&!I.isEmpty(s.getBody()))return;if(q&&!r)return;if(!r&&!t(s.selection.getRng()))return;e.preventDefault(),s.setContent(""),s.selection.setCursorLocation(s.getBody(),0),s.nodeChanged()}})}function p(){s.on("keydown",function(t){!u(t)&&65==t.keyCode&&e.metaKeyPressed(t)&&(t.preventDefault(),s.execCommand("SelectAll"))})}function h(){s.settings.content_editable||(I.bind(s.getDoc(),"focusin",function(){F.setRng(F.getRng())}),I.bind(s.getDoc(),"mousedown",function(e){e.target==s.getDoc().documentElement&&(s.getWin().focus(),F.setRng(F.getRng()))}))}function m(){s.on("keydown",function(e){if(!u(e)&&e.keyCode===P&&F.isCollapsed()&&0===F.getRng(!0).startOffset){var t=F.getNode(),n=t.previousSibling;n&&n.nodeName&&"hr"===n.nodeName.toLowerCase()&&(I.remove(n),e.preventDefault())}})}function g(){window.Range.prototype.getClientRects||s.on("mousedown",function(e){if(!u(e)&&"HTML"===e.target.nodeName){var t=s.getBody();t.blur(),setTimeout(function(){t.focus()},0)}})}function v(){s.on("click",function(e){e=e.target,/^(IMG|HR)$/.test(e.nodeName)&&F.getSel().setBaseAndExtent(e,0,e,1),"A"==e.nodeName&&I.hasClass(e,"mceItemAnchor")&&F.select(e),s.nodeChanged()})}function y(){function e(){var e=I.getAttribs(F.getStart().cloneNode(!1));return function(){var t=F.getStart();t!==s.getBody()&&(I.setAttrib(t,"style",null),D(e,function(e){t.setAttributeNode(e.cloneNode(!0))}))}}function n(){return!F.isCollapsed()&&I.getParent(F.getStart(),I.isBlock)!=I.getParent(F.getEnd(),I.isBlock)}s.on("keypress",function(r){var i;return u(r)||8!=r.keyCode&&46!=r.keyCode||!n()?t:(i=e(),s.getDoc().execCommand("delete",!1,null),i(),r.preventDefault(),!1)}),I.bind(s.getDoc(),"cut",function(t){var r;!u(t)&&n()&&(r=e(),setTimeout(function(){r()},0))})}function b(){var e,t;s.on("selectionchange",function(){t&&(clearTimeout(t),t=0),t=window.setTimeout(function(){var t=F.getRng();e&&n.compareRanges(t,e)||(s.nodeChanged(),e=t)},50)})}function C(){document.body.setAttribute("role","application")}function x(){s.on("keydown",function(e){if(!u(e)&&e.keyCode===P&&F.isCollapsed()&&0===F.getRng(!0).startOffset){var t=F.getNode().previousSibling;if(t&&t.nodeName&&"table"===t.nodeName.toLowerCase())return e.preventDefault(),!1}})}function w(){c()>7||(l("RespectVisibilityInDesign",!0),s.contentStyles.push(".mceHideBrInPre pre br {display: none}"),I.addClass(s.getBody(),"mceHideBrInPre"),z.addNodeFilter("pre",function(e){for(var t=e.length,n,i,o,a;t--;)for(n=e[t].getAll("br"),i=n.length;i--;)o=n[i],a=o.prev,a&&3===a.type&&"\n"!=a.value.charAt(a.value-1)?a.value+="\n":o.parent.insert(new r("#text",3),o,!0).value="\n"}),V.addNodeFilter("pre",function(e){for(var t=e.length,n,r,i,o;t--;)for(n=e[t].getAll("br"),r=n.length;r--;)i=n[r],o=i.prev,o&&3==o.type&&(o.value=o.value.replace(/\r?\n$/,""))}))}function _(){I.bind(s.getBody(),"mouseup",function(){var e,t=F.getNode();"IMG"==t.nodeName&&((e=I.getStyle(t,"width"))&&(I.setAttrib(t,"width",e.replace(/[^0-9%]+/g,"")),I.setStyle(t,"width","")),(e=I.getStyle(t,"height"))&&(I.setAttrib(t,"height",e.replace(/[^0-9%]+/g,"")),I.setStyle(t,"height","")))})}function N(){s.on("keydown",function(t){var n,r,i,o,a,l,c,d;if(n=t.keyCode==O,!u(t)&&(n||t.keyCode==P)&&!e.modifierPressed(t)&&(r=F.getRng(),i=r.startContainer,o=r.startOffset,c=r.collapsed,3==i.nodeType&&i.nodeValue.length>0&&(0===o&&!c||c&&o===(n?0:1)))){if(l=i.previousSibling,l&&"IMG"==l.nodeName)return;d=s.schema.getNonEmptyElements(),t.preventDefault(),a=I.create("br",{id:"__tmp"}),i.parentNode.insertBefore(a,i),s.getDoc().execCommand(n?"ForwardDelete":"Delete",!1,null),i=F.getRng().startContainer,l=i.previousSibling,l&&1==l.nodeType&&!I.isBlock(l)&&I.isEmpty(l)&&!d[l.nodeName.toLowerCase()]&&I.remove(l),I.remove("__tmp")}})}function E(){s.on("keydown",function(t){var n,r,i,o,a;if(!u(t)&&t.keyCode==e.BACKSPACE&&(n=F.getRng(),r=n.startContainer,i=n.startOffset,o=I.getRoot(),a=r,n.collapsed&&0===i)){for(;a&&a.parentNode&&a.parentNode.firstChild==a&&a.parentNode!=o;)a=a.parentNode;"BLOCKQUOTE"===a.tagName&&(s.formatter.toggle("blockquote",null,a),n=I.createRng(),n.setStart(r,0),n.setEnd(r,0),F.setRng(n))}})}function k(){function e(){s._refreshContentEditable(),l("StyleWithCSS",!1),l("enableInlineTableEditing",!1),W.object_resizing||l("enableObjectResizing",!1)}W.readonly||s.on("BeforeExecCommand MouseDown",e)}function S(){function e(){D(I.select("a"),function(e){var t=e.parentNode,n=I.getRoot();if(t.lastChild===e){for(;t&&!I.isBlock(t);){if(t.parentNode.lastChild!==t||t===n)return;t=t.parentNode}I.add(t,"br",{"data-mce-bogus":1})}})}s.on("SetContent ExecCommand",function(t){("setcontent"==t.type||"mceInsertLink"===t.command)&&e()})}function T(){W.forced_root_block&&s.on("init",function(){l("DefaultParagraphSeparator",W.forced_root_block)})}function R(){s.on("Undo Redo SetContent",function(e){e.initial||s.execCommand("mceRepaint")})}function A(){s.on("keydown",function(e){var t;u(e)||e.keyCode!=P||(t=s.getDoc().selection.createRange(),t&&t.item&&(e.preventDefault(),s.undoManager.beforeChange(),I.remove(t.item(0)),s.undoManager.add()))})}function B(){var e;c()>=10&&(e="",D("p div h1 h2 h3 h4 h5 h6".split(" "),function(t,n){e+=(n>0?",":"")+t+":empty"}),s.contentStyles.push(e+"{padding-right: 1px !important}"))}function L(){9>c()&&(z.addNodeFilter("noscript",function(e){for(var t=e.length,n,r;t--;)n=e[t],r=n.firstChild,r&&n.attr("data-mce-innertext",r.value)}),V.addNodeFilter("noscript",function(e){for(var t=e.length,n,o,a;t--;)n=e[t],o=e[t].firstChild,o?o.value=i.decode(o.value):(a=n.attributes.map["data-mce-innertext"],a&&(n.attr("data-mce-innertext",null),o=new r("#text",3),o.value=a,o.raw=!0,n.append(o)))}))}function H(){function e(e,t){var n=i.createTextRange();try{n.moveToPoint(e,t)}catch(r){n=null}return n}function t(t){var r;t.button?(r=e(t.x,t.y),r&&(r.compareEndPoints("StartToStart",a)>0?r.setEndPoint("StartToStart",a):r.setEndPoint("EndToEnd",a),r.select())):n()}function n(){var e=r.selection.createRange();a&&!e.item&&0===e.compareEndPoints("StartToEnd",e)&&a.select(),I.unbind(r,"mouseup",n),I.unbind(r,"mousemove",t),a=o=0}var r=I.doc,i=r.body,o,a,s;r.documentElement.unselectable=!0,I.bind(r,"mousedown contextmenu",function(i){if("HTML"===i.target.nodeName){if(o&&n(),s=r.documentElement,s.scrollHeight>s.clientHeight)return;o=1,a=e(i.x,i.y),a&&(I.bind(r,"mouseup",n),I.bind(r,"mousemove",t),I.win.focus(),a.select())}})}function M(){s.on("keyup focusin",function(t){65==t.keyCode&&e.metaKeyPressed(t)||F.normalize()})}var D=a.each,P=e.BACKSPACE,O=e.DELETE,I=s.dom,F=s.selection,W=s.settings,z=s.parser,V=s.serializer,U=o.gecko,q=o.ie,$=o.webkit;x(),E(),f(),M(),$&&(N(),d(),h(),v(),T(),o.iOS?b():p()),q&&(m(),C(),w(),_(),A(),B(),L(),H()),U&&(m(),g(),y(),k(),S(),R())}}),r(tt,[f],function(e){function t(){return!1}function n(){return!0}var r="__bindings",i=e.makeMap("focusin focusout click dblclick mousedown mouseup mousemove mouseover beforepaste paste cut copy selectionchange mouseout mouseenter mouseleave keydown keypress keyup contextmenu dragend dragover draggesture dragdrop drop drag"," ");return{fire:function(e,i,o){var a=this,s,l,c,u,d;if(e=e.toLowerCase(),i=i||{},i.type=e,i.target||(i.target=a),i.preventDefault||(i.preventDefault=function(){i.isDefaultPrevented=n},i.stopPropagation=function(){i.isPropagationStopped=n},i.stopImmediatePropagation=function(){i.isImmediatePropagationStopped=n},i.isDefaultPrevented=t,i.isPropagationStopped=t,i.isImmediatePropagationStopped=t),a[r]&&(s=a[r][e]))for(l=0,c=s.length;c>l&&(s[l]=u=s[l],!i.isImmediatePropagationStopped());l++)if(u.call(a,i)===!1)return i.preventDefault(),i;if(o!==!1&&a.parent)for(d=a.parent();d&&!i.isPropagationStopped();)d.fire(e,i,!1),d=d.parent();return i},on:function(e,t){var n=this,o,a,s,l;if(t===!1&&(t=function(){return!1}),t)for(s=e.toLowerCase().split(" "),l=s.length;l--;)e=s[l],o=n[r],o||(o=n[r]={}),a=o[e],a||(a=o[e]=[],n.bindNative&&i[e]&&n.bindNative(e)),a.push(t);return n},off:function(e,t){var n=this,o,a=n[r],s,l,c,u;if(a)if(e)for(c=e.toLowerCase().split(" "),o=c.length;o--;){if(e=c[o],s=a[e],!e){for(l in a)a[e].length=0;return n}if(s){if(t)for(u=s.length;u--;)s[u]===t&&s.splice(u,1);else s.length=0;!s.length&&n.unbindNative&&i[e]&&(n.unbindNative(e),delete a[e])}}else{if(n.unbindNative)for(e in a)n.unbindNative(e);n[r]=[]}return n}}}),r(nt,[f,m],function(e,n){var r=e.each,i=e.explode,o={f9:120,f10:121,f11:122};return function(e){var a=this,s={};e.on("keyup keypress keydown",function(e){(e.altKey||e.ctrlKey||e.metaKey)&&r(s,function(r){var i=n.isMac?e.metaKey:e.ctrlKey;if(r.ctrl==i&&r.alt==e.altKey&&r.shift==e.shiftKey)return e.keyCode==r.keyCode||e.charCode&&e.charCode==r.charCode?(e.preventDefault(),"keydown"==e.type&&r.func.call(r.scope),!0):t})}),a.add=function(t,n,a,l){var c;return c=a,"string"==typeof a?a=function(){e.execCommand(c,!1,null)}:a.length&&(a=function(){e.execCommand(c[0],c[1],c[2])}),r(i(t.toLowerCase()),function(t){var c={func:a,scope:l||e,desc:e.translate(n),alt:!1,ctrl:!1,shift:!1};r(i(t,"+"),function(e){switch(e){case"alt":case"ctrl":case"shift":c[e]=!0;break;default:c.charCode=e.charCodeAt(0),c.keyCode=o[e]||e.toUpperCase().charCodeAt(0)}}),s[(c.ctrl?"ctrl":"")+","+(c.alt?"alt":"")+","+(c.shift?"shift":"")+","+c.keyCode]=c}),!0}}}),r(rt,[g,y,b,E,N,R,B,L,H,M,D,P,v,u,Z,C,w,et,m,f,tt,nt],function(e,n,r,i,o,a,s,l,c,u,d,f,p,h,m,g,v,y,b,C,x,w){function _(e,t){return"selectionchange"==t?e.getDoc():!e.inline&&/^mouse|click|contextmenu/.test(t)?e.getDoc():e.getBody()}function N(e,t,r){var i=this,o,a;o=i.documentBaseUrl=r.documentBaseURL,a=r.baseURI,i.settings=t=T({id:e,theme:"modern",delta_width:0,delta_height:0,popup_css:"",plugins:"",document_base_url:o,add_form_submit_trigger:!0,submit_patch:!0,add_unload_trigger:!0,convert_urls:!0,relative_urls:!0,remove_script_host:!0,object_resizing:!0,doctype:"<!DOCTYPE html>",visual:!0,font_size_style_values:"xx-small,x-small,small,medium,large,x-large,xx-large",font_size_legacy_values:"xx-small,small,medium,large,x-large,xx-large,300%",directionality:"ltr",forced_root_block:"p",hidden_input:!0,padd_empty_editor:!0,render_ui:!0,indentation:"30px",inline_styles:!0,convert_fonts_to_spans:!0,indent:"simple",indent_before:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,ul,li,area,table,thead,tfoot,tbody,tr,section,article,hgroup,aside,figure,option,optgroup,datalist",indent_after:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,ul,li,area,table,thead,tfoot,tbody,tr,section,article,hgroup,aside,figure,option,optgroup,datalist",validate:!0,entity_encoding:"named",url_converter:i.convertURL,url_converter_scope:i,ie7_compat:!0},t),n.settings=t,n.baseURL=r.baseURL,i.id=t.id=e,i.isNotDirty=!1,i.plugins={},i.documentBaseURI=new f(t.document_base_url||o,{base_uri:a}),i.baseURI=a,i.contentCSS=[],i.contentStyles=[],i.shortcuts=new w(i),i.execCommands={},i.queryStateCommands={},i.queryValueCommands={},i.suffix=r.suffix,i.editorManager=r,i.inline=t.inline,i.execCallback("setup",i)}var E=e.DOM,k=n.ThemeManager,S=n.PluginManager,T=C.extend,R=C.each,A=C.explode,B=C.inArray,L=C.trim,H=C.resolve,M=h.Event,D=b.gecko,P=b.ie,O=b.opera;return N.prototype={render:function(){function e(){var e=p.ScriptLoader;r.language&&e.add(n.editorManager.baseURL+"/langs/"+r.language+".js"),r.theme&&"function"!=typeof r.theme&&"-"!=r.theme.charAt(0)&&!k.urls[r.theme]&&k.load(r.theme,"themes/"+r.theme+"/theme"+o+".js"),C.isArray(r.plugins)&&(r.plugins=r.plugins.join(" ")),R(r.plugins.split(/[ ,]/),function(e){if(e=L(e),e&&!S.urls[e])if("-"==e.charAt(0)){e=e.substr(1,e.length);var t=S.dependencies(e);R(t,function(e){var t={prefix:"plugins/",resource:e,suffix:"/plugin"+o+".js"};e=S.createUrl(t,e),S.load(e.resource,e)})}else S.load(e,{prefix:"plugins/",resource:e,suffix:"/plugin"+o+".js"})}),e.loadQueue(function(){n.removed||n.init()})}var n=this,r=n.settings,i=n.id,o=n.suffix;
8if(!M.domLoaded)return E.bind(window,"ready",function(){n.render()}),t;if(n.editorManager.settings=r,n.getElement()&&b.contentEditable){r.inline?n.inline=!0:(n.orgVisibility=n.getElement().style.visibility,n.getElement().style.visibility="hidden");var a=n.getElement().form||E.getParent(i,"form");a&&(n.formElement=a,r.hidden_input&&!/TEXTAREA|INPUT/i.test(n.getElement().nodeName)&&E.insertAfter(E.create("input",{type:"hidden",name:i}),i),n.formEventDelegate=function(e){n.fire(e.type,e)},E.bind(a,"submit reset",n.formEventDelegate),n.on("reset",function(){n.setContent(n.startContent,{format:"raw"})}),!r.submit_patch||a.submit.nodeType||a.submit.length||a._mceOldSubmit||(a._mceOldSubmit=a.submit,a.submit=function(){return n.editorManager.triggerSave(),n.isNotDirty=1,a._mceOldSubmit(a)})),n.windowManager=new m(n),"xml"==r.encoding&&n.on("GetContent",function(e){e.save&&(e.content=E.encode(e.content))}),r.add_form_submit_trigger&&n.on("submit",function(){n.initialized&&(n.save(),n.isNotDirty=1)}),r.add_unload_trigger&&(n._beforeUnload=function(){!n.initialized||n.destroyed||n.isHidden()||n.save({format:"raw",no_events:!0})},n.editorManager.on("BeforeUnload",n._beforeUnload)),e()}},init:function(){function e(n){var r=S.get(n),i,o;i=S.urls[n]||t.documentBaseUrl.replace(/\/$/,""),n=L(n),r&&-1===B(h,n)&&(R(S.dependencies(n),function(t){e(t)}),o=new r(t,i),t.plugins[n]=o,o.init&&(o.init(t,i),h.push(n)))}var t=this,n=t.settings,r=t.getElement(),i,o,a,s,l,c,u,d,f,p,h=[];if(t.editorManager.add(t),n.aria_label=n.aria_label||E.getAttrib(r,"aria-label",t.getLang("aria.rich_text_area")),n.theme&&("function"!=typeof n.theme?(n.theme=n.theme.replace(/-/,""),l=k.get(n.theme),t.theme=new l(t,k.urls[n.theme]),t.theme.init&&t.theme.init(t,k.urls[n.theme]||t.documentBaseUrl.replace(/\/$/,""))):t.theme=n.theme),R(n.plugins.replace(/\-/g,"").split(/[ ,]/),e),t.fire("BeforeRenderUI"),n.render_ui&&t.theme&&(t.orgDisplay=r.style.display,"function"!=typeof n.theme?(i=n.width||r.style.width||r.offsetWidth,o=n.height||r.style.height||r.offsetHeight,a=n.min_height||100,f=/^[0-9\.]+(|px)$/i,f.test(""+i)&&(i=Math.max(parseInt(i,10)+(l.deltaWidth||0),100)),f.test(""+o)&&(o=Math.max(parseInt(o,10)+(l.deltaHeight||0),a)),l=t.theme.renderUI({targetNode:r,width:i,height:o,deltaWidth:n.delta_width,deltaHeight:n.delta_height}),n.content_editable||(E.setStyles(l.sizeContainer||l.editorContainer,{wi2dth:i,h2eight:o}),o=(l.iframeHeight||o)+("number"==typeof o?l.deltaHeight||0:""),a>o&&(o=a))):(l=n.theme(t,r),l.editorContainer.nodeType&&(l.editorContainer=l.editorContainer.id=l.editorContainer.id||t.id+"_parent"),l.iframeContainer.nodeType&&(l.iframeContainer=l.iframeContainer.id=l.iframeContainer.id||t.id+"_iframecontainer"),o=l.iframeHeight||r.offsetHeight),t.editorContainer=l.editorContainer),n.content_css&&R(A(n.content_css),function(e){t.contentCSS.push(t.documentBaseURI.toAbsolute(e))}),n.content_style&&t.contentStyles.push(n.content_style),n.content_editable)return r=s=l=null,t.initContentBody();for(document.domain&&location.hostname!=document.domain&&(t.editorManager.relaxedDomain=document.domain),t.iframeHTML=n.doctype+"<html><head>",n.document_base_url!=t.documentBaseUrl&&(t.iframeHTML+='<base href="'+t.documentBaseURI.getURI()+'" />'),!b.caretAfter&&n.ie7_compat&&(t.iframeHTML+='<meta http-equiv="X-UA-Compatible" content="IE=7" />'),t.iframeHTML+='<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />',p=0;t.contentCSS.length>p;p++)t.iframeHTML+='<link type="text/css" rel="stylesheet" href="'+t.contentCSS[p]+'" />';t.contentCSS=[],u=n.body_id||"tinymce",-1!=u.indexOf("=")&&(u=t.getParam("body_id","","hash"),u=u[t.id]||u),d=n.body_class||"",-1!=d.indexOf("=")&&(d=t.getParam("body_class","","hash"),d=d[t.id]||""),t.iframeHTML+='</head><body id="'+u+'" class="mce-content-body '+d+'" '+"onload=\"window.parent.tinymce.get('"+t.id+"').fire('load');\"><br></body></html>",t.editorManager.relaxedDomain&&(P||O&&11>parseFloat(window.opera.version()))&&(c='javascript:(function(){document.open();document.domain="'+document.domain+'";'+'var ed = window.parent.tinymce.get("'+t.id+'");document.write(ed.iframeHTML);'+"document.close();ed.initContentBody();})()"),s=E.add(l.iframeContainer,"iframe",{id:t.id+"_ifr",src:c||'javascript:""',frameBorder:"0",allowTransparency:"true",title:t.editorManager.translate("Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help"),style:{width:"100%",height:o,display:"block"}}),t.contentAreaContainer=l.iframeContainer,l.editorContainer&&(E.get(l.editorContainer).style.display=t.orgDisplay),E.get(t.id).style.display="none",E.setAttrib(t.id,"aria-hidden",!0),t.editorManager.relaxedDomain&&c||t.initContentBody(),r=s=l=null},initContentBody:function(){var t=this,n=t.settings,o=E.get(t.id),f=t.getDoc(),p,h;n.inline||(t.getElement().style.visibility=t.orgVisibility),P&&t.editorManager.relaxedDomain||n.content_editable||(f.open(),f.write(t.iframeHTML),f.close(),t.editorManager.relaxedDomain&&(f.domain=t.editorManager.relaxedDomain)),n.content_editable&&(E.addClass(o,"mce-content-body"),o.tabIndex=-1,t.contentDocument=f=n.content_document||document,t.contentWindow=n.content_window||window,t.bodyElement=o,n.content_document=n.content_window=null,n.root_name=o.nodeName.toLowerCase()),p=t.getBody(),p.disabled=!0,n.readonly||(p.contentEditable=t.getParam("content_editable_state",!0)),p.disabled=!1,t.schema=new g(n),t.dom=new e(f,{keep_values:!0,url_converter:t.convertURL,url_converter_scope:t,hex_colors:n.force_hex_style_colors,class_filter:n.class_filter,update_styles:!0,root_element:n.content_editable?t.id:null,schema:t.schema,onSetAttrib:function(e){t.fire("SetAttrib",e)}}),t.parser=new v(n,t.schema),t.parser.addAttributeFilter("src,href,style",function(e,n){for(var r=e.length,i,o=t.dom,a,s;r--;)i=e[r],a=i.attr(n),s="data-mce-"+n,i.attributes.map[s]||("style"===n?i.attr(s,o.serializeStyle(o.parseStyle(a),i.name)):i.attr(s,t.convertURL(a,n,i.name)))}),t.parser.addNodeFilter("script",function(e){for(var t=e.length,n;t--;)n=e[t],n.attr("type","mce-"+(n.attr("type")||"text/javascript"))}),t.parser.addNodeFilter("#cdata",function(e){for(var t=e.length,n;t--;)n=e[t],n.type=8,n.name="#comment",n.value="[CDATA["+n.value+"]]"}),t.parser.addNodeFilter("p,h1,h2,h3,h4,h5,h6,div",function(e){for(var n=e.length,i,o=t.schema.getNonEmptyElements();n--;)i=e[n],i.isEmpty(o)&&(i.empty().append(new r("br",1)).shortEnded=!0)}),t.serializer=new i(n,t),t.selection=new a(t.dom,t.getWin(),t.serializer,t),t.formatter=new s(t),t.undoManager=new l(t),t.forceBlocks=new u(t),t.enterKey=new c(t),t.editorCommands=new d(t),t.fire("PreInit"),n.browser_spellcheck||n.gecko_spellcheck||(f.body.spellcheck=!1),t.fire("PostRender"),t.quirks=y(t),n.directionality&&(p.dir=n.directionality),n.nowrap&&(p.style.whiteSpace="nowrap"),n.protect&&t.on("BeforeSetContent",function(e){R(n.protect,function(t){e.content=e.content.replace(t,function(e){return"<!--mce:protected "+escape(e)+"-->"})})}),t.on("SetContent",function(){t.addVisual(t.getBody())}),n.padd_empty_editor&&t.on("PostProcess",function(e){e.content=e.content.replace(/^(<p[^>]*>(&nbsp;|&#160;|\s|\u00a0|)<\/p>[\r\n]*|<br \/>[\r\n]*)$/,"")}),t.load({initial:!0,format:"html"}),t.startContent=t.getContent({format:"raw"}),t.initialized=!0,R(t._pendingNativeEvents,function(e){t.dom.bind(_(t,e),e,function(e){t.fire(e.type,e)})}),t.fire("init"),t.focus(!0),t.nodeChanged({initial:!0}),t.execCallback("init_instance_callback",t),t.contentStyles.length>0&&(h="",R(t.contentStyles,function(e){h+=e+"\r\n"}),t.dom.addStyle(h)),R(t.contentCSS,function(e){t.dom.loadCSS(e)}),n.auto_focus&&setTimeout(function(){var e=t.editorManager.get(n.auto_focus);e.selection.select(e.getBody(),1),e.selection.collapse(1),e.getBody().focus(),e.getWin().focus()},100),o=f=p=null},focus:function(e){var t,n=this,r=n.selection,i=n.settings.content_editable,o,a,s=n.getDoc(),l;e||(o=r.getRng(),o.item&&(a=o.item(0)),n._refreshContentEditable(),i||n.getWin().focus(),(D||i)&&(l=n.getBody(),l.setActive?l.setActive():l.focus(),i&&r.normalize()),a&&a.ownerDocument==s&&(o=s.body.createControlRange(),o.addElement(a),o.select())),n.editorManager.activeEditor!=n&&((t=n.editorManager.activeEditor)&&t.fire("deactivate",{relatedTarget:n}),n.fire("activate",{relatedTarget:t})),n.editorManager.activeEditor=n},execCallback:function(e){var t=this,n=t.settings[e],r;if(n)return t.callbackLookup&&(r=t.callbackLookup[e])&&(n=r.func,r=r.scope),"string"==typeof n&&(r=n.replace(/\.\w+$/,""),r=r?H(r):0,n=H(n),t.callbackLookup=t.callbackLookup||{},t.callbackLookup[e]={func:n,scope:r}),n.apply(r||t,Array.prototype.slice.call(arguments,1))},translate:function(e){var t=this.settings.language||"en",n=this.editorManager.i18n;return e?n[t+"."+e]||e.replace(/\{\#([^\}]+)\}/g,function(e,r){return n[t+"."+r]||"{#"+r+"}"}):""},getLang:function(e,n){return this.editorManager.i18n[(this.settings.language||"en")+"."+e]||(n!==t?n:"{#"+e+"}")},getParam:function(e,t,n){var r=e in this.settings?this.settings[e]:t,i;return"hash"===n?(i={},"string"==typeof r?R(r.indexOf("=")>0?r.split(/[;,](?![^=;,]*(?:[;,]|$))/):r.split(","),function(e){e=e.split("="),i[L(e[0])]=e.length>1?L(e[1]):L(e)}):i=r,i):r},nodeChanged:function(){var e=this,n=e.selection,r,i,o;e.initialized&&!e.settings.disable_nodechange&&(o=e.getBody(),r=n.getStart()||o,r=P&&r.ownerDocument!=e.getDoc()?e.getBody():r,"IMG"==r.nodeName&&n.isCollapsed()&&(r=r.parentNode),i=[],e.dom.getParent(r,function(e){return e===o?!0:(i.push(e),t)}),e.fire("NodeChange",{element:r,parents:i}))},addButton:function(e,t){var n=this;t.cmd&&(t.onclick=function(){n.execCommand(t.cmd)}),n.buttons=n.buttons||{},t.tooltip=t.tooltip||t.title,t.icon=t.icon||(t.icon!==!1?e:!1),n.buttons[e]=t},addMenuItem:function(e,t){var n=this;t.cmd&&(t.onclick=function(){n.execCommand(t.cmd)}),n.menuItems=n.menuItems||{},n.menuItems[e]=t},addCommand:function(e,t,n){this.execCommands[e]={func:t,scope:n||this}},addQueryStateHandler:function(e,t,n){this.queryStateCommands[e]={func:t,scope:n||this}},addQueryValueHandler:function(e,t,n){this.queryValueCommands[e]={func:t,scope:n||this}},addShortcut:function(e,t,n,r){this.shortcuts.add(e,t,n,r)},execCommand:function(e,n,r,i){var o=this,a=0,s;return/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint)$/.test(e)||i&&i.skip_focus||o.focus(),i=T({},i),o.fire("BeforeExecCommand",{command:e,ui:n,value:r}),i.terminate?!1:(s=o.execCommands[e])&&s.func.call(s.scope,n,r)!==!0?(o.fire("ExecCommand",{command:e,ui:n,value:r}),!0):(R(o.plugins,function(i){return i.execCommand&&i.execCommand(e,n,r)?(o.fire("ExecCommand",{command:e,ui:n,value:r}),a=!0,!1):t}),a?a:o.theme&&o.theme.execCommand&&o.theme.execCommand(e,n,r)?(o.fire("ExecCommand",{command:e,ui:n,value:r}),!0):o.editorCommands.execCommand(e,n,r)?(o.fire("ExecCommand",{command:e,ui:n,value:r}),!0):(o.getDoc().execCommand(e,n,r),o.fire("ExecCommand",{command:e,ui:n,value:r}),t))},queryCommandState:function(e){var t=this,n,r;if(!t._isHidden()){if((n=t.queryStateCommands[e])&&(r=n.func.call(n.scope),r!==!0))return r;if(r=t.editorCommands.queryCommandState(e),-1!==r)return r;try{return t.getDoc().queryCommandState(e)}catch(i){}}},queryCommandValue:function(e){var n=this,r,i;if(!n._isHidden()){if((r=n.queryValueCommands[e])&&(i=r.func.call(r.scope),i!==!0))return i;if(i=n.editorCommands.queryCommandValue(e),i!==t)return i;try{return n.getDoc().queryCommandValue(e)}catch(o){}}},show:function(){var e=this;E.show(e.getContainer()),E.hide(e.id),e.load(),e.fire("show")},hide:function(){var e=this,t=e.getDoc();P&&t&&t.execCommand("SelectAll"),e.save(),E.hide(e.getContainer()),E.setStyle(e.id,"display",e.orgDisplay),e.fire("hide")},isHidden:function(){return!E.isHidden(this.id)},setProgressState:function(e,t){this.fire("ProgressState",{state:e,time:t})},load:function(e){var n=this,r=n.getElement(),i;return r?(e=e||{},e.load=!0,i=n.setContent(r.value!==t?r.value:r.innerHTML,e),e.element=r,e.no_events||n.fire("LoadContent",e),e.element=r=null,i):t},save:function(e){var n=this,r=n.getElement(),i,o;if(r&&n.initialized)return e=e||{},e.save=!0,e.element=r,i=e.content=n.getContent(e),e.no_events||n.fire("SaveContent",e),i=e.content,/TEXTAREA|INPUT/i.test(r.nodeName)?r.value=i:(r.innerHTML=i,(o=E.getParent(n.id,"form"))&&R(o.elements,function(e){return e.name==n.id?(e.value=i,!1):t})),e.element=r=null,i},setContent:function(e,n){var r=this,i=r.getBody(),a;return n=n||{},n.format=n.format||"html",n.set=!0,n.content=e,n.no_events||r.fire("BeforeSetContent",n),e=n.content,P||0!==e.length&&!/^\s+$/.test(e)?("raw"!==n.format&&(e=new o({},r.schema).serialize(r.parser.parse(e,{isRootContent:!0}))),n.content=L(e),r.dom.setHTML(i,n.content),n.no_events||r.fire("SetContent",n),r.settings.content_editable&&document.activeElement!==r.getBody()||r.selection.normalize(),n.content):(a=r.settings.forced_root_block,e=a&&r.schema.isValidChild(i.nodeName.toLowerCase(),a.toLowerCase())?"<"+a+'><br data-mce-bogus="1"></'+a+">":'<br data-mce-bogus="1">',i.innerHTML=e,r.selection.select(i,!0),r.selection.collapse(!0),t)},getContent:function(e){var t=this,n,r=t.getBody();return e=e||{},e.format=e.format||"html",e.get=!0,e.getInner=!0,e.no_events||t.fire("BeforeGetContent",e),n="raw"==e.format?r.innerHTML:"text"==e.format?r.innerText||r.textContent:t.serializer.serialize(r,e),e.content="text"!=e.format?L(n):n,e.no_events||t.fire("GetContent",e),e.content},insertContent:function(e){this.execCommand("mceInsertContent",!1,e)},isDirty:function(){return!this.isNotDirty&&this.undoManager.hasUndo()},getContainer:function(){var e=this;return e.container||(e.container=E.get(e.editorContainer||e.id+"_parent")),e.container},getContentAreaContainer:function(){return this.contentAreaContainer},getElement:function(){return E.get(this.settings.content_element||this.id)},getWin:function(){var e=this,t;return e.contentWindow||(t=E.get(e.id+"_ifr"),t&&(e.contentWindow=t.contentWindow)),e.contentWindow},getDoc:function(){var e=this,t;return e.contentDocument||(t=e.getWin(),t&&(e.contentDocument=t.document)),e.contentDocument},getBody:function(){return this.bodyElement||this.getDoc().body},convertURL:function(e,t,n){var r=this,i=r.settings;return i.urlconverter_callback?r.execCallback("urlconverter_callback",e,n,!0,t):!i.convert_urls||n&&"LINK"==n.nodeName||0===e.indexOf("file:")||0===e.length?e:i.relative_urls?r.documentBaseURI.toRelative(e):e=r.documentBaseURI.toAbsolute(e,i.remove_script_host)},addVisual:function(e){var n=this,r=n.settings,i=n.dom,o;e=e||n.getBody(),n.hasVisual===t&&(n.hasVisual=r.visual),R(i.select("table,a",e),function(e){var a;switch(e.nodeName){case"TABLE":return o=r.visual_table_class||"mce-item-table",a=i.getAttrib(e,"border"),a&&"0"!=a||(n.hasVisual?i.addClass(e,o):i.removeClass(e,o)),t;case"A":return i.getAttrib(e,"href",!1)||(a=i.getAttrib(e,"name")||e.id,o="mce-item-anchor",a&&(n.hasVisual?i.addClass(e,o):i.removeClass(e,o))),t}}),n.fire("VisualAid",{element:e,hasVisual:n.hasVisual})},remove:function(){var e=this,t=e.getContainer(),n=e.getDoc();e.removed||(e.removed=1,P&&n&&n.execCommand("SelectAll"),e.save(),E.setStyle(e.id,"display",e.orgDisplay),e.settings.content_editable||(M.unbind(e.getWin()),M.unbind(e.getDoc())),M.unbind(e.getBody()),M.unbind(t),e.fire("remove"),e.editorManager.remove(e),E.remove(t))},bindNative:function(e){var t=this;t.initialized?t.dom.bind(_(t,e),e,function(n){t.fire(e,n)}):t._pendingNativeEvents?t._pendingNativeEvents.push(e):t._pendingNativeEvents=[e]},unbindNative:function(e){var t=this;t.initialized&&t.dom.unbind(e)},destroy:function(e){var t=this,n;t.destroyed||(D&&(M.unbind(t.getDoc()),M.unbind(t.getWin()),M.unbind(t.getBody())),e||(t.editorManager.off(t._beforeUnload),t.theme&&t.theme.destroy&&t.theme.destroy(),t.selection.destroy(),t.dom.destroy()),n=t.formElement,n&&(n.submit=n._mceOldSubmit,n._mceOldSubmit=null,E.unbind(n,"submit reset",t.formEventDelegate)),t.contentAreaContainer=t.formElement=t.container=null,t.settings.content_element=t.bodyElement=t.contentDocument=t.contentWindow=null,t.selection&&(t.selection=t.selection.win=t.selection.dom=t.selection.dom.doc=null),t.destroyed=1)},_refreshContentEditable:function(){var e=this,t,n;e._isHidden()&&(t=e.getBody(),n=t.parentNode,n.removeChild(t),n.appendChild(t),t.focus())},_isHidden:function(){var e;return D?(e=this.selection.getSel(),!e||!e.rangeCount||0===e.rangeCount):0}},T(N.prototype,x),N}),r(it,[],function(){var e={};return{add:function(t,n){for(var r in n)e[r]=n[r]},translate:function(n){if(n===t)return n;if("string"!=typeof n&&n.raw)return n.raw;if(n.push){var r=n.slice(1);n=(e[n[0]]||n[0]).replace(/\{([^\}]+)\}/g,function(e,t){return r[t]})}return e[n]||n},data:e}}),r(ot,[g],function(e){function t(n){function r(){try{return document.activeElement}catch(e){return document.body}}function i(i){function o(n){return!!e.DOM.getParent(n,t.isEditorUIElement)}var a=i.editor,s,l;a.on("init",function(){"onbeforedeactivate"in document?a.dom.bind(a.getBody(),"beforedeactivate",function(){var e=a.getDoc().selection;l=e&&e.createRange?e.createRange():a.selection.getRng()}):a.inline&&a.on("nodechange",function(){for(var e,t=document.activeElement;t;){if(t==a.getBody()){e=!0;break}t=t.parentNode}e&&(l=a.selection.getRng())})}),a.on("focusin",function(){var e=n.focusedEditor;s&&(a.selection.setRng(s),s=null),e!=a&&(e&&e.fire("blur",{focusedEditor:a}),a.fire("focus",{blurredEditor:e}),a.focus(!1),n.focusedEditor=a)}),a.on("focusout",function(){s=l,window.setTimeout(function(){var e=n.focusedEditor;e!=a&&(s=null),o(r())||e!=a||(a.fire("blur",{focusedEditor:null}),n.focusedEditor=null,s=null)},0)})}n.on("AddEditor",i)}return t.isEditorUIElement=function(e){return-1!==e.className.indexOf("mce-")},t}),r(at,[rt,g,P,m,f,tt,it,ot],function(e,n,r,i,o,a,s,l){var c=n.DOM,u=o.explode,d=o.each,f=o.extend,p=0,h,m={majorVersion:"4",minorVersion:"0b2",releaseDate:"2013-04-24",editors:[],i18n:s,activeEditor:null,setup:function(){var e=this,t,n,i="",o;if(n=document.location.href.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,""),/[\/\\]$/.test(n)||(n+="/"),o=window.tinymce||window.tinyMCEPreInit)t=o.base||o.baseURL,i=o.suffix;else for(var a=document.getElementsByTagName("script"),s=0;a.length>s;s++){var c=a[s].src;if(/tinymce(\.jquery|)(\.min|\.dev|).js/.test(c)){-1!=c.indexOf(".min")&&(i=".min"),t=c.substring(0,c.lastIndexOf("/"));break}}e.baseURL=new r(n).toAbsolute(t),e.documentBaseURL=n,e.baseURI=new r(e.baseURL),e.suffix=i,e.focusManager=new l(e)},init:function(t){function n(e){var t=e.id;return t||(t=e.name,t=t&&!c.get(t)?e.name:c.uniqueId(),e.setAttribute("id",t)),t}function r(e,t,n){var r=e[t];if(r)return r.apply(n||this,Array.prototype.slice.call(arguments,2))}function i(e,t){return t.constructor===RegExp?t.test(e.className):c.hasClass(e,t)}var o=this,a=[],s;o.settings=t,c.bind(window,"ready",function(){var l,h;switch(r(t,"onpageload"),t.mode){case"exact":l=t.elements||"",l.length>0&&d(u(l),function(n){c.get(n)?(s=new e(n,t,o),a.push(s),s.render(!0)):d(document.forms,function(r){d(r.elements,function(r){r.name===n&&(n="mce_editor_"+p++,c.setAttrib(r,"id",n),s=new e(n,t,o),a.push(s),s.render(1))})})});break;case"textareas":case"specific_textareas":d(c.select("textarea"),function(r){t.editor_deselector&&i(r,t.editor_deselector)||(!t.editor_selector||i(r,t.editor_selector))&&(s=new e(n(r),t,o),a.push(s),s.render(!0))});break;default:t.types?d(t.types,function(r){d(c.select(r.selector),function(i){var s=new e(n(i),f({},t,r),o);a.push(s),s.render(1)})}):t.selector&&d(c.select(t.selector),function(r){var i=new e(n(r),t,o);a.push(i),i.render(1)})}t.oninit&&(l=h=0,d(a,function(e){h++,e.initialized?l++:e.on("init",function(){l++,l==h&&r(t,"oninit")}),l==h&&r(t,"oninit")}))})},get:function(e){return e===t?this.editors:this.editors[e]},add:function(e){var t=this,n=t.editors;return n[e.id]=e,n.push(e),t.activeEditor=e,t.fire("AddEditor",{editor:e}),h||(h=function(){t.fire("BeforeUnload")},c.bind(window,"beforeunload",h)),e},createEditor:function(t){return this.add(new e(t))},remove:function(e){var t=this,n,r=t.editors;if(!r[e.id])return null;for(delete r[e.id],n=0;r.length>n;n++)if(r[n]==e){r.splice(n,1);break}return t.activeEditor==e&&(t.activeEditor=r[0]),e.destroy(),t.fire("RemoveEditor",{editor:e}),r.length||c.unbind(window,"beforeunload",h),e},execCommand:function(t,n,r){var i=this,o=i.get(r);switch(t){case"mceAddEditor":return i.get(r)||new e(r,i.settings,i).render(),!0;case"mceRemoveEditor":return o&&o.remove(),!0;case"mceToggleEditor":return o?(o.isHidden()?o.show():o.hide(),!0):(i.execCommand("mceAddEditor",0,r),!0)}return i.activeEditor?i.activeEditor.execCommand(t,n,r):!1},triggerSave:function(){d(this.editors,function(e){e.save()})},addI18n:function(e,t){s.add(e,t)},translate:function(e){return s.translate(e)}};return f(m,a),m.setup(),window.tinymce=window.tinyMCE=m,m}),r(st,[at,f],function(e,t){var n=t.each,r=t.explode;e.on("AddEditor",function(e){var t=e.editor;t.on("preInit",function(){function e(e,t){n(t,function(t,n){t&&s.setStyle(e,n,t)}),s.rename(e,"span")}function i(e){s=t.dom,l.convert_fonts_to_spans&&n(s.select("font,u,strike",e.node),function(e){o[e.nodeName.toLowerCase()](s,e)})}var o,a,s,l=t.settings;l.inline_styles&&(a=r(l.font_size_legacy_values),o={font:function(t,n){e(n,{backgroundColor:n.style.backgroundColor,color:n.color,fontFamily:n.face,fontSize:a[parseInt(n.size,10)-1]})},u:function(t,n){e(n,{textDecoration:"underline"})},strike:function(t,n){e(n,{textDecoration:"line-through"})}},t.on("PreProcess SetContent",i))})})}),r(lt,[],function(){return{send:function(e){function t(){!e.async||4==n.readyState||r++>1e4?(e.success&&1e4>r&&200==n.status?e.success.call(e.success_scope,""+n.responseText,n,e):e.error&&e.error.call(e.error_scope,r>1e4?"TIMED_OUT":"GENERAL",n,e),n=null):setTimeout(t,10)}var n,r=0;if(e.scope=e.scope||this,e.success_scope=e.success_scope||e.scope,e.error_scope=e.error_scope||e.scope,e.async=e.async===!1?!1:!0,e.data=e.data||"",n=new XMLHttpRequest){if(n.overrideMimeType&&n.overrideMimeType(e.content_type),n.open(e.type||(e.data?"POST":"GET"),e.url,e.async),e.content_type&&n.setRequestHeader("Content-Type",e.content_type),n.setRequestHeader("X-Requested-With","XMLHttpRequest"),n.send(e.data),!e.async)return t();setTimeout(t,10)}}}}),r(ct,[],function(){function e(t,n){var r,i,o,a;if(n=n||'"',null===t)return"null";if(o=typeof t,"string"==o)return i="\bb t\nn\ff\rr\"\"''\\\\",n+t.replace(/([\u0080-\uFFFF\x00-\x1f\"\'\\])/g,function(e,t){return'"'===n&&"'"===e?e:(r=i.indexOf(t),r+1?"\\"+i.charAt(r+1):(e=t.charCodeAt().toString(16),"\\u"+"0000".substring(e.length)+e))})+n;if("object"==o){if(t.hasOwnProperty&&"[object Array]"===Object.prototype.toString.call(t)){for(r=0,i="[";t.length>r;r++)i+=(r>0?",":"")+e(t[r],n);return i+"]"}i="{";for(a in t)t.hasOwnProperty(a)&&(i+="function"!=typeof t[a]?(i.length>1?","+n:n)+a+n+":"+e(t[a],n):"");return i+"}"}return""+t}return{serialize:e,parse:function(e){try{return window[String.fromCharCode(101)+"val"]("("+e+")")}catch(t){}}}}),r(ut,[ct,lt,f],function(e,n,r){function i(e){this.settings=o({},e),this.count=0}var o=r.extend;return i.sendRPC=function(e){return(new i).send(e)},i.prototype={send:function(r){var i=r.error,a=r.success;r=o(this.settings,r),r.success=function(n,o){n=e.parse(n),n===t&&(n={error:"JSON Parse error."}),n.error?i.call(r.error_scope||r.scope,n.error,o):a.call(r.success_scope||r.scope,n.result)},r.error=function(e,t){i&&i.call(r.error_scope||r.scope,e,t)},r.data=e.serialize({id:r.id||"c"+this.count++,method:r.method,params:r.params}),r.content_type="application/json",n.send(r)}},i}),r(dt,[g],function(e){return{callbacks:{},count:0,send:function(n){var r=this,i=e.DOM,o=n.count!==t?n.count:r.count,a="tinymce_jsonp_"+o;r.callbacks[o]=function(e){i.remove(a),delete r.callbacks[o],n.callback(e)},i.add(i.doc.body,"script",{id:a,src:n.url,type:"text/javascript"}),r.count++}}}),r(ft,[],function(){function e(){s=[];for(var e in a)s.push(e);i.length=s.length}function n(){function n(e){var n,r;return r=e!==t?c+e:i.indexOf(",",c),-1===r||r>i.length?null:(n=i.substring(c,r),c=r+1,n)}var r,i,s,c=0;a={},o.load(l),i=o.getAttribute(l)||"";do r=n(parseInt(n(),32)||0),null!==r&&(s=n(parseInt(n(),32)||0),a[r]=s);while(null!==r);e()}function r(){var t,n="";for(var r in a)t=a[r],n+=(n?",":"")+r.length.toString(32)+","+r+","+t.length.toString(32)+","+t;o.setAttribute(l,n),o.save(l),e()}var i,o,a,s,l;return window.localStorage?localStorage:(l="tinymce",o=document.documentElement,o.addBehavior("#default#userData"),i={key:function(e){return s[e]},getItem:function(e){return e in a?a[e]:null},setItem:function(e,t){a[e]=""+t,r()},removeItem:function(e){delete a[e],r()},clear:function(){a={},r()}},n(),i)}),r(pt,[g,u,v,y,f,m],function(e,t,n,r,i,o){var a=window.tinymce;return a.DOM=e.DOM,a.ScriptLoader=n.ScriptLoader,a.PluginManager=r.PluginManager,a.ThemeManager=r.ThemeManager,a.dom=a.dom||{},a.dom.Event=t.Event,i.each(i,function(e,t){a[t]=e}),i.each("isOpera isWebKit isIE isGecko isMac".split(" "),function(e){a[e]=o[e.substr(2).toLowerCase()]}),{}}),r(ht,[O,f],function(e,t){return e.extend({Defaults:{firstControlClass:"first",lastControlClass:"last"},init:function(e){this.settings=t.extend({},this.Defaults,e)},preRender:function(e){e.addClass(this.settings.containerClass,"body")},applyClasses:function(e){var t=this,n=t.settings,r,i,o;r=e.items().filter(":visible"),i=n.firstControlClass,o=n.lastControlClass,r.each(function(e){e.removeClass(i).removeClass(o),n.controlClass&&e.addClass(n.controlClass)}),r.eq(0).addClass(i),r.eq(-1).addClass(o)},renderHtml:function(e){var t=this,n=t.settings,r,i="";return r=e.items(),r.eq(0).addClass(n.firstControlClass),r.eq(-1).addClass(n.lastControlClass),r.each(function(e){n.controlClass&&e.addClass(n.controlClass),i+=e.renderHtml()}),i},recalc:function(){},postRender:function(){}})}),r(mt,[ht],function(e){return e.extend({Defaults:{containerClass:"abs-layout",controlClass:"abs-layout-item"},recalc:function(e){e.items().filter(":visible").each(function(e){var t=e.settings;e.layoutRect({x:t.x,y:t.y,w:t.w,h:t.h}),e.recalc&&e.recalc()})},renderHtml:function(e){return'<div id="'+e._id+'-absend" class="'+e.classPrefix+'abs-end"></div>'+this._super(e)}})}),r(gt,[z,K],function(e,n){return e.extend({Mixins:[n],Defaults:{classes:"widget tooltip tooltip-n"},text:function(e){var n=this;return e!==t?(n._value=e,n._rendered&&(n.getEl().lastChild.innerHTML=n.encode(e)),n):n._value},renderHtml:function(){var e=this,t=e.classPrefix;return'<div id="'+e._id+'" class="'+e.classes()+'" role="presentation">'+'<div class="'+t+'tooltip-arrow"></div>'+'<div class="'+t+'tooltip-inner">'+e.encode(e._text)+"</div>"+"</div>"},repaint:function(){var e=this,t,n;t=e.getEl().style,n=e._layoutRect,t.left=n.x+"px",t.top=n.y+"px",t.zIndex=131070}})}),r(vt,[z,gt],function(e,t){var n;return e.extend({init:function(e){var t=this;t._super(e),t.canFocus=!0,e.tooltip&&t.on("mouseenter mouseleave",function(n){n.control==t&&"mouseenter"==n.type?t.tooltip().moveTo(-65535).text(e.tooltip).show().moveRel(t.getEl(),"bc tc"):t.tooltip().moveTo(-65535).hide()}),t.aria("label",e.tooltip)},tooltip:function(){var e=this;return n||(n=new t({type:"tooltip"}),n.renderTo(e.getContainerElm())),n},active:function(e){var t=this,n;return e!==n&&(t.aria("pressed",e),t.toggleClass("active",e)),t._super(e)},disabled:function(e){var t=this,n;return e!==n&&(t.aria("disabled",e),t.toggleClass("disabled",e)),t._super(e)},postRender:function(){var e=this,t=e.settings;e._rendered=!0,e._super(),e.parent()||!t.width&&!t.height||(e.initLayoutRect(),e.repaint()),t.autofocus&&setTimeout(function(){e.focus()},0)},remove:function(){this._super(),n&&(n.remove(),n=null)}})}),r(yt,[vt],function(e){return e.extend({Defaults:{classes:"widget btn",role:"button"},init:function(e){var t=this,n;t.on("click mousedown",function(e){e.preventDefault()}),t._super(e),n=e.size,e.subtype&&t.addClass(e.subtype),n&&t.addClass("btn-"+n)},repaint:function(){var e=this.getEl().firstChild.style;e.width=e.height="100%",this._super()},renderHtml:function(){var e=this,t=e._id,n=e.classPrefix,r=e.settings.icon,i="";return e.settings.image&&(r="none",i=" style=\"background-image: url('"+e.settings.image+"')\""),r=e.settings.icon?n+"ico "+n+"i-"+r:"",'<div id="'+t+'" class="'+e.classes()+'" tabindex="-1">'+'<button role="presentation" tabindex="-1">'+(r?'<i class="'+r+'"'+i+"></i>":"")+(e._text?(r?" ":"")+e.encode(e._text):"")+"</button>"+"</div>"}})}),r(bt,[U],function(e){return e.extend({Defaults:{defaultType:"button",role:"toolbar"},renderHtml:function(){var e=this,t=e._layout;return e.addClass("btn-group"),e.preRender(),t.preRender(e),'<div id="'+e._id+'" class="'+e.classes()+'">'+'<div id="'+e._id+'-body">'+(e.settings.html||"")+t.renderHtml(e)+"</div>"+"</div>"}})}),r(Ct,[vt],function(e){return e.extend({Defaults:{classes:"checkbox",role:"checkbox",checked:!1},init:function(e){var t=this;t._super(e),t.on("click mousedown",function(e){e.preventDefault()}),t.on("click",function(e){e.preventDefault(),t.disabled()||t.checked(!t.checked())}),t.checked(t.settings.checked)},checked:function(e){var n=this;return e!==t?(e?n.addClass("checked"):n.removeClass("checked"),n._checked=e,n.aria("checked",e),n):n._checked},value:function(e){return this.checked(e)},renderHtml:function(){var e=this,t=e._id,n=e.classPrefix;return'<div id="'+t+'" class="'+e.classes()+'" unselectable="on" aria-labeledby="'+t+'-al" tabindex="-1">'+'<i class="'+n+"ico "+n+'i-checkbox"></i>'+'<span id="'+t+'-al" class="'+n+'label">'+e.encode(e._text)+"</span>"+"</div>"}})}),r(xt,[U],function(e){return e.extend({})}),r(wt,[yt,Y],function(e,t){var n=e.extend({showPanel:function(){var e=this,n=e.settings;n.panel.popover=!0,n.panel.autohide=!0,e.active(!0),e.panel?e.panel.show():e.panel=new t(n.panel).on("hide",function(){e.active(!1)}).parent(e).renderTo(e.getContainerElm()).reflow().moveRel(e.getEl(),n.popoverAlign||"bc-tc")},hidePanel:function(){var e=this;e.panel&&e.panel.hide()},postRender:function(){var e=this;return e.on("click",function(t){t.control===e&&e.showPanel()}),e._super()}});return n}),r(_t,[wt],function(e){return e.extend({init:function(e){this._super(e),this.addClass("colorbutton")},showPreview:function(e){this.getEl("preview").style.backgroundColor=e},renderHtml:function(){var e=this,t=e._id,n=e.classPrefix,r=e.settings.icon?n+"ico "+n+"i-"+e.settings.icon:"",i=e.settings.image?" style=\"background-image: url('"+e.settings.image+"')\"":"";return'<div id="'+t+'" class="'+e.classes()+'" tabindex="-1">'+'<button role="presentation" tabindex="-1">'+(r?'<i class="'+r+'"'+i+"></i>":"")+'<span id="'+t+'-preview" class="'+n+'preview"></span>'+(e._text?(r?" ":"")+e.encode(e._text):"")+"</button>"+"</div>"}})}),r(Nt,[vt,W],function(e,n){return e.extend({init:function(e){var r=this;r._super(e),r.addClass("combobox"),r.on("click",function(e){for(var t=e.target;t;)t.id&&-1!=t.id.indexOf("-open")&&r.fire("action"),t=t.parentNode}),r.on("keydown",function(e){"INPUT"==e.target.nodeName&&13==e.keyCode&&r.parents().reverse().each(function(n){return e.preventDefault(),r.fire("change"),n.submit?(n.submit(),!1):t})}),e.placeholder&&(r.addClass("placeholder"),r.on("focusin",function(){r._hasOnChange||(n.on(r.getEl("inp"),"change",function(){r.fire("change")}),r._hasOnChange=!0),r.hasClass("placeholder")&&(r.getEl("inp").value="",r.removeClass("placeholder"))}),r.on("focusout",function(){0===r.value().length&&(r.getEl("inp").value=e.placeholder,r.addClass("placeholder"))}))},value:function(e){var n=this;return e!==t?(n._value=e,n.removeClass("placeholder"),n._rendered&&(n.getEl("inp").value=e),n):n._rendered?(e=n.getEl("inp").value,e!=n.settings.placeholder?e:""):n._value},repaint:function(){var e=this,t=e.getEl(),r=e.getEl("open"),i=e.layoutRect();return r?n.css(t.firstChild,{width:i.w-r.offsetWidth-10}):n.css(t.firstChild,{width:i.w-10}),e._super(),e},disabled:function(e){var t=this;t._super(e),t._rendered&&(t.getEl().disabled=e)
9},focus:function(){this.getEl("inp").focus()},postRender:function(){var e=this;return n.on(this.getEl("inp"),"change",function(){e.fire("change")}),e._super()},renderHtml:function(){var e=this,t=e._id,n=e.settings,r=e.classPrefix,i=n.value||n.placeholder||"",o,a,s="";return o=n.icon?r+"ico "+r+"i-"+n.icon:"",a=e._text,(o||a)&&(s='<div id="'+t+'-open" class="'+r+"btn "+r+'open" tabIndex="-1">'+'<button id="'+t+'-action" hidefocus tabindex="-1">'+(o?'<i class="'+o+'"></i>':'<i class="'+r+'caret"></i>')+(a?(o?" ":"")+a:"")+"</button>"+"</div>",e.addClass("has-open")),'<div id="'+t+'" class="'+e.classes()+'">'+'<input id="'+t+'-inp" class="'+r+"textbox "+r+'placeholder" value="'+i+'" hidefocus="true">'+s+"</div>"}})}),r(Et,[z,X],function(e,n){return e.extend({Defaults:{delimiter:"\u00bb"},init:function(e){var t=this;t._super(e),t.addClass("path"),t.canFocus=!0,t.on("click",function(e){var n,r=e.target;(n=r.getAttribute("data-index"))&&t.fire("select",{value:t.data()[n],index:n})})},focus:function(){var e=this;return e.keyNav=new n({root:e,enableLeftRight:!0}),e.keyNav.focusFirst(),e},data:function(e){var n=this;return e!==t?(n._data=e,n.update(),n):n._data},update:function(){this.getEl().innerHTML=this._getPathHtml()},postRender:function(){var e=this;e._super(),e.data(e.settings.data)},renderHtml:function(){var e=this;return'<div id="'+e._id+'" class="'+e.classPrefix+'path">'+e._getPathHtml()+"</div>"},_getPathHtml:function(){var e=this,t=e._data||[],n,r,i="",o=e.classPrefix;for(n=0,r=t.length;r>n;n++)i+=(n>0?'<div class="'+o+'divider" aria-hidden="true"> '+e.settings.delimiter+" </div>":"")+'<div role="button" class="'+o+"path-item"+(n==r-1?" "+o+"last":"")+'" data-index="'+n+'" tabindex="-1" id="'+e._id+"-"+n+'">'+t[n].name+"</div>";return i||(i='<div class="'+o+'path-item">&nbsp;</div>'),i}})}),r(kt,[Et,at],function(e,t){return e.extend({postRender:function(){function e(e){return 1===e.nodeType&&("BR"==e.nodeName||!!e.getAttribute("data-mce-bogus"))}var n=this,r=t.activeEditor;return n.on("select",function(t){for(var n=[],i=r.selection.getNode(),o=r.getBody();i&&(e(i)||n.push(i),i=i.parentNode,i!=o););r.focus(),r.selection.select(n[n.length-1-t.index]),r.nodeChanged()}),r.on("nodeChange",function(t){for(var i=[],o=t.parents,a=o.length;a--;)if(!e(o[a])){var s=r.fire("ResolveName",{name:o[a].nodeName.toLowerCase(),target:o[a]});i.push({name:s.name})}n.data(i)}),n._super()}})}),r(St,[U],function(e){return e.extend({Defaults:{layout:"flex",align:"center",defaults:{flex:1}},renderHtml:function(){var e=this,t=e._layout,n=e.classPrefix;return e.addClass("formitem"),t.preRender(e),'<div id="'+e._id+'" class="'+e.classes()+'" hideFocus="1" tabIndex="-1">'+(e.settings.title?'<div id="'+e._id+'-title" class="'+n+'title">'+e.settings.title+"</div>":"")+'<div id="'+e._id+'-body" class="'+e.classes("body")+'">'+(e.settings.html||"")+t.renderHtml(e)+"</div>"+"</div>"}})}),r(Tt,[U,St],function(e,n){return e.extend({Defaults:{containerCls:"form",layout:"flex",direction:"column",align:"stretch",flex:1,padding:20,labelGap:30,spacing:10},preRender:function(){var e=this,r=e.items();r.each(function(r){var i,o=r.settings.label;o&&(i=new n({layout:"flex",autoResize:"overflow",defaults:{flex:1},items:[{type:"label",text:o,flex:0,forId:r._id}]}),i.type="formitem",r.settings.flex===t&&(r.settings.flex=1),e.replace(r,i),i.add(r))})},recalcLabels:function(){var e=this,t=0,n=[],r,i;if(e.settings.labelGapCalc!==!1)for(e.items().filter("formitem").each(function(e){var r=e.items()[0],i=r.getEl().clientWidth;t=i>t?i:t,n.push(r)}),i=e.settings.labelGap||0,r=n.length;r--;)n[r].settings.minWidth=t+i},visible:function(e){var t=this._super(e);return e===!0&&this._rendered&&this.recalcLabels(),t},fromJSON:function(e){var t=this;if(e)for(var n in e)t.find("#"+n).value(e[n]);return t},toJSON:function(){var e=this,n={};return e.find("*").each(function(e){var r=e.name(),i=e.value();r&&i!==t&&(n[r]=i)}),n},submit:function(){return this.fire("submit",{data:this.toJSON()})},postRender:function(){var e=this;e._super(),e.recalcLabels(),e.fromJSON(e.settings.data)}})}),r(Rt,[Tt],function(e){return e.extend({Defaults:{containerCls:"fieldset",layout:"flex",direction:"column",align:"stretch",flex:1,padding:"25 15 5 15",labelGap:30,spacing:10,border:1},renderHtml:function(){var e=this,t=e._layout,n=e.classPrefix;return e.preRender(),t.preRender(e),'<fieldset id="'+e._id+'" class="'+e.classes()+'" hideFocus="1" tabIndex="-1">'+(e.settings.title?'<legend id="'+e._id+'-title" class="'+n+'fieldset-title">'+e.settings.title+"</legend>":"")+'<div id="'+e._id+'-body" class="'+e.classes("body")+'">'+(e.settings.html||"")+t.renderHtml(e)+"</div>"+"</fieldset>"}})}),r(At,[Nt],function(e){return e.extend({init:function(e){var t=this,n=tinymce.activeEditor,r;e.spellcheck=!1,r=n.settings.file_browser_callback,r&&(e.icon="browse",e.onaction=function(){r(t.getEl("inp").id,t.getEl("inp").value,e.filetype,window)}),t._super(e)}})}),r(Bt,[mt],function(e){return e.extend({recalc:function(e){var t=e.layoutRect(),n=e.paddingBox();e.items().filter(":visible").each(function(e){e.layoutRect({x:n.left,y:n.top,w:t.innerW-n.right-n.left,h:t.innerH-n.top-n.bottom}),e.recalc&&e.recalc()})}})}),r(Lt,[mt],function(e){return e.extend({recalc:function(e){var t,n,r,i,o,a,s,l,c,u,d,f,p,h,m,g,v=[],y,b,C,x,w,_,N,E,k,S,T,R,A,B,L,H,M,D,P,O,I,F,W,z,V=Math.max,U=Math.min;for(r=e.items().filter(":visible"),i=e.layoutRect(),o=e._paddingBox,a=e.settings,f=a.direction,s=a.align,l=a.pack,c=a.spacing||0,("row-reversed"==f||"column-reverse"==f)&&(r=r.set(r.toArray().reverse()),f=f.split("-")[0]),"column"==f?(k="y",N="h",E="minH",S="maxH",R="innerH",T="top",A="bottom",B="deltaH",L="contentH",I="left",D="w",H="x",M="innerW",P="minW",O="maxW",F="right",W="deltaW",z="contentW"):(k="x",N="w",E="minW",S="maxW",R="innerW",T="left",A="right",B="deltaW",L="contentW",I="top",D="h",H="y",M="innerH",P="minH",O="maxH",F="bottom",W="deltaH",z="contentH"),d=i[R]-o[T]-o[T],_=u=0,t=0,n=r.length;n>t;t++)p=r[t],h=p.layoutRect(),m=p.settings,g=m.flex,d-=n-1>t?c:0,g>0&&(u+=g,h[S]&&v.push(p),h.flex=g),d-=h[E],y=o[I]+h[P]+o[F],y>_&&(_=y);if(x={},x[E]=0>d?i[E]-d+i[B]:i[R]-d+i[B],x[P]=_+i[W],x[L]=i[R]-d,x[z]=_,x.minW=U(x.minW,i.maxW),x.minH=U(x.minH,i.maxH),x.minW=V(x.minW,i.startMinWidth),x.minH=V(x.minH,i.startMinHeight),!i.autoResize||x.minW==i.minW&&x.minH==i.minH){for(C=d/u,t=0,n=v.length;n>t;t++)p=v[t],h=p.layoutRect(),b=h[S],y=h[E]+Math.ceil(h.flex*C),y>b?(d-=h[S]-h[E],u-=h.flex,h.flex=0,h.maxFlexSize=b):h.maxFlexSize=0;for(C=d/u,w=o[T],x={},0===u&&("end"==l?w=d+o[T]:"center"==l?(w=Math.round(i[R]/2-(i[R]-d)/2)+o[T],0>w&&(w=o[T])):"justify"==l&&(w=o[T],c=Math.floor(d/(r.length-1)))),x[H]=o[I],t=0,n=r.length;n>t;t++)p=r[t],h=p.layoutRect(),y=h.maxFlexSize||h[E],"center"===s?x[H]=Math.round(i[M]/2-h[D]/2):"stretch"===s?(x[D]=V(h[P]||0,i[M]-o[I]-o[F]),x[H]=o[I]):"end"===s&&(x[H]=i[M]-h[D]-o.top),h.flex>0&&(y+=Math.ceil(h.flex*C)),x[N]=y,x[k]=w,p.layoutRect(x),p.recalc&&p.recalc(),w+=y+c}else if(x.w=x.minW,x.h=x.minH,e.layoutRect(x),this.recalc(e),null===e._lastRect){var q=e.parent();q&&(q._lastRect=null,q.recalc())}}})}),r(Ht,[ht],function(e){return e.extend({Defaults:{containerClass:"flow-layout",controlClass:"flow-layout-item",endClass:"break"},recalc:function(e){e.items().filter(":visible").each(function(e){e.recalc&&e.recalc()})}})}),r(Mt,[V,z,Y,f,at],function(e,n,r,i,o){function a(e){function n(e){return e.replace(/%(\w+)/g,"")}var r=o.activeEditor,i,a,s=r.dom,c="",u,d;return d=r.settings.preview_styles,d===!1?"":(d||(d="font-family font-size font-weight text-decoration text-transform color background-color border border-radius"),(e=r.formatter.get(e))?(e=e[0],i=e.block||e.inline||"span",a=s.create(i),l(e.styles,function(e,t){e=n(e),e&&s.setStyle(a,t,e)}),l(e.attributes,function(e,t){e=n(e),e&&s.setAttrib(a,t,e)}),l(e.classes,function(e){e=n(e),s.hasClass(a,e)||s.addClass(a,e)}),r.fire("PreviewFormats"),s.setStyles(a,{position:"absolute",left:-65535}),r.getBody().appendChild(a),u=s.getStyle(r.getBody(),"fontSize",!0),u=/px$/.test(u)?parseInt(u,10):0,l(d.split(" "),function(e){var t=s.getStyle(a,e,!0);if(!("background-color"==e&&/transparent|rgba\s*\([^)]+,\s*0\)/.test(t)&&(t=s.getStyle(r.getBody(),e,!0),"#ffffff"==s.toHex(t).toLowerCase())||"color"==e&&"#000000"==s.toHex(t).toLowerCase())){if("font-size"==e&&/em|%$/.test(t)){if(0===u)return;t=parseFloat(t,10)/(/%$/.test(t)?100:1),t=t*u+"px"}"border"==e&&t&&(c+="padding:0 2px;"),c+=e+":"+t+";"}}),r.fire("AfterPreviewFormats"),s.remove(a),c):t)}function s(e){e=e.split(";");for(var t=e.length;t--;)e[t]=e[t].split("=");return e}var l=i.each;n.translate=function(e){return o.translate(e)},o.on("AddEditor",function(t){function n(){function e(r){var i=[];if(r)return l(r,function(r){var o={text:{raw:r.title},icon:r.icon};if(r.items)o.menu=e(r.items);else{var s=r.format||"custom"+t++;r.format||(r.name=s,n.push(r)),o.textStyle=function(){return a(s)},o.onclick=function(){h(s)}}i.push(o)}),i}var t=0,n=[],r=[{title:"Headers",items:[{title:"Header 1",format:"h1"},{title:"Header 2",format:"h2"},{title:"Header 3",format:"h3"},{title:"Header 4",format:"h4"},{title:"Header 5",format:"h5"},{title:"Header 6",format:"h6"}]},{title:"Inline",items:[{title:"Bold",icon:"bold",format:"bold"},{title:"Italic",icon:"italic",format:"italic"},{title:"Underline",icon:"underline",format:"underline"},{title:"Strikethrough",icon:"strikethrough",format:"strikethrough"},{title:"Superscript",icon:"superscript",format:"superscript"},{title:"Subscript",icon:"subscript",format:"subscript"},{title:"Code",icon:"code",format:"code"}]},{title:"Blocks",items:[{title:"Paragraph",format:"p"},{title:"Blockquote",format:"blockquote"},{title:"Div",format:"div"},{title:"Pre",format:"pre"}]},{title:"Alignment",items:[{title:"Left",icon:"alignleft",format:"alignleft"},{title:"Center",icon:"aligncenter",format:"aligncenter"},{title:"Right",icon:"alignright",format:"alignright"},{title:"Justify",icon:"alignjustify",format:"alignjustify"}]}];m.on("init",function(){l(n,function(e){m.formatter.register(e.name,e)})});var i=e(m.settings.style_formats||r);return i}function c(){return m.undoManager?m.undoManager.hasUndo():!1}function u(){return m.undoManager?m.undoManager.hasRedo():!1}function d(){var e=this;e.disabled(!c()),m.on("Undo Redo AddUndo",function(){e.disabled(!c())})}function f(){var e=this;e.disabled(!u()),m.on("Undo Redo AddUndo",function(){e.disabled(!u())})}function p(){var e=this;m.on("VisualAid",function(t){e.active(t.hasVisual)}),e.active(m.hasVisual)}function h(e){e.control&&(e=e.control.settings.format),e&&o.activeEditor.execCommand("mceToggleFormat",!1,e)}var m=t.editor,g;g=n(),l({bold:"Bold",italic:"Italic",underline:"Underline",strikethrough:"Strikethrough",subscript:"Subscript",superscript:"Superscript"},function(e,t){m.addButton(t,{tooltip:e,onPostRender:function(){var e=this;m.formatter?m.formatter.formatChanged(t,function(t){e.active(t)}):m.on("init",function(){m.formatter.formatChanged(t,function(t){e.active(t)})})},onclick:function(){h(t)}})}),l({outdent:["Decrease indent","Outdent"],indent:["Increase indent","Indent"],cut:["Cut","Cut"],copy:["Copy","Copy"],paste:["Paste","Paste"],help:["Help","mceHelp"],selectall:["Select all","SelectAll"],hr:["Insert horizontal rule","InsertHorizontalRule"],removeformat:["Clear formatting","RemoveFormat"],visualaid:["Visual aids","mceToggleVisualAid"],newdocument:["New document","mceNewDocument"]},function(e,t){m.addButton(t,{tooltip:e[0],cmd:e[1]})}),l({blockquote:["Toggle blockquote","mceBlockQuote"],numlist:["Numbered list","InsertOrderedList"],bullist:["Bulleted list","InsertUnorderedList"],subscript:["Subscript","Subscript"],superscript:["Superscript","Superscript"],alignleft:["Align left","JustifyLeft"],aligncenter:["Align center","JustifyCenter"],alignright:["Align right","JustifyRight"],alignjustify:["Justify","JustifyFull"]},function(e,t){m.addButton(t,{tooltip:e[0],cmd:e[1],onPostRender:function(){var e=this;m.formatter?m.formatter.formatChanged(t,function(t){e.active(t)}):m.on("init",function(){m.formatter.formatChanged(t,function(t){e.active(t)})})}})}),m.addButton("undo",{tooltip:"Undo",onPostRender:d,cmd:"undo"}),m.addButton("redo",{tooltip:"Redo",onPostRender:f,cmd:"redo"}),m.addMenuItem("newdocument",{text:"New document",shortcut:"Ctrl+N",icon:"newdocument",cmd:"mceNewDocument"}),m.addMenuItem("undo",{text:"Undo",icon:"undo",shortcut:"Ctrl+Z",onPostRender:d,cmd:"undo"}),m.addMenuItem("redo",{text:"Redo",icon:"redo",shortcut:"Ctrl+Y",onPostRender:f,cmd:"redo"}),m.addMenuItem("visualaid",{text:"Visual aids",selectable:!0,onPostRender:p,cmd:"mceToggleVisualAid"}),l({cut:["Cut","Cut","Ctrl+X"],copy:["Copy","Copy","Ctrl+C"],paste:["Paste","Paste","Ctrl+V"],selectall:["Select all","SelectAll","Ctrl+A"],bold:["Bold","Bold","Ctrl+B"],italic:["Italic","Italic","Ctrl+I"],underline:["Underline","Underline"],strikethrough:["Strikethrough","Strikethrough"],subscript:["Subscript","Subscript"],superscript:["Superscript","Superscript"],removeformat:["Clear formatting","RemoveFormat"]},function(e,t){m.addMenuItem(t,{text:e[0],icon:t,shortcut:e[2],cmd:e[1]})}),m.on("mousedown",function(){r.hideAll()}),e.add("styleselect",function(t){var n=[].concat(g);return e.create("menubutton",i.extend({text:"Formats",menu:n},t))}),e.add("formatselect",function(t){var n=[],r=s("Paragraph=p;Address=address;Pre=pre;Header 1=h1;Header 2=h2;Header 3=h3;Header 4=h4;Header 5=h5;Header 6=h6");return l(r,function(e){n.push({text:{raw:e[0]},format:e[1],textStyle:function(){return a(e[1])}})}),e.create("listbox",i.extend({text:{raw:r[0][0]},menu:n,onclick:h},t))}),e.add("fontselect",function(t){var n=[],r=s("Andale Mono=andale mono,times;Arial=arial,helvetica,sans-serif;Arial Black=arial black,avant garde;Book Antiqua=book antiqua,palatino;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier;Georgia=georgia,palatino;Helvetica=helvetica;Impact=impact,chicago;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco;Times New Roman=times new roman,times;Trebuchet MS=trebuchet ms,geneva;Verdana=verdana,geneva;Webdings=webdings;Wingdings=wingdings,zapf dingbats");return l(r,function(e){n.push({text:{raw:e[0]},format:e[1],style:-1==e[1].indexOf("dings")?"font-family:"+e[1]:""})}),e.create("listbox",i.extend({text:"Font Family",menu:n,onclick:function(e){e.control.settings.format&&o.activeEditor.execCommand("FontName",!1,e.control.settings.format)}},t))}),e.add("fontsizeselect",function(t){var n=[];return l("8pt 10pt 12pt 14pt 18pt 24pt 36pt".split(" "),function(e){n.push({text:e,format:e})}),e.create("listbox",i.extend({text:"Font Sizes",menu:n,onclick:function(e){e.control.settings.format&&o.activeEditor.execCommand("FontSize",!1,e.control.settings.format)}},t))}),m.addMenuItem("formats",{text:"Formats",menu:g})})}),r(Dt,[mt],function(e){return e.extend({recalc:function(e){var t=e.settings,n,r,i,o,a,s,l,c,u,d,f,p,h,m,g,v,y,b,C,x,w,_,N=[],E=[],k,S,T,R,A,B;for(t=e.settings,i=e.items().filter(":visible"),o=e.layoutRect(),r=t.columns||Math.ceil(Math.sqrt(i.length)),n=Math.ceil(i.length/r),y=t.spacingH||t.spacing||0,b=t.spacingV||t.spacing||0,C=t.alignH||t.align,x=t.alignV||t.align,g=e._paddingBox,d=0;r>d;d++)N.push(0);for(f=0;n>f;f++)E.push(0);for(f=0;n>f;f++)for(d=0;r>d&&(u=i[f*r+d],u);d++)c=u.layoutRect(),k=c.minW,S=c.minH,N[d]=k>N[d]?k:N[d],E[f]=S>E[f]?S:E[f];for(A=o.innerW-g.left-g.right,w=0,d=0;r>d;d++)w+=N[d]+(d>0?y:0),A-=(d>0?y:0)+N[d];for(B=o.innerH-g.top-g.bottom,_=0,f=0;n>f;f++)_+=E[f]+(f>0?b:0),B-=(f>0?b:0)+E[f];if(w+=g.left+g.right,_+=g.top+g.bottom,l={},l.minW=w+(o.w-o.innerW),l.minH=_+(o.h-o.innerH),l.contentW=l.minW-o.deltaW,l.contentH=l.minH-o.deltaH,l.minW=Math.min(l.minW,o.maxW),l.minH=Math.min(l.minH,o.maxH),l.minW=Math.max(l.minW,o.startMinWidth),l.minH=Math.max(l.minH,o.startMinHeight),!o.autoResize||l.minW==o.minW&&l.minH==o.minH){o.autoResize&&(l=e.layoutRect(l),l.contentW=l.minW-o.deltaW,l.contentH=l.minH-o.deltaH);var L;L="start"==t.packV?0:B>0?Math.floor(B/n):0;var H=0,M=t.flexWidths;if(M)for(d=0;M.length>d;d++)H+=M[d];else H=r;var D=A/H;for(d=0;r>d;d++)N[d]+=M?Math.ceil(M[d]*D):D;for(h=g.top,f=0;n>f;f++){for(p=g.left,s=E[f]+L,d=0;r>d&&(u=i[f*r+d],u);d++)m=u.settings,c=u.layoutRect(),a=N[d],T=R=0,c.x=p,c.y=h,v=m.alignH||C,"center"==v?c.x=p+a/2-c.w/2:"right"==v?c.x=p+a-c.w:"stretch"==v&&(c.w=a),v=m.alignV||x,"center"==v?c.y=h+s/2-c.h/2:"bottom"==v?c.y=h+s-c.h:"stretch"==v&&(c.h=s),u.layoutRect(c),p+=a+y,u.recalc&&u.recalc();h+=s+b}}else if(l.w=l.minW,l.h=l.minH,e.layoutRect(l),this.recalc(e),null===e._lastRect){var P=e.parent();P&&(P._lastRect=null,P.recalc())}}})}),r(Pt,[vt],function(e){return e.extend({renderHtml:function(){var e=this;return e.addClass("iframe"),e.canFocus=!1,'<iframe id="'+e._id+'" class="'+e.classes()+'" tabindex="-1" src="'+(e.settings.url||"javascript:''")+'" frameborder="0"></iframe>'},src:function(e){this.getEl().src=e},html:function(e){return this.getEl().contentWindow.document.body.innerHTML=e,this}})}),r(Ot,[vt],function(e){return e.extend({init:function(e){var t=this;t._super(e),t.addClass("widget"),t.addClass("label"),t.canFocus=!1,e.multiline&&t.addClass("autoscroll"),e.strong&&t.addClass("strong")},initLayoutRect:function(){var e=this,t=e._super();return e.settings.multiline&&(e.getEl().offsetWidth>t.maxW&&(t.minW=t.maxW,e.addClass("multiline")),e.getEl().style.width=t.minW+"px",t.startMinH=t.h=t.minH=Math.min(t.maxH,e.getEl().offsetHeight)),t},disabled:function(e){var t=this,n;return e!==n&&(t.toggleClass("label-disabled",e),t._rendered&&(t.getEl()[0].className=t.classes())),t._super(e)},repaint:function(){var e=this;return e.settings.multiline||(e.getEl().style.lineHeight=e.layoutRect().h+"px"),e._super()},text:function(e){var t=this;return t._rendered&&e&&(t.getEl().innerHTML=t.encode(e)),t._super(e)},renderHtml:function(){var e=this,t=e.settings.forId;return'<label id="'+e._id+'" class="'+e.classes()+'"'+(t?' for="'+t:"")+'">'+e.encode(e._text)+"</label>"}})}),r(It,[U,X],function(e,t){return e.extend({Defaults:{role:"toolbar",layout:"flow"},init:function(e){var t=this;t._super(e),t.addClass("toolbar")},postRender:function(){var e=this;return e.items().addClass("toolbar-item"),e.keyNav=new t({root:e,enableLeftRight:!0}),e._super()}})}),r(Ft,[It],function(e){return e.extend({Defaults:{role:"menubar",containerCls:"menubar",defaults:{type:"menubutton"}}})}),r(Wt,[yt,V,Ft],function(e,t,n){function r(e,t){for(;e;){if(t===e)return!0;e=e.parentNode}return!1}var i=e.extend({init:function(e){var t=this;t._renderOpen=!0,t._super(e),t.addClass("menubtn"),t.aria("haspopup",!0),t.hasPopup=!0},showMenu:function(){var e=this,n=e.settings,r;e.menu||(r=n.menu||[],r.length?r={type:"menu",items:r}:r.type=r.type||"menu",e.menu=t.create(r).parent(e).renderTo(e.getContainerElm()),e.fire("createmenu"),e.menu.reflow(),e.menu.on("cancel",function(t){t.control===e.menu&&e.focus()}),e.menu.on("show hide",function(t){t.control==e.menu&&e.activeMenu("show"==t.type)}).fire("show"),e.aria("expanded",!0)),e.menu.show(),e.menu.layoutRect({w:e.layoutRect().w}),e.menu.moveRel(e.getEl(),"bl-tl")},hideMenu:function(){var e=this;e.menu&&(e.menu.items().each(function(e){e.hideMenu&&e.hideMenu()}),e.menu.hide(),e.aria("expanded",!1))},activeMenu:function(e){this.toggleClass("active",e)},renderHtml:function(){var e=this,t=e._id,r=e.classPrefix,i=e.settings.icon?r+"ico "+r+"i-"+e.settings.icon:"";return e.aria("role",e.parent()instanceof n?"menuitem":"button"),'<div id="'+t+'" class="'+e.classes()+'" tabindex="-1">'+'<button id="'+t+'-open" role="presentation" tabindex="-1">'+(i?'<i class="'+i+'"></i>':"")+(e._text?(i?" ":"")+e.encode(e._text):"")+' <i class="'+r+'caret"></i>'+"</button>"+"</div>"},postRender:function(){var e=this;return e.on("click",function(t){t.control===e&&r(t.target,e.getEl())&&(e.showMenu(),t.keyboard&&e.menu.items()[0].focus())}),e.on("mouseenter",function(t){var n=t.control,r=e.parent(),o;n&&r&&n instanceof i&&n.parent()==r&&(r.items().filter("MenuButton").each(function(e){e.hideMenu&&e!=n&&(e.menu&&e.menu.visible()&&(o=!0),e.hideMenu())}),o&&n.showMenu())}),e._super()},text:function(e){var t=this,n,r;if(t._rendered)for(r=t.getEl("open").childNodes,n=0;r.length>n;n++)3==r[n].nodeType&&(r[n].data=t.encode(e));return this._super(e)},remove:function(){this._super(),this.menu&&this.menu.remove()}});return i}),r(zt,[Wt],function(e){return e.extend({init:function(e){var t=this,n,r,i,o,a;if(t._values=n=e.values,n){for(r=0;n.length>r;r++)i=n[r].selected||e.value===n[r].value,i&&(o=o||n[r].text,t._value=n[r].value);e.menu=n}e.text=e.text||o||n[0].text,t._super(e),t.addClass("listbox"),t.on("select",function(n){var r=n.control;a&&(n.lastControl=a),e.multiple?r.active(!r.active()):t.value(n.control.settings.value),a=r})},value:function(e){function n(e,t){e.items().each(function(e){i=e.value()===t,i&&(o=o||e.text()),e.active(i),e.menu&&n(e.menu,t)})}var r=this,i,o,a,s;if(e!==t){if(r.menu)n(r.menu,e);else for(a=r.settings.menu,s=0;a.length>s;s++)i=a[s].value==e,i&&(o=o||a[s].text),a[s].active=i;r.text(o)}return r._super(e)}})}),r(Vt,[vt,V],function(e,t){return e.extend({Defaults:{border:0,role:"menuitem"},init:function(e){var t=this;t.hasPopup=!0,t._super(e),e=t.settings,t.addClass("menu-item"),e.menu&&t.addClass("menu-item-expand"),("-"===t._text||"|"===t._text)&&(t.addClass("menu-item-sep"),t.aria("role","separator"),t.canFocus=!1,t._text="-"),e.selectable&&(t.aria("role","menuitemcheckbox"),t.aria("checked",!0),t.addClass("menu-item-checkbox"),e.icon="selected"),t.on("mousedown",function(e){e.preventDefault()}),t.on("mouseenter click",function(n){n.control===t&&(e.menu||"click"!==n.type?(t.showMenu(),n.keyboard&&setTimeout(function(){t.menu.items()[0].focus()},0)):(t.parent().hideAll(),t.fire("cancel"),t.fire("select")))}),e.menu&&t.aria("haspopup",!0)},hasMenus:function(){return!!this.settings.menu},showMenu:function(){var e=this,n=e.settings,r;e.parent().items().each(function(t){t!==e&&t.hideMenu()}),n.menu&&(e.menu?e.menu.show():(r=n.menu,r.length?r={type:"menu",items:r}:r.type=r.type||"menu",e.menu=t.create(r).parent(e).renderTo(e.getContainerElm()),e.menu.reflow(),e.menu.fire("show"),e.menu.on("cancel",function(){e.focus()}),e.menu.on("hide",function(t){t.control===e.menu&&e.removeClass("selected")})),e.menu._parentMenu=e.parent(),e.menu.addClass("menu-sub"),e.menu.moveRel(e.getEl(),"tr-tl"),e.addClass("selected"),e.aria("expanded",!0))},hideMenu:function(){var e=this;return e.menu&&(e.menu.items().each(function(e){e.hideMenu&&e.hideMenu()}),e.menu.hide(),e.aria("expanded",!1)),e},renderHtml:function(){var e=this,t=e._id,n=e.settings,r=e.classPrefix,i=e.encode(e._text),o=e.settings.icon;return o&&e.parent().addClass("menu-has-icons"),o=r+"ico "+r+"i-"+(e.settings.icon||"none"),'<div id="'+t+'" class="'+e.classes()+'" tabindex="-1">'+("-"!==i?'<i class="'+o+'"></i>&nbsp;':"")+("-"!==i?'<span id="'+t+'-text" class="'+r+'text">'+i+"</span>":"")+(n.shortcut?'<div id="'+t+'-shortcut" class="'+r+'menu-shortcut">'+n.shortcut+"</div>":"")+(n.menu?'<div class="'+r+'caret"></div>':"")+"</div>"},postRender:function(){var e=this,t=e.settings,n=t.textStyle;if("function"==typeof n&&(n=n()),n){var r=e.getEl("text");r&&r.setAttribute("style",n)}return e._super()},remove:function(){this._super(),this.menu&&this.menu.remove()}})}),r(Ut,[Y,X,Vt],function(e,n,r){var i=e.extend({Defaults:{defaultType:"menuitem",border:1,layout:"stack",role:"menu"},init:function(e){var t=this;e.autohide=!0,t._super(e),t.addClass("menu"),t.keyNav=new n({root:t,enableUpDown:!0,enableLeftRight:!0,leftAction:function(){t.parent()instanceof r&&t.keyNav.cancel()},onCancel:function(){t.fire("cancel",{},!1),t.hide()}})},repaint:function(){return this.toggleClass("menu-align",!0),this._super(),this.getEl().style.height="",this.getEl("body").style.height="",this},cancel:function(){var e=this;e.hideAll(),e.fire("cancel"),e.fire("select")},hideAll:function(){var e=this;return this.find("menuitem").exec("hideMenu"),e._super()},preRender:function(){var e=this;return e.items().each(function(n){var r=n.settings;return r.icon||r.selectable?(e._hasIcons=!0,!1):t}),e._super()}});return i}),r(qt,[vt],function(e){return e.extend({Defaults:{classes:"radio",checked:!1},init:function(e){var t=this;t._super(e),t.on("click",function(e){e.preventDefault(),t.disabled()||t.checked()||(t.parent().items().filter("radio:checked").exec("checked",!1),t.checked(!0))}),t.checked(e.checked)},checked:function(e){var n=this;return e!==t?(e?n.addClass("checked"):n.removeClass("checked"),n._checked=e,n):n._checked},renderHtml:function(){var e=this,t=e._id,n=e.classPrefix;return'<div id="'+t+'" class="'+e.classes()+'" role="radio" unselectable="on">'+'<i class="'+n+"ico "+n+'radio"></i>'+e._text+"</div>"}})}),r($t,[U],function(e){return e.extend({})}),r(jt,[vt,q,W],function(e,t,n){return e.extend({renderHtml:function(){var e=this,t=e.classPrefix;return e.addClass("resizehandle"),e.settings.both&&e.addClass("resizehandle-both"),e.canFocus=!1,'<div id="'+e._id+'" class="'+e.classes()+'"><i class="'+t+"ico "+t+'i-resize"></i></div>'},postRender:function(){function e(e){return{width:e.clientWidth,height:e.clientHeight}}function r(t,r){var o,s,l,c,u=a.settings;o=a.getContainer(),s=a.getContentAreaContainer().firstChild,l=e(o),c=e(s),t=Math.max(u.min_width||100,t),r=Math.max(u.min_height||100,r),t=Math.min(u.max_width||65535,t),r=Math.min(u.max_height||65535,r),i.settings.both&&n.css(o,"width",t+(l.width-c.width)),n.css(o,"height",r+(l.height-c.height)),i.settings.both&&n.css(s,"width",t),n.css(s,"height",r),a.fire("ResizeEditor")}var i=this,o,a=i.settings.editor;i._super(),i.resizeDragHelper=new t(this._id,{start:function(){o=e(a.getContentAreaContainer().firstChild)},drag:function(e){r(o.width+e.deltaX,o.height+e.deltaY)},end:function(){}})}})}),r(Kt,[vt],function(e){return e.extend({renderHtml:function(){var e=this;return e.addClass("spacer"),e.canFocus=!1,'<div id="'+e._id+'" class="'+e.classes()+'"></div>'}})}),r(Gt,[Wt,g],function(e,t){var n=t.DOM;return e.extend({Defaults:{classes:"widget btn splitbtn",role:"splitbutton"},repaint:function(){var e=this,t=e.getEl(),r=e.layoutRect(),i,o,a;return e._super(),i=t.firstChild,o=t.lastChild,n.css(i,{width:r.w-o.offsetWidth,height:r.h-2}),n.css(o,{height:r.h-2}),a=i.firstChild.style,a.width=a.height="100%",a=o.firstChild.style,a.width=a.height="100%",e},activeMenu:function(e){var t=this;n.toggleClass(t.getEl().lastChild,t.classPrefix+"active",e)},renderHtml:function(){var e=this,t=e._id,n=e.classPrefix,r=e.settings.icon?n+"ico "+n+"i-"+e.settings.icon:"";return'<div id="'+t+'" class="'+e.classes()+'">'+'<button hidefocus tabindex="-1">'+(r?'<i class="'+r+'"></i>':"")+(e._text?(r?" ":"")+e._text:"")+"</button>"+'<button class="'+n+'open" hidefocus tabindex="-1">'+(e._menuBtnText?(r?" ":"")+e._menuBtnText:"")+' <i class="'+n+'caret"></i>'+"</button>"+"</div>"},postRender:function(){var e=this,t=e.settings.onclick;return e.on("click",function(e){e.control!=this||n.getParent(e.target,"."+this.classPrefix+"open")||(e.stopImmediatePropagation(),t.call(this,e))}),delete e.settings.onclick,e._super()}})}),r(Yt,[Ht],function(e){return e.extend({Defaults:{containerClass:"stack-layout",controlClass:"stack-layout-item",endClass:"break"}})}),r(Xt,[j,W],function(e,t){"use stict";return e.extend({lastIdx:0,Defaults:{layout:"absolute",defaults:{type:"panel"}},activateTab:function(e){this.activeTabId&&t.removeClass(this.getEl(this.activeTabId),this.classPrefix+"active"),this.activeTabId="t"+e,t.addClass(this.getEl("t"+e),this.classPrefix+"active"),e!=this.lastIdx&&(this.items()[this.lastIdx].hide(),this.lastIdx=e),this.items()[e].show().fire("showtab"),this.reflow()},renderHtml:function(){var e=this,t=e._layout,n="",r=e.classPrefix;return e.preRender(),t.preRender(e),e.items().each(function(t,i){n+='<div id="'+e._id+"-t"+i+'" class="'+r+'tab" unselectable="on">'+e.encode(t.settings.title)+"</div>"}),'<div id="'+e._id+'" class="'+e.classes()+'" hideFocus="1" tabIndex="-1">'+'<div id="'+e._id+'-head" class="'+r+'tabs">'+n+"</div>"+'<div id="'+e._id+'-body" class="'+e.classes("body")+'">'+t.renderHtml(e)+"</div>"+"</div>"},postRender:function(){var e=this;e._super(),e.settings.activeTab=e.settings.activeTab||0,e.activateTab(e.settings.activeTab),this.on("click",function(t){var n=t.target.parentNode;if(t.target.parentNode.id==e._id+"-head")for(var r=n.childNodes.length;r--;)n.childNodes[r]==t.target&&e.activateTab(r)})},initLayoutRect:function(){var e=this,t,n,r;n=r=0,e.items().each(function(t,i){n=Math.max(n,t.layoutRect().minW),r=Math.max(r,t.layoutRect().minH),e.settings.activeTab!=i&&t.hide()}),e.items().each(function(e){e.settings.x=0,e.settings.y=0,e.settings.w=n,e.settings.h=r,e.layoutRect({x:0,y:0,w:n,h:r})});var i=e.getEl("head").offsetHeight;return e.settings.minWidth=n,e.settings.minHeight=r+i,t=e._super(),t.deltaH+=e.getEl("head").offsetHeight,t.innerH=t.h-t.deltaH,t}})}),r(Jt,[vt,W],function(e,n){return e.extend({init:function(e){var n=this;n._super(e),n._value=e.value||"",n.addClass("textbox"),e.multiline?n.addClass("multiline"):n.on("keydown",function(e){13==e.keyCode&&n.parents().reverse().each(function(n){return e.preventDefault(),n.submit?(n.submit(),!1):t})})},value:function(e){var n=this;return e!==t?(n._value=e,n._rendered&&(n.getEl().value=e),n):n._rendered?n.getEl().value:n._value},repaint:function(){var e=this,t,n,r,i=0,o=0,a;return t=e.getEl().style,n=e._layoutRect,a=e._lastRepaintRect||{},r=e._borderBox,i=r.left+r.right+8,o=r.top+r.bottom+(e.settings.multiline?8:0),n.x!==a.x&&(t.left=n.x+"px",a.x=n.x),n.y!==a.y&&(t.top=n.y+"px",a.y=n.y),n.w!==a.w&&(t.width=n.w-i+"px",a.w=n.w),n.h!==a.h&&(t.height=n.h-o+"px",a.h=n.h),e._lastRepaintRect=a,e.fire("repaint",{},!1),e},renderHtml:function(){var e=this,t=e._id,n=e.settings,r=e.encode(e._value,!1),i="";return"spellcheck"in n&&(i+=' spellcheck="'+n.spellcheck+'"'),n.maxLength&&(i+=' maxlength="'+n.maxLength+'"'),n.size&&(i+=' size="'+n.size+'"'),n.subtype&&(i+=' type="'+n.subtype+'"'),n.multiline?'<textarea id="'+t+'" class="'+e.classes()+'" '+(n.rows?' rows="'+n.rows+'"':"")+' hidefocus="true"'+i+">"+r+"</textarea>":'<input id="'+t+'" class="'+e.classes()+'" value="'+r+'" hidefocus="true"'+i+">"},postRender:function(){var e=this;return n.on(e.getEl(),"change",function(t){e.fire("change",t)}),e._super()}})}),r(Qt,[W],function(e){return function(t){var n=this,r;n.show=function(i){return n.hide(),r=!0,window.setTimeout(function(){r&&t.appendChild(e.createFragment('<div class="mce-throbber"></div>'))},i||0),n},n.hide=function(){var e=t.lastChild;return e&&-1!=e.className.indexOf("throbber")&&e.parentNode.removeChild(e),r=!1,n}}}),a([l,c,u,d,f,p,h,m,g,v,y,b,C,x,w,_,N,E,k,S,T,R,A,B,L,H,M,D,P,O,I,F,W,z,V,U,q,$,j,K,G,Y,X,J,Q,Z,et,tt,nt,rt,it,ot,at,st,lt,ct,ut,dt,ft,pt,ht,mt,gt,vt,yt,bt,Ct,xt,wt,_t,Nt,Et,kt,St,Tt,Rt,At,Bt,Lt,Ht,Mt,Dt,Pt,Ot,It,Ft,Wt,zt,Vt,Ut,qt,$t,jt,Kt,Gt,Yt,Xt,Jt,Qt])})(this);

static/js/models.js

1(function(M) {
2 /*Backbone models and collections for Mouchak */
3 var BaseType = Backbone.Model.extend({
4 defaults: {
5 tags: [],
6 title: "",
7 attr: {}
8 },
9 initialize: function() {
10 }
11 });
12
13 var Text = BaseType.extend({
14 defaults: {
15 data: "",
16 },
17 initialize: function() {
18 }
19 });
20
21 var Table = BaseType.extend({
22 defaults: {
23 data : {
24 th: [],
25 tr:[]
26 }
27 },
28 initialize: function() {
29 }
30 });
31
32 var Image = BaseType.extend({
33 defaults: {
34 src: ""
35 },
36 initialize:function() {
37 }
38 });
39
40 var Video = BaseType.extend({
41 defaults: {
42 src: ""
43 },
44 initialize:function() {
45 }
46 });
47
48 var RSS = BaseType.extend({
49 defaults: {
50 src: ""
51 },
52 initialize:function() {
53 }
54 });
55
56 // Plugin model can be used to load dynamic components
57 // to the website by loading external JS files.
58 // Also the website can be styled by using external CSS files,
59 // which can also be loaded via this plugin model.
60 var Plugin = BaseType.extend({
61 defaults: {
62 src: "",
63 data: {},
64 callback: ""
65 },
66 initialize: function() {
67 if(this.get('src').match(/\.js/)) {
68 var script = document.createElement('script');
69 var callback = this.get('callback');
70 script.src = this.get('src');
71 document.body.appendChild(script);
72 script.onload = function() {
73 eval(callback);
74 };
75 }
76 else if(this.get('src').match(/\.css/)) {
77 var link = document.createElement('link');
78 link.rel = 'stylesheet';
79 link.href = this.get('src');
80 link.type = 'text/css';
81 document.body.appendChild(link);
82 }
83 }
84 });
85
86 // model for each Page
87 var Page = Backbone.Model.extend({
88 defaults: {
89 name: "index",
90 title: "",
91 children: [],
92 content: []
93 },
94 initialize: function() {
95 // adding the name of the model as its id.
96 // look up of this model through the collection
97 // is faster this way.
98 //this.set({id: M.sanitize(this.get('name'))});
99 this.set({id: this.get('id')});
100 }
101 });
102
103 var Pages = Backbone.Collection.extend({
104 model: Page
105 });
106
107 //export types to the typemap
108 M.types = M.types || {};
109 M.types.model = {
110 'text': Text,
111 'image': Image,
112 'video': Video,
113 'rss': RSS,
114 'table': Table,
115 'plugin': Plugin,
116 'Page': Page,
117 'Pages': Pages
118 };
119
120})(M);

static/js/mouchak.js

1(function(M) {1(function(M) {
2/* Defining Backbone models, collections and views */
32
4var BaseType = Backbone.Model.extend({
5 defaults: {
6 tags: [],
7 title: "",
8 attr: {}
9 },
10 initialize: function() {
11 }
12});
3var types;
4M.types = types = {};
135
14var Text = BaseType.extend({
15 defaults: {
16 data: "",
17 },
18 initialize: function() {
19 }
20});
21
22var TextView = Backbone.View.extend({
23 tagName: 'div',
24 className: '',
25 initialize: function() {
26 _.bindAll(this);
27 _.bind(this.render, this);
28 },
29 render: function(el) {
30 $(el).append(this.el);
31 var title = this.model.get('title') || '';
32 var str = '<h4>'+ title +'</h4> <p>' +
33 this.model.get('data') + '</p>';
34 $(this.el).html(str);
35 M.appendAttrs(this.model, this.el);
36 }
37});
38
39var Table = BaseType.extend({
40 defaults: {
41 data : {
42 th: [],
43 tr:[]
44 }
45 },
46 initialize: function() {
47 }
48});
49
50var TableView = Backbone.View.extend({
51 tagName: 'table',
52 className: 'table',
53 initialize: function() {
54 _.bindAll(this);
55 _.bind(this.render, this);
56 },
57 render: function(el) {
58 var heading = this.model.get('data').th;
59 var str = '<tr>';
60
61 for(var i = 0; i < heading.length; i++) {
62 str += '<th>' + heading[i] + '</th>';
63 }
64 str += '</tr>';
65
66 _.each(this.model.get('data').tr, function(row) {
67 str += '<tr>';
68 for(var i = 0; i < row.length; i++) {
69 if(row[i].match(/http.?:/)) {
70 //console.log(row[i].match(/http:/))
71 }
72 str += '<td>'+ row[i] + '</td>';
73 }
74 str += '</tr>';
75 });
76
77 $(el).append(this.el);
78 $(this.el).html(str);
79 M.appendAttrs(this.model, this.el);
80 }
81});
82
83var Image = BaseType.extend({
84 defaults: {
85 src: ""
86 },
87 initialize:function() {
88 }
89});
90
91var ImageView = Backbone.View.extend({
92 tagName: 'img',
93 className: '',
94
95 initialize: function() {
96 _.bindAll(this);
97 _.bind(this.render, this);
98 },
99 render: function(el) {
100 $(el).append(this.el);
101 $(this.el).attr('src', this.model.get('src'));
102 M.appendAttrs(this.model, this.el);
103 }
104});
105
106
107var Video = BaseType.extend({
108 defaults: {
109 src: ""
110 },
111 initialize:function() {
112 }
113});
114
115var VideoView = Backbone.View.extend({
116 initialize: function() {
117 _.bindAll(this);
118 _.bind(this.render, this);
119 // assuming cross-domain urls will have http in the src,
120 // so also assuming they are embedded flash urls,
121 // hence iframe
122 if(this.model.get('src').match('http')) {
123 this.tagName = 'iframe';
124 }
125 // otherwise, use html5 video tag, if the video is served
126 // from the same domain
127 else {
128 this.tagName = 'video';
129 }
130 },
131 render: function(el) {
132 $(el).append(this.el);
133 $(this.el).attr('src', this.model.get('src'));
134 M.appendAttrs(this.model, this.el);
135 }
136});
137
138var RSS = BaseType.extend({
139 defaults: {
140 src: ""
141 },
142 initialize:function() {
143 }
144});
145
146var RSSView = Backbone.View.extend({
147 el: '#feeds',
148 initialize: function() {
149 _.bindAll(this);
150 _.bind(this.render, this);
151 },
152 render: function() {
153 M.populateFeeds(this.model.get('src'));
154 }
155});
156
157// Plugin model can be used to load dynamic components
158// to the website by loading external JS files.
159// Also the website can be styled by using external CSS files,
160// which can also be loaded via this plugin model.
161var Plugin = BaseType.extend({
162 defaults: {
163 src: "",
164 data: {},
165 callback: ""
166 },
167 initialize: function() {
168 if(this.get('src').match(/\.js/)) {
169 var script = document.createElement('script');
170 var callback = this.get('callback');
171 script.src = this.get('src');
172 document.body.appendChild(script);
173 script.onload = function() {
174 eval(callback);
175 };
176 }
177 else if(this.get('src').match(/\.css/)) {
178 var link = document.createElement('link');
179 link.rel = 'stylesheet';
180 link.href = this.get('src');
181 link.type = 'text/css';
182 document.body.appendChild(link);
183 }
184 }
185});
186
187var PluginView = Backbone.View.extend({
188 initialize: function() {
189 return;
190 },
191 render: function(el) {
192 return;
193 }
194});
195
196var type_map;
197M.type_map = type_map = {
198 model : {
199 'text': Text,
200 'image': Image,
201 'video': Video,
202 'rss': RSS,
203 'table': Table,
204 'plugin': Plugin
205 },
206 view: {
207 'text': TextView,
208 'image': ImageView,
209 'video': VideoView,
210 'rss': RSSView,
211 'table': TableView,
212 'plugin': PluginView
213 }
214};
215
216// model for each Page
217var Page = Backbone.Model.extend({
218 defaults: {
219 name: "index",
220 title: "",
221 children: [],
222 content: []
223 },
224 initialize: function() {
225 // adding the name of the model as its id.
226 // look up of this model through the collection
227 // is faster this way.
228 this.set({id: M.sanitize(this.get('name'))});
229 }
230});
231
232var Pages = Backbone.Collection.extend({
233 model: Page
234});
235
236var PageView = Backbone.View.extend({
237 tagName: 'div',
238 className: 'page',
239 initialize: function() {
240 _.bindAll(this);
241 _.bind(this.render, this);
242 this.render();
243 $(this.el).hide();
244 },
245 render: function() {
246 $('#content-container').append(this.el);
247 this.appendNavTemplate();
248 $(this.el).append('<h3>'+this.model.get('title')+'</h3>');
249 var self = this;
250 _.each(this.model.get('content'), function(item) {
251 var view = type_map.view[item.get('type')];
252 if(!view) {
253 console.log('Error initing view', item);
254 return;
255 }
256 if(item.get('type') === 'rss') {
257 M.rss_view = new view({model: item});
258 $(self.el).append(_.template($('#news-template').html()));
259 }
260 else {
261 var item_view = new view({model: item});
262 item_view.render(self.el);
263 }
264 });
265 },
266 appendNavTemplate: function() {
267 var li;
268 var nav_template = _.template($('#nav-template').html());
269 $(this.el).append(nav_template({
270 page: this.model.id
271 }));
272 }
273});
274
275var AppView = Backbone.View.extend({6var AppView = Backbone.View.extend({
276 el: 'body',7 el: 'body',
277 events: {8 events: {
21 $('.nav li').removeClass('active');21 $('.nav li').removeClass('active');
22 $(event.currentTarget).parent().addClass('active');22 $(event.currentTarget).parent().addClass('active');
23 },23 },
24 createNavigation: function(page) {
25 var li;
26 if(page === 'index' && !_.isEmpty(M.pages.get(page).get('children'))) {
24 createNavigation: function(pageid) {
25 var li, page = M.pages.get(pageid);
26 console.log(page.id, page.get('name'));
27 if(page.get('name') === 'index' && !_.isEmpty(page.get('children'))) {
28 var id = nameIdMap['index'];
27 li = '<li class="active"><a href="#/index"> Home </a></li>';29 li = '<li class="active"><a href="#/index"> Home </a></li>';
28 $('#nav-index .nav').append(li);
30 $('#nav-'+ id +' .nav').append(li);
29 }31 }
30 var dropdown_template = _.template($('#nav-dropdown-template').html());32 var dropdown_template = _.template($('#nav-dropdown-template').html());
31 var children = M.pages.get(page).get('children');
33 var children = page.get('children');
32 _.each(children, function(child) {34 _.each(children, function(child) {
33 child = M.sanitize(child);
34 var model = M.pages.get(child);
35 console.log('children of ', page.get('name'), child);
36 var id = nameIdMap[child];
37 var model = M.pages.get(id);
35 if(!_.isObject(model)) {38 if(!_.isObject(model)) {
36 console.log('Error: Cannot find page '+ child +' which is defined as children of ' + page);
39 console.log('Error: Cannot find page '+ child +' which is defined as children of ' + page.get('name'));
37 return false;40 return false;
38 }41 }
39 var children = model.get('children');42 var children = model.get('children');
50 list: _.map(children, M.humanReadable)50 list: _.map(children, M.humanReadable)
51 });51 });
52 }52 }
53 console.log('nav el: ', $('#nav-' + page + ' .nav'));
53 console.log('nav el: ', $('#nav-' + page.id + ' .nav'));
54 //$(li).appendTo('#nav-' + page + ' .nav');54 //$(li).appendTo('#nav-' + page + ' .nav');
55 $('#nav-'+page+' .nav').append(li);
55 $('#nav-'+ page.id +' .nav').append(li);
56 });56 });
57 },57 },
58 updateBreadcrumbs: function(event) {58 updateBreadcrumbs: function(event) {
67 ':page' : 'showPage'67 ':page' : 'showPage'
68 },68 },
69 index: function() {69 index: function() {
70 $('.page').hide();
71 $('#index').show();
70 $('.pageview').hide();
71 var id = nameIdMap['index'];
72 $('#'+id).show();
72 },73 },
73 showPage: function(page) {74 showPage: function(page) {
74 $('.page').hide();
75 $('.pageview').hide();
75 //news pages are rendered on the fly,76 //news pages are rendered on the fly,
76 //as feeds have to be fetched.77 //as feeds have to be fetched.
77 if(page === 'news') {78 if(page === 'news') {
78 M.rss_view.render();79 M.rss_view.render();
79 }80 }
80 $('#'+page).show();
81 var id = nameIdMap[page];
82 $('#'+id).show();
81 $('.'+page).show();83 $('.'+page).show();
82 }84 }
83});85});
8486
87// hashmap to maintain one-to-one lookup among page ids and
88// their names
89var nameIdMap = {};
90
85/* Defining other necessary functions */91/* Defining other necessary functions */
86M.init = function() {92M.init = function() {
87 M.tags = {}; //global tag cache93 M.tags = {}; //global tag cache
88 M.pages = new Pages(); //global collection of all pages
94 M.pages = new M.types.model.Pages(); //global collection of all pages
8995
90 // iterate through the JSON to intialize models and views96 // iterate through the JSON to intialize models and views
91 _.each(M.site_content, function(page) {97 _.each(M.site_content, function(page) {
92 var new_page = new Page(page);
98 var new_page = new M.types.model.Page(page);
93 var contents = [];99 var contents = [];
94 _.each(page.content, function(content) {100 _.each(page.content, function(content) {
95 if(_.isEmpty(content)) {101 if(_.isEmpty(content)) {
96 console.log('Empty content for ' + page.name);102 console.log('Empty content for ' + page.name);
97 return;103 return;
98 }104 }
99 var Item = type_map.model[content.type];
105 var Item = types.model[content.type];
100 if(!Item) {106 if(!Item) {
101 console.log('Error: Invalid type '+ content.type +' for ', content);107 console.log('Error: Invalid type '+ content.type +' for ', content);
102 return;108 return;
112 M.createTagList(content, item);112 M.createTagList(content, item);
113 });113 });
114 new_page.set({content: contents});114 new_page.set({content: contents});
115 var new_page_view = new PageView({model: new_page,
115 var new_page_view = new M.types.view.PageView({model: new_page,
116 id: new_page.get('id')});116 id: new_page.get('id')});
117 M.pages.add(new_page);117 M.pages.add(new_page);
118 nameIdMap[new_page.get('name')] = new_page.id;
118 });119 });
119120
120 M.appView = new AppView();121 M.appView = new AppView();
121 M.appView.render();122 M.appView.render();
122 var app_router = new AppRouter();123 var app_router = new AppRouter();
123 Backbone.history.start();124 Backbone.history.start();
125 app_router.navigate('index', {trigger: true});
124 // start with index page126 // start with index page
125 //var location = window.location;127 //var location = window.location;
126 /*location.href = location.protocol + '//' + location.hostname +128 /*location.href = location.protocol + '//' + location.hostname +
227 return str.replace('&', 'and').toLowerCase();227 return str.replace('&', 'and').toLowerCase();
228 });228 });
229};229};
230
231
232// Loader
233M.load = function(content_url) {
234 if(typeof content_url !== 'string') {
235 console.error('URL to load has to be of type string!!');//TODO: raise custom exception
236 return;
237 }
238 $.getJSON(content_url, function(data) {
239 M.site_content = data;
240 M.init();
241 });
242};
243
244// export BaseType to the M namespace
245M.BaseType = BaseType;
246230
247})(M);231})(M);

static/js/views.js

1(function(M) {
2 /* Backbone views for corresponding models in models.js for the Mouchak
3 * framework */
4 var TextView = Backbone.View.extend({
5 tagName: 'div',
6 className: '',
7 initialize: function() {
8 _.bindAll(this);
9 _.bind(this.render, this);
10 },
11 render: function(el) {
12 $(el).append(this.el);
13 var title = this.model.get('title') || '';
14 var str = '<h4>'+ title +'</h4> <p>' +
15 this.model.get('data') + '</p>';
16 $(this.el).html(str);
17 M.appendAttrs(this.model, this.el);
18 }
19 });
20
21 var TableView = Backbone.View.extend({
22 tagName: 'table',
23 className: 'table',
24 initialize: function() {
25 _.bindAll(this);
26 _.bind(this.render, this);
27 },
28 render: function(el) {
29 var heading = this.model.get('data').th;
30 var str = '<tr>';
31
32 for(var i = 0; i < heading.length; i++) {
33 str += '<th>' + heading[i] + '</th>';
34 }
35 str += '</tr>';
36
37 _.each(this.model.get('data').tr, function(row) {
38 str += '<tr>';
39 for(var i = 0; i < row.length; i++) {
40 if(row[i].match(/http.?:/)) {
41 //console.log(row[i].match(/http:/))
42 }
43 str += '<td>'+ row[i] + '</td>';
44 }
45 str += '</tr>';
46 });
47
48 $(el).append(this.el);
49 $(this.el).html(str);
50 M.appendAttrs(this.model, this.el);
51 }
52 });
53
54 var ImageView = Backbone.View.extend({
55 tagName: 'img',
56 className: '',
57
58 initialize: function() {
59 _.bindAll(this);
60 _.bind(this.render, this);
61 },
62 render: function(el) {
63 $(el).append(this.el);
64 $(this.el).attr('src', this.model.get('src'));
65 M.appendAttrs(this.model, this.el);
66 }
67 });
68
69 var VideoView = Backbone.View.extend({
70 initialize: function() {
71 _.bindAll(this);
72 _.bind(this.render, this);
73 // assuming cross-domain urls will have http in the src,
74 // so also assuming they are embedded flash urls,
75 // hence iframe
76 if(this.model.get('src').match('http')) {
77 this.tagName = 'iframe';
78 }
79 // otherwise, use html5 video tag, if the video is served
80 // from the same domain
81 else {
82 this.tagName = 'video';
83 }
84 },
85 render: function(el) {
86 $(el).append(this.el);
87 $(this.el).attr('src', this.model.get('src'));
88 M.appendAttrs(this.model, this.el);
89 }
90 });
91
92 var RSSView = Backbone.View.extend({
93 el: '#feeds',
94 initialize: function() {
95 _.bindAll(this);
96 _.bind(this.render, this);
97 },
98 render: function() {
99 //M.populateFeeds(this.model.get('src'));
100 //TODO: move that function here..
101 }
102 });
103
104 var PluginView = Backbone.View.extend({
105 initialize: function() {
106 return;
107 },
108 render: function(el) {
109 return;
110 }
111 });
112
113 var PageView = Backbone.View.extend({
114 tagName: 'div',
115 className: 'pageview',
116 initialize: function() {
117 _.bindAll(this);
118 _.bind(this.render, this);
119 this.render();
120 $(this.el).hide();
121 },
122 render: function() {
123 $('#content-container').append(this.el);
124 this.appendNavTemplate();
125 $(this.el).append('<h3>'+this.model.get('title')+'</h3>');
126 var self = this;
127 _.each(this.model.get('content'), function(item) {
128 var view = M.types.view[item.get('type')];
129 if(!view) {
130 console.log('Error initing view', item);
131 return;
132 }
133 if(item.get('type') === 'rss') {
134 M.rss_view = new view({model: item});
135 $(self.el).append(_.template($('#news-template').html()));
136 }
137 else {
138 var item_view = new view({model: item});
139 item_view.render(self.el);
140 }
141 });
142 },
143 appendNavTemplate: function() {
144 var li;
145 var nav_template = _.template($('#nav-template').html());
146 $(this.el).append(nav_template({
147 page: this.model.id
148 }));
149 }
150 });
151
152 //export types to the typemap
153 M.types = M.types || {};
154 M.types.view = {
155 'text': TextView,
156 'image': ImageView,
157 'video': VideoView,
158 'rss': RSSView,
159 'table': TableView,
160 'plugin': PluginView,
161 'PageView': PageView
162 };
163})(M);

templates/editor.html

1<!DOCTYPE html>
2<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
3<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
4<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
5<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
6 <head>
7 <meta charset="utf-8">
8 <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
9 <title> Mouchak - ummm!</title>
10 <meta name="description" content="">
11 <meta name="viewport" content="width=device-width">
12
13 <!-- Place favicon.ico in the root directory -->
14
15 <link rel="stylesheet" href="/static/css/normalize.css">
16 <link rel="stylesheet" href="/static/css/bootstrap.css">
17 <link rel="stylesheet" href="/static/css/main.css">
18 <script src="/static/js/lib/modernizr-2.6.1.min.js"></script>
19 </head>
20 <body>
21 <!--[if lt IE 7]>
22 <p class="chromeframe">You are using an outdated browser. <a href="http://browsehappy.com/">Upgrade your browser today</a> or <a href="http://www.google.com/chromeframe/?redirect=true">install Google Chrome Frame</a> to better experience this site.</p>
23 <![endif]-->
24
25 <div class="container" id="container">
26 <div id="header"></div>
27 <div id="content-container">
28 <div class="clearfix"></div>
29 </div>
30 </div>
31 <div id="footer"></div>
32
33 <script>
34 // initialize editor
35 window.M = window.M || {};
36 M.site_content = {{ content|tojson|safe }};
37 window.onload = function() {
38 M.editor.init();
39 };
40 </script>
41 <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>
42 <script>window.jQuery || document.write('<script src="/static/js/lib/jquery-1.8.0.min.js"><\/script>')</script>
43 <script src="/static/js/lib/underscore.js"></script>
44 <script src="/static/js/lib/backbone-1.0.0.js"></script>
45 <script src="/static/js/lib/bootstrap.js"></script>
46 <script src="/static/js/lib/tinymce/tinymce.min.js"></script>
47 <script src="/static/js/lib/tinymce/jquery.tinymce.min.js"></script>
48 <script src="/static/js/plugins.js"></script>
49 <script src="/static/js/mouchak.js"></script>
50 <script src="/static/js/models.js"></script>
51 <script src="/static/js/editor.js"></script>
52
53 <!-- Underscore templates -->
54 <script type="text/template" id="page-list-template">
55 <div id="pagelistview">
56 <h4> List of Pages </h4>
57 <div id="pagelist"></div>
58 <button class="btn btn-primary pull-right" id="addPage">Add Page</button>
59 </div>
60 </script>
61 <script type="text/template" id="page-list-item-template">
62 <div class="pagename">
63 <a class="disp" id="<%= id %>" href="#"><%= name %></a>
64 <span class="pull-right">
65 <a href="#" class="remove" for="<%= id %>">
66 <i class="icon-trash"></i>
67 </a>
68 </span>
69 </div>
70 </script>
71
72 <script type="text/template" id="page-template">
73 <div class="page">
74 <h4> Page Properties </h4>
75 <form class="form-horizontal">
76 <div class="control-group">
77 <div class="input-prepend">
78 <span class="add-on"> <strong> Name </strong></span>
79 <input id="name" type="text" placeholder="name of the page" value="<%= name %>">
80 </div>
81 </div>
82 <div class="control-group">
83 <div class="input-prepend">
84 <span class="add-on"> <strong>Title</strong> </span>
85 <input id="title" type="text" placeholder="title of the page"
86 value="<%= title %>">
87 </div>
88 </div>
89 <div class="control-group">
90 <div class="input-prepend">
91 <span class="add-on"> <strong>Children</strong> </span>
92 <input id="children" type="text" placeholder="csv of child pages"
93 value="<%= children %>">
94 </div>
95 </div>
96 <label><strong> Content </strong></label>
97 <div id="content" class="content well">
98 <%= content %>
99 <p></p>
100 <button class="addContent btn btn-mini btn-primary">Add Content</button>
101 </div>
102 <button id="updatePage" type="submit" class="btn btn-primary pull-right"> Update </button>
103 </form>
104 </div>
105 </script>
106
107 <script type="text/template" id="content-list-template">
108 <div class="content-item-wrapper">
109 <span class="content-item" id="content-<%= no %>">
110 <span class="label label-info"> <%= type %> </span>
111 <span class="">
112 [ <small> <%= title %> <%= more %> </small> ]
113 </span>
114 </span>
115 <span class="pull-right">
116 <a href="#" class="remove" for="<%=no%>"><i class="icon-trash"></i></a>
117 </span>
118 </div>
119 </script>
120
121 <script type="text/template" id="content-template">
122 <div class="contentview">
123 <div class="">
124 <label><b>Type</b></label>
125 <select>
126 <% _.each(_.keys(M.types.model), function(type) { %>
127 <option><%= type %></option>
128 <% }); %>
129 </select>
130 <div class="control-group">
131 <div class="input-prepend">
132 <span class="add-on"> <b>Title</b> </span>
133 <input type="text" placeholder="title of the content" value="<%=
134 title %>" m-data-target="title">
135 </div>
136 </div>
137 <div class="control-group">
138 <div class="input-prepend">
139 <span class="add-on"> <strong>Tags</strong> </span>
140 <input type="text" placeholder="csv of tags for this content"
141 value="<%= tags %>" m-data-target="tags">
142 </div>
143 </div>
144 </div>
145 <div id="specific-content"></div>
146 <button class="btn btn-info" id="done">Done</button>
147 <button class="btn btn-primary" id="updateContent">Update</button>
148 </div>
149 </script>
150
151 <script type="text/template" id="media-template">
152 <div class="data">
153 <div class="control-group">
154 <div class="input-prepend">
155 <span class="add-on"><strong>path to file</strong></span>
156 <input type="text" placeholder="src" value="<%= src %>"
157 m-data-target="src">
158 </div>
159 </div>
160 <div class="preview"></div>
161 </div>
162 </script>
163
164 <script type="text/template" id="text-template">
165 <div class="data">
166 <label><b> Content </b></label>
167 <p>
168 <span class="label label-important">Tip</span>
169 <span><small> You can unleash your HTML power here </small></span>
170 </p>
171 <textarea id="edit" m-data-target="data">
172 <%= data %>
173 </textarea>
174 </div>
175 </script>
176 </body>
177</html>

templates/index.html

31 <script>31 <script>
32 //Code to initialize the framework32 //Code to initialize the framework
33 window.M = window.M || {};33 window.M = window.M || {};
34 M.site_content = {{ content|tojson|safe }};
34 window.onload = function() {35 window.onload = function() {
35 M.load('/static/example.json');
36 M.init();
36 };37 };
37 </script>38 </script>
38 <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>39 <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>
39 <script>window.jQuery || document.write('<script src="/static/js/lib/jquery-1.8.0.min.js"><\/script>')</script>40 <script>window.jQuery || document.write('<script src="/static/js/lib/jquery-1.8.0.min.js"><\/script>')</script>
40 <script src="/static/js/lib/underscore.js"></script>41 <script src="/static/js/lib/underscore.js"></script>
41 <script src="/static/js/lib/backbone.js"></script>
42 <script src="/static/js/lib/backbone-1.0.0.js"></script>
42 <script src="/static/js/lib/bootstrap.js"></script>43 <script src="/static/js/lib/bootstrap.js"></script>
43 <script src="/static/js/plugins.js"></script>44 <script src="/static/js/plugins.js"></script>
44 <script src="/static/js/mouchak.js"></script>45 <script src="/static/js/mouchak.js"></script>
46 <script src="/static/js/models.js"></script>
47 <script src="/static/js/views.js"></script>
4548
46 <!-- Underscore templates -->49 <!-- Underscore templates -->
47 <script type="text/template" id="news-template">50 <script type="text/template" id="news-template">