yellow-brick-road 0.1.2 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (109) hide show
  1. data/README.rst +42 -20
  2. data/lib/generators/templates/yellow_brick_road.rb.erb +19 -0
  3. data/lib/generators/yellow_brick_road/install_generator.rb +14 -0
  4. data/lib/yellow-brick-road/config.rb +41 -8
  5. data/lib/yellow-brick-road/directive_processor.rb +6 -5
  6. data/lib/yellow-brick-road/engine.rb +2 -3
  7. data/lib/yellow-brick-road/soy_processor.rb +1 -1
  8. data/lib/yellow-brick-road/version.rb +1 -1
  9. data/test/dummy/app/assets/javascripts/closure-deps.js +1 -1
  10. data/test/dummy/config/initializers/yellow_brick_road.rb +18 -1
  11. data/test/dummy/log/development.log +2208 -0
  12. data/test/dummy/tmp/cache/assets/C33/E00/sprockets%2F50c54266987e056bca666f8951752841 +2556 -0
  13. data/test/dummy/tmp/cache/assets/C48/990/sprockets%2F182c7921a46c3b8603c7f5595a111407 +823 -0
  14. data/test/dummy/tmp/cache/assets/C53/B40/sprockets%2F48cf0c035092dc945559526a279061c6 +204 -0
  15. data/test/dummy/tmp/cache/assets/C60/DB0/sprockets%2F3f00684578f2a3246581db667309ed89 +187 -0
  16. data/test/dummy/tmp/cache/assets/C60/E40/sprockets%2F3c5422f721521f492a5f02ca00b70009 +457 -0
  17. data/test/dummy/tmp/cache/assets/C73/DE0/sprockets%2F21f1f4574326846114a3c106873cebc3 +0 -0
  18. data/test/dummy/tmp/cache/assets/C7E/9F0/sprockets%2F89862076204c62c4593ac20de32da909 +4 -4
  19. data/test/dummy/tmp/cache/assets/C80/6F0/sprockets%2F56459a0713f8610d7d261f8be93073a2 +115 -0
  20. data/test/dummy/tmp/cache/assets/C8D/E10/sprockets%2F34b84bc4732937f885707002eda3896e +511 -0
  21. data/test/dummy/tmp/cache/assets/C93/CB0/sprockets%2F539b403b24833ca478a6f5877f37687c +239 -0
  22. data/test/dummy/tmp/cache/assets/C9A/C70/sprockets%2F10933dc6d342f604514713510b9ef0ab +806 -0
  23. data/test/dummy/tmp/cache/assets/CA0/7C0/sprockets%2Ff591bc0af8f085501241305c04907d3e +590 -0
  24. data/test/dummy/tmp/cache/assets/CA1/4A0/sprockets%2F5a9ad311e7d225b530b597041714b1e9 +2539 -0
  25. data/test/dummy/tmp/cache/assets/CA7/310/sprockets%2F45664cf816315200b574e029fde6f10a +0 -0
  26. data/test/dummy/tmp/cache/assets/CA7/A80/sprockets%2F1f32590957635a5a4f35442bc22f4ca4 +0 -0
  27. data/test/dummy/tmp/cache/assets/CAE/1D0/sprockets%2F2e62c7733d38a817a1532a744c6287bd +72 -0
  28. data/test/dummy/tmp/cache/assets/CB2/3C0/sprockets%2F9c35c290501a896b82c31448a39f3d5d +142 -0
  29. data/test/dummy/tmp/cache/assets/CB3/F20/sprockets%2F558b00e493fb501f7d95761e7eb40273 +2539 -0
  30. data/test/dummy/tmp/cache/assets/CBE/550/sprockets%2Fd680cac830e0b3408ba910f0b0421147 +2 -2
  31. data/test/dummy/tmp/cache/assets/CCD/480/sprockets%2Ffe7e11511634a2d03e1a20980b4593cf +0 -0
  32. data/test/dummy/tmp/cache/assets/CD0/080/sprockets%2Ffd5cbb87741244521d013d11c55573fa +204 -0
  33. data/test/dummy/tmp/cache/assets/CD2/020/sprockets%2Ff97740ba22118a2c91e992aac041843b +811 -0
  34. data/test/dummy/tmp/cache/assets/CD8/D90/sprockets%2F55dd841661d646f0024261a08ecf8ec0 +823 -0
  35. data/test/dummy/tmp/cache/assets/CE3/0D0/sprockets%2F301f97a178fd839a81bd663a6e22b616 +811 -0
  36. data/test/dummy/tmp/cache/assets/CE4/330/sprockets%2Fbd23466639af99164ab8e1c93721f14b +127 -0
  37. data/test/dummy/tmp/cache/assets/CE6/8A0/sprockets%2F3c0e7c5fa31563c8e820d6771e09918d +103 -0
  38. data/test/dummy/tmp/cache/assets/CEB/120/sprockets%2F857a0dde6829f7a27b93a840e1c60469 +522 -0
  39. data/test/dummy/tmp/cache/assets/CEE/CF0/sprockets%2F376f94b987d8156056c4e1d38ec06bf0 +0 -0
  40. data/test/dummy/tmp/cache/assets/CF2/C10/sprockets%2Fc64ef8a9dd0a1c3101d662750105c11a +806 -0
  41. data/test/dummy/tmp/cache/assets/CF3/CD0/sprockets%2F4bb42a5a6b504190f10d20b1c5f93d54 +1529 -0
  42. data/test/dummy/tmp/cache/assets/CF6/890/sprockets%2F36007a87f140155b5a04f2ca6b262dcc +494 -0
  43. data/test/dummy/tmp/cache/assets/CF6/9D0/sprockets%2F34b7199e9d33994c8ec7a442d60ca985 +173 -0
  44. data/test/dummy/tmp/cache/assets/CFA/A90/sprockets%2F901ba405a6d6747f6412ed4d0e0ac620 +256 -0
  45. data/test/dummy/tmp/cache/assets/CFC/E70/sprockets%2F8ee639668b5f0e629fbe0d62d1394689 +173 -0
  46. data/test/dummy/tmp/cache/assets/D04/1B0/sprockets%2F418f2b3b6b08b320f6db268a0991c54c +0 -0
  47. data/test/dummy/tmp/cache/assets/D05/920/sprockets%2F909507434dcc270db4853e4c147f0aac +5 -4
  48. data/test/dummy/tmp/cache/assets/D07/DB0/sprockets%2F0c17d7dac64290e385c91eb6f1570b31 +511 -0
  49. data/test/dummy/tmp/cache/assets/D07/EE0/sprockets%2F4999982b09e0b786894fce44f5d783cc +1371 -0
  50. data/test/dummy/tmp/cache/assets/D09/380/sprockets%2F14383e18fa2faac6b561a29d8e132863 +0 -0
  51. data/test/dummy/tmp/cache/assets/D0D/200/sprockets%2F545a7e34cce1d4272d83d58fd4215d42 +1277 -0
  52. data/test/dummy/tmp/cache/assets/D0E/870/sprockets%2F84996444f4f1f3fdc0248131cfb1a3b6 +794 -0
  53. data/test/dummy/tmp/cache/assets/D15/F60/sprockets%2Fa28394e3f80365b5bc86794dd46daa22 +0 -0
  54. data/test/dummy/tmp/cache/assets/D18/950/sprockets%2Fcf650d67c5d431ffdb38552e562299b2 +474 -0
  55. data/test/dummy/tmp/cache/assets/D18/E10/sprockets%2Fec7c58f640556b401fcd66528352dc9d +474 -0
  56. data/test/dummy/tmp/cache/assets/D20/660/sprockets%2F0d2875475ced01df962f3d758cda7792 +103 -0
  57. data/test/dummy/tmp/cache/assets/D22/AB0/sprockets%2F0b08e7f81651aaf739a93d61ae99779c +283 -0
  58. data/test/dummy/tmp/cache/assets/D2E/B20/sprockets%2Feed5412a17a52b1a335925e2af1f75d3 +0 -0
  59. data/test/dummy/tmp/cache/assets/D36/700/sprockets%2Fd219bf9db2eacc105bb294755093a437 +505 -0
  60. data/test/dummy/tmp/cache/assets/D3B/A10/sprockets%2Fcf38b51682d84a04da7b8a7313de52c6 +207 -0
  61. data/test/dummy/tmp/cache/assets/D3C/0E0/sprockets%2Fe9d7aba138d602c4a6ac701bc9615977 +505 -0
  62. data/test/dummy/tmp/cache/assets/D3E/FF0/sprockets%2F6bd8ccd3e02f397c20f349d5c0960e51 +0 -0
  63. data/test/dummy/tmp/cache/assets/D41/B30/sprockets%2Fba1b93913dd01d83ac9a96df334456f8 +0 -0
  64. data/test/dummy/tmp/cache/assets/D41/DA0/sprockets%2Fe8d00810698a9fcee032022fefd084f7 +0 -0
  65. data/test/dummy/tmp/cache/assets/D44/CF0/sprockets%2Ffa31a45f04884493c909c5a67fcbdf23 +1371 -0
  66. data/test/dummy/tmp/cache/assets/D47/BE0/sprockets%2F0b5ebdf6dec160a264698e7f745061e8 +142 -0
  67. data/test/dummy/tmp/cache/assets/D4C/F30/sprockets%2Ff90155c10f59a3fe44959ac09bf817fe +2556 -0
  68. data/test/dummy/tmp/cache/assets/D4E/7C0/sprockets%2Ff01b58512d01eda23fd5cb23a2b28b60 +1529 -0
  69. data/test/dummy/tmp/cache/assets/D4E/860/sprockets%2F86eed0c77c47d0970345bbabb58d8939 +1277 -0
  70. data/test/dummy/tmp/cache/assets/D4E/C30/sprockets%2F52420c10c73ca310d026565eafdadb4e +1545 -0
  71. data/test/dummy/tmp/cache/assets/D4E/F60/sprockets%2F9893a3c5aeb1a9e77469f4751b4d3c3f +115 -0
  72. data/test/dummy/tmp/cache/assets/D4F/E60/sprockets%2F17ee65de1f78c3dd5c165a9867e810b6 +165 -0
  73. data/test/dummy/tmp/cache/assets/D57/0D0/sprockets%2Fa29e6e8106d9d5ed1e2889126cfbf877 +300 -0
  74. data/test/dummy/tmp/cache/assets/D5C/650/sprockets%2Fe1c381da3cc213a639e956ae3315a2bd +607 -0
  75. data/test/dummy/tmp/cache/assets/D61/860/sprockets%2Fbf032a3b4aad2c2e25704e65c966cf45 +794 -0
  76. data/test/dummy/tmp/cache/assets/D63/B20/sprockets%2F31fc70ce66bb80fb9421be34eb3b0287 +0 -0
  77. data/test/dummy/tmp/cache/assets/D64/D60/sprockets%2Fa544ea03bf0a45948a053ba76ec2a79f +239 -0
  78. data/test/dummy/tmp/cache/assets/D6B/F90/sprockets%2F66636712ecb1fcc777dccf7643a0e1b1 +127 -0
  79. data/test/dummy/tmp/cache/assets/D6E/AD0/sprockets%2Fc91cdc6a72c729d7a64119198b3d2eab +0 -0
  80. data/test/dummy/tmp/cache/assets/D6F/140/sprockets%2F9ddc51f4388dd5243a28dba1ce47572b +53 -0
  81. data/test/dummy/tmp/cache/assets/D72/800/sprockets%2F92baa375d54e16fe0a5c7f079a1ce992 +165 -0
  82. data/test/dummy/tmp/cache/assets/D74/220/sprockets%2F3f888bda53179cb945eab35fbd31a708 +53 -0
  83. data/test/dummy/tmp/cache/assets/D78/5F0/sprockets%2F638ed6af667d4fc5147f72ff34aa2d33 +0 -0
  84. data/test/dummy/tmp/cache/assets/D7D/640/sprockets%2F95a7c5580f957c31e1ab9d0773ed5fde +607 -0
  85. data/test/dummy/tmp/cache/assets/D84/210/sprockets%2Fabd0103ccec2b428ac62c94e4c40b384 +6 -5
  86. data/test/dummy/tmp/cache/assets/D89/020/sprockets%2Fa06df6166e70324e712e54b1cafca0ae +187 -0
  87. data/test/dummy/tmp/cache/assets/D8A/9F0/sprockets%2Fc06547ca33ee3d03be14ce045ae1c9e2 +207 -0
  88. data/test/dummy/tmp/cache/assets/D9E/B80/sprockets%2F9561df1d45c7ff4aa8ac3e2df0c99121 +0 -0
  89. data/test/dummy/tmp/cache/assets/DA3/F30/sprockets%2Fe015d6ccdfcf022e47c83d7906f728ae +457 -0
  90. data/test/dummy/tmp/cache/assets/DAE/190/sprockets%2F433c7b21968be8d1f9bfdbdf7a637c57 +0 -0
  91. data/test/dummy/tmp/cache/assets/DB3/600/sprockets%2F9b70ae73f15ba693886eeef4eb5d6c75 +0 -0
  92. data/test/dummy/tmp/cache/assets/DB4/510/sprockets%2F29cdae8e29c88fd9ddbd4831419560fe +1260 -0
  93. data/test/dummy/tmp/cache/assets/DC1/4A0/sprockets%2F0b63dfcf163f2faeb612724eb4545bcc +1354 -0
  94. data/test/dummy/tmp/cache/assets/DC4/C10/sprockets%2Fcf48f4cbad3db33146eab4c577c1d209 +300 -0
  95. data/test/dummy/tmp/cache/assets/DC4/CA0/sprockets%2Fd0da8a60ea4dc16b9fd3e2a50d88633c +0 -0
  96. data/test/dummy/tmp/cache/assets/DC7/8C0/sprockets%2F1ad68dcc9ef598d3811ba2ac5c0ea182 +1354 -0
  97. data/test/dummy/tmp/cache/assets/DC7/C00/sprockets%2Fba755ff3a81c3192f0e45a4f7c0c7dcb +0 -0
  98. data/test/dummy/tmp/cache/assets/DCA/760/sprockets%2F717c4cea10bf601090ffdfe4e668e4cb +283 -0
  99. data/test/dummy/tmp/cache/assets/DCA/DE0/sprockets%2F51dcced9ec2b3cd4b1cc2949f860c361 +590 -0
  100. data/test/dummy/tmp/cache/assets/DD7/E70/sprockets%2F2595d8c8d1d5f4deb096247fb3bfc7ab +256 -0
  101. data/test/dummy/tmp/cache/assets/DE1/9D0/sprockets%2F8befd77af580ee16ec42ec95b1766ff3 +1545 -0
  102. data/test/dummy/tmp/cache/assets/E00/D80/sprockets%2F9debc27161f7bccf2d84a36b8c36c4bf +522 -0
  103. data/test/dummy/tmp/cache/assets/E00/E60/sprockets%2Fac159b94b0a6d621e4f6cde9b4de87bb +0 -0
  104. data/test/dummy/tmp/cache/assets/E04/890/sprockets%2F2f5173deea6c795b8fdde723bb4b63af +0 -0
  105. data/test/dummy/tmp/cache/assets/E1B/D00/sprockets%2F886dff4afe55f9d3f8abe434f2689add +72 -0
  106. data/test/dummy/tmp/cache/assets/E1B/F20/sprockets%2Fa4bbc04eb83ebf94fd8134c3abd220dd +494 -0
  107. data/test/dummy/tmp/cache/assets/E71/0C0/sprockets%2F5ffdc0daa0a1f9638c787897ceefcdee +1260 -0
  108. metadata +186 -10
  109. data/test/dummy/tmp/pids/server.pid +0 -1
@@ -0,0 +1,1545 @@
1
+ o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1325538161.3672802: @value{I"
2
+ class:EFI"BundledAsset;
3
+ FI"id;
4
+ F"%860faa559eddc91938407118701c3e93I"logical_path;
5
+ F"closure/goog/base.jsI"
6
+ F"e/Volumes/Development/dev-web/closure-library-wrapper/vendor/closure-library/closure/goog/base.jsI"content_type;
7
+ FI"application/javascript;
8
+ FI"
9
+ mtime;
10
+ FI"2012-01-02T16:18:51+00:00;
11
+ FI" body;
12
+ FI"{�// Copyright 2006 The Closure Library Authors. All Rights Reserved.
13
+ //
14
+ // Licensed under the Apache License, Version 2.0 (the "License");
15
+ // you may not use this file except in compliance with the License.
16
+ // You may obtain a copy of the License at
17
+ //
18
+ // http://www.apache.org/licenses/LICENSE-2.0
19
+ //
20
+ // Unless required by applicable law or agreed to in writing, software
21
+ // distributed under the License is distributed on an "AS-IS" BASIS,
22
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
23
+ // See the License for the specific language governing permissions and
24
+ // limitations under the License.
25
+
26
+ /**
27
+ * @fileoverview Bootstrap for the Google JS Library (Closure).
28
+ *
29
+ * In uncompiled mode base.js will write out Closure's deps file, unless the
30
+ * global <code>CLOSURE_NO_DEPS</code> is set to true. This allows projects to
31
+ * include their own deps file(s) from different locations.
32
+ *
33
+ */
34
+
35
+
36
+ /**
37
+ * @define {boolean} Overridden to true by the compiler when --closure_pass
38
+ * or --mark_as_compiled is specified.
39
+ */
40
+
41
+ var COMPILED = false;
42
+
43
+
44
+ /**
45
+ * Base namespace for the Closure library. Checks to see goog is
46
+ * already defined in the current scope before assigning to prevent
47
+ * clobbering if base.js is loaded more than once.
48
+ *
49
+ * @const
50
+ */
51
+ var goog = goog || {}; // Identifies this file as the Closure base.
52
+
53
+
54
+ /**
55
+ * Reference to the global context. In most cases this will be 'window'.
56
+ */
57
+ goog.global = this;
58
+
59
+
60
+ /**
61
+ * @define {boolean} DEBUG is provided as a convenience so that debugging code
62
+ * that should not be included in a production js_binary can be easily stripped
63
+ * by specifying --define goog.DEBUG=false to the JSCompiler. For example, most
64
+ * toString() methods should be declared inside an "if (goog.DEBUG)" conditional
65
+ * because they are generally used for debugging purposes and it is difficult
66
+ * for the JSCompiler to statically determine whether they are used.
67
+ */
68
+ goog.DEBUG = true;
69
+
70
+
71
+ /**
72
+ * @define {string} LOCALE defines the locale being used for compilation. It is
73
+ * used to select locale specific data to be compiled in js binary. BUILD rule
74
+ * can specify this value by "--define goog.LOCALE=<locale_name>" as JSCompiler
75
+ * option.
76
+ *
77
+ * Take into account that the locale code format is important. You should use
78
+ * the canonical Unicode format with hyphen as a delimiter. Language must be
79
+ * lowercase, Language Script - Capitalized, Region - UPPERCASE.
80
+ * There are few examples: pt-BR, en, en-US, sr-Latin-BO, zh-Hans-CN.
81
+ *
82
+ * See more info about locale codes here:
83
+ * http://www.unicode.org/reports/tr35/#Unicode_Language_and_Locale_Identifiers
84
+ *
85
+ * For language codes you should use values defined by ISO 693-1. See it here
86
+ * http://www.w3.org/WAI/ER/IG/ert/iso639.htm. There is only one exception from
87
+ * this rule: the Hebrew language. For legacy reasons the old code (iw) should
88
+ * be used instead of the new code (he), see http://wiki/Main/IIISynonyms.
89
+ */
90
+ goog.LOCALE = 'en'; // default to en
91
+
92
+
93
+ /**
94
+ * Creates object stubs for a namespace. The presence of one or more
95
+ * goog.provide() calls indicate that the file defines the given
96
+ * objects/namespaces. Build tools also scan for provide/require statements
97
+ * to discern dependencies, build dependency files (see deps.js), etc.
98
+ * @see goog.require
99
+ * @param {string} name Namespace provided by this file in the form
100
+ * "goog.package.part".
101
+ */
102
+ goog.provide = function(name) {
103
+ if (!COMPILED) {
104
+ // Ensure that the same namespace isn't provided twice. This is intended
105
+ // to teach new developers that 'goog.provide' is effectively a variable
106
+ // declaration. And when JSCompiler transforms goog.provide into a real
107
+ // variable declaration, the compiled JS should work the same as the raw
108
+ // JS--even when the raw JS uses goog.provide incorrectly.
109
+ if (goog.isProvided_(name)) {
110
+ throw Error('Namespace "' + name + '" already declared.');
111
+ }
112
+ delete goog.implicitNamespaces_[name];
113
+
114
+ var namespace = name;
115
+ while ((namespace = namespace.substring(0, namespace.lastIndexOf('.')))) {
116
+ if (goog.getObjectByName(namespace)) {
117
+ break;
118
+ }
119
+ goog.implicitNamespaces_[namespace] = true;
120
+ }
121
+ }
122
+
123
+ goog.exportPath_(name);
124
+ };
125
+
126
+
127
+ /**
128
+ * Marks that the current file should only be used for testing, and never for
129
+ * live code in production.
130
+ * @param {string=} opt_message Optional message to add to the error that's
131
+ * raised when used in production code.
132
+ */
133
+ goog.setTestOnly = function(opt_message) {
134
+ if (COMPILED && !goog.DEBUG) {
135
+ opt_message = opt_message || '';
136
+ throw Error('Importing test-only code into non-debug environment' +
137
+ opt_message ? ': ' + opt_message : '.');
138
+ }
139
+ };
140
+
141
+
142
+ if (!COMPILED) {
143
+
144
+ /**
145
+ * Check if the given name has been goog.provided. This will return false for
146
+ * names that are available only as implicit namespaces.
147
+ * @param {string} name name of the object to look for.
148
+ * @return {boolean} Whether the name has been provided.
149
+ * @private
150
+ */
151
+ goog.isProvided_ = function(name) {
152
+ return !goog.implicitNamespaces_[name] && !!goog.getObjectByName(name);
153
+ };
154
+
155
+ /**
156
+ * Namespaces implicitly defined by goog.provide. For example,
157
+ * goog.provide('goog.events.Event') implicitly declares
158
+ * that 'goog' and 'goog.events' must be namespaces.
159
+ *
160
+ * @type {Object}
161
+ * @private
162
+ */
163
+ goog.implicitNamespaces_ = {};
164
+ }
165
+
166
+
167
+ /**
168
+ * Builds an object structure for the provided namespace path,
169
+ * ensuring that names that already exist are not overwritten. For
170
+ * example:
171
+ * "a.b.c" -> a = {};a.b={};a.b.c={};
172
+ * Used by goog.provide and goog.exportSymbol.
173
+ * @param {string} name name of the object that this file defines.
174
+ * @param {*=} opt_object the object to expose at the end of the path.
175
+ * @param {Object=} opt_objectToExportTo The object to add the path to; default
176
+ * is |goog.global|.
177
+ * @private
178
+ */
179
+ goog.exportPath_ = function(name, opt_object, opt_objectToExportTo) {
180
+ var parts = name.split('.');
181
+ var cur = opt_objectToExportTo || goog.global;
182
+
183
+ // Internet Explorer exhibits strange behavior when throwing errors from
184
+ // methods externed in this manner. See the testExportSymbolExceptions in
185
+ // base_test.html for an example.
186
+ if (!(parts[0] in cur) && cur.execScript) {
187
+ cur.execScript('var ' + parts[0]);
188
+ }
189
+
190
+ // Certain browsers cannot parse code in the form for((a in b); c;);
191
+ // This pattern is produced by the JSCompiler when it collapses the
192
+ // statement above into the conditional loop below. To prevent this from
193
+ // happening, use a for-loop and reserve the init logic as below.
194
+
195
+ // Parentheses added to eliminate strict JS warning in Firefox.
196
+ for (var part; parts.length && (part = parts.shift());) {
197
+ if (!parts.length && goog.isDef(opt_object)) {
198
+ // last part and we have an object; use it
199
+ cur[part] = opt_object;
200
+ } else if (cur[part]) {
201
+ cur = cur[part];
202
+ } else {
203
+ cur = cur[part] = {};
204
+ }
205
+ }
206
+ };
207
+
208
+
209
+ /**
210
+ * Returns an object based on its fully qualified external name. If you are
211
+ * using a compilation pass that renames property names beware that using this
212
+ * function will not find renamed properties.
213
+ *
214
+ * @param {string} name The fully qualified name.
215
+ * @param {Object=} opt_obj The object within which to look; default is
216
+ * |goog.global|.
217
+ * @return {?} The value (object or primitive) or, if not found, null.
218
+ */
219
+ goog.getObjectByName = function(name, opt_obj) {
220
+ var parts = name.split('.');
221
+ var cur = opt_obj || goog.global;
222
+ for (var part; part = parts.shift(); ) {
223
+ if (goog.isDefAndNotNull(cur[part])) {
224
+ cur = cur[part];
225
+ } else {
226
+ return null;
227
+ }
228
+ }
229
+ return cur;
230
+ };
231
+
232
+
233
+ /**
234
+ * Globalizes a whole namespace, such as goog or goog.lang.
235
+ *
236
+ * @param {Object} obj The namespace to globalize.
237
+ * @param {Object=} opt_global The object to add the properties to.
238
+ * @deprecated Properties may be explicitly exported to the global scope, but
239
+ * this should no longer be done in bulk.
240
+ */
241
+ goog.globalize = function(obj, opt_global) {
242
+ var global = opt_global || goog.global;
243
+ for (var x in obj) {
244
+ global[x] = obj[x];
245
+ }
246
+ };
247
+
248
+
249
+ /**
250
+ * Adds a dependency from a file to the files it requires.
251
+ * @param {string} relPath The path to the js file.
252
+ * @param {Array} provides An array of strings with the names of the objects
253
+ * this file provides.
254
+ * @param {Array} requires An array of strings with the names of the objects
255
+ * this file requires.
256
+ */
257
+ goog.addDependency = function(relPath, provides, requires) {
258
+ if (!COMPILED) {
259
+ var provide, require;
260
+ var path = relPath.replace(/\\/g, '/');
261
+ var deps = goog.dependencies_;
262
+ for (var i = 0; provide = provides[i]; i++) {
263
+ deps.nameToPath[provide] = path;
264
+ if (!(path in deps.pathToNames)) {
265
+ deps.pathToNames[path] = {};
266
+ }
267
+ deps.pathToNames[path][provide] = true;
268
+ }
269
+ for (var j = 0; require = requires[j]; j++) {
270
+ if (!(path in deps.requires)) {
271
+ deps.requires[path] = {};
272
+ }
273
+ deps.requires[path][require] = true;
274
+ }
275
+ }
276
+ };
277
+
278
+
279
+
280
+
281
+ // NOTE(user): The debug DOM loader was included in base.js as an orignal
282
+ // way to do "debug-mode" development. The dependency system can sometimes
283
+ // be confusing, as can the debug DOM loader's asyncronous nature.
284
+ //
285
+ // With the DOM loader, a call to goog.require() is not blocking -- the
286
+ // script will not load until some point after the current script. If a
287
+ // namespace is needed at runtime, it needs to be defined in a previous
288
+ // script, or loaded via require() with its registered dependencies.
289
+ // User-defined namespaces may need their own deps file. See http://go/js_deps,
290
+ // http://go/genjsdeps, or, externally, DepsWriter.
291
+ // http://code.google.com/closure/library/docs/depswriter.html
292
+ //
293
+ // Because of legacy clients, the DOM loader can't be easily removed from
294
+ // base.js. Work is being done to make it disableable or replaceable for
295
+ // different environments (DOM-less JavaScript interpreters like Rhino or V8,
296
+ // for example). See bootstrap/ for more information.
297
+
298
+
299
+ /**
300
+ * @define {boolean} Whether to enable the debug loader.
301
+ *
302
+ * If enabled, a call to goog.require() will attempt to load the namespace by
303
+ * appending a script tag to the DOM (if the namespace has been registered).
304
+ *
305
+ * If disabled, goog.require() will simply assert that the namespace has been
306
+ * provided (and depend on the fact that some outside tool correctly ordered
307
+ * the script).
308
+ */
309
+ goog.ENABLE_DEBUG_LOADER = true;
310
+
311
+
312
+ /**
313
+ * Implements a system for the dynamic resolution of dependencies
314
+ * that works in parallel with the BUILD system. Note that all calls
315
+ * to goog.require will be stripped by the JSCompiler when the
316
+ * --closure_pass option is used.
317
+ * @see goog.provide
318
+ * @param {string} name Namespace to include (as was given in goog.provide())
319
+ * in the form "goog.package.part".
320
+ */
321
+ goog.require = function(name) {
322
+
323
+ // if the object already exists we do not need do do anything
324
+ // TODO(arv): If we start to support require based on file name this has
325
+ // to change
326
+ // TODO(arv): If we allow goog.foo.* this has to change
327
+ // TODO(arv): If we implement dynamic load after page load we should probably
328
+ // not remove this code for the compiled output
329
+ if (!COMPILED) {
330
+ if (goog.isProvided_(name)) {
331
+ return;
332
+ }
333
+
334
+ if (goog.ENABLE_DEBUG_LOADER) {
335
+ var path = goog.getPathFromDeps_(name);
336
+ if (path) {
337
+ goog.included_[path] = true;
338
+ goog.writeScripts_();
339
+ return;
340
+ }
341
+ }
342
+
343
+ var errorMessage = 'goog.require could not find: ' + name;
344
+ if (goog.global.console) {
345
+ goog.global.console['error'](errorMessage);
346
+ }
347
+
348
+
349
+ throw Error(errorMessage);
350
+
351
+ }
352
+ };
353
+
354
+
355
+ /**
356
+ * Path for included scripts
357
+ * @type {string}
358
+ */
359
+ goog.basePath = '';
360
+
361
+
362
+ /**
363
+ * A hook for overriding the base path.
364
+ * @type {string|undefined}
365
+ */
366
+ goog.global.CLOSURE_BASE_PATH;
367
+
368
+
369
+ /**
370
+ * Whether to write out Closure's deps file. By default,
371
+ * the deps are written.
372
+ * @type {boolean|undefined}
373
+ */
374
+ goog.global.CLOSURE_NO_DEPS;
375
+
376
+
377
+ /**
378
+ * A function to import a single script. This is meant to be overridden when
379
+ * Closure is being run in non-HTML contexts, such as web workers. It's defined
380
+ * in the global scope so that it can be set before base.js is loaded, which
381
+ * allows deps.js to be imported properly.
382
+ *
383
+ * The function is passed the script source, which is a relative URI. It should
384
+ * return true if the script was imported, false otherwise.
385
+ */
386
+ goog.global.CLOSURE_IMPORT_SCRIPT;
387
+
388
+
389
+ /**
390
+ * Null function used for default values of callbacks, etc.
391
+ * @return {void} Nothing.
392
+ */
393
+ goog.nullFunction = function() {};
394
+
395
+
396
+ /**
397
+ * The identity function. Returns its first argument.
398
+ *
399
+ * @param {...*} var_args The arguments of the function.
400
+ * @return {*} The first argument.
401
+ * @deprecated Use goog.functions.identity instead.
402
+ */
403
+ goog.identityFunction = function(var_args) {
404
+ return arguments[0];
405
+ };
406
+
407
+
408
+ /**
409
+ * When defining a class Foo with an abstract method bar(), you can do:
410
+ *
411
+ * Foo.prototype.bar = goog.abstractMethod
412
+ *
413
+ * Now if a subclass of Foo fails to override bar(), an error
414
+ * will be thrown when bar() is invoked.
415
+ *
416
+ * Note: This does not take the name of the function to override as
417
+ * an argument because that would make it more difficult to obfuscate
418
+ * our JavaScript code.
419
+ *
420
+ * @type {!Function}
421
+ * @throws {Error} when invoked to indicate the method should be
422
+ * overridden.
423
+ */
424
+ goog.abstractMethod = function() {
425
+ throw Error('unimplemented abstract method');
426
+ };
427
+
428
+
429
+ /**
430
+ * Adds a {@code getInstance} static method that always return the same instance
431
+ * object.
432
+ * @param {!Function} ctor The constructor for the class to add the static
433
+ * method to.
434
+ */
435
+ goog.addSingletonGetter = function(ctor) {
436
+ ctor.getInstance = function() {
437
+ return ctor.instance_ || (ctor.instance_ = new ctor());
438
+ };
439
+ };
440
+
441
+
442
+ if (!COMPILED && goog.ENABLE_DEBUG_LOADER) {
443
+ /**
444
+ * Object used to keep track of urls that have already been added. This
445
+ * record allows the prevention of circular dependencies.
446
+ * @type {Object}
447
+ * @private
448
+ */
449
+ goog.included_ = {};
450
+
451
+
452
+ /**
453
+ * This object is used to keep track of dependencies and other data that is
454
+ * used for loading scripts
455
+ * @private
456
+ * @type {Object}
457
+ */
458
+ goog.dependencies_ = {
459
+ pathToNames: {}, // 1 to many
460
+ nameToPath: {}, // 1 to 1
461
+ requires: {}, // 1 to many
462
+ // used when resolving dependencies to prevent us from
463
+ // visiting the file twice
464
+ visited: {},
465
+ written: {} // used to keep track of script files we have written
466
+ };
467
+
468
+
469
+ /**
470
+ * Tries to detect whether is in the context of an HTML document.
471
+ * @return {boolean} True if it looks like HTML document.
472
+ * @private
473
+ */
474
+ goog.inHtmlDocument_ = function() {
475
+ var doc = goog.global.document;
476
+ return typeof doc != 'undefined' &&
477
+ 'write' in doc; // XULDocument misses write.
478
+ };
479
+
480
+
481
+ /**
482
+ * Tries to detect the base path of the base.js script that bootstraps Closure
483
+ * @private
484
+ */
485
+ goog.findBasePath_ = function() {
486
+ if (goog.global.CLOSURE_BASE_PATH) {
487
+ goog.basePath = goog.global.CLOSURE_BASE_PATH;
488
+ return;
489
+ } else if (!goog.inHtmlDocument_()) {
490
+ return;
491
+ }
492
+ var doc = goog.global.document;
493
+ var scripts = doc.getElementsByTagName('script');
494
+ // Search backwards since the current script is in almost all cases the one
495
+ // that has base.js.
496
+ for (var i = scripts.length - 1; i >= 0; --i) {
497
+ var src = scripts[i].src;
498
+ var qmark = src.lastIndexOf('?');
499
+ var l = qmark == -1 ? src.length : qmark;
500
+ if (src.substr(l - 7, 7) == 'base.js') {
501
+ goog.basePath = src.substr(0, l - 7);
502
+ return;
503
+ }
504
+ }
505
+ };
506
+
507
+
508
+ /**
509
+ * Imports a script if, and only if, that script hasn't already been imported.
510
+ * (Must be called at execution time)
511
+ * @param {string} src Script source.
512
+ * @private
513
+ */
514
+ goog.importScript_ = function(src) {
515
+ var importScript = goog.global.CLOSURE_IMPORT_SCRIPT ||
516
+ goog.writeScriptTag_;
517
+ if (!goog.dependencies_.written[src] && importScript(src)) {
518
+ goog.dependencies_.written[src] = true;
519
+ }
520
+ };
521
+
522
+
523
+ /**
524
+ * The default implementation of the import function. Writes a script tag to
525
+ * import the script.
526
+ *
527
+ * @param {string} src The script source.
528
+ * @return {boolean} True if the script was imported, false otherwise.
529
+ * @private
530
+ */
531
+ goog.writeScriptTag_ = function(src) {
532
+ if (goog.inHtmlDocument_()) {
533
+ var doc = goog.global.document;
534
+ doc.write(
535
+ '<script type="text/javascript" src="' + src + '"></' + 'script>');
536
+ return true;
537
+ } else {
538
+ return false;
539
+ }
540
+ };
541
+
542
+
543
+ /**
544
+ * Resolves dependencies based on the dependencies added using addDependency
545
+ * and calls importScript_ in the correct order.
546
+ * @private
547
+ */
548
+ goog.writeScripts_ = function() {
549
+ // the scripts we need to write this time
550
+ var scripts = [];
551
+ var seenScript = {};
552
+ var deps = goog.dependencies_;
553
+
554
+ function visitNode(path) {
555
+ if (path in deps.written) {
556
+ return;
557
+ }
558
+
559
+ // we have already visited this one. We can get here if we have cyclic
560
+ // dependencies
561
+ if (path in deps.visited) {
562
+ if (!(path in seenScript)) {
563
+ seenScript[path] = true;
564
+ scripts.push(path);
565
+ }
566
+ return;
567
+ }
568
+
569
+ deps.visited[path] = true;
570
+
571
+ if (path in deps.requires) {
572
+ for (var requireName in deps.requires[path]) {
573
+ // If the required name is defined, we assume that it was already
574
+ // bootstrapped by other means.
575
+ if (!goog.isProvided_(requireName)) {
576
+ if (requireName in deps.nameToPath) {
577
+ visitNode(deps.nameToPath[requireName]);
578
+ } else {
579
+ throw Error('Undefined nameToPath for ' + requireName);
580
+ }
581
+ }
582
+ }
583
+ }
584
+
585
+ if (!(path in seenScript)) {
586
+ seenScript[path] = true;
587
+ scripts.push(path);
588
+ }
589
+ }
590
+
591
+ for (var path in goog.included_) {
592
+ if (!deps.written[path]) {
593
+ visitNode(path);
594
+ }
595
+ }
596
+
597
+ for (var i = 0; i < scripts.length; i++) {
598
+ if (scripts[i]) {
599
+ goog.importScript_(goog.basePath + scripts[i]);
600
+ } else {
601
+ throw Error('Undefined script input');
602
+ }
603
+ }
604
+ };
605
+
606
+
607
+ /**
608
+ * Looks at the dependency rules and tries to determine the script file that
609
+ * fulfills a particular rule.
610
+ * @param {string} rule In the form goog.namespace.Class or project.script.
611
+ * @return {?string} Url corresponding to the rule, or null.
612
+ * @private
613
+ */
614
+ goog.getPathFromDeps_ = function(rule) {
615
+ if (rule in goog.dependencies_.nameToPath) {
616
+ return goog.dependencies_.nameToPath[rule];
617
+ } else {
618
+ return null;
619
+ }
620
+ };
621
+
622
+ goog.findBasePath_();
623
+
624
+ // Allow projects to manage the deps files themselves.
625
+ if (!goog.global.CLOSURE_NO_DEPS) {
626
+ goog.importScript_(goog.basePath + 'deps.js');
627
+ }
628
+ }
629
+
630
+
631
+
632
+ //==============================================================================
633
+ // Language Enhancements
634
+ //==============================================================================
635
+
636
+
637
+ /**
638
+ * This is a "fixed" version of the typeof operator. It differs from the typeof
639
+ * operator in such a way that null returns 'null' and arrays return 'array'.
640
+ * @param {*} value The value to get the type of.
641
+ * @return {string} The name of the type.
642
+ */
643
+ goog.typeOf = function(value) {
644
+ var s = typeof value;
645
+ if (s == 'object') {
646
+ if (value) {
647
+ // Check these first, so we can avoid calling Object.prototype.toString if
648
+ // possible.
649
+ //
650
+ // IE improperly marshals tyepof across execution contexts, but a
651
+ // cross-context object will still return false for "instanceof Object".
652
+ if (value instanceof Array) {
653
+ return 'array';
654
+ } else if (value instanceof Object) {
655
+ return s;
656
+ }
657
+
658
+ // HACK: In order to use an Object prototype method on the arbitrary
659
+ // value, the compiler requires the value be cast to type Object,
660
+ // even though the ECMA spec explicitly allows it.
661
+ var className = Object.prototype.toString.call(
662
+ /** @type {Object} */ (value));
663
+ // In Firefox 3.6, attempting to access iframe window objects' length
664
+ // property throws an NS_ERROR_FAILURE, so we need to special-case it
665
+ // here.
666
+ if (className == '[object Window]') {
667
+ return 'object';
668
+ }
669
+
670
+ // We cannot always use constructor == Array or instanceof Array because
671
+ // different frames have different Array objects. In IE6, if the iframe
672
+ // where the array was created is destroyed, the array loses its
673
+ // prototype. Then dereferencing val.splice here throws an exception, so
674
+ // we can't use goog.isFunction. Calling typeof directly returns 'unknown'
675
+ // so that will work. In this case, this function will return false and
676
+ // most array functions will still work because the array is still
677
+ // array-like (supports length and []) even though it has lost its
678
+ // prototype.
679
+ // Mark Miller noticed that Object.prototype.toString
680
+ // allows access to the unforgeable [[Class]] property.
681
+ // 15.2.4.2 Object.prototype.toString ( )
682
+ // When the toString method is called, the following steps are taken:
683
+ // 1. Get the [[Class]] property of this object.
684
+ // 2. Compute a string value by concatenating the three strings
685
+ // "[object ", Result(1), and "]".
686
+ // 3. Return Result(2).
687
+ // and this behavior survives the destruction of the execution context.
688
+ if ((className == '[object Array]' ||
689
+ // In IE all non value types are wrapped as objects across window
690
+ // boundaries (not iframe though) so we have to do object detection
691
+ // for this edge case
692
+ typeof value.length == 'number' &&
693
+ typeof value.splice != 'undefined' &&
694
+ typeof value.propertyIsEnumerable != 'undefined' &&
695
+ !value.propertyIsEnumerable('splice')
696
+
697
+ )) {
698
+ return 'array';
699
+ }
700
+ // HACK: There is still an array case that fails.
701
+ // function ArrayImpostor() {}
702
+ // ArrayImpostor.prototype = [];
703
+ // var impostor = new ArrayImpostor;
704
+ // this can be fixed by getting rid of the fast path
705
+ // (value instanceof Array) and solely relying on
706
+ // (value && Object.prototype.toString.vall(value) === '[object Array]')
707
+ // but that would require many more function calls and is not warranted
708
+ // unless closure code is receiving objects from untrusted sources.
709
+
710
+ // IE in cross-window calls does not correctly marshal the function type
711
+ // (it appears just as an object) so we cannot use just typeof val ==
712
+ // 'function'. However, if the object has a call property, it is a
713
+ // function.
714
+ if ((className == '[object Function]' ||
715
+ typeof value.call != 'undefined' &&
716
+ typeof value.propertyIsEnumerable != 'undefined' &&
717
+ !value.propertyIsEnumerable('call'))) {
718
+ return 'function';
719
+ }
720
+
721
+
722
+ } else {
723
+ return 'null';
724
+ }
725
+
726
+ } else if (s == 'function' && typeof value.call == 'undefined') {
727
+ // In Safari typeof nodeList returns 'function', and on Firefox
728
+ // typeof behaves similarly for HTML{Applet,Embed,Object}Elements
729
+ // and RegExps. We would like to return object for those and we can
730
+ // detect an invalid function by making sure that the function
731
+ // object has a call method.
732
+ return 'object';
733
+ }
734
+ return s;
735
+ };
736
+
737
+
738
+ /**
739
+ * Safe way to test whether a property is enumarable. It allows testing
740
+ * for enumerable on objects where 'propertyIsEnumerable' is overridden or
741
+ * does not exist (like DOM nodes in IE). Does not use browser native
742
+ * Object.propertyIsEnumerable.
743
+ * @param {Object} object The object to test if the property is enumerable.
744
+ * @param {string} propName The property name to check for.
745
+ * @return {boolean} True if the property is enumarable.
746
+ * @private
747
+ */
748
+ goog.propertyIsEnumerableCustom_ = function(object, propName) {
749
+ // KJS in Safari 2 is not ECMAScript compatible and lacks crucial methods
750
+ // such as propertyIsEnumerable. We therefore use a workaround.
751
+ // Does anyone know a more efficient work around?
752
+ if (propName in object) {
753
+ for (var key in object) {
754
+ if (key == propName &&
755
+ Object.prototype.hasOwnProperty.call(object, propName)) {
756
+ return true;
757
+ }
758
+ }
759
+ }
760
+ return false;
761
+ };
762
+
763
+
764
+ /**
765
+ * Safe way to test whether a property is enumarable. It allows testing
766
+ * for enumerable on objects where 'propertyIsEnumerable' is overridden or
767
+ * does not exist (like DOM nodes in IE).
768
+ * @param {Object} object The object to test if the property is enumerable.
769
+ * @param {string} propName The property name to check for.
770
+ * @return {boolean} True if the property is enumarable.
771
+ * @private
772
+ */
773
+ goog.propertyIsEnumerable_ = function(object, propName) {
774
+ // In IE if object is from another window, cannot use propertyIsEnumerable
775
+ // from this window's Object. Will raise a 'JScript object expected' error.
776
+ if (object instanceof Object) {
777
+ return Object.prototype.propertyIsEnumerable.call(object, propName);
778
+ } else {
779
+ return goog.propertyIsEnumerableCustom_(object, propName);
780
+ }
781
+ };
782
+
783
+
784
+ /**
785
+ * Returns true if the specified value is not |undefined|.
786
+ * WARNING: Do not use this to test if an object has a property. Use the in
787
+ * operator instead. Additionally, this function assumes that the global
788
+ * undefined variable has not been redefined.
789
+ * @param {*} val Variable to test.
790
+ * @return {boolean} Whether variable is defined.
791
+ */
792
+ goog.isDef = function(val) {
793
+ return val !== undefined;
794
+ };
795
+
796
+
797
+ /**
798
+ * Returns true if the specified value is |null|
799
+ * @param {*} val Variable to test.
800
+ * @return {boolean} Whether variable is null.
801
+ */
802
+ goog.isNull = function(val) {
803
+ return val === null;
804
+ };
805
+
806
+
807
+ /**
808
+ * Returns true if the specified value is defined and not null
809
+ * @param {*} val Variable to test.
810
+ * @return {boolean} Whether variable is defined and not null.
811
+ */
812
+ goog.isDefAndNotNull = function(val) {
813
+ // Note that undefined == null.
814
+ return val != null;
815
+ };
816
+
817
+
818
+ /**
819
+ * Returns true if the specified value is an array
820
+ * @param {*} val Variable to test.
821
+ * @return {boolean} Whether variable is an array.
822
+ */
823
+ goog.isArray = function(val) {
824
+ return goog.typeOf(val) == 'array';
825
+ };
826
+
827
+
828
+ /**
829
+ * Returns true if the object looks like an array. To qualify as array like
830
+ * the value needs to be either a NodeList or an object with a Number length
831
+ * property.
832
+ * @param {*} val Variable to test.
833
+ * @return {boolean} Whether variable is an array.
834
+ */
835
+ goog.isArrayLike = function(val) {
836
+ var type = goog.typeOf(val);
837
+ return type == 'array' || type == 'object' && typeof val.length == 'number';
838
+ };
839
+
840
+
841
+ /**
842
+ * Returns true if the object looks like a Date. To qualify as Date-like
843
+ * the value needs to be an object and have a getFullYear() function.
844
+ * @param {*} val Variable to test.
845
+ * @return {boolean} Whether variable is a like a Date.
846
+ */
847
+ goog.isDateLike = function(val) {
848
+ return goog.isObject(val) && typeof val.getFullYear == 'function';
849
+ };
850
+
851
+
852
+ /**
853
+ * Returns true if the specified value is a string
854
+ * @param {*} val Variable to test.
855
+ * @return {boolean} Whether variable is a string.
856
+ */
857
+ goog.isString = function(val) {
858
+ return typeof val == 'string';
859
+ };
860
+
861
+
862
+ /**
863
+ * Returns true if the specified value is a boolean
864
+ * @param {*} val Variable to test.
865
+ * @return {boolean} Whether variable is boolean.
866
+ */
867
+ goog.isBoolean = function(val) {
868
+ return typeof val == 'boolean';
869
+ };
870
+
871
+
872
+ /**
873
+ * Returns true if the specified value is a number
874
+ * @param {*} val Variable to test.
875
+ * @return {boolean} Whether variable is a number.
876
+ */
877
+ goog.isNumber = function(val) {
878
+ return typeof val == 'number';
879
+ };
880
+
881
+
882
+ /**
883
+ * Returns true if the specified value is a function
884
+ * @param {*} val Variable to test.
885
+ * @return {boolean} Whether variable is a function.
886
+ */
887
+ goog.isFunction = function(val) {
888
+ return goog.typeOf(val) == 'function';
889
+ };
890
+
891
+
892
+ /**
893
+ * Returns true if the specified value is an object. This includes arrays
894
+ * and functions.
895
+ * @param {*} val Variable to test.
896
+ * @return {boolean} Whether variable is an object.
897
+ */
898
+ goog.isObject = function(val) {
899
+ var type = goog.typeOf(val);
900
+ return type == 'object' || type == 'array' || type == 'function';
901
+ };
902
+
903
+
904
+ /**
905
+ * Gets a unique ID for an object. This mutates the object so that further
906
+ * calls with the same object as a parameter returns the same value. The unique
907
+ * ID is guaranteed to be unique across the current session amongst objects that
908
+ * are passed into {@code getUid}. There is no guarantee that the ID is unique
909
+ * or consistent across sessions. It is unsafe to generate unique ID for
910
+ * function prototypes.
911
+ *
912
+ * @param {Object} obj The object to get the unique ID for.
913
+ * @return {number} The unique ID for the object.
914
+ */
915
+ goog.getUid = function(obj) {
916
+ // TODO(arv): Make the type stricter, do not accept null.
917
+
918
+ // In Opera window.hasOwnProperty exists but always returns false so we avoid
919
+ // using it. As a consequence the unique ID generated for BaseClass.prototype
920
+ // and SubClass.prototype will be the same.
921
+ return obj[goog.UID_PROPERTY_] ||
922
+ (obj[goog.UID_PROPERTY_] = ++goog.uidCounter_);
923
+ };
924
+
925
+
926
+ /**
927
+ * Removes the unique ID from an object. This is useful if the object was
928
+ * previously mutated using {@code goog.getUid} in which case the mutation is
929
+ * undone.
930
+ * @param {Object} obj The object to remove the unique ID field from.
931
+ */
932
+ goog.removeUid = function(obj) {
933
+ // TODO(arv): Make the type stricter, do not accept null.
934
+
935
+ // DOM nodes in IE are not instance of Object and throws exception
936
+ // for delete. Instead we try to use removeAttribute
937
+ if ('removeAttribute' in obj) {
938
+ obj.removeAttribute(goog.UID_PROPERTY_);
939
+ }
940
+ /** @preserveTry */
941
+ try {
942
+ delete obj[goog.UID_PROPERTY_];
943
+ } catch (ex) {
944
+ }
945
+ };
946
+
947
+
948
+ /**
949
+ * Name for unique ID property. Initialized in a way to help avoid collisions
950
+ * with other closure javascript on the same page.
951
+ * @type {string}
952
+ * @private
953
+ */
954
+ goog.UID_PROPERTY_ = 'closure_uid_' +
955
+ Math.floor(Math.random() * 2147483648).toString(36);
956
+
957
+
958
+ /**
959
+ * Counter for UID.
960
+ * @type {number}
961
+ * @private
962
+ */
963
+ goog.uidCounter_ = 0;
964
+
965
+
966
+ /**
967
+ * Adds a hash code field to an object. The hash code is unique for the
968
+ * given object.
969
+ * @param {Object} obj The object to get the hash code for.
970
+ * @return {number} The hash code for the object.
971
+ * @deprecated Use goog.getUid instead.
972
+ */
973
+ goog.getHashCode = goog.getUid;
974
+
975
+
976
+ /**
977
+ * Removes the hash code field from an object.
978
+ * @param {Object} obj The object to remove the field from.
979
+ * @deprecated Use goog.removeUid instead.
980
+ */
981
+ goog.removeHashCode = goog.removeUid;
982
+
983
+
984
+ /**
985
+ * Clones a value. The input may be an Object, Array, or basic type. Objects and
986
+ * arrays will be cloned recursively.
987
+ *
988
+ * WARNINGS:
989
+ * <code>goog.cloneObject</code> does not detect reference loops. Objects that
990
+ * refer to themselves will cause infinite recursion.
991
+ *
992
+ * <code>goog.cloneObject</code> is unaware of unique identifiers, and copies
993
+ * UIDs created by <code>getUid</code> into cloned results.
994
+ *
995
+ * @param {*} obj The value to clone.
996
+ * @return {*} A clone of the input value.
997
+ * @deprecated goog.cloneObject is unsafe. Prefer the goog.object methods.
998
+ */
999
+ goog.cloneObject = function(obj) {
1000
+ var type = goog.typeOf(obj);
1001
+ if (type == 'object' || type == 'array') {
1002
+ if (obj.clone) {
1003
+ return obj.clone();
1004
+ }
1005
+ var clone = type == 'array' ? [] : {};
1006
+ for (var key in obj) {
1007
+ clone[key] = goog.cloneObject(obj[key]);
1008
+ }
1009
+ return clone;
1010
+ }
1011
+
1012
+ return obj;
1013
+ };
1014
+
1015
+
1016
+ /**
1017
+ * Forward declaration for the clone method. This is necessary until the
1018
+ * compiler can better support duck-typing constructs as used in
1019
+ * goog.cloneObject.
1020
+ *
1021
+ * TODO(user): Remove once the JSCompiler can infer that the check for
1022
+ * proto.clone is safe in goog.cloneObject.
1023
+ *
1024
+ * @type {Function}
1025
+ */
1026
+ Object.prototype.clone;
1027
+
1028
+
1029
+ /**
1030
+ * A native implementation of goog.bind.
1031
+ * @param {Function} fn A function to partially apply.
1032
+ * @param {Object|undefined} selfObj Specifies the object which |this| should
1033
+ * point to when the function is run.
1034
+ * @param {...*} var_args Additional arguments that are partially
1035
+ * applied to the function.
1036
+ * @return {!Function} A partially-applied form of the function bind() was
1037
+ * invoked as a method of.
1038
+ * @private
1039
+ * @suppress {deprecated} The compiler thinks that Function.prototype.bind
1040
+ * is deprecated because some people have declared a pure-JS version.
1041
+ * Only the pure-JS version is truly deprecated.
1042
+ */
1043
+ goog.bindNative_ = function(fn, selfObj, var_args) {
1044
+ return /** @type {!Function} */ (fn.call.apply(fn.bind, arguments));
1045
+ };
1046
+
1047
+
1048
+ /**
1049
+ * A pure-JS implementation of goog.bind.
1050
+ * @param {Function} fn A function to partially apply.
1051
+ * @param {Object|undefined} selfObj Specifies the object which |this| should
1052
+ * point to when the function is run.
1053
+ * @param {...*} var_args Additional arguments that are partially
1054
+ * applied to the function.
1055
+ * @return {!Function} A partially-applied form of the function bind() was
1056
+ * invoked as a method of.
1057
+ * @private
1058
+ */
1059
+ goog.bindJs_ = function(fn, selfObj, var_args) {
1060
+ if (!fn) {
1061
+ throw new Error();
1062
+ }
1063
+
1064
+ if (arguments.length > 2) {
1065
+ var boundArgs = Array.prototype.slice.call(arguments, 2);
1066
+ return function() {
1067
+ // Prepend the bound arguments to the current arguments.
1068
+ var newArgs = Array.prototype.slice.call(arguments);
1069
+ Array.prototype.unshift.apply(newArgs, boundArgs);
1070
+ return fn.apply(selfObj, newArgs);
1071
+ };
1072
+
1073
+ } else {
1074
+ return function() {
1075
+ return fn.apply(selfObj, arguments);
1076
+ };
1077
+ }
1078
+ };
1079
+
1080
+
1081
+ /**
1082
+ * Partially applies this function to a particular 'this object' and zero or
1083
+ * more arguments. The result is a new function with some arguments of the first
1084
+ * function pre-filled and the value of |this| 'pre-specified'.<br><br>
1085
+ *
1086
+ * Remaining arguments specified at call-time are appended to the pre-
1087
+ * specified ones.<br><br>
1088
+ *
1089
+ * Also see: {@link #partial}.<br><br>
1090
+ *
1091
+ * Usage:
1092
+ * <pre>var barMethBound = bind(myFunction, myObj, 'arg1', 'arg2');
1093
+ * barMethBound('arg3', 'arg4');</pre>
1094
+ *
1095
+ * @param {Function} fn A function to partially apply.
1096
+ * @param {Object|undefined} selfObj Specifies the object which |this| should
1097
+ * point to when the function is run.
1098
+ * @param {...*} var_args Additional arguments that are partially
1099
+ * applied to the function.
1100
+ * @return {!Function} A partially-applied form of the function bind() was
1101
+ * invoked as a method of.
1102
+ * @suppress {deprecated} See above.
1103
+ */
1104
+ goog.bind = function(fn, selfObj, var_args) {
1105
+ // TODO(nicksantos): narrow the type signature.
1106
+ if (Function.prototype.bind &&
1107
+ // NOTE(nicksantos): Somebody pulled base.js into the default
1108
+ // Chrome extension environment. This means that for Chrome extensions,
1109
+ // they get the implementation of Function.prototype.bind that
1110
+ // calls goog.bind instead of the native one. Even worse, we don't want
1111
+ // to introduce a circular dependency between goog.bind and
1112
+ // Function.prototype.bind, so we have to hack this to make sure it
1113
+ // works correctly.
1114
+ Function.prototype.bind.toString().indexOf('native code') != -1) {
1115
+ goog.bind = goog.bindNative_;
1116
+ } else {
1117
+ goog.bind = goog.bindJs_;
1118
+ }
1119
+ return goog.bind.apply(null, arguments);
1120
+ };
1121
+
1122
+
1123
+ /**
1124
+ * Like bind(), except that a 'this object' is not required. Useful when the
1125
+ * target function is already bound.
1126
+ *
1127
+ * Usage:
1128
+ * var g = partial(f, arg1, arg2);
1129
+ * g(arg3, arg4);
1130
+ *
1131
+ * @param {Function} fn A function to partially apply.
1132
+ * @param {...*} var_args Additional arguments that are partially
1133
+ * applied to fn.
1134
+ * @return {!Function} A partially-applied form of the function bind() was
1135
+ * invoked as a method of.
1136
+ */
1137
+ goog.partial = function(fn, var_args) {
1138
+ var args = Array.prototype.slice.call(arguments, 1);
1139
+ return function() {
1140
+ // Prepend the bound arguments to the current arguments.
1141
+ var newArgs = Array.prototype.slice.call(arguments);
1142
+ newArgs.unshift.apply(newArgs, args);
1143
+ return fn.apply(this, newArgs);
1144
+ };
1145
+ };
1146
+
1147
+
1148
+ /**
1149
+ * Copies all the members of a source object to a target object. This method
1150
+ * does not work on all browsers for all objects that contain keys such as
1151
+ * toString or hasOwnProperty. Use goog.object.extend for this purpose.
1152
+ * @param {Object} target Target.
1153
+ * @param {Object} source Source.
1154
+ */
1155
+ goog.mixin = function(target, source) {
1156
+ for (var x in source) {
1157
+ target[x] = source[x];
1158
+ }
1159
+
1160
+ // For IE7 or lower, the for-in-loop does not contain any properties that are
1161
+ // not enumerable on the prototype object (for example, isPrototypeOf from
1162
+ // Object.prototype) but also it will not include 'replace' on objects that
1163
+ // extend String and change 'replace' (not that it is common for anyone to
1164
+ // extend anything except Object).
1165
+ };
1166
+
1167
+
1168
+ /**
1169
+ * @return {number} An integer value representing the number of milliseconds
1170
+ * between midnight, January 1, 1970 and the current time.
1171
+ */
1172
+ goog.now = Date.now || (function() {
1173
+ // Unary plus operator converts its operand to a number which in the case of
1174
+ // a date is done by calling getTime().
1175
+ return +new Date();
1176
+ });
1177
+
1178
+
1179
+ /**
1180
+ * Evals javascript in the global scope. In IE this uses execScript, other
1181
+ * browsers use goog.global.eval. If goog.global.eval does not evaluate in the
1182
+ * global scope (for example, in Safari), appends a script tag instead.
1183
+ * Throws an exception if neither execScript or eval is defined.
1184
+ * @param {string} script JavaScript string.
1185
+ */
1186
+ goog.globalEval = function(script) {
1187
+ if (goog.global.execScript) {
1188
+ goog.global.execScript(script, 'JavaScript');
1189
+ } else if (goog.global.eval) {
1190
+ // Test to see if eval works
1191
+ if (goog.evalWorksForGlobals_ == null) {
1192
+ goog.global.eval('var _et_ = 1;');
1193
+ if (typeof goog.global['_et_'] != 'undefined') {
1194
+ delete goog.global['_et_'];
1195
+ goog.evalWorksForGlobals_ = true;
1196
+ } else {
1197
+ goog.evalWorksForGlobals_ = false;
1198
+ }
1199
+ }
1200
+
1201
+ if (goog.evalWorksForGlobals_) {
1202
+ goog.global.eval(script);
1203
+ } else {
1204
+ var doc = goog.global.document;
1205
+ var scriptElt = doc.createElement('script');
1206
+ scriptElt.type = 'text/javascript';
1207
+ scriptElt.defer = false;
1208
+ // Note(user): can't use .innerHTML since "t('<test>')" will fail and
1209
+ // .text doesn't work in Safari 2. Therefore we append a text node.
1210
+ scriptElt.appendChild(doc.createTextNode(script));
1211
+ doc.body.appendChild(scriptElt);
1212
+ doc.body.removeChild(scriptElt);
1213
+ }
1214
+ } else {
1215
+ throw Error('goog.globalEval not available');
1216
+ }
1217
+ };
1218
+
1219
+
1220
+ /**
1221
+ * Indicates whether or not we can call 'eval' directly to eval code in the
1222
+ * global scope. Set to a Boolean by the first call to goog.globalEval (which
1223
+ * empirically tests whether eval works for globals). @see goog.globalEval
1224
+ * @type {?boolean}
1225
+ * @private
1226
+ */
1227
+ goog.evalWorksForGlobals_ = null;
1228
+
1229
+
1230
+ /**
1231
+ * Optional map of CSS class names to obfuscated names used with
1232
+ * goog.getCssName().
1233
+ * @type {Object|undefined}
1234
+ * @private
1235
+ * @see goog.setCssNameMapping
1236
+ */
1237
+ goog.cssNameMapping_;
1238
+
1239
+
1240
+ /**
1241
+ * Optional obfuscation style for CSS class names. Should be set to either
1242
+ * 'BY_WHOLE' or 'BY_PART' if defined.
1243
+ * @type {string|undefined}
1244
+ * @private
1245
+ * @see goog.setCssNameMapping
1246
+ */
1247
+ goog.cssNameMappingStyle_;
1248
+
1249
+
1250
+ /**
1251
+ * Handles strings that are intended to be used as CSS class names.
1252
+ *
1253
+ * This function works in tandem with @see goog.setCssNameMapping.
1254
+ *
1255
+ * Without any mapping set, the arguments are simple joined with a
1256
+ * hyphen and passed through unaltered.
1257
+ *
1258
+ * When there is a mapping, there are two possible styles in which
1259
+ * these mappings are used. In the BY_PART style, each part (i.e. in
1260
+ * between hyphens) of the passed in css name is rewritten according
1261
+ * to the map. In the BY_WHOLE style, the full css name is looked up in
1262
+ * the map directly. If a rewrite is not specified by the map, the
1263
+ * compiler will output a warning.
1264
+ *
1265
+ * When the mapping is passed to the compiler, it will replace calls
1266
+ * to goog.getCssName with the strings from the mapping, e.g.
1267
+ * var x = goog.getCssName('foo');
1268
+ * var y = goog.getCssName(this.baseClass, 'active');
1269
+ * becomes:
1270
+ * var x= 'foo';
1271
+ * var y = this.baseClass + '-active';
1272
+ *
1273
+ * If one argument is passed it will be processed, if two are passed
1274
+ * only the modifier will be processed, as it is assumed the first
1275
+ * argument was generated as a result of calling goog.getCssName.
1276
+ *
1277
+ * @param {string} className The class name.
1278
+ * @param {string=} opt_modifier A modifier to be appended to the class name.
1279
+ * @return {string} The class name or the concatenation of the class name and
1280
+ * the modifier.
1281
+ */
1282
+ goog.getCssName = function(className, opt_modifier) {
1283
+ var getMapping = function(cssName) {
1284
+ return goog.cssNameMapping_[cssName] || cssName;
1285
+ };
1286
+
1287
+ var renameByParts = function(cssName) {
1288
+ // Remap all the parts individually.
1289
+ var parts = cssName.split('-');
1290
+ var mapped = [];
1291
+ for (var i = 0; i < parts.length; i++) {
1292
+ mapped.push(getMapping(parts[i]));
1293
+ }
1294
+ return mapped.join('-');
1295
+ };
1296
+
1297
+ var rename;
1298
+ if (goog.cssNameMapping_) {
1299
+ rename = goog.cssNameMappingStyle_ == 'BY_WHOLE' ?
1300
+ getMapping : renameByParts;
1301
+ } else {
1302
+ rename = function(a) {
1303
+ return a;
1304
+ };
1305
+ }
1306
+
1307
+ if (opt_modifier) {
1308
+ return className + '-' + rename(opt_modifier);
1309
+ } else {
1310
+ return rename(className);
1311
+ }
1312
+ };
1313
+
1314
+
1315
+ /**
1316
+ * Sets the map to check when returning a value from goog.getCssName(). Example:
1317
+ * <pre>
1318
+ * goog.setCssNameMapping({
1319
+ * "goog": "a",
1320
+ * "disabled": "b",
1321
+ * });
1322
+ *
1323
+ * var x = goog.getCssName('goog');
1324
+ * // The following evaluates to: "a a-b".
1325
+ * goog.getCssName('goog') + ' ' + goog.getCssName(x, 'disabled')
1326
+ * </pre>
1327
+ * When declared as a map of string literals to string literals, the JSCompiler
1328
+ * will replace all calls to goog.getCssName() using the supplied map if the
1329
+ * --closure_pass flag is set.
1330
+ *
1331
+ * @param {!Object} mapping A map of strings to strings where keys are possible
1332
+ * arguments to goog.getCssName() and values are the corresponding values
1333
+ * that should be returned.
1334
+ * @param {string=} opt_style The style of css name mapping. There are two valid
1335
+ * options: 'BY_PART', and 'BY_WHOLE'.
1336
+ * @see goog.getCssName for a description.
1337
+ */
1338
+ goog.setCssNameMapping = function(mapping, opt_style) {
1339
+ goog.cssNameMapping_ = mapping;
1340
+ goog.cssNameMappingStyle_ = opt_style;
1341
+ };
1342
+
1343
+
1344
+ /**
1345
+ * To use CSS renaming in compiled mode, one of the input files should have a
1346
+ * call to goog.setCssNameMapping() with an object literal that the JSCompiler
1347
+ * can extract and use to replace all calls to goog.getCssName(). In uncompiled
1348
+ * mode, JavaScript code should be loaded before this base.js file that declares
1349
+ * a global variable, CLOSURE_CSS_NAME_MAPPING, which is used below. This is
1350
+ * to ensure that the mapping is loaded before any calls to goog.getCssName()
1351
+ * are made in uncompiled mode.
1352
+ *
1353
+ * A hook for overriding the CSS name mapping.
1354
+ * @type {Object|undefined}
1355
+ */
1356
+ goog.global.CLOSURE_CSS_NAME_MAPPING;
1357
+
1358
+
1359
+ if (!COMPILED && goog.global.CLOSURE_CSS_NAME_MAPPING) {
1360
+ // This does not call goog.setCssNameMapping() because the JSCompiler
1361
+ // requires that goog.setCssNameMapping() be called with an object literal.
1362
+ goog.cssNameMapping_ = goog.global.CLOSURE_CSS_NAME_MAPPING;
1363
+ }
1364
+
1365
+
1366
+ /**
1367
+ * Abstract implementation of goog.getMsg for use with localized messages.
1368
+ * @param {string} str Translatable string, places holders in the form {$foo}.
1369
+ * @param {Object=} opt_values Map of place holder name to value.
1370
+ * @return {string} message with placeholders filled.
1371
+ */
1372
+ goog.getMsg = function(str, opt_values) {
1373
+ var values = opt_values || {};
1374
+ for (var key in values) {
1375
+ var value = ('' + values[key]).replace(/\$/g, '$$$$');
1376
+ str = str.replace(new RegExp('\\{\\$' + key + '\\}', 'gi'), value);
1377
+ }
1378
+ return str;
1379
+ };
1380
+
1381
+
1382
+ /**
1383
+ * Exposes an unobfuscated global namespace path for the given object.
1384
+ * Note that fields of the exported object *will* be obfuscated,
1385
+ * unless they are exported in turn via this function or
1386
+ * goog.exportProperty
1387
+ *
1388
+ * <p>Also handy for making public items that are defined in anonymous
1389
+ * closures.
1390
+ *
1391
+ * ex. goog.exportSymbol('Foo', Foo);
1392
+ *
1393
+ * ex. goog.exportSymbol('public.path.Foo.staticFunction',
1394
+ * Foo.staticFunction);
1395
+ * public.path.Foo.staticFunction();
1396
+ *
1397
+ * ex. goog.exportSymbol('public.path.Foo.prototype.myMethod',
1398
+ * Foo.prototype.myMethod);
1399
+ * new public.path.Foo().myMethod();
1400
+ *
1401
+ * @param {string} publicPath Unobfuscated name to export.
1402
+ * @param {*} object Object the name should point to.
1403
+ * @param {Object=} opt_objectToExportTo The object to add the path to; default
1404
+ * is |goog.global|.
1405
+ */
1406
+ goog.exportSymbol = function(publicPath, object, opt_objectToExportTo) {
1407
+ goog.exportPath_(publicPath, object, opt_objectToExportTo);
1408
+ };
1409
+
1410
+
1411
+ /**
1412
+ * Exports a property unobfuscated into the object's namespace.
1413
+ * ex. goog.exportProperty(Foo, 'staticFunction', Foo.staticFunction);
1414
+ * ex. goog.exportProperty(Foo.prototype, 'myMethod', Foo.prototype.myMethod);
1415
+ * @param {Object} object Object whose static property is being exported.
1416
+ * @param {string} publicName Unobfuscated name to export.
1417
+ * @param {*} symbol Object the name should point to.
1418
+ */
1419
+ goog.exportProperty = function(object, publicName, symbol) {
1420
+ object[publicName] = symbol;
1421
+ };
1422
+
1423
+
1424
+ /**
1425
+ * Inherit the prototype methods from one constructor into another.
1426
+ *
1427
+ * Usage:
1428
+ * <pre>
1429
+ * function ParentClass(a, b) { }
1430
+ * ParentClass.prototype.foo = function(a) { }
1431
+ *
1432
+ * function ChildClass(a, b, c) {
1433
+ * goog.base(this, a, b);
1434
+ * }
1435
+ * goog.inherits(ChildClass, ParentClass);
1436
+ *
1437
+ * var child = new ChildClass('a', 'b', 'see');
1438
+ * child.foo(); // works
1439
+ * </pre>
1440
+ *
1441
+ * In addition, a superclass' implementation of a method can be invoked
1442
+ * as follows:
1443
+ *
1444
+ * <pre>
1445
+ * ChildClass.prototype.foo = function(a) {
1446
+ * ChildClass.superClass_.foo.call(this, a);
1447
+ * // other code
1448
+ * };
1449
+ * </pre>
1450
+ *
1451
+ * @param {Function} childCtor Child class.
1452
+ * @param {Function} parentCtor Parent class.
1453
+ */
1454
+ goog.inherits = function(childCtor, parentCtor) {
1455
+ /** @constructor */
1456
+ function tempCtor() {};
1457
+ tempCtor.prototype = parentCtor.prototype;
1458
+ childCtor.superClass_ = parentCtor.prototype;
1459
+ childCtor.prototype = new tempCtor();
1460
+ childCtor.prototype.constructor = childCtor;
1461
+ };
1462
+
1463
+
1464
+ /**
1465
+ * Call up to the superclass.
1466
+ *
1467
+ * If this is called from a constructor, then this calls the superclass
1468
+ * contructor with arguments 1-N.
1469
+ *
1470
+ * If this is called from a prototype method, then you must pass
1471
+ * the name of the method as the second argument to this function. If
1472
+ * you do not, you will get a runtime error. This calls the superclass'
1473
+ * method with arguments 2-N.
1474
+ *
1475
+ * This function only works if you use goog.inherits to express
1476
+ * inheritance relationships between your classes.
1477
+ *
1478
+ * This function is a compiler primitive. At compile-time, the
1479
+ * compiler will do macro expansion to remove a lot of
1480
+ * the extra overhead that this function introduces. The compiler
1481
+ * will also enforce a lot of the assumptions that this function
1482
+ * makes, and treat it as a compiler error if you break them.
1483
+ *
1484
+ * @param {!Object} me Should always be "this".
1485
+ * @param {*=} opt_methodName The method name if calling a super method.
1486
+ * @param {...*} var_args The rest of the arguments.
1487
+ * @return {*} The return value of the superclass method.
1488
+ */
1489
+ goog.base = function(me, opt_methodName, var_args) {
1490
+ var caller = arguments.callee.caller;
1491
+ if (caller.superClass_) {
1492
+ // This is a constructor. Call the superclass constructor.
1493
+ return caller.superClass_.constructor.apply(
1494
+ me, Array.prototype.slice.call(arguments, 1));
1495
+ }
1496
+
1497
+ var args = Array.prototype.slice.call(arguments, 2);
1498
+ var foundCaller = false;
1499
+ for (var ctor = me.constructor;
1500
+ ctor; ctor = ctor.superClass_ && ctor.superClass_.constructor) {
1501
+ if (ctor.prototype[opt_methodName] === caller) {
1502
+ foundCaller = true;
1503
+ } else if (foundCaller) {
1504
+ return ctor.prototype[opt_methodName].apply(me, args);
1505
+ }
1506
+ }
1507
+
1508
+ // If we did not find the caller in the prototype chain,
1509
+ // then one of two things happened:
1510
+ // 1) The caller is an instance method.
1511
+ // 2) This method was not called by the right caller.
1512
+ if (me[opt_methodName] === caller) {
1513
+ return me.constructor.prototype[opt_methodName].apply(me, args);
1514
+ } else {
1515
+ throw Error(
1516
+ 'goog.base called from a method of one name ' +
1517
+ 'to a method of a different name');
1518
+ }
1519
+ };
1520
+
1521
+
1522
+ /**
1523
+ * Allow for aliasing within scope functions. This function exists for
1524
+ * uncompiled code - in compiled code the calls will be inlined and the
1525
+ * aliases applied. In uncompiled code the function is simply run since the
1526
+ * aliases as written are valid JavaScript.
1527
+ * @param {function()} fn Function to call. This function can contain aliases
1528
+ * to namespaces (e.g. "var dom = goog.dom") or classes
1529
+ * (e.g. "var Timer = goog.Timer").
1530
+ */
1531
+ goog.scope = function(fn) {
1532
+ fn.call(goog.global);
1533
+ };
1534
+
1535
+
1536
+ ;
1537
+ FI"asset_paths;
1538
+ F["e/Volumes/Development/dev-web/closure-library-wrapper/vendor/closure-library/closure/goog/base.jsI"dependency_paths;
1539
+ F[{I" path;
1540
+ F"e/Volumes/Development/dev-web/closure-library-wrapper/vendor/closure-library/closure/goog/base.jsI"
1541
+ mtime;
1542
+ FIu: Time
1543
+ T: offsetiI"hexdigest;
1544
+ F"%112973cfd6fe1ba93322179fcf0d181bI"
1545
+ F"%46dde6621c301f4928e3b34efee9e3b5