selenium-webdriver 2.44.0 → 2.45.0.dev
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES +3 -0
- data/Gemfile.lock +48 -0
- data/lib/selenium/webdriver/common/driver_extensions/has_network_connection.rb +46 -0
- data/lib/selenium/webdriver/common/target_locator.rb +7 -6
- data/lib/selenium/webdriver/firefox/extension/webdriver.xpi +0 -0
- data/lib/selenium/webdriver/remote/capabilities.rb +5 -4
- data/lib/selenium/webdriver/safari/resources/client.js +845 -234
- data/selenium-webdriver.gemspec +1 -1
- metadata +5 -3
data/CHANGES
CHANGED
data/Gemfile.lock
ADDED
@@ -0,0 +1,48 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
selenium-webdriver (2.45.0.dev)
|
5
|
+
childprocess (~> 0.5)
|
6
|
+
multi_json (~> 1.0)
|
7
|
+
rubyzip (~> 1.0)
|
8
|
+
websocket (~> 1.0)
|
9
|
+
|
10
|
+
GEM
|
11
|
+
remote: https://rubygems.org/
|
12
|
+
specs:
|
13
|
+
addressable (2.3.6)
|
14
|
+
builder (3.2.2)
|
15
|
+
childprocess (0.5.5)
|
16
|
+
ffi (~> 1.0, >= 1.0.11)
|
17
|
+
ci_reporter (1.9.2)
|
18
|
+
builder (>= 2.1.2)
|
19
|
+
crack (0.4.2)
|
20
|
+
safe_yaml (~> 1.0.0)
|
21
|
+
diff-lcs (1.2.5)
|
22
|
+
ffi (1.9.6)
|
23
|
+
multi_json (1.10.1)
|
24
|
+
rack (1.5.2)
|
25
|
+
rspec (2.99.0)
|
26
|
+
rspec-core (~> 2.99.0)
|
27
|
+
rspec-expectations (~> 2.99.0)
|
28
|
+
rspec-mocks (~> 2.99.0)
|
29
|
+
rspec-core (2.99.2)
|
30
|
+
rspec-expectations (2.99.2)
|
31
|
+
diff-lcs (>= 1.1.3, < 2.0)
|
32
|
+
rspec-mocks (2.99.2)
|
33
|
+
rubyzip (1.1.6)
|
34
|
+
safe_yaml (1.0.3)
|
35
|
+
webmock (1.18.0)
|
36
|
+
addressable (>= 2.3.6)
|
37
|
+
crack (>= 0.3.2)
|
38
|
+
websocket (1.2.1)
|
39
|
+
|
40
|
+
PLATFORMS
|
41
|
+
ruby
|
42
|
+
|
43
|
+
DEPENDENCIES
|
44
|
+
ci_reporter (~> 1.6, >= 1.6.2)
|
45
|
+
rack (~> 1.0)
|
46
|
+
rspec (~> 2.99.0)
|
47
|
+
selenium-webdriver!
|
48
|
+
webmock (~> 1.7, >= 1.7.5)
|
@@ -0,0 +1,46 @@
|
|
1
|
+
module Selenium
|
2
|
+
module WebDriver
|
3
|
+
module DriverExtensions
|
4
|
+
module HasNetworkConnection
|
5
|
+
def network_connection_type
|
6
|
+
connection_value = @bridge.getNetworkConnection
|
7
|
+
|
8
|
+
# Convert connection value to type. In case the connection type is
|
9
|
+
# not recognized return the connection value.
|
10
|
+
case connection_value
|
11
|
+
when 1
|
12
|
+
:airplane_mode
|
13
|
+
when 2
|
14
|
+
:wifi
|
15
|
+
when 4
|
16
|
+
:data
|
17
|
+
when 6
|
18
|
+
:all
|
19
|
+
when 0
|
20
|
+
:none
|
21
|
+
else
|
22
|
+
connection_value
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
def network_connection_type=(connection_type)
|
27
|
+
# convert connection type to value
|
28
|
+
connection_value = case connection_type
|
29
|
+
when :airplane_mode
|
30
|
+
1
|
31
|
+
when :wifi
|
32
|
+
2
|
33
|
+
when :data
|
34
|
+
4
|
35
|
+
when :all
|
36
|
+
6
|
37
|
+
when :none
|
38
|
+
0
|
39
|
+
end
|
40
|
+
|
41
|
+
@bridge.setNetworkConnection connection_value
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
@@ -38,18 +38,19 @@ module Selenium
|
|
38
38
|
|
39
39
|
def window(id)
|
40
40
|
if block_given?
|
41
|
-
original =
|
41
|
+
original = begin
|
42
|
+
@bridge.getCurrentWindowHandle
|
43
|
+
rescue Error::NoSuchWindowError
|
44
|
+
nil
|
45
|
+
end
|
46
|
+
|
42
47
|
@bridge.switchToWindow id
|
43
48
|
|
44
49
|
begin
|
45
50
|
returned = yield
|
46
51
|
ensure
|
47
52
|
current_handles = @bridge.getWindowHandles
|
48
|
-
|
49
|
-
if current_handles.size == 1
|
50
|
-
original = current_handles.shift
|
51
|
-
end
|
52
|
-
|
53
|
+
original = current_handles.first unless current_handles.include? original
|
53
54
|
@bridge.switchToWindow original
|
54
55
|
returned
|
55
56
|
end
|
Binary file
|
@@ -43,10 +43,11 @@ module Selenium
|
|
43
43
|
class << self
|
44
44
|
def android(opts = {})
|
45
45
|
new({
|
46
|
-
:browser_name
|
47
|
-
:platform
|
48
|
-
:
|
49
|
-
:
|
46
|
+
:browser_name => "android",
|
47
|
+
:platform => :android,
|
48
|
+
:javascript_enabled => true,
|
49
|
+
:rotatable => true,
|
50
|
+
:takes_screenshot => true
|
50
51
|
}.merge(opts))
|
51
52
|
end
|
52
53
|
|
@@ -21,19 +21,23 @@ goog.LOCALE = "en";
|
|
21
21
|
goog.TRUSTED_SITE = !0;
|
22
22
|
goog.STRICT_MODE_COMPATIBLE = !1;
|
23
23
|
goog.provide = function(a) {
|
24
|
+
if (!COMPILED && goog.isProvided_(a)) {
|
25
|
+
throw Error('Namespace "' + a + '" already declared.');
|
26
|
+
}
|
27
|
+
goog.constructNamespace_(a);
|
28
|
+
};
|
29
|
+
goog.constructNamespace_ = function(a, b) {
|
24
30
|
if (!COMPILED) {
|
25
|
-
if (goog.isProvided_(a)) {
|
26
|
-
throw Error('Namespace "' + a + '" already declared.');
|
27
|
-
}
|
28
31
|
delete goog.implicitNamespaces_[a];
|
29
|
-
for (var
|
30
|
-
goog.implicitNamespaces_[
|
32
|
+
for (var c = a;(c = c.substring(0, c.lastIndexOf("."))) && !goog.getObjectByName(c);) {
|
33
|
+
goog.implicitNamespaces_[c] = !0;
|
31
34
|
}
|
32
35
|
}
|
33
|
-
goog.exportPath_(a);
|
36
|
+
goog.exportPath_(a, b);
|
34
37
|
};
|
38
|
+
goog.VALID_MODULE_RE_ = /^[a-zA-Z_$][a-zA-Z0-9._$]*$/;
|
35
39
|
goog.module = function(a) {
|
36
|
-
if (!goog.isString(a) || !a) {
|
40
|
+
if (!goog.isString(a) || !a || -1 == a.search(goog.VALID_MODULE_RE_)) {
|
37
41
|
throw Error("Invalid module identifier");
|
38
42
|
}
|
39
43
|
if (!goog.isInModuleLoader_()) {
|
@@ -50,15 +54,32 @@ goog.module = function(a) {
|
|
50
54
|
delete goog.implicitNamespaces_[a];
|
51
55
|
}
|
52
56
|
};
|
57
|
+
goog.module.get = function(a) {
|
58
|
+
return goog.module.getInternal_(a);
|
59
|
+
};
|
60
|
+
goog.module.getInternal_ = function(a) {
|
61
|
+
if (!COMPILED) {
|
62
|
+
return goog.isProvided_(a) ? a in goog.loadedModules_ ? goog.loadedModules_[a] : goog.getObjectByName(a) : null;
|
63
|
+
}
|
64
|
+
};
|
53
65
|
goog.moduleLoaderState_ = null;
|
54
66
|
goog.isInModuleLoader_ = function() {
|
55
67
|
return null != goog.moduleLoaderState_;
|
56
68
|
};
|
57
|
-
goog.module.
|
69
|
+
goog.module.declareTestMethods = function() {
|
58
70
|
if (!goog.isInModuleLoader_()) {
|
59
|
-
throw Error("goog.module.
|
71
|
+
throw Error("goog.module.declareTestMethods must be called from within a goog.module");
|
72
|
+
}
|
73
|
+
goog.moduleLoaderState_.declareTestMethods = !0;
|
74
|
+
};
|
75
|
+
goog.module.declareLegacyNamespace = function() {
|
76
|
+
if (!COMPILED && !goog.isInModuleLoader_()) {
|
77
|
+
throw Error("goog.module.declareLegacyNamespace must be called from within a goog.module");
|
78
|
+
}
|
79
|
+
if (!COMPILED && !goog.moduleLoaderState_.moduleName) {
|
80
|
+
throw Error("goog.module must be called prior to goog.module.declareLegacyNamespace.");
|
60
81
|
}
|
61
|
-
goog.moduleLoaderState_.
|
82
|
+
goog.moduleLoaderState_.declareLegacyNamespace = !0;
|
62
83
|
};
|
63
84
|
goog.setTestOnly = function(a) {
|
64
85
|
if (COMPILED && !goog.DEBUG) {
|
@@ -104,8 +125,9 @@ goog.logToConsole_ = function(a) {
|
|
104
125
|
};
|
105
126
|
goog.require = function(a) {
|
106
127
|
if (!COMPILED) {
|
128
|
+
goog.ENABLE_DEBUG_LOADER && goog.IS_OLD_IE_ && goog.maybeProcessDeferredDep_(a);
|
107
129
|
if (goog.isProvided_(a)) {
|
108
|
-
return goog.isInModuleLoader_() ?
|
130
|
+
return goog.isInModuleLoader_() ? goog.module.getInternal_(a) : null;
|
109
131
|
}
|
110
132
|
if (goog.ENABLE_DEBUG_LOADER) {
|
111
133
|
var b = goog.getPathFromDeps_(a);
|
@@ -138,9 +160,10 @@ goog.addSingletonGetter = function(a) {
|
|
138
160
|
};
|
139
161
|
goog.instantiatedSingletons_ = [];
|
140
162
|
goog.LOAD_MODULE_USING_EVAL = !0;
|
163
|
+
goog.SEAL_MODULE_EXPORTS = goog.DEBUG;
|
141
164
|
goog.loadedModules_ = {};
|
142
165
|
goog.DEPENDENCIES_ENABLED = !COMPILED && goog.ENABLE_DEBUG_LOADER;
|
143
|
-
goog.DEPENDENCIES_ENABLED && (goog.included_ = {}, goog.dependencies_ = {pathIsModule:{}, nameToPath:{}, requires:{}, visited:{}, written:{}}, goog.inHtmlDocument_ = function() {
|
166
|
+
goog.DEPENDENCIES_ENABLED && (goog.included_ = {}, goog.dependencies_ = {pathIsModule:{}, nameToPath:{}, requires:{}, visited:{}, written:{}, deferred:{}}, goog.inHtmlDocument_ = function() {
|
144
167
|
var a = goog.global.document;
|
145
168
|
return "undefined" != typeof a && "write" in a;
|
146
169
|
}, goog.findBasePath_ = function() {
|
@@ -161,20 +184,7 @@ goog.DEPENDENCIES_ENABLED && (goog.included_ = {}, goog.dependencies_ = {pathIsM
|
|
161
184
|
(goog.global.CLOSURE_IMPORT_SCRIPT || goog.writeScriptTag_)(a, b) && (goog.dependencies_.written[a] = !0);
|
162
185
|
}, goog.IS_OLD_IE_ = goog.global.document && goog.global.document.all && !goog.global.atob, goog.importModule_ = function(a) {
|
163
186
|
goog.importScript_("", 'goog.retrieveAndExecModule_("' + a + '");') && (goog.dependencies_.written[a] = !0);
|
164
|
-
}, goog.queuedModules_ = [], goog.
|
165
|
-
var b = goog.global.CLOSURE_IMPORT_SCRIPT || goog.writeScriptTag_, c = null, d = new goog.global.XMLHttpRequest;
|
166
|
-
d.onload = function() {
|
167
|
-
c = this.responseText;
|
168
|
-
};
|
169
|
-
d.open("get", a, !1);
|
170
|
-
d.send();
|
171
|
-
c = d.responseText;
|
172
|
-
if (null != c) {
|
173
|
-
d = goog.wrapModule_(a, c), goog.IS_OLD_IE_ ? goog.queuedModules_.push(d) : b(a, d), goog.dependencies_.written[a] = !0;
|
174
|
-
} else {
|
175
|
-
throw Error("load of " + a + "failed");
|
176
|
-
}
|
177
|
-
}, goog.wrapModule_ = function(a, b) {
|
187
|
+
}, goog.queuedModules_ = [], goog.wrapModule_ = function(a, b) {
|
178
188
|
return goog.LOAD_MODULE_USING_EVAL && goog.isDef(goog.global.JSON) ? "goog.loadModule(" + goog.global.JSON.stringify(b + "\n//# sourceURL=" + a + "\n") + ");" : 'goog.loadModule(function(exports) {"use strict";' + b + "\n;return exports});\n//# sourceURL=" + a + "\n";
|
179
189
|
}, goog.loadQueuedModules_ = function() {
|
180
190
|
var a = goog.queuedModules_.length;
|
@@ -182,37 +192,57 @@ goog.DEPENDENCIES_ENABLED && (goog.included_ = {}, goog.dependencies_ = {pathIsM
|
|
182
192
|
var b = goog.queuedModules_;
|
183
193
|
goog.queuedModules_ = [];
|
184
194
|
for (var c = 0;c < a;c++) {
|
185
|
-
goog.
|
195
|
+
goog.maybeProcessDeferredPath_(b[c]);
|
186
196
|
}
|
187
197
|
}
|
198
|
+
}, goog.maybeProcessDeferredDep_ = function(a) {
|
199
|
+
goog.isDeferredModule_(a) && goog.allDepsAreAvailable_(a) && (a = goog.getPathFromDeps_(a), goog.maybeProcessDeferredPath_(goog.basePath + a));
|
200
|
+
}, goog.isDeferredModule_ = function(a) {
|
201
|
+
return(a = goog.getPathFromDeps_(a)) && goog.dependencies_.pathIsModule[a] ? goog.basePath + a in goog.dependencies_.deferred : !1;
|
202
|
+
}, goog.allDepsAreAvailable_ = function(a) {
|
203
|
+
if ((a = goog.getPathFromDeps_(a)) && a in goog.dependencies_.requires) {
|
204
|
+
for (var b in goog.dependencies_.requires[a]) {
|
205
|
+
if (!goog.isProvided_(b) && !goog.isDeferredModule_(b)) {
|
206
|
+
return!1;
|
207
|
+
}
|
208
|
+
}
|
209
|
+
}
|
210
|
+
return!0;
|
211
|
+
}, goog.maybeProcessDeferredPath_ = function(a) {
|
212
|
+
if (a in goog.dependencies_.deferred) {
|
213
|
+
var b = goog.dependencies_.deferred[a];
|
214
|
+
delete goog.dependencies_.deferred[a];
|
215
|
+
goog.globalEval(b);
|
216
|
+
}
|
188
217
|
}, goog.loadModule = function(a) {
|
218
|
+
var b = goog.moduleLoaderState_;
|
189
219
|
try {
|
190
|
-
goog.moduleLoaderState_ = {moduleName:void 0,
|
191
|
-
var
|
220
|
+
goog.moduleLoaderState_ = {moduleName:void 0, declareTestMethods:!1};
|
221
|
+
var c;
|
192
222
|
if (goog.isFunction(a)) {
|
193
|
-
|
223
|
+
c = a.call(goog.global, {});
|
194
224
|
} else {
|
195
225
|
if (goog.isString(a)) {
|
196
|
-
|
226
|
+
c = goog.loadModuleFromSource_.call(goog.global, a);
|
197
227
|
} else {
|
198
228
|
throw Error("Invalid module definition");
|
199
229
|
}
|
200
230
|
}
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
throw Error('Invalid module name "' + c + '"');
|
231
|
+
var d = goog.moduleLoaderState_.moduleName;
|
232
|
+
if (!goog.isString(d) || !d) {
|
233
|
+
throw Error('Invalid module name "' + d + '"');
|
205
234
|
}
|
206
|
-
goog.
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
235
|
+
goog.moduleLoaderState_.declareLegacyNamespace ? goog.constructNamespace_(d, c) : goog.SEAL_MODULE_EXPORTS && Object.seal && Object.seal(c);
|
236
|
+
goog.loadedModules_[d] = c;
|
237
|
+
if (goog.moduleLoaderState_.declareTestMethods) {
|
238
|
+
for (var e in c) {
|
239
|
+
if (0 === e.indexOf("test", 0) || "tearDown" == e || "setUp" == e || "setUpPage" == e || "tearDownPage" == e) {
|
240
|
+
goog.global[e] = c[e];
|
211
241
|
}
|
212
242
|
}
|
213
243
|
}
|
214
244
|
} finally {
|
215
|
-
goog.moduleLoaderState_ =
|
245
|
+
goog.moduleLoaderState_ = b;
|
216
246
|
}
|
217
247
|
}, goog.loadModuleFromSource_ = function(a) {
|
218
248
|
eval(a);
|
@@ -271,6 +301,31 @@ goog.DEPENDENCIES_ENABLED && (goog.included_ = {}, goog.dependencies_ = {pathIsM
|
|
271
301
|
}, goog.getPathFromDeps_ = function(a) {
|
272
302
|
return a in goog.dependencies_.nameToPath ? goog.dependencies_.nameToPath[a] : null;
|
273
303
|
}, goog.findBasePath_(), goog.global.CLOSURE_NO_DEPS || goog.importScript_(goog.basePath + "deps.js"));
|
304
|
+
goog.normalizePath_ = function(a) {
|
305
|
+
a = a.split("/");
|
306
|
+
for (var b = 0;b < a.length;) {
|
307
|
+
"." == a[b] ? a.splice(b, 1) : b && ".." == a[b] && a[b - 1] && ".." != a[b - 1] ? a.splice(--b, 2) : b++;
|
308
|
+
}
|
309
|
+
return a.join("/");
|
310
|
+
};
|
311
|
+
goog.retrieveAndExecModule_ = function(a) {
|
312
|
+
if (!COMPILED) {
|
313
|
+
var b = a;
|
314
|
+
a = goog.normalizePath_(a);
|
315
|
+
var c = goog.global.CLOSURE_IMPORT_SCRIPT || goog.writeScriptTag_, d = null, e = new goog.global.XMLHttpRequest;
|
316
|
+
e.onload = function() {
|
317
|
+
d = this.responseText;
|
318
|
+
};
|
319
|
+
e.open("get", a, !1);
|
320
|
+
e.send();
|
321
|
+
d = e.responseText;
|
322
|
+
if (null != d) {
|
323
|
+
e = goog.wrapModule_(a, d), goog.IS_OLD_IE_ ? (goog.dependencies_.deferred[b] = e, goog.queuedModules_.push(b)) : c(a, e);
|
324
|
+
} else {
|
325
|
+
throw Error("load of " + a + "failed");
|
326
|
+
}
|
327
|
+
}
|
328
|
+
};
|
274
329
|
goog.typeOf = function(a) {
|
275
330
|
var b = typeof a;
|
276
331
|
if ("object" == b) {
|
@@ -554,6 +609,7 @@ goog.dom = {};
|
|
554
609
|
goog.dom.NodeType = {ELEMENT:1, ATTRIBUTE:2, TEXT:3, CDATA_SECTION:4, ENTITY_REFERENCE:5, ENTITY:6, PROCESSING_INSTRUCTION:7, COMMENT:8, DOCUMENT:9, DOCUMENT_TYPE:10, DOCUMENT_FRAGMENT:11, NOTATION:12};
|
555
610
|
goog.string = {};
|
556
611
|
goog.string.DETECT_DOUBLE_ESCAPING = !1;
|
612
|
+
goog.string.FORCE_NON_DOM_HTML_UNESCAPING = !1;
|
557
613
|
goog.string.Unicode = {NBSP:"\u00a0"};
|
558
614
|
goog.string.startsWith = function(a, b) {
|
559
615
|
return 0 == a.lastIndexOf(b, 0);
|
@@ -580,12 +636,17 @@ goog.string.subs = function(a, b) {
|
|
580
636
|
goog.string.collapseWhitespace = function(a) {
|
581
637
|
return a.replace(/[\s\xa0]+/g, " ").replace(/^\s+|\s+$/g, "");
|
582
638
|
};
|
583
|
-
goog.string.
|
639
|
+
goog.string.isEmptyOrWhitespace = function(a) {
|
584
640
|
return/^[\s\xa0]*$/.test(a);
|
585
641
|
};
|
586
|
-
goog.string.
|
587
|
-
return
|
642
|
+
goog.string.isEmptyString = function(a) {
|
643
|
+
return 0 == a.length;
|
644
|
+
};
|
645
|
+
goog.string.isEmpty = goog.string.isEmptyOrWhitespace;
|
646
|
+
goog.string.isEmptyOrWhitespaceSafe = function(a) {
|
647
|
+
return goog.string.isEmptyOrWhitespace(goog.string.makeSafe(a));
|
588
648
|
};
|
649
|
+
goog.string.isEmptySafe = goog.string.isEmptyOrWhitespaceSafe;
|
589
650
|
goog.string.isBreakingWhitespace = function(a) {
|
590
651
|
return!/[^\t\n\r ]/.test(a);
|
591
652
|
};
|
@@ -619,7 +680,9 @@ goog.string.normalizeSpaces = function(a) {
|
|
619
680
|
goog.string.collapseBreakingSpaces = function(a) {
|
620
681
|
return a.replace(/[\t\r\n ]+/g, " ").replace(/^[\t\r\n ]+|[\t\r\n ]+$/g, "");
|
621
682
|
};
|
622
|
-
goog.string.trim = function(a) {
|
683
|
+
goog.string.trim = goog.TRUSTED_SITE && String.prototype.trim ? function(a) {
|
684
|
+
return a.trim();
|
685
|
+
} : function(a) {
|
623
686
|
return a.replace(/^[\s\xa0]+|[\s\xa0]+$/g, "");
|
624
687
|
};
|
625
688
|
goog.string.trimLeft = function(a) {
|
@@ -686,7 +749,7 @@ goog.string.NULL_RE_ = /\x00/g;
|
|
686
749
|
goog.string.E_RE_ = /e/g;
|
687
750
|
goog.string.ALL_RE_ = goog.string.DETECT_DOUBLE_ESCAPING ? /[\x00&<>"'e]/ : /[\x00&<>"']/;
|
688
751
|
goog.string.unescapeEntities = function(a) {
|
689
|
-
return goog.string.contains(a, "&") ? "document" in goog.global ? goog.string.unescapeEntitiesUsingDom_(a) : goog.string.unescapePureXmlEntities_(a) : a;
|
752
|
+
return goog.string.contains(a, "&") ? !goog.string.FORCE_NON_DOM_HTML_UNESCAPING && "document" in goog.global ? goog.string.unescapeEntitiesUsingDom_(a) : goog.string.unescapePureXmlEntities_(a) : a;
|
690
753
|
};
|
691
754
|
goog.string.unescapeEntitiesWithDocument = function(a, b) {
|
692
755
|
return goog.string.contains(a, "&") ? goog.string.unescapeEntitiesUsingDom_(a, b) : a;
|
@@ -877,7 +940,7 @@ goog.string.createUniqueString = function() {
|
|
877
940
|
};
|
878
941
|
goog.string.toNumber = function(a) {
|
879
942
|
var b = Number(a);
|
880
|
-
return 0 == b && goog.string.
|
943
|
+
return 0 == b && goog.string.isEmptyOrWhitespace(a) ? NaN : b;
|
881
944
|
};
|
882
945
|
goog.string.isLowerCamelCase = function(a) {
|
883
946
|
return/^[a-z]+([A-Z][a-z]*)*$/.test(a);
|
@@ -899,6 +962,9 @@ goog.string.toTitleCase = function(a, b) {
|
|
899
962
|
return b + c.toUpperCase();
|
900
963
|
});
|
901
964
|
};
|
965
|
+
goog.string.capitalize = function(a) {
|
966
|
+
return String(a.charAt(0)).toUpperCase() + String(a.substr(1)).toLowerCase();
|
967
|
+
};
|
902
968
|
goog.string.parseInt = function(a) {
|
903
969
|
isFinite(a) && (a = String(a));
|
904
970
|
return goog.isString(a) ? /^\s*-?0x/i.test(a) ? parseInt(a, 16) : parseInt(a, 10) : NaN;
|
@@ -911,6 +977,28 @@ goog.string.splitLimit = function(a, b, c) {
|
|
911
977
|
a.length && d.push(a.join(b));
|
912
978
|
return d;
|
913
979
|
};
|
980
|
+
goog.string.editDistance = function(a, b) {
|
981
|
+
var c = [], d = [];
|
982
|
+
if (a == b) {
|
983
|
+
return 0;
|
984
|
+
}
|
985
|
+
if (!a.length || !b.length) {
|
986
|
+
return Math.max(a.length, b.length);
|
987
|
+
}
|
988
|
+
for (var e = 0;e < b.length + 1;e++) {
|
989
|
+
c[e] = e;
|
990
|
+
}
|
991
|
+
for (e = 0;e < a.length;e++) {
|
992
|
+
d[0] = e + 1;
|
993
|
+
for (var f = 0;f < b.length;f++) {
|
994
|
+
d[f + 1] = Math.min(d[f] + 1, c[f + 1] + 1, c[f] + (a[e] != b[f]));
|
995
|
+
}
|
996
|
+
for (f = 0;f < c.length;f++) {
|
997
|
+
c[f] = d[f];
|
998
|
+
}
|
999
|
+
}
|
1000
|
+
return d[b.length];
|
1001
|
+
};
|
914
1002
|
goog.asserts = {};
|
915
1003
|
goog.asserts.ENABLE_ASSERTS = goog.DEBUG;
|
916
1004
|
goog.asserts.AssertionError = function(a, b) {
|
@@ -974,7 +1062,7 @@ goog.asserts.assertElement = function(a, b, c) {
|
|
974
1062
|
return a;
|
975
1063
|
};
|
976
1064
|
goog.asserts.assertInstanceof = function(a, b, c, d) {
|
977
|
-
!goog.asserts.ENABLE_ASSERTS || a instanceof b || goog.asserts.doAssertFailure_("instanceof
|
1065
|
+
!goog.asserts.ENABLE_ASSERTS || a instanceof b || goog.asserts.doAssertFailure_("Expected instanceof %s but got %s.", [goog.asserts.getType_(b), goog.asserts.getType_(a)], c, Array.prototype.slice.call(arguments, 3));
|
978
1066
|
return a;
|
979
1067
|
};
|
980
1068
|
goog.asserts.assertObjectPrototypeIsIntact = function() {
|
@@ -982,6 +1070,9 @@ goog.asserts.assertObjectPrototypeIsIntact = function() {
|
|
982
1070
|
goog.asserts.fail(a + " should not be enumerable in Object.prototype.");
|
983
1071
|
}
|
984
1072
|
};
|
1073
|
+
goog.asserts.getType_ = function(a) {
|
1074
|
+
return a instanceof Function ? a.displayName || a.name || "unknown type name" : a instanceof Object ? a.constructor.displayName || a.constructor.name || Object.prototype.toString.call(a) : null === a ? "null" : typeof a;
|
1075
|
+
};
|
985
1076
|
goog.array = {};
|
986
1077
|
goog.NATIVE_ARRAY_PROTOTYPES = goog.TRUSTED_SITE;
|
987
1078
|
goog.array.ASSUME_NATIVE_FUNCTIONS = !1;
|
@@ -1196,17 +1287,15 @@ goog.array.toArray = function(a) {
|
|
1196
1287
|
goog.array.clone = goog.array.toArray;
|
1197
1288
|
goog.array.extend = function(a, b) {
|
1198
1289
|
for (var c = 1;c < arguments.length;c++) {
|
1199
|
-
var d = arguments[c]
|
1200
|
-
if (goog.
|
1201
|
-
a.
|
1202
|
-
|
1203
|
-
|
1204
|
-
|
1205
|
-
a[f + h] = d[h];
|
1206
|
-
}
|
1207
|
-
} else {
|
1208
|
-
a.push(d);
|
1290
|
+
var d = arguments[c];
|
1291
|
+
if (goog.isArrayLike(d)) {
|
1292
|
+
var e = a.length || 0, f = d.length || 0;
|
1293
|
+
a.length = e + f;
|
1294
|
+
for (var g = 0;g < f;g++) {
|
1295
|
+
a[e + g] = d[g];
|
1209
1296
|
}
|
1297
|
+
} else {
|
1298
|
+
a.push(d);
|
1210
1299
|
}
|
1211
1300
|
}
|
1212
1301
|
};
|
@@ -1259,12 +1348,17 @@ goog.array.stableSort = function(a, b) {
|
|
1259
1348
|
a[c] = a[c].value;
|
1260
1349
|
}
|
1261
1350
|
};
|
1262
|
-
goog.array.
|
1351
|
+
goog.array.sortByKey = function(a, b, c) {
|
1263
1352
|
var d = c || goog.array.defaultCompare;
|
1264
1353
|
goog.array.sort(a, function(a, c) {
|
1265
|
-
return d(a
|
1354
|
+
return d(b(a), b(c));
|
1266
1355
|
});
|
1267
1356
|
};
|
1357
|
+
goog.array.sortObjectsByKey = function(a, b, c) {
|
1358
|
+
goog.array.sortByKey(a, function(a) {
|
1359
|
+
return a[b];
|
1360
|
+
}, c);
|
1361
|
+
};
|
1268
1362
|
goog.array.isSorted = function(a, b, c) {
|
1269
1363
|
b = b || goog.array.defaultCompare;
|
1270
1364
|
for (var d = 1;d < a.length;d++) {
|
@@ -1353,7 +1447,15 @@ goog.array.repeat = function(a, b) {
|
|
1353
1447
|
goog.array.flatten = function(a) {
|
1354
1448
|
for (var b = [], c = 0;c < arguments.length;c++) {
|
1355
1449
|
var d = arguments[c];
|
1356
|
-
|
1450
|
+
if (goog.isArray(d)) {
|
1451
|
+
for (var e = 0;e < d.length;e += 8192) {
|
1452
|
+
for (var f = goog.array.slice(d, e, e + 8192), f = goog.array.flatten.apply(null, f), g = 0;g < f.length;g++) {
|
1453
|
+
b.push(f[g]);
|
1454
|
+
}
|
1455
|
+
}
|
1456
|
+
} else {
|
1457
|
+
b.push(d);
|
1458
|
+
}
|
1357
1459
|
}
|
1358
1460
|
return b;
|
1359
1461
|
};
|
@@ -1518,11 +1620,13 @@ goog.object.setIfUndefined = function(a, b, c) {
|
|
1518
1620
|
return b in a ? a[b] : a[b] = c;
|
1519
1621
|
};
|
1520
1622
|
goog.object.equals = function(a, b) {
|
1521
|
-
if (!goog.array.equals(goog.object.getKeys(a), goog.object.getKeys(b))) {
|
1522
|
-
return!1;
|
1523
|
-
}
|
1524
1623
|
for (var c in a) {
|
1525
|
-
if (a[c] !== b[c]) {
|
1624
|
+
if (!(c in b) || a[c] !== b[c]) {
|
1625
|
+
return!1;
|
1626
|
+
}
|
1627
|
+
}
|
1628
|
+
for (c in b) {
|
1629
|
+
if (!(c in a)) {
|
1526
1630
|
return!1;
|
1527
1631
|
}
|
1528
1632
|
}
|
@@ -1760,6 +1864,11 @@ goog.functions.nth = function(a) {
|
|
1760
1864
|
goog.functions.withReturnValue = function(a, b) {
|
1761
1865
|
return goog.functions.sequence(a, goog.functions.constant(b));
|
1762
1866
|
};
|
1867
|
+
goog.functions.equalTo = function(a, b) {
|
1868
|
+
return function(c) {
|
1869
|
+
return b ? a == c : a === c;
|
1870
|
+
};
|
1871
|
+
};
|
1763
1872
|
goog.functions.compose = function(a, b) {
|
1764
1873
|
var c = arguments, d = c.length;
|
1765
1874
|
return function() {
|
@@ -2079,27 +2188,29 @@ goog.iter.every = function(a, b, c) {
|
|
2079
2188
|
return!0;
|
2080
2189
|
};
|
2081
2190
|
goog.iter.chain = function(a) {
|
2082
|
-
|
2083
|
-
|
2191
|
+
return goog.iter.chainFromIterable(arguments);
|
2192
|
+
};
|
2193
|
+
goog.iter.chainFromIterable = function(a) {
|
2194
|
+
var b = goog.iter.toIterator(a);
|
2195
|
+
a = new goog.iter.Iterator;
|
2196
|
+
var c = null;
|
2197
|
+
a.next = function() {
|
2084
2198
|
for (;;) {
|
2085
|
-
if (null ==
|
2199
|
+
if (null == c) {
|
2086
2200
|
var a = b.next();
|
2087
|
-
|
2201
|
+
c = goog.iter.toIterator(a);
|
2088
2202
|
}
|
2089
2203
|
try {
|
2090
|
-
return
|
2091
|
-
} catch (
|
2092
|
-
if (
|
2093
|
-
throw
|
2204
|
+
return c.next();
|
2205
|
+
} catch (e) {
|
2206
|
+
if (e !== goog.iter.StopIteration) {
|
2207
|
+
throw e;
|
2094
2208
|
}
|
2095
|
-
|
2209
|
+
c = null;
|
2096
2210
|
}
|
2097
2211
|
}
|
2098
2212
|
};
|
2099
|
-
return
|
2100
|
-
};
|
2101
|
-
goog.iter.chainFromIterable = function(a) {
|
2102
|
-
return goog.iter.chain.apply(void 0, a);
|
2213
|
+
return a;
|
2103
2214
|
};
|
2104
2215
|
goog.iter.dropWhile = function(a, b, c) {
|
2105
2216
|
var d = goog.iter.toIterator(a);
|
@@ -2118,19 +2229,12 @@ goog.iter.dropWhile = function(a, b, c) {
|
|
2118
2229
|
goog.iter.takeWhile = function(a, b, c) {
|
2119
2230
|
var d = goog.iter.toIterator(a);
|
2120
2231
|
a = new goog.iter.Iterator;
|
2121
|
-
var e = !0;
|
2122
2232
|
a.next = function() {
|
2123
|
-
|
2124
|
-
|
2125
|
-
|
2126
|
-
if (b.call(c, a, void 0, d)) {
|
2127
|
-
return a;
|
2128
|
-
}
|
2129
|
-
e = !1;
|
2130
|
-
} else {
|
2131
|
-
throw goog.iter.StopIteration;
|
2132
|
-
}
|
2233
|
+
var a = d.next();
|
2234
|
+
if (b.call(c, a, void 0, d)) {
|
2235
|
+
return a;
|
2133
2236
|
}
|
2237
|
+
throw goog.iter.StopIteration;
|
2134
2238
|
};
|
2135
2239
|
return a;
|
2136
2240
|
};
|
@@ -2145,10 +2249,11 @@ goog.iter.toArray = function(a) {
|
|
2145
2249
|
});
|
2146
2250
|
return b;
|
2147
2251
|
};
|
2148
|
-
goog.iter.equals = function(a, b) {
|
2149
|
-
|
2150
|
-
|
2151
|
-
|
2252
|
+
goog.iter.equals = function(a, b, c) {
|
2253
|
+
a = goog.iter.zipLongest({}, a, b);
|
2254
|
+
var d = c || goog.array.defaultCompareEquality;
|
2255
|
+
return goog.iter.every(a, function(a) {
|
2256
|
+
return d(a[0], a[1]);
|
2152
2257
|
});
|
2153
2258
|
};
|
2154
2259
|
goog.iter.nextOrValue = function(a, b) {
|
@@ -2592,6 +2697,12 @@ goog.labs.userAgent.browser.matchFirefox_ = function() {
|
|
2592
2697
|
goog.labs.userAgent.browser.matchSafari_ = function() {
|
2593
2698
|
return goog.labs.userAgent.util.matchUserAgent("Safari") && !goog.labs.userAgent.util.matchUserAgent("Chrome") && !goog.labs.userAgent.util.matchUserAgent("CriOS") && !goog.labs.userAgent.util.matchUserAgent("Android");
|
2594
2699
|
};
|
2700
|
+
goog.labs.userAgent.browser.matchCoast_ = function() {
|
2701
|
+
return goog.labs.userAgent.util.matchUserAgent("Coast");
|
2702
|
+
};
|
2703
|
+
goog.labs.userAgent.browser.matchIosWebview_ = function() {
|
2704
|
+
return(goog.labs.userAgent.util.matchUserAgent("iPad") || goog.labs.userAgent.util.matchUserAgent("iPhone")) && !goog.labs.userAgent.browser.matchSafari_() && !goog.labs.userAgent.browser.matchChrome_() && !goog.labs.userAgent.browser.matchCoast_() && goog.labs.userAgent.util.matchUserAgent("AppleWebKit");
|
2705
|
+
};
|
2595
2706
|
goog.labs.userAgent.browser.matchChrome_ = function() {
|
2596
2707
|
return goog.labs.userAgent.util.matchUserAgent("Chrome") || goog.labs.userAgent.util.matchUserAgent("CriOS");
|
2597
2708
|
};
|
@@ -2602,6 +2713,8 @@ goog.labs.userAgent.browser.isOpera = goog.labs.userAgent.browser.matchOpera_;
|
|
2602
2713
|
goog.labs.userAgent.browser.isIE = goog.labs.userAgent.browser.matchIE_;
|
2603
2714
|
goog.labs.userAgent.browser.isFirefox = goog.labs.userAgent.browser.matchFirefox_;
|
2604
2715
|
goog.labs.userAgent.browser.isSafari = goog.labs.userAgent.browser.matchSafari_;
|
2716
|
+
goog.labs.userAgent.browser.isCoast = goog.labs.userAgent.browser.matchCoast_;
|
2717
|
+
goog.labs.userAgent.browser.isIosWebview = goog.labs.userAgent.browser.matchIosWebview_;
|
2605
2718
|
goog.labs.userAgent.browser.isChrome = goog.labs.userAgent.browser.matchChrome_;
|
2606
2719
|
goog.labs.userAgent.browser.isAndroidBrowser = goog.labs.userAgent.browser.matchAndroidBrowser_;
|
2607
2720
|
goog.labs.userAgent.browser.isSilk = function() {
|
@@ -2693,6 +2806,43 @@ goog.labs.userAgent.engine.getVersionForKey_ = function(a, b) {
|
|
2693
2806
|
});
|
2694
2807
|
return c && c[1] || "";
|
2695
2808
|
};
|
2809
|
+
goog.labs.userAgent.platform = {};
|
2810
|
+
goog.labs.userAgent.platform.isAndroid = function() {
|
2811
|
+
return goog.labs.userAgent.util.matchUserAgent("Android");
|
2812
|
+
};
|
2813
|
+
goog.labs.userAgent.platform.isIpod = function() {
|
2814
|
+
return goog.labs.userAgent.util.matchUserAgent("iPod");
|
2815
|
+
};
|
2816
|
+
goog.labs.userAgent.platform.isIphone = function() {
|
2817
|
+
return goog.labs.userAgent.util.matchUserAgent("iPhone") && !goog.labs.userAgent.util.matchUserAgent("iPod") && !goog.labs.userAgent.util.matchUserAgent("iPad");
|
2818
|
+
};
|
2819
|
+
goog.labs.userAgent.platform.isIpad = function() {
|
2820
|
+
return goog.labs.userAgent.util.matchUserAgent("iPad");
|
2821
|
+
};
|
2822
|
+
goog.labs.userAgent.platform.isIos = function() {
|
2823
|
+
return goog.labs.userAgent.platform.isIphone() || goog.labs.userAgent.platform.isIpad() || goog.labs.userAgent.platform.isIpod();
|
2824
|
+
};
|
2825
|
+
goog.labs.userAgent.platform.isMacintosh = function() {
|
2826
|
+
return goog.labs.userAgent.util.matchUserAgent("Macintosh");
|
2827
|
+
};
|
2828
|
+
goog.labs.userAgent.platform.isLinux = function() {
|
2829
|
+
return goog.labs.userAgent.util.matchUserAgent("Linux");
|
2830
|
+
};
|
2831
|
+
goog.labs.userAgent.platform.isWindows = function() {
|
2832
|
+
return goog.labs.userAgent.util.matchUserAgent("Windows");
|
2833
|
+
};
|
2834
|
+
goog.labs.userAgent.platform.isChromeOS = function() {
|
2835
|
+
return goog.labs.userAgent.util.matchUserAgent("CrOS");
|
2836
|
+
};
|
2837
|
+
goog.labs.userAgent.platform.getVersion = function() {
|
2838
|
+
var a = goog.labs.userAgent.util.getUserAgent(), b = "";
|
2839
|
+
goog.labs.userAgent.platform.isWindows() ? (b = /Windows (?:NT|Phone) ([0-9.]+)/, b = (a = b.exec(a)) ? a[1] : "0.0") : goog.labs.userAgent.platform.isIos() ? (b = /(?:iPhone|iPod|iPad|CPU)\s+OS\s+(\S+)/, b = (a = b.exec(a)) && a[1].replace(/_/g, ".")) : goog.labs.userAgent.platform.isMacintosh() ? (b = /Mac OS X ([0-9_.]+)/, b = (a = b.exec(a)) ? a[1].replace(/_/g, ".") : "10") : goog.labs.userAgent.platform.isAndroid() ? (b = /Android\s+([^\);]+)(\)|;)/, b = (a = b.exec(a)) && a[1]) : goog.labs.userAgent.platform.isChromeOS() &&
|
2840
|
+
(b = /(?:CrOS\s+(?:i686|x86_64)\s+([0-9.]+))/, b = (a = b.exec(a)) && a[1]);
|
2841
|
+
return b || "";
|
2842
|
+
};
|
2843
|
+
goog.labs.userAgent.platform.isVersionOrHigher = function(a) {
|
2844
|
+
return 0 <= goog.string.compareVersions(goog.labs.userAgent.platform.getVersion(), a);
|
2845
|
+
};
|
2696
2846
|
goog.userAgent = {};
|
2697
2847
|
goog.userAgent.ASSUME_IE = !1;
|
2698
2848
|
goog.userAgent.ASSUME_GECKO = !1;
|
@@ -2729,24 +2879,20 @@ goog.userAgent.ASSUME_ANDROID = !1;
|
|
2729
2879
|
goog.userAgent.ASSUME_IPHONE = !1;
|
2730
2880
|
goog.userAgent.ASSUME_IPAD = !1;
|
2731
2881
|
goog.userAgent.PLATFORM_KNOWN_ = goog.userAgent.ASSUME_MAC || goog.userAgent.ASSUME_WINDOWS || goog.userAgent.ASSUME_LINUX || goog.userAgent.ASSUME_X11 || goog.userAgent.ASSUME_ANDROID || goog.userAgent.ASSUME_IPHONE || goog.userAgent.ASSUME_IPAD;
|
2732
|
-
goog.userAgent.
|
2733
|
-
|
2734
|
-
|
2735
|
-
goog.userAgent.
|
2736
|
-
|
2737
|
-
|
2738
|
-
|
2739
|
-
|
2740
|
-
|
2741
|
-
};
|
2742
|
-
goog.userAgent.PLATFORM_KNOWN_
|
2743
|
-
goog.userAgent.
|
2744
|
-
goog.userAgent.
|
2745
|
-
goog.userAgent.
|
2746
|
-
goog.userAgent.X11 = goog.userAgent.PLATFORM_KNOWN_ ? goog.userAgent.ASSUME_X11 : goog.userAgent.detectedX11_;
|
2747
|
-
goog.userAgent.ANDROID = goog.userAgent.PLATFORM_KNOWN_ ? goog.userAgent.ASSUME_ANDROID : goog.userAgent.detectedAndroid_;
|
2748
|
-
goog.userAgent.IPHONE = goog.userAgent.PLATFORM_KNOWN_ ? goog.userAgent.ASSUME_IPHONE : goog.userAgent.detectedIPhone_;
|
2749
|
-
goog.userAgent.IPAD = goog.userAgent.PLATFORM_KNOWN_ ? goog.userAgent.ASSUME_IPAD : goog.userAgent.detectedIPad_;
|
2882
|
+
goog.userAgent.MAC = goog.userAgent.PLATFORM_KNOWN_ ? goog.userAgent.ASSUME_MAC : goog.labs.userAgent.platform.isMacintosh();
|
2883
|
+
goog.userAgent.WINDOWS = goog.userAgent.PLATFORM_KNOWN_ ? goog.userAgent.ASSUME_WINDOWS : goog.labs.userAgent.platform.isWindows();
|
2884
|
+
goog.userAgent.isLegacyLinux_ = function() {
|
2885
|
+
return goog.labs.userAgent.platform.isLinux() || goog.labs.userAgent.platform.isChromeOS();
|
2886
|
+
};
|
2887
|
+
goog.userAgent.LINUX = goog.userAgent.PLATFORM_KNOWN_ ? goog.userAgent.ASSUME_LINUX : goog.userAgent.isLegacyLinux_();
|
2888
|
+
goog.userAgent.isX11_ = function() {
|
2889
|
+
var a = goog.userAgent.getNavigator();
|
2890
|
+
return!!a && goog.string.contains(a.appVersion || "", "X11");
|
2891
|
+
};
|
2892
|
+
goog.userAgent.X11 = goog.userAgent.PLATFORM_KNOWN_ ? goog.userAgent.ASSUME_X11 : goog.userAgent.isX11_();
|
2893
|
+
goog.userAgent.ANDROID = goog.userAgent.PLATFORM_KNOWN_ ? goog.userAgent.ASSUME_ANDROID : goog.labs.userAgent.platform.isAndroid();
|
2894
|
+
goog.userAgent.IPHONE = goog.userAgent.PLATFORM_KNOWN_ ? goog.userAgent.ASSUME_IPHONE : goog.labs.userAgent.platform.isIphone();
|
2895
|
+
goog.userAgent.IPAD = goog.userAgent.PLATFORM_KNOWN_ ? goog.userAgent.ASSUME_IPAD : goog.labs.userAgent.platform.isIpad();
|
2750
2896
|
goog.userAgent.determineVersion_ = function() {
|
2751
2897
|
var a = "", b;
|
2752
2898
|
if (goog.userAgent.OPERA && goog.global.opera) {
|
@@ -3432,113 +3578,6 @@ goog.Uri.QueryData.prototype.extend = function(a) {
|
|
3432
3578
|
}, this);
|
3433
3579
|
}
|
3434
3580
|
};
|
3435
|
-
goog.debug.RelativeTimeProvider = function() {
|
3436
|
-
this.relativeTimeStart_ = goog.now();
|
3437
|
-
};
|
3438
|
-
goog.debug.RelativeTimeProvider.defaultInstance_ = new goog.debug.RelativeTimeProvider;
|
3439
|
-
goog.debug.RelativeTimeProvider.prototype.set = function(a) {
|
3440
|
-
this.relativeTimeStart_ = a;
|
3441
|
-
};
|
3442
|
-
goog.debug.RelativeTimeProvider.prototype.reset = function() {
|
3443
|
-
this.set(goog.now());
|
3444
|
-
};
|
3445
|
-
goog.debug.RelativeTimeProvider.prototype.get = function() {
|
3446
|
-
return this.relativeTimeStart_;
|
3447
|
-
};
|
3448
|
-
goog.debug.RelativeTimeProvider.getDefaultInstance = function() {
|
3449
|
-
return goog.debug.RelativeTimeProvider.defaultInstance_;
|
3450
|
-
};
|
3451
|
-
goog.debug.Formatter = function(a) {
|
3452
|
-
this.prefix_ = a || "";
|
3453
|
-
this.startTimeProvider_ = goog.debug.RelativeTimeProvider.getDefaultInstance();
|
3454
|
-
};
|
3455
|
-
goog.debug.Formatter.prototype.appendNewline = !0;
|
3456
|
-
goog.debug.Formatter.prototype.showAbsoluteTime = !0;
|
3457
|
-
goog.debug.Formatter.prototype.showRelativeTime = !0;
|
3458
|
-
goog.debug.Formatter.prototype.showLoggerName = !0;
|
3459
|
-
goog.debug.Formatter.prototype.showExceptionText = !1;
|
3460
|
-
goog.debug.Formatter.prototype.showSeverityLevel = !1;
|
3461
|
-
goog.debug.Formatter.prototype.setStartTimeProvider = function(a) {
|
3462
|
-
this.startTimeProvider_ = a;
|
3463
|
-
};
|
3464
|
-
goog.debug.Formatter.prototype.getStartTimeProvider = function() {
|
3465
|
-
return this.startTimeProvider_;
|
3466
|
-
};
|
3467
|
-
goog.debug.Formatter.prototype.resetRelativeTimeStart = function() {
|
3468
|
-
this.startTimeProvider_.reset();
|
3469
|
-
};
|
3470
|
-
goog.debug.Formatter.getDateTimeStamp_ = function(a) {
|
3471
|
-
a = new Date(a.getMillis());
|
3472
|
-
return goog.debug.Formatter.getTwoDigitString_(a.getFullYear() - 2E3) + goog.debug.Formatter.getTwoDigitString_(a.getMonth() + 1) + goog.debug.Formatter.getTwoDigitString_(a.getDate()) + " " + goog.debug.Formatter.getTwoDigitString_(a.getHours()) + ":" + goog.debug.Formatter.getTwoDigitString_(a.getMinutes()) + ":" + goog.debug.Formatter.getTwoDigitString_(a.getSeconds()) + "." + goog.debug.Formatter.getTwoDigitString_(Math.floor(a.getMilliseconds() / 10));
|
3473
|
-
};
|
3474
|
-
goog.debug.Formatter.getTwoDigitString_ = function(a) {
|
3475
|
-
return 10 > a ? "0" + a : String(a);
|
3476
|
-
};
|
3477
|
-
goog.debug.Formatter.getRelativeTime_ = function(a, b) {
|
3478
|
-
var c = (a.getMillis() - b) / 1E3, d = c.toFixed(3), e = 0;
|
3479
|
-
if (1 > c) {
|
3480
|
-
e = 2;
|
3481
|
-
} else {
|
3482
|
-
for (;100 > c;) {
|
3483
|
-
e++, c *= 10;
|
3484
|
-
}
|
3485
|
-
}
|
3486
|
-
for (;0 < e--;) {
|
3487
|
-
d = " " + d;
|
3488
|
-
}
|
3489
|
-
return d;
|
3490
|
-
};
|
3491
|
-
goog.debug.HtmlFormatter = function(a) {
|
3492
|
-
goog.debug.Formatter.call(this, a);
|
3493
|
-
};
|
3494
|
-
goog.inherits(goog.debug.HtmlFormatter, goog.debug.Formatter);
|
3495
|
-
goog.debug.HtmlFormatter.prototype.showExceptionText = !0;
|
3496
|
-
goog.debug.HtmlFormatter.prototype.formatRecord = function(a) {
|
3497
|
-
var b;
|
3498
|
-
switch(a.getLevel().value) {
|
3499
|
-
case goog.debug.Logger.Level.SHOUT.value:
|
3500
|
-
b = "dbg-sh";
|
3501
|
-
break;
|
3502
|
-
case goog.debug.Logger.Level.SEVERE.value:
|
3503
|
-
b = "dbg-sev";
|
3504
|
-
break;
|
3505
|
-
case goog.debug.Logger.Level.WARNING.value:
|
3506
|
-
b = "dbg-w";
|
3507
|
-
break;
|
3508
|
-
case goog.debug.Logger.Level.INFO.value:
|
3509
|
-
b = "dbg-i";
|
3510
|
-
break;
|
3511
|
-
default:
|
3512
|
-
b = "dbg-f";
|
3513
|
-
}
|
3514
|
-
var c = [];
|
3515
|
-
c.push(this.prefix_, " ");
|
3516
|
-
this.showAbsoluteTime && c.push("[", goog.debug.Formatter.getDateTimeStamp_(a), "] ");
|
3517
|
-
this.showRelativeTime && c.push("[", goog.string.whitespaceEscape(goog.debug.Formatter.getRelativeTime_(a, this.startTimeProvider_.get())), "s] ");
|
3518
|
-
this.showLoggerName && c.push("[", goog.string.htmlEscape(a.getLoggerName()), "] ");
|
3519
|
-
this.showSeverityLevel && c.push("[", goog.string.htmlEscape(a.getLevel().name), "] ");
|
3520
|
-
c.push('<span class="', b, '">', goog.string.newLineToBr(goog.string.whitespaceEscape(goog.string.htmlEscape(a.getMessage()))));
|
3521
|
-
this.showExceptionText && a.getException() && c.push("<br>", goog.string.newLineToBr(goog.string.whitespaceEscape(a.getExceptionText() || "")));
|
3522
|
-
c.push("</span>");
|
3523
|
-
this.appendNewline && c.push("<br>");
|
3524
|
-
return c.join("");
|
3525
|
-
};
|
3526
|
-
goog.debug.TextFormatter = function(a) {
|
3527
|
-
goog.debug.Formatter.call(this, a);
|
3528
|
-
};
|
3529
|
-
goog.inherits(goog.debug.TextFormatter, goog.debug.Formatter);
|
3530
|
-
goog.debug.TextFormatter.prototype.formatRecord = function(a) {
|
3531
|
-
var b = [];
|
3532
|
-
b.push(this.prefix_, " ");
|
3533
|
-
this.showAbsoluteTime && b.push("[", goog.debug.Formatter.getDateTimeStamp_(a), "] ");
|
3534
|
-
this.showRelativeTime && b.push("[", goog.debug.Formatter.getRelativeTime_(a, this.startTimeProvider_.get()), "s] ");
|
3535
|
-
this.showLoggerName && b.push("[", a.getLoggerName(), "] ");
|
3536
|
-
this.showSeverityLevel && b.push("[", a.getLevel().name, "] ");
|
3537
|
-
b.push(a.getMessage());
|
3538
|
-
this.showExceptionText && a.getException() && b.push("\n", a.getExceptionText());
|
3539
|
-
this.appendNewline && b.push("\n");
|
3540
|
-
return b.join("");
|
3541
|
-
};
|
3542
3581
|
goog.structs.Collection = function() {
|
3543
3582
|
};
|
3544
3583
|
goog.structs.Set = function(a) {
|
@@ -4044,9 +4083,14 @@ goog.debug.Logger.prototype.log = function(a, b, c) {
|
|
4044
4083
|
goog.debug.LOGGING_ENABLED && this.isLoggable(a) && (goog.isFunction(b) && (b = b()), this.doLogRecord_(this.getLogRecord(a, b, c, goog.debug.Logger.prototype.log)));
|
4045
4084
|
};
|
4046
4085
|
goog.debug.Logger.prototype.getLogRecord = function(a, b, c, d) {
|
4047
|
-
|
4048
|
-
|
4049
|
-
|
4086
|
+
var e = goog.debug.LogBuffer.isBufferingEnabled() ? goog.debug.LogBuffer.getInstance().addRecord(a, b, this.name_) : new goog.debug.LogRecord(a, String(b), this.name_);
|
4087
|
+
if (c) {
|
4088
|
+
var f;
|
4089
|
+
f = goog.STRICT_MODE_COMPATIBLE ? d || goog.debug.Logger.prototype.getLogRecord : d || arguments.callee.caller;
|
4090
|
+
e.setException(c);
|
4091
|
+
e.setExceptionText(goog.debug.exposeException(c, f));
|
4092
|
+
}
|
4093
|
+
return e;
|
4050
4094
|
};
|
4051
4095
|
goog.debug.Logger.prototype.shout = function(a, b) {
|
4052
4096
|
goog.debug.LOGGING_ENABLED && this.log(goog.debug.Logger.Level.SHOUT, a, b);
|
@@ -4131,6 +4175,571 @@ goog.debug.LogManager.createLogger_ = function(a) {
|
|
4131
4175
|
}
|
4132
4176
|
return goog.debug.LogManager.loggers_[a] = b;
|
4133
4177
|
};
|
4178
|
+
goog.debug.RelativeTimeProvider = function() {
|
4179
|
+
this.relativeTimeStart_ = goog.now();
|
4180
|
+
};
|
4181
|
+
goog.debug.RelativeTimeProvider.defaultInstance_ = new goog.debug.RelativeTimeProvider;
|
4182
|
+
goog.debug.RelativeTimeProvider.prototype.set = function(a) {
|
4183
|
+
this.relativeTimeStart_ = a;
|
4184
|
+
};
|
4185
|
+
goog.debug.RelativeTimeProvider.prototype.reset = function() {
|
4186
|
+
this.set(goog.now());
|
4187
|
+
};
|
4188
|
+
goog.debug.RelativeTimeProvider.prototype.get = function() {
|
4189
|
+
return this.relativeTimeStart_;
|
4190
|
+
};
|
4191
|
+
goog.debug.RelativeTimeProvider.getDefaultInstance = function() {
|
4192
|
+
return goog.debug.RelativeTimeProvider.defaultInstance_;
|
4193
|
+
};
|
4194
|
+
goog.dom.tags = {};
|
4195
|
+
goog.dom.tags.VOID_TAGS_ = goog.object.createSet("area base br col command embed hr img input keygen link meta param source track wbr".split(" "));
|
4196
|
+
goog.dom.tags.isVoidTag = function(a) {
|
4197
|
+
return!0 === goog.dom.tags.VOID_TAGS_[a];
|
4198
|
+
};
|
4199
|
+
goog.string.TypedString = function() {
|
4200
|
+
};
|
4201
|
+
goog.string.Const = function() {
|
4202
|
+
this.stringConstValueWithSecurityContract__googStringSecurityPrivate_ = "";
|
4203
|
+
this.STRING_CONST_TYPE_MARKER__GOOG_STRING_SECURITY_PRIVATE_ = goog.string.Const.TYPE_MARKER_;
|
4204
|
+
};
|
4205
|
+
goog.string.Const.prototype.implementsGoogStringTypedString = !0;
|
4206
|
+
goog.string.Const.prototype.getTypedStringValue = function() {
|
4207
|
+
return this.stringConstValueWithSecurityContract__googStringSecurityPrivate_;
|
4208
|
+
};
|
4209
|
+
goog.string.Const.prototype.toString = function() {
|
4210
|
+
return "Const{" + this.stringConstValueWithSecurityContract__googStringSecurityPrivate_ + "}";
|
4211
|
+
};
|
4212
|
+
goog.string.Const.unwrap = function(a) {
|
4213
|
+
if (a instanceof goog.string.Const && a.constructor === goog.string.Const && a.STRING_CONST_TYPE_MARKER__GOOG_STRING_SECURITY_PRIVATE_ === goog.string.Const.TYPE_MARKER_) {
|
4214
|
+
return a.stringConstValueWithSecurityContract__googStringSecurityPrivate_;
|
4215
|
+
}
|
4216
|
+
goog.asserts.fail("expected object of type Const, got '" + a + "'");
|
4217
|
+
return "type_error:Const";
|
4218
|
+
};
|
4219
|
+
goog.string.Const.from = function(a) {
|
4220
|
+
return goog.string.Const.create__googStringSecurityPrivate_(a);
|
4221
|
+
};
|
4222
|
+
goog.string.Const.TYPE_MARKER_ = {};
|
4223
|
+
goog.string.Const.create__googStringSecurityPrivate_ = function(a) {
|
4224
|
+
var b = new goog.string.Const;
|
4225
|
+
b.stringConstValueWithSecurityContract__googStringSecurityPrivate_ = a;
|
4226
|
+
return b;
|
4227
|
+
};
|
4228
|
+
goog.html = {};
|
4229
|
+
goog.html.SafeStyle = function() {
|
4230
|
+
this.privateDoNotAccessOrElseSafeStyleWrappedValue_ = "";
|
4231
|
+
this.SAFE_STYLE_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ = goog.html.SafeStyle.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_;
|
4232
|
+
};
|
4233
|
+
goog.html.SafeStyle.prototype.implementsGoogStringTypedString = !0;
|
4234
|
+
goog.html.SafeStyle.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ = {};
|
4235
|
+
goog.html.SafeStyle.fromConstant = function(a) {
|
4236
|
+
a = goog.string.Const.unwrap(a);
|
4237
|
+
if (0 === a.length) {
|
4238
|
+
return goog.html.SafeStyle.EMPTY;
|
4239
|
+
}
|
4240
|
+
goog.html.SafeStyle.checkStyle_(a);
|
4241
|
+
goog.asserts.assert(goog.string.endsWith(a, ";"), "Last character of style string is not ';': " + a);
|
4242
|
+
goog.asserts.assert(goog.string.contains(a, ":"), "Style string must contain at least one ':', to specify a \"name: value\" pair: " + a);
|
4243
|
+
return goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(a);
|
4244
|
+
};
|
4245
|
+
goog.html.SafeStyle.checkStyle_ = function(a) {
|
4246
|
+
goog.asserts.assert(!/[<>]/.test(a), "Forbidden characters in style string: " + a);
|
4247
|
+
};
|
4248
|
+
goog.html.SafeStyle.prototype.getTypedStringValue = function() {
|
4249
|
+
return this.privateDoNotAccessOrElseSafeStyleWrappedValue_;
|
4250
|
+
};
|
4251
|
+
goog.DEBUG && (goog.html.SafeStyle.prototype.toString = function() {
|
4252
|
+
return "SafeStyle{" + this.privateDoNotAccessOrElseSafeStyleWrappedValue_ + "}";
|
4253
|
+
});
|
4254
|
+
goog.html.SafeStyle.unwrap = function(a) {
|
4255
|
+
if (a instanceof goog.html.SafeStyle && a.constructor === goog.html.SafeStyle && a.SAFE_STYLE_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ === goog.html.SafeStyle.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_) {
|
4256
|
+
return a.privateDoNotAccessOrElseSafeStyleWrappedValue_;
|
4257
|
+
}
|
4258
|
+
goog.asserts.fail("expected object of type SafeStyle, got '" + a + "'");
|
4259
|
+
return "type_error:SafeStyle";
|
4260
|
+
};
|
4261
|
+
goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse = function(a) {
|
4262
|
+
var b = new goog.html.SafeStyle;
|
4263
|
+
b.privateDoNotAccessOrElseSafeStyleWrappedValue_ = a;
|
4264
|
+
return b;
|
4265
|
+
};
|
4266
|
+
goog.html.SafeStyle.EMPTY = goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse("");
|
4267
|
+
goog.html.SafeStyle.INNOCUOUS_STRING = "zClosurez";
|
4268
|
+
goog.html.SafeStyle.create = function(a) {
|
4269
|
+
var b = "", c;
|
4270
|
+
for (c in a) {
|
4271
|
+
if (!/^[-_a-zA-Z0-9]+$/.test(c)) {
|
4272
|
+
throw Error("Name allows only [-_a-zA-Z0-9], got: " + c);
|
4273
|
+
}
|
4274
|
+
var d = a[c];
|
4275
|
+
null != d && (d instanceof goog.string.Const ? (d = goog.string.Const.unwrap(d), goog.asserts.assert(!/[{;}]/.test(d), "Value does not allow [{;}].")) : goog.html.SafeStyle.VALUE_RE_.test(d) || (goog.asserts.fail("String value allows only [-.%_!# a-zA-Z0-9], got: " + d), d = goog.html.SafeStyle.INNOCUOUS_STRING), b += c + ":" + d + ";");
|
4276
|
+
}
|
4277
|
+
if (!b) {
|
4278
|
+
return goog.html.SafeStyle.EMPTY;
|
4279
|
+
}
|
4280
|
+
goog.html.SafeStyle.checkStyle_(b);
|
4281
|
+
return goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(b);
|
4282
|
+
};
|
4283
|
+
goog.html.SafeStyle.VALUE_RE_ = /^[-.%_!# a-zA-Z0-9]+$/;
|
4284
|
+
goog.html.SafeStyle.concat = function(a) {
|
4285
|
+
var b = "", c = function(a) {
|
4286
|
+
goog.isArray(a) ? goog.array.forEach(a, c) : b += goog.html.SafeStyle.unwrap(a);
|
4287
|
+
};
|
4288
|
+
goog.array.forEach(arguments, c);
|
4289
|
+
return b ? goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(b) : goog.html.SafeStyle.EMPTY;
|
4290
|
+
};
|
4291
|
+
goog.i18n = {};
|
4292
|
+
goog.i18n.bidi = {};
|
4293
|
+
goog.i18n.bidi.FORCE_RTL = !1;
|
4294
|
+
goog.i18n.bidi.IS_RTL = goog.i18n.bidi.FORCE_RTL || ("ar" == goog.LOCALE.substring(0, 2).toLowerCase() || "fa" == goog.LOCALE.substring(0, 2).toLowerCase() || "he" == goog.LOCALE.substring(0, 2).toLowerCase() || "iw" == goog.LOCALE.substring(0, 2).toLowerCase() || "ps" == goog.LOCALE.substring(0, 2).toLowerCase() || "sd" == goog.LOCALE.substring(0, 2).toLowerCase() || "ug" == goog.LOCALE.substring(0, 2).toLowerCase() || "ur" == goog.LOCALE.substring(0, 2).toLowerCase() || "yi" == goog.LOCALE.substring(0,
|
4295
|
+
2).toLowerCase()) && (2 == goog.LOCALE.length || "-" == goog.LOCALE.substring(2, 3) || "_" == goog.LOCALE.substring(2, 3)) || 3 <= goog.LOCALE.length && "ckb" == goog.LOCALE.substring(0, 3).toLowerCase() && (3 == goog.LOCALE.length || "-" == goog.LOCALE.substring(3, 4) || "_" == goog.LOCALE.substring(3, 4));
|
4296
|
+
goog.i18n.bidi.Format = {LRE:"\u202a", RLE:"\u202b", PDF:"\u202c", LRM:"\u200e", RLM:"\u200f"};
|
4297
|
+
goog.i18n.bidi.Dir = {LTR:1, RTL:-1, NEUTRAL:0};
|
4298
|
+
goog.i18n.bidi.RIGHT = "right";
|
4299
|
+
goog.i18n.bidi.LEFT = "left";
|
4300
|
+
goog.i18n.bidi.I18N_RIGHT = goog.i18n.bidi.IS_RTL ? goog.i18n.bidi.LEFT : goog.i18n.bidi.RIGHT;
|
4301
|
+
goog.i18n.bidi.I18N_LEFT = goog.i18n.bidi.IS_RTL ? goog.i18n.bidi.RIGHT : goog.i18n.bidi.LEFT;
|
4302
|
+
goog.i18n.bidi.toDir = function(a, b) {
|
4303
|
+
return "number" == typeof a ? 0 < a ? goog.i18n.bidi.Dir.LTR : 0 > a ? goog.i18n.bidi.Dir.RTL : b ? null : goog.i18n.bidi.Dir.NEUTRAL : null == a ? null : a ? goog.i18n.bidi.Dir.RTL : goog.i18n.bidi.Dir.LTR;
|
4304
|
+
};
|
4305
|
+
goog.i18n.bidi.ltrChars_ = "A-Za-z\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u02b8\u0300-\u0590\u0800-\u1fff\u200e\u2c00-\ufb1c\ufe00-\ufe6f\ufefd-\uffff";
|
4306
|
+
goog.i18n.bidi.rtlChars_ = "\u0591-\u07ff\u200f\ufb1d-\ufdff\ufe70-\ufefc";
|
4307
|
+
goog.i18n.bidi.htmlSkipReg_ = /<[^>]*>|&[^;]+;/g;
|
4308
|
+
goog.i18n.bidi.stripHtmlIfNeeded_ = function(a, b) {
|
4309
|
+
return b ? a.replace(goog.i18n.bidi.htmlSkipReg_, "") : a;
|
4310
|
+
};
|
4311
|
+
goog.i18n.bidi.rtlCharReg_ = new RegExp("[" + goog.i18n.bidi.rtlChars_ + "]");
|
4312
|
+
goog.i18n.bidi.ltrCharReg_ = new RegExp("[" + goog.i18n.bidi.ltrChars_ + "]");
|
4313
|
+
goog.i18n.bidi.hasAnyRtl = function(a, b) {
|
4314
|
+
return goog.i18n.bidi.rtlCharReg_.test(goog.i18n.bidi.stripHtmlIfNeeded_(a, b));
|
4315
|
+
};
|
4316
|
+
goog.i18n.bidi.hasRtlChar = goog.i18n.bidi.hasAnyRtl;
|
4317
|
+
goog.i18n.bidi.hasAnyLtr = function(a, b) {
|
4318
|
+
return goog.i18n.bidi.ltrCharReg_.test(goog.i18n.bidi.stripHtmlIfNeeded_(a, b));
|
4319
|
+
};
|
4320
|
+
goog.i18n.bidi.ltrRe_ = new RegExp("^[" + goog.i18n.bidi.ltrChars_ + "]");
|
4321
|
+
goog.i18n.bidi.rtlRe_ = new RegExp("^[" + goog.i18n.bidi.rtlChars_ + "]");
|
4322
|
+
goog.i18n.bidi.isRtlChar = function(a) {
|
4323
|
+
return goog.i18n.bidi.rtlRe_.test(a);
|
4324
|
+
};
|
4325
|
+
goog.i18n.bidi.isLtrChar = function(a) {
|
4326
|
+
return goog.i18n.bidi.ltrRe_.test(a);
|
4327
|
+
};
|
4328
|
+
goog.i18n.bidi.isNeutralChar = function(a) {
|
4329
|
+
return!goog.i18n.bidi.isLtrChar(a) && !goog.i18n.bidi.isRtlChar(a);
|
4330
|
+
};
|
4331
|
+
goog.i18n.bidi.ltrDirCheckRe_ = new RegExp("^[^" + goog.i18n.bidi.rtlChars_ + "]*[" + goog.i18n.bidi.ltrChars_ + "]");
|
4332
|
+
goog.i18n.bidi.rtlDirCheckRe_ = new RegExp("^[^" + goog.i18n.bidi.ltrChars_ + "]*[" + goog.i18n.bidi.rtlChars_ + "]");
|
4333
|
+
goog.i18n.bidi.startsWithRtl = function(a, b) {
|
4334
|
+
return goog.i18n.bidi.rtlDirCheckRe_.test(goog.i18n.bidi.stripHtmlIfNeeded_(a, b));
|
4335
|
+
};
|
4336
|
+
goog.i18n.bidi.isRtlText = goog.i18n.bidi.startsWithRtl;
|
4337
|
+
goog.i18n.bidi.startsWithLtr = function(a, b) {
|
4338
|
+
return goog.i18n.bidi.ltrDirCheckRe_.test(goog.i18n.bidi.stripHtmlIfNeeded_(a, b));
|
4339
|
+
};
|
4340
|
+
goog.i18n.bidi.isLtrText = goog.i18n.bidi.startsWithLtr;
|
4341
|
+
goog.i18n.bidi.isRequiredLtrRe_ = /^http:\/\/.*/;
|
4342
|
+
goog.i18n.bidi.isNeutralText = function(a, b) {
|
4343
|
+
a = goog.i18n.bidi.stripHtmlIfNeeded_(a, b);
|
4344
|
+
return goog.i18n.bidi.isRequiredLtrRe_.test(a) || !goog.i18n.bidi.hasAnyLtr(a) && !goog.i18n.bidi.hasAnyRtl(a);
|
4345
|
+
};
|
4346
|
+
goog.i18n.bidi.ltrExitDirCheckRe_ = new RegExp("[" + goog.i18n.bidi.ltrChars_ + "][^" + goog.i18n.bidi.rtlChars_ + "]*$");
|
4347
|
+
goog.i18n.bidi.rtlExitDirCheckRe_ = new RegExp("[" + goog.i18n.bidi.rtlChars_ + "][^" + goog.i18n.bidi.ltrChars_ + "]*$");
|
4348
|
+
goog.i18n.bidi.endsWithLtr = function(a, b) {
|
4349
|
+
return goog.i18n.bidi.ltrExitDirCheckRe_.test(goog.i18n.bidi.stripHtmlIfNeeded_(a, b));
|
4350
|
+
};
|
4351
|
+
goog.i18n.bidi.isLtrExitText = goog.i18n.bidi.endsWithLtr;
|
4352
|
+
goog.i18n.bidi.endsWithRtl = function(a, b) {
|
4353
|
+
return goog.i18n.bidi.rtlExitDirCheckRe_.test(goog.i18n.bidi.stripHtmlIfNeeded_(a, b));
|
4354
|
+
};
|
4355
|
+
goog.i18n.bidi.isRtlExitText = goog.i18n.bidi.endsWithRtl;
|
4356
|
+
goog.i18n.bidi.rtlLocalesRe_ = /^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Arab|Hebr|Thaa|Nkoo|Tfng))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;
|
4357
|
+
goog.i18n.bidi.isRtlLanguage = function(a) {
|
4358
|
+
return goog.i18n.bidi.rtlLocalesRe_.test(a);
|
4359
|
+
};
|
4360
|
+
goog.i18n.bidi.bracketGuardHtmlRe_ = /(\(.*?\)+)|(\[.*?\]+)|(\{.*?\}+)|(<.*?(>)+)/g;
|
4361
|
+
goog.i18n.bidi.bracketGuardTextRe_ = /(\(.*?\)+)|(\[.*?\]+)|(\{.*?\}+)|(<.*?>+)/g;
|
4362
|
+
goog.i18n.bidi.guardBracketInHtml = function(a, b) {
|
4363
|
+
return(void 0 === b ? goog.i18n.bidi.hasAnyRtl(a) : b) ? a.replace(goog.i18n.bidi.bracketGuardHtmlRe_, "<span dir=rtl>$&</span>") : a.replace(goog.i18n.bidi.bracketGuardHtmlRe_, "<span dir=ltr>$&</span>");
|
4364
|
+
};
|
4365
|
+
goog.i18n.bidi.guardBracketInText = function(a, b) {
|
4366
|
+
var c = (void 0 === b ? goog.i18n.bidi.hasAnyRtl(a) : b) ? goog.i18n.bidi.Format.RLM : goog.i18n.bidi.Format.LRM;
|
4367
|
+
return a.replace(goog.i18n.bidi.bracketGuardTextRe_, c + "$&" + c);
|
4368
|
+
};
|
4369
|
+
goog.i18n.bidi.enforceRtlInHtml = function(a) {
|
4370
|
+
return "<" == a.charAt(0) ? a.replace(/<\w+/, "$& dir=rtl") : "\n<span dir=rtl>" + a + "</span>";
|
4371
|
+
};
|
4372
|
+
goog.i18n.bidi.enforceRtlInText = function(a) {
|
4373
|
+
return goog.i18n.bidi.Format.RLE + a + goog.i18n.bidi.Format.PDF;
|
4374
|
+
};
|
4375
|
+
goog.i18n.bidi.enforceLtrInHtml = function(a) {
|
4376
|
+
return "<" == a.charAt(0) ? a.replace(/<\w+/, "$& dir=ltr") : "\n<span dir=ltr>" + a + "</span>";
|
4377
|
+
};
|
4378
|
+
goog.i18n.bidi.enforceLtrInText = function(a) {
|
4379
|
+
return goog.i18n.bidi.Format.LRE + a + goog.i18n.bidi.Format.PDF;
|
4380
|
+
};
|
4381
|
+
goog.i18n.bidi.dimensionsRe_ = /:\s*([.\d][.\w]*)\s+([.\d][.\w]*)\s+([.\d][.\w]*)\s+([.\d][.\w]*)/g;
|
4382
|
+
goog.i18n.bidi.leftRe_ = /left/gi;
|
4383
|
+
goog.i18n.bidi.rightRe_ = /right/gi;
|
4384
|
+
goog.i18n.bidi.tempRe_ = /%%%%/g;
|
4385
|
+
goog.i18n.bidi.mirrorCSS = function(a) {
|
4386
|
+
return a.replace(goog.i18n.bidi.dimensionsRe_, ":$1 $4 $3 $2").replace(goog.i18n.bidi.leftRe_, "%%%%").replace(goog.i18n.bidi.rightRe_, goog.i18n.bidi.LEFT).replace(goog.i18n.bidi.tempRe_, goog.i18n.bidi.RIGHT);
|
4387
|
+
};
|
4388
|
+
goog.i18n.bidi.doubleQuoteSubstituteRe_ = /([\u0591-\u05f2])"/g;
|
4389
|
+
goog.i18n.bidi.singleQuoteSubstituteRe_ = /([\u0591-\u05f2])'/g;
|
4390
|
+
goog.i18n.bidi.normalizeHebrewQuote = function(a) {
|
4391
|
+
return a.replace(goog.i18n.bidi.doubleQuoteSubstituteRe_, "$1\u05f4").replace(goog.i18n.bidi.singleQuoteSubstituteRe_, "$1\u05f3");
|
4392
|
+
};
|
4393
|
+
goog.i18n.bidi.wordSeparatorRe_ = /\s+/;
|
4394
|
+
goog.i18n.bidi.hasNumeralsRe_ = /\d/;
|
4395
|
+
goog.i18n.bidi.rtlDetectionThreshold_ = .4;
|
4396
|
+
goog.i18n.bidi.estimateDirection = function(a, b) {
|
4397
|
+
for (var c = 0, d = 0, e = !1, f = goog.i18n.bidi.stripHtmlIfNeeded_(a, b).split(goog.i18n.bidi.wordSeparatorRe_), g = 0;g < f.length;g++) {
|
4398
|
+
var h = f[g];
|
4399
|
+
goog.i18n.bidi.startsWithRtl(h) ? (c++, d++) : goog.i18n.bidi.isRequiredLtrRe_.test(h) ? e = !0 : goog.i18n.bidi.hasAnyLtr(h) ? d++ : goog.i18n.bidi.hasNumeralsRe_.test(h) && (e = !0);
|
4400
|
+
}
|
4401
|
+
return 0 == d ? e ? goog.i18n.bidi.Dir.LTR : goog.i18n.bidi.Dir.NEUTRAL : c / d > goog.i18n.bidi.rtlDetectionThreshold_ ? goog.i18n.bidi.Dir.RTL : goog.i18n.bidi.Dir.LTR;
|
4402
|
+
};
|
4403
|
+
goog.i18n.bidi.detectRtlDirectionality = function(a, b) {
|
4404
|
+
return goog.i18n.bidi.estimateDirection(a, b) == goog.i18n.bidi.Dir.RTL;
|
4405
|
+
};
|
4406
|
+
goog.i18n.bidi.setElementDirAndAlign = function(a, b) {
|
4407
|
+
a && (b = goog.i18n.bidi.toDir(b)) && (a.style.textAlign = b == goog.i18n.bidi.Dir.RTL ? goog.i18n.bidi.RIGHT : goog.i18n.bidi.LEFT, a.dir = b == goog.i18n.bidi.Dir.RTL ? "rtl" : "ltr");
|
4408
|
+
};
|
4409
|
+
goog.i18n.bidi.DirectionalString = function() {
|
4410
|
+
};
|
4411
|
+
goog.html.SafeUrl = function() {
|
4412
|
+
this.privateDoNotAccessOrElseSafeHtmlWrappedValue_ = "";
|
4413
|
+
this.SAFE_URL_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ = goog.html.SafeUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_;
|
4414
|
+
};
|
4415
|
+
goog.html.SafeUrl.INNOCUOUS_STRING = "about:invalid#zClosurez";
|
4416
|
+
goog.html.SafeUrl.prototype.implementsGoogStringTypedString = !0;
|
4417
|
+
goog.html.SafeUrl.prototype.getTypedStringValue = function() {
|
4418
|
+
return this.privateDoNotAccessOrElseSafeHtmlWrappedValue_;
|
4419
|
+
};
|
4420
|
+
goog.html.SafeUrl.prototype.implementsGoogI18nBidiDirectionalString = !0;
|
4421
|
+
goog.html.SafeUrl.prototype.getDirection = function() {
|
4422
|
+
return goog.i18n.bidi.Dir.LTR;
|
4423
|
+
};
|
4424
|
+
goog.DEBUG && (goog.html.SafeUrl.prototype.toString = function() {
|
4425
|
+
return "SafeUrl{" + this.privateDoNotAccessOrElseSafeHtmlWrappedValue_ + "}";
|
4426
|
+
});
|
4427
|
+
goog.html.SafeUrl.unwrap = function(a) {
|
4428
|
+
if (a instanceof goog.html.SafeUrl && a.constructor === goog.html.SafeUrl && a.SAFE_URL_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ === goog.html.SafeUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_) {
|
4429
|
+
return a.privateDoNotAccessOrElseSafeHtmlWrappedValue_;
|
4430
|
+
}
|
4431
|
+
goog.asserts.fail("expected object of type SafeUrl, got '" + a + "'");
|
4432
|
+
return "type_error:SafeUrl";
|
4433
|
+
};
|
4434
|
+
goog.html.SafeUrl.fromConstant = function(a) {
|
4435
|
+
return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(goog.string.Const.unwrap(a));
|
4436
|
+
};
|
4437
|
+
goog.html.SAFE_URL_PATTERN_ = /^(?:(?:https?|mailto):|[^&:/?#]*(?:[/?#]|$))/i;
|
4438
|
+
goog.html.SafeUrl.sanitize = function(a) {
|
4439
|
+
if (a instanceof goog.html.SafeUrl) {
|
4440
|
+
return a;
|
4441
|
+
}
|
4442
|
+
a = a.implementsGoogStringTypedString ? a.getTypedStringValue() : String(a);
|
4443
|
+
a = goog.html.SAFE_URL_PATTERN_.test(a) ? goog.html.SafeUrl.normalize_(a) : goog.html.SafeUrl.INNOCUOUS_STRING;
|
4444
|
+
return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(a);
|
4445
|
+
};
|
4446
|
+
goog.html.SafeUrl.normalize_ = function(a) {
|
4447
|
+
try {
|
4448
|
+
var b = encodeURI(a);
|
4449
|
+
} catch (c) {
|
4450
|
+
return goog.html.SafeUrl.INNOCUOUS_STRING;
|
4451
|
+
}
|
4452
|
+
return b.replace(goog.html.SafeUrl.NORMALIZE_MATCHER_, function(a) {
|
4453
|
+
return goog.html.SafeUrl.NORMALIZE_REPLACER_MAP_[a];
|
4454
|
+
});
|
4455
|
+
};
|
4456
|
+
goog.html.SafeUrl.NORMALIZE_MATCHER_ = /[()']|%5B|%5D|%25/g;
|
4457
|
+
goog.html.SafeUrl.NORMALIZE_REPLACER_MAP_ = {"'":"%27", "(":"%28", ")":"%29", "%5B":"[", "%5D":"]", "%25":"%"};
|
4458
|
+
goog.html.SafeUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ = {};
|
4459
|
+
goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse = function(a) {
|
4460
|
+
var b = new goog.html.SafeUrl;
|
4461
|
+
b.privateDoNotAccessOrElseSafeHtmlWrappedValue_ = a;
|
4462
|
+
return b;
|
4463
|
+
};
|
4464
|
+
goog.html.TrustedResourceUrl = function() {
|
4465
|
+
this.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_ = "";
|
4466
|
+
this.TRUSTED_RESOURCE_URL_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ = goog.html.TrustedResourceUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_;
|
4467
|
+
};
|
4468
|
+
goog.html.TrustedResourceUrl.prototype.implementsGoogStringTypedString = !0;
|
4469
|
+
goog.html.TrustedResourceUrl.prototype.getTypedStringValue = function() {
|
4470
|
+
return this.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_;
|
4471
|
+
};
|
4472
|
+
goog.html.TrustedResourceUrl.prototype.implementsGoogI18nBidiDirectionalString = !0;
|
4473
|
+
goog.html.TrustedResourceUrl.prototype.getDirection = function() {
|
4474
|
+
return goog.i18n.bidi.Dir.LTR;
|
4475
|
+
};
|
4476
|
+
goog.DEBUG && (goog.html.TrustedResourceUrl.prototype.toString = function() {
|
4477
|
+
return "TrustedResourceUrl{" + this.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_ + "}";
|
4478
|
+
});
|
4479
|
+
goog.html.TrustedResourceUrl.unwrap = function(a) {
|
4480
|
+
if (a instanceof goog.html.TrustedResourceUrl && a.constructor === goog.html.TrustedResourceUrl && a.TRUSTED_RESOURCE_URL_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ === goog.html.TrustedResourceUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_) {
|
4481
|
+
return a.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_;
|
4482
|
+
}
|
4483
|
+
goog.asserts.fail("expected object of type TrustedResourceUrl, got '" + a + "'");
|
4484
|
+
return "type_error:TrustedResourceUrl";
|
4485
|
+
};
|
4486
|
+
goog.html.TrustedResourceUrl.fromConstant = function(a) {
|
4487
|
+
return goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(goog.string.Const.unwrap(a));
|
4488
|
+
};
|
4489
|
+
goog.html.TrustedResourceUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ = {};
|
4490
|
+
goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse = function(a) {
|
4491
|
+
var b = new goog.html.TrustedResourceUrl;
|
4492
|
+
b.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_ = a;
|
4493
|
+
return b;
|
4494
|
+
};
|
4495
|
+
goog.html.SafeHtml = function() {
|
4496
|
+
this.privateDoNotAccessOrElseSafeHtmlWrappedValue_ = "";
|
4497
|
+
this.SAFE_HTML_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ = goog.html.SafeHtml.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_;
|
4498
|
+
this.dir_ = null;
|
4499
|
+
};
|
4500
|
+
goog.html.SafeHtml.prototype.implementsGoogI18nBidiDirectionalString = !0;
|
4501
|
+
goog.html.SafeHtml.prototype.getDirection = function() {
|
4502
|
+
return this.dir_;
|
4503
|
+
};
|
4504
|
+
goog.html.SafeHtml.prototype.implementsGoogStringTypedString = !0;
|
4505
|
+
goog.html.SafeHtml.prototype.getTypedStringValue = function() {
|
4506
|
+
return this.privateDoNotAccessOrElseSafeHtmlWrappedValue_;
|
4507
|
+
};
|
4508
|
+
goog.DEBUG && (goog.html.SafeHtml.prototype.toString = function() {
|
4509
|
+
return "SafeHtml{" + this.privateDoNotAccessOrElseSafeHtmlWrappedValue_ + "}";
|
4510
|
+
});
|
4511
|
+
goog.html.SafeHtml.unwrap = function(a) {
|
4512
|
+
if (a instanceof goog.html.SafeHtml && a.constructor === goog.html.SafeHtml && a.SAFE_HTML_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ === goog.html.SafeHtml.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_) {
|
4513
|
+
return a.privateDoNotAccessOrElseSafeHtmlWrappedValue_;
|
4514
|
+
}
|
4515
|
+
goog.asserts.fail("expected object of type SafeHtml, got '" + a + "'");
|
4516
|
+
return "type_error:SafeHtml";
|
4517
|
+
};
|
4518
|
+
goog.html.SafeHtml.htmlEscape = function(a) {
|
4519
|
+
if (a instanceof goog.html.SafeHtml) {
|
4520
|
+
return a;
|
4521
|
+
}
|
4522
|
+
var b = null;
|
4523
|
+
a.implementsGoogI18nBidiDirectionalString && (b = a.getDirection());
|
4524
|
+
a = a.implementsGoogStringTypedString ? a.getTypedStringValue() : String(a);
|
4525
|
+
return goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(goog.string.htmlEscape(a), b);
|
4526
|
+
};
|
4527
|
+
goog.html.SafeHtml.htmlEscapePreservingNewlines = function(a) {
|
4528
|
+
if (a instanceof goog.html.SafeHtml) {
|
4529
|
+
return a;
|
4530
|
+
}
|
4531
|
+
a = goog.html.SafeHtml.htmlEscape(a);
|
4532
|
+
return goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(goog.string.newLineToBr(goog.html.SafeHtml.unwrap(a)), a.getDirection());
|
4533
|
+
};
|
4534
|
+
goog.html.SafeHtml.htmlEscapePreservingNewlinesAndSpaces = function(a) {
|
4535
|
+
if (a instanceof goog.html.SafeHtml) {
|
4536
|
+
return a;
|
4537
|
+
}
|
4538
|
+
a = goog.html.SafeHtml.htmlEscape(a);
|
4539
|
+
return goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(goog.string.whitespaceEscape(goog.html.SafeHtml.unwrap(a)), a.getDirection());
|
4540
|
+
};
|
4541
|
+
goog.html.SafeHtml.from = goog.html.SafeHtml.htmlEscape;
|
4542
|
+
goog.html.SafeHtml.VALID_NAMES_IN_TAG_ = /^[a-zA-Z0-9-]+$/;
|
4543
|
+
goog.html.SafeHtml.URL_ATTRIBUTES_ = goog.object.createSet("action", "cite", "data", "formaction", "href", "manifest", "poster", "src");
|
4544
|
+
goog.html.SafeHtml.NOT_ALLOWED_TAG_NAMES_ = goog.object.createSet("embed", "iframe", "link", "script", "style", "template");
|
4545
|
+
goog.html.SafeHtml.create = function(a, b, c) {
|
4546
|
+
if (!goog.html.SafeHtml.VALID_NAMES_IN_TAG_.test(a)) {
|
4547
|
+
throw Error("Invalid tag name <" + a + ">.");
|
4548
|
+
}
|
4549
|
+
if (a.toLowerCase() in goog.html.SafeHtml.NOT_ALLOWED_TAG_NAMES_) {
|
4550
|
+
throw Error("Tag name <" + a + "> is not allowed for SafeHtml.");
|
4551
|
+
}
|
4552
|
+
return goog.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse(a, b, c);
|
4553
|
+
};
|
4554
|
+
goog.html.SafeHtml.getAttrNameAndValue_ = function(a, b, c) {
|
4555
|
+
if (c instanceof goog.string.Const) {
|
4556
|
+
c = goog.string.Const.unwrap(c);
|
4557
|
+
} else {
|
4558
|
+
if ("style" == b.toLowerCase()) {
|
4559
|
+
c = goog.html.SafeHtml.getStyleValue_(c);
|
4560
|
+
} else {
|
4561
|
+
if (/^on/i.test(b)) {
|
4562
|
+
throw Error('Attribute "' + b + '" requires goog.string.Const value, "' + c + '" given.');
|
4563
|
+
}
|
4564
|
+
if (b.toLowerCase() in goog.html.SafeHtml.URL_ATTRIBUTES_) {
|
4565
|
+
if (c instanceof goog.html.TrustedResourceUrl) {
|
4566
|
+
c = goog.html.TrustedResourceUrl.unwrap(c);
|
4567
|
+
} else {
|
4568
|
+
if (c instanceof goog.html.SafeUrl) {
|
4569
|
+
c = goog.html.SafeUrl.unwrap(c);
|
4570
|
+
} else {
|
4571
|
+
throw Error('Attribute "' + b + '" on tag "' + a + '" requires goog.html.SafeUrl or goog.string.Const value, "' + c + '" given.');
|
4572
|
+
}
|
4573
|
+
}
|
4574
|
+
}
|
4575
|
+
}
|
4576
|
+
}
|
4577
|
+
c.implementsGoogStringTypedString && (c = c.getTypedStringValue());
|
4578
|
+
goog.asserts.assert(goog.isString(c) || goog.isNumber(c), "String or number value expected, got " + typeof c + " with value: " + c);
|
4579
|
+
return b + '="' + goog.string.htmlEscape(String(c)) + '"';
|
4580
|
+
};
|
4581
|
+
goog.html.SafeHtml.getStyleValue_ = function(a) {
|
4582
|
+
if (!goog.isObject(a)) {
|
4583
|
+
throw Error('The "style" attribute requires goog.html.SafeStyle or map of style properties, ' + typeof a + " given: " + a);
|
4584
|
+
}
|
4585
|
+
a instanceof goog.html.SafeStyle || (a = goog.html.SafeStyle.create(a));
|
4586
|
+
return goog.html.SafeStyle.unwrap(a);
|
4587
|
+
};
|
4588
|
+
goog.html.SafeHtml.createWithDir = function(a, b, c, d) {
|
4589
|
+
b = goog.html.SafeHtml.create(b, c, d);
|
4590
|
+
b.dir_ = a;
|
4591
|
+
return b;
|
4592
|
+
};
|
4593
|
+
goog.html.SafeHtml.concat = function(a) {
|
4594
|
+
var b = goog.i18n.bidi.Dir.NEUTRAL, c = "", d = function(a) {
|
4595
|
+
goog.isArray(a) ? goog.array.forEach(a, d) : (a = goog.html.SafeHtml.htmlEscape(a), c += goog.html.SafeHtml.unwrap(a), a = a.getDirection(), b == goog.i18n.bidi.Dir.NEUTRAL ? b = a : a != goog.i18n.bidi.Dir.NEUTRAL && b != a && (b = null));
|
4596
|
+
};
|
4597
|
+
goog.array.forEach(arguments, d);
|
4598
|
+
return goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(c, b);
|
4599
|
+
};
|
4600
|
+
goog.html.SafeHtml.concatWithDir = function(a, b) {
|
4601
|
+
var c = goog.html.SafeHtml.concat(goog.array.slice(arguments, 1));
|
4602
|
+
c.dir_ = a;
|
4603
|
+
return c;
|
4604
|
+
};
|
4605
|
+
goog.html.SafeHtml.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ = {};
|
4606
|
+
goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse = function(a, b) {
|
4607
|
+
var c = new goog.html.SafeHtml;
|
4608
|
+
c.privateDoNotAccessOrElseSafeHtmlWrappedValue_ = a;
|
4609
|
+
c.dir_ = b;
|
4610
|
+
return c;
|
4611
|
+
};
|
4612
|
+
goog.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse = function(a, b, c) {
|
4613
|
+
var d = null, e = "<" + a;
|
4614
|
+
if (b) {
|
4615
|
+
for (var f in b) {
|
4616
|
+
if (!goog.html.SafeHtml.VALID_NAMES_IN_TAG_.test(f)) {
|
4617
|
+
throw Error('Invalid attribute name "' + f + '".');
|
4618
|
+
}
|
4619
|
+
var g = b[f];
|
4620
|
+
goog.isDefAndNotNull(g) && (e += " " + goog.html.SafeHtml.getAttrNameAndValue_(a, f, g));
|
4621
|
+
}
|
4622
|
+
}
|
4623
|
+
goog.isDef(c) ? goog.isArray(c) || (c = [c]) : c = [];
|
4624
|
+
goog.dom.tags.isVoidTag(a.toLowerCase()) ? (goog.asserts.assert(!c.length, "Void tag <" + a + "> does not allow content."), e += ">") : (d = goog.html.SafeHtml.concat(c), e += ">" + goog.html.SafeHtml.unwrap(d) + "</" + a + ">", d = d.getDirection());
|
4625
|
+
(a = b && b.dir) && (d = /^(ltr|rtl|auto)$/i.test(a) ? goog.i18n.bidi.Dir.NEUTRAL : null);
|
4626
|
+
return goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(e, d);
|
4627
|
+
};
|
4628
|
+
goog.html.SafeHtml.EMPTY = goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse("", goog.i18n.bidi.Dir.NEUTRAL);
|
4629
|
+
goog.debug.Formatter = function(a) {
|
4630
|
+
this.prefix_ = a || "";
|
4631
|
+
this.startTimeProvider_ = goog.debug.RelativeTimeProvider.getDefaultInstance();
|
4632
|
+
};
|
4633
|
+
goog.debug.Formatter.prototype.appendNewline = !0;
|
4634
|
+
goog.debug.Formatter.prototype.showAbsoluteTime = !0;
|
4635
|
+
goog.debug.Formatter.prototype.showRelativeTime = !0;
|
4636
|
+
goog.debug.Formatter.prototype.showLoggerName = !0;
|
4637
|
+
goog.debug.Formatter.prototype.showExceptionText = !1;
|
4638
|
+
goog.debug.Formatter.prototype.showSeverityLevel = !1;
|
4639
|
+
goog.debug.Formatter.prototype.setStartTimeProvider = function(a) {
|
4640
|
+
this.startTimeProvider_ = a;
|
4641
|
+
};
|
4642
|
+
goog.debug.Formatter.prototype.getStartTimeProvider = function() {
|
4643
|
+
return this.startTimeProvider_;
|
4644
|
+
};
|
4645
|
+
goog.debug.Formatter.prototype.resetRelativeTimeStart = function() {
|
4646
|
+
this.startTimeProvider_.reset();
|
4647
|
+
};
|
4648
|
+
goog.debug.Formatter.getDateTimeStamp_ = function(a) {
|
4649
|
+
a = new Date(a.getMillis());
|
4650
|
+
return goog.debug.Formatter.getTwoDigitString_(a.getFullYear() - 2E3) + goog.debug.Formatter.getTwoDigitString_(a.getMonth() + 1) + goog.debug.Formatter.getTwoDigitString_(a.getDate()) + " " + goog.debug.Formatter.getTwoDigitString_(a.getHours()) + ":" + goog.debug.Formatter.getTwoDigitString_(a.getMinutes()) + ":" + goog.debug.Formatter.getTwoDigitString_(a.getSeconds()) + "." + goog.debug.Formatter.getTwoDigitString_(Math.floor(a.getMilliseconds() / 10));
|
4651
|
+
};
|
4652
|
+
goog.debug.Formatter.getTwoDigitString_ = function(a) {
|
4653
|
+
return 10 > a ? "0" + a : String(a);
|
4654
|
+
};
|
4655
|
+
goog.debug.Formatter.getRelativeTime_ = function(a, b) {
|
4656
|
+
var c = (a.getMillis() - b) / 1E3, d = c.toFixed(3), e = 0;
|
4657
|
+
if (1 > c) {
|
4658
|
+
e = 2;
|
4659
|
+
} else {
|
4660
|
+
for (;100 > c;) {
|
4661
|
+
e++, c *= 10;
|
4662
|
+
}
|
4663
|
+
}
|
4664
|
+
for (;0 < e--;) {
|
4665
|
+
d = " " + d;
|
4666
|
+
}
|
4667
|
+
return d;
|
4668
|
+
};
|
4669
|
+
goog.debug.HtmlFormatter = function(a) {
|
4670
|
+
goog.debug.Formatter.call(this, a);
|
4671
|
+
};
|
4672
|
+
goog.inherits(goog.debug.HtmlFormatter, goog.debug.Formatter);
|
4673
|
+
goog.debug.HtmlFormatter.prototype.showExceptionText = !0;
|
4674
|
+
goog.debug.HtmlFormatter.prototype.formatRecord = function(a) {
|
4675
|
+
return a ? this.formatRecordAsHtml(a).getTypedStringValue() : "";
|
4676
|
+
};
|
4677
|
+
goog.debug.HtmlFormatter.prototype.formatRecordAsHtml = function(a) {
|
4678
|
+
var b;
|
4679
|
+
switch(a.getLevel().value) {
|
4680
|
+
case goog.debug.Logger.Level.SHOUT.value:
|
4681
|
+
b = "dbg-sh";
|
4682
|
+
break;
|
4683
|
+
case goog.debug.Logger.Level.SEVERE.value:
|
4684
|
+
b = "dbg-sev";
|
4685
|
+
break;
|
4686
|
+
case goog.debug.Logger.Level.WARNING.value:
|
4687
|
+
b = "dbg-w";
|
4688
|
+
break;
|
4689
|
+
case goog.debug.Logger.Level.INFO.value:
|
4690
|
+
b = "dbg-i";
|
4691
|
+
break;
|
4692
|
+
default:
|
4693
|
+
b = "dbg-f";
|
4694
|
+
}
|
4695
|
+
var c = [];
|
4696
|
+
c.push(this.prefix_, " ");
|
4697
|
+
this.showAbsoluteTime && c.push("[", goog.debug.Formatter.getDateTimeStamp_(a), "] ");
|
4698
|
+
this.showRelativeTime && c.push("[", goog.debug.Formatter.getRelativeTime_(a, this.startTimeProvider_.get()), "s] ");
|
4699
|
+
this.showLoggerName && c.push("[", a.getLoggerName(), "] ");
|
4700
|
+
this.showSeverityLevel && c.push("[", a.getLevel().name, "] ");
|
4701
|
+
var c = goog.html.SafeHtml.htmlEscapePreservingNewlinesAndSpaces(c.join("")), d = goog.html.SafeHtml.EMPTY;
|
4702
|
+
this.showExceptionText && a.getException() && (d = goog.html.SafeHtml.concat(goog.html.SafeHtml.create("br"), goog.html.SafeHtml.htmlEscapePreservingNewlinesAndSpaces(a.getExceptionText() || "")));
|
4703
|
+
a = goog.html.SafeHtml.htmlEscapePreservingNewlinesAndSpaces(a.getMessage());
|
4704
|
+
b = goog.html.SafeHtml.create("span", {"class":b}, goog.html.SafeHtml.concat(a, d));
|
4705
|
+
return this.appendNewline ? goog.html.SafeHtml.concat(c, b, goog.html.SafeHtml.create("br")) : goog.html.SafeHtml.concat(c, b);
|
4706
|
+
};
|
4707
|
+
goog.debug.TextFormatter = function(a) {
|
4708
|
+
goog.debug.Formatter.call(this, a);
|
4709
|
+
};
|
4710
|
+
goog.inherits(goog.debug.TextFormatter, goog.debug.Formatter);
|
4711
|
+
goog.debug.TextFormatter.prototype.formatRecord = function(a) {
|
4712
|
+
var b = [];
|
4713
|
+
b.push(this.prefix_, " ");
|
4714
|
+
this.showAbsoluteTime && b.push("[", goog.debug.Formatter.getDateTimeStamp_(a), "] ");
|
4715
|
+
this.showRelativeTime && b.push("[", goog.debug.Formatter.getRelativeTime_(a, this.startTimeProvider_.get()), "s] ");
|
4716
|
+
this.showLoggerName && b.push("[", a.getLoggerName(), "] ");
|
4717
|
+
this.showSeverityLevel && b.push("[", a.getLevel().name, "] ");
|
4718
|
+
b.push(a.getMessage());
|
4719
|
+
this.showExceptionText && a.getException() && b.push("\n", a.getExceptionText());
|
4720
|
+
this.appendNewline && b.push("\n");
|
4721
|
+
return b.join("");
|
4722
|
+
};
|
4723
|
+
goog.dom.safe = {};
|
4724
|
+
goog.dom.safe.setInnerHtml = function(a, b) {
|
4725
|
+
a.innerHTML = goog.html.SafeHtml.unwrap(b);
|
4726
|
+
};
|
4727
|
+
goog.dom.safe.setOuterHtml = function(a, b) {
|
4728
|
+
a.outerHTML = goog.html.SafeHtml.unwrap(b);
|
4729
|
+
};
|
4730
|
+
goog.dom.safe.documentWrite = function(a, b) {
|
4731
|
+
a.write(goog.html.SafeHtml.unwrap(b));
|
4732
|
+
};
|
4733
|
+
goog.dom.safe.setAnchorHref = function(a, b) {
|
4734
|
+
var c;
|
4735
|
+
c = b instanceof goog.html.SafeUrl ? b : goog.html.SafeUrl.sanitize(b);
|
4736
|
+
a.href = goog.html.SafeUrl.unwrap(c);
|
4737
|
+
};
|
4738
|
+
goog.dom.safe.setLocationHref = function(a, b) {
|
4739
|
+
var c;
|
4740
|
+
c = b instanceof goog.html.SafeUrl ? b : goog.html.SafeUrl.sanitize(b);
|
4741
|
+
a.href = goog.html.SafeUrl.unwrap(c);
|
4742
|
+
};
|
4134
4743
|
goog.dom.BrowserFeature = {CAN_ADD_NAME_OR_TYPE_ATTRIBUTES:!goog.userAgent.IE || goog.userAgent.isDocumentModeOrHigher(9), CAN_USE_CHILDREN_ATTRIBUTE:!goog.userAgent.GECKO && !goog.userAgent.IE || goog.userAgent.IE && goog.userAgent.isDocumentModeOrHigher(9) || goog.userAgent.GECKO && goog.userAgent.isVersionOrHigher("1.9.1"), CAN_USE_INNER_TEXT:goog.userAgent.IE && !goog.userAgent.isVersionOrHigher("9"), CAN_USE_PARENT_ELEMENT_PROPERTY:goog.userAgent.IE || goog.userAgent.OPERA || goog.userAgent.WEBKIT,
|
4135
4744
|
INNER_HTML_NEEDS_SCOPED_ELEMENT:goog.userAgent.IE, LEGACY_IE_RANGES:goog.userAgent.IE && !goog.userAgent.isDocumentModeOrHigher(9)};
|
4136
4745
|
goog.dom.TagName = {A:"A", ABBR:"ABBR", ACRONYM:"ACRONYM", ADDRESS:"ADDRESS", APPLET:"APPLET", AREA:"AREA", ARTICLE:"ARTICLE", ASIDE:"ASIDE", AUDIO:"AUDIO", B:"B", BASE:"BASE", BASEFONT:"BASEFONT", BDI:"BDI", BDO:"BDO", BIG:"BIG", BLOCKQUOTE:"BLOCKQUOTE", BODY:"BODY", BR:"BR", BUTTON:"BUTTON", CANVAS:"CANVAS", CAPTION:"CAPTION", CENTER:"CENTER", CITE:"CITE", CODE:"CODE", COL:"COL", COLGROUP:"COLGROUP", COMMAND:"COMMAND", DATA:"DATA", DATALIST:"DATALIST", DD:"DD", DEL:"DEL", DETAILS:"DETAILS", DFN:"DFN",
|
@@ -4882,17 +5491,17 @@ goog.dom.isNodeList = function(a) {
|
|
4882
5491
|
}
|
4883
5492
|
return!1;
|
4884
5493
|
};
|
4885
|
-
goog.dom.getAncestorByTagNameAndClass = function(a, b, c) {
|
5494
|
+
goog.dom.getAncestorByTagNameAndClass = function(a, b, c, d) {
|
4886
5495
|
if (!b && !c) {
|
4887
5496
|
return null;
|
4888
5497
|
}
|
4889
|
-
var
|
5498
|
+
var e = b ? b.toUpperCase() : null;
|
4890
5499
|
return goog.dom.getAncestor(a, function(a) {
|
4891
|
-
return(!
|
4892
|
-
}, !0);
|
5500
|
+
return(!e || a.nodeName == e) && (!c || goog.isString(a.className) && goog.array.contains(a.className.split(/\s+/), c));
|
5501
|
+
}, !0, d);
|
4893
5502
|
};
|
4894
|
-
goog.dom.getAncestorByClass = function(a, b) {
|
4895
|
-
return goog.dom.getAncestorByTagNameAndClass(a, null, b);
|
5503
|
+
goog.dom.getAncestorByClass = function(a, b, c) {
|
5504
|
+
return goog.dom.getAncestorByTagNameAndClass(a, null, b, c);
|
4896
5505
|
};
|
4897
5506
|
goog.dom.getAncestor = function(a, b, c, d) {
|
4898
5507
|
c || (a = a.parentNode);
|
@@ -5853,11 +6462,13 @@ goog.debug.DivConsole.prototype.setCapturing = function(a) {
|
|
5853
6462
|
}
|
5854
6463
|
};
|
5855
6464
|
goog.debug.DivConsole.prototype.addLogRecord = function(a) {
|
5856
|
-
|
5857
|
-
|
5858
|
-
|
5859
|
-
|
5860
|
-
|
6465
|
+
if (a) {
|
6466
|
+
var b = 100 >= this.element_.scrollHeight - this.element_.scrollTop - this.element_.clientHeight, c = this.elementOwnerDocument_.createElement("div");
|
6467
|
+
c.className = "logmsg";
|
6468
|
+
goog.dom.safe.setInnerHtml(c, this.formatter_.formatRecordAsHtml(a));
|
6469
|
+
this.element_.appendChild(c);
|
6470
|
+
b && (this.element_.scrollTop = this.element_.scrollHeight);
|
6471
|
+
}
|
5861
6472
|
};
|
5862
6473
|
goog.debug.DivConsole.prototype.getFormatter = function() {
|
5863
6474
|
return this.formatter_;
|
@@ -5871,7 +6482,7 @@ goog.debug.DivConsole.prototype.addSeparator = function() {
|
|
5871
6482
|
this.element_.appendChild(a);
|
5872
6483
|
};
|
5873
6484
|
goog.debug.DivConsole.prototype.clear = function() {
|
5874
|
-
this.element_.
|
6485
|
+
this.element_ && goog.dom.safe.setInnerHtml(this.element_, goog.html.SafeHtml.EMPTY);
|
5875
6486
|
};
|
5876
6487
|
goog.log = {};
|
5877
6488
|
goog.log.ENABLED = goog.debug.LOGGING_ENABLED;
|
@@ -5926,7 +6537,7 @@ goog.userAgent.product.init_ = function() {
|
|
5926
6537
|
goog.userAgent.product.detectedChrome_ = !1;
|
5927
6538
|
goog.userAgent.product.detectedSafari_ = !1;
|
5928
6539
|
var a = goog.userAgent.getUserAgentString();
|
5929
|
-
a && (-1 != a.indexOf("Firefox") ? goog.userAgent.product.detectedFirefox_ = !0 : -1 != a.indexOf("Camino") ? goog.userAgent.product.detectedCamino_ = !0 : -1 != a.indexOf("
|
6540
|
+
a && (-1 != a.indexOf("Firefox") ? goog.userAgent.product.detectedFirefox_ = !0 : -1 != a.indexOf("Camino") ? goog.userAgent.product.detectedCamino_ = !0 : -1 != a.indexOf("iPad") ? goog.userAgent.product.detectedIpad_ = !0 : -1 != a.indexOf("iPhone") || -1 != a.indexOf("iPod") ? goog.userAgent.product.detectedIphone_ = !0 : -1 != a.indexOf("Chrome") ? goog.userAgent.product.detectedChrome_ = !0 : -1 != a.indexOf("Android") ? goog.userAgent.product.detectedAndroid_ = !0 : -1 != a.indexOf("Safari") &&
|
5930
6541
|
(goog.userAgent.product.detectedSafari_ = !0));
|
5931
6542
|
};
|
5932
6543
|
goog.userAgent.product.PRODUCT_KNOWN_ || goog.userAgent.product.init_();
|