Built motion from commit 67e5df37.|2.0.66
[motion2.git] / public / assets / plugins / ckeditor / plugins / a11yhelp / dialogs / a11yhelp.js
1 /*
2  Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
3  For licensing, see LICENSE.md or http://ckeditor.com/license
4 */
5 CKEDITOR.dialog.add("a11yHelp", function(e) {
6     var a = e.lang.a11yhelp,
7         b = e.lang.common.keyboard,
8         q = CKEDITOR.tools.getNextId(),
9         d = {
10             8: b[8],
11             9: a.tab,
12             13: b[13],
13             16: b[16],
14             17: b[17],
15             18: b[18],
16             19: a.pause,
17             20: a.capslock,
18             27: a.escape,
19             33: a.pageUp,
20             34: a.pageDown,
21             35: b[35],
22             36: b[36],
23             37: a.leftArrow,
24             38: a.upArrow,
25             39: a.rightArrow,
26             40: a.downArrow,
27             45: a.insert,
28             46: b[46],
29             91: a.leftWindowKey,
30             92: a.rightWindowKey,
31             93: a.selectKey,
32             96: a.numpad0,
33             97: a.numpad1,
34             98: a.numpad2,
35             99: a.numpad3,
36             100: a.numpad4,
37             101: a.numpad5,
38             102: a.numpad6,
39             103: a.numpad7,
40             104: a.numpad8,
41             105: a.numpad9,
42             106: a.multiply,
43             107: a.add,
44             109: a.subtract,
45             110: a.decimalPoint,
46             111: a.divide,
47             112: a.f1,
48             113: a.f2,
49             114: a.f3,
50             115: a.f4,
51             116: a.f5,
52             117: a.f6,
53             118: a.f7,
54             119: a.f8,
55             120: a.f9,
56             121: a.f10,
57             122: a.f11,
58             123: a.f12,
59             144: a.numLock,
60             145: a.scrollLock,
61             186: a.semiColon,
62             187: a.equalSign,
63             188: a.comma,
64             189: a.dash,
65             190: a.period,
66             191: a.forwardSlash,
67             192: a.graveAccent,
68             219: a.openBracket,
69             220: a.backSlash,
70             221: a.closeBracket,
71             222: a.singleQuote
72         };
73     d[CKEDITOR.ALT] = b[18];
74     d[CKEDITOR.SHIFT] = b[16];
75     d[CKEDITOR.CTRL] = CKEDITOR.env.mac ? b[224] : b[17];
76     var k = [CKEDITOR.ALT, CKEDITOR.SHIFT, CKEDITOR.CTRL],
77         r = /\$\{(.*?)\}/g,
78         t = function(a, b) {
79             var c = e.getCommandKeystroke(b);
80             if (c) {
81                 for (var l, f, h = [], g = 0; g < k.length; g++) f = k[g], l = c / k[g], 1 < l && 2 >= l && (c -= f, h.push(d[f]));
82                 h.push(d[c] || String.fromCharCode(c));
83                 c = h.join("+")
84             } else c = a;
85             return c
86         };
87     return {
88         title: a.title,
89         minWidth: 600,
90         minHeight: 400,
91         contents: [{
92             id: "info",
93             label: e.lang.common.generalTab,
94             expand: !0,
95             elements: [{
96                 type: "html",
97                 id: "legends",
98                 style: "white-space:normal;",
99                 focus: function() {
100                     this.getElement().focus()
101                 },
102                 html: function() {
103                     for (var b =
104                             '\x3cdiv class\x3d"cke_accessibility_legend" role\x3d"document" aria-labelledby\x3d"' + q + '_arialbl" tabIndex\x3d"-1"\x3e%1\x3c/div\x3e\x3cspan id\x3d"' + q + '_arialbl" class\x3d"cke_voice_label"\x3e' + a.contents + " \x3c/span\x3e", d = [], c = a.legend, l = c.length, f = 0; f < l; f++) {
105                         for (var h = c[f], g = [], e = h.items, k = e.length, p = 0; p < k; p++) {
106                             var m = e[p],
107                                 n = CKEDITOR.env.edge && m.legendEdge ? m.legendEdge : m.legend,
108                                 n = n.replace(r, t);
109                             n.match(r) || g.push("\x3cdt\x3e%1\x3c/dt\x3e\x3cdd\x3e%2\x3c/dd\x3e".replace("%1", m.name).replace("%2",
110                                 n))
111                         }
112                         d.push("\x3ch1\x3e%1\x3c/h1\x3e\x3cdl\x3e%2\x3c/dl\x3e".replace("%1", h.name).replace("%2", g.join("")))
113                     }
114                     return b.replace("%1", d.join(""))
115                 }() + '\x3cstyle type\x3d"text/css"\x3e.cke_accessibility_legend{width:600px;height:400px;padding-right:5px;overflow-y:auto;overflow-x:hidden;}.cke_browser_quirks .cke_accessibility_legend,{height:390px}.cke_accessibility_legend *{white-space:normal;}.cke_accessibility_legend h1{font-size: 20px;border-bottom: 1px solid #AAA;margin: 5px 0px 15px;}.cke_accessibility_legend dl{margin-left: 5px;}.cke_accessibility_legend dt{font-size: 13px;font-weight: bold;}.cke_accessibility_legend dd{margin:10px}\x3c/style\x3e'
116             }]
117         }],
118         buttons: [CKEDITOR.dialog.cancelButton]
119     }
120 });