Commit bd3fab00d18355bcf11d137d97e097cc71d3b218

Authored by zhenchaozhu
0 parents
Exists in master and in 1 other branch de

add forum code

Showing 211 changed files with 38528 additions and 0 deletions   Show diff stats
File was created 1 # Byte-compiled / optimized / DLL files
2 __pycache__/
3 *.py[cod]
4
5 # C extensions
6 *.so
7
8 # Distribution / packaging
9 .Python
10 env/
11 bin/
12 build/
13 develop-eggs/
14 dist/
15 eggs/
16 parts/
17 sdist/
18 var/
19 *.egg-info/
20 .installed.cfg
21 *.egg
22
23 # Installer logs
24 pip-log.txt
25 pip-delete-this-directory.txt
26
27 # Unit test / coverage reports
28 htmlcov/
29 .tox/
30 .coverage
31 .cache
32 nosetests.xml
33 coverage.xml
34
35 # Translations
36 *.mo
37
38 # Mr Developer
39 .mr.developer.cfg
40 .project
41 .pydevproject
42
43 # Rope
44 .ropeproject
45
46 # Django stuff:
47 *.log
48 *.pot
49
50 # Sphinx documentation
51
52 .idea/
53 docs/_build/
54
55 .DS_Store
56
File was created 1 The MIT License (MIT)
2
3 Copyright (c) 2014 Timmy
4
5 Permission is hereby granted, free of charge, to any person obtaining a copy
6 of this software and associated documentation files (the "Software"), to deal
7 in the Software without restriction, including without limitation the rights
8 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 copies of the Software, and to permit persons to whom the Software is
10 furnished to do so, subject to the following conditions:
11
12 The above copyright notice and this permission notice shall be included in all
13 copies or substantial portions of the Software.
14
15 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 SOFTWARE.
22
File was created 1 ### Django forum
2
3 ***
4
5 demo: <http://djangoforum.coding.io/>
6
7 Django forum是使用Django实现的轻型现代论坛程序,是fork自[F2E.im](https://github.com/PaulGuo/F2E.im)的Django版本.
8 相对于原版的主要区别在于使用Django admin实现了一个简单的后台管理.
9
10 Django forum有3个分支,master分支用于主机上部署,SAE分支是适配Sina App Engine的版本,api分支是一个试验性质的分支,详情见更新
11
12 #### 安装部署
13
14 主机版:
15
16 依赖MySQL数据库,以及memcached
17
18 1. 获取代码
19 2. 安装依赖
20 3. 导入数据库文件
21 4. 修改配置文件
22 5. 运行服务
23
24 ```shell
25 shell> git clone git@github.com:zhu327/forum.git
26
27 shell> cd forum
28 shell> pip install -r requirements.txt
29
30 shell> mysql -u YOURUSERNAME -p
31
32 mysql> create database forum;
33 mysql> exit
34
35 shell> mysql -u YOURUSERNAME -p --database=forum < forum.sql
36 ```
37
38 修改`xp/settings.py`
39
40 ```python
41 # 修改数据库配置
42 DATABASES = {
43 'default': {
44 'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
45 'NAME': 'forum', # Or path to database file if using sqlite3.
46 # The following settings are not used with sqlite3:
47 'USER': 'root',
48 'PASSWORD': '',
49 'HOST': '127.0.0.1', # Empty for localhost through domain sockets or '127.0.0.1' for localhost through TCP.
50 'PORT': '3306', # Set to empty string for default.
51 }
52 }
53
54 # 修改memcached配置,如果没有memcahed请删除这些与cache相关的内容
55 CACHES = { # memcached缓存设置
56 'default': {
57 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
58 'LOCATION': '127.0.0.1:11211',
59 }
60 }
61
62 SESSION_ENGINE = 'django.contrib.sessions.backends.cache' # 使用memcached存储session
63
64 # 配置邮件发送
65 EMAIL_HOST = 'smtp.qq.com'
66 EMAIL_PORT = 25
67 EMAIL_HOST_USER= '*********'
68 EMAIL_HOST_PASSWORD= '******'
69 DEFAULT_FROM_EMAIL = '*********@qq.com'
70 ```
71
72 运行服务
73
74 ```shell
75 python manage.py runserver
76 ```
77
78 默认超级用户`admin@admin.com`,密码`123456`,后台`/manage/admin/`
79
80 生产环境下推荐使用gunicorn.
File was created 1 -- MySQL dump 10.13 Distrib 5.6.21, for osx10.10 (x86_64)
2 --
3 -- Host: localhost Database: forum
4 -- ------------------------------------------------------
5 -- Server version 5.6.21
6
7 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
8 /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
9 /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
10 /*!40101 SET NAMES utf8 */;
11 /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
12 /*!40103 SET TIME_ZONE='+00:00' */;
13 /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
14 /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
15 /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
16 /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
17
18 --
19 -- Table structure for table `auth_group`
20 --
21
22 DROP TABLE IF EXISTS `auth_group`;
23 /*!40101 SET @saved_cs_client = @@character_set_client */;
24 /*!40101 SET character_set_client = utf8 */;
25 CREATE TABLE `auth_group` (
26 `id` int(11) NOT NULL AUTO_INCREMENT,
27 `name` varchar(80) NOT NULL,
28 PRIMARY KEY (`id`),
29 UNIQUE KEY `name` (`name`)
30 ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
31 /*!40101 SET character_set_client = @saved_cs_client */;
32
33 --
34 -- Dumping data for table `auth_group`
35 --
36
37 LOCK TABLES `auth_group` WRITE;
38 /*!40000 ALTER TABLE `auth_group` DISABLE KEYS */;
39 INSERT INTO `auth_group` VALUES (2,'版主'),(1,'管理员');
40 /*!40000 ALTER TABLE `auth_group` ENABLE KEYS */;
41 UNLOCK TABLES;
42
43 --
44 -- Table structure for table `auth_group_permissions`
45 --
46
47 DROP TABLE IF EXISTS `auth_group_permissions`;
48 /*!40101 SET @saved_cs_client = @@character_set_client */;
49 /*!40101 SET character_set_client = utf8 */;
50 CREATE TABLE `auth_group_permissions` (
51 `id` int(11) NOT NULL AUTO_INCREMENT,
52 `group_id` int(11) NOT NULL,
53 `permission_id` int(11) NOT NULL,
54 PRIMARY KEY (`id`),
55 UNIQUE KEY `group_id` (`group_id`,`permission_id`),
56 KEY `auth_group_permissions_5f412f9a` (`group_id`),
57 KEY `auth_group_permissions_83d7f98b` (`permission_id`),
58 CONSTRAINT `group_id_refs_id_f4b32aac` FOREIGN KEY (`group_id`) REFERENCES `auth_group` (`id`),
59 CONSTRAINT `permission_id_refs_id_6ba0f519` FOREIGN KEY (`permission_id`) REFERENCES `auth_permission` (`id`)
60 ) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8;
61 /*!40101 SET character_set_client = @saved_cs_client */;
62
63 --
64 -- Dumping data for table `auth_group_permissions`
65 --
66
67 LOCK TABLES `auth_group_permissions` WRITE;
68 /*!40000 ALTER TABLE `auth_group_permissions` DISABLE KEYS */;
69 INSERT INTO `auth_group_permissions` VALUES (3,1,20),(4,1,22),(5,1,23),(6,1,24),(7,1,25),(8,1,26),(9,1,27),(10,1,29),(11,1,30),(1,1,32),(2,1,33),(14,2,29),(15,2,30),(12,2,32),(13,2,33);
70 /*!40000 ALTER TABLE `auth_group_permissions` ENABLE KEYS */;
71 UNLOCK TABLES;
72
73 --
74 -- Table structure for table `auth_permission`
75 --
76
77 DROP TABLE IF EXISTS `auth_permission`;
78 /*!40101 SET @saved_cs_client = @@character_set_client */;
79 /*!40101 SET character_set_client = utf8 */;
80 CREATE TABLE `auth_permission` (
81 `id` int(11) NOT NULL AUTO_INCREMENT,
82 `name` varchar(50) NOT NULL,
83 `content_type_id` int(11) NOT NULL,
84 `codename` varchar(100) NOT NULL,
85 PRIMARY KEY (`id`),
86 UNIQUE KEY `content_type_id` (`content_type_id`,`codename`),
87 KEY `auth_permission_37ef4eb4` (`content_type_id`),
88 CONSTRAINT `content_type_id_refs_id_d043b34a` FOREIGN KEY (`content_type_id`) REFERENCES `django_content_type` (`id`)
89 ) ENGINE=InnoDB AUTO_INCREMENT=46 DEFAULT CHARSET=utf8;
90 /*!40101 SET character_set_client = @saved_cs_client */;
91
92 --
93 -- Dumping data for table `auth_permission`
94 --
95
96 LOCK TABLES `auth_permission` WRITE;
97 /*!40000 ALTER TABLE `auth_permission` DISABLE KEYS */;
98 INSERT INTO `auth_permission` VALUES (1,'Can add permission',1,'add_permission'),(2,'Can change permission',1,'change_permission'),(3,'Can delete permission',1,'delete_permission'),(4,'Can add group',2,'add_group'),(5,'Can change group',2,'change_group'),(6,'Can delete group',2,'delete_group'),(7,'Can add content type',3,'add_contenttype'),(8,'Can change content type',3,'change_contenttype'),(9,'Can delete content type',3,'delete_contenttype'),(10,'Can add session',4,'add_session'),(11,'Can change session',4,'change_session'),(12,'Can delete session',4,'delete_session'),(13,'Can add site',5,'add_site'),(14,'Can change site',5,'change_site'),(15,'Can delete site',5,'delete_site'),(16,'Can add log entry',6,'add_logentry'),(17,'Can change log entry',6,'change_logentry'),(18,'Can delete log entry',6,'delete_logentry'),(19,'Can add user',7,'add_forumuser'),(20,'Can change user',7,'change_forumuser'),(21,'Can delete user',7,'delete_forumuser'),(22,'Can add plane',8,'add_plane'),(23,'Can change plane',8,'change_plane'),(24,'Can delete plane',8,'delete_plane'),(25,'Can add node',9,'add_node'),(26,'Can change node',9,'change_node'),(27,'Can delete node',9,'delete_node'),(28,'Can add topic',10,'add_topic'),(29,'Can change topic',10,'change_topic'),(30,'Can delete topic',10,'delete_topic'),(31,'Can add reply',11,'add_reply'),(32,'Can change reply',11,'change_reply'),(33,'Can delete reply',11,'delete_reply'),(34,'Can add favorite',12,'add_favorite'),(35,'Can change favorite',12,'change_favorite'),(36,'Can delete favorite',12,'delete_favorite'),(37,'Can add notification',13,'add_notification'),(38,'Can change notification',13,'change_notification'),(39,'Can delete notification',13,'delete_notification'),(40,'Can add transaction',14,'add_transaction'),(41,'Can change transaction',14,'change_transaction'),(42,'Can delete transaction',14,'delete_transaction'),(43,'Can add vote',15,'add_vote'),(44,'Can change vote',15,'change_vote'),(45,'Can delete vote',15,'delete_vote');
99 /*!40000 ALTER TABLE `auth_permission` ENABLE KEYS */;
100 UNLOCK TABLES;
101
102 --
103 -- Table structure for table `django_admin_log`
104 --
105
106 DROP TABLE IF EXISTS `django_admin_log`;
107 /*!40101 SET @saved_cs_client = @@character_set_client */;
108 /*!40101 SET character_set_client = utf8 */;
109 CREATE TABLE `django_admin_log` (
110 `id` int(11) NOT NULL AUTO_INCREMENT,
111 `action_time` datetime NOT NULL,
112 `user_id` int(11) NOT NULL,
113 `content_type_id` int(11) DEFAULT NULL,
114 `object_id` longtext,
115 `object_repr` varchar(200) NOT NULL,
116 `action_flag` smallint(5) unsigned NOT NULL,
117 `change_message` longtext NOT NULL,
118 PRIMARY KEY (`id`),
119 KEY `django_admin_log_6340c63c` (`user_id`),
120 KEY `django_admin_log_37ef4eb4` (`content_type_id`),
121 CONSTRAINT `content_type_id_refs_id_93d2d1f8` FOREIGN KEY (`content_type_id`) REFERENCES `django_content_type` (`id`),
122 CONSTRAINT `user_id_refs_id_6c68e238` FOREIGN KEY (`user_id`) REFERENCES `forum_forumuser` (`id`)
123 ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
124 /*!40101 SET character_set_client = @saved_cs_client */;
125
126 --
127 -- Dumping data for table `django_admin_log`
128 --
129
130 LOCK TABLES `django_admin_log` WRITE;
131 /*!40000 ALTER TABLE `django_admin_log` DISABLE KEYS */;
132 /*!40000 ALTER TABLE `django_admin_log` ENABLE KEYS */;
133 UNLOCK TABLES;
134
135 --
136 -- Table structure for table `django_content_type`
137 --
138
139 DROP TABLE IF EXISTS `django_content_type`;
140 /*!40101 SET @saved_cs_client = @@character_set_client */;
141 /*!40101 SET character_set_client = utf8 */;
142 CREATE TABLE `django_content_type` (
143 `id` int(11) NOT NULL AUTO_INCREMENT,
144 `name` varchar(100) NOT NULL,
145 `app_label` varchar(100) NOT NULL,
146 `model` varchar(100) NOT NULL,
147 PRIMARY KEY (`id`),
148 UNIQUE KEY `app_label` (`app_label`,`model`)
149 ) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8;
150 /*!40101 SET character_set_client = @saved_cs_client */;
151
152 --
153 -- Dumping data for table `django_content_type`
154 --
155
156 LOCK TABLES `django_content_type` WRITE;
157 /*!40000 ALTER TABLE `django_content_type` DISABLE KEYS */;
158 INSERT INTO `django_content_type` VALUES (1,'permission','auth','permission'),(2,'group','auth','group'),(3,'content type','contenttypes','contenttype'),(4,'session','sessions','session'),(5,'site','sites','site'),(6,'log entry','admin','logentry'),(7,'user','forum','forumuser'),(8,'plane','forum','plane'),(9,'node','forum','node'),(10,'topic','forum','topic'),(11,'reply','forum','reply'),(12,'favorite','forum','favorite'),(13,'notification','forum','notification'),(14,'transaction','forum','transaction'),(15,'vote','forum','vote');
159 /*!40000 ALTER TABLE `django_content_type` ENABLE KEYS */;
160 UNLOCK TABLES;
161
162 --
163 -- Table structure for table `django_session`
164 --
165
166 DROP TABLE IF EXISTS `django_session`;
167 /*!40101 SET @saved_cs_client = @@character_set_client */;
168 /*!40101 SET character_set_client = utf8 */;
169 CREATE TABLE `django_session` (
170 `session_key` varchar(40) NOT NULL,
171 `session_data` longtext NOT NULL,
172 `expire_date` datetime NOT NULL,
173 PRIMARY KEY (`session_key`),
174 KEY `django_session_b7b81f0c` (`expire_date`)
175 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
176 /*!40101 SET character_set_client = @saved_cs_client */;
177
178 --
179 -- Dumping data for table `django_session`
180 --
181
182 LOCK TABLES `django_session` WRITE;
183 /*!40000 ALTER TABLE `django_session` DISABLE KEYS */;
184 /*!40000 ALTER TABLE `django_session` ENABLE KEYS */;
185 UNLOCK TABLES;
186
187 --
188 -- Table structure for table `django_site`
189 --
190
191 DROP TABLE IF EXISTS `django_site`;
192 /*!40101 SET @saved_cs_client = @@character_set_client */;
193 /*!40101 SET character_set_client = utf8 */;
194 CREATE TABLE `django_site` (
195 `id` int(11) NOT NULL AUTO_INCREMENT,
196 `domain` varchar(100) NOT NULL,
197 `name` varchar(50) NOT NULL,
198 PRIMARY KEY (`id`)
199 ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
200 /*!40101 SET character_set_client = @saved_cs_client */;
201
202 --
203 -- Dumping data for table `django_site`
204 --
205
206 LOCK TABLES `django_site` WRITE;
207 /*!40000 ALTER TABLE `django_site` DISABLE KEYS */;
208 INSERT INTO `django_site` VALUES (1,'127.0.0.1:8000','127.0.0.1:8000');
209 /*!40000 ALTER TABLE `django_site` ENABLE KEYS */;
210 UNLOCK TABLES;
211
212 --
213 -- Table structure for table `forum_favorite`
214 --
215
216 DROP TABLE IF EXISTS `forum_favorite`;
217 /*!40101 SET @saved_cs_client = @@character_set_client */;
218 /*!40101 SET character_set_client = utf8 */;
219 CREATE TABLE `forum_favorite` (
220 `id` int(11) NOT NULL AUTO_INCREMENT,
221 `owner_user_id` int(11) DEFAULT NULL,
222 `involved_type` int(11) DEFAULT NULL,
223 `involved_topic_id` int(11) DEFAULT NULL,
224 `involved_reply_id` int(11) DEFAULT NULL,
225 `created` datetime DEFAULT NULL,
226 PRIMARY KEY (`id`),
227 KEY `forum_favorite_7cdabad6` (`owner_user_id`),
228 KEY `forum_favorite_a12f20f1` (`involved_topic_id`),
229 KEY `forum_favorite_99093a1e` (`involved_reply_id`),
230 CONSTRAINT `involved_reply_id_refs_id_db861f67` FOREIGN KEY (`involved_reply_id`) REFERENCES `forum_reply` (`id`),
231 CONSTRAINT `involved_topic_id_refs_id_80406b01` FOREIGN KEY (`involved_topic_id`) REFERENCES `forum_topic` (`id`),
232 CONSTRAINT `owner_user_id_refs_id_78db67eb` FOREIGN KEY (`owner_user_id`) REFERENCES `forum_forumuser` (`id`)
233 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
234 /*!40101 SET character_set_client = @saved_cs_client */;
235
236 --
237 -- Dumping data for table `forum_favorite`
238 --
239
240 LOCK TABLES `forum_favorite` WRITE;
241 /*!40000 ALTER TABLE `forum_favorite` DISABLE KEYS */;
242 /*!40000 ALTER TABLE `forum_favorite` ENABLE KEYS */;
243 UNLOCK TABLES;
244
245 --
246 -- Table structure for table `forum_forumuser`
247 --
248
249 DROP TABLE IF EXISTS `forum_forumuser`;
250 /*!40101 SET @saved_cs_client = @@character_set_client */;
251 /*!40101 SET character_set_client = utf8 */;
252 CREATE TABLE `forum_forumuser` (
253 `id` int(11) NOT NULL AUTO_INCREMENT,
254 `password` varchar(128) NOT NULL,
255 `last_login` datetime NOT NULL,
256 `is_superuser` tinyint(1) NOT NULL,
257 `username` varchar(30) NOT NULL,
258 `first_name` varchar(30) NOT NULL,
259 `last_name` varchar(30) NOT NULL,
260 `email` varchar(75) NOT NULL,
261 `is_staff` tinyint(1) NOT NULL,
262 `is_active` tinyint(1) NOT NULL,
263 `date_joined` datetime NOT NULL,
264 `nickname` varchar(200) DEFAULT NULL,
265 `avatar` varchar(200) DEFAULT NULL,
266 `signature` varchar(500) DEFAULT NULL,
267 `location` varchar(200) DEFAULT NULL,
268 `website` varchar(200) DEFAULT NULL,
269 `company` varchar(200) DEFAULT NULL,
270 `role` int(11) DEFAULT NULL,
271 `balance` int(11) DEFAULT NULL,
272 `reputation` int(11) DEFAULT NULL,
273 `self_intro` varchar(500) DEFAULT NULL,
274 `updated` datetime DEFAULT NULL,
275 `twitter` varchar(200) DEFAULT NULL,
276 `github` varchar(200) DEFAULT NULL,
277 `douban` varchar(200) DEFAULT NULL,
278 PRIMARY KEY (`id`),
279 UNIQUE KEY `username` (`username`)
280 ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
281 /*!40101 SET character_set_client = @saved_cs_client */;
282
283 --
284 -- Dumping data for table `forum_forumuser`
285 --
286
287 LOCK TABLES `forum_forumuser` WRITE;
288 UNLOCK TABLES;
289
290 --
291 -- Table structure for table `forum_forumuser_groups`
292 --
293
294 DROP TABLE IF EXISTS `forum_forumuser_groups`;
295 /*!40101 SET @saved_cs_client = @@character_set_client */;
296 /*!40101 SET character_set_client = utf8 */;
297 CREATE TABLE `forum_forumuser_groups` (
298 `id` int(11) NOT NULL AUTO_INCREMENT,
299 `forumuser_id` int(11) NOT NULL,
300 `group_id` int(11) NOT NULL,
301 PRIMARY KEY (`id`),
302 UNIQUE KEY `forumuser_id` (`forumuser_id`,`group_id`),
303 KEY `forum_forumuser_groups_4728ad57` (`forumuser_id`),
304 KEY `forum_forumuser_groups_5f412f9a` (`group_id`),
305 CONSTRAINT `forumuser_id_refs_id_822c2557` FOREIGN KEY (`forumuser_id`) REFERENCES `forum_forumuser` (`id`),
306 CONSTRAINT `group_id_refs_id_4e7ca183` FOREIGN KEY (`group_id`) REFERENCES `auth_group` (`id`)
307 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
308 /*!40101 SET character_set_client = @saved_cs_client */;
309
310 --
311 -- Dumping data for table `forum_forumuser_groups`
312 --
313
314 LOCK TABLES `forum_forumuser_groups` WRITE;
315 /*!40000 ALTER TABLE `forum_forumuser_groups` DISABLE KEYS */;
316 /*!40000 ALTER TABLE `forum_forumuser_groups` ENABLE KEYS */;
317 UNLOCK TABLES;
318
319 --
320 -- Table structure for table `forum_forumuser_user_permissions`
321 --
322
323 DROP TABLE IF EXISTS `forum_forumuser_user_permissions`;
324 /*!40101 SET @saved_cs_client = @@character_set_client */;
325 /*!40101 SET character_set_client = utf8 */;
326 CREATE TABLE `forum_forumuser_user_permissions` (
327 `id` int(11) NOT NULL AUTO_INCREMENT,
328 `forumuser_id` int(11) NOT NULL,
329 `permission_id` int(11) NOT NULL,
330 PRIMARY KEY (`id`),
331 UNIQUE KEY `forumuser_id` (`forumuser_id`,`permission_id`),
332 KEY `forum_forumuser_user_permissions_4728ad57` (`forumuser_id`),
333 KEY `forum_forumuser_user_permissions_83d7f98b` (`permission_id`),
334 CONSTRAINT `forumuser_id_refs_id_69df7695` FOREIGN KEY (`forumuser_id`) REFERENCES `forum_forumuser` (`id`),
335 CONSTRAINT `permission_id_refs_id_70e54fc3` FOREIGN KEY (`permission_id`) REFERENCES `auth_permission` (`id`)
336 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
337 /*!40101 SET character_set_client = @saved_cs_client */;
338
339 --
340 -- Dumping data for table `forum_forumuser_user_permissions`
341 --
342
343 LOCK TABLES `forum_forumuser_user_permissions` WRITE;
344 /*!40000 ALTER TABLE `forum_forumuser_user_permissions` DISABLE KEYS */;
345 /*!40000 ALTER TABLE `forum_forumuser_user_permissions` ENABLE KEYS */;
346 UNLOCK TABLES;
347
348 --
349 -- Table structure for table `forum_node`
350 --
351
352 DROP TABLE IF EXISTS `forum_node`;
353 /*!40101 SET @saved_cs_client = @@character_set_client */;
354 /*!40101 SET character_set_client = utf8 */;
355 CREATE TABLE `forum_node` (
356 `id` int(11) NOT NULL AUTO_INCREMENT,
357 `name` varchar(200) DEFAULT NULL,
358 `slug` varchar(200) DEFAULT NULL,
359 `thumb` varchar(200) DEFAULT NULL,
360 `introduction` varchar(500) DEFAULT NULL,
361 `created` datetime DEFAULT NULL,
362 `updated` datetime DEFAULT NULL,
363 `plane_id` int(11) DEFAULT NULL,
364 `topic_count` int(11) DEFAULT NULL,
365 `custom_style` text,
366 `limit_reputation` int(11) DEFAULT NULL,
367 PRIMARY KEY (`id`),
368 KEY `forum_node_05110e07` (`plane_id`),
369 CONSTRAINT `plane_id_refs_id_550721f0` FOREIGN KEY (`plane_id`) REFERENCES `forum_plane` (`id`)
370 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
371 /*!40101 SET character_set_client = @saved_cs_client */;
372
373 --
374 -- Dumping data for table `forum_node`
375 --
376
377 LOCK TABLES `forum_node` WRITE;
378 /*!40000 ALTER TABLE `forum_node` DISABLE KEYS */;
379 /*!40000 ALTER TABLE `forum_node` ENABLE KEYS */;
380 UNLOCK TABLES;
381
382 --
383 -- Table structure for table `forum_notification`
384 --
385
386 DROP TABLE IF EXISTS `forum_notification`;
387 /*!40101 SET @saved_cs_client = @@character_set_client */;
388 /*!40101 SET character_set_client = utf8 */;
389 CREATE TABLE `forum_notification` (
390 `id` int(11) NOT NULL AUTO_INCREMENT,
391 `content` text,
392 `status` int(11) DEFAULT NULL,
393 `involved_type` int(11) DEFAULT NULL,
394 `involved_user_id` int(11) DEFAULT NULL,
395 `involved_topic_id` int(11) DEFAULT NULL,
396 `involved_reply_id` int(11) DEFAULT NULL,
397 `trigger_user_id` int(11) DEFAULT NULL,
398 `occurrence_time` datetime DEFAULT NULL,
399 PRIMARY KEY (`id`),
400 KEY `forum_notification_95fdbe29` (`involved_user_id`),
401 KEY `forum_notification_a12f20f1` (`involved_topic_id`),
402 KEY `forum_notification_99093a1e` (`involved_reply_id`),
403 KEY `forum_notification_431bdeb9` (`trigger_user_id`),
404 CONSTRAINT `involved_reply_id_refs_id_9bd6430b` FOREIGN KEY (`involved_reply_id`) REFERENCES `forum_reply` (`id`),
405 CONSTRAINT `involved_topic_id_refs_id_702d1de8` FOREIGN KEY (`involved_topic_id`) REFERENCES `forum_topic` (`id`),
406 CONSTRAINT `involved_user_id_refs_id_e2f3fda9` FOREIGN KEY (`involved_user_id`) REFERENCES `forum_forumuser` (`id`),
407 CONSTRAINT `trigger_user_id_refs_id_e2f3fda9` FOREIGN KEY (`trigger_user_id`) REFERENCES `forum_forumuser` (`id`)
408 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
409 /*!40101 SET character_set_client = @saved_cs_client */;
410
411 --
412 -- Dumping data for table `forum_notification`
413 --
414
415 LOCK TABLES `forum_notification` WRITE;
416 /*!40000 ALTER TABLE `forum_notification` DISABLE KEYS */;
417 /*!40000 ALTER TABLE `forum_notification` ENABLE KEYS */;
418 UNLOCK TABLES;
419
420 --
421 -- Table structure for table `forum_plane`
422 --
423
424 DROP TABLE IF EXISTS `forum_plane`;
425 /*!40101 SET @saved_cs_client = @@character_set_client */;
426 /*!40101 SET character_set_client = utf8 */;
427 CREATE TABLE `forum_plane` (
428 `id` int(11) NOT NULL AUTO_INCREMENT,
429 `name` varchar(200) DEFAULT NULL,
430 `created` datetime DEFAULT NULL,
431 `updated` datetime DEFAULT NULL,
432 PRIMARY KEY (`id`)
433 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
434 /*!40101 SET character_set_client = @saved_cs_client */;
435
436 --
437 -- Dumping data for table `forum_plane`
438 --
439
440 LOCK TABLES `forum_plane` WRITE;
441 /*!40000 ALTER TABLE `forum_plane` DISABLE KEYS */;
442 /*!40000 ALTER TABLE `forum_plane` ENABLE KEYS */;
443 UNLOCK TABLES;
444
445 --
446 -- Table structure for table `forum_reply`
447 --
448
449 DROP TABLE IF EXISTS `forum_reply`;
450 /*!40101 SET @saved_cs_client = @@character_set_client */;
451 /*!40101 SET character_set_client = utf8 */;
452 CREATE TABLE `forum_reply` (
453 `id` int(11) NOT NULL AUTO_INCREMENT,
454 `topic_id` int(11) DEFAULT NULL,
455 `author_id` int(11) DEFAULT NULL,
456 `content` text,
457 `created` datetime DEFAULT NULL,
458 `updated` datetime DEFAULT NULL,
459 `up_vote` int(11) DEFAULT NULL,
460 `down_vote` int(11) DEFAULT NULL,
461 `last_touched` datetime DEFAULT NULL,
462 PRIMARY KEY (`id`),
463 KEY `forum_reply_76f18ad3` (`topic_id`),
464 KEY `forum_reply_e969df21` (`author_id`),
465 CONSTRAINT `author_id_refs_id_4945e1fe` FOREIGN KEY (`author_id`) REFERENCES `forum_forumuser` (`id`),
466 CONSTRAINT `topic_id_refs_id_92c2aa5d` FOREIGN KEY (`topic_id`) REFERENCES `forum_topic` (`id`)
467 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
468 /*!40101 SET character_set_client = @saved_cs_client */;
469
470 --
471 -- Dumping data for table `forum_reply`
472 --
473
474 LOCK TABLES `forum_reply` WRITE;
475 /*!40000 ALTER TABLE `forum_reply` DISABLE KEYS */;
476 /*!40000 ALTER TABLE `forum_reply` ENABLE KEYS */;
477 UNLOCK TABLES;
478
479 --
480 -- Table structure for table `forum_topic`
481 --
482
483 DROP TABLE IF EXISTS `forum_topic`;
484 /*!40101 SET @saved_cs_client = @@character_set_client */;
485 /*!40101 SET character_set_client = utf8 */;
486 CREATE TABLE `forum_topic` (
487 `id` int(11) NOT NULL AUTO_INCREMENT,
488 `title` varchar(200) DEFAULT NULL,
489 `content` text,
490 `status` int(11) DEFAULT NULL,
491 `hits` int(11) DEFAULT NULL,
492 `created` datetime DEFAULT NULL,
493 `updated` datetime DEFAULT NULL,
494 `node_id` int(11) DEFAULT NULL,
495 `author_id` int(11) DEFAULT NULL,
496 `reply_count` int(11) DEFAULT NULL,
497 `last_replied_by_id` int(11) DEFAULT NULL,
498 `last_replied_time` datetime DEFAULT NULL,
499 `up_vote` int(11) DEFAULT NULL,
500 `down_vote` int(11) DEFAULT NULL,
501 `last_touched` datetime DEFAULT NULL,
502 PRIMARY KEY (`id`),
503 KEY `forum_topic_e453c5c5` (`node_id`),
504 KEY `forum_topic_e969df21` (`author_id`),
505 KEY `forum_topic_67b51778` (`last_replied_by_id`),
506 CONSTRAINT `author_id_refs_id_524c87d9` FOREIGN KEY (`author_id`) REFERENCES `forum_forumuser` (`id`),
507 CONSTRAINT `last_replied_by_id_refs_id_524c87d9` FOREIGN KEY (`last_replied_by_id`) REFERENCES `forum_forumuser` (`id`),
508 CONSTRAINT `node_id_refs_id_5d0660c1` FOREIGN KEY (`node_id`) REFERENCES `forum_node` (`id`)
509 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
510 /*!40101 SET character_set_client = @saved_cs_client */;
511
512 --
513 -- Dumping data for table `forum_topic`
514 --
515
516 LOCK TABLES `forum_topic` WRITE;
517 /*!40000 ALTER TABLE `forum_topic` DISABLE KEYS */;
518 /*!40000 ALTER TABLE `forum_topic` ENABLE KEYS */;
519 UNLOCK TABLES;
520
521 --
522 -- Table structure for table `forum_transaction`
523 --
524
525 DROP TABLE IF EXISTS `forum_transaction`;
526 /*!40101 SET @saved_cs_client = @@character_set_client */;
527 /*!40101 SET character_set_client = utf8 */;
528 CREATE TABLE `forum_transaction` (
529 `id` int(11) NOT NULL AUTO_INCREMENT,
530 `type` int(11) DEFAULT NULL,
531 `reward` int(11) DEFAULT NULL,
532 `user_id` int(11) DEFAULT NULL,
533 `current_balance` int(11) DEFAULT NULL,
534 `involved_user_id` int(11) DEFAULT NULL,
535 `involved_topic_id` int(11) DEFAULT NULL,
536 `involved_reply_id` int(11) DEFAULT NULL,
537 `occurrence_time` datetime DEFAULT NULL,
538 PRIMARY KEY (`id`),
539 KEY `forum_transaction_6340c63c` (`user_id`),
540 KEY `forum_transaction_95fdbe29` (`involved_user_id`),
541 KEY `forum_transaction_a12f20f1` (`involved_topic_id`),
542 KEY `forum_transaction_99093a1e` (`involved_reply_id`),
543 CONSTRAINT `involved_reply_id_refs_id_4b659a2b` FOREIGN KEY (`involved_reply_id`) REFERENCES `forum_reply` (`id`),
544 CONSTRAINT `involved_topic_id_refs_id_49e3102d` FOREIGN KEY (`involved_topic_id`) REFERENCES `forum_topic` (`id`),
545 CONSTRAINT `involved_user_id_refs_id_b0c88a45` FOREIGN KEY (`involved_user_id`) REFERENCES `forum_forumuser` (`id`),
546 CONSTRAINT `user_id_refs_id_b0c88a45` FOREIGN KEY (`user_id`) REFERENCES `forum_forumuser` (`id`)
547 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
548 /*!40101 SET character_set_client = @saved_cs_client */;
549
550 --
551 -- Dumping data for table `forum_transaction`
552 --
553
554 LOCK TABLES `forum_transaction` WRITE;
555 /*!40000 ALTER TABLE `forum_transaction` DISABLE KEYS */;
556 /*!40000 ALTER TABLE `forum_transaction` ENABLE KEYS */;
557 UNLOCK TABLES;
558
559 --
560 -- Table structure for table `forum_vote`
561 --
562
563 DROP TABLE IF EXISTS `forum_vote`;
564 /*!40101 SET @saved_cs_client = @@character_set_client */;
565 /*!40101 SET character_set_client = utf8 */;
566 CREATE TABLE `forum_vote` (
567 `id` int(11) NOT NULL AUTO_INCREMENT,
568 `status` int(11) DEFAULT NULL,
569 `involved_type` int(11) DEFAULT NULL,
570 `involved_user_id` int(11) DEFAULT NULL,
571 `involved_topic_id` int(11) DEFAULT NULL,
572 `involved_reply_id` int(11) DEFAULT NULL,
573 `trigger_user_id` int(11) DEFAULT NULL,
574 `occurrence_time` datetime DEFAULT NULL,
575 PRIMARY KEY (`id`),
576 KEY `forum_vote_95fdbe29` (`involved_user_id`),
577 KEY `forum_vote_a12f20f1` (`involved_topic_id`),
578 KEY `forum_vote_99093a1e` (`involved_reply_id`),
579 KEY `forum_vote_431bdeb9` (`trigger_user_id`),
580 CONSTRAINT `involved_reply_id_refs_id_83742c71` FOREIGN KEY (`involved_reply_id`) REFERENCES `forum_reply` (`id`),
581 CONSTRAINT `involved_topic_id_refs_id_db1cceb1` FOREIGN KEY (`involved_topic_id`) REFERENCES `forum_topic` (`id`),
582 CONSTRAINT `involved_user_id_refs_id_7a43045b` FOREIGN KEY (`involved_user_id`) REFERENCES `forum_forumuser` (`id`),
583 CONSTRAINT `trigger_user_id_refs_id_7a43045b` FOREIGN KEY (`trigger_user_id`) REFERENCES `forum_forumuser` (`id`)
584 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
585 /*!40101 SET character_set_client = @saved_cs_client */;
586
587 --
588 -- Dumping data for table `forum_vote`
589 --
590
591 LOCK TABLES `forum_vote` WRITE;
592 /*!40000 ALTER TABLE `forum_vote` DISABLE KEYS */;
593 /*!40000 ALTER TABLE `forum_vote` ENABLE KEYS */;
594 UNLOCK TABLES;
595 /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
596
597 /*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
598 /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
599 /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
600 /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
601 /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
602 /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
603 /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
604
forum/__init__.py
File was created 1 # coding: utf-8
2
3 from django.contrib import admin
4 from forum.models import ForumUser, Plane, Node, Topic, Reply, Favorite, Notification, Transaction, Vote
5
6
7 class ForumUserAdmin(admin.ModelAdmin):
8 list_display = ('username', 'email', 'is_active', 'is_staff', 'date_joined')
9 search_fields = ('username', 'email', 'nickname')
10 list_filter = ('is_active', 'is_staff', 'date_joined')
11
12
13 class PlaneAdmin(admin.ModelAdmin):
14 list_display = ('name', 'created')
15 search_fields = ('name',)
16 list_filter = ('created',)
17
18
19 class NodeAdmin(admin.ModelAdmin):
20 list_display = ('name', 'slug', 'created', 'plane')
21 search_fields = ('name',)
22 list_filter = ('created',)
23
24
25 class TopicAdmin(admin.ModelAdmin):
26 list_display = ('title', 'created')
27 search_fields = ('title', 'content')
28 list_filter = ('created',)
29
30
31 class ReplyAdmin(admin.ModelAdmin):
32 list_display = ('content', 'created')
33 search_fields = ('content',)
34 list_filter = ('created',)
35
36
37 admin.site.register(ForumUser, ForumUserAdmin)
38 admin.site.register(Plane, PlaneAdmin)
39 admin.site.register(Node, NodeAdmin)
40 admin.site.register(Topic, TopicAdmin)
41 admin.site.register(Reply, ReplyAdmin)
42 admin.site.register(Favorite)
43 admin.site.register(Notification)
44 admin.site.register(Transaction)
45 admin.site.register(Vote)
46
forum/backends.py
File was created 1 # coding: utf-8
2
3 from django.contrib.auth.backends import ModelBackend # 继承这个为了使用admin的权限控制
4 from forum.models import ForumUser
5
6 class EmailAuthBackend(ModelBackend):
7
8 def authenticate(self, email=None, password=None):
9 try:
10 user = ForumUser.objects.get(email=email)
11 if user.check_password(password):
12 return user
13 return None
14 except ForumUser.DoesNotExist:
15 return None
16
17 def get_user(self, user_id):
18 try:
19 return ForumUser.objects.get(pk=user_id)
20 except ForumUser.DoesNotExist:
21 return None
22
forum/context_processors.py
File was created 1 # coding: utf-8
2
3 def custom_proc(request):
4 return dict(
5 navigation_bar = [
6 ('/', 'topic', '社区'),
7 ('/members/', 'members', '成员'),
8 ('/', 'course', '教程'),
9 ('/', 'template', '模板'),
10 ],
11 )
12
forum/forms/__init__.py
forum/forms/topic.py
File was created 1 # coding: utf-8
2
3 from django import forms
4
5 class ReplyForm(forms.Form):
6 content = forms.CharField(error_messages={
7 'required': u'请填写回复内容',})
8
9
10 class CreateForm(forms.Form):
11 title = forms.CharField(min_length=3, max_length=56,
12 error_messages={
13 'required': u'请填写帖子标题',
14 'min_length': u'帖子标题长度过短(3-56个字符)',
15 'max_length': u'帖子标题长度过长(3-56个字符)',
16 })
17 content = forms.CharField(min_length=15,
18 error_messages={
19 'required': u'请填写帖子内容',
20 'min_length': u'帖子内容长度过短(少于15个字符)',
21 })
22
forum/forms/user.py
File was created 1 # coding: utf-8
2
3 from django import forms
4 from django.contrib.auth import authenticate
5 from django.conf import settings
6 from forum.models import ForumUser
7
8
9 error_messages = {
10 'username': {
11 'required': u'必须填写用户名',
12 'min_length': u'用户名长度过短(3-12个字符)',
13 'max_length': u'用户名长度过长(3-12个字符)',
14 'invalid': u'用户名格式错误(英文字母开头,数字,下划线构成)'
15 },
16 'email': {
17 'required': u'必须填写E-mail',
18 'min_length': u'Email长度有误',
19 'max_length': u'Email长度有误',
20 'invalid': u'Email地址无效'
21 },
22 'password': {
23 'required': u'必须填写密码',
24 'min_length': u'密码长度过短(6-64个字符)',
25 'max_length': u'密码长度过长(6-64个字符)'
26 },
27 }
28
29
30 class SettingPasswordForm(forms.Form):
31 password_old = forms.CharField(min_length=6, max_length=64,
32 error_messages=error_messages.get('password'))
33 password = forms.CharField(min_length=6, max_length=64,
34 error_messages=error_messages.get('password'))
35 password_confirm = forms.CharField(required=False)
36
37 def __init__(self, request):
38 self.user = request.user
39 super(SettingPasswordForm, self).__init__(request.POST)
40
41 def clean(self):
42 password_old = self.cleaned_data.get('password_old')
43 password = self.cleaned_data.get('password')
44 password_confirm = self.cleaned_data.get('password_confirm')
45
46 if not (password_old and self.user.check_password(password_old)):
47 raise forms.ValidationError(u'当前输入旧密码有误')
48
49 if password and password_confirm and password != password_confirm:
50 raise forms.ValidationError(u'两次输入新密码不一致')
51 return self.cleaned_data
52
53
54 class ForgotPasswordForm(forms.Form):
55 username = forms.RegexField(min_length=3, max_length=12,
56 regex=r'^[a-zA-Z][a-zA-Z0-9_]*$',
57 error_messages=error_messages.get('username'))
58 email = forms.EmailField(min_length=4, max_length=64,
59 error_messages=error_messages.get('email'))
60
61 def __init__(self, *args, **kwargs):
62 self.user_cache = None
63 super(ForgotPasswordForm, self).__init__(*args, **kwargs)
64
65 def clean(self):
66 username = self.cleaned_data.get('username')
67 email = self.cleaned_data.get('email')
68
69 if username and email:
70 try:
71 self.user_cache = ForumUser.objects.get(username=username, email=email)
72 except ForumUser.DoesNotExist:
73 raise forms.ValidationError(u'所填用户名和邮箱有误')
74 return self.cleaned_data
75
76 def get_user(self):
77 return self.user_cache
78
79
80 class LoginForm(forms.Form):
81 username = forms.CharField(min_length=3, max_length=12,
82 error_messages=error_messages.get('username'))
83 password = forms.CharField(min_length=6, max_length=64,
84 error_messages=error_messages.get('password'))
85
86 def __init__(self, *args, **kwargs):
87 self.user_cache = None
88 super(LoginForm, self).__init__(*args, **kwargs)
89
90 def clean(self):
91 import pdb; pdb.set_trace()
92 username = self.cleaned_data.get('username')
93 password = self.cleaned_data.get('password')
94
95 if username and password:
96 self.user_cache = authenticate(username=username, password=password)
97 if self.user_cache is None:
98 raise forms.ValidationError(u'用户名或者密码不正确')
99 elif not self.user_cache.is_active:
100 raise forms.ValidationError(u'用户已被锁定,请联系管理员解锁')
101 return self.cleaned_data
102
103 def get_user(self):
104 return self.user_cache
105
106
107 class RegisterForm(forms.ModelForm):
108 username = forms.RegexField(min_length=3, max_length=12,
109 regex=r'^[a-zA-Z][a-zA-Z0-9_]*$',
110 error_messages=error_messages.get('username'))
111 email = forms.EmailField(min_length=4, max_length=64,
112 error_messages=error_messages.get('email'))
113 password = forms.CharField(min_length=6, max_length=64,
114 error_messages=error_messages.get('password'))
115 password_confirm = forms.CharField(required=False)
116
117 class Meta:
118 model = ForumUser
119 fields = ('username', 'email')
120
121 def clean_username(self):
122 username = self.cleaned_data['username']
123 try:
124 ForumUser.objects.get(username=username)
125 raise forms.ValidationError(u'所填用户名已经被注册过')
126 except ForumUser.DoesNotExist:
127 if username in settings.RESERVED:
128 raise forms.ValidationError(u'用户名被保留不可用')
129 return username
130
131 def clean_email(self):
132 email = self.cleaned_data['email']
133 try:
134 ForumUser.objects.get(email=email)
135 raise forms.ValidationError(u'所填邮箱已经被注册过')
136 except ForumUser.DoesNotExist:
137 return email
138
139 def clean_password_confirm(self):
140 password1 = self.cleaned_data.get('password')
141 password2 = self.cleaned_data.get('password_confirm')
142 if password1 and password2 and password1 != password2:
143 raise forms.ValidationError(u'两次输入密码不一致')
144 return password2
145
146 def save(self, commit=True):
147 user = super(RegisterForm, self).save(commit=False)
148 user.set_password(self.cleaned_data['password'])
149 if commit:
150 user.save()
151 return user
152
153
154 class SettingForm(forms.Form):
155 username = forms.CharField() # readonly
156 email = forms.EmailField() # readonly
157 nickname = forms.CharField(min_length=3, max_length=12, required=False,
158 error_messages={
159 'min_length': u'昵称长度过短(3-12个字符)',
160 'max_length': u'昵称长度过长(3-12个字符)',
161 })
162 signature = forms.CharField(required=False)
163 location = forms.CharField(required=False)
164 website = forms.URLField(required=False,
165 error_messages={
166 'invalid': u'请填写合法的URL地址(如:http://f2e.im)',
167 })
168 company = forms.CharField(required=False)
169 github = forms.CharField(required=False)
170 twitter = forms.CharField(required=False)
171 douban = forms.CharField(required=False)
172 self_intro = forms.CharField(required=False)
173
File was created 1 #coding: utf-8
2
3 from django.db import models
4 from django.contrib.auth.models import AbstractUser
5
6
7 # 工具
8 class Pages(object):
9 '''
10 分页查询类
11 '''
12 def __init__(self, count, current_page=1, list_rows=40):
13 self.total = count
14 self._current = current_page
15 self.size = list_rows
16 self.pages = self.total // self.size + (1 if self.total % self.size else 0)
17
18 if (self.pages == 0) or (self._current < 1) or (self._current > self.pages):
19 self.start = 0
20 self.end = 0
21 self.index = 1
22 else:
23 self.start = (self._current - 1) * self.size
24 self.end = self.size + self.start
25 self.index = self._current
26 self.prev = self.index - 1 if self.index > 1 else self.index
27 self.next = self.index + 1 if self.index < self.pages else self.index
28
29
30 # 数据库字段类型定义
31 class NormalTextField(models.TextField):
32 '''
33 models.TextField 默认在MySQL上的数据类型是longtext,用不到那
34 么大,所以派生NormalTextField,只修改生成SQL时的数据类型text
35 '''
36 def db_type(self, connection):
37 return 'text'
38
39
40 # Model objects
41 class NodeManager(models.Manager):
42 '''
43 Node objects
44 '''
45 def get_all_hot_nodes(self):
46 query = self.get_queryset().filter(topic__reply_count__gt=0).order_by('-topic__reply_count')
47 query.query.group_by = ['id'] # Django使用GROUP BY方法
48 return query
49
50
51 class TopicManager(models.Manager):
52 '''
53 Topic objects
54 '''
55 def get_all_topic(self, num=36, current_page=1): # 可以考虑在这里过滤掉没有头像的用户发帖,不显示在主页
56 count = self.get_queryset().count()
57 page = Pages(count, current_page, num)
58 query = self.get_queryset().select_related('node', 'author', 'last_replied_by').\
59 all().order_by('-last_touched', '-created', '-last_replied_time', '-id')[page.start:page.end]
60 return query, page
61
62 def get_all_topics_by_node_slug(self, num = 36, current_page = 1, node_slug = None):
63 count = self.get_queryset().filter(node__slug=node_slug).count()
64 page = Pages(count, current_page, num)
65 query = self.get_queryset().select_related('node', 'author', 'last_replied_by').\
66 filter(node__slug=node_slug).order_by('-last_touched', '-created', '-last_replied_time', '-id')[page.start:page.end]
67 return query, page
68
69 def get_user_all_topics(self, uid, num = 36, current_page = 1):
70 count = self.get_queryset().filter(author__id=uid).count()
71 page = Pages(count, current_page, num)
72 query = self.get_queryset().select_related('node', 'author', 'last_replied_by').\
73 filter(author__id=uid).order_by('-id')[page.start:page.end]
74 return query, page
75
76 def get_user_all_replied_topics(self, uid, num = 36, current_page = 1):
77 pass # F2E好像写的不对,留着以后有用再说
78
79 def get_topic_by_topic_id(self, topic_id):
80 query = self.get_queryset().select_related('node', 'author', 'last_replied_by').get(pk=topic_id)
81 return query
82
83 def get_user_last_created_topic(self, uid):
84 query = self.get_queryset().filter(author__id=uid).order_by('-created')[0]
85 return query
86
87
88 class ReplyManager(models.Manager):
89 '''
90 Reply objects
91 '''
92 def get_all_replies_by_topic_id(self, topic_id, num = 16, current_page = 1):
93 count = self.get_queryset().filter(topic__id=topic_id).count()
94 page = Pages(count, current_page, num)
95 query = self.get_queryset().select_related('author').\
96 filter(topic__id=topic_id).order_by('id')[page.start:page.end]
97 return query, page
98
99 def get_user_all_replies(self, uid, num = 16, current_page = 1):
100 count = self.get_queryset().filter(author__id=uid).count()
101 page = Pages(count, current_page, num)
102 query = self.get_queryset().select_related('topic', 'topic__author').\
103 filter(author__id=uid).order_by('-id')[page.start:page.end]
104 return query, page
105
106
107 class FavoriteManager(models.Manager):
108 '''
109 favorite objects
110 '''
111 def get_user_all_favorites(self, uid, num = 16, current_page = 1):
112 count = self.get_queryset().filter(owner_user__id=uid).count()
113 page = Pages(count, current_page, num)
114 query = self.get_queryset().select_related('involved_topic', 'involved_topic__node', \
115 'involved_topic__author', 'involved_topic__last_replied_by').\
116 filter(owner_user__id=uid).order_by('-id')[page.start:page.end]
117 return query, page
118
119
120 class NotificationManager(models.Manager):
121 '''
122 Notification objects
123 '''
124 def get_user_all_notifications(self, uid, num = 16, current_page = 1):
125 count = self.get_queryset().filter(involved_user__id=uid).count()
126 page = Pages(count, current_page, num)
127 query = self.get_queryset().select_related('trigger_user', 'involved_topic').\
128 filter(involved_user__id=uid).order_by('-id')[page.start:page.end]
129 return query, page
130
131
132 # 数据库表结构
133 class ForumUser(AbstractUser):
134 '''
135 django.contrib.auth.models.User 默认User类字段太少,用AbstractUser
136 自定义一个User类,增加字段
137 '''
138 nickname = models.CharField(max_length=200, null=True, blank=True)
139 avatar = models.CharField(max_length=200, null=True, blank=True) # 头像
140 signature = models.CharField(max_length=500, null=True, blank=True) # 签名
141 location = models.CharField(max_length=200, null=True, blank=True)
142 website = models.URLField(null=True, blank=True)
143 company = models.CharField(max_length=200, null=True, blank=True)
144 role = models.IntegerField(null=True, blank=True) # 角色
145 balance = models.IntegerField(null=True, blank=True) # 余额
146 reputation = models.IntegerField(null=True, blank=True) # 声誉
147 self_intro = models.CharField(max_length=500, null=True, blank=True)# 自我介绍
148 updated = models.DateTimeField(null=True, blank=True)
149 twitter = models.CharField(max_length=200, null=True, blank=True)
150 github = models.CharField(max_length=200, null=True, blank=True)
151 douban = models.CharField(max_length=200, null=True, blank=True)
152
153
154 class Plane(models.Model):
155 '''
156 论坛节点分类
157 '''
158 name = models.CharField(max_length=200, null=True, blank=True)
159 created = models.DateTimeField(null=True, blank=True)
160 updated = models.DateTimeField(null=True, blank=True)
161
162 def __unicode__(self):
163 return self.name
164
165 class Node(models.Model):
166 '''
167 论坛板块单位,节点
168 '''
169 name = models.CharField(max_length=200, null=True, blank=True)
170 slug = models.CharField(max_length=200, null=True, blank=True) # 块,作为node的识别url
171 thumb = models.CharField(max_length=200, null=True, blank=True) # 拇指?
172 introduction = models.CharField(max_length=500, null=True, blank=True) # 介绍
173 created = models.DateTimeField(null=True, blank=True)
174 updated = models.DateTimeField(null=True, blank=True)
175 plane = models.ForeignKey(Plane, null=True, blank=True)
176 topic_count = models.IntegerField(null=True, blank=True)
177 custom_style = NormalTextField(null=True, blank=True)
178 limit_reputation = models.IntegerField(null=True, blank=True) # 最小声誉,估计是权限控制
179
180 objects = NodeManager()
181
182
183 class Topic(models.Model):
184 '''
185 话题表,定义了论坛帖子的基本单位
186 '''
187 title = models.CharField(max_length=200, null=True, blank=True)
188 content = NormalTextField(null=True, blank=True)
189 status = models.IntegerField(null=True, blank=True)
190 hits = models.IntegerField(null=True, blank=True)
191 created = models.DateTimeField(null=True, blank=True)
192 updated = models.DateTimeField(null=True, blank=True)
193 node = models.ForeignKey(Node, null=True, blank=True)
194 author = models.ForeignKey(ForumUser, related_name='topic_author', null=True, blank=True) # 设置了related_name后,可不用_set
195 reply_count = models.IntegerField(null=True, blank=True)
196 last_replied_by = models.ForeignKey(ForumUser, related_name='topic_last', null=True, blank=True)
197 last_replied_time = models.DateTimeField(null=True, blank=True)
198 up_vote = models.IntegerField(null=True, blank=True)
199 down_vote = models.IntegerField(null=True, blank=True)
200 last_touched = models.DateTimeField(null=True, blank=True)
201
202 objects = TopicManager()
203
204
205 class Reply(models.Model):
206 '''
207 话题的回复
208 '''
209 topic = models.ForeignKey(Topic, null=True, blank=True)
210 author = models.ForeignKey(ForumUser, related_name='reply_author', null=True, blank=True)
211 content = NormalTextField(null=True, blank=True)
212 created = models.DateTimeField(null=True, blank=True)
213 updated = models.DateTimeField(null=True, blank=True)
214 up_vote = models.IntegerField(null=True, blank=True)
215 down_vote = models.IntegerField(null=True, blank=True)
216 last_touched = models.DateTimeField(null=True, blank=True)
217
218 objects = ReplyManager()
219
220
221 class Favorite(models.Model):
222 '''
223 用户收藏的话题或回复
224 '''
225 owner_user = models.ForeignKey(ForumUser, related_name='fav_user', null=True, blank=True)
226 involved_type = models.IntegerField(null=True, blank=True)
227 involved_topic = models.ForeignKey(Topic, related_name='fav_topic', null=True, blank=True)
228 involved_reply = models.ForeignKey(Reply, related_name='fav_reply', null=True, blank=True)
229 created = models.DateTimeField(null=True, blank=True)
230
231 objects = FavoriteManager()
232
233
234 class Notification(models.Model):
235 '''
236 通知消息
237 '''
238 content = NormalTextField(null=True, blank=True)
239 status = models.IntegerField(null=True, blank=True)
240 involved_type = models.IntegerField(null=True, blank=True)
241 involved_user = models.ForeignKey(ForumUser, related_name='notify_user', null=True, blank=True)
242 involved_topic = models.ForeignKey(Topic, related_name='notify_topic', null=True, blank=True)
243 involved_reply = models.ForeignKey(Reply, related_name='notify_reply', null=True, blank=True)
244 trigger_user = models.ForeignKey(ForumUser, related_name='notify_trigger', null=True, blank=True)
245 occurrence_time = models.DateTimeField(null=True, blank=True)
246
247 objects = NotificationManager()
248
249
250 class Transaction(models.Model):
251 '''
252 交易
253 '''
254 type = models.IntegerField(null=True, blank=True)
255 reward = models.IntegerField(null=True, blank=True)
256 user = models.ForeignKey(ForumUser, related_name='trans_user', null=True, blank=True)
257 current_balance = models.IntegerField(null=True, blank=True)
258 involved_user = models.ForeignKey(ForumUser, related_name='trans_involved', null=True, blank=True)
259 involved_topic = models.ForeignKey(Topic, related_name='trans_topic', null=True, blank=True)
260 involved_reply = models.ForeignKey(Reply, related_name='trans_reply', null=True, blank=True)
261 occurrence_time = models.DateTimeField(null=True, blank=True)
262
263
264 class Vote(models.Model):
265 '''
266 投票
267 '''
268 status = models.IntegerField(null=True, blank=True)
269 involved_type = models.IntegerField(null=True, blank=True)
270 involved_user = models.ForeignKey(ForumUser, related_name='vote_user', null=True, blank=True)
271 involved_topic = models.ForeignKey(Topic, related_name='vote_topic', null=True, blank=True)
272 involved_reply = models.ForeignKey(Reply, related_name='vote_reply', null=True, blank=True)
273 trigger_user = models.ForeignKey(ForumUser, related_name='vote_trigger', null=True, blank=True)
274 occurrence_time = models.DateTimeField(null=True, blank=True)
275
File was created 1 # coding: utf-8
2
3
4 from django.contrib.sitemaps import Sitemap
5 from forum.models import Topic
6
7
8 class TopicSitemap(Sitemap):
9 changefreq = "never"
10 priority = 0.5
11
12 def items(self):
13 return Topic.objects.all().order_by('-created', '-id')
14
15 def lastmod(self, obj):
16 return obj.created
17
18 def location(self, obj):
19 return '/t/%s/' % obj.id
20
forum/static/avatar/b_default.png

4.51 KB

forum/static/avatar/m_default.png

3.89 KB

forum/static/avatar/s_default.png

3.86 KB

forum/static/css/base/atom.css
File was created 1 /*文字排版*/
2 .f12 {
3 font-size: 12px; }
4
5 .f13 {
6 font-size: 13px; }
7
8 .f14 {
9 font-size: 14px; }
10
11 .f16 {
12 font-size: 16px; }
13
14 .f20 {
15 font-size: 20px; }
16
17 .fb {
18 font-weight: bold; }
19
20 .fn {
21 font-weight: normal; }
22
23 .t2 {
24 text-indent: 2em; }
25
26 .lh150 {
27 line-height: 150%; }
28
29 .lh180 {
30 line-height: 180%; }
31
32 .lh200 {
33 line-height: 200%; }
34
35 .unl {
36 text-decoration: underline; }
37
38 .no_unl {
39 text-decoration: none; }
40
41 /*定位*/
42 .tl {
43 text-align: left; }
44
45 .tc {
46 text-align: center; }
47
48 .tr {
49 text-align: right; }
50
51 .bc {
52 margin-left: auto;
53 margin-right: auto; }
54
55 .fl {
56 float: left;
57 display: inline; }
58
59 .fr {
60 float: right;
61 display: inline; }
62
63 .cb {
64 clear: both; }
65
66 .cl {
67 clear: left; }
68
69 .cr {
70 clear: right; }
71
72 .clearfix:after {
73 content: ".";
74 display: block;
75 height: 0;
76 clear: both;
77 visibility: hidden; }
78
79 .clearfix {
80 display: inline-block; }
81
82 * html .clearfix {
83 height: 1%; }
84
85 .clearfix {
86 display: block; }
87
88 .vm {
89 vertical-align: middle; }
90
91 .pr {
92 position: relative; }
93
94 .pa {
95 position: absolute; }
96
97 .abs-right {
98 position: absolute;
99 right: 0; }
100
101 .zoom {
102 zoom: 1; }
103
104 .hidden {
105 visibility: hidden; }
106
107 .none {
108 display: none; }
109
110 /*长度高度*/
111 .w10 {
112 width: 10px; }
113
114 .w20 {
115 width: 20px; }
116
117 .w30 {
118 width: 30px; }
119
120 .w40 {
121 width: 40px; }
122
123 .w50 {
124 width: 50px; }
125
126 .w60 {
127 width: 60px; }
128
129 .w70 {
130 width: 70px; }
131
132 .w80 {
133 width: 80px; }
134
135 .w90 {
136 width: 90px; }
137
138 .w100 {
139 width: 100px; }
140
141 .w200 {
142 width: 200px; }
143
144 .w250 {
145 width: 250px; }
146
147 .w300 {
148 width: 300px; }
149
150 .w400 {
151 width: 400px; }
152
153 .w500 {
154 width: 500px; }
155
156 .w600 {
157 width: 600px; }
158
159 .w700 {
160 width: 700px; }
161
162 .w800 {
163 width: 800px; }
164
165 .w {
166 width: 100%; }
167
168 .h50 {
169 height: 50px; }
170
171 .h80 {
172 height: 80px; }
173
174 .h100 {
175 height: 100px; }
176
177 .h200 {
178 height: 200px; }
179
180 .h {
181 height: 100%; }
182
183 /*边距*/
184 .m10 {
185 margin: 10px; }
186
187 .m15 {
188 margin: 15px; }
189
190 .m30 {
191 margin: 30px; }
192
193 .mt5 {
194 margin-top: 5px; }
195
196 .mt10 {
197 margin-top: 10px; }
198
199 .mt15 {
200 margin-top: 15px; }
201
202 .mt20 {
203 margin-top: 20px; }
204
205 .mt30 {
206 margin-top: 30px; }
207
208 .mt50 {
209 margin-top: 50px; }
210
211 .mt100 {
212 margin-top: 100px; }
213
214 .mb10 {
215 margin-bottom: 10px; }
216
217 .mb15 {
218 margin-bottom: 15px; }
219
220 .mb20 {
221 margin-bottom: 20px; }
222
223 .mb30 {
224 margin-bottom: 30px; }
225
226 .mb50 {
227 margin-bottom: 50px; }
228
229 .mb100 {
230 margin-bottom: 100px; }
231
232 .ml5 {
233 margin-left: 5px; }
234
235 .ml10 {
236 margin-left: 10px; }
237
238 .ml15 {
239 margin-left: 15px; }
240
241 .ml20 {
242 margin-left: 20px; }
243
244 .ml30 {
245 margin-left: 30px; }
246
247 .ml50 {
248 margin-left: 50px; }
249
250 .ml100 {
251 margin-left: 100px; }
252
253 .mr5 {
254 margin-right: 5px; }
255
256 .mr10 {
257 margin-right: 10px; }
258
259 .mr15 {
260 margin-right: 15px; }
261
262 .mr20 {
263 margin-right: 20px; }
264
265 .mr30 {
266 margin-right: 30px; }
267
268 .mr50 {
269 margin-right: 50px; }
270
271 .mr100 {
272 margin-right: 100px; }
273
274 .p10 {
275 padding: 10px; }
276
277 .p15 {
278 padding: 15px; }
279
280 .p20 {
281 padding: 20px; }
282
283 .p30 {
284 padding: 30px; }
285
286 .pt5 {
287 padding-top: 5px; }
288
289 .pt10 {
290 padding-top: 10px; }
291
292 .pt15 {
293 padding-top: 15px; }
294
295 .pt20 {
296 padding-top: 20px; }
297
298 .pt30 {
299 padding-top: 30px; }
300
301 .pt50 {
302 padding-top: 50px; }
303
304 .pb5 {
305 padding-bottom: 5px; }
306
307 .pb10 {
308 padding-bottom: 10px; }
309
310 .pb15 {
311 padding-bottom: 15px; }
312
313 .pb20 {
314 padding-bottom: 20px; }
315
316 .pb30 {
317 padding-bottom: 30px; }
318
319 .pb50 {
320 padding-bottom: 50px; }
321
322 .pb100 {
323 padding-bottom: 100px; }
324
325 .pl5 {
326 padding-left: 5px; }
327
328 .pl10 {
329 padding-left: 10px; }
330
331 .pl15 {
332 padding-left: 15px; }
333
334 .pl20 {
335 padding-left: 20px; }
336
337 .pl30 {
338 padding-left: 30px; }
339
340 .pl50 {
341 padding-left: 50px; }
342
343 .pl100 {
344 padding-left: 100px; }
345
346 .pr5 {
347 padding-right: 5px; }
348
349 .pr10 {
350 padding-right: 10px; }
351
352 .pr15 {
353 padding-right: 15px; }
354
355 .pr20 {
356 padding-right: 20px; }
357
358 .pr30 {
359 padding-right: 30px; }
360
361 .pr50 {
362 padding-right: 50px; }
363
364 .pr100 {
365 padding-right: 100px; }
366
367 .clearfix {
368 zoom: 1;
369 /* IE < 8 */ }
370 .clearfix:before, .clearfix:after {
371 content: ".";
372 display: block;
373 height: 0;
374 visibility: hidden; }
375 .clearfix:after {
376 clear: both; }
377
378 .clear {
379 clear: both; }
380
forum/static/css/base/atom.scss
File was created 1 /*文字排版*/
2 .f12 {font-size:12px;}
3 .f13 {font-size:13px;}
4 .f14 {font-size:14px;}
5 .f16 {font-size:16px;}
6 .f20 {font-size:20px;}
7 .fb {font-weight:bold;}
8 .fn {font-weight:normal;}
9 .t2 {text-indent:2em;}
10 .lh150 {line-height:150%;}
11 .lh180 {line-height:180%;}
12 .lh200 {line-height:200%;}
13 .unl {text-decoration:underline;}
14 .no_unl {text-decoration:none;}
15
16 /*定位*/
17 .tl {text-align:left;}
18 .tc {text-align:center;}
19 .tr {text-align:right;}
20 .bc {margin-left:auto;margin-right:auto;}
21 .fl {float:left;display:inline;}
22 .fr {float:right;display:inline;}
23 .cb {clear:both;}
24 .cl {clear:left;}
25 .cr {clear:right;}
26 .clearfix:after {content:".";display:block;height:0;clear:both;visibility:hidden;}
27 .clearfix {display:inline-block;}* html .clearfix{height:1%}.clearfix{display:block}
28 .vm {vertical-align:middle;}
29 .pr {position:relative;}
30 .pa {position:absolute;}
31 .abs-right {position:absolute;right:0;}
32 .zoom {zoom:1;}
33 .hidden {visibility:hidden;}
34 .none {display:none;}
35
36 /*长度高度*/
37 .w10 {width:10px;}
38 .w20 {width:20px;}
39 .w30 {width:30px;}
40 .w40 {width:40px;}
41 .w50 {width:50px;}
42 .w60 {width:60px;}
43 .w70 {width:70px;}
44 .w80 {width:80px;}
45 .w90 {width:90px;}
46 .w100 {width:100px;}
47 .w200 {width:200px;}
48 .w250 {width:250px;}
49 .w300 {width:300px;}
50 .w400 {width:400px;}
51 .w500 {width:500px;}
52 .w600 {width:600px;}
53 .w700 {width:700px;}
54 .w800 {width:800px;}
55 .w {width:100%;}
56 .h50 {height:50px;}
57 .h80 {height:80px;}
58 .h100 {height:100px;}
59 .h200 {height:200px;}
60 .h {height:100%;}
61
62 /*边距*/
63 .m10 {margin:10px;}
64 .m15 {margin:15px;}
65 .m30 {margin:30px;}
66 .mt5 {margin-top:5px;}
67 .mt10 {margin-top:10px;}
68 .mt15 {margin-top:15px;}
69 .mt20 {margin-top:20px;}
70 .mt30 {margin-top:30px;}
71 .mt50 {margin-top:50px;}
72 .mt100 {margin-top:100px;}
73 .mb10 {margin-bottom:10px;}
74 .mb15 {margin-bottom:15px;}
75 .mb20 {margin-bottom:20px;}
76 .mb30 {margin-bottom:30px;}
77 .mb50 {margin-bottom:50px;}
78 .mb100 {margin-bottom:100px;}
79 .ml5 {margin-left:5px;}
80 .ml10 {margin-left:10px;}
81 .ml15 {margin-left:15px;}
82 .ml20 {margin-left:20px;}
83 .ml30 {margin-left:30px;}
84 .ml50 {margin-left:50px;}
85 .ml100 {margin-left:100px;}
86 .mr5 {margin-right:5px;}
87 .mr10 {margin-right:10px;}
88 .mr15 {margin-right:15px;}
89 .mr20 {margin-right:20px;}
90 .mr30 {margin-right:30px;}
91 .mr50 {margin-right:50px;}
92 .mr100 {margin-right:100px;}
93 .p10 {padding:10px;}
94 .p15 {padding:15px;}
95 .p20 {padding:20px;}
96 .p30 {padding:30px;}
97 .pt5 {padding-top:5px;}
98 .pt10 {padding-top:10px;}
99 .pt15 {padding-top:15px;}
100 .pt20 {padding-top:20px;}
101 .pt30 {padding-top:30px;}
102 .pt50 {padding-top:50px;}
103 .pb5 {padding-bottom:5px;}
104 .pb10 {padding-bottom:10px;}
105 .pb15 {padding-bottom:15px;}
106 .pb20 {padding-bottom:20px;}
107 .pb30 {padding-bottom:30px;}
108 .pb50 {padding-bottom:50px;}
109 .pb100 {padding-bottom:100px;}
110 .pl5 {padding-left:5px;}
111 .pl10 {padding-left:10px;}
112 .pl15 {padding-left:15px;}
113 .pl20 {padding-left:20px;}
114 .pl30 {padding-left:30px;}
115 .pl50 {padding-left:50px;}
116 .pl100 {padding-left:100px;}
117 .pr5 {padding-right:5px;}
118 .pr10 {padding-right:10px;}
119 .pr15 {padding-right:15px;}
120 .pr20 {padding-right:20px;}
121 .pr30 {padding-right:30px;}
122 .pr50 {padding-right:50px;}
123 .pr100 {padding-right:100px;}
124
125 .clearfix {
126 zoom: 1; /* IE < 8 */
127
128 &:before,
129 &:after {
130 content: ".";
131 display: block;
132 height: 0;
133 visibility: hidden;
134 }
135
136 &:after {
137 clear: both;
138 }
139 }
140
141 .clear {
142 clear: both;
143 }
144
forum/static/css/base/octicons.css
File was created 1 @font-face {
2 font-family: 'octicons';
3 src: url("/static/octicons/octicons-d3d0b82bf791ac147d72bbf0287cdde8ee5c97b8.eot");
4 src: url("/static/octicons/octicons-d3d0b82bf791ac147d72bbf0287cdde8ee5c97b8.eot#iefix") format("embedded-opentype"), url("/static/octicons/octicons-a60d585f754059c3c2ef731f853c38c157040b9c.woff") format("woff"), url("/static/octicons/octicons-8b97c2cd5068ec4620cbde3140db257b1924a192.ttf") format("truetype"), url("/static/octicons/octicons-a8248bbb3baccca60948d81d69e3406b71956a69.svg#octicons") format("svg");
5 font-weight: normal;
6 font-style: normal; }
7
8 .octicon {
9 font: normal normal 16px octicons;
10 line-height: 1;
11 display: inline-block;
12 text-decoration: none;
13 -webkit-font-smoothing: antialiased; }
14
15 .mega-octicon {
16 font: normal normal 32px octicons;
17 line-height: 1;
18 display: inline-block;
19 text-decoration: none;
20 -webkit-font-smoothing: antialiased; }
21
22 .octicon-alert:before {
23 content: '\f02d'; }
24
25 .octicon-alignment-align:before {
26 content: '\f08a'; }
27
28 .octicon-alignment-aligned-to:before {
29 content: '\f08e'; }
30
31 .octicon-alignment-unalign:before {
32 content: '\f08b'; }
33
34 .octicon-arrow-down:before {
35 content: '\f03f'; }
36
37 .octicon-arrow-left:before {
38 content: '\f040'; }
39
40 .octicon-arrow-right:before {
41 content: '\f03e'; }
42
43 .octicon-arrow-small-down:before {
44 content: '\f0a0'; }
45
46 .octicon-arrow-small-left:before {
47 content: '\f0a1'; }
48
49 .octicon-arrow-small-right:before {
50 content: '\f071'; }
51
52 .octicon-arrow-small-up:before {
53 content: '\f09f'; }
54
55 .octicon-arrow-up:before {
56 content: '\f03d'; }
57
58 .octicon-beer:before {
59 content: '\f069'; }
60
61 .octicon-book:before {
62 content: '\f007'; }
63
64 .octicon-bookmark:before {
65 content: '\f07b'; }
66
67 .octicon-broadcast:before {
68 content: '\f048'; }
69
70 .octicon-bug:before {
71 content: '\f091'; }
72
73 .octicon-calendar:before {
74 content: '\f068'; }
75
76 .octicon-check:before {
77 content: '\f03a'; }
78
79 .octicon-checklist:before {
80 content: '\f076'; }
81
82 .octicon-chevron-down:before {
83 content: '\f0a3'; }
84
85 .octicon-chevron-left:before {
86 content: '\f0a4'; }
87
88 .octicon-chevron-right:before {
89 content: '\f078'; }
90
91 .octicon-chevron-up:before {
92 content: '\f0a2'; }
93
94 .octicon-circle-slash:before {
95 content: '\f084'; }
96
97 .octicon-clippy:before {
98 content: '\f035'; }
99
100 .octicon-clock:before {
101 content: '\f046'; }
102
103 .octicon-cloud-download:before {
104 content: '\f00b'; }
105
106 .octicon-cloud-upload:before {
107 content: '\f00c'; }
108
109 .octicon-code:before {
110 content: '\f05f'; }
111
112 .octicon-color-mode:before {
113 content: '\f065'; }
114
115 .octicon-comment:before {
116 content: '\f02b'; }
117
118 .octicon-comment-add:before {
119 content: '\f06f'; }
120
121 .octicon-comment-discussion:before {
122 content: '\f04f'; }
123
124 .octicon-credit-card:before {
125 content: '\f045'; }
126
127 .octicon-dashboard:before {
128 content: '\f07d'; }
129
130 .octicon-database:before {
131 content: '\f096'; }
132
133 .octicon-device-camera:before {
134 content: '\f056'; }
135
136 .octicon-device-camera-video:before {
137 content: '\f057'; }
138
139 .octicon-device-desktop:before {
140 content: '\f27c'; }
141
142 .octicon-device-mobile:before {
143 content: '\f038'; }
144
145 .octicon-diff:before {
146 content: '\f04d'; }
147
148 .octicon-diff-added:before {
149 content: '\f06b'; }
150
151 .octicon-diff-ignored:before {
152 content: '\f099'; }
153
154 .octicon-diff-modified:before {
155 content: '\f06d'; }
156
157 .octicon-diff-removed:before {
158 content: '\f06c'; }
159
160 .octicon-diff-renamed:before {
161 content: '\f06e'; }
162
163 .octicon-ellipsis:before {
164 content: '\f09a'; }
165
166 .octicon-eye:before {
167 content: '\f04e'; }
168
169 .octicon-eye-unwatch:before {
170 content: '\f01e'; }
171
172 .octicon-eye-watch:before {
173 content: '\f01d'; }
174
175 .octicon-file-add:before {
176 content: '\f086'; }
177
178 .octicon-file-binary:before {
179 content: '\f094'; }
180
181 .octicon-file-code:before {
182 content: '\f010'; }
183
184 .octicon-file-directory:before {
185 content: '\f016'; }
186
187 .octicon-file-directory-create:before {
188 content: '\f095'; }
189
190 .octicon-file-media:before {
191 content: '\f012'; }
192
193 .octicon-file-pdf:before {
194 content: '\f014'; }
195
196 .octicon-file-submodule:before {
197 content: '\f017'; }
198
199 .octicon-file-symlink-directory:before {
200 content: '\f0b1'; }
201
202 .octicon-file-symlink-file:before {
203 content: '\f0b0'; }
204
205 .octicon-file-text:before {
206 content: '\f011'; }
207
208 .octicon-file-zip:before {
209 content: '\f013'; }
210
211 .octicon-gear:before {
212 content: '\f02f'; }
213
214 .octicon-gift:before {
215 content: '\f042'; }
216
217 .octicon-gist:before {
218 content: '\f00e'; }
219
220 .octicon-gist-fork:before {
221 content: '\f079'; }
222
223 .octicon-gist-new:before {
224 content: '\f07a'; }
225
226 .octicon-gist-private:before {
227 content: '\f00f'; }
228
229 .octicon-gist-secret:before {
230 content: '\f08c'; }
231
232 .octicon-git-branch:before {
233 content: '\f020'; }
234
235 .octicon-git-branch-create:before {
236 content: '\f098'; }
237
238 .octicon-git-branch-delete:before {
239 content: '\f09b'; }
240
241 .octicon-git-commit:before {
242 content: '\f01f'; }
243
244 .octicon-git-compare:before {
245 content: '\f0ac'; }
246
247 .octicon-git-fork-private:before {
248 content: '\f021'; }
249
250 .octicon-git-merge:before {
251 content: '\f023'; }
252
253 .octicon-git-pull-request:before {
254 content: '\f009'; }
255
256 .octicon-git-pull-request-abandoned:before {
257 content: '\f090'; }
258
259 .octicon-globe:before {
260 content: '\f0b6'; }
261
262 .octicon-graph:before {
263 content: '\f043'; }
264
265 .octicon-history:before {
266 content: '\f07e'; }
267
268 .octicon-home:before {
269 content: '\f08d'; }
270
271 .octicon-horizontal-rule:before {
272 content: '\f070'; }
273
274 .octicon-hourglass:before {
275 content: '\f09e'; }
276
277 .octicon-hubot:before {
278 content: '\f09d'; }
279
280 .octicon-info:before {
281 content: '\f059'; }
282
283 .octicon-issue-closed:before {
284 content: '\f028'; }
285
286 .octicon-issue-opened:before {
287 content: '\f026'; }
288
289 .octicon-issue-reopened:before {
290 content: '\f027'; }
291
292 .octicon-jersey:before {
293 content: '\f019'; }
294
295 .octicon-jump-down:before {
296 content: '\f072'; }
297
298 .octicon-jump-left:before {
299 content: '\f0a5'; }
300
301 .octicon-jump-right:before {
302 content: '\f0a6'; }
303
304 .octicon-jump-up:before {
305 content: '\f073'; }
306
307 .octicon-key:before {
308 content: '\f049'; }
309
310 .octicon-keyboard:before {
311 content: '\f00d'; }
312
313 .octicon-light-bulb:before {
314 content: '\f000'; }
315
316 .octicon-link:before {
317 content: '\f05c'; }
318
319 .octicon-link-external:before {
320 content: '\f07f'; }
321
322 .octicon-list-ordered:before {
323 content: '\f062'; }
324
325 .octicon-list-unordered:before {
326 content: '\f061'; }
327
328 .octicon-location:before {
329 content: '\f060'; }
330
331 .octicon-lock:before {
332 content: '\f06a'; }
333
334 .octicon-log-in:before {
335 content: '\f036'; }
336
337 .octicon-log-out:before {
338 content: '\f032'; }
339
340 .octicon-logo-github:before {
341 content: '\f092'; }
342
343 .octicon-mail:before {
344 content: '\f03b'; }
345
346 .octicon-mail-read:before {
347 content: '\f03c'; }
348
349 .octicon-mail-reply:before {
350 content: '\f051'; }
351
352 .octicon-mark-github:before {
353 content: '\f00a'; }
354
355 .octicon-mark-twitter:before {
356 content: '\f0ae'; }
357
358 .octicon-megaphone:before {
359 content: '\f077'; }
360
361 .octicon-microscope:before {
362 content: '\f089'; }
363
364 .octicon-milestone:before {
365 content: '\f075'; }
366
367 .octicon-mirror-private:before {
368 content: '\f025'; }
369
370 .octicon-mirror-public:before {
371 content: '\f024'; }
372
373 .octicon-move-down:before {
374 content: '\f0a8'; }
375
376 .octicon-move-left:before {
377 content: '\f074'; }
378
379 .octicon-move-right:before {
380 content: '\f0a9'; }
381
382 .octicon-move-up:before {
383 content: '\f0a7'; }
384
385 .octicon-mute:before {
386 content: '\f080'; }
387
388 .octicon-no-newline:before {
389 content: '\f09c'; }
390
391 .octicon-octoface:before {
392 content: '\f008'; }
393
394 .octicon-organization:before {
395 content: '\f037'; }
396
397 .octicon-pencil:before {
398 content: '\f058'; }
399
400 .octicon-person:before {
401 content: '\f018'; }
402
403 .octicon-person-add:before {
404 content: '\f01a'; }
405
406 .octicon-person-follow:before {
407 content: '\f01c'; }
408
409 .octicon-person-remove:before {
410 content: '\f01b'; }
411
412 .octicon-pin:before {
413 content: '\f041'; }
414
415 .octicon-plus:before {
416 content: '\f05d'; }
417
418 .octicon-podium:before {
419 content: '\f0af'; }
420
421 .octicon-primitive-dot:before {
422 content: '\f052'; }
423
424 .octicon-primitive-square:before {
425 content: '\f053'; }
426
427 .octicon-pulse:before {
428 content: '\f085'; }
429
430 .octicon-question:before {
431 content: '\f02c'; }
432
433 .octicon-quote:before {
434 content: '\f063'; }
435
436 .octicon-radio-tower:before {
437 content: '\f030'; }
438
439 .octicon-remove-close:before {
440 content: '\f050'; }
441
442 .octicon-repo:before {
443 content: '\f001'; }
444
445 .octicon-repo-clone:before {
446 content: '\f04c'; }
447
448 .octicon-repo-create:before {
449 content: '\f003'; }
450
451 .octicon-repo-delete:before {
452 content: '\f004'; }
453
454 .octicon-repo-force-push:before {
455 content: '\f04a'; }
456
457 .octicon-repo-forked:before {
458 content: '\f002'; }
459
460 .octicon-repo-pull:before {
461 content: '\f006'; }
462
463 .octicon-repo-push:before {
464 content: '\f005'; }
465
466 .octicon-repo-sync:before {
467 content: '\f04b'; }
468
469 .octicon-rocket:before {
470 content: '\f033'; }
471
472 .octicon-rss:before {
473 content: '\f034'; }
474
475 .octicon-ruby:before {
476 content: '\f047'; }
477
478 .octicon-screen-full:before {
479 content: '\f066'; }
480
481 .octicon-screen-normal:before {
482 content: '\f067'; }
483
484 .octicon-search:before {
485 content: '\f02e'; }
486
487 .octicon-server:before {
488 content: '\f097'; }
489
490 .octicon-settings:before {
491 content: '\f07c'; }
492
493 .octicon-squirrel:before {
494 content: '\f0b2'; }
495
496 .octicon-star:before {
497 content: '\f02a'; }
498
499 .octicon-star-add:before {
500 content: '\f082'; }
501
502 .octicon-star-delete:before {
503 content: '\f083'; }
504
505 .octicon-stop:before {
506 content: '\f08f'; }
507
508 .octicon-sync:before {
509 content: '\f087'; }
510
511 .octicon-tag:before {
512 content: '\f015'; }
513
514 .octicon-tag-add:before {
515 content: '\f054'; }
516
517 .octicon-tag-remove:before {
518 content: '\f055'; }
519
520 .octicon-telescope:before {
521 content: '\f088'; }
522
523 .octicon-three-bars:before {
524 content: '\f05e'; }
525
526 .octicon-tools:before {
527 content: '\f031'; }
528
529 .octicon-triangle-down:before {
530 content: '\f05b'; }
531
532 .octicon-triangle-left:before {
533 content: '\f044'; }
534
535 .octicon-triangle-right:before {
536 content: '\f05a'; }
537
538 .octicon-triangle-up:before {
539 content: '\f0aa'; }
540
541 .octicon-unfold:before {
542 content: '\f039'; }
543
544 .octicon-versions:before {
545 content: '\f064'; }
546
547 .octicon-x:before {
548 content: '\f081'; }
549
550 .octicon-zap:before {
551 content: '\26A1'; }
552
forum/static/css/base/octicons.scss
File was created 1 @font-face{font-family:'octicons';src:url("/static/octicons/octicons-d3d0b82bf791ac147d72bbf0287cdde8ee5c97b8.eot");src:url("/static/octicons/octicons-d3d0b82bf791ac147d72bbf0287cdde8ee5c97b8.eot#iefix") format("embedded-opentype"),url("/static/octicons/octicons-a60d585f754059c3c2ef731f853c38c157040b9c.woff") format("woff"),url("/static/octicons/octicons-8b97c2cd5068ec4620cbde3140db257b1924a192.ttf") format("truetype"),url("/static/octicons/octicons-a8248bbb3baccca60948d81d69e3406b71956a69.svg#octicons") format("svg");font-weight:normal;font-style:normal}.octicon{font:normal normal 16px octicons;line-height:1;display:inline-block;text-decoration:none;-webkit-font-smoothing:antialiased}.mega-octicon{font:normal normal 32px octicons;line-height:1;display:inline-block;text-decoration:none;-webkit-font-smoothing:antialiased}.octicon-alert:before{content:'\f02d'}.octicon-alignment-align:before{content:'\f08a'}.octicon-alignment-aligned-to:before{content:'\f08e'}.octicon-alignment-unalign:before{content:'\f08b'}.octicon-arrow-down:before{content:'\f03f'}.octicon-arrow-left:before{content:'\f040'}.octicon-arrow-right:before{content:'\f03e'}.octicon-arrow-small-down:before{content:'\f0a0'}.octicon-arrow-small-left:before{content:'\f0a1'}.octicon-arrow-small-right:before{content:'\f071'}.octicon-arrow-small-up:before{content:'\f09f'}.octicon-arrow-up:before{content:'\f03d'}.octicon-beer:before{content:'\f069'}.octicon-book:before{content:'\f007'}.octicon-bookmark:before{content:'\f07b'}.octicon-broadcast:before{content:'\f048'}.octicon-bug:before{content:'\f091'}.octicon-calendar:before{content:'\f068'}.octicon-check:before{content:'\f03a'}.octicon-checklist:before{content:'\f076'}.octicon-chevron-down:before{content:'\f0a3'}.octicon-chevron-left:before{content:'\f0a4'}.octicon-chevron-right:before{content:'\f078'}.octicon-chevron-up:before{content:'\f0a2'}.octicon-circle-slash:before{content:'\f084'}.octicon-clippy:before{content:'\f035'}.octicon-clock:before{content:'\f046'}.octicon-cloud-download:before{content:'\f00b'}.octicon-cloud-upload:before{content:'\f00c'}.octicon-code:before{content:'\f05f'}.octicon-color-mode:before{content:'\f065'}.octicon-comment:before{content:'\f02b'}.octicon-comment-add:before{content:'\f06f'}.octicon-comment-discussion:before{content:'\f04f'}.octicon-credit-card:before{content:'\f045'}.octicon-dashboard:before{content:'\f07d'}.octicon-database:before{content:'\f096'}.octicon-device-camera:before{content:'\f056'}.octicon-device-camera-video:before{content:'\f057'}.octicon-device-desktop:before{content:'\f27c'}.octicon-device-mobile:before{content:'\f038'}.octicon-diff:before{content:'\f04d'}.octicon-diff-added:before{content:'\f06b'}.octicon-diff-ignored:before{content:'\f099'}.octicon-diff-modified:before{content:'\f06d'}.octicon-diff-removed:before{content:'\f06c'}.octicon-diff-renamed:before{content:'\f06e'}.octicon-ellipsis:before{content:'\f09a'}.octicon-eye:before{content:'\f04e'}.octicon-eye-unwatch:before{content:'\f01e'}.octicon-eye-watch:before{content:'\f01d'}.octicon-file-add:before{content:'\f086'}.octicon-file-binary:before{content:'\f094'}.octicon-file-code:before{content:'\f010'}.octicon-file-directory:before{content:'\f016'}.octicon-file-directory-create:before{content:'\f095'}.octicon-file-media:before{content:'\f012'}.octicon-file-pdf:before{content:'\f014'}.octicon-file-submodule:before{content:'\f017'}.octicon-file-symlink-directory:before{content:'\f0b1'}.octicon-file-symlink-file:before{content:'\f0b0'}.octicon-file-text:before{content:'\f011'}.octicon-file-zip:before{content:'\f013'}.octicon-gear:before{content:'\f02f'}.octicon-gift:before{content:'\f042'}.octicon-gist:before{content:'\f00e'}.octicon-gist-fork:before{content:'\f079'}.octicon-gist-new:before{content:'\f07a'}.octicon-gist-private:before{content:'\f00f'}.octicon-gist-secret:before{content:'\f08c'}.octicon-git-branch:before{content:'\f020'}.octicon-git-branch-create:before{content:'\f098'}.octicon-git-branch-delete:before{content:'\f09b'}.octicon-git-commit:before{content:'\f01f'}.octicon-git-compare:before{content:'\f0ac'}.octicon-git-fork-private:before{content:'\f021'}.octicon-git-merge:before{content:'\f023'}.octicon-git-pull-request:before{content:'\f009'}.octicon-git-pull-request-abandoned:before{content:'\f090'}.octicon-globe:before{content:'\f0b6'}.octicon-graph:before{content:'\f043'}.octicon-history:before{content:'\f07e'}.octicon-home:before{content:'\f08d'}.octicon-horizontal-rule:before{content:'\f070'}.octicon-hourglass:before{content:'\f09e'}.octicon-hubot:before{content:'\f09d'}.octicon-info:before{content:'\f059'}.octicon-issue-closed:before{content:'\f028'}.octicon-issue-opened:before{content:'\f026'}.octicon-issue-reopened:before{content:'\f027'}.octicon-jersey:before{content:'\f019'}.octicon-jump-down:before{content:'\f072'}.octicon-jump-left:before{content:'\f0a5'}.octicon-jump-right:before{content:'\f0a6'}.octicon-jump-up:before{content:'\f073'}.octicon-key:before{content:'\f049'}.octicon-keyboard:before{content:'\f00d'}.octicon-light-bulb:before{content:'\f000'}.octicon-link:before{content:'\f05c'}.octicon-link-external:before{content:'\f07f'}.octicon-list-ordered:before{content:'\f062'}.octicon-list-unordered:before{content:'\f061'}.octicon-location:before{content:'\f060'}.octicon-lock:before{content:'\f06a'}.octicon-log-in:before{content:'\f036'}.octicon-log-out:before{content:'\f032'}.octicon-logo-github:before{content:'\f092'}.octicon-mail:before{content:'\f03b'}.octicon-mail-read:before{content:'\f03c'}.octicon-mail-reply:before{content:'\f051'}.octicon-mark-github:before{content:'\f00a'}.octicon-mark-twitter:before{content:'\f0ae'}.octicon-megaphone:before{content:'\f077'}.octicon-microscope:before{content:'\f089'}.octicon-milestone:before{content:'\f075'}.octicon-mirror-private:before{content:'\f025'}.octicon-mirror-public:before{content:'\f024'}.octicon-move-down:before{content:'\f0a8'}.octicon-move-left:before{content:'\f074'}.octicon-move-right:before{content:'\f0a9'}.octicon-move-up:before{content:'\f0a7'}.octicon-mute:before{content:'\f080'}.octicon-no-newline:before{content:'\f09c'}.octicon-octoface:before{content:'\f008'}.octicon-organization:before{content:'\f037'}.octicon-pencil:before{content:'\f058'}.octicon-person:before{content:'\f018'}.octicon-person-add:before{content:'\f01a'}.octicon-person-follow:before{content:'\f01c'}.octicon-person-remove:before{content:'\f01b'}.octicon-pin:before{content:'\f041'}.octicon-plus:before{content:'\f05d'}.octicon-podium:before{content:'\f0af'}.octicon-primitive-dot:before{content:'\f052'}.octicon-primitive-square:before{content:'\f053'}.octicon-pulse:before{content:'\f085'}.octicon-question:before{content:'\f02c'}.octicon-quote:before{content:'\f063'}.octicon-radio-tower:before{content:'\f030'}.octicon-remove-close:before{content:'\f050'}.octicon-repo:before{content:'\f001'}.octicon-repo-clone:before{content:'\f04c'}.octicon-repo-create:before{content:'\f003'}.octicon-repo-delete:before{content:'\f004'}.octicon-repo-force-push:before{content:'\f04a'}.octicon-repo-forked:before{content:'\f002'}.octicon-repo-pull:before{content:'\f006'}.octicon-repo-push:before{content:'\f005'}.octicon-repo-sync:before{content:'\f04b'}.octicon-rocket:before{content:'\f033'}.octicon-rss:before{content:'\f034'}.octicon-ruby:before{content:'\f047'}.octicon-screen-full:before{content:'\f066'}.octicon-screen-normal:before{content:'\f067'}.octicon-search:before{content:'\f02e'}.octicon-server:before{content:'\f097'}.octicon-settings:before{content:'\f07c'}.octicon-squirrel:before{content:'\f0b2'}.octicon-star:before{content:'\f02a'}.octicon-star-add:before{content:'\f082'}.octicon-star-delete:before{content:'\f083'}.octicon-stop:before{content:'\f08f'}.octicon-sync:before{content:'\f087'}.octicon-tag:before{content:'\f015'}.octicon-tag-add:before{content:'\f054'}.octicon-tag-remove:before{content:'\f055'}.octicon-telescope:before{content:'\f088'}.octicon-three-bars:before{content:'\f05e'}.octicon-tools:before{content:'\f031'}.octicon-triangle-down:before{content:'\f05b'}.octicon-triangle-left:before{content:'\f044'}.octicon-triangle-right:before{content:'\f05a'}.octicon-triangle-up:before{content:'\f0aa'}.octicon-unfold:before{content:'\f039'}.octicon-versions:before{content:'\f064'}.octicon-x:before{content:'\f081'}.octicon-zap:before{content:'\26A1'}
2
forum/static/css/base/reset.css
File was created 1 /*
2 YUI 3.4.1 (build 4118)
3 Copyright 2011 Yahoo! Inc. All rights reserved.
4 Licensed under the BSD License.
5 http://yuilibrary.com/license/
6 */
7 /*
8 TODO will need to remove settings on HTML since we can't namespace it.
9 TODO with the prefix, should I group by selector or property for weight savings?
10 */
11 html{
12 color:#000;
13 background:#FFF;
14 }
15 /*
16 TODO remove settings on BODY since we can't namespace it.
17 */
18 /*
19 TODO test putting a class on HEAD.
20 - Fails on FF.
21 */
22 body,
23 div,
24 dl,
25 dt,
26 dd,
27 ul,
28 ol,
29 li,
30 h1,
31 h2,
32 h3,
33 h4,
34 h5,
35 h6,
36 pre,
37 code,
38 form,
39 fieldset,
40 legend,
41 input,
42 textarea,
43 p,
44 blockquote,
45 th,
46 td {
47 margin:0;
48 padding:0;
49 }
50 table {
51 border-collapse:collapse;
52 border-spacing:0;
53 }
54 fieldset,
55 img {
56 border:0;
57 }
58 /*
59 TODO think about hanlding inheritence differently, maybe letting IE6 fail a bit...
60 */
61 address,
62 caption,
63 cite,
64 code,
65 dfn,
66 em,
67 strong,
68 th,
69 var {
70 font-style:normal;
71 font-weight:normal;
72 }
73
74 ol,
75 ul {
76 list-style:none;
77 }
78
79 caption,
80 th {
81 text-align:left;
82 }
83 h1,
84 h2,
85 h3,
86 h4,
87 h5,
88 h6 {
89 font-size:100%;
90 font-weight:normal;
91 }
92 q:before,
93 q:after {
94 content:'';
95 }
96 abbr,
97 acronym {
98 border:0;
99 font-variant:normal;
100 }
101 /* to preserve line-height and selector appearance */
102 sup {
103 vertical-align:text-top;
104 }
105 sub {
106 vertical-align:text-bottom;
107 }
108 input,
109 textarea,
110 select {
111 font-family:inherit;
112 font-size:inherit;
113 font-weight:inherit;
114 }
115 /*to enable resizing for IE*/
116 input,
117 textarea,
118 select {
119 *font-size:100%;
120 }
121 /*because legend doesn't inherit in IE */
122 legend {
123 color:#000;
124 }
125
forum/static/css/bootstrap/bootstrap.css
File was created 1 /*!
2 * Bootstrap v2.2.2
3 *
4 * Copyright 2012 Twitter, Inc
5 * Licensed under the Apache License v2.0
6 * http://www.apache.org/licenses/LICENSE-2.0
7 *
8 * Designed and built with all the love in the world @twitter by @mdo and @fat.
9 */
10 .clearfix {
11 *zoom: 1;
12 }
13 .clearfix:before,
14 .clearfix:after {
15 display: table;
16 content: "";
17 line-height: 0;
18 }
19 .clearfix:after {
20 clear: both;
21 }
22 .hide-text {
23 font: 0/0 a;
24 color: transparent;
25 text-shadow: none;
26 background-color: transparent;
27 border: 0;
28 }
29 .input-block-level {
30 display: block;
31 width: 100%;
32 min-height: 30px;
33 -webkit-box-sizing: border-box;
34 -moz-box-sizing: border-box;
35 box-sizing: border-box;
36 }
37 article,
38 aside,
39 details,
40 figcaption,
41 figure,
42 footer,
43 header,
44 hgroup,
45 nav,
46 section {
47 display: block;
48 }
49 audio,
50 canvas,
51 video {
52 display: inline-block;
53 *display: inline;
54 *zoom: 1;
55 }
56 audio:not([controls]) {
57 display: none;
58 }
59 html {
60 font-size: 100%;
61 -webkit-text-size-adjust: 100%;
62 -ms-text-size-adjust: 100%;
63 }
64 a:focus {
65 outline: thin dotted #333;
66 outline: 5px auto -webkit-focus-ring-color;
67 outline-offset: -2px;
68 }
69 a:hover,
70 a:active {
71 outline: 0;
72 }
73 sub,
74 sup {
75 position: relative;
76 font-size: 75%;
77 line-height: 0;
78 vertical-align: baseline;
79 }
80 sup {
81 top: -0.5em;
82 }
83 sub {
84 bottom: -0.25em;
85 }
86 img {
87 /* Responsive images (ensure images don't scale beyond their parents) */
88
89 max-width: 100%;
90 /* Part 1: Set a maxium relative to the parent */
91
92 width: auto\9;
93 /* IE7-8 need help adjusting responsive images */
94
95 height: auto;
96 /* Part 2: Scale the height according to the width, otherwise you get stretching */
97
98 vertical-align: middle;
99 border: 0;
100 -ms-interpolation-mode: bicubic;
101 }
102 #map_canvas img,
103 .google-maps img {
104 max-width: none;
105 }
106 button,
107 input,
108 select,
109 textarea {
110 margin: 0;
111 font-size: 100%;
112 vertical-align: middle;
113 }
114 button,
115 input {
116 *overflow: visible;
117 line-height: normal;
118 }
119 button::-moz-focus-inner,
120 input::-moz-focus-inner {
121 padding: 0;
122 border: 0;
123 }
124 button,
125 html input[type="button"],
126 input[type="reset"],
127 input[type="submit"] {
128 -webkit-appearance: button;
129 cursor: pointer;
130 }
131 label,
132 select,
133 button,
134 input[type="button"],
135 input[type="reset"],
136 input[type="submit"],
137 input[type="radio"],
138 input[type="checkbox"] {
139 cursor: pointer;
140 }
141 input[type="search"] {
142 -webkit-box-sizing: content-box;
143 -moz-box-sizing: content-box;
144 box-sizing: content-box;
145 -webkit-appearance: textfield;
146 }
147 input[type="search"]::-webkit-search-decoration,
148 input[type="search"]::-webkit-search-cancel-button {
149 -webkit-appearance: none;
150 }
151 textarea {
152 overflow: auto;
153 vertical-align: top;
154 }
155 @media print {
156 * {
157 text-shadow: none !important;
158 color: #000 !important;
159 background: transparent !important;
160 box-shadow: none !important;
161 }
162 a,
163 a:visited {
164 text-decoration: underline;
165 }
166 a[href]:after {
167 content: " (" attr(href) ")";
168 }
169 abbr[title]:after {
170 content: " (" attr(title) ")";
171 }
172 .ir a:after,
173 a[href^="javascript:"]:after,
174 a[href^="#"]:after {
175 content: "";
176 }
177 pre,
178 blockquote {
179 border: 1px solid #999;
180 page-break-inside: avoid;
181 }
182 thead {
183 display: table-header-group;
184 }
185 tr,
186 img {
187 page-break-inside: avoid;
188 }
189 img {
190 max-width: 100% !important;
191 }
192 @page {
193 margin: 0.5cm;
194 }
195 p,
196 h2,
197 h3 {
198 orphans: 3;
199 widows: 3;
200 }
201 h2,
202 h3 {
203 page-break-after: avoid;
204 }
205 }
206 body {
207 margin: 0;
208 font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
209 font-size: 12px;
210 line-height: 20px;
211 color: #333333;
212 background-color: #ffffff;
213 }
214 a {
215 color: #0088cc;
216 text-decoration: none;
217 }
218 a:hover {
219 color: #005580;
220 text-decoration: underline;
221 }
222 .img-rounded {
223 -webkit-border-radius: 6px;
224 -moz-border-radius: 6px;
225 border-radius: 6px;
226 }
227 .img-polaroid {
228 padding: 4px;
229 background-color: #fff;
230 border: 1px solid #ccc;
231 border: 1px solid rgba(0, 0, 0, 0.2);
232 -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
233 -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
234 box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
235 }
236 .img-circle {
237 -webkit-border-radius: 500px;
238 -moz-border-radius: 500px;
239 border-radius: 500px;
240 }
241 .row {
242 margin-left: -20px;
243 *zoom: 1;
244 }
245 .row:before,
246 .row:after {
247 display: table;
248 content: "";
249 line-height: 0;
250 }
251 .row:after {
252 clear: both;
253 }
254 [class*="span"] {
255 float: left;
256 min-height: 1px;
257 margin-left: 20px;
258 }
259 .container,
260 .navbar-static-top .container,
261 .navbar-fixed-top .container,
262 .navbar-fixed-bottom .container {
263 width: 940px;
264 }
265 .span12 {
266 width: 940px;
267 }
268 .span11 {
269 width: 860px;
270 }
271 .span10 {
272 width: 780px;
273 }
274 .span9 {
275 width: 700px;
276 }
277 .span8 {
278 width: 620px;
279 }
280 .span7 {
281 width: 540px;
282 }
283 .span6 {
284 width: 460px;
285 }
286 .span5 {
287 width: 380px;
288 }
289 .span4 {
290 width: 300px;
291 }
292 .span3 {
293 width: 220px;
294 }
295 .span2 {
296 width: 140px;
297 }
298 .span1 {
299 width: 60px;
300 }
301 .offset12 {
302 margin-left: 980px;
303 }
304 .offset11 {
305 margin-left: 900px;
306 }
307 .offset10 {
308 margin-left: 820px;
309 }
310 .offset9 {
311 margin-left: 740px;
312 }
313 .offset8 {
314 margin-left: 660px;
315 }
316 .offset7 {
317 margin-left: 580px;
318 }
319 .offset6 {
320 margin-left: 500px;
321 }
322 .offset5 {
323 margin-left: 420px;
324 }
325 .offset4 {
326 margin-left: 340px;
327 }
328 .offset3 {
329 margin-left: 260px;
330 }
331 .offset2 {
332 margin-left: 180px;
333 }
334 .offset1 {
335 margin-left: 100px;
336 }
337 .row-fluid {
338 width: 100%;
339 *zoom: 1;
340 }
341 .row-fluid:before,
342 .row-fluid:after {
343 display: table;
344 content: "";
345 line-height: 0;
346 }
347 .row-fluid:after {
348 clear: both;
349 }
350 .row-fluid [class*="span"] {
351 display: block;
352 width: 100%;
353 min-height: 30px;
354 -webkit-box-sizing: border-box;
355 -moz-box-sizing: border-box;
356 box-sizing: border-box;
357 float: left;
358 margin-left: 2.127659574468085%;
359 *margin-left: 2.074468085106383%;
360 }
361 .row-fluid [class*="span"]:first-child {
362 margin-left: 0;
363 }
364 .row-fluid .controls-row [class*="span"] + [class*="span"] {
365 margin-left: 2.127659574468085%;
366 }
367 .row-fluid .span12 {
368 width: 100%;
369 *width: 99.94680851063829%;
370 }
371 .row-fluid .span11 {
372 width: 91.48936170212765%;
373 *width: 91.43617021276594%;
374 }
375 .row-fluid .span10 {
376 width: 82.97872340425532%;
377 *width: 82.92553191489361%;
378 }
379 .row-fluid .span9 {
380 width: 74.46808510638297%;
381 *width: 74.41489361702126%;
382 }
383 .row-fluid .span8 {
384 width: 65.95744680851064%;
385 *width: 65.90425531914893%;
386 }
387 .row-fluid .span7 {
388 width: 57.44680851063829%;
389 *width: 57.39361702127659%;
390 }
391 .row-fluid .span6 {
392 width: 48.93617021276595%;
393 *width: 48.88297872340425%;
394 }
395 .row-fluid .span5 {
396 width: 40.42553191489362%;
397 *width: 40.37234042553192%;
398 }
399 .row-fluid .span4 {
400 width: 31.914893617021278%;
401 *width: 31.861702127659576%;
402 }
403 .row-fluid .span3 {
404 width: 23.404255319148934%;
405 *width: 23.351063829787233%;
406 }
407 .row-fluid .span2 {
408 width: 14.893617021276595%;
409 *width: 14.840425531914894%;
410 }
411 .row-fluid .span1 {
412 width: 6.382978723404255%;
413 *width: 6.329787234042553%;
414 }
415 .row-fluid .offset12 {
416 margin-left: 104.25531914893617%;
417 *margin-left: 104.14893617021275%;
418 }
419 .row-fluid .offset12:first-child {
420 margin-left: 102.12765957446808%;
421 *margin-left: 102.02127659574467%;
422 }
423 .row-fluid .offset11 {
424 margin-left: 95.74468085106382%;
425 *margin-left: 95.6382978723404%;
426 }
427 .row-fluid .offset11:first-child {
428 margin-left: 93.61702127659574%;
429 *margin-left: 93.51063829787232%;
430 }
431 .row-fluid .offset10 {
432 margin-left: 87.23404255319149%;
433 *margin-left: 87.12765957446807%;
434 }
435 .row-fluid .offset10:first-child {
436 margin-left: 85.1063829787234%;
437 *margin-left: 84.99999999999999%;
438 }
439 .row-fluid .offset9 {
440 margin-left: 78.72340425531914%;
441 *margin-left: 78.61702127659572%;
442 }
443 .row-fluid .offset9:first-child {
444 margin-left: 76.59574468085106%;
445 *margin-left: 76.48936170212764%;
446 }
447 .row-fluid .offset8 {
448 margin-left: 70.2127659574468%;
449 *margin-left: 70.10638297872339%;
450 }
451 .row-fluid .offset8:first-child {
452 margin-left: 68.08510638297872%;
453 *margin-left: 67.9787234042553%;
454 }
455 .row-fluid .offset7 {
456 margin-left: 61.70212765957446%;
457 *margin-left: 61.59574468085106%;
458 }
459 .row-fluid .offset7:first-child {
460 margin-left: 59.574468085106375%;
461 *margin-left: 59.46808510638297%;
462 }
463 .row-fluid .offset6 {
464 margin-left: 53.191489361702125%;
465 *margin-left: 53.085106382978715%;
466 }
467 .row-fluid .offset6:first-child {
468 margin-left: 51.063829787234035%;
469 *margin-left: 50.95744680851063%;
470 }
471 .row-fluid .offset5 {
472 margin-left: 44.68085106382979%;
473 *margin-left: 44.57446808510638%;
474 }
475 .row-fluid .offset5:first-child {
476 margin-left: 42.5531914893617%;
477 *margin-left: 42.4468085106383%;
478 }
479 .row-fluid .offset4 {
480 margin-left: 36.170212765957444%;
481 *margin-left: 36.06382978723405%;
482 }
483 .row-fluid .offset4:first-child {
484 margin-left: 34.04255319148936%;
485 *margin-left: 33.93617021276596%;
486 }
487 .row-fluid .offset3 {
488 margin-left: 27.659574468085104%;
489 *margin-left: 27.5531914893617%;
490 }
491 .row-fluid .offset3:first-child {
492 margin-left: 25.53191489361702%;
493 *margin-left: 25.425531914893618%;
494 }
495 .row-fluid .offset2 {
496 margin-left: 19.148936170212764%;
497 *margin-left: 19.04255319148936%;
498 }
499 .row-fluid .offset2:first-child {
500 margin-left: 17.02127659574468%;
501 *margin-left: 16.914893617021278%;
502 }
503 .row-fluid .offset1 {
504 margin-left: 10.638297872340425%;
505 *margin-left: 10.53191489361702%;
506 }
507 .row-fluid .offset1:first-child {
508 margin-left: 8.51063829787234%;
509 *margin-left: 8.404255319148938%;
510 }
511 [class*="span"].hide,
512 .row-fluid [class*="span"].hide {
513 display: none;
514 }
515 [class*="span"].pull-right,
516 .row-fluid [class*="span"].pull-right {
517 float: right;
518 }
519 .container {
520 margin-right: auto;
521 margin-left: auto;
522 *zoom: 1;
523 }
524 .container:before,
525 .container:after {
526 display: table;
527 content: "";
528 line-height: 0;
529 }
530 .container:after {
531 clear: both;
532 }
533 .container-fluid {
534 padding-right: 20px;
535 padding-left: 20px;
536 *zoom: 1;
537 }
538 .container-fluid:before,
539 .container-fluid:after {
540 display: table;
541 content: "";
542 line-height: 0;
543 }
544 .container-fluid:after {
545 clear: both;
546 }
547 p {
548 margin: 0 0 10px;
549 }
550 .lead {
551 margin-bottom: 20px;
552 font-size: 18px;
553 font-weight: 200;
554 line-height: 30px;
555 }
556 small {
557 font-size: 85%;
558 }
559 strong {
560 font-weight: bold;
561 }
562 em {
563 font-style: italic;
564 }
565 cite {
566 font-style: normal;
567 }
568 .muted {
569 color: #999999;
570 }
571 a.muted:hover {
572 color: #808080;
573 }
574 .text-warning {
575 color: #c09853;
576 }
577 a.text-warning:hover {
578 color: #a47e3c;
579 }
580 .text-error {
581 color: #b94a48;
582 }
583 a.text-error:hover {
584 color: #953b39;
585 }
586 .text-info {
587 color: #3a87ad;
588 }
589 a.text-info:hover {
590 color: #2d6987;
591 }
592 .text-success {
593 color: #468847;
594 }
595 a.text-success:hover {
596 color: #356635;
597 }
598 h1,
599 h2,
600 h3,
601 h4,
602 h5,
603 h6 {
604 margin: 10px 0;
605 font-family: inherit;
606 font-weight: bold;
607 line-height: 20px;
608 color: inherit;
609 text-rendering: optimizelegibility;
610 }
611 h1 small,
612 h2 small,
613 h3 small,
614 h4 small,
615 h5 small,
616 h6 small {
617 font-weight: normal;
618 line-height: 1;
619 color: #999999;
620 }
621 h1,
622 h2,
623 h3 {
624 line-height: 40px;
625 }
626 h1 {
627 font-size: 33px;
628 }
629 h2 {
630 font-size: 27px;
631 }
632 h3 {
633 font-size: 21px;
634 }
635 h4 {
636 font-size: 15px;
637 }
638 h5 {
639 font-size: 12px;
640 }
641 h6 {
642 font-size: 10.2px;
643 }
644 h1 small {
645 font-size: 21px;
646 }
647 h2 small {
648 font-size: 15px;
649 }
650 h3 small {
651 font-size: 12px;
652 }
653 h4 small {
654 font-size: 12px;
655 }
656 .page-header {
657 padding-bottom: 9px;
658 margin: 20px 0 30px;
659 border-bottom: 1px solid #eeeeee;
660 }
661 ul,
662 ol {
663 padding: 0;
664 margin: 0 0 10px 25px;
665 }
666 ul ul,
667 ul ol,
668 ol ol,
669 ol ul {
670 margin-bottom: 0;
671 }
672 li {
673 line-height: 20px;
674 }
675 ul.unstyled,
676 ol.unstyled {
677 margin-left: 0;
678 list-style: none;
679 }
680 ul.inline,
681 ol.inline {
682 margin-left: 0;
683 list-style: none;
684 }
685 ul.inline > li,
686 ol.inline > li {
687 display: inline-block;
688 padding-left: 5px;
689 padding-right: 5px;
690 }
691 dl {
692 margin-bottom: 20px;
693 }
694 dt,
695 dd {
696 line-height: 20px;
697 }
698 dt {
699 font-weight: bold;
700 }
701 dd {
702 margin-left: 10px;
703 }
704 .dl-horizontal {
705 *zoom: 1;
706 }
707 .dl-horizontal:before,
708 .dl-horizontal:after {
709 display: table;
710 content: "";
711 line-height: 0;
712 }
713 .dl-horizontal:after {
714 clear: both;
715 }
716 .dl-horizontal dt {
717 float: left;
718 width: 160px;
719 clear: left;
720 text-align: right;
721 overflow: hidden;
722 text-overflow: ellipsis;
723 white-space: nowrap;
724 }
725 .dl-horizontal dd {
726 margin-left: 180px;
727 }
728 hr {
729 margin: 20px 0;
730 border: 0;
731 border-top: 1px solid #eeeeee;
732 border-bottom: 1px solid #ffffff;
733 }
734 abbr[title],
735 abbr[data-original-title] {
736 cursor: help;
737 border-bottom: 1px dotted #999999;
738 }
739 abbr.initialism {
740 font-size: 90%;
741 text-transform: uppercase;
742 }
743 blockquote {
744 padding: 0 0 0 15px;
745 margin: 0 0 20px;
746 border-left: 5px solid #eeeeee;
747 }
748 blockquote p {
749 margin-bottom: 0;
750 font-size: 16px;
751 font-weight: 300;
752 line-height: 25px;
753 }
754 blockquote small {
755 display: block;
756 line-height: 20px;
757 color: #999999;
758 }
759 blockquote small:before {
760 content: '\2014 \00A0';
761 }
762 blockquote.pull-right {
763 float: right;
764 padding-right: 15px;
765 padding-left: 0;
766 border-right: 5px solid #eeeeee;
767 border-left: 0;
768 }
769 blockquote.pull-right p,
770 blockquote.pull-right small {
771 text-align: right;
772 }
773 blockquote.pull-right small:before {
774 content: '';
775 }
776 blockquote.pull-right small:after {
777 content: '\00A0 \2014';
778 }
779 q:before,
780 q:after,
781 blockquote:before,
782 blockquote:after {
783 content: "";
784 }
785 address {
786 display: block;
787 margin-bottom: 20px;
788 font-style: normal;
789 line-height: 20px;
790 }
791 code,
792 pre {
793 padding: 0 3px 2px;
794 font-family: Monaco, Menlo, Consolas, "Courier New", monospace;
795 font-size: 10px;
796 color: #333333;
797 -webkit-border-radius: 3px;
798 -moz-border-radius: 3px;
799 border-radius: 3px;
800 }
801 code {
802 padding: 2px 4px;
803 color: #d14;
804 background-color: #f7f7f9;
805 border: 1px solid #e1e1e8;
806 white-space: nowrap;
807 }
808 pre {
809 display: block;
810 padding: 9.5px;
811 margin: 0 0 10px;
812 font-size: 11px;
813 line-height: 20px;
814 word-break: break-all;
815 word-wrap: break-word;
816 white-space: pre;
817 white-space: pre-wrap;
818 background-color: #f5f5f5;
819 border: 1px solid #ccc;
820 border: 1px solid rgba(0, 0, 0, 0.15);
821 -webkit-border-radius: 4px;
822 -moz-border-radius: 4px;
823 border-radius: 4px;
824 }
825 pre.prettyprint {
826 margin-bottom: 20px;
827 }
828 pre code {
829 padding: 0;
830 color: inherit;
831 white-space: pre;
832 white-space: pre-wrap;
833 background-color: transparent;
834 border: 0;
835 }
836 .pre-scrollable {
837 max-height: 340px;
838 overflow-y: scroll;
839 }
840 .label,
841 .badge {
842 display: inline-block;
843 padding: 2px 4px;
844 font-size: 10.152px;
845 font-weight: bold;
846 line-height: 14px;
847 color: #ffffff;
848 vertical-align: baseline;
849 white-space: nowrap;
850 text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
851 background-color: #999999;
852 }
853 .label {
854 -webkit-border-radius: 3px;
855 -moz-border-radius: 3px;
856 border-radius: 3px;
857 }
858 .badge {
859 padding-left: 9px;
860 padding-right: 9px;
861 -webkit-border-radius: 9px;
862 -moz-border-radius: 9px;
863 border-radius: 9px;
864 }
865 .label:empty,
866 .badge:empty {
867 display: none;
868 }
869 a.label:hover,
870 a.badge:hover {
871 color: #ffffff;
872 text-decoration: none;
873 cursor: pointer;
874 }
875 .label-important,
876 .badge-important {
877 background-color: #b94a48;
878 }
879 .label-important[href],
880 .badge-important[href] {
881 background-color: #953b39;
882 }
883 .label-warning,
884 .badge-warning {
885 background-color: #f89406;
886 }
887 .label-warning[href],
888 .badge-warning[href] {
889 background-color: #c67605;
890 }
891 .label-success,
892 .badge-success {
893 background-color: #468847;
894 }
895 .label-success[href],
896 .badge-success[href] {
897 background-color: #356635;
898 }
899 .label-info,
900 .badge-info {
901 background-color: #3a87ad;
902 }
903 .label-info[href],
904 .badge-info[href] {
905 background-color: #2d6987;
906 }
907 .label-inverse,
908 .badge-inverse {
909 background-color: #333333;
910 }
911 .label-inverse[href],
912 .badge-inverse[href] {
913 background-color: #1a1a1a;
914 }
915 .btn .label,
916 .btn .badge {
917 position: relative;
918 top: -1px;
919 }
920 .btn-mini .label,
921 .btn-mini .badge {
922 top: 0;
923 }
924 table {
925 max-width: 100%;
926 background-color: transparent;
927 border-collapse: collapse;
928 border-spacing: 0;
929 }
930 .table {
931 width: 100%;
932 margin-bottom: 20px;
933 }
934 .table th,
935 .table td {
936 padding: 8px;
937 line-height: 20px;
938 text-align: left;
939 vertical-align: top;
940 border-top: 1px solid #dddddd;
941 }
942 .table th {
943 font-weight: bold;
944 }
945 .table thead th {
946 vertical-align: bottom;
947 }
948 .table caption + thead tr:first-child th,
949 .table caption + thead tr:first-child td,
950 .table colgroup + thead tr:first-child th,
951 .table colgroup + thead tr:first-child td,
952 .table thead:first-child tr:first-child th,
953 .table thead:first-child tr:first-child td {
954 border-top: 0;
955 }
956 .table tbody + tbody {
957 border-top: 2px solid #dddddd;
958 }
959 .table .table {
960 background-color: #ffffff;
961 }
962 .table-condensed th,
963 .table-condensed td {
964 padding: 4px 5px;
965 }
966 .table-bordered {
967 border: 1px solid #dddddd;
968 border-collapse: separate;
969 *border-collapse: collapse;
970 border-left: 0;
971 -webkit-border-radius: 4px;
972 -moz-border-radius: 4px;
973 border-radius: 4px;
974 }
975 .table-bordered th,
976 .table-bordered td {
977 border-left: 1px solid #dddddd;
978 }
979 .table-bordered caption + thead tr:first-child th,
980 .table-bordered caption + tbody tr:first-child th,
981 .table-bordered caption + tbody tr:first-child td,
982 .table-bordered colgroup + thead tr:first-child th,
983 .table-bordered colgroup + tbody tr:first-child th,
984 .table-bordered colgroup + tbody tr:first-child td,
985 .table-bordered thead:first-child tr:first-child th,
986 .table-bordered tbody:first-child tr:first-child th,
987 .table-bordered tbody:first-child tr:first-child td {
988 border-top: 0;
989 }
990 .table-bordered thead:first-child tr:first-child > th:first-child,
991 .table-bordered tbody:first-child tr:first-child > td:first-child {
992 -webkit-border-top-left-radius: 4px;
993 -moz-border-radius-topleft: 4px;
994 border-top-left-radius: 4px;
995 }
996 .table-bordered thead:first-child tr:first-child > th:last-child,
997 .table-bordered tbody:first-child tr:first-child > td:last-child {
998 -webkit-border-top-right-radius: 4px;
999 -moz-border-radius-topright: 4px;
1000 border-top-right-radius: 4px;
1001 }
1002 .table-bordered thead:last-child tr:last-child > th:first-child,
1003 .table-bordered tbody:last-child tr:last-child > td:first-child,
1004 .table-bordered tfoot:last-child tr:last-child > td:first-child {
1005 -webkit-border-bottom-left-radius: 4px;
1006 -moz-border-radius-bottomleft: 4px;
1007 border-bottom-left-radius: 4px;
1008 }
1009 .table-bordered thead:last-child tr:last-child > th:last-child,
1010 .table-bordered tbody:last-child tr:last-child > td:last-child,
1011 .table-bordered tfoot:last-child tr:last-child > td:last-child {
1012 -webkit-border-bottom-right-radius: 4px;
1013 -moz-border-radius-bottomright: 4px;
1014 border-bottom-right-radius: 4px;
1015 }
1016 .table-bordered tfoot + tbody:last-child tr:last-child td:first-child {
1017 -webkit-border-bottom-left-radius: 0;
1018 -moz-border-radius-bottomleft: 0;
1019 border-bottom-left-radius: 0;
1020 }
1021 .table-bordered tfoot + tbody:last-child tr:last-child td:last-child {
1022 -webkit-border-bottom-right-radius: 0;
1023 -moz-border-radius-bottomright: 0;
1024 border-bottom-right-radius: 0;
1025 }
1026 .table-bordered caption + thead tr:first-child th:first-child,
1027 .table-bordered caption + tbody tr:first-child td:first-child,
1028 .table-bordered colgroup + thead tr:first-child th:first-child,
1029 .table-bordered colgroup + tbody tr:first-child td:first-child {
1030 -webkit-border-top-left-radius: 4px;
1031 -moz-border-radius-topleft: 4px;
1032 border-top-left-radius: 4px;
1033 }
1034 .table-bordered caption + thead tr:first-child th:last-child,
1035 .table-bordered caption + tbody tr:first-child td:last-child,
1036 .table-bordered colgroup + thead tr:first-child th:last-child,
1037 .table-bordered colgroup + tbody tr:first-child td:last-child {
1038 -webkit-border-top-right-radius: 4px;
1039 -moz-border-radius-topright: 4px;
1040 border-top-right-radius: 4px;
1041 }
1042 .table-striped tbody > tr:nth-child(odd) > td,
1043 .table-striped tbody > tr:nth-child(odd) > th {
1044 background-color: #f9f9f9;
1045 }
1046 .table-hover tbody tr:hover td,
1047 .table-hover tbody tr:hover th {
1048 background-color: #f5f5f5;
1049 }
1050 table td[class*="span"],
1051 table th[class*="span"],
1052 .row-fluid table td[class*="span"],
1053 .row-fluid table th[class*="span"] {
1054 display: table-cell;
1055 float: none;
1056 margin-left: 0;
1057 }
1058 .table td.span1,
1059 .table th.span1 {
1060 float: none;
1061 width: 44px;
1062 margin-left: 0;
1063 }
1064 .table td.span2,
1065 .table th.span2 {
1066 float: none;
1067 width: 124px;
1068 margin-left: 0;
1069 }
1070 .table td.span3,
1071 .table th.span3 {
1072 float: none;
1073 width: 204px;
1074 margin-left: 0;
1075 }
1076 .table td.span4,
1077 .table th.span4 {
1078 float: none;
1079 width: 284px;
1080 margin-left: 0;
1081 }
1082 .table td.span5,
1083 .table th.span5 {
1084 float: none;
1085 width: 364px;
1086 margin-left: 0;
1087 }
1088 .table td.span6,
1089 .table th.span6 {
1090 float: none;
1091 width: 444px;
1092 margin-left: 0;
1093 }
1094 .table td.span7,
1095 .table th.span7 {
1096 float: none;
1097 width: 524px;
1098 margin-left: 0;
1099 }
1100 .table td.span8,
1101 .table th.span8 {
1102 float: none;
1103 width: 604px;
1104 margin-left: 0;
1105 }
1106 .table td.span9,
1107 .table th.span9 {
1108 float: none;
1109 width: 684px;
1110 margin-left: 0;
1111 }
1112 .table td.span10,
1113 .table th.span10 {
1114 float: none;
1115 width: 764px;
1116 margin-left: 0;
1117 }
1118 .table td.span11,
1119 .table th.span11 {
1120 float: none;
1121 width: 844px;
1122 margin-left: 0;
1123 }
1124 .table td.span12,
1125 .table th.span12 {
1126 float: none;
1127 width: 924px;
1128 margin-left: 0;
1129 }
1130 .table tbody tr.success td {
1131 background-color: #dff0d8;
1132 }
1133 .table tbody tr.error td {
1134 background-color: #f2dede;
1135 }
1136 .table tbody tr.warning td {
1137 background-color: #fcf8e3;
1138 }
1139 .table tbody tr.info td {
1140 background-color: #d9edf7;
1141 }
1142 .table-hover tbody tr.success:hover td {
1143 background-color: #d0e9c6;
1144 }
1145 .table-hover tbody tr.error:hover td {
1146 background-color: #ebcccc;
1147 }
1148 .table-hover tbody tr.warning:hover td {
1149 background-color: #faf2cc;
1150 }
1151 .table-hover tbody tr.info:hover td {
1152 background-color: #c4e3f3;
1153 }
1154 form {
1155 margin: 0 0 20px;
1156 }
1157 fieldset {
1158 padding: 0;
1159 margin: 0;
1160 border: 0;
1161 }
1162 legend {
1163 display: block;
1164 width: 100%;
1165 padding: 0;
1166 margin-bottom: 20px;
1167 font-size: 18px;
1168 line-height: 40px;
1169 color: #333333;
1170 border: 0;
1171 border-bottom: 1px solid #e5e5e5;
1172 }
1173 legend small {
1174 font-size: 15px;
1175 color: #999999;
1176 }
1177 label,
1178 input,
1179 button,
1180 select,
1181 textarea {
1182 font-size: 12px;
1183 font-weight: normal;
1184 line-height: 20px;
1185 }
1186 input,
1187 button,
1188 select,
1189 textarea {
1190 font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
1191 }
1192 label {
1193 display: block;
1194 margin-bottom: 5px;
1195 }
1196 select,
1197 textarea,
1198 input[type="text"],
1199 input[type="password"],
1200 input[type="datetime"],
1201 input[type="datetime-local"],
1202 input[type="date"],
1203 input[type="month"],
1204 input[type="time"],
1205 input[type="week"],
1206 input[type="number"],
1207 input[type="email"],
1208 input[type="url"],
1209 input[type="search"],
1210 input[type="tel"],
1211 input[type="color"],
1212 .uneditable-input {
1213 display: inline-block;
1214 height: 20px;
1215 padding: 4px 6px;
1216 margin-bottom: 10px;
1217 font-size: 12px;
1218 line-height: 20px;
1219 color: #555555;
1220 -webkit-border-radius: 4px;
1221 -moz-border-radius: 4px;
1222 border-radius: 4px;
1223 vertical-align: middle;
1224 }
1225 input,
1226 textarea,
1227 .uneditable-input {
1228 width: 206px;
1229 }
1230 textarea {
1231 height: auto;
1232 }
1233 textarea,
1234 input[type="text"],
1235 input[type="password"],
1236 input[type="datetime"],
1237 input[type="datetime-local"],
1238 input[type="date"],
1239 input[type="month"],
1240 input[type="time"],
1241 input[type="week"],
1242 input[type="number"],
1243 input[type="email"],
1244 input[type="url"],
1245 input[type="search"],
1246 input[type="tel"],
1247 input[type="color"],
1248 .uneditable-input {
1249 background-color: #ffffff;
1250 border: 1px solid #cccccc;
1251 -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
1252 -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
1253 box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
1254 -webkit-transition: border linear .2s, box-shadow linear .2s;
1255 -moz-transition: border linear .2s, box-shadow linear .2s;
1256 -o-transition: border linear .2s, box-shadow linear .2s;
1257 transition: border linear .2s, box-shadow linear .2s;
1258 }
1259 textarea:focus,
1260 input[type="text"]:focus,
1261 input[type="password"]:focus,
1262 input[type="datetime"]:focus,
1263 input[type="datetime-local"]:focus,
1264 input[type="date"]:focus,
1265 input[type="month"]:focus,
1266 input[type="time"]:focus,
1267 input[type="week"]:focus,
1268 input[type="number"]:focus,
1269 input[type="email"]:focus,
1270 input[type="url"]:focus,
1271 input[type="search"]:focus,
1272 input[type="tel"]:focus,
1273 input[type="color"]:focus,
1274 .uneditable-input:focus {
1275 border-color: rgba(82, 168, 236, 0.8);
1276 outline: 0;
1277 outline: thin dotted \9;
1278 /* IE6-9 */
1279
1280 -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6);
1281 -moz-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6);
1282 box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6);
1283 }
1284 input[type="radio"],
1285 input[type="checkbox"] {
1286 margin: 4px 0 0;
1287 *margin-top: 0;
1288 /* IE7 */
1289
1290 margin-top: 1px \9;
1291 /* IE8-9 */
1292
1293 line-height: normal;
1294 }
1295 input[type="file"],
1296 input[type="image"],
1297 input[type="submit"],
1298 input[type="reset"],
1299 input[type="button"],
1300 input[type="radio"],
1301 input[type="checkbox"] {
1302 width: auto;
1303 }
1304 select,
1305 input[type="file"] {
1306 height: 30px;
1307 /* In IE7, the height of the select element cannot be changed by height, only font-size */
1308
1309 *margin-top: 4px;
1310 /* For IE7, add top margin to align select with labels */
1311
1312 line-height: 30px;
1313 }
1314 select {
1315 width: 220px;
1316 border: 1px solid #cccccc;
1317 background-color: #ffffff;
1318 }
1319 select[multiple],
1320 select[size] {
1321 height: auto;
1322 }
1323 select:focus,
1324 input[type="file"]:focus,
1325 input[type="radio"]:focus,
1326 input[type="checkbox"]:focus {
1327 outline: thin dotted #333;
1328 outline: 5px auto -webkit-focus-ring-color;
1329 outline-offset: -2px;
1330 }
1331 .uneditable-input,
1332 .uneditable-textarea {
1333 color: #999999;
1334 background-color: #fcfcfc;
1335 border-color: #cccccc;
1336 -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025);
1337 -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025);
1338 box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025);
1339 cursor: not-allowed;
1340 }
1341 .uneditable-input {
1342 overflow: hidden;
1343 white-space: nowrap;
1344 }
1345 .uneditable-textarea {
1346 width: auto;
1347 height: auto;
1348 }
1349 input:-moz-placeholder,
1350 textarea:-moz-placeholder {
1351 color: #999999;
1352 }
1353 input:-ms-input-placeholder,
1354 textarea:-ms-input-placeholder {
1355 color: #999999;
1356 }
1357 input::-webkit-input-placeholder,
1358 textarea::-webkit-input-placeholder {
1359 color: #999999;
1360 }
1361 .radio,
1362 .checkbox {
1363 min-height: 20px;
1364 padding-left: 20px;
1365 }
1366 .radio input[type="radio"],
1367 .checkbox input[type="checkbox"] {
1368 float: left;
1369 margin-left: -20px;
1370 }
1371 .controls > .radio:first-child,
1372 .controls > .checkbox:first-child {
1373 padding-top: 5px;
1374 }
1375 .radio.inline,
1376 .checkbox.inline {
1377 display: inline-block;
1378 padding-top: 5px;
1379 margin-bottom: 0;
1380 vertical-align: middle;
1381 }
1382 .radio.inline + .radio.inline,
1383 .checkbox.inline + .checkbox.inline {
1384 margin-left: 10px;
1385 }
1386 .input-mini {
1387 width: 60px;
1388 }
1389 .input-small {
1390 width: 90px;
1391 }
1392 .input-medium {
1393 width: 150px;
1394 }
1395 .input-large {
1396 width: 210px;
1397 }
1398 .input-xlarge {
1399 width: 270px;
1400 }
1401 .input-xxlarge {
1402 width: 530px;
1403 }
1404 input[class*="span"],
1405 select[class*="span"],
1406 textarea[class*="span"],
1407 .uneditable-input[class*="span"],
1408 .row-fluid input[class*="span"],
1409 .row-fluid select[class*="span"],
1410 .row-fluid textarea[class*="span"],
1411 .row-fluid .uneditable-input[class*="span"] {
1412 float: none;
1413 margin-left: 0;
1414 }
1415 .input-append input[class*="span"],
1416 .input-append .uneditable-input[class*="span"],
1417 .input-prepend input[class*="span"],
1418 .input-prepend .uneditable-input[class*="span"],
1419 .row-fluid input[class*="span"],
1420 .row-fluid select[class*="span"],
1421 .row-fluid textarea[class*="span"],
1422 .row-fluid .uneditable-input[class*="span"],
1423 .row-fluid .input-prepend [class*="span"],
1424 .row-fluid .input-append [class*="span"] {
1425 display: inline-block;
1426 }
1427 input,
1428 textarea,
1429 .uneditable-input {
1430 margin-left: 0;
1431 }
1432 .controls-row [class*="span"] + [class*="span"] {
1433 margin-left: 20px;
1434 }
1435 input.span12, textarea.span12, .uneditable-input.span12 {
1436 width: 926px;
1437 }
1438 input.span11, textarea.span11, .uneditable-input.span11 {
1439 width: 846px;
1440 }
1441 input.span10, textarea.span10, .uneditable-input.span10 {
1442 width: 766px;
1443 }
1444 input.span9, textarea.span9, .uneditable-input.span9 {
1445 width: 686px;
1446 }
1447 input.span8, textarea.span8, .uneditable-input.span8 {
1448 width: 606px;
1449 }
1450 input.span7, textarea.span7, .uneditable-input.span7 {
1451 width: 526px;
1452 }
1453 input.span6, textarea.span6, .uneditable-input.span6 {
1454 width: 446px;
1455 }
1456 input.span5, textarea.span5, .uneditable-input.span5 {
1457 width: 366px;
1458 }
1459 input.span4, textarea.span4, .uneditable-input.span4 {
1460 width: 286px;
1461 }
1462 input.span3, textarea.span3, .uneditable-input.span3 {
1463 width: 206px;
1464 }
1465 input.span2, textarea.span2, .uneditable-input.span2 {
1466 width: 126px;
1467 }
1468 input.span1, textarea.span1, .uneditable-input.span1 {
1469 width: 46px;
1470 }
1471 .controls-row {
1472 *zoom: 1;
1473 }
1474 .controls-row:before,
1475 .controls-row:after {
1476 display: table;
1477 content: "";
1478 line-height: 0;
1479 }
1480 .controls-row:after {
1481 clear: both;
1482 }
1483 .controls-row [class*="span"],
1484 .row-fluid .controls-row [class*="span"] {
1485 float: left;
1486 }
1487 .controls-row .checkbox[class*="span"],
1488 .controls-row .radio[class*="span"] {
1489 padding-top: 5px;
1490 }
1491 input[disabled],
1492 select[disabled],
1493 textarea[disabled],
1494 input[readonly],
1495 select[readonly],
1496 textarea[readonly] {
1497 cursor: not-allowed;
1498 background-color: #eeeeee;
1499 }
1500 input[type="radio"][disabled],
1501 input[type="checkbox"][disabled],
1502 input[type="radio"][readonly],
1503 input[type="checkbox"][readonly] {
1504 background-color: transparent;
1505 }
1506 .control-group.warning .control-label,
1507 .control-group.warning .help-block,
1508 .control-group.warning .help-inline {
1509 color: #c09853;
1510 }
1511 .control-group.warning .checkbox,
1512 .control-group.warning .radio,
1513 .control-group.warning input,
1514 .control-group.warning select,
1515 .control-group.warning textarea {
1516 color: #c09853;
1517 }
1518 .control-group.warning input,
1519 .control-group.warning select,
1520 .control-group.warning textarea {
1521 border-color: #c09853;
1522 -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
1523 -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
1524 box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
1525 }
1526 .control-group.warning input:focus,
1527 .control-group.warning select:focus,
1528 .control-group.warning textarea:focus {
1529 border-color: #a47e3c;
1530 -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e;
1531 -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e;
1532 box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e;
1533 }
1534 .control-group.warning .input-prepend .add-on,
1535 .control-group.warning .input-append .add-on {
1536 color: #c09853;
1537 background-color: #fcf8e3;
1538 border-color: #c09853;
1539 }
1540 .control-group.error .control-label,
1541 .control-group.error .help-block,
1542 .control-group.error .help-inline {
1543 color: #b94a48;
1544 }
1545 .control-group.error .checkbox,
1546 .control-group.error .radio,
1547 .control-group.error input,
1548 .control-group.error select,
1549 .control-group.error textarea {
1550 color: #b94a48;
1551 }
1552 .control-group.error input,
1553 .control-group.error select,
1554 .control-group.error textarea {
1555 border-color: #b94a48;
1556 -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
1557 -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
1558 box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
1559 }
1560 .control-group.error input:focus,
1561 .control-group.error select:focus,
1562 .control-group.error textarea:focus {
1563 border-color: #953b39;
1564 -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392;
1565 -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392;
1566 box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392;
1567 }
1568 .control-group.error .input-prepend .add-on,
1569 .control-group.error .input-append .add-on {
1570 color: #b94a48;
1571 background-color: #f2dede;
1572 border-color: #b94a48;
1573 }
1574 .control-group.success .control-label,
1575 .control-group.success .help-block,
1576 .control-group.success .help-inline {
1577 color: #468847;
1578 }
1579 .control-group.success .checkbox,
1580 .control-group.success .radio,
1581 .control-group.success input,
1582 .control-group.success select,
1583 .control-group.success textarea {
1584 color: #468847;
1585 }
1586 .control-group.success input,
1587 .control-group.success select,
1588 .control-group.success textarea {
1589 border-color: #468847;
1590 -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
1591 -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
1592 box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
1593 }
1594 .control-group.success input:focus,
1595 .control-group.success select:focus,
1596 .control-group.success textarea:focus {
1597 border-color: #356635;
1598 -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b;
1599 -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b;
1600 box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b;
1601 }
1602 .control-group.success .input-prepend .add-on,
1603 .control-group.success .input-append .add-on {
1604 color: #468847;
1605 background-color: #dff0d8;
1606 border-color: #468847;
1607 }
1608 .control-group.info .control-label,
1609 .control-group.info .help-block,
1610 .control-group.info .help-inline {
1611 color: #3a87ad;
1612 }
1613 .control-group.info .checkbox,
1614 .control-group.info .radio,
1615 .control-group.info input,
1616 .control-group.info select,
1617 .control-group.info textarea {
1618 color: #3a87ad;
1619 }
1620 .control-group.info input,
1621 .control-group.info select,
1622 .control-group.info textarea {
1623 border-color: #3a87ad;
1624 -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
1625 -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
1626 box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
1627 }
1628 .control-group.info input:focus,
1629 .control-group.info select:focus,
1630 .control-group.info textarea:focus {
1631 border-color: #2d6987;
1632 -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3;
1633 -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3;
1634 box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3;
1635 }
1636 .control-group.info .input-prepend .add-on,
1637 .control-group.info .input-append .add-on {
1638 color: #3a87ad;
1639 background-color: #d9edf7;
1640 border-color: #3a87ad;
1641 }
1642 input:focus:invalid,
1643 textarea:focus:invalid,
1644 select:focus:invalid {
1645 color: #b94a48;
1646 border-color: #ee5f5b;
1647 }
1648 input:focus:invalid:focus,
1649 textarea:focus:invalid:focus,
1650 select:focus:invalid:focus {
1651 border-color: #e9322d;
1652 -webkit-box-shadow: 0 0 6px #f8b9b7;
1653 -moz-box-shadow: 0 0 6px #f8b9b7;
1654 box-shadow: 0 0 6px #f8b9b7;
1655 }
1656 .form-actions {
1657 padding: 19px 20px 20px;
1658 margin-top: 20px;
1659 margin-bottom: 20px;
1660 background-color: #f5f5f5;
1661 border-top: 1px solid #e5e5e5;
1662 *zoom: 1;
1663 }
1664 .form-actions:before,
1665 .form-actions:after {
1666 display: table;
1667 content: "";
1668 line-height: 0;
1669 }
1670 .form-actions:after {
1671 clear: both;
1672 }
1673 .help-block,
1674 .help-inline {
1675 color: #595959;
1676 }
1677 .help-block {
1678 display: block;
1679 margin-bottom: 10px;
1680 }
1681 .help-inline {
1682 display: inline-block;
1683 *display: inline;
1684 /* IE7 inline-block hack */
1685
1686 *zoom: 1;
1687 vertical-align: middle;
1688 padding-left: 5px;
1689 }
1690 .input-append,
1691 .input-prepend {
1692 margin-bottom: 5px;
1693 font-size: 0;
1694 white-space: nowrap;
1695 }
1696 .input-append input,
1697 .input-prepend input,
1698 .input-append select,
1699 .input-prepend select,
1700 .input-append .uneditable-input,
1701 .input-prepend .uneditable-input,
1702 .input-append .dropdown-menu,
1703 .input-prepend .dropdown-menu {
1704 font-size: 12px;
1705 }
1706 .input-append input,
1707 .input-prepend input,
1708 .input-append select,
1709 .input-prepend select,
1710 .input-append .uneditable-input,
1711 .input-prepend .uneditable-input {
1712 position: relative;
1713 margin-bottom: 0;
1714 *margin-left: 0;
1715 vertical-align: top;
1716 -webkit-border-radius: 0 4px 4px 0;
1717 -moz-border-radius: 0 4px 4px 0;
1718 border-radius: 0 4px 4px 0;
1719 }
1720 .input-append input:focus,
1721 .input-prepend input:focus,
1722 .input-append select:focus,
1723 .input-prepend select:focus,
1724 .input-append .uneditable-input:focus,
1725 .input-prepend .uneditable-input:focus {
1726 z-index: 2;
1727 }
1728 .input-append .add-on,
1729 .input-prepend .add-on {
1730 display: inline-block;
1731 width: auto;
1732 height: 20px;
1733 min-width: 16px;
1734 padding: 4px 5px;
1735 font-size: 12px;
1736 font-weight: normal;
1737 line-height: 20px;
1738 text-align: center;
1739 text-shadow: 0 1px 0 #ffffff;
1740 background-color: #eeeeee;
1741 border: 1px solid #ccc;
1742 }
1743 .input-append .add-on,
1744 .input-prepend .add-on,
1745 .input-append .btn,
1746 .input-prepend .btn,
1747 .input-append .btn-group > .dropdown-toggle,
1748 .input-prepend .btn-group > .dropdown-toggle {
1749 vertical-align: top;
1750 -webkit-border-radius: 0;
1751 -moz-border-radius: 0;
1752 border-radius: 0;
1753 }
1754 .input-append .active,
1755 .input-prepend .active {
1756 background-color: #a9dba9;
1757 border-color: #46a546;
1758 }
1759 .input-prepend .add-on,
1760 .input-prepend .btn {
1761 margin-right: -1px;
1762 }
1763 .input-prepend .add-on:first-child,
1764 .input-prepend .btn:first-child {
1765 -webkit-border-radius: 4px 0 0 4px;
1766 -moz-border-radius: 4px 0 0 4px;
1767 border-radius: 4px 0 0 4px;
1768 }
1769 .input-append input,
1770 .input-append select,
1771 .input-append .uneditable-input {
1772 -webkit-border-radius: 4px 0 0 4px;
1773 -moz-border-radius: 4px 0 0 4px;
1774 border-radius: 4px 0 0 4px;
1775 }
1776 .input-append input + .btn-group .btn:last-child,
1777 .input-append select + .btn-group .btn:last-child,
1778 .input-append .uneditable-input + .btn-group .btn:last-child {
1779 -webkit-border-radius: 0 4px 4px 0;
1780 -moz-border-radius: 0 4px 4px 0;
1781 border-radius: 0 4px 4px 0;
1782 }
1783 .input-append .add-on,
1784 .input-append .btn,
1785 .input-append .btn-group {
1786 margin-left: -1px;
1787 }
1788 .input-append .add-on:last-child,
1789 .input-append .btn:last-child,
1790 .input-append .btn-group:last-child > .dropdown-toggle {
1791 -webkit-border-radius: 0 4px 4px 0;
1792 -moz-border-radius: 0 4px 4px 0;
1793 border-radius: 0 4px 4px 0;
1794 }
1795 .input-prepend.input-append input,
1796 .input-prepend.input-append select,
1797 .input-prepend.input-append .uneditable-input {
1798 -webkit-border-radius: 0;
1799 -moz-border-radius: 0;
1800 border-radius: 0;
1801 }
1802 .input-prepend.input-append input + .btn-group .btn,
1803 .input-prepend.input-append select + .btn-group .btn,
1804 .input-prepend.input-append .uneditable-input + .btn-group .btn {
1805 -webkit-border-radius: 0 4px 4px 0;
1806 -moz-border-radius: 0 4px 4px 0;
1807 border-radius: 0 4px 4px 0;
1808 }
1809 .input-prepend.input-append .add-on:first-child,
1810 .input-prepend.input-append .btn:first-child {
1811 margin-right: -1px;
1812 -webkit-border-radius: 4px 0 0 4px;
1813 -moz-border-radius: 4px 0 0 4px;
1814 border-radius: 4px 0 0 4px;
1815 }
1816 .input-prepend.input-append .add-on:last-child,
1817 .input-prepend.input-append .btn:last-child {
1818 margin-left: -1px;
1819 -webkit-border-radius: 0 4px 4px 0;
1820 -moz-border-radius: 0 4px 4px 0;
1821 border-radius: 0 4px 4px 0;
1822 }
1823 .input-prepend.input-append .btn-group:first-child {
1824 margin-left: 0;
1825 }
1826 input.search-query {
1827 padding-right: 14px;
1828 padding-right: 4px \9;
1829 padding-left: 14px;
1830 padding-left: 4px \9;
1831 /* IE7-8 doesn't have border-radius, so don't indent the padding */
1832
1833 margin-bottom: 0;
1834 -webkit-border-radius: 15px;
1835 -moz-border-radius: 15px;
1836 border-radius: 15px;
1837 }
1838 /* Allow for input prepend/append in search forms */
1839 .form-search .input-append .search-query,
1840 .form-search .input-prepend .search-query {
1841 -webkit-border-radius: 0;
1842 -moz-border-radius: 0;
1843 border-radius: 0;
1844 }
1845 .form-search .input-append .search-query {
1846 -webkit-border-radius: 14px 0 0 14px;
1847 -moz-border-radius: 14px 0 0 14px;
1848 border-radius: 14px 0 0 14px;
1849 }
1850 .form-search .input-append .btn {
1851 -webkit-border-radius: 0 14px 14px 0;
1852 -moz-border-radius: 0 14px 14px 0;
1853 border-radius: 0 14px 14px 0;
1854 }
1855 .form-search .input-prepend .search-query {
1856 -webkit-border-radius: 0 14px 14px 0;
1857 -moz-border-radius: 0 14px 14px 0;
1858 border-radius: 0 14px 14px 0;
1859 }
1860 .form-search .input-prepend .btn {
1861 -webkit-border-radius: 14px 0 0 14px;
1862 -moz-border-radius: 14px 0 0 14px;
1863 border-radius: 14px 0 0 14px;
1864 }
1865 .form-search input,
1866 .form-inline input,
1867 .form-horizontal input,
1868 .form-search textarea,
1869 .form-inline textarea,
1870 .form-horizontal textarea,
1871 .form-search select,
1872 .form-inline select,
1873 .form-horizontal select,
1874 .form-search .help-inline,
1875 .form-inline .help-inline,
1876 .form-horizontal .help-inline,
1877 .form-search .uneditable-input,
1878 .form-inline .uneditable-input,
1879 .form-horizontal .uneditable-input,
1880 .form-search .input-prepend,
1881 .form-inline .input-prepend,
1882 .form-horizontal .input-prepend,
1883 .form-search .input-append,
1884 .form-inline .input-append,
1885 .form-horizontal .input-append {
1886 display: inline-block;
1887 *display: inline;
1888 /* IE7 inline-block hack */
1889
1890 *zoom: 1;
1891 margin-bottom: 0;
1892 vertical-align: middle;
1893 }
1894 .form-search .hide,
1895 .form-inline .hide,
1896 .form-horizontal .hide {
1897 display: none;
1898 }
1899 .form-search label,
1900 .form-inline label,
1901 .form-search .btn-group,
1902 .form-inline .btn-group {
1903 display: inline-block;
1904 }
1905 .form-search .input-append,
1906 .form-inline .input-append,
1907 .form-search .input-prepend,
1908 .form-inline .input-prepend {
1909 margin-bottom: 0;
1910 }
1911 .form-search .radio,
1912 .form-search .checkbox,
1913 .form-inline .radio,
1914 .form-inline .checkbox {
1915 padding-left: 0;
1916 margin-bottom: 0;
1917 vertical-align: middle;
1918 }
1919 .form-search .radio input[type="radio"],
1920 .form-search .checkbox input[type="checkbox"],
1921 .form-inline .radio input[type="radio"],
1922 .form-inline .checkbox input[type="checkbox"] {
1923 float: left;
1924 margin-right: 3px;
1925 margin-left: 0;
1926 }
1927 .control-group {
1928 margin-bottom: 10px;
1929 }
1930 legend + .control-group {
1931 margin-top: 20px;
1932 -webkit-margin-top-collapse: separate;
1933 }
1934 .form-horizontal .control-group {
1935 margin-bottom: 20px;
1936 *zoom: 1;
1937 }
1938 .form-horizontal .control-group:before,
1939 .form-horizontal .control-group:after {
1940 display: table;
1941 content: "";
1942 line-height: 0;
1943 }
1944 .form-horizontal .control-group:after {
1945 clear: both;
1946 }
1947 .form-horizontal .control-label {
1948 float: left;
1949 width: 160px;
1950 padding-top: 5px;
1951 text-align: right;
1952 }
1953 .form-horizontal .controls {
1954 *display: inline-block;
1955 *padding-left: 20px;
1956 margin-left: 180px;
1957 *margin-left: 0;
1958 }
1959 .form-horizontal .controls:first-child {
1960 *padding-left: 180px;
1961 }
1962 .form-horizontal .help-block {
1963 margin-bottom: 0;
1964 }
1965 .form-horizontal input + .help-block,
1966 .form-horizontal select + .help-block,
1967 .form-horizontal textarea + .help-block,
1968 .form-horizontal .uneditable-input + .help-block,
1969 .form-horizontal .input-prepend + .help-block,
1970 .form-horizontal .input-append + .help-block {
1971 margin-top: 10px;
1972 }
1973 .form-horizontal .form-actions {
1974 padding-left: 180px;
1975 }
1976 .btn {
1977 display: inline-block;
1978 *display: inline;
1979 /* IE7 inline-block hack */
1980
1981 *zoom: 1;
1982 padding: 4px 12px;
1983 margin-bottom: 0;
1984 font-size: 12px;
1985 line-height: 20px;
1986 text-align: center;
1987 vertical-align: middle;
1988 cursor: pointer;
1989 color: #333333;
1990 text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
1991 background-color: #f5f5f5;
1992 background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6);
1993 background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6));
1994 background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6);
1995 background-image: -o-linear-gradient(top, #ffffff, #e6e6e6);
1996 background-image: linear-gradient(to bottom, #ffffff, #e6e6e6);
1997 background-repeat: repeat-x;
1998 filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0);
1999 border-color: #e6e6e6 #e6e6e6 #bfbfbf;
2000 border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
2001 *background-color: #e6e6e6;
2002 /* Darken IE7 buttons by default so they stand out more given they won't have borders */
2003
2004 filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
2005 border: 1px solid #bbbbbb;
2006 *border: 0;
2007 border-bottom-color: #a2a2a2;
2008 -webkit-border-radius: 4px;
2009 -moz-border-radius: 4px;
2010 border-radius: 4px;
2011 *margin-left: .3em;
2012 -webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);
2013 -moz-box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);
2014 box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);
2015 }
2016 .btn:hover,
2017 .btn:active,
2018 .btn.active,
2019 .btn.disabled,
2020 .btn[disabled] {
2021 color: #333333;
2022 background-color: #e6e6e6;
2023 *background-color: #d9d9d9;
2024 }
2025 .btn:active,
2026 .btn.active {
2027 background-color: #cccccc \9;
2028 }
2029 .btn:first-child {
2030 *margin-left: 0;
2031 }
2032 .btn:hover {
2033 color: #333333;
2034 text-decoration: none;
2035 background-position: 0 -15px;
2036 -webkit-transition: background-position 0.1s linear;
2037 -moz-transition: background-position 0.1s linear;
2038 -o-transition: background-position 0.1s linear;
2039 transition: background-position 0.1s linear;
2040 }
2041 .btn:focus {
2042 outline: thin dotted #333;
2043 outline: 5px auto -webkit-focus-ring-color;
2044 outline-offset: -2px;
2045 }
2046 .btn.active,
2047 .btn:active {
2048 background-image: none;
2049 outline: 0;
2050 -webkit-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);
2051 -moz-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);
2052 box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);
2053 }
2054 .btn.disabled,
2055 .btn[disabled] {
2056 cursor: default;
2057 background-image: none;
2058 opacity: 0.65;
2059 filter: alpha(opacity=65);
2060 -webkit-box-shadow: none;
2061 -moz-box-shadow: none;
2062 box-shadow: none;
2063 }
2064 .btn-large {
2065 padding: 11px 19px;
2066 font-size: 15px;
2067 -webkit-border-radius: 6px;
2068 -moz-border-radius: 6px;
2069 border-radius: 6px;
2070 }
2071 .btn-large [class^="icon-"],
2072 .btn-large [class*=" icon-"] {
2073 margin-top: 4px;
2074 }
2075 .btn-small {
2076 padding: 2px 10px;
2077 font-size: 10.2px;
2078 -webkit-border-radius: 3px;
2079 -moz-border-radius: 3px;
2080 border-radius: 3px;
2081 }
2082 .btn-small [class^="icon-"],
2083 .btn-small [class*=" icon-"] {
2084 margin-top: 0;
2085 }
2086 .btn-mini [class^="icon-"],
2087 .btn-mini [class*=" icon-"] {
2088 margin-top: -1px;
2089 }
2090 .btn-mini {
2091 padding: 0 6px;
2092 font-size: 9px;
2093 -webkit-border-radius: 3px;
2094 -moz-border-radius: 3px;
2095 border-radius: 3px;
2096 }
2097 .btn-block {
2098 display: block;
2099 width: 100%;
2100 padding-left: 0;
2101 padding-right: 0;
2102 -webkit-box-sizing: border-box;
2103 -moz-box-sizing: border-box;
2104 box-sizing: border-box;
2105 }
2106 .btn-block + .btn-block {
2107 margin-top: 5px;
2108 }
2109 input[type="submit"].btn-block,
2110 input[type="reset"].btn-block,
2111 input[type="button"].btn-block {
2112 width: 100%;
2113 }
2114 .btn-primary.active,
2115 .btn-warning.active,
2116 .btn-danger.active,
2117 .btn-success.active,
2118 .btn-info.active,
2119 .btn-inverse.active {
2120 color: rgba(255, 255, 255, 0.75);
2121 }
2122 .btn {
2123 border-color: #c5c5c5;
2124 border-color: rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.25);
2125 }
2126 .btn-primary {
2127 color: #ffffff;
2128 text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
2129 background-color: #006dcc;
2130 background-image: -moz-linear-gradient(top, #0088cc, #0044cc);
2131 background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc));
2132 background-image: -webkit-linear-gradient(top, #0088cc, #0044cc);
2133 background-image: -o-linear-gradient(top, #0088cc, #0044cc);
2134 background-image: linear-gradient(to bottom, #0088cc, #0044cc);
2135 background-repeat: repeat-x;
2136 filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0044cc', GradientType=0);
2137 border-color: #0044cc #0044cc #002a80;
2138 border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
2139 *background-color: #0044cc;
2140 /* Darken IE7 buttons by default so they stand out more given they won't have borders */
2141
2142 filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
2143 }
2144 .btn-primary:hover,
2145 .btn-primary:active,
2146 .btn-primary.active,
2147 .btn-primary.disabled,
2148 .btn-primary[disabled] {
2149 color: #ffffff;
2150 background-color: #0044cc;
2151 *background-color: #003bb3;
2152 }
2153 .btn-primary:active,
2154 .btn-primary.active {
2155 background-color: #003399 \9;
2156 }
2157 .btn-warning {
2158 color: #ffffff;
2159 text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
2160 background-color: #faa732;
2161 background-image: -moz-linear-gradient(top, #fbb450, #f89406);
2162 background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406));
2163 background-image: -webkit-linear-gradient(top, #fbb450, #f89406);
2164 background-image: -o-linear-gradient(top, #fbb450, #f89406);
2165 background-image: linear-gradient(to bottom, #fbb450, #f89406);
2166 background-repeat: repeat-x;
2167 filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450', endColorstr='#fff89406', GradientType=0);
2168 border-color: #f89406 #f89406 #ad6704;
2169 border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
2170 *background-color: #f89406;
2171 /* Darken IE7 buttons by default so they stand out more given they won't have borders */
2172
2173 filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
2174 }
2175 .btn-warning:hover,
2176 .btn-warning:active,
2177 .btn-warning.active,
2178 .btn-warning.disabled,
2179 .btn-warning[disabled] {
2180 color: #ffffff;
2181 background-color: #f89406;
2182 *background-color: #df8505;
2183 }
2184 .btn-warning:active,
2185 .btn-warning.active {
2186 background-color: #c67605 \9;
2187 }
2188 .btn-danger {
2189 color: #ffffff;
2190 text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
2191 background-color: #da4f49;
2192 background-image: -moz-linear-gradient(top, #ee5f5b, #bd362f);
2193 background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#bd362f));
2194 background-image: -webkit-linear-gradient(top, #ee5f5b, #bd362f);
2195 background-image: -o-linear-gradient(top, #ee5f5b, #bd362f);
2196 background-image: linear-gradient(to bottom, #ee5f5b, #bd362f);
2197 background-repeat: repeat-x;
2198 filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffbd362f', GradientType=0);
2199 border-color: #bd362f #bd362f #802420;
2200 border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
2201 *background-color: #bd362f;
2202 /* Darken IE7 buttons by default so they stand out more given they won't have borders */
2203
2204 filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
2205 }
2206 .btn-danger:hover,
2207 .btn-danger:active,
2208 .btn-danger.active,
2209 .btn-danger.disabled,
2210 .btn-danger[disabled] {
2211 color: #ffffff;
2212 background-color: #bd362f;
2213 *background-color: #a9302a;
2214 }
2215 .btn-danger:active,
2216 .btn-danger.active {
2217 background-color: #942a25 \9;
2218 }
2219 .btn-success {
2220 color: #ffffff;
2221 text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
2222 background-color: #5bb75b;
2223 background-image: -moz-linear-gradient(top, #62c462, #51a351);
2224 background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#51a351));
2225 background-image: -webkit-linear-gradient(top, #62c462, #51a351);
2226 background-image: -o-linear-gradient(top, #62c462, #51a351);
2227 background-image: linear-gradient(to bottom, #62c462, #51a351);
2228 background-repeat: repeat-x;
2229 filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff51a351', GradientType=0);
2230 border-color: #51a351 #51a351 #387038;
2231 border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
2232 *background-color: #51a351;
2233 /* Darken IE7 buttons by default so they stand out more given they won't have borders */
2234
2235 filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
2236 }
2237 .btn-success:hover,
2238 .btn-success:active,
2239 .btn-success.active,
2240 .btn-success.disabled,
2241 .btn-success[disabled] {
2242 color: #ffffff;
2243 background-color: #51a351;
2244 *background-color: #499249;
2245 }
2246 .btn-success:active,
2247 .btn-success.active {
2248 background-color: #408140 \9;
2249 }
2250 .btn-info {
2251 color: #ffffff;
2252 text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
2253 background-color: #49afcd;
2254 background-image: -moz-linear-gradient(top, #5bc0de, #2f96b4);
2255 background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#2f96b4));
2256 background-image: -webkit-linear-gradient(top, #5bc0de, #2f96b4);
2257 background-image: -o-linear-gradient(top, #5bc0de, #2f96b4);
2258 background-image: linear-gradient(to bottom, #5bc0de, #2f96b4);
2259 background-repeat: repeat-x;
2260 filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2f96b4', GradientType=0);
2261 border-color: #2f96b4 #2f96b4 #1f6377;
2262 border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
2263 *background-color: #2f96b4;
2264 /* Darken IE7 buttons by default so they stand out more given they won't have borders */
2265
2266 filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
2267 }
2268 .btn-info:hover,
2269 .btn-info:active,
2270 .btn-info.active,
2271 .btn-info.disabled,
2272 .btn-info[disabled] {
2273 color: #ffffff;
2274 background-color: #2f96b4;
2275 *background-color: #2a85a0;
2276 }
2277 .btn-info:active,
2278 .btn-info.active {
2279 background-color: #24748c \9;
2280 }
2281 .btn-inverse {
2282 color: #ffffff;
2283 text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
2284 background-color: #363636;
2285 background-image: -moz-linear-gradient(top, #444444, #222222);
2286 background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#444444), to(#222222));
2287 background-image: -webkit-linear-gradient(top, #444444, #222222);
2288 background-image: -o-linear-gradient(top, #444444, #222222);
2289 background-image: linear-gradient(to bottom, #444444, #222222);
2290 background-repeat: repeat-x;
2291 filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff444444', endColorstr='#ff222222', GradientType=0);
2292 border-color: #222222 #222222 #000000;
2293 border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
2294 *background-color: #222222;
2295 /* Darken IE7 buttons by default so they stand out more given they won't have borders */
2296
2297 filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
2298 }
2299 .btn-inverse:hover,
2300 .btn-inverse:active,
2301 .btn-inverse.active,
2302 .btn-inverse.disabled,
2303 .btn-inverse[disabled] {
2304 color: #ffffff;
2305 background-color: #222222;
2306 *background-color: #151515;
2307 }
2308 .btn-inverse:active,
2309 .btn-inverse.active {
2310 background-color: #080808 \9;
2311 }
2312 button.btn,
2313 input[type="submit"].btn {
2314 *padding-top: 3px;
2315 *padding-bottom: 3px;
2316 }
2317 button.btn::-moz-focus-inner,
2318 input[type="submit"].btn::-moz-focus-inner {
2319 padding: 0;
2320 border: 0;
2321 }
2322 button.btn.btn-large,
2323 input[type="submit"].btn.btn-large {
2324 *padding-top: 7px;
2325 *padding-bottom: 7px;
2326 }
2327 button.btn.btn-small,
2328 input[type="submit"].btn.btn-small {
2329 *padding-top: 3px;
2330 *padding-bottom: 3px;
2331 }
2332 button.btn.btn-mini,
2333 input[type="submit"].btn.btn-mini {
2334 *padding-top: 1px;
2335 *padding-bottom: 1px;
2336 }
2337 .btn-link,
2338 .btn-link:active,
2339 .btn-link[disabled] {
2340 background-color: transparent;
2341 background-image: none;
2342 -webkit-box-shadow: none;
2343 -moz-box-shadow: none;
2344 box-shadow: none;
2345 }
2346 .btn-link {
2347 border-color: transparent;
2348 cursor: pointer;
2349 color: #0088cc;
2350 -webkit-border-radius: 0;
2351 -moz-border-radius: 0;
2352 border-radius: 0;
2353 }
2354 .btn-link:hover {
2355 color: #005580;
2356 text-decoration: underline;
2357 background-color: transparent;
2358 }
2359 .btn-link[disabled]:hover {
2360 color: #333333;
2361 text-decoration: none;
2362 }
2363 [class^="icon-"],
2364 [class*=" icon-"] {
2365 display: inline-block;
2366 width: 14px;
2367 height: 14px;
2368 *margin-right: .3em;
2369 line-height: 14px;
2370 vertical-align: text-top;
2371 background-image: url("../img/glyphicons-halflings.png");
2372 background-position: 14px 14px;
2373 background-repeat: no-repeat;
2374 margin-top: 1px;
2375 }
2376 /* White icons with optional class, or on hover/active states of certain elements */
2377 .icon-white,
2378 .nav-pills > .active > a > [class^="icon-"],
2379 .nav-pills > .active > a > [class*=" icon-"],
2380 .nav-list > .active > a > [class^="icon-"],
2381 .nav-list > .active > a > [class*=" icon-"],
2382 .navbar-inverse .nav > .active > a > [class^="icon-"],
2383 .navbar-inverse .nav > .active > a > [class*=" icon-"],
2384 .dropdown-menu > li > a:hover > [class^="icon-"],
2385 .dropdown-menu > li > a:hover > [class*=" icon-"],
2386 .dropdown-menu > .active > a > [class^="icon-"],
2387 .dropdown-menu > .active > a > [class*=" icon-"],
2388 .dropdown-submenu:hover > a > [class^="icon-"],
2389 .dropdown-submenu:hover > a > [class*=" icon-"] {
2390 background-image: url("../img/glyphicons-halflings-white.png");
2391 }
2392 .icon-glass {
2393 background-position: 0 0;
2394 }
2395 .icon-music {
2396 background-position: -24px 0;
2397 }
2398 .icon-search {
2399 background-position: -48px 0;
2400 }
2401 .icon-envelope {
2402 background-position: -72px 0;
2403 }
2404 .icon-heart {
2405 background-position: -96px 0;
2406 }
2407 .icon-star {
2408 background-position: -120px 0;
2409 }
2410 .icon-star-empty {
2411 background-position: -144px 0;
2412 }
2413 .icon-user {
2414 background-position: -168px 0;
2415 }
2416 .icon-film {
2417 background-position: -192px 0;
2418 }
2419 .icon-th-large {
2420 background-position: -216px 0;
2421 }
2422 .icon-th {
2423 background-position: -240px 0;
2424 }
2425 .icon-th-list {
2426 background-position: -264px 0;
2427 }
2428 .icon-ok {
2429 background-position: -288px 0;
2430 }
2431 .icon-remove {
2432 background-position: -312px 0;
2433 }
2434 .icon-zoom-in {
2435 background-position: -336px 0;
2436 }
2437 .icon-zoom-out {
2438 background-position: -360px 0;
2439 }
2440 .icon-off {
2441 background-position: -384px 0;
2442 }
2443 .icon-signal {
2444 background-position: -408px 0;
2445 }
2446 .icon-cog {
2447 background-position: -432px 0;
2448 }
2449 .icon-trash {
2450 background-position: -456px 0;
2451 }
2452 .icon-home {
2453 background-position: 0 -24px;
2454 }
2455 .icon-file {
2456 background-position: -24px -24px;
2457 }
2458 .icon-time {
2459 background-position: -48px -24px;
2460 }
2461 .icon-road {
2462 background-position: -72px -24px;
2463 }
2464 .icon-download-alt {
2465 background-position: -96px -24px;
2466 }
2467 .icon-download {
2468 background-position: -120px -24px;
2469 }
2470 .icon-upload {
2471 background-position: -144px -24px;
2472 }
2473 .icon-inbox {
2474 background-position: -168px -24px;
2475 }
2476 .icon-play-circle {
2477 background-position: -192px -24px;
2478 }
2479 .icon-repeat {
2480 background-position: -216px -24px;
2481 }
2482 .icon-refresh {
2483 background-position: -240px -24px;
2484 }
2485 .icon-list-alt {
2486 background-position: -264px -24px;
2487 }
2488 .icon-lock {
2489 background-position: -287px -24px;
2490 }
2491 .icon-flag {
2492 background-position: -312px -24px;
2493 }
2494 .icon-headphones {
2495 background-position: -336px -24px;
2496 }
2497 .icon-volume-off {
2498 background-position: -360px -24px;
2499 }
2500 .icon-volume-down {
2501 background-position: -384px -24px;
2502 }
2503 .icon-volume-up {
2504 background-position: -408px -24px;
2505 }
2506 .icon-qrcode {
2507 background-position: -432px -24px;
2508 }
2509 .icon-barcode {
2510 background-position: -456px -24px;
2511 }
2512 .icon-tag {
2513 background-position: 0 -48px;
2514 }
2515 .icon-tags {
2516 background-position: -25px -48px;
2517 }
2518 .icon-book {
2519 background-position: -48px -48px;
2520 }
2521 .icon-bookmark {
2522 background-position: -72px -48px;
2523 }
2524 .icon-print {
2525 background-position: -96px -48px;
2526 }
2527 .icon-camera {
2528 background-position: -120px -48px;
2529 }
2530 .icon-font {
2531 background-position: -144px -48px;
2532 }
2533 .icon-bold {
2534 background-position: -167px -48px;
2535 }
2536 .icon-italic {
2537 background-position: -192px -48px;
2538 }
2539 .icon-text-height {
2540 background-position: -216px -48px;
2541 }
2542 .icon-text-width {
2543 background-position: -240px -48px;
2544 }
2545 .icon-align-left {
2546 background-position: -264px -48px;
2547 }
2548 .icon-align-center {
2549 background-position: -288px -48px;
2550 }
2551 .icon-align-right {
2552 background-position: -312px -48px;
2553 }
2554 .icon-align-justify {
2555 background-position: -336px -48px;
2556 }
2557 .icon-list {
2558 background-position: -360px -48px;
2559 }
2560 .icon-indent-left {
2561 background-position: -384px -48px;
2562 }
2563 .icon-indent-right {
2564 background-position: -408px -48px;
2565 }
2566 .icon-facetime-video {
2567 background-position: -432px -48px;
2568 }
2569 .icon-picture {
2570 background-position: -456px -48px;
2571 }
2572 .icon-pencil {
2573 background-position: 0 -72px;
2574 }
2575 .icon-map-marker {
2576 background-position: -24px -72px;
2577 }
2578 .icon-adjust {
2579 background-position: -48px -72px;
2580 }
2581 .icon-tint {
2582 background-position: -72px -72px;
2583 }
2584 .icon-edit {
2585 background-position: -96px -72px;
2586 }
2587 .icon-share {
2588 background-position: -120px -72px;
2589 }
2590 .icon-check {
2591 background-position: -144px -72px;
2592 }
2593 .icon-move {
2594 background-position: -168px -72px;
2595 }
2596 .icon-step-backward {
2597 background-position: -192px -72px;
2598 }
2599 .icon-fast-backward {
2600 background-position: -216px -72px;
2601 }
2602 .icon-backward {
2603 background-position: -240px -72px;
2604 }
2605 .icon-play {
2606 background-position: -264px -72px;
2607 }
2608 .icon-pause {
2609 background-position: -288px -72px;
2610 }
2611 .icon-stop {
2612 background-position: -312px -72px;
2613 }
2614 .icon-forward {
2615 background-position: -336px -72px;
2616 }
2617 .icon-fast-forward {
2618 background-position: -360px -72px;
2619 }
2620 .icon-step-forward {
2621 background-position: -384px -72px;
2622 }
2623 .icon-eject {
2624 background-position: -408px -72px;
2625 }
2626 .icon-chevron-left {
2627 background-position: -432px -72px;
2628 }
2629 .icon-chevron-right {
2630 background-position: -456px -72px;
2631 }
2632 .icon-plus-sign {
2633 background-position: 0 -96px;
2634 }
2635 .icon-minus-sign {
2636 background-position: -24px -96px;
2637 }
2638 .icon-remove-sign {
2639 background-position: -48px -96px;
2640 }
2641 .icon-ok-sign {
2642 background-position: -72px -96px;
2643 }
2644 .icon-question-sign {
2645 background-position: -96px -96px;
2646 }
2647 .icon-info-sign {
2648 background-position: -120px -96px;
2649 }
2650 .icon-screenshot {
2651 background-position: -144px -96px;
2652 }
2653 .icon-remove-circle {
2654 background-position: -168px -96px;
2655 }
2656 .icon-ok-circle {
2657 background-position: -192px -96px;
2658 }
2659 .icon-ban-circle {
2660 background-position: -216px -96px;
2661 }
2662 .icon-arrow-left {
2663 background-position: -240px -96px;
2664 }
2665 .icon-arrow-right {
2666 background-position: -264px -96px;
2667 }
2668 .icon-arrow-up {
2669 background-position: -289px -96px;
2670 }
2671 .icon-arrow-down {
2672 background-position: -312px -96px;
2673 }
2674 .icon-share-alt {
2675 background-position: -336px -96px;
2676 }
2677 .icon-resize-full {
2678 background-position: -360px -96px;
2679 }
2680 .icon-resize-small {
2681 background-position: -384px -96px;
2682 }
2683 .icon-plus {
2684 background-position: -408px -96px;
2685 }
2686 .icon-minus {
2687 background-position: -433px -96px;
2688 }
2689 .icon-asterisk {
2690 background-position: -456px -96px;
2691 }
2692 .icon-exclamation-sign {
2693 background-position: 0 -120px;
2694 }
2695 .icon-gift {
2696 background-position: -24px -120px;
2697 }
2698 .icon-leaf {
2699 background-position: -48px -120px;
2700 }
2701 .icon-fire {
2702 background-position: -72px -120px;
2703 }
2704 .icon-eye-open {
2705 background-position: -96px -120px;
2706 }
2707 .icon-eye-close {
2708 background-position: -120px -120px;
2709 }
2710 .icon-warning-sign {
2711 background-position: -144px -120px;
2712 }
2713 .icon-plane {
2714 background-position: -168px -120px;
2715 }
2716 .icon-calendar {
2717 background-position: -192px -120px;
2718 }
2719 .icon-random {
2720 background-position: -216px -120px;
2721 width: 16px;
2722 }
2723 .icon-comment {
2724 background-position: -240px -120px;
2725 }
2726 .icon-magnet {
2727 background-position: -264px -120px;
2728 }
2729 .icon-chevron-up {
2730 background-position: -288px -120px;
2731 }
2732 .icon-chevron-down {
2733 background-position: -313px -119px;
2734 }
2735 .icon-retweet {
2736 background-position: -336px -120px;
2737 }
2738 .icon-shopping-cart {
2739 background-position: -360px -120px;
2740 }
2741 .icon-folder-close {
2742 background-position: -384px -120px;
2743 }
2744 .icon-folder-open {
2745 background-position: -408px -120px;
2746 width: 16px;
2747 }
2748 .icon-resize-vertical {
2749 background-position: -432px -119px;
2750 }
2751 .icon-resize-horizontal {
2752 background-position: -456px -118px;
2753 }
2754 .icon-hdd {
2755 background-position: 0 -144px;
2756 }
2757 .icon-bullhorn {
2758 background-position: -24px -144px;
2759 }
2760 .icon-bell {
2761 background-position: -48px -144px;
2762 }
2763 .icon-certificate {
2764 background-position: -72px -144px;
2765 }
2766 .icon-thumbs-up {
2767 background-position: -96px -144px;
2768 }
2769 .icon-thumbs-down {
2770 background-position: -120px -144px;
2771 }
2772 .icon-hand-right {
2773 background-position: -144px -144px;
2774 }
2775 .icon-hand-left {
2776 background-position: -168px -144px;
2777 }
2778 .icon-hand-up {
2779 background-position: -192px -144px;
2780 }
2781 .icon-hand-down {
2782 background-position: -216px -144px;
2783 }
2784 .icon-circle-arrow-right {
2785 background-position: -240px -144px;
2786 }
2787 .icon-circle-arrow-left {
2788 background-position: -264px -144px;
2789 }
2790 .icon-circle-arrow-up {
2791 background-position: -288px -144px;
2792 }
2793 .icon-circle-arrow-down {
2794 background-position: -312px -144px;
2795 }
2796 .icon-globe {
2797 background-position: -336px -144px;
2798 }
2799 .icon-wrench {
2800 background-position: -360px -144px;
2801 }
2802 .icon-tasks {
2803 background-position: -384px -144px;
2804 }
2805 .icon-filter {
2806 background-position: -408px -144px;
2807 }
2808 .icon-briefcase {
2809 background-position: -432px -144px;
2810 }
2811 .icon-fullscreen {
2812 background-position: -456px -144px;
2813 }
2814 .btn-group {
2815 position: relative;
2816 display: inline-block;
2817 *display: inline;
2818 /* IE7 inline-block hack */
2819
2820 *zoom: 1;
2821 font-size: 0;
2822 vertical-align: middle;
2823 white-space: nowrap;
2824 *margin-left: .3em;
2825 }
2826 .btn-group:first-child {
2827 *margin-left: 0;
2828 }
2829 .btn-group + .btn-group {
2830 margin-left: 5px;
2831 }
2832 .btn-toolbar {
2833 font-size: 0;
2834 margin-top: 10px;
2835 margin-bottom: 10px;
2836 }
2837 .btn-toolbar > .btn + .btn,
2838 .btn-toolbar > .btn-group + .btn,
2839 .btn-toolbar > .btn + .btn-group {
2840 margin-left: 5px;
2841 }
2842 .btn-group > .btn {
2843 position: relative;
2844 -webkit-border-radius: 0;
2845 -moz-border-radius: 0;
2846 border-radius: 0;
2847 }
2848 .btn-group > .btn + .btn {
2849 margin-left: -1px;
2850 }
2851 .btn-group > .btn,
2852 .btn-group > .dropdown-menu,
2853 .btn-group > .popover {
2854 font-size: 12px;
2855 }
2856 .btn-group > .btn-mini {
2857 font-size: 9px;
2858 }
2859 .btn-group > .btn-small {
2860 font-size: 10.2px;
2861 }
2862 .btn-group > .btn-large {
2863 font-size: 15px;
2864 }
2865 .btn-group > .btn:first-child {
2866 margin-left: 0;
2867 -webkit-border-top-left-radius: 4px;
2868 -moz-border-radius-topleft: 4px;
2869 border-top-left-radius: 4px;
2870 -webkit-border-bottom-left-radius: 4px;
2871 -moz-border-radius-bottomleft: 4px;
2872 border-bottom-left-radius: 4px;
2873 }
2874 .btn-group > .btn:last-child,
2875 .btn-group > .dropdown-toggle {
2876 -webkit-border-top-right-radius: 4px;
2877 -moz-border-radius-topright: 4px;
2878 border-top-right-radius: 4px;
2879 -webkit-border-bottom-right-radius: 4px;
2880 -moz-border-radius-bottomright: 4px;
2881 border-bottom-right-radius: 4px;
2882 }
2883 .btn-group > .btn.large:first-child {
2884 margin-left: 0;
2885 -webkit-border-top-left-radius: 6px;
2886 -moz-border-radius-topleft: 6px;
2887 border-top-left-radius: 6px;
2888 -webkit-border-bottom-left-radius: 6px;
2889 -moz-border-radius-bottomleft: 6px;
2890 border-bottom-left-radius: 6px;
2891 }
2892 .btn-group > .btn.large:last-child,
2893 .btn-group > .large.dropdown-toggle {
2894 -webkit-border-top-right-radius: 6px;
2895 -moz-border-radius-topright: 6px;
2896 border-top-right-radius: 6px;
2897 -webkit-border-bottom-right-radius: 6px;
2898 -moz-border-radius-bottomright: 6px;
2899 border-bottom-right-radius: 6px;
2900 }
2901 .btn-group > .btn:hover,
2902 .btn-group > .btn:focus,
2903 .btn-group > .btn:active,
2904 .btn-group > .btn.active {
2905 z-index: 2;
2906 }
2907 .btn-group .dropdown-toggle:active,
2908 .btn-group.open .dropdown-toggle {
2909 outline: 0;
2910 }
2911 .btn-group > .btn + .dropdown-toggle {
2912 padding-left: 8px;
2913 padding-right: 8px;
2914 -webkit-box-shadow: inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);
2915 -moz-box-shadow: inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);
2916 box-shadow: inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);
2917 *padding-top: 5px;
2918 *padding-bottom: 5px;
2919 }
2920 .btn-group > .btn-mini + .dropdown-toggle {
2921 padding-left: 5px;
2922 padding-right: 5px;
2923 *padding-top: 2px;
2924 *padding-bottom: 2px;
2925 }
2926 .btn-group > .btn-small + .dropdown-toggle {
2927 *padding-top: 5px;
2928 *padding-bottom: 4px;
2929 }
2930 .btn-group > .btn-large + .dropdown-toggle {
2931 padding-left: 12px;
2932 padding-right: 12px;
2933 *padding-top: 7px;
2934 *padding-bottom: 7px;
2935 }
2936 .btn-group.open .dropdown-toggle {
2937 background-image: none;
2938 -webkit-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);
2939 -moz-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);
2940 box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);
2941 }
2942 .btn-group.open .btn.dropdown-toggle {
2943 background-color: #e6e6e6;
2944 }
2945 .btn-group.open .btn-primary.dropdown-toggle {
2946 background-color: #0044cc;
2947 }
2948 .btn-group.open .btn-warning.dropdown-toggle {
2949 background-color: #f89406;
2950 }
2951 .btn-group.open .btn-danger.dropdown-toggle {
2952 background-color: #bd362f;
2953 }
2954 .btn-group.open .btn-success.dropdown-toggle {
2955 background-color: #51a351;
2956 }
2957 .btn-group.open .btn-info.dropdown-toggle {
2958 background-color: #2f96b4;
2959 }
2960 .btn-group.open .btn-inverse.dropdown-toggle {
2961 background-color: #222222;
2962 }
2963 .btn .caret {
2964 margin-top: 8px;
2965 margin-left: 0;
2966 }
2967 .btn-mini .caret,
2968 .btn-small .caret,
2969 .btn-large .caret {
2970 margin-top: 6px;
2971 }
2972 .btn-large .caret {
2973 border-left-width: 5px;
2974 border-right-width: 5px;
2975 border-top-width: 5px;
2976 }
2977 .dropup .btn-large .caret {
2978 border-bottom-width: 5px;
2979 }
2980 .btn-primary .caret,
2981 .btn-warning .caret,
2982 .btn-danger .caret,
2983 .btn-info .caret,
2984 .btn-success .caret,
2985 .btn-inverse .caret {
2986 border-top-color: #ffffff;
2987 border-bottom-color: #ffffff;
2988 }
2989 .btn-group-vertical {
2990 display: inline-block;
2991 *display: inline;
2992 /* IE7 inline-block hack */
2993
2994 *zoom: 1;
2995 }
2996 .btn-group-vertical > .btn {
2997 display: block;
2998 float: none;
2999 max-width: 100%;
3000 -webkit-border-radius: 0;
3001 -moz-border-radius: 0;
3002 border-radius: 0;
3003 }
3004 .btn-group-vertical > .btn + .btn {
3005 margin-left: 0;
3006 margin-top: -1px;
3007 }
3008 .btn-group-vertical > .btn:first-child {
3009 -webkit-border-radius: 4px 4px 0 0;
3010 -moz-border-radius: 4px 4px 0 0;
3011 border-radius: 4px 4px 0 0;
3012 }
3013 .btn-group-vertical > .btn:last-child {
3014 -webkit-border-radius: 0 0 4px 4px;
3015 -moz-border-radius: 0 0 4px 4px;
3016 border-radius: 0 0 4px 4px;
3017 }
3018 .btn-group-vertical > .btn-large:first-child {
3019 -webkit-border-radius: 6px 6px 0 0;
3020 -moz-border-radius: 6px 6px 0 0;
3021 border-radius: 6px 6px 0 0;
3022 }
3023 .btn-group-vertical > .btn-large:last-child {
3024 -webkit-border-radius: 0 0 6px 6px;
3025 -moz-border-radius: 0 0 6px 6px;
3026 border-radius: 0 0 6px 6px;
3027 }
3028 .nav {
3029 margin-left: 0;
3030 margin-bottom: 20px;
3031 list-style: none;
3032 }
3033 .nav > li > a {
3034 display: block;
3035 }
3036 .nav > li > a:hover {
3037 text-decoration: none;
3038 background-color: #eeeeee;
3039 }
3040 .nav > li > a > img {
3041 max-width: none;
3042 }
3043 .nav > .pull-right {
3044 float: right;
3045 }
3046 .nav-header {
3047 display: block;
3048 padding: 3px 15px;
3049 font-size: 11px;
3050 font-weight: bold;
3051 line-height: 20px;
3052 color: #999999;
3053 text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
3054 text-transform: uppercase;
3055 }
3056 .nav li + .nav-header {
3057 margin-top: 9px;
3058 }
3059 .nav-list {
3060 padding-left: 15px;
3061 padding-right: 15px;
3062 margin-bottom: 0;
3063 }
3064 .nav-list > li > a,
3065 .nav-list .nav-header {
3066 margin-left: -15px;
3067 margin-right: -15px;
3068 text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
3069 }
3070 .nav-list > li > a {
3071 padding: 3px 15px;
3072 }
3073 .nav-list > .active > a,
3074 .nav-list > .active > a:hover {
3075 color: #ffffff;
3076 text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2);
3077 background-color: #0088cc;
3078 }
3079 .nav-list [class^="icon-"],
3080 .nav-list [class*=" icon-"] {
3081 margin-right: 2px;
3082 }
3083 .nav-list .divider {
3084 *width: 100%;
3085 height: 1px;
3086 margin: 9px 1px;
3087 *margin: -5px 0 5px;
3088 overflow: hidden;
3089 background-color: #e5e5e5;
3090 border-bottom: 1px solid #ffffff;
3091 }
3092 .nav-tabs,
3093 .nav-pills {
3094 *zoom: 1;
3095 }
3096 .nav-tabs:before,
3097 .nav-pills:before,
3098 .nav-tabs:after,
3099 .nav-pills:after {
3100 display: table;
3101 content: "";
3102 line-height: 0;
3103 }
3104 .nav-tabs:after,
3105 .nav-pills:after {
3106 clear: both;
3107 }
3108 .nav-tabs > li,
3109 .nav-pills > li {
3110 float: left;
3111 }
3112 .nav-tabs > li > a,
3113 .nav-pills > li > a {
3114 padding-right: 12px;
3115 padding-left: 12px;
3116 margin-right: 2px;
3117 line-height: 14px;
3118 }
3119 .nav-tabs {
3120 border-bottom: 1px solid #ddd;
3121 }
3122 .nav-tabs > li {
3123 margin-bottom: -1px;
3124 }
3125 .nav-tabs > li > a {
3126 padding-top: 8px;
3127 padding-bottom: 8px;
3128 line-height: 20px;
3129 border: 1px solid transparent;
3130 -webkit-border-radius: 4px 4px 0 0;
3131 -moz-border-radius: 4px 4px 0 0;
3132 border-radius: 4px 4px 0 0;
3133 }
3134 .nav-tabs > li > a:hover {
3135 border-color: #eeeeee #eeeeee #dddddd;
3136 }
3137 .nav-tabs > .active > a,
3138 .nav-tabs > .active > a:hover {
3139 color: #555555;
3140 background-color: #ffffff;
3141 border: 1px solid #ddd;
3142 border-bottom-color: transparent;
3143 cursor: default;
3144 }
3145 .nav-pills > li > a {
3146 padding-top: 8px;
3147 padding-bottom: 8px;
3148 margin-top: 2px;
3149 margin-bottom: 2px;
3150 -webkit-border-radius: 5px;
3151 -moz-border-radius: 5px;
3152 border-radius: 5px;
3153 }
3154 .nav-pills > .active > a,
3155 .nav-pills > .active > a:hover {
3156 color: #ffffff;
3157 background-color: #0088cc;
3158 }
3159 .nav-stacked > li {
3160 float: none;
3161 }
3162 .nav-stacked > li > a {
3163 margin-right: 0;
3164 }
3165 .nav-tabs.nav-stacked {
3166 border-bottom: 0;
3167 }
3168 .nav-tabs.nav-stacked > li > a {
3169 border: 1px solid #ddd;
3170 -webkit-border-radius: 0;
3171 -moz-border-radius: 0;
3172 border-radius: 0;
3173 }
3174 .nav-tabs.nav-stacked > li:first-child > a {
3175 -webkit-border-top-right-radius: 4px;
3176 -moz-border-radius-topright: 4px;
3177 border-top-right-radius: 4px;
3178 -webkit-border-top-left-radius: 4px;
3179 -moz-border-radius-topleft: 4px;
3180 border-top-left-radius: 4px;
3181 }
3182 .nav-tabs.nav-stacked > li:last-child > a {
3183 -webkit-border-bottom-right-radius: 4px;
3184 -moz-border-radius-bottomright: 4px;
3185 border-bottom-right-radius: 4px;
3186 -webkit-border-bottom-left-radius: 4px;
3187 -moz-border-radius-bottomleft: 4px;
3188 border-bottom-left-radius: 4px;
3189 }
3190 .nav-tabs.nav-stacked > li > a:hover {
3191 border-color: #ddd;
3192 z-index: 2;
3193 }
3194 .nav-pills.nav-stacked > li > a {
3195 margin-bottom: 3px;
3196 }
3197 .nav-pills.nav-stacked > li:last-child > a {
3198 margin-bottom: 1px;
3199 }
3200 .nav-tabs .dropdown-menu {
3201 -webkit-border-radius: 0 0 6px 6px;
3202 -moz-border-radius: 0 0 6px 6px;
3203 border-radius: 0 0 6px 6px;
3204 }
3205 .nav-pills .dropdown-menu {
3206 -webkit-border-radius: 6px;
3207 -moz-border-radius: 6px;
3208 border-radius: 6px;
3209 }
3210 .nav .dropdown-toggle .caret {
3211 border-top-color: #0088cc;
3212 border-bottom-color: #0088cc;
3213 margin-top: 6px;
3214 }
3215 .nav .dropdown-toggle:hover .caret {
3216 border-top-color: #005580;
3217 border-bottom-color: #005580;
3218 }
3219 /* move down carets for tabs */
3220 .nav-tabs .dropdown-toggle .caret {
3221 margin-top: 8px;
3222 }
3223 .nav .active .dropdown-toggle .caret {
3224 border-top-color: #fff;
3225 border-bottom-color: #fff;
3226 }
3227 .nav-tabs .active .dropdown-toggle .caret {
3228 border-top-color: #555555;
3229 border-bottom-color: #555555;
3230 }
3231 .nav > .dropdown.active > a:hover {
3232 cursor: pointer;
3233 }
3234 .nav-tabs .open .dropdown-toggle,
3235 .nav-pills .open .dropdown-toggle,
3236 .nav > li.dropdown.open.active > a:hover {
3237 color: #ffffff;
3238 background-color: #999999;
3239 border-color: #999999;
3240 }
3241 .nav li.dropdown.open .caret,
3242 .nav li.dropdown.open.active .caret,
3243 .nav li.dropdown.open a:hover .caret {
3244 border-top-color: #ffffff;
3245 border-bottom-color: #ffffff;
3246 opacity: 1;
3247 filter: alpha(opacity=100);
3248 }
3249 .tabs-stacked .open > a:hover {
3250 border-color: #999999;
3251 }
3252 .tabbable {
3253 *zoom: 1;
3254 }
3255 .tabbable:before,
3256 .tabbable:after {
3257 display: table;
3258 content: "";
3259 line-height: 0;
3260 }
3261 .tabbable:after {
3262 clear: both;
3263 }
3264 .tab-content {
3265 overflow: auto;
3266 }
3267 .tabs-below > .nav-tabs,
3268 .tabs-right > .nav-tabs,
3269 .tabs-left > .nav-tabs {
3270 border-bottom: 0;
3271 }
3272 .tab-content > .tab-pane,
3273 .pill-content > .pill-pane {
3274 display: none;
3275 }
3276 .tab-content > .active,
3277 .pill-content > .active {
3278 display: block;
3279 }
3280 .tabs-below > .nav-tabs {
3281 border-top: 1px solid #ddd;
3282 }
3283 .tabs-below > .nav-tabs > li {
3284 margin-top: -1px;
3285 margin-bottom: 0;
3286 }
3287 .tabs-below > .nav-tabs > li > a {
3288 -webkit-border-radius: 0 0 4px 4px;
3289 -moz-border-radius: 0 0 4px 4px;
3290 border-radius: 0 0 4px 4px;
3291 }
3292 .tabs-below > .nav-tabs > li > a:hover {
3293 border-bottom-color: transparent;
3294 border-top-color: #ddd;
3295 }
3296 .tabs-below > .nav-tabs > .active > a,
3297 .tabs-below > .nav-tabs > .active > a:hover {
3298 border-color: transparent #ddd #ddd #ddd;
3299 }
3300 .tabs-left > .nav-tabs > li,
3301 .tabs-right > .nav-tabs > li {
3302 float: none;
3303 }
3304 .tabs-left > .nav-tabs > li > a,
3305 .tabs-right > .nav-tabs > li > a {
3306 min-width: 74px;
3307 margin-right: 0;
3308 margin-bottom: 3px;
3309 }
3310 .tabs-left > .nav-tabs {
3311 float: left;
3312 margin-right: 19px;
3313 border-right: 1px solid #ddd;
3314 }
3315 .tabs-left > .nav-tabs > li > a {
3316 margin-right: -1px;
3317 -webkit-border-radius: 4px 0 0 4px;
3318 -moz-border-radius: 4px 0 0 4px;
3319 border-radius: 4px 0 0 4px;
3320 }
3321 .tabs-left > .nav-tabs > li > a:hover {
3322 border-color: #eeeeee #dddddd #eeeeee #eeeeee;
3323 }
3324 .tabs-left > .nav-tabs .active > a,
3325 .tabs-left > .nav-tabs .active > a:hover {
3326 border-color: #ddd transparent #ddd #ddd;
3327 *border-right-color: #ffffff;
3328 }
3329 .tabs-right > .nav-tabs {
3330 float: right;
3331 margin-left: 19px;
3332 border-left: 1px solid #ddd;
3333 }
3334 .tabs-right > .nav-tabs > li > a {
3335 margin-left: -1px;
3336 -webkit-border-radius: 0 4px 4px 0;
3337 -moz-border-radius: 0 4px 4px 0;
3338 border-radius: 0 4px 4px 0;
3339 }
3340 .tabs-right > .nav-tabs > li > a:hover {
3341 border-color: #eeeeee #eeeeee #eeeeee #dddddd;
3342 }
3343 .tabs-right > .nav-tabs .active > a,
3344 .tabs-right > .nav-tabs .active > a:hover {
3345 border-color: #ddd #ddd #ddd transparent;
3346 *border-left-color: #ffffff;
3347 }
3348 .nav > .disabled > a {
3349 color: #999999;
3350 }
3351 .nav > .disabled > a:hover {
3352 text-decoration: none;
3353 background-color: transparent;
3354 cursor: default;
3355 }
3356 .navbar {
3357 overflow: visible;
3358 margin-bottom: 20px;
3359 *position: relative;
3360 *z-index: 2;
3361 }
3362 .navbar-inner {
3363 min-height: 40px;
3364 padding-left: 20px;
3365 padding-right: 20px;
3366 background-color: #fafafa;
3367 background-image: -moz-linear-gradient(top, #ffffff, #f2f2f2);
3368 background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#f2f2f2));
3369 background-image: -webkit-linear-gradient(top, #ffffff, #f2f2f2);
3370 background-image: -o-linear-gradient(top, #ffffff, #f2f2f2);
3371 background-image: linear-gradient(to bottom, #ffffff, #f2f2f2);
3372 background-repeat: repeat-x;
3373 filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff2f2f2', GradientType=0);
3374 border: 1px solid #d4d4d4;
3375 -webkit-border-radius: 4px;
3376 -moz-border-radius: 4px;
3377 border-radius: 4px;
3378 -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065);
3379 -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065);
3380 box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065);
3381 *zoom: 1;
3382 }
3383 .navbar-inner:before,
3384 .navbar-inner:after {
3385 display: table;
3386 content: "";
3387 line-height: 0;
3388 }
3389 .navbar-inner:after {
3390 clear: both;
3391 }
3392 .navbar .container {
3393 width: auto;
3394 }
3395 .nav-collapse.collapse {
3396 height: auto;
3397 overflow: visible;
3398 }
3399 .navbar .brand {
3400 float: left;
3401 display: block;
3402 padding: 10px 20px 10px;
3403 margin-left: -20px;
3404 font-size: 20px;
3405 font-weight: 200;
3406 color: #777777;
3407 text-shadow: 0 1px 0 #ffffff;
3408 }
3409 .navbar .brand:hover {
3410 text-decoration: none;
3411 }
3412 .navbar-text {
3413 margin-bottom: 0;
3414 line-height: 40px;
3415 color: #777777;
3416 }
3417 .navbar-link {
3418 color: #777777;
3419 }
3420 .navbar-link:hover {
3421 color: #333333;
3422 }
3423 .navbar .divider-vertical {
3424 height: 40px;
3425 margin: 0 9px;
3426 border-left: 1px solid #f2f2f2;
3427 border-right: 1px solid #ffffff;
3428 }
3429 .navbar .btn,
3430 .navbar .btn-group {
3431 margin-top: 5px;
3432 }
3433 .navbar .btn-group .btn,
3434 .navbar .input-prepend .btn,
3435 .navbar .input-append .btn {
3436 margin-top: 0;
3437 }
3438 .navbar-form {
3439 margin-bottom: 0;
3440 *zoom: 1;
3441 }
3442 .navbar-form:before,
3443 .navbar-form:after {
3444 display: table;
3445 content: "";
3446 line-height: 0;
3447 }
3448 .navbar-form:after {
3449 clear: both;
3450 }
3451 .navbar-form input,
3452 .navbar-form select,
3453 .navbar-form .radio,
3454 .navbar-form .checkbox {
3455 margin-top: 5px;
3456 }
3457 .navbar-form input,
3458 .navbar-form select,
3459 .navbar-form .btn {
3460 display: inline-block;
3461 margin-bottom: 0;
3462 }
3463 .navbar-form input[type="image"],
3464 .navbar-form input[type="checkbox"],
3465 .navbar-form input[type="radio"] {
3466 margin-top: 3px;
3467 }
3468 .navbar-form .input-append,
3469 .navbar-form .input-prepend {
3470 margin-top: 5px;
3471 white-space: nowrap;
3472 }
3473 .navbar-form .input-append input,
3474 .navbar-form .input-prepend input {
3475 margin-top: 0;
3476 }
3477 .navbar-search {
3478 position: relative;
3479 float: left;
3480 margin-top: 5px;
3481 margin-bottom: 0;
3482 }
3483 .navbar-search .search-query {
3484 margin-bottom: 0;
3485 padding: 4px 14px;
3486 font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
3487 font-size: 13px;
3488 font-weight: normal;
3489 line-height: 1;
3490 -webkit-border-radius: 15px;
3491 -moz-border-radius: 15px;
3492 border-radius: 15px;
3493 }
3494 .navbar-static-top {
3495 position: static;
3496 margin-bottom: 0;
3497 }
3498 .navbar-static-top .navbar-inner {
3499 -webkit-border-radius: 0;
3500 -moz-border-radius: 0;
3501 border-radius: 0;
3502 }
3503 .navbar-fixed-top,
3504 .navbar-fixed-bottom {
3505 position: fixed;
3506 right: 0;
3507 left: 0;
3508 z-index: 1030;
3509 margin-bottom: 0;
3510 }
3511 .navbar-fixed-top .navbar-inner,
3512 .navbar-static-top .navbar-inner {
3513 border-width: 0 0 1px;
3514 }
3515 .navbar-fixed-bottom .navbar-inner {
3516 border-width: 1px 0 0;
3517 }
3518 .navbar-fixed-top .navbar-inner,
3519 .navbar-fixed-bottom .navbar-inner {
3520 padding-left: 0;
3521 padding-right: 0;
3522 -webkit-border-radius: 0;
3523 -moz-border-radius: 0;
3524 border-radius: 0;
3525 }
3526 .navbar-static-top .container,
3527 .navbar-fixed-top .container,
3528 .navbar-fixed-bottom .container {
3529 width: 940px;
3530 }
3531 .navbar-fixed-top {
3532 top: 0;
3533 }
3534 .navbar-fixed-top .navbar-inner,
3535 .navbar-static-top .navbar-inner {
3536 -webkit-box-shadow: 0 1px 10px rgba(0,0,0,.1);
3537 -moz-box-shadow: 0 1px 10px rgba(0,0,0,.1);
3538 box-shadow: 0 1px 10px rgba(0,0,0,.1);
3539 }
3540 .navbar-fixed-bottom {
3541 bottom: 0;
3542 }
3543 .navbar-fixed-bottom .navbar-inner {
3544 -webkit-box-shadow: 0 -1px 10px rgba(0,0,0,.1);
3545 -moz-box-shadow: 0 -1px 10px rgba(0,0,0,.1);
3546 box-shadow: 0 -1px 10px rgba(0,0,0,.1);
3547 }
3548 .navbar .nav {
3549 position: relative;
3550 left: 0;
3551 display: block;
3552 float: left;
3553 margin: 0 10px 0 0;
3554 }
3555 .navbar .nav.pull-right {
3556 float: right;
3557 margin-right: 0;
3558 }
3559 .navbar .nav > li {
3560 float: left;
3561 }
3562 .navbar .nav > li > a {
3563 float: none;
3564 padding: 10px 15px 10px;
3565 color: #777777;
3566 text-decoration: none;
3567 text-shadow: 0 1px 0 #ffffff;
3568 }
3569 .navbar .nav .dropdown-toggle .caret {
3570 margin-top: 8px;
3571 }
3572 .navbar .nav > li > a:focus,
3573 .navbar .nav > li > a:hover {
3574 background-color: transparent;
3575 color: #333333;
3576 text-decoration: none;
3577 }
3578 .navbar .nav > .active > a,
3579 .navbar .nav > .active > a:hover,
3580 .navbar .nav > .active > a:focus {
3581 color: #555555;
3582 text-decoration: none;
3583 background-color: #e5e5e5;
3584 -webkit-box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125);
3585 -moz-box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125);
3586 box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125);
3587 }
3588 .navbar .btn-navbar {
3589 display: none;
3590 float: right;
3591 padding: 7px 10px;
3592 margin-left: 5px;
3593 margin-right: 5px;
3594 color: #ffffff;
3595 text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
3596 background-color: #ededed;
3597 background-image: -moz-linear-gradient(top, #f2f2f2, #e5e5e5);
3598 background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f2f2f2), to(#e5e5e5));
3599 background-image: -webkit-linear-gradient(top, #f2f2f2, #e5e5e5);
3600 background-image: -o-linear-gradient(top, #f2f2f2, #e5e5e5);
3601 background-image: linear-gradient(to bottom, #f2f2f2, #e5e5e5);
3602 background-repeat: repeat-x;
3603 filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2f2f2', endColorstr='#ffe5e5e5', GradientType=0);
3604 border-color: #e5e5e5 #e5e5e5 #bfbfbf;
3605 border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
3606 *background-color: #e5e5e5;
3607 /* Darken IE7 buttons by default so they stand out more given they won't have borders */
3608
3609 filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
3610 -webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.075);
3611 -moz-box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.075);
3612 box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.075);
3613 }
3614 .navbar .btn-navbar:hover,
3615 .navbar .btn-navbar:active,
3616 .navbar .btn-navbar.active,
3617 .navbar .btn-navbar.disabled,
3618 .navbar .btn-navbar[disabled] {
3619 color: #ffffff;
3620 background-color: #e5e5e5;
3621 *background-color: #d9d9d9;
3622 }
3623 .navbar .btn-navbar:active,
3624 .navbar .btn-navbar.active {
3625 background-color: #cccccc \9;
3626 }
3627 .navbar .btn-navbar .icon-bar {
3628 display: block;
3629 width: 18px;
3630 height: 2px;
3631 background-color: #f5f5f5;
3632 -webkit-border-radius: 1px;
3633 -moz-border-radius: 1px;
3634 border-radius: 1px;
3635 -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
3636 -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
3637 box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
3638 }
3639 .btn-navbar .icon-bar + .icon-bar {
3640 margin-top: 3px;
3641 }
3642 .navbar .nav > li > .dropdown-menu:before {
3643 content: '';
3644 display: inline-block;
3645 border-left: 7px solid transparent;
3646 border-right: 7px solid transparent;
3647 border-bottom: 7px solid #ccc;
3648 border-bottom-color: rgba(0, 0, 0, 0.2);
3649 position: absolute;
3650 top: -7px;
3651 left: 9px;
3652 }
3653 .navbar .nav > li > .dropdown-menu:after {
3654 content: '';
3655 display: inline-block;
3656 border-left: 6px solid transparent;
3657 border-right: 6px solid transparent;
3658 border-bottom: 6px solid #ffffff;
3659 position: absolute;
3660 top: -6px;
3661 left: 10px;
3662 }
3663 .navbar-fixed-bottom .nav > li > .dropdown-menu:before {
3664 border-top: 7px solid #ccc;
3665 border-top-color: rgba(0, 0, 0, 0.2);
3666 border-bottom: 0;
3667 bottom: -7px;
3668 top: auto;
3669 }
3670 .navbar-fixed-bottom .nav > li > .dropdown-menu:after {
3671 border-top: 6px solid #ffffff;
3672 border-bottom: 0;
3673 bottom: -6px;
3674 top: auto;
3675 }
3676 .navbar .nav li.dropdown > a:hover .caret {
3677 border-top-color: #555555;
3678 border-bottom-color: #555555;
3679 }
3680 .navbar .nav li.dropdown.open > .dropdown-toggle,
3681 .navbar .nav li.dropdown.active > .dropdown-toggle,
3682 .navbar .nav li.dropdown.open.active > .dropdown-toggle {
3683 background-color: #e5e5e5;
3684 color: #555555;
3685 }
3686 .navbar .nav li.dropdown > .dropdown-toggle .caret {
3687 border-top-color: #777777;
3688 border-bottom-color: #777777;
3689 }
3690 .navbar .nav li.dropdown.open > .dropdown-toggle .caret,
3691 .navbar .nav li.dropdown.active > .dropdown-toggle .caret,
3692 .navbar .nav li.dropdown.open.active > .dropdown-toggle .caret {
3693 border-top-color: #555555;
3694 border-bottom-color: #555555;
3695 }
3696 .navbar .pull-right > li > .dropdown-menu,
3697 .navbar .nav > li > .dropdown-menu.pull-right {
3698 left: auto;
3699 right: 0;
3700 }
3701 .navbar .pull-right > li > .dropdown-menu:before,
3702 .navbar .nav > li > .dropdown-menu.pull-right:before {
3703 left: auto;
3704 right: 12px;
3705 }
3706 .navbar .pull-right > li > .dropdown-menu:after,
3707 .navbar .nav > li > .dropdown-menu.pull-right:after {
3708 left: auto;
3709 right: 13px;
3710 }
3711 .navbar .pull-right > li > .dropdown-menu .dropdown-menu,
3712 .navbar .nav > li > .dropdown-menu.pull-right .dropdown-menu {
3713 left: auto;
3714 right: 100%;
3715 margin-left: 0;
3716 margin-right: -1px;
3717 -webkit-border-radius: 6px 0 6px 6px;
3718 -moz-border-radius: 6px 0 6px 6px;
3719 border-radius: 6px 0 6px 6px;
3720 }
3721 .navbar-inverse .navbar-inner {
3722 background-color: #1b1b1b;
3723 background-image: -moz-linear-gradient(top, #222222, #111111);
3724 background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#222222), to(#111111));
3725 background-image: -webkit-linear-gradient(top, #222222, #111111);
3726 background-image: -o-linear-gradient(top, #222222, #111111);
3727 background-image: linear-gradient(to bottom, #222222, #111111);
3728 background-repeat: repeat-x;
3729 filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff222222', endColorstr='#ff111111', GradientType=0);
3730 border-color: #252525;
3731 }
3732 .navbar-inverse .brand,
3733 .navbar-inverse .nav > li > a {
3734 color: #999999;
3735 text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
3736 }
3737 .navbar-inverse .brand:hover,
3738 .navbar-inverse .nav > li > a:hover {
3739 color: #ffffff;
3740 }
3741 .navbar-inverse .brand {
3742 color: #999999;
3743 }
3744 .navbar-inverse .navbar-text {
3745 color: #999999;
3746 }
3747 .navbar-inverse .nav > li > a:focus,
3748 .navbar-inverse .nav > li > a:hover {
3749 background-color: transparent;
3750 color: #ffffff;
3751 }
3752 .navbar-inverse .nav .active > a,
3753 .navbar-inverse .nav .active > a:hover,
3754 .navbar-inverse .nav .active > a:focus {
3755 color: #ffffff;
3756 background-color: #111111;
3757 }
3758 .navbar-inverse .navbar-link {
3759 color: #999999;
3760 }
3761 .navbar-inverse .navbar-link:hover {
3762 color: #ffffff;
3763 }
3764 .navbar-inverse .divider-vertical {
3765 border-left-color: #111111;
3766 border-right-color: #222222;
3767 }
3768 .navbar-inverse .nav li.dropdown.open > .dropdown-toggle,
3769 .navbar-inverse .nav li.dropdown.active > .dropdown-toggle,
3770 .navbar-inverse .nav li.dropdown.open.active > .dropdown-toggle {
3771 background-color: #111111;
3772 color: #ffffff;
3773 }
3774 .navbar-inverse .nav li.dropdown > a:hover .caret {
3775 border-top-color: #ffffff;
3776 border-bottom-color: #ffffff;
3777 }
3778 .navbar-inverse .nav li.dropdown > .dropdown-toggle .caret {
3779 border-top-color: #999999;
3780 border-bottom-color: #999999;
3781 }
3782 .navbar-inverse .nav li.dropdown.open > .dropdown-toggle .caret,
3783 .navbar-inverse .nav li.dropdown.active > .dropdown-toggle .caret,
3784 .navbar-inverse .nav li.dropdown.open.active > .dropdown-toggle .caret {
3785 border-top-color: #ffffff;
3786 border-bottom-color: #ffffff;
3787 }
3788 .navbar-inverse .navbar-search .search-query {
3789 color: #ffffff;
3790 background-color: #515151;
3791 border-color: #111111;
3792 -webkit-box-shadow: inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0 rgba(255,255,255,.15);
3793 -moz-box-shadow: inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0 rgba(255,255,255,.15);
3794 box-shadow: inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0 rgba(255,255,255,.15);
3795 -webkit-transition: none;
3796 -moz-transition: none;
3797 -o-transition: none;
3798 transition: none;
3799 }
3800 .navbar-inverse .navbar-search .search-query:-moz-placeholder {
3801 color: #cccccc;
3802 }
3803 .navbar-inverse .navbar-search .search-query:-ms-input-placeholder {
3804 color: #cccccc;
3805 }
3806 .navbar-inverse .navbar-search .search-query::-webkit-input-placeholder {
3807 color: #cccccc;
3808 }
3809 .navbar-inverse .navbar-search .search-query:focus,
3810 .navbar-inverse .navbar-search .search-query.focused {
3811 padding: 5px 15px;
3812 color: #333333;
3813 text-shadow: 0 1px 0 #ffffff;
3814 background-color: #ffffff;
3815 border: 0;
3816 -webkit-box-shadow: 0 0 3px rgba(0, 0, 0, 0.15);
3817 -moz-box-shadow: 0 0 3px rgba(0, 0, 0, 0.15);
3818 box-shadow: 0 0 3px rgba(0, 0, 0, 0.15);
3819 outline: 0;
3820 }
3821 .navbar-inverse .btn-navbar {
3822 color: #ffffff;
3823 text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
3824 background-color: #0e0e0e;
3825 background-image: -moz-linear-gradient(top, #151515, #040404);
3826 background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#151515), to(#040404));
3827 background-image: -webkit-linear-gradient(top, #151515, #040404);
3828 background-image: -o-linear-gradient(top, #151515, #040404);
3829 background-image: linear-gradient(to bottom, #151515, #040404);
3830 background-repeat: repeat-x;
3831 filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff151515', endColorstr='#ff040404', GradientType=0);
3832 border-color: #040404 #040404 #000000;
3833 border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
3834 *background-color: #040404;
3835 /* Darken IE7 buttons by default so they stand out more given they won't have borders */
3836
3837 filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
3838 }
3839 .navbar-inverse .btn-navbar:hover,
3840 .navbar-inverse .btn-navbar:active,
3841 .navbar-inverse .btn-navbar.active,
3842 .navbar-inverse .btn-navbar.disabled,
3843 .navbar-inverse .btn-navbar[disabled] {
3844 color: #ffffff;
3845 background-color: #040404;
3846 *background-color: #000000;
3847 }
3848 .navbar-inverse .btn-navbar:active,
3849 .navbar-inverse .btn-navbar.active {
3850 background-color: #000000 \9;
3851 }
3852 .breadcrumb {
3853 padding: 8px 15px;
3854 margin: 0 0 20px;
3855 list-style: none;
3856 background-color: #f5f5f5;
3857 -webkit-border-radius: 4px;
3858 -moz-border-radius: 4px;
3859 border-radius: 4px;
3860 }
3861 .breadcrumb > li {
3862 display: inline-block;
3863 *display: inline;
3864 /* IE7 inline-block hack */
3865
3866 *zoom: 1;
3867 text-shadow: 0 1px 0 #ffffff;
3868 }
3869 .breadcrumb > li > .divider {
3870 padding: 0 5px;
3871 color: #ccc;
3872 }
3873 .breadcrumb > .active {
3874 color: #999999;
3875 }
3876 .pagination {
3877 margin: 20px 0;
3878 }
3879 .pagination ul {
3880 display: inline-block;
3881 *display: inline;
3882 /* IE7 inline-block hack */
3883
3884 *zoom: 1;
3885 margin-left: 0;
3886 margin-bottom: 0;
3887 -webkit-border-radius: 4px;
3888 -moz-border-radius: 4px;
3889 border-radius: 4px;
3890 -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
3891 -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
3892 box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
3893 }
3894 .pagination ul > li {
3895 display: inline;
3896 }
3897 .pagination ul > li > a,
3898 .pagination ul > li > span {
3899 float: left;
3900 padding: 4px 12px;
3901 line-height: 20px;
3902 text-decoration: none;
3903 background-color: #ffffff;
3904 border: 1px solid #dddddd;
3905 border-left-width: 0;
3906 }
3907 .pagination ul > li > a:hover,
3908 .pagination ul > .active > a,
3909 .pagination ul > .active > span {
3910 background-color: #f5f5f5;
3911 }
3912 .pagination ul > .active > a,
3913 .pagination ul > .active > span {
3914 color: #999999;
3915 cursor: default;
3916 }
3917 .pagination ul > .disabled > span,
3918 .pagination ul > .disabled > a,
3919 .pagination ul > .disabled > a:hover {
3920 color: #999999;
3921 background-color: transparent;
3922 cursor: default;
3923 }
3924 .pagination ul > li:first-child > a,
3925 .pagination ul > li:first-child > span {
3926 border-left-width: 1px;
3927 -webkit-border-top-left-radius: 4px;
3928 -moz-border-radius-topleft: 4px;
3929 border-top-left-radius: 4px;
3930 -webkit-border-bottom-left-radius: 4px;
3931 -moz-border-radius-bottomleft: 4px;
3932 border-bottom-left-radius: 4px;
3933 }
3934 .pagination ul > li:last-child > a,
3935 .pagination ul > li:last-child > span {
3936 -webkit-border-top-right-radius: 4px;
3937 -moz-border-radius-topright: 4px;
3938 border-top-right-radius: 4px;
3939 -webkit-border-bottom-right-radius: 4px;
3940 -moz-border-radius-bottomright: 4px;
3941 border-bottom-right-radius: 4px;
3942 }
3943 .pagination-centered {
3944 text-align: center;
3945 }
3946 .pagination-right {
3947 text-align: right;
3948 }
3949 .pagination-large ul > li > a,
3950 .pagination-large ul > li > span {
3951 padding: 11px 19px;
3952 font-size: 15px;
3953 }
3954 .pagination-large ul > li:first-child > a,
3955 .pagination-large ul > li:first-child > span {
3956 -webkit-border-top-left-radius: 6px;
3957 -moz-border-radius-topleft: 6px;
3958 border-top-left-radius: 6px;
3959 -webkit-border-bottom-left-radius: 6px;
3960 -moz-border-radius-bottomleft: 6px;
3961 border-bottom-left-radius: 6px;
3962 }
3963 .pagination-large ul > li:last-child > a,
3964 .pagination-large ul > li:last-child > span {
3965 -webkit-border-top-right-radius: 6px;
3966 -moz-border-radius-topright: 6px;
3967 border-top-right-radius: 6px;
3968 -webkit-border-bottom-right-radius: 6px;
3969 -moz-border-radius-bottomright: 6px;
3970 border-bottom-right-radius: 6px;
3971 }
3972 .pagination-mini ul > li:first-child > a,
3973 .pagination-small ul > li:first-child > a,
3974 .pagination-mini ul > li:first-child > span,
3975 .pagination-small ul > li:first-child > span {
3976 -webkit-border-top-left-radius: 3px;
3977 -moz-border-radius-topleft: 3px;
3978 border-top-left-radius: 3px;
3979 -webkit-border-bottom-left-radius: 3px;
3980 -moz-border-radius-bottomleft: 3px;
3981 border-bottom-left-radius: 3px;
3982 }
3983 .pagination-mini ul > li:last-child > a,
3984 .pagination-small ul > li:last-child > a,
3985 .pagination-mini ul > li:last-child > span,
3986 .pagination-small ul > li:last-child > span {
3987 -webkit-border-top-right-radius: 3px;
3988 -moz-border-radius-topright: 3px;
3989 border-top-right-radius: 3px;
3990 -webkit-border-bottom-right-radius: 3px;
3991 -moz-border-radius-bottomright: 3px;
3992 border-bottom-right-radius: 3px;
3993 }
3994 .pagination-small ul > li > a,
3995 .pagination-small ul > li > span {
3996 padding: 2px 10px;
3997 font-size: 10.2px;
3998 }
3999 .pagination-mini ul > li > a,
4000 .pagination-mini ul > li > span {
4001 padding: 0 6px;
4002 font-size: 9px;
4003 }
4004 .pager {
4005 margin: 20px 0;
4006 list-style: none;
4007 text-align: center;
4008 *zoom: 1;
4009 }
4010 .pager:before,
4011 .pager:after {
4012 display: table;
4013 content: "";
4014 line-height: 0;
4015 }
4016 .pager:after {
4017 clear: both;
4018 }
4019 .pager li {
4020 display: inline;
4021 }
4022 .pager li > a,
4023 .pager li > span {
4024 display: inline-block;
4025 padding: 5px 14px;
4026 background-color: #fff;
4027 border: 1px solid #ddd;
4028 -webkit-border-radius: 15px;
4029 -moz-border-radius: 15px;
4030 border-radius: 15px;
4031 }
4032 .pager li > a:hover {
4033 text-decoration: none;
4034 background-color: #f5f5f5;
4035 }
4036 .pager .next > a,
4037 .pager .next > span {
4038 float: right;
4039 }
4040 .pager .previous > a,
4041 .pager .previous > span {
4042 float: left;
4043 }
4044 .pager .disabled > a,
4045 .pager .disabled > a:hover,
4046 .pager .disabled > span {
4047 color: #999999;
4048 background-color: #fff;
4049 cursor: default;
4050 }
4051 .thumbnails {
4052 margin-left: -20px;
4053 list-style: none;
4054 *zoom: 1;
4055 }
4056 .thumbnails:before,
4057 .thumbnails:after {
4058 display: table;
4059 content: "";
4060 line-height: 0;
4061 }
4062 .thumbnails:after {
4063 clear: both;
4064 }
4065 .row-fluid .thumbnails {
4066 margin-left: 0;
4067 }
4068 .thumbnails > li {
4069 float: left;
4070 margin-bottom: 20px;
4071 margin-left: 20px;
4072 }
4073 .thumbnail {
4074 display: block;
4075 padding: 4px;
4076 line-height: 20px;
4077 border: 1px solid #ddd;
4078 -webkit-border-radius: 4px;
4079 -moz-border-radius: 4px;
4080 border-radius: 4px;
4081 -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.055);
4082 -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.055);
4083 box-shadow: 0 1px 3px rgba(0, 0, 0, 0.055);
4084 -webkit-transition: all 0.2s ease-in-out;
4085 -moz-transition: all 0.2s ease-in-out;
4086 -o-transition: all 0.2s ease-in-out;
4087 transition: all 0.2s ease-in-out;
4088 }
4089 a.thumbnail:hover {
4090 border-color: #0088cc;
4091 -webkit-box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25);
4092 -moz-box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25);
4093 box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25);
4094 }
4095 .thumbnail > img {
4096 display: block;
4097 max-width: 100%;
4098 margin-left: auto;
4099 margin-right: auto;
4100 }
4101 .thumbnail .caption {
4102 padding: 9px;
4103 color: #555555;
4104 }
4105 .alert {
4106 padding: 8px 35px 8px 14px;
4107 margin-bottom: 20px;
4108 text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
4109 background-color: #fcf8e3;
4110 border: 1px solid #fbeed5;
4111 -webkit-border-radius: 4px;
4112 -moz-border-radius: 4px;
4113 border-radius: 4px;
4114 }
4115 .alert,
4116 .alert h4 {
4117 color: #c09853;
4118 }
4119 .alert h4 {
4120 margin: 0;
4121 }
4122 .alert .close {
4123 position: relative;
4124 top: -2px;
4125 right: -21px;
4126 line-height: 20px;
4127 }
4128 .alert-success {
4129 background-color: #dff0d8;
4130 border-color: #d6e9c6;
4131 color: #468847;
4132 }
4133 .alert-success h4 {
4134 color: #468847;
4135 }
4136 .alert-danger,
4137 .alert-error {
4138 background-color: #f2dede;
4139 border-color: #eed3d7;
4140 color: #b94a48;
4141 }
4142 .alert-danger h4,
4143 .alert-error h4 {
4144 color: #b94a48;
4145 }
4146 .alert-info {
4147 background-color: #d9edf7;
4148 border-color: #bce8f1;
4149 color: #3a87ad;
4150 }
4151 .alert-info h4 {
4152 color: #3a87ad;
4153 }
4154 .alert-block {
4155 padding-top: 14px;
4156 padding-bottom: 14px;
4157 }
4158 .alert-block > p,
4159 .alert-block > ul {
4160 margin-bottom: 0;
4161 }
4162 .alert-block p + p {
4163 margin-top: 5px;
4164 }
4165 @-webkit-keyframes progress-bar-stripes {
4166 from {
4167 background-position: 40px 0;
4168 }
4169 to {
4170 background-position: 0 0;
4171 }
4172 }
4173 @-moz-keyframes progress-bar-stripes {
4174 from {
4175 background-position: 40px 0;
4176 }
4177 to {
4178 background-position: 0 0;
4179 }
4180 }
4181 @-ms-keyframes progress-bar-stripes {
4182 from {
4183 background-position: 40px 0;
4184 }
4185 to {
4186 background-position: 0 0;
4187 }
4188 }
4189 @-o-keyframes progress-bar-stripes {
4190 from {
4191 background-position: 0 0;
4192 }
4193 to {
4194 background-position: 40px 0;
4195 }
4196 }
4197 @keyframes progress-bar-stripes {
4198 from {
4199 background-position: 40px 0;
4200 }
4201 to {
4202 background-position: 0 0;
4203 }
4204 }
4205 .progress {
4206 overflow: hidden;
4207 height: 20px;
4208 margin-bottom: 20px;
4209 background-color: #f7f7f7;
4210 background-image: -moz-linear-gradient(top, #f5f5f5, #f9f9f9);
4211 background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f5f5f5), to(#f9f9f9));
4212 background-image: -webkit-linear-gradient(top, #f5f5f5, #f9f9f9);
4213 background-image: -o-linear-gradient(top, #f5f5f5, #f9f9f9);
4214 background-image: linear-gradient(to bottom, #f5f5f5, #f9f9f9);
4215 background-repeat: repeat-x;
4216 filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#fff9f9f9', GradientType=0);
4217 -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
4218 -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
4219 box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
4220 -webkit-border-radius: 4px;
4221 -moz-border-radius: 4px;
4222 border-radius: 4px;
4223 }
4224 .progress .bar {
4225 width: 0%;
4226 height: 100%;
4227 color: #ffffff;
4228 float: left;
4229 font-size: 12px;
4230 text-align: center;
4231 text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
4232 background-color: #0e90d2;
4233 background-image: -moz-linear-gradient(top, #149bdf, #0480be);
4234 background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#149bdf), to(#0480be));
4235 background-image: -webkit-linear-gradient(top, #149bdf, #0480be);
4236 background-image: -o-linear-gradient(top, #149bdf, #0480be);
4237 background-image: linear-gradient(to bottom, #149bdf, #0480be);
4238 background-repeat: repeat-x;
4239 filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff149bdf', endColorstr='#ff0480be', GradientType=0);
4240 -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);
4241 -moz-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);
4242 box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);
4243 -webkit-box-sizing: border-box;
4244 -moz-box-sizing: border-box;
4245 box-sizing: border-box;
4246 -webkit-transition: width 0.6s ease;
4247 -moz-transition: width 0.6s ease;
4248 -o-transition: width 0.6s ease;
4249 transition: width 0.6s ease;
4250 }
4251 .progress .bar + .bar {
4252 -webkit-box-shadow: inset 1px 0 0 rgba(0,0,0,.15), inset 0 -1px 0 rgba(0,0,0,.15);
4253 -moz-box-shadow: inset 1px 0 0 rgba(0,0,0,.15), inset 0 -1px 0 rgba(0,0,0,.15);
4254 box-shadow: inset 1px 0 0 rgba(0,0,0,.15), inset 0 -1px 0 rgba(0,0,0,.15);
4255 }
4256 .progress-striped .bar {
4257 background-color: #149bdf;
4258 background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));
4259 background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
4260 background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
4261 background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
4262 background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
4263 -webkit-background-size: 40px 40px;
4264 -moz-background-size: 40px 40px;
4265 -o-background-size: 40px 40px;
4266 background-size: 40px 40px;
4267 }
4268 .progress.active .bar {
4269 -webkit-animation: progress-bar-stripes 2s linear infinite;
4270 -moz-animation: progress-bar-stripes 2s linear infinite;
4271 -ms-animation: progress-bar-stripes 2s linear infinite;
4272 -o-animation: progress-bar-stripes 2s linear infinite;
4273 animation: progress-bar-stripes 2s linear infinite;
4274 }
4275 .progress-danger .bar,
4276 .progress .bar-danger {
4277 background-color: #dd514c;
4278 background-image: -moz-linear-gradient(top, #ee5f5b, #c43c35);
4279 background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#c43c35));
4280 background-image: -webkit-linear-gradient(top, #ee5f5b, #c43c35);
4281 background-image: -o-linear-gradient(top, #ee5f5b, #c43c35);
4282 background-image: linear-gradient(to bottom, #ee5f5b, #c43c35);
4283 background-repeat: repeat-x;
4284 filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffc43c35', GradientType=0);
4285 }
4286 .progress-danger.progress-striped .bar,
4287 .progress-striped .bar-danger {
4288 background-color: #ee5f5b;
4289 background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));
4290 background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
4291 background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
4292 background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
4293 background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
4294 }
4295 .progress-success .bar,
4296 .progress .bar-success {
4297 background-color: #5eb95e;
4298 background-image: -moz-linear-gradient(top, #62c462, #57a957);
4299 background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#57a957));
4300 background-image: -webkit-linear-gradient(top, #62c462, #57a957);
4301 background-image: -o-linear-gradient(top, #62c462, #57a957);
4302 background-image: linear-gradient(to bottom, #62c462, #57a957);
4303 background-repeat: repeat-x;
4304 filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff57a957', GradientType=0);
4305 }
4306 .progress-success.progress-striped .bar,
4307 .progress-striped .bar-success {
4308 background-color: #62c462;
4309 background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));
4310 background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
4311 background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
4312 background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
4313 background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
4314 }
4315 .progress-info .bar,
4316 .progress .bar-info {
4317 background-color: #4bb1cf;
4318 background-image: -moz-linear-gradient(top, #5bc0de, #339bb9);
4319 background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#339bb9));
4320 background-image: -webkit-linear-gradient(top, #5bc0de, #339bb9);
4321 background-image: -o-linear-gradient(top, #5bc0de, #339bb9);
4322 background-image: linear-gradient(to bottom, #5bc0de, #339bb9);
4323 background-repeat: repeat-x;
4324 filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff339bb9', GradientType=0);
4325 }
4326 .progress-info.progress-striped .bar,
4327 .progress-striped .bar-info {
4328 background-color: #5bc0de;
4329 background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));
4330 background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
4331 background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
4332 background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
4333 background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
4334 }
4335 .progress-warning .bar,
4336 .progress .bar-warning {
4337 background-color: #faa732;
4338 background-image: -moz-linear-gradient(top, #fbb450, #f89406);
4339 background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406));
4340 background-image: -webkit-linear-gradient(top, #fbb450, #f89406);
4341 background-image: -o-linear-gradient(top, #fbb450, #f89406);
4342 background-image: linear-gradient(to bottom, #fbb450, #f89406);
4343 background-repeat: repeat-x;
4344 filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450', endColorstr='#fff89406', GradientType=0);
4345 }
4346 .progress-warning.progress-striped .bar,
4347 .progress-striped .bar-warning {
4348 background-color: #fbb450;
4349 background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));
4350 background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
4351 background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
4352 background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
4353 background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
4354 }
4355 .hero-unit {
4356 padding: 60px;
4357 margin-bottom: 30px;
4358 font-size: 18px;
4359 font-weight: 200;
4360 line-height: 30px;
4361 color: inherit;
4362 background-color: #eeeeee;
4363 -webkit-border-radius: 6px;
4364 -moz-border-radius: 6px;
4365 border-radius: 6px;
4366 }
4367 .hero-unit h1 {
4368 margin-bottom: 0;
4369 font-size: 60px;
4370 line-height: 1;
4371 color: inherit;
4372 letter-spacing: -1px;
4373 }
4374 .hero-unit li {
4375 line-height: 30px;
4376 }
4377 .media,
4378 .media-body {
4379 overflow: hidden;
4380 *overflow: visible;
4381 zoom: 1;
4382 }
4383 .media,
4384 .media .media {
4385 margin-top: 15px;
4386 }
4387 .media:first-child {
4388 margin-top: 0;
4389 }
4390 .media-object {
4391 display: block;
4392 }
4393 .media-heading {
4394 margin: 0 0 5px;
4395 }
4396 .media .pull-left {
4397 margin-right: 10px;
4398 }
4399 .media .pull-right {
4400 margin-left: 10px;
4401 }
4402 .media-list {
4403 margin-left: 0;
4404 list-style: none;
4405 }
4406 .tooltip {
4407 position: absolute;
4408 z-index: 1030;
4409 display: block;
4410 visibility: visible;
4411 padding: 5px;
4412 font-size: 11px;
4413 opacity: 0;
4414 filter: alpha(opacity=0);
4415 }
4416 .tooltip.in {
4417 opacity: 0.8;
4418 filter: alpha(opacity=80);
4419 }
4420 .tooltip.top {
4421 margin-top: -3px;
4422 }
4423 .tooltip.right {
4424 margin-left: 3px;
4425 }
4426 .tooltip.bottom {
4427 margin-top: 3px;
4428 }
4429 .tooltip.left {
4430 margin-left: -3px;
4431 }
4432 .tooltip-inner {
4433 max-width: 200px;
4434 padding: 3px 8px;
4435 color: #ffffff;
4436 text-align: center;
4437 text-decoration: none;
4438 background-color: #000000;
4439 -webkit-border-radius: 4px;
4440 -moz-border-radius: 4px;
4441 border-radius: 4px;
4442 }
4443 .tooltip-arrow {
4444 position: absolute;
4445 width: 0;
4446 height: 0;
4447 border-color: transparent;
4448 border-style: solid;
4449 }
4450 .tooltip.top .tooltip-arrow {
4451 bottom: 0;
4452 left: 50%;
4453 margin-left: -5px;
4454 border-width: 5px 5px 0;
4455 border-top-color: #000000;
4456 }
4457 .tooltip.right .tooltip-arrow {
4458 top: 50%;
4459 left: 0;
4460 margin-top: -5px;
4461 border-width: 5px 5px 5px 0;
4462 border-right-color: #000000;
4463 }
4464 .tooltip.left .tooltip-arrow {
4465 top: 50%;
4466 right: 0;
4467 margin-top: -5px;
4468 border-width: 5px 0 5px 5px;
4469 border-left-color: #000000;
4470 }
4471 .tooltip.bottom .tooltip-arrow {
4472 top: 0;
4473 left: 50%;
4474 margin-left: -5px;
4475 border-width: 0 5px 5px;
4476 border-bottom-color: #000000;
4477 }
4478 .popover {
4479 position: absolute;
4480 top: 0;
4481 left: 0;
4482 z-index: 1010;
4483 display: none;
4484 width: 236px;
4485 padding: 1px;
4486 text-align: left;
4487 background-color: #ffffff;
4488 -webkit-background-clip: padding-box;
4489 -moz-background-clip: padding;
4490 background-clip: padding-box;
4491 border: 1px solid #ccc;
4492 border: 1px solid rgba(0, 0, 0, 0.2);
4493 -webkit-border-radius: 6px;
4494 -moz-border-radius: 6px;
4495 border-radius: 6px;
4496 -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
4497 -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
4498 box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
4499 white-space: normal;
4500 }
4501 .popover.top {
4502 margin-top: -10px;
4503 }
4504 .popover.right {
4505 margin-left: 10px;
4506 }
4507 .popover.bottom {
4508 margin-top: 10px;
4509 }
4510 .popover.left {
4511 margin-left: -10px;
4512 }
4513 .popover-title {
4514 margin: 0;
4515 padding: 8px 14px;
4516 font-size: 14px;
4517 font-weight: normal;
4518 line-height: 18px;
4519 background-color: #f7f7f7;
4520 border-bottom: 1px solid #ebebeb;
4521 -webkit-border-radius: 5px 5px 0 0;
4522 -moz-border-radius: 5px 5px 0 0;
4523 border-radius: 5px 5px 0 0;
4524 }
4525 .popover-content {
4526 padding: 9px 14px;
4527 }
4528 .popover .arrow,
4529 .popover .arrow:after {
4530 position: absolute;
4531 display: block;
4532 width: 0;
4533 height: 0;
4534 border-color: transparent;
4535 border-style: solid;
4536 }
4537 .popover .arrow {
4538 border-width: 11px;
4539 }
4540 .popover .arrow:after {
4541 border-width: 10px;
4542 content: "";
4543 }
4544 .popover.top .arrow {
4545 left: 50%;
4546 margin-left: -11px;
4547 border-bottom-width: 0;
4548 border-top-color: #999;
4549 border-top-color: rgba(0, 0, 0, 0.25);
4550 bottom: -11px;
4551 }
4552 .popover.top .arrow:after {
4553 bottom: 1px;
4554 margin-left: -10px;
4555 border-bottom-width: 0;
4556 border-top-color: #ffffff;
4557 }
4558 .popover.right .arrow {
4559 top: 50%;
4560 left: -11px;
4561 margin-top: -11px;
4562 border-left-width: 0;
4563 border-right-color: #999;
4564 border-right-color: rgba(0, 0, 0, 0.25);
4565 }
4566 .popover.right .arrow:after {
4567 left: 1px;
4568 bottom: -10px;
4569 border-left-width: 0;
4570 border-right-color: #ffffff;
4571 }
4572 .popover.bottom .arrow {
4573 left: 50%;
4574 margin-left: -11px;
4575 border-top-width: 0;
4576 border-bottom-color: #999;
4577 border-bottom-color: rgba(0, 0, 0, 0.25);
4578 top: -11px;
4579 }
4580 .popover.bottom .arrow:after {
4581 top: 1px;
4582 margin-left: -10px;
4583 border-top-width: 0;
4584 border-bottom-color: #ffffff;
4585 }
4586 .popover.left .arrow {
4587 top: 50%;
4588 right: -11px;
4589 margin-top: -11px;
4590 border-right-width: 0;
4591 border-left-color: #999;
4592 border-left-color: rgba(0, 0, 0, 0.25);
4593 }
4594 .popover.left .arrow:after {
4595 right: 1px;
4596 border-right-width: 0;
4597 border-left-color: #ffffff;
4598 bottom: -10px;
4599 }
4600 .modal-backdrop {
4601 position: fixed;
4602 top: 0;
4603 right: 0;
4604 bottom: 0;
4605 left: 0;
4606 z-index: 1040;
4607 background-color: #000000;
4608 }
4609 .modal-backdrop.fade {
4610 opacity: 0;
4611 }
4612 .modal-backdrop,
4613 .modal-backdrop.fade.in {
4614 opacity: 0.8;
4615 filter: alpha(opacity=80);
4616 }
4617 .modal {
4618 position: fixed;
4619 top: 10%;
4620 left: 50%;
4621 z-index: 1050;
4622 width: 560px;
4623 margin-left: -280px;
4624 background-color: #ffffff;
4625 border: 1px solid #999;
4626 border: 1px solid rgba(0, 0, 0, 0.3);
4627 *border: 1px solid #999;
4628 /* IE6-7 */
4629
4630 -webkit-border-radius: 6px;
4631 -moz-border-radius: 6px;
4632 border-radius: 6px;
4633 -webkit-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3);
4634 -moz-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3);
4635 box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3);
4636 -webkit-background-clip: padding-box;
4637 -moz-background-clip: padding-box;
4638 background-clip: padding-box;
4639 outline: none;
4640 }
4641 .modal.fade {
4642 -webkit-transition: opacity .3s linear, top .3s ease-out;
4643 -moz-transition: opacity .3s linear, top .3s ease-out;
4644 -o-transition: opacity .3s linear, top .3s ease-out;
4645 transition: opacity .3s linear, top .3s ease-out;
4646 top: -25%;
4647 }
4648 .modal.fade.in {
4649 top: 10%;
4650 }
4651 .modal-header {
4652 padding: 9px 15px;
4653 border-bottom: 1px solid #eee;
4654 }
4655 .modal-header .close {
4656 margin-top: 2px;
4657 }
4658 .modal-header h3 {
4659 margin: 0;
4660 line-height: 30px;
4661 }
4662 .modal-body {
4663 position: relative;
4664 overflow-y: auto;
4665 max-height: 400px;
4666 padding: 15px;
4667 }
4668 .modal-form {
4669 margin-bottom: 0;
4670 }
4671 .modal-footer {
4672 padding: 14px 15px 15px;
4673 margin-bottom: 0;
4674 text-align: right;
4675 background-color: #f5f5f5;
4676 border-top: 1px solid #ddd;
4677 -webkit-border-radius: 0 0 6px 6px;
4678 -moz-border-radius: 0 0 6px 6px;
4679 border-radius: 0 0 6px 6px;
4680 -webkit-box-shadow: inset 0 1px 0 #ffffff;
4681 -moz-box-shadow: inset 0 1px 0 #ffffff;
4682 box-shadow: inset 0 1px 0 #ffffff;
4683 *zoom: 1;
4684 }
4685 .modal-footer:before,
4686 .modal-footer:after {
4687 display: table;
4688 content: "";
4689 line-height: 0;
4690 }
4691 .modal-footer:after {
4692 clear: both;
4693 }
4694 .modal-footer .btn + .btn {
4695 margin-left: 5px;
4696 margin-bottom: 0;
4697 }
4698 .modal-footer .btn-group .btn + .btn {
4699 margin-left: -1px;
4700 }
4701 .modal-footer .btn-block + .btn-block {
4702 margin-left: 0;
4703 }
4704 .dropup,
4705 .dropdown {
4706 position: relative;
4707 }
4708 .dropdown-toggle {
4709 *margin-bottom: -3px;
4710 }
4711 .dropdown-toggle:active,
4712 .open .dropdown-toggle {
4713 outline: 0;
4714 }
4715 .caret {
4716 display: inline-block;
4717 width: 0;
4718 height: 0;
4719 vertical-align: top;
4720 border-top: 4px solid #000000;
4721 border-right: 4px solid transparent;
4722 border-left: 4px solid transparent;
4723 content: "";
4724 }
4725 .dropdown .caret {
4726 margin-top: 8px;
4727 margin-left: 2px;
4728 }
4729 .dropdown-menu {
4730 position: absolute;
4731 top: 100%;
4732 left: 0;
4733 z-index: 1000;
4734 display: none;
4735 float: left;
4736 min-width: 160px;
4737 padding: 5px 0;
4738 margin: 2px 0 0;
4739 list-style: none;
4740 background-color: #ffffff;
4741 border: 1px solid #ccc;
4742 border: 1px solid rgba(0, 0, 0, 0.2);
4743 *border-right-width: 2px;
4744 *border-bottom-width: 2px;
4745 -webkit-border-radius: 6px;
4746 -moz-border-radius: 6px;
4747 border-radius: 6px;
4748 -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
4749 -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
4750 box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
4751 -webkit-background-clip: padding-box;
4752 -moz-background-clip: padding;
4753 background-clip: padding-box;
4754 }
4755 .dropdown-menu.pull-right {
4756 right: 0;
4757 left: auto;
4758 }
4759 .dropdown-menu .divider {
4760 *width: 100%;
4761 height: 1px;
4762 margin: 9px 1px;
4763 *margin: -5px 0 5px;
4764 overflow: hidden;
4765 background-color: #e5e5e5;
4766 border-bottom: 1px solid #ffffff;
4767 }
4768 .dropdown-menu li > a {
4769 display: block;
4770 padding: 3px 20px;
4771 clear: both;
4772 font-weight: normal;
4773 line-height: 20px;
4774 color: #333333;
4775 white-space: nowrap;
4776 }
4777 .dropdown-menu li > a:hover,
4778 .dropdown-menu li > a:focus,
4779 .dropdown-submenu:hover > a {
4780 text-decoration: none;
4781 color: #ffffff;
4782 background-color: #0081c2;
4783 background-image: -moz-linear-gradient(top, #0088cc, #0077b3);
4784 background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0077b3));
4785 background-image: -webkit-linear-gradient(top, #0088cc, #0077b3);
4786 background-image: -o-linear-gradient(top, #0088cc, #0077b3);
4787 background-image: linear-gradient(to bottom, #0088cc, #0077b3);
4788 background-repeat: repeat-x;
4789 filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0);
4790 }
4791 .dropdown-menu .active > a,
4792 .dropdown-menu .active > a:hover {
4793 color: #ffffff;
4794 text-decoration: none;
4795 outline: 0;
4796 background-color: #0081c2;
4797 background-image: -moz-linear-gradient(top, #0088cc, #0077b3);
4798 background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0077b3));
4799 background-image: -webkit-linear-gradient(top, #0088cc, #0077b3);
4800 background-image: -o-linear-gradient(top, #0088cc, #0077b3);
4801 background-image: linear-gradient(to bottom, #0088cc, #0077b3);
4802 background-repeat: repeat-x;
4803 filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0);
4804 }
4805 .dropdown-menu .disabled > a,
4806 .dropdown-menu .disabled > a:hover {
4807 color: #999999;
4808 }
4809 .dropdown-menu .disabled > a:hover {
4810 text-decoration: none;
4811 background-color: transparent;
4812 background-image: none;
4813 filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
4814 cursor: default;
4815 }
4816 .open {
4817 *z-index: 1000;
4818 }
4819 .open > .dropdown-menu {
4820 display: block;
4821 }
4822 .pull-right > .dropdown-menu {
4823 right: 0;
4824 left: auto;
4825 }
4826 .dropup .caret,
4827 .navbar-fixed-bottom .dropdown .caret {
4828 border-top: 0;
4829 border-bottom: 4px solid #000000;
4830 content: "";
4831 }
4832 .dropup .dropdown-menu,
4833 .navbar-fixed-bottom .dropdown .dropdown-menu {
4834 top: auto;
4835 bottom: 100%;
4836 margin-bottom: 1px;
4837 }
4838 .dropdown-submenu {
4839 position: relative;
4840 }
4841 .dropdown-submenu > .dropdown-menu {
4842 top: 0;
4843 left: 100%;
4844 margin-top: -6px;
4845 margin-left: -1px;
4846 -webkit-border-radius: 0 6px 6px 6px;
4847 -moz-border-radius: 0 6px 6px 6px;
4848 border-radius: 0 6px 6px 6px;
4849 }
4850 .dropdown-submenu:hover > .dropdown-menu {
4851 display: block;
4852 }
4853 .dropup .dropdown-submenu > .dropdown-menu {
4854 top: auto;
4855 bottom: 0;
4856 margin-top: 0;
4857 margin-bottom: -2px;
4858 -webkit-border-radius: 5px 5px 5px 0;
4859 -moz-border-radius: 5px 5px 5px 0;
4860 border-radius: 5px 5px 5px 0;
4861 }
4862 .dropdown-submenu > a:after {
4863 display: block;
4864 content: " ";
4865 float: right;
4866 width: 0;
4867 height: 0;
4868 border-color: transparent;
4869 border-style: solid;
4870 border-width: 5px 0 5px 5px;
4871 border-left-color: #cccccc;
4872 margin-top: 5px;
4873 margin-right: -10px;
4874 }
4875 .dropdown-submenu:hover > a:after {
4876 border-left-color: #ffffff;
4877 }
4878 .dropdown-submenu.pull-left {
4879 float: none;
4880 }
4881 .dropdown-submenu.pull-left > .dropdown-menu {
4882 left: -100%;
4883 margin-left: 10px;
4884 -webkit-border-radius: 6px 0 6px 6px;
4885 -moz-border-radius: 6px 0 6px 6px;
4886 border-radius: 6px 0 6px 6px;
4887 }
4888 .dropdown .dropdown-menu .nav-header {
4889 padding-left: 20px;
4890 padding-right: 20px;
4891 }
4892 .typeahead {
4893 z-index: 1051;
4894 margin-top: 2px;
4895 -webkit-border-radius: 4px;
4896 -moz-border-radius: 4px;
4897 border-radius: 4px;
4898 }
4899 .accordion {
4900 margin-bottom: 20px;
4901 }
4902 .accordion-group {
4903 margin-bottom: 2px;
4904 border: 1px solid #e5e5e5;
4905 -webkit-border-radius: 4px;
4906 -moz-border-radius: 4px;
4907 border-radius: 4px;
4908 }
4909 .accordion-heading {
4910 border-bottom: 0;
4911 }
4912 .accordion-heading .accordion-toggle {
4913 display: block;
4914 padding: 8px 15px;
4915 }
4916 .accordion-toggle {
4917 cursor: pointer;
4918 }
4919 .accordion-inner {
4920 padding: 9px 15px;
4921 border-top: 1px solid #e5e5e5;
4922 }
4923 .carousel {
4924 position: relative;
4925 margin-bottom: 20px;
4926 line-height: 1;
4927 }
4928 .carousel-inner {
4929 overflow: hidden;
4930 width: 100%;
4931 position: relative;
4932 }
4933 .carousel-inner > .item {
4934 display: none;
4935 position: relative;
4936 -webkit-transition: 0.6s ease-in-out left;
4937 -moz-transition: 0.6s ease-in-out left;
4938 -o-transition: 0.6s ease-in-out left;
4939 transition: 0.6s ease-in-out left;
4940 }
4941 .carousel-inner > .item > img {
4942 display: block;
4943 line-height: 1;
4944 }
4945 .carousel-inner > .active,
4946 .carousel-inner > .next,
4947 .carousel-inner > .prev {
4948 display: block;
4949 }
4950 .carousel-inner > .active {
4951 left: 0;
4952 }
4953 .carousel-inner > .next,
4954 .carousel-inner > .prev {
4955 position: absolute;
4956 top: 0;
4957 width: 100%;
4958 }
4959 .carousel-inner > .next {
4960 left: 100%;
4961 }
4962 .carousel-inner > .prev {
4963 left: -100%;
4964 }
4965 .carousel-inner > .next.left,
4966 .carousel-inner > .prev.right {
4967 left: 0;
4968 }
4969 .carousel-inner > .active.left {
4970 left: -100%;
4971 }
4972 .carousel-inner > .active.right {
4973 left: 100%;
4974 }
4975 .carousel-control {
4976 position: absolute;
4977 top: 40%;
4978 left: 15px;
4979 width: 40px;
4980 height: 40px;
4981 margin-top: -20px;
4982 font-size: 60px;
4983 font-weight: 100;
4984 line-height: 30px;
4985 color: #ffffff;
4986 text-align: center;
4987 background: #222222;
4988 border: 3px solid #ffffff;
4989 -webkit-border-radius: 23px;
4990 -moz-border-radius: 23px;
4991 border-radius: 23px;
4992 opacity: 0.5;
4993 filter: alpha(opacity=50);
4994 }
4995 .carousel-control.right {
4996 left: auto;
4997 right: 15px;
4998 }
4999 .carousel-control:hover {
5000 color: #ffffff;
5001 text-decoration: none;
5002 opacity: 0.9;
5003 filter: alpha(opacity=90);
5004 }
5005 .carousel-caption {
5006 position: absolute;
5007 left: 0;
5008 right: 0;
5009 bottom: 0;
5010 padding: 15px;
5011 background: #333333;
5012 background: rgba(0, 0, 0, 0.75);
5013 }
5014 .carousel-caption h4,
5015 .carousel-caption p {
5016 color: #ffffff;
5017 line-height: 20px;
5018 }
5019 .carousel-caption h4 {
5020 margin: 0 0 5px;
5021 }
5022 .carousel-caption p {
5023 margin-bottom: 0;
5024 }
5025 .well {
5026 min-height: 20px;
5027 padding: 19px;
5028 margin-bottom: 20px;
5029 background-color: #f5f5f5;
5030 border: 1px solid #e3e3e3;
5031 -webkit-border-radius: 4px;
5032 -moz-border-radius: 4px;
5033 border-radius: 4px;
5034 -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
5035 -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
5036 box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
5037 }
5038 .well blockquote {
5039 border-color: #ddd;
5040 border-color: rgba(0, 0, 0, 0.15);
5041 }
5042 .well-large {
5043 padding: 24px;
5044 -webkit-border-radius: 6px;
5045 -moz-border-radius: 6px;
5046 border-radius: 6px;
5047 }
5048 .well-small {
5049 padding: 9px;
5050 -webkit-border-radius: 3px;
5051 -moz-border-radius: 3px;
5052 border-radius: 3px;
5053 }
5054 .close {
5055 float: right;
5056 font-size: 20px;
5057 font-weight: bold;
5058 line-height: 20px;
5059 color: #000000;
5060 text-shadow: 0 1px 0 #ffffff;
5061 opacity: 0.2;
5062 filter: alpha(opacity=20);
5063 }
5064 .close:hover {
5065 color: #000000;
5066 text-decoration: none;
5067 cursor: pointer;
5068 opacity: 0.4;
5069 filter: alpha(opacity=40);
5070 }
5071 button.close {
5072 padding: 0;
5073 cursor: pointer;
5074 background: transparent;
5075 border: 0;
5076 -webkit-appearance: none;
5077 }
5078 .pull-right {
5079 float: right;
5080 }
5081 .pull-left {
5082 float: left;
5083 }
5084 .hide {
5085 display: none;
5086 }
5087 .show {
5088 display: block;
5089 }
5090 .invisible {
5091 visibility: hidden;
5092 }
5093 .affix {
5094 position: fixed;
5095 }
5096 .fade {
5097 opacity: 0;
5098 -webkit-transition: opacity 0.15s linear;
5099 -moz-transition: opacity 0.15s linear;
5100 -o-transition: opacity 0.15s linear;
5101 transition: opacity 0.15s linear;
5102 }
5103 .fade.in {
5104 opacity: 1;
5105 }
5106 .collapse {
5107 position: relative;
5108 height: 0;
5109 overflow: hidden;
5110 -webkit-transition: height 0.35s ease;
5111 -moz-transition: height 0.35s ease;
5112 -o-transition: height 0.35s ease;
5113 transition: height 0.35s ease;
5114 }
5115 .collapse.in {
5116 height: auto;
5117 }
5118
forum/static/css/bootstrap/bootstrap.min.css
File was created 1 /*!
2 * Bootstrap v2.2.2
3 *
4 * Copyright 2012 Twitter, Inc
5 * Licensed under the Apache License v2.0
6 * http://www.apache.org/licenses/LICENSE-2.0
7 *
8 * Designed and built with all the love in the world @twitter by @mdo and @fat.
9 */
10 .clearfix{*zoom:1;}.clearfix:before,.clearfix:after{display:table;content:"";line-height:0;}
11 .clearfix:after{clear:both;}
12 .hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0;}
13 .input-block-level{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;}
14 article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block;}
15 audio,canvas,video{display:inline-block;*display:inline;*zoom:1;}
16 audio:not([controls]){display:none;}
17 html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;}
18 a:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;}
19 a:hover,a:active{outline:0;}
20 sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline;}
21 sup{top:-0.5em;}
22 sub{bottom:-0.25em;}
23 img{max-width:100%;width:auto\9;height:auto;vertical-align:middle;border:0;-ms-interpolation-mode:bicubic;}
24 #map_canvas img,.google-maps img{max-width:none;}
25 button,input,select,textarea{margin:0;font-size:100%;vertical-align:middle;}
26 button,input{*overflow:visible;line-height:normal;}
27 button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0;}
28 button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer;}
29 label,select,button,input[type="button"],input[type="reset"],input[type="submit"],input[type="radio"],input[type="checkbox"]{cursor:pointer;}
30 input[type="search"]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield;}
31 input[type="search"]::-webkit-search-decoration,input[type="search"]::-webkit-search-cancel-button{-webkit-appearance:none;}
32 textarea{overflow:auto;vertical-align:top;}
33 @media print{*{text-shadow:none !important;color:#000 !important;background:transparent !important;box-shadow:none !important;} a,a:visited{text-decoration:underline;} a[href]:after{content:" (" attr(href) ")";} abbr[title]:after{content:" (" attr(title) ")";} .ir a:after,a[href^="javascript:"]:after,a[href^="#"]:after{content:"";} pre,blockquote{border:1px solid #999;page-break-inside:avoid;} thead{display:table-header-group;} tr,img{page-break-inside:avoid;} img{max-width:100% !important;} @page {margin:0.5cm;}p,h2,h3{orphans:3;widows:3;} h2,h3{page-break-after:avoid;}}body{margin:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:12px;line-height:20px;color:#333333;background-color:#ffffff;}
34 a{color:#0088cc;text-decoration:none;}
35 a:hover{color:#005580;text-decoration:underline;}
36 .img-rounded{-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;}
37 .img-polaroid{padding:4px;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0, 0, 0, 0.2);-webkit-box-shadow:0 1px 3px rgba(0, 0, 0, 0.1);-moz-box-shadow:0 1px 3px rgba(0, 0, 0, 0.1);box-shadow:0 1px 3px rgba(0, 0, 0, 0.1);}
38 .img-circle{-webkit-border-radius:500px;-moz-border-radius:500px;border-radius:500px;}
39 .row{margin-left:-20px;*zoom:1;}.row:before,.row:after{display:table;content:"";line-height:0;}
40 .row:after{clear:both;}
41 [class*="span"]{float:left;min-height:1px;margin-left:20px;}
42 .container,.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:940px;}
43 .span12{width:940px;}
44 .span11{width:860px;}
45 .span10{width:780px;}
46 .span9{width:700px;}
47 .span8{width:620px;}
48 .span7{width:540px;}
49 .span6{width:460px;}
50 .span5{width:380px;}
51 .span4{width:300px;}
52 .span3{width:220px;}
53 .span2{width:140px;}
54 .span1{width:60px;}
55 .offset12{margin-left:980px;}
56 .offset11{margin-left:900px;}
57 .offset10{margin-left:820px;}
58 .offset9{margin-left:740px;}
59 .offset8{margin-left:660px;}
60 .offset7{margin-left:580px;}
61 .offset6{margin-left:500px;}
62 .offset5{margin-left:420px;}
63 .offset4{margin-left:340px;}
64 .offset3{margin-left:260px;}
65 .offset2{margin-left:180px;}
66 .offset1{margin-left:100px;}
67 .row-fluid{width:100%;*zoom:1;}.row-fluid:before,.row-fluid:after{display:table;content:"";line-height:0;}
68 .row-fluid:after{clear:both;}
69 .row-fluid [class*="span"]{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;float:left;margin-left:2.127659574468085%;*margin-left:2.074468085106383%;}
70 .row-fluid [class*="span"]:first-child{margin-left:0;}
71 .row-fluid .controls-row [class*="span"]+[class*="span"]{margin-left:2.127659574468085%;}
72 .row-fluid .span12{width:100%;*width:99.94680851063829%;}
73 .row-fluid .span11{width:91.48936170212765%;*width:91.43617021276594%;}
74 .row-fluid .span10{width:82.97872340425532%;*width:82.92553191489361%;}
75 .row-fluid .span9{width:74.46808510638297%;*width:74.41489361702126%;}
76 .row-fluid .span8{width:65.95744680851064%;*width:65.90425531914893%;}
77 .row-fluid .span7{width:57.44680851063829%;*width:57.39361702127659%;}
78 .row-fluid .span6{width:48.93617021276595%;*width:48.88297872340425%;}
79 .row-fluid .span5{width:40.42553191489362%;*width:40.37234042553192%;}
80 .row-fluid .span4{width:31.914893617021278%;*width:31.861702127659576%;}
81 .row-fluid .span3{width:23.404255319148934%;*width:23.351063829787233%;}
82 .row-fluid .span2{width:14.893617021276595%;*width:14.840425531914894%;}
83 .row-fluid .span1{width:6.382978723404255%;*width:6.329787234042553%;}
84 .row-fluid .offset12{margin-left:104.25531914893617%;*margin-left:104.14893617021275%;}
85 .row-fluid .offset12:first-child{margin-left:102.12765957446808%;*margin-left:102.02127659574467%;}
86 .row-fluid .offset11{margin-left:95.74468085106382%;*margin-left:95.6382978723404%;}
87 .row-fluid .offset11:first-child{margin-left:93.61702127659574%;*margin-left:93.51063829787232%;}
88 .row-fluid .offset10{margin-left:87.23404255319149%;*margin-left:87.12765957446807%;}
89 .row-fluid .offset10:first-child{margin-left:85.1063829787234%;*margin-left:84.99999999999999%;}
90 .row-fluid .offset9{margin-left:78.72340425531914%;*margin-left:78.61702127659572%;}
91 .row-fluid .offset9:first-child{margin-left:76.59574468085106%;*margin-left:76.48936170212764%;}
92 .row-fluid .offset8{margin-left:70.2127659574468%;*margin-left:70.10638297872339%;}
93 .row-fluid .offset8:first-child{margin-left:68.08510638297872%;*margin-left:67.9787234042553%;}
94 .row-fluid .offset7{margin-left:61.70212765957446%;*margin-left:61.59574468085106%;}
95 .row-fluid .offset7:first-child{margin-left:59.574468085106375%;*margin-left:59.46808510638297%;}
96 .row-fluid .offset6{margin-left:53.191489361702125%;*margin-left:53.085106382978715%;}
97 .row-fluid .offset6:first-child{margin-left:51.063829787234035%;*margin-left:50.95744680851063%;}
98 .row-fluid .offset5{margin-left:44.68085106382979%;*margin-left:44.57446808510638%;}
99 .row-fluid .offset5:first-child{margin-left:42.5531914893617%;*margin-left:42.4468085106383%;}
100 .row-fluid .offset4{margin-left:36.170212765957444%;*margin-left:36.06382978723405%;}
101 .row-fluid .offset4:first-child{margin-left:34.04255319148936%;*margin-left:33.93617021276596%;}
102 .row-fluid .offset3{margin-left:27.659574468085104%;*margin-left:27.5531914893617%;}
103 .row-fluid .offset3:first-child{margin-left:25.53191489361702%;*margin-left:25.425531914893618%;}
104 .row-fluid .offset2{margin-left:19.148936170212764%;*margin-left:19.04255319148936%;}
105 .row-fluid .offset2:first-child{margin-left:17.02127659574468%;*margin-left:16.914893617021278%;}
106 .row-fluid .offset1{margin-left:10.638297872340425%;*margin-left:10.53191489361702%;}
107 .row-fluid .offset1:first-child{margin-left:8.51063829787234%;*margin-left:8.404255319148938%;}
108 [class*="span"].hide,.row-fluid [class*="span"].hide{display:none;}
109 [class*="span"].pull-right,.row-fluid [class*="span"].pull-right{float:right;}
110 .container{margin-right:auto;margin-left:auto;*zoom:1;}.container:before,.container:after{display:table;content:"";line-height:0;}
111 .container:after{clear:both;}
112 .container-fluid{padding-right:20px;padding-left:20px;*zoom:1;}.container-fluid:before,.container-fluid:after{display:table;content:"";line-height:0;}
113 .container-fluid:after{clear:both;}
114 p{margin:0 0 10px;}
115 .lead{margin-bottom:20px;font-size:18px;font-weight:200;line-height:30px;}
116 small{font-size:85%;}
117 strong{font-weight:bold;}
118 em{font-style:italic;}
119 cite{font-style:normal;}
120 .muted{color:#999999;}
121 a.muted:hover{color:#808080;}
122 .text-warning{color:#c09853;}
123 a.text-warning:hover{color:#a47e3c;}
124 .text-error{color:#b94a48;}
125 a.text-error:hover{color:#953b39;}
126 .text-info{color:#3a87ad;}
127 a.text-info:hover{color:#2d6987;}
128 .text-success{color:#468847;}
129 a.text-success:hover{color:#356635;}
130 h1,h2,h3,h4,h5,h6{margin:10px 0;font-family:inherit;font-weight:bold;line-height:20px;color:inherit;text-rendering:optimizelegibility;}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small{font-weight:normal;line-height:1;color:#999999;}
131 h1,h2,h3{line-height:40px;}
132 h1{font-size:33px;}
133 h2{font-size:27px;}
134 h3{font-size:21px;}
135 h4{font-size:15px;}
136 h5{font-size:12px;}
137 h6{font-size:10.2px;}
138 h1 small{font-size:21px;}
139 h2 small{font-size:15px;}
140 h3 small{font-size:12px;}
141 h4 small{font-size:12px;}
142 .page-header{padding-bottom:9px;margin:20px 0 30px;border-bottom:1px solid #eeeeee;}
143 ul,ol{padding:0;margin:0 0 10px 25px;}
144 ul ul,ul ol,ol ol,ol ul{margin-bottom:0;}
145 li{line-height:20px;}
146 ul.unstyled,ol.unstyled{margin-left:0;list-style:none;}
147 ul.inline,ol.inline{margin-left:0;list-style:none;}ul.inline >li,ol.inline >li{display:inline-block;padding-left:5px;padding-right:5px;}
148 dl{margin-bottom:20px;}
149 dt,dd{line-height:20px;}
150 dt{font-weight:bold;}
151 dd{margin-left:10px;}
152 .dl-horizontal{*zoom:1;}.dl-horizontal:before,.dl-horizontal:after{display:table;content:"";line-height:0;}
153 .dl-horizontal:after{clear:both;}
154 .dl-horizontal dt{float:left;width:160px;clear:left;text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
155 .dl-horizontal dd{margin-left:180px;}
156 hr{margin:20px 0;border:0;border-top:1px solid #eeeeee;border-bottom:1px solid #ffffff;}
157 abbr[title],abbr[data-original-title]{cursor:help;border-bottom:1px dotted #999999;}
158 abbr.initialism{font-size:90%;text-transform:uppercase;}
159 blockquote{padding:0 0 0 15px;margin:0 0 20px;border-left:5px solid #eeeeee;}blockquote p{margin-bottom:0;font-size:16px;font-weight:300;line-height:25px;}
160 blockquote small{display:block;line-height:20px;color:#999999;}blockquote small:before{content:'\2014 \00A0';}
161 blockquote.pull-right{float:right;padding-right:15px;padding-left:0;border-right:5px solid #eeeeee;border-left:0;}blockquote.pull-right p,blockquote.pull-right small{text-align:right;}
162 blockquote.pull-right small:before{content:'';}
163 blockquote.pull-right small:after{content:'\00A0 \2014';}
164 q:before,q:after,blockquote:before,blockquote:after{content:"";}
165 address{display:block;margin-bottom:20px;font-style:normal;line-height:20px;}
166 code,pre{padding:0 3px 2px;font-family:Monaco,Menlo,Consolas,"Courier New",monospace;font-size:10px;color:#333333;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}
167 code{padding:2px 4px;color:#d14;background-color:#f7f7f9;border:1px solid #e1e1e8;white-space:nowrap;}
168 pre{display:block;padding:9.5px;margin:0 0 10px;font-size:11px;line-height:20px;word-break:break-all;word-wrap:break-word;white-space:pre;white-space:pre-wrap;background-color:#f5f5f5;border:1px solid #ccc;border:1px solid rgba(0, 0, 0, 0.15);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}pre.prettyprint{margin-bottom:20px;}
169 pre code{padding:0;color:inherit;white-space:pre;white-space:pre-wrap;background-color:transparent;border:0;}
170 .pre-scrollable{max-height:340px;overflow-y:scroll;}
171 .label,.badge{display:inline-block;padding:2px 4px;font-size:10.152px;font-weight:bold;line-height:14px;color:#ffffff;vertical-align:baseline;white-space:nowrap;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);background-color:#999999;}
172 .label{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}
173 .badge{padding-left:9px;padding-right:9px;-webkit-border-radius:9px;-moz-border-radius:9px;border-radius:9px;}
174 .label:empty,.badge:empty{display:none;}
175 a.label:hover,a.badge:hover{color:#ffffff;text-decoration:none;cursor:pointer;}
176 .label-important,.badge-important{background-color:#b94a48;}
177 .label-important[href],.badge-important[href]{background-color:#953b39;}
178 .label-warning,.badge-warning{background-color:#f89406;}
179 .label-warning[href],.badge-warning[href]{background-color:#c67605;}
180 .label-success,.badge-success{background-color:#468847;}
181 .label-success[href],.badge-success[href]{background-color:#356635;}
182 .label-info,.badge-info{background-color:#3a87ad;}
183 .label-info[href],.badge-info[href]{background-color:#2d6987;}
184 .label-inverse,.badge-inverse{background-color:#333333;}
185 .label-inverse[href],.badge-inverse[href]{background-color:#1a1a1a;}
186 .btn .label,.btn .badge{position:relative;top:-1px;}
187 .btn-mini .label,.btn-mini .badge{top:0;}
188 table{max-width:100%;background-color:transparent;border-collapse:collapse;border-spacing:0;}
189 .table{width:100%;margin-bottom:20px;}.table th,.table td{padding:8px;line-height:20px;text-align:left;vertical-align:top;border-top:1px solid #dddddd;}
190 .table th{font-weight:bold;}
191 .table thead th{vertical-align:bottom;}
192 .table caption+thead tr:first-child th,.table caption+thead tr:first-child td,.table colgroup+thead tr:first-child th,.table colgroup+thead tr:first-child td,.table thead:first-child tr:first-child th,.table thead:first-child tr:first-child td{border-top:0;}
193 .table tbody+tbody{border-top:2px solid #dddddd;}
194 .table .table{background-color:#ffffff;}
195 .table-condensed th,.table-condensed td{padding:4px 5px;}
196 .table-bordered{border:1px solid #dddddd;border-collapse:separate;*border-collapse:collapse;border-left:0;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}.table-bordered th,.table-bordered td{border-left:1px solid #dddddd;}
197 .table-bordered caption+thead tr:first-child th,.table-bordered caption+tbody tr:first-child th,.table-bordered caption+tbody tr:first-child td,.table-bordered colgroup+thead tr:first-child th,.table-bordered colgroup+tbody tr:first-child th,.table-bordered colgroup+tbody tr:first-child td,.table-bordered thead:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child td{border-top:0;}
198 .table-bordered thead:first-child tr:first-child>th:first-child,.table-bordered tbody:first-child tr:first-child>td:first-child{-webkit-border-top-left-radius:4px;-moz-border-radius-topleft:4px;border-top-left-radius:4px;}
199 .table-bordered thead:first-child tr:first-child>th:last-child,.table-bordered tbody:first-child tr:first-child>td:last-child{-webkit-border-top-right-radius:4px;-moz-border-radius-topright:4px;border-top-right-radius:4px;}
200 .table-bordered thead:last-child tr:last-child>th:first-child,.table-bordered tbody:last-child tr:last-child>td:first-child,.table-bordered tfoot:last-child tr:last-child>td:first-child{-webkit-border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px;border-bottom-left-radius:4px;}
201 .table-bordered thead:last-child tr:last-child>th:last-child,.table-bordered tbody:last-child tr:last-child>td:last-child,.table-bordered tfoot:last-child tr:last-child>td:last-child{-webkit-border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px;border-bottom-right-radius:4px;}
202 .table-bordered tfoot+tbody:last-child tr:last-child td:first-child{-webkit-border-bottom-left-radius:0;-moz-border-radius-bottomleft:0;border-bottom-left-radius:0;}
203 .table-bordered tfoot+tbody:last-child tr:last-child td:last-child{-webkit-border-bottom-right-radius:0;-moz-border-radius-bottomright:0;border-bottom-right-radius:0;}
204 .table-bordered caption+thead tr:first-child th:first-child,.table-bordered caption+tbody tr:first-child td:first-child,.table-bordered colgroup+thead tr:first-child th:first-child,.table-bordered colgroup+tbody tr:first-child td:first-child{-webkit-border-top-left-radius:4px;-moz-border-radius-topleft:4px;border-top-left-radius:4px;}
205 .table-bordered caption+thead tr:first-child th:last-child,.table-bordered caption+tbody tr:first-child td:last-child,.table-bordered colgroup+thead tr:first-child th:last-child,.table-bordered colgroup+tbody tr:first-child td:last-child{-webkit-border-top-right-radius:4px;-moz-border-radius-topright:4px;border-top-right-radius:4px;}
206 .table-striped tbody>tr:nth-child(odd)>td,.table-striped tbody>tr:nth-child(odd)>th{background-color:#f9f9f9;}
207 .table-hover tbody tr:hover td,.table-hover tbody tr:hover th{background-color:#f5f5f5;}
208 table td[class*="span"],table th[class*="span"],.row-fluid table td[class*="span"],.row-fluid table th[class*="span"]{display:table-cell;float:none;margin-left:0;}
209 .table td.span1,.table th.span1{float:none;width:44px;margin-left:0;}
210 .table td.span2,.table th.span2{float:none;width:124px;margin-left:0;}
211 .table td.span3,.table th.span3{float:none;width:204px;margin-left:0;}
212 .table td.span4,.table th.span4{float:none;width:284px;margin-left:0;}
213 .table td.span5,.table th.span5{float:none;width:364px;margin-left:0;}
214 .table td.span6,.table th.span6{float:none;width:444px;margin-left:0;}
215 .table td.span7,.table th.span7{float:none;width:524px;margin-left:0;}
216 .table td.span8,.table th.span8{float:none;width:604px;margin-left:0;}
217 .table td.span9,.table th.span9{float:none;width:684px;margin-left:0;}
218 .table td.span10,.table th.span10{float:none;width:764px;margin-left:0;}
219 .table td.span11,.table th.span11{float:none;width:844px;margin-left:0;}
220 .table td.span12,.table th.span12{float:none;width:924px;margin-left:0;}
221 .table tbody tr.success td{background-color:#dff0d8;}
222 .table tbody tr.error td{background-color:#f2dede;}
223 .table tbody tr.warning td{background-color:#fcf8e3;}
224 .table tbody tr.info td{background-color:#d9edf7;}
225 .table-hover tbody tr.success:hover td{background-color:#d0e9c6;}
226 .table-hover tbody tr.error:hover td{background-color:#ebcccc;}
227 .table-hover tbody tr.warning:hover td{background-color:#faf2cc;}
228 .table-hover tbody tr.info:hover td{background-color:#c4e3f3;}
229 form{margin:0 0 20px;}
230 fieldset{padding:0;margin:0;border:0;}
231 legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:18px;line-height:40px;color:#333333;border:0;border-bottom:1px solid #e5e5e5;}legend small{font-size:15px;color:#999999;}
232 label,input,button,select,textarea{font-size:12px;font-weight:normal;line-height:20px;}
233 input,button,select,textarea{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;}
234 label{display:block;margin-bottom:5px;}
235 select,textarea,input[type="text"],input[type="password"],input[type="datetime"],input[type="datetime-local"],input[type="date"],input[type="month"],input[type="time"],input[type="week"],input[type="number"],input[type="email"],input[type="url"],input[type="search"],input[type="tel"],input[type="color"],.uneditable-input{display:inline-block;height:20px;padding:4px 6px;margin-bottom:10px;font-size:12px;line-height:20px;color:#555555;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;vertical-align:middle;}
236 input,textarea,.uneditable-input{width:206px;}
237 textarea{height:auto;}
238 textarea,input[type="text"],input[type="password"],input[type="datetime"],input[type="datetime-local"],input[type="date"],input[type="month"],input[type="time"],input[type="week"],input[type="number"],input[type="email"],input[type="url"],input[type="search"],input[type="tel"],input[type="color"],.uneditable-input{background-color:#ffffff;border:1px solid #cccccc;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);-webkit-transition:border linear .2s, box-shadow linear .2s;-moz-transition:border linear .2s, box-shadow linear .2s;-o-transition:border linear .2s, box-shadow linear .2s;transition:border linear .2s, box-shadow linear .2s;}textarea:focus,input[type="text"]:focus,input[type="password"]:focus,input[type="datetime"]:focus,input[type="datetime-local"]:focus,input[type="date"]:focus,input[type="month"]:focus,input[type="time"]:focus,input[type="week"]:focus,input[type="number"]:focus,input[type="email"]:focus,input[type="url"]:focus,input[type="search"]:focus,input[type="tel"]:focus,input[type="color"]:focus,.uneditable-input:focus{border-color:rgba(82, 168, 236, 0.8);outline:0;outline:thin dotted \9;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6);}
239 input[type="radio"],input[type="checkbox"]{margin:4px 0 0;*margin-top:0;margin-top:1px \9;line-height:normal;}
240 input[type="file"],input[type="image"],input[type="submit"],input[type="reset"],input[type="button"],input[type="radio"],input[type="checkbox"]{width:auto;}
241 select,input[type="file"]{height:30px;*margin-top:4px;line-height:30px;}
242 select{width:220px;border:1px solid #cccccc;background-color:#ffffff;}
243 select[multiple],select[size]{height:auto;}
244 select:focus,input[type="file"]:focus,input[type="radio"]:focus,input[type="checkbox"]:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;}
245 .uneditable-input,.uneditable-textarea{color:#999999;background-color:#fcfcfc;border-color:#cccccc;-webkit-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);-moz-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);cursor:not-allowed;}
246 .uneditable-input{overflow:hidden;white-space:nowrap;}
247 .uneditable-textarea{width:auto;height:auto;}
248 input:-moz-placeholder,textarea:-moz-placeholder{color:#999999;}
249 input:-ms-input-placeholder,textarea:-ms-input-placeholder{color:#999999;}
250 input::-webkit-input-placeholder,textarea::-webkit-input-placeholder{color:#999999;}
251 .radio,.checkbox{min-height:20px;padding-left:20px;}
252 .radio input[type="radio"],.checkbox input[type="checkbox"]{float:left;margin-left:-20px;}
253 .controls>.radio:first-child,.controls>.checkbox:first-child{padding-top:5px;}
254 .radio.inline,.checkbox.inline{display:inline-block;padding-top:5px;margin-bottom:0;vertical-align:middle;}
255 .radio.inline+.radio.inline,.checkbox.inline+.checkbox.inline{margin-left:10px;}
256 .input-mini{width:60px;}
257 .input-small{width:90px;}
258 .input-medium{width:150px;}
259 .input-large{width:210px;}
260 .input-xlarge{width:270px;}
261 .input-xxlarge{width:530px;}
262 input[class*="span"],select[class*="span"],textarea[class*="span"],.uneditable-input[class*="span"],.row-fluid input[class*="span"],.row-fluid select[class*="span"],.row-fluid textarea[class*="span"],.row-fluid .uneditable-input[class*="span"]{float:none;margin-left:0;}
263 .input-append input[class*="span"],.input-append .uneditable-input[class*="span"],.input-prepend input[class*="span"],.input-prepend .uneditable-input[class*="span"],.row-fluid input[class*="span"],.row-fluid select[class*="span"],.row-fluid textarea[class*="span"],.row-fluid .uneditable-input[class*="span"],.row-fluid .input-prepend [class*="span"],.row-fluid .input-append [class*="span"]{display:inline-block;}
264 input,textarea,.uneditable-input{margin-left:0;}
265 .controls-row [class*="span"]+[class*="span"]{margin-left:20px;}
266 input.span12, textarea.span12, .uneditable-input.span12{width:926px;}
267 input.span11, textarea.span11, .uneditable-input.span11{width:846px;}
268 input.span10, textarea.span10, .uneditable-input.span10{width:766px;}
269 input.span9, textarea.span9, .uneditable-input.span9{width:686px;}
270 input.span8, textarea.span8, .uneditable-input.span8{width:606px;}
271 input.span7, textarea.span7, .uneditable-input.span7{width:526px;}
272 input.span6, textarea.span6, .uneditable-input.span6{width:446px;}
273 input.span5, textarea.span5, .uneditable-input.span5{width:366px;}
274 input.span4, textarea.span4, .uneditable-input.span4{width:286px;}
275 input.span3, textarea.span3, .uneditable-input.span3{width:206px;}
276 input.span2, textarea.span2, .uneditable-input.span2{width:126px;}
277 input.span1, textarea.span1, .uneditable-input.span1{width:46px;}
278 .controls-row{*zoom:1;}.controls-row:before,.controls-row:after{display:table;content:"";line-height:0;}
279 .controls-row:after{clear:both;}
280 .controls-row [class*="span"],.row-fluid .controls-row [class*="span"]{float:left;}
281 .controls-row .checkbox[class*="span"],.controls-row .radio[class*="span"]{padding-top:5px;}
282 input[disabled],select[disabled],textarea[disabled],input[readonly],select[readonly],textarea[readonly]{cursor:not-allowed;background-color:#eeeeee;}
283 input[type="radio"][disabled],input[type="checkbox"][disabled],input[type="radio"][readonly],input[type="checkbox"][readonly]{background-color:transparent;}
284 .control-group.warning .control-label,.control-group.warning .help-block,.control-group.warning .help-inline{color:#c09853;}
285 .control-group.warning .checkbox,.control-group.warning .radio,.control-group.warning input,.control-group.warning select,.control-group.warning textarea{color:#c09853;}
286 .control-group.warning input,.control-group.warning select,.control-group.warning textarea{border-color:#c09853;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);}.control-group.warning input:focus,.control-group.warning select:focus,.control-group.warning textarea:focus{border-color:#a47e3c;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 6px #dbc59e;-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 6px #dbc59e;box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 6px #dbc59e;}
287 .control-group.warning .input-prepend .add-on,.control-group.warning .input-append .add-on{color:#c09853;background-color:#fcf8e3;border-color:#c09853;}
288 .control-group.error .control-label,.control-group.error .help-block,.control-group.error .help-inline{color:#b94a48;}
289 .control-group.error .checkbox,.control-group.error .radio,.control-group.error input,.control-group.error select,.control-group.error textarea{color:#b94a48;}
290 .control-group.error input,.control-group.error select,.control-group.error textarea{border-color:#b94a48;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);}.control-group.error input:focus,.control-group.error select:focus,.control-group.error textarea:focus{border-color:#953b39;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 6px #d59392;-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 6px #d59392;box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 6px #d59392;}
291 .control-group.error .input-prepend .add-on,.control-group.error .input-append .add-on{color:#b94a48;background-color:#f2dede;border-color:#b94a48;}
292 .control-group.success .control-label,.control-group.success .help-block,.control-group.success .help-inline{color:#468847;}
293 .control-group.success .checkbox,.control-group.success .radio,.control-group.success input,.control-group.success select,.control-group.success textarea{color:#468847;}
294 .control-group.success input,.control-group.success select,.control-group.success textarea{border-color:#468847;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);}.control-group.success input:focus,.control-group.success select:focus,.control-group.success textarea:focus{border-color:#356635;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 6px #7aba7b;-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 6px #7aba7b;box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 6px #7aba7b;}
295 .control-group.success .input-prepend .add-on,.control-group.success .input-append .add-on{color:#468847;background-color:#dff0d8;border-color:#468847;}
296 .control-group.info .control-label,.control-group.info .help-block,.control-group.info .help-inline{color:#3a87ad;}
297 .control-group.info .checkbox,.control-group.info .radio,.control-group.info input,.control-group.info select,.control-group.info textarea{color:#3a87ad;}
298 .control-group.info input,.control-group.info select,.control-group.info textarea{border-color:#3a87ad;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);}.control-group.info input:focus,.control-group.info select:focus,.control-group.info textarea:focus{border-color:#2d6987;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 6px #7ab5d3;-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 6px #7ab5d3;box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 6px #7ab5d3;}
299 .control-group.info .input-prepend .add-on,.control-group.info .input-append .add-on{color:#3a87ad;background-color:#d9edf7;border-color:#3a87ad;}
300 input:focus:invalid,textarea:focus:invalid,select:focus:invalid{color:#b94a48;border-color:#ee5f5b;}input:focus:invalid:focus,textarea:focus:invalid:focus,select:focus:invalid:focus{border-color:#e9322d;-webkit-box-shadow:0 0 6px #f8b9b7;-moz-box-shadow:0 0 6px #f8b9b7;box-shadow:0 0 6px #f8b9b7;}
301 .form-actions{padding:19px 20px 20px;margin-top:20px;margin-bottom:20px;background-color:#f5f5f5;border-top:1px solid #e5e5e5;*zoom:1;}.form-actions:before,.form-actions:after{display:table;content:"";line-height:0;}
302 .form-actions:after{clear:both;}
303 .help-block,.help-inline{color:#595959;}
304 .help-block{display:block;margin-bottom:10px;}
305 .help-inline{display:inline-block;*display:inline;*zoom:1;vertical-align:middle;padding-left:5px;}
306 .input-append,.input-prepend{margin-bottom:5px;font-size:0;white-space:nowrap;}.input-append input,.input-prepend input,.input-append select,.input-prepend select,.input-append .uneditable-input,.input-prepend .uneditable-input,.input-append .dropdown-menu,.input-prepend .dropdown-menu{font-size:12px;}
307 .input-append input,.input-prepend input,.input-append select,.input-prepend select,.input-append .uneditable-input,.input-prepend .uneditable-input{position:relative;margin-bottom:0;*margin-left:0;vertical-align:top;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0;}.input-append input:focus,.input-prepend input:focus,.input-append select:focus,.input-prepend select:focus,.input-append .uneditable-input:focus,.input-prepend .uneditable-input:focus{z-index:2;}
308 .input-append .add-on,.input-prepend .add-on{display:inline-block;width:auto;height:20px;min-width:16px;padding:4px 5px;font-size:12px;font-weight:normal;line-height:20px;text-align:center;text-shadow:0 1px 0 #ffffff;background-color:#eeeeee;border:1px solid #ccc;}
309 .input-append .add-on,.input-prepend .add-on,.input-append .btn,.input-prepend .btn,.input-append .btn-group>.dropdown-toggle,.input-prepend .btn-group>.dropdown-toggle{vertical-align:top;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}
310 .input-append .active,.input-prepend .active{background-color:#a9dba9;border-color:#46a546;}
311 .input-prepend .add-on,.input-prepend .btn{margin-right:-1px;}
312 .input-prepend .add-on:first-child,.input-prepend .btn:first-child{-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px;}
313 .input-append input,.input-append select,.input-append .uneditable-input{-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px;}.input-append input+.btn-group .btn:last-child,.input-append select+.btn-group .btn:last-child,.input-append .uneditable-input+.btn-group .btn:last-child{-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0;}
314 .input-append .add-on,.input-append .btn,.input-append .btn-group{margin-left:-1px;}
315 .input-append .add-on:last-child,.input-append .btn:last-child,.input-append .btn-group:last-child>.dropdown-toggle{-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0;}
316 .input-prepend.input-append input,.input-prepend.input-append select,.input-prepend.input-append .uneditable-input{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}.input-prepend.input-append input+.btn-group .btn,.input-prepend.input-append select+.btn-group .btn,.input-prepend.input-append .uneditable-input+.btn-group .btn{-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0;}
317 .input-prepend.input-append .add-on:first-child,.input-prepend.input-append .btn:first-child{margin-right:-1px;-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px;}
318 .input-prepend.input-append .add-on:last-child,.input-prepend.input-append .btn:last-child{margin-left:-1px;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0;}
319 .input-prepend.input-append .btn-group:first-child{margin-left:0;}
320 input.search-query{padding-right:14px;padding-right:4px \9;padding-left:14px;padding-left:4px \9;margin-bottom:0;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px;}
321 .form-search .input-append .search-query,.form-search .input-prepend .search-query{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}
322 .form-search .input-append .search-query{-webkit-border-radius:14px 0 0 14px;-moz-border-radius:14px 0 0 14px;border-radius:14px 0 0 14px;}
323 .form-search .input-append .btn{-webkit-border-radius:0 14px 14px 0;-moz-border-radius:0 14px 14px 0;border-radius:0 14px 14px 0;}
324 .form-search .input-prepend .search-query{-webkit-border-radius:0 14px 14px 0;-moz-border-radius:0 14px 14px 0;border-radius:0 14px 14px 0;}
325 .form-search .input-prepend .btn{-webkit-border-radius:14px 0 0 14px;-moz-border-radius:14px 0 0 14px;border-radius:14px 0 0 14px;}
326 .form-search input,.form-inline input,.form-horizontal input,.form-search textarea,.form-inline textarea,.form-horizontal textarea,.form-search select,.form-inline select,.form-horizontal select,.form-search .help-inline,.form-inline .help-inline,.form-horizontal .help-inline,.form-search .uneditable-input,.form-inline .uneditable-input,.form-horizontal .uneditable-input,.form-search .input-prepend,.form-inline .input-prepend,.form-horizontal .input-prepend,.form-search .input-append,.form-inline .input-append,.form-horizontal .input-append{display:inline-block;*display:inline;*zoom:1;margin-bottom:0;vertical-align:middle;}
327 .form-search .hide,.form-inline .hide,.form-horizontal .hide{display:none;}
328 .form-search label,.form-inline label,.form-search .btn-group,.form-inline .btn-group{display:inline-block;}
329 .form-search .input-append,.form-inline .input-append,.form-search .input-prepend,.form-inline .input-prepend{margin-bottom:0;}
330 .form-search .radio,.form-search .checkbox,.form-inline .radio,.form-inline .checkbox{padding-left:0;margin-bottom:0;vertical-align:middle;}
331 .form-search .radio input[type="radio"],.form-search .checkbox input[type="checkbox"],.form-inline .radio input[type="radio"],.form-inline .checkbox input[type="checkbox"]{float:left;margin-right:3px;margin-left:0;}
332 .control-group{margin-bottom:10px;}
333 legend+.control-group{margin-top:20px;-webkit-margin-top-collapse:separate;}
334 .form-horizontal .control-group{margin-bottom:20px;*zoom:1;}.form-horizontal .control-group:before,.form-horizontal .control-group:after{display:table;content:"";line-height:0;}
335 .form-horizontal .control-group:after{clear:both;}
336 .form-horizontal .control-label{float:left;width:160px;padding-top:5px;text-align:right;}
337 .form-horizontal .controls{*display:inline-block;*padding-left:20px;margin-left:180px;*margin-left:0;}.form-horizontal .controls:first-child{*padding-left:180px;}
338 .form-horizontal .help-block{margin-bottom:0;}
339 .form-horizontal input+.help-block,.form-horizontal select+.help-block,.form-horizontal textarea+.help-block,.form-horizontal .uneditable-input+.help-block,.form-horizontal .input-prepend+.help-block,.form-horizontal .input-append+.help-block{margin-top:10px;}
340 .form-horizontal .form-actions{padding-left:180px;}
341 .btn{display:inline-block;*display:inline;*zoom:1;padding:4px 12px;margin-bottom:0;font-size:12px;line-height:20px;text-align:center;vertical-align:middle;cursor:pointer;color:#333333;text-shadow:0 1px 1px rgba(255, 255, 255, 0.75);background-color:#f5f5f5;background-image:-moz-linear-gradient(top, #ffffff, #e6e6e6);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6));background-image:-webkit-linear-gradient(top, #ffffff, #e6e6e6);background-image:-o-linear-gradient(top, #ffffff, #e6e6e6);background-image:linear-gradient(to bottom, #ffffff, #e6e6e6);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0);border-color:#e6e6e6 #e6e6e6 #bfbfbf;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);*background-color:#e6e6e6;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);border:1px solid #bbbbbb;*border:0;border-bottom-color:#a2a2a2;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;*margin-left:.3em;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);}.btn:hover,.btn:active,.btn.active,.btn.disabled,.btn[disabled]{color:#333333;background-color:#e6e6e6;*background-color:#d9d9d9;}
342 .btn:active,.btn.active{background-color:#cccccc \9;}
343 .btn:first-child{*margin-left:0;}
344 .btn:hover{color:#333333;text-decoration:none;background-position:0 -15px;-webkit-transition:background-position 0.1s linear;-moz-transition:background-position 0.1s linear;-o-transition:background-position 0.1s linear;transition:background-position 0.1s linear;}
345 .btn:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;}
346 .btn.active,.btn:active{background-image:none;outline:0;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);}
347 .btn.disabled,.btn[disabled]{cursor:default;background-image:none;opacity:0.65;filter:alpha(opacity=65);-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;}
348 .btn-large{padding:11px 19px;font-size:15px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;}
349 .btn-large [class^="icon-"],.btn-large [class*=" icon-"]{margin-top:4px;}
350 .btn-small{padding:2px 10px;font-size:10.2px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}
351 .btn-small [class^="icon-"],.btn-small [class*=" icon-"]{margin-top:0;}
352 .btn-mini [class^="icon-"],.btn-mini [class*=" icon-"]{margin-top:-1px;}
353 .btn-mini{padding:0 6px;font-size:9px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}
354 .btn-block{display:block;width:100%;padding-left:0;padding-right:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;}
355 .btn-block+.btn-block{margin-top:5px;}
356 input[type="submit"].btn-block,input[type="reset"].btn-block,input[type="button"].btn-block{width:100%;}
357 .btn-primary.active,.btn-warning.active,.btn-danger.active,.btn-success.active,.btn-info.active,.btn-inverse.active{color:rgba(255, 255, 255, 0.75);}
358 .btn{border-color:#c5c5c5;border-color:rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.15) rgba(0, 0, 0, 0.25);}
359 .btn-primary{color:#ffffff;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);background-color:#006dcc;background-image:-moz-linear-gradient(top, #0088cc, #0044cc);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc));background-image:-webkit-linear-gradient(top, #0088cc, #0044cc);background-image:-o-linear-gradient(top, #0088cc, #0044cc);background-image:linear-gradient(to bottom, #0088cc, #0044cc);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0044cc', GradientType=0);border-color:#0044cc #0044cc #002a80;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);*background-color:#0044cc;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);}.btn-primary:hover,.btn-primary:active,.btn-primary.active,.btn-primary.disabled,.btn-primary[disabled]{color:#ffffff;background-color:#0044cc;*background-color:#003bb3;}
360 .btn-primary:active,.btn-primary.active{background-color:#003399 \9;}
361 .btn-warning{color:#ffffff;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);background-color:#faa732;background-image:-moz-linear-gradient(top, #fbb450, #f89406);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406));background-image:-webkit-linear-gradient(top, #fbb450, #f89406);background-image:-o-linear-gradient(top, #fbb450, #f89406);background-image:linear-gradient(to bottom, #fbb450, #f89406);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450', endColorstr='#fff89406', GradientType=0);border-color:#f89406 #f89406 #ad6704;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);*background-color:#f89406;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);}.btn-warning:hover,.btn-warning:active,.btn-warning.active,.btn-warning.disabled,.btn-warning[disabled]{color:#ffffff;background-color:#f89406;*background-color:#df8505;}
362 .btn-warning:active,.btn-warning.active{background-color:#c67605 \9;}
363 .btn-danger{color:#ffffff;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);background-color:#da4f49;background-image:-moz-linear-gradient(top, #ee5f5b, #bd362f);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#bd362f));background-image:-webkit-linear-gradient(top, #ee5f5b, #bd362f);background-image:-o-linear-gradient(top, #ee5f5b, #bd362f);background-image:linear-gradient(to bottom, #ee5f5b, #bd362f);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffbd362f', GradientType=0);border-color:#bd362f #bd362f #802420;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);*background-color:#bd362f;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);}.btn-danger:hover,.btn-danger:active,.btn-danger.active,.btn-danger.disabled,.btn-danger[disabled]{color:#ffffff;background-color:#bd362f;*background-color:#a9302a;}
364 .btn-danger:active,.btn-danger.active{background-color:#942a25 \9;}
365 .btn-success{color:#ffffff;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);background-color:#5bb75b;background-image:-moz-linear-gradient(top, #62c462, #51a351);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#51a351));background-image:-webkit-linear-gradient(top, #62c462, #51a351);background-image:-o-linear-gradient(top, #62c462, #51a351);background-image:linear-gradient(to bottom, #62c462, #51a351);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff51a351', GradientType=0);border-color:#51a351 #51a351 #387038;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);*background-color:#51a351;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);}.btn-success:hover,.btn-success:active,.btn-success.active,.btn-success.disabled,.btn-success[disabled]{color:#ffffff;background-color:#51a351;*background-color:#499249;}
366 .btn-success:active,.btn-success.active{background-color:#408140 \9;}
367 .btn-info{color:#ffffff;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);background-color:#49afcd;background-image:-moz-linear-gradient(top, #5bc0de, #2f96b4);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#2f96b4));background-image:-webkit-linear-gradient(top, #5bc0de, #2f96b4);background-image:-o-linear-gradient(top, #5bc0de, #2f96b4);background-image:linear-gradient(to bottom, #5bc0de, #2f96b4);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2f96b4', GradientType=0);border-color:#2f96b4 #2f96b4 #1f6377;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);*background-color:#2f96b4;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);}.btn-info:hover,.btn-info:active,.btn-info.active,.btn-info.disabled,.btn-info[disabled]{color:#ffffff;background-color:#2f96b4;*background-color:#2a85a0;}
368 .btn-info:active,.btn-info.active{background-color:#24748c \9;}
369 .btn-inverse{color:#ffffff;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);background-color:#363636;background-image:-moz-linear-gradient(top, #444444, #222222);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#444444), to(#222222));background-image:-webkit-linear-gradient(top, #444444, #222222);background-image:-o-linear-gradient(top, #444444, #222222);background-image:linear-gradient(to bottom, #444444, #222222);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff444444', endColorstr='#ff222222', GradientType=0);border-color:#222222 #222222 #000000;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);*background-color:#222222;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);}.btn-inverse:hover,.btn-inverse:active,.btn-inverse.active,.btn-inverse.disabled,.btn-inverse[disabled]{color:#ffffff;background-color:#222222;*background-color:#151515;}
370 .btn-inverse:active,.btn-inverse.active{background-color:#080808 \9;}
371 button.btn,input[type="submit"].btn{*padding-top:3px;*padding-bottom:3px;}button.btn::-moz-focus-inner,input[type="submit"].btn::-moz-focus-inner{padding:0;border:0;}
372 button.btn.btn-large,input[type="submit"].btn.btn-large{*padding-top:7px;*padding-bottom:7px;}
373 button.btn.btn-small,input[type="submit"].btn.btn-small{*padding-top:3px;*padding-bottom:3px;}
374 button.btn.btn-mini,input[type="submit"].btn.btn-mini{*padding-top:1px;*padding-bottom:1px;}
375 .btn-link,.btn-link:active,.btn-link[disabled]{background-color:transparent;background-image:none;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;}
376 .btn-link{border-color:transparent;cursor:pointer;color:#0088cc;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}
377 .btn-link:hover{color:#005580;text-decoration:underline;background-color:transparent;}
378 .btn-link[disabled]:hover{color:#333333;text-decoration:none;}
379 [class^="icon-"],[class*=" icon-"]{display:inline-block;width:14px;height:14px;*margin-right:.3em;line-height:14px;vertical-align:text-top;background-image:url("../img/glyphicons-halflings.png");background-position:14px 14px;background-repeat:no-repeat;margin-top:1px;}
380 .icon-white,.nav-pills>.active>a>[class^="icon-"],.nav-pills>.active>a>[class*=" icon-"],.nav-list>.active>a>[class^="icon-"],.nav-list>.active>a>[class*=" icon-"],.navbar-inverse .nav>.active>a>[class^="icon-"],.navbar-inverse .nav>.active>a>[class*=" icon-"],.dropdown-menu>li>a:hover>[class^="icon-"],.dropdown-menu>li>a:hover>[class*=" icon-"],.dropdown-menu>.active>a>[class^="icon-"],.dropdown-menu>.active>a>[class*=" icon-"],.dropdown-submenu:hover>a>[class^="icon-"],.dropdown-submenu:hover>a>[class*=" icon-"]{background-image:url("../img/glyphicons-halflings-white.png");}
381 .icon-glass{background-position:0 0;}
382 .icon-music{background-position:-24px 0;}
383 .icon-search{background-position:-48px 0;}
384 .icon-envelope{background-position:-72px 0;}
385 .icon-heart{background-position:-96px 0;}
386 .icon-star{background-position:-120px 0;}
387 .icon-star-empty{background-position:-144px 0;}
388 .icon-user{background-position:-168px 0;}
389 .icon-film{background-position:-192px 0;}
390 .icon-th-large{background-position:-216px 0;}
391 .icon-th{background-position:-240px 0;}
392 .icon-th-list{background-position:-264px 0;}
393 .icon-ok{background-position:-288px 0;}
394 .icon-remove{background-position:-312px 0;}
395 .icon-zoom-in{background-position:-336px 0;}
396 .icon-zoom-out{background-position:-360px 0;}
397 .icon-off{background-position:-384px 0;}
398 .icon-signal{background-position:-408px 0;}
399 .icon-cog{background-position:-432px 0;}
400 .icon-trash{background-position:-456px 0;}
401 .icon-home{background-position:0 -24px;}
402 .icon-file{background-position:-24px -24px;}
403 .icon-time{background-position:-48px -24px;}
404 .icon-road{background-position:-72px -24px;}
405 .icon-download-alt{background-position:-96px -24px;}
406 .icon-download{background-position:-120px -24px;}
407 .icon-upload{background-position:-144px -24px;}
408 .icon-inbox{background-position:-168px -24px;}
409 .icon-play-circle{background-position:-192px -24px;}
410 .icon-repeat{background-position:-216px -24px;}
411 .icon-refresh{background-position:-240px -24px;}
412 .icon-list-alt{background-position:-264px -24px;}
413 .icon-lock{background-position:-287px -24px;}
414 .icon-flag{background-position:-312px -24px;}
415 .icon-headphones{background-position:-336px -24px;}
416 .icon-volume-off{background-position:-360px -24px;}
417 .icon-volume-down{background-position:-384px -24px;}
418 .icon-volume-up{background-position:-408px -24px;}
419 .icon-qrcode{background-position:-432px -24px;}
420 .icon-barcode{background-position:-456px -24px;}
421 .icon-tag{background-position:0 -48px;}
422 .icon-tags{background-position:-25px -48px;}
423 .icon-book{background-position:-48px -48px;}
424 .icon-bookmark{background-position:-72px -48px;}
425 .icon-print{background-position:-96px -48px;}
426 .icon-camera{background-position:-120px -48px;}
427 .icon-font{background-position:-144px -48px;}
428 .icon-bold{background-position:-167px -48px;}
429 .icon-italic{background-position:-192px -48px;}
430 .icon-text-height{background-position:-216px -48px;}
431 .icon-text-width{background-position:-240px -48px;}
432 .icon-align-left{background-position:-264px -48px;}
433 .icon-align-center{background-position:-288px -48px;}
434 .icon-align-right{background-position:-312px -48px;}
435 .icon-align-justify{background-position:-336px -48px;}
436 .icon-list{background-position:-360px -48px;}
437 .icon-indent-left{background-position:-384px -48px;}
438 .icon-indent-right{background-position:-408px -48px;}
439 .icon-facetime-video{background-position:-432px -48px;}
440 .icon-picture{background-position:-456px -48px;}
441 .icon-pencil{background-position:0 -72px;}
442 .icon-map-marker{background-position:-24px -72px;}
443 .icon-adjust{background-position:-48px -72px;}
444 .icon-tint{background-position:-72px -72px;}
445 .icon-edit{background-position:-96px -72px;}
446 .icon-share{background-position:-120px -72px;}
447 .icon-check{background-position:-144px -72px;}
448 .icon-move{background-position:-168px -72px;}
449 .icon-step-backward{background-position:-192px -72px;}
450 .icon-fast-backward{background-position:-216px -72px;}
451 .icon-backward{background-position:-240px -72px;}
452 .icon-play{background-position:-264px -72px;}
453 .icon-pause{background-position:-288px -72px;}
454 .icon-stop{background-position:-312px -72px;}
455 .icon-forward{background-position:-336px -72px;}
456 .icon-fast-forward{background-position:-360px -72px;}
457 .icon-step-forward{background-position:-384px -72px;}
458 .icon-eject{background-position:-408px -72px;}
459 .icon-chevron-left{background-position:-432px -72px;}
460 .icon-chevron-right{background-position:-456px -72px;}
461 .icon-plus-sign{background-position:0 -96px;}
462 .icon-minus-sign{background-position:-24px -96px;}
463 .icon-remove-sign{background-position:-48px -96px;}
464 .icon-ok-sign{background-position:-72px -96px;}
465 .icon-question-sign{background-position:-96px -96px;}
466 .icon-info-sign{background-position:-120px -96px;}
467 .icon-screenshot{background-position:-144px -96px;}
468 .icon-remove-circle{background-position:-168px -96px;}
469 .icon-ok-circle{background-position:-192px -96px;}
470 .icon-ban-circle{background-position:-216px -96px;}
471 .icon-arrow-left{background-position:-240px -96px;}
472 .icon-arrow-right{background-position:-264px -96px;}
473 .icon-arrow-up{background-position:-289px -96px;}
474 .icon-arrow-down{background-position:-312px -96px;}
475 .icon-share-alt{background-position:-336px -96px;}
476 .icon-resize-full{background-position:-360px -96px;}
477 .icon-resize-small{background-position:-384px -96px;}
478 .icon-plus{background-position:-408px -96px;}
479 .icon-minus{background-position:-433px -96px;}
480 .icon-asterisk{background-position:-456px -96px;}
481 .icon-exclamation-sign{background-position:0 -120px;}
482 .icon-gift{background-position:-24px -120px;}
483 .icon-leaf{background-position:-48px -120px;}
484 .icon-fire{background-position:-72px -120px;}
485 .icon-eye-open{background-position:-96px -120px;}
486 .icon-eye-close{background-position:-120px -120px;}
487 .icon-warning-sign{background-position:-144px -120px;}
488 .icon-plane{background-position:-168px -120px;}
489 .icon-calendar{background-position:-192px -120px;}
490 .icon-random{background-position:-216px -120px;width:16px;}
491 .icon-comment{background-position:-240px -120px;}
492 .icon-magnet{background-position:-264px -120px;}
493 .icon-chevron-up{background-position:-288px -120px;}
494 .icon-chevron-down{background-position:-313px -119px;}
495 .icon-retweet{background-position:-336px -120px;}
496 .icon-shopping-cart{background-position:-360px -120px;}
497 .icon-folder-close{background-position:-384px -120px;}
498 .icon-folder-open{background-position:-408px -120px;width:16px;}
499 .icon-resize-vertical{background-position:-432px -119px;}
500 .icon-resize-horizontal{background-position:-456px -118px;}
501 .icon-hdd{background-position:0 -144px;}
502 .icon-bullhorn{background-position:-24px -144px;}
503 .icon-bell{background-position:-48px -144px;}
504 .icon-certificate{background-position:-72px -144px;}
505 .icon-thumbs-up{background-position:-96px -144px;}
506 .icon-thumbs-down{background-position:-120px -144px;}
507 .icon-hand-right{background-position:-144px -144px;}
508 .icon-hand-left{background-position:-168px -144px;}
509 .icon-hand-up{background-position:-192px -144px;}
510 .icon-hand-down{background-position:-216px -144px;}
511 .icon-circle-arrow-right{background-position:-240px -144px;}
512 .icon-circle-arrow-left{background-position:-264px -144px;}
513 .icon-circle-arrow-up{background-position:-288px -144px;}
514 .icon-circle-arrow-down{background-position:-312px -144px;}
515 .icon-globe{background-position:-336px -144px;}
516 .icon-wrench{background-position:-360px -144px;}
517 .icon-tasks{background-position:-384px -144px;}
518 .icon-filter{background-position:-408px -144px;}
519 .icon-briefcase{background-position:-432px -144px;}
520 .icon-fullscreen{background-position:-456px -144px;}
521 .btn-group{position:relative;display:inline-block;*display:inline;*zoom:1;font-size:0;vertical-align:middle;white-space:nowrap;*margin-left:.3em;}.btn-group:first-child{*margin-left:0;}
522 .btn-group+.btn-group{margin-left:5px;}
523 .btn-toolbar{font-size:0;margin-top:10px;margin-bottom:10px;}.btn-toolbar>.btn+.btn,.btn-toolbar>.btn-group+.btn,.btn-toolbar>.btn+.btn-group{margin-left:5px;}
524 .btn-group>.btn{position:relative;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}
525 .btn-group>.btn+.btn{margin-left:-1px;}
526 .btn-group>.btn,.btn-group>.dropdown-menu,.btn-group>.popover{font-size:12px;}
527 .btn-group>.btn-mini{font-size:9px;}
528 .btn-group>.btn-small{font-size:10.2px;}
529 .btn-group>.btn-large{font-size:15px;}
530 .btn-group>.btn:first-child{margin-left:0;-webkit-border-top-left-radius:4px;-moz-border-radius-topleft:4px;border-top-left-radius:4px;-webkit-border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px;border-bottom-left-radius:4px;}
531 .btn-group>.btn:last-child,.btn-group>.dropdown-toggle{-webkit-border-top-right-radius:4px;-moz-border-radius-topright:4px;border-top-right-radius:4px;-webkit-border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px;border-bottom-right-radius:4px;}
532 .btn-group>.btn.large:first-child{margin-left:0;-webkit-border-top-left-radius:6px;-moz-border-radius-topleft:6px;border-top-left-radius:6px;-webkit-border-bottom-left-radius:6px;-moz-border-radius-bottomleft:6px;border-bottom-left-radius:6px;}
533 .btn-group>.btn.large:last-child,.btn-group>.large.dropdown-toggle{-webkit-border-top-right-radius:6px;-moz-border-radius-topright:6px;border-top-right-radius:6px;-webkit-border-bottom-right-radius:6px;-moz-border-radius-bottomright:6px;border-bottom-right-radius:6px;}
534 .btn-group>.btn:hover,.btn-group>.btn:focus,.btn-group>.btn:active,.btn-group>.btn.active{z-index:2;}
535 .btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0;}
536 .btn-group>.btn+.dropdown-toggle{padding-left:8px;padding-right:8px;-webkit-box-shadow:inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);box-shadow:inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);*padding-top:5px;*padding-bottom:5px;}
537 .btn-group>.btn-mini+.dropdown-toggle{padding-left:5px;padding-right:5px;*padding-top:2px;*padding-bottom:2px;}
538 .btn-group>.btn-small+.dropdown-toggle{*padding-top:5px;*padding-bottom:4px;}
539 .btn-group>.btn-large+.dropdown-toggle{padding-left:12px;padding-right:12px;*padding-top:7px;*padding-bottom:7px;}
540 .btn-group.open .dropdown-toggle{background-image:none;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);}
541 .btn-group.open .btn.dropdown-toggle{background-color:#e6e6e6;}
542 .btn-group.open .btn-primary.dropdown-toggle{background-color:#0044cc;}
543 .btn-group.open .btn-warning.dropdown-toggle{background-color:#f89406;}
544 .btn-group.open .btn-danger.dropdown-toggle{background-color:#bd362f;}
545 .btn-group.open .btn-success.dropdown-toggle{background-color:#51a351;}
546 .btn-group.open .btn-info.dropdown-toggle{background-color:#2f96b4;}
547 .btn-group.open .btn-inverse.dropdown-toggle{background-color:#222222;}
548 .btn .caret{margin-top:8px;margin-left:0;}
549 .btn-mini .caret,.btn-small .caret,.btn-large .caret{margin-top:6px;}
550 .btn-large .caret{border-left-width:5px;border-right-width:5px;border-top-width:5px;}
551 .dropup .btn-large .caret{border-bottom-width:5px;}
552 .btn-primary .caret,.btn-warning .caret,.btn-danger .caret,.btn-info .caret,.btn-success .caret,.btn-inverse .caret{border-top-color:#ffffff;border-bottom-color:#ffffff;}
553 .btn-group-vertical{display:inline-block;*display:inline;*zoom:1;}
554 .btn-group-vertical>.btn{display:block;float:none;max-width:100%;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}
555 .btn-group-vertical>.btn+.btn{margin-left:0;margin-top:-1px;}
556 .btn-group-vertical>.btn:first-child{-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0;}
557 .btn-group-vertical>.btn:last-child{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px;}
558 .btn-group-vertical>.btn-large:first-child{-webkit-border-radius:6px 6px 0 0;-moz-border-radius:6px 6px 0 0;border-radius:6px 6px 0 0;}
559 .btn-group-vertical>.btn-large:last-child{-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px;}
560 .nav{margin-left:0;margin-bottom:20px;list-style:none;}
561 .nav>li>a{display:block;}
562 .nav>li>a:hover{text-decoration:none;background-color:#eeeeee;}
563 .nav>li>a>img{max-width:none;}
564 .nav>.pull-right{float:right;}
565 .nav-header{display:block;padding:3px 15px;font-size:11px;font-weight:bold;line-height:20px;color:#999999;text-shadow:0 1px 0 rgba(255, 255, 255, 0.5);text-transform:uppercase;}
566 .nav li+.nav-header{margin-top:9px;}
567 .nav-list{padding-left:15px;padding-right:15px;margin-bottom:0;}
568 .nav-list>li>a,.nav-list .nav-header{margin-left:-15px;margin-right:-15px;text-shadow:0 1px 0 rgba(255, 255, 255, 0.5);}
569 .nav-list>li>a{padding:3px 15px;}
570 .nav-list>.active>a,.nav-list>.active>a:hover{color:#ffffff;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.2);background-color:#0088cc;}
571 .nav-list [class^="icon-"],.nav-list [class*=" icon-"]{margin-right:2px;}
572 .nav-list .divider{*width:100%;height:1px;margin:9px 1px;*margin:-5px 0 5px;overflow:hidden;background-color:#e5e5e5;border-bottom:1px solid #ffffff;}
573 .nav-tabs,.nav-pills{*zoom:1;}.nav-tabs:before,.nav-pills:before,.nav-tabs:after,.nav-pills:after{display:table;content:"";line-height:0;}
574 .nav-tabs:after,.nav-pills:after{clear:both;}
575 .nav-tabs>li,.nav-pills>li{float:left;}
576 .nav-tabs>li>a,.nav-pills>li>a{padding-right:12px;padding-left:12px;margin-right:2px;line-height:14px;}
577 .nav-tabs{border-bottom:1px solid #ddd;}
578 .nav-tabs>li{margin-bottom:-1px;}
579 .nav-tabs>li>a{padding-top:8px;padding-bottom:8px;line-height:20px;border:1px solid transparent;-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0;}.nav-tabs>li>a:hover{border-color:#eeeeee #eeeeee #dddddd;}
580 .nav-tabs>.active>a,.nav-tabs>.active>a:hover{color:#555555;background-color:#ffffff;border:1px solid #ddd;border-bottom-color:transparent;cursor:default;}
581 .nav-pills>li>a{padding-top:8px;padding-bottom:8px;margin-top:2px;margin-bottom:2px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;}
582 .nav-pills>.active>a,.nav-pills>.active>a:hover{color:#ffffff;background-color:#0088cc;}
583 .nav-stacked>li{float:none;}
584 .nav-stacked>li>a{margin-right:0;}
585 .nav-tabs.nav-stacked{border-bottom:0;}
586 .nav-tabs.nav-stacked>li>a{border:1px solid #ddd;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}
587 .nav-tabs.nav-stacked>li:first-child>a{-webkit-border-top-right-radius:4px;-moz-border-radius-topright:4px;border-top-right-radius:4px;-webkit-border-top-left-radius:4px;-moz-border-radius-topleft:4px;border-top-left-radius:4px;}
588 .nav-tabs.nav-stacked>li:last-child>a{-webkit-border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px;border-bottom-right-radius:4px;-webkit-border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px;border-bottom-left-radius:4px;}
589 .nav-tabs.nav-stacked>li>a:hover{border-color:#ddd;z-index:2;}
590 .nav-pills.nav-stacked>li>a{margin-bottom:3px;}
591 .nav-pills.nav-stacked>li:last-child>a{margin-bottom:1px;}
592 .nav-tabs .dropdown-menu{-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px;}
593 .nav-pills .dropdown-menu{-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;}
594 .nav .dropdown-toggle .caret{border-top-color:#0088cc;border-bottom-color:#0088cc;margin-top:6px;}
595 .nav .dropdown-toggle:hover .caret{border-top-color:#005580;border-bottom-color:#005580;}
596 .nav-tabs .dropdown-toggle .caret{margin-top:8px;}
597 .nav .active .dropdown-toggle .caret{border-top-color:#fff;border-bottom-color:#fff;}
598 .nav-tabs .active .dropdown-toggle .caret{border-top-color:#555555;border-bottom-color:#555555;}
599 .nav>.dropdown.active>a:hover{cursor:pointer;}
600 .nav-tabs .open .dropdown-toggle,.nav-pills .open .dropdown-toggle,.nav>li.dropdown.open.active>a:hover{color:#ffffff;background-color:#999999;border-color:#999999;}
601 .nav li.dropdown.open .caret,.nav li.dropdown.open.active .caret,.nav li.dropdown.open a:hover .caret{border-top-color:#ffffff;border-bottom-color:#ffffff;opacity:1;filter:alpha(opacity=100);}
602 .tabs-stacked .open>a:hover{border-color:#999999;}
603 .tabbable{*zoom:1;}.tabbable:before,.tabbable:after{display:table;content:"";line-height:0;}
604 .tabbable:after{clear:both;}
605 .tab-content{overflow:auto;}
606 .tabs-below>.nav-tabs,.tabs-right>.nav-tabs,.tabs-left>.nav-tabs{border-bottom:0;}
607 .tab-content>.tab-pane,.pill-content>.pill-pane{display:none;}
608 .tab-content>.active,.pill-content>.active{display:block;}
609 .tabs-below>.nav-tabs{border-top:1px solid #ddd;}
610 .tabs-below>.nav-tabs>li{margin-top:-1px;margin-bottom:0;}
611 .tabs-below>.nav-tabs>li>a{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px;}.tabs-below>.nav-tabs>li>a:hover{border-bottom-color:transparent;border-top-color:#ddd;}
612 .tabs-below>.nav-tabs>.active>a,.tabs-below>.nav-tabs>.active>a:hover{border-color:transparent #ddd #ddd #ddd;}
613 .tabs-left>.nav-tabs>li,.tabs-right>.nav-tabs>li{float:none;}
614 .tabs-left>.nav-tabs>li>a,.tabs-right>.nav-tabs>li>a{min-width:74px;margin-right:0;margin-bottom:3px;}
615 .tabs-left>.nav-tabs{float:left;margin-right:19px;border-right:1px solid #ddd;}
616 .tabs-left>.nav-tabs>li>a{margin-right:-1px;-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px;}
617 .tabs-left>.nav-tabs>li>a:hover{border-color:#eeeeee #dddddd #eeeeee #eeeeee;}
618 .tabs-left>.nav-tabs .active>a,.tabs-left>.nav-tabs .active>a:hover{border-color:#ddd transparent #ddd #ddd;*border-right-color:#ffffff;}
619 .tabs-right>.nav-tabs{float:right;margin-left:19px;border-left:1px solid #ddd;}
620 .tabs-right>.nav-tabs>li>a{margin-left:-1px;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0;}
621 .tabs-right>.nav-tabs>li>a:hover{border-color:#eeeeee #eeeeee #eeeeee #dddddd;}
622 .tabs-right>.nav-tabs .active>a,.tabs-right>.nav-tabs .active>a:hover{border-color:#ddd #ddd #ddd transparent;*border-left-color:#ffffff;}
623 .nav>.disabled>a{color:#999999;}
624 .nav>.disabled>a:hover{text-decoration:none;background-color:transparent;cursor:default;}
625 .navbar{overflow:visible;margin-bottom:20px;*position:relative;*z-index:2;}
626 .navbar-inner{min-height:40px;padding-left:20px;padding-right:20px;background-color:#fafafa;background-image:-moz-linear-gradient(top, #ffffff, #f2f2f2);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#f2f2f2));background-image:-webkit-linear-gradient(top, #ffffff, #f2f2f2);background-image:-o-linear-gradient(top, #ffffff, #f2f2f2);background-image:linear-gradient(to bottom, #ffffff, #f2f2f2);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff2f2f2', GradientType=0);border:1px solid #d4d4d4;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 1px 4px rgba(0, 0, 0, 0.065);-moz-box-shadow:0 1px 4px rgba(0, 0, 0, 0.065);box-shadow:0 1px 4px rgba(0, 0, 0, 0.065);*zoom:1;}.navbar-inner:before,.navbar-inner:after{display:table;content:"";line-height:0;}
627 .navbar-inner:after{clear:both;}
628 .navbar .container{width:auto;}
629 .nav-collapse.collapse{height:auto;overflow:visible;}
630 .navbar .brand{float:left;display:block;padding:10px 20px 10px;margin-left:-20px;font-size:20px;font-weight:200;color:#777777;text-shadow:0 1px 0 #ffffff;}.navbar .brand:hover{text-decoration:none;}
631 .navbar-text{margin-bottom:0;line-height:40px;color:#777777;}
632 .navbar-link{color:#777777;}.navbar-link:hover{color:#333333;}
633 .navbar .divider-vertical{height:40px;margin:0 9px;border-left:1px solid #f2f2f2;border-right:1px solid #ffffff;}
634 .navbar .btn,.navbar .btn-group{margin-top:5px;}
635 .navbar .btn-group .btn,.navbar .input-prepend .btn,.navbar .input-append .btn{margin-top:0;}
636 .navbar-form{margin-bottom:0;*zoom:1;}.navbar-form:before,.navbar-form:after{display:table;content:"";line-height:0;}
637 .navbar-form:after{clear:both;}
638 .navbar-form input,.navbar-form select,.navbar-form .radio,.navbar-form .checkbox{margin-top:5px;}
639 .navbar-form input,.navbar-form select,.navbar-form .btn{display:inline-block;margin-bottom:0;}
640 .navbar-form input[type="image"],.navbar-form input[type="checkbox"],.navbar-form input[type="radio"]{margin-top:3px;}
641 .navbar-form .input-append,.navbar-form .input-prepend{margin-top:5px;white-space:nowrap;}.navbar-form .input-append input,.navbar-form .input-prepend input{margin-top:0;}
642 .navbar-search{position:relative;float:left;margin-top:5px;margin-bottom:0;}.navbar-search .search-query{margin-bottom:0;padding:4px 14px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;font-weight:normal;line-height:1;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px;}
643 .navbar-static-top{position:static;margin-bottom:0;}.navbar-static-top .navbar-inner{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}
644 .navbar-fixed-top,.navbar-fixed-bottom{position:fixed;right:0;left:0;z-index:1030;margin-bottom:0;}
645 .navbar-fixed-top .navbar-inner,.navbar-static-top .navbar-inner{border-width:0 0 1px;}
646 .navbar-fixed-bottom .navbar-inner{border-width:1px 0 0;}
647 .navbar-fixed-top .navbar-inner,.navbar-fixed-bottom .navbar-inner{padding-left:0;padding-right:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}
648 .navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:940px;}
649 .navbar-fixed-top{top:0;}
650 .navbar-fixed-top .navbar-inner,.navbar-static-top .navbar-inner{-webkit-box-shadow:0 1px 10px rgba(0,0,0,.1);-moz-box-shadow:0 1px 10px rgba(0,0,0,.1);box-shadow:0 1px 10px rgba(0,0,0,.1);}
651 .navbar-fixed-bottom{bottom:0;}.navbar-fixed-bottom .navbar-inner{-webkit-box-shadow:0 -1px 10px rgba(0,0,0,.1);-moz-box-shadow:0 -1px 10px rgba(0,0,0,.1);box-shadow:0 -1px 10px rgba(0,0,0,.1);}
652 .navbar .nav{position:relative;left:0;display:block;float:left;margin:0 10px 0 0;}
653 .navbar .nav.pull-right{float:right;margin-right:0;}
654 .navbar .nav>li{float:left;}
655 .navbar .nav>li>a{float:none;padding:10px 15px 10px;color:#777777;text-decoration:none;text-shadow:0 1px 0 #ffffff;}
656 .navbar .nav .dropdown-toggle .caret{margin-top:8px;}
657 .navbar .nav>li>a:focus,.navbar .nav>li>a:hover{background-color:transparent;color:#333333;text-decoration:none;}
658 .navbar .nav>.active>a,.navbar .nav>.active>a:hover,.navbar .nav>.active>a:focus{color:#555555;text-decoration:none;background-color:#e5e5e5;-webkit-box-shadow:inset 0 3px 8px rgba(0, 0, 0, 0.125);-moz-box-shadow:inset 0 3px 8px rgba(0, 0, 0, 0.125);box-shadow:inset 0 3px 8px rgba(0, 0, 0, 0.125);}
659 .navbar .btn-navbar{display:none;float:right;padding:7px 10px;margin-left:5px;margin-right:5px;color:#ffffff;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);background-color:#ededed;background-image:-moz-linear-gradient(top, #f2f2f2, #e5e5e5);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#f2f2f2), to(#e5e5e5));background-image:-webkit-linear-gradient(top, #f2f2f2, #e5e5e5);background-image:-o-linear-gradient(top, #f2f2f2, #e5e5e5);background-image:linear-gradient(to bottom, #f2f2f2, #e5e5e5);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2f2f2', endColorstr='#ffe5e5e5', GradientType=0);border-color:#e5e5e5 #e5e5e5 #bfbfbf;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);*background-color:#e5e5e5;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.075);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.075);box-shadow:inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.075);}.navbar .btn-navbar:hover,.navbar .btn-navbar:active,.navbar .btn-navbar.active,.navbar .btn-navbar.disabled,.navbar .btn-navbar[disabled]{color:#ffffff;background-color:#e5e5e5;*background-color:#d9d9d9;}
660 .navbar .btn-navbar:active,.navbar .btn-navbar.active{background-color:#cccccc \9;}
661 .navbar .btn-navbar .icon-bar{display:block;width:18px;height:2px;background-color:#f5f5f5;-webkit-border-radius:1px;-moz-border-radius:1px;border-radius:1px;-webkit-box-shadow:0 1px 0 rgba(0, 0, 0, 0.25);-moz-box-shadow:0 1px 0 rgba(0, 0, 0, 0.25);box-shadow:0 1px 0 rgba(0, 0, 0, 0.25);}
662 .btn-navbar .icon-bar+.icon-bar{margin-top:3px;}
663 .navbar .nav>li>.dropdown-menu:before{content:'';display:inline-block;border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-bottom-color:rgba(0, 0, 0, 0.2);position:absolute;top:-7px;left:9px;}
664 .navbar .nav>li>.dropdown-menu:after{content:'';display:inline-block;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #ffffff;position:absolute;top:-6px;left:10px;}
665 .navbar-fixed-bottom .nav>li>.dropdown-menu:before{border-top:7px solid #ccc;border-top-color:rgba(0, 0, 0, 0.2);border-bottom:0;bottom:-7px;top:auto;}
666 .navbar-fixed-bottom .nav>li>.dropdown-menu:after{border-top:6px solid #ffffff;border-bottom:0;bottom:-6px;top:auto;}
667 .navbar .nav li.dropdown>a:hover .caret{border-top-color:#555555;border-bottom-color:#555555;}
668 .navbar .nav li.dropdown.open>.dropdown-toggle,.navbar .nav li.dropdown.active>.dropdown-toggle,.navbar .nav li.dropdown.open.active>.dropdown-toggle{background-color:#e5e5e5;color:#555555;}
669 .navbar .nav li.dropdown>.dropdown-toggle .caret{border-top-color:#777777;border-bottom-color:#777777;}
670 .navbar .nav li.dropdown.open>.dropdown-toggle .caret,.navbar .nav li.dropdown.active>.dropdown-toggle .caret,.navbar .nav li.dropdown.open.active>.dropdown-toggle .caret{border-top-color:#555555;border-bottom-color:#555555;}
671 .navbar .pull-right>li>.dropdown-menu,.navbar .nav>li>.dropdown-menu.pull-right{left:auto;right:0;}.navbar .pull-right>li>.dropdown-menu:before,.navbar .nav>li>.dropdown-menu.pull-right:before{left:auto;right:12px;}
672 .navbar .pull-right>li>.dropdown-menu:after,.navbar .nav>li>.dropdown-menu.pull-right:after{left:auto;right:13px;}
673 .navbar .pull-right>li>.dropdown-menu .dropdown-menu,.navbar .nav>li>.dropdown-menu.pull-right .dropdown-menu{left:auto;right:100%;margin-left:0;margin-right:-1px;-webkit-border-radius:6px 0 6px 6px;-moz-border-radius:6px 0 6px 6px;border-radius:6px 0 6px 6px;}
674 .navbar-inverse .navbar-inner{background-color:#1b1b1b;background-image:-moz-linear-gradient(top, #222222, #111111);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#222222), to(#111111));background-image:-webkit-linear-gradient(top, #222222, #111111);background-image:-o-linear-gradient(top, #222222, #111111);background-image:linear-gradient(to bottom, #222222, #111111);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff222222', endColorstr='#ff111111', GradientType=0);border-color:#252525;}
675 .navbar-inverse .brand,.navbar-inverse .nav>li>a{color:#999999;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);}.navbar-inverse .brand:hover,.navbar-inverse .nav>li>a:hover{color:#ffffff;}
676 .navbar-inverse .brand{color:#999999;}
677 .navbar-inverse .navbar-text{color:#999999;}
678 .navbar-inverse .nav>li>a:focus,.navbar-inverse .nav>li>a:hover{background-color:transparent;color:#ffffff;}
679 .navbar-inverse .nav .active>a,.navbar-inverse .nav .active>a:hover,.navbar-inverse .nav .active>a:focus{color:#ffffff;background-color:#111111;}
680 .navbar-inverse .navbar-link{color:#999999;}.navbar-inverse .navbar-link:hover{color:#ffffff;}
681 .navbar-inverse .divider-vertical{border-left-color:#111111;border-right-color:#222222;}
682 .navbar-inverse .nav li.dropdown.open>.dropdown-toggle,.navbar-inverse .nav li.dropdown.active>.dropdown-toggle,.navbar-inverse .nav li.dropdown.open.active>.dropdown-toggle{background-color:#111111;color:#ffffff;}
683 .navbar-inverse .nav li.dropdown>a:hover .caret{border-top-color:#ffffff;border-bottom-color:#ffffff;}
684 .navbar-inverse .nav li.dropdown>.dropdown-toggle .caret{border-top-color:#999999;border-bottom-color:#999999;}
685 .navbar-inverse .nav li.dropdown.open>.dropdown-toggle .caret,.navbar-inverse .nav li.dropdown.active>.dropdown-toggle .caret,.navbar-inverse .nav li.dropdown.open.active>.dropdown-toggle .caret{border-top-color:#ffffff;border-bottom-color:#ffffff;}
686 .navbar-inverse .navbar-search .search-query{color:#ffffff;background-color:#515151;border-color:#111111;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0 rgba(255,255,255,.15);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0 rgba(255,255,255,.15);box-shadow:inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0 rgba(255,255,255,.15);-webkit-transition:none;-moz-transition:none;-o-transition:none;transition:none;}.navbar-inverse .navbar-search .search-query:-moz-placeholder{color:#cccccc;}
687 .navbar-inverse .navbar-search .search-query:-ms-input-placeholder{color:#cccccc;}
688 .navbar-inverse .navbar-search .search-query::-webkit-input-placeholder{color:#cccccc;}
689 .navbar-inverse .navbar-search .search-query:focus,.navbar-inverse .navbar-search .search-query.focused{padding:5px 15px;color:#333333;text-shadow:0 1px 0 #ffffff;background-color:#ffffff;border:0;-webkit-box-shadow:0 0 3px rgba(0, 0, 0, 0.15);-moz-box-shadow:0 0 3px rgba(0, 0, 0, 0.15);box-shadow:0 0 3px rgba(0, 0, 0, 0.15);outline:0;}
690 .navbar-inverse .btn-navbar{color:#ffffff;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);background-color:#0e0e0e;background-image:-moz-linear-gradient(top, #151515, #040404);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#151515), to(#040404));background-image:-webkit-linear-gradient(top, #151515, #040404);background-image:-o-linear-gradient(top, #151515, #040404);background-image:linear-gradient(to bottom, #151515, #040404);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff151515', endColorstr='#ff040404', GradientType=0);border-color:#040404 #040404 #000000;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);*background-color:#040404;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);}.navbar-inverse .btn-navbar:hover,.navbar-inverse .btn-navbar:active,.navbar-inverse .btn-navbar.active,.navbar-inverse .btn-navbar.disabled,.navbar-inverse .btn-navbar[disabled]{color:#ffffff;background-color:#040404;*background-color:#000000;}
691 .navbar-inverse .btn-navbar:active,.navbar-inverse .btn-navbar.active{background-color:#000000 \9;}
692 .breadcrumb{padding:8px 15px;margin:0 0 20px;list-style:none;background-color:#f5f5f5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}.breadcrumb>li{display:inline-block;*display:inline;*zoom:1;text-shadow:0 1px 0 #ffffff;}.breadcrumb>li>.divider{padding:0 5px;color:#ccc;}
693 .breadcrumb>.active{color:#999999;}
694 .pagination{margin:20px 0;}
695 .pagination ul{display:inline-block;*display:inline;*zoom:1;margin-left:0;margin-bottom:0;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:0 1px 2px rgba(0, 0, 0, 0.05);}
696 .pagination ul>li{display:inline;}
697 .pagination ul>li>a,.pagination ul>li>span{float:left;padding:4px 12px;line-height:20px;text-decoration:none;background-color:#ffffff;border:1px solid #dddddd;border-left-width:0;}
698 .pagination ul>li>a:hover,.pagination ul>.active>a,.pagination ul>.active>span{background-color:#f5f5f5;}
699 .pagination ul>.active>a,.pagination ul>.active>span{color:#999999;cursor:default;}
700 .pagination ul>.disabled>span,.pagination ul>.disabled>a,.pagination ul>.disabled>a:hover{color:#999999;background-color:transparent;cursor:default;}
701 .pagination ul>li:first-child>a,.pagination ul>li:first-child>span{border-left-width:1px;-webkit-border-top-left-radius:4px;-moz-border-radius-topleft:4px;border-top-left-radius:4px;-webkit-border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px;border-bottom-left-radius:4px;}
702 .pagination ul>li:last-child>a,.pagination ul>li:last-child>span{-webkit-border-top-right-radius:4px;-moz-border-radius-topright:4px;border-top-right-radius:4px;-webkit-border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px;border-bottom-right-radius:4px;}
703 .pagination-centered{text-align:center;}
704 .pagination-right{text-align:right;}
705 .pagination-large ul>li>a,.pagination-large ul>li>span{padding:11px 19px;font-size:15px;}
706 .pagination-large ul>li:first-child>a,.pagination-large ul>li:first-child>span{-webkit-border-top-left-radius:6px;-moz-border-radius-topleft:6px;border-top-left-radius:6px;-webkit-border-bottom-left-radius:6px;-moz-border-radius-bottomleft:6px;border-bottom-left-radius:6px;}
707 .pagination-large ul>li:last-child>a,.pagination-large ul>li:last-child>span{-webkit-border-top-right-radius:6px;-moz-border-radius-topright:6px;border-top-right-radius:6px;-webkit-border-bottom-right-radius:6px;-moz-border-radius-bottomright:6px;border-bottom-right-radius:6px;}
708 .pagination-mini ul>li:first-child>a,.pagination-small ul>li:first-child>a,.pagination-mini ul>li:first-child>span,.pagination-small ul>li:first-child>span{-webkit-border-top-left-radius:3px;-moz-border-radius-topleft:3px;border-top-left-radius:3px;-webkit-border-bottom-left-radius:3px;-moz-border-radius-bottomleft:3px;border-bottom-left-radius:3px;}
709 .pagination-mini ul>li:last-child>a,.pagination-small ul>li:last-child>a,.pagination-mini ul>li:last-child>span,.pagination-small ul>li:last-child>span{-webkit-border-top-right-radius:3px;-moz-border-radius-topright:3px;border-top-right-radius:3px;-webkit-border-bottom-right-radius:3px;-moz-border-radius-bottomright:3px;border-bottom-right-radius:3px;}
710 .pagination-small ul>li>a,.pagination-small ul>li>span{padding:2px 10px;font-size:10.2px;}
711 .pagination-mini ul>li>a,.pagination-mini ul>li>span{padding:0 6px;font-size:9px;}
712 .pager{margin:20px 0;list-style:none;text-align:center;*zoom:1;}.pager:before,.pager:after{display:table;content:"";line-height:0;}
713 .pager:after{clear:both;}
714 .pager li{display:inline;}
715 .pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px;}
716 .pager li>a:hover{text-decoration:none;background-color:#f5f5f5;}
717 .pager .next>a,.pager .next>span{float:right;}
718 .pager .previous>a,.pager .previous>span{float:left;}
719 .pager .disabled>a,.pager .disabled>a:hover,.pager .disabled>span{color:#999999;background-color:#fff;cursor:default;}
720 .thumbnails{margin-left:-20px;list-style:none;*zoom:1;}.thumbnails:before,.thumbnails:after{display:table;content:"";line-height:0;}
721 .thumbnails:after{clear:both;}
722 .row-fluid .thumbnails{margin-left:0;}
723 .thumbnails>li{float:left;margin-bottom:20px;margin-left:20px;}
724 .thumbnail{display:block;padding:4px;line-height:20px;border:1px solid #ddd;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 1px 3px rgba(0, 0, 0, 0.055);-moz-box-shadow:0 1px 3px rgba(0, 0, 0, 0.055);box-shadow:0 1px 3px rgba(0, 0, 0, 0.055);-webkit-transition:all 0.2s ease-in-out;-moz-transition:all 0.2s ease-in-out;-o-transition:all 0.2s ease-in-out;transition:all 0.2s ease-in-out;}
725 a.thumbnail:hover{border-color:#0088cc;-webkit-box-shadow:0 1px 4px rgba(0, 105, 214, 0.25);-moz-box-shadow:0 1px 4px rgba(0, 105, 214, 0.25);box-shadow:0 1px 4px rgba(0, 105, 214, 0.25);}
726 .thumbnail>img{display:block;max-width:100%;margin-left:auto;margin-right:auto;}
727 .thumbnail .caption{padding:9px;color:#555555;}
728 .alert{padding:8px 35px 8px 14px;margin-bottom:20px;text-shadow:0 1px 0 rgba(255, 255, 255, 0.5);background-color:#fcf8e3;border:1px solid #fbeed5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}
729 .alert,.alert h4{color:#c09853;}
730 .alert h4{margin:0;}
731 .alert .close{position:relative;top:-2px;right:-21px;line-height:20px;}
732 .alert-success{background-color:#dff0d8;border-color:#d6e9c6;color:#468847;}
733 .alert-success h4{color:#468847;}
734 .alert-danger,.alert-error{background-color:#f2dede;border-color:#eed3d7;color:#b94a48;}
735 .alert-danger h4,.alert-error h4{color:#b94a48;}
736 .alert-info{background-color:#d9edf7;border-color:#bce8f1;color:#3a87ad;}
737 .alert-info h4{color:#3a87ad;}
738 .alert-block{padding-top:14px;padding-bottom:14px;}
739 .alert-block>p,.alert-block>ul{margin-bottom:0;}
740 .alert-block p+p{margin-top:5px;}
741 @-webkit-keyframes progress-bar-stripes{from{background-position:40px 0;} to{background-position:0 0;}}@-moz-keyframes progress-bar-stripes{from{background-position:40px 0;} to{background-position:0 0;}}@-ms-keyframes progress-bar-stripes{from{background-position:40px 0;} to{background-position:0 0;}}@-o-keyframes progress-bar-stripes{from{background-position:0 0;} to{background-position:40px 0;}}@keyframes progress-bar-stripes{from{background-position:40px 0;} to{background-position:0 0;}}.progress{overflow:hidden;height:20px;margin-bottom:20px;background-color:#f7f7f7;background-image:-moz-linear-gradient(top, #f5f5f5, #f9f9f9);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#f5f5f5), to(#f9f9f9));background-image:-webkit-linear-gradient(top, #f5f5f5, #f9f9f9);background-image:-o-linear-gradient(top, #f5f5f5, #f9f9f9);background-image:linear-gradient(to bottom, #f5f5f5, #f9f9f9);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#fff9f9f9', GradientType=0);-webkit-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1);-moz-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1);box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}
742 .progress .bar{width:0%;height:100%;color:#ffffff;float:left;font-size:12px;text-align:center;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);background-color:#0e90d2;background-image:-moz-linear-gradient(top, #149bdf, #0480be);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#149bdf), to(#0480be));background-image:-webkit-linear-gradient(top, #149bdf, #0480be);background-image:-o-linear-gradient(top, #149bdf, #0480be);background-image:linear-gradient(to bottom, #149bdf, #0480be);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff149bdf', endColorstr='#ff0480be', GradientType=0);-webkit-box-shadow:inset 0 -1px 0 rgba(0, 0, 0, 0.15);-moz-box-shadow:inset 0 -1px 0 rgba(0, 0, 0, 0.15);box-shadow:inset 0 -1px 0 rgba(0, 0, 0, 0.15);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-transition:width 0.6s ease;-moz-transition:width 0.6s ease;-o-transition:width 0.6s ease;transition:width 0.6s ease;}
743 .progress .bar+.bar{-webkit-box-shadow:inset 1px 0 0 rgba(0,0,0,.15), inset 0 -1px 0 rgba(0,0,0,.15);-moz-box-shadow:inset 1px 0 0 rgba(0,0,0,.15), inset 0 -1px 0 rgba(0,0,0,.15);box-shadow:inset 1px 0 0 rgba(0,0,0,.15), inset 0 -1px 0 rgba(0,0,0,.15);}
744 .progress-striped .bar{background-color:#149bdf;background-image:-webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));background-image:-webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);-webkit-background-size:40px 40px;-moz-background-size:40px 40px;-o-background-size:40px 40px;background-size:40px 40px;}
745 .progress.active .bar{-webkit-animation:progress-bar-stripes 2s linear infinite;-moz-animation:progress-bar-stripes 2s linear infinite;-ms-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite;}
746 .progress-danger .bar,.progress .bar-danger{background-color:#dd514c;background-image:-moz-linear-gradient(top, #ee5f5b, #c43c35);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#c43c35));background-image:-webkit-linear-gradient(top, #ee5f5b, #c43c35);background-image:-o-linear-gradient(top, #ee5f5b, #c43c35);background-image:linear-gradient(to bottom, #ee5f5b, #c43c35);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffc43c35', GradientType=0);}
747 .progress-danger.progress-striped .bar,.progress-striped .bar-danger{background-color:#ee5f5b;background-image:-webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));background-image:-webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);}
748 .progress-success .bar,.progress .bar-success{background-color:#5eb95e;background-image:-moz-linear-gradient(top, #62c462, #57a957);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#57a957));background-image:-webkit-linear-gradient(top, #62c462, #57a957);background-image:-o-linear-gradient(top, #62c462, #57a957);background-image:linear-gradient(to bottom, #62c462, #57a957);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff57a957', GradientType=0);}
749 .progress-success.progress-striped .bar,.progress-striped .bar-success{background-color:#62c462;background-image:-webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));background-image:-webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);}
750 .progress-info .bar,.progress .bar-info{background-color:#4bb1cf;background-image:-moz-linear-gradient(top, #5bc0de, #339bb9);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#339bb9));background-image:-webkit-linear-gradient(top, #5bc0de, #339bb9);background-image:-o-linear-gradient(top, #5bc0de, #339bb9);background-image:linear-gradient(to bottom, #5bc0de, #339bb9);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff339bb9', GradientType=0);}
751 .progress-info.progress-striped .bar,.progress-striped .bar-info{background-color:#5bc0de;background-image:-webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));background-image:-webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);}
752 .progress-warning .bar,.progress .bar-warning{background-color:#faa732;background-image:-moz-linear-gradient(top, #fbb450, #f89406);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406));background-image:-webkit-linear-gradient(top, #fbb450, #f89406);background-image:-o-linear-gradient(top, #fbb450, #f89406);background-image:linear-gradient(to bottom, #fbb450, #f89406);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450', endColorstr='#fff89406', GradientType=0);}
753 .progress-warning.progress-striped .bar,.progress-striped .bar-warning{background-color:#fbb450;background-image:-webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));background-image:-webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);}
754 .hero-unit{padding:60px;margin-bottom:30px;font-size:18px;font-weight:200;line-height:30px;color:inherit;background-color:#eeeeee;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;}.hero-unit h1{margin-bottom:0;font-size:60px;line-height:1;color:inherit;letter-spacing:-1px;}
755 .hero-unit li{line-height:30px;}
756 .media,.media-body{overflow:hidden;*overflow:visible;zoom:1;}
757 .media,.media .media{margin-top:15px;}
758 .media:first-child{margin-top:0;}
759 .media-object{display:block;}
760 .media-heading{margin:0 0 5px;}
761 .media .pull-left{margin-right:10px;}
762 .media .pull-right{margin-left:10px;}
763 .media-list{margin-left:0;list-style:none;}
764 .tooltip{position:absolute;z-index:1030;display:block;visibility:visible;padding:5px;font-size:11px;opacity:0;filter:alpha(opacity=0);}.tooltip.in{opacity:0.8;filter:alpha(opacity=80);}
765 .tooltip.top{margin-top:-3px;}
766 .tooltip.right{margin-left:3px;}
767 .tooltip.bottom{margin-top:3px;}
768 .tooltip.left{margin-left:-3px;}
769 .tooltip-inner{max-width:200px;padding:3px 8px;color:#ffffff;text-align:center;text-decoration:none;background-color:#000000;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}
770 .tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid;}
771 .tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000000;}
772 .tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000000;}
773 .tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000000;}
774 .tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000000;}
775 .popover{position:absolute;top:0;left:0;z-index:1010;display:none;width:236px;padding:1px;text-align:left;background-color:#ffffff;-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0, 0, 0, 0.2);-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);-moz-box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);white-space:normal;}.popover.top{margin-top:-10px;}
776 .popover.right{margin-left:10px;}
777 .popover.bottom{margin-top:10px;}
778 .popover.left{margin-left:-10px;}
779 .popover-title{margin:0;padding:8px 14px;font-size:14px;font-weight:normal;line-height:18px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;-webkit-border-radius:5px 5px 0 0;-moz-border-radius:5px 5px 0 0;border-radius:5px 5px 0 0;}
780 .popover-content{padding:9px 14px;}
781 .popover .arrow,.popover .arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid;}
782 .popover .arrow{border-width:11px;}
783 .popover .arrow:after{border-width:10px;content:"";}
784 .popover.top .arrow{left:50%;margin-left:-11px;border-bottom-width:0;border-top-color:#999;border-top-color:rgba(0, 0, 0, 0.25);bottom:-11px;}.popover.top .arrow:after{bottom:1px;margin-left:-10px;border-bottom-width:0;border-top-color:#ffffff;}
785 .popover.right .arrow{top:50%;left:-11px;margin-top:-11px;border-left-width:0;border-right-color:#999;border-right-color:rgba(0, 0, 0, 0.25);}.popover.right .arrow:after{left:1px;bottom:-10px;border-left-width:0;border-right-color:#ffffff;}
786 .popover.bottom .arrow{left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0, 0, 0, 0.25);top:-11px;}.popover.bottom .arrow:after{top:1px;margin-left:-10px;border-top-width:0;border-bottom-color:#ffffff;}
787 .popover.left .arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0, 0, 0, 0.25);}.popover.left .arrow:after{right:1px;border-right-width:0;border-left-color:#ffffff;bottom:-10px;}
788 .modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000000;}.modal-backdrop.fade{opacity:0;}
789 .modal-backdrop,.modal-backdrop.fade.in{opacity:0.8;filter:alpha(opacity=80);}
790 .modal{position:fixed;top:10%;left:50%;z-index:1050;width:560px;margin-left:-280px;background-color:#ffffff;border:1px solid #999;border:1px solid rgba(0, 0, 0, 0.3);*border:1px solid #999;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);-moz-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box;outline:none;}.modal.fade{-webkit-transition:opacity .3s linear, top .3s ease-out;-moz-transition:opacity .3s linear, top .3s ease-out;-o-transition:opacity .3s linear, top .3s ease-out;transition:opacity .3s linear, top .3s ease-out;top:-25%;}
791 .modal.fade.in{top:10%;}
792 .modal-header{padding:9px 15px;border-bottom:1px solid #eee;}.modal-header .close{margin-top:2px;}
793 .modal-header h3{margin:0;line-height:30px;}
794 .modal-body{position:relative;overflow-y:auto;max-height:400px;padding:15px;}
795 .modal-form{margin-bottom:0;}
796 .modal-footer{padding:14px 15px 15px;margin-bottom:0;text-align:right;background-color:#f5f5f5;border-top:1px solid #ddd;-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px;-webkit-box-shadow:inset 0 1px 0 #ffffff;-moz-box-shadow:inset 0 1px 0 #ffffff;box-shadow:inset 0 1px 0 #ffffff;*zoom:1;}.modal-footer:before,.modal-footer:after{display:table;content:"";line-height:0;}
797 .modal-footer:after{clear:both;}
798 .modal-footer .btn+.btn{margin-left:5px;margin-bottom:0;}
799 .modal-footer .btn-group .btn+.btn{margin-left:-1px;}
800 .modal-footer .btn-block+.btn-block{margin-left:0;}
801 .dropup,.dropdown{position:relative;}
802 .dropdown-toggle{*margin-bottom:-3px;}
803 .dropdown-toggle:active,.open .dropdown-toggle{outline:0;}
804 .caret{display:inline-block;width:0;height:0;vertical-align:top;border-top:4px solid #000000;border-right:4px solid transparent;border-left:4px solid transparent;content:"";}
805 .dropdown .caret{margin-top:8px;margin-left:2px;}
806 .dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;list-style:none;background-color:#ffffff;border:1px solid #ccc;border:1px solid rgba(0, 0, 0, 0.2);*border-right-width:2px;*border-bottom-width:2px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);-moz-box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box;}.dropdown-menu.pull-right{right:0;left:auto;}
807 .dropdown-menu .divider{*width:100%;height:1px;margin:9px 1px;*margin:-5px 0 5px;overflow:hidden;background-color:#e5e5e5;border-bottom:1px solid #ffffff;}
808 .dropdown-menu li>a{display:block;padding:3px 20px;clear:both;font-weight:normal;line-height:20px;color:#333333;white-space:nowrap;}
809 .dropdown-menu li>a:hover,.dropdown-menu li>a:focus,.dropdown-submenu:hover>a{text-decoration:none;color:#ffffff;background-color:#0081c2;background-image:-moz-linear-gradient(top, #0088cc, #0077b3);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0077b3));background-image:-webkit-linear-gradient(top, #0088cc, #0077b3);background-image:-o-linear-gradient(top, #0088cc, #0077b3);background-image:linear-gradient(to bottom, #0088cc, #0077b3);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0);}
810 .dropdown-menu .active>a,.dropdown-menu .active>a:hover{color:#ffffff;text-decoration:none;outline:0;background-color:#0081c2;background-image:-moz-linear-gradient(top, #0088cc, #0077b3);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0077b3));background-image:-webkit-linear-gradient(top, #0088cc, #0077b3);background-image:-o-linear-gradient(top, #0088cc, #0077b3);background-image:linear-gradient(to bottom, #0088cc, #0077b3);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0);}
811 .dropdown-menu .disabled>a,.dropdown-menu .disabled>a:hover{color:#999999;}
812 .dropdown-menu .disabled>a:hover{text-decoration:none;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);cursor:default;}
813 .open{*z-index:1000;}.open >.dropdown-menu{display:block;}
814 .pull-right>.dropdown-menu{right:0;left:auto;}
815 .dropup .caret,.navbar-fixed-bottom .dropdown .caret{border-top:0;border-bottom:4px solid #000000;content:"";}
816 .dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:1px;}
817 .dropdown-submenu{position:relative;}
818 .dropdown-submenu>.dropdown-menu{top:0;left:100%;margin-top:-6px;margin-left:-1px;-webkit-border-radius:0 6px 6px 6px;-moz-border-radius:0 6px 6px 6px;border-radius:0 6px 6px 6px;}
819 .dropdown-submenu:hover>.dropdown-menu{display:block;}
820 .dropup .dropdown-submenu>.dropdown-menu{top:auto;bottom:0;margin-top:0;margin-bottom:-2px;-webkit-border-radius:5px 5px 5px 0;-moz-border-radius:5px 5px 5px 0;border-radius:5px 5px 5px 0;}
821 .dropdown-submenu>a:after{display:block;content:" ";float:right;width:0;height:0;border-color:transparent;border-style:solid;border-width:5px 0 5px 5px;border-left-color:#cccccc;margin-top:5px;margin-right:-10px;}
822 .dropdown-submenu:hover>a:after{border-left-color:#ffffff;}
823 .dropdown-submenu.pull-left{float:none;}.dropdown-submenu.pull-left>.dropdown-menu{left:-100%;margin-left:10px;-webkit-border-radius:6px 0 6px 6px;-moz-border-radius:6px 0 6px 6px;border-radius:6px 0 6px 6px;}
824 .dropdown .dropdown-menu .nav-header{padding-left:20px;padding-right:20px;}
825 .typeahead{z-index:1051;margin-top:2px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}
826 .accordion{margin-bottom:20px;}
827 .accordion-group{margin-bottom:2px;border:1px solid #e5e5e5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}
828 .accordion-heading{border-bottom:0;}
829 .accordion-heading .accordion-toggle{display:block;padding:8px 15px;}
830 .accordion-toggle{cursor:pointer;}
831 .accordion-inner{padding:9px 15px;border-top:1px solid #e5e5e5;}
832 .carousel{position:relative;margin-bottom:20px;line-height:1;}
833 .carousel-inner{overflow:hidden;width:100%;position:relative;}
834 .carousel-inner>.item{display:none;position:relative;-webkit-transition:0.6s ease-in-out left;-moz-transition:0.6s ease-in-out left;-o-transition:0.6s ease-in-out left;transition:0.6s ease-in-out left;}
835 .carousel-inner>.item>img{display:block;line-height:1;}
836 .carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block;}
837 .carousel-inner>.active{left:0;}
838 .carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%;}
839 .carousel-inner>.next{left:100%;}
840 .carousel-inner>.prev{left:-100%;}
841 .carousel-inner>.next.left,.carousel-inner>.prev.right{left:0;}
842 .carousel-inner>.active.left{left:-100%;}
843 .carousel-inner>.active.right{left:100%;}
844 .carousel-control{position:absolute;top:40%;left:15px;width:40px;height:40px;margin-top:-20px;font-size:60px;font-weight:100;line-height:30px;color:#ffffff;text-align:center;background:#222222;border:3px solid #ffffff;-webkit-border-radius:23px;-moz-border-radius:23px;border-radius:23px;opacity:0.5;filter:alpha(opacity=50);}.carousel-control.right{left:auto;right:15px;}
845 .carousel-control:hover{color:#ffffff;text-decoration:none;opacity:0.9;filter:alpha(opacity=90);}
846 .carousel-caption{position:absolute;left:0;right:0;bottom:0;padding:15px;background:#333333;background:rgba(0, 0, 0, 0.75);}
847 .carousel-caption h4,.carousel-caption p{color:#ffffff;line-height:20px;}
848 .carousel-caption h4{margin:0 0 5px;}
849 .carousel-caption p{margin-bottom:0;}
850 .well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.05);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.05);}.well blockquote{border-color:#ddd;border-color:rgba(0, 0, 0, 0.15);}
851 .well-large{padding:24px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;}
852 .well-small{padding:9px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}
853 .close{float:right;font-size:20px;font-weight:bold;line-height:20px;color:#000000;text-shadow:0 1px 0 #ffffff;opacity:0.2;filter:alpha(opacity=20);}.close:hover{color:#000000;text-decoration:none;cursor:pointer;opacity:0.4;filter:alpha(opacity=40);}
854 button.close{padding:0;cursor:pointer;background:transparent;border:0;-webkit-appearance:none;}
855 .pull-right{float:right;}
856 .pull-left{float:left;}
857 .hide{display:none;}
858 .show{display:block;}
859 .invisible{visibility:hidden;}
860 .affix{position:fixed;}
861 .fade{opacity:0;-webkit-transition:opacity 0.15s linear;-moz-transition:opacity 0.15s linear;-o-transition:opacity 0.15s linear;transition:opacity 0.15s linear;}.fade.in{opacity:1;}
862 .collapse{position:relative;height:0;overflow:hidden;-webkit-transition:height 0.35s ease;-moz-transition:height 0.35s ease;-o-transition:height 0.35s ease;transition:height 0.35s ease;}.collapse.in{height:auto;}
863
forum/static/css/codehilite.css
File was created 1 /*
2 * from http://pygments.org/ style=default
3 */
4 .codehilite .hll {
5 background-color: #ffffcc; }
6
7 .codehilite {
8 background: #f8f8f8; }
9
10 .codehilite .c {
11 color: #408080;
12 font-style: italic; }
13
14 /* Comment */
15 .codehilite .err {
16 border: 1px solid #FF0000; }
17
18 /* Error */
19 .codehilite .k {
20 color: #008000;
21 font-weight: bold; }
22
23 /* Keyword */
24 .codehilite .o {
25 color: #666666; }
26
27 /* Operator */
28 .codehilite .cm {
29 color: #408080;
30 font-style: italic; }
31
32 /* Comment.Multiline */
33 .codehilite .cp {
34 color: #BC7A00; }
35
36 /* Comment.Preproc */
37 .codehilite .c1 {
38 color: #408080;
39 font-style: italic; }
40
41 /* Comment.Single */
42 .codehilite .cs {
43 color: #408080;
44 font-style: italic; }
45
46 /* Comment.Special */
47 .codehilite .gd {
48 color: #A00000; }
49
50 /* Generic.Deleted */
51 .codehilite .ge {
52 font-style: italic; }
53
54 /* Generic.Emph */
55 .codehilite .gr {
56 color: #FF0000; }
57
58 /* Generic.Error */
59 .codehilite .gh {
60 color: #000080;
61 font-weight: bold; }
62
63 /* Generic.Heading */
64 .codehilite .gi {
65 color: #00A000; }
66
67 /* Generic.Inserted */
68 .codehilite .go {
69 color: #808080; }
70
71 /* Generic.Output */
72 .codehilite .gp {
73 color: #000080;
74 font-weight: bold; }
75
76 /* Generic.Prompt */
77 .codehilite .gs {
78 font-weight: bold; }
79
80 /* Generic.Strong */
81 .codehilite .gu {
82 color: #800080;
83 font-weight: bold; }
84
85 /* Generic.Subheading */
86 .codehilite .gt {
87 color: #0040D0; }
88
89 /* Generic.Traceback */
90 .codehilite .kc {
91 color: #008000;
92 font-weight: bold; }
93
94 /* Keyword.Constant */
95 .codehilite .kd {
96 color: #008000;
97 font-weight: bold; }
98
99 /* Keyword.Declaration */
100 .codehilite .kn {
101 color: #008000;
102 font-weight: bold; }
103
104 /* Keyword.Namespace */
105 .codehilite .kp {
106 color: #008000; }
107
108 /* Keyword.Pseudo */
109 .codehilite .kr {
110 color: #008000;
111 font-weight: bold; }
112
113 /* Keyword.Reserved */
114 .codehilite .kt {
115 color: #B00040; }
116
117 /* Keyword.Type */
118 .codehilite .m {
119 color: #666666; }
120
121 /* Literal.Number */
122 .codehilite .s {
123 color: #BA2121; }
124
125 /* Literal.String */
126 .codehilite .na {
127 color: #7D9029; }
128
129 /* Name.Attribute */
130 .codehilite .nb {
131 color: #008000; }
132
133 /* Name.Builtin */
134 .codehilite .nc {
135 color: #0000FF;
136 font-weight: bold; }
137
138 /* Name.Class */
139 .codehilite .no {
140 color: #880000; }
141
142 /* Name.Constant */
143 .codehilite .nd {
144 color: #AA22FF; }
145
146 /* Name.Decorator */
147 .codehilite .ni {
148 color: #999999;
149 font-weight: bold; }
150
151 /* Name.Entity */
152 .codehilite .ne {
153 color: #D2413A;
154 font-weight: bold; }
155
156 /* Name.Exception */
157 .codehilite .nf {
158 color: #0000FF; }
159
160 /* Name.Function */
161 .codehilite .nl {
162 color: #A0A000; }
163
164 /* Name.Label */
165 .codehilite .nn {
166 color: #0000FF;
167 font-weight: bold; }
168
169 /* Name.Namespace */
170 .codehilite .nt {
171 color: #008000;
172 font-weight: bold; }
173
174 /* Name.Tag */
175 .codehilite .nv {
176 color: #19177C; }
177
178 /* Name.Variable */
179 .codehilite .ow {
180 color: #AA22FF;
181 font-weight: bold; }
182
183 /* Operator.Word */
184 .codehilite .w {
185 color: #bbbbbb; }
186
187 /* Text.Whitespace */
188 .codehilite .mf {
189 color: #666666; }
190
191 /* Literal.Number.Float */
192 .codehilite .mh {
193 color: #666666; }
194
195 /* Literal.Number.Hex */
196 .codehilite .mi {
197 color: #666666; }
198
199 /* Literal.Number.Integer */
200 .codehilite .mo {
201 color: #666666; }
202
203 /* Literal.Number.Oct */
204 .codehilite .sb {
205 color: #BA2121; }
206
207 /* Literal.String.Backtick */
208 .codehilite .sc {
209 color: #BA2121; }
210
211 /* Literal.String.Char */
212 .codehilite .sd {
213 color: #BA2121;
214 font-style: italic; }
215
216 /* Literal.String.Doc */
217 .codehilite .s2 {
218 color: #BA2121; }
219
220 /* Literal.String.Double */
221 .codehilite .se {
222 color: #BB6622;
223 font-weight: bold; }
224
225 /* Literal.String.Escape */
226 .codehilite .sh {
227 color: #BA2121; }
228
229 /* Literal.String.Heredoc */
230 .codehilite .si {
231 color: #BB6688;
232 font-weight: bold; }
233
234 /* Literal.String.Interpol */
235 .codehilite .sx {
236 color: #008000; }
237
238 /* Literal.String.Other */
239 .codehilite .sr {
240 color: #BB6688; }
241
242 /* Literal.String.Regex */
243 .codehilite .s1 {
244 color: #BA2121; }
245
246 /* Literal.String.Single */
247 .codehilite .ss {
248 color: #19177C; }
249
250 /* Literal.String.Symbol */
251 .codehilite .bp {
252 color: #008000; }
253
254 /* Name.Builtin.Pseudo */
255 .codehilite .vc {
256 color: #19177C; }
257
258 /* Name.Variable.Class */
259 .codehilite .vg {
260 color: #19177C; }
261
262 /* Name.Variable.Global */
263 .codehilite .vi {
264 color: #19177C; }
265
266 /* Name.Variable.Instance */
267 .codehilite .il {
268 color: #666666; }
269
270 /* Literal.Number.Integer.Long */
271
forum/static/css/codehilite.scss
File was created 1 /*
2 * from http://pygments.org/ style=default
3 */
4
5 .codehilite .hll { background-color: #ffffcc }
6 .codehilite { background: #f8f8f8; }
7 .codehilite .c { color: #408080; font-style: italic } /* Comment */
8 .codehilite .err { border: 1px solid #FF0000 } /* Error */
9 .codehilite .k { color: #008000; font-weight: bold } /* Keyword */
10 .codehilite .o { color: #666666 } /* Operator */
11 .codehilite .cm { color: #408080; font-style: italic } /* Comment.Multiline */
12 .codehilite .cp { color: #BC7A00 } /* Comment.Preproc */
13 .codehilite .c1 { color: #408080; font-style: italic } /* Comment.Single */
14 .codehilite .cs { color: #408080; font-style: italic } /* Comment.Special */
15 .codehilite .gd { color: #A00000 } /* Generic.Deleted */
16 .codehilite .ge { font-style: italic } /* Generic.Emph */
17 .codehilite .gr { color: #FF0000 } /* Generic.Error */
18 .codehilite .gh { color: #000080; font-weight: bold } /* Generic.Heading */
19 .codehilite .gi { color: #00A000 } /* Generic.Inserted */
20 .codehilite .go { color: #808080 } /* Generic.Output */
21 .codehilite .gp { color: #000080; font-weight: bold } /* Generic.Prompt */
22 .codehilite .gs { font-weight: bold } /* Generic.Strong */
23 .codehilite .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
24 .codehilite .gt { color: #0040D0 } /* Generic.Traceback */
25 .codehilite .kc { color: #008000; font-weight: bold } /* Keyword.Constant */
26 .codehilite .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */
27 .codehilite .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */
28 .codehilite .kp { color: #008000 } /* Keyword.Pseudo */
29 .codehilite .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */
30 .codehilite .kt { color: #B00040 } /* Keyword.Type */
31 .codehilite .m { color: #666666 } /* Literal.Number */
32 .codehilite .s { color: #BA2121 } /* Literal.String */
33 .codehilite .na { color: #7D9029 } /* Name.Attribute */
34 .codehilite .nb { color: #008000 } /* Name.Builtin */
35 .codehilite .nc { color: #0000FF; font-weight: bold } /* Name.Class */
36 .codehilite .no { color: #880000 } /* Name.Constant */
37 .codehilite .nd { color: #AA22FF } /* Name.Decorator */
38 .codehilite .ni { color: #999999; font-weight: bold } /* Name.Entity */
39 .codehilite .ne { color: #D2413A; font-weight: bold } /* Name.Exception */
40 .codehilite .nf { color: #0000FF } /* Name.Function */
41 .codehilite .nl { color: #A0A000 } /* Name.Label */
42 .codehilite .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */
43 .codehilite .nt { color: #008000; font-weight: bold } /* Name.Tag */
44 .codehilite .nv { color: #19177C } /* Name.Variable */
45 .codehilite .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */
46 .codehilite .w { color: #bbbbbb } /* Text.Whitespace */
47 .codehilite .mf { color: #666666 } /* Literal.Number.Float */
48 .codehilite .mh { color: #666666 } /* Literal.Number.Hex */
49 .codehilite .mi { color: #666666 } /* Literal.Number.Integer */
50 .codehilite .mo { color: #666666 } /* Literal.Number.Oct */
51 .codehilite .sb { color: #BA2121 } /* Literal.String.Backtick */
52 .codehilite .sc { color: #BA2121 } /* Literal.String.Char */
53 .codehilite .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */
54 .codehilite .s2 { color: #BA2121 } /* Literal.String.Double */
55 .codehilite .se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */
56 .codehilite .sh { color: #BA2121 } /* Literal.String.Heredoc */
57 .codehilite .si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */
58 .codehilite .sx { color: #008000 } /* Literal.String.Other */
59 .codehilite .sr { color: #BB6688 } /* Literal.String.Regex */
60 .codehilite .s1 { color: #BA2121 } /* Literal.String.Single */
61 .codehilite .ss { color: #19177C } /* Literal.String.Symbol */
62 .codehilite .bp { color: #008000 } /* Name.Builtin.Pseudo */
63 .codehilite .vc { color: #19177C } /* Name.Variable.Class */
64 .codehilite .vg { color: #19177C } /* Name.Variable.Global */
65 .codehilite .vi { color: #19177C } /* Name.Variable.Instance */
66 .codehilite .il { color: #666666 } /* Literal.Number.Integer.Long */
67
forum/static/css/compass/_css3.scss
File was created 1 @import "css3/border-radius";
2 @import "css3/inline-block";
3 @import "css3/opacity";
4 @import "css3/box-shadow";
5 @import "css3/text-shadow";
6 @import "css3/columns";
7 @import "css3/box-sizing";
8 @import "css3/box";
9 @import "css3/images";
10 @import "css3/background-clip";
11 @import "css3/background-origin";
12 @import "css3/background-size";
13 @import "css3/font-face";
14 @import "css3/transform";
15 @import "css3/transition";
16 @import "css3/appearance";
17 @import "css3/regions";
18 @import "css3/hyphenation";
19 @import "css3/filter";
20 @import "css3/user-interface";
21
forum/static/css/compass/_layout.scss
File was created 1 @import "layout/grid-background";
2 @import "layout/sticky-footer";
3 @import "layout/stretching";
4
forum/static/css/compass/_reset-legacy.scss
File was created 1 @import "reset/utilities-legacy";
2
3 @include global-reset;
4
forum/static/css/compass/_reset.scss
File was created 1 @import "reset/utilities";
2
3 @include global-reset;
4
forum/static/css/compass/_support.scss
File was created 1 // Usually compass hacks apply to both ie6 & 7 -- set this to false to disable support for both.
2 $legacy-support-for-ie: true !default;
3
4 // Setting this to false will result in smaller output, but no support for ie6 hacks
5 $legacy-support-for-ie6: $legacy-support-for-ie !default;
6
7 // Setting this to false will result in smaller output, but no support for ie7 hacks
8 $legacy-support-for-ie7: $legacy-support-for-ie !default;
9
10 // Setting this to false will result in smaller output, but no support for legacy ie8 hacks
11 $legacy-support-for-ie8: $legacy-support-for-ie !default;
12
13 // @private
14 // The user can simply set $legacy-support-for-ie and 6, 7, and 8 will be set accordingly,
15 // But in case the user set each of those explicitly, we need to sync the value of
16 // this combined variable.
17 $legacy-support-for-ie: $legacy-support-for-ie6 or $legacy-support-for-ie7 or $legacy-support-for-ie8;
18
19 // Whether to output legacy support for mozilla.
20 // Usually this means hacks to support Firefox 3.6 or earlier.
21 $legacy-support-for-mozilla: true;
22
23 // Support for mozilla in experimental css3 properties (-moz).
24 $experimental-support-for-mozilla : true !default;
25 // Support for webkit in experimental css3 properties (-webkit).
26 $experimental-support-for-webkit : true !default;
27 // Support for webkit's original (non-standard) gradient syntax.
28 $support-for-original-webkit-gradients : true !default;
29 // Support for opera in experimental css3 properties (-o).
30 $experimental-support-for-opera : true !default;
31 // Support for microsoft in experimental css3 properties (-ms).
32 $experimental-support-for-microsoft : true !default;
33 // Support for khtml in experimental css3 properties (-khtml).
34 $experimental-support-for-khtml : false !default;
35 // Support for svg in experimental css3 properties.
36 // Setting this to true might add significant size to your
37 // generated stylesheets.
38 $experimental-support-for-svg : false !default;
39 // Support for CSS PIE in experimental css3 properties (-pie).
40 $experimental-support-for-pie : false !default;
41
forum/static/css/compass/_typography.scss
File was created 1 @import "typography/links";
2 @import "typography/lists";
3 @import "typography/text";
4 @import "typography/vertical_rhythm";
5
forum/static/css/compass/_utilities.scss
File was created 1 @import "utilities/color";
2 @import "utilities/general";
3 @import "utilities/sprites";
4 @import "utilities/tables";
5
6 // deprecated
7 @import "typography/links";
8 @import "typography/lists";
9 @import "typography/text";
10
forum/static/css/compass/css3/_appearance.scss
File was created 1 @import "shared";
2
3 // Change the appearance for Mozilla, Webkit and possibly the future.
4 // The appearance property is currently not present in any newer CSS specification.
5 //
6 // There is no official list of accepted values, but you might check these source:
7 //
8 // * [Mozilla](https://developer.mozilla.org/en/CSS/-moz-appearance)
9 // * [Webkit](http://code.google.com/p/webkit-mirror/source/browse/Source/WebCore/css/CSSValueKeywords.in?spec=svnf1aea559dcd025a8946aa7da6e4e8306f5c1b604&r=63c7d1af44430b314233fea342c3ddb2a052e365)
10 // (search for 'appearance' within the page)
11
12 @mixin appearance($ap) {
13 $ap: unquote($ap);
14 @include experimental(appearance, $ap,
15 -moz, -webkit, not -o, not -ms, not -khtml, official
16 );
17 }
18
forum/static/css/compass/css3/_background-clip.scss
File was created 1 @import "shared";
2
3 // The default value is `padding-box` -- the box model used by modern browsers.
4 //
5 // If you wish to do so, you can override the default constant with `border-box`
6 //
7 // To override to the default border-box model, use this code:
8 // $default-background-clip: border-box
9
10 $default-background-clip: padding-box !default;
11
12 // Clip the background (image and color) at the edge of the padding or border.
13 //
14 // Legal Values:
15 //
16 // * padding-box
17 // * border-box
18 // * text
19
20 @mixin background-clip($clip: $default-background-clip) {
21 // webkit and mozilla use the deprecated short [border | padding]
22 $clip: unquote($clip);
23 $deprecated: $clip;
24 @if $clip == padding-box { $deprecated: padding; }
25 @if $clip == border-box { $deprecated: border; }
26 // Support for webkit and mozilla's use of the deprecated short form
27 @include experimental(background-clip, $deprecated,
28 -moz,
29 -webkit,
30 not -o,
31 not -ms,
32 not -khtml,
33 not official
34 );
35 @include experimental(background-clip, $clip,
36 not -moz,
37 not -webkit,
38 not -o,
39 not -ms,
40 -khtml,
41 official
42 );
43 }
44
forum/static/css/compass/css3/_background-origin.scss
File was created 1 // Override `$default-background-origin` to change the default.
2
3 @import "shared";
4
5 $default-background-origin: content-box !default;
6
7 // Position the background off the edge of the padding, border or content
8 //
9 // * Possible values:
10 // * `padding-box`
11 // * `border-box`
12 // * `content-box`
13 // * browser defaults to `padding-box`
14 // * mixin defaults to `content-box`
15
16
17 @mixin background-origin($origin: $default-background-origin) {
18 $origin: unquote($origin);
19 // webkit and mozilla use the deprecated short [border | padding | content]
20 $deprecated: $origin;
21 @if $origin == padding-box { $deprecated: padding; }
22 @if $origin == border-box { $deprecated: border; }
23 @if $origin == content-box { $deprecated: content; }
24
25 // Support for webkit and mozilla's use of the deprecated short form
26 @include experimental(background-origin, $deprecated,
27 -moz,
28 -webkit,
29 not -o,
30 not -ms,
31 not -khtml,
32 not official
33 );
34 @include experimental(background-origin, $origin,
35 not -moz,
36 not -webkit,
37 -o,
38 -ms,
39 -khtml,
40 official
41 );
42 }
43
forum/static/css/compass/css3/_background-size.scss
File was created 1 @import "shared";
2
3 // override to change the default
4 $default-background-size: 100% auto !default;
5
6 // Set the size of background images using px, width and height, or percentages.
7 // Currently supported in: Opera, Gecko, Webkit.
8 //
9 // * percentages are relative to the background-origin (default = padding-box)
10 // * mixin defaults to: `$default-background-size`
11 @mixin background-size(
12 $size-1: $default-background-size,
13 $size-2: false,
14 $size-3: false,
15 $size-4: false,
16 $size-5: false,
17 $size-6: false,
18 $size-7: false,
19 $size-8: false,
20 $size-9: false,
21 $size-10: false
22 ) {
23 $size-1: if(type-of($size-1) == string, unquote($size-1), $size-1);
24 $sizes: compact($size-1, $size-2, $size-3, $size-4, $size-5, $size-6, $size-7, $size-8, $size-9, $size-10);
25 @include experimental(background-size, $sizes, -moz, -webkit, -o, not -ms, not -khtml);
26 }
27
forum/static/css/compass/css3/_border-radius.scss
File was created 1 @import "shared";
2
3 $default-border-radius: 5px !default;
4
5 // Round all corners by a specific amount, defaults to value of `$default-border-radius`.
6 //
7 // When two values are passed, the first is the horizontal radius
8 // and the second is the vertical radius.
9 //
10 // Note: webkit does not support shorthand syntax for several corners at once.
11 // So in the case where you pass several values only the first will be passed to webkit.
12 //
13 // Examples:
14 //
15 // .simple { @include border-radius(4px, 4px); }
16 // .compound { @include border-radius(2px 5px, 3px 6px); }
17 // .crazy { @include border-radius(1px 3px 5px 7px, 2px 4px 6px 8px)}
18 //
19 // Which generates:
20 //
21 // .simple {
22 // -webkit-border-radius: 4px 4px;
23 // -moz-border-radius: 4px / 4px;
24 // -khtml-border-radius: 4px / 4px;
25 // border-radius: 4px / 4px; }
26 //
27 // .compound {
28 // -webkit-border-radius: 2px 3px;
29 // -moz-border-radius: 2px 5px / 3px 6px;
30 // -khtml-border-radius: 2px 5px / 3px 6px;
31 // border-radius: 2px 5px / 3px 6px; }
32 //
33 // .crazy {
34 // -webkit-border-radius: 1px 2px;
35 // -moz-border-radius: 1px 3px 5px 7px / 2px 4px 6px 8px;
36 // -khtml-border-radius: 1px 3px 5px 7px / 2px 4px 6px 8px;
37 // border-radius: 1px 3px 5px 7px / 2px 4px 6px 8px; }
38
39 @mixin border-radius($radius: $default-border-radius, $vertical-radius: false) {
40
41 @if $vertical-radius {
42 // Webkit doesn't understand the official shorthand syntax for specifying
43 // a vertical radius unless so in case there's several we only take the first.
44 @include experimental(border-radius, first-value-of($radius) first-value-of($vertical-radius),
45 not -moz,
46 -webkit,
47 not -o,
48 not -ms,
49 not -khtml,
50 not official
51 );
52 @include experimental("border-radius", $radius unquote("/") $vertical-radius,
53 -moz,
54 not -webkit,
55 not -o,
56 not -ms,
57 -khtml,
58 official
59 );
60 }
61 @else {
62 @include experimental(border-radius, $radius);
63 }
64 }
65
66 // Round radius at position by amount.
67 //
68 // * legal values for `$vert`: `top`, `bottom`
69 // * legal values for `$horz`: `left`, `right`
70
71 @mixin border-corner-radius($vert, $horz, $radius: $default-border-radius) {
72 // Support for mozilla's syntax for specifying a corner
73 @include experimental("border-radius-#{$vert}#{$horz}", $radius,
74 -moz,
75 not -webkit,
76 not -o,
77 not -ms,
78 not -khtml,
79 not official
80 );
81 @include experimental("border-#{$vert}-#{$horz}-radius", $radius,
82 not -moz,
83 -webkit,
84 not -o,
85 not -ms,
86 -khtml,
87 official
88 );
89
90 }
91
92 // Round top-left corner only
93
94 @mixin border-top-left-radius($radius: $default-border-radius) {
95 @include border-corner-radius(top, left, $radius); }
96
97 // Round top-right corner only
98
99 @mixin border-top-right-radius($radius: $default-border-radius) {
100 @include border-corner-radius(top, right, $radius); }
101
102 // Round bottom-left corner only
103
104 @mixin border-bottom-left-radius($radius: $default-border-radius) {
105 @include border-corner-radius(bottom, left, $radius); }
106
107 // Round bottom-right corner only
108
109 @mixin border-bottom-right-radius($radius: $default-border-radius) {
110 @include border-corner-radius(bottom, right, $radius); }
111
112 // Round both top corners by amount
113 @mixin border-top-radius($radius: $default-border-radius) {
114 @include border-top-left-radius($radius);
115 @include border-top-right-radius($radius); }
116
117 // Round both right corners by amount
118 @mixin border-right-radius($radius: $default-border-radius) {
119 @include border-top-right-radius($radius);
120 @include border-bottom-right-radius($radius); }
121
122 // Round both bottom corners by amount
123 @mixin border-bottom-radius($radius: $default-border-radius) {
124 @include border-bottom-left-radius($radius);
125 @include border-bottom-right-radius($radius); }
126
127 // Round both left corners by amount
128 @mixin border-left-radius($radius: $default-border-radius) {
129 @include border-top-left-radius($radius);
130 @include border-bottom-left-radius($radius); }
131
forum/static/css/compass/css3/_box-shadow.scss
File was created 1 // @doc off
2 // These defaults make the arguments optional for this mixin
3 // If you like, set different defaults before importing.
4 // @doc on
5
6 @import "shared";
7
8
9 // The default color for box shadows
10 $default-box-shadow-color: #333333 !default;
11
12 // The default horizontal offset. Positive is to the right.
13 $default-box-shadow-h-offset: 0px !default;
14
15 // The default vertical offset. Positive is down.
16 $default-box-shadow-v-offset: 0px !default;
17
18 // The default blur length.
19 $default-box-shadow-blur: 5px !default;
20
21 // The default spread length.
22 $default-box-shadow-spread : false !default;
23
24 // The default shadow inset: inset or false (for standard shadow).
25 $default-box-shadow-inset : false !default;
26
27 // Provides cross-browser for Webkit, Gecko, and CSS3 box shadows when one or more box
28 // shadows are needed.
29 // Each shadow argument should adhere to the standard css3 syntax for the
30 // box-shadow property.
31 @mixin box-shadow(
32 $shadow-1 : default,
33 $shadow-2 : false,
34 $shadow-3 : false,
35 $shadow-4 : false,
36 $shadow-5 : false,
37 $shadow-6 : false,
38 $shadow-7 : false,
39 $shadow-8 : false,
40 $shadow-9 : false,
41 $shadow-10: false
42 ) {
43 @if $shadow-1 == default {
44 $shadow-1 : -compass-space-list(compact(if($default-box-shadow-inset, inset, false), $default-box-shadow-h-offset, $default-box-shadow-v-offset, $default-box-shadow-blur, $default-box-shadow-spread, $default-box-shadow-color));
45 }
46 $shadow : compact($shadow-1, $shadow-2, $shadow-3, $shadow-4, $shadow-5, $shadow-6, $shadow-7, $shadow-8, $shadow-9, $shadow-10);
47 @include experimental(box-shadow, $shadow,
48 -moz, -webkit, not -o, not -ms, not -khtml, official
49 );
50 }
51
52 // Provides a single cross-browser CSS box shadow for Webkit, Gecko, and CSS3.
53 // Includes default arguments for color, horizontal offset, vertical offset, blur length, spread length, and inset.
54 @mixin single-box-shadow(
55 $color : $default-box-shadow-color,
56 $hoff : $default-box-shadow-h-offset,
57 $voff : $default-box-shadow-v-offset,
58 $blur : $default-box-shadow-blur,
59 $spread : $default-box-shadow-spread,
60 $inset : $default-box-shadow-inset
61 ) {
62 @if not ($inset == true or $inset == false or $inset == inset) {
63 @warn "$inset expected to be true or the inset keyword. Got #{$inset} instead. Using: inset";
64 }
65
66 @if $color == none {
67 @include box-shadow(none);
68 } @else {
69 $full : $hoff $voff;
70 @if $blur { $full: $full $blur; }
71 @if $spread { $full: $full $spread; }
72 @if $color { $full: $full $color; }
73 @if $inset { $full: inset $full; }
74 @include box-shadow($full);
75 }
76 }
77
forum/static/css/compass/css3/_box-sizing.scss
File was created 1 @import "shared";
2
3 // Change the box model for Mozilla, Webkit, IE8 and the future
4 //
5 // @param $bs
6 // [ content-box | border-box ]
7
8 @mixin box-sizing($bs) {
9 $bs: unquote($bs);
10 @include experimental(box-sizing, $bs,
11 -moz, -webkit, not -o, not -ms, not -khtml, official
12 );
13 }
14
forum/static/css/compass/css3/_box.scss
File was created 1 @import "shared";
2
3 // display:box; must be used for any of the other flexbox mixins to work properly
4 @mixin display-box {
5 @include experimental-value(display, box,
6 -moz, -webkit, not -o, -ms, not -khtml, official
7 );
8 }
9
10 // Default box orientation, assuming that the user wants something less block-like
11 $default-box-orient: horizontal !default;
12
13 // Box orientation [ horizontal | vertical | inline-axis | block-axis | inherit ]
14 @mixin box-orient(
15 $orientation: $default-box-orient
16 ) {
17 $orientation : unquote($orientation);
18 @include experimental(box-orient, $orientation,
19 -moz, -webkit, not -o, -ms, not -khtml, official
20 );
21 }
22
23 // Default box-align
24 $default-box-align: stretch !default;
25
26 // Box align [ start | end | center | baseline | stretch ]
27 @mixin box-align(
28 $alignment: $default-box-align
29 ) {
30 $alignment : unquote($alignment);
31 @include experimental(box-align, $alignment,
32 -moz, -webkit, not -o, -ms, not -khtml, official
33 );
34 }
35
36 // Default box flex
37 $default-box-flex: 0 !default;
38
39 // mixin which takes an int argument for box flex. Apply this to the children inside the box.
40 //
41 // For example: "div.display-box > div.child-box" would get the box flex mixin.
42 @mixin box-flex(
43 $flex: $default-box-flex
44 ) {
45 @include experimental(box-flex, $flex,
46 -moz, -webkit, not -o, -ms, not -khtml, official
47 );
48 }
49
50 // Default flex group
51 $default-box-flex-group: 1 !default;
52
53 // mixin which takes an int argument for flexible grouping
54 @mixin box-flex-group(
55 $group: $default-box-flex-group
56 ) {
57 @include experimental(box-flex-group, $group,
58 -moz, -webkit, not -o, -ms, not -khtml, official
59 );
60 }
61
62 // default for ordinal group
63 $default-box-ordinal-group: 1 !default;
64
65 // mixin which takes an int argument for ordinal grouping and rearranging the order
66 @mixin box-ordinal-group(
67 $group: $default-ordinal-flex-group
68 ) {
69 @include experimental(box-ordinal-group, $group,
70 -moz, -webkit, not -o, -ms, not -khtml, official
71 );
72 }
73
74 // Box direction default value
75 $default-box-direction: normal !default;
76
77 // mixin for box-direction [ normal | reverse | inherit ]
78 @mixin box-direction(
79 $direction: $default-box-direction
80 ) {
81 $direction: unquote($direction);
82 @include experimental(box-direction, $direction,
83 -moz, -webkit, not -o, -ms, not -khtml, official
84 );
85 }
86
87 // default for box lines
88 $default-box-lines: single !default;
89
90 // mixin for box lines [ single | multiple ]
91 @mixin box-lines(
92 $lines: $default-box-lines
93 ) {
94 $lines: unquote($lines);
95 @include experimental(box-lines, $lines,
96 -moz, -webkit, not -o, -ms, not -khtml, official
97 );
98 }
99
100 // default for box pack
101 $default-box-pack: start !default;
102
103 // mixin for box pack [ start | end | center | justify ]
104 @mixin box-pack(
105 $pack: $default-box-pack
106 ) {
107 $pack: unquote($pack);
108 @include experimental(box-pack, $pack,
109 -moz, -webkit, not -o, -ms, not -khtml, official
110 );
111 }
forum/static/css/compass/css3/_columns.scss
File was created 1 @import "shared";
2
3 // Specify the shorthand `columns` property.
4 //
5 // Example:
6 //
7 // @include columns(20em 2)
8 @mixin columns($width-and-count) {
9 @include experimental(columns, $width-and-count,
10 -moz, -webkit, -o, -ms, not -khtml, official
11 );
12 }
13
14 // Specify the number of columns
15 @mixin column-count($count) {
16 @include experimental(column-count, $count,
17 -moz, -webkit, -o, -ms, not -khtml, official
18 );
19 }
20
21 // Specify the gap between columns e.g. `20px`
22 @mixin column-gap($width) {
23 @include experimental(column-gap, $width,
24 -moz, -webkit, -o, -ms, not -khtml, official
25 );
26 }
27
28 // Specify the width of columns e.g. `100px`
29 @mixin column-width($width) {
30 @include experimental(column-width, $width,
31 -moz, -webkit, -o, -ms, not -khtml, official
32 );
33 }
34
35 // Specify the width of the rule between columns e.g. `1px`
36 @mixin column-rule-width($width) {
37 @include experimental(column-rule-width, $width,
38 -moz, -webkit, -o, -ms, not -khtml, official
39 );
40 }
41
42 // Specify the style of the rule between columns e.g. `dotted`.
43 // This works like border-style.
44 @mixin column-rule-style($style) {
45 @include experimental(column-rule-style, unquote($style),
46 -moz, -webkit, -o, -ms, not -khtml, official
47 );
48 }
49
50 // Specify the color of the rule between columns e.g. `blue`.
51 // This works like border-color.
52 @mixin column-rule-color($color) {
53 @include experimental(column-rule-color, $color,
54 -moz, -webkit, -o, -ms, not -khtml, official
55 );
56 }
57
58 // Mixin encompassing all column rule properties
59 // For example:
60 //
61 // @include column-rule(1px, solid, #c00)
62 //
63 // Or the values can be space separated:
64 //
65 // @include column-rule(1px solid #c00)
66 @mixin column-rule($width, $style: false, $color: false) {
67 $full : -compass-space-list(compact($width, $style, $color));
68 @include experimental(column-rule, $full,
69 -moz, -webkit, -o, -ms, not -khtml, official
70 );
71 }
72
73 // Mixin for setting column-break-before
74 //
75 // * legal values are auto, always, avoid, left, right, page, column, avoid-page, avoid-column
76 //
77 // Example:
78 // h2.before {@include column-break-before(always);}
79 //
80 // Which generates:
81 //
82 // h2.before {
83 // -webkit-column-break-before: always;
84 // column-break-before: always;}
85 @mixin column-break-before($value: auto){
86 @include experimental(column-break-before, $value, not -moz, -webkit, not -o, not -ms, not -khtml, official );
87 }
88
89 // Mixin for setting column-break-after
90 //
91 // * legal values are auto, always, avoid, left, right, page, column, avoid-page, avoid-column
92 //
93 // Example:
94 // h2.after {@include column-break-after(always); }
95 //
96 // Which generates:
97 //
98 // h2.after {
99 // -webkit-column-break-after: always;
100 // column-break-after: always; }
101 @mixin column-break-after($value: auto){
102 @include experimental(column-break-after, $value, not -moz, -webkit, not -o, not -ms, not -khtml, official );
103 }
104
105 // Mixin for setting column-break-inside
106 //
107 // * legal values are auto, avoid, avoid-page, avoid-column
108 //
109 // Example:
110 // h2.inside {@include column-break-inside();}
111 // Which generates:
112 //
113 // h2.inside {
114 // -webkit-column-break-inside: auto;
115 // column-break-inside: auto;}
116 @mixin column-break-inside($value: auto){
117 @include experimental(column-break-inside, $value, not -moz, -webkit, not -o, not -ms, not -khtml, official );
118 }
119
120 // All-purpose mixin for setting column breaks.
121 //
122 // * legal values for $type : before, after, inside
123 // * legal values for '$value' are dependent on $type
124 // * when $type = before, legal values are auto, always, avoid, left, right, page, column, avoid-page, avoid-column
125 // * when $type = after, legal values are auto, always, avoid, left, right, page, column, avoid-page, avoid-column
126 // * when $type = inside, legal values are auto, avoid, avoid-page, avoid-column
127 //
128 // Examples:
129 // h2.before {@include column-break(before, always);}
130 // h2.after {@include column-break(after, always); }
131 // h2.inside {@include column-break(inside); }
132 //
133 // Which generates:
134 // h2.before {
135 // -webkit-column-break-before: always;
136 // column-break-before: always;}
137 //
138 // h2.after {
139 // -webkit-column-break-after: always;
140 // column-break-after: always; }
141 //
142 // h2.inside {
143 // -webkit-column-break-inside: auto;
144 // column-break-inside: auto;}
145
146 @mixin column-break($type: before, $value: auto){
147 @include experimental("column-break-#{$type}", $value, not -moz, -webkit, not -o, not -ms, not -khtml, official );
148 }
forum/static/css/compass/css3/_filter.scss
File was created 1 @import "shared";
2
3 // Provides cross-browser support for the upcoming (?) css3 filter property.
4 //
5 // Each filter argument should adhere to the standard css3 syntax for the
6 // filter property.
7 @mixin filter (
8 $filter-1,
9 $filter-2 : false,
10 $filter-3 : false,
11 $filter-4 : false,
12 $filter-5 : false,
13 $filter-6 : false,
14 $filter-7 : false,
15 $filter-8 : false,
16 $filter-9 : false,
17 $filter-10: false
18 ) {
19 $filter : compact($filter-1, $filter-2, $filter-3, $filter-4, $filter-5, $filter-6, $filter-7, $filter-8, $filter-9, $filter-10);
20 @include experimental(filter, $filter,
21 -moz, -webkit, not -o, not -ms, not -khtml, official
22 );
23 }
24
forum/static/css/compass/css3/_font-face.scss
File was created 1 @import "shared";
2
3 // Cross-browser support for @font-face. Supports IE, Gecko, Webkit, Opera.
4 //
5 // * $name is required, arbitrary, and what you will use in font stacks.
6 // * $font-files is required using font-files('relative/location', 'format').
7 // for best results use this order: woff, opentype/truetype, svg
8 // * $eot is required by IE, and is a relative location of the eot file.
9 // * $weight shows if the font is bold, defaults to normal
10 // * $style defaults to normal, might be also italic
11 // * For android 2.2 Compatiblity, please ensure that your web page has
12 // a meta viewport tag.
13 // * To support iOS < 4.2, an SVG file must be provided
14 //
15 // If you need to generate other formats check out the Font Squirrel
16 // [font generator](http://www.fontsquirrel.com/fontface/generator)
17 //
18
19 // In order to refer to a specific style of the font in your stylesheets as
20 // e.g. "font-style: italic;", you may add a couple of @font-face includes
21 // containing the respective font files for each style and specying
22 // respective the $style parameter.
23
24 // Order of the includes matters, and it is: normal, bold, italic, bold+italic.
25
26 @mixin font-face(
27 $name,
28 $font-files,
29 $eot: false,
30 $weight: false,
31 $style: false
32 ) {
33 $iefont: unquote("#{$eot}?#iefix");
34 @font-face {
35 font-family: quote($name);
36 @if $eot {
37 src: font-url($eot);
38 $font-files: font-url($iefont) unquote("format('eot')"), $font-files;
39 }
40 src: $font-files;
41 @if $weight {
42 font-weight: $weight;
43 }
44 @if $style {
45 font-style: $style;
46 }
47 }
48 }
49
forum/static/css/compass/css3/_hyphenation.scss
File was created 1 @import "shared";
2
3 // Mixins to support specific CSS Text Level 3 elements
4 //
5 //
6 //
7 // Mixin for word-break properties
8 // http://www.w3.org/css3-text/#word-break
9 // * legal values for $type : normal, keep-all, break-all
10 //
11 // Example:
12 // p.wordBreak {@include word-break(break-all);}
13 //
14 // Which generates:
15 // p.wordBreak {
16 // -ms-word-break: break-all;
17 // word-break: break-all;
18 // word-break: break-word;}
19 //
20 @mixin word-break($value: normal){
21 @if $value == break-all {
22 //Most browsers handle the break-all case the same...
23 @include experimental(word-break, $value,
24 not -moz, not -webkit, not -o, -ms, not -khtml, official
25 );
26 //Webkit handles break-all differently... as break-word
27 @include experimental(word-break, break-word,
28 not -moz, not -webkit, not -o, not -ms, not -khtml, official
29 );
30 }
31 @else {
32 @include experimental(word-break, $value,
33 not -moz, not -webkit, not -o, -ms, not -khtml, official
34 );
35 }
36 }
37
38 // Mixin for the hyphens property
39 //
40 // W3C specification: http://www.w3.org/TR/css3-text/#hyphens
41 // * legal values for $type : auto, manual, none
42 //
43 // Example:
44 // p {
45 // @include hyphens(auto);}
46 // Which generates:
47 // p {
48 // -moz-hyphens: auto;
49 // -webkit-hyphens: auto;
50 // hyphens: auto;}
51 //
52 @mixin hyphens($value: auto){
53 @include experimental(hyphens, $value,
54 -moz, -webkit, not -o, not -ms, not -khtml, official
55 );
56 }
57
58 // Mixin for x-browser hyphenation based on @auchenberg's post:
59 // Removes the need for the <wbr/> HTML tag
60 // http://blog.kenneth.io/blog/2012/03/04/word-wrapping-hypernation-using-css/
61 //
62 // Example:
63 // div {@include hyphenation;}
64 //
65 // Which generates:
66 // div {
67 // -ms-word-break: break-all;
68 // word-break: break-all;
69 // word-break: break-word;
70 // -moz-hyphens: auto;
71 // -webkit-hyphens: auto;
72 // hyphens: auto;}
73 //
74 @mixin hyphenation{
75 @include word-break(break-all);
76 @include hyphens;
77 }
78
forum/static/css/compass/css3/_images.scss
File was created 1 @import "shared";
2 @import "compass/utilities/general/hacks";
3
4 // Background property support for vendor prefixing within values.
5 @mixin background(
6 $background-1,
7 $background-2: false,
8 $background-3: false,
9 $background-4: false,
10 $background-5: false,
11 $background-6: false,
12 $background-7: false,
13 $background-8: false,
14 $background-9: false,
15 $background-10: false
16 ) {
17 $backgrounds: compact($background-1, $background-2, $background-3, $background-4, $background-5,
18 $background-6, $background-7, $background-8, $background-9, $background-10);
19 $mult-bgs: -compass-list-size($backgrounds) > 1;
20 $add-pie-bg: prefixed(-pie, $backgrounds) or $mult-bgs;
21 @if $experimental-support-for-svg and prefixed(-svg, $backgrounds) { background: -svg($backgrounds); }
22 @if $support-for-original-webkit-gradients and prefixed(-owg, $backgrounds) { background: -owg($backgrounds); }
23 @if $experimental-support-for-webkit and prefixed(-webkit, $backgrounds) { background: -webkit($backgrounds); }
24 @if $experimental-support-for-mozilla and prefixed(-moz, $backgrounds) { background: -moz($backgrounds); }
25 @if $experimental-support-for-opera and prefixed(-o, $backgrounds) { background: -o($backgrounds); }
26 @if $experimental-support-for-pie and $add-pie-bg { -pie-background: -pie($backgrounds); }
27 background: $backgrounds ;
28 }
29
30 @mixin background-with-css2-fallback(
31 $background-1,
32 $background-2: false,
33 $background-3: false,
34 $background-4: false,
35 $background-5: false,
36 $background-6: false,
37 $background-7: false,
38 $background-8: false,
39 $background-9: false,
40 $background-10: false
41 ) {
42 $backgrounds: compact($background-1, $background-2, $background-3, $background-4, $background-5,
43 $background-6, $background-7, $background-8, $background-9, $background-10);
44 $mult-bgs: -compass-list-size($backgrounds) > 1;
45 $simple-background: if($mult-bgs or prefixed(-css2, $backgrounds), -css2(-compass-nth($backgrounds, last)), false);
46 @if not blank($simple-background) { background: $simple-background; }
47 @include background($background-1, $background-2, $background-3, $background-4, $background-5,
48 $background-6, $background-7, $background-8, $background-9, $background-10);
49 }
50
51
52 // Background image property support for vendor prefixing within values.
53 @mixin background-image(
54 $image-1,
55 $image-2: false,
56 $image-3: false,
57 $image-4: false,
58 $image-5: false,
59 $image-6: false,
60 $image-7: false,
61 $image-8: false,
62 $image-9: false,
63 $image-10: false
64 ) {
65 $images: compact($image-1, $image-2, $image-3, $image-4, $image-5, $image-6, $image-7, $image-8, $image-9, $image-10);
66 $add-pie-bg: prefixed(-pie, $images) or -compass-list-size($images) > 1;
67
68 @if $experimental-support-for-svg and prefixed(-svg, $images) { background-image: -svg($images); background-size: 100%; }
69 @if $support-for-original-webkit-gradients and prefixed(-owg, $images) { background-image: -owg($images); }
70 @if $experimental-support-for-webkit and prefixed(-webkit, $images) { background-image: -webkit($images); }
71 @if $experimental-support-for-mozilla and prefixed(-moz, $images) { background-image: -moz($images); }
72 @if $experimental-support-for-opera and prefixed(-o, $images) { background-image: -o($images); }
73 @if $experimental-support-for-pie and $add-pie-bg { @warn "PIE does not support background-image. Use @include background(#{$images}) instead." }
74 background-image: $images ;
75 }
76
77 // Emit a IE-Specific filters that renders a simple linear gradient.
78 // For use in IE 6 - 8. Best practice would have you apply this via a
79 // conditional IE stylesheet, but if you must, you should place this before
80 // any background-image properties that you have specified.
81 //
82 // For the `$orientation` parameter, you can pass `vertical` or `horizontal`.
83 @mixin filter-gradient($start-color, $end-color, $orientation: vertical) {
84 @include has-layout;
85 $gradient-type: if($orientation == vertical, 0, 1);
86 @if $legacy-support-for-ie6 or $legacy-support-for-ie7 or $legacy-support-for-ie8 {
87 filter: progid:DXImageTransform.Microsoft.gradient(gradientType=#{$gradient-type}, startColorstr='#{ie-hex-str($start-color)}', endColorstr='#{ie-hex-str($end-color)}');
88 }
89 }
90
91
92 // Border image property support for vendor prefixing properties and values.
93 @mixin border-image($value) {
94 @if $experimental-support-for-mozilla { -moz-border-image: -moz(reject(-compass-list($value), fill)); }
95 @if $support-for-original-webkit-gradients { -webkit-border-image: -owg(reject(-compass-list($value), fill)); }
96 @if $experimental-support-for-webkit { -webkit-border-image: -webkit(reject(-compass-list($value), fill)); }
97 @if $experimental-support-for-opera { -o-border-image: -o(reject(-compass-list($value), fill)); }
98 @if $experimental-support-for-svg { border-image: -svg(reject(-compass-list($value), fill)); }
99 border-image: $value;
100 }
101
102 // List style image property support for vendor prefixing within values.
103 @mixin list-style-image($image) {
104 @if $experimental-support-for-mozilla and prefixed(-moz, $image) { list-style-image: -moz($image); }
105 @if $support-for-original-webkit-gradients and prefixed(-owg, $image) { list-style-image: -owg($image); }
106 @if $experimental-support-for-webkit and prefixed(-webkit, $image) { list-style-image: -webkit($image); }
107 @if $experimental-support-for-opera and prefixed(-o, $image) { list-style-image: -o($image); }
108 @if $experimental-support-for-svg and prefixed(-svg, $image) { list-style-image: -svg($image); }
109 list-style-image: $image ;
110 }
111
112 // List style property support for vendor prefixing within values.
113 @mixin list-style($value) {
114 $value: -compass-list($value);
115 @if $experimental-support-for-mozilla and prefixed(-moz, $value) { list-style-image: -moz($value); }
116 @if $support-for-original-webkit-gradients and prefixed(-owg, $value) { list-style-image: -owg($value); }
117 @if $experimental-support-for-webkit and prefixed(-webkit, $value) { list-style-image: -webkit($value); }
118 @if $experimental-support-for-opera and prefixed(-o, $value) { list-style-image: -o($value); }
119 @if $experimental-support-for-svg and prefixed(-svg, $value) { list-style-image: -svg($value); }
120 list-style-image: $value ;
121 }
122
123 // content property support for vendor prefixing within values.
124 @mixin content($value) {
125 $value: -compass-list($value);
126 @if $experimental-support-for-mozilla and prefixed(-moz, $value) { content: -moz($value); }
127 @if $support-for-original-webkit-gradients and prefixed(-owg, $value) { content: -owg($value); }
128 @if $experimental-support-for-webkit and prefixed(-webkit, $value) { content: -webkit($value); }
129 @if $experimental-support-for-opera and prefixed(-o, $value) { content: -o($value); }
130 @if $experimental-support-for-svg and prefixed(-svg, $value) { content: -svg($value); }
131 content: $value ;
132 }
133
forum/static/css/compass/css3/_inline-block.scss
File was created 1 @import "shared";
2
3 // Set `$inline-block-alignment` to `none` or `false` to disable the output
4 // of a vertical-align property in the inline-block mixin.
5 // Or set it to a legal value for `vertical-align` to change the default.
6 $inline-block-alignment: middle !default;
7
8 // Provides a cross-browser method to implement `display: inline-block;`
9 @mixin inline-block($alignment: $inline-block-alignment) {
10 @if $legacy-support-for-mozilla {
11 display: -moz-inline-stack;
12 }
13 display: inline-block;
14 @if $alignment and $alignment != none {
15 vertical-align: $alignment;
16 }
17 @if $legacy-support-for-ie {
18 *vertical-align: auto;
19 zoom: 1;
20 *display: inline;
21 }
22 }
23
forum/static/css/compass/css3/_opacity.scss
File was created 1 @import "shared";
2
3 // Provides cross-browser CSS opacity. Takes a number between 0 and 1 as the argument, e.g. 0.5 for 50% opacity.
4 //
5 // @param $opacity
6 // A number between 0 and 1, where 0 is transparent and 1 is opaque.
7
8 @mixin opacity($opacity) {
9 @if $legacy-support-for-ie6 or $legacy-support-for-ie7 or $legacy-support-for-ie8 {
10 filter: unquote("progid:DXImageTransform.Microsoft.Alpha(Opacity=#{round($opacity * 100)})");
11 }
12 opacity: $opacity;
13 }
14
15 // Make an element completely transparent.
16 @mixin transparent { @include opacity(0); }
17
18 // Make an element completely opaque.
19 @mixin opaque { @include opacity(1); }
20
forum/static/css/compass/css3/_pie.scss
File was created 1 $experimental-support-for-pie: true;
2
3 // It is recommended that you use Sass's @extend directive to apply the behavior
4 // to your PIE elements. To assist you, Compass provides this variable.
5 // When set, it will cause the `@include pie` mixin to extend this class.
6 // The class name you provide should **not** include the `.`.
7 $pie-base-class: false !default;
8
9 // The default approach to using PIE.
10 // Can be one of:
11 //
12 // * relative (default)
13 // * z-index
14 // * none
15 $pie-default-approach: relative !default;
16
17 // The location of your PIE behavior file
18 // This should be root-relative to your web server
19 // relative assets don't work. It is recommended that
20 // you set this yourself.
21 $pie-behavior: stylesheet-url("PIE.htc") !default;
22
23 // When using the z-index approach, the
24 // first ancestor of the PIE element at
25 // or before the container's opaque background
26 // should have a z-index set as well to ensure
27 // propert z-index stacking.
28 //
29 // The `$position` argument must be some non-static
30 // value (absolute, relative, etc.)
31 @mixin pie-container($z-index: 0, $position: relative) {
32 z-index: $z-index;
33 position: $position;
34 }
35
36 // PIE elements must have this behavior attached to them.
37 // IE is broken -- it doesn't think of behavior urls as
38 // relative to the stylesheet. It considers them relative
39 // to the webpage. As a result, you cannot reliably use
40 // compass's relative_assets with PIE.
41 //
42 // * `$approach` - one of: relative, z-index, or none
43 // * `$z-index` - when using the z-index approach, this
44 // is the z-index that is applied.
45 @mixin pie-element(
46 $approach: $pie-default-approach,
47 $z-index: 0
48 ) {
49 behavior: $pie-behavior;
50 @if $approach == relative {
51 position: relative;
52 }
53 @else if $approach == z-index {
54 z-index: $z-index;
55 }
56 }
57
58 // a smart mixin that knows to extend or include pie-element according
59 // to your stylesheet's configuration variables.
60 @mixin pie($base-class: $pie-base-class) {
61 @if $base-class {
62 @extend .#{$base-class};
63 }
64 @else {
65 @include pie-element;
66 }
67 }
68
69 // Watch `$n` levels of ancestors for changes to their class attribute
70 // So that cascading styles will work correctly on the PIE element.
71 @mixin pie-watch-ancestors($n) {
72 -pie-watch-ancestors: $n;
73 }
forum/static/css/compass/css3/_regions.scss
File was created 1 @import "shared";
2
3 // Webkit, IE10 and future support for [CSS Regions](http://dev.w3.org/csswg/css3-regions/)
4 //
5 // $target is a value you use to link two regions of your css. Give the source of your content the flow-into property, and give your target container the flow-from property.
6 //
7 // For a visual explanation, see the diagrams at Chris Coyier's
8 // [CSS-Tricks](http://css-tricks.com/content-folding/)
9
10 @mixin flow-into($target) {
11 $target: unquote($target);
12 @include experimental(flow-into, $target,
13 not -moz, -webkit, not -o, -ms, not -khtml, not official
14 );
15 }
16
17 @mixin flow-from($target) {
18 $target: unquote($target);
19 @include experimental(flow-from, $target,
20 not -moz, -webkit, not -o, -ms, not -khtml, not official
21 );
22 }
forum/static/css/compass/css3/_shared.scss
File was created 1 @import "compass/support";
2
3 // This mixin provides basic support for CSS3 properties and
4 // their corresponding experimental CSS2 properties when
5 // the implementations are identical except for the property
6 // prefix.
7 @mixin experimental($property, $value,
8 $moz : $experimental-support-for-mozilla,
9 $webkit : $experimental-support-for-webkit,
10 $o : $experimental-support-for-opera,
11 $ms : $experimental-support-for-microsoft,
12 $khtml : $experimental-support-for-khtml,
13 $official : true
14 ) {
15 @if $webkit and $experimental-support-for-webkit { -webkit-#{$property} : $value; }
16 @if $khtml and $experimental-support-for-khtml { -khtml-#{$property} : $value; }
17 @if $moz and $experimental-support-for-mozilla { -moz-#{$property} : $value; }
18 @if $ms and $experimental-support-for-microsoft { -ms-#{$property} : $value; }
19 @if $o and $experimental-support-for-opera { -o-#{$property} : $value; }
20 @if $official { #{$property} : $value; }
21 }
22
23 // Same as experimental(), but for cases when the property is the same and the value is vendorized
24 @mixin experimental-value($property, $value,
25 $moz : $experimental-support-for-mozilla,
26 $webkit : $experimental-support-for-webkit,
27 $o : $experimental-support-for-opera,
28 $ms : $experimental-support-for-microsoft,
29 $khtml : $experimental-support-for-khtml,
30 $official : true
31 ) {
32 @if $webkit and $experimental-support-for-webkit { #{$property} : -webkit-#{$value}; }
33 @if $khtml and $experimental-support-for-khtml { #{$property} : -khtml-#{$value}; }
34 @if $moz and $experimental-support-for-mozilla { #{$property} : -moz-#{$value}; }
35 @if $ms and $experimental-support-for-microsoft { #{$property} : -ms-#{$value}; }
36 @if $o and $experimental-support-for-opera { #{$property} : -o-#{$value}; }
37 @if $official { #{$property} : #{$value}; }
38 }
39
forum/static/css/compass/css3/_text-shadow.scss
File was created 1 @import "shared";
2
3 // These defaults make the arguments optional for this mixin
4 // If you like, set different defaults in your project
5
6 $default-text-shadow-color: #aaa !default;
7 $default-text-shadow-h-offset: 0px !default;
8 $default-text-shadow-v-offset: 0px !default;
9 $default-text-shadow-blur: 1px !default;
10 $default-text-shadow-spread: false !default;
11
12 // Provides cross-browser text shadows when one or more shadows are needed.
13 // Each shadow argument should adhere to the standard css3 syntax for the
14 // text-shadow property.
15 //
16 // Note: if any shadow has a spread parameter, this will cause the mixin
17 // to emit the shadow declaration twice, first without the spread,
18 // then with the spread included. This allows you to progressively
19 // enhance the browsers that do support the spread parameter.
20 @mixin text-shadow(
21 $shadow-1 : default,
22 $shadow-2 : false,
23 $shadow-3 : false,
24 $shadow-4 : false,
25 $shadow-5 : false,
26 $shadow-6 : false,
27 $shadow-7 : false,
28 $shadow-8 : false,
29 $shadow-9 : false,
30 $shadow-10: false
31 ) {
32 @if $shadow-1 == default {
33 $shadow-1: compact($default-text-shadow-h-offset $default-text-shadow-v-offset $default-text-shadow-blur $default-text-shadow-spread $default-text-shadow-color);
34 }
35 $shadows-without-spread: join((),(),comma);
36 $shadows: join((),(),comma);
37 $has-spread: false;
38 @each $shadow in compact($shadow-1, $shadow-2, $shadow-3, $shadow-4, $shadow-5,
39 $shadow-6, $shadow-7, $shadow-8, $shadow-9, $shadow-10) {
40 @if length($shadow) > 4 {
41 $has-spread: true;
42 $shadows-without-spread: append($shadows-without-spread, nth($shadow,1) nth($shadow,2) nth($shadow,3) nth($shadow,5));
43 $shadows: append($shadows, $shadow);
44 } else {
45 $shadows-without-spread: append($shadows-without-spread, $shadow);
46 $shadows: append($shadows, $shadow);
47 }
48 }
49 @if $has-spread {
50 text-shadow: $shadows-without-spread;
51 }
52 text-shadow: $shadows;
53 }
54
55 // Provides a single cross-browser CSS text shadow.
56 //
57 // Provides sensible defaults for the color, horizontal offset, vertical offset, blur, and spread
58 // according to the configuration defaults above.
59 @mixin single-text-shadow(
60 $hoff: false,
61 $voff: false,
62 $blur: false,
63 $spread: false,
64 $color: false
65 ) {
66 // A lot of people think the color comes first. It doesn't.
67 @if type-of($hoff) == color {
68 $temp-color: $hoff;
69 $hoff: $voff;
70 $voff: $blur;
71 $blur: $spread;
72 $spread: $color;
73 $color: $temp-color;
74 }
75 // Can't rely on default assignment with multiple supported argument orders.
76 $hoff: if($hoff, $hoff, $default-text-shadow-h-offset);
77 $voff: if($voff, $voff, $default-text-shadow-v-offset);
78 $blur: if($blur, $blur, $default-text-shadow-blur );
79 $spread: if($spread, $spread, $default-text-shadow-spread );
80 $color: if($color, $color, $default-text-shadow-color );
81 // We don't need experimental support for this property.
82 @if $color == none or $hoff == none {
83 @include text-shadow(none);
84 } @else {
85 @include text-shadow(compact($hoff $voff $blur $spread $color));
86 }
87 }
88
forum/static/css/compass/css3/_transform-legacy.scss
File was created 1 @import "shared";
2
3 @warn "This version of the transform module has been deprecated and will be removed.";
4
5 // CSS Transform and Transform-Origin
6
7 // Apply a transform sent as a complete string.
8
9 @mixin apply-transform($transform) {
10 @include experimental(transform, $transform,
11 -moz, -webkit, -o, not -ms, not -khtml, official
12 );
13 }
14
15 // Apply a transform-origin sent as a complete string.
16
17 @mixin apply-origin($origin) {
18 @include experimental(transform-origin, $origin,
19 -moz, -webkit, -o, not -ms, not -khtml, official
20 );
21 }
22
23 // transform-origin requires x and y coordinates
24 //
25 // * only applies the coordinates if they are there so that it can be called by scale, rotate and skew safely
26
27 @mixin transform-origin($originx: 50%, $originy: 50%) {
28 @if $originx or $originy {
29 @if $originy {
30 @include apply-origin($originx or 50% $originy);
31 } @else {
32 @include apply-origin($originx);
33 }
34 }
35 }
36
37 // A full transform mixin with everything you could want
38 //
39 // * including origin adjustments if you want them
40 // * scale, rotate and skew require units of degrees(deg)
41 // * scale takes a multiplier, rotate and skew take degrees
42
43 @mixin transform(
44 $scale: 1,
45 $rotate: 0deg,
46 $transx: 0,
47 $transy: 0,
48 $skewx: 0deg,
49 $skewy: 0deg,
50 $originx: false,
51 $originy: false
52 ) {
53 $transform : scale($scale) rotate($rotate) translate($transx, $transy) skew($skewx, $skewy);
54 @include apply-transform($transform);
55 @include transform-origin($originx, $originy);
56 }
57
58 // Transform Partials
59 //
60 // These work well on their own, but they don't add to each other, they override.
61 // Use them with extra origin args, or along side +transform-origin
62
63 // Adjust only the scale, with optional origin coordinates
64
65 @mixin scale($scale: 1.25, $originx: false, $originy: false) {
66 @include apply-transform(scale($scale));
67 @include transform-origin($originx, $originy);
68 }
69
70 // Adjust only the rotation, with optional origin coordinates
71
72 @mixin rotate($rotate: 45deg, $originx: false, $originy: false) {
73 @include apply-transform(rotate($rotate));
74 @include transform-origin($originx, $originy);
75 }
76
77 // Adjust only the translation
78
79 @mixin translate($transx: 0, $transy: 0) {
80 @include apply-transform(translate($transx, $transy));
81 }
82
83 // Adjust only the skew, with optional origin coordinates
84 @mixin skew($skewx: 0deg, $skewy: 0deg, $originx: false, $originy: false) {
85 @include apply-transform(skew($skewx, $skewy));
86 @include transform-origin($originx, $originy);
87 }
88
forum/static/css/compass/css3/_transform.scss
File was created 1 @import "shared";
2
3 // @doc off
4 // Note ----------------------------------------------------------------------
5 // Safari, Chrome, and Firefox all support 3D transforms. However,
6 // only in the most recent builds. You should also provide fallback 2d support for
7 // Opera and IE. IE10 is slated to have 3d enabled, but is currently unreleased.
8 // To make that easy, all 2D transforms include an browser-targeting toggle ($only3d)
9 // to switch between the two support lists. The toggle defaults to 'false' (2D),
10 // and also accepts 'true' (3D). Currently the lists are as follows:
11 // 2D: Mozilla, Webkit, Opera, Official
12 // 3D: Webkit, Firefox.
13
14 // Available Transforms ------------------------------------------------------
15 // - Scale (2d and 3d)
16 // - Rotate (2d and 3d)
17 // - Translate (2d and 3d)
18 // - Skew (2d only)
19
20 // Transform Parameters ------------------------------------------------------
21 // - Transform Origin (2d and 3d)
22 // - Perspective (3d)
23 // - Perspective Origin (3d)
24 // - Transform Style (3d)
25 // - Backface Visibility (3d)
26
27 // Mixins --------------------------------------------------------------------
28 // transform-origin
29 // - shortcuts: transform-origin2d, transform-origin3d
30 // - helpers: apply-origin
31 // transform
32 // - shortcuts: transform2d, transform3d
33 // - helpers: simple-transform, create-transform
34 // perspective
35 // - helpers: perspective-origin
36 // transform-style
37 // backface-visibility
38 // scale
39 // - shortcuts: scaleX, scaleY, scaleZ, scale3d
40 // rotate
41 // - shortcuts: rotateX, rotateY, rotate3d
42 // translate
43 // - shortcuts: translateX, translateY, translateZ, translate3d
44 // skew
45 // - shortcuts: skewX, skewY
46
47 // Defaults ------------------------------------------------------------------
48 // @doc on
49
50 // The default x-origin for transforms
51 $default-origin-x : 50% !default;
52 // The default y-origin for transforms
53 $default-origin-y : 50% !default;
54 // The default z-origin for transforms
55 $default-origin-z : 50% !default;
56
57
58 // The default x-multiplier for scaling
59 $default-scale-x : 1.25 !default;
60 // The default y-multiplier for scaling
61 $default-scale-y : $default-scale-x !default;
62 // The default z-multiplier for scaling
63 $default-scale-z : $default-scale-x !default;
64
65
66 // The default angle for rotations
67 $default-rotate : 45deg !default;
68
69
70 // The default x-vector for the axis of 3d rotations
71 $default-vector-x : 1 !default;
72 // The default y-vector for the axis of 3d rotations
73 $default-vector-y : 1 !default;
74 // The default z-vector for the axis of 3d rotations
75 $default-vector-z : 1 !default;
76
77
78 // The default x-length for translations
79 $default-translate-x : 1em !default;
80 // The default y-length for translations
81 $default-translate-y : $default-translate-x !default;
82 // The default z-length for translations
83 $default-translate-z : $default-translate-x !default;
84
85
86 // The default x-angle for skewing
87 $default-skew-x : 5deg !default;
88 // The default y-angle for skewing
89 $default-skew-y : 5deg !default;
90
91
92 // **Transform-origin**
93 // Transform-origin sent as a complete string
94 //
95 // @include apply-origin( origin [, 3D-only ] )
96 //
97 // where 'origin' is a space separated list containing 1-3 (x/y/z) coordinates
98 // in percentages, absolute (px, cm, in, em etc..) or relative
99 // (left, top, right, bottom, center) units
100 //
101 // @param only3d Set this to true to only apply this
102 // mixin where browsers have 3D support.
103 @mixin apply-origin($origin, $only3d) {
104 $only3d: $only3d or -compass-list-size(-compass-list($origin)) > 2;
105 @if $only3d {
106 @include experimental(transform-origin, $origin,
107 -moz, -webkit, -o, -ms, not -khtml, official
108 );
109 } @else {
110 @include experimental(transform-origin, $origin,
111 -moz, -webkit, -o, -ms, not -khtml, official
112 );
113 }
114 }
115
116 // Transform-origin sent as individual arguments:
117 //
118 // @include transform-origin( [ origin-x, origin-y, origin-z, 3D-only ] )
119 //
120 // where the 3 'origin-' arguments represent x/y/z coordinates.
121 //
122 // **NOTE:** setting z coordinates triggers 3D support list, leave false for 2D support
123 @mixin transform-origin(
124 $origin-x: $default-origin-x,
125 $origin-y: $default-origin-y,
126 $origin-z: false,
127 $only3d: if($origin-z, true, false)
128 ) {
129 $origin: unquote('');
130 @if $origin-x or $origin-y or $origin-z {
131 @if $origin-x { $origin: $origin-x; } @else { $origin: 50%; }
132 @if $origin-y { $origin: $origin $origin-y; } @else { @if $origin-z { $origin: $origin 50%; }}
133 @if $origin-z { $origin: $origin $origin-z; }
134 @include apply-origin($origin, $only3d);
135 }
136 }
137
138
139 // Transform sent as a complete string:
140 //
141 // @include transform( transforms [, 3D-only ] )
142 //
143 // where 'transforms' is a space separated list of all the transforms to be applied.
144 @mixin transform(
145 $transform,
146 $only3d: false
147 ) {
148 @if $only3d {
149 @include experimental(transform, $transform,
150 -moz, -webkit, -o, -ms, not -khtml, official
151 );
152 } @else {
153 @include experimental(transform, $transform,
154 -moz, -webkit, -o, -ms, not -khtml, official
155 );
156 }
157 }
158
159 // Shortcut to target all browsers with 2D transform support
160 @mixin transform2d($trans) {
161 @include transform($trans, false);
162 }
163
164 // Shortcut to target only browsers with 3D transform support
165 @mixin transform3d($trans) {
166 @include transform($trans, true);
167 }
168
169 // @doc off
170 // 3D Parameters -------------------------------------------------------------
171 // @doc on
172
173 // Set the perspective of 3D transforms on the children of an element:
174 //
175 // @include perspective( perspective )
176 //
177 // where 'perspective' is a unitless number representing the depth of the
178 // z-axis. The higher the perspective, the more exaggerated the foreshortening.
179 // values from 500 to 1000 are more-or-less "normal" - a good starting-point.
180 @mixin perspective($p) {
181 @include experimental(perspective, $p,
182 -moz, -webkit, -o, -ms, not -khtml, official
183 );
184 }
185
186 // Set the origin position for the perspective
187 //
188 // @include perspective-origin(origin-x [origin-y])
189 //
190 // where the two arguments represent x/y coordinates
191 @mixin perspective-origin($origin: 50%) {
192 @include experimental(perspective-origin, $origin,
193 -moz, -webkit, -o, -ms, not -khtml, official
194 );
195 }
196
197 // Determine whether a 3D objects children also live in the given 3D space
198 //
199 // @include transform-style( [ style ] )
200 //
201 // where `style` can be either `flat` or `preserve-3d`.
202 // Browsers default to `flat`, mixin defaults to `preserve-3d`.
203 @mixin transform-style($style: preserve-3d) {
204 @include experimental(transform-style, $style,
205 -moz, -webkit, -o, -ms, not -khtml, official
206 );
207 }
208
209 // Determine the visibility of an element when it's back is turned
210 //
211 // @include backface-visibility( [ visibility ] )
212 //
213 // where `visibility` can be either `visible` or `hidden`.
214 // Browsers default to visible, mixin defaults to hidden
215 @mixin backface-visibility($visibility: hidden) {
216 @include experimental(backface-visibility, $visibility,
217 -moz, -webkit, -o, -ms, not -khtml, official
218 );
219 }
220
221 // @doc off
222 // Transform Partials --------------------------------------------------------
223 // These work well on their own, but they don't add to each other, they override.
224 // Use along with transform parameter mixins to adjust origin, perspective and style
225 // ---------------------------------------------------------------------------
226
227
228 // Scale ---------------------------------------------------------------------
229 // @doc on
230
231 // Scale an object along the x and y axis:
232 //
233 // @include scale( [ scale-x, scale-y, perspective, 3D-only ] )
234 //
235 // where the 'scale-' arguments are unitless multipliers of the x and y dimensions
236 // and perspective, which works the same as the stand-alone perspective property/mixin
237 // but applies to the individual element (multiplied with any parent perspective)
238 //
239 // **Note** This mixin cannot be combined with other transform mixins.
240 @mixin scale(
241 $scale-x: $default-scale-x,
242 $scale-y: $scale-x,
243 $perspective: false,
244 $only3d: false
245 ) {
246 $trans: scale($scale-x, $scale-y);
247 @if $perspective { $trans: perspective($perspective) $trans; }
248 @include transform($trans, $only3d);
249 }
250
251 // Scale an object along the x axis
252 // @include scaleX( [ scale-x, perspective, 3D-only ] )
253 //
254 // **Note** This mixin cannot be combined with other transform mixins.
255 @mixin scaleX(
256 $scale: $default-scale-x,
257 $perspective: false,
258 $only3d: false
259 ) {
260 $trans: scaleX($scale);
261 @if $perspective { $trans: perspective($perspective) $trans; }
262 @include transform($trans, $only3d);
263 }
264
265 // Scale an object along the y axis
266 // @include scaleY( [ scale-y, perspective, 3D-only ] )
267 //
268 // **Note** This mixin cannot be combined with other transform mixins.
269 @mixin scaleY(
270 $scale: $default-scale-y,
271 $perspective: false,
272 $only3d: false
273 ) {
274 $trans: scaleY($scale);
275 @if $perspective { $trans: perspective($perspective) $trans; }
276 @include transform($trans, $only3d);
277 }
278
279 // Scale an object along the z axis
280 // @include scaleZ( [ scale-z, perspective ] )
281 //
282 // **Note** This mixin cannot be combined with other transform mixins.
283 @mixin scaleZ(
284 $scale: $default-scale-z,
285 $perspective: false
286 ) {
287 $trans: scaleZ($scale);
288 @if $perspective { $trans: perspective($perspective) $trans; }
289 @include transform3d($trans);
290 }
291
292 // Scale and object along all three axis
293 // @include scale3d( [ scale-x, scale-y, scale-z, perspective ] )
294 //
295 // **Note** This mixin cannot be combined with other transform mixins.
296 @mixin scale3d(
297 $scale-x: $default-scale-x,
298 $scale-y: $default-scale-y,
299 $scale-z: $default-scale-z,
300 $perspective: false
301 ) {
302 $trans: scale3d($scale-x, $scale-y, $scale-z);
303 @if $perspective { $trans: perspective($perspective) $trans; }
304 @include transform3d($trans);
305 }
306
307 // @doc off
308 // Rotate --------------------------------------------------------------------
309 // @doc on
310
311 // Rotate an object around the z axis (2D)
312 // @include rotate( [ rotation, perspective, 3D-only ] )
313 // where 'rotation' is an angle set in degrees (deg) or radian (rad) units
314 //
315 // **Note** This mixin cannot be combined with other transform mixins.
316 @mixin rotate(
317 $rotate: $default-rotate,
318 $perspective: false,
319 $only3d: false
320 ) {
321 $trans: rotate($rotate);
322 @if $perspective { $trans: perspective($perspective) $trans; }
323 @include transform($trans, $only3d);
324 }
325
326 // A longcut for 'rotate' in case you forget that 'z' is implied
327 //
328 // **Note** This mixin cannot be combined with other transform mixins.
329 @mixin rotateZ(
330 $rotate: $default-rotate,
331 $perspective: false,
332 $only3d: false
333 ) {
334 @include rotate($rotate, $perspective, $only3d);
335 }
336
337 // Rotate an object around the x axis (3D)
338 // @include rotateX( [ rotation, perspective ] )
339 //
340 // **Note** This mixin cannot be combined with other transform mixins.
341 @mixin rotateX(
342 $rotate: $default-rotate,
343 $perspective: false
344 ) {
345 $trans: rotateX($rotate);
346 @if $perspective { $trans: perspective($perspective) $trans; }
347 @include transform3d($trans);
348 }
349
350 // Rotate an object around the y axis (3D)
351 // @include rotate( [ rotation, perspective ] )
352 //
353 // **Note** This mixin cannot be combined with other transform mixins.
354 @mixin rotateY(
355 $rotate: $default-rotate,
356 $perspective: false
357 ) {
358 $trans: rotateY($rotate);
359 @if $perspective { $trans: perspective($perspective) $trans; }
360 @include transform3d($trans);
361 }
362
363 // Rotate an object around an arbitrary axis (3D)
364 // @include rotate( [ vector-x, vector-y, vector-z, rotation, perspective ] )
365 // where the 'vector-' arguments accept unitless numbers.
366 // These numbers are not important on their own, but in relation to one another
367 // creating an axis from your transform-origin, along the axis of Xx = Yy = Zz.
368 //
369 // **Note** This mixin cannot be combined with other transform mixins.
370 @mixin rotate3d(
371 $vector-x: $default-vector-x,
372 $vector-y: $default-vector-y,
373 $vector-z: $default-vector-z,
374 $rotate: $default-rotate,
375 $perspective: false
376 ) {
377 $trans: rotate3d($vector-x, $vector-y, $vector-z, $rotate);
378 @if $perspective { $trans: perspective($perspective) $trans; }
379 @include transform3d($trans);
380 }
381
382 // @doc off
383 // Translate -----------------------------------------------------------------
384 // @doc on
385
386 // Move an object along the x or y axis (2D)
387 // @include translate( [ translate-x, translate-y, perspective, 3D-only ] )
388 // where the 'translate-' arguments accept any distance in percentages or absolute (px, cm, in, em etc..) units.
389 //
390 // **Note** This mixin cannot be combined with other transform mixins.
391 @mixin translate(
392 $translate-x: $default-translate-x,
393 $translate-y: $default-translate-y,
394 $perspective: false,
395 $only3d: false
396 ) {
397 $trans: translate($translate-x, $translate-y);
398 @if $perspective { $trans: perspective($perspective) $trans; }
399 @include transform($trans, $only3d);
400 }
401
402 // Move an object along the x axis (2D)
403 // @include translate( [ translate-x, perspective, 3D-only ] )
404 //
405 // **Note** This mixin cannot be combined with other transform mixins.
406 @mixin translateX(
407 $trans-x: $default-translate-x,
408 $perspective: false,
409 $only3d: false
410 ) {
411 $trans: translateX($trans-x);
412 @if $perspective { $trans: perspective($perspective) $trans; }
413 @include transform($trans, $only3d);
414 }
415
416 // Move an object along the y axis (2D)
417 // @include translate( [ translate-y, perspective, 3D-only ] )
418 //
419 // **Note** This mixin cannot be combined with other transform mixins.
420 @mixin translateY(
421 $trans-y: $default-translate-y,
422 $perspective: false,
423 $only3d: false
424 ) {
425 $trans: translateY($trans-y);
426 @if $perspective { $trans: perspective($perspective) $trans; }
427 @include transform($trans, $only3d);
428 }
429
430 // Move an object along the z axis (3D)
431 // @include translate( [ translate-z, perspective ] )
432 //
433 // **Note** This mixin cannot be combined with other transform mixins.
434 @mixin translateZ(
435 $trans-z: $default-translate-z,
436 $perspective: false
437 ) {
438 $trans: translateZ($trans-z);
439 @if $perspective { $trans: perspective($perspective) $trans; }
440 @include transform3d($trans);
441 }
442
443 // Move an object along the x, y and z axis (3D)
444 // @include translate( [ translate-x, translate-y, translate-z, perspective ] )
445 //
446 // **Note** This mixin cannot be combined with other transform mixins.
447 @mixin translate3d(
448 $translate-x: $default-translate-x,
449 $translate-y: $default-translate-y,
450 $translate-z: $default-translate-z,
451 $perspective: false
452 ) {
453 $trans: translate3d($translate-x, $translate-y, $translate-z);
454 @if $perspective { $trans: perspective($perspective) $trans; }
455 @include transform3d($trans);
456 }
457
458 // @doc off
459 // Skew ----------------------------------------------------------------------
460 // @doc on
461
462 // Skew an element:
463 //
464 // @include skew( [ skew-x, skew-y, 3D-only ] )
465 //
466 // where the 'skew-' arguments accept css angles in degrees (deg) or radian (rad) units.
467 //
468 // **Note** This mixin cannot be combined with other transform mixins.
469 @mixin skew(
470 $skew-x: $default-skew-x,
471 $skew-y: $default-skew-y,
472 $only3d: false
473 ) {
474 $trans: skew($skew-x, $skew-y);
475 @include transform($trans, $only3d);
476 }
477
478 // Skew an element along the x axiz
479 //
480 // @include skew( [ skew-x, 3D-only ] )
481 //
482 // **Note** This mixin cannot be combined with other transform mixins.
483 @mixin skewX(
484 $skew-x: $default-skew-x,
485 $only3d: false
486 ) {
487 $trans: skewX($skew-x);
488 @include transform($trans, $only3d);
489 }
490
491 // Skew an element along the y axis
492 //
493 // @include skew( [ skew-y, 3D-only ] )
494 //
495 // **Note** This mixin cannot be combined with other transform mixins.
496 @mixin skewY(
497 $skew-y: $default-skew-y,
498 $only3d: false
499 ) {
500 $trans: skewY($skew-y);
501 @include transform($trans, $only3d);
502 }
503
504
505 // Full transform mixins
506 // For settings any combination of transforms as arguments
507 // These are complex and not highly recommended for daily use. They are mainly
508 // here for backward-compatibility purposes.
509 //
510 // * they include origin adjustments
511 // * scale takes a multiplier (unitless), rotate and skew take degrees (deg)
512 //
513 // **Note** This mixin cannot be combined with other transform mixins.
514 @mixin create-transform(
515 $perspective: false,
516 $scale-x: false,
517 $scale-y: false,
518 $scale-z: false,
519 $rotate-x: false,
520 $rotate-y: false,
521 $rotate-z: false,
522 $rotate3d: false,
523 $trans-x: false,
524 $trans-y: false,
525 $trans-z: false,
526 $skew-x: false,
527 $skew-y: false,
528 $origin-x: false,
529 $origin-y: false,
530 $origin-z: false,
531 $only3d: false
532 ) {
533 $trans: unquote("");
534
535 // perspective
536 @if $perspective { $trans: perspective($perspective) ; }
537
538 // scale
539 @if $scale-x and $scale-y {
540 @if $scale-z { $trans: $trans scale3d($scale-x, $scale-y, $scale-z); }
541 @else { $trans: $trans scale($scale-x, $scale-y); }
542 } @else {
543 @if $scale-x { $trans: $trans scaleX($scale-x); }
544 @if $scale-y { $trans: $trans scaleY($scale-y); }
545 @if $scale-z { $trans: $trans scaleZ($scale-z); }
546 }
547
548 // rotate
549 @if $rotate-x { $trans: $trans rotateX($rotate-x); }
550 @if $rotate-y { $trans: $trans rotateY($rotate-y); }
551 @if $rotate-z { $trans: $trans rotateZ($rotate-z); }
552 @if $rotate3d { $trans: $trans rotate3d($rotate3d); }
553
554 // translate
555 @if $trans-x and $trans-y {
556 @if $trans-z { $trans: $trans translate3d($trans-x, $trans-y, $trans-z); }
557 @else { $trans: $trans translate($trans-x, $trans-y); }
558 } @else {
559 @if $trans-x { $trans: $trans translateX($trans-x); }
560 @if $trans-y { $trans: $trans translateY($trans-y); }
561 @if $trans-z { $trans: $trans translateZ($trans-z); }
562 }
563
564 // skew
565 @if $skew-x and $skew-y { $trans: $trans skew($skew-x, $skew-y); }
566 @else {
567 @if $skew-x { $trans: $trans skewX($skew-x); }
568 @if $skew-y { $trans: $trans skewY($skew-y); }
569 }
570
571 // apply it!
572 @include transform($trans, $only3d);
573 @include transform-origin($origin-x, $origin-y, $origin-z, $only3d);
574 }
575
576
577 // A simplified set of options
578 // backwards-compatible with the previous version of the 'transform' mixin
579 @mixin simple-transform(
580 $scale: false,
581 $rotate: false,
582 $trans-x: false,
583 $trans-y: false,
584 $skew-x: false,
585 $skew-y: false,
586 $origin-x: false,
587 $origin-y: false
588 ) {
589 @include create-transform(
590 false,
591 $scale, $scale, false,
592 false, false, $rotate, false,
593 $trans-x, $trans-y, false,
594 $skew-x, $skew-y,
595 $origin-x, $origin-y, false,
596 false
597 );
598 }
599
forum/static/css/compass/css3/_transition.scss
File was created 1 @import "shared";
2
3 // CSS Transitions
4 // Currently only works in Webkit.
5 //
6 // * expected in CSS3, FireFox 3.6/7 and Opera Presto 2.3
7 // * We'll be prepared.
8 //
9 // Including this submodule sets following defaults for the mixins:
10 //
11 // $default-transition-property : all
12 // $default-transition-duration : 1s
13 // $default-transition-function : false
14 // $default-transition-delay : false
15 //
16 // Override them if you like. Timing-function and delay are set to false for browser defaults (ease, 0s).
17
18 $default-transition-property: all !default;
19
20 $default-transition-duration: 1s !default;
21
22 $default-transition-function: false !default;
23
24 $default-transition-delay: false !default;
25
26 $transitionable-prefixed-values: transform, transform-origin !default;
27
28 // One or more properties to transition
29 //
30 // * for multiple, use a comma-delimited list
31 // * also accepts "all" or "none"
32
33 @mixin transition-property($property-1: $default-transition-property,
34 $property-2 : false,
35 $property-3 : false,
36 $property-4 : false,
37 $property-5 : false,
38 $property-6 : false,
39 $property-7 : false,
40 $property-8 : false,
41 $property-9 : false,
42 $property-10: false
43 ) {
44 @if type-of($property-1) == string { $property-1: unquote($property-1); }
45 $properties: compact($property-1, $property-2, $property-3, $property-4, $property-5, $property-6, $property-7, $property-8, $property-9, $property-10);
46 @if $experimental-support-for-webkit { -webkit-transition-property : prefixed-for-transition(-webkit, $properties); }
47 @if $experimental-support-for-mozilla { -moz-transition-property : prefixed-for-transition(-moz, $properties); }
48 @if $experimental-support-for-opera { -o-transition-property : prefixed-for-transition(-o, $properties); }
49 transition-property : $properties;
50 }
51
52 // One or more durations in seconds
53 //
54 // * for multiple, use a comma-delimited list
55 // * these durations will affect the properties in the same list position
56
57 @mixin transition-duration($duration-1: $default-transition-duration,
58 $duration-2 : false,
59 $duration-3 : false,
60 $duration-4 : false,
61 $duration-5 : false,
62 $duration-6 : false,
63 $duration-7 : false,
64 $duration-8 : false,
65 $duration-9 : false,
66 $duration-10: false
67 ) {
68 @if type-of($duration-1) == string { $duration-1: unquote($duration-1); }
69 $durations: compact($duration-1, $duration-2, $duration-3, $duration-4, $duration-5, $duration-6, $duration-7, $duration-8, $duration-9, $duration-10);
70 @include experimental(transition-duration, $durations,
71 -moz, -webkit, -o, not -ms, not -khtml, official
72 );
73 }
74
75 // One or more timing functions
76 //
77 // * [ ease | linear | ease-in | ease-out | ease-in-out | cubic-bezier(x1, y1, x2, y2)]
78 // * For multiple, use a comma-delimited list
79 // * These functions will effect the properties in the same list position
80
81 @mixin transition-timing-function($function-1: $default-transition-function,
82 $function-2 : false,
83 $function-3 : false,
84 $function-4 : false,
85 $function-5 : false,
86 $function-6 : false,
87 $function-7 : false,
88 $function-8 : false,
89 $function-9 : false,
90 $function-10: false
91 ) {
92 $function-1: unquote($function-1);
93 $functions: compact($function-1, $function-2, $function-3, $function-4, $function-5, $function-6, $function-7, $function-8, $function-9, $function-10);
94 @include experimental(transition-timing-function, $functions,
95 -moz, -webkit, -o, not -ms, not -khtml, official
96 );
97 }
98
99 // One or more transition-delays in seconds
100 //
101 // * for multiple, use a comma-delimited list
102 // * these delays will effect the properties in the same list position
103
104 @mixin transition-delay($delay-1: $default-transition-delay,
105 $delay-2 : false,
106 $delay-3 : false,
107 $delay-4 : false,
108 $delay-5 : false,
109 $delay-6 : false,
110 $delay-7 : false,
111 $delay-8 : false,
112 $delay-9 : false,
113 $delay-10: false
114 ) {
115 @if type-of($delay-1) == string { $delay-1: unquote($delay-1); }
116 $delays: compact($delay-1, $delay-2, $delay-3, $delay-4, $delay-5, $delay-6, $delay-7, $delay-8, $delay-9, $delay-10);
117 @include experimental(transition-delay, $delays,
118 -moz, -webkit, -o, not -ms, not -khtml, official
119 );
120 }
121
122 // Transition all-in-one shorthand
123
124 @mixin single-transition(
125 $property: $default-transition-property,
126 $duration: $default-transition-duration,
127 $function: $default-transition-function,
128 $delay: $default-transition-delay
129 ) {
130 @include transition(compact($property $duration $function $delay));
131 }
132
133 @mixin transition(
134 $transition-1 : default,
135 $transition-2 : false,
136 $transition-3 : false,
137 $transition-4 : false,
138 $transition-5 : false,
139 $transition-6 : false,
140 $transition-7 : false,
141 $transition-8 : false,
142 $transition-9 : false,
143 $transition-10: false
144 ) {
145 @if $transition-1 == default {
146 $transition-1 : compact($default-transition-property $default-transition-duration $default-transition-function $default-transition-delay);
147 }
148 $transitions: false;
149 @if type-of($transition-1) == list and type-of(nth($transition-1,1)) == list {
150 $transitions: join($transition-1, compact($transition-2, $transition-3, $transition-4, $transition-5, $transition-6, $transition-7, $transition-8, $transition-9, $transition-10), comma);
151 } @else {
152 $transitions : compact($transition-1, $transition-2, $transition-3, $transition-4, $transition-5, $transition-6, $transition-7, $transition-8, $transition-9, $transition-10);
153 }
154 $delays: comma-list();
155 $has-delays: false;
156 $webkit-value: comma-list();
157 $moz-value: comma-list();
158 $o-value: comma-list();
159
160 // This block can be made considerably simpler at the point in time that
161 // we no longer need to deal with the differences in how delays are treated.
162 @each $transition in $transitions {
163 // Extract the values from the list
164 // (this would be cleaner if nth took a 3rd argument to provide a default value).
165 $property: nth($transition, 1);
166 $duration: false;
167 $timing-function: false;
168 $delay: false;
169 @if length($transition) > 1 { $duration: nth($transition, 2); }
170 @if length($transition) > 2 { $timing-function: nth($transition, 3); }
171 @if length($transition) > 3 { $delay: nth($transition, 4); $has-delays: true; }
172
173 // If a delay is provided without a timing function
174 @if is-time($timing-function) and not $delay { $delay: $timing-function; $timing-function: false; $has-delays: true; }
175
176 // Keep a list of delays in case one is specified
177 $delays: append($delays, if($delay, $delay, 0s));
178
179 $webkit-value: append($webkit-value, compact(prefixed-for-transition(-webkit, $property) $duration $timing-function));
180 $moz-value: append( $moz-value, compact(prefixed-for-transition( -moz, $property) $duration $timing-function $delay));
181 $o-value: append( $o-value, compact(prefixed-for-transition( -o, $property) $duration $timing-function $delay));
182 }
183
184 @if $experimental-support-for-webkit { -webkit-transition : $webkit-value;
185 // old webkit doesn't support the delay parameter in the shorthand so we progressively enhance it.
186 @if $has-delays { -webkit-transition-delay : $delays; } }
187 @if $experimental-support-for-mozilla { -moz-transition : $moz-value; }
188 @if $experimental-support-for-opera { -o-transition : $o-value; }
189 transition : $transitions;
190 }
191
192 // coerce a list to be comma delimited or make a new, empty comma delimited list.
193 @function comma-list($list: ()) {
194 @return join((), $list, comma);
195 }
196
197 // Returns `$property` with the given prefix if it is found in `$transitionable-prefixed-values`.
198 @function prefixed-for-transition($prefix, $property) {
199 @if type-of($property) == list {
200 $new-list: comma-list();
201 @each $v in $property {
202 $new-list: append($new-list, prefixed-for-transition($prefix, $v));
203 }
204 @return $new-list;
205 } @else {
206 @if index($transitionable-prefixed-values, $property) {
207 @return #{$prefix}-#{$property};
208 } @else {
209 @return $property;
210 }
211 }
212 }
213
214 // Checks if the value given is a unit of time.
215 @function is-time($value) {
216 @if type-of($value) == number {
217 @return not not index(s ms, unit($value));
218 } @else {
219 @return false;
220 }
221 }
222
forum/static/css/compass/css3/_user-interface.scss
File was created 1 // User Interface ------------------------------------------------------------
2 // This file can be expanded to handle all the user interface properties as
3 // they become available in browsers:
4 // http://www.w3.org/TR/2000/WD-css3-userint-20000216
5 @import "shared";
6
7
8 // This property controls the selection model and granularity of an element.
9 //
10 // @param $select
11 // [ none | text | toggle | element | elements | all | inherit ]
12 @mixin user-select($select) {
13 $select: unquote($select);
14 @include experimental(user-select, $select,
15 -moz, -webkit, not -o, not -ms, -khtml, official
16 );
17 }
18
forum/static/css/compass/layout/_grid-background.scss
File was created 1 @import "compass/css3/images";
2 @import "compass/css3/background-size";
3
4 // Set the color of your columns
5 $grid-background-column-color : rgba(100, 100, 225, 0.25) !default;
6 // Set the color of your gutters
7 $grid-background-gutter-color : rgba(0, 0, 0, 0) !default;
8
9 // Set the total number of columns in your grid
10 $grid-background-total-columns : 24 !default;
11 // Set the width of your columns
12 $grid-background-column-width : 30px !default;
13 // Set the width of your gutters
14 $grid-background-gutter-width : 10px !default;
15 // Set the offset, if your columns are padded in from the container edge
16 $grid-background-offset : 0px !default;
17
18 // Set the color of your baseline
19 $grid-background-baseline-color : rgba(0, 0, 0, 0.5) !default;
20 // Set the height of your baseline grid
21 $grid-background-baseline-height : 1.5em !default;
22
23 // toggle your columns grids on and off
24 $show-column-grid-backgrounds : true !default;
25 // toggle your vertical grids on and off
26 $show-baseline-grid-backgrounds : true !default;
27 // toggle all your grids on and off
28 $show-grid-backgrounds : true !default;
29
30 // optionally force your grid-image to remain fluid
31 // no matter what units you used to declared your grid.
32 $grid-background-force-fluid : false !default;
33
34
35 // Create the gradient needed for baseline grids
36 @function get-baseline-gradient(
37 $color : $grid-background-baseline-color
38 ) {
39 $gradient: linear-gradient(bottom, $color 5%, rgba($color,0) 5%);
40 @return $gradient;
41 }
42
43 // Create the color-stops needed for horizontal grids
44 @function build-grid-background(
45 $total : $grid-background-total-columns,
46 $column : $grid-background-column-width,
47 $gutter : $grid-background-gutter-width,
48 $offset : $grid-background-offset,
49 $column-color : $grid-background-column-color,
50 $gutter-color : $grid-background-gutter-color
51 ) {
52 $grid: compact();
53 $grid: append($grid, $gutter-color $offset, comma);
54 @for $i from 0 to $total {
55
56 // $a represents the start of this column, initially equal to the offset
57 $a: $offset;
58 @if $i > 0 { $a: $a + (($column + $gutter) * $i); }
59
60 // $g represents the start of this gutter, equal to $a plus one column-width
61 $g: $a + $column;
62
63 // $z represents the end of a gutter, equal to $g plus one gutter-width
64 $z: $g + $gutter;
65
66 @if (unit($a) == "%") and ($i == ($total - 1)) {
67 $z: 100%;
68 }
69
70 // and we add this column/gutter pair to our grid
71 $grid: join($grid, ($column-color $a, $column-color $g, $gutter-color $g, $gutter-color $z));
72 }
73
74 @return $grid;
75 }
76
77 // Return the gradient needed for horizontal grids
78 @function get-column-gradient(
79 $total : $grid-background-total-columns,
80 $column : $grid-background-column-width,
81 $gutter : $grid-background-gutter-width,
82 $offset : $grid-background-offset,
83 $column-color : $grid-background-column-color,
84 $gutter-color : $grid-background-gutter-color,
85 $force-fluid : $grid-background-force-fluid
86 ) {
87 $grid: unquote("");
88
89 // don't force fluid grids when they are already fluid.
90 @if unit($column) == "%" { $force-fluid: false; }
91
92 @if $force-fluid {
93 $grid: get-column-fluid-grid($total,$column,$gutter,$offset,$column-color,$gutter-color);
94 } @else {
95 $grid: build-grid-background($total,$column,$gutter,$offset,$column-color,$gutter-color);
96 }
97
98 // return the horizontal grid as a gradient
99 $gradient: linear-gradient(left, $grid);
100 @return $gradient;
101 }
102
103 // Convert a grid from fixed units into percentages.
104 @function get-column-fluid-grid(
105 $total : $grid-background-total-columns,
106 $column : $grid-background-column-width,
107 $gutter : $grid-background-gutter-width,
108 $offset : $grid-background-offset,
109 $column-color : $grid-background-column-color,
110 $gutter-color : $grid-background-gutter-color
111 ) {
112 $context: ($column * $total) + ($gutter * ($total - 1) + ($offset * 2));
113 $offset: $offset / $context * 100%;
114 $column: $column / $context * 100%;
115 $gutter: $gutter / $context * 100%;
116
117 // return the horizontal grid as a set of color-stops
118 $grid: build-grid-background($total,$column,$gutter,$offset,$column-color,$gutter-color);
119 @return $grid;
120 }
121
122
123 // Add just the baseline grid to an element's background
124 @mixin baseline-grid-background(
125 $baseline : $grid-background-baseline-height,
126 $color : $grid-background-baseline-color
127 ) {
128 @if $show-grid-backgrounds and $show-baseline-grid-backgrounds {
129 @include background-image(get-baseline-gradient($color));
130 @include background-size(100% $baseline);
131 background-position: left top;
132 }
133 }
134
135 // Add just the horizontal grid to an element's background
136 @mixin column-grid-background(
137 $total : $grid-background-total-columns,
138 $column : $grid-background-column-width,
139 $gutter : $grid-background-gutter-width,
140 $offset : $grid-background-offset,
141 $column-color : $grid-background-column-color,
142 $gutter-color : $grid-background-gutter-color,
143 $force-fluid : $grid-background-force-fluid
144 ) {
145 @if $show-grid-backgrounds and $show-column-grid-backgrounds {
146 @include background-image(
147 get-column-gradient($total,$column,$gutter,$offset,$column-color,$gutter-color, $force-fluid)
148 );
149 background-position: left top;
150 }
151 }
152
153 // Add both horizontal and baseline grids to an element's background
154 @mixin grid-background(
155 $total : $grid-background-total-columns,
156 $column : $grid-background-column-width,
157 $gutter : $grid-background-gutter-width,
158 $baseline : $grid-background-baseline-height,
159 $offset : $grid-background-offset,
160 $column-color : $grid-background-column-color,
161 $gutter-color : $grid-background-gutter-color,
162 $baseline-color : $grid-background-baseline-color,
163 $force-fluid : $grid-background-force-fluid
164 ) {
165 @if $show-grid-backgrounds {
166 @if $show-baseline-grid-backgrounds and $show-column-grid-backgrounds {
167 @include background-image(
168 get-baseline-gradient($baseline-color),
169 get-column-gradient($total,$column,$gutter,$offset,$column-color,$gutter-color, $force-fluid)
170 );
171 @include background-size(100% $baseline, auto);
172 background-position: left top;
173 } @else {
174 @include baseline-grid-background($baseline, $baseline-color);
175 @include column-grid-background($total,$column,$gutter,$offset,$column-color,$gutter-color, $force-fluid);
176 }
177 }
178 }
179
forum/static/css/compass/layout/_sticky-footer.scss
File was created 1 // Based on a [blog post by Ryan Fait](http://ryanfait.com/resources/footer-stick-to-bottom-of-page/).
2 //
3 // Must be mixed into the top level of your stylesheet.
4 //
5 // Footer element must be outside of root wrapper element.
6 //
7 // Footer must be a fixed height.
8
9 @mixin sticky-footer($footer-height, $root-selector: unquote("#root"), $root-footer-selector: unquote("#root_footer"), $footer-selector: unquote("#footer")) {
10 html, body {
11 height: 100%; }
12 #{$root-selector} {
13 clear: both;
14 min-height: 100%;
15 height: auto !important;
16 height: 100%;
17 margin-bottom: -$footer-height;
18 #{$root-footer-selector} {
19 height: $footer-height; } }
20 #{$footer-selector} {
21 clear: both;
22 position: relative;
23 height: $footer-height; } }
24
forum/static/css/compass/layout/_stretching.scss
File was created 1
2 // stretch element height to specified top and bottom position
3
4 @mixin stretch-y($offset-top:0, $offset-bottom:0) {
5 @include stretch($offset-top, false, $offset-bottom, false);
6 }
7
8
9 // stretch element width to specified left and right position
10
11 @mixin stretch-x($offset-left:0, $offset-right:0) {
12 @include stretch(false, $offset-right, false, $offset-left);
13 }
14
15
16 // shorthand to stretch element height and width
17
18 @mixin stretch($offset-top:0, $offset-right:0, $offset-bottom:0, $offset-left:0) {
19 position: absolute;
20 @if $offset-top { top: $offset-top; }
21 @if $offset-bottom { bottom: $offset-bottom; }
22 @if $offset-left { left: $offset-left; }
23 @if $offset-right { right: $offset-right; }
24 }
forum/static/css/compass/reset/_utilities-legacy.scss
File was created 1 // Based on [Eric Meyer's reset](http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/)
2 // Global reset rules.
3 // For more specific resets, use the reset mixins provided below
4 //
5 // *Please Note*: tables still need `cellspacing="0"` in the markup.
6 @mixin global-reset {
7 html, body, div, span, applet, object, iframe,
8 h1, h2, h3, h4, h5, h6, p, blockquote, pre,
9 a, abbr, acronym, address, big, cite, code,
10 del, dfn, em, font, img, ins, kbd, q, s, samp,
11 small, strike, strong, sub, sup, tt, var,
12 dl, dt, dd, ol, ul, li,
13 fieldset, form, label, legend,
14 table, caption, tbody, tfoot, thead, tr, th, td {
15 @include reset-box-model;
16 @include reset-font; }
17 body {
18 @include reset-body; }
19 ol, ul {
20 @include reset-list-style; }
21 table {
22 @include reset-table; }
23 caption, th, td {
24 @include reset-table-cell; }
25 q, blockquote {
26 @include reset-quotation; }
27 a img {
28 @include reset-image-anchor-border; } }
29
30 // Reset all elements within some selector scope. To reset the selector itself,
31 // mixin the appropriate reset mixin for that element type as well. This could be
32 // useful if you want to style a part of your page in a dramatically different way.
33 //
34 // *Please Note*: tables still need `cellspacing="0"` in the markup.
35 @mixin nested-reset {
36 div, span, object, iframe, h1, h2, h3, h4, h5, h6, p,
37 pre, a, abbr, acronym, address, code, del, dfn, em, img,
38 dl, dt, dd, ol, ul, li, fieldset, form, label, legend, caption, tbody, tfoot, thead, tr {
39 @include reset-box-model;
40 @include reset-font; }
41 table {
42 @include reset-table; }
43 caption, th, td {
44 @include reset-table-cell; }
45 q, blockquote {
46 @include reset-quotation; }
47 a img {
48 @include reset-image-anchor-border; } }
49
50 // Reset the box model measurements.
51 @mixin reset-box-model {
52 margin: 0;
53 padding: 0;
54 border: 0;
55 outline: 0; }
56
57 // Reset the font and vertical alignment.
58 @mixin reset-font {
59 font: {
60 weight: inherit;
61 style: inherit;
62 size: 100%;
63 family: inherit; };
64 vertical-align: baseline; }
65
66 // Resets the outline when focus.
67 // For accessibility you need to apply some styling in its place.
68 @mixin reset-focus {
69 outline: 0; }
70
71 // Reset a body element.
72 @mixin reset-body {
73 line-height: 1;
74 color: black;
75 background: white; }
76
77 // Reset the list style of an element.
78 @mixin reset-list-style {
79 list-style: none; }
80
81 // Reset a table
82 @mixin reset-table {
83 border-collapse: separate;
84 border-spacing: 0;
85 vertical-align: middle; }
86
87 // Reset a table cell (`th`, `td`)
88 @mixin reset-table-cell {
89 text-align: left;
90 font-weight: normal;
91 vertical-align: middle; }
92
93 // Reset a quotation (`q`, `blockquote`)
94 @mixin reset-quotation {
95 quotes: "" "";
96 &:before, &:after {
97 content: ""; } }
98
99 // Resets the border.
100 @mixin reset-image-anchor-border {
101 border: none; }
102
103 // Unrecognized elements are displayed inline.
104 // This reset provides a basic reset for html5 elements
105 // so they are rendered correctly in browsers that don't recognize them
106 // and reset in browsers that have default styles for them.
107 @mixin reset-html5 {
108 #{elements-of-type(html5-block)} {
109 @include reset-box-model;
110 display: block; } }
111
112 // Resets the display of inline and block elements to their default display
113 // according to their tag type. Elements that have a default display that varies across
114 // versions of html or browser are not handled here, but this covers the 90% use case.
115 // Usage Example:
116 //
117 // // Turn off the display for both of these classes
118 // .unregistered-only, .registered-only
119 // display: none
120 // // Now turn only one of them back on depending on some other context.
121 // body.registered
122 // +reset-display(".registered-only")
123 // body.unregistered
124 // +reset-display(".unregistered-only")
125 @mixin reset-display($selector: "", $important: false) {
126 #{append-selector(elements-of-type("inline"), $selector)} {
127 @if $important {
128 display: inline !important; }
129 @else {
130 display: inline; } }
131 #{append-selector(elements-of-type("block"), $selector)} {
132 @if $important {
133 display: block !important; }
134 @else {
135 display: block; } } }
136
forum/static/css/compass/reset/_utilities.scss
File was created 1 // Based on [Eric Meyer's reset 2.0](http://meyerweb.com/eric/tools/css/reset/index.html)
2 // Global reset rules.
3 // For more specific resets, use the reset mixins provided below
4 @mixin global-reset {
5 html, body, div, span, applet, object, iframe,
6 h1, h2, h3, h4, h5, h6, p, blockquote, pre,
7 a, abbr, acronym, address, big, cite, code,
8 del, dfn, em, img, ins, kbd, q, s, samp,
9 small, strike, strong, sub, sup, tt, var,
10 b, u, i, center,
11 dl, dt, dd, ol, ul, li,
12 fieldset, form, label, legend,
13 table, caption, tbody, tfoot, thead, tr, th, td,
14 article, aside, canvas, details, embed,
15 figure, figcaption, footer, header, hgroup,
16 menu, nav, output, ruby, section, summary,
17 time, mark, audio, video {
18 @include reset-box-model;
19 @include reset-font; }
20 // Unlike Eric's original reset, we reset the html element to be compatible
21 // with the vertical rhythm mixins.
22 html {
23 @include reset-body; }
24 ol, ul {
25 @include reset-list-style; }
26 table {
27 @include reset-table; }
28 caption, th, td {
29 @include reset-table-cell; }
30 q, blockquote {
31 @include reset-quotation; }
32 a img {
33 @include reset-image-anchor-border; }
34 @include reset-html5; }
35
36 // Reset all elements within some selector scope. To reset the selector itself,
37 // mixin the appropriate reset mixin for that element type as well. This could be
38 // useful if you want to style a part of your page in a dramatically different way.
39 @mixin nested-reset {
40 div, span, applet, object, iframe,
41 h1, h2, h3, h4, h5, h6, p, blockquote, pre,
42 a, abbr, acronym, address, big, cite, code,
43 del, dfn, em, img, ins, kbd, q, s, samp,
44 small, strike, strong, sub, sup, tt, var,
45 b, u, i, center,
46 dl, dt, dd, ol, ul, li,
47 fieldset, form, label, legend,
48 table, caption, tbody, tfoot, thead, tr, th, td,
49 article, aside, canvas, details, embed,
50 figure, figcaption, footer, header, hgroup,
51 menu, nav, output, ruby, section, summary,
52 time, mark, audio, video {
53 @include reset-box-model;
54 @include reset-font; }
55 table {
56 @include reset-table; }
57 caption, th, td {
58 @include reset-table-cell; }
59 q, blockquote {
60 @include reset-quotation; }
61 a img {
62 @include reset-image-anchor-border; } }
63
64 // Reset the box model measurements.
65 @mixin reset-box-model {
66 margin: 0;
67 padding: 0;
68 border: 0; }
69
70 // Reset the font and vertical alignment.
71 @mixin reset-font {
72 font: inherit;
73 font-size: 100%;
74 vertical-align: baseline; }
75
76 // Resets the outline when focus.
77 // For accessibility you need to apply some styling in its place.
78 @mixin reset-focus {
79 outline: 0; }
80
81 // Reset a body element.
82 @mixin reset-body {
83 line-height: 1; }
84
85 // Reset the list style of an element.
86 @mixin reset-list-style {
87 list-style: none; }
88
89 // Reset a table
90 @mixin reset-table {
91 border-collapse: collapse;
92 border-spacing: 0; }
93
94 // Reset a table cell (`th`, `td`)
95 @mixin reset-table-cell {
96 text-align: left;
97 font-weight: normal;
98 vertical-align: middle; }
99
100 // Reset a quotation (`q`, `blockquote`)
101 @mixin reset-quotation {
102 quotes: none;
103 &:before, &:after {
104 content: "";
105 content: none; } }
106
107 // Resets the border.
108 @mixin reset-image-anchor-border {
109 border: none; }
110
111 // Unrecognized elements are displayed inline.
112 // This reset provides a basic reset for block html5 elements
113 // so they are rendered correctly in browsers that don't recognize them
114 // and reset in browsers that have default styles for them.
115 @mixin reset-html5 {
116 #{elements-of-type(html5-block)} {
117 display: block; } }
118
119 // Resets the display of inline and block elements to their default display
120 // according to their tag type. Elements that have a default display that varies across
121 // versions of html or browser are not handled here, but this covers the 90% use case.
122 // Usage Example:
123 //
124 // // Turn off the display for both of these classes
125 // .unregistered-only, .registered-only
126 // display: none
127 // // Now turn only one of them back on depending on some other context.
128 // body.registered
129 // +reset-display(".registered-only")
130 // body.unregistered
131 // +reset-display(".unregistered-only")
132 @mixin reset-display($selector: "", $important: false) {
133 #{append-selector(elements-of-type("inline"), $selector)} {
134 @if $important {
135 display: inline !important; }
136 @else {
137 display: inline; } }
138 #{append-selector(elements-of-type("block"), $selector)} {
139 @if $important {
140 display: block !important; }
141 @else {
142 display: block; } } }
143
forum/static/css/compass/typography/_links.scss
File was created 1 @import "links/hover-link";
2 @import "links/link-colors";
3 @import "links/unstyled-link";
4
forum/static/css/compass/typography/_lists.scss
File was created 1 @import "lists/horizontal-list";
2 @import "lists/inline-list";
3 @import "lists/inline-block-list";
4 @import "lists/bullets";
5
forum/static/css/compass/typography/_text.scss
File was created 1 @import "text/ellipsis";
2 @import "text/nowrap";
3 @import "text/replacement";
4 @import "text/force-wrap";
5
forum/static/css/compass/typography/_vertical_rhythm.scss
File was created 1 @import "compass/layout/grid-background";
2
3 // The base font size.
4 $base-font-size: 16px !default;
5
6 // The base line height determines the basic unit of vertical rhythm.
7 $base-line-height: 24px !default;
8
9 // Set the default border style for rhythm borders.
10 $default-rhythm-border-style: solid !default;
11
12 // The default font size in all browsers.
13 $browser-default-font-size: 16px;
14
15 // Set to false if you want to use absolute pixels in sizing your typography.
16 $relative-font-sizing: true !default;
17
18 // Allows the `adjust-font-size-to` mixin and the `lines-for-font-size` function
19 // to round the line height to the nearest half line height instead of the
20 // nearest integral line height to avoid large spacing between lines.
21 $round-to-nearest-half-line: false !default;
22
23 // Ensure there is at least this many pixels
24 // of vertical padding above and below the text.
25 $min-line-padding: 2px !default;
26
27 // $base-font-size but in your output unit of choice.
28 // Defaults to 1em when `$relative-font-sizing` is true.
29 $font-unit: if($relative-font-sizing, 1em, $base-font-size) !default;
30
31 // The basic unit of font rhythm.
32 $base-rhythm-unit: $base-line-height / $base-font-size * $font-unit;
33
34 // The leader is the amount of whitespace in a line.
35 // It might be useful in your calculations.
36 $base-leader: ($base-line-height - $base-font-size) * $font-unit / $base-font-size;
37
38 // The half-leader is the amount of whitespace above and below a line.
39 // It might be useful in your calculations.
40 $base-half-leader: $base-leader / 2;
41
42 // True if a number has a relative unit.
43 @function relative-unit($number) {
44 @return unit($number) == "%" or unit($number) == "em" or unit($number) == "rem"
45 }
46
47 // True if a number has an absolute unit.
48 @function absolute-unit($number) {
49 @return not (relative-unit($number) or unitless($number));
50 }
51
52 @if $relative-font-sizing and not relative-unit($font-unit) {
53 @warn "$relative-font-sizing is true but $font-unit is set to #{$font-unit} which is not a relative unit.";
54 }
55
56 // Establishes a font baseline for the given font-size.
57 @mixin establish-baseline($font-size: $base-font-size) {
58 // IE 6 refuses to resize fonts set in pixels and it weirdly resizes fonts
59 // whose root is set in ems. So we set the root font size in percentages of
60 // the default font size.
61 * html {
62 font-size: 100% * ($font-size / $browser-default-font-size);
63 }
64 html {
65 font-size: $font-size;
66 @include adjust-leading-to(1, if($relative-font-sizing, $font-size, $base-font-size));
67 }
68 }
69
70 // Resets the line-height to 1 vertical rhythm unit.
71 // Does not work on elements whose font-size is different from $base-font-size.
72 //
73 // @deprecated This mixin will be removed in the next release.
74 // Please use the `adjust-leading-to` mixin instead.
75 @mixin reset-baseline {
76 @include adjust-leading-to(1, if($relative-font-sizing, $base-font-size, $base-font-size));
77 }
78
79 // Show a background image that can be used to debug your alignments.
80 // Include the $img argument if you would rather use your own image than the
81 // Compass default gradient image.
82 @mixin debug-vertical-alignment($img: false) {
83 @if $img {
84 background: image-url($img);
85 } @else {
86 @include baseline-grid-background($base-rhythm-unit);
87 }
88 }
89
90 // Adjust a block to have a different font size and line height to maintain the
91 // rhythm. $lines specifies how many multiples of the baseline rhythm each line
92 // of this font should use up. It does not have to be an integer, but it
93 // defaults to the smallest integer that is large enough to fit the font.
94 // Use $from-size to adjust from a font-size other than the base font-size.
95 @mixin adjust-font-size-to($to-size, $lines: lines-for-font-size($to-size), $from-size: $base-font-size) {
96 @if not $relative-font-sizing and $from-size != $base-font-size {
97 @warn "$relative-font-sizing is false but a relative font size was passed to adjust-font-size-to";
98 }
99 font-size: $font-unit * $to-size / $from-size;
100 @include adjust-leading-to($lines, if($relative-font-sizing, $to-size, $base-font-size));
101 }
102
103 // Adjust a block to have different line height to maintain the rhythm.
104 // $lines specifies how many multiples of the baseline rhythm each line of this
105 // font should use up. It does not have to be an integer, but it defaults to the
106 // smallest integer that is large enough to fit the font.
107 @mixin adjust-leading-to($lines, $font-size: $base-font-size) {
108 line-height: rhythm($lines, $font-size);
109 }
110
111 // Calculate rhythm units.
112 @function rhythm(
113 $lines: 1,
114 $font-size: $base-font-size,
115 $offset: 0
116 ) {
117 @if not $relative-font-sizing and $font-size != $base-font-size {
118 @warn "$relative-font-sizing is false but a relative font size was passed to the rhythm function";
119 }
120 $rhythm: $font-unit * ($lines * $base-line-height - $offset) / $font-size;
121 // Round the pixels down to nearest integer.
122 @if unit($rhythm) == px {
123 $rhythm: floor($rhythm);
124 }
125 @return $rhythm;
126 }
127
128 // Calculate the minimum multiple of rhythm units needed to contain the font-size.
129 @function lines-for-font-size($font-size) {
130 $lines: if($round-to-nearest-half-line,
131 ceil(2 * $font-size / $base-line-height) / 2,
132 ceil($font-size / $base-line-height));
133 @if $lines * $base-line-height - $font-size < $min-line-padding * 2 {
134 $lines: $lines + if($round-to-nearest-half-line, 0.5, 1);
135 }
136 @return $lines;
137 }
138
139 // Apply leading whitespace. The $property can be margin or padding.
140 @mixin leader($lines: 1, $font-size: $base-font-size, $property: margin) {
141 #{$property}-top: rhythm($lines, $font-size);
142 }
143
144 // Apply leading whitespace as padding.
145 @mixin padding-leader($lines: 1, $font-size: $base-font-size) {
146 padding-top: rhythm($lines, $font-size);
147 }
148
149 // Apply leading whitespace as margin.
150 @mixin margin-leader($lines: 1, $font-size: $base-font-size) {
151 margin-top: rhythm($lines, $font-size);
152 }
153
154 // Apply trailing whitespace. The $property can be margin or padding.
155 @mixin trailer($lines: 1, $font-size: $base-font-size, $property: margin) {
156 #{$property}-bottom: rhythm($lines, $font-size);
157 }
158
159 // Apply trailing whitespace as padding.
160 @mixin padding-trailer($lines: 1, $font-size: $base-font-size) {
161 padding-bottom: rhythm($lines, $font-size);
162 }
163
164 // Apply trailing whitespace as margin.
165 @mixin margin-trailer($lines: 1, $font-size: $base-font-size) {
166 margin-bottom: rhythm($lines, $font-size);
167 }
168
169 // Shorthand mixin to apply whitespace for top and bottom margins and padding.
170 @mixin rhythm($leader: 0, $padding-leader: 0, $padding-trailer: 0, $trailer: 0, $font-size: $base-font-size) {
171 @include leader($leader, $font-size);
172 @include padding-leader($padding-leader, $font-size);
173 @include padding-trailer($padding-trailer, $font-size);
174 @include trailer($trailer, $font-size);
175 }
176
177 // Apply a border and whitespace to any side without destroying the vertical
178 // rhythm. The whitespace must be greater than the width of the border.
179 @mixin apply-side-rhythm-border($side, $width: 1px, $lines: 1, $font-size: $base-font-size, $border-style: $default-rhythm-border-style) {
180 @if not $relative-font-sizing and $font-size != $base-font-size {
181 @warn "$relative-font-sizing is false but a relative font size was passed to apply-side-rhythm-border";
182 }
183 border-#{$side}: {
184 style: $border-style;
185 width: $font-unit * $width / $font-size;
186 };
187 padding-#{$side}: rhythm($lines, $font-size, $offset: $width);
188 }
189
190 // Apply borders and whitespace equally to all sides.
191 @mixin rhythm-borders($width: 1px, $lines: 1, $font-size: $base-font-size, $border-style: $default-rhythm-border-style) {
192 @if not $relative-font-sizing and $font-size != $base-font-size {
193 @warn "$relative-font-sizing is false but a relative font size was passed to rhythm-borders";
194 }
195 border: {
196 style: $border-style;
197 width: $font-unit * $width / $font-size;
198 };
199 padding: rhythm($lines, $font-size, $offset: $width);
200 }
201
202 // Apply a leading border.
203 @mixin leading-border($width: 1px, $lines: 1, $font-size: $base-font-size, $border-style: $default-rhythm-border-style) {
204 @include apply-side-rhythm-border(top, $width, $lines, $font-size, $border-style);
205 }
206
207 // Apply a trailing border.
208 @mixin trailing-border($width: 1px, $lines: 1, $font-size: $base-font-size, $border-style: $default-rhythm-border-style) {
209 @include apply-side-rhythm-border(bottom, $width, $lines, $font-size, $border-style);
210 }
211
212 // Apply both leading and trailing borders.
213 @mixin horizontal-borders($width: 1px, $lines: 1, $font-size: $base-font-size, $border-style: $default-rhythm-border-style) {
214 @include leading-border($width, $lines, $font-size, $border-style);
215 @include trailing-border($width, $lines, $font-size, $border-style);
216 }
217
218 // Alias for `horizontal-borders` mixin.
219 @mixin h-borders($width: 1px, $lines: 1, $font-size: $base-font-size, $border-style: $default-rhythm-border-style) {
220 @include horizontal-borders($width, $lines, $font-size, $border-style);
221 }
222
forum/static/css/compass/typography/links/_hover-link.scss
File was created 1 // a link that only has an underline when you hover over it
2 @mixin hover-link {
3 text-decoration: none;
4 &:hover {
5 text-decoration: underline; } }
6
forum/static/css/compass/typography/links/_link-colors.scss
File was created 1 // Set all the colors for a link with one mixin call.
2 // Order of arguments is:
3 //
4 // 1. normal
5 // 2. hover
6 // 3. active
7 // 4. visited
8 // 5. focus
9 //
10 // Those states not specified will inherit.
11 // Mixin to an anchor link like so:
12 // a
13 // +link-colors(#00c, #0cc, #c0c, #ccc, #cc0)
14
15 @mixin link-colors($normal, $hover: false, $active: false, $visited: false, $focus: false) {
16 color: $normal;
17 @if $visited {
18 &:visited {
19 color: $visited; } }
20 @if $focus {
21 &:focus {
22 color: $focus; } }
23 @if $hover {
24 &:hover {
25 color: $hover; } }
26 @if $active {
27 &:active {
28 color: $active; } } }
29
forum/static/css/compass/typography/links/_unstyled-link.scss
File was created 1 // A link that looks and acts like the text it is contained within
2 @mixin unstyled-link {
3 color: inherit;
4 text-decoration: inherit;
5 cursor: inherit;
6 &:active, &:focus {
7 outline: none; } }
8
forum/static/css/compass/typography/lists/_bullets.scss
File was created 1 // Turn off the bullet for an element of a list
2 @mixin no-bullet {
3 list-style-image : none;
4 list-style-type : none;
5 margin-left : 0;
6 }
7
8 // turns off the bullets for an entire list
9 @mixin no-bullets {
10 list-style: none;
11 li { @include no-bullet; }
12 }
13
14 // Make a list(ul/ol) have an image bullet.
15 //
16 // The mixin should be used like this for an icon that is 5x7:
17 //
18 // ul.pretty
19 // +pretty-bullets("my-icon.png", 5px, 7px)
20 //
21 // Additionally, if the image dimensions are not provided,
22 // The image dimensions will be extracted from the image itself.
23 //
24 // ul.pretty
25 // +pretty-bullets("my-icon.png")
26 //
27 @mixin pretty-bullets($bullet-icon, $width: image-width($bullet-icon), $height: image-height($bullet-icon), $line-height: 18px, $padding: 14px) {
28 margin-left: 0;
29 li {
30 padding-left: $padding;
31 background: image-url($bullet-icon) no-repeat ($padding - $width) / 2 ($line-height - $height) / 2;
32 list-style-type: none;
33 }
34 }
35
forum/static/css/compass/typography/lists/_horizontal-list.scss
File was created 1 // Horizontal list layout module.
2 //
3 // Easy mode using simple descendant li selectors:
4 //
5 // ul.nav
6 // +horizontal-list
7 //
8 // Advanced mode:
9 // If you need to target the list items using a different selector then use
10 // +horizontal-list-container on your ul/ol and +horizontal-list-item on your li.
11 // This may help when working on layouts involving nested lists. For example:
12 //
13 // ul.nav
14 // +horizontal-list-container
15 // > li
16 // +horizontal-list-item
17
18 @import "bullets";
19 @import "compass/utilities/general/clearfix";
20 @import "compass/utilities/general/reset";
21 @import "compass/utilities/general/float";
22
23 // Can be mixed into any selector that target a ul or ol that is meant
24 // to have a horizontal layout. Used to implement +horizontal-list.
25 @mixin horizontal-list-container {
26 @include reset-box-model;
27 @include clearfix; }
28
29 // Can be mixed into any li selector that is meant to participate in a horizontal layout.
30 // Used to implement +horizontal-list.
31 //
32 // :last-child is not fully supported
33 // see http://www.quirksmode.org/css/contents.html#t29 for the support matrix
34 //
35 // IE8 ignores rules that are included on the same line as :last-child
36 // see http://www.richardscarrott.co.uk/posts/view/ie8-last-child-bug for details
37 //
38 // Setting `$padding` to `false` disables the padding between list elements
39 @mixin horizontal-list-item($padding: 4px, $direction: left) {
40 @include no-bullet;
41 white-space: nowrap;
42 @include float($direction);
43 @if $padding {
44 padding: {
45 left: $padding;
46 right: $padding;
47 }
48 &:first-child, &.first { padding-#{$direction}: 0; }
49 &:last-child { padding-#{opposite-position($direction)}: 0; }
50 &.last { padding-#{opposite-position($direction)}: 0; }
51 }
52 }
53
54 // A list(ol,ul) that is layed out such that the elements are floated left and won't wrap.
55 // This is not an inline list.
56 //
57 // Setting `$padding` to `false` disables the padding between list elements
58 @mixin horizontal-list($padding: 4px, $direction: left) {
59 @include horizontal-list-container;
60 li {
61 @include horizontal-list-item($padding, $direction); } }
62
forum/static/css/compass/typography/lists/_inline-block-list.scss
File was created 1 // Inline-Block list layout module.
2 //
3 // Easy mode using simple descendant li selectors:
4 //
5 // ul.nav {
6 // @import inline-block-list;
7 // }
8 //
9 // Advanced mode:
10 // If you need to target the list items using a different selector then use
11 // `@include inline-block-list-container` on your ul/ol and
12 // `@include inline-block-list-item` on your li. This may help when working
13 // on layouts involving nested lists. For example:
14 //
15 // ul.nav {
16 // @include inline-block-list-container;
17 // > li {
18 // @include inline-block-list-item;
19 // }
20 // }
21
22 @import "bullets";
23 @import "horizontal-list";
24 @import "compass/utilities/general/float";
25 @import "compass/css3/inline-block";
26
27 // Can be mixed into any selector that target a ul or ol that is meant
28 // to have an inline-block layout. Used to implement `inline-block-list`.
29 @mixin inline-block-list-container {
30 @include horizontal-list-container; }
31
32 // Can be mixed into any li selector that is meant to participate in a horizontal layout.
33 // Used to implement `inline-block-list`.
34 @mixin inline-block-list-item($padding: false) {
35 @include no-bullet;
36 @include inline-block;
37 white-space: nowrap;
38 @if $padding {
39 padding: {
40 left: $padding;
41 right: $padding;
42 };
43 }
44 }
45
46 // A list(ol,ul) that is layed out such that the elements are inline-block and won't wrap.
47 @mixin inline-block-list($padding: false) {
48 @include inline-block-list-container;
49 li {
50 @include inline-block-list-item($padding); } }
51
forum/static/css/compass/typography/lists/_inline-list.scss
File was created 1 // makes a list inline.
2
3 @mixin inline-list {
4 list-style-type: none;
5 &, & li {
6 margin: 0px;
7 padding: 0px;
8 display: inline;
9 }
10 }
11
12 // makes an inline list delimited with the passed string.
13 // Defaults to making a comma-separated list.
14 //
15 // Please make note of the browser support issues before using this mixin:
16 //
17 // use of `content` and `:after` is not fully supported in all browsers.
18 // See quirksmode for the [support matrix](http://www.quirksmode.org/css/contents.html#t15)
19 //
20 // `:last-child` is not fully supported.
21 // see quirksmode for the [support matrix](http://www.quirksmode.org/css/contents.html#t29).
22 //
23 // IE8 ignores rules that are included on the same line as :last-child
24 // see http://www.richardscarrott.co.uk/posts/view/ie8-last-child-bug for details
25
26 @mixin delimited-list($separator: ", ") {
27 @include inline-list;
28 li {
29 &:after { content: $separator; }
30 &:last-child {
31 &:after { content: ""; }
32 }
33 &.last {
34 &:after { content: ""; }
35 }
36 }
37 }
38
39 // See [delimited-list](#mixin-delimited-list)
40 // @deprecated
41 @mixin comma-delimited-list {
42 @warn "comma-delimited-list is deprecated. Please use delimited-list instead.";
43 @include delimited-list;
44 }
45
forum/static/css/compass/typography/text/_ellipsis.scss
File was created 1 @import "compass/css3/shared";
2
3 // To get full firefox support, you must install the ellipsis pattern:
4 //
5 // compass install compass/ellipsis
6 $use-mozilla-ellipsis-binding: false !default;
7
8 // This technique, by [Justin Maxwell](http://code404.com/), was originally
9 // published [here](http://mattsnider.com/css/css-string-truncation-with-ellipsis/).
10 // Firefox implementation by [Rikkert Koppes](http://www.rikkertkoppes.com/thoughts/2008/6/).
11 @mixin ellipsis($no-wrap: true) {
12 @if $no-wrap { white-space: nowrap; }
13 overflow: hidden;
14 @include experimental(text-overflow, ellipsis,
15 not -moz,
16 not -webkit,
17 -o,
18 -ms,
19 not -khtml,
20 official
21 );
22 @if $experimental-support-for-mozilla and $use-mozilla-ellipsis-binding {
23 -moz-binding: stylesheet-url(unquote("xml/ellipsis.xml#ellipsis"));
24 }
25 }
26
forum/static/css/compass/typography/text/_force-wrap.scss
File was created 1 // Prevent long urls and text from breaking layouts
2 // [originally from perishablepress.com](http://perishablepress.com/press/2010/06/01/wrapping-content/)
3 @mixin force-wrap {
4 white-space: pre; // CSS 2.0
5 white-space: pre-wrap; // CSS 2.1
6 white-space: pre-line; // CSS 3.0
7 white-space: -pre-wrap; // Opera 4-6
8 white-space: -o-pre-wrap; // Opera 7
9 white-space: -moz-pre-wrap; // Mozilla
10 white-space: -hp-pre-wrap; // HP Printers
11 word-wrap: break-word; // IE 5+
12 }
13
forum/static/css/compass/typography/text/_nowrap.scss
File was created 1 // When remembering whether or not there's a hyphen in white-space is too hard
2 @mixin nowrap { white-space: nowrap; }
3
forum/static/css/compass/typography/text/_replacement.scss
File was created 1 // Indicates the direction you prefer to move your text
2 // when hiding it.
3 //
4 // `left` is more robust, especially in older browsers.
5 // `right` seems have better runtime performance.
6 $hide-text-direction: left !default;
7
8 // Hides html text and replaces it with an image.
9 // If you use this on an inline element, you will need to change the display to block or inline-block.
10 // Also, if the size of the image differs significantly from the font size, you'll need to set the width and/or height.
11 //
12 // Parameters:
13 //
14 // * `img` -- the relative path from the project image directory to the image, or a url literal.
15 // * `x` -- the x position of the background image.
16 // * `y` -- the y position of the background image.
17 @mixin replace-text($img, $x: 50%, $y: 50%) {
18 @include hide-text;
19 background: {
20 @if is-url($img) {
21 image: $img;
22 } @else {
23 image: image-url($img);
24 }
25 repeat: no-repeat;
26 position: $x $y;
27 };
28 }
29
30 // Like the `replace-text` mixin, but also sets the width
31 // and height of the element according the dimensions of the image.
32 //
33 // If you set `$inline` to true, then an inline image (data uri) will be used.
34 @mixin replace-text-with-dimensions($img, $x: 50%, $y: 50%, $inline: false) {
35 @include replace-text(if($inline, inline-image($img), $img), $x, $y);
36 width: image-width($img);
37 height: image-height($img);
38 }
39
40 // Hides text in an element so you can see the background.
41 //
42 // The direction indicates how the text should be moved out of view.
43 //
44 // See `$hide-text-direction` for more information and to set this globally
45 // for your application.
46 @mixin hide-text($direction: $hide-text-direction) {
47 @if $direction == left {
48 $approximate-em-value: 12px / 1em;
49 $wider-than-any-screen: -9999em;
50 text-indent: $wider-than-any-screen * $approximate-em-value;
51 overflow: hidden;
52 text-align: left;
53 } @else {
54 // slightly wider than the box prevents issues with inline-block elements
55 text-indent: 110%;
56 white-space: nowrap;
57 overflow: hidden;
58 }
59 }
60
61 // Hides text in an element by squishing the text into oblivion.
62 // Use this if you need to hide text contained in an inline element
63 // but still have it read by a screen reader.
64 @mixin squish-text {
65 font: 0/0 serif;
66 text-shadow: none;
67 color: transparent;
68 }
69
forum/static/css/compass/utilities/_color.scss
File was created 1 @import "color/contrast";
forum/static/css/compass/utilities/_general.scss
File was created 1 @import "general/reset";
2 @import "general/clearfix";
3 @import "general/float";
4 @import "general/tag-cloud";
5 @import "general/hacks";
6 @import "general/min";
7
forum/static/css/compass/utilities/_links.scss
File was created 1 @warn "This import is deprecated. Use 'compass/typography/links' instead.";
2
3 @import "../typography/links/hover-link";
4 @import "../typography/links/link-colors";
5 @import "../typography/links/unstyled-link";
6
forum/static/css/compass/utilities/_lists.scss
File was created 1 @warn "This import is deprecated. Use 'compass/typography/lists' instead.";
2
3 @import "../typography/lists/horizontal-list";
4 @import "../typography/lists/inline-list";
5 @import "../typography/lists/inline-block-list";
6 @import "../typography/lists/bullets";
7
forum/static/css/compass/utilities/_print.scss
File was created 1 // Classes that are useful for controlling what gets printed.
2 // You must mix `+print-utilities` into your print stylesheet
3 // and `+print-utilities(screen)` into your screen stylesheet.
4 // Note: these aren't semantic.
5 @mixin print-utilities($media: print) {
6 @if $media == print {
7 .noprint, .no-print { display: none; }
8 #{elements-of-type(block)} {
9 &.print-only { display: block; }
10 }
11 #{elements-of-type(inline)} {
12 &.print-only { display: inline; }
13 }
14 } @else {
15 .print-only { display: none; }
16 }
17 }
18
forum/static/css/compass/utilities/_sprites.scss
File was created 1 @import "sprites/base";
2 @import "sprites/sprite-img";
3
forum/static/css/compass/utilities/_tables.scss
File was created 1 @import "tables/alternating-rows-and-columns";
2 @import "tables/borders";
3 @import "tables/scaffolding";
4
forum/static/css/compass/utilities/_text.scss
File was created 1 @warn "This import is deprecated. Use 'compass/typography/text' instead.";
2
3 @import "../typography/text/ellipsis";
4 @import "../typography/text/nowrap";
5 @import "../typography/text/replacement";
6
forum/static/css/compass/utilities/color/_contrast.scss
File was created 1 $contrasted-dark-default: #000 !default;
2 $contrasted-light-default: #fff !default;
3 $contrasted-lightness-threshold: 30% !default;
4
5 // Returns the `$light` color when the `$color` is dark
6 // and the `$dark` color when the `$color` is light.
7 // The `$threshold` is a percent between `0%` and `100%` and it determines
8 // when the lightness of `$color` changes from "dark" to "light".
9 @function contrast-color(
10 $color,
11 $dark: $contrasted-dark-default,
12 $light: $contrasted-light-default,
13 $threshold: $contrasted-lightness-threshold
14 ) {
15 @return if(lightness($color) < $threshold, $light, $dark)
16 }
17
18 // Sets the specified background color and calculates a dark or light contrasted text color.
19 // The arguments are passed through to the [contrast-color function](#function-contrast-color).
20 @mixin contrasted(
21 $background-color,
22 $dark: $contrasted-dark-default,
23 $light: $contrasted-light-default,
24 $threshold: $contrasted-lightness-threshold
25 ) {
26 background-color: $background-color;
27 color: contrast-color($background-color, $dark, $light, $threshold);
28 }
forum/static/css/compass/utilities/general/_clearfix.scss
File was created 1 // @doc off
2 // Extends the bottom of the element to enclose any floats it contains.
3 // @doc on
4
5 @import "hacks";
6
7 // This basic method is preferred for the usual case, when positioned
8 // content will not show outside the bounds of the container.
9 //
10 // Recommendations include using this in conjunction with a width.
11 // Credit: [quirksmode.org](http://www.quirksmode.org/blog/archives/2005/03/clearing_floats.html)
12 @mixin clearfix {
13 overflow: hidden;
14 @include has-layout;
15 }
16
17 // This older method from Position Is Everything called
18 // [Easy Clearing](http://www.positioniseverything.net/easyclearing.html)
19 // has the advantage of allowing positioned elements to hang
20 // outside the bounds of the container at the expense of more tricky CSS.
21 @mixin legacy-pie-clearfix {
22 &:after {
23 content : "\0020";
24 display : block;
25 height : 0;
26 clear : both;
27 overflow : hidden;
28 visibility : hidden;
29 }
30 @include has-layout;
31 }
32
33 // This is an updated version of the PIE clearfix method that reduces the amount of CSS output.
34 // If you need to support Firefox before 3.5 you need to use `legacy-pie-clearfix` instead.
35 //
36 // Adapted from: [A new micro clearfix hack](http://nicolasgallagher.com/micro-clearfix-hack/)
37 @mixin pie-clearfix {
38 &:after {
39 content: "";
40 display: table;
41 clear: both;
42 }
43 @include has-layout;
44 }
45
forum/static/css/compass/utilities/general/_float.scss
File was created 1 // Implementation of float:left with fix for the
2 // [double-margin bug in IE5/6](http://www.positioniseverything.net/explorer/doubled-margin.html)
3 @mixin float-left {
4 @include float(left); }
5
6 // Implementation of float:right with fix for the
7 // [double-margin bug in IE5/6](http://www.positioniseverything.net/explorer/doubled-margin.html)
8 @mixin float-right {
9 @include float(right); }
10
11 // Direction independent float mixin that fixes the
12 // [double-margin bug in IE5/6](http://www.positioniseverything.net/explorer/doubled-margin.html)
13 @mixin float($side: left) {
14 display: inline;
15 float: unquote($side); }
16
17 // Resets floated elements back to their default of `float: none` and defaults
18 // to `display: block` unless you pass `inline` as an argument
19 //
20 // Usage Example:
21 //
22 // body.homepage
23 // #footer li
24 // +float-left
25 // body.signup
26 // #footer li
27 // +reset-float
28 @mixin reset-float($display: block) {
29 float: none;
30 display: $display; }
forum/static/css/compass/utilities/general/_hacks.scss
File was created 1 @import "compass/support";
2
3 // The `zoom` approach generates less CSS but does not validate.
4 // Set this to `block` to use the display-property to hack the
5 // element to gain layout.
6 $default-has-layout-approach: zoom !default;
7
8 // This mixin causes an element matching the selector
9 // to gain the "hasLayout" property in internet explorer.
10 // More information on [hasLayout](http://reference.sitepoint.com/css/haslayout).
11 @mixin has-layout($approach: $default-has-layout-approach) {
12 @if $legacy-support-for-ie {
13 @if $approach == zoom {
14 @include has-layout-zoom;
15 } @else if $approach == block {
16 @include has-layout-block;
17 } @else {
18 @warn "Unknown has-layout approach: #{$approach}";
19 @include has-layout-zoom;
20 }
21 }
22 }
23
24 @mixin has-layout-zoom {
25 @if $legacy-support-for-ie6 or $legacy-support-for-ie7 {
26 *zoom: 1;
27 }
28 }
29
30 @mixin has-layout-block {
31 @if $legacy-support-for-ie {
32 // This makes ie6 get layout
33 display: inline-block;
34 // and this puts it back to block
35 & { display: block; }
36 }
37 }
38
39 // A hack to supply IE6 (and below) with a different property value.
40 // [Read more](http://www.cssportal.com/css-hacks/#in_css-important).
41 @mixin bang-hack($property, $value, $ie6-value) {
42 @if $legacy-support-for-ie6 {
43 #{$property}: #{$value} !important;
44 #{$property}: #{$ie6-value};
45 }
46 }
47
forum/static/css/compass/utilities/general/_min.scss
File was created 1 @import "hacks";
2
3 //**
4 // Cross browser min-height mixin.
5 @mixin min-height($value) {
6 @include hacked-minimum(height, $value); }
7
8 //**
9 // Cross browser min-width mixin.
10 @mixin min-width($value) {
11 @include hacked-minimum(width, $value); }
12
13 // @private This mixin is not meant to be used directly.
14 @mixin hacked-minimum($property, $value) {
15 min-#{$property}: $value;
16 @include bang-hack($property, auto, $value); }
17
forum/static/css/compass/utilities/general/_reset.scss
File was created 1 // This module has moved.
2 @import "compass/reset/utilities";
forum/static/css/compass/utilities/general/_tabs.scss
No preview for this file type
forum/static/css/compass/utilities/general/_tag-cloud.scss
File was created 1 // Emits styles for a tag cloud
2 @mixin tag-cloud($base-size: 1em) {
3 font-size: $base-size;
4 line-height: 1.2 * $base-size;
5 .xxs, .xs, .s, .l, .xl, .xxl {
6 line-height: 1.2 * $base-size; }
7 .xxs {
8 font-size: $base-size / 2; }
9 .xs {
10 font-size: 2 * $base-size / 3; }
11 .s {
12 font-size: 3 * $base-size / 4; }
13 .l {
14 font-size: 4 * $base-size / 3; }
15 .xl {
16 font-size: 3 * $base-size / 2; }
17 .xxl {
18 font-size: 2 * $base-size; } }
19
forum/static/css/compass/utilities/links/_hover-link.scss
File was created 1 @warn "This import is deprecated. Use 'compass/typography/links/hover-link' instead.";
2
3 @import "../../typography/links/hover-link";
4
forum/static/css/compass/utilities/links/_link-colors.scss
File was created 1 @warn "This import is deprecated. Use 'compass/typography/links/link-colors' instead.";
2
3 @import "../../typography/links/link-colors";
4
forum/static/css/compass/utilities/links/_unstyled-link.scss
File was created 1 @warn "This import is deprecated. Use 'compass/typography/links/unstyled-link' instead.";
2
3 @import "../../typography/links/unstyled-link";
4
forum/static/css/compass/utilities/lists/_bullets.scss
File was created 1 @warn "This import is deprecated. Use 'compass/typography/lists/bullets' instead.";
2
3 @import "../../typography/lists/bullets";
4
forum/static/css/compass/utilities/lists/_horizontal-list.scss
File was created 1 @warn "This import is deprecated. Use 'compass/typography/lists/horizontal-list' instead.";
2
3 @import "../../typography/lists/horizontal-list";
4
forum/static/css/compass/utilities/lists/_inline-block-list.scss
File was created 1 @warn "This import is deprecated. Use 'compass/typography/lists/inline-block-list' instead.";
2
3 @import "../../typography/lists/inline-block-list";
4
forum/static/css/compass/utilities/lists/_inline-list.scss
File was created 1 @warn "This import is deprecated. Use 'compass/typography/lists/inline-list' instead.";
2
3 @import "../../typography/lists/inline-list";
4
forum/static/css/compass/utilities/sprites/_base.scss
File was created 1 // Determines those states for which you want to enable magic sprite selectors
2 $sprite-selectors: hover, target, active !default;
3
4 // Set the width and height of an element to the original
5 // dimensions of an image before it was included in the sprite.
6 @mixin sprite-dimensions($map, $sprite) {
7 height: image-height(sprite-file($map, $sprite));
8 width: image-width(sprite-file($map, $sprite));
9 }
10
11 // Set the background position of the given sprite `$map` to display the
12 // sprite of the given `$sprite` name. You can move the image relative to its
13 // natural position by passing `$offset-x` and `$offset-y`.
14 @mixin sprite-background-position($map, $sprite, $offset-x: 0, $offset-y: 0) {
15 background-position: sprite-position($map, $sprite, $offset-x, $offset-y);
16 }
17
18
19 // Determines if you want to include magic selectors in your sprites
20 $disable-magic-sprite-selectors:false !default;
21
22 // Include the position and (optionally) dimensions of this `$sprite`
23 // in the given sprite `$map`. The sprite url should come from either a base
24 // class or you can specify the `sprite-url` explicitly like this:
25 //
26 // background: $map no-repeat;
27 @mixin sprite($map, $sprite, $dimensions: false, $offset-x: 0, $offset-y: 0) {
28 @include sprite-background-position($map, $sprite, $offset-x, $offset-y);
29 @if $dimensions {
30 @include sprite-dimensions($map, $sprite);
31 }
32 @if not $disable-magic-sprite-selectors {
33 @include sprite-selectors($map, $sprite, $sprite, $offset-x, $offset-y);
34 }
35 }
36
37 // Include the selectors for the `$sprite` given the `$map` and the
38 // `$full-sprite-name`
39 // @private
40 @mixin sprite-selectors($map, $sprite-name, $full-sprite-name, $offset-x: 0, $offset-y: 0) {
41 @each $selector in $sprite-selectors {
42 @if sprite_has_selector($map, $sprite-name, $selector) {
43 &:#{$selector}, &.#{$full-sprite-name}_#{$selector}, &.#{$full-sprite-name}-#{$selector} {
44 @include sprite-background-position($map, "#{$sprite-name}_#{$selector}", $offset-x, $offset-y);
45 }
46 }
47 }
48 }
49
50 // Generates a class for each space separated name in `$sprite-names`.
51 // The class will be of the form .<map-name>-<sprite-name>.
52 //
53 // If a base class is provided, then each class will extend it.
54 //
55 // If `$dimensions` is `true`, the sprite dimensions will specified.
56 @mixin sprites($map, $sprite-names, $base-class: false, $dimensions: false, $prefix: sprite-map-name($map), $offset-x: 0, $offset-y: 0) {
57 @each $sprite-name in $sprite-names {
58 @if sprite_does_not_have_parent($map, $sprite-name) {
59 $full-sprite-name: "#{$prefix}-#{$sprite-name}";
60 .#{$full-sprite-name} {
61 @if $base-class { @extend #{$base-class}; }
62 @include sprite($map, $sprite-name, $dimensions, $offset-x, $offset-y);
63 }
64 }
65 }
66 }
forum/static/css/compass/utilities/sprites/_sprite-img.scss
File was created 1 // @doc off
2 // Example 1:
3 //
4 // a.twitter
5 // +sprite-img("icons-32.png", 1)
6 // a.facebook
7 // +sprite-img("icons-32png", 2)
8 //
9 // Example 2:
10 //
11 // a
12 // +sprite-background("icons-32.png")
13 // a.twitter
14 // +sprite-column(1)
15 // a.facebook
16 // +sprite-row(2)
17 // @doc on
18
19 $sprite-default-size: 32px !default;
20
21 $sprite-default-margin: 0px !default;
22
23 $sprite-image-default-width: $sprite-default-size !default;
24
25 $sprite-image-default-height: $sprite-default-size !default;
26
27 // Sets all the rules for a sprite from a given sprite image to show just one of the sprites.
28 // To reduce duplication use a sprite-bg mixin for common properties and a sprite-select mixin for positioning.
29 @mixin sprite-img($img, $col, $row: 1, $width: $sprite-image-default-width, $height: $sprite-image-default-height, $margin: $sprite-default-margin) {
30 @include sprite-background($img, $width, $height);
31 @include sprite-position($col, $row, $width, $height, $margin);
32 }
33
34 // Sets rules common for all sprites, assumes you want a square, but allows a rectangular region.
35 @mixin sprite-background($img, $width: $sprite-default-size, $height: $width) {
36 @include sprite-background-rectangle($img, $width, $height);
37 }
38
39 // Sets rules common for all sprites, assumes a rectangular region.
40 @mixin sprite-background-rectangle($img, $width: $sprite-image-default-width, $height: $sprite-image-default-height) {
41 background: image-url($img) no-repeat;
42 width: $width;
43 height: $height;
44 overflow: hidden;
45 }
46
47 // Allows horizontal sprite positioning optimized for a single row of sprites.
48 @mixin sprite-column($col, $width: $sprite-image-default-width, $margin: $sprite-default-margin) {
49 @include sprite-position($col, 1, $width, 0px, $margin);
50 }
51
52 // Allows vertical sprite positioning optimized for a single column of sprites.
53 @mixin sprite-row($row, $height: $sprite-image-default-height, $margin: $sprite-default-margin) {
54 @include sprite-position(1, $row, 0px, $height, $margin);
55 }
56
57 // Allows vertical and horizontal sprite positioning from a grid of equal dimensioned sprites.
58 @mixin sprite-position($col, $row: 1, $width: $sprite-image-default-width, $height: $sprite-image-default-height, $margin: $sprite-default-margin) {
59 $x: ($col - 1) * -$width - ($col - 1) * $margin;
60 $y: ($row - 1) * -$height - ($row - 1) * $margin;
61 background-position: $x $y;
62 }
63
64
65
66 // Similar to 'sprite-replace-text-with-dimensions' but does not autmaticly set the demensions
67 @mixin sprite-replace-text ($map, $sprite, $dimensions: false, $offset-x: 0, $offset-y: 0) {
68 @include hide-text;
69 @include sprite($map, $sprite, $dimensions, $offset-x, $offset-y);
70 background-image: $map;
71 background-repeat: no-repeat;
72 }
73
74 // Similar to 'replace-text-with-dimensions' but with sprites
75 // To use, create your sprite and then pass it in the `$map` param
76 // The name of the image in the sprite folder should be `$img-name`
77 @mixin sprite-replace-text-with-dimensions ($map, $sprite, $offset-x: 0, $offset-y: 0){
78 @include sprite-replace-text ($map, $sprite, true, $offset-x, $offset-y);
79 }
forum/static/css/compass/utilities/tables/_alternating-rows-and-columns.scss
File was created 1 @mixin alternating-rows-and-columns($even-row-color, $odd-row-color, $dark-intersection, $header-color: white, $footer-color: white) {
2 th {
3 background-color: $header-color;
4 &.even, &:nth-child(2n) {
5 background-color: $header-color - $dark-intersection; } }
6 tr {
7 &.odd, &:nth-child(2n+1) {
8 td {
9 background-color: $odd-row-color;
10 &.even, &:nth-child(2n) {
11 background-color: $odd-row-color - $dark-intersection; } } }
12 }
13 tr.even {
14 td {
15 background-color: $even-row-color;
16 &.even, &:nth-child(2n) {
17 background-color: $even-row-color - $dark-intersection; } } }
18 tfoot {
19 th, td {
20 background-color: $footer-color;
21 &.even, &:nth-child(2n) {
22 background-color: $footer-color - $dark-intersection; } } } }
23
forum/static/css/compass/utilities/tables/_borders.scss
File was created 1 @mixin outer-table-borders($width: 2px, $color: black) {
2 border: $width solid $color;
3 thead {
4 th {
5 border-bottom: $width solid $color; } }
6 tfoot {
7 th, td {
8 border-top: $width solid $color; } }
9 th {
10 &:first-child {
11 border-right: $width solid $color; } } }
12
13 @mixin inner-table-borders($width: 2px, $color: black) {
14 th, td {
15 border: {
16 right: $width solid $color;
17 bottom: $width solid $color;
18 left-width: 0px;
19 top-width: 0px; };
20 &:last-child,
21 &.last {
22 border-right-width: 0px; } }
23
24 // IE8 ignores rules that are included on the same line as :last-child
25 // see http://www.richardscarrott.co.uk/posts/view/ie8-last-child-bug for details
26
27 tbody, tfoot {
28 tr:last-child {
29 th, td {
30 border-bottom-width: 0px; } }
31 tr.last {
32 th, td {
33 border-bottom-width: 0px; } } } }
34
forum/static/css/compass/utilities/tables/_scaffolding.scss
File was created 1 @mixin table-scaffolding {
2 th {
3 text-align: center;
4 font-weight: bold; }
5 td,
6 th {
7 padding: 2px;
8 &.numeric {
9 text-align: right; } } }
10
forum/static/css/compass/utilities/text/_ellipsis.scss
File was created 1 @warn "This import is deprecated. Use 'compass/typography/text/ellipsis' instead.";
2
3 @import "../../typography/text/ellipsis";
4
forum/static/css/compass/utilities/text/_nowrap.scss
File was created 1 @warn "This import is deprecated. Use 'compass/typography/text/nowrap' instead.";
2
3 @import "../../typography/text/nowrap";
4
forum/static/css/compass/utilities/text/_replacement.scss
File was created 1 @warn "This import is deprecated. Use 'compass/typography/text/replacement' instead.";
2
3 @import "../../typography/text/replacement";
4
forum/static/css/img/glyphicons-halflings-white.png

8.57 KB

forum/static/css/img/glyphicons-halflings.png

12.5 KB

forum/static/css/main.css
File was created 1 @charset "UTF-8";
2 /*文字排版*/
3 .f12 {
4 font-size: 12px; }
5
6 .f13 {
7 font-size: 13px; }
8
9 .f14 {
10 font-size: 14px; }
11
12 .f16 {
13 font-size: 16px; }
14
15 .f20 {
16 font-size: 20px; }
17
18 .fb {
19 font-weight: bold; }
20
21 .fn {
22 font-weight: normal; }
23
24 .t2 {
25 text-indent: 2em; }
26
27 .lh150 {
28 line-height: 150%; }
29
30 .lh180 {
31 line-height: 180%; }
32
33 .lh200 {
34 line-height: 200%; }
35
36 .unl {
37 text-decoration: underline; }
38
39 .no_unl {
40 text-decoration: none; }
41
42 /*定位*/
43 .tl {
44 text-align: left; }
45
46 .tc {
47 text-align: center; }
48
49 .tr {
50 text-align: right; }
51
52 .bc {
53 margin-left: auto;
54 margin-right: auto; }
55
56 .fl {
57 float: left;
58 display: inline; }
59
60 .fr {
61 float: right;
62 display: inline; }
63
64 .cb {
65 clear: both; }
66
67 .cl {
68 clear: left; }
69
70 .cr {
71 clear: right; }
72
73 .clearfix:after, .container-box:after, .topics .topic-item:after, .usercard .ui-header:after, .user-page .profile .ui-header:after, .usercard .ui-content:after, .user-page .profile .ui-content:after, .community-status dl:after, .user-page .profile dl:after, .topic-detail .ui-header:after, .topic-detail .ui-footer:after, .topic-reply .ui-content .reply-item:after, .notification-item:after {
74 content: ".";
75 display: block;
76 height: 0;
77 clear: both;
78 visibility: hidden; }
79
80 .clearfix, .container-box, .topics .topic-item, .usercard .ui-header, .user-page .profile .ui-header, .usercard .ui-content, .user-page .profile .ui-content, .community-status dl, .user-page .profile dl, .topic-detail .ui-header, .topic-detail .ui-footer, .topic-reply .ui-content .reply-item, .notification-item {
81 display: inline-block; }
82
83 * html .clearfix, * html .container-box, * html .topics .topic-item, .topics * html .topic-item, * html .usercard .ui-header, .usercard * html .ui-header, * html .user-page .profile .ui-header, .user-page .profile * html .ui-header, * html .usercard .ui-content, .usercard * html .ui-content, * html .user-page .profile .ui-content, .user-page .profile * html .ui-content, * html .community-status dl, .community-status * html dl, * html .user-page .profile dl, .user-page .profile * html dl, * html .topic-detail .ui-header, .topic-detail * html .ui-header, * html .topic-detail .ui-footer, .topic-detail * html .ui-footer, * html .topic-reply .ui-content .reply-item, .topic-reply .ui-content * html .reply-item, * html .notification-item {
84 height: 1%; }
85
86 .clearfix, .container-box, .topics .topic-item, .usercard .ui-header, .user-page .profile .ui-header, .usercard .ui-content, .user-page .profile .ui-content, .community-status dl, .user-page .profile dl, .topic-detail .ui-header, .topic-detail .ui-footer, .topic-reply .ui-content .reply-item, .notification-item {
87 display: block; }
88
89 .vm {
90 vertical-align: middle; }
91
92 .pr {
93 position: relative; }
94
95 .pa {
96 position: absolute; }
97
98 .abs-right {
99 position: absolute;
100 right: 0; }
101
102 .zoom {
103 zoom: 1; }
104
105 .hidden {
106 visibility: hidden; }
107
108 .none {
109 display: none; }
110
111 /*长度高度*/
112 .w10 {
113 width: 10px; }
114
115 .w20 {
116 width: 20px; }
117
118 .w30 {
119 width: 30px; }
120
121 .w40 {
122 width: 40px; }
123
124 .w50 {
125 width: 50px; }
126
127 .w60 {
128 width: 60px; }
129
130 .w70 {
131 width: 70px; }
132
133 .w80 {
134 width: 80px; }
135
136 .w90 {
137 width: 90px; }
138
139 .w100 {
140 width: 100px; }
141
142 .w200 {
143 width: 200px; }
144
145 .w250 {
146 width: 250px; }
147
148 .w300 {
149 width: 300px; }
150
151 .w400 {
152 width: 400px; }
153
154 .w500 {
155 width: 500px; }
156
157 .w600 {
158 width: 600px; }
159
160 .w700 {
161 width: 700px; }
162
163 .w800 {
164 width: 800px; }
165
166 .w {
167 width: 100%; }
168
169 .h50 {
170 height: 50px; }
171
172 .h80 {
173 height: 80px; }
174
175 .h100 {
176 height: 100px; }
177
178 .h200 {
179 height: 200px; }
180
181 .h {
182 height: 100%; }
183
184 /*边距*/
185 .m10 {
186 margin: 10px; }
187
188 .m15 {
189 margin: 15px; }
190
191 .m30 {
192 margin: 30px; }
193
194 .mt5 {
195 margin-top: 5px; }
196
197 .mt10 {
198 margin-top: 10px; }
199
200 .mt15 {
201 margin-top: 15px; }
202
203 .mt20 {
204 margin-top: 20px; }
205
206 .mt30 {
207 margin-top: 30px; }
208
209 .mt50 {
210 margin-top: 50px; }
211
212 .mt100 {
213 margin-top: 100px; }
214
215 .mb10 {
216 margin-bottom: 10px; }
217
218 .mb15 {
219 margin-bottom: 15px; }
220
221 .mb20 {
222 margin-bottom: 20px; }
223
224 .mb30 {
225 margin-bottom: 30px; }
226
227 .mb50 {
228 margin-bottom: 50px; }
229
230 .mb100 {
231 margin-bottom: 100px; }
232
233 .ml5 {
234 margin-left: 5px; }
235
236 .ml10 {
237 margin-left: 10px; }
238
239 .ml15 {
240 margin-left: 15px; }
241
242 .ml20 {
243 margin-left: 20px; }
244
245 .ml30 {
246 margin-left: 30px; }
247
248 .ml50 {
249 margin-left: 50px; }
250
251 .ml100 {
252 margin-left: 100px; }
253
254 .mr5 {
255 margin-right: 5px; }
256
257 .mr10 {
258 margin-right: 10px; }
259
260 .mr15 {
261 margin-right: 15px; }
262
263 .mr20 {
264 margin-right: 20px; }
265
266 .mr30 {
267 margin-right: 30px; }
268
269 .mr50 {
270 margin-right: 50px; }
271
272 .mr100 {
273 margin-right: 100px; }
274
275 .p10 {
276 padding: 10px; }
277
278 .p15 {
279 padding: 15px; }
280
281 .p20 {
282 padding: 20px; }
283
284 .p30 {
285 padding: 30px; }
286
287 .pt5 {
288 padding-top: 5px; }
289
290 .pt10 {
291 padding-top: 10px; }
292
293 .pt15 {
294 padding-top: 15px; }
295
296 .pt20 {
297 padding-top: 20px; }
298
299 .pt30 {
300 padding-top: 30px; }
301
302 .pt50 {
303 padding-top: 50px; }
304
305 .pb5 {
306 padding-bottom: 5px; }
307
308 .pb10 {
309 padding-bottom: 10px; }
310
311 .pb15 {
312 padding-bottom: 15px; }
313
314 .pb20 {
315 padding-bottom: 20px; }
316
317 .pb30 {
318 padding-bottom: 30px; }
319
320 .pb50 {
321 padding-bottom: 50px; }
322
323 .pb100 {
324 padding-bottom: 100px; }
325
326 .pl5 {
327 padding-left: 5px; }
328
329 .pl10 {
330 padding-left: 10px; }
331
332 .pl15 {
333 padding-left: 15px; }
334
335 .pl20 {
336 padding-left: 20px; }
337
338 .pl30 {
339 padding-left: 30px; }
340
341 .pl50 {
342 padding-left: 50px; }
343
344 .pl100 {
345 padding-left: 100px; }
346
347 .pr5 {
348 padding-right: 5px; }
349
350 .pr10 {
351 padding-right: 10px; }
352
353 .pr15 {
354 padding-right: 15px; }
355
356 .pr20 {
357 padding-right: 20px; }
358
359 .pr30 {
360 padding-right: 30px; }
361
362 .pr50 {
363 padding-right: 50px; }
364
365 .pr100 {
366 padding-right: 100px; }
367
368 .clearfix, .container-box, .topics .topic-item, .usercard .ui-header, .user-page .profile .ui-header, .usercard .ui-content, .user-page .profile .ui-content, .community-status dl, .user-page .profile dl, .topic-detail .ui-header, .topic-detail .ui-footer, .topic-reply .ui-content .reply-item, .notification-item {
369 zoom: 1;
370 /* IE < 8 */ }
371 .clearfix:before, .container-box:before, .topics .topic-item:before, .usercard .ui-header:before, .user-page .profile .ui-header:before, .usercard .ui-content:before, .user-page .profile .ui-content:before, .community-status dl:before, .user-page .profile dl:before, .topic-detail .ui-header:before, .topic-detail .ui-footer:before, .topic-reply .ui-content .reply-item:before, .notification-item:before, .clearfix:after, .container-box:after, .topics .topic-item:after, .usercard .ui-header:after, .user-page .profile .ui-header:after, .usercard .ui-content:after, .user-page .profile .ui-content:after, .community-status dl:after, .user-page .profile dl:after, .topic-detail .ui-header:after, .topic-detail .ui-footer:after, .topic-reply .ui-content .reply-item:after, .notification-item:after {
372 content: ".";
373 display: block;
374 height: 0;
375 visibility: hidden; }
376 .clearfix:after, .container-box:after, .topics .topic-item:after, .usercard .ui-header:after, .user-page .profile .ui-header:after, .usercard .ui-content:after, .user-page .profile .ui-content:after, .community-status dl:after, .user-page .profile dl:after, .topic-detail .ui-header:after, .topic-detail .ui-footer:after, .topic-reply .ui-content .reply-item:after, .notification-item:after {
377 clear: both; }
378
379 .clear {
380 clear: both; }
381
382 @font-face {
383 font-family: 'octicons';
384 src: url("/static/octicons/octicons-d3d0b82bf791ac147d72bbf0287cdde8ee5c97b8.eot");
385 src: url("/static/octicons/octicons-d3d0b82bf791ac147d72bbf0287cdde8ee5c97b8.eot#iefix") format("embedded-opentype"), url("/static/octicons/octicons-a60d585f754059c3c2ef731f853c38c157040b9c.woff") format("woff"), url("/static/octicons/octicons-8b97c2cd5068ec4620cbde3140db257b1924a192.ttf") format("truetype"), url("/static/octicons/octicons-a8248bbb3baccca60948d81d69e3406b71956a69.svg#octicons") format("svg");
386 font-weight: normal;
387 font-style: normal; }
388 .octicon {
389 font: normal normal 16px octicons;
390 line-height: 1;
391 display: inline-block;
392 text-decoration: none;
393 -webkit-font-smoothing: antialiased; }
394
395 .mega-octicon {
396 font: normal normal 32px octicons;
397 line-height: 1;
398 display: inline-block;
399 text-decoration: none;
400 -webkit-font-smoothing: antialiased; }
401
402 .octicon-alert:before {
403 content: '\f02d'; }
404
405 .octicon-alignment-align:before {
406 content: '\f08a'; }
407
408 .octicon-alignment-aligned-to:before {
409 content: '\f08e'; }
410
411 .octicon-alignment-unalign:before {
412 content: '\f08b'; }
413
414 .octicon-arrow-down:before {
415 content: '\f03f'; }
416
417 .octicon-arrow-left:before {
418 content: '\f040'; }
419
420 .octicon-arrow-right:before {
421 content: '\f03e'; }
422
423 .octicon-arrow-small-down:before {
424 content: '\f0a0'; }
425
426 .octicon-arrow-small-left:before {
427 content: '\f0a1'; }
428
429 .octicon-arrow-small-right:before {
430 content: '\f071'; }
431
432 .octicon-arrow-small-up:before {
433 content: '\f09f'; }
434
435 .octicon-arrow-up:before {
436 content: '\f03d'; }
437
438 .octicon-beer:before {
439 content: '\f069'; }
440
441 .octicon-book:before {
442 content: '\f007'; }
443
444 .octicon-bookmark:before {
445 content: '\f07b'; }
446
447 .octicon-broadcast:before {
448 content: '\f048'; }
449
450 .octicon-bug:before {
451 content: '\f091'; }
452
453 .octicon-calendar:before {
454 content: '\f068'; }
455
456 .octicon-check:before {
457 content: '\f03a'; }
458
459 .octicon-checklist:before {
460 content: '\f076'; }
461
462 .octicon-chevron-down:before {
463 content: '\f0a3'; }
464
465 .octicon-chevron-left:before {
466 content: '\f0a4'; }
467
468 .octicon-chevron-right:before {
469 content: '\f078'; }
470
471 .octicon-chevron-up:before {
472 content: '\f0a2'; }
473
474 .octicon-circle-slash:before {
475 content: '\f084'; }
476
477 .octicon-clippy:before {
478 content: '\f035'; }
479
480 .octicon-clock:before {
481 content: '\f046'; }
482
483 .octicon-cloud-download:before {
484 content: '\f00b'; }
485
486 .octicon-cloud-upload:before {
487 content: '\f00c'; }
488
489 .octicon-code:before {
490 content: '\f05f'; }
491
492 .octicon-color-mode:before {
493 content: '\f065'; }
494
495 .octicon-comment:before {
496 content: '\f02b'; }
497
498 .octicon-comment-add:before {
499 content: '\f06f'; }
500
501 .octicon-comment-discussion:before {
502 content: '\f04f'; }
503
504 .octicon-credit-card:before {
505 content: '\f045'; }
506
507 .octicon-dashboard:before {
508 content: '\f07d'; }
509
510 .octicon-database:before {
511 content: '\f096'; }
512
513 .octicon-device-camera:before {
514 content: '\f056'; }
515
516 .octicon-device-camera-video:before {
517 content: '\f057'; }
518
519 .octicon-device-desktop:before {
520 content: '\f27c'; }
521
522 .octicon-device-mobile:before {
523 content: '\f038'; }
524
525 .octicon-diff:before {
526 content: '\f04d'; }
527
528 .octicon-diff-added:before {
529 content: '\f06b'; }
530
531 .octicon-diff-ignored:before {
532 content: '\f099'; }
533
534 .octicon-diff-modified:before {
535 content: '\f06d'; }
536
537 .octicon-diff-removed:before {
538 content: '\f06c'; }
539
540 .octicon-diff-renamed:before {
541 content: '\f06e'; }
542
543 .octicon-ellipsis:before {
544 content: '\f09a'; }
545
546 .octicon-eye:before {
547 content: '\f04e'; }
548
549 .octicon-eye-unwatch:before {
550 content: '\f01e'; }
551
552 .octicon-eye-watch:before {
553 content: '\f01d'; }
554
555 .octicon-file-add:before {
556 content: '\f086'; }
557
558 .octicon-file-binary:before {
559 content: '\f094'; }
560
561 .octicon-file-code:before {
562 content: '\f010'; }
563
564 .octicon-file-directory:before {
565 content: '\f016'; }
566
567 .octicon-file-directory-create:before {
568 content: '\f095'; }
569
570 .octicon-file-media:before {
571 content: '\f012'; }
572
573 .octicon-file-pdf:before {
574 content: '\f014'; }
575
576 .octicon-file-submodule:before {
577 content: '\f017'; }
578
579 .octicon-file-symlink-directory:before {
580 content: '\f0b1'; }
581
582 .octicon-file-symlink-file:before {
583 content: '\f0b0'; }
584
585 .octicon-file-text:before {
586 content: '\f011'; }
587
588 .octicon-file-zip:before {
589 content: '\f013'; }
590
591 .octicon-gear:before {
592 content: '\f02f'; }
593
594 .octicon-gift:before {
595 content: '\f042'; }
596
597 .octicon-gist:before {
598 content: '\f00e'; }
599
600 .octicon-gist-fork:before {
601 content: '\f079'; }
602
603 .octicon-gist-new:before {
604 content: '\f07a'; }
605
606 .octicon-gist-private:before {
607 content: '\f00f'; }
608
609 .octicon-gist-secret:before {
610 content: '\f08c'; }
611
612 .octicon-git-branch:before {
613 content: '\f020'; }
614
615 .octicon-git-branch-create:before {
616 content: '\f098'; }
617
618 .octicon-git-branch-delete:before {
619 content: '\f09b'; }
620
621 .octicon-git-commit:before {
622 content: '\f01f'; }
623
624 .octicon-git-compare:before {
625 content: '\f0ac'; }
626
627 .octicon-git-fork-private:before {
628 content: '\f021'; }
629
630 .octicon-git-merge:before {
631 content: '\f023'; }
632
633 .octicon-git-pull-request:before {
634 content: '\f009'; }
635
636 .octicon-git-pull-request-abandoned:before {
637 content: '\f090'; }
638
639 .octicon-globe:before {
640 content: '\f0b6'; }
641
642 .octicon-graph:before {
643 content: '\f043'; }
644
645 .octicon-history:before {
646 content: '\f07e'; }
647
648 .octicon-home:before {
649 content: '\f08d'; }
650
651 .octicon-horizontal-rule:before {
652 content: '\f070'; }
653
654 .octicon-hourglass:before {
655 content: '\f09e'; }
656
657 .octicon-hubot:before {
658 content: '\f09d'; }
659
660 .octicon-info:before {
661 content: '\f059'; }
662
663 .octicon-issue-closed:before {
664 content: '\f028'; }
665
666 .octicon-issue-opened:before {
667 content: '\f026'; }
668
669 .octicon-issue-reopened:before {
670 content: '\f027'; }
671
672 .octicon-jersey:before {
673 content: '\f019'; }
674
675 .octicon-jump-down:before {
676 content: '\f072'; }
677
678 .octicon-jump-left:before {
679 content: '\f0a5'; }
680
681 .octicon-jump-right:before {
682 content: '\f0a6'; }
683
684 .octicon-jump-up:before {
685 content: '\f073'; }
686
687 .octicon-key:before {
688 content: '\f049'; }
689
690 .octicon-keyboard:before {
691 content: '\f00d'; }
692
693 .octicon-light-bulb:before {
694 content: '\f000'; }
695
696 .octicon-link:before {
697 content: '\f05c'; }
698
699 .octicon-link-external:before {
700 content: '\f07f'; }
701
702 .octicon-list-ordered:before {
703 content: '\f062'; }
704
705 .octicon-list-unordered:before {
706 content: '\f061'; }
707
708 .octicon-location:before {
709 content: '\f060'; }
710
711 .octicon-lock:before {
712 content: '\f06a'; }
713
714 .octicon-log-in:before {
715 content: '\f036'; }
716
717 .octicon-log-out:before {
718 content: '\f032'; }
719
720 .octicon-logo-github:before {
721 content: '\f092'; }
722
723 .octicon-mail:before {
724 content: '\f03b'; }
725
726 .octicon-mail-read:before {
727 content: '\f03c'; }
728
729 .octicon-mail-reply:before {
730 content: '\f051'; }
731
732 .octicon-mark-github:before {
733 content: '\f00a'; }
734
735 .octicon-mark-twitter:before {
736 content: '\f0ae'; }
737
738 .octicon-megaphone:before {
739 content: '\f077'; }
740
741 .octicon-microscope:before {
742 content: '\f089'; }
743
744 .octicon-milestone:before {
745 content: '\f075'; }
746
747 .octicon-mirror-private:before {
748 content: '\f025'; }
749
750 .octicon-mirror-public:before {
751 content: '\f024'; }
752
753 .octicon-move-down:before {
754 content: '\f0a8'; }
755
756 .octicon-move-left:before {
757 content: '\f074'; }
758
759 .octicon-move-right:before {
760 content: '\f0a9'; }
761
762 .octicon-move-up:before {
763 content: '\f0a7'; }
764
765 .octicon-mute:before {
766 content: '\f080'; }
767
768 .octicon-no-newline:before {
769 content: '\f09c'; }
770
771 .octicon-octoface:before {
772 content: '\f008'; }
773
774 .octicon-organization:before {
775 content: '\f037'; }
776
777 .octicon-pencil:before {
778 content: '\f058'; }
779
780 .octicon-person:before {
781 content: '\f018'; }
782
783 .octicon-person-add:before {
784 content: '\f01a'; }
785
786 .octicon-person-follow:before {
787 content: '\f01c'; }
788
789 .octicon-person-remove:before {
790 content: '\f01b'; }
791
792 .octicon-pin:before {
793 content: '\f041'; }
794
795 .octicon-plus:before {
796 content: '\f05d'; }
797
798 .octicon-podium:before {
799 content: '\f0af'; }
800
801 .octicon-primitive-dot:before {
802 content: '\f052'; }
803
804 .octicon-primitive-square:before {
805 content: '\f053'; }
806
807 .octicon-pulse:before {
808 content: '\f085'; }
809
810 .octicon-question:before {
811 content: '\f02c'; }
812
813 .octicon-quote:before {
814 content: '\f063'; }
815
816 .octicon-radio-tower:before {
817 content: '\f030'; }
818
819 .octicon-remove-close:before {
820 content: '\f050'; }
821
822 .octicon-repo:before {
823 content: '\f001'; }
824
825 .octicon-repo-clone:before {
826 content: '\f04c'; }
827
828 .octicon-repo-create:before {
829 content: '\f003'; }
830
831 .octicon-repo-delete:before {
832 content: '\f004'; }
833
834 .octicon-repo-force-push:before {
835 content: '\f04a'; }
836
837 .octicon-repo-forked:before {
838 content: '\f002'; }
839
840 .octicon-repo-pull:before {
841 content: '\f006'; }
842
843 .octicon-repo-push:before {
844 content: '\f005'; }
845
846 .octicon-repo-sync:before {
847 content: '\f04b'; }
848
849 .octicon-rocket:before {
850 content: '\f033'; }
851
852 .octicon-rss:before {
853 content: '\f034'; }
854
855 .octicon-ruby:before {
856 content: '\f047'; }
857
858 .octicon-screen-full:before {
859 content: '\f066'; }
860
861 .octicon-screen-normal:before {
862 content: '\f067'; }
863
864 .octicon-search:before {
865 content: '\f02e'; }
866
867 .octicon-server:before {
868 content: '\f097'; }
869
870 .octicon-settings:before {
871 content: '\f07c'; }
872
873 .octicon-squirrel:before {
874 content: '\f0b2'; }
875
876 .octicon-star:before {
877 content: '\f02a'; }
878
879 .octicon-star-add:before {
880 content: '\f082'; }
881
882 .octicon-star-delete:before {
883 content: '\f083'; }
884
885 .octicon-stop:before {
886 content: '\f08f'; }
887
888 .octicon-sync:before {
889 content: '\f087'; }
890
891 .octicon-tag:before {
892 content: '\f015'; }
893
894 .octicon-tag-add:before {
895 content: '\f054'; }
896
897 .octicon-tag-remove:before {
898 content: '\f055'; }
899
900 .octicon-telescope:before {
901 content: '\f088'; }
902
903 .octicon-three-bars:before {
904 content: '\f05e'; }
905
906 .octicon-tools:before {
907 content: '\f031'; }
908
909 .octicon-triangle-down:before {
910 content: '\f05b'; }
911
912 .octicon-triangle-left:before {
913 content: '\f044'; }
914
915 .octicon-triangle-right:before {
916 content: '\f05a'; }
917
918 .octicon-triangle-up:before {
919 content: '\f0aa'; }
920
921 .octicon-unfold:before {
922 content: '\f039'; }
923
924 .octicon-versions:before {
925 content: '\f064'; }
926
927 .octicon-x:before {
928 content: '\f081'; }
929
930 .octicon-zap:before {
931 content: '\26A1'; }
932
933 html {
934 background: #e3e3e3;
935 background: transparent url("http://ww2.sinaimg.cn/large/62755f82gw1ejqgbgc1hwj219s0wdti5.jpg") repeat scroll 0 0; }
936
937 body {
938 background: #e3e3e3;
939 background: transparent url("http://ww2.sinaimg.cn/large/62755f82gw1ejqgbgc1hwj219s0wdti5.jpg") repeat scroll 0 0;
940 font-family: "Hiragino Kaku Gothic ProN", "Helvetica Neue", "Luxi Sans", "DejaVu Sans", Tahoma, "Hiragino Sans GB", STHeiti;
941 font-size: 13px; }
942
943 a.btn-small {
944 font-size: 12px; }
945
946 a.btn {
947 color: #666666 !important; }
948
949 .navbar-static-top .container,
950 .navbar-fixed-top .container,
951 .navbar-fixed-bottom .container,
952 .container,
953 .navbar-static-top .container,
954 .navbar-fixed-top .container,
955 .navbar-fixed-bottom .container {
956 width: 960px; }
957
958 .top-navbar {
959 font-size: 14px;
960 position: relative; }
961 .top-navbar .navbar-inner {
962 background-color: #f3f3f3;
963 background-image: -moz-linear-gradient(#f9f9f9, #f3f3f3);
964 background-image: -webkit-linear-gradient(#f9f9f9, #f3f3f3);
965 background-image: linear-gradient(#f9f9f9, #f3f3f3);
966 background-repeat: repeat-x;
967 text-shadow: 0 1px 0 #fff;
968 border-bottom: 1px solid #e5e5e5;
969 box-shadow: 0px 1px 0px rgba(0, 0, 0, 0.2);
970 filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff2f2f2', GradientType=0);
971 border-left: #d4d4d4 1px solid;
972 padding: 3px 0; }
973 .top-navbar .navbar-inner .brand {
974 color: #333333;
975 transition: all 0.1s ease-in;
976 -webkit-transition: all 0.1s ease-in 0;
977 white-space: nowrap;
978 font-weight: bold;
979 text-shadow: 0 1px 0 #fff;
980 margin: 3px -15px 0 -10px;
981 padding: 7px 20px; }
982 .top-navbar .navbar-inner .nav {
983 margin: 6px 0 0; }
984 .top-navbar .navbar-inner .nav li {
985 margin: 0 10px 0 0; }
986 .top-navbar .navbar-inner .nav li.active a {
987 background: transparent;
988 -webkit-box-shadow: none;
989 -moz-box-shadow: none;
990 box-shadow: none; }
991 .top-navbar .navbar-inner .nav li.active a:hover {
992 color: #db4937; }
993 .top-navbar .navbar-inner .nav li a {
994 display: block;
995 padding: 5px;
996 font-size: 14px;
997 font-weight: bold;
998 color: #333333;
999 transition: all 0.1s ease-in;
1000 -webkit-transition: all 0.1s ease-in 0;
1001 text-shadow: 0 1px 0 #fff; }
1002 .top-navbar .navbar-inner .nav li a:hover {
1003 color: #db4937; }
1004 .top-navbar .navbar-inner .nav li a.item-book:after {
1005 display: block;
1006 content: '';
1007 width: 17px;
1008 height: 7px;
1009 background: transparent url("/static/images/icon-new.png") no-repeat scroll 0 0;
1010 position: relative;
1011 top: -29px;
1012 left: 30px; }
1013 .top-navbar .navbar-inner .nav li .avatar img {
1014 -webkit-border-radius: first-value-of(2px) first-value-of(2px);
1015 -moz-border-radius: 2px / 2px;
1016 border-radius: 2px / 2px; }
1017 .top-navbar .navbar-inner .divider-vertical {
1018 float: left;
1019 width: 1px;
1020 height: 40px;
1021 margin: 0 15px;
1022 background-color: #e5e5e5;
1023 border-right: 1px solid #fff;
1024 border-left: 0; }
1025 .top-navbar .navbar-inner .account-menu .btn-small {
1026 margin: 2px 0 0 10px;
1027 padding: 2px 8px; }
1028 .top-navbar .navbar-inner .account-menu li {
1029 margin: 0 1px 0 0; }
1030 .top-navbar .navbar-inner .account-menu li .avatar {
1031 margin: -1px 0 0; }
1032 .top-navbar .navbar-search {
1033 margin-left: 30px; }
1034 .top-navbar .navbar-search input.search-query {
1035 height: 17px;
1036 position: relative;
1037 -moz-box-sizing: border-box;
1038 box-sizing: border-box;
1039 width: 100%;
1040 *width: 120px;
1041 min-height: 28px;
1042 min-height: 20px\9;
1043 padding: 4px 8px 4px 8px;
1044 padding: 1px 8px 1px 8px\9;
1045 font-size: 12px;
1046 transition: all 0.2s ease-in-out;
1047 -webkit-transition: all 0.2s ease-in-out 0;
1048 outline: none;
1049 color: #333;
1050 background-color: #fcfcfc;
1051 background-repeat: no-repeat;
1052 background-position: right center;
1053 border: 1px solid #ddd;
1054 border-radius: 3px;
1055 box-shadow: 1px 1px 0 #fff;
1056 -moz-box-sizing: border-box;
1057 box-sizing: border-box;
1058 transition: all 0.15s ease-in;
1059 -webkit-transition: all 0.15s ease-in 0;
1060 vertical-align: middle;
1061 margin: 2px 0 0;
1062 line-height: 1.4; }
1063 .top-navbar .navbar-search input.search-query:focus {
1064 padding: 1px 15px 1px 15px\9; }
1065
1066 .container-box {
1067 -webkit-border-radius: first-value-of(5px) first-value-of(5px);
1068 -moz-border-radius: 5px / 5px;
1069 border-radius: 5px / 5px;
1070 background: #fff;
1071 list-style-position: inside;
1072 padding: 10px;
1073 -webkit-box-shadow: 0px 1px 0px rgba(150, 150, 150, 0.15);
1074 -moz-box-shadow: 0px 1px 0px rgba(150, 150, 150, 0.15);
1075 box-shadow: 0px 1px 0px rgba(150, 150, 150, 0.15);
1076 border: 1px solid rgba(150, 150, 150, 0.6); }
1077 .container-box .ui-header .title {
1078 display: block;
1079 border-bottom: 1px solid #eee;
1080 padding: 0 0 8px;
1081 margin: 0 0 -1px 0; }
1082 .container-box a {
1083 color: #999; }
1084
1085 .row-fluid .left {
1086 width: 70.468%;
1087 min-height: 750px; }
1088 .row-fluid .right {
1089 width: 27.404%; }
1090
1091 .news {
1092 margin: 0; }
1093 .news li {
1094 float: left;
1095 margin: 0 25px 0 0;
1096 width: 190px;
1097 height: 20px;
1098 overflow: hidden; }
1099 .news li a {
1100 color: #666;
1101 text-overflow: ellipsis; }
1102
1103 .topics {
1104 padding: 0; }
1105 .topics .topic-item {
1106 padding: 10px 40px 10px 10px;
1107 margin: 0 0 -1px 0;
1108 border-bottom: 1px solid #e5e5e5;
1109 border-top: 1px solid #e5e5e5;
1110 line-height: 12px;
1111 position: relative; }
1112 .topics .topic-item:first-child {
1113 -webkit-border-radius: first-value-of(3px) first-value-of(3px 3px 0 0);
1114 -moz-border-radius: 3px / 3px 3px 0 0;
1115 border-radius: 3px / 3px 3px 0 0;
1116 border-top: 0; }
1117 .topics .topic-item:last-child {
1118 -webkit-border-radius: first-value-of(3px) first-value-of(0 0 3px 3px);
1119 -moz-border-radius: 3px / 0 0 3px 3px;
1120 border-radius: 3px / 0 0 3px 3px;
1121 border-bottom: 1px solid #bbb; }
1122 .topics .topic-item:hover {
1123 background: #f5f9fc; }
1124 .topics .topic-item .avatar {
1125 -webkit-border-radius: first-value-of(3px) first-value-of(3px);
1126 -moz-border-radius: 3px / 3px;
1127 border-radius: 3px / 3px;
1128 float: left;
1129 margin: 0 10px 0 0;
1130 width: 42px;
1131 height: 42px; }
1132 .topics .topic-item .title {
1133 font-size: 15px;
1134 font-weight: normal;
1135 line-height: 21px;
1136 color: #777;
1137 margin: 0 0 3px 0;
1138 letter-spacing: 0;
1139 text-shadow: 0 1px 0 #fff; }
1140 .topics .topic-item .title a {
1141 color: #555; }
1142 .topics .topic-item .meta {
1143 font-size: 12px;
1144 color: #a5a5a5; }
1145 .topics .topic-item .meta .node {
1146 -webkit-border-radius: first-value-of(3px) first-value-of(3px);
1147 -moz-border-radius: 3px / 3px;
1148 border-radius: 3px / 3px;
1149 display: inline-block;
1150 padding: 3px 4px;
1151 background: #eee; }
1152 .topics .topic-item .meta .node a {
1153 color: #a5a5a5; }
1154 .topics .topic-item .meta .username {
1155 font-weight: bold;
1156 color: #888; }
1157 .topics .topic-item .meta .username a {
1158 color: #888; }
1159 .topics .topic-item .meta .username em.badge-icon-1 {
1160 display: inline-block;
1161 width: 14px;
1162 height: 14px;
1163 background: transparent url("../images/member-icons.png") no-repeat scroll -124px 0;
1164 vertical-align: middle;
1165 margin: 0 0 0 3px; }
1166 .topics .topic-item .meta .last-reply-username strong {
1167 margin: 0 0 0 3px;
1168 color: #888; }
1169 .topics .topic-item .meta span {
1170 margin: 0 5px 0 2px; }
1171 .topics .topic-item .count {
1172 -webkit-border-radius: first-value-of(8px) first-value-of(8px);
1173 -moz-border-radius: 8px / 8px;
1174 border-radius: 8px / 8px;
1175 position: absolute;
1176 right: 10px;
1177 top: 40%;
1178 background: #bbb;
1179 font-size: 13px; }
1180 .topics .topic-item .count a {
1181 color: #fff;
1182 padding: 3px 8px;
1183 display: block;
1184 background: #b5bbcf;
1185 -webkit-border-radius: first-value-of(8px) first-value-of(8px);
1186 -moz-border-radius: 8px / 8px;
1187 border-radius: 8px / 8px; }
1188 .topics .topic-item .count a:visited {
1189 background: #d5d5d5; }
1190 .topics .topic-item .main {
1191 padding: 0 0 0 45px; }
1192 .topics .pagination {
1193 margin: 13px 15px;
1194 float: right; }
1195 .topics .pagination a {
1196 color: #999;
1197 padding: 2px 9px; }
1198 .topics .ui-header {
1199 padding: 10px; }
1200 .topics .ui-header .bread-nav {
1201 font-size: 14px;
1202 line-height: 27px; }
1203 .topics .ui-header .node-link {
1204 font-size: 13px;
1205 color: #666;
1206 padding: 0 4px; }
1207 .topics .ui-header .dropdown-menu {
1208 left: auto;
1209 right: 0;
1210 min-width: 130px; }
1211
1212 .usercard, .user-page .profile {
1213 padding: 0; }
1214 .usercard .ui-header, .user-page .profile .ui-header {
1215 -webkit-border-radius: first-value-of(5px) first-value-of(5px 5px 0 0);
1216 -moz-border-radius: 5px / 5px 5px 0 0;
1217 border-radius: 5px / 5px 5px 0 0;
1218 padding: 10px;
1219 background: transparent url("../images/grey_header_web.png") repeat scroll 0 0;
1220 color: #fff;
1221 line-height: 25px; }
1222 .usercard .ui-header .avatar, .user-page .profile .ui-header .avatar {
1223 -webkit-border-radius: first-value-of(3px) first-value-of(3px);
1224 -moz-border-radius: 3px / 3px;
1225 border-radius: 3px / 3px;
1226 float: left;
1227 margin-right: 10px;
1228 width: 48px;
1229 height: 48px; }
1230 .usercard .ui-header .username, .user-page .profile .ui-header .username {
1231 font-size: 18px;
1232 font-weight: bold; }
1233 .usercard .ui-header .username em.badge-icon-1, .user-page .profile .ui-header .username em.badge-icon-1 {
1234 display: inline-block;
1235 width: 14px;
1236 height: 14px;
1237 background: transparent url("../images/member-icons.png") no-repeat scroll -124px 0;
1238 vertical-align: middle;
1239 margin: 0 0 0 3px; }
1240 .usercard .ui-header .website a, .user-page .profile .ui-header .website a {
1241 color: #fff; }
1242 .usercard .ui-content .status, .user-page .profile .ui-content .status {
1243 width: 23.5%;
1244 float: left;
1245 padding: 5px 0;
1246 margin: 10px 0;
1247 text-align: center;
1248 border-right: 1px solid #eee;
1249 line-height: 18px; }
1250 .usercard .ui-content .status strong, .user-page .profile .ui-content .status strong {
1251 display: block;
1252 font-size: 17px; }
1253 .usercard .ui-content .status a, .user-page .profile .ui-content .status a {
1254 color: #333; }
1255 .usercard .ui-content .status-reputation, .user-page .profile .ui-content .status-reputation {
1256 border: 0; }
1257 .usercard .ui-content a, .user-page .profile .ui-content a {
1258 color: #333; }
1259
1260 .nodes-cloud {
1261 padding: 0; }
1262 .nodes-cloud .title {
1263 font-size: 13px;
1264 line-height: 12px;
1265 color: #333;
1266 margin: 0;
1267 padding: 10px;
1268 border-bottom: 1px solid #eee;
1269 font-weight: bold;
1270 padding-left: 30px;
1271 text-shadow: 0 1px 0 #fff; }
1272 .nodes-cloud ul {
1273 margin: 0;
1274 text-shadow: 0 1px 0 #fff; }
1275 .nodes-cloud ul li {
1276 list-style: none;
1277 border-bottom: 1px solid #eee;
1278 padding: 7px 10px 7px 0;
1279 line-height: 24px; }
1280 .nodes-cloud ul li:last-child {
1281 border: 0; }
1282 .nodes-cloud ul li label {
1283 font-weight: bold;
1284 float: left;
1285 text-align: right;
1286 width: 60px;
1287 line-height: 24px;
1288 font-size: 13px; }
1289 .nodes-cloud ul li .nodes {
1290 display: block;
1291 padding: 0 0 0 80px; }
1292 .nodes-cloud ul li .nodes a {
1293 color: #666;
1294 font-size: 13px;
1295 margin: 0 5px; }
1296
1297 .footer {
1298 background: #fff;
1299 border-top: 1px solid #ccc;
1300 line-height: 20px;
1301 padding: 8px 0 12px; }
1302 .footer .footer-bg {
1303 padding: 15px 0 10px 10px;
1304 background: transparent url("/static/images/linode_logo.png") no-repeat scroll 850px center;
1305 position: relative; }
1306 .footer .footer-bg a {
1307 color: #999; }
1308 .footer .footer-bg .fade-color {
1309 color: #ccc; }
1310 .footer .footer-bg .donate img {
1311 position: absolute;
1312 top: 50%;
1313 right: 280px;
1314 margin-top: -13px;
1315 width: 100px; }
1316
1317 .hot-nodes a {
1318 -webkit-border-radius: first-value-of(5px) first-value-of(5px);
1319 -moz-border-radius: 5px / 5px;
1320 border-radius: 5px / 5px;
1321 display: inline-block;
1322 padding: 1px 7px;
1323 margin: 3px 0;
1324 background: #f3f3f3;
1325 color: #777;
1326 border: 1px solid #eee;
1327 font-size: 12px;
1328 background: -moz-linear-gradient(center top, white 0%, #f3f3f3 50%, #ededed 51%, white 100%) repeat scroll 0 0 transparent;
1329 background: -webkit-linear-gradient(top, white 0%, #f3f3f3 50%, #ededed 51%, white 100%) repeat scroll 0 0 transparent;
1330 border: 1px solid #e5e5e5;
1331 text-shadow: 0 1px 0 #fff;
1332 line-height: 21px; }
1333 .hot-nodes a:hover {
1334 background: -moz-linear-gradient(center top, white 0%, #e6e6e6 50%, #dfdfdf 51%, white 100%) repeat scroll 0 0 transparent;
1335 background: -webkit-linear-gradient(top, white 0%, #e6e6e6 50%, #dfdfdf 51%, white 100%) repeat scroll 0 0 transparent;
1336 border: 1px solid #dfdfdf;
1337 text-decoration: none;
1338 color: #333; }
1339
1340 .community-status dl {
1341 margin: 5px 0 5px 0; }
1342 .community-status dl dt {
1343 float: left;
1344 width: 56px;
1345 text-align: right; }
1346 .community-status dl dd {
1347 padding: 0 0 0 60px; }
1348
1349 .login-box .title {
1350 padding: 0 0 5px; }
1351 .login-box .ui-header .explanation {
1352 font-weight: bold; }
1353 .login-box .ui-header .description {
1354 color: #cecece; }
1355 .login-box .ui-content {
1356 padding: 7px 0 0;
1357 line-height: 30px; }
1358
1359 .user-page .profile .ui-header {
1360 position: relative; }
1361 .user-page .profile .ui-header .username em.badge-icon-1 {
1362 display: inline-block;
1363 width: 14px;
1364 height: 14px;
1365 background: transparent url("../images/member-icons.png") no-repeat scroll -124px 0;
1366 vertical-align: middle;
1367 margin: 0 0 0 3px; }
1368 .user-page .profile .ui-content {
1369 padding: 15px; }
1370 .user-page .profile .user-number {
1371 padding: 0 0 0 70px;
1372 line-height: 20px;
1373 position: absolute;
1374 right: 20px;
1375 top: 15px;
1376 color: #999;
1377 text-shadow: 0 1px 0 #000; }
1378 .user-page .profile dl {
1379 margin: 5px 0 5px 0; }
1380 .user-page .profile dl dt {
1381 float: left;
1382 width: 50px;
1383 text-align: right;
1384 font-weight: normal; }
1385 .user-page .profile dl dd {
1386 padding: 0 0 0 60px; }
1387 .user-page .topic-lists {
1388 padding: 0; }
1389 .user-page .topic-lists .ui-header {
1390 padding: 10px 10px 0; }
1391 .user-page .topic-lists .topic-item .avatar {
1392 display: none; }
1393 .user-page .topic-lists .topic-item .main {
1394 padding: 0; }
1395 .user-page .topic-lists .topic-item:first-child {
1396 border-radius: 0; }
1397 .user-page .topic-lists .ui-footer {
1398 padding: 10px 10px 10px; }
1399 .user-page .project-lists ul {
1400 margin: 0;
1401 padding: 10px 1px 0 1px; }
1402 .user-page .project-lists ul li {
1403 list-style: none; }
1404 .user-page .project-lists ul li .title a {
1405 color: #333;
1406 font-weight: bold; }
1407 .user-page .project-lists ul li .desc {
1408 color: #888; }
1409 .user-page .self-introduction .ui-content {
1410 padding: 10px 0 5px 0;
1411 line-height: 25px; }
1412 .user-page .book-lists table a img {
1413 max-width: 73px; }
1414
1415 .topic-detail {
1416 padding: 0; }
1417 .topic-detail .ui-header {
1418 -webkit-border-radius: first-value-of(5px) first-value-of(5px 5px 0 0);
1419 -moz-border-radius: 5px / 5px 5px 0 0;
1420 border-radius: 5px / 5px 5px 0 0;
1421 border-bottom: 1px solid #eee;
1422 padding: 10px;
1423 background: #f5f5f5;
1424 background-image: -webkit-gradient(linear, left top, left bottom, from(white), to(whitesmoke));
1425 background-image: -webkit-linear-gradient(top, white, whitesmoke);
1426 background-image: -moz-linear-gradient(top, white, whitesmoke);
1427 background-image: -o-linear-gradient(top, white, whitesmoke);
1428 background-image: linear-gradient(to bottom, white, whitesmoke); }
1429 .topic-detail .ui-header .avatar {
1430 float: right;
1431 -webkit-border-radius: first-value-of(3px) first-value-of(3px);
1432 -moz-border-radius: 3px / 3px;
1433 border-radius: 3px / 3px; }
1434 .topic-detail .ui-header .title {
1435 border: 0;
1436 padding: 0;
1437 font-weight: normal; }
1438 .topic-detail .ui-header .meta .username em.badge-icon-1 {
1439 display: inline-block;
1440 width: 14px;
1441 height: 14px;
1442 background: transparent url("../images/member-icons.png") no-repeat scroll -124px 0;
1443 vertical-align: middle;
1444 margin: 0 0 0 3px; }
1445 .topic-detail .ui-content {
1446 padding: 15px 10px 10px 10px;
1447 font-size: 14px;
1448 line-height: 25px; }
1449 .topic-detail .ui-content .gist .gist-file {
1450 -webkit-border-radius: first-value-of(3px) first-value-of(3px);
1451 -moz-border-radius: 3px / 3px;
1452 border-radius: 3px / 3px; }
1453 .topic-detail .ui-content h1, .topic-detail .ui-content h2, .topic-detail .ui-content h3, .topic-detail .ui-content h4, .topic-detail .ui-content h5,
1454 .topic-detail .ui-content blockquote p {
1455 font-size: 13px;
1456 line-height: 20px; }
1457 .topic-detail .ui-content p {
1458 margin: 0 0 10px 0 !important; }
1459 .topic-detail .ui-content ul > li,
1460 .topic-detail .ui-content ol > li {
1461 line-height: 22px; }
1462 .topic-detail .ui-content ul > li p,
1463 .topic-detail .ui-content ol > li p {
1464 margin: 0 !important; }
1465 .topic-detail .ui-content code {
1466 border: 0; }
1467 .topic-detail .ui-footer {
1468 -webkit-border-radius: first-value-of(5px) first-value-of(0 0 5px 5px);
1469 -moz-border-radius: 5px / 0 0 5px 5px;
1470 border-radius: 5px / 0 0 5px 5px;
1471 background: #f5f5f5;
1472 padding: 5px 10px;
1473 border-top: 1px solid #eee;
1474 color: #666;
1475 font-size: 12px;
1476 text-shadow: 0px 1px 0px #fff;
1477 background: #eeeeee;
1478 background: -moz-linear-gradient(top, #eeeeee 0%, #cccccc 100%);
1479 background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #eeeeee), color-stop(100%, #cccccc));
1480 background: -webkit-linear-gradient(top, #eeeeee 0%, #cccccc 100%);
1481 background: -o-linear-gradient(top, #eeeeee 0%, #cccccc 100%);
1482 background: -ms-linear-gradient(top, #eeeeee 0%, #cccccc 100%);
1483 background: linear-gradient(to bottom, #eeeeee 0%, #cccccc 100%);
1484 filter: progid:DXImageTransform.Microsoft.gradient(startColorstr = '#eeeeee', endColorstr = '#cccccc', GradientType = 0); }
1485 .topic-detail .ui-footer a {
1486 margin: 0 15px 0 0;
1487 color: #333;
1488 font-size: 12px;
1489 text-shadow: 0px 1px 0px #fff; }
1490
1491 .topic-reply {
1492 padding: 0; }
1493 .topic-reply .ui-header {
1494 -webkit-border-radius: first-value-of(5px) first-value-of(5px 5px 0 0);
1495 -moz-border-radius: 5px / 5px 5px 0 0;
1496 border-radius: 5px / 5px 5px 0 0;
1497 padding: 5px 10px;
1498 background: #f5f5f5;
1499 border-bottom: 1px solid #eee;
1500 background-image: -webkit-gradient(linear, left top, left bottom, from(white), to(whitesmoke));
1501 background-image: -webkit-linear-gradient(top, white, whitesmoke);
1502 background-image: -moz-linear-gradient(top, white, whitesmoke);
1503 background-image: -o-linear-gradient(top, white, whitesmoke);
1504 background-image: linear-gradient(to bottom, white, whitesmoke); }
1505 .topic-reply .ui-content {
1506 padding: 0 10px; }
1507 .topic-reply .ui-content .reply-item {
1508 border-bottom: 1px solid #eee;
1509 padding: 10px 0; }
1510 .topic-reply .ui-content .reply-item:last-child {
1511 border-bottom: 0; }
1512 .topic-reply .ui-content .reply-item .avatar {
1513 -webkit-border-radius: first-value-of(3px) first-value-of(3px);
1514 -moz-border-radius: 3px / 3px;
1515 border-radius: 3px / 3px;
1516 float: left;
1517 margin-right: 10px;
1518 width: 48px;
1519 height: 48px; }
1520 .topic-reply .ui-content .reply-item .main {
1521 padding: 0 0 0 60px; }
1522 .topic-reply .ui-content .reply-item .main .meta {
1523 font-size: 12px;
1524 padding: 0 0 5px 0; }
1525 .topic-reply .ui-content .reply-item .main .meta .username {
1526 font-weight: bold; }
1527 .topic-reply .ui-content .reply-item .main .meta .username em.badge-icon-1 {
1528 display: inline-block;
1529 width: 14px;
1530 height: 14px;
1531 background: transparent url("../images/member-icons.png") no-repeat scroll -124px 0;
1532 vertical-align: middle;
1533 margin: 0 0 0 3px; }
1534 .topic-reply .ui-content .reply-item .main .meta .time {
1535 color: #999;
1536 margin: 0 0 0 5px; }
1537 .topic-reply .ui-content .reply-item .main .meta .reply-username {
1538 color: #333; }
1539 .topic-reply .ui-content .reply-item .main .meta .reply-to {
1540 margin: 0 5px 0 0;
1541 cursor: pointer; }
1542 .topic-reply .ui-content .reply-item .main .meta .reply-to img {
1543 vertical-align: text-bottom; }
1544 .topic-reply .ui-content .reply-item .main .meta .floor {
1545 color: #999; }
1546 .topic-reply .ui-content .reply-item .main .content {
1547 font-size: 14px;
1548 font-weight: normal;
1549 line-height: 22px; }
1550 .topic-reply .ui-content .reply-item .main .content h1, .topic-reply .ui-content .reply-item .main .content h2, .topic-reply .ui-content .reply-item .main .content h3, .topic-reply .ui-content .reply-item .main .content h4, .topic-reply .ui-content .reply-item .main .content h5,
1551 .topic-reply .ui-content .reply-item .main .content blockquote p {
1552 font-size: 13px;
1553 line-height: 20px; }
1554 .topic-reply .ui-content .reply-item .main .content iframe {
1555 max-height: 135px; }
1556 .topic-reply .ui-content .gist .gist-file {
1557 -webkit-border-radius: first-value-of(3px) first-value-of(3px);
1558 -moz-border-radius: 3px / 3px;
1559 border-radius: 3px / 3px; }
1560 .topic-reply .ui-footer .pagination {
1561 margin: 5px 15px 10px 10px;
1562 float: right; }
1563 .topic-reply .ui-footer .pagination a {
1564 color: #999; }
1565
1566 .sidebox .ui-header .title {
1567 margin-bottom: 10px; }
1568 .sidebox .ui-content {
1569 line-height: 23px; }
1570
1571 .topic-create form .span11 {
1572 width: 622px; }
1573 .topic-create form textarea {
1574 width: 635px;
1575 height: 430px; }
1576
1577 .topic-reply-create form {
1578 margin: 0; }
1579 .topic-reply-create form textarea {
1580 width: 635px;
1581 height: 230px; }
1582 .topic-reply-create .ui-content {
1583 padding: 5px 0 0; }
1584
1585 .errors {
1586 margin: 0 0 25px 0; }
1587
1588 form .errors {
1589 margin: 5px 0 5px 0; }
1590
1591 .sidenav ul {
1592 margin: 0;
1593 padding: 0 0 0 10px; }
1594 .sidenav ul li {
1595 list-style: none;
1596 line-height: 25px; }
1597 .sidenav ul li a {
1598 color: #999; }
1599
1600 form #self_intro {
1601 height: 120px; }
1602 form .set-avatar-btn {
1603 width: 284px;
1604 margin: 15px 0 0 0; }
1605 form .control-group {
1606 margin: 0 0 15px !important; }
1607 form .controls .avatar {
1608 -webkit-border-radius: first-value-of(3px) first-value-of(3px);
1609 -moz-border-radius: 3px / 3px;
1610 border-radius: 3px / 3px;
1611 vertical-align: text-bottom; }
1612 form .controls p {
1613 padding: 7px 0 0; }
1614
1615 .node-topics .ui-header {
1616 border-bottom: 1px solid #eee; }
1617
1618 .smart-code-support {
1619 font-family: Consolas, "Liberation Mono", Courier, monospace;
1620 font-size: 13px;
1621 -moz-resize: vertical;
1622 -webkit-resize: vertical;
1623 resize: vertical; }
1624
1625 .alert a {
1626 color: #c09853; }
1627
1628 .notification-item {
1629 border-bottom: 1px solid #eee;
1630 padding: 10px 0; }
1631 .notification-item .avatar {
1632 -webkit-border-radius: first-value-of(3px) first-value-of(3px);
1633 -moz-border-radius: 3px / 3px;
1634 border-radius: 3px / 3px;
1635 float: left;
1636 margin-right: 10px;
1637 width: 48px;
1638 height: 48px; }
1639 .notification-item .main {
1640 padding: 0 0 0 60px; }
1641 .notification-item .main .title {
1642 font-size: 13px;
1643 font-weight: bold;
1644 display: block;
1645 margin: 0 0 5px 0;
1646 color: #999; }
1647 .notification-item .main .title a {
1648 color: #333; }
1649 .notification-item .main .meta {
1650 font-size: 12px;
1651 padding: 0 0 5px 0; }
1652 .notification-item .main .meta .username {
1653 font-weight: bold; }
1654 .notification-item .main .meta .time {
1655 color: #999;
1656 margin: 0 0 0 5px; }
1657 .notification-item .main .content {
1658 font-size: 13px;
1659 font-weight: normal;
1660 font-family: Monaco, "Microsoft YaHei", "Hiragino Sans GB W3", Tahoma, Arial; }
1661 .notification-item .main .content h1, .notification-item .main .content h2, .notification-item .main .content h3, .notification-item .main .content h4, .notification-item .main .content h5,
1662 .notification-item .main .content blockquote p {
1663 font-size: 13px;
1664 line-height: 20px; }
1665
1666 .replies-lists {
1667 padding: 0; }
1668 .replies-lists .ui-header {
1669 padding: 10px; }
1670 .replies-lists .ui-content .reply-item {
1671 font-size: 13px; }
1672 .replies-lists .ui-content .reply-item .title {
1673 display: block;
1674 background: #eff6ff;
1675 line-height: 30px;
1676 padding: 3px 10px;
1677 background-image: -webkit-gradient(linear, left top, left bottom, from(#e9e9e9), to(#f8f8f8));
1678 background-image: -webkit-linear-gradient(top, #e9e9e9, #f8f8f8);
1679 background-image: -moz-linear-gradient(top, #e9e9e9, #f8f8f8);
1680 background-image: -o-linear-gradient(top, #e9e9e9, #f8f8f8);
1681 background-image: linear-gradient(to bottom, #e9e9e9, #f8f8f8); }
1682 .replies-lists .ui-content .reply-item .content {
1683 padding: 10px;
1684 line-height: 22px; }
1685 .replies-lists .ui-content .reply-item .content h1, .replies-lists .ui-content .reply-item .content h2, .replies-lists .ui-content .reply-item .content h3, .replies-lists .ui-content .reply-item .content h4, .replies-lists .ui-content .reply-item .content h5,
1686 .replies-lists .ui-content .reply-item .content blockquote p {
1687 font-size: 13px;
1688 line-height: 20px; }
1689 .replies-lists .ui-content .reply-item .content iframe {
1690 max-height: 135px; }
1691 .replies-lists .ui-footer {
1692 padding: 0 10px; }
1693
1694 .member-lists .member {
1695 display: inline-block;
1696 width: 60px;
1697 height: 50px;
1698 padding: 10px;
1699 text-align: center;
1700 margin: 5px 0 0 5px; }
1701 .member-lists .member .username {
1702 display: block;
1703 margin: 3px 0 0; }
1704 .member-lists .member .username a {
1705 font-family: Monaco, "Microsoft YaHei", "Hiragino Sans GB W3", Tahoma, Arial;
1706 color: #666;
1707 font-size: 12px; }
1708 .member-lists .member .avatar {
1709 -webkit-border-radius: first-value-of(3px) first-value-of(3px);
1710 -moz-border-radius: 3px / 3px;
1711 border-radius: 3px / 3px;
1712 width: 48px;
1713 height: 48px; }
1714
1715 .book-lists .book {
1716 vertical-align: top;
1717 height: auto; }
1718 .book-lists .book .thumb {
1719 height: auto; }
1720
1721 .no-replies,
1722 .no-topics,
1723 .no-favorites {
1724 background: transparent;
1725 border: 2px dashed rgba(0, 0, 0, 0.1);
1726 text-align: center;
1727 color: rgba(0, 0, 0, 0.25);
1728 font-size: 12px; }
1729
1730 p {
1731 margin: 0 !important; }
1732
1733 textarea,
1734 input[type="text"],
1735 input[type="password"],
1736 input[type="datetime"],
1737 input[type="datetime-local"],
1738 input[type="date"],
1739 input[type="month"],
1740 input[type="time"],
1741 input[type="week"],
1742 input[type="number"],
1743 input[type="email"],
1744 input[type="url"],
1745 input[type="search"],
1746 input[type="tel"],
1747 input[type="color"],
1748 .uneditable-input {
1749 -webkit-box-shadow: inset 1px 1px 5px 0px rgba(0, 0, 0, 0.18);
1750 -moz-box-shadow: inset 1px 1px 5px 0px rgba(0, 0, 0, 0.18);
1751 box-shadow: inset 1px 1px 5px 0px rgba(0, 0, 0, 0.18); }
1752
1753 .codehilite pre {
1754 -webkit-box-shadow: rgba(0, 0, 0, 0.07) 0 1px 2px inset;
1755 -moz-box-shadow: rgba(0, 0, 0, 0.07) 0 1px 2px inset;
1756 box-shadow: rgba(0, 0, 0, 0.07) 0 1px 2px inset;
1757 background: #f1f1f1;
1758 padding: 4.5px 8px; }
1759
1760 .pagination ul > li a, .pagination ul > li.disabled a:hover {
1761 color: #555;
1762 font-size: 13px;
1763 text-decoration: none;
1764 text-shadow: 0 1px 0 #fff;
1765 background-color: #eaeaea;
1766 background-image: -moz-linear-gradient(#fafafa, #eaeaea);
1767 background-image: -webkit-linear-gradient(#fafafa, #eaeaea);
1768 background-image: linear-gradient(#fafafa, #eaeaea);
1769 background-repeat: repeat-x;
1770 border: 1px solid #ddd;
1771 border-bottom: 1px solid #c5c5c5;
1772 margin-left: -1px; }
1773 .pagination ul > li a:hover {
1774 color: #fff;
1775 text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.3);
1776 background-color: #3072b3;
1777 background-image: -moz-linear-gradient(#599bdc, #3072b3);
1778 background-image: -webkit-linear-gradient(#599bdc, #3072b3);
1779 background-image: linear-gradient(#599bdc, #3072b3);
1780 background-repeat: repeat-x;
1781 border-color: #2a65a0; }
1782 .pagination ul > li.active a, .pagination ul > li:active a:hover {
1783 color: #fff;
1784 font-weight: bold;
1785 text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.5);
1786 background-color: #9e9e9e;
1787 background-image: -moz-linear-gradient(#767676, #9e9e9e);
1788 background-image: -webkit-linear-gradient(#767676, #9e9e9e);
1789 background-image: linear-gradient(#767676, #9e9e9e);
1790 background-repeat: repeat-x;
1791 border-color: #686868; }
1792
1793 .notification-indicator {
1794 float: left;
1795 width: 40px;
1796 height: 40px;
1797 margin: 0 -15px;
1798 text-align: center;
1799 line-height: 40px; }
1800
1801 .notification-indicator .mail-status {
1802 display: inline-block;
1803 width: 8px;
1804 height: 8px;
1805 border-radius: 100px;
1806 background-color: #aaa;
1807 background-color: #cccccc;
1808 background-image: -moz-linear-gradient(#aaaaaa, #cccccc);
1809 background-image: -webkit-linear-gradient(#aaaaaa, #cccccc);
1810 background-image: linear-gradient(#aaaaaa, #cccccc);
1811 background-repeat: repeat-x;
1812 box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.1), 0 1px 0 white; }
1813
1814 .notification-indicator .unread {
1815 background-color: #3269a0;
1816 background-image: -moz-linear-gradient(#4183c4, #3269a0);
1817 background-image: -webkit-linear-gradient(#4183c4, #3269a0);
1818 background-image: linear-gradient(#4183c4, #3269a0);
1819 background-repeat: repeat-x;
1820 box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 1px 0 rgba(0, 0, 0, 0.1), 0 0 10px #4183c4; }
1821
1822 .notification-indicator.contextually-unread {
1823 position: relative;
1824 z-index: 2;
1825 margin: 0 -16px -1px -17px;
1826 padding-left: 1px;
1827 background-color: #d2e4f9;
1828 background-image: -moz-linear-gradient(#e9f2fc, #d2e4f9);
1829 background-image: -webkit-linear-gradient(#e9f2fc, #d2e4f9);
1830 background-image: linear-gradient(#e9f2fc, #d2e4f9);
1831 background-repeat: repeat-x;
1832 border: solid #c2d5eb;
1833 border-width: 0 1px 1px;
1834 box-shadow: inset 1px 0 rgba(255, 255, 255, 0.5); }
1835
1836 @media screen and (max-device-width: 480px), screen and (max-device-width: 641px), screen and (max-device-width: 720px) {
1837 .navbar-static-top .container,
1838 .navbar-fixed-top .container,
1839 .navbar-fixed-bottom .container,
1840 .container,
1841 .navbar-static-top .container,
1842 .navbar-fixed-top .container,
1843 .navbar-fixed-bottom .container {
1844 width: 100%;
1845 box-sizing: border-box; }
1846
1847 .container-fluid {
1848 padding: 0 10px; }
1849
1850 .navbar-inner .container > .nav-collapse {
1851 display: none; }
1852 .navbar-inner .container > .nav-collapse.pull-right {
1853 display: block;
1854 margin: -1px 10px 0 0; }
1855 .navbar-inner .container .navbar-search {
1856 display: none; }
1857
1858 .row-fluid .left,
1859 .row-fluid .right {
1860 width: 100%;
1861 min-height: 30px; }
1862
1863 .row-fluid .right {
1864 margin: 10px 0 0; }
1865
1866 .nodes-cloud,
1867 .usercard,
1868 .user-page .profile {
1869 display: none; }
1870
1871 .sidebox.weixin, .sidebox.friends, .sidebox.community-status {
1872 display: none; }
1873
1874 .topics .topic-item .meta {
1875 display: none; }
1876 .topics .topic-item .avatar {
1877 width: 20px;
1878 height: 20px; }
1879 .topics .topic-item .main {
1880 padding: 0 0 0 30px; }
1881 .topics .ui-header .dropdown {
1882 display: none; }
1883
1884 .topic-create form .span11 {
1885 width: 90%; }
1886
1887 .topic-detail .ui-footer a {
1888 display: none; }
1889
1890 fieldset {
1891 min-width: 0; }
1892
1893 .form-horizontal.setting .control-group:nth-child(2) {
1894 display: none; }
1895 .form-horizontal .control-label {
1896 width: 90px; }
1897 .form-horizontal .controls {
1898 margin-left: 95px; }
1899 .form-horizontal .controls a[href="/forgot"] {
1900 display: none; }
1901 .form-horizontal .input-xlarge {
1902 width: 90%; }
1903
1904 .user-page .project-lists {
1905 display: none; }
1906
1907 code {
1908 white-space: normal; }
1909
1910 .sidenav li:nth-child(2) {
1911 display: none; }
1912
1913 .login-box {
1914 display: none; }
1915
1916 .footer .donate {
1917 display: none; } }
1918 .navbar-static-top .container,
1919 .navbar-fixed-top .container,
1920 .navbar-fixed-bottom .container,
1921 .container,
1922 .navbar-static-top .container,
1923 .navbar-fixed-top .container,
1924 .navbar-fixed-bottom .container {
1925 width: 100%;
1926 max-width: 960px;
1927 box-sizing: border-box;
1928 padding: 0 10px; }
1929
1930 .topic-create form textarea,
1931 .topic-reply-create form textarea {
1932 width: 100%;
1933 box-sizing: border-box; }
1934
1935 .topic-create form .input-prepend .add-on {
1936 display: none; }
1937 .topic-create form .input-prepend input {
1938 width: 100%;
1939 box-sizing: border-box;
1940 -webkit-border-radius: first-value-of(4px) first-value-of(4px);
1941 -moz-border-radius: 4px / 4px;
1942 border-radius: 4px / 4px; }
1943
forum/static/css/main.scss
File was created 1 @charset "UTF-8";
2
3 @import 'compass/_css3';
4 @import 'base/atom';
5 @import 'base/octicons';
6
7 html {
8 //background: transparent url("../images/idev.png") repeat scroll 0 0;
9 //background: transparent url("http://img02.taobaocdn.com/tps/i2/T1BsZZXhVfXXXgtLTf-1648-1165.png") repeat scroll 0 0;
10 //font-family: Tahoma, Arial, "Hiragino Sans GB W3", STHeiti, "Microsoft YaHei";
11 background: #e3e3e3;
12 //background: transparent url('http://s.libdd.com/img/bg/htmlbg.$5752.png') repeat scroll 0 0;
13 background: transparent url('http://img01.taobaocdn.com/tps/i1/T1Eyp7Fn4dXXbfQAHy-500-400.png') repeat scroll 0 0;
14 font: 13px Helvetica, arial, freesans, clean, sans-serif;
15 font-family: "Helvetica Neue", "Luxi Sans", "DejaVu Sans", Tahoma, "Hiragino Sans GB", STHeiti !important;
16 }
17
18 body {
19 //font-family: "TheSerifRegular", "TheSerif", "Hiragino Sans GB", "STHeiti", "Microsoft YaHei", "微软雅黑", "WenQuanYi Zen Hei", "文泉驿正黑", "WenQuanYi Micro Hei", "文泉驿微米黑", "times new roman", "times", serif;
20 //background: transparent url("../images/idev.png") repeat scroll 0 0;
21 //background: transparent url("http://img02.taobaocdn.com/tps/i2/T1BsZZXhVfXXXgtLTf-1648-1165.png") repeat scroll 0 0;
22 background: #e3e3e3;
23 //background: transparent url('http://s.libdd.com/img/bg/htmlbg.$5752.png') repeat scroll 0 0;
24 background: transparent url('http://img01.taobaocdn.com/tps/i1/T1Eyp7Fn4dXXbfQAHy-500-400.png') repeat scroll 0 0;
25 font: 13px Helvetica, arial, freesans, clean, sans-serif;
26 font-family: "Helvetica Neue", "Luxi Sans", "DejaVu Sans", Tahoma, "Hiragino Sans GB", STHeiti !important;
27 }
28
29 a.btn-small {
30 font-size: 12px;
31 }
32
33 a.btn {
34 color: #666!important;
35 }
36
37 .navbar-static-top .container,
38 .navbar-fixed-top .container,
39 .navbar-fixed-bottom .container,
40 .container,
41 .navbar-static-top .container,
42 .navbar-fixed-top .container,
43 .navbar-fixed-bottom .container {
44 width: 960px;
45 }
46
47 .top-navbar {
48 font-size: 14px;
49 position: relative;
50
51 .navbar-inner {
52 background-color: #f3f3f3;
53 background-image: -moz-linear-gradient(#f9f9f9, #f3f3f3);
54 background-image: -webkit-linear-gradient(#f9f9f9, #f3f3f3);
55 background-image: linear-gradient(#f9f9f9, #f3f3f3);
56 background-repeat: repeat-x;
57
58 text-shadow: 0 1px 0 #fff;
59 border-bottom: 1px solid #e5e5e5;
60 box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.2);
61 filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff2f2f2', GradientType=0); border-left: #d4d4d4 1px solid;
62
63 .brand {
64 color: #333333;
65 transition: all 0.1s ease-in;
66 -webkit-transition: all 0.1s ease-in 0;
67 white-space: nowrap;
68 font-weight: bold;
69 text-shadow: 0 1px 0 #fff;
70 margin: 0 -15px 0 -10px;
71 padding: 7px 20px;
72 }
73
74 .nav {
75 margin: 6px 0 0;
76
77 li {
78 margin: 0 10px 0 0;
79
80 &.active a {
81 background: transparent;
82 -webkit-box-shadow: none;
83 -moz-box-shadow: none;
84 box-shadow: none;
85
86 &:hover {
87 //color: #4183c4;
88 color: #db4937;
89 }
90 }
91
92 a {
93 display: block;
94 padding: 5px;
95 font-size: 13px;
96 font-weight: bold;
97 color: #333333;
98 transition: all 0.1s ease-in;
99 -webkit-transition: all 0.1s ease-in 0;
100 text-shadow: 0 1px 0 #fff;
101
102 &:hover {
103 //color: #4183c4;
104 color: #db4937;
105 }
106 }
107
108 .avatar img {
109 @include border-radius(2px, 2px);
110 }
111 }
112 }
113
114 .divider-vertical {
115 float: left;
116 width: 1px;
117 height: 40px;
118 margin: 0 15px;
119 background-color: #e5e5e5;
120 border-right: 1px solid #fff;
121 border-left: 0;
122 }
123
124 .account-menu {
125 .btn-small {
126 margin: 2px 0 0 10px;
127 padding: 2px 8px;
128 }
129
130 li {
131 margin: 0 1px 0 0;
132
133 .avatar {
134 margin: -1px 0 0;
135 }
136 }
137 }
138 }
139
140 .navbar-search {
141 margin-left: 30px;
142
143 input.search-query {
144 height: 17px;
145
146 position: relative;
147 -moz-box-sizing: border-box;
148 box-sizing: border-box;
149 width: 100%;
150 *width: 120px;
151 min-height: 28px;
152 min-height: 20px\9;
153 padding: 4px 8px 4px 8px;
154 padding: 1px 8px 1px 8px\9;
155 font-size: 12px;
156 transition: all 0.2s ease-in-out;
157 -webkit-transition: all 0.2s ease-in-out 0;
158
159 outline: none;
160 color: #333;
161 background-color: #fcfcfc;
162 background-repeat: no-repeat;
163 background-position: right center;
164 border: 1px solid #ddd;
165 border-radius: 3px;
166 box-shadow: 1px 1px 0 #fff;
167 -moz-box-sizing: border-box;
168 box-sizing: border-box;
169 transition: all 0.15s ease-in;
170 -webkit-transition: all 0.15s ease-in 0;
171 vertical-align: middle;
172
173 margin: 2px 0 0;
174 line-height: 1.4;
175
176 &:focus {
177 padding: 1px 15px 1px 15px\9;
178 }
179 }
180 }
181
182 .account-menu {
183
184 }
185 }
186
187 .container-box {
188 @include border-radius(5px, 5px);
189 @extend .clearfix;
190 background: #fff;
191 list-style-position: inside;
192 padding: 10px;
193
194 //-webkit-box-shadow: 1px 1px 10px #b3b3b3;
195 //-moz-box-shadow: 1px 1px 10px #b3b3b3;
196 //box-shadow: 1px 1px 10px #b3b3b3;
197 //border: 1px solid #eee;
198
199 -webkit-box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.2);
200 -moz-box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.2);
201 box-shadow: 0px 1px 2px rgba(0, 0, 0, 0.2);
202 border: 1px solid rgba(150, 150, 150, 0.6);
203
204 .ui-header {
205 .title {
206 display: block;
207 border-bottom: 1px solid #eee;
208 padding: 0 0 8px;
209 margin: 0 0 -1px 0;
210 }
211 }
212
213 a {
214 color: #999;
215 }
216 }
217
218 .row-fluid {
219 .left {
220 width: 70.468%;
221 min-height: 750px;
222 }
223
224 .right {
225 width: 27.404%;
226 }
227 }
228
229 .news {
230 margin: 0;
231
232 li {
233 float: left;
234 margin: 0 25px 0 0;
235 width: 190px;
236 height: 20px;
237 overflow: hidden;
238
239 a {
240 color: #666;
241 text-overflow: ellipsis;
242 }
243 }
244 }
245
246 .topics {
247 padding: 0;
248 //font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
249 //font-family: "Helvetica Neue", "Luxi Sans", "DejaVu Sans", Tahoma, "Hiragino Sans GB", STHeiti;
250 //border: 0;
251
252 .topic-item {
253 @extend .clearfix;
254 padding: 10px 40px 10px 10px;
255 margin: 0 0 -1px 0;
256 //border-top: 1px solid #eee;
257 //border-bottom: 1px solid #eee;
258 border-bottom: 1px solid #e5e5e5;
259 border-top: 1px solid #e5e5e5;
260 line-height: 12px;
261 position: relative;
262
263 //background-image: url("http://v2ex.com/static/img/bg_item.png");
264 //background-position: 0 bottom;
265 //background-repeat: repeat-x;
266
267 //background-color: #444444;
268 //background-image: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#f5f5f5));
269 //background-image: -webkit-linear-gradient(top, #fff, #f5f5f5);
270 //background-image: -moz-linear-gradient(top, #fff, #f5f5f5);
271 //background-image: -o-linear-gradient(top, #fff, #f5f5f5);
272 //background-image: linear-gradient(to bottom, #fff, #f5f5f5);
273
274 &:first-child {
275 @include border-radius(3px, 3px 3px 0 0);
276 }
277
278 &:last-child {
279 @include border-radius(3px, 0 0 3px 3px);
280 }
281
282 &:hover {
283 background: #f5f9fc;
284 }
285
286 .avatar {
287 @include border-radius(3px, 3px);
288 float: left;
289 margin: 0 10px 0 0;
290 width: 42px;
291 height: 42px;
292 }
293
294 .title {
295 //font-size: 15px;
296 font-size: 16px;
297 font-weight: normal;
298 line-height: 21px;
299 color: #777;
300 margin: 0 0 3px 0;
301 letter-spacing: 0;
302 text-shadow: 0 1px 0 #fff;
303
304 a {
305 color: #555;
306 }
307 }
308
309 .meta {
310 font-size: 12px;
311 color: #a5a5a5;
312
313 .node {
314 @include border-radius(3px, 3px);
315 display: inline-block;
316 padding: 3px 4px;
317 background: #eee;
318
319 a {
320 color: #a5a5a5;
321 }
322 }
323
324 .username {
325 font-weight: bold;
326 color: #888;
327
328 a {
329 color: #888;
330 }
331 }
332
333 .last-reply-username {
334 strong {
335 margin: 0 0 0 3px;
336 color: #888;
337 }
338 }
339
340 span {
341 margin: 0 5px 0 2px;
342 }
343 }
344
345 .count {
346 @include border-radius(8px, 8px);
347 position: absolute;
348 right: 10px;
349 top: 40%;
350 background: #bbb;
351 font-size: 13px;
352
353 a {
354 color: #fff;
355 padding: 3px 8px;
356 display: block;
357 background: #b5bbcf;
358 @include border-radius(8px, 8px);
359
360 &:visited {
361 background: #d5d5d5;
362 }
363 }
364 }
365
366 .main {
367 padding: 0 0 0 45px;
368 }
369 }
370
371 .pagination {
372 margin: 13px 15px;
373 float: right;
374
375 a {
376 color: #999;
377 padding: 2px 9px;
378 }
379 }
380
381 .ui-header {
382 padding: 10px;
383
384 .bread-nav {
385 font-size: 14px;
386 line-height: 27px;
387 }
388 }
389 }
390
391 .usercard {
392 padding: 0;
393
394 .ui-header {
395 @include border-radius(5px, 5px 5px 0 0);
396 @extend .clearfix;
397 padding: 10px;
398 background: transparent url("../images/grey_header_web.png") repeat scroll 0 0;
399 color: #fff;
400 line-height: 25px;
401
402 .avatar {
403 @include border-radius(3px, 3px);
404 float: left;
405 margin-right: 10px;
406 width: 48px;
407 height: 48px;
408 }
409
410 .username {
411 font-size: 18px;
412 font-weight: bold;
413 }
414
415 .website {
416 a {
417 color: #fff;
418 }
419 }
420 }
421
422 .ui-content {
423 @extend .clearfix;
424
425 .status {
426 width: 23.5%;
427 float: left;
428 padding: 5px 0;
429 margin: 10px 0;
430 text-align: center;
431 border-right: 1px solid #eee;
432 line-height: 18px;
433
434 strong {
435 display: block;
436 font-size: 15px;
437 }
438
439 a {
440 color: #333;
441 }
442 }
443
444 .status-reputation {
445 border: 0;
446 }
447
448 a {
449 color: #333;
450 }
451 }
452 }
453
454 .nodes-cloud {
455 //font-family: "Helvetica Neue", "Luxi Sans", "DejaVu Sans", Tahoma, "Hiragino Sans GB", STHeiti;
456 padding: 0;
457
458 .title {
459 font-size: 13px;
460 line-height: 12px;
461 color: #333;
462 margin: 0;
463 padding: 10px;
464 border-bottom: 1px solid #eee;
465 font-weight: bold;
466 padding-left: 30px;
467 text-shadow: 0 1px 0 #fff;
468 }
469
470 ul {
471 margin: 0;
472 text-shadow: 0 1px 0 #fff;
473
474 li {
475 list-style: none;
476 border-bottom: 1px solid #eee;
477 padding: 7px 10px 7px 0;
478 line-height: 24px;
479
480 &:last-child {
481 border: 0;
482 }
483
484 label {
485 font-weight: bold;
486 float: left;
487 text-align: right;
488 width: 60px;
489 line-height: 24px;
490 font-size: 13px;
491 }
492
493 .nodes {
494 display: block;
495 padding: 0 0 0 80px;
496
497 a {
498 color: #666;
499 font-size: 13px;
500 margin: 0 5px;
501 }
502 }
503 }
504 }
505 }
506
507 .footer {
508 background: #fff;
509 border-top: 1px solid #ccc;
510 line-height: 20px;
511 padding: 8px 0 12px;;
512 //font-family: Monaco, "Microsoft YaHei", "Hiragino Sans GB W3", Tahoma, Arial;
513
514 .footer-bg {
515 padding: 15px 0 10px 10px;
516 background: transparent url("/static/images/linode_logo.png") no-repeat scroll 850px center;
517
518 a {
519 color: #999;
520 }
521
522 .fade-color {
523 color: #ccc;
524 }
525 }
526 }
527
528 .hot-nodes {
529 a {
530 @include border-radius(5px, 5px);
531 display: inline-block;
532 padding: 1px 5px;
533 margin: 3px 0;
534 background: #f3f3f3;
535 color: #999;
536 border: 1px solid #eee;
537 font-size: 12px;
538 //font-family: "Helvetica Neue", "Luxi Sans", "DejaVu Sans", Tahoma, "Hiragino Sans GB", STHeiti;
539
540 //background-image: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#f5f5f5));
541 //background-image: -webkit-linear-gradient(top, #fff, #f5f5f5);
542 //background-image: -moz-linear-gradient(top, #fff, #f5f5f5);
543 //background-image: -o-linear-gradient(top, #fff, #f5f5f5);
544 //background-image: linear-gradient(to bottom, #fff, #f5f5f5);
545
546 background: -moz-linear-gradient(center top, #fff 0%, #f3f3f3 50%, #ededed 51%, #fff 100%) repeat scroll 0 0 transparent;
547 background: -webkit-linear-gradient(top, #fff 0%, #f3f3f3 50%, #ededed 51%, #fff 100%) repeat scroll 0 0 transparent;
548 border: 1px solid #e5e5e5;
549 text-shadow: 0 1px 0 #fff;
550 }
551 }
552
553 .community-status {
554 dl {
555 @extend .clearfix;
556 margin: 5px 0 5px 0;
557
558 dt {
559 float: left;
560 width: 56px;
561 text-align: right;
562 }
563
564 dd {
565 padding: 0 0 0 60px;
566 }
567 }
568 }
569
570 .user-page {
571 .profile {
572 @extend .usercard;
573
574 .ui-header {
575 position: relative;
576 }
577
578 .ui-content {
579 padding: 15px;
580 }
581
582 .user-number {
583 padding: 0 0 0 70px;
584 line-height: 20px;
585 position: absolute;
586 right: 20px;
587 top: 15px;
588 color: #999;
589 text-shadow: 0 1px 0 #000;
590 }
591
592 dl {
593 @extend .clearfix;
594 margin: 5px 0 5px 0;
595
596 dt {
597 float: left;
598 width: 50px;
599 text-align: right;
600 font-weight: normal;
601 }
602
603 dd {
604 padding: 0 0 0 60px;
605 }
606 }
607 }
608
609 .topic-lists {
610 padding: 0;
611
612 .ui-header {
613 padding: 10px 10px 0;
614 }
615
616 .topic-item {
617 .avatar {
618 display: none;
619 }
620
621 .main {
622 padding: 0;
623 }
624
625 &:first-child {
626 border-radius: 0;
627 }
628 }
629
630 .ui-footer {
631 padding: 10px 10px 10px;
632 }
633 }
634
635 .project-lists {
636 ul {
637 margin: 0;
638 padding: 10px 1px 0 1px;
639
640 li {
641 list-style: none;
642
643 .title {
644 a {
645 color: #333;
646 font-weight: bold;
647 }
648 }
649
650 .desc {
651 color: #888;
652 }
653 }
654 }
655 }
656
657 .self-introduction {
658 .ui-content {
659 padding: 10px 0 5px 0;
660 line-height: 25px;
661 }
662 }
663
664 .book-lists {
665 table a img {
666 max-width: 73px;
667 }
668 }
669 }
670
671 .topic-detail {
672 padding: 0;
673
674 .ui-header {
675 @extend .clearfix;
676 @include border-radius(5px, 5px 5px 0 0);
677 border-bottom: 1px solid #eee;
678 padding: 10px;
679 background: #f5f5f5;
680
681 background-image: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#f5f5f5));
682 background-image: -webkit-linear-gradient(top, #fff, #f5f5f5);
683 background-image: -moz-linear-gradient(top, #fff, #f5f5f5);
684 background-image: -o-linear-gradient(top, #fff, #f5f5f5);
685 background-image: linear-gradient(to bottom, #fff, #f5f5f5);
686
687 .avatar {
688 float: right;
689 @include border-radius(3px, 3px);
690 }
691
692 .title {
693 border: 0;
694 padding: 0;
695 font-weight: normal;
696 }
697 }
698
699 .ui-content {
700 padding: 15px 10px 10px 10px;
701 //font-size: 13px;
702 font-size: 14px;
703 line-height: 25px;
704 //font-family: Monaco, "Microsoft YaHei", "Hiragino Sans GB W3", Tahoma, Arial;
705
706 .gist {
707 .gist-file {
708 @include border-radius(3px, 3px);
709 }
710 }
711
712 h1, h2, h3, h4, h5,
713 blockquote p {
714 font-size: 13px;
715 line-height: 20px;
716 }
717
718 p {
719 margin: 0 0 10px 0!important;
720 }
721
722 ul > li,
723 ol > li {
724 line-height: 22px;
725
726 p {
727 margin: 0!important;
728 }
729 }
730
731 iframe {
732 max-height: 195px;
733 }
734 }
735
736 .ui-footer {
737 @extend .clearfix;
738 @include border-radius(5px, 0 0 5px 5px);
739 background: #f5f5f5;
740 padding: 5px 10px;
741 border-top: 1px solid #eee;
742
743 color: #666;
744 font-size: 12px;
745 text-shadow: 0px 1px 0px #fff;
746
747 //background-image: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#f5f5f5));
748 //background-image: -webkit-linear-gradient(top, #fff, #f5f5f5);
749 //background-image: -moz-linear-gradient(top, #fff, #f5f5f5);
750 //background-image: -o-linear-gradient(top, #fff, #f5f5f5);
751 //background-image: linear-gradient(to bottom, #fff, #f5f5f5);
752
753 background: #eeeeee;
754 background: -moz-linear-gradient(top, #eeeeee 0%, #cccccc 100%);
755 background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #eeeeee), color-stop(100%, #cccccc));
756 background: -webkit-linear-gradient(top, #eeeeee 0%, #cccccc 100%);
757 background: -o-linear-gradient(top, #eeeeee 0%, #cccccc 100%);
758 background: -ms-linear-gradient(top, #eeeeee 0%, #cccccc 100%);
759 background: linear-gradient(to bottom, #eeeeee 0%, #cccccc 100%);
760 filter: progid:DXImageTransform.Microsoft.gradient( startColorstr = '#eeeeee', endColorstr = '#cccccc', GradientType = 0);
761
762 a {
763 margin: 0 15px 0 0;
764 color: #333;
765 font-size: 12px;
766 text-shadow: 0px 1px 0px #fff;
767 }
768 }
769 }
770
771 .topic-reply {
772 padding: 0;
773
774 .ui-header {
775 @include border-radius(5px, 5px 5px 0 0);
776 padding: 5px 10px;
777 background: #f5f5f5;
778 border-bottom: 1px solid #eee;
779
780 background-image: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#f5f5f5));
781 background-image: -webkit-linear-gradient(top, #fff, #f5f5f5);
782 background-image: -moz-linear-gradient(top, #fff, #f5f5f5);
783 background-image: -o-linear-gradient(top, #fff, #f5f5f5);
784 background-image: linear-gradient(to bottom, #fff, #f5f5f5);
785 }
786
787 .ui-content {
788 //padding: 10px;
789 //font-family: "Helvetica Neue", "Luxi Sans", "DejaVu Sans", Tahoma, "Hiragino Sans GB", STHeiti;
790
791 padding: 0 10px;
792
793 .reply-item {
794 @extend .clearfix;
795 border-bottom: 1px solid #eee;
796 padding: 10px 0;
797
798 &:last-child {
799 border-bottom: 0;
800 }
801
802 .avatar {
803 @include border-radius(3px, 3px);
804 float: left;
805 margin-right: 10px;
806 width: 48px;
807 height: 48px;
808 }
809
810 .main {
811 padding: 0 0 0 60px;
812
813 .meta {
814 font-size: 12px;
815 padding: 0 0 5px 0;
816
817 .username {
818 font-weight: bold;
819 }
820
821 .time {
822 color: #999;
823 margin: 0 0 0 5px;
824 }
825
826 .reply-username {
827 color: #333;
828 }
829
830 .reply-to {
831 margin: 0 5px 0 0;
832 cursor: pointer;
833
834 img {
835 vertical-align: text-bottom;
836 }
837 }
838
839 .floor {
840 color: #999;
841 }
842 }
843
844 .content {
845 //font-size: 13px;
846 font-size: 14px;
847 font-weight: normal;
848 //font-family: Monaco, "Microsoft YaHei", "Hiragino Sans GB W3", Tahoma, Arial;
849 line-height: 22px;
850
851 h1, h2, h3, h4, h5,
852 blockquote p {
853 font-size: 13px;
854 line-height: 20px;
855 }
856
857 iframe {
858 max-height: 135px;
859 }
860 }
861 }
862 }
863
864 .gist {
865 .gist-file {
866 @include border-radius(3px, 3px);
867 }
868 }
869 }
870
871 .ui-footer {
872 .pagination {
873 margin: 5px 15px 10px 10px;
874 float: right;
875
876 a {
877 color: #999;
878 }
879 }
880 }
881 }
882
883 .sidebox {
884 .ui-header {
885 .title {
886 margin-bottom: 10px;
887 }
888 }
889
890 .ui-content {
891 line-height: 23px;
892 }
893 }
894
895 .topic-create {
896 form {
897 .span11 {
898 width: 622px;
899 }
900
901 textarea {
902 width: 635px;
903 height: 430px;
904 }
905 }
906 }
907
908 .topic-reply-create {
909 form {
910 margin: 0;
911
912 textarea {
913 width: 635px;
914 height: 230px;
915 }
916 }
917
918 .ui-content {
919 //padding: 10px 0;
920 padding: 5px 0 0;
921 }
922 }
923
924 .errors {
925 margin: 0 0 25px 0;
926 }
927
928 form .errors {
929 margin: 5px 0 5px 0;
930 }
931
932 .sidenav {
933 ul {
934 margin: 0;
935 padding: 0 0 0 10px;
936
937 li {
938 list-style: none;
939 line-height: 25px;
940
941 a {
942 color: #999;
943 }
944 }
945 }
946 }
947
948 form {
949 #self_intro {
950 height: 120px;
951 }
952
953 .set-avatar-btn {
954 width: 284px;
955 margin: 15px 0 0 0;
956 }
957
958 .control-group {
959 margin: 0 0 15px!important;
960 }
961
962 .controls {
963 .avatar {
964 @include border-radius(3px, 3px);
965 vertical-align: text-bottom;
966 }
967
968 p {
969 padding: 7px 0 0;
970 }
971 }
972 }
973
974 .node-topics {
975 .ui-header {
976 border-bottom: 1px solid #eee;
977 }
978 }
979
980 .smart-code-support {
981 font-family: Consolas, "Liberation Mono", Courier, monospace;
982 font-size: 13px;
983 -moz-resize: vertical;
984 -webkit-resize: vertical;
985 resize: vertical;
986 }
987
988 .alert {
989 a {
990 color: #c09853;
991 }
992 }
993
994 .notification-item {
995 @extend .clearfix;
996 border-bottom: 1px solid #eee;
997 padding: 10px 0;
998
999 .avatar {
1000 @include border-radius(3px, 3px);
1001 float: left;
1002 margin-right: 10px;
1003 width: 48px;
1004 height: 48px;
1005 }
1006
1007 .main {
1008 padding: 0 0 0 60px;
1009
1010 .title {
1011 font-size: 13px;
1012 font-weight: bold;
1013 display: block;
1014 margin: 0 0 5px 0;
1015 color: #999;
1016
1017 a {
1018 color: #333;
1019 }
1020 }
1021
1022 .meta {
1023 font-size: 12px;
1024 padding: 0 0 5px 0;
1025
1026 .username {
1027 font-weight: bold;
1028 }
1029
1030 .time {
1031 color: #999;
1032 margin: 0 0 0 5px;
1033 }
1034 }
1035
1036 .content {
1037 font-size: 13px;
1038 font-weight: normal;
1039 font-family: Monaco, "Microsoft YaHei", "Hiragino Sans GB W3", Tahoma, Arial;
1040
1041 h1, h2, h3, h4, h5,
1042 blockquote p {
1043 font-size: 13px;
1044 line-height: 20px;
1045 }
1046 }
1047 }
1048 }
1049
1050 .replies-lists {
1051 padding: 0;
1052
1053 .ui-header {
1054 padding: 10px;
1055 }
1056
1057 .ui-content {
1058 .reply-item {
1059 font-size: 13px;
1060
1061 .title {
1062 display: block;
1063 background: #eff6ff;
1064 line-height: 30px;
1065 padding: 3px 10px;
1066
1067 background-image: -webkit-gradient(linear, left top, left bottom, from(#e9e9e9), to(#f8f8f8));
1068 background-image: -webkit-linear-gradient(top, #e9e9e9, #f8f8f8);
1069 background-image: -moz-linear-gradient(top, #e9e9e9, #f8f8f8);
1070 background-image: -o-linear-gradient(top, #e9e9e9, #f8f8f8);
1071 background-image: linear-gradient(to bottom, #e9e9e9, #f8f8f8);
1072 }
1073
1074 .content {
1075 padding: 10px;
1076 line-height: 22px;
1077
1078 h1, h2, h3, h4, h5,
1079 blockquote p {
1080 font-size: 13px;
1081 line-height: 20px;
1082 }
1083
1084 iframe {
1085 max-height: 135px;
1086 }
1087 }
1088 }
1089 }
1090
1091 .ui-footer {
1092 padding: 0 10px;
1093 }
1094 }
1095
1096 .member-lists {
1097 .member {
1098 display: inline-block;
1099 width: 60px;
1100 height: 50px;
1101 padding: 10px;
1102 text-align: center;
1103 margin: 5px 0 0 5px;
1104
1105 .username {
1106 display: block;
1107 margin: 3px 0 0;
1108
1109 a {
1110 font-family: Monaco, "Microsoft YaHei", "Hiragino Sans GB W3", Tahoma, Arial;
1111 color: #666;
1112 font-size: 12px;
1113 }
1114 }
1115
1116 .avatar {
1117 @include border-radius(3px, 3px);
1118 width: 48px;
1119 height: 48px;
1120 }
1121 }
1122 }
1123
1124 .no-replies,
1125 .no-topics,
1126 .no-favorites {
1127 background: transparent;
1128 border: 2px dashed rgba(0, 0, 0, 0.1);
1129 text-align: center;
1130 color: rgba(0, 0, 0, 0.25);
1131 font-size: 12px;
1132 }
1133
1134 p {
1135 margin: 0!important;
1136 }
1137
1138 textarea,
1139 input[type="text"],
1140 input[type="password"],
1141 input[type="datetime"],
1142 input[type="datetime-local"],
1143 input[type="date"],
1144 input[type="month"],
1145 input[type="time"],
1146 input[type="week"],
1147 input[type="number"],
1148 input[type="email"],
1149 input[type="url"],
1150 input[type="search"],
1151 input[type="tel"],
1152 input[type="color"],
1153 .uneditable-input {
1154 -webkit-box-shadow: inset 1px 1px 5px 0px rgba(0, 0, 0, 0.18) ;
1155 -moz-box-shadow: inset 1px 1px 5px 0px rgba(0, 0, 0, 0.18) ;
1156 box-shadow: inset 1px 1px 5px 0px rgba(0, 0, 0, 0.18) ;
1157 }
1158
1159 .codehilite {
1160 pre {
1161 -webkit-box-shadow: rgba(0, 0, 0, 0.07) 0 1px 2px inset;
1162 -moz-box-shadow: rgba(0, 0, 0, 0.07) 0 1px 2px inset;
1163 box-shadow: rgba(0, 0, 0, 0.07) 0 1px 2px inset;
1164 background: #f1f1f1;
1165 padding: 4.5px 8px;
1166 }
1167 }
1168
1169 // 分页 - PAGINATION
1170
1171 .pagination {
1172 ul > li {
1173 a,
1174 &.disabled a:hover {
1175 color: #555;
1176 font-size: 13px;
1177 text-decoration: none;
1178 text-shadow: 0 1px 0 #fff;
1179 background-color: #eaeaea;
1180 background-image: -moz-linear-gradient(#fafafa, #eaeaea);
1181 background-image: -webkit-linear-gradient(#fafafa, #eaeaea);
1182 background-image: linear-gradient(#fafafa, #eaeaea);
1183 background-repeat: repeat-x;
1184 border: 1px solid #ddd;
1185 border-bottom: 1px solid #c5c5c5;
1186 margin-left: -1px;
1187 }
1188
1189 a:hover {
1190 color: #fff;
1191 text-shadow: 0 -1px 0 rgba(0,0,0,0.3);
1192 background-color: #3072b3;
1193 background-image: -moz-linear-gradient(#599bdc, #3072b3);
1194 background-image: -webkit-linear-gradient(#599bdc, #3072b3);
1195 background-image: linear-gradient(#599bdc, #3072b3);
1196 background-repeat: repeat-x;
1197 border-color: #2a65a0;
1198 }
1199
1200 &.active a,
1201 &:active a:hover {
1202 color: #fff;
1203 font-weight: bold;
1204 text-shadow: 0 -1px 0 rgba(0,0,0,0.5);
1205 background-color: #9e9e9e;
1206 background-image: -moz-linear-gradient(#767676, #9e9e9e);
1207 background-image: -webkit-linear-gradient(#767676, #9e9e9e);
1208 background-image: linear-gradient(#767676, #9e9e9e);
1209 background-repeat: repeat-x;
1210 border-color: #686868;
1211 }
1212 }
1213 }
1214
1215 // 提醒 - NOTIFICATION
1216
1217 .notification-indicator {
1218 float: left;
1219 width: 40px;
1220 height: 40px;
1221 margin: 0 -15px;
1222 text-align: center;
1223 line-height: 40px;
1224 }
1225
1226 .notification-indicator .mail-status {
1227 display: inline-block;
1228 width: 8px;
1229 height: 8px;
1230 border-radius: 100px;
1231 background-color: #aaa;
1232 background-color: #cccccc;
1233 background-image: -moz-linear-gradient(#aaa, #ccc);
1234 background-image: -webkit-linear-gradient(#aaa, #ccc);
1235 background-image: linear-gradient(#aaa, #ccc);
1236 background-repeat: repeat-x;
1237 box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.1), 0 1px 0 #fff;
1238 }
1239
1240 .notification-indicator .unread {
1241 background-color: #3269a0;
1242 background-image: -moz-linear-gradient(#4183c4, #3269a0);
1243 background-image: -webkit-linear-gradient(#4183c4, #3269a0);
1244 background-image: linear-gradient(#4183c4, #3269a0);
1245 background-repeat: repeat-x;
1246 box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15),0 1px 0 rgba(0, 0, 0, 0.1), 0 0 10px #4183c4;
1247 }
1248
1249 .notification-indicator.contextually-unread {
1250 position: relative;
1251 z-index: 2;
1252 margin: 0 -16px -1px -17px;
1253 padding-left: 1px;
1254 background-color: #d2e4f9;
1255 background-image: -moz-linear-gradient(#e9f2fc, #d2e4f9);
1256 background-image: -webkit-linear-gradient(#e9f2fc, #d2e4f9);
1257 background-image: linear-gradient(#e9f2fc, #d2e4f9);
1258 background-repeat: repeat-x;
1259 border: solid #c2d5eb;
1260 border-width: 0 1px 1px;
1261 box-shadow: inset 1px 0 rgba(255, 255, 255, 0.5);
1262 }
1263
1264 // 响应式设计
1265
1266 @media screen and (max-device-width: 480px),
1267 screen and (max-device-width: 641px),
1268 screen and (max-device-width: 720px) {
1269 .navbar-static-top .container,
1270 .navbar-fixed-top .container,
1271 .navbar-fixed-bottom .container,
1272 .container,
1273 .navbar-static-top .container,
1274 .navbar-fixed-top .container,
1275 .navbar-fixed-bottom .container {
1276 width: 100%;
1277 box-sizing: border-box;
1278 }
1279
1280 .container-fluid {
1281 padding: 0 10px;
1282 }
1283
1284 .navbar-inner .container {
1285 & > .nav-collapse {
1286 display: none;
1287 }
1288
1289 & > .nav-collapse.pull-right {
1290 display: block;
1291 margin: -1px 10px 0 0;
1292 }
1293
1294 .navbar-search {
1295 display: none;
1296 }
1297 }
1298
1299 .row-fluid .left,
1300 .row-fluid .right {
1301 width: 100%;
1302 min-height: 30px;
1303 }
1304
1305 .row-fluid .right {
1306 margin: 10px 0 0;
1307 }
1308
1309 .nodes-cloud,
1310 .usercard {
1311 display: none;
1312 }
1313
1314 .sidebox {
1315 &.weixin,
1316 &.friends,
1317 &.community-status {
1318 display: none;
1319 }
1320 }
1321
1322 .topics {
1323 .topic-item {
1324 .meta {
1325 display: none;
1326 }
1327
1328 .avatar {
1329 width: 20px;
1330 height: 20px;
1331 }
1332
1333 .main {
1334 padding: 0 0 0 30px;
1335 }
1336 }
1337 }
1338
1339 //.topic-create form textarea,
1340 //.topic-reply-create form textarea {
1341 // width: 100%;
1342 // box-sizing: border-box;
1343 //}
1344
1345 .topic-create form .span11 {
1346 width: 90%;
1347 }
1348
1349 .topic-detail .ui-footer a {
1350 display: none;
1351 }
1352
1353 fieldset {
1354 min-width: 0;
1355 }
1356
1357 .form-horizontal {
1358 &.setting .control-group {
1359 &:nth-child(2) {
1360 display: none;
1361 }
1362 }
1363
1364 .control-label {
1365 width: 90px;
1366 }
1367
1368 .controls {
1369 margin-left: 95px;
1370
1371 a[href="/forgot"] {
1372 display: none;
1373 }
1374 }
1375
1376 .input-xlarge {
1377 width: 90%;
1378 }
1379 }
1380
1381 .user-page {
1382 .project-lists {
1383 display: none;
1384 }
1385 }
1386
1387 code {
1388 white-space: normal;
1389 }
1390
1391 .sidenav {
1392 li:nth-child(2) {
1393 display: none;
1394 }
1395 }
1396
1397 .login-box {
1398 display: none;
1399 }
1400 }
1401
1402 .navbar-static-top .container,
1403 .navbar-fixed-top .container,
1404 .navbar-fixed-bottom .container,
1405 .container,
1406 .navbar-static-top .container,
1407 .navbar-fixed-top .container,
1408 .navbar-fixed-bottom .container {
1409 width: 100%;
1410 max-width: 960px;
1411 //min-width: 685px;
1412 box-sizing: border-box;
1413 }
1414
1415 .topic-create form textarea,
1416 .topic-reply-create form textarea {
1417 width: 100%;
1418 box-sizing: border-box;
1419 }
1420
1421 .topic-create form .input-prepend {
1422 .add-on {
1423 display: none;
1424 }
1425
1426 input {
1427 width: 100%;
1428 box-sizing: border-box;
1429 @include border-radius(4px, 4px);
1430 }
1431 }
1432
forum/static/favicon.ico
No preview for this file type
forum/static/images/ajax-loader.gif

9.25 KB

forum/static/images/f2e.im.icon.png

3.71 KB

forum/static/images/f2e.im.logo.png

4.79 KB

forum/static/images/grey_header_web.png

93.5 KB

forum/static/images/icon-new.png

1010 Bytes

forum/static/images/idev.png

357 KB

forum/static/images/linode_logo.png

2.71 KB

forum/static/images/loading.gif

1.69 KB

forum/static/images/logo-dance.png

949 Bytes

forum/static/images/member-icons.png

4.08 KB

forum/static/images/python_china_logo.jpg

23.6 KB

forum/static/images/qrcode_for_gh_81ac76ebf8e3_258.jpg

23.1 KB

forum/static/images/reply.png

1.13 KB

forum/static/images/ruby_china_logo.png

7.98 KB

forum/static/images/totop.gif

644 Bytes

forum/static/images/trans4fun.png

6.56 KB

forum/static/images/ubuntusoft.png

2.17 KB

forum/static/js/base/bootstrap.js
File was created 1 /* ===================================================
2 * bootstrap-transition.js v2.2.1
3 * http://twitter.github.com/bootstrap/javascript.html#transitions
4 * ===================================================
5 * Copyright 2012 Twitter, Inc.
6 *
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ========================================================== */
19
20
21 !function ($) {
22
23 "use strict"; // jshint ;_;
24
25
26 /* CSS TRANSITION SUPPORT (http://www.modernizr.com/)
27 * ======================================================= */
28
29 $(function () {
30
31 $.support.transition = (function () {
32
33 var transitionEnd = (function () {
34
35 var el = document.createElement('bootstrap')
36 , transEndEventNames = {
37 'WebkitTransition' : 'webkitTransitionEnd'
38 , 'MozTransition' : 'transitionend'
39 , 'OTransition' : 'oTransitionEnd otransitionend'
40 , 'transition' : 'transitionend'
41 }
42 , name
43
44 for (name in transEndEventNames){
45 if (el.style[name] !== undefined) {
46 return transEndEventNames[name]
47 }
48 }
49
50 }())
51
52 return transitionEnd && {
53 end: transitionEnd
54 }
55
56 })()
57
58 })
59
60 }(window.jQuery);
61 /* =========================================================
62 * bootstrap-modal.js v2.2.1
63 * http://twitter.github.com/bootstrap/javascript.html#modals
64 * =========================================================
65 * Copyright 2012 Twitter, Inc.
66 *
67 * Licensed under the Apache License, Version 2.0 (the "License");
68 * you may not use this file except in compliance with the License.
69 * You may obtain a copy of the License at
70 *
71 * http://www.apache.org/licenses/LICENSE-2.0
72 *
73 * Unless required by applicable law or agreed to in writing, software
74 * distributed under the License is distributed on an "AS IS" BASIS,
75 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
76 * See the License for the specific language governing permissions and
77 * limitations under the License.
78 * ========================================================= */
79
80
81 !function ($) {
82
83 "use strict"; // jshint ;_;
84
85
86 /* MODAL CLASS DEFINITION
87 * ====================== */
88
89 var Modal = function (element, options) {
90 this.options = options
91 this.$element = $(element)
92 .delegate('[data-dismiss="modal"]', 'click.dismiss.modal', $.proxy(this.hide, this))
93 this.options.remote && this.$element.find('.modal-body').load(this.options.remote)
94 }
95
96 Modal.prototype = {
97
98 constructor: Modal
99
100 , toggle: function () {
101 return this[!this.isShown ? 'show' : 'hide']()
102 }
103
104 , show: function () {
105 var that = this
106 , e = $.Event('show')
107
108 this.$element.trigger(e)
109
110 if (this.isShown || e.isDefaultPrevented()) return
111
112 this.isShown = true
113
114 this.escape()
115
116 this.backdrop(function () {
117 var transition = $.support.transition && that.$element.hasClass('fade')
118
119 if (!that.$element.parent().length) {
120 that.$element.appendTo(document.body) //don't move modals dom position
121 }
122
123 that.$element
124 .show()
125
126 if (transition) {
127 that.$element[0].offsetWidth // force reflow
128 }
129
130 that.$element
131 .addClass('in')
132 .attr('aria-hidden', false)
133
134 that.enforceFocus()
135
136 transition ?
137 that.$element.one($.support.transition.end, function () { that.$element.focus().trigger('shown') }) :
138 that.$element.focus().trigger('shown')
139
140 })
141 }
142
143 , hide: function (e) {
144 e && e.preventDefault()
145
146 var that = this
147
148 e = $.Event('hide')
149
150 this.$element.trigger(e)
151
152 if (!this.isShown || e.isDefaultPrevented()) return
153
154 this.isShown = false
155
156 this.escape()
157
158 $(document).off('focusin.modal')
159
160 this.$element
161 .removeClass('in')
162 .attr('aria-hidden', true)
163
164 $.support.transition && this.$element.hasClass('fade') ?
165 this.hideWithTransition() :
166 this.hideModal()
167 }
168
169 , enforceFocus: function () {
170 var that = this
171 $(document).on('focusin.modal', function (e) {
172 if (that.$element[0] !== e.target && !that.$element.has(e.target).length) {
173 that.$element.focus()
174 }
175 })
176 }
177
178 , escape: function () {
179 var that = this
180 if (this.isShown && this.options.keyboard) {
181 this.$element.on('keyup.dismiss.modal', function ( e ) {
182 e.which == 27 && that.hide()
183 })
184 } else if (!this.isShown) {
185 this.$element.off('keyup.dismiss.modal')
186 }
187 }
188
189 , hideWithTransition: function () {
190 var that = this
191 , timeout = setTimeout(function () {
192 that.$element.off($.support.transition.end)
193 that.hideModal()
194 }, 500)
195
196 this.$element.one($.support.transition.end, function () {
197 clearTimeout(timeout)
198 that.hideModal()
199 })
200 }
201
202 , hideModal: function (that) {
203 this.$element
204 .hide()
205 .trigger('hidden')
206
207 this.backdrop()
208 }
209
210 , removeBackdrop: function () {
211 this.$backdrop.remove()
212 this.$backdrop = null
213 }
214
215 , backdrop: function (callback) {
216 var that = this
217 , animate = this.$element.hasClass('fade') ? 'fade' : ''
218
219 if (this.isShown && this.options.backdrop) {
220 var doAnimate = $.support.transition && animate
221
222 this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')
223 .appendTo(document.body)
224
225 this.$backdrop.click(
226 this.options.backdrop == 'static' ?
227 $.proxy(this.$element[0].focus, this.$element[0])
228 : $.proxy(this.hide, this)
229 )
230
231 if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
232
233 this.$backdrop.addClass('in')
234
235 doAnimate ?
236 this.$backdrop.one($.support.transition.end, callback) :
237 callback()
238
239 } else if (!this.isShown && this.$backdrop) {
240 this.$backdrop.removeClass('in')
241
242 $.support.transition && this.$element.hasClass('fade')?
243 this.$backdrop.one($.support.transition.end, $.proxy(this.removeBackdrop, this)) :
244 this.removeBackdrop()
245
246 } else if (callback) {
247 callback()
248 }
249 }
250 }
251
252
253 /* MODAL PLUGIN DEFINITION
254 * ======================= */
255
256 $.fn.modal = function (option) {
257 return this.each(function () {
258 var $this = $(this)
259 , data = $this.data('modal')
260 , options = $.extend({}, $.fn.modal.defaults, $this.data(), typeof option == 'object' && option)
261 if (!data) $this.data('modal', (data = new Modal(this, options)))
262 if (typeof option == 'string') data[option]()
263 else if (options.show) data.show()
264 })
265 }
266
267 $.fn.modal.defaults = {
268 backdrop: true
269 , keyboard: true
270 , show: true
271 }
272
273 $.fn.modal.Constructor = Modal
274
275
276 /* MODAL DATA-API
277 * ============== */
278
279 $(document).on('click.modal.data-api', '[data-toggle="modal"]', function (e) {
280 var $this = $(this)
281 , href = $this.attr('href')
282 , $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) //strip for ie7
283 , option = $target.data('modal') ? 'toggle' : $.extend({ remote:!/#/.test(href) && href }, $target.data(), $this.data())
284
285 e.preventDefault()
286
287 $target
288 .modal(option)
289 .one('hide', function () {
290 $this.focus()
291 })
292 })
293
294 }(window.jQuery);
295
296 /* ============================================================
297 * bootstrap-dropdown.js v2.2.1
298 * http://twitter.github.com/bootstrap/javascript.html#dropdowns
299 * ============================================================
300 * Copyright 2012 Twitter, Inc.
301 *
302 * Licensed under the Apache License, Version 2.0 (the "License");
303 * you may not use this file except in compliance with the License.
304 * You may obtain a copy of the License at
305 *
306 * http://www.apache.org/licenses/LICENSE-2.0
307 *
308 * Unless required by applicable law or agreed to in writing, software
309 * distributed under the License is distributed on an "AS IS" BASIS,
310 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
311 * See the License for the specific language governing permissions and
312 * limitations under the License.
313 * ============================================================ */
314
315
316 !function ($) {
317
318 "use strict"; // jshint ;_;
319
320
321 /* DROPDOWN CLASS DEFINITION
322 * ========================= */
323
324 var toggle = '[data-toggle=dropdown]'
325 , Dropdown = function (element) {
326 var $el = $(element).on('click.dropdown.data-api', this.toggle)
327 $('html').on('click.dropdown.data-api', function () {
328 $el.parent().removeClass('open')
329 })
330 }
331
332 Dropdown.prototype = {
333
334 constructor: Dropdown
335
336 , toggle: function (e) {
337 var $this = $(this)
338 , $parent
339 , isActive
340
341 if ($this.is('.disabled, :disabled')) return
342
343 $parent = getParent($this)
344
345 isActive = $parent.hasClass('open')
346
347 clearMenus()
348
349 if (!isActive) {
350 $parent.toggleClass('open')
351 $this.focus()
352 }
353
354 return false
355 }
356
357 , keydown: function (e) {
358 var $this
359 , $items
360 , $active
361 , $parent
362 , isActive
363 , index
364
365 if (!/(38|40|27)/.test(e.keyCode)) return
366
367 $this = $(this)
368
369 e.preventDefault()
370 e.stopPropagation()
371
372 if ($this.is('.disabled, :disabled')) return
373
374 $parent = getParent($this)
375
376 isActive = $parent.hasClass('open')
377
378 if (!isActive || (isActive && e.keyCode == 27)) return $this.click()
379
380 $items = $('[role=menu] li:not(.divider) a', $parent)
381
382 if (!$items.length) return
383
384 index = $items.index($items.filter(':focus'))
385
386 if (e.keyCode == 38 && index > 0) index-- // up
387 if (e.keyCode == 40 && index < $items.length - 1) index++ // down
388 if (!~index) index = 0
389
390 $items
391 .eq(index)
392 .focus()
393 }
394
395 }
396
397 function clearMenus() {
398 $(toggle).each(function () {
399 getParent($(this)).removeClass('open')
400 })
401 }
402
403 function getParent($this) {
404 var selector = $this.attr('data-target')
405 , $parent
406
407 if (!selector) {
408 selector = $this.attr('href')
409 selector = selector && /#/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
410 }
411
412 $parent = $(selector)
413 $parent.length || ($parent = $this.parent())
414
415 return $parent
416 }
417
418
419 /* DROPDOWN PLUGIN DEFINITION
420 * ========================== */
421
422 $.fn.dropdown = function (option) {
423 return this.each(function () {
424 var $this = $(this)
425 , data = $this.data('dropdown')
426 if (!data) $this.data('dropdown', (data = new Dropdown(this)))
427 if (typeof option == 'string') data[option].call($this)
428 })
429 }
430
431 $.fn.dropdown.Constructor = Dropdown
432
433
434 /* APPLY TO STANDARD DROPDOWN ELEMENTS
435 * =================================== */
436
437 $(document)
438 .on('click.dropdown.data-api touchstart.dropdown.data-api', clearMenus)
439 .on('click.dropdown touchstart.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
440 .on('click.dropdown.data-api touchstart.dropdown.data-api' , toggle, Dropdown.prototype.toggle)
441 .on('keydown.dropdown.data-api touchstart.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown)
442
443 }(window.jQuery);
444 /* =============================================================
445 * bootstrap-scrollspy.js v2.2.1
446 * http://twitter.github.com/bootstrap/javascript.html#scrollspy
447 * =============================================================
448 * Copyright 2012 Twitter, Inc.
449 *
450 * Licensed under the Apache License, Version 2.0 (the "License");
451 * you may not use this file except in compliance with the License.
452 * You may obtain a copy of the License at
453 *
454 * http://www.apache.org/licenses/LICENSE-2.0
455 *
456 * Unless required by applicable law or agreed to in writing, software
457 * distributed under the License is distributed on an "AS IS" BASIS,
458 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
459 * See the License for the specific language governing permissions and
460 * limitations under the License.
461 * ============================================================== */
462
463
464 !function ($) {
465
466 "use strict"; // jshint ;_;
467
468
469 /* SCROLLSPY CLASS DEFINITION
470 * ========================== */
471
472 function ScrollSpy(element, options) {
473 var process = $.proxy(this.process, this)
474 , $element = $(element).is('body') ? $(window) : $(element)
475 , href
476 this.options = $.extend({}, $.fn.scrollspy.defaults, options)
477 this.$scrollElement = $element.on('scroll.scroll-spy.data-api', process)
478 this.selector = (this.options.target
479 || ((href = $(element).attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
480 || '') + ' .nav li > a'
481 this.$body = $('body')
482 this.refresh()
483 this.process()
484 }
485
486 ScrollSpy.prototype = {
487
488 constructor: ScrollSpy
489
490 , refresh: function () {
491 var self = this
492 , $targets
493
494 this.offsets = $([])
495 this.targets = $([])
496
497 $targets = this.$body
498 .find(this.selector)
499 .map(function () {
500 var $el = $(this)
501 , href = $el.data('target') || $el.attr('href')
502 , $href = /^#\w/.test(href) && $(href)
503 return ( $href
504 && $href.length
505 && [[ $href.position().top, href ]] ) || null
506 })
507 .sort(function (a, b) { return a[0] - b[0] })
508 .each(function () {
509 self.offsets.push(this[0])
510 self.targets.push(this[1])
511 })
512 }
513
514 , process: function () {
515 var scrollTop = this.$scrollElement.scrollTop() + this.options.offset
516 , scrollHeight = this.$scrollElement[0].scrollHeight || this.$body[0].scrollHeight
517 , maxScroll = scrollHeight - this.$scrollElement.height()
518 , offsets = this.offsets
519 , targets = this.targets
520 , activeTarget = this.activeTarget
521 , i
522
523 if (scrollTop >= maxScroll) {
524 return activeTarget != (i = targets.last()[0])
525 && this.activate ( i )
526 }
527
528 for (i = offsets.length; i--;) {
529 activeTarget != targets[i]
530 && scrollTop >= offsets[i]
531 && (!offsets[i + 1] || scrollTop <= offsets[i + 1])
532 && this.activate( targets[i] )
533 }
534 }
535
536 , activate: function (target) {
537 var active
538 , selector
539
540 this.activeTarget = target
541
542 $(this.selector)
543 .parent('.active')
544 .removeClass('active')
545
546 selector = this.selector
547 + '[data-target="' + target + '"],'
548 + this.selector + '[href="' + target + '"]'
549
550 active = $(selector)
551 .parent('li')
552 .addClass('active')
553
554 if (active.parent('.dropdown-menu').length) {
555 active = active.closest('li.dropdown').addClass('active')
556 }
557
558 active.trigger('activate')
559 }
560
561 }
562
563
564 /* SCROLLSPY PLUGIN DEFINITION
565 * =========================== */
566
567 $.fn.scrollspy = function (option) {
568 return this.each(function () {
569 var $this = $(this)
570 , data = $this.data('scrollspy')
571 , options = typeof option == 'object' && option
572 if (!data) $this.data('scrollspy', (data = new ScrollSpy(this, options)))
573 if (typeof option == 'string') data[option]()
574 })
575 }
576
577 $.fn.scrollspy.Constructor = ScrollSpy
578
579 $.fn.scrollspy.defaults = {
580 offset: 10
581 }
582
583
584 /* SCROLLSPY DATA-API
585 * ================== */
586
587 $(window).on('load', function () {
588 $('[data-spy="scroll"]').each(function () {
589 var $spy = $(this)
590 $spy.scrollspy($spy.data())
591 })
592 })
593
594 }(window.jQuery);
595 /* ========================================================
596 * bootstrap-tab.js v2.2.1
597 * http://twitter.github.com/bootstrap/javascript.html#tabs
598 * ========================================================
599 * Copyright 2012 Twitter, Inc.
600 *
601 * Licensed under the Apache License, Version 2.0 (the "License");
602 * you may not use this file except in compliance with the License.
603 * You may obtain a copy of the License at
604 *
605 * http://www.apache.org/licenses/LICENSE-2.0
606 *
607 * Unless required by applicable law or agreed to in writing, software
608 * distributed under the License is distributed on an "AS IS" BASIS,
609 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
610 * See the License for the specific language governing permissions and
611 * limitations under the License.
612 * ======================================================== */
613
614
615 !function ($) {
616
617 "use strict"; // jshint ;_;
618
619
620 /* TAB CLASS DEFINITION
621 * ==================== */
622
623 var Tab = function (element) {
624 this.element = $(element)
625 }
626
627 Tab.prototype = {
628
629 constructor: Tab
630
631 , show: function () {
632 var $this = this.element
633 , $ul = $this.closest('ul:not(.dropdown-menu)')
634 , selector = $this.attr('data-target')
635 , previous
636 , $target
637 , e
638
639 if (!selector) {
640 selector = $this.attr('href')
641 selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
642 }
643
644 if ( $this.parent('li').hasClass('active') ) return
645
646 previous = $ul.find('.active:last a')[0]
647
648 e = $.Event('show', {
649 relatedTarget: previous
650 })
651
652 $this.trigger(e)
653
654 if (e.isDefaultPrevented()) return
655
656 $target = $(selector)
657
658 this.activate($this.parent('li'), $ul)
659 this.activate($target, $target.parent(), function () {
660 $this.trigger({
661 type: 'shown'
662 , relatedTarget: previous
663 })
664 })
665 }
666
667 , activate: function ( element, container, callback) {
668 var $active = container.find('> .active')
669 , transition = callback
670 && $.support.transition
671 && $active.hasClass('fade')
672
673 function next() {
674 $active
675 .removeClass('active')
676 .find('> .dropdown-menu > .active')
677 .removeClass('active')
678
679 element.addClass('active')
680
681 if (transition) {
682 element[0].offsetWidth // reflow for transition
683 element.addClass('in')
684 } else {
685 element.removeClass('fade')
686 }
687
688 if ( element.parent('.dropdown-menu') ) {
689 element.closest('li.dropdown').addClass('active')
690 }
691
692 callback && callback()
693 }
694
695 transition ?
696 $active.one($.support.transition.end, next) :
697 next()
698
699 $active.removeClass('in')
700 }
701 }
702
703
704 /* TAB PLUGIN DEFINITION
705 * ===================== */
706
707 $.fn.tab = function ( option ) {
708 return this.each(function () {
709 var $this = $(this)
710 , data = $this.data('tab')
711 if (!data) $this.data('tab', (data = new Tab(this)))
712 if (typeof option == 'string') data[option]()
713 })
714 }
715
716 $.fn.tab.Constructor = Tab
717
718
719 /* TAB DATA-API
720 * ============ */
721
722 $(document).on('click.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) {
723 e.preventDefault()
724 $(this).tab('show')
725 })
726
727 }(window.jQuery);
728 /* ===========================================================
729 * bootstrap-tooltip.js v2.2.1
730 * http://twitter.github.com/bootstrap/javascript.html#tooltips
731 * Inspired by the original jQuery.tipsy by Jason Frame
732 * ===========================================================
733 * Copyright 2012 Twitter, Inc.
734 *
735 * Licensed under the Apache License, Version 2.0 (the "License");
736 * you may not use this file except in compliance with the License.
737 * You may obtain a copy of the License at
738 *
739 * http://www.apache.org/licenses/LICENSE-2.0
740 *
741 * Unless required by applicable law or agreed to in writing, software
742 * distributed under the License is distributed on an "AS IS" BASIS,
743 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
744 * See the License for the specific language governing permissions and
745 * limitations under the License.
746 * ========================================================== */
747
748
749 !function ($) {
750
751 "use strict"; // jshint ;_;
752
753
754 /* TOOLTIP PUBLIC CLASS DEFINITION
755 * =============================== */
756
757 var Tooltip = function (element, options) {
758 this.init('tooltip', element, options)
759 }
760
761 Tooltip.prototype = {
762
763 constructor: Tooltip
764
765 , init: function (type, element, options) {
766 var eventIn
767 , eventOut
768
769 this.type = type
770 this.$element = $(element)
771 this.options = this.getOptions(options)
772 this.enabled = true
773
774 if (this.options.trigger == 'click') {
775 this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))
776 } else if (this.options.trigger != 'manual') {
777 eventIn = this.options.trigger == 'hover' ? 'mouseenter' : 'focus'
778 eventOut = this.options.trigger == 'hover' ? 'mouseleave' : 'blur'
779 this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this))
780 this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))
781 }
782
783 this.options.selector ?
784 (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) :
785 this.fixTitle()
786 }
787
788 , getOptions: function (options) {
789 options = $.extend({}, $.fn[this.type].defaults, options, this.$element.data())
790
791 if (options.delay && typeof options.delay == 'number') {
792 options.delay = {
793 show: options.delay
794 , hide: options.delay
795 }
796 }
797
798 return options
799 }
800
801 , enter: function (e) {
802 var self = $(e.currentTarget)[this.type](this._options).data(this.type)
803
804 if (!self.options.delay || !self.options.delay.show) return self.show()
805
806 clearTimeout(this.timeout)
807 self.hoverState = 'in'
808 this.timeout = setTimeout(function() {
809 if (self.hoverState == 'in') self.show()
810 }, self.options.delay.show)
811 }
812
813 , leave: function (e) {
814 var self = $(e.currentTarget)[this.type](this._options).data(this.type)
815
816 if (this.timeout) clearTimeout(this.timeout)
817 if (!self.options.delay || !self.options.delay.hide) return self.hide()
818
819 self.hoverState = 'out'
820 this.timeout = setTimeout(function() {
821 if (self.hoverState == 'out') self.hide()
822 }, self.options.delay.hide)
823 }
824
825 , show: function () {
826 var $tip
827 , inside
828 , pos
829 , actualWidth
830 , actualHeight
831 , placement
832 , tp
833
834 if (this.hasContent() && this.enabled) {
835 $tip = this.tip()
836 this.setContent()
837
838 if (this.options.animation) {
839 $tip.addClass('fade')
840 }
841
842 placement = typeof this.options.placement == 'function' ?
843 this.options.placement.call(this, $tip[0], this.$element[0]) :
844 this.options.placement
845
846 inside = /in/.test(placement)
847
848 $tip
849 .detach()
850 .css({ top: 0, left: 0, display: 'block' })
851 .insertAfter(this.$element)
852
853 pos = this.getPosition(inside)
854
855 actualWidth = $tip[0].offsetWidth
856 actualHeight = $tip[0].offsetHeight
857
858 switch (inside ? placement.split(' ')[1] : placement) {
859 case 'bottom':
860 tp = {top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2}
861 break
862 case 'top':
863 tp = {top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2}
864 break
865 case 'left':
866 tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth}
867 break
868 case 'right':
869 tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width}
870 break
871 }
872
873 $tip
874 .offset(tp)
875 .addClass(placement)
876 .addClass('in')
877 }
878 }
879
880 , setContent: function () {
881 var $tip = this.tip()
882 , title = this.getTitle()
883
884 $tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title)
885 $tip.removeClass('fade in top bottom left right')
886 }
887
888 , hide: function () {
889 var that = this
890 , $tip = this.tip()
891
892 $tip.removeClass('in')
893
894 function removeWithAnimation() {
895 var timeout = setTimeout(function () {
896 $tip.off($.support.transition.end).detach()
897 }, 500)
898
899 $tip.one($.support.transition.end, function () {
900 clearTimeout(timeout)
901 $tip.detach()
902 })
903 }
904
905 $.support.transition && this.$tip.hasClass('fade') ?
906 removeWithAnimation() :
907 $tip.detach()
908
909 return this
910 }
911
912 , fixTitle: function () {
913 var $e = this.$element
914 if ($e.attr('title') || typeof($e.attr('data-original-title')) != 'string') {
915 $e.attr('data-original-title', $e.attr('title') || '').removeAttr('title')
916 }
917 }
918
919 , hasContent: function () {
920 return this.getTitle()
921 }
922
923 , getPosition: function (inside) {
924 return $.extend({}, (inside ? {top: 0, left: 0} : this.$element.offset()), {
925 width: this.$element[0].offsetWidth
926 , height: this.$element[0].offsetHeight
927 })
928 }
929
930 , getTitle: function () {
931 var title
932 , $e = this.$element
933 , o = this.options
934
935 title = $e.attr('data-original-title')
936 || (typeof o.title == 'function' ? o.title.call($e[0]) : o.title)
937
938 return title
939 }
940
941 , tip: function () {
942 return this.$tip = this.$tip || $(this.options.template)
943 }
944
945 , validate: function () {
946 if (!this.$element[0].parentNode) {
947 this.hide()
948 this.$element = null
949 this.options = null
950 }
951 }
952
953 , enable: function () {
954 this.enabled = true
955 }
956
957 , disable: function () {
958 this.enabled = false
959 }
960
961 , toggleEnabled: function () {
962 this.enabled = !this.enabled
963 }
964
965 , toggle: function (e) {
966 var self = $(e.currentTarget)[this.type](this._options).data(this.type)
967 self[self.tip().hasClass('in') ? 'hide' : 'show']()
968 }
969
970 , destroy: function () {
971 this.hide().$element.off('.' + this.type).removeData(this.type)
972 }
973
974 }
975
976
977 /* TOOLTIP PLUGIN DEFINITION
978 * ========================= */
979
980 $.fn.tooltip = function ( option ) {
981 return this.each(function () {
982 var $this = $(this)
983 , data = $this.data('tooltip')
984 , options = typeof option == 'object' && option
985 if (!data) $this.data('tooltip', (data = new Tooltip(this, options)))
986 if (typeof option == 'string') data[option]()
987 })
988 }
989
990 $.fn.tooltip.Constructor = Tooltip
991
992 $.fn.tooltip.defaults = {
993 animation: true
994 , placement: 'top'
995 , selector: false
996 , template: '<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>'
997 , trigger: 'hover'
998 , title: ''
999 , delay: 0
1000 , html: false
1001 }
1002
1003 }(window.jQuery);
1004 /* ===========================================================
1005 * bootstrap-popover.js v2.2.1
1006 * http://twitter.github.com/bootstrap/javascript.html#popovers
1007 * ===========================================================
1008 * Copyright 2012 Twitter, Inc.
1009 *
1010 * Licensed under the Apache License, Version 2.0 (the "License");
1011 * you may not use this file except in compliance with the License.
1012 * You may obtain a copy of the License at
1013 *
1014 * http://www.apache.org/licenses/LICENSE-2.0
1015 *
1016 * Unless required by applicable law or agreed to in writing, software
1017 * distributed under the License is distributed on an "AS IS" BASIS,
1018 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1019 * See the License for the specific language governing permissions and
1020 * limitations under the License.
1021 * =========================================================== */
1022
1023
1024 !function ($) {
1025
1026 "use strict"; // jshint ;_;
1027
1028
1029 /* POPOVER PUBLIC CLASS DEFINITION
1030 * =============================== */
1031
1032 var Popover = function (element, options) {
1033 this.init('popover', element, options)
1034 }
1035
1036
1037 /* NOTE: POPOVER EXTENDS BOOTSTRAP-TOOLTIP.js
1038 ========================================== */
1039
1040 Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype, {
1041
1042 constructor: Popover
1043
1044 , setContent: function () {
1045 var $tip = this.tip()
1046 , title = this.getTitle()
1047 , content = this.getContent()
1048
1049 $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)
1050 $tip.find('.popover-content > *')[this.options.html ? 'html' : 'text'](content)
1051
1052 $tip.removeClass('fade top bottom left right in')
1053 }
1054
1055 , hasContent: function () {
1056 return this.getTitle() || this.getContent()
1057 }
1058
1059 , getContent: function () {
1060 var content
1061 , $e = this.$element
1062 , o = this.options
1063
1064 content = $e.attr('data-content')
1065 || (typeof o.content == 'function' ? o.content.call($e[0]) : o.content)
1066
1067 return content
1068 }
1069
1070 , tip: function () {
1071 if (!this.$tip) {
1072 this.$tip = $(this.options.template)
1073 }
1074 return this.$tip
1075 }
1076
1077 , destroy: function () {
1078 this.hide().$element.off('.' + this.type).removeData(this.type)
1079 }
1080
1081 })
1082
1083
1084 /* POPOVER PLUGIN DEFINITION
1085 * ======================= */
1086
1087 $.fn.popover = function (option) {
1088 return this.each(function () {
1089 var $this = $(this)
1090 , data = $this.data('popover')
1091 , options = typeof option == 'object' && option
1092 if (!data) $this.data('popover', (data = new Popover(this, options)))
1093 if (typeof option == 'string') data[option]()
1094 })
1095 }
1096
1097 $.fn.popover.Constructor = Popover
1098
1099 $.fn.popover.defaults = $.extend({} , $.fn.tooltip.defaults, {
1100 placement: 'right'
1101 , trigger: 'click'
1102 , content: ''
1103 , template: '<div class="popover"><div class="arrow"></div><div class="popover-inner"><h3 class="popover-title"></h3><div class="popover-content"><p></p></div></div></div>'
1104 })
1105
1106 }(window.jQuery);
1107 /* ==========================================================
1108 * bootstrap-affix.js v2.2.1
1109 * http://twitter.github.com/bootstrap/javascript.html#affix
1110 * ==========================================================
1111 * Copyright 2012 Twitter, Inc.
1112 *
1113 * Licensed under the Apache License, Version 2.0 (the "License");
1114 * you may not use this file except in compliance with the License.
1115 * You may obtain a copy of the License at
1116 *
1117 * http://www.apache.org/licenses/LICENSE-2.0
1118 *
1119 * Unless required by applicable law or agreed to in writing, software
1120 * distributed under the License is distributed on an "AS IS" BASIS,
1121 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1122 * See the License for the specific language governing permissions and
1123 * limitations under the License.
1124 * ========================================================== */
1125
1126
1127 !function ($) {
1128
1129 "use strict"; // jshint ;_;
1130
1131
1132 /* AFFIX CLASS DEFINITION
1133 * ====================== */
1134
1135 var Affix = function (element, options) {
1136 this.options = $.extend({}, $.fn.affix.defaults, options)
1137 this.$window = $(window)
1138 .on('scroll.affix.data-api', $.proxy(this.checkPosition, this))
1139 .on('click.affix.data-api', $.proxy(function () { setTimeout($.proxy(this.checkPosition, this), 1) }, this))
1140 this.$element = $(element)
1141 this.checkPosition()
1142 }
1143
1144 Affix.prototype.checkPosition = function () {
1145 if (!this.$element.is(':visible')) return
1146
1147 var scrollHeight = $(document).height()
1148 , scrollTop = this.$window.scrollTop()
1149 , position = this.$element.offset()
1150 , offset = this.options.offset
1151 , offsetBottom = offset.bottom
1152 , offsetTop = offset.top
1153 , reset = 'affix affix-top affix-bottom'
1154 , affix
1155
1156 if (typeof offset != 'object') offsetBottom = offsetTop = offset
1157 if (typeof offsetTop == 'function') offsetTop = offset.top()
1158 if (typeof offsetBottom == 'function') offsetBottom = offset.bottom()
1159
1160 affix = this.unpin != null && (scrollTop + this.unpin <= position.top) ?
1161 false : offsetBottom != null && (position.top + this.$element.height() >= scrollHeight - offsetBottom) ?
1162 'bottom' : offsetTop != null && scrollTop <= offsetTop ?
1163 'top' : false
1164
1165 if (this.affixed === affix) return
1166
1167 this.affixed = affix
1168 this.unpin = affix == 'bottom' ? position.top - scrollTop : null
1169
1170 this.$element.removeClass(reset).addClass('affix' + (affix ? '-' + affix : ''))
1171 }
1172
1173
1174 /* AFFIX PLUGIN DEFINITION
1175 * ======================= */
1176
1177 $.fn.affix = function (option) {
1178 return this.each(function () {
1179 var $this = $(this)
1180 , data = $this.data('affix')
1181 , options = typeof option == 'object' && option
1182 if (!data) $this.data('affix', (data = new Affix(this, options)))
1183 if (typeof option == 'string') data[option]()
1184 })
1185 }
1186
1187 $.fn.affix.Constructor = Affix
1188
1189 $.fn.affix.defaults = {
1190 offset: 0
1191 }
1192
1193
1194 /* AFFIX DATA-API
1195 * ============== */
1196
1197 $(window).on('load', function () {
1198 $('[data-spy="affix"]').each(function () {
1199 var $spy = $(this)
1200 , data = $spy.data()
1201
1202 data.offset = data.offset || {}
1203
1204 data.offsetBottom && (data.offset.bottom = data.offsetBottom)
1205 data.offsetTop && (data.offset.top = data.offsetTop)
1206
1207 $spy.affix(data)
1208 })
1209 })
1210
1211
1212 }(window.jQuery);
1213 /* ==========================================================
1214 * bootstrap-alert.js v2.2.1
1215 * http://twitter.github.com/bootstrap/javascript.html#alerts
1216 * ==========================================================
1217 * Copyright 2012 Twitter, Inc.
1218 *
1219 * Licensed under the Apache License, Version 2.0 (the "License");
1220 * you may not use this file except in compliance with the License.
1221 * You may obtain a copy of the License at
1222 *
1223 * http://www.apache.org/licenses/LICENSE-2.0
1224 *
1225 * Unless required by applicable law or agreed to in writing, software
1226 * distributed under the License is distributed on an "AS IS" BASIS,
1227 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1228 * See the License for the specific language governing permissions and
1229 * limitations under the License.
1230 * ========================================================== */
1231
1232
1233 !function ($) {
1234
1235 "use strict"; // jshint ;_;
1236
1237
1238 /* ALERT CLASS DEFINITION
1239 * ====================== */
1240
1241 var dismiss = '[data-dismiss="alert"]'
1242 , Alert = function (el) {
1243 $(el).on('click', dismiss, this.close)
1244 }
1245
1246 Alert.prototype.close = function (e) {
1247 var $this = $(this)
1248 , selector = $this.attr('data-target')
1249 , $parent
1250
1251 if (!selector) {
1252 selector = $this.attr('href')
1253 selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
1254 }
1255
1256 $parent = $(selector)
1257
1258 e && e.preventDefault()
1259
1260 $parent.length || ($parent = $this.hasClass('alert') ? $this : $this.parent())
1261
1262 $parent.trigger(e = $.Event('close'))
1263
1264 if (e.isDefaultPrevented()) return
1265
1266 $parent.removeClass('in')
1267
1268 function removeElement() {
1269 $parent
1270 .trigger('closed')
1271 .remove()
1272 }
1273
1274 $.support.transition && $parent.hasClass('fade') ?
1275 $parent.on($.support.transition.end, removeElement) :
1276 removeElement()
1277 }
1278
1279
1280 /* ALERT PLUGIN DEFINITION
1281 * ======================= */
1282
1283 $.fn.alert = function (option) {
1284 return this.each(function () {
1285 var $this = $(this)
1286 , data = $this.data('alert')
1287 if (!data) $this.data('alert', (data = new Alert(this)))
1288 if (typeof option == 'string') data[option].call($this)
1289 })
1290 }
1291
1292 $.fn.alert.Constructor = Alert
1293
1294
1295 /* ALERT DATA-API
1296 * ============== */
1297
1298 $(document).on('click.alert.data-api', dismiss, Alert.prototype.close)
1299
1300 }(window.jQuery);
1301 /* ============================================================
1302 * bootstrap-button.js v2.2.1
1303 * http://twitter.github.com/bootstrap/javascript.html#buttons
1304 * ============================================================
1305 * Copyright 2012 Twitter, Inc.
1306 *
1307 * Licensed under the Apache License, Version 2.0 (the "License");
1308 * you may not use this file except in compliance with the License.
1309 * You may obtain a copy of the License at
1310 *
1311 * http://www.apache.org/licenses/LICENSE-2.0
1312 *
1313 * Unless required by applicable law or agreed to in writing, software
1314 * distributed under the License is distributed on an "AS IS" BASIS,
1315 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1316 * See the License for the specific language governing permissions and
1317 * limitations under the License.
1318 * ============================================================ */
1319
1320
1321 !function ($) {
1322
1323 "use strict"; // jshint ;_;
1324
1325
1326 /* BUTTON PUBLIC CLASS DEFINITION
1327 * ============================== */
1328
1329 var Button = function (element, options) {
1330 this.$element = $(element)
1331 this.options = $.extend({}, $.fn.button.defaults, options)
1332 }
1333
1334 Button.prototype.setState = function (state) {
1335 var d = 'disabled'
1336 , $el = this.$element
1337 , data = $el.data()
1338 , val = $el.is('input') ? 'val' : 'html'
1339
1340 state = state + 'Text'
1341 data.resetText || $el.data('resetText', $el[val]())
1342
1343 $el[val](data[state] || this.options[state])
1344
1345 // push to event loop to allow forms to submit
1346 setTimeout(function () {
1347 state == 'loadingText' ?
1348 $el.addClass(d).attr(d, d) :
1349 $el.removeClass(d).removeAttr(d)
1350 }, 0)
1351 }
1352
1353 Button.prototype.toggle = function () {
1354 var $parent = this.$element.closest('[data-toggle="buttons-radio"]')
1355
1356 $parent && $parent
1357 .find('.active')
1358 .removeClass('active')
1359
1360 this.$element.toggleClass('active')
1361 }
1362
1363
1364 /* BUTTON PLUGIN DEFINITION
1365 * ======================== */
1366
1367 $.fn.button = function (option) {
1368 return this.each(function () {
1369 var $this = $(this)
1370 , data = $this.data('button')
1371 , options = typeof option == 'object' && option
1372 if (!data) $this.data('button', (data = new Button(this, options)))
1373 if (option == 'toggle') data.toggle()
1374 else if (option) data.setState(option)
1375 })
1376 }
1377
1378 $.fn.button.defaults = {
1379 loadingText: 'loading...'
1380 }
1381
1382 $.fn.button.Constructor = Button
1383
1384
1385 /* BUTTON DATA-API
1386 * =============== */
1387
1388 $(document).on('click.button.data-api', '[data-toggle^=button]', function (e) {
1389 var $btn = $(e.target)
1390 if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
1391 $btn.button('toggle')
1392 })
1393
1394 }(window.jQuery);
1395 /* =============================================================
1396 * bootstrap-collapse.js v2.2.1
1397 * http://twitter.github.com/bootstrap/javascript.html#collapse
1398 * =============================================================
1399 * Copyright 2012 Twitter, Inc.
1400 *
1401 * Licensed under the Apache License, Version 2.0 (the "License");
1402 * you may not use this file except in compliance with the License.
1403 * You may obtain a copy of the License at
1404 *
1405 * http://www.apache.org/licenses/LICENSE-2.0
1406 *
1407 * Unless required by applicable law or agreed to in writing, software
1408 * distributed under the License is distributed on an "AS IS" BASIS,
1409 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1410 * See the License for the specific language governing permissions and
1411 * limitations under the License.
1412 * ============================================================ */
1413
1414
1415 !function ($) {
1416
1417 "use strict"; // jshint ;_;
1418
1419
1420 /* COLLAPSE PUBLIC CLASS DEFINITION
1421 * ================================ */
1422
1423 var Collapse = function (element, options) {
1424 this.$element = $(element)
1425 this.options = $.extend({}, $.fn.collapse.defaults, options)
1426
1427 if (this.options.parent) {
1428 this.$parent = $(this.options.parent)
1429 }
1430
1431 this.options.toggle && this.toggle()
1432 }
1433
1434 Collapse.prototype = {
1435
1436 constructor: Collapse
1437
1438 , dimension: function () {
1439 var hasWidth = this.$element.hasClass('width')
1440 return hasWidth ? 'width' : 'height'
1441 }
1442
1443 , show: function () {
1444 var dimension
1445 , scroll
1446 , actives
1447 , hasData
1448
1449 if (this.transitioning) return
1450
1451 dimension = this.dimension()
1452 scroll = $.camelCase(['scroll', dimension].join('-'))
1453 actives = this.$parent && this.$parent.find('> .accordion-group > .in')
1454
1455 if (actives && actives.length) {
1456 hasData = actives.data('collapse')
1457 if (hasData && hasData.transitioning) return
1458 actives.collapse('hide')
1459 hasData || actives.data('collapse', null)
1460 }
1461
1462 this.$element[dimension](0)
1463 this.transition('addClass', $.Event('show'), 'shown')
1464 $.support.transition && this.$element[dimension](this.$element[0][scroll])
1465 }
1466
1467 , hide: function () {
1468 var dimension
1469 if (this.transitioning) return
1470 dimension = this.dimension()
1471 this.reset(this.$element[dimension]())
1472 this.transition('removeClass', $.Event('hide'), 'hidden')
1473 this.$element[dimension](0)
1474 }
1475
1476 , reset: function (size) {
1477 var dimension = this.dimension()
1478
1479 this.$element
1480 .removeClass('collapse')
1481 [dimension](size || 'auto')
1482 [0].offsetWidth
1483
1484 this.$element[size !== null ? 'addClass' : 'removeClass']('collapse')
1485
1486 return this
1487 }
1488
1489 , transition: function (method, startEvent, completeEvent) {
1490 var that = this
1491 , complete = function () {
1492 if (startEvent.type == 'show') that.reset()
1493 that.transitioning = 0
1494 that.$element.trigger(completeEvent)
1495 }
1496
1497 this.$element.trigger(startEvent)
1498
1499 if (startEvent.isDefaultPrevented()) return
1500
1501 this.transitioning = 1
1502
1503 this.$element[method]('in')
1504
1505 $.support.transition && this.$element.hasClass('collapse') ?
1506 this.$element.one($.support.transition.end, complete) :
1507 complete()
1508 }
1509
1510 , toggle: function () {
1511 this[this.$element.hasClass('in') ? 'hide' : 'show']()
1512 }
1513
1514 }
1515
1516
1517 /* COLLAPSIBLE PLUGIN DEFINITION
1518 * ============================== */
1519
1520 $.fn.collapse = function (option) {
1521 return this.each(function () {
1522 var $this = $(this)
1523 , data = $this.data('collapse')
1524 , options = typeof option == 'object' && option
1525 if (!data) $this.data('collapse', (data = new Collapse(this, options)))
1526 if (typeof option == 'string') data[option]()
1527 })
1528 }
1529
1530 $.fn.collapse.defaults = {
1531 toggle: true
1532 }
1533
1534 $.fn.collapse.Constructor = Collapse
1535
1536
1537 /* COLLAPSIBLE DATA-API
1538 * ==================== */
1539
1540 $(document).on('click.collapse.data-api', '[data-toggle=collapse]', function (e) {
1541 var $this = $(this), href
1542 , target = $this.attr('data-target')
1543 || e.preventDefault()
1544 || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7
1545 , option = $(target).data('collapse') ? 'toggle' : $this.data()
1546 $this[$(target).hasClass('in') ? 'addClass' : 'removeClass']('collapsed')
1547 $(target).collapse(option)
1548 })
1549
1550 }(window.jQuery);
1551 /* ==========================================================
1552 * bootstrap-carousel.js v2.2.1
1553 * http://twitter.github.com/bootstrap/javascript.html#carousel
1554 * ==========================================================
1555 * Copyright 2012 Twitter, Inc.
1556 *
1557 * Licensed under the Apache License, Version 2.0 (the "License");
1558 * you may not use this file except in compliance with the License.
1559 * You may obtain a copy of the License at
1560 *
1561 * http://www.apache.org/licenses/LICENSE-2.0
1562 *
1563 * Unless required by applicable law or agreed to in writing, software
1564 * distributed under the License is distributed on an "AS IS" BASIS,
1565 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1566 * See the License for the specific language governing permissions and
1567 * limitations under the License.
1568 * ========================================================== */
1569
1570
1571 !function ($) {
1572
1573 "use strict"; // jshint ;_;
1574
1575
1576 /* CAROUSEL CLASS DEFINITION
1577 * ========================= */
1578
1579 var Carousel = function (element, options) {
1580 this.$element = $(element)
1581 this.options = options
1582 this.options.slide && this.slide(this.options.slide)
1583 this.options.pause == 'hover' && this.$element
1584 .on('mouseenter', $.proxy(this.pause, this))
1585 .on('mouseleave', $.proxy(this.cycle, this))
1586 }
1587
1588 Carousel.prototype = {
1589
1590 cycle: function (e) {
1591 if (!e) this.paused = false
1592 this.options.interval
1593 && !this.paused
1594 && (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
1595 return this
1596 }
1597
1598 , to: function (pos) {
1599 var $active = this.$element.find('.item.active')
1600 , children = $active.parent().children()
1601 , activePos = children.index($active)
1602 , that = this
1603
1604 if (pos > (children.length - 1) || pos < 0) return
1605
1606 if (this.sliding) {
1607 return this.$element.one('slid', function () {
1608 that.to(pos)
1609 })
1610 }
1611
1612 if (activePos == pos) {
1613 return this.pause().cycle()
1614 }
1615
1616 return this.slide(pos > activePos ? 'next' : 'prev', $(children[pos]))
1617 }
1618
1619 , pause: function (e) {
1620 if (!e) this.paused = true
1621 if (this.$element.find('.next, .prev').length && $.support.transition.end) {
1622 this.$element.trigger($.support.transition.end)
1623 this.cycle()
1624 }
1625 clearInterval(this.interval)
1626 this.interval = null
1627 return this
1628 }
1629
1630 , next: function () {
1631 if (this.sliding) return
1632 return this.slide('next')
1633 }
1634
1635 , prev: function () {
1636 if (this.sliding) return
1637 return this.slide('prev')
1638 }
1639
1640 , slide: function (type, next) {
1641 var $active = this.$element.find('.item.active')
1642 , $next = next || $active[type]()
1643 , isCycling = this.interval
1644 , direction = type == 'next' ? 'left' : 'right'
1645 , fallback = type == 'next' ? 'first' : 'last'
1646 , that = this
1647 , e
1648
1649 this.sliding = true
1650
1651 isCycling && this.pause()
1652
1653 $next = $next.length ? $next : this.$element.find('.item')[fallback]()
1654
1655 e = $.Event('slide', {
1656 relatedTarget: $next[0]
1657 })
1658
1659 if ($next.hasClass('active')) return
1660
1661 if ($.support.transition && this.$element.hasClass('slide')) {
1662 this.$element.trigger(e)
1663 if (e.isDefaultPrevented()) return
1664 $next.addClass(type)
1665 $next[0].offsetWidth // force reflow
1666 $active.addClass(direction)
1667 $next.addClass(direction)
1668 this.$element.one($.support.transition.end, function () {
1669 $next.removeClass([type, direction].join(' ')).addClass('active')
1670 $active.removeClass(['active', direction].join(' '))
1671 that.sliding = false
1672 setTimeout(function () { that.$element.trigger('slid') }, 0)
1673 })
1674 } else {
1675 this.$element.trigger(e)
1676 if (e.isDefaultPrevented()) return
1677 $active.removeClass('active')
1678 $next.addClass('active')
1679 this.sliding = false
1680 this.$element.trigger('slid')
1681 }
1682
1683 isCycling && this.cycle()
1684
1685 return this
1686 }
1687
1688 }
1689
1690
1691 /* CAROUSEL PLUGIN DEFINITION
1692 * ========================== */
1693
1694 $.fn.carousel = function (option) {
1695 return this.each(function () {
1696 var $this = $(this)
1697 , data = $this.data('carousel')
1698 , options = $.extend({}, $.fn.carousel.defaults, typeof option == 'object' && option)
1699 , action = typeof option == 'string' ? option : options.slide
1700 if (!data) $this.data('carousel', (data = new Carousel(this, options)))
1701 if (typeof option == 'number') data.to(option)
1702 else if (action) data[action]()
1703 else if (options.interval) data.cycle()
1704 })
1705 }
1706
1707 $.fn.carousel.defaults = {
1708 interval: 5000
1709 , pause: 'hover'
1710 }
1711
1712 $.fn.carousel.Constructor = Carousel
1713
1714
1715 /* CAROUSEL DATA-API
1716 * ================= */
1717
1718 $(document).on('click.carousel.data-api', '[data-slide]', function (e) {
1719 var $this = $(this), href
1720 , $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
1721 , options = $.extend({}, $target.data(), $this.data())
1722 $target.carousel(options)
1723 e.preventDefault()
1724 })
1725
1726 }(window.jQuery);
1727 /* =============================================================
1728 * bootstrap-typeahead.js v2.2.1
1729 * http://twitter.github.com/bootstrap/javascript.html#typeahead
1730 * =============================================================
1731 * Copyright 2012 Twitter, Inc.
1732 *
1733 * Licensed under the Apache License, Version 2.0 (the "License");
1734 * you may not use this file except in compliance with the License.
1735 * You may obtain a copy of the License at
1736 *
1737 * http://www.apache.org/licenses/LICENSE-2.0
1738 *
1739 * Unless required by applicable law or agreed to in writing, software
1740 * distributed under the License is distributed on an "AS IS" BASIS,
1741 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1742 * See the License for the specific language governing permissions and
1743 * limitations under the License.
1744 * ============================================================ */
1745
1746
1747 !function($){
1748
1749 "use strict"; // jshint ;_;
1750
1751
1752 /* TYPEAHEAD PUBLIC CLASS DEFINITION
1753 * ================================= */
1754
1755 var Typeahead = function (element, options) {
1756 this.$element = $(element)
1757 this.options = $.extend({}, $.fn.typeahead.defaults, options)
1758 this.matcher = this.options.matcher || this.matcher
1759 this.sorter = this.options.sorter || this.sorter
1760 this.highlighter = this.options.highlighter || this.highlighter
1761 this.updater = this.options.updater || this.updater
1762 this.$menu = $(this.options.menu).appendTo('body')
1763 this.source = this.options.source
1764 this.shown = false
1765 this.listen()
1766 }
1767
1768 Typeahead.prototype = {
1769
1770 constructor: Typeahead
1771
1772 , select: function () {
1773 var val = this.$menu.find('.active').attr('data-value')
1774 this.$element
1775 .val(this.updater(val))
1776 .change()
1777 return this.hide()
1778 }
1779
1780 , updater: function (item) {
1781 return item
1782 }
1783
1784 , show: function () {
1785 var pos = $.extend({}, this.$element.offset(), {
1786 height: this.$element[0].offsetHeight
1787 })
1788
1789 this.$menu.css({
1790 top: pos.top + pos.height
1791 , left: pos.left
1792 })
1793
1794 this.$menu.show()
1795 this.shown = true
1796 return this
1797 }
1798
1799 , hide: function () {
1800 this.$menu.hide()
1801 this.shown = false
1802 return this
1803 }
1804
1805 , lookup: function (event) {
1806 var items
1807
1808 this.query = this.$element.val()
1809
1810 if (!this.query || this.query.length < this.options.minLength) {
1811 return this.shown ? this.hide() : this
1812 }
1813
1814 items = $.isFunction(this.source) ? this.source(this.query, $.proxy(this.process, this)) : this.source
1815
1816 return items ? this.process(items) : this
1817 }
1818
1819 , process: function (items) {
1820 var that = this
1821
1822 items = $.grep(items, function (item) {
1823 return that.matcher(item)
1824 })
1825
1826 items = this.sorter(items)
1827
1828 if (!items.length) {
1829 return this.shown ? this.hide() : this
1830 }
1831
1832 return this.render(items.slice(0, this.options.items)).show()
1833 }
1834
1835 , matcher: function (item) {
1836 return ~item.toLowerCase().indexOf(this.query.toLowerCase())
1837 }
1838
1839 , sorter: function (items) {
1840 var beginswith = []
1841 , caseSensitive = []
1842 , caseInsensitive = []
1843 , item
1844
1845 while (item = items.shift()) {
1846 if (!item.toLowerCase().indexOf(this.query.toLowerCase())) beginswith.push(item)
1847 else if (~item.indexOf(this.query)) caseSensitive.push(item)
1848 else caseInsensitive.push(item)
1849 }
1850
1851 return beginswith.concat(caseSensitive, caseInsensitive)
1852 }
1853
1854 , highlighter: function (item) {
1855 var query = this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, '\\$&')
1856 return item.replace(new RegExp('(' + query + ')', 'ig'), function ($1, match) {
1857 return '<strong>' + match + '</strong>'
1858 })
1859 }
1860
1861 , render: function (items) {
1862 var that = this
1863
1864 items = $(items).map(function (i, item) {
1865 i = $(that.options.item).attr('data-value', item)
1866 i.find('a').html(that.highlighter(item))
1867 return i[0]
1868 })
1869
1870 items.first().addClass('active')
1871 this.$menu.html(items)
1872 return this
1873 }
1874
1875 , next: function (event) {
1876 var active = this.$menu.find('.active').removeClass('active')
1877 , next = active.next()
1878
1879 if (!next.length) {
1880 next = $(this.$menu.find('li')[0])
1881 }
1882
1883 next.addClass('active')
1884 }
1885
1886 , prev: function (event) {
1887 var active = this.$menu.find('.active').removeClass('active')
1888 , prev = active.prev()
1889
1890 if (!prev.length) {
1891 prev = this.$menu.find('li').last()
1892 }
1893
1894 prev.addClass('active')
1895 }
1896
1897 , listen: function () {
1898 this.$element
1899 .on('blur', $.proxy(this.blur, this))
1900 .on('keypress', $.proxy(this.keypress, this))
1901 .on('keyup', $.proxy(this.keyup, this))
1902
1903 if (this.eventSupported('keydown')) {
1904 this.$element.on('keydown', $.proxy(this.keydown, this))
1905 }
1906
1907 this.$menu
1908 .on('click', $.proxy(this.click, this))
1909 .on('mouseenter', 'li', $.proxy(this.mouseenter, this))
1910 }
1911
1912 , eventSupported: function(eventName) {
1913 var isSupported = eventName in this.$element
1914 if (!isSupported) {
1915 this.$element.setAttribute(eventName, 'return;')
1916 isSupported = typeof this.$element[eventName] === 'function'
1917 }
1918 return isSupported
1919 }
1920
1921 , move: function (e) {
1922 if (!this.shown) return
1923
1924 switch(e.keyCode) {
1925 case 9: // tab
1926 case 13: // enter
1927 case 27: // escape
1928 e.preventDefault()
1929 break
1930
1931 case 38: // up arrow
1932 e.preventDefault()
1933 this.prev()
1934 break
1935
1936 case 40: // down arrow
1937 e.preventDefault()
1938 this.next()
1939 break
1940 }
1941
1942 e.stopPropagation()
1943 }
1944
1945 , keydown: function (e) {
1946 this.suppressKeyPressRepeat = !~$.inArray(e.keyCode, [40,38,9,13,27])
1947 this.move(e)
1948 }
1949
1950 , keypress: function (e) {
1951 if (this.suppressKeyPressRepeat) return
1952 this.move(e)
1953 }
1954
1955 , keyup: function (e) {
1956 switch(e.keyCode) {
1957 case 40: // down arrow
1958 case 38: // up arrow
1959 case 16: // shift
1960 case 17: // ctrl
1961 case 18: // alt
1962 break
1963
1964 case 9: // tab
1965 case 13: // enter
1966 if (!this.shown) return
1967 this.select()
1968 break
1969
1970 case 27: // escape
1971 if (!this.shown) return
1972 this.hide()
1973 break
1974
1975 default:
1976 this.lookup()
1977 }
1978
1979 e.stopPropagation()
1980 e.preventDefault()
1981 }
1982
1983 , blur: function (e) {
1984 var that = this
1985 setTimeout(function () { that.hide() }, 150)
1986 }
1987
1988 , click: function (e) {
1989 e.stopPropagation()
1990 e.preventDefault()
1991 this.select()
1992 }
1993
1994 , mouseenter: function (e) {
1995 this.$menu.find('.active').removeClass('active')
1996 $(e.currentTarget).addClass('active')
1997 }
1998
1999 }
2000
2001
2002 /* TYPEAHEAD PLUGIN DEFINITION
2003 * =========================== */
2004
2005 $.fn.typeahead = function (option) {
2006 return this.each(function () {
2007 var $this = $(this)
2008 , data = $this.data('typeahead')
2009 , options = typeof option == 'object' && option
2010 if (!data) $this.data('typeahead', (data = new Typeahead(this, options)))
2011 if (typeof option == 'string') data[option]()
2012 })
2013 }
2014
2015 $.fn.typeahead.defaults = {
2016 source: []
2017 , items: 8
2018 , menu: '<ul class="typeahead dropdown-menu"></ul>'
2019 , item: '<li><a href="#"></a></li>'
2020 , minLength: 1
2021 }
2022
2023 $.fn.typeahead.Constructor = Typeahead
2024
2025
2026 /* TYPEAHEAD DATA-API
2027 * ================== */
2028
2029 $(document).on('focus.typeahead.data-api', '[data-provide="typeahead"]', function (e) {
2030 var $this = $(this)
2031 if ($this.data('typeahead')) return
2032 e.preventDefault()
2033 $this.typeahead($this.data())
2034 })
2035
2036 }(window.jQuery);
2037
forum/static/js/base/bootstrap.min.js
File was created 1 /**
2 * Bootstrap.js by @fat & @mdo
3 * plugins: bootstrap-transition.js, bootstrap-modal.js, bootstrap-dropdown.js, bootstrap-scrollspy.js, bootstrap-tab.js, bootstrap-tooltip.js, bootstrap-popover.js, bootstrap-affix.js, bootstrap-alert.js, bootstrap-button.js, bootstrap-collapse.js, bootstrap-carousel.js, bootstrap-typeahead.js
4 * Copyright 2012 Twitter, Inc.
5 * http://www.apache.org/licenses/LICENSE-2.0.txt
6 */
7 !function(a){a(function(){a.support.transition=function(){var a=function(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},c;for(c in b)if(a.style[c]!==undefined)return b[c]}();return a&&{end:a}}()})}(window.jQuery),!function(a){var b=function(b,c){this.options=c,this.$element=a(b).delegate('[data-dismiss="modal"]',"click.dismiss.modal",a.proxy(this.hide,this)),this.options.remote&&this.$element.find(".modal-body").load(this.options.remote)};b.prototype={constructor:b,toggle:function(){return this[this.isShown?"hide":"show"]()},show:function(){var b=this,c=a.Event("show");this.$element.trigger(c);if(this.isShown||c.isDefaultPrevented())return;this.isShown=!0,this.escape(),this.backdrop(function(){var c=a.support.transition&&b.$element.hasClass("fade");b.$element.parent().length||b.$element.appendTo(document.body),b.$element.show(),c&&b.$element[0].offsetWidth,b.$element.addClass("in").attr("aria-hidden",!1),b.enforceFocus(),c?b.$element.one(a.support.transition.end,function(){b.$element.focus().trigger("shown")}):b.$element.focus().trigger("shown")})},hide:function(b){b&&b.preventDefault();var c=this;b=a.Event("hide"),this.$element.trigger(b);if(!this.isShown||b.isDefaultPrevented())return;this.isShown=!1,this.escape(),a(document).off("focusin.modal"),this.$element.removeClass("in").attr("aria-hidden",!0),a.support.transition&&this.$element.hasClass("fade")?this.hideWithTransition():this.hideModal()},enforceFocus:function(){var b=this;a(document).on("focusin.modal",function(a){b.$element[0]!==a.target&&!b.$element.has(a.target).length&&b.$element.focus()})},escape:function(){var a=this;this.isShown&&this.options.keyboard?this.$element.on("keyup.dismiss.modal",function(b){b.which==27&&a.hide()}):this.isShown||this.$element.off("keyup.dismiss.modal")},hideWithTransition:function(){var b=this,c=setTimeout(function(){b.$element.off(a.support.transition.end),b.hideModal()},500);this.$element.one(a.support.transition.end,function(){clearTimeout(c),b.hideModal()})},hideModal:function(a){this.$element.hide().trigger("hidden"),this.backdrop()},removeBackdrop:function(){this.$backdrop.remove(),this.$backdrop=null},backdrop:function(b){var c=this,d=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var e=a.support.transition&&d;this.$backdrop=a('<div class="modal-backdrop '+d+'" />').appendTo(document.body),this.$backdrop.click(this.options.backdrop=="static"?a.proxy(this.$element[0].focus,this.$element[0]):a.proxy(this.hide,this)),e&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),e?this.$backdrop.one(a.support.transition.end,b):b()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(a.support.transition.end,a.proxy(this.removeBackdrop,this)):this.removeBackdrop()):b&&b()}},a.fn.modal=function(c){return this.each(function(){var d=a(this),e=d.data("modal"),f=a.extend({},a.fn.modal.defaults,d.data(),typeof c=="object"&&c);e||d.data("modal",e=new b(this,f)),typeof c=="string"?e[c]():f.show&&e.show()})},a.fn.modal.defaults={backdrop:!0,keyboard:!0,show:!0},a.fn.modal.Constructor=b,a(document).on("click.modal.data-api",'[data-toggle="modal"]',function(b){var c=a(this),d=c.attr("href"),e=a(c.attr("data-target")||d&&d.replace(/.*(?=#[^\s]+$)/,"")),f=e.data("modal")?"toggle":a.extend({remote:!/#/.test(d)&&d},e.data(),c.data());b.preventDefault(),e.modal(f).one("hide",function(){c.focus()})})}(window.jQuery),!function(a){function d(){a(b).each(function(){e(a(this)).removeClass("open")})}function e(b){var c=b.attr("data-target"),d;return c||(c=b.attr("href"),c=c&&/#/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,"")),d=a(c),d.length||(d=b.parent()),d}var b="[data-toggle=dropdown]",c=function(b){var c=a(b).on("click.dropdown.data-api",this.toggle);a("html").on("click.dropdown.data-api",function(){c.parent().removeClass("open")})};c.prototype={constructor:c,toggle:function(b){var c=a(this),f,g;if(c.is(".disabled, :disabled"))return;return f=e(c),g=f.hasClass("open"),d(),g||(f.toggleClass("open"),c.focus()),!1},keydown:function(b){var c,d,f,g,h,i;if(!/(38|40|27)/.test(b.keyCode))return;c=a(this),b.preventDefault(),b.stopPropagation();if(c.is(".disabled, :disabled"))return;g=e(c),h=g.hasClass("open");if(!h||h&&b.keyCode==27)return c.click();d=a("[role=menu] li:not(.divider) a",g);if(!d.length)return;i=d.index(d.filter(":focus")),b.keyCode==38&&i>0&&i--,b.keyCode==40&&i<d.length-1&&i++,~i||(i=0),d.eq(i).focus()}},a.fn.dropdown=function(b){return this.each(function(){var d=a(this),e=d.data("dropdown");e||d.data("dropdown",e=new c(this)),typeof b=="string"&&e[b].call(d)})},a.fn.dropdown.Constructor=c,a(document).on("click.dropdown.data-api touchstart.dropdown.data-api",d).on("click.dropdown touchstart.dropdown.data-api",".dropdown form",function(a){a.stopPropagation()}).on("click.dropdown.data-api touchstart.dropdown.data-api",b,c.prototype.toggle).on("keydown.dropdown.data-api touchstart.dropdown.data-api",b+", [role=menu]",c.prototype.keydown)}(window.jQuery),!function(a){function b(b,c){var d=a.proxy(this.process,this),e=a(b).is("body")?a(window):a(b),f;this.options=a.extend({},a.fn.scrollspy.defaults,c),this.$scrollElement=e.on("scroll.scroll-spy.data-api",d),this.selector=(this.options.target||(f=a(b).attr("href"))&&f.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.$body=a("body"),this.refresh(),this.process()}b.prototype={constructor:b,refresh:function(){var b=this,c;this.offsets=a([]),this.targets=a([]),c=this.$body.find(this.selector).map(function(){var b=a(this),c=b.data("target")||b.attr("href"),d=/^#\w/.test(c)&&a(c);return d&&d.length&&[[d.position().top,c]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){b.offsets.push(this[0]),b.targets.push(this[1])})},process:function(){var a=this.$scrollElement.scrollTop()+this.options.offset,b=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,c=b-this.$scrollElement.height(),d=this.offsets,e=this.targets,f=this.activeTarget,g;if(a>=c)return f!=(g=e.last()[0])&&this.activate(g);for(g=d.length;g--;)f!=e[g]&&a>=d[g]&&(!d[g+1]||a<=d[g+1])&&this.activate(e[g])},activate:function(b){var c,d;this.activeTarget=b,a(this.selector).parent(".active").removeClass("active"),d=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',c=a(d).parent("li").addClass("active"),c.parent(".dropdown-menu").length&&(c=c.closest("li.dropdown").addClass("active")),c.trigger("activate")}},a.fn.scrollspy=function(c){return this.each(function(){var d=a(this),e=d.data("scrollspy"),f=typeof c=="object"&&c;e||d.data("scrollspy",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.scrollspy.Constructor=b,a.fn.scrollspy.defaults={offset:10},a(window).on("load",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);b.scrollspy(b.data())})})}(window.jQuery),!function(a){var b=function(b){this.element=a(b)};b.prototype={constructor:b,show:function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.attr("data-target"),e,f,g;d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,""));if(b.parent("li").hasClass("active"))return;e=c.find(".active:last a")[0],g=a.Event("show",{relatedTarget:e}),b.trigger(g);if(g.isDefaultPrevented())return;f=a(d),this.activate(b.parent("li"),c),this.activate(f,f.parent(),function(){b.trigger({type:"shown",relatedTarget:e})})},activate:function(b,c,d){function g(){e.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),b.addClass("active"),f?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active"),d&&d()}var e=c.find("> .active"),f=d&&a.support.transition&&e.hasClass("fade");f?e.one(a.support.transition.end,g):g(),e.removeClass("in")}},a.fn.tab=function(c){return this.each(function(){var d=a(this),e=d.data("tab");e||d.data("tab",e=new b(this)),typeof c=="string"&&e[c]()})},a.fn.tab.Constructor=b,a(document).on("click.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(b){b.preventDefault(),a(this).tab("show")})}(window.jQuery),!function(a){var b=function(a,b){this.init("tooltip",a,b)};b.prototype={constructor:b,init:function(b,c,d){var e,f;this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.enabled=!0,this.options.trigger=="click"?this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this)):this.options.trigger!="manual"&&(e=this.options.trigger=="hover"?"mouseenter":"focus",f=this.options.trigger=="hover"?"mouseleave":"blur",this.$element.on(e+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(f+"."+this.type,this.options.selector,a.proxy(this.leave,this))),this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},getOptions:function(b){return b=a.extend({},a.fn[this.type].defaults,b,this.$element.data()),b.delay&&typeof b.delay=="number"&&(b.delay={show:b.delay,hide:b.delay}),b},enter:function(b){var c=a(b.currentTarget)[this.type](this._options).data(this.type);if(!c.options.delay||!c.options.delay.show)return c.show();clearTimeout(this.timeout),c.hoverState="in",this.timeout=setTimeout(function(){c.hoverState=="in"&&c.show()},c.options.delay.show)},leave:function(b){var c=a(b.currentTarget)[this.type](this._options).data(this.type);this.timeout&&clearTimeout(this.timeout);if(!c.options.delay||!c.options.delay.hide)return c.hide();c.hoverState="out",this.timeout=setTimeout(function(){c.hoverState=="out"&&c.hide()},c.options.delay.hide)},show:function(){var a,b,c,d,e,f,g;if(this.hasContent()&&this.enabled){a=this.tip(),this.setContent(),this.options.animation&&a.addClass("fade"),f=typeof this.options.placement=="function"?this.options.placement.call(this,a[0],this.$element[0]):this.options.placement,b=/in/.test(f),a.detach().css({top:0,left:0,display:"block"}).insertAfter(this.$element),c=this.getPosition(b),d=a[0].offsetWidth,e=a[0].offsetHeight;switch(b?f.split(" ")[1]:f){case"bottom":g={top:c.top+c.height,left:c.left+c.width/2-d/2};break;case"top":g={top:c.top-e,left:c.left+c.width/2-d/2};break;case"left":g={top:c.top+c.height/2-e/2,left:c.left-d};break;case"right":g={top:c.top+c.height/2-e/2,left:c.left+c.width}}a.offset(g).addClass(f).addClass("in")}},setContent:function(){var a=this.tip(),b=this.getTitle();a.find(".tooltip-inner")[this.options.html?"html":"text"](b),a.removeClass("fade in top bottom left right")},hide:function(){function d(){var b=setTimeout(function(){c.off(a.support.transition.end).detach()},500);c.one(a.support.transition.end,function(){clearTimeout(b),c.detach()})}var b=this,c=this.tip();return c.removeClass("in"),a.support.transition&&this.$tip.hasClass("fade")?d():c.detach(),this},fixTitle:function(){var a=this.$element;(a.attr("title")||typeof a.attr("data-original-title")!="string")&&a.attr("data-original-title",a.attr("title")||"").removeAttr("title")},hasContent:function(){return this.getTitle()},getPosition:function(b){return a.extend({},b?{top:0,left:0}:this.$element.offset(),{width:this.$element[0].offsetWidth,height:this.$element[0].offsetHeight})},getTitle:function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||(typeof c.title=="function"?c.title.call(b[0]):c.title),a},tip:function(){return this.$tip=this.$tip||a(this.options.template)},validate:function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},toggleEnabled:function(){this.enabled=!this.enabled},toggle:function(b){var c=a(b.currentTarget)[this.type](this._options).data(this.type);c[c.tip().hasClass("in")?"hide":"show"]()},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}},a.fn.tooltip=function(c){return this.each(function(){var d=a(this),e=d.data("tooltip"),f=typeof c=="object"&&c;e||d.data("tooltip",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.tooltip.Constructor=b,a.fn.tooltip.defaults={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover",title:"",delay:0,html:!1}}(window.jQuery),!function(a){var b=function(a,b){this.init("popover",a,b)};b.prototype=a.extend({},a.fn.tooltip.Constructor.prototype,{constructor:b,setContent:function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content > *")[this.options.html?"html":"text"](c),a.removeClass("fade top bottom left right in")},hasContent:function(){return this.getTitle()||this.getContent()},getContent:function(){var a,b=this.$element,c=this.options;return a=b.attr("data-content")||(typeof c.content=="function"?c.content.call(b[0]):c.content),a},tip:function(){return this.$tip||(this.$tip=a(this.options.template)),this.$tip},destroy:function(){this.hide().$element.off("."+this.type).removeData(this.type)}}),a.fn.popover=function(c){return this.each(function(){var d=a(this),e=d.data("popover"),f=typeof c=="object"&&c;e||d.data("popover",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.popover.Constructor=b,a.fn.popover.defaults=a.extend({},a.fn.tooltip.defaults,{placement:"right",trigger:"click",content:"",template:'<div class="popover"><div class="arrow"></div><div class="popover-inner"><h3 class="popover-title"></h3><div class="popover-content"><p></p></div></div></div>'})}(window.jQuery),!function(a){var b=function(b,c){this.options=a.extend({},a.fn.affix.defaults,c),this.$window=a(window).on("scroll.affix.data-api",a.proxy(this.checkPosition,this)).on("click.affix.data-api",a.proxy(function(){setTimeout(a.proxy(this.checkPosition,this),1)},this)),this.$element=a(b),this.checkPosition()};b.prototype.checkPosition=function(){if(!this.$element.is(":visible"))return;var b=a(document).height(),c=this.$window.scrollTop(),d=this.$element.offset(),e=this.options.offset,f=e.bottom,g=e.top,h="affix affix-top affix-bottom",i;typeof e!="object"&&(f=g=e),typeof g=="function"&&(g=e.top()),typeof f=="function"&&(f=e.bottom()),i=this.unpin!=null&&c+this.unpin<=d.top?!1:f!=null&&d.top+this.$element.height()>=b-f?"bottom":g!=null&&c<=g?"top":!1;if(this.affixed===i)return;this.affixed=i,this.unpin=i=="bottom"?d.top-c:null,this.$element.removeClass(h).addClass("affix"+(i?"-"+i:""))},a.fn.affix=function(c){return this.each(function(){var d=a(this),e=d.data("affix"),f=typeof c=="object"&&c;e||d.data("affix",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.affix.Constructor=b,a.fn.affix.defaults={offset:0},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var b=a(this),c=b.data();c.offset=c.offset||{},c.offsetBottom&&(c.offset.bottom=c.offsetBottom),c.offsetTop&&(c.offset.top=c.offsetTop),b.affix(c)})})}(window.jQuery),!function(a){var b='[data-dismiss="alert"]',c=function(c){a(c).on("click",b,this.close)};c.prototype.close=function(b){function f(){e.trigger("closed").remove()}var c=a(this),d=c.attr("data-target"),e;d||(d=c.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),e=a(d),b&&b.preventDefault(),e.length||(e=c.hasClass("alert")?c:c.parent()),e.trigger(b=a.Event("close"));if(b.isDefaultPrevented())return;e.removeClass("in"),a.support.transition&&e.hasClass("fade")?e.on(a.support.transition.end,f):f()},a.fn.alert=function(b){return this.each(function(){var d=a(this),e=d.data("alert");e||d.data("alert",e=new c(this)),typeof b=="string"&&e[b].call(d)})},a.fn.alert.Constructor=c,a(document).on("click.alert.data-api",b,c.prototype.close)}(window.jQuery),!function(a){var b=function(b,c){this.$element=a(b),this.options=a.extend({},a.fn.button.defaults,c)};b.prototype.setState=function(a){var b="disabled",c=this.$element,d=c.data(),e=c.is("input")?"val":"html";a+="Text",d.resetText||c.data("resetText",c[e]()),c[e](d[a]||this.options[a]),setTimeout(function(){a=="loadingText"?c.addClass(b).attr(b,b):c.removeClass(b).removeAttr(b)},0)},b.prototype.toggle=function(){var a=this.$element.closest('[data-toggle="buttons-radio"]');a&&a.find(".active").removeClass("active"),this.$element.toggleClass("active")},a.fn.button=function(c){return this.each(function(){var d=a(this),e=d.data("button"),f=typeof c=="object"&&c;e||d.data("button",e=new b(this,f)),c=="toggle"?e.toggle():c&&e.setState(c)})},a.fn.button.defaults={loadingText:"loading..."},a.fn.button.Constructor=b,a(document).on("click.button.data-api","[data-toggle^=button]",function(b){var c=a(b.target);c.hasClass("btn")||(c=c.closest(".btn")),c.button("toggle")})}(window.jQuery),!function(a){var b=function(b,c){this.$element=a(b),this.options=a.extend({},a.fn.collapse.defaults,c),this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};b.prototype={constructor:b,dimension:function(){var a=this.$element.hasClass("width");return a?"width":"height"},show:function(){var b,c,d,e;if(this.transitioning)return;b=this.dimension(),c=a.camelCase(["scroll",b].join("-")),d=this.$parent&&this.$parent.find("> .accordion-group > .in");if(d&&d.length){e=d.data("collapse");if(e&&e.transitioning)return;d.collapse("hide"),e||d.data("collapse",null)}this.$element[b](0),this.transition("addClass",a.Event("show"),"shown"),a.support.transition&&this.$element[b](this.$element[0][c])},hide:function(){var b;if(this.transitioning)return;b=this.dimension(),this.reset(this.$element[b]()),this.transition("removeClass",a.Event("hide"),"hidden"),this.$element[b](0)},reset:function(a){var b=this.dimension();return this.$element.removeClass("collapse")[b](a||"auto")[0].offsetWidth,this.$element[a!==null?"addClass":"removeClass"]("collapse"),this},transition:function(b,c,d){var e=this,f=function(){c.type=="show"&&e.reset(),e.transitioning=0,e.$element.trigger(d)};this.$element.trigger(c);if(c.isDefaultPrevented())return;this.transitioning=1,this.$element[b]("in"),a.support.transition&&this.$element.hasClass("collapse")?this.$element.one(a.support.transition.end,f):f()},toggle:function(){this[this.$element.hasClass("in")?"hide":"show"]()}},a.fn.collapse=function(c){return this.each(function(){var d=a(this),e=d.data("collapse"),f=typeof c=="object"&&c;e||d.data("collapse",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.collapse.defaults={toggle:!0},a.fn.collapse.Constructor=b,a(document).on("click.collapse.data-api","[data-toggle=collapse]",function(b){var c=a(this),d,e=c.attr("data-target")||b.preventDefault()||(d=c.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""),f=a(e).data("collapse")?"toggle":c.data();c[a(e).hasClass("in")?"addClass":"removeClass"]("collapsed"),a(e).collapse(f)})}(window.jQuery),!function(a){var b=function(b,c){this.$element=a(b),this.options=c,this.options.slide&&this.slide(this.options.slide),this.options.pause=="hover"&&this.$element.on("mouseenter",a.proxy(this.pause,this)).on("mouseleave",a.proxy(this.cycle,this))};b.prototype={cycle:function(b){return b||(this.paused=!1),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},to:function(b){var c=this.$element.find(".item.active"),d=c.parent().children(),e=d.index(c),f=this;if(b>d.length-1||b<0)return;return this.sliding?this.$element.one("slid",function(){f.to(b)}):e==b?this.pause().cycle():this.slide(b>e?"next":"prev",a(d[b]))},pause:function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition.end&&(this.$element.trigger(a.support.transition.end),this.cycle()),clearInterval(this.interval),this.interval=null,this},next:function(){if(this.sliding)return;return this.slide("next")},prev:function(){if(this.sliding)return;return this.slide("prev")},slide:function(b,c){var d=this.$element.find(".item.active"),e=c||d[b](),f=this.interval,g=b=="next"?"left":"right",h=b=="next"?"first":"last",i=this,j;this.sliding=!0,f&&this.pause(),e=e.length?e:this.$element.find(".item")[h](),j=a.Event("slide",{relatedTarget:e[0]});if(e.hasClass("active"))return;if(a.support.transition&&this.$element.hasClass("slide")){this.$element.trigger(j);if(j.isDefaultPrevented())return;e.addClass(b),e[0].offsetWidth,d.addClass(g),e.addClass(g),this.$element.one(a.support.transition.end,function(){e.removeClass([b,g].join(" ")).addClass("active"),d.removeClass(["active",g].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger("slid")},0)})}else{this.$element.trigger(j);if(j.isDefaultPrevented())return;d.removeClass("active"),e.addClass("active"),this.sliding=!1,this.$element.trigger("slid")}return f&&this.cycle(),this}},a.fn.carousel=function(c){return this.each(function(){var d=a(this),e=d.data("carousel"),f=a.extend({},a.fn.carousel.defaults,typeof c=="object"&&c),g=typeof c=="string"?c:f.slide;e||d.data("carousel",e=new b(this,f)),typeof c=="number"?e.to(c):g?e[g]():f.interval&&e.cycle()})},a.fn.carousel.defaults={interval:5e3,pause:"hover"},a.fn.carousel.Constructor=b,a(document).on("click.carousel.data-api","[data-slide]",function(b){var c=a(this),d,e=a(c.attr("data-target")||(d=c.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,"")),f=a.extend({},e.data(),c.data());e.carousel(f),b.preventDefault()})}(window.jQuery),!function(a){var b=function(b,c){this.$element=a(b),this.options=a.extend({},a.fn.typeahead.defaults,c),this.matcher=this.options.matcher||this.matcher,this.sorter=this.options.sorter||this.sorter,this.highlighter=this.options.highlighter||this.highlighter,this.updater=this.options.updater||this.updater,this.$menu=a(this.options.menu).appendTo("body"),this.source=this.options.source,this.shown=!1,this.listen()};b.prototype={constructor:b,select:function(){var a=this.$menu.find(".active").attr("data-value");return this.$element.val(this.updater(a)).change(),this.hide()},updater:function(a){return a},show:function(){var b=a.extend({},this.$element.offset(),{height:this.$element[0].offsetHeight});return this.$menu.css({top:b.top+b.height,left:b.left}),this.$menu.show(),this.shown=!0,this},hide:function(){return this.$menu.hide(),this.shown=!1,this},lookup:function(b){var c;return this.query=this.$element.val(),!this.query||this.query.length<this.options.minLength?this.shown?this.hide():this:(c=a.isFunction(this.source)?this.source(this.query,a.proxy(this.process,this)):this.source,c?this.process(c):this)},process:function(b){var c=this;return b=a.grep(b,function(a){return c.matcher(a)}),b=this.sorter(b),b.length?this.render(b.slice(0,this.options.items)).show():this.shown?this.hide():this},matcher:function(a){return~a.toLowerCase().indexOf(this.query.toLowerCase())},sorter:function(a){var b=[],c=[],d=[],e;while(e=a.shift())e.toLowerCase().indexOf(this.query.toLowerCase())?~e.indexOf(this.query)?c.push(e):d.push(e):b.push(e);return b.concat(c,d)},highlighter:function(a){var b=this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&");return a.replace(new RegExp("("+b+")","ig"),function(a,b){return"<strong>"+b+"</strong>"})},render:function(b){var c=this;return b=a(b).map(function(b,d){return b=a(c.options.item).attr("data-value",d),b.find("a").html(c.highlighter(d)),b[0]}),b.first().addClass("active"),this.$menu.html(b),this},next:function(b){var c=this.$menu.find(".active").removeClass("active"),d=c.next();d.length||(d=a(this.$menu.find("li")[0])),d.addClass("active")},prev:function(a){var b=this.$menu.find(".active").removeClass("active"),c=b.prev();c.length||(c=this.$menu.find("li").last()),c.addClass("active")},listen:function(){this.$element.on("blur",a.proxy(this.blur,this)).on("keypress",a.proxy(this.keypress,this)).on("keyup",a.proxy(this.keyup,this)),this.eventSupported("keydown")&&this.$element.on("keydown",a.proxy(this.keydown,this)),this.$menu.on("click",a.proxy(this.click,this)).on("mouseenter","li",a.proxy(this.mouseenter,this))},eventSupported:function(a){var b=a in this.$element;return b||(this.$element.setAttribute(a,"return;"),b=typeof this.$element[a]=="function"),b},move:function(a){if(!this.shown)return;switch(a.keyCode){case 9:case 13:case 27:a.preventDefault();break;case 38:a.preventDefault(),this.prev();break;case 40:a.preventDefault(),this.next()}a.stopPropagation()},keydown:function(b){this.suppressKeyPressRepeat=!~a.inArray(b.keyCode,[40,38,9,13,27]),this.move(b)},keypress:function(a){if(this.suppressKeyPressRepeat)return;this.move(a)},keyup:function(a){switch(a.keyCode){case 40:case 38:case 16:case 17:case 18:break;case 9:case 13:if(!this.shown)return;this.select();break;case 27:if(!this.shown)return;this.hide();break;default:this.lookup()}a.stopPropagation(),a.preventDefault()},blur:function(a){var b=this;setTimeout(function(){b.hide()},150)},click:function(a){a.stopPropagation(),a.preventDefault(),this.select()},mouseenter:function(b){this.$menu.find(".active").removeClass("active"),a(b.currentTarget).addClass("active")}},a.fn.typeahead=function(c){return this.each(function(){var d=a(this),e=d.data("typeahead"),f=typeof c=="object"&&c;e||d.data("typeahead",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.typeahead.defaults={source:[],items:8,menu:'<ul class="typeahead dropdown-menu"></ul>',item:'<li><a href="#"></a></li>',minLength:1},a.fn.typeahead.Constructor=b,a(document).on("focus.typeahead.data-api",'[data-provide="typeahead"]',function(b){var c=a(this);if(c.data("typeahead"))return;b.preventDefault(),c.typeahead(c.data())})}(window.jQuery)
forum/static/js/base/in-min.js
File was created 1 ~function(){var __head=document.head||document.getElementsByTagName("head")[0];var __waterfall={};var __loaded={};var __loading={};var __globals=[];var __configure={autoload:false,core:"",serial:false};var __in;var __load=function(url,type,charset,callback){if(__loading[url]){if(callback){setTimeout(function(){__load(url,type,charset,callback);},1);return;}return;}if(__loaded[url]){if(callback){callback();return;}return;}__loading[url]=true;var pureurl=url.split("?")[0];var n,t=type||pureurl.toLowerCase().substring(pureurl.lastIndexOf(".")+1);if(t==="js"){n=document.createElement("script");n.type="text/javascript";n.src=url;n.async="true";if(charset){n.charset=charset;}}else{if(t==="css"){n=document.createElement("link");n.type="text/css";n.rel="stylesheet";n.href=url;__loaded[url]=true;__loading[url]=false;__head.appendChild(n);if(callback){callback();}return;}}n.onload=n.onreadystatechange=function(){if(!this.readyState||this.readyState==="loaded"||this.readyState==="complete"){__loading[url]=false;__loaded[url]=true;if(callback){callback();}n.onload=n.onreadystatechange=null;}};n.onerror=function(){__loading[url]=false;if(callback){callback();}n.onerror=null;};__head.appendChild(n);};var __analyze=function(array){var riverflow=[];for(var i=array.length-1;i>=0;i--){var current=array[i];if(typeof(current)==="string"){if(!__waterfall[current]){console&&console.warn&&console.warn("In Error :: Module not found: "+current);continue;}riverflow.push(current);var relylist=__waterfall[current].rely;if(relylist){riverflow=riverflow.concat(__analyze(relylist));}}else{if(typeof(current)==="function"){riverflow.push(current);}}}return riverflow;};var __stackline=function(blahlist){var o=this;this.stackline=blahlist;this.current=this.stackline[0];this.bag={returns:[],complete:false};this.start=function(){if(typeof(o.current)!="function"&&__waterfall[o.current]){__load(__waterfall[o.current].path,__waterfall[o.current].type,__waterfall[o.current].charset,o.next);}else{o.bag.returns.push(o.current());o.next();}};this.next=function(){if(o.stackline.length==1||o.stackline.length<1){o.bag.complete=true;if(o.bag.oncomplete){o.bag.oncomplete(o.bag.returns);}return;}o.stackline.shift();o.current=o.stackline[0];o.start();};};var __parallel=function(blahlist,callback){var length=blahlist.length;var hook=function(){if(!--length&&callback){callback();}};if(length==0){callback&&callback();return;}for(var i=0;i<blahlist.length;i++){var current=__waterfall[blahlist[i]];if(typeof(blahlist[i])=="function"){blahlist[i]();hook();continue;}if(typeof(current)==="undefined"){console&&console.warn&&console.warn("In Error :: Module not found: "+blahlist[i]);hook();continue;}if(current.rely&&current.rely.length!=0){__parallel(current.rely,(function(current){return function(){__load(current.path,current.type,current.charset,hook);};})(current));}else{__load(current.path,current.type,current.charset,hook);}}};var __add=function(name,config){if(!name||!config||!config.path){return;}__waterfall[name]=config;};var __adds=function(config){if(!config.modules){return;}for(var module in config.modules){if(config.modules.hasOwnProperty(module)){var module_config=config.modules[module];if(!config.modules.hasOwnProperty(module)){continue;}if(config.type&&!module_config.type){module_config.type=config.type;}if(config.charset&&!module_config.charset){module_config.charset=config.charset;}__add.call(this,module,module_config);}}};var __config=function(name,conf){__configure[name]=conf;};var __css=function(csstext){var css=document.getElementById("in-inline-css");if(!css){css=document.createElement("style");css.type="text/css";css.id="in-inline-css";__head.appendChild(css);}if(css.styleSheet){css.styleSheet.cssText=css.styleSheet.cssText+csstext;}else{css.appendChild(document.createTextNode(csstext));}};var __later=function(){var args=[].slice.call(arguments);var timeout=args.shift();window.setTimeout(function(){__in.apply(this,args);},timeout);};var __ready=function(){var args=arguments;__contentLoaded(window,function(){__in.apply(this,args);});};var __global=function(){var args=arguments[0].constructor===Array?arguments[0]:[].slice.call(arguments);__globals=__globals.concat(args);};var __in=function(){var args=[].slice.call(arguments);if(__globals.length){args=__globals.concat(args);}if(__configure.serial){if(__configure.core&&!__loaded[__configure.core]){args=["__core"].concat(args);}var blahlist=__analyze(args).reverse();var stack=new __stackline(blahlist);stack.start();return stack.bag;}if(typeof(args[args.length-1])==="function"){var callback=args.pop();}if(__configure.core&&!__loaded[__configure.core]){__parallel(["__core"],function(){__parallel(args,callback);});}else{__parallel(args,callback);}};var __contentLoaded=function(win,fn){var done=false,top=true,doc=win.document,root=doc.documentElement,add=doc.addEventListener?"addEventListener":"attachEvent",rem=doc.addEventListener?"removeEventListener":"detachEvent",pre=doc.addEventListener?"":"on",init=function(e){if(e.type=="readystatechange"&&doc.readyState!="complete"){return;}(e.type=="load"?win:doc)[rem](pre+e.type,init,false);if(!done&&(done=true)){fn.call(win,e.type||e);}},poll=function(){try{root.doScroll("left");}catch(e){setTimeout(poll,50);return;}init("poll");};if(doc.readyState=="complete"){fn.call(win,"lazy");}else{if(doc.createEventObject&&root.doScroll){try{top=!win.frameElement;}catch(e){}if(top){poll();}}doc[add](pre+"DOMContentLoaded",init,false);doc[add](pre+"readystatechange",init,false);win[add](pre+"load",init,false);}};void function(){var myself=(function(){var scripts=document.getElementsByTagName("script");return scripts[scripts.length-1];})();var autoload=myself.getAttribute("autoload");var core=myself.getAttribute("core");if(core){__configure.autoload=eval(autoload);__configure.core=core;__add("__core",{path:__configure.core});}if(__configure.autoload&&__configure.core){__in();}}();__in.add=__add;__in.adds=__adds;__in.config=__config;__in.css=__css;__in.later=__later;__in.load=__load;__in.ready=__ready;__in.global=__global;__in.use=__in;this.In=__in;}();
forum/static/js/base/in.js
File was created 1 /*
2 ********** In **********
3 Project Home: http://injs.org
4
5 Author: Guokai
6 Gtalk: badkaikai@gmail.com
7 Blog: http://benben.cc
8 Licence: MIT License
9 Version: 0.2.0-stable
10
11 Philosophy: Just in time.
12 Build: 110428120728
13 */
14
15 ~function() {
16 var __head = document.head || document.getElementsByTagName('head')[0];
17 var __waterfall = {};
18 var __loaded = {};
19 var __loading = {};
20 var __globals = [];
21 var __configure = {autoload: false, core: '', serial: false};
22 var __in;
23
24 // mapping for `In.load`
25 // This method used for loading javascript or
26 // style files asynchronous and non-blocking.
27
28 var __load = function(url, type, charset, callback) {
29 if(__loading[url]) {
30 if(callback) {
31 setTimeout(function() {
32 __load(url, type, charset, callback);
33 }, 1);
34 return;
35 }
36 return;
37 }
38
39 if(__loaded[url]) {
40 if(callback) {
41 callback();
42 return;
43 }
44 return;
45 }
46
47 __loading[url] = true;
48
49 var pureurl = url.split('?')[0];
50 var n, t = type || pureurl.toLowerCase().substring(pureurl.lastIndexOf('.') + 1);
51
52 if(t === 'js') {
53 n = document.createElement('script');
54 n.type = 'text/javascript';
55 n.src = url;
56 n.async = 'true';
57 if(charset) {
58 n.charset = charset;
59 }
60 } else if(t === 'css') {
61 n = document.createElement('link');
62 n.type = 'text/css';
63 n.rel = 'stylesheet';
64 n.href = url;
65 __loaded[url] = true;
66 __loading[url] = false;
67 __head.appendChild(n);
68 if(callback) callback();
69 return;
70 }
71
72 n.onload = n.onreadystatechange = function() {
73 if (!this.readyState || this.readyState === 'loaded' || this.readyState === 'complete') {
74 __loading[url] = false;
75 __loaded[url] = true;
76
77 if(callback) {
78 callback();
79 }
80
81 n.onload = n.onreadystatechange = null;
82 }
83 };
84
85 n.onerror = function() {
86 __loading[url] = false;
87
88 if(callback) {
89 callback();
90 }
91
92 n.onerror = null;
93 }
94
95 __head.appendChild(n);
96 };
97
98 // private method, analyze the dependency.
99 // This is the core function for dependency management.
100
101 var __analyze = function(array) {
102 var riverflow = [];
103
104 for(var i = array.length-1; i >= 0; i--) {
105 var current = array[i];
106
107 if(typeof(current) === 'string') {
108 if(!__waterfall[current]) {
109 console && console.warn && console.warn('In Error :: Module not found: ' + current);
110 continue;
111 }
112
113 riverflow.push(current);
114 var relylist = __waterfall[current].rely;
115
116 if(relylist) {
117 riverflow = riverflow.concat(__analyze(relylist));
118 }
119 } else if(typeof(current) === 'function') {
120 riverflow.push(current);
121 }
122 }
123
124 return riverflow;
125 };
126
127 // private method, serial process.
128 // This method used for loading modules in serial.
129
130 var __stackline = function(blahlist) {
131 var o = this;
132
133 this.stackline = blahlist;
134 this.current = this.stackline[0];
135 this.bag = {returns: [], complete: false};
136
137 this.start = function() {
138 if(typeof(o.current) != 'function' && __waterfall[o.current]) {
139 __load(__waterfall[o.current].path, __waterfall[o.current].type, __waterfall[o.current].charset, o.next);
140 } else {
141 o.bag.returns.push(o.current());
142 o.next();
143 }
144 };
145
146 this.next = function() {
147 if(o.stackline.length == 1 || o.stackline.length < 1) {
148 o.bag.complete = true;
149 if(o.bag.oncomplete) {
150 o.bag.oncomplete(o.bag.returns);
151 }
152 return;
153 }
154
155 o.stackline.shift();
156 o.current = o.stackline[0];
157 o.start();
158 };
159 };
160
161 // private method, parallel process.
162 // This method used for loading modules in parallel.
163
164 var __parallel = function(blahlist, callback) {
165 var length = blahlist.length;
166 var hook = function() {
167 if(!--length && callback) callback();
168 };
169
170 if(length == 0) {
171 callback && callback();
172 return;
173 };
174
175 for(var i = 0; i < blahlist.length; i++) {
176 var current = __waterfall[blahlist[i]];
177
178 if(typeof(blahlist[i]) == 'function') {
179 blahlist[i]();
180 hook();
181 continue;
182 }
183
184 if(typeof(current) === 'undefined') {
185 console && console.warn && console.warn('In Error :: Module not found: ' + blahlist[i]);
186 hook();
187 continue;
188 }
189
190 if(current.rely && current.rely.length != 0) {
191 __parallel(current.rely, (function(current) {
192 return function() {
193 __load(current.path, current.type, current.charset, hook);
194 };
195 })(current));
196 } else {
197 __load(current.path, current.type, current.charset, hook);
198 }
199 }
200 };
201
202 // mapping for `In.add`
203 // This method used for adding module.
204
205 var __add = function(name, config) {
206 if(!name || !config || !config.path) return;
207 __waterfall[name] = config;
208 };
209
210 // mapping for `In.adds`
211 // This method used for adding modules.
212
213 var __adds = function(config) {
214 if(!config.modules) return;
215
216 for(var module in config.modules) {
217 if(config.modules.hasOwnProperty(module)) {
218 var module_config = config.modules[module];
219
220 if(!config.modules.hasOwnProperty(module)) continue;
221 if(config.type && !module_config.type) module_config.type = config.type;
222 if(config.charset && !module_config.charset) module_config.charset = config.charset;
223 __add.call(this, module, module_config);
224 }
225 }
226 };
227
228 // mapping for `In.config`
229 // This method used for change the default config.
230
231 var __config = function(name, conf) {
232 __configure[name] = conf;
233 };
234
235 // mapping for `In.css`
236 // This method used for insert inline css to your page dynamically.
237
238 var __css = function(csstext) {
239 var css = document.getElementById('in-inline-css');
240
241 if(!css) {
242 css = document.createElement('style');
243 css.type = 'text/css';
244 css.id = 'in-inline-css';
245 __head.appendChild(css);
246 }
247
248 if(css.styleSheet) {
249 css.styleSheet.cssText = css.styleSheet.cssText + csstext;
250 } else {
251 css.appendChild(document.createTextNode(csstext));
252 }
253 };
254
255 // mapping for `In.later`
256 // This method used for loading modules delay time specified.
257
258 var __later = function() {
259 var args = [].slice.call(arguments);
260 var timeout = args.shift();
261
262 window.setTimeout(function() {
263 __in.apply(this, args);
264 }, timeout);
265 };
266
267 // mapping for `In.ready`
268 // This method used for loading modules while domready.
269
270 var __ready = function() {
271 var args = arguments;
272
273 __contentLoaded(window, function() {
274 __in.apply(this, args);
275 });
276 };
277
278 var __global = function() {
279 var args = arguments[0].constructor === Array ? arguments[0] : [].slice.call(arguments);
280
281 __globals = __globals.concat(args);
282 };
283
284 // mapping for `In`
285 // This is the main function, also mapping for method `use`.
286
287 var __in = function() {
288 var args = [].slice.call(arguments);
289
290 if(__globals.length) {
291 args = __globals.concat(args);
292 }
293
294 if(__configure.serial) {
295 if(__configure.core && !__loaded[__configure.core]) {
296 args = ['__core'].concat(args);
297 }
298
299 var blahlist = __analyze(args).reverse();
300 var stack = new __stackline(blahlist);
301
302 stack.start();
303 return stack.bag;
304 }
305
306 if(typeof(args[args.length-1]) === 'function') {
307 var callback = args.pop();
308 }
309
310 if(__configure.core && !__loaded[__configure.core]) {
311 __parallel(['__core'], function() {
312 __parallel(args, callback);
313 });
314 } else {
315 __parallel(args, callback);
316 }
317 };
318
319 // private method, contentLoaded.
320 // This method used for domready.
321
322 var __contentLoaded = function(win,fn) {
323 var done = false, top=true,
324 doc = win.document, root = doc.documentElement,
325 add = doc.addEventListener ? 'addEventListener' : 'attachEvent',
326 rem = doc.addEventListener ? 'removeEventListener' : 'detachEvent',
327 pre = doc.addEventListener ? '' : 'on',
328
329 init = function(e) {
330 if(e.type == 'readystatechange' && doc.readyState != 'complete') return;
331 (e.type == 'load' ? win : doc)[rem](pre + e.type, init, false);
332 if(!done && (done=true)) fn.call(win, e.type || e);
333 },
334
335 poll = function() {
336 try {root.doScroll('left');} catch(e) {setTimeout(poll, 50);return;}
337 init('poll');
338 };
339
340 if(doc.readyState == 'complete') {
341 fn.call(win, 'lazy');
342 } else {
343 if(doc.createEventObject && root.doScroll) {
344 try {top =! win.frameElement;} catch(e) {}
345 if(top) poll();
346 }
347
348 doc[add](pre + 'DOMContentLoaded', init, false);
349 doc[add](pre + 'readystatechange', init, false);
350 win[add](pre + 'load', init, false);
351 }
352 }
353
354 // private method, initialize.
355 // This is a self-executing function while in.js loaded.
356
357 void function() {
358 var myself = (function() {
359 var scripts = document.getElementsByTagName('script');
360 return scripts[scripts.length - 1];
361 })();
362
363 var autoload = myself.getAttribute('autoload');
364 var core = myself.getAttribute('core');
365
366 if(core) {
367 __configure['autoload'] = eval(autoload);
368 __configure['core'] = core;
369 __add('__core', {path: __configure.core});
370 }
371
372 // autoload the core files
373 if(__configure.autoload && __configure.core) {
374 __in();
375 }
376 }();
377
378 // Bind the private method to in.
379
380 __in.add = __add;
381 __in.adds = __adds;
382 __in.config = __config;
383 __in.css = __css;
384 __in.later = __later;
385 __in.load = __load;
386 __in.ready = __ready;
387 __in.global = __global;
388 __in.use = __in;
389
390 this.In = __in;
391 }();
392
forum/static/js/base/jquery-1.6.4.min.js
File was created 1 /*! jQuery v1.6.4 http://jquery.com/ | http://jquery.org/license */
2 (function(a,b){function cu(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cr(a){if(!cg[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){ch||(ch=c.createElement("iframe"),ch.frameBorder=ch.width=ch.height=0),b.appendChild(ch);if(!ci||!ch.createElement)ci=(ch.contentWindow||ch.contentDocument).document,ci.write((c.compatMode==="CSS1Compat"?"<!doctype html>":"")+"<html><body>"),ci.close();d=ci.createElement(a),ci.body.appendChild(d),e=f.css(d,"display"),b.removeChild(ch)}cg[a]=e}return cg[a]}function cq(a,b){var c={};f.each(cm.concat.apply([],cm.slice(0,b)),function(){c[this]=a});return c}function cp(){cn=b}function co(){setTimeout(cp,0);return cn=f.now()}function cf(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ce(){try{return new a.XMLHttpRequest}catch(b){}}function b$(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g<i;g++){if(g===1)for(h in a.converters)typeof h=="string"&&(e[h.toLowerCase()]=a.converters[h]);l=k,k=d[g];if(k==="*")k=l;else if(l!=="*"&&l!==k){m=l+" "+k,n=e[m]||e["* "+k];if(!n){p=b;for(o in e){j=o.split(" ");if(j[0]===l||j[0]==="*"){p=e[j[1]+" "+k];if(p){o=e[o],o===!0?n=p:p===!0&&(n=o);break}}}}!n&&!p&&f.error("No conversion from "+m.replace(" "," to ")),n!==!0&&(c=n?n(c):p(o(c)))}}return c}function bZ(a,c,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,h,i,j,k;for(i in g)i in d&&(c[g[i]]=d[i]);while(f[0]==="*")f.shift(),h===b&&(h=a.mimeType||c.getResponseHeader("content-type"));if(h)for(i in e)if(e[i]&&e[i].test(h)){f.unshift(i);break}if(f[0]in d)j=f[0];else{for(i in d){if(!f[0]||a.converters[i+" "+f[0]]){j=i;break}k||(k=i)}j=j||k}if(j){j!==f[0]&&f.unshift(j);return d[j]}}function bY(a,b,c,d){if(f.isArray(b))f.each(b,function(b,e){c||bA.test(a)?d(a,e):bY(a+"["+(typeof e=="object"||f.isArray(e)?b:"")+"]",e,c,d)});else if(!c&&b!=null&&typeof b=="object")for(var e in b)bY(a+"["+e+"]",b[e],c,d);else d(a,b)}function bX(a,c){var d,e,g=f.ajaxSettings.flatOptions||{};for(d in c)c[d]!==b&&((g[d]?a:e||(e={}))[d]=c[d]);e&&f.extend(!0,a,e)}function bW(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h=a[f],i=0,j=h?h.length:0,k=a===bP,l;for(;i<j&&(k||!l);i++)l=h[i](c,d,e),typeof l=="string"&&(!k||g[l]?l=b:(c.dataTypes.unshift(l),l=bW(a,c,d,e,l,g)));(k||!l)&&!g["*"]&&(l=bW(a,c,d,e,"*",g));return l}function bV(a){return function(b,c){typeof b!="string"&&(c=b,b="*");if(f.isFunction(c)){var d=b.toLowerCase().split(bL),e=0,g=d.length,h,i,j;for(;e<g;e++)h=d[e],j=/^\+/.test(h),j&&(h=h.substr(1)||"*"),i=a[h]=a[h]||[],i[j?"unshift":"push"](c)}}}function by(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=b==="width"?bt:bu;if(d>0){c!=="border"&&f.each(e,function(){c||(d-=parseFloat(f.css(a,"padding"+this))||0),c==="margin"?d+=parseFloat(f.css(a,c+this))||0:d-=parseFloat(f.css(a,"border"+this+"Width"))||0});return d+"px"}d=bv(a,b,b);if(d<0||d==null)d=a.style[b]||0;d=parseFloat(d)||0,c&&f.each(e,function(){d+=parseFloat(f.css(a,"padding"+this))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+this+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+this))||0)});return d+"px"}function bl(a,b){b.src?f.ajax({url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(bd,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)}function bk(a){f.nodeName(a,"input")?bj(a):"getElementsByTagName"in a&&f.grep(a.getElementsByTagName("input"),bj)}function bj(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bi(a){return"getElementsByTagName"in a?a.getElementsByTagName("*"):"querySelectorAll"in a?a.querySelectorAll("*"):[]}function bh(a,b){var c;if(b.nodeType===1){b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase();if(c==="object")b.outerHTML=a.outerHTML;else if(c!=="input"||a.type!=="checkbox"&&a.type!=="radio"){if(c==="option")b.selected=a.defaultSelected;else if(c==="input"||c==="textarea")b.defaultValue=a.defaultValue}else a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value);b.removeAttribute(f.expando)}}function bg(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c=f.expando,d=f.data(a),e=f.data(b,d);if(d=d[c]){var g=d.events;e=e[c]=f.extend({},d);if(g){delete e.handle,e.events={};for(var h in g)for(var i=0,j=g[h].length;i<j;i++)f.event.add(b,h+(g[h][i].namespace?".":"")+g[h][i].namespace,g[h][i],g[h][i].data)}}}}function bf(a,b){return f.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function V(a,b,c){b=b||0;if(f.isFunction(b))return f.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return f.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=f.grep(a,function(a){return a.nodeType===1});if(Q.test(b))return f.filter(b,d,!c);b=f.filter(b,d)}return f.grep(a,function(a,d){return f.inArray(a,b)>=0===c})}function U(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function M(a,b){return(a&&a!=="*"?a+".":"")+b.replace(y,"`").replace(z,"&")}function L(a){var b,c,d,e,g,h,i,j,k,l,m,n,o,p=[],q=[],r=f._data(this,"events");if(!(a.liveFired===this||!r||!r.live||a.target.disabled||a.button&&a.type==="click")){a.namespace&&(n=new RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)")),a.liveFired=this;var s=r.live.slice(0);for(i=0;i<s.length;i++)g=s[i],g.origType.replace(w,"")===a.type?q.push(g.selector):s.splice(i--,1);e=f(a.target).closest(q,a.currentTarget);for(j=0,k=e.length;j<k;j++){m=e[j];for(i=0;i<s.length;i++){g=s[i];if(m.selector===g.selector&&(!n||n.test(g.namespace))&&!m.elem.disabled){h=m.elem,d=null;if(g.preType==="mouseenter"||g.preType==="mouseleave")a.type=g.preType,d=f(a.relatedTarget).closest(g.selector)[0],d&&f.contains(h,d)&&(d=h);(!d||d!==h)&&p.push({elem:h,handleObj:g,level:m.level})}}}for(j=0,k=p.length;j<k;j++){e=p[j];if(c&&e.level>c)break;a.currentTarget=e.elem,a.data=e.handleObj.data,a.handleObj=e.handleObj,o=e.handleObj.origHandler.apply(e.elem,arguments);if(o===!1||a.isPropagationStopped()){c=e.level,o===!1&&(b=!1);if(a.isImmediatePropagationStopped())break}}return b}}function J(a,c,d){var e=f.extend({},d[0]);e.type=a,e.originalEvent={},e.liveFired=b,f.event.handle.call(c,e),e.isDefaultPrevented()&&d[0].preventDefault()}function D(){return!0}function C(){return!1}function m(a,c,d){var e=c+"defer",g=c+"queue",h=c+"mark",i=f.data(a,e,b,!0);i&&(d==="queue"||!f.data(a,g,b,!0))&&(d==="mark"||!f.data(a,h,b,!0))&&setTimeout(function(){!f.data(a,g,b,!0)&&!f.data(a,h,b,!0)&&(f.removeData(a,e,!0),i.resolve())},0)}function l(a){for(var b in a)if(b!=="toJSON")return!1;return!0}function k(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(j,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNaN(d)?i.test(d)?f.parseJSON(d):d:parseFloat(d)}catch(g){}f.data(a,c,d)}else d=b}return d}var c=a.document,d=a.navigator,e=a.location,f=function(){function K(){if(!e.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(K,1);return}e.ready()}}var e=function(a,b){return new e.fn.init(a,b,h)},f=a.jQuery,g=a.$,h,i=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/\d/,n=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,o=/^[\],:{}\s]*$/,p=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,q=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,r=/(?:^|:|,)(?:\s*\[)+/g,s=/(webkit)[ \/]([\w.]+)/,t=/(opera)(?:.*version)?[ \/]([\w.]+)/,u=/(msie) ([\w.]+)/,v=/(mozilla)(?:.*? rv:([\w.]+))?/,w=/-([a-z]|[0-9])/ig,x=/^-ms-/,y=function(a,b){return(b+"").toUpperCase()},z=d.userAgent,A,B,C,D=Object.prototype.toString,E=Object.prototype.hasOwnProperty,F=Array.prototype.push,G=Array.prototype.slice,H=String.prototype.trim,I=Array.prototype.indexOf,J={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=n.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.6.4",length:0,size:function(){return this.length},toArray:function(){return G.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?F.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),B.done(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(G.apply(this,arguments),"slice",G.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:F,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j<k;j++)if((a=arguments[j])!=null)for(c in a){d=i[c],f=a[c];if(i===f)continue;l&&f&&(e.isPlainObject(f)||(g=e.isArray(f)))?(g?(g=!1,h=d&&e.isArray(d)?d:[]):h=d&&e.isPlainObject(d)?d:{},i[c]=e.extend(l,h,f)):f!==b&&(i[c]=f)}return i},e.extend({noConflict:function(b){a.$===e&&(a.$=g),b&&a.jQuery===e&&(a.jQuery=f);return e},isReady:!1,readyWait:1,holdReady:function(a){a?e.readyWait++:e.ready(!0)},ready:function(a){if(a===!0&&!--e.readyWait||a!==!0&&!e.isReady){if(!c.body)return setTimeout(e.ready,1);e.isReady=!0;if(a!==!0&&--e.readyWait>0)return;B.resolveWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").unbind("ready")}},bindReady:function(){if(!B){B=e._Deferred();if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",C,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",C),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&K()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNaN:function(a){return a==null||!m.test(a)||isNaN(a)},type:function(a){return a==null?String(a):J[D.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!E.call(a,"constructor")&&!E.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||E.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw a},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(o.test(b.replace(p,"@").replace(q,"]").replace(r,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(x,"ms-").replace(w,y)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g<h;)if(c.apply(a[g++],d)===!1)break}else if(i){for(f in a)if(c.call(a[f],f,a[f])===!1)break}else for(;g<h;)if(c.call(a[g],g,a[g++])===!1)break;return a},trim:H?function(a){return a==null?"":H.call(a)}:function(a){return a==null?"":(a+"").replace(k,"").replace(l,"")},makeArray:function(a,b){var c=b||[];if(a!=null){var d=e.type(a);a.length==null||d==="string"||d==="function"||d==="regexp"||e.isWindow(a)?F.call(c,a):e.merge(c,a)}return c},inArray:function(a,b){if(!b)return-1;if(I)return I.call(b,a);for(var c=0,d=b.length;c<d;c++)if(b[c]===a)return c;return-1},merge:function(a,c){var d=a.length,e=0;if(typeof c.length=="number")for(var f=c.length;e<f;e++)a[d++]=c[e];else while(c[e]!==b)a[d++]=c[e++];a.length=d;return a},grep:function(a,b,c){var d=[],e;c=!!c;for(var f=0,g=a.length;f<g;f++)e=!!b(a[f],f),c!==e&&d.push(a[f]);return d},map:function(a,c,d){var f,g,h=[],i=0,j=a.length,k=a instanceof e||j!==b&&typeof j=="number"&&(j>0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i<j;i++)f=c(a[i],i,d),f!=null&&(h[h.length]=f);else for(g in a)f=c(a[g],g,d),f!=null&&(h[h.length]=f);return h.concat.apply([],h)},guid:1,proxy:function(a,c){if(typeof c=="string"){var d=a[c];c=a,a=d}if(!e.isFunction(a))return b;var f=G.call(arguments,2),g=function(){return a.apply(c,f.concat(G.call(arguments)))};g.guid=a.guid=a.guid||g.guid||e.guid++;return g},access:function(a,c,d,f,g,h){var i=a.length;if(typeof c=="object"){for(var j in c)e.access(a,j,c[j],f,g,d);return a}if(d!==b){f=!h&&f&&e.isFunction(d);for(var k=0;k<i;k++)g(a[k],c,f?d.call(a[k],k,g(a[k],c)):d,h);return a}return i?g(a[0],c):b},now:function(){return(new Date).getTime()},uaMatch:function(a){a=a.toLowerCase();var b=s.exec(a)||t.exec(a)||u.exec(a)||a.indexOf("compatible")<0&&v.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}e.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function(d,f){f&&f instanceof e&&!(f instanceof a)&&(f=a(f));return e.fn.init.call(this,d,f,b)},a.fn.init.prototype=a.fn;var b=a(c);return a},browser:{}}),e.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){J["[object "+b+"]"]=b.toLowerCase()}),A=e.uaMatch(z),A.browser&&(e.browser[A.browser]=!0,e.browser.version=A.version),e.browser.webkit&&(e.browser.safari=!0),j.test(" ")&&(k=/^[\s\xA0]+/,l=/[\s\xA0]+$/),h=e(c),c.addEventListener?C=function(){c.removeEventListener("DOMContentLoaded",C,!1),e.ready()}:c.attachEvent&&(C=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",C),e.ready())});return e}(),g="done fail isResolved isRejected promise then always pipe".split(" "),h=[].slice;f.extend({_Deferred:function(){var a=[],b,c,d,e={done:function(){if(!d){var c=arguments,g,h,i,j,k;b&&(k=b,b=0);for(g=0,h=c.length;g<h;g++)i=c[g],j=f.type(i),j==="array"?e.done.apply(e,i):j==="function"&&a.push(i);k&&e.resolveWith(k[0],k[1])}return this},resolveWith:function(e,f){if(!d&&!b&&!c){f=f||[],c=1;try{while(a[0])a.shift().apply(e,f)}finally{b=[e,f],c=0}}return this},resolve:function(){e.resolveWith(this,arguments);return this},isResolved:function(){return!!c||!!b},cancel:function(){d=1,a=[];return this}};return e},Deferred:function(a){var b=f._Deferred(),c=f._Deferred(),d;f.extend(b,{then:function(a,c){b.done(a).fail(c);return this},always:function(){return b.done.apply(b,arguments).fail.apply(this,arguments)},fail:c.done,rejectWith:c.resolveWith,reject:c.resolve,isRejected:c.isResolved,pipe:function(a,c){return f.Deferred(function(d){f.each({done:[a,"resolve"],fail:[c,"reject"]},function(a,c){var e=c[0],g=c[1],h;f.isFunction(e)?b[a](function(){h=e.apply(this,arguments),h&&f.isFunction(h.promise)?h.promise().then(d.resolve,d.reject):d[g+"With"](this===b?d:this,[h])}):b[a](d[g])})}).promise()},promise:function(a){if(a==null){if(d)return d;d=a={}}var c=g.length;while(c--)a[g[c]]=b[g[c]];return a}}),b.done(c.cancel).fail(b.cancel),delete b.cancel,a&&a.call(b,b);return b},when:function(a){function i(a){return function(c){b[a]=arguments.length>1?h.call(arguments,0):c,--e||g.resolveWith(g,h.call(b,0))}}var b=arguments,c=0,d=b.length,e=d,g=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred();if(d>1){for(;c<d;c++)b[c]&&f.isFunction(b[c].promise)?b[c].promise().then(i(c),g.reject):--e;e||g.resolveWith(g,b)}else g!==a&&g.resolveWith(g,d?[a]:[]);return g.promise()}}),f.support=function(){var a=c.createElement("div"),b=c.documentElement,d,e,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;a.setAttribute("className","t"),a.innerHTML=" <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>",d=a.getElementsByTagName("*"),e=a.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=a.getElementsByTagName("input")[0],k={leadingWhitespace:a.firstChild.nodeType===3,tbody:!a.getElementsByTagName("tbody").length,htmlSerialize:!!a.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55$/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:a.className!=="t",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,k.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,k.optDisabled=!h.disabled;try{delete a.test}catch(v){k.deleteExpando=!1}!a.addEventListener&&a.attachEvent&&a.fireEvent&&(a.attachEvent("onclick",function(){k.noCloneEvent=!1}),a.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),k.radioValue=i.value==="t",i.setAttribute("checked","checked"),a.appendChild(i),l=c.createDocumentFragment(),l.appendChild(a.firstChild),k.checkClone=l.cloneNode(!0).cloneNode(!0).lastChild.checked,a.innerHTML="",a.style.width=a.style.paddingLeft="1px",m=c.getElementsByTagName("body")[0],o=c.createElement(m?"div":"body"),p={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},m&&f.extend(p,{position:"absolute",left:"-1000px",top:"-1000px"});for(t in p)o.style[t]=p[t];o.appendChild(a),n=m||b,n.insertBefore(o,n.firstChild),k.appendChecked=i.checked,k.boxModel=a.offsetWidth===2,"zoom"in a.style&&(a.style.display="inline",a.style.zoom=1,k.inlineBlockNeedsLayout=a.offsetWidth===2,a.style.display="",a.innerHTML="<div style='width:4px;'></div>",k.shrinkWrapBlocks=a.offsetWidth!==2),a.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>",q=a.getElementsByTagName("td"),u=q[0].offsetHeight===0,q[0].style.display="",q[1].style.display="none",k.reliableHiddenOffsets=u&&q[0].offsetHeight===0,a.innerHTML="",c.defaultView&&c.defaultView.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",a.appendChild(j),k.reliableMarginRight=(parseInt((c.defaultView.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0),o.innerHTML="",n.removeChild(o);if(a.attachEvent)for(t in{submit:1,change:1,focusin:1})s="on"+t,u=s in a,u||(a.setAttribute(s,"return;"),u=typeof a[s]=="function"),k[t+"Bubbles"]=u;o=l=g=h=m=j=a=i=null;return k}(),f.boxModel=f.support.boxModel;var i=/^(?:\{.*\}|\[.*\])$/,j=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!l(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i=f.expando,j=typeof c=="string",k=a.nodeType,l=k?f.cache:a,m=k?a[f.expando]:a[f.expando]&&f.expando;if((!m||e&&m&&l[m]&&!l[m][i])&&j&&d===b)return;m||(k?a[f.expando]=m=++f.uuid:m=f.expando),l[m]||(l[m]={},k||(l[m].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?l[m][i]=f.extend(l[m][i],c):l[m]=f.extend(l[m],c);g=l[m],e&&(g[i]||(g[i]={}),g=g[i]),d!==b&&(g[f.camelCase(c)]=d);if(c==="events"&&!g[c])return g[i]&&g[i].events;j?(h=g[c],h==null&&(h=g[f.camelCase(c)])):h=g;return h}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e=f.expando,g=a.nodeType,h=g?f.cache:a,i=g?a[f.expando]:f.expando;if(!h[i])return;if(b){d=c?h[i][e]:h[i];if(d){d[b]||(b=f.camelCase(b)),delete d[b];if(!l(d))return}}if(c){delete h[i][e];if(!l(h[i]))return}var j=h[i][e];f.support.deleteExpando||!h.setInterval?delete h[i]:h[i]=null,j?(h[i]={},g||(h[i].toJSON=f.noop),h[i][e]=j):g&&(f.support.deleteExpando?delete a[f.expando]:a.removeAttribute?a.removeAttribute(f.expando):a[f.expando]=null)}},_data:function(a,b,c){return f.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=f.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),f.fn.extend({data:function(a,c){var d=null;if(typeof a=="undefined"){if(this.length){d=f.data(this[0]);if(this[0].nodeType===1){var e=this[0].attributes,g;for(var h=0,i=e.length;h<i;h++)g=e[h].name,g.indexOf("data-")===0&&(g=f.camelCase(g.substring(5)),k(this[0],g,d[g]))}}return d}if(typeof a=="object")return this.each(function(){f.data(this,a)});var j=a.split(".");j[1]=j[1]?"."+j[1]:"";if(c===b){d=this.triggerHandler("getData"+j[1]+"!",[j[0]]),d===b&&this.length&&(d=f.data(this[0],a),d=k(this[0],a,d));return d===b&&j[1]?this.data(j[0]):d}return this.each(function(){var b=f(this),d=[j[0],c];b.triggerHandler("setData"+j[1]+"!",d),f.data(this,a,c),b.triggerHandler("changeData"+j[1]+"!",d)})},removeData:function(a){return this.each(function(){f.removeData(this,a)})}}),f.extend({_mark:function(a,c){a&&(c=(c||"fx")+"mark",f.data(a,c,(f.data(a,c,b,!0)||0)+1,!0))},_unmark:function(a,c,d){a!==!0&&(d=c,c=a,a=!1);if(c){d=d||"fx";var e=d+"mark",g=a?0:(f.data(c,e,b,!0)||1)-1;g?f.data(c,e,g,!0):(f.removeData(c,e,!0),m(c,d,"mark"))}},queue:function(a,c,d){if(a){c=(c||"fx")+"queue";var e=f.data(a,c,b,!0);d&&(!e||f.isArray(d)?e=f.data(a,c,f.makeArray(d),!0):e.push(d));return e||[]}},dequeue:function(a,b){b=b||"fx";var c=f.queue(a,b),d=c.shift(),e;d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),d.call(a,function(){f.dequeue(a,b)})),c.length||(f.removeData(a,b+"queue",!0),m(a,b,"queue"))}}),f.fn.extend({queue:function(a,c){typeof a!="string"&&(c=a,a="fx");if(c===b)return f.queue(this[0],a);return this.each(function(){var b=f.queue(this,a,c);a==="fx"&&b[0]!=="inprogress"&&f.dequeue(this,a)})},dequeue:function(a){return this.each(function(){f.dequeue(this,a)})},delay:function(a,b){a=f.fx?f.fx.speeds[a]||a:a,b=b||"fx";return this.queue(b,function(){var c=this;setTimeout(function(){f.dequeue(c,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){function m(){--h||d.resolveWith(e,[e])}typeof a!="string"&&(c=a,a=b),a=a||"fx";var d=f.Deferred(),e=this,g=e.length,h=1,i=a+"defer",j=a+"queue",k=a+"mark",l;while(g--)if(l=f.data(e[g],i,b,!0)||(f.data(e[g],j,b,!0)||f.data(e[g],k,b,!0))&&f.data(e[g],i,f._Deferred(),!0))h++,l.done(m);m();return d.promise()}});var n=/[\n\t\r]/g,o=/\s+/,p=/\r/g,q=/^(?:button|input)$/i,r=/^(?:button|input|object|select|textarea)$/i,s=/^a(?:rea)?$/i,t=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,u,v;f.fn.extend({attr:function(a,b){return f.access(this,a,b,!0,f.attr)},removeAttr:function(a){return this.each(function(){f.removeAttr(this,a)})},prop:function(a,b){return f.access(this,a,b,!0,f.prop)},removeProp:function(a){a=f.propFix[a]||a;return this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,g,h,i;if(f.isFunction(a))return this.each(function(b){f(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(o);for(c=0,d=this.length;c<d;c++){e=this[c];if(e.nodeType===1)if(!e.className&&b.length===1)e.className=a;else{g=" "+e.className+" ";for(h=0,i=b.length;h<i;h++)~g.indexOf(" "+b[h]+" ")||(g+=b[h]+" ");e.className=f.trim(g)}}}return this},removeClass:function(a){var c,d,e,g,h,i,j;if(f.isFunction(a))return this.each(function(b){f(this).removeClass(a.call(this,b,this.className))});if(a&&typeof a=="string"||a===b){c=(a||"").split(o);for(d=0,e=this.length;d<e;d++){g=this[d];if(g.nodeType===1&&g.className)if(a){h=(" "+g.className+" ").replace(n," ");for(i=0,j=c.length;i<j;i++)h=h.replace(" "+c[i]+" "," ");g.className=f.trim(h)}else g.className=""}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";if(f.isFunction(a))return this.each(function(c){f(this).toggleClass(a.call(this,c,this.className,b),b)});return this.each(function(){if(c==="string"){var e,g=0,h=f(this),i=b,j=a.split(o);while(e=j[g++])i=d?i:!h.hasClass(e),h[i?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&f._data(this,"__className__",this.className),this.className=this.className||a===!1?"":f._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ";for(var c=0,d=this.length;c<d;c++)if(this[c].nodeType===1&&(" "+this[c].className+" ").replace(n," ").indexOf(b)>-1)return!0;return!1},val:function(a){var c,d,e=this[0];if(!arguments.length){if(e){c=f.valHooks[e.nodeName.toLowerCase()]||f.valHooks[e.type];if(c&&"get"in c&&(d=c.get(e,"value"))!==b)return d;d=e.value;return typeof d=="string"?d.replace(p,""):d==null?"":d}return b}var g=f.isFunction(a);return this.each(function(d){var e=f(this),h;if(this.nodeType===1){g?h=a.call(this,d,e.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c=a.selectedIndex,d=[],e=a.options,g=a.type==="select-one";if(c<0)return null;for(var h=g?c:0,i=g?c+1:e.length;h<i;h++){var j=e[h];if(j.selected&&(f.support.optDisabled?!j.disabled:j.getAttribute("disabled")===null)&&(!j.parentNode.disabled||!f.nodeName(j.parentNode,"optgroup"))){b=f(j).val();if(g)return b;d.push(b)}}if(g&&!d.length&&e.length)return f(e[c]).val();return d},set:function(a,b){var c=f.makeArray(b);f(a).find("option").each(function(){this.selected=f.inArray(f(this).val(),c)>=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attrFix:{tabindex:"tabIndex"},attr:function(a,c,d,e){var g=a.nodeType;if(!a||g===3||g===8||g===2)return b;if(e&&c in f.attrFn)return f(a)[c](d);if(!("getAttribute"in a))return f.prop(a,c,d);var h,i,j=g!==1||!f.isXMLDoc(a);j&&(c=f.attrFix[c]||c,i=f.attrHooks[c],i||(t.test(c)?i=v:u&&(i=u)));if(d!==b){if(d===null){f.removeAttr(a,c);return b}if(i&&"set"in i&&j&&(h=i.set(a,d,c))!==b)return h;a.setAttribute(c,""+d);return d}if(i&&"get"in i&&j&&(h=i.get(a,c))!==null)return h;h=a.getAttribute(c);return h===null?b:h},removeAttr:function(a,b){var c;a.nodeType===1&&(b=f.attrFix[b]||b,f.attr(a,b,""),a.removeAttribute(b),t.test(b)&&(c=f.propFix[b]||b)in a&&(a[c]=!1))},attrHooks:{type:{set:function(a,b){if(q.test(a.nodeName)&&a.parentNode)f.error("type property can't be changed");else if(!f.support.radioValue&&b==="radio"&&f.nodeName(a,"input")){var c=a.value;a.setAttribute("type",b),c&&(a.value=c);return b}}},value:{get:function(a,b){if(u&&f.nodeName(a,"button"))return u.get(a,b);return b in a?a.value:null},set:function(a,b,c){if(u&&f.nodeName(a,"button"))return u.set(a,b,c);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e=a.nodeType;if(!a||e===3||e===8||e===2)return b;var g,h,i=e!==1||!f.isXMLDoc(a);i&&(c=f.propFix[c]||c,h=f.propHooks[c]);return d!==b?h&&"set"in h&&(g=h.set(a,d,c))!==b?g:a[c]=d:h&&"get"in h&&(g=h.get(a,c))!==null?g:a[c]},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):r.test(a.nodeName)||s.test(a.nodeName)&&a.href?0:b}}}}),f.attrHooks.tabIndex=f.propHooks.tabIndex,v={get:function(a,c){var d;return f.prop(a,c)===!0||(d=a.getAttributeNode(c))&&d.nodeValue!==!1?c.toLowerCase():b},set:function(a,b,c){var d;b===!1?f.removeAttr(a,c):(d=f.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase()));return c}},f.support.getSetAttribute||(u=f.valHooks.button={get:function(a,c){var d;d=a.getAttributeNode(c);return d&&d.nodeValue!==""?d.nodeValue:b},set:function(a,b,d){var e=a.getAttributeNode(d);e||(e=c.createAttribute(d),a.setAttributeNode(e));return e.nodeValue=b+""}},f.each(["width","height"],function(a,b){f.attrHooks[b]=f.extend(f.attrHooks[b],{set:function(a,c){if(c===""){a.setAttribute(b,"auto");return c}}})})),f.support.hrefNormalized||f.each(["href","src","width","height"],function(a,c){f.attrHooks[c]=f.extend(f.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),f.support.style||(f.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),f.support.optSelected||(f.propHooks.selected=f.extend(f.propHooks.selected,{get:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex);return null}})),f.support.checkOn||f.each(["radio","checkbox"],function(){f.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),f.each(["radio","checkbox"],function(){f.valHooks[this]=f.extend(f.valHooks[this],{set:function(a,b){if(f.isArray(b))return a.checked=f.inArray(f(a).val(),b)>=0}})});var w=/\.(.*)$/,x=/^(?:textarea|input|select)$/i,y=/\./g,z=/ /g,A=/[^\w\s.|`]/g,B=function(a){return a.replace(A,"\\$&")};f.event={add:function(a,c,d,e){if(a.nodeType!==3&&a.nodeType!==8){if(d===!1)d=C;else if(!d)return;var g,h;d.handler&&(g=d,d=g.handler),d.guid||(d.guid=f.guid++);var i=f._data(a);if(!i)return;var j=i.events,k=i.handle;j||(i.events=j={}),k||(i.handle=k=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.handle.apply(k.elem,arguments):b}),k.elem=a,c=c.split(" ");var l,m=0,n;while(l=c[m++]){h=g?f.extend({},g):{handler:d,data:e},l.indexOf(".")>-1?(n=l.split("."),l=n.shift(),h.namespace=n.slice(0).sort().join(".")):(n=[],h.namespace=""),h.type=l,h.guid||(h.guid=d.guid);var o=j[l],p=f.event.special[l]||{};if(!o){o=j[l]=[];if(!p.setup||p.setup.call(a,e,n,k)===!1)a.addEventListener?a.addEventListener(l,k,!1):a.attachEvent&&a.attachEvent("on"+l,k)}p.add&&(p.add.call(a,h),h.handler.guid||(h.handler.guid=d.guid)),o.push(h),f.event.global[l]=!0}a=null}},global:{},remove:function(a,c,d,e){if(a.nodeType!==3&&a.nodeType!==8){d===!1&&(d=C);var g,h,i,j,k=0,l,m,n,o,p,q,r,s=f.hasData(a)&&f._data(a),t=s&&s.events;if(!s||!t)return;c&&c.type&&(d=c.handler,c=c.type);if(!c||typeof c=="string"&&c.charAt(0)==="."){c=c||"";for(h in t)f.event.remove(a,h+c);return}c=c.split(" ");while(h=c[k++]){r=h,q=null,l=h.indexOf(".")<0,m=[],l||(m=h.split("."),h=m.shift(),n=new RegExp("(^|\\.)"+f.map(m.slice(0).sort(),B).join("\\.(?:.*\\.)?")+"(\\.|$)")),p=t[h];if(!p)continue;if(!d){for(j=0;j<p.length;j++){q=p[j];if(l||n.test(q.namespace))f.event.remove(a,r,q.handler,j),p.splice(j--,1)}continue}o=f.event.special[h]||{};for(j=e||0;j<p.length;j++){q=p[j];if(d.guid===q.guid){if(l||n.test(q.namespace))e==null&&p.splice(j--,1),o.remove&&o.remove.call(a,q);if(e!=null)break}}if(p.length===0||e!=null&&p.length===1)(!o.teardown||o.teardown.call(a,m)===!1)&&f.removeEvent(a,h,s.handle),g=null,delete
3 t[h]}if(f.isEmptyObject(t)){var u=s.handle;u&&(u.elem=null),delete s.events,delete s.handle,f.isEmptyObject(s)&&f.removeData(a,b,!0)}}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,e,g){var h=c.type||c,i=[],j;h.indexOf("!")>=0&&(h=h.slice(0,-1),j=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if(!!e&&!f.event.customEvent[h]||!!f.event.global[h]){c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.exclusive=j,c.namespace=i.join("."),c.namespace_re=new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)");if(g||!e)c.preventDefault(),c.stopPropagation();if(!e){f.each(f.cache,function(){var a=f.expando,b=this[a];b&&b.events&&b.events[h]&&f.event.trigger(c,d,b.handle.elem)});return}if(e.nodeType===3||e.nodeType===8)return;c.result=b,c.target=e,d=d!=null?f.makeArray(d):[],d.unshift(c);var k=e,l=h.indexOf(":")<0?"on"+h:"";do{var m=f._data(k,"handle");c.currentTarget=k,m&&m.apply(k,d),l&&f.acceptData(k)&&k[l]&&k[l].apply(k,d)===!1&&(c.result=!1,c.preventDefault()),k=k.parentNode||k.ownerDocument||k===c.target.ownerDocument&&a}while(k&&!c.isPropagationStopped());if(!c.isDefaultPrevented()){var n,o=f.event.special[h]||{};if((!o._default||o._default.call(e.ownerDocument,c)===!1)&&(h!=="click"||!f.nodeName(e,"a"))&&f.acceptData(e)){try{l&&e[h]&&(n=e[l],n&&(e[l]=null),f.event.triggered=h,e[h]())}catch(p){}n&&(e[l]=n),f.event.triggered=b}}return c.result}},handle:function(c){c=f.event.fix(c||a.event);var d=((f._data(this,"events")||{})[c.type]||[]).slice(0),e=!c.exclusive&&!c.namespace,g=Array.prototype.slice.call(arguments,0);g[0]=c,c.currentTarget=this;for(var h=0,i=d.length;h<i;h++){var j=d[h];if(e||c.namespace_re.test(j.namespace)){c.handler=j.handler,c.data=j.data,c.handleObj=j;var k=j.handler.apply(this,g);k!==b&&(c.result=k,k===!1&&(c.preventDefault(),c.stopPropagation()));if(c.isImmediatePropagationStopped())break}}return c.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(a){if(a[f.expando])return a;var d=a;a=f.Event(d);for(var e=this.props.length,g;e;)g=this.props[--e],a[g]=d[g];a.target||(a.target=a.srcElement||c),a.target.nodeType===3&&(a.target=a.target.parentNode),!a.relatedTarget&&a.fromElement&&(a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement);if(a.pageX==null&&a.clientX!=null){var h=a.target.ownerDocument||c,i=h.documentElement,j=h.body;a.pageX=a.clientX+(i&&i.scrollLeft||j&&j.scrollLeft||0)-(i&&i.clientLeft||j&&j.clientLeft||0),a.pageY=a.clientY+(i&&i.scrollTop||j&&j.scrollTop||0)-(i&&i.clientTop||j&&j.clientTop||0)}a.which==null&&(a.charCode!=null||a.keyCode!=null)&&(a.which=a.charCode!=null?a.charCode:a.keyCode),!a.metaKey&&a.ctrlKey&&(a.metaKey=a.ctrlKey),!a.which&&a.button!==b&&(a.which=a.button&1?1:a.button&2?3:a.button&4?2:0);return a},guid:1e8,proxy:f.proxy,special:{ready:{setup:f.bindReady,teardown:f.noop},live:{add:function(a){f.event.add(this,M(a.origType,a.selector),f.extend({},a,{handler:L,guid:a.handler.guid}))},remove:function(a){f.event.remove(this,M(a.origType,a.selector),a)}},beforeunload:{setup:function(a,b,c){f.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}}},f.removeEvent=c.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){a.detachEvent&&a.detachEvent("on"+b,c)},f.Event=function(a,b){if(!this.preventDefault)return new f.Event(a,b);a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?D:C):this.type=a,b&&f.extend(this,b),this.timeStamp=f.now(),this[f.expando]=!0},f.Event.prototype={preventDefault:function(){this.isDefaultPrevented=D;var a=this.originalEvent;!a||(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=D;var a=this.originalEvent;!a||(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=D,this.stopPropagation()},isDefaultPrevented:C,isPropagationStopped:C,isImmediatePropagationStopped:C};var E=function(a){var b=a.relatedTarget,c=!1,d=a.type;a.type=a.data,b!==this&&(b&&(c=f.contains(this,b)),c||(f.event.handle.apply(this,arguments),a.type=d))},F=function(a){a.type=a.data,f.event.handle.apply(this,arguments)};f.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){f.event.special[a]={setup:function(c){f.event.add(this,b,c&&c.selector?F:E,a)},teardown:function(a){f.event.remove(this,b,a&&a.selector?F:E)}}}),f.support.submitBubbles||(f.event.special.submit={setup:function(a,b){if(!f.nodeName(this,"form"))f.event.add(this,"click.specialSubmit",function(a){var b=a.target,c=f.nodeName(b,"input")||f.nodeName(b,"button")?b.type:"";(c==="submit"||c==="image")&&f(b).closest("form").length&&J("submit",this,arguments)}),f.event.add(this,"keypress.specialSubmit",function(a){var b=a.target,c=f.nodeName(b,"input")||f.nodeName(b,"button")?b.type:"";(c==="text"||c==="password")&&f(b).closest("form").length&&a.keyCode===13&&J("submit",this,arguments)});else return!1},teardown:function(a){f.event.remove(this,".specialSubmit")}});if(!f.support.changeBubbles){var G,H=function(a){var b=f.nodeName(a,"input")?a.type:"",c=a.value;b==="radio"||b==="checkbox"?c=a.checked:b==="select-multiple"?c=a.selectedIndex>-1?f.map(a.options,function(a){return a.selected}).join("-"):"":f.nodeName(a,"select")&&(c=a.selectedIndex);return c},I=function(c){var d=c.target,e,g;if(!!x.test(d.nodeName)&&!d.readOnly){e=f._data(d,"_change_data"),g=H(d),(c.type!=="focusout"||d.type!=="radio")&&f._data(d,"_change_data",g);if(e===b||g===e)return;if(e!=null||g)c.type="change",c.liveFired=b,f.event.trigger(c,arguments[1],d)}};f.event.special.change={filters:{focusout:I,beforedeactivate:I,click:function(a){var b=a.target,c=f.nodeName(b,"input")?b.type:"";(c==="radio"||c==="checkbox"||f.nodeName(b,"select"))&&I.call(this,a)},keydown:function(a){var b=a.target,c=f.nodeName(b,"input")?b.type:"";(a.keyCode===13&&!f.nodeName(b,"textarea")||a.keyCode===32&&(c==="checkbox"||c==="radio")||c==="select-multiple")&&I.call(this,a)},beforeactivate:function(a){var b=a.target;f._data(b,"_change_data",H(b))}},setup:function(a,b){if(this.type==="file")return!1;for(var c in G)f.event.add(this,c+".specialChange",G[c]);return x.test(this.nodeName)},teardown:function(a){f.event.remove(this,".specialChange");return x.test(this.nodeName)}},G=f.event.special.change.filters,G.focus=G.beforeactivate}f.support.focusinBubbles||f.each({focus:"focusin",blur:"focusout"},function(a,b){function e(a){var c=f.event.fix(a);c.type=b,c.originalEvent={},f.event.trigger(c,null,c.target),c.isDefaultPrevented()&&a.preventDefault()}var d=0;f.event.special[b]={setup:function(){d++===0&&c.addEventListener(a,e,!0)},teardown:function(){--d===0&&c.removeEventListener(a,e,!0)}}}),f.each(["bind","one"],function(a,c){f.fn[c]=function(a,d,e){var g;if(typeof a=="object"){for(var h in a)this[c](h,d,a[h],e);return this}if(arguments.length===2||d===!1)e=d,d=b;c==="one"?(g=function(a){f(this).unbind(a,g);return e.apply(this,arguments)},g.guid=e.guid||f.guid++):g=e;if(a==="unload"&&c!=="one")this.one(a,d,e);else for(var i=0,j=this.length;i<j;i++)f.event.add(this[i],a,g,d);return this}}),f.fn.extend({unbind:function(a,b){if(typeof a=="object"&&!a.preventDefault)for(var c in a)this.unbind(c,a[c]);else for(var d=0,e=this.length;d<e;d++)f.event.remove(this[d],a,b);return this},delegate:function(a,b,c,d){return this.live(b,c,d,a)},undelegate:function(a,b,c){return arguments.length===0?this.unbind("live"):this.die(b,null,c,a)},trigger:function(a,b){return this.each(function(){f.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0])return f.event.trigger(a,b,this[0],!0)},toggle:function(a){var b=arguments,c=a.guid||f.guid++,d=0,e=function(c){var e=(f.data(this,"lastToggle"+a.guid)||0)%d;f.data(this,"lastToggle"+a.guid,e+1),c.preventDefault();return b[e].apply(this,arguments)||!1};e.guid=c;while(d<b.length)b[d++].guid=c;return this.click(e)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var K={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};f.each(["live","die"],function(a,c){f.fn[c]=function(a,d,e,g){var h,i=0,j,k,l,m=g||this.selector,n=g?this:f(this.context);if(typeof a=="object"&&!a.preventDefault){for(var o in a)n[c](o,d,a[o],m);return this}if(c==="die"&&!a&&g&&g.charAt(0)==="."){n.unbind(g);return this}if(d===!1||f.isFunction(d))e=d||C,d=b;a=(a||"").split(" ");while((h=a[i++])!=null){j=w.exec(h),k="",j&&(k=j[0],h=h.replace(w,""));if(h==="hover"){a.push("mouseenter"+k,"mouseleave"+k);continue}l=h,K[h]?(a.push(K[h]+k),h=h+k):h=(K[h]||h)+k;if(c==="live")for(var p=0,q=n.length;p<q;p++)f.event.add(n[p],"live."+M(h,m),{data:d,selector:m,handler:e,origType:h,origHandler:e,preType:l});else n.unbind("live."+M(h,m),e)}return this}}),f.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "),function(a,b){f.fn[b]=function(a,c){c==null&&(c=a,a=null);return arguments.length>0?this.bind(b,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0)}),function(){function u(a,b,c,d,e,f){for(var g=0,h=d.length;g<h;g++){var i=d[g];if(i){var j=!1;i=i[a];while(i){if(i.sizcache===c){j=d[i.sizset];break}if(i.nodeType===1){f||(i.sizcache=c,i.sizset=g);if(typeof b!="string"){if(i===b){j=!0;break}}else if(k.filter(b,[i]).length>0){j=i;break}}i=i[a]}d[g]=j}}}function t(a,b,c,d,e,f){for(var g=0,h=d.length;g<h;g++){var i=d[g];if(i){var j=!1;i=i[a];while(i){if(i.sizcache===c){j=d[i.sizset];break}i.nodeType===1&&!f&&(i.sizcache=c,i.sizset=g);if(i.nodeName.toLowerCase()===b){j=i;break}i=i[a]}d[g]=j}}}var a=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d=0,e=Object.prototype.toString,g=!1,h=!0,i=/\\/g,j=/\W/;[0,0].sort(function(){h=!1;return 0});var k=function(b,d,f,g){f=f||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return f;var i,j,n,o,q,r,s,t,u=!0,w=k.isXML(d),x=[],y=b;do{a.exec(""),i=a.exec(y);if(i){y=i[3],x.push(i[1]);if(i[2]){o=i[3];break}}}while(i);if(x.length>1&&m.exec(b))if(x.length===2&&l.relative[x[0]])j=v(x[0]+x[1],d);else{j=l.relative[x[0]]?[d]:k(x.shift(),d);while(x.length)b=x.shift(),l.relative[b]&&(b+=x.shift()),j=v(b,j)}else{!g&&x.length>1&&d.nodeType===9&&!w&&l.match.ID.test(x[0])&&!l.match.ID.test(x[x.length-1])&&(q=k.find(x.shift(),d,w),d=q.expr?k.filter(q.expr,q.set)[0]:q.set[0]);if(d){q=g?{expr:x.pop(),set:p(g)}:k.find(x.pop(),x.length===1&&(x[0]==="~"||x[0]==="+")&&d.parentNode?d.parentNode:d,w),j=q.expr?k.filter(q.expr,q.set):q.set,x.length>0?n=p(j):u=!1;while(x.length)r=x.pop(),s=r,l.relative[r]?s=x.pop():r="",s==null&&(s=d),l.relative[r](n,s,w)}else n=x=[]}n||(n=j),n||k.error(r||b);if(e.call(n)==="[object Array]")if(!u)f.push.apply(f,n);else if(d&&d.nodeType===1)for(t=0;n[t]!=null;t++)n[t]&&(n[t]===!0||n[t].nodeType===1&&k.contains(d,n[t]))&&f.push(j[t]);else for(t=0;n[t]!=null;t++)n[t]&&n[t].nodeType===1&&f.push(j[t]);else p(n,f);o&&(k(o,h,f,g),k.uniqueSort(f));return f};k.uniqueSort=function(a){if(r){g=h,a.sort(r);if(g)for(var b=1;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1)}return a},k.matches=function(a,b){return k(a,null,null,b)},k.matchesSelector=function(a,b){return k(b,null,null,[a]).length>0},k.find=function(a,b,c){var d;if(!a)return[];for(var e=0,f=l.order.length;e<f;e++){var g,h=l.order[e];if(g=l.leftMatch[h].exec(a)){var j=g[1];g.splice(1,1);if(j.substr(j.length-1)!=="\\"){g[1]=(g[1]||"").replace(i,""),d=l.find[h](g,b,c);if(d!=null){a=a.replace(l.match[h],"");break}}}}d||(d=typeof b.getElementsByTagName!="undefined"?b.getElementsByTagName("*"):[]);return{set:d,expr:a}},k.filter=function(a,c,d,e){var f,g,h=a,i=[],j=c,m=c&&c[0]&&k.isXML(c[0]);while(a&&c.length){for(var n in l.filter)if((f=l.leftMatch[n].exec(a))!=null&&f[2]){var o,p,q=l.filter[n],r=f[1];g=!1,f.splice(1,1);if(r.substr(r.length-1)==="\\")continue;j===i&&(i=[]);if(l.preFilter[n]){f=l.preFilter[n](f,j,d,i,e,m);if(!f)g=o=!0;else if(f===!0)continue}if(f)for(var s=0;(p=j[s])!=null;s++)if(p){o=q(p,f,s,j);var t=e^!!o;d&&o!=null?t?g=!0:j[s]=!1:t&&(i.push(p),g=!0)}if(o!==b){d||(j=i),a=a.replace(l.match[n],"");if(!g)return[];break}}if(a===h)if(g==null)k.error(a);else break;h=a}return j},k.error=function(a){throw"Syntax error, unrecognized expression: "+a};var l=k.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(a){return a.getAttribute("href")},type:function(a){return a.getAttribute("type")}},relative:{"+":function(a,b){var c=typeof b=="string",d=c&&!j.test(b),e=c&&!d;d&&(b=b.toLowerCase());for(var f=0,g=a.length,h;f<g;f++)if(h=a[f]){while((h=h.previousSibling)&&h.nodeType!==1);a[f]=e||h&&h.nodeName.toLowerCase()===b?h||!1:h===b}e&&k.filter(b,a,!0)},">":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!j.test(b)){b=b.toLowerCase();for(;e<f;e++){c=a[e];if(c){var g=c.parentNode;a[e]=g.nodeName.toLowerCase()===b?g:!1}}}else{for(;e<f;e++)c=a[e],c&&(a[e]=d?c.parentNode:c.parentNode===b);d&&k.filter(b,a,!0)}},"":function(a,b,c){var e,f=d++,g=u;typeof b=="string"&&!j.test(b)&&(b=b.toLowerCase(),e=b,g=t),g("parentNode",b,f,a,e,c)},"~":function(a,b,c){var e,f=d++,g=u;typeof b=="string"&&!j.test(b)&&(b=b.toLowerCase(),e=b,g=t),g("previousSibling",b,f,a,e,c)}},find:{ID:function(a,b,c){if(typeof b.getElementById!="undefined"&&!c){var d=b.getElementById(a[1]);return d&&d.parentNode?[d]:[]}},NAME:function(a,b){if(typeof b.getElementsByName!="undefined"){var c=[],d=b.getElementsByName(a[1]);for(var e=0,f=d.length;e<f;e++)d[e].getAttribute("name")===a[1]&&c.push(d[e]);return c.length===0?null:c}},TAG:function(a,b){if(typeof b.getElementsByTagName!="undefined")return b.getElementsByTagName(a[1])}},preFilter:{CLASS:function(a,b,c,d,e,f){a=" "+a[1].replace(i,"")+" ";if(f)return a;for(var g=0,h;(h=b[g])!=null;g++)h&&(e^(h.className&&(" "+h.className+" ").replace(/[\t\n\r]/g," ").indexOf(a)>=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(i,"")},TAG:function(a,b){return a[1].replace(i,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||k.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&k.error(a[0]);a[0]=d++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(i,"");!f&&l.attrMap[g]&&(a[1]=l.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(i,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=k(b[3],null,null,c);else{var g=k.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(l.match.POS.test(b[0])||l.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!k(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return b<c[3]-0},gt:function(a,b,c){return b>c[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=l.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||k.getText([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h<i;h++)if(g[h]===a)return!1;return!0}k.error(e)},CHILD:function(a,b){var c=b[1],d=a;switch(c){case"only":case"first":while(d=d.previousSibling)if(d.nodeType===1)return!1;if(c==="first")return!0;d=a;case"last":while(d=d.nextSibling)if(d.nodeType===1)return!1;return!0;case"nth":var e=b[2],f=b[3];if(e===1&&f===0)return!0;var g=b[0],h=a.parentNode;if(h&&(h.sizcache!==g||!a.nodeIndex)){var i=0;for(d=h.firstChild;d;d=d.nextSibling)d.nodeType===1&&(d.nodeIndex=++i);h.sizcache=g}var j=a.nodeIndex-f;return e===0?j===0:j%e===0&&j/e>=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=l.attrHandle[c]?l.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=l.setFilters[e];if(f)return f(a,c,b,d)}}},m=l.match.POS,n=function(a,b){return"\\"+(b-0+1)};for(var o in l.match)l.match[o]=new RegExp(l.match[o].source+/(?![^\[]*\])(?![^\(]*\))/.source),l.leftMatch[o]=new RegExp(/(^(?:.|\r|\n)*?)/.source+l.match[o].source.replace(/\\(\d+)/g,n));var p=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(q){p=function(a,b){var c=0,d=b||[];if(e.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var f=a.length;c<f;c++)d.push(a[c]);else for(;a[c];c++)d.push(a[c]);return d}}var r,s;c.documentElement.compareDocumentPosition?r=function(a,b){if(a===b){g=!0;return 0}if(!a.compareDocumentPosition||!b.compareDocumentPosition)return a.compareDocumentPosition?-1:1;return a.compareDocumentPosition(b)&4?-1:1}:(r=function(a,b){if(a===b){g=!0;return 0}if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,e=[],f=[],h=a.parentNode,i=b.parentNode,j=h;if(h===i)return s(a,b);if(!h)return-1;if(!i)return 1;while(j)e.unshift(j),j=j.parentNode;j=i;while(j)f.unshift(j),j=j.parentNode;c=e.length,d=f.length;for(var k=0;k<c&&k<d;k++)if(e[k]!==f[k])return s(e[k],f[k]);return k===c?s(a,f[k],-1):s(e[k],b,1)},s=function(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}),k.getText=function(a){var b="",c;for(var d=0;a[d];d++)c=a[d],c.nodeType===3||c.nodeType===4?b+=c.nodeValue:c.nodeType!==8&&(b+=k.getText(c.childNodes));return b},function(){var a=c.createElement("div"),d="script"+(new Date).getTime(),e=c.documentElement;a.innerHTML="<a name='"+d+"'/>",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(l.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},l.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(l.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="<a href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(l.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=k,b=c.createElement("div"),d="__sizzle__";b.innerHTML="<p class='TEST'></p>";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){k=function(b,e,f,g){e=e||c;if(!g&&!k.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return p(e.getElementsByTagName(b),f);if(h[2]&&l.find.CLASS&&e.getElementsByClassName)return p(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return p([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return p([],f);if(i.id===h[3])return p([i],f)}try{return p(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var m=e,n=e.getAttribute("id"),o=n||d,q=e.parentNode,r=/^\s*[+~]/.test(b);n?o=o.replace(/'/g,"\\$&"):e.setAttribute("id",o),r&&q&&(e=e.parentNode);try{if(!r||q)return p(e.querySelectorAll("[id='"+o+"'] "+b),f)}catch(s){}finally{n||m.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)k[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}k.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!k.isXML(a))try{if(e||!l.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return k(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="<div class='test e'></div><div class='test'></div>";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;l.order.splice(1,0,"CLASS"),l.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?k.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?k.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:k.contains=function(){return!1},k.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var v=function(a,b){var c,d=[],e="",f=b.nodeType?[b]:b;while(c=l.match.PSEUDO.exec(a))e+=c[0],a=a.replace(l.match.PSEUDO,"");a=l.relative[a]?a+"*":a;for(var g=0,h=f.length;g<h;g++)k(a,f[g],d);return k.filter(e,d)};f.find=k,f.expr=k.selectors,f.expr[":"]=f.expr.filters,f.unique=k.uniqueSort,f.text=k.getText,f.isXMLDoc=k.isXML,f.contains=k.contains}();var N=/Until$/,O=/^(?:parents|prevUntil|prevAll)/,P=/,/,Q=/^.[^:#\[\.,]*$/,R=Array.prototype.slice,S=f.expr.match.POS,T={children:!0,contents:!0,next:!0,prev:!0};f.fn.extend({find:function(a){var b=this,c,d;if(typeof a!="string")return f(a).filter(function(){for(c=0,d=b.length;c<d;c++)if(f.contains(b[c],this))return!0});var e=this.pushStack("","find",a),g,h,i;for(c=0,d=this.length;c<d;c++){g=e.length,f.find(a,this[c],e);if(c>0)for(h=g;h<e.length;h++)for(i=0;i<g;i++)if(e[i]===e[h]){e.splice(h--,1);break}}return e},has:function(a){var b=f(a);return this.filter(function(){for(var a=0,c=b.length;a<c;a++)if(f.contains(this,b[a]))return!0})},not:function(a){return this.pushStack(V(this,a,!1),"not",a)},filter:function(a){return this.pushStack(V(this,a,!0),"filter",a)},is:function(a){return!!a&&(typeof a=="string"?f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h,i,j={},k=1;if(g&&a.length){for(d=0,e=a.length;d<e;d++)i=a[d],j[i]||(j[i]=S.test(i)?f(i,b||this.context):i);while(g&&g.ownerDocument&&g!==b){for(i in j)h=j[i],(h.jquery?h.index(g)>-1:f(g).is(h))&&c.push({selector:i,elem:g,level:k});g=g.parentNode,k++}}return c}var l=S.test(a)||typeof a!="string"?f(a,b||this.context):0;for(d=0,e=this.length;d<e;d++){g=this[d];while(g){if(l?l.index(g)>-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(U(c[0])||U(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c),g=R.call(arguments);N.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!T[a]?f.unique(e):e,(this.length>1||P.test(d))&&O.test(a)&&(e=e.reverse());return this.pushStack(e,a,g.join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/<tbody/i,_=/<|&#?\w+;/,ba=/<(?:script|object|embed|option|style)/i,bb=/checked\s*(?:[^=]|=\s*.checked.)/i,bc=/\/(java|ecma)script/i,bd=/^\s*<!(?:\[CDATA\[|\-\-)/,be={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};be.optgroup=be.option,be.tbody=be.tfoot=be.colgroup=be.caption=be.thead,be.th=be.td,f.support.htmlSerialize||(be._default=[1,"div<div>","</div>"]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){f(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f(arguments[0]).toArray());return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!be[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1></$2>");try{for(var c=0,d=this.length;c<d;c++)this[c].nodeType===1&&(f.cleanData(this[c].getElementsByTagName("*")),this[c].innerHTML=a)}catch(e){this.empty().append(a)}}else f.isFunction(a)?this.each(function(b){var c=f(this);c.html(a.call(this,b,c.html()))}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(f.isFunction(a))return this.each(function(b){var c=f(this),d=c.html();c.replaceWith(a.call(this,b,d))});typeof a!="string"&&(a=f(a).detach());return this.each(function(){var b=this.nextSibling,c=this.parentNode;f(this).remove(),b?f(b).before(a):f(c).append(a)})}return this.length?this.pushStack(f(f.isFunction(a)?a():a),"replaceWith",a):this},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){var e,g,h,i,j=a[0],k=[];if(!f.support.checkClone&&arguments.length===3&&typeof j=="string"&&bb.test(j))return this.each(function(){f(this).domManip(a,c,d,!0)});if(f.isFunction(j))return this.each(function(e){var g=f(this);a[0]=j.call(this,e,c?g.html():b),g.domManip(a,c,d)});if(this[0]){i=j&&j.parentNode,f.support.parentNode&&i&&i.nodeType===11&&i.childNodes.length===this.length?e={fragment:i}:e=f.buildFragment(a,this,k),h=e.fragment,h.childNodes.length===1?g=h=h.firstChild:g=h.firstChild;if(g){c=c&&f.nodeName(g,"tr");for(var l=0,m=this.length,n=m-1;l<m;l++)d.call(c?bf(this[l],g):this[l],e.cacheable||m>1&&l<n?f.clone(h,!0,!0):h)}k.length&&f.each(k,bl)}return this}}),f.buildFragment=function(a,b,d){var e,g,h,i;b&&b[0]&&(i=b[0].ownerDocument||b[0]),i.createDocumentFragment||(i=c),a.length===1&&typeof a[0]=="string"&&a[0].length<512&&i===c&&a[0].charAt(0)==="<"&&!ba.test(a[0])&&(f.support.checkClone||!bb.test(a[0]))&&(g=!0,h=f.fragments[a[0]],h&&h!==1&&(e=h)),e||(e=i.createDocumentFragment(),f.clean
4 (a,i,e,d)),g&&(f.fragments[a[0]]=h?e:1);return{fragment:e,cacheable:g}},f.fragments={},f.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){f.fn[a]=function(c){var d=[],e=f(c),g=this.length===1&&this[0].parentNode;if(g&&g.nodeType===11&&g.childNodes.length===1&&e.length===1){e[b](this[0]);return this}for(var h=0,i=e.length;h<i;h++){var j=(h>0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d=a.cloneNode(!0),e,g,h;if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bh(a,d),e=bi(a),g=bi(d);for(h=0;e[h];++h)g[h]&&bh(e[h],g[h])}if(b){bg(a,d);if(c){e=bi(a),g=bi(d);for(h=0;e[h];++h)bg(e[h],g[h])}}e=g=null;return d},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!_.test(k))k=b.createTextNode(k);else{k=k.replace(Y,"<$1></$2>");var l=(Z.exec(k)||["",""])[1].toLowerCase(),m=be[l]||be._default,n=m[0],o=b.createElement("div");o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=$.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]==="<table>"&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&X.test(k)&&o.insertBefore(b.createTextNode(X.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i<r;i++)bk(k[i]);else bk(k);k.nodeType?h.push(k):h=f.merge(h,k)}if(d){g=function(a){return!a.type||bc.test(a.type)};for(j=0;h[j];j++)if(e&&f.nodeName(h[j],"script")&&(!h[j].type||h[j].type.toLowerCase()==="text/javascript"))e.push(h[j].parentNode?h[j].parentNode.removeChild(h[j]):h[j]);else{if(h[j].nodeType===1){var s=f.grep(h[j].getElementsByTagName("script"),g);h.splice.apply(h,[j+1,0].concat(s))}d.appendChild(h[j])}}return h},cleanData:function(a){var b,c,d=f.cache,e=f.expando,g=f.event.special,h=f.support.deleteExpando;for(var i=0,j;(j=a[i])!=null;i++){if(j.nodeName&&f.noData[j.nodeName.toLowerCase()])continue;c=j[f.expando];if(c){b=d[c]&&d[c][e];if(b&&b.events){for(var k in b.events)g[k]?f.event.remove(j,k):f.removeEvent(j,k,b.handle);b.handle&&(b.handle.elem=null)}h?delete j[f.expando]:j.removeAttribute&&j.removeAttribute(f.expando),delete d[c]}}}});var bm=/alpha\([^)]*\)/i,bn=/opacity=([^)]*)/,bo=/([A-Z]|^ms)/g,bp=/^-?\d+(?:px)?$/i,bq=/^-?\d/,br=/^([\-+])=([\-+.\de]+)/,bs={position:"absolute",visibility:"hidden",display:"block"},bt=["Left","Right"],bu=["Top","Bottom"],bv,bw,bx;f.fn.css=function(a,c){if(arguments.length===2&&c===b)return this;return f.access(this,a,c,!0,function(a,c,d){return d!==b?f.style(a,c,d):f.css(a,c)})},f.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bv(a,"opacity","opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":f.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!!a&&a.nodeType!==3&&a.nodeType!==8&&!!a.style){var g,h,i=f.camelCase(c),j=a.style,k=f.cssHooks[i];c=f.cssProps[i]||i;if(d===b){if(k&&"get"in k&&(g=k.get(a,!1,e))!==b)return g;return j[c]}h=typeof d,h==="string"&&(g=br.exec(d))&&(d=+(g[1]+1)*+g[2]+parseFloat(f.css(a,c)),h="number");if(d==null||h==="number"&&isNaN(d))return;h==="number"&&!f.cssNumber[i]&&(d+="px");if(!k||!("set"in k)||(d=k.set(a,d))!==b)try{j[c]=d}catch(l){}}},css:function(a,c,d){var e,g;c=f.camelCase(c),g=f.cssHooks[c],c=f.cssProps[c]||c,c==="cssFloat"&&(c="float");if(g&&"get"in g&&(e=g.get(a,!0,d))!==b)return e;if(bv)return bv(a,c)},swap:function(a,b,c){var d={};for(var e in b)d[e]=a.style[e],a.style[e]=b[e];c.call(a);for(e in b)a.style[e]=d[e]}}),f.curCSS=f.css,f.each(["height","width"],function(a,b){f.cssHooks[b]={get:function(a,c,d){var e;if(c){if(a.offsetWidth!==0)return by(a,b,d);f.swap(a,bs,function(){e=by(a,b,d)});return e}},set:function(a,b){if(!bp.test(b))return b;b=parseFloat(b);if(b>=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return bn.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNaN(b)?"":"alpha(opacity="+b*100+")",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bm,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bm.test(g)?g.replace(bm,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bv(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bw=function(a,c){var d,e,g;c=c.replace(bo,"-$1").toLowerCase();if(!(e=a.ownerDocument.defaultView))return b;if(g=e.getComputedStyle(a,null))d=g.getPropertyValue(c),d===""&&!f.contains(a.ownerDocument.documentElement,a)&&(d=f.style(a,c));return d}),c.documentElement.currentStyle&&(bx=function(a,b){var c,d=a.currentStyle&&a.currentStyle[b],e=a.runtimeStyle&&a.runtimeStyle[b],f=a.style;!bp.test(d)&&bq.test(d)&&(c=f.left,e&&(a.runtimeStyle.left=a.currentStyle.left),f.left=b==="fontSize"?"1em":d||0,d=f.pixelLeft+"px",f.left=c,e&&(a.runtimeStyle.left=e));return d===""?"auto":d}),bv=bw||bx,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bz=/%20/g,bA=/\[\]$/,bB=/\r?\n/g,bC=/#.*$/,bD=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bE=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bF=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bG=/^(?:GET|HEAD)$/,bH=/^\/\//,bI=/\?/,bJ=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,bK=/^(?:select|textarea)/i,bL=/\s+/,bM=/([?&])_=[^&]*/,bN=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bO=f.fn.load,bP={},bQ={},bR,bS,bT=["*/"]+["*"];try{bR=e.href}catch(bU){bR=c.createElement("a"),bR.href="",bR=bR.href}bS=bN.exec(bR.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bO)return bO.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("<div>").append(c.replace(bJ,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bK.test(this.nodeName)||bE.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bB,"\r\n")}}):{name:b.name,value:c.replace(bB,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.bind(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?bX(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),bX(a,b);return a},ajaxSettings:{url:bR,isLocal:bF.test(bS[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bT},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bV(bP),ajaxTransport:bV(bQ),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?bZ(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=b$(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.resolveWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f._Deferred(),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bD.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.done,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bC,"").replace(bH,bS[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bL),d.crossDomain==null&&(r=bN.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bS[1]&&r[2]==bS[2]&&(r[3]||(r[1]==="http:"?80:443))==(bS[3]||(bS[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),bW(bP,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bG.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bI.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bM,"$1_="+x);d.url=y+(y===d.url?(bI.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bT+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=bW(bQ,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){s<2?w(-1,z):f.error(z)}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)bY(g,a[g],c,e);return d.join("&").replace(bz,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var b_=f.now(),ca=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+b_++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(ca.test(b.url)||e&&ca.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(ca,l),b.url===j&&(e&&(k=k.replace(ca,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var cb=a.ActiveXObject?function(){for(var a in cd)cd[a](0,1)}:!1,cc=0,cd;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ce()||cf()}:ce,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,cb&&delete cd[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cc,cb&&(cd||(cd={},f(a).unload(cb)),cd[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var cg={},ch,ci,cj=/^(?:toggle|show|hide)$/,ck=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cl,cm=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cn;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cq("show",3),a,b,c);for(var g=0,h=this.length;g<h;g++)d=this[g],d.style&&(e=d.style.display,!f._data(d,"olddisplay")&&e==="none"&&(e=d.style.display=""),e===""&&f.css(d,"display")==="none"&&f._data(d,"olddisplay",cr(d.nodeName)));for(g=0;g<h;g++){d=this[g];if(d.style){e=d.style.display;if(e===""||e==="none")d.style.display=f._data(d,"olddisplay")||""}}return this},hide:function(a,b,c){if(a||a===0)return this.animate(cq("hide",3),a,b,c);for(var d=0,e=this.length;d<e;d++)if(this[d].style){var g=f.css(this[d],"display");g!=="none"&&!f._data(this[d],"olddisplay")&&f._data(this[d],"olddisplay",g)}for(d=0;d<e;d++)this[d].style&&(this[d].style.display="none");return this},_toggle:f.fn.toggle,toggle:function(a,b,c){var d=typeof a=="boolean";f.isFunction(a)&&f.isFunction(b)?this._toggle.apply(this,arguments):a==null||d?this.each(function(){var b=d?a:f(this).is(":hidden");f(this)[b?"show":"hide"]()}):this.animate(cq("toggle",3),a,b,c);return this},fadeTo:function(a,b,c,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=f.speed(b,c,d);if(f.isEmptyObject(a))return this.each(e.complete,[!1]);a=f.extend({},a);return this[e.queue===!1?"each":"queue"](function(){e.queue===!1&&f._mark(this);var b=f.extend({},e),c=this.nodeType===1,d=c&&f(this).is(":hidden"),g,h,i,j,k,l,m,n,o;b.animatedProperties={};for(i in a){g=f.camelCase(i),i!==g&&(a[g]=a[i],delete a[i]),h=a[g],f.isArray(h)?(b.animatedProperties[g]=h[1],h=a[g]=h[0]):b.animatedProperties[g]=b.specialEasing&&b.specialEasing[g]||b.easing||"swing";if(h==="hide"&&d||h==="show"&&!d)return b.complete.call(this);c&&(g==="height"||g==="width")&&(b.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY],f.css(this,"display")==="inline"&&f.css(this,"float")==="none"&&(f.support.inlineBlockNeedsLayout?(j=cr(this.nodeName),j==="inline"?this.style.display="inline-block":(this.style.display="inline",this.style.zoom=1)):this.style.display="inline-block"))}b.overflow!=null&&(this.style.overflow="hidden");for(i in a)k=new f.fx(this,b,i),h=a[i],cj.test(h)?k[h==="toggle"?d?"show":"hide":h]():(l=ck.exec(h),m=k.cur(),l?(n=parseFloat(l[2]),o=l[3]||(f.cssNumber[i]?"":"px"),o!=="px"&&(f.style(this,i,(n||1)+o),m=(n||1)/k.cur()*m,f.style(this,i,m+o)),l[1]&&(n=(l[1]==="-="?-1:1)*n+m),k.custom(m,n,o)):k.custom(m,h,""));return!0})},stop:function(a,b){a&&this.queue([]),this.each(function(){var a=f.timers,c=a.length;b||f._unmark(!0,this);while(c--)a[c].elem===this&&(b&&a[c](!0),a.splice(c,1))}),b||this.dequeue();return this}}),f.each({slideDown:cq("show",1),slideUp:cq("hide",1),slideToggle:cq("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){f.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),f.extend({speed:function(a,b,c){var d=a&&typeof a=="object"?f.extend({},a):{complete:c||!c&&b||f.isFunction(a)&&a,duration:a,easing:c&&b||b&&!f.isFunction(b)&&b};d.duration=f.fx.off?0:typeof d.duration=="number"?d.duration:d.duration in f.fx.speeds?f.fx.speeds[d.duration]:f.fx.speeds._default,d.old=d.complete,d.complete=function(a){f.isFunction(d.old)&&d.old.call(this),d.queue!==!1?f.dequeue(this):a!==!1&&f._unmark(this)};return d},easing:{linear:function(a,b,c,d){return c+d*a},swing:function(a,b,c,d){return(-Math.cos(a*Math.PI)/2+.5)*d+c}},timers:[],fx:function(a,b,c){this.options=b,this.elem=a,this.prop=c,b.orig=b.orig||{}}}),f.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(f.fx.step[this.prop]||f.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a,b=f.css(this.elem,this.prop);return isNaN(a=parseFloat(b))?!b||b==="auto"?0:b:a},custom:function(a,b,c){function g(a){return d.step(a)}var d=this,e=f.fx;this.startTime=cn||co(),this.start=a,this.end=b,this.unit=c||this.unit||(f.cssNumber[this.prop]?"":"px"),this.now=this.start,this.pos=this.state=0,g.elem=this.elem,g()&&f.timers.push(g)&&!cl&&(cl=setInterval(e.tick,e.interval))},show:function(){this.options.orig[this.prop]=f.style(this.elem,this.prop),this.options.show=!0,this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),f(this.elem).show()},hide:function(){this.options.orig[this.prop]=f.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(a){var b=cn||co(),c=!0,d=this.elem,e=this.options,g,h;if(a||b>=e.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),e.animatedProperties[this.prop]=!0;for(g in e.animatedProperties)e.animatedProperties[g]!==!0&&(c=!1);if(c){e.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){d.style["overflow"+b]=e.overflow[a]}),e.hide&&f(d).hide();if(e.hide||e.show)for(var i in e.animatedProperties)f.style(d,i,e.orig[i]);e.complete.call(d)}return!1}e.duration==Infinity?this.now=b:(h=b-this.startTime,this.state=h/e.duration,this.pos=f.easing[e.animatedProperties[this.prop]](this.state,h,0,1,e.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){for(var a=f.timers,b=0;b<a.length;++b)a[b]()||a.splice(b--,1);a.length||f.fx.stop()},interval:13,stop:function(){clearInterval(cl),cl=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){f.style(a.elem,"opacity",a.now)},_default:function(a){a.elem.style&&a.elem.style[a.prop]!=null?a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit:a.elem[a.prop]=a.now}}}),f.expr&&f.expr.filters&&(f.expr.filters.animated=function(a){return f.grep(f.timers,function(b){return a===b.elem}).length});var cs=/^t(?:able|d|h)$/i,ct=/^(?:body|html)$/i;"getBoundingClientRect"in c.documentElement?f.fn.offset=function(a){var b=this[0],c;if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);try{c=b.getBoundingClientRect()}catch(d){}var e=b.ownerDocument,g=e.documentElement;if(!c||!f.contains(g,b))return c?{top:c.top,left:c.left}:{top:0,left:0};var h=e.body,i=cu(e),j=g.clientTop||h.clientTop||0,k=g.clientLeft||h.clientLeft||0,l=i.pageYOffset||f.support.boxModel&&g.scrollTop||h.scrollTop,m=i.pageXOffset||f.support.boxModel&&g.scrollLeft||h.scrollLeft,n=c.top+l-j,o=c.left+m-k;return{top:n,left:o}}:f.fn.offset=function(a){var b=this[0];if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);f.offset.initialize();var c,d=b.offsetParent,e=b,g=b.ownerDocument,h=g.documentElement,i=g.body,j=g.defaultView,k=j?j.getComputedStyle(b,null):b.currentStyle,l=b.offsetTop,m=b.offsetLeft;while((b=b.parentNode)&&b!==i&&b!==h){if(f.offset.supportsFixedPosition&&k.position==="fixed")break;c=j?j.getComputedStyle(b,null):b.currentStyle,l-=b.scrollTop,m-=b.scrollLeft,b===d&&(l+=b.offsetTop,m+=b.offsetLeft,f.offset.doesNotAddBorder&&(!f.offset.doesAddBorderForTableAndCells||!cs.test(b.nodeName))&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),e=d,d=b.offsetParent),f.offset.subtractsBorderForOverflowNotVisible&&c.overflow!=="visible"&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),k=c}if(k.position==="relative"||k.position==="static")l+=i.offsetTop,m+=i.offsetLeft;f.offset.supportsFixedPosition&&k.position==="fixed"&&(l+=Math.max(h.scrollTop,i.scrollTop),m+=Math.max(h.scrollLeft,i.scrollLeft));return{top:l,left:m}},f.offset={initialize:function(){var a=c.body,b=c.createElement("div"),d,e,g,h,i=parseFloat(f.css(a,"marginTop"))||0,j="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";f.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"}),b.innerHTML=j,a.insertBefore(b,a.firstChild),d=b.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,this.doesNotAddBorder=e.offsetTop!==5,this.doesAddBorderForTableAndCells=h.offsetTop===5,e.style.position="fixed",e.style.top="20px",this.supportsFixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",this.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==i,a.removeChild(b),f.offset.initialize=f.noop},bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;f.offset.initialize(),f.offset.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(f.css(a,"marginTop"))||0,c+=parseFloat(f.css(a,"marginLeft"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var d=f.css(a,"position");d==="static"&&(a.style.position="relative");var e=f(a),g=e.offset(),h=f.css(a,"top"),i=f.css(a,"left"),j=(d==="absolute"||d==="fixed")&&f.inArray("auto",[h,i])>-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=ct.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!ct.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cu(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]}return this.each(function(){g=cu(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){var a=this[0];return a&&a.style?parseFloat(f.css(a,d,"padding")):null},f.fn["outer"+c]=function(a){var b=this[0];return b&&b.style?parseFloat(f.css(b,d,a?"margin":"border")):null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c],h=e.document.body;return e.document.compatMode==="CSS1Compat"&&g||h&&h["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var i=f.css(e,d),j=parseFloat(i);return f.isNaN(j)?i:j}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f})(window);
5
forum/static/js/base/jquery-1.8.3.min.js
File was created 1 /*! jQuery v1.8.3 jquery.com | jquery.org/license */
2 (function(e,t){function _(e){var t=M[e]={};return v.each(e.split(y),function(e,n){t[n]=!0}),t}function H(e,n,r){if(r===t&&e.nodeType===1){var i="data-"+n.replace(P,"-$1").toLowerCase();r=e.getAttribute(i);if(typeof r=="string"){try{r=r==="true"?!0:r==="false"?!1:r==="null"?null:+r+""===r?+r:D.test(r)?v.parseJSON(r):r}catch(s){}v.data(e,n,r)}else r=t}return r}function B(e){var t;for(t in e){if(t==="data"&&v.isEmptyObject(e[t]))continue;if(t!=="toJSON")return!1}return!0}function et(){return!1}function tt(){return!0}function ut(e){return!e||!e.parentNode||e.parentNode.nodeType===11}function at(e,t){do e=e[t];while(e&&e.nodeType!==1);return e}function ft(e,t,n){t=t||0;if(v.isFunction(t))return v.grep(e,function(e,r){var i=!!t.call(e,r,e);return i===n});if(t.nodeType)return v.grep(e,function(e,r){return e===t===n});if(typeof t=="string"){var r=v.grep(e,function(e){return e.nodeType===1});if(it.test(t))return v.filter(t,r,!n);t=v.filter(t,r)}return v.grep(e,function(e,r){return v.inArray(e,t)>=0===n})}function lt(e){var t=ct.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}function Lt(e,t){return e.getElementsByTagName(t)[0]||e.appendChild(e.ownerDocument.createElement(t))}function At(e,t){if(t.nodeType!==1||!v.hasData(e))return;var n,r,i,s=v._data(e),o=v._data(t,s),u=s.events;if(u){delete o.handle,o.events={};for(n in u)for(r=0,i=u[n].length;r<i;r++)v.event.add(t,n,u[n][r])}o.data&&(o.data=v.extend({},o.data))}function Ot(e,t){var n;if(t.nodeType!==1)return;t.clearAttributes&&t.clearAttributes(),t.mergeAttributes&&t.mergeAttributes(e),n=t.nodeName.toLowerCase(),n==="object"?(t.parentNode&&(t.outerHTML=e.outerHTML),v.support.html5Clone&&e.innerHTML&&!v.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):n==="input"&&Et.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):n==="option"?t.selected=e.defaultSelected:n==="input"||n==="textarea"?t.defaultValue=e.defaultValue:n==="script"&&t.text!==e.text&&(t.text=e.text),t.removeAttribute(v.expando)}function Mt(e){return typeof e.getElementsByTagName!="undefined"?e.getElementsByTagName("*"):typeof e.querySelectorAll!="undefined"?e.querySelectorAll("*"):[]}function _t(e){Et.test(e.type)&&(e.defaultChecked=e.checked)}function Qt(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=Jt.length;while(i--){t=Jt[i]+n;if(t in e)return t}return r}function Gt(e,t){return e=t||e,v.css(e,"display")==="none"||!v.contains(e.ownerDocument,e)}function Yt(e,t){var n,r,i=[],s=0,o=e.length;for(;s<o;s++){n=e[s];if(!n.style)continue;i[s]=v._data(n,"olddisplay"),t?(!i[s]&&n.style.display==="none"&&(n.style.display=""),n.style.display===""&&Gt(n)&&(i[s]=v._data(n,"olddisplay",nn(n.nodeName)))):(r=Dt(n,"display"),!i[s]&&r!=="none"&&v._data(n,"olddisplay",r))}for(s=0;s<o;s++){n=e[s];if(!n.style)continue;if(!t||n.style.display==="none"||n.style.display==="")n.style.display=t?i[s]||"":"none"}return e}function Zt(e,t,n){var r=Rt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function en(e,t,n,r){var i=n===(r?"border":"content")?4:t==="width"?1:0,s=0;for(;i<4;i+=2)n==="margin"&&(s+=v.css(e,n+$t[i],!0)),r?(n==="content"&&(s-=parseFloat(Dt(e,"padding"+$t[i]))||0),n!=="margin"&&(s-=parseFloat(Dt(e,"border"+$t[i]+"Width"))||0)):(s+=parseFloat(Dt(e,"padding"+$t[i]))||0,n!=="padding"&&(s+=parseFloat(Dt(e,"border"+$t[i]+"Width"))||0));return s}function tn(e,t,n){var r=t==="width"?e.offsetWidth:e.offsetHeight,i=!0,s=v.support.boxSizing&&v.css(e,"boxSizing")==="border-box";if(r<=0||r==null){r=Dt(e,t);if(r<0||r==null)r=e.style[t];if(Ut.test(r))return r;i=s&&(v.support.boxSizingReliable||r===e.style[t]),r=parseFloat(r)||0}return r+en(e,t,n||(s?"border":"content"),i)+"px"}function nn(e){if(Wt[e])return Wt[e];var t=v("<"+e+">").appendTo(i.body),n=t.css("display");t.remove();if(n==="none"||n===""){Pt=i.body.appendChild(Pt||v.extend(i.createElement("iframe"),{frameBorder:0,width:0,height:0}));if(!Ht||!Pt.createElement)Ht=(Pt.contentWindow||Pt.contentDocument).document,Ht.write("<!doctype html><html><body>"),Ht.close();t=Ht.body.appendChild(Ht.createElement(e)),n=Dt(t,"display"),i.body.removeChild(Pt)}return Wt[e]=n,n}function fn(e,t,n,r){var i;if(v.isArray(t))v.each(t,function(t,i){n||sn.test(e)?r(e,i):fn(e+"["+(typeof i=="object"?t:"")+"]",i,n,r)});else if(!n&&v.type(t)==="object")for(i in t)fn(e+"["+i+"]",t[i],n,r);else r(e,t)}function Cn(e){return function(t,n){typeof t!="string"&&(n=t,t="*");var r,i,s,o=t.toLowerCase().split(y),u=0,a=o.length;if(v.isFunction(n))for(;u<a;u++)r=o[u],s=/^\+/.test(r),s&&(r=r.substr(1)||"*"),i=e[r]=e[r]||[],i[s?"unshift":"push"](n)}}function kn(e,n,r,i,s,o){s=s||n.dataTypes[0],o=o||{},o[s]=!0;var u,a=e[s],f=0,l=a?a.length:0,c=e===Sn;for(;f<l&&(c||!u);f++)u=a[f](n,r,i),typeof u=="string"&&(!c||o[u]?u=t:(n.dataTypes.unshift(u),u=kn(e,n,r,i,u,o)));return(c||!u)&&!o["*"]&&(u=kn(e,n,r,i,"*",o)),u}function Ln(e,n){var r,i,s=v.ajaxSettings.flatOptions||{};for(r in n)n[r]!==t&&((s[r]?e:i||(i={}))[r]=n[r]);i&&v.extend(!0,e,i)}function An(e,n,r){var i,s,o,u,a=e.contents,f=e.dataTypes,l=e.responseFields;for(s in l)s in r&&(n[l[s]]=r[s]);while(f[0]==="*")f.shift(),i===t&&(i=e.mimeType||n.getResponseHeader("content-type"));if(i)for(s in a)if(a[s]&&a[s].test(i)){f.unshift(s);break}if(f[0]in r)o=f[0];else{for(s in r){if(!f[0]||e.converters[s+" "+f[0]]){o=s;break}u||(u=s)}o=o||u}if(o)return o!==f[0]&&f.unshift(o),r[o]}function On(e,t){var n,r,i,s,o=e.dataTypes.slice(),u=o[0],a={},f=0;e.dataFilter&&(t=e.dataFilter(t,e.dataType));if(o[1])for(n in e.converters)a[n.toLowerCase()]=e.converters[n];for(;i=o[++f];)if(i!=="*"){if(u!=="*"&&u!==i){n=a[u+" "+i]||a["* "+i];if(!n)for(r in a){s=r.split(" ");if(s[1]===i){n=a[u+" "+s[0]]||a["* "+s[0]];if(n){n===!0?n=a[r]:a[r]!==!0&&(i=s[0],o.splice(f--,0,i));break}}}if(n!==!0)if(n&&e["throws"])t=n(t);else try{t=n(t)}catch(l){return{state:"parsererror",error:n?l:"No conversion from "+u+" to "+i}}}u=i}return{state:"success",data:t}}function Fn(){try{return new e.XMLHttpRequest}catch(t){}}function In(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}function $n(){return setTimeout(function(){qn=t},0),qn=v.now()}function Jn(e,t){v.each(t,function(t,n){var r=(Vn[t]||[]).concat(Vn["*"]),i=0,s=r.length;for(;i<s;i++)if(r[i].call(e,t,n))return})}function Kn(e,t,n){var r,i=0,s=0,o=Xn.length,u=v.Deferred().always(function(){delete a.elem}),a=function(){var t=qn||$n(),n=Math.max(0,f.startTime+f.duration-t),r=n/f.duration||0,i=1-r,s=0,o=f.tweens.length;for(;s<o;s++)f.tweens[s].run(i);return u.notifyWith(e,[f,i,n]),i<1&&o?n:(u.resolveWith(e,[f]),!1)},f=u.promise({elem:e,props:v.extend({},t),opts:v.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:qn||$n(),duration:n.duration,tweens:[],createTween:function(t,n,r){var i=v.Tween(e,f.opts,t,n,f.opts.specialEasing[t]||f.opts.easing);return f.tweens.push(i),i},stop:function(t){var n=0,r=t?f.tweens.length:0;for(;n<r;n++)f.tweens[n].run(1);return t?u.resolveWith(e,[f,t]):u.rejectWith(e,[f,t]),this}}),l=f.props;Qn(l,f.opts.specialEasing);for(;i<o;i++){r=Xn[i].call(f,e,l,f.opts);if(r)return r}return Jn(f,l),v.isFunction(f.opts.start)&&f.opts.start.call(e,f),v.fx.timer(v.extend(a,{anim:f,queue:f.opts.queue,elem:e})),f.progress(f.opts.progress).done(f.opts.done,f.opts.complete).fail(f.opts.fail).always(f.opts.always)}function Qn(e,t){var n,r,i,s,o;for(n in e){r=v.camelCase(n),i=t[r],s=e[n],v.isArray(s)&&(i=s[1],s=e[n]=s[0]),n!==r&&(e[r]=s,delete e[n]),o=v.cssHooks[r];if(o&&"expand"in o){s=o.expand(s),delete e[r];for(n in s)n in e||(e[n]=s[n],t[n]=i)}else t[r]=i}}function Gn(e,t,n){var r,i,s,o,u,a,f,l,c,h=this,p=e.style,d={},m=[],g=e.nodeType&&Gt(e);n.queue||(l=v._queueHooks(e,"fx"),l.unqueued==null&&(l.unqueued=0,c=l.empty.fire,l.empty.fire=function(){l.unqueued||c()}),l.unqueued++,h.always(function(){h.always(function(){l.unqueued--,v.queue(e,"fx").length||l.empty.fire()})})),e.nodeType===1&&("height"in t||"width"in t)&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],v.css(e,"display")==="inline"&&v.css(e,"float")==="none"&&(!v.support.inlineBlockNeedsLayout||nn(e.nodeName)==="inline"?p.display="inline-block":p.zoom=1)),n.overflow&&(p.overflow="hidden",v.support.shrinkWrapBlocks||h.done(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}));for(r in t){s=t[r];if(Un.exec(s)){delete t[r],a=a||s==="toggle";if(s===(g?"hide":"show"))continue;m.push(r)}}o=m.length;if(o){u=v._data(e,"fxshow")||v._data(e,"fxshow",{}),"hidden"in u&&(g=u.hidden),a&&(u.hidden=!g),g?v(e).show():h.done(function(){v(e).hide()}),h.done(function(){var t;v.removeData(e,"fxshow",!0);for(t in d)v.style(e,t,d[t])});for(r=0;r<o;r++)i=m[r],f=h.createTween(i,g?u[i]:0),d[i]=u[i]||v.style(e,i),i in u||(u[i]=f.start,g&&(f.end=f.start,f.start=i==="width"||i==="height"?1:0))}}function Yn(e,t,n,r,i){return new Yn.prototype.init(e,t,n,r,i)}function Zn(e,t){var n,r={height:e},i=0;t=t?1:0;for(;i<4;i+=2-t)n=$t[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}function tr(e){return v.isWindow(e)?e:e.nodeType===9?e.defaultView||e.parentWindow:!1}var n,r,i=e.document,s=e.location,o=e.navigator,u=e.jQuery,a=e.$,f=Array.prototype.push,l=Array.prototype.slice,c=Array.prototype.indexOf,h=Object.prototype.toString,p=Object.prototype.hasOwnProperty,d=String.prototype.trim,v=function(e,t){return new v.fn.init(e,t,n)},m=/[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source,g=/\S/,y=/\s+/,b=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,w=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,E=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,S=/^[\],:{}\s]*$/,x=/(?:^|:|,)(?:\s*\[)+/g,T=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,N=/"[^"\\\r\n]*"|true|false|null|-?(?:\d\d*\.|)\d+(?:[eE][\-+]?\d+|)/g,C=/^-ms-/,k=/-([\da-z])/gi,L=function(e,t){return(t+"").toUpperCase()},A=function(){i.addEventListener?(i.removeEventListener("DOMContentLoaded",A,!1),v.ready()):i.readyState==="complete"&&(i.detachEvent("onreadystatechange",A),v.ready())},O={};v.fn=v.prototype={constructor:v,init:function(e,n,r){var s,o,u,a;if(!e)return this;if(e.nodeType)return this.context=this[0]=e,this.length=1,this;if(typeof e=="string"){e.charAt(0)==="<"&&e.charAt(e.length-1)===">"&&e.length>=3?s=[null,e,null]:s=w.exec(e);if(s&&(s[1]||!n)){if(s[1])return n=n instanceof v?n[0]:n,a=n&&n.nodeType?n.ownerDocument||n:i,e=v.parseHTML(s[1],a,!0),E.test(s[1])&&v.isPlainObject(n)&&this.attr.call(e,n,!0),v.merge(this,e);o=i.getElementById(s[2]);if(o&&o.parentNode){if(o.id!==s[2])return r.find(e);this.length=1,this[0]=o}return this.context=i,this.selector=e,this}return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e)}return v.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),v.makeArray(e,this))},selector:"",jquery:"1.8.3",length:0,size:function(){return this.length},toArray:function(){return l.call(this)},get:function(e){return e==null?this.toArray():e<0?this[this.length+e]:this[e]},pushStack:function(e,t,n){var r=v.merge(this.constructor(),e);return r.prevObject=this,r.context=this.context,t==="find"?r.selector=this.selector+(this.selector?" ":"")+n:t&&(r.selector=this.selector+"."+t+"("+n+")"),r},each:function(e,t){return v.each(this,e,t)},ready:function(e){return v.ready.promise().done(e),this},eq:function(e){return e=+e,e===-1?this.slice(e):this.slice(e,e+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(l.apply(this,arguments),"slice",l.call(arguments).join(","))},map:function(e){return this.pushStack(v.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:[].sort,splice:[].splice},v.fn.init.prototype=v.fn,v.extend=v.fn.extend=function(){var e,n,r,i,s,o,u=arguments[0]||{},a=1,f=arguments.length,l=!1;typeof u=="boolean"&&(l=u,u=arguments[1]||{},a=2),typeof u!="object"&&!v.isFunction(u)&&(u={}),f===a&&(u=this,--a);for(;a<f;a++)if((e=arguments[a])!=null)for(n in e){r=u[n],i=e[n];if(u===i)continue;l&&i&&(v.isPlainObject(i)||(s=v.isArray(i)))?(s?(s=!1,o=r&&v.isArray(r)?r:[]):o=r&&v.isPlainObject(r)?r:{},u[n]=v.extend(l,o,i)):i!==t&&(u[n]=i)}return u},v.extend({noConflict:function(t){return e.$===v&&(e.$=a),t&&e.jQuery===v&&(e.jQuery=u),v},isReady:!1,readyWait:1,holdReady:function(e){e?v.readyWait++:v.ready(!0)},ready:function(e){if(e===!0?--v.readyWait:v.isReady)return;if(!i.body)return setTimeout(v.ready,1);v.isReady=!0;if(e!==!0&&--v.readyWait>0)return;r.resolveWith(i,[v]),v.fn.trigger&&v(i).trigger("ready").off("ready")},isFunction:function(e){return v.type(e)==="function"},isArray:Array.isArray||function(e){return v.type(e)==="array"},isWindow:function(e){return e!=null&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return e==null?String(e):O[h.call(e)]||"object"},isPlainObject:function(e){if(!e||v.type(e)!=="object"||e.nodeType||v.isWindow(e))return!1;try{if(e.constructor&&!p.call(e,"constructor")&&!p.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}var r;for(r in e);return r===t||p.call(e,r)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw new Error(e)},parseHTML:function(e,t,n){var r;return!e||typeof e!="string"?null:(typeof t=="boolean"&&(n=t,t=0),t=t||i,(r=E.exec(e))?[t.createElement(r[1])]:(r=v.buildFragment([e],t,n?null:[]),v.merge([],(r.cacheable?v.clone(r.fragment):r.fragment).childNodes)))},parseJSON:function(t){if(!t||typeof t!="string")return null;t=v.trim(t);if(e.JSON&&e.JSON.parse)return e.JSON.parse(t);if(S.test(t.replace(T,"@").replace(N,"]").replace(x,"")))return(new Function("return "+t))();v.error("Invalid JSON: "+t)},parseXML:function(n){var r,i;if(!n||typeof n!="string")return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(s){r=t}return(!r||!r.documentElement||r.getElementsByTagName("parsererror").length)&&v.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&g.test(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(C,"ms-").replace(k,L)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,n,r){var i,s=0,o=e.length,u=o===t||v.isFunction(e);if(r){if(u){for(i in e)if(n.apply(e[i],r)===!1)break}else for(;s<o;)if(n.apply(e[s++],r)===!1)break}else if(u){for(i in e)if(n.call(e[i],i,e[i])===!1)break}else for(;s<o;)if(n.call(e[s],s,e[s++])===!1)break;return e},trim:d&&!d.call("\ufeff\u00a0")?function(e){return e==null?"":d.call(e)}:function(e){return e==null?"":(e+"").replace(b,"")},makeArray:function(e,t){var n,r=t||[];return e!=null&&(n=v.type(e),e.length==null||n==="string"||n==="function"||n==="regexp"||v.isWindow(e)?f.call(r,e):v.merge(r,e)),r},inArray:function(e,t,n){var r;if(t){if(c)return c.call(t,e,n);r=t.length,n=n?n<0?Math.max(0,r+n):n:0;for(;n<r;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,s=0;if(typeof r=="number")for(;s<r;s++)e[i++]=n[s];else while(n[s]!==t)e[i++]=n[s++];return e.length=i,e},grep:function(e,t,n){var r,i=[],s=0,o=e.length;n=!!n;for(;s<o;s++)r=!!t(e[s],s),n!==r&&i.push(e[s]);return i},map:function(e,n,r){var i,s,o=[],u=0,a=e.length,f=e instanceof v||a!==t&&typeof a=="number"&&(a>0&&e[0]&&e[a-1]||a===0||v.isArray(e));if(f)for(;u<a;u++)i=n(e[u],u,r),i!=null&&(o[o.length]=i);else for(s in e)i=n(e[s],s,r),i!=null&&(o[o.length]=i);return o.concat.apply([],o)},guid:1,proxy:function(e,n){var r,i,s;return typeof n=="string"&&(r=e[n],n=e,e=r),v.isFunction(e)?(i=l.call(arguments,2),s=function(){return e.apply(n,i.concat(l.call(arguments)))},s.guid=e.guid=e.guid||v.guid++,s):t},access:function(e,n,r,i,s,o,u){var a,f=r==null,l=0,c=e.length;if(r&&typeof r=="object"){for(l in r)v.access(e,n,l,r[l],1,o,i);s=1}else if(i!==t){a=u===t&&v.isFunction(i),f&&(a?(a=n,n=function(e,t,n){return a.call(v(e),n)}):(n.call(e,i),n=null));if(n)for(;l<c;l++)n(e[l],r,a?i.call(e[l],l,n(e[l],r)):i,u);s=1}return s?e:f?n.call(e):c?n(e[0],r):o},now:function(){return(new Date).getTime()}}),v.ready.promise=function(t){if(!r){r=v.Deferred();if(i.readyState==="complete")setTimeout(v.ready,1);else if(i.addEventListener)i.addEventListener("DOMContentLoaded",A,!1),e.addEventListener("load",v.ready,!1);else{i.attachEvent("onreadystatechange",A),e.attachEvent("onload",v.ready);var n=!1;try{n=e.frameElement==null&&i.documentElement}catch(s){}n&&n.doScroll&&function o(){if(!v.isReady){try{n.doScroll("left")}catch(e){return setTimeout(o,50)}v.ready()}}()}}return r.promise(t)},v.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(e,t){O["[object "+t+"]"]=t.toLowerCase()}),n=v(i);var M={};v.Callbacks=function(e){e=typeof e=="string"?M[e]||_(e):v.extend({},e);var n,r,i,s,o,u,a=[],f=!e.once&&[],l=function(t){n=e.memory&&t,r=!0,u=s||0,s=0,o=a.length,i=!0;for(;a&&u<o;u++)if(a[u].apply(t[0],t[1])===!1&&e.stopOnFalse){n=!1;break}i=!1,a&&(f?f.length&&l(f.shift()):n?a=[]:c.disable())},c={add:function(){if(a){var t=a.length;(function r(t){v.each(t,function(t,n){var i=v.type(n);i==="function"?(!e.unique||!c.has(n))&&a.push(n):n&&n.length&&i!=="string"&&r(n)})})(arguments),i?o=a.length:n&&(s=t,l(n))}return this},remove:function(){return a&&v.each(arguments,function(e,t){var n;while((n=v.inArray(t,a,n))>-1)a.splice(n,1),i&&(n<=o&&o--,n<=u&&u--)}),this},has:function(e){return v.inArray(e,a)>-1},empty:function(){return a=[],this},disable:function(){return a=f=n=t,this},disabled:function(){return!a},lock:function(){return f=t,n||c.disable(),this},locked:function(){return!f},fireWith:function(e,t){return t=t||[],t=[e,t.slice?t.slice():t],a&&(!r||f)&&(i?f.push(t):l(t)),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},v.extend({Deferred:function(e){var t=[["resolve","done",v.Callbacks("once memory"),"resolved"],["reject","fail",v.Callbacks("once memory"),"rejected"],["notify","progress",v.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return v.Deferred(function(n){v.each(t,function(t,r){var s=r[0],o=e[t];i[r[1]](v.isFunction(o)?function(){var e=o.apply(this,arguments);e&&v.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[s+"With"](this===i?n:this,[e])}:n[s])}),e=null}).promise()},promise:function(e){return e!=null?v.extend(e,r):r}},i={};return r.pipe=r.then,v.each(t,function(e,s){var o=s[2],u=s[3];r[s[1]]=o.add,u&&o.add(function(){n=u},t[e^1][2].disable,t[2][2].lock),i[s[0]]=o.fire,i[s[0]+"With"]=o.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=l.call(arguments),r=n.length,i=r!==1||e&&v.isFunction(e.promise)?r:0,s=i===1?e:v.Deferred(),o=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?l.call(arguments):r,n===u?s.notifyWith(t,n):--i||s.resolveWith(t,n)}},u,a,f;if(r>1){u=new Array(r),a=new Array(r),f=new Array(r);for(;t<r;t++)n[t]&&v.isFunction(n[t].promise)?n[t].promise().done(o(t,f,n)).fail(s.reject).progress(o(t,a,u)):--i}return i||s.resolveWith(f,n),s.promise()}}),v.support=function(){var t,n,r,s,o,u,a,f,l,c,h,p=i.createElement("div");p.setAttribute("className","t"),p.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",n=p.getElementsByTagName("*"),r=p.getElementsByTagName("a")[0];if(!n||!r||!n.length)return{};s=i.createElement("select"),o=s.appendChild(i.createElement("option")),u=p.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t={leadingWhitespace:p.firstChild.nodeType===3,tbody:!p.getElementsByTagName("tbody").length,htmlSerialize:!!p.getElementsByTagName("link").length,style:/top/.test(r.getAttribute("style")),hrefNormalized:r.getAttribute("href")==="/a",opacity:/^0.5/.test(r.style.opacity),cssFloat:!!r.style.cssFloat,checkOn:u.value==="on",optSelected:o.selected,getSetAttribute:p.className!=="t",enctype:!!i.createElement("form").enctype,html5Clone:i.createElement("nav").cloneNode(!0).outerHTML!=="<:nav></:nav>",boxModel:i.compatMode==="CSS1Compat",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},u.checked=!0,t.noCloneChecked=u.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!o.disabled;try{delete p.test}catch(d){t.deleteExpando=!1}!p.addEventListener&&p.attachEvent&&p.fireEvent&&(p.attachEvent("onclick",h=function(){t.noCloneEvent=!1}),p.cloneNode(!0).fireEvent("onclick"),p.detachEvent("onclick",h)),u=i.createElement("input"),u.value="t",u.setAttribute("type","radio"),t.radioValue=u.value==="t",u.setAttribute("checked","checked"),u.setAttribute("name","t"),p.appendChild(u),a=i.createDocumentFragment(),a.appendChild(p.lastChild),t.checkClone=a.cloneNode(!0).cloneNode(!0).lastChild.checked,t.appendChecked=u.checked,a.removeChild(u),a.appendChild(p);if(p.attachEvent)for(l in{submit:!0,change:!0,focusin:!0})f="on"+l,c=f in p,c||(p.setAttribute(f,"return;"),c=typeof p[f]=="function"),t[l+"Bubbles"]=c;return v(function(){var n,r,s,o,u="padding:0;margin:0;border:0;display:block;overflow:hidden;",a=i.getElementsByTagName("body")[0];if(!a)return;n=i.createElement("div"),n.style.cssText="visibility:hidden;border:0;width:0;height:0;position:static;top:0;margin-top:1px",a.insertBefore(n,a.firstChild),r=i.createElement("div"),n.appendChild(r),r.innerHTML="<table><tr><td></td><td>t</td></tr></table>",s=r.getElementsByTagName("td"),s[0].style.cssText="padding:0;margin:0;border:0;display:none",c=s[0].offsetHeight===0,s[0].style.display="",s[1].style.display="none",t.reliableHiddenOffsets=c&&s[0].offsetHeight===0,r.innerHTML="",r.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",t.boxSizing=r.offsetWidth===4,t.doesNotIncludeMarginInBodyOffset=a.offsetTop!==1,e.getComputedStyle&&(t.pixelPosition=(e.getComputedStyle(r,null)||{}).top!=="1%",t.boxSizingReliable=(e.getComputedStyle(r,null)||{width:"4px"}).width==="4px",o=i.createElement("div"),o.style.cssText=r.style.cssText=u,o.style.marginRight=o.style.width="0",r.style.width="1px",r.appendChild(o),t.reliableMarginRight=!parseFloat((e.getComputedStyle(o,null)||{}).marginRight)),typeof r.style.zoom!="undefined"&&(r.innerHTML="",r.style.cssText=u+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=r.offsetWidth===3,r.style.display="block",r.style.overflow="visible",r.innerHTML="<div></div>",r.firstChild.style.width="5px",t.shrinkWrapBlocks=r.offsetWidth!==3,n.style.zoom=1),a.removeChild(n),n=r=s=o=null}),a.removeChild(p),n=r=s=o=u=a=p=null,t}();var D=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,P=/([A-Z])/g;v.extend({cache:{},deletedIds:[],uuid:0,expando:"jQuery"+(v.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){return e=e.nodeType?v.cache[e[v.expando]]:e[v.expando],!!e&&!B(e)},data:function(e,n,r,i){if(!v.acceptData(e))return;var s,o,u=v.expando,a=typeof n=="string",f=e.nodeType,l=f?v.cache:e,c=f?e[u]:e[u]&&u;if((!c||!l[c]||!i&&!l[c].data)&&a&&r===t)return;c||(f?e[u]=c=v.deletedIds.pop()||v.guid++:c=u),l[c]||(l[c]={},f||(l[c].toJSON=v.noop));if(typeof n=="object"||typeof n=="function")i?l[c]=v.extend(l[c],n):l[c].data=v.extend(l[c].data,n);return s=l[c],i||(s.data||(s.data={}),s=s.data),r!==t&&(s[v.camelCase(n)]=r),a?(o=s[n],o==null&&(o=s[v.camelCase(n)])):o=s,o},removeData:function(e,t,n){if(!v.acceptData(e))return;var r,i,s,o=e.nodeType,u=o?v.cache:e,a=o?e[v.expando]:v.expando;if(!u[a])return;if(t){r=n?u[a]:u[a].data;if(r){v.isArray(t)||(t in r?t=[t]:(t=v.camelCase(t),t in r?t=[t]:t=t.split(" ")));for(i=0,s=t.length;i<s;i++)delete r[t[i]];if(!(n?B:v.isEmptyObject)(r))return}}if(!n){delete u[a].data;if(!B(u[a]))return}o?v.cleanData([e],!0):v.support.deleteExpando||u!=u.window?delete u[a]:u[a]=null},_data:function(e,t,n){return v.data(e,t,n,!0)},acceptData:function(e){var t=e.nodeName&&v.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),v.fn.extend({data:function(e,n){var r,i,s,o,u,a=this[0],f=0,l=null;if(e===t){if(this.length){l=v.data(a);if(a.nodeType===1&&!v._data(a,"parsedAttrs")){s=a.attributes;for(u=s.length;f<u;f++)o=s[f].name,o.indexOf("data-")||(o=v.camelCase(o.substring(5)),H(a,o,l[o]));v._data(a,"parsedAttrs",!0)}}return l}return typeof e=="object"?this.each(function(){v.data(this,e)}):(r=e.split(".",2),r[1]=r[1]?"."+r[1]:"",i=r[1]+"!",v.access(this,function(n){if(n===t)return l=this.triggerHandler("getData"+i,[r[0]]),l===t&&a&&(l=v.data(a,e),l=H(a,e,l)),l===t&&r[1]?this.data(r[0]):l;r[1]=n,this.each(function(){var t=v(this);t.triggerHandler("setData"+i,r),v.data(this,e,n),t.triggerHandler("changeData"+i,r)})},null,n,arguments.length>1,null,!1))},removeData:function(e){return this.each(function(){v.removeData(this,e)})}}),v.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=v._data(e,t),n&&(!r||v.isArray(n)?r=v._data(e,t,v.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=v.queue(e,t),r=n.length,i=n.shift(),s=v._queueHooks(e,t),o=function(){v.dequeue(e,t)};i==="inprogress"&&(i=n.shift(),r--),i&&(t==="fx"&&n.unshift("inprogress"),delete s.stop,i.call(e,o,s)),!r&&s&&s.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return v._data(e,n)||v._data(e,n,{empty:v.Callbacks("once memory").add(function(){v.removeData(e,t+"queue",!0),v.removeData(e,n,!0)})})}}),v.fn.extend({queue:function(e,n){var r=2;return typeof e!="string"&&(n=e,e="fx",r--),arguments.length<r?v.queue(this[0],e):n===t?this:this.each(function(){var t=v.queue(this,e,n);v._queueHooks(this,e),e==="fx"&&t[0]!=="inprogress"&&v.dequeue(this,e)})},dequeue:function(e){return this.each(function(){v.dequeue(this,e)})},delay:function(e,t){return e=v.fx?v.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,s=v.Deferred(),o=this,u=this.length,a=function(){--i||s.resolveWith(o,[o])};typeof e!="string"&&(n=e,e=t),e=e||"fx";while(u--)r=v._data(o[u],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(a));return a(),s.promise(n)}});var j,F,I,q=/[\t\r\n]/g,R=/\r/g,U=/^(?:button|input)$/i,z=/^(?:button|input|object|select|textarea)$/i,W=/^a(?:rea|)$/i,X=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,V=v.support.getSetAttribute;v.fn.extend({attr:function(e,t){return v.access(this,v.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){v.removeAttr(this,e)})},prop:function(e,t){return v.access(this,v.prop,e,t,arguments.length>1)},removeProp:function(e){return e=v.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,s,o,u;if(v.isFunction(e))return this.each(function(t){v(this).addClass(e.call(this,t,this.className))});if(e&&typeof e=="string"){t=e.split(y);for(n=0,r=this.length;n<r;n++){i=this[n];if(i.nodeType===1)if(!i.className&&t.length===1)i.className=e;else{s=" "+i.className+" ";for(o=0,u=t.length;o<u;o++)s.indexOf(" "+t[o]+" ")<0&&(s+=t[o]+" ");i.className=v.trim(s)}}}return this},removeClass:function(e){var n,r,i,s,o,u,a;if(v.isFunction(e))return this.each(function(t){v(this).removeClass(e.call(this,t,this.className))});if(e&&typeof e=="string"||e===t){n=(e||"").split(y);for(u=0,a=this.length;u<a;u++){i=this[u];if(i.nodeType===1&&i.className){r=(" "+i.className+" ").replace(q," ");for(s=0,o=n.length;s<o;s++)while(r.indexOf(" "+n[s]+" ")>=0)r=r.replace(" "+n[s]+" "," ");i.className=e?v.trim(r):""}}}return this},toggleClass:function(e,t){var n=typeof e,r=typeof t=="boolean";return v.isFunction(e)?this.each(function(n){v(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if(n==="string"){var i,s=0,o=v(this),u=t,a=e.split(y);while(i=a[s++])u=r?u:!o.hasClass(i),o[u?"addClass":"removeClass"](i)}else if(n==="undefined"||n==="boolean")this.className&&v._data(this,"__className__",this.className),this.className=this.className||e===!1?"":v._data(this,"__className__")||""})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;n<r;n++)if(this[n].nodeType===1&&(" "+this[n].className+" ").replace(q," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,r,i,s=this[0];if(!arguments.length){if(s)return n=v.valHooks[s.type]||v.valHooks[s.nodeName.toLowerCase()],n&&"get"in n&&(r=n.get(s,"value"))!==t?r:(r=s.value,typeof r=="string"?r.replace(R,""):r==null?"":r);return}return i=v.isFunction(e),this.each(function(r){var s,o=v(this);if(this.nodeType!==1)return;i?s=e.call(this,r,o.val()):s=e,s==null?s="":typeof s=="number"?s+="":v.isArray(s)&&(s=v.map(s,function(e){return e==null?"":e+""})),n=v.valHooks[this.type]||v.valHooks[this.nodeName.toLowerCase()];if(!n||!("set"in n)||n.set(this,s,"value")===t)this.value=s})}}),v.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,s=e.type==="select-one"||i<0,o=s?null:[],u=s?i+1:r.length,a=i<0?u:s?i:0;for(;a<u;a++){n=r[a];if((n.selected||a===i)&&(v.support.optDisabled?!n.disabled:n.getAttribute("disabled")===null)&&(!n.parentNode.disabled||!v.nodeName(n.parentNode,"optgroup"))){t=v(n).val();if(s)return t;o.push(t)}}return o},set:function(e,t){var n=v.makeArray(t);return v(e).find("option").each(function(){this.selected=v.inArray(v(this).val(),n)>=0}),n.length||(e.selectedIndex=-1),n}}},attrFn:{},attr:function(e,n,r,i){var s,o,u,a=e.nodeType;if(!e||a===3||a===8||a===2)return;if(i&&v.isFunction(v.fn[n]))return v(e)[n](r);if(typeof e.getAttribute=="undefined")return v.prop(e,n,r);u=a!==1||!v.isXMLDoc(e),u&&(n=n.toLowerCase(),o=v.attrHooks[n]||(X.test(n)?F:j));if(r!==t){if(r===null){v.removeAttr(e,n);return}return o&&"set"in o&&u&&(s=o.set(e,r,n))!==t?s:(e.setAttribute(n,r+""),r)}return o&&"get"in o&&u&&(s=o.get(e,n))!==null?s:(s=e.getAttribute(n),s===null?t:s)},removeAttr:function(e,t){var n,r,i,s,o=0;if(t&&e.nodeType===1){r=t.split(y);for(;o<r.length;o++)i=r[o],i&&(n=v.propFix[i]||i,s=X.test(i),s||v.attr(e,i,""),e.removeAttribute(V?i:n),s&&n in e&&(e[n]=!1))}},attrHooks:{type:{set:function(e,t){if(U.test(e.nodeName)&&e.parentNode)v.error("type property can't be changed");else if(!v.support.radioValue&&t==="radio"&&v.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}},value:{get:function(e,t){return j&&v.nodeName(e,"button")?j.get(e,t):t in e?e.value:null},set:function(e,t,n){if(j&&v.nodeName(e,"button"))return j.set(e,t,n);e.value=t}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(e,n,r){var i,s,o,u=e.nodeType;if(!e||u===3||u===8||u===2)return;return o=u!==1||!v.isXMLDoc(e),o&&(n=v.propFix[n]||n,s=v.propHooks[n]),r!==t?s&&"set"in s&&(i=s.set(e,r,n))!==t?i:e[n]=r:s&&"get"in s&&(i=s.get(e,n))!==null?i:e[n]},propHooks:{tabIndex:{get:function(e){var n=e.getAttributeNode("tabindex");return n&&n.specified?parseInt(n.value,10):z.test(e.nodeName)||W.test(e.nodeName)&&e.href?0:t}}}}),F={get:function(e,n){var r,i=v.prop(e,n);return i===!0||typeof i!="boolean"&&(r=e.getAttributeNode(n))&&r.nodeValue!==!1?n.toLowerCase():t},set:function(e,t,n){var r;return t===!1?v.removeAttr(e,n):(r=v.propFix[n]||n,r in e&&(e[r]=!0),e.setAttribute(n,n.toLowerCase())),n}},V||(I={name:!0,id:!0,coords:!0},j=v.valHooks.button={get:function(e,n){var r;return r=e.getAttributeNode(n),r&&(I[n]?r.value!=="":r.specified)?r.value:t},set:function(e,t,n){var r=e.getAttributeNode(n);return r||(r=i.createAttribute(n),e.setAttributeNode(r)),r.value=t+""}},v.each(["width","height"],function(e,t){v.attrHooks[t]=v.extend(v.attrHooks[t],{set:function(e,n){if(n==="")return e.setAttribute(t,"auto"),n}})}),v.attrHooks.contenteditable={get:j.get,set:function(e,t,n){t===""&&(t="false"),j.set(e,t,n)}}),v.support.hrefNormalized||v.each(["href","src","width","height"],function(e,n){v.attrHooks[n]=v.extend(v.attrHooks[n],{get:function(e){var r=e.getAttribute(n,2);return r===null?t:r}})}),v.support.style||(v.attrHooks.style={get:function(e){return e.style.cssText.toLowerCase()||t},set:function(e,t){return e.style.cssText=t+""}}),v.support.optSelected||(v.propHooks.selected=v.extend(v.propHooks.selected,{get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}})),v.support.enctype||(v.propFix.enctype="encoding"),v.support.checkOn||v.each(["radio","checkbox"],function(){v.valHooks[this]={get:function(e){return e.getAttribute("value")===null?"on":e.value}}}),v.each(["radio","checkbox"],function(){v.valHooks[this]=v.extend(v.valHooks[this],{set:function(e,t){if(v.isArray(t))return e.checked=v.inArray(v(e).val(),t)>=0}})});var $=/^(?:textarea|input|select)$/i,J=/^([^\.]*|)(?:\.(.+)|)$/,K=/(?:^|\s)hover(\.\S+|)\b/,Q=/^key/,G=/^(?:mouse|contextmenu)|click/,Y=/^(?:focusinfocus|focusoutblur)$/,Z=function(e){return v.event.special.hover?e:e.replace(K,"mouseenter$1 mouseleave$1")};v.event={add:function(e,n,r,i,s){var o,u,a,f,l,c,h,p,d,m,g;if(e.nodeType===3||e.nodeType===8||!n||!r||!(o=v._data(e)))return;r.handler&&(d=r,r=d.handler,s=d.selector),r.guid||(r.guid=v.guid++),a=o.events,a||(o.events=a={}),u=o.handle,u||(o.handle=u=function(e){return typeof v=="undefined"||!!e&&v.event.triggered===e.type?t:v.event.dispatch.apply(u.elem,arguments)},u.elem=e),n=v.trim(Z(n)).split(" ");for(f=0;f<n.length;f++){l=J.exec(n[f])||[],c=l[1],h=(l[2]||"").split(".").sort(),g=v.event.special[c]||{},c=(s?g.delegateType:g.bindType)||c,g=v.event.special[c]||{},p=v.extend({type:c,origType:l[1],data:i,handler:r,guid:r.guid,selector:s,needsContext:s&&v.expr.match.needsContext.test(s),namespace:h.join(".")},d),m=a[c];if(!m){m=a[c]=[],m.delegateCount=0;if(!g.setup||g.setup.call(e,i,h,u)===!1)e.addEventListener?e.addEventListener(c,u,!1):e.attachEvent&&e.attachEvent("on"+c,u)}g.add&&(g.add.call(e,p),p.handler.guid||(p.handler.guid=r.guid)),s?m.splice(m.delegateCount++,0,p):m.push(p),v.event.global[c]=!0}e=null},global:{},remove:function(e,t,n,r,i){var s,o,u,a,f,l,c,h,p,d,m,g=v.hasData(e)&&v._data(e);if(!g||!(h=g.events))return;t=v.trim(Z(t||"")).split(" ");for(s=0;s<t.length;s++){o=J.exec(t[s])||[],u=a=o[1],f=o[2];if(!u){for(u in h)v.event.remove(e,u+t[s],n,r,!0);continue}p=v.event.special[u]||{},u=(r?p.delegateType:p.bindType)||u,d=h[u]||[],l=d.length,f=f?new RegExp("(^|\\.)"+f.split(".").sort().join("\\.(?:.*\\.|)")+"(\\.|$)"):null;for(c=0;c<d.length;c++)m=d[c],(i||a===m.origType)&&(!n||n.guid===m.guid)&&(!f||f.test(m.namespace))&&(!r||r===m.selector||r==="**"&&m.selector)&&(d.splice(c--,1),m.selector&&d.delegateCount--,p.remove&&p.remove.call(e,m));d.length===0&&l!==d.length&&((!p.teardown||p.teardown.call(e,f,g.handle)===!1)&&v.removeEvent(e,u,g.handle),delete h[u])}v.isEmptyObject(h)&&(delete g.handle,v.removeData(e,"events",!0))},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(n,r,s,o){if(!s||s.nodeType!==3&&s.nodeType!==8){var u,a,f,l,c,h,p,d,m,g,y=n.type||n,b=[];if(Y.test(y+v.event.triggered))return;y.indexOf("!")>=0&&(y=y.slice(0,-1),a=!0),y.indexOf(".")>=0&&(b=y.split("."),y=b.shift(),b.sort());if((!s||v.event.customEvent[y])&&!v.event.global[y])return;n=typeof n=="object"?n[v.expando]?n:new v.Event(y,n):new v.Event(y),n.type=y,n.isTrigger=!0,n.exclusive=a,n.namespace=b.join("."),n.namespace_re=n.namespace?new RegExp("(^|\\.)"+b.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,h=y.indexOf(":")<0?"on"+y:"";if(!s){u=v.cache;for(f in u)u[f].events&&u[f].events[y]&&v.event.trigger(n,r,u[f].handle.elem,!0);return}n.result=t,n.target||(n.target=s),r=r!=null?v.makeArray(r):[],r.unshift(n),p=v.event.special[y]||{};if(p.trigger&&p.trigger.apply(s,r)===!1)return;m=[[s,p.bindType||y]];if(!o&&!p.noBubble&&!v.isWindow(s)){g=p.delegateType||y,l=Y.test(g+y)?s:s.parentNode;for(c=s;l;l=l.parentNode)m.push([l,g]),c=l;c===(s.ownerDocument||i)&&m.push([c.defaultView||c.parentWindow||e,g])}for(f=0;f<m.length&&!n.isPropagationStopped();f++)l=m[f][0],n.type=m[f][1],d=(v._data(l,"events")||{})[n.type]&&v._data(l,"handle"),d&&d.apply(l,r),d=h&&l[h],d&&v.acceptData(l)&&d.apply&&d.apply(l,r)===!1&&n.preventDefault();return n.type=y,!o&&!n.isDefaultPrevented()&&(!p._default||p._default.apply(s.ownerDocument,r)===!1)&&(y!=="click"||!v.nodeName(s,"a"))&&v.acceptData(s)&&h&&s[y]&&(y!=="focus"&&y!=="blur"||n.target.offsetWidth!==0)&&!v.isWindow(s)&&(c=s[h],c&&(s[h]=null),v.event.triggered=y,s[y](),v.event.triggered=t,c&&(s[h]=c)),n.result}return},dispatch:function(n){n=v.event.fix(n||e.event);var r,i,s,o,u,a,f,c,h,p,d=(v._data(this,"events")||{})[n.type]||[],m=d.delegateCount,g=l.call(arguments),y=!n.exclusive&&!n.namespace,b=v.event.special[n.type]||{},w=[];g[0]=n,n.delegateTarget=this;if(b.preDispatch&&b.preDispatch.call(this,n)===!1)return;if(m&&(!n.button||n.type!=="click"))for(s=n.target;s!=this;s=s.parentNode||this)if(s.disabled!==!0||n.type!=="click"){u={},f=[];for(r=0;r<m;r++)c=d[r],h=c.selector,u[h]===t&&(u[h]=c.needsContext?v(h,this).index(s)>=0:v.find(h,this,null,[s]).length),u[h]&&f.push(c);f.length&&w.push({elem:s,matches:f})}d.length>m&&w.push({elem:this,matches:d.slice(m)});for(r=0;r<w.length&&!n.isPropagationStopped();r++){a=w[r],n.currentTarget=a.elem;for(i=0;i<a.matches.length&&!n.isImmediatePropagationStopped();i++){c=a.matches[i];if(y||!n.namespace&&!c.namespace||n.namespace_re&&n.namespace_re.test(c.namespace))n.data=c.data,n.handleObj=c,o=((v.event.special[c.origType]||{}).handle||c.handler).apply(a.elem,g),o!==t&&(n.result=o,o===!1&&(n.preventDefault(),n.stopPropagation()))}}return b.postDispatch&&b.postDispatch.call(this,n),n.result},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return e.which==null&&(e.which=t.charCode!=null?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,s,o,u=n.button,a=n.fromElement;return e.pageX==null&&n.clientX!=null&&(r=e.target.ownerDocument||i,s=r.documentElement,o=r.body,e.pageX=n.clientX+(s&&s.scrollLeft||o&&o.scrollLeft||0)-(s&&s.clientLeft||o&&o.clientLeft||0),e.pageY=n.clientY+(s&&s.scrollTop||o&&o.scrollTop||0)-(s&&s.clientTop||o&&o.clientTop||0)),!e.relatedTarget&&a&&(e.relatedTarget=a===e.target?n.toElement:a),!e.which&&u!==t&&(e.which=u&1?1:u&2?3:u&4?2:0),e}},fix:function(e){if(e[v.expando])return e;var t,n,r=e,s=v.event.fixHooks[e.type]||{},o=s.props?this.props.concat(s.props):this.props;e=v.Event(r);for(t=o.length;t;)n=o[--t],e[n]=r[n];return e.target||(e.target=r.srcElement||i),e.target.nodeType===3&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,s.filter?s.filter(e,r):e},special:{load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(e,t,n){v.isWindow(this)&&(this.onbeforeunload=n)},teardown:function(e,t){this.onbeforeunload===t&&(this.onbeforeunload=null)}}},simulate:function(e,t,n,r){var i=v.extend(new v.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?v.event.trigger(i,null,t):v.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},v.event.handle=v.event.dispatch,v.removeEvent=i.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachEvent&&(typeof e[r]=="undefined"&&(e[r]=null),e.detachEvent(r,n))},v.Event=function(e,t){if(!(this instanceof v.Event))return new v.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?tt:et):this.type=e,t&&v.extend(this,t),this.timeStamp=e&&e.timeStamp||v.now(),this[v.expando]=!0},v.Event.prototype={preventDefault:function(){this.isDefaultPrevented=tt;var e=this.originalEvent;if(!e)return;e.preventDefault?e.preventDefault():e.returnValue=!1},stopPropagation:function(){this.isPropagationStopped=tt;var e=this.originalEvent;if(!e)return;e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=tt,this.stopPropagation()},isDefaultPrevented:et,isPropagationStopped:et,isImmediatePropagationStopped:et},v.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){v.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,s=e.handleObj,o=s.selector;if(!i||i!==r&&!v.contains(r,i))e.type=s.origType,n=s.handler.apply(this,arguments),e.type=t;return n}}}),v.support.submitBubbles||(v.event.special.submit={setup:function(){if(v.nodeName(this,"form"))return!1;v.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=v.nodeName(n,"input")||v.nodeName(n,"button")?n.form:t;r&&!v._data(r,"_submit_attached")&&(v.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),v._data(r,"_submit_attached",!0))})},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&v.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){if(v.nodeName(this,"form"))return!1;v.event.remove(this,"._submit")}}),v.support.changeBubbles||(v.event.special.change={setup:function(){if($.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio")v.event.add(this,"propertychange._change",function(e){e.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),v.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),v.event.simulate("change",this,e,!0)});return!1}v.event.add(this,"beforeactivate._change",function(e){var t=e.target;$.test(t.nodeName)&&!v._data(t,"_change_attached")&&(v.event.add(t,"change._change",function(e){this.parentNode&&!e.isSimulated&&!e.isTrigger&&v.event.simulate("change",this.parentNode,e,!0)}),v._data(t,"_change_attached",!0))})},handle:function(e){var t=e.target;if(this!==t||e.isSimulated||e.isTrigger||t.type!=="radio"&&t.type!=="checkbox")return e.handleObj.handler.apply(this,arguments)},teardown:function(){return v.event.remove(this,"._change"),!$.test(this.nodeName)}}),v.support.focusinBubbles||v.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){v.event.simulate(t,e.target,v.event.fix(e),!0)};v.event.special[t]={setup:function(){n++===0&&i.addEventListener(e,r,!0)},teardown:function(){--n===0&&i.removeEventListener(e,r,!0)}}}),v.fn.extend({on:function(e,n,r,i,s){var o,u;if(typeof e=="object"){typeof n!="string"&&(r=r||n,n=t);for(u in e)this.on(u,n,r,e[u],s);return this}r==null&&i==null?(i=n,r=n=t):i==null&&(typeof n=="string"?(i=r,r=t):(i=r,r=n,n=t));if(i===!1)i=et;else if(!i)return this;return s===1&&(o=i,i=function(e){return v().off(e),o.apply(this,arguments)},i.guid=o.guid||(o.guid=v.guid++)),this.each(function(){v.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,s;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,v(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if(typeof e=="object"){for(s in e)this.off(s,n,e[s]);return this}if(n===!1||typeof n=="function")r=n,n=t;return r===!1&&(r=et),this.each(function(){v.event.remove(this,e,r,n)})},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},live:function(e,t,n){return v(this.context).on(e,this.selector,t,n),this},die:function(e,t){return v(this.context).off(e,this.selector||"**",t),this},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return arguments.length===1?this.off(e,"**"):this.off(t,e||"**",n)},trigger:function(e,t){return this.each(function(){v.event.trigger(e,t,this)})},triggerHandler:function(e,t){if(this[0])return v.event.trigger(e,t,this[0],!0)},toggle:function(e){var t=arguments,n=e.guid||v.guid++,r=0,i=function(n){var i=(v._data(this,"lastToggle"+e.guid)||0)%r;return v._data(this,"lastToggle"+e.guid,i+1),n.preventDefault(),t[i].apply(this,arguments)||!1};i.guid=n;while(r<t.length)t[r++].guid=n;return this.click(i)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),v.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){v.fn[t]=function(e,n){return n==null&&(n=e,e=null),arguments.length>0?this.on(t,null,e,n):this.trigger(t)},Q.test(t)&&(v.event.fixHooks[t]=v.event.keyHooks),G.test(t)&&(v.event.fixHooks[t]=v.event.mouseHooks)}),function(e,t){function nt(e,t,n,r){n=n||[],t=t||g;var i,s,a,f,l=t.nodeType;if(!e||typeof e!="string")return n;if(l!==1&&l!==9)return[];a=o(t);if(!a&&!r)if(i=R.exec(e))if(f=i[1]){if(l===9){s=t.getElementById(f);if(!s||!s.parentNode)return n;if(s.id===f)return n.push(s),n}else if(t.ownerDocument&&(s=t.ownerDocument.getElementById(f))&&u(t,s)&&s.id===f)return n.push(s),n}else{if(i[2])return S.apply(n,x.call(t.getElementsByTagName(e),0)),n;if((f=i[3])&&Z&&t.getElementsByClassName)return S.apply(n,x.call(t.getElementsByClassName(f),0)),n}return vt(e.replace(j,"$1"),t,n,r,a)}function rt(e){return function(t){var n=t.nodeName.toLowerCase();return n==="input"&&t.type===e}}function it(e){return function(t){var n=t.nodeName.toLowerCase();return(n==="input"||n==="button")&&t.type===e}}function st(e){return N(function(t){return t=+t,N(function(n,r){var i,s=e([],n.length,t),o=s.length;while(o--)n[i=s[o]]&&(n[i]=!(r[i]=n[i]))})})}function ot(e,t,n){if(e===t)return n;var r=e.nextSibling;while(r){if(r===t)return-1;r=r.nextSibling}return 1}function ut(e,t){var n,r,s,o,u,a,f,l=L[d][e+" "];if(l)return t?0:l.slice(0);u=e,a=[],f=i.preFilter;while(u){if(!n||(r=F.exec(u)))r&&(u=u.slice(r[0].length)||u),a.push(s=[]);n=!1;if(r=I.exec(u))s.push(n=new m(r.shift())),u=u.slice(n.length),n.type=r[0].replace(j," ");for(o in i.filter)(r=J[o].exec(u))&&(!f[o]||(r=f[o](r)))&&(s.push(n=new m(r.shift())),u=u.slice(n.length),n.type=o,n.matches=r);if(!n)break}return t?u.length:u?nt.error(e):L(e,a).slice(0)}function at(e,t,r){var i=t.dir,s=r&&t.dir==="parentNode",o=w++;return t.first?function(t,n,r){while(t=t[i])if(s||t.nodeType===1)return e(t,n,r)}:function(t,r,u){if(!u){var a,f=b+" "+o+" ",l=f+n;while(t=t[i])if(s||t.nodeType===1){if((a=t[d])===l)return t.sizset;if(typeof a=="string"&&a.indexOf(f)===0){if(t.sizset)return t}else{t[d]=l;if(e(t,r,u))return t.sizset=!0,t;t.sizset=!1}}}else while(t=t[i])if(s||t.nodeType===1)if(e(t,r,u))return t}}function ft(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function lt(e,t,n,r,i){var s,o=[],u=0,a=e.length,f=t!=null;for(;u<a;u++)if(s=e[u])if(!n||n(s,r,i))o.push(s),f&&t.push(u);return o}function ct(e,t,n,r,i,s){return r&&!r[d]&&(r=ct(r)),i&&!i[d]&&(i=ct(i,s)),N(function(s,o,u,a){var f,l,c,h=[],p=[],d=o.length,v=s||dt(t||"*",u.nodeType?[u]:u,[]),m=e&&(s||!t)?lt(v,h,e,u,a):v,g=n?i||(s?e:d||r)?[]:o:m;n&&n(m,g,u,a);if(r){f=lt(g,p),r(f,[],u,a),l=f.length;while(l--)if(c=f[l])g[p[l]]=!(m[p[l]]=c)}if(s){if(i||e){if(i){f=[],l=g.length;while(l--)(c=g[l])&&f.push(m[l]=c);i(null,g=[],f,a)}l=g.length;while(l--)(c=g[l])&&(f=i?T.call(s,c):h[l])>-1&&(s[f]=!(o[f]=c))}}else g=lt(g===o?g.splice(d,g.length):g),i?i(null,o,g,a):S.apply(o,g)})}function ht(e){var t,n,r,s=e.length,o=i.relative[e[0].type],u=o||i.relative[" "],a=o?1:0,f=at(function(e){return e===t},u,!0),l=at(function(e){return T.call(t,e)>-1},u,!0),h=[function(e,n,r){return!o&&(r||n!==c)||((t=n).nodeType?f(e,n,r):l(e,n,r))}];for(;a<s;a++)if(n=i.relative[e[a].type])h=[at(ft(h),n)];else{n=i.filter[e[a].type].apply(null,e[a].matches);if(n[d]){r=++a;for(;r<s;r++)if(i.relative[e[r].type])break;return ct(a>1&&ft(h),a>1&&e.slice(0,a-1).join("").replace(j,"$1"),n,a<r&&ht(e.slice(a,r)),r<s&&ht(e=e.slice(r)),r<s&&e.join(""))}h.push(n)}return ft(h)}function pt(e,t){var r=t.length>0,s=e.length>0,o=function(u,a,f,l,h){var p,d,v,m=[],y=0,w="0",x=u&&[],T=h!=null,N=c,C=u||s&&i.find.TAG("*",h&&a.parentNode||a),k=b+=N==null?1:Math.E;T&&(c=a!==g&&a,n=o.el);for(;(p=C[w])!=null;w++){if(s&&p){for(d=0;v=e[d];d++)if(v(p,a,f)){l.push(p);break}T&&(b=k,n=++o.el)}r&&((p=!v&&p)&&y--,u&&x.push(p))}y+=w;if(r&&w!==y){for(d=0;v=t[d];d++)v(x,m,a,f);if(u){if(y>0)while(w--)!x[w]&&!m[w]&&(m[w]=E.call(l));m=lt(m)}S.apply(l,m),T&&!u&&m.length>0&&y+t.length>1&&nt.uniqueSort(l)}return T&&(b=k,c=N),x};return o.el=0,r?N(o):o}function dt(e,t,n){var r=0,i=t.length;for(;r<i;r++)nt(e,t[r],n);return n}function vt(e,t,n,r,s){var o,u,f,l,c,h=ut(e),p=h.length;if(!r&&h.length===1){u=h[0]=h[0].slice(0);if(u.length>2&&(f=u[0]).type==="ID"&&t.nodeType===9&&!s&&i.relative[u[1].type]){t=i.find.ID(f.matches[0].replace($,""),t,s)[0];if(!t)return n;e=e.slice(u.shift().length)}for(o=J.POS.test(e)?-1:u.length-1;o>=0;o--){f=u[o];if(i.relative[l=f.type])break;if(c=i.find[l])if(r=c(f.matches[0].replace($,""),z.test(u[0].type)&&t.parentNode||t,s)){u.splice(o,1),e=r.length&&u.join("");if(!e)return S.apply(n,x.call(r,0)),n;break}}}return a(e,h)(r,t,s,n,z.test(e)),n}function mt(){}var n,r,i,s,o,u,a,f,l,c,h=!0,p="undefined",d=("sizcache"+Math.random()).replace(".",""),m=String,g=e.document,y=g.documentElement,b=0,w=0,E=[].pop,S=[].push,x=[].slice,T=[].indexOf||function(e){var t=0,n=this.length;for(;t<n;t++)if(this[t]===e)return t;return-1},N=function(e,t){return e[d]=t==null||t,e},C=function(){var e={},t=[];return N(function(n,r){return t.push(n)>i.cacheLength&&delete e[t.shift()],e[n+" "]=r},e)},k=C(),L=C(),A=C(),O="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[-\\w]|[^\\x00-\\xa0])+",_=M.replace("w","w#"),D="([*^$|!~]?=)",P="\\["+O+"*("+M+")"+O+"*(?:"+D+O+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+_+")|)|)"+O+"*\\]",H=":("+M+")(?:\\((?:(['\"])((?:\\\\.|[^\\\\])*?)\\2|([^()[\\]]*|(?:(?:"+P+")|[^:]|\\\\.)*|.*))\\)|)",B=":(even|odd|eq|gt|lt|nth|first|last)(?:\\("+O+"*((?:-\\d)?\\d*)"+O+"*\\)|)(?=[^-]|$)",j=new RegExp("^"+O+"+|((?:^|[^\\\\])(?:\\\\.)*)"+O+"+$","g"),F=new RegExp("^"+O+"*,"+O+"*"),I=new RegExp("^"+O+"*([\\x20\\t\\r\\n\\f>+~])"+O+"*"),q=new RegExp(H),R=/^(?:#([\w\-]+)|(\w+)|\.([\w\-]+))$/,U=/^:not/,z=/[\x20\t\r\n\f]*[+~]/,W=/:not\($/,X=/h\d/i,V=/input|select|textarea|button/i,$=/\\(?!\\)/g,J={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),NAME:new RegExp("^\\[name=['\"]?("+M+")['\"]?\\]"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+H),POS:new RegExp(B,"i"),CHILD:new RegExp("^:(only|nth|first|last)-child(?:\\("+O+"*(even|odd|(([+-]|)(\\d*)n|)"+O+"*(?:([+-]|)"+O+"*(\\d+)|))"+O+"*\\)|)","i"),needsContext:new RegExp("^"+O+"*[>+~]|"+B,"i")},K=function(e){var t=g.createElement("div");try{return e(t)}catch(n){return!1}finally{t=null}},Q=K(function(e){return e.appendChild(g.createComment("")),!e.getElementsByTagName("*").length}),G=K(function(e){return e.innerHTML="<a href='#'></a>",e.firstChild&&typeof e.firstChild.getAttribute!==p&&e.firstChild.getAttribute("href")==="#"}),Y=K(function(e){e.innerHTML="<select></select>";var t=typeof e.lastChild.getAttribute("multiple");return t!=="boolean"&&t!=="string"}),Z=K(function(e){return e.innerHTML="<div class='hidden e'></div><div class='hidden'></div>",!e.getElementsByClassName||!e.getElementsByClassName("e").length?!1:(e.lastChild.className="e",e.getElementsByClassName("e").length===2)}),et=K(function(e){e.id=d+0,e.innerHTML="<a name='"+d+"'></a><div name='"+d+"'></div>",y.insertBefore(e,y.firstChild);var t=g.getElementsByName&&g.getElementsByName(d).length===2+g.getElementsByName(d+0).length;return r=!g.getElementById(d),y.removeChild(e),t});try{x.call(y.childNodes,0)[0].nodeType}catch(tt){x=function(e){var t,n=[];for(;t=this[e];e++)n.push(t);return n}}nt.matches=function(e,t){return nt(e,null,null,t)},nt.matchesSelector=function(e,t){return nt(t,null,null,[e]).length>0},s=nt.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(i===1||i===9||i===11){if(typeof e.textContent=="string")return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=s(e)}else if(i===3||i===4)return e.nodeValue}else for(;t=e[r];r++)n+=s(t);return n},o=nt.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?t.nodeName!=="HTML":!1},u=nt.contains=y.contains?function(e,t){var n=e.nodeType===9?e.documentElement:e,r=t&&t.parentNode;return e===r||!!(r&&r.nodeType===1&&n.contains&&n.contains(r))}:y.compareDocumentPosition?function(e,t){return t&&!!(e.compareDocumentPosition(t)&16)}:function(e,t){while(t=t.parentNode)if(t===e)return!0;return!1},nt.attr=function(e,t){var n,r=o(e);return r||(t=t.toLowerCase()),(n=i.attrHandle[t])?n(e):r||Y?e.getAttribute(t):(n=e.getAttributeNode(t),n?typeof e[t]=="boolean"?e[t]?t:null:n.specified?n.value:null:null)},i=nt.selectors={cacheLength:50,createPseudo:N,match:J,attrHandle:G?{}:{href:function(e){return e.getAttribute("href",2)},type:function(e){return e.getAttribute("type")}},find:{ID:r?function(e,t,n){if(typeof t.getElementById!==p&&!n){var r=t.getElementById(e);return r&&r.parentNode?[r]:[]}}:function(e,n,r){if(typeof n.getElementById!==p&&!r){var i=n.getElementById(e);return i?i.id===e||typeof i.getAttributeNode!==p&&i.getAttributeNode("id").value===e?[i]:t:[]}},TAG:Q?function(e,t){if(typeof t.getElementsByTagName!==p)return t.getElementsByTagName(e)}:function(e,t){var n=t.getElementsByTagName(e);if(e==="*"){var r,i=[],s=0;for(;r=n[s];s++)r.nodeType===1&&i.push(r);return i}return n},NAME:et&&function(e,t){if(typeof t.getElementsByName!==p)return t.getElementsByName(name)},CLASS:Z&&function(e,t,n){if(typeof t.getElementsByClassName!==p&&!n)return t.getElementsByClassName(e)}},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace($,""),e[3]=(e[4]||e[5]||"").replace($,""),e[2]==="~="&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),e[1]==="nth"?(e[2]||nt.error(e[0]),e[3]=+(e[3]?e[4]+(e[5]||1):2*(e[2]==="even"||e[2]==="odd")),e[4]=+(e[6]+e[7]||e[2]==="odd")):e[2]&&nt.error(e[0]),e},PSEUDO:function(e){var t,n;if(J.CHILD.test(e[0]))return null;if(e[3])e[2]=e[3];else if(t=e[4])q.test(t)&&(n=ut(t,!0))&&(n=t.indexOf(")",t.length-n)-t.length)&&(t=t.slice(0,n),e[0]=e[0].slice(0,n)),e[2]=t;return e.slice(0,3)}},filter:{ID:r?function(e){return e=e.replace($,""),function(t){return t.getAttribute("id")===e}}:function(e){return e=e.replace($,""),function(t){var n=typeof t.getAttributeNode!==p&&t.getAttributeNode("id");return n&&n.value===e}},TAG:function(e){return e==="*"?function(){return!0}:(e=e.replace($,"").toLowerCase(),function(t){return t.nodeName&&t.nodeName.toLowerCase()===e})},CLASS:function(e){var t=k[d][e+" "];return t||(t=new RegExp("(^|"+O+")"+e+"("+O+"|$)"))&&k(e,function(e){return t.test(e.className||typeof e.getAttribute!==p&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r,i){var s=nt.attr(r,e);return s==null?t==="!=":t?(s+="",t==="="?s===n:t==="!="?s!==n:t==="^="?n&&s.indexOf(n)===0:t==="*="?n&&s.indexOf(n)>-1:t==="$="?n&&s.substr(s.length-n.length)===n:t==="~="?(" "+s+" ").indexOf(n)>-1:t==="|="?s===n||s.substr(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r){return e==="nth"?function(e){var t,i,s=e.parentNode;if(n===1&&r===0)return!0;if(s){i=0;for(t=s.firstChild;t;t=t.nextSibling)if(t.nodeType===1){i++;if(e===t)break}}return i-=r,i===n||i%n===0&&i/n>=0}:function(t){var n=t;switch(e){case"only":case"first":while(n=n.previousSibling)if(n.nodeType===1)return!1;if(e==="first")return!0;n=t;case"last":while(n=n.nextSibling)if(n.nodeType===1)return!1;return!0}}},PSEUDO:function(e,t){var n,r=i.pseudos[e]||i.setFilters[e.toLowerCase()]||nt.error("unsupported pseudo: "+e);return r[d]?r(t):r.length>1?(n=[e,e,"",t],i.setFilters.hasOwnProperty(e.toLowerCase())?N(function(e,n){var i,s=r(e,t),o=s.length;while(o--)i=T.call(e,s[o]),e[i]=!(n[i]=s[o])}):function(e){return r(e,0,n)}):r}},pseudos:{not:N(function(e){var t=[],n=[],r=a(e.replace(j,"$1"));return r[d]?N(function(e,t,n,i){var s,o=r(e,null,i,[]),u=e.length;while(u--)if(s=o[u])e[u]=!(t[u]=s)}):function(e,i,s){return t[0]=e,r(t,null,s,n),!n.pop()}}),has:N(function(e){return function(t){return nt(e,t).length>0}}),contains:N(function(e){return function(t){return(t.textContent||t.innerText||s(t)).indexOf(e)>-1}}),enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return t==="input"&&!!e.checked||t==="option"&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},parent:function(e){return!i.pseudos.empty(e)},empty:function(e){var t;e=e.firstChild;while(e){if(e.nodeName>"@"||(t=e.nodeType)===3||t===4)return!1;e=e.nextSibling}return!0},header:function(e){return X.test(e.nodeName)},text:function(e){var t,n;return e.nodeName.toLowerCase()==="input"&&(t=e.type)==="text"&&((n=e.getAttribute("type"))==null||n.toLowerCase()===t)},radio:rt("radio"),checkbox:rt("checkbox"),file:rt("file"),password:rt("password"),image:rt("image"),submit:it("submit"),reset:it("reset"),button:function(e){var t=e.nodeName.toLowerCase();return t==="input"&&e.type==="button"||t==="button"},input:function(e){return V.test(e.nodeName)},focus:function(e){var t=e.ownerDocument;return e===t.activeElement&&(!t.hasFocus||t.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},active:function(e){return e===e.ownerDocument.activeElement},first:st(function(){return[0]}),last:st(function(e,t){return[t-1]}),eq:st(function(e,t,n){return[n<0?n+t:n]}),even:st(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:st(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:st(function(e,t,n){for(var r=n<0?n+t:n;--r>=0;)e.push(r);return e}),gt:st(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}},f=y.compareDocumentPosition?function(e,t){return e===t?(l=!0,0):(!e.compareDocumentPosition||!t.compareDocumentPosition?e.compareDocumentPosition:e.compareDocumentPosition(t)&4)?-1:1}:function(e,t){if(e===t)return l=!0,0;if(e.sourceIndex&&t.sourceIndex)return e.sourceIndex-t.sourceIndex;var n,r,i=[],s=[],o=e.parentNode,u=t.parentNode,a=o;if(o===u)return ot(e,t);if(!o)return-1;if(!u)return 1;while(a)i.unshift(a),a=a.parentNode;a=u;while(a)s.unshift(a),a=a.parentNode;n=i.length,r=s.length;for(var f=0;f<n&&f<r;f++)if(i[f]!==s[f])return ot(i[f],s[f]);return f===n?ot(e,s[f],-1):ot(i[f],t,1)},[0,0].sort(f),h=!l,nt.uniqueSort=function(e){var t,n=[],r=1,i=0;l=h,e.sort(f);if(l){for(;t=e[r];r++)t===e[r-1]&&(i=n.push(r));while(i--)e.splice(n[i],1)}return e},nt.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},a=nt.compile=function(e,t){var n,r=[],i=[],s=A[d][e+" "];if(!s){t||(t=ut(e)),n=t.length;while(n--)s=ht(t[n]),s[d]?r.push(s):i.push(s);s=A(e,pt(i,r))}return s},g.querySelectorAll&&function(){var e,t=vt,n=/'|\\/g,r=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,i=[":focus"],s=[":active"],u=y.matchesSelector||y.mozMatchesSelector||y.webkitMatchesSelector||y.oMatchesSelector||y.msMatchesSelector;K(function(e){e.innerHTML="<select><option selected=''></option></select>",e.querySelectorAll("[selected]").length||i.push("\\["+O+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),e.querySelectorAll(":checked").length||i.push(":checked")}),K(function(e){e.innerHTML="<p test=''></p>",e.querySelectorAll("[test^='']").length&&i.push("[*^$]="+O+"*(?:\"\"|'')"),e.innerHTML="<input type='hidden'/>",e.querySelectorAll(":enabled").length||i.push(":enabled",":disabled")}),i=new RegExp(i.join("|")),vt=function(e,r,s,o,u){if(!o&&!u&&!i.test(e)){var a,f,l=!0,c=d,h=r,p=r.nodeType===9&&e;if(r.nodeType===1&&r.nodeName.toLowerCase()!=="object"){a=ut(e),(l=r.getAttribute("id"))?c=l.replace(n,"\\$&"):r.setAttribute("id",c),c="[id='"+c+"'] ",f=a.length;while(f--)a[f]=c+a[f].join("");h=z.test(e)&&r.parentNode||r,p=a.join(",")}if(p)try{return S.apply(s,x.call(h.querySelectorAll(p),0)),s}catch(v){}finally{l||r.removeAttribute("id")}}return t(e,r,s,o,u)},u&&(K(function(t){e=u.call(t,"div");try{u.call(t,"[test!='']:sizzle"),s.push("!=",H)}catch(n){}}),s=new RegExp(s.join("|")),nt.matchesSelector=function(t,n){n=n.replace(r,"='$1']");if(!o(t)&&!s.test(n)&&!i.test(n))try{var a=u.call(t,n);if(a||e||t.document&&t.document.nodeType!==11)return a}catch(f){}return nt(n,null,null,[t]).length>0})}(),i.pseudos.nth=i.pseudos.eq,i.filters=mt.prototype=i.pseudos,i.setFilters=new mt,nt.attr=v.attr,v.find=nt,v.expr=nt.selectors,v.expr[":"]=v.expr.pseudos,v.unique=nt.uniqueSort,v.text=nt.getText,v.isXMLDoc=nt.isXML,v.contains=nt.contains}(e);var nt=/Until$/,rt=/^(?:parents|prev(?:Until|All))/,it=/^.[^:#\[\.,]*$/,st=v.expr.match.needsContext,ot={children:!0,contents:!0,next:!0,prev:!0};v.fn.extend({find:function(e){var t,n,r,i,s,o,u=this;if(typeof e!="string")return v(e).filter(function(){for(t=0,n=u.length;t<n;t++)if(v.contains(u[t],this))return!0});o=this.pushStack("","find",e);for(t=0,n=this.length;t<n;t++){r=o.length,v.find(e,this[t],o);if(t>0)for(i=r;i<o.length;i++)for(s=0;s<r;s++)if(o[s]===o[i]){o.splice(i--,1);break}}return o},has:function(e){var t,n=v(e,this),r=n.length;return this.filter(function(){for(t=0;t<r;t++)if(v.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(ft(this,e,!1),"not",e)},filter:function(e){return this.pushStack(ft(this,e,!0),"filter",e)},is:function(e){return!!e&&(typeof e=="string"?st.test(e)?v(e,this.context).index(this[0])>=0:v.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){var n,r=0,i=this.length,s=[],o=st.test(e)||typeof e!="string"?v(e,t||this.context):0;for(;r<i;r++){n=this[r];while(n&&n.ownerDocument&&n!==t&&n.nodeType!==11){if(o?o.index(n)>-1:v.find.matchesSelector(n,e)){s.push(n);break}n=n.parentNode}}return s=s.length>1?v.unique(s):s,this.pushStack(s,"closest",e)},index:function(e){return e?typeof e=="string"?v.inArray(this[0],v(e)):v.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.prevAll().length:-1},add:function(e,t){var n=typeof e=="string"?v(e,t):v.makeArray(e&&e.nodeType?[e]:e),r=v.merge(this.get(),n);return this.pushStack(ut(n[0])||ut(r[0])?r:v.unique(r))},addBack:function(e){return this.add(e==null?this.prevObject:this.prevObject.filter(e))}}),v.fn.andSelf=v.fn.addBack,v.each({parent:function(e){var t=e.parentNode;return t&&t.nodeType!==11?t:null},parents:function(e){return v.dir(e,"parentNode")},parentsUntil:function(e,t,n){return v.dir(e,"parentNode",n)},next:function(e){return at(e,"nextSibling")},prev:function(e){return at(e,"previousSibling")},nextAll:function(e){return v.dir(e,"nextSibling")},prevAll:function(e){return v.dir(e,"previousSibling")},nextUntil:function(e,t,n){return v.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return v.dir(e,"previousSibling",n)},siblings:function(e){return v.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return v.sibling(e.firstChild)},contents:function(e){return v.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:v.merge([],e.childNodes)}},function(e,t){v.fn[e]=function(n,r){var i=v.map(this,t,n);return nt.test(e)||(r=n),r&&typeof r=="string"&&(i=v.filter(r,i)),i=this.length>1&&!ot[e]?v.unique(i):i,this.length>1&&rt.test(e)&&(i=i.reverse()),this.pushStack(i,e,l.call(arguments).join(","))}}),v.extend({filter:function(e,t,n){return n&&(e=":not("+e+")"),t.length===1?v.find.matchesSelector(t[0],e)?[t[0]]:[]:v.find.matches(e,t)},dir:function(e,n,r){var i=[],s=e[n];while(s&&s.nodeType!==9&&(r===t||s.nodeType!==1||!v(s).is(r)))s.nodeType===1&&i.push(s),s=s[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)e.nodeType===1&&e!==t&&n.push(e);return n}});var ct="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",ht=/ jQuery\d+="(?:null|\d+)"/g,pt=/^\s+/,dt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,vt=/<([\w:]+)/,mt=/<tbody/i,gt=/<|&#?\w+;/,yt=/<(?:script|style|link)/i,bt=/<(?:script|object|embed|option|style)/i,wt=new RegExp("<(?:"+ct+")[\\s/>]","i"),Et=/^(?:checkbox|radio)$/,St=/checked\s*(?:[^=]|=\s*.checked.)/i,xt=/\/(java|ecma)script/i,Tt=/^\s*<!(?:\[CDATA\[|\-\-)|[\]\-]{2}>\s*$/g,Nt={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},Ct=lt(i),kt=Ct.appendChild(i.createElement("div"));Nt.optgroup=Nt.option,Nt.tbody=Nt.tfoot=Nt.colgroup=Nt.caption=Nt.thead,Nt.th=Nt.td,v.support.htmlSerialize||(Nt._default=[1,"X<div>","</div>"]),v.fn.extend({text:function(e){return v.access(this,function(e){return e===t?v.text(this):this.empty().append((this[0]&&this[0].ownerDocument||i).createTextNode(e))},null,e,arguments.length)},wrapAll:function(e){if(v.isFunction(e))return this.each(function(t){v(this).wrapAll(e.call(this,t))});if(this[0]){var t=v(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&e.firstChild.nodeType===1)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return v.isFunction(e)?this.each(function(t){v(this).wrapInner(e.call(this,t))}):this.each(function(){var t=v(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=v.isFunction(e);return this.each(function(n){v(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){v.nodeName(this,"body")||v(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(e){(this.nodeType===1||this.nodeType===11)&&this.appendChild(e)})},prepend:function(){return this.domManip(arguments,!0,function(e){(this.nodeType===1||this.nodeType===11)&&this.insertBefore(e,this.firstChild)})},before:function(){if(!ut(this[0]))return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this)});if(arguments.length){var e=v.clean(arguments);return this.pushStack(v.merge(e,this),"before",this.selector)}},after:function(){if(!ut(this[0]))return this.domManip(arguments,!1,function(e){this.parentNode.insertBefore(e,this.nextSibling)});if(arguments.length){var e=v.clean(arguments);return this.pushStack(v.merge(this,e),"after",this.selector)}},remove:function(e,t){var n,r=0;for(;(n=this[r])!=null;r++)if(!e||v.filter(e,[n]).length)!t&&n.nodeType===1&&(v.cleanData(n.getElementsByTagName("*")),v.cleanData([n])),n.parentNode&&n.parentNode.removeChild(n);return this},empty:function(){var e,t=0;for(;(e=this[t])!=null;t++){e.nodeType===1&&v.cleanData(e.getElementsByTagName("*"));while(e.firstChild)e.removeChild(e.firstChild)}return this},clone:function(e,t){return e=e==null?!1:e,t=t==null?e:t,this.map(function(){return v.clone(this,e,t)})},html:function(e){return v.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return n.nodeType===1?n.innerHTML.replace(ht,""):t;if(typeof e=="string"&&!yt.test(e)&&(v.support.htmlSerialize||!wt.test(e))&&(v.support.leadingWhitespace||!pt.test(e))&&!Nt[(vt.exec(e)||["",""])[1].toLowerCase()]){e=e.replace(dt,"<$1></$2>");try{for(;r<i;r++)n=this[r]||{},n.nodeType===1&&(v.cleanData(n.getElementsByTagName("*")),n.innerHTML=e);n=0}catch(s){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(e){return ut(this[0])?this.length?this.pushStack(v(v.isFunction(e)?e():e),"replaceWith",e):this:v.isFunction(e)?this.each(function(t){var n=v(this),r=n.html();n.replaceWith(e.call(this,t,r))}):(typeof e!="string"&&(e=v(e).detach()),this.each(function(){var t=this.nextSibling,n=this.parentNode;v(this).remove(),t?v(t).before(e):v(n).append(e)}))},detach:function(e){return this.remove(e,!0)},domManip:function(e,n,r){e=[].concat.apply([],e);var i,s,o,u,a=0,f=e[0],l=[],c=this.length;if(!v.support.checkClone&&c>1&&typeof f=="string"&&St.test(f))return this.each(function(){v(this).domManip(e,n,r)});if(v.isFunction(f))return this.each(function(i){var s=v(this);e[0]=f.call(this,i,n?s.html():t),s.domManip(e,n,r)});if(this[0]){i=v.buildFragment(e,this,l),o=i.fragment,s=o.firstChild,o.childNodes.length===1&&(o=s);if(s){n=n&&v.nodeName(s,"tr");for(u=i.cacheable||c-1;a<c;a++)r.call(n&&v.nodeName(this[a],"table")?Lt(this[a],"tbody"):this[a],a===u?o:v.clone(o,!0,!0))}o=s=null,l.length&&v.each(l,function(e,t){t.src?v.ajax?v.ajax({url:t.src,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0}):v.error("no ajax"):v.globalEval((t.text||t.textContent||t.innerHTML||"").replace(Tt,"")),t.parentNode&&t.parentNode.removeChild(t)})}return this}}),v.buildFragment=function(e,n,r){var s,o,u,a=e[0];return n=n||i,n=!n.nodeType&&n[0]||n,n=n.ownerDocument||n,e.length===1&&typeof a=="string"&&a.length<512&&n===i&&a.charAt(0)==="<"&&!bt.test(a)&&(v.support.checkClone||!St.test(a))&&(v.support.html5Clone||!wt.test(a))&&(o=!0,s=v.fragments[a],u=s!==t),s||(s=n.createDocumentFragment(),v.clean(e,n,s,r),o&&(v.fragments[a]=u&&s)),{fragment:s,cacheable:o}},v.fragments={},v.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){v.fn[e]=function(n){var r,i=0,s=[],o=v(n),u=o.length,a=this.length===1&&this[0].parentNode;if((a==null||a&&a.nodeType===11&&a.childNodes.length===1)&&u===1)return o[t](this[0]),this;for(;i<u;i++)r=(i>0?this.clone(!0):this).get(),v(o[i])[t](r),s=s.concat(r);return this.pushStack(s,e,o.selector)}}),v.extend({clone:function(e,t,n){var r,i,s,o;v.support.html5Clone||v.isXMLDoc(e)||!wt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(kt.innerHTML=e.outerHTML,kt.removeChild(o=kt.firstChild));if((!v.support.noCloneEvent||!v.support.noCloneChecked)&&(e.nodeType===1||e.nodeType===11)&&!v.isXMLDoc(e)){Ot(e,o),r=Mt(e),i=Mt(o);for(s=0;r[s];++s)i[s]&&Ot(r[s],i[s])}if(t){At(e,o);if(n){r=Mt(e),i=Mt(o);for(s=0;r[s];++s)At(r[s],i[s])}}return r=i=null,o},clean:function(e,t,n,r){var s,o,u,a,f,l,c,h,p,d,m,g,y=t===i&&Ct,b=[];if(!t||typeof t.createDocumentFragment=="undefined")t=i;for(s=0;(u=e[s])!=null;s++){typeof u=="number"&&(u+="");if(!u)continue;if(typeof u=="string")if(!gt.test(u))u=t.createTextNode(u);else{y=y||lt(t),c=t.createElement("div"),y.appendChild(c),u=u.replace(dt,"<$1></$2>"),a=(vt.exec(u)||["",""])[1].toLowerCase(),f=Nt[a]||Nt._default,l=f[0],c.innerHTML=f[1]+u+f[2];while(l--)c=c.lastChild;if(!v.support.tbody){h=mt.test(u),p=a==="table"&&!h?c.firstChild&&c.firstChild.childNodes:f[1]==="<table>"&&!h?c.childNodes:[];for(o=p.length-1;o>=0;--o)v.nodeName(p[o],"tbody")&&!p[o].childNodes.length&&p[o].parentNode.removeChild(p[o])}!v.support.leadingWhitespace&&pt.test(u)&&c.insertBefore(t.createTextNode(pt.exec(u)[0]),c.firstChild),u=c.childNodes,c.parentNode.removeChild(c)}u.nodeType?b.push(u):v.merge(b,u)}c&&(u=c=y=null);if(!v.support.appendChecked)for(s=0;(u=b[s])!=null;s++)v.nodeName(u,"input")?_t(u):typeof u.getElementsByTagName!="undefined"&&v.grep(u.getElementsByTagName("input"),_t);if(n){m=function(e){if(!e.type||xt.test(e.type))return r?r.push(e.parentNode?e.parentNode.removeChild(e):e):n.appendChild(e)};for(s=0;(u=b[s])!=null;s++)if(!v.nodeName(u,"script")||!m(u))n.appendChild(u),typeof u.getElementsByTagName!="undefined"&&(g=v.grep(v.merge([],u.getElementsByTagName("script")),m),b.splice.apply(b,[s+1,0].concat(g)),s+=g.length)}return b},cleanData:function(e,t){var n,r,i,s,o=0,u=v.expando,a=v.cache,f=v.support.deleteExpando,l=v.event.special;for(;(i=e[o])!=null;o++)if(t||v.acceptData(i)){r=i[u],n=r&&a[r];if(n){if(n.events)for(s in n.events)l[s]?v.event.remove(i,s):v.removeEvent(i,s,n.handle);a[r]&&(delete a[r],f?delete i[u]:i.removeAttribute?i.removeAttribute(u):i[u]=null,v.deletedIds.push(r))}}}}),function(){var e,t;v.uaMatch=function(e){e=e.toLowerCase();var t=/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:t[1]||"",version:t[2]||"0"}},e=v.uaMatch(o.userAgent),t={},e.browser&&(t[e.browser]=!0,t.version=e.version),t.chrome?t.webkit=!0:t.webkit&&(t.safari=!0),v.browser=t,v.sub=function(){function e(t,n){return new e.fn.init(t,n)}v.extend(!0,e,this),e.superclass=this,e.fn=e.prototype=this(),e.fn.constructor=e,e.sub=this.sub,e.fn.init=function(r,i){return i&&i instanceof v&&!(i instanceof e)&&(i=e(i)),v.fn.init.call(this,r,i,t)},e.fn.init.prototype=e.fn;var t=e(i);return e}}();var Dt,Pt,Ht,Bt=/alpha\([^)]*\)/i,jt=/opacity=([^)]*)/,Ft=/^(top|right|bottom|left)$/,It=/^(none|table(?!-c[ea]).+)/,qt=/^margin/,Rt=new RegExp("^("+m+")(.*)$","i"),Ut=new RegExp("^("+m+")(?!px)[a-z%]+$","i"),zt=new RegExp("^([-+])=("+m+")","i"),Wt={BODY:"block"},Xt={position:"absolute",visibility:"hidden",display:"block"},Vt={letterSpacing:0,fontWeight:400},$t=["Top","Right","Bottom","Left"],Jt=["Webkit","O","Moz","ms"],Kt=v.fn.toggle;v.fn.extend({css:function(e,n){return v.access(this,function(e,n,r){return r!==t?v.style(e,n,r):v.css(e,n)},e,n,arguments.length>1)},show:function(){return Yt(this,!0)},hide:function(){return Yt(this)},toggle:function(e,t){var n=typeof e=="boolean";return v.isFunction(e)&&v.isFunction(t)?Kt.apply(this,arguments):this.each(function(){(n?e:Gt(this))?v(this).show():v(this).hide()})}}),v.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Dt(e,"opacity");return n===""?"1":n}}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":v.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(!e||e.nodeType===3||e.nodeType===8||!e.style)return;var s,o,u,a=v.camelCase(n),f=e.style;n=v.cssProps[a]||(v.cssProps[a]=Qt(f,a)),u=v.cssHooks[n]||v.cssHooks[a];if(r===t)return u&&"get"in u&&(s=u.get(e,!1,i))!==t?s:f[n];o=typeof r,o==="string"&&(s=zt.exec(r))&&(r=(s[1]+1)*s[2]+parseFloat(v.css(e,n)),o="number");if(r==null||o==="number"&&isNaN(r))return;o==="number"&&!v.cssNumber[a]&&(r+="px");if(!u||!("set"in u)||(r=u.set(e,r,i))!==t)try{f[n]=r}catch(l){}},css:function(e,n,r,i){var s,o,u,a=v.camelCase(n);return n=v.cssProps[a]||(v.cssProps[a]=Qt(e.style,a)),u=v.cssHooks[n]||v.cssHooks[a],u&&"get"in u&&(s=u.get(e,!0,i)),s===t&&(s=Dt(e,n)),s==="normal"&&n in Vt&&(s=Vt[n]),r||i!==t?(o=parseFloat(s),r||v.isNumeric(o)?o||0:s):s},swap:function(e,t,n){var r,i,s={};for(i in t)s[i]=e.style[i],e.style[i]=t[i];r=n.call(e);for(i in t)e.style[i]=s[i];return r}}),e.getComputedStyle?Dt=function(t,n){var r,i,s,o,u=e.getComputedStyle(t,null),a=t.style;return u&&(r=u.getPropertyValue(n)||u[n],r===""&&!v.contains(t.ownerDocument,t)&&(r=v.style(t,n)),Ut.test(r)&&qt.test(n)&&(i=a.width,s=a.minWidth,o=a.maxWidth,a.minWidth=a.maxWidth=a.width=r,r=u.width,a.width=i,a.minWidth=s,a.maxWidth=o)),r}:i.documentElement.currentStyle&&(Dt=function(e,t){var n,r,i=e.currentStyle&&e.currentStyle[t],s=e.style;return i==null&&s&&s[t]&&(i=s[t]),Ut.test(i)&&!Ft.test(t)&&(n=s.left,r=e.runtimeStyle&&e.runtimeStyle.left,r&&(e.runtimeStyle.left=e.currentStyle.left),s.left=t==="fontSize"?"1em":i,i=s.pixelLeft+"px",s.left=n,r&&(e.runtimeStyle.left=r)),i===""?"auto":i}),v.each(["height","width"],function(e,t){v.cssHooks[t]={get:function(e,n,r){if(n)return e.offsetWidth===0&&It.test(Dt(e,"display"))?v.swap(e,Xt,function(){return tn(e,t,r)}):tn(e,t,r)},set:function(e,n,r){return Zt(e,n,r?en(e,t,r,v.support.boxSizing&&v.css(e,"boxSizing")==="border-box"):0)}}}),v.support.opacity||(v.cssHooks.opacity={get:function(e,t){return jt.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=v.isNumeric(t)?"alpha(opacity="+t*100+")":"",s=r&&r.filter||n.filter||"";n.zoom=1;if(t>=1&&v.trim(s.replace(Bt,""))===""&&n.removeAttribute){n.removeAttribute("filter");if(r&&!r.filter)return}n.filter=Bt.test(s)?s.replace(Bt,i):s+" "+i}}),v(function(){v.support.reliableMarginRight||(v.cssHooks.marginRight={get:function(e,t){return v.swap(e,{display:"inline-block"},function(){if(t)return Dt(e,"marginRight")})}}),!v.support.pixelPosition&&v.fn.position&&v.each(["top","left"],function(e,t){v.cssHooks[t]={get:function(e,n){if(n){var r=Dt(e,t);return Ut.test(r)?v(e).position()[t]+"px":r}}}})}),v.expr&&v.expr.filters&&(v.expr.filters.hidden=function(e){return e.offsetWidth===0&&e.offsetHeight===0||!v.support.reliableHiddenOffsets&&(e.style&&e.style.display||Dt(e,"display"))==="none"},v.expr.filters.visible=function(e){return!v.expr.filters.hidden(e)}),v.each({margin:"",padding:"",border:"Width"},function(e,t){v.cssHooks[e+t]={expand:function(n){var r,i=typeof n=="string"?n.split(" "):[n],s={};for(r=0;r<4;r++)s[e+$t[r]+t]=i[r]||i[r-2]||i[0];return s}},qt.test(e)||(v.cssHooks[e+t].set=Zt)});var rn=/%20/g,sn=/\[\]$/,on=/\r?\n/g,un=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,an=/^(?:select|textarea)/i;v.fn.extend({serialize:function(){return v.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?v.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||an.test(this.nodeName)||un.test(this.type))}).map(function(e,t){var n=v(this).val();return n==null?null:v.isArray(n)?v.map(n,function(e,n){return{name:t.name,value:e.replace(on,"\r\n")}}):{name:t.name,value:n.replace(on,"\r\n")}}).get()}}),v.param=function(e,n){var r,i=[],s=function(e,t){t=v.isFunction(t)?t():t==null?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};n===t&&(n=v.ajaxSettings&&v.ajaxSettings.traditional);if(v.isArray(e)||e.jquery&&!v.isPlainObject(e))v.each(e,function(){s(this.name,this.value)});else for(r in e)fn(r,e[r],n,s);return i.join("&").replace(rn,"+")};var ln,cn,hn=/#.*$/,pn=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,dn=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,vn=/^(?:GET|HEAD)$/,mn=/^\/\//,gn=/\?/,yn=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,bn=/([?&])_=[^&]*/,wn=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,En=v.fn.load,Sn={},xn={},Tn=["*/"]+["*"];try{cn=s.href}catch(Nn){cn=i.createElement("a"),cn.href="",cn=cn.href}ln=wn.exec(cn.toLowerCase())||[],v.fn.load=function(e,n,r){if(typeof e!="string"&&En)return En.apply(this,arguments);if(!this.length)return this;var i,s,o,u=this,a=e.indexOf(" ");return a>=0&&(i=e.slice(a,e.length),e=e.slice(0,a)),v.isFunction(n)?(r=n,n=t):n&&typeof n=="object"&&(s="POST"),v.ajax({url:e,type:s,dataType:"html",data:n,complete:function(e,t){r&&u.each(r,o||[e.responseText,t,e])}}).done(function(e){o=arguments,u.html(i?v("<div>").append(e.replace(yn,"")).find(i):e)}),this},v.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(e,t){v.fn[t]=function(e){return this.on(t,e)}}),v.each(["get","post"],function(e,n){v[n]=function(e,r,i,s){return v.isFunction(r)&&(s=s||i,i=r,r=t),v.ajax({type:n,url:e,data:r,success:i,dataType:s})}}),v.extend({getScript:function(e,n){return v.get(e,t,n,"script")},getJSON:function(e,t,n){return v.get(e,t,n,"json")},ajaxSetup:function(e,t){return t?Ln(e,v.ajaxSettings):(t=e,e=v.ajaxSettings),Ln(e,t),e},ajaxSettings:{url:cn,isLocal:dn.test(ln[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":Tn},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":e.String,"text html":!0,"text json":v.parseJSON,"text xml":v.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:Cn(Sn),ajaxTransport:Cn(xn),ajax:function(e,n){function T(e,n,s,a){var l,y,b,w,S,T=n;if(E===2)return;E=2,u&&clearTimeout(u),o=t,i=a||"",x.readyState=e>0?4:0,s&&(w=An(c,x,s));if(e>=200&&e<300||e===304)c.ifModified&&(S=x.getResponseHeader("Last-Modified"),S&&(v.lastModified[r]=S),S=x.getResponseHeader("Etag"),S&&(v.etag[r]=S)),e===304?(T="notmodified",l=!0):(l=On(c,w),T=l.state,y=l.data,b=l.error,l=!b);else{b=T;if(!T||e)T="error",e<0&&(e=0)}x.status=e,x.statusText=(n||T)+"",l?d.resolveWith(h,[y,T,x]):d.rejectWith(h,[x,T,b]),x.statusCode(g),g=t,f&&p.trigger("ajax"+(l?"Success":"Error"),[x,c,l?y:b]),m.fireWith(h,[x,T]),f&&(p.trigger("ajaxComplete",[x,c]),--v.active||v.event.trigger("ajaxStop"))}typeof e=="object"&&(n=e,e=t),n=n||{};var r,i,s,o,u,a,f,l,c=v.ajaxSetup({},n),h=c.context||c,p=h!==c&&(h.nodeType||h instanceof v)?v(h):v.event,d=v.Deferred(),m=v.Callbacks("once memory"),g=c.statusCode||{},b={},w={},E=0,S="canceled",x={readyState:0,setRequestHeader:function(e,t){if(!E){var n=e.toLowerCase();e=w[n]=w[n]||e,b[e]=t}return this},getAllResponseHeaders:function(){return E===2?i:null},getResponseHeader:function(e){var n;if(E===2){if(!s){s={};while(n=pn.exec(i))s[n[1].toLowerCase()]=n[2]}n=s[e.toLowerCase()]}return n===t?null:n},overrideMimeType:function(e){return E||(c.mimeType=e),this},abort:function(e){return e=e||S,o&&o.abort(e),T(0,e),this}};d.promise(x),x.success=x.done,x.error=x.fail,x.complete=m.add,x.statusCode=function(e){if(e){var t;if(E<2)for(t in e)g[t]=[g[t],e[t]];else t=e[x.status],x.always(t)}return this},c.url=((e||c.url)+"").replace(hn,"").replace(mn,ln[1]+"//"),c.dataTypes=v.trim(c.dataType||"*").toLowerCase().split(y),c.crossDomain==null&&(a=wn.exec(c.url.toLowerCase()),c.crossDomain=!(!a||a[1]===ln[1]&&a[2]===ln[2]&&(a[3]||(a[1]==="http:"?80:443))==(ln[3]||(ln[1]==="http:"?80:443)))),c.data&&c.processData&&typeof c.data!="string"&&(c.data=v.param(c.data,c.traditional)),kn(Sn,c,n,x);if(E===2)return x;f=c.global,c.type=c.type.toUpperCase(),c.hasContent=!vn.test(c.type),f&&v.active++===0&&v.event.trigger("ajaxStart");if(!c.hasContent){c.data&&(c.url+=(gn.test(c.url)?"&":"?")+c.data,delete c.data),r=c.url;if(c.cache===!1){var N=v.now(),C=c.url.replace(bn,"$1_="+N);c.url=C+(C===c.url?(gn.test(c.url)?"&":"?")+"_="+N:"")}}(c.data&&c.hasContent&&c.contentType!==!1||n.contentType)&&x.setRequestHeader("Content-Type",c.contentType),c.ifModified&&(r=r||c.url,v.lastModified[r]&&x.setRequestHeader("If-Modified-Since",v.lastModified[r]),v.etag[r]&&x.setRequestHeader("If-None-Match",v.etag[r])),x.setRequestHeader("Accept",c.dataTypes[0]&&c.accepts[c.dataTypes[0]]?c.accepts[c.dataTypes[0]]+(c.dataTypes[0]!=="*"?", "+Tn+"; q=0.01":""):c.accepts["*"]);for(l in c.headers)x.setRequestHeader(l,c.headers[l]);if(!c.beforeSend||c.beforeSend.call(h,x,c)!==!1&&E!==2){S="abort";for(l in{success:1,error:1,complete:1})x[l](c[l]);o=kn(xn,c,n,x);if(!o)T(-1,"No Transport");else{x.readyState=1,f&&p.trigger("ajaxSend",[x,c]),c.async&&c.timeout>0&&(u=setTimeout(function(){x.abort("timeout")},c.timeout));try{E=1,o.send(b,T)}catch(k){if(!(E<2))throw k;T(-1,k)}}return x}return x.abort()},active:0,lastModified:{},etag:{}});var Mn=[],_n=/\?/,Dn=/(=)\?(?=&|$)|\?\?/,Pn=v.now();v.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Mn.pop()||v.expando+"_"+Pn++;return this[e]=!0,e}}),v.ajaxPrefilter("json jsonp",function(n,r,i){var s,o,u,a=n.data,f=n.url,l=n.jsonp!==!1,c=l&&Dn.test(f),h=l&&!c&&typeof a=="string"&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Dn.test(a);if(n.dataTypes[0]==="jsonp"||c||h)return s=n.jsonpCallback=v.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,o=e[s],c?n.url=f.replace(Dn,"$1"+s):h?n.data=a.replace(Dn,"$1"+s):l&&(n.url+=(_n.test(f)?"&":"?")+n.jsonp+"="+s),n.converters["script json"]=function(){return u||v.error(s+" was not called"),u[0]},n.dataTypes[0]="json",e[s]=function(){u=arguments},i.always(function(){e[s]=o,n[s]&&(n.jsonpCallback=r.jsonpCallback,Mn.push(s)),u&&v.isFunction(o)&&o(u[0]),u=o=t}),"script"}),v.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(e){return v.globalEval(e),e}}}),v.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),v.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=i.head||i.getElementsByTagName("head")[0]||i.documentElement;return{send:function(s,o){n=i.createElement("script"),n.async="async",e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,i){if(i||!n.readyState||/loaded|complete/.test(n.readyState))n.onload=n.onreadystatechange=null,r&&n.parentNode&&r.removeChild(n),n=t,i||o(200,"success")},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(0,1)}}}});var Hn,Bn=e.ActiveXObject?function(){for(var e in Hn)Hn[e](0,1)}:!1,jn=0;v.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&Fn()||In()}:Fn,function(e){v.extend(v.support,{ajax:!!e,cors:!!e&&"withCredentials"in e})}(v.ajaxSettings.xhr()),v.support.ajax&&v.ajaxTransport(function(n){if(!n.crossDomain||v.support.cors){var r;return{send:function(i,s){var o,u,a=n.xhr();n.username?a.open(n.type,n.url,n.async,n.username,n.password):a.open(n.type,n.url,n.async);if(n.xhrFields)for(u in n.xhrFields)a[u]=n.xhrFields[u];n.mimeType&&a.overrideMimeType&&a.overrideMimeType(n.mimeType),!n.crossDomain&&!i["X-Requested-With"]&&(i["X-Requested-With"]="XMLHttpRequest");try{for(u in i)a.setRequestHeader(u,i[u])}catch(f){}a.send(n.hasContent&&n.data||null),r=function(e,i){var u,f,l,c,h;try{if(r&&(i||a.readyState===4)){r=t,o&&(a.onreadystatechange=v.noop,Bn&&delete Hn[o]);if(i)a.readyState!==4&&a.abort();else{u=a.status,l=a.getAllResponseHeaders(),c={},h=a.responseXML,h&&h.documentElement&&(c.xml=h);try{c.text=a.responseText}catch(p){}try{f=a.statusText}catch(p){f=""}!u&&n.isLocal&&!n.crossDomain?u=c.text?200:404:u===1223&&(u=204)}}}catch(d){i||s(-1,d)}c&&s(u,f,c,l)},n.async?a.readyState===4?setTimeout(r,0):(o=++jn,Bn&&(Hn||(Hn={},v(e).unload(Bn)),Hn[o]=r),a.onreadystatechange=r):r()},abort:function(){r&&r(0,1)}}}});var qn,Rn,Un=/^(?:toggle|show|hide)$/,zn=new RegExp("^(?:([-+])=|)("+m+")([a-z%]*)$","i"),Wn=/queueHooks$/,Xn=[Gn],Vn={"*":[function(e,t){var n,r,i=this.createTween(e,t),s=zn.exec(t),o=i.cur(),u=+o||0,a=1,f=20;if(s){n=+s[2],r=s[3]||(v.cssNumber[e]?"":"px");if(r!=="px"&&u){u=v.css(i.elem,e,!0)||n||1;do a=a||".5",u/=a,v.style(i.elem,e,u+r);while(a!==(a=i.cur()/o)&&a!==1&&--f)}i.unit=r,i.start=u,i.end=s[1]?u+(s[1]+1)*n:n}return i}]};v.Animation=v.extend(Kn,{tweener:function(e,t){v.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");var n,r=0,i=e.length;for(;r<i;r++)n=e[r],Vn[n]=Vn[n]||[],Vn[n].unshift(t)},prefilter:function(e,t){t?Xn.unshift(e):Xn.push(e)}}),v.Tween=Yn,Yn.prototype={constructor:Yn,init:function(e,t,n,r,i,s){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=s||(v.cssNumber[n]?"":"px")},cur:function(){var e=Yn.propHooks[this.prop];return e&&e.get?e.get(this):Yn.propHooks._default.get(this)},run:function(e){var t,n=Yn.propHooks[this.prop];return this.options.duration?this.pos=t=v.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):Yn.propHooks._default.set(this),this}},Yn.prototype.init.prototype=Yn.prototype,Yn.propHooks={_default:{get:function(e){var t;return e.elem[e.prop]==null||!!e.elem.style&&e.elem.style[e.prop]!=null?(t=v.css(e.elem,e.prop,!1,""),!t||t==="auto"?0:t):e.elem[e.prop]},set:function(e){v.fx.step[e.prop]?v.fx.step[e.prop](e):e.elem.style&&(e.elem.style[v.cssProps[e.prop]]!=null||v.cssHooks[e.prop])?v.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},Yn.propHooks.scrollTop=Yn.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},v.each(["toggle","show","hide"],function(e,t){var n=v.fn[t];v.fn[t]=function(r,i,s){return r==null||typeof r=="boolean"||!e&&v.isFunction(r)&&v.isFunction(i)?n.apply(this,arguments):this.animate(Zn(t,!0),r,i,s)}}),v.fn.extend({fadeTo:function(e,t,n,r){return this.filter(Gt).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=v.isEmptyObject(e),s=v.speed(t,n,r),o=function(){var t=Kn(this,v.extend({},e),s);i&&t.stop(!0)};return i||s.queue===!1?this.each(o):this.queue(s.queue,o)},stop:function(e,n,r){var i=function(e){var t=e.stop;delete e.stop,t(r)};return typeof e!="string"&&(r=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,n=e!=null&&e+"queueHooks",s=v.timers,o=v._data(this);if(n)o[n]&&o[n].stop&&i(o[n]);else for(n in o)o[n]&&o[n].stop&&Wn.test(n)&&i(o[n]);for(n=s.length;n--;)s[n].elem===this&&(e==null||s[n].queue===e)&&(s[n].anim.stop(r),t=!1,s.splice(n,1));(t||!r)&&v.dequeue(this,e)})}}),v.each({slideDown:Zn("show"),slideUp:Zn("hide"),slideToggle:Zn("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){v.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),v.speed=function(e,t,n){var r=e&&typeof e=="object"?v.extend({},e):{complete:n||!n&&t||v.isFunction(e)&&e,duration:e,easing:n&&t||t&&!v.isFunction(t)&&t};r.duration=v.fx.off?0:typeof r.duration=="number"?r.duration:r.duration in v.fx.speeds?v.fx.speeds[r.duration]:v.fx.speeds._default;if(r.queue==null||r.queue===!0)r.queue="fx";return r.old=r.complete,r.complete=function(){v.isFunction(r.old)&&r.old.call(this),r.queue&&v.dequeue(this,r.queue)},r},v.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},v.timers=[],v.fx=Yn.prototype.init,v.fx.tick=function(){var e,n=v.timers,r=0;qn=v.now();for(;r<n.length;r++)e=n[r],!e()&&n[r]===e&&n.splice(r--,1);n.length||v.fx.stop(),qn=t},v.fx.timer=function(e){e()&&v.timers.push(e)&&!Rn&&(Rn=setInterval(v.fx.tick,v.fx.interval))},v.fx.interval=13,v.fx.stop=function(){clearInterval(Rn),Rn=null},v.fx.speeds={slow:600,fast:200,_default:400},v.fx.step={},v.expr&&v.expr.filters&&(v.expr.filters.animated=function(e){return v.grep(v.timers,function(t){return e===t.elem}).length});var er=/^(?:body|html)$/i;v.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){v.offset.setOffset(this,e,t)});var n,r,i,s,o,u,a,f={top:0,left:0},l=this[0],c=l&&l.ownerDocument;if(!c)return;return(r=c.body)===l?v.offset.bodyOffset(l):(n=c.documentElement,v.contains(n,l)?(typeof l.getBoundingClientRect!="undefined"&&(f=l.getBoundingClientRect()),i=tr(c),s=n.clientTop||r.clientTop||0,o=n.clientLeft||r.clientLeft||0,u=i.pageYOffset||n.scrollTop,a=i.pageXOffset||n.scrollLeft,{top:f.top+u-s,left:f.left+a-o}):f)},v.offset={bodyOffset:function(e){var t=e.offsetTop,n=e.offsetLeft;return v.support.doesNotIncludeMarginInBodyOffset&&(t+=parseFloat(v.css(e,"marginTop"))||0,n+=parseFloat(v.css(e,"marginLeft"))||0),{top:t,left:n}},setOffset:function(e,t,n){var r=v.css(e,"position");r==="static"&&(e.style.position="relative");var i=v(e),s=i.offset(),o=v.css(e,"top"),u=v.css(e,"left"),a=(r==="absolute"||r==="fixed")&&v.inArray("auto",[o,u])>-1,f={},l={},c,h;a?(l=i.position(),c=l.top,h=l.left):(c=parseFloat(o)||0,h=parseFloat(u)||0),v.isFunction(t)&&(t=t.call(e,n,s)),t.top!=null&&(f.top=t.top-s.top+c),t.left!=null&&(f.left=t.left-s.left+h),"using"in t?t.using.call(e,f):i.css(f)}},v.fn.extend({position:function(){if(!this[0])return;var e=this[0],t=this.offsetParent(),n=this.offset(),r=er.test(t[0].nodeName)?{top:0,left:0}:t.offset();return n.top-=parseFloat(v.css(e,"marginTop"))||0,n.left-=parseFloat(v.css(e,"marginLeft"))||0,r.top+=parseFloat(v.css(t[0],"borderTopWidth"))||0,r.left+=parseFloat(v.css(t[0],"borderLeftWidth"))||0,{top:n.top-r.top,left:n.left-r.left}},offsetParent:function(){return this.map(function(){var e=this.offsetParent||i.body;while(e&&!er.test(e.nodeName)&&v.css(e,"position")==="static")e=e.offsetParent;return e||i.body})}}),v.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);v.fn[e]=function(i){return v.access(this,function(e,i,s){var o=tr(e);if(s===t)return o?n in o?o[n]:o.document.documentElement[i]:e[i];o?o.scrollTo(r?v(o).scrollLeft():s,r?s:v(o).scrollTop()):e[i]=s},e,i,arguments.length,null)}}),v.each({Height:"height",Width:"width"},function(e,n){v.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){v.fn[i]=function(i,s){var o=arguments.length&&(r||typeof i!="boolean"),u=r||(i===!0||s===!0?"margin":"border");return v.access(this,function(n,r,i){var s;return v.isWindow(n)?n.document.documentElement["client"+e]:n.nodeType===9?(s=n.documentElement,Math.max(n.body["scroll"+e],s["scroll"+e],n.body["offset"+e],s["offset"+e],s["client"+e])):i===t?v.css(n,r,i,u):v.style(n,r,i,u)},n,o?i:t,o,null)}})}),e.jQuery=e.$=v,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return v})})(window);
forum/static/js/base/jquery.ba-hashchange.min.js
File was created 1 /*
2 * jQuery hashchange event - v1.3 - 7/21/2010
3 * http://benalman.com/projects/jquery-hashchange-plugin/
4 *
5 * Copyright (c) 2010 "Cowboy" Ben Alman
6 * Dual licensed under the MIT and GPL licenses.
7 * http://benalman.com/about/license/
8 */
9 (function($,e,b){var c="hashchange",h=document,f,g=$.event.special,i=h.documentMode,d="on"+c in e&&(i===b||i>7);function a(j){j=j||location.href;return"#"+j.replace(/^[^#]*#?(.*)$/,"$1")}$.fn[c]=function(j){return j?this.bind(c,j):this.trigger(c)};$.fn[c].delay=50;g[c]=$.extend(g[c],{setup:function(){if(d){return false}$(f.start)},teardown:function(){if(d){return false}$(f.stop)}});f=(function(){var j={},p,m=a(),k=function(q){return q},l=k,o=k;j.start=function(){p||n()};j.stop=function(){p&&clearTimeout(p);p=b};function n(){var r=a(),q=o(m);if(r!==m){l(m=r,q);$(e).trigger(c)}else{if(q!==m){location.href=location.href.replace(/#.*/,"")+q}}p=setTimeout(n,$.fn[c].delay)}$.browser.msie&&!d&&(function(){var q,r;j.start=function(){if(!q){r=$.fn[c].src;r=r&&r+a();q=$('<iframe tabindex="-1" title="empty"/>').hide().one("load",function(){r||l(a());n()}).attr("src",r||"javascript:0").insertAfter("body")[0].contentWindow;h.onpropertychange=function(){try{if(event.propertyName==="title"){q.document.title=h.title}}catch(s){}}}};j.stop=k;o=function(){return a(q.location.href)};l=function(v,s){var u=q.document,t=$.fn[c].domain;if(v!==s){u.title=h.title;u.open();t&&u.write('<script>document.domain="'+t+'"<\/script>');u.close();q.location.hash=v}}})();return j})()})(jQuery,this);
forum/static/js/base/jquery.cookie.js
File was created 1 /*!
2 * jQuery Cookie Plugin v1.3
3 * https://github.com/carhartl/jquery-cookie
4 *
5 * Copyright 2011, Klaus Hartl
6 * Dual licensed under the MIT or GPL Version 2 licenses.
7 * http://www.opensource.org/licenses/mit-license.php
8 * http://www.opensource.org/licenses/GPL-2.0
9 */
10 (function ($, document, undefined) {
11
12 var pluses = /\+/g;
13
14 function raw(s) {
15 return s;
16 }
17
18 function decoded(s) {
19 return decodeURIComponent(s.replace(pluses, ' '));
20 }
21
22 var config = $.cookie = function (key, value, options) {
23
24 // write
25 if (value !== undefined) {
26 options = $.extend({}, config.defaults, options);
27
28 if (value === null) {
29 options.expires = -1;
30 }
31
32 if (typeof options.expires === 'number') {
33 var days = options.expires, t = options.expires = new Date();
34 t.setDate(t.getDate() + days);
35 }
36
37 value = config.json ? JSON.stringify(value) : String(value);
38
39 return (document.cookie = [
40 encodeURIComponent(key), '=', config.raw ? value : encodeURIComponent(value),
41 options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
42 options.path ? '; path=' + options.path : '',
43 options.domain ? '; domain=' + options.domain : '',
44 options.secure ? '; secure' : ''
45 ].join(''));
46 }
47
48 // read
49 var decode = config.raw ? raw : decoded;
50 var cookies = document.cookie.split('; ');
51 for (var i = 0, l = cookies.length; i < l; i++) {
52 var parts = cookies[i].split('=');
53 if (decode(parts.shift()) === key) {
54 var cookie = decode(parts.join('='));
55 return config.json ? JSON.parse(cookie) : cookie;
56 }
57 }
58
59 return null;
60 };
61
62 config.defaults = {};
63
64 $.removeCookie = function (key, options) {
65 if ($.cookie(key) !== null) {
66 $.cookie(key, null, options);
67 return true;
68 }
69 return false;
70 };
71
72 })(jQuery, document);
73
forum/static/js/base/juicer-min.js
File was created 1 (function(){var c=function(){var e=[].slice.call(arguments);e.push(c.options);if(e[0].match(/^\s*#([\w:\-\.]+)\s*$/igm)){e[0].replace(/^\s*#([\w:\-\.]+)\s*$/igm,function(h,i){var f=document;var g=f&&f.getElementById(i);e[0]=g?(g.value||g.innerHTML):h;});}if(arguments.length==1){return c.compile.apply(c,e);}if(arguments.length>=2){return c.to_html.apply(c,e);}};var d={escapehash:{"<":"&lt;",">":"&gt;","&":"&amp;",'"':"&quot;","'":"&#x27;","/":"&#x2f;"},escapereplace:function(e){return d.escapehash[e];},escaping:function(e){return typeof(e)!=="string"?e:e.replace(/[&<>"]/igm,this.escapereplace);},detection:function(e){return typeof(e)==="undefined"?"":e;}};var b=function(e){if(typeof(console)!=="undefined"){if(console.warn){console.warn(e);return;}if(console.log){console.log(e);return;}}throw (e);};var a=function(h,f){h=h!==Object(h)?{}:h;if(h.__proto__){h.__proto__=f;return h;}var g=function(){};var j=Object.create?Object.create(f):new (g.prototype=f,g);for(var e in h){if(h.hasOwnProperty(e)){j[e]=h[e];}}return j;};c.__cache={};c.version="0.6.4-stable";c.settings={};c.tags={operationOpen:"{@",operationClose:"}",interpolateOpen:"\\${",interpolateClose:"}",noneencodeOpen:"\\$\\${",noneencodeClose:"}",commentOpen:"\\{#",commentClose:"\\}"};c.options={cache:true,strip:true,errorhandling:true,detection:true,_method:a({__escapehtml:d,__throw:b,__juicer:c},{})};c.tagInit=function(){var f=c.tags.operationOpen+"each\\s*([^}]*?)\\s*as\\s*(\\w*?)\\s*(,\\s*\\w*?)?"+c.tags.operationClose;var h=c.tags.operationOpen+"\\/each"+c.tags.operationClose;var i=c.tags.operationOpen+"if\\s*([^}]*?)"+c.tags.operationClose;var j=c.tags.operationOpen+"\\/if"+c.tags.operationClose;var n=c.tags.operationOpen+"else"+c.tags.operationClose;var o=c.tags.operationOpen+"else if\\s*([^}]*?)"+c.tags.operationClose;var k=c.tags.interpolateOpen+"([\\s\\S]+?)"+c.tags.interpolateClose;var l=c.tags.noneencodeOpen+"([\\s\\S]+?)"+c.tags.noneencodeClose;var m=c.tags.commentOpen+"[^}]*?"+c.tags.commentClose;var g=c.tags.operationOpen+"each\\s*(\\w*?)\\s*in\\s*range\\(([^}]+?)\\s*,\\s*([^}]+?)\\)"+c.tags.operationClose;var e=c.tags.operationOpen+"include\\s*([^}]*?)\\s*,\\s*([^}]*?)"+c.tags.operationClose;c.settings.forstart=new RegExp(f,"igm");c.settings.forend=new RegExp(h,"igm");c.settings.ifstart=new RegExp(i,"igm");c.settings.ifend=new RegExp(j,"igm");c.settings.elsestart=new RegExp(n,"igm");c.settings.elseifstart=new RegExp(o,"igm");c.settings.interpolate=new RegExp(k,"igm");c.settings.noneencode=new RegExp(l,"igm");c.settings.inlinecomment=new RegExp(m,"igm");c.settings.rangestart=new RegExp(g,"igm");c.settings.include=new RegExp(e,"igm");};c.tagInit();c.set=function(f,j){var h=this;var e=function(i){return i.replace(/[\$\(\)\[\]\+\^\{\}\?\*\|\.]/igm,function(l){return"\\"+l;});};var k=function(l,m){var i=l.match(/^tag::(.*)$/i);if(i){h.tags[i[1]]=e(m);h.tagInit();return;}h.options[l]=m;};if(arguments.length===2){k(f,j);return;}if(f===Object(f)){for(var g in f){if(f.hasOwnProperty(g)){k(g,f[g]);}}}};c.register=function(g,f){var e=this.options._method;if(e.hasOwnProperty(g)){return false;}return e[g]=f;};c.unregister=function(f){var e=this.options._method;if(e.hasOwnProperty(f)){return delete e[f];}};c.template=function(e){var f=this;this.options=e;this.__interpolate=function(g,l,i){var h=g.split("|"),k=h[0]||"",j;if(h.length>1){g=h.shift();j=h.shift().split(",");k="_method."+j.shift()+".call({}, "+[g].concat(j)+")";}return"<%= "+(l?"_method.__escapehtml.escaping":"")+"("+(!i||i.detection!==false?"_method.__escapehtml.detection":"")+"("+k+")) %>";};this.__removeShell=function(h,g){var i=0;h=h.replace(c.settings.forstart,function(n,k,m,l){var m=m||"value",l=l&&l.substr(1);var j="i"+i++;return"<% ~function() {for(var "+j+" in "+k+") {if("+k+".hasOwnProperty("+j+")) {var "+m+"="+k+"["+j+"];"+(l?("var "+l+"="+j+";"):"")+" %>";}).replace(c.settings.forend,"<% }}}(); %>").replace(c.settings.ifstart,function(j,k){return"<% if("+k+") { %>";}).replace(c.settings.ifend,"<% } %>").replace(c.settings.elsestart,function(j){return"<% } else { %>";}).replace(c.settings.elseifstart,function(j,k){return"<% } else if("+k+") { %>";}).replace(c.settings.noneencode,function(k,j){return f.__interpolate(j,false,g);}).replace(c.settings.interpolate,function(k,j){return f.__interpolate(j,true,g);}).replace(c.settings.inlinecomment,"").replace(c.settings.rangestart,function(m,l,n,k){var j="j"+i++;return"<% ~function() {for(var "+j+"="+n+";"+j+"<"+k+";"+j+"++) {{var "+l+"="+j+"; %>";}).replace(c.settings.include,function(l,j,k){return"<%= _method.__juicer("+j+", "+k+"); %>";});if(!g||g.errorhandling!==false){h="<% try { %>"+h;h+='<% } catch(e) {_method.__throw("Juicer Render Exception: "+e.message);} %>';}return h;};this.__toNative=function(h,g){return this.__convert(h,!g||g.strip);};this.__lexicalAnalyze=function(k){var j=[];var o=[];var n="";var g=["if","each","_","_method","console","break","case","catch","continue","debugger","default","delete","do","finally","for","function","in","instanceof","new","return","switch","this","throw","try","typeof","var","void","while","with","null","typeof","class","enum","export","extends","import","super","implements","interface","let","package","private","protected","public","static","yield","const","arguments","true","false","undefined","NaN"];var m=function(r,q){if(Array.prototype.indexOf&&r.indexOf===Array.prototype.indexOf){return r.indexOf(q);}for(var p=0;p<r.length;p++){if(r[p]===q){return p;}}return -1;};var h=function(p,i){i=i.match(/\w+/igm)[0];if(m(j,i)===-1&&m(g,i)===-1&&m(o,i)===-1){if(typeof(window)!=="undefined"&&typeof(window[i])==="function"&&window[i].toString().match(/^\s*?function \w+\(\) \{\s*?\[native code\]\s*?\}\s*?$/i)){return p;}if(typeof(global)!=="undefined"&&typeof(global[i])==="function"&&global[i].toString().match(/^\s*?function \w+\(\) \{\s*?\[native code\]\s*?\}\s*?$/i)){return p;}if(typeof(c.options._method[i])==="function"){o.push(i);return p;}j.push(i);}return p;};k.replace(c.settings.forstart,h).replace(c.settings.interpolate,h).replace(c.settings.ifstart,h).replace(c.settings.elseifstart,h).replace(c.settings.include,h).replace(/[\+\-\*\/%!\?\|\^&~<>=,\(\)]\s*([A-Za-z_]+)/igm,h);for(var l=0;l<j.length;l++){n+="var "+j[l]+"=_."+j[l]+";";}for(var l=0;l<o.length;l++){n+="var "+o[l]+"=_method."+o[l]+";";}return"<% "+n+" %>";};this.__convert=function(h,i){var g=[].join("");g+="'use strict';";g+="var _=_||{};";g+="var _out='';_out+='";if(i!==false){g+=h.replace(/\\/g,"\\\\").replace(/[\r\t\n]/g," ").replace(/'(?=[^%]*%>)/g,"\t").split("'").join("\\'").split("\t").join("'").replace(/<%=(.+?)%>/g,"';_out+=$1;_out+='").split("<%").join("';").split("%>").join("_out+='")+"';return _out;";return g;}g+=h.replace(/\\/g,"\\\\").replace(/[\r]/g,"\\r").replace(/[\t]/g,"\\t").replace(/[\n]/g,"\\n").replace(/'(?=[^%]*%>)/g,"\t").split("'").join("\\'").split("\t").join("'").replace(/<%=(.+?)%>/g,"';_out+=$1;_out+='").split("<%").join("';").split("%>").join("_out+='")+"';return _out.replace(/[\\r\\n]\\s+[\\r\\n]/g, '\\r\\n');";return g;};this.parse=function(h,g){var i=this;if(!g||g.loose!==false){h=this.__lexicalAnalyze(h)+h;}h=this.__removeShell(h,g);h=this.__toNative(h,g);this._render=new Function("_, _method",h);this.render=function(k,j){if(!j||j!==f.options._method){j=a(j,f.options._method);}return i._render.call(this,k,j);};return this;};};c.compile=function(g,f){if(!f||f!==this.options){f=a(f,this.options);}try{var h=this.__cache[g]?this.__cache[g]:new this.template(this.options).parse(g,f);if(!f||f.cache!==false){this.__cache[g]=h;}return h;}catch(i){b("Juicer Compile Exception: "+i.message);return{render:function(){}};}};c.to_html=function(f,g,e){if(!e||e!==this.options){e=a(e,this.options);}return this.compile(f,e).render(g,e._method);};typeof(module)!=="undefined"&&module.exports?module.exports=c:this.juicer=c;})();
forum/static/js/base/juicer.js
File was created 1 /*
2 ********** Juicer **********
3 ${A Fast template engine}
4 Project Home: http://juicer.name
5
6 Author: Guokai
7 Gtalk: badkaikai@gmail.com
8 Blog: http://benben.cc
9 Licence: MIT License
10 Version: 0.6.4-stable
11 */
12
13 (function() {
14
15 // This is the main function for not only compiling but also rendering.
16 // there's at least two parameters need to be provided, one is the tpl,
17 // another is the data, the tpl can either be a string, or an id like #id.
18 // if only tpl was given, it'll return the compiled reusable function.
19 // if tpl and data were given at the same time, it'll return the rendered
20 // result immediately.
21
22 var juicer = function() {
23 var args = [].slice.call(arguments);
24
25 args.push(juicer.options);
26
27 if(args[0].match(/^\s*#([\w:\-\.]+)\s*$/igm)) {
28 args[0].replace(/^\s*#([\w:\-\.]+)\s*$/igm, function($, $id) {
29 var _document = document;
30 var elem = _document && _document.getElementById($id);
31 args[0] = elem ? (elem.value || elem.innerHTML) : $;
32 });
33 }
34
35 if(arguments.length == 1) {
36 return juicer.compile.apply(juicer, args);
37 }
38
39 if(arguments.length >= 2) {
40 return juicer.to_html.apply(juicer, args);
41 }
42 };
43
44 var __escapehtml = {
45 escapehash: {
46 '<': '&lt;',
47 '>': '&gt;',
48 '&': '&amp;',
49 '"': '&quot;',
50 "'": '&#x27;',
51 '/': '&#x2f;'
52 },
53 escapereplace: function(k) {
54 return __escapehtml.escapehash[k];
55 },
56 escaping: function(str) {
57 return typeof(str) !== 'string' ? str : str.replace(/[&<>"]/igm, this.escapereplace);
58 },
59 detection: function(data) {
60 return typeof(data) === 'undefined' ? '' : data;
61 }
62 };
63
64 var __throw = function(error) {
65 if(typeof(console) !== 'undefined') {
66 if(console.warn) {
67 console.warn(error);
68 return;
69 }
70
71 if(console.log) {
72 console.log(error);
73 return;
74 }
75 }
76
77 throw(error);
78 };
79
80 var __creator = function(o, proto) {
81 o = o !== Object(o) ? {} : o;
82
83 if(o.__proto__) {
84 o.__proto__ = proto;
85 return o;
86 }
87
88 var empty = function() {};
89 var n = Object.create ?
90 Object.create(proto) :
91 new(empty.prototype = proto, empty);
92
93 for(var i in o) {
94 if(o.hasOwnProperty(i)) {
95 n[i] = o[i];
96 }
97 }
98
99 return n;
100 };
101
102 juicer.__cache = {};
103 juicer.version = '0.6.4-stable';
104 juicer.settings = {};
105
106 juicer.tags = {
107 operationOpen: '{@',
108 operationClose: '}',
109 interpolateOpen: '\\${',
110 interpolateClose: '}',
111 noneencodeOpen: '\\$\\${',
112 noneencodeClose: '}',
113 commentOpen: '\\{#',
114 commentClose: '\\}'
115 };
116
117 juicer.options = {
118 cache: true,
119 strip: true,
120 errorhandling: true,
121 detection: true,
122 _method: __creator({
123 __escapehtml: __escapehtml,
124 __throw: __throw,
125 __juicer: juicer
126 }, {})
127 };
128
129 juicer.tagInit = function() {
130 var forstart = juicer.tags.operationOpen + 'each\\s*([^}]*?)\\s*as\\s*(\\w*?)\\s*(,\\s*\\w*?)?' + juicer.tags.operationClose;
131 var forend = juicer.tags.operationOpen + '\\/each' + juicer.tags.operationClose;
132 var ifstart = juicer.tags.operationOpen + 'if\\s*([^}]*?)' + juicer.tags.operationClose;
133 var ifend = juicer.tags.operationOpen + '\\/if' + juicer.tags.operationClose;
134 var elsestart = juicer.tags.operationOpen + 'else' + juicer.tags.operationClose;
135 var elseifstart = juicer.tags.operationOpen + 'else if\\s*([^}]*?)' + juicer.tags.operationClose;
136 var interpolate = juicer.tags.interpolateOpen + '([\\s\\S]+?)' + juicer.tags.interpolateClose;
137 var noneencode = juicer.tags.noneencodeOpen + '([\\s\\S]+?)' + juicer.tags.noneencodeClose;
138 var inlinecomment = juicer.tags.commentOpen + '[^}]*?' + juicer.tags.commentClose;
139 var rangestart = juicer.tags.operationOpen + 'each\\s*(\\w*?)\\s*in\\s*range\\(([^}]+?)\\s*,\\s*([^}]+?)\\)' + juicer.tags.operationClose;
140 var include = juicer.tags.operationOpen + 'include\\s*([^}]*?)\\s*,\\s*([^}]*?)' + juicer.tags.operationClose;
141
142 juicer.settings.forstart = new RegExp(forstart, 'igm');
143 juicer.settings.forend = new RegExp(forend, 'igm');
144 juicer.settings.ifstart = new RegExp(ifstart, 'igm');
145 juicer.settings.ifend = new RegExp(ifend, 'igm');
146 juicer.settings.elsestart = new RegExp(elsestart, 'igm');
147 juicer.settings.elseifstart = new RegExp(elseifstart, 'igm');
148 juicer.settings.interpolate = new RegExp(interpolate, 'igm');
149 juicer.settings.noneencode = new RegExp(noneencode, 'igm');
150 juicer.settings.inlinecomment = new RegExp(inlinecomment, 'igm');
151 juicer.settings.rangestart = new RegExp(rangestart, 'igm');
152 juicer.settings.include = new RegExp(include, 'igm');
153 };
154
155 juicer.tagInit();
156
157 // Using this method to set the options by given conf-name and conf-value,
158 // you can also provide more than one key-value pair wrapped by an object.
159 // this interface also used to custom the template tag delimater, for this
160 // situation, the conf-name must begin with tag::, for example: juicer.set
161 // ('tag::operationOpen', '{@').
162
163 juicer.set = function(conf, value) {
164 var that = this;
165
166 var escapePattern = function(v) {
167 return v.replace(/[\$\(\)\[\]\+\^\{\}\?\*\|\.]/igm, function($) {
168 return '\\' + $;
169 });
170 };
171
172 var set = function(conf, value) {
173 var tag = conf.match(/^tag::(.*)$/i);
174
175 if(tag) {
176 that.tags[tag[1]] = escapePattern(value);
177 that.tagInit();
178 return;
179 }
180
181 that.options[conf] = value;
182 };
183
184 if(arguments.length === 2) {
185 set(conf, value);
186 return;
187 }
188
189 if(conf === Object(conf)) {
190 for(var i in conf) {
191 if(conf.hasOwnProperty(i)) {
192 set(i, conf[i]);
193 }
194 }
195 }
196 };
197
198 // Before you're using custom functions in your template like ${name | fnName},
199 // you need to register this fn by juicer.register('fnName', fn).
200
201 juicer.register = function(fname, fn) {
202 var _method = this.options._method;
203
204 if(_method.hasOwnProperty(fname)) {
205 return false;
206 }
207
208 return _method[fname] = fn;
209 };
210
211 // remove the registered function in the memory by the provided function name.
212 // for example: juicer.unregister('fnName').
213
214 juicer.unregister = function(fname) {
215 var _method = this.options._method;
216
217 if(_method.hasOwnProperty(fname)) {
218 return delete _method[fname];
219 }
220 };
221
222 juicer.template = function(options) {
223 var that = this;
224
225 this.options = options;
226
227 this.__interpolate = function(_name, _escape, options) {
228 var _define = _name.split('|'), _fn = _define[0] || '', _cluster;
229
230 if(_define.length > 1) {
231 _name = _define.shift();
232 _cluster = _define.shift().split(',');
233 _fn = '_method.' + _cluster.shift() + '.call({}, ' + [_name].concat(_cluster) + ')';
234 }
235
236 return '<%= ' + (_escape ? '_method.__escapehtml.escaping' : '') + '(' +
237 (!options || options.detection !== false ? '_method.__escapehtml.detection' : '') + '(' +
238 _fn +
239 ')' +
240 ')' +
241 ' %>';
242 };
243
244 this.__removeShell = function(tpl, options) {
245 var _counter = 0;
246
247 tpl = tpl
248 // for expression
249 .replace(juicer.settings.forstart, function($, _name, alias, key) {
250 var alias = alias || 'value', key = key && key.substr(1);
251 var _iterate = 'i' + _counter++;
252 return '<% ~function() {' +
253 'for(var ' + _iterate + ' in ' + _name + ') {' +
254 'if(' + _name + '.hasOwnProperty(' + _iterate + ')) {' +
255 'var ' + alias + '=' + _name + '[' + _iterate + '];' +
256 (key ? ('var ' + key + '=' + _iterate + ';') : '') +
257 ' %>';
258 })
259 .replace(juicer.settings.forend, '<% }}}(); %>')
260
261 // if expression
262 .replace(juicer.settings.ifstart, function($, condition) {
263 return '<% if(' + condition + ') { %>';
264 })
265 .replace(juicer.settings.ifend, '<% } %>')
266
267 // else expression
268 .replace(juicer.settings.elsestart, function($) {
269 return '<% } else { %>';
270 })
271
272 // else if expression
273 .replace(juicer.settings.elseifstart, function($, condition) {
274 return '<% } else if(' + condition + ') { %>';
275 })
276
277 // interpolate without escape
278 .replace(juicer.settings.noneencode, function($, _name) {
279 return that.__interpolate(_name, false, options);
280 })
281
282 // interpolate with escape
283 .replace(juicer.settings.interpolate, function($, _name) {
284 return that.__interpolate(_name, true, options);
285 })
286
287 // clean up comments
288 .replace(juicer.settings.inlinecomment, '')
289
290 // range expression
291 .replace(juicer.settings.rangestart, function($, _name, start, end) {
292 var _iterate = 'j' + _counter++;
293 return '<% ~function() {' +
294 'for(var ' + _iterate + '=' + start + ';' + _iterate + '<' + end + ';' + _iterate + '++) {{' +
295 'var ' + _name + '=' + _iterate + ';' +
296 ' %>';
297 })
298
299 // include sub-template
300 .replace(juicer.settings.include, function($, tpl, data) {
301 return '<%= _method.__juicer(' + tpl + ', ' + data + '); %>';
302 });
303
304 // exception handling
305 if(!options || options.errorhandling !== false) {
306 tpl = '<% try { %>' + tpl;
307 tpl += '<% } catch(e) {_method.__throw("Juicer Render Exception: "+e.message);} %>';
308 }
309
310 return tpl;
311 };
312
313 this.__toNative = function(tpl, options) {
314 return this.__convert(tpl, !options || options.strip);
315 };
316
317 this.__lexicalAnalyze = function(tpl) {
318 var buffer = [];
319 var method = [];
320 var prefix = '';
321 var reserved = [
322 'if', 'each', '_', '_method', 'console',
323 'break', 'case', 'catch', 'continue', 'debugger', 'default', 'delete', 'do',
324 'finally', 'for', 'function', 'in', 'instanceof', 'new', 'return', 'switch',
325 'this', 'throw', 'try', 'typeof', 'var', 'void', 'while', 'with', 'null', 'typeof',
326 'class', 'enum', 'export', 'extends', 'import', 'super', 'implements', 'interface',
327 'let', 'package', 'private', 'protected', 'public', 'static', 'yield', 'const', 'arguments',
328 'true', 'false', 'undefined', 'NaN'
329 ];
330
331 var indexOf = function(array, item) {
332 if (Array.prototype.indexOf && array.indexOf === Array.prototype.indexOf) {
333 return array.indexOf(item);
334 }
335
336 for(var i=0; i < array.length; i++) {
337 if(array[i] === item) return i;
338 }
339
340 return -1;
341 };
342
343 var variableAnalyze = function($, statement) {
344 statement = statement.match(/\w+/igm)[0];
345
346 if(indexOf(buffer, statement) === -1 && indexOf(reserved, statement) === -1 && indexOf(method, statement) === -1) {
347
348 // avoid re-declare native function, if not do this, template
349 // `{@if encodeURIComponent(name)}` could be throw undefined.
350
351 if(typeof(window) !== 'undefined' && typeof(window[statement]) === 'function' && window[statement].toString().match(/^\s*?function \w+\(\) \{\s*?\[native code\]\s*?\}\s*?$/i)) {
352 return $;
353 }
354
355 // compatible for node.js
356 if(typeof(global) !== 'undefined' && typeof(global[statement]) === 'function' && global[statement].toString().match(/^\s*?function \w+\(\) \{\s*?\[native code\]\s*?\}\s*?$/i)) {
357 return $;
358 }
359
360 // avoid re-declare registered function, if not do this, template
361 // `{@if registered_func(name)}` could be throw undefined.
362
363 if(typeof(juicer.options._method[statement]) === 'function') {
364 method.push(statement);
365 return $;
366 }
367
368 buffer.push(statement); // fuck ie
369 }
370
371 return $;
372 };
373
374 tpl.replace(juicer.settings.forstart, variableAnalyze).
375 replace(juicer.settings.interpolate, variableAnalyze).
376 replace(juicer.settings.ifstart, variableAnalyze).
377 replace(juicer.settings.elseifstart, variableAnalyze).
378 replace(juicer.settings.include, variableAnalyze).
379 replace(/[\+\-\*\/%!\?\|\^&~<>=,\(\)]\s*([A-Za-z_]+)/igm, variableAnalyze);
380
381 for(var i = 0;i < buffer.length; i++) {
382 prefix += 'var ' + buffer[i] + '=_.' + buffer[i] + ';';
383 }
384
385 for(var i = 0;i < method.length; i++) {
386 prefix += 'var ' + method[i] + '=_method.' + method[i] + ';';
387 }
388
389 return '<% ' + prefix + ' %>';
390 };
391
392 this.__convert=function(tpl, strip) {
393 var buffer = [].join('');
394
395 buffer += "'use strict';"; // use strict mode
396 buffer += "var _=_||{};";
397 buffer += "var _out='';_out+='";
398
399 if(strip !== false) {
400 buffer += tpl
401 .replace(/\\/g, "\\\\")
402 .replace(/[\r\t\n]/g, " ")
403 .replace(/'(?=[^%]*%>)/g, "\t")
404 .split("'").join("\\'")
405 .split("\t").join("'")
406 .replace(/<%=(.+?)%>/g, "';_out+=$1;_out+='")
407 .split("<%").join("';")
408 .split("%>").join("_out+='")+
409 "';return _out;";
410
411 return buffer;
412 }
413
414 buffer += tpl
415 .replace(/\\/g, "\\\\")
416 .replace(/[\r]/g, "\\r")
417 .replace(/[\t]/g, "\\t")
418 .replace(/[\n]/g, "\\n")
419 .replace(/'(?=[^%]*%>)/g, "\t")
420 .split("'").join("\\'")
421 .split("\t").join("'")
422 .replace(/<%=(.+?)%>/g, "';_out+=$1;_out+='")
423 .split("<%").join("';")
424 .split("%>").join("_out+='")+
425 "';return _out.replace(/[\\r\\n]\\s+[\\r\\n]/g, '\\r\\n');";
426
427 return buffer;
428 };
429
430 this.parse = function(tpl, options) {
431 var _that = this;
432
433 if(!options || options.loose !== false) {
434 tpl = this.__lexicalAnalyze(tpl) + tpl;
435 }
436
437 tpl = this.__removeShell(tpl, options);
438 tpl = this.__toNative(tpl, options);
439
440 this._render = new Function('_, _method', tpl);
441
442 this.render = function(_, _method) {
443 if(!_method || _method !== that.options._method) {
444 _method = __creator(_method, that.options._method);
445 }
446
447 return _that._render.call(this, _, _method);
448 };
449
450 return this;
451 };
452 };
453
454 juicer.compile = function(tpl, options) {
455 if(!options || options !== this.options) {
456 options = __creator(options, this.options);
457 }
458
459 try {
460 var engine = this.__cache[tpl] ?
461 this.__cache[tpl] :
462 new this.template(this.options).parse(tpl, options);
463
464 if(!options || options.cache !== false) {
465 this.__cache[tpl] = engine;
466 }
467
468 return engine;
469
470 } catch(e) {
471 __throw('Juicer Compile Exception: ' + e.message);
472
473 return {
474 render: function() {} // noop
475 };
476 }
477 };
478
479 juicer.to_html = function(tpl, data, options) {
480 if(!options || options !== this.options) {
481 options = __creator(options, this.options);
482 }
483
484 return this.compile(tpl, options).render(data, options._method);
485 };
486
487 typeof(module) !== 'undefined' && module.exports ? module.exports = juicer : this.juicer = juicer;
488
489 })();
490
forum/static/js/widget/emmet.js
File was created 1 // Underscore.js 1.3.3
2 // (c) 2009-2012 Jeremy Ashkenas, DocumentCloud Inc.
3 // Underscore is freely distributable under the MIT license.
4 // Portions of Underscore are inspired or borrowed from Prototype,
5 // Oliver Steele's Functional, and John Resig's Micro-Templating.
6 // For all details and documentation:
7 // http://documentcloud.github.com/underscore
8
9 var _ = (function() {
10
11 // Baseline setup
12 // --------------
13
14 // Establish the root object, `window` in the browser, or `global` on the server.
15 var root = this;
16
17 // Save the previous value of the `_` variable.
18 var previousUnderscore = root._;
19
20 // Establish the object that gets returned to break out of a loop iteration.
21 var breaker = {};
22
23 // Save bytes in the minified (but not gzipped) version:
24 var ArrayProto = Array.prototype, ObjProto = Object.prototype, FuncProto = Function.prototype;
25
26 // Create quick reference variables for speed access to core prototypes.
27 var slice = ArrayProto.slice,
28 unshift = ArrayProto.unshift,
29 toString = ObjProto.toString,
30 hasOwnProperty = ObjProto.hasOwnProperty;
31
32 // All **ECMAScript 5** native function implementations that we hope to use
33 // are declared here.
34 var
35 nativeForEach = ArrayProto.forEach,
36 nativeMap = ArrayProto.map,
37 nativeReduce = ArrayProto.reduce,
38 nativeReduceRight = ArrayProto.reduceRight,
39 nativeFilter = ArrayProto.filter,
40 nativeEvery = ArrayProto.every,
41 nativeSome = ArrayProto.some,
42 nativeIndexOf = ArrayProto.indexOf,
43 nativeLastIndexOf = ArrayProto.lastIndexOf,
44 nativeIsArray = Array.isArray,
45 nativeKeys = Object.keys,
46 nativeBind = FuncProto.bind;
47
48 // Create a safe reference to the Underscore object for use below.
49 var _ = function(obj) { return new wrapper(obj); };
50
51 // Export the Underscore object for **Node.js**, with
52 // backwards-compatibility for the old `require()` API. If we're in
53 // the browser, add `_` as a global object via a string identifier,
54 // for Closure Compiler "advanced" mode.
55 if (typeof exports !== 'undefined') {
56 if (typeof module !== 'undefined' && module.exports) {
57 exports = module.exports = _;
58 }
59 exports._ = _;
60 } else {
61 root['_'] = _;
62 }
63
64 // Current version.
65 _.VERSION = '1.3.3';
66
67 // Collection Functions
68 // --------------------
69
70 // The cornerstone, an `each` implementation, aka `forEach`.
71 // Handles objects with the built-in `forEach`, arrays, and raw objects.
72 // Delegates to **ECMAScript 5**'s native `forEach` if available.
73 var each = _.each = _.forEach = function(obj, iterator, context) {
74 if (obj == null) return;
75 if (nativeForEach && obj.forEach === nativeForEach) {
76 obj.forEach(iterator, context);
77 } else if (obj.length === +obj.length) {
78 for (var i = 0, l = obj.length; i < l; i++) {
79 if (i in obj && iterator.call(context, obj[i], i, obj) === breaker) return;
80 }
81 } else {
82 for (var key in obj) {
83 if (_.has(obj, key)) {
84 if (iterator.call(context, obj[key], key, obj) === breaker) return;
85 }
86 }
87 }
88 };
89
90 // Return the results of applying the iterator to each element.
91 // Delegates to **ECMAScript 5**'s native `map` if available.
92 _.map = _.collect = function(obj, iterator, context) {
93 var results = [];
94 if (obj == null) return results;
95 if (nativeMap && obj.map === nativeMap) return obj.map(iterator, context);
96 each(obj, function(value, index, list) {
97 results[results.length] = iterator.call(context, value, index, list);
98 });
99 if (obj.length === +obj.length) results.length = obj.length;
100 return results;
101 };
102
103 // **Reduce** builds up a single result from a list of values, aka `inject`,
104 // or `foldl`. Delegates to **ECMAScript 5**'s native `reduce` if available.
105 _.reduce = _.foldl = _.inject = function(obj, iterator, memo, context) {
106 var initial = arguments.length > 2;
107 if (obj == null) obj = [];
108 if (nativeReduce && obj.reduce === nativeReduce) {
109 if (context) iterator = _.bind(iterator, context);
110 return initial ? obj.reduce(iterator, memo) : obj.reduce(iterator);
111 }
112 each(obj, function(value, index, list) {
113 if (!initial) {
114 memo = value;
115 initial = true;
116 } else {
117 memo = iterator.call(context, memo, value, index, list);
118 }
119 });
120 if (!initial) throw new TypeError('Reduce of empty array with no initial value');
121 return memo;
122 };
123
124 // The right-associative version of reduce, also known as `foldr`.
125 // Delegates to **ECMAScript 5**'s native `reduceRight` if available.
126 _.reduceRight = _.foldr = function(obj, iterator, memo, context) {
127 var initial = arguments.length > 2;
128 if (obj == null) obj = [];
129 if (nativeReduceRight && obj.reduceRight === nativeReduceRight) {
130 if (context) iterator = _.bind(iterator, context);
131 return initial ? obj.reduceRight(iterator, memo) : obj.reduceRight(iterator);
132 }
133 var reversed = _.toArray(obj).reverse();
134 if (context && !initial) iterator = _.bind(iterator, context);
135 return initial ? _.reduce(reversed, iterator, memo, context) : _.reduce(reversed, iterator);
136 };
137
138 // Return the first value which passes a truth test. Aliased as `detect`.
139 _.find = _.detect = function(obj, iterator, context) {
140 var result;
141 any(obj, function(value, index, list) {
142 if (iterator.call(context, value, index, list)) {
143 result = value;
144 return true;
145 }
146 });
147 return result;
148 };
149
150 // Return all the elements that pass a truth test.
151 // Delegates to **ECMAScript 5**'s native `filter` if available.
152 // Aliased as `select`.
153 _.filter = _.select = function(obj, iterator, context) {
154 var results = [];
155 if (obj == null) return results;
156 if (nativeFilter && obj.filter === nativeFilter) return obj.filter(iterator, context);
157 each(obj, function(value, index, list) {
158 if (iterator.call(context, value, index, list)) results[results.length] = value;
159 });
160 return results;
161 };
162
163 // Return all the elements for which a truth test fails.
164 _.reject = function(obj, iterator, context) {
165 var results = [];
166 if (obj == null) return results;
167 each(obj, function(value, index, list) {
168 if (!iterator.call(context, value, index, list)) results[results.length] = value;
169 });
170 return results;
171 };
172
173 // Determine whether all of the elements match a truth test.
174 // Delegates to **ECMAScript 5**'s native `every` if available.
175 // Aliased as `all`.
176 _.every = _.all = function(obj, iterator, context) {
177 var result = true;
178 if (obj == null) return result;
179 if (nativeEvery && obj.every === nativeEvery) return obj.every(iterator, context);
180 each(obj, function(value, index, list) {
181 if (!(result = result && iterator.call(context, value, index, list))) return breaker;
182 });
183 return !!result;
184 };
185
186 // Determine if at least one element in the object matches a truth test.
187 // Delegates to **ECMAScript 5**'s native `some` if available.
188 // Aliased as `any`.
189 var any = _.some = _.any = function(obj, iterator, context) {
190 iterator || (iterator = _.identity);
191 var result = false;
192 if (obj == null) return result;
193 if (nativeSome && obj.some === nativeSome) return obj.some(iterator, context);
194 each(obj, function(value, index, list) {
195 if (result || (result = iterator.call(context, value, index, list))) return breaker;
196 });
197 return !!result;
198 };
199
200 // Determine if a given value is included in the array or object using `===`.
201 // Aliased as `contains`.
202 _.include = _.contains = function(obj, target) {
203 var found = false;
204 if (obj == null) return found;
205 if (nativeIndexOf && obj.indexOf === nativeIndexOf) return obj.indexOf(target) != -1;
206 found = any(obj, function(value) {
207 return value === target;
208 });
209 return found;
210 };
211
212 // Invoke a method (with arguments) on every item in a collection.
213 _.invoke = function(obj, method) {
214 var args = slice.call(arguments, 2);
215 return _.map(obj, function(value) {
216 return (_.isFunction(method) ? method || value : value[method]).apply(value, args);
217 });
218 };
219
220 // Convenience version of a common use case of `map`: fetching a property.
221 _.pluck = function(obj, key) {
222 return _.map(obj, function(value){ return value[key]; });
223 };
224
225 // Return the maximum element or (element-based computation).
226 _.max = function(obj, iterator, context) {
227 if (!iterator && _.isArray(obj) && obj[0] === +obj[0]) return Math.max.apply(Math, obj);
228 if (!iterator && _.isEmpty(obj)) return -Infinity;
229 var result = {computed : -Infinity};
230 each(obj, function(value, index, list) {
231 var computed = iterator ? iterator.call(context, value, index, list) : value;
232 computed >= result.computed && (result = {value : value, computed : computed});
233 });
234 return result.value;
235 };
236
237 // Return the minimum element (or element-based computation).
238 _.min = function(obj, iterator, context) {
239 if (!iterator && _.isArray(obj) && obj[0] === +obj[0]) return Math.min.apply(Math, obj);
240 if (!iterator && _.isEmpty(obj)) return Infinity;
241 var result = {computed : Infinity};
242 each(obj, function(value, index, list) {
243 var computed = iterator ? iterator.call(context, value, index, list) : value;
244 computed < result.computed && (result = {value : value, computed : computed});
245 });
246 return result.value;
247 };
248
249 // Shuffle an array.
250 _.shuffle = function(obj) {
251 var shuffled = [], rand;
252 each(obj, function(value, index, list) {
253 rand = Math.floor(Math.random() * (index + 1));
254 shuffled[index] = shuffled[rand];
255 shuffled[rand] = value;
256 });
257 return shuffled;
258 };
259
260 // Sort the object's values by a criterion produced by an iterator.
261 _.sortBy = function(obj, val, context) {
262 var iterator = _.isFunction(val) ? val : function(obj) { return obj[val]; };
263 return _.pluck(_.map(obj, function(value, index, list) {
264 return {
265 value : value,
266 criteria : iterator.call(context, value, index, list)
267 };
268 }).sort(function(left, right) {
269 var a = left.criteria, b = right.criteria;
270 if (a === void 0) return 1;
271 if (b === void 0) return -1;
272 return a < b ? -1 : a > b ? 1 : 0;
273 }), 'value');
274 };
275
276 // Groups the object's values by a criterion. Pass either a string attribute
277 // to group by, or a function that returns the criterion.
278 _.groupBy = function(obj, val) {
279 var result = {};
280 var iterator = _.isFunction(val) ? val : function(obj) { return obj[val]; };
281 each(obj, function(value, index) {
282 var key = iterator(value, index);
283 (result[key] || (result[key] = [])).push(value);
284 });
285 return result;
286 };
287
288 // Use a comparator function to figure out at what index an object should
289 // be inserted so as to maintain order. Uses binary search.
290 _.sortedIndex = function(array, obj, iterator) {
291 iterator || (iterator = _.identity);
292 var low = 0, high = array.length;
293 while (low < high) {
294 var mid = (low + high) >> 1;
295 iterator(array[mid]) < iterator(obj) ? low = mid + 1 : high = mid;
296 }
297 return low;
298 };
299
300 // Safely convert anything iterable into a real, live array.
301 _.toArray = function(obj) {
302 if (!obj) return [];
303 if (_.isArray(obj)) return slice.call(obj);
304 if (_.isArguments(obj)) return slice.call(obj);
305 if (obj.toArray && _.isFunction(obj.toArray)) return obj.toArray();
306 return _.values(obj);
307 };
308
309 // Return the number of elements in an object.
310 _.size = function(obj) {
311 return _.isArray(obj) ? obj.length : _.keys(obj).length;
312 };
313
314 // Array Functions
315 // ---------------
316
317 // Get the first element of an array. Passing **n** will return the first N
318 // values in the array. Aliased as `head` and `take`. The **guard** check
319 // allows it to work with `_.map`.
320 _.first = _.head = _.take = function(array, n, guard) {
321 return (n != null) && !guard ? slice.call(array, 0, n) : array[0];
322 };
323
324 // Returns everything but the last entry of the array. Especcialy useful on
325 // the arguments object. Passing **n** will return all the values in
326 // the array, excluding the last N. The **guard** check allows it to work with
327 // `_.map`.
328 _.initial = function(array, n, guard) {
329 return slice.call(array, 0, array.length - ((n == null) || guard ? 1 : n));
330 };
331
332 // Get the last element of an array. Passing **n** will return the last N
333 // values in the array. The **guard** check allows it to work with `_.map`.
334 _.last = function(array, n, guard) {
335 if ((n != null) && !guard) {
336 return slice.call(array, Math.max(array.length - n, 0));
337 } else {
338 return array[array.length - 1];
339 }
340 };
341
342 // Returns everything but the first entry of the array. Aliased as `tail`.
343 // Especially useful on the arguments object. Passing an **index** will return
344 // the rest of the values in the array from that index onward. The **guard**
345 // check allows it to work with `_.map`.
346 _.rest = _.tail = function(array, index, guard) {
347 return slice.call(array, (index == null) || guard ? 1 : index);
348 };
349
350 // Trim out all falsy values from an array.
351 _.compact = function(array) {
352 return _.filter(array, function(value){ return !!value; });
353 };
354
355 // Return a completely flattened version of an array.
356 _.flatten = function(array, shallow) {
357 return _.reduce(array, function(memo, value) {
358 if (_.isArray(value)) return memo.concat(shallow ? value : _.flatten(value));
359 memo[memo.length] = value;
360 return memo;
361 }, []);
362 };
363
364 // Return a version of the array that does not contain the specified value(s).
365 _.without = function(array) {
366 return _.difference(array, slice.call(arguments, 1));
367 };
368
369 // Produce a duplicate-free version of the array. If the array has already
370 // been sorted, you have the option of using a faster algorithm.
371 // Aliased as `unique`.
372 _.uniq = _.unique = function(array, isSorted, iterator) {
373 var initial = iterator ? _.map(array, iterator) : array;
374 var results = [];
375 // The `isSorted` flag is irrelevant if the array only contains two elements.
376 if (array.length < 3) isSorted = true;
377 _.reduce(initial, function (memo, value, index) {
378 if (isSorted ? _.last(memo) !== value || !memo.length : !_.include(memo, value)) {
379 memo.push(value);
380 results.push(array[index]);
381 }
382 return memo;
383 }, []);
384 return results;
385 };
386
387 // Produce an array that contains the union: each distinct element from all of
388 // the passed-in arrays.
389 _.union = function() {
390 return _.uniq(_.flatten(arguments, true));
391 };
392
393 // Produce an array that contains every item shared between all the
394 // passed-in arrays. (Aliased as "intersect" for back-compat.)
395 _.intersection = _.intersect = function(array) {
396 var rest = slice.call(arguments, 1);
397 return _.filter(_.uniq(array), function(item) {
398 return _.every(rest, function(other) {
399 return _.indexOf(other, item) >= 0;
400 });
401 });
402 };
403
404 // Take the difference between one array and a number of other arrays.
405 // Only the elements present in just the first array will remain.
406 _.difference = function(array) {
407 var rest = _.flatten(slice.call(arguments, 1), true);
408 return _.filter(array, function(value){ return !_.include(rest, value); });
409 };
410
411 // Zip together multiple lists into a single array -- elements that share
412 // an index go together.
413 _.zip = function() {
414 var args = slice.call(arguments);
415 var length = _.max(_.pluck(args, 'length'));
416 var results = new Array(length);
417 for (var i = 0; i < length; i++) results[i] = _.pluck(args, "" + i);
418 return results;
419 };
420
421 // If the browser doesn't supply us with indexOf (I'm looking at you, **MSIE**),
422 // we need this function. Return the position of the first occurrence of an
423 // item in an array, or -1 if the item is not included in the array.
424 // Delegates to **ECMAScript 5**'s native `indexOf` if available.
425 // If the array is large and already in sort order, pass `true`
426 // for **isSorted** to use binary search.
427 _.indexOf = function(array, item, isSorted) {
428 if (array == null) return -1;
429 var i, l;
430 if (isSorted) {
431 i = _.sortedIndex(array, item);
432 return array[i] === item ? i : -1;
433 }
434 if (nativeIndexOf && array.indexOf === nativeIndexOf) return array.indexOf(item);
435 for (i = 0, l = array.length; i < l; i++) if (i in array && array[i] === item) return i;
436 return -1;
437 };
438
439 // Delegates to **ECMAScript 5**'s native `lastIndexOf` if available.
440 _.lastIndexOf = function(array, item) {
441 if (array == null) return -1;
442 if (nativeLastIndexOf && array.lastIndexOf === nativeLastIndexOf) return array.lastIndexOf(item);
443 var i = array.length;
444 while (i--) if (i in array && array[i] === item) return i;
445 return -1;
446 };
447
448 // Generate an integer Array containing an arithmetic progression. A port of
449 // the native Python `range()` function. See
450 // [the Python documentation](http://docs.python.org/library/functions.html#range).
451 _.range = function(start, stop, step) {
452 if (arguments.length <= 1) {
453 stop = start || 0;
454 start = 0;
455 }
456 step = arguments[2] || 1;
457
458 var len = Math.max(Math.ceil((stop - start) / step), 0);
459 var idx = 0;
460 var range = new Array(len);
461
462 while(idx < len) {
463 range[idx++] = start;
464 start += step;
465 }
466
467 return range;
468 };
469
470 // Function (ahem) Functions
471 // ------------------
472
473 // Reusable constructor function for prototype setting.
474 var ctor = function(){};
475
476 // Create a function bound to a given object (assigning `this`, and arguments,
477 // optionally). Binding with arguments is also known as `curry`.
478 // Delegates to **ECMAScript 5**'s native `Function.bind` if available.
479 // We check for `func.bind` first, to fail fast when `func` is undefined.
480 _.bind = function bind(func, context) {
481 var bound, args;
482 if (func.bind === nativeBind && nativeBind) return nativeBind.apply(func, slice.call(arguments, 1));
483 if (!_.isFunction(func)) throw new TypeError;
484 args = slice.call(arguments, 2);
485 return bound = function() {
486 if (!(this instanceof bound)) return func.apply(context, args.concat(slice.call(arguments)));
487 ctor.prototype = func.prototype;
488 var self = new ctor;
489 var result = func.apply(self, args.concat(slice.call(arguments)));
490 if (Object(result) === result) return result;
491 return self;
492 };
493 };
494
495 // Bind all of an object's methods to that object. Useful for ensuring that
496 // all callbacks defined on an object belong to it.
497 _.bindAll = function(obj) {
498 var funcs = slice.call(arguments, 1);
499 if (funcs.length == 0) funcs = _.functions(obj);
500 each(funcs, function(f) { obj[f] = _.bind(obj[f], obj); });
501 return obj;
502 };
503
504 // Memoize an expensive function by storing its results.
505 _.memoize = function(func, hasher) {
506 var memo = {};
507 hasher || (hasher = _.identity);
508 return function() {
509 var key = hasher.apply(this, arguments);
510 return _.has(memo, key) ? memo[key] : (memo[key] = func.apply(this, arguments));
511 };
512 };
513
514 // Delays a function for the given number of milliseconds, and then calls
515 // it with the arguments supplied.
516 _.delay = function(func, wait) {
517 var args = slice.call(arguments, 2);
518 return setTimeout(function(){ return func.apply(null, args); }, wait);
519 };
520
521 // Defers a function, scheduling it to run after the current call stack has
522 // cleared.
523 _.defer = function(func) {
524 return _.delay.apply(_, [func, 1].concat(slice.call(arguments, 1)));
525 };
526
527 // Returns a function, that, when invoked, will only be triggered at most once
528 // during a given window of time.
529 _.throttle = function(func, wait) {
530 var context, args, timeout, throttling, more, result;
531 var whenDone = _.debounce(function(){ more = throttling = false; }, wait);
532 return function() {
533 context = this; args = arguments;
534 var later = function() {
535 timeout = null;
536 if (more) func.apply(context, args);
537 whenDone();
538 };
539 if (!timeout) timeout = setTimeout(later, wait);
540 if (throttling) {
541 more = true;
542 } else {
543 result = func.apply(context, args);
544 }
545 whenDone();
546 throttling = true;
547 return result;
548 };
549 };
550
551 // Returns a function, that, as long as it continues to be invoked, will not
552 // be triggered. The function will be called after it stops being called for
553 // N milliseconds. If `immediate` is passed, trigger the function on the
554 // leading edge, instead of the trailing.
555 _.debounce = function(func, wait, immediate) {
556 var timeout;
557 return function() {
558 var context = this, args = arguments;
559 var later = function() {
560 timeout = null;
561 if (!immediate) func.apply(context, args);
562 };
563 if (immediate && !timeout) func.apply(context, args);
564 clearTimeout(timeout);
565 timeout = setTimeout(later, wait);
566 };
567 };
568
569 // Returns a function that will be executed at most one time, no matter how
570 // often you call it. Useful for lazy initialization.
571 _.once = function(func) {
572 var ran = false, memo;
573 return function() {
574 if (ran) return memo;
575 ran = true;
576 return memo = func.apply(this, arguments);
577 };
578 };
579
580 // Returns the first function passed as an argument to the second,
581 // allowing you to adjust arguments, run code before and after, and
582 // conditionally execute the original function.
583 _.wrap = function(func, wrapper) {
584 return function() {
585 var args = [func].concat(slice.call(arguments, 0));
586 return wrapper.apply(this, args);
587 };
588 };
589
590 // Returns a function that is the composition of a list of functions, each
591 // consuming the return value of the function that follows.
592 _.compose = function() {
593 var funcs = arguments;
594 return function() {
595 var args = arguments;
596 for (var i = funcs.length - 1; i >= 0; i--) {
597 args = [funcs[i].apply(this, args)];
598 }
599 return args[0];
600 };
601 };
602
603 // Returns a function that will only be executed after being called N times.
604 _.after = function(times, func) {
605 if (times <= 0) return func();
606 return function() {
607 if (--times < 1) { return func.apply(this, arguments); }
608 };
609 };
610
611 // Object Functions
612 // ----------------
613
614 // Retrieve the names of an object's properties.
615 // Delegates to **ECMAScript 5**'s native `Object.keys`
616 _.keys = nativeKeys || function(obj) {
617 if (obj !== Object(obj)) throw new TypeError('Invalid object');
618 var keys = [];
619 for (var key in obj) if (_.has(obj, key)) keys[keys.length] = key;
620 return keys;
621 };
622
623 // Retrieve the values of an object's properties.
624 _.values = function(obj) {
625 return _.map(obj, _.identity);
626 };
627
628 // Return a sorted list of the function names available on the object.
629 // Aliased as `methods`
630 _.functions = _.methods = function(obj) {
631 var names = [];
632 for (var key in obj) {
633 if (_.isFunction(obj[key])) names.push(key);
634 }
635 return names.sort();
636 };
637
638 // Extend a given object with all the properties in passed-in object(s).
639 _.extend = function(obj) {
640 each(slice.call(arguments, 1), function(source) {
641 for (var prop in source) {
642 obj[prop] = source[prop];
643 }
644 });
645 return obj;
646 };
647
648 // Return a copy of the object only containing the whitelisted properties.
649 _.pick = function(obj) {
650 var result = {};
651 each(_.flatten(slice.call(arguments, 1)), function(key) {
652 if (key in obj) result[key] = obj[key];
653 });
654 return result;
655 };
656
657 // Fill in a given object with default properties.
658 _.defaults = function(obj) {
659 each(slice.call(arguments, 1), function(source) {
660 for (var prop in source) {
661 if (obj[prop] == null) obj[prop] = source[prop];
662 }
663 });
664 return obj;
665 };
666
667 // Create a (shallow-cloned) duplicate of an object.
668 _.clone = function(obj) {
669 if (!_.isObject(obj)) return obj;
670 return _.isArray(obj) ? obj.slice() : _.extend({}, obj);
671 };
672
673 // Invokes interceptor with the obj, and then returns obj.
674 // The primary purpose of this method is to "tap into" a method chain, in
675 // order to perform operations on intermediate results within the chain.
676 _.tap = function(obj, interceptor) {
677 interceptor(obj);
678 return obj;
679 };
680
681 // Internal recursive comparison function.
682 function eq(a, b, stack) {
683 // Identical objects are equal. `0 === -0`, but they aren't identical.
684 // See the Harmony `egal` proposal: http://wiki.ecmascript.org/doku.php?id=harmony:egal.
685 if (a === b) return a !== 0 || 1 / a == 1 / b;
686 // A strict comparison is necessary because `null == undefined`.
687 if (a == null || b == null) return a === b;
688 // Unwrap any wrapped objects.
689 if (a._chain) a = a._wrapped;
690 if (b._chain) b = b._wrapped;
691 // Invoke a custom `isEqual` method if one is provided.
692 if (a.isEqual && _.isFunction(a.isEqual)) return a.isEqual(b);
693 if (b.isEqual && _.isFunction(b.isEqual)) return b.isEqual(a);
694 // Compare `[[Class]]` names.
695 var className = toString.call(a);
696 if (className != toString.call(b)) return false;
697 switch (className) {
698 // Strings, numbers, dates, and booleans are compared by value.
699 case '[object String]':
700 // Primitives and their corresponding object wrappers are equivalent; thus, `"5"` is
701 // equivalent to `new String("5")`.
702 return a == String(b);
703 case '[object Number]':
704 // `NaN`s are equivalent, but non-reflexive. An `egal` comparison is performed for
705 // other numeric values.
706 return a != +a ? b != +b : (a == 0 ? 1 / a == 1 / b : a == +b);
707 case '[object Date]':
708 case '[object Boolean]':
709 // Coerce dates and booleans to numeric primitive values. Dates are compared by their
710 // millisecond representations. Note that invalid dates with millisecond representations
711 // of `NaN` are not equivalent.
712 return +a == +b;
713 // RegExps are compared by their source patterns and flags.
714 case '[object RegExp]':
715 return a.source == b.source &&
716 a.global == b.global &&
717 a.multiline == b.multiline &&
718 a.ignoreCase == b.ignoreCase;
719 }
720 if (typeof a != 'object' || typeof b != 'object') return false;
721 // Assume equality for cyclic structures. The algorithm for detecting cyclic
722 // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.
723 var length = stack.length;
724 while (length--) {
725 // Linear search. Performance is inversely proportional to the number of
726 // unique nested structures.
727 if (stack[length] == a) return true;
728 }
729 // Add the first object to the stack of traversed objects.
730 stack.push(a);
731 var size = 0, result = true;
732 // Recursively compare objects and arrays.
733 if (className == '[object Array]') {
734 // Compare array lengths to determine if a deep comparison is necessary.
735 size = a.length;
736 result = size == b.length;
737 if (result) {
738 // Deep compare the contents, ignoring non-numeric properties.
739 while (size--) {
740 // Ensure commutative equality for sparse arrays.
741 if (!(result = size in a == size in b && eq(a[size], b[size], stack))) break;
742 }
743 }
744 } else {
745 // Objects with different constructors are not equivalent.
746 if ('constructor' in a != 'constructor' in b || a.constructor != b.constructor) return false;
747 // Deep compare objects.
748 for (var key in a) {
749 if (_.has(a, key)) {
750 // Count the expected number of properties.
751 size++;
752 // Deep compare each member.
753 if (!(result = _.has(b, key) && eq(a[key], b[key], stack))) break;
754 }
755 }
756 // Ensure that both objects contain the same number of properties.
757 if (result) {
758 for (key in b) {
759 if (_.has(b, key) && !(size--)) break;
760 }
761 result = !size;
762 }
763 }
764 // Remove the first object from the stack of traversed objects.
765 stack.pop();
766 return result;
767 }
768
769 // Perform a deep comparison to check if two objects are equal.
770 _.isEqual = function(a, b) {
771 return eq(a, b, []);
772 };
773
774 // Is a given array, string, or object empty?
775 // An "empty" object has no enumerable own-properties.
776 _.isEmpty = function(obj) {
777 if (obj == null) return true;
778 if (_.isArray(obj) || _.isString(obj)) return obj.length === 0;
779 for (var key in obj) if (_.has(obj, key)) return false;
780 return true;
781 };
782
783 // Is a given value a DOM element?
784 _.isElement = function(obj) {
785 return !!(obj && obj.nodeType == 1);
786 };
787
788 // Is a given value an array?
789 // Delegates to ECMA5's native Array.isArray
790 _.isArray = nativeIsArray || function(obj) {
791 return toString.call(obj) == '[object Array]';
792 };
793
794 // Is a given variable an object?
795 _.isObject = function(obj) {
796 return obj === Object(obj);
797 };
798
799 // Is a given variable an arguments object?
800 _.isArguments = function(obj) {
801 return toString.call(obj) == '[object Arguments]';
802 };
803 if (!_.isArguments(arguments)) {
804 _.isArguments = function(obj) {
805 return !!(obj && _.has(obj, 'callee'));
806 };
807 }
808
809 // Is a given value a function?
810 _.isFunction = function(obj) {
811 return toString.call(obj) == '[object Function]';
812 };
813
814 // Is a given value a string?
815 _.isString = function(obj) {
816 return toString.call(obj) == '[object String]';
817 };
818
819 // Is a given value a number?
820 _.isNumber = function(obj) {
821 return toString.call(obj) == '[object Number]';
822 };
823
824 // Is a given object a finite number?
825 _.isFinite = function(obj) {
826 return _.isNumber(obj) && isFinite(obj);
827 };
828
829 // Is the given value `NaN`?
830 _.isNaN = function(obj) {
831 // `NaN` is the only value for which `===` is not reflexive.
832 return obj !== obj;
833 };
834
835 // Is a given value a boolean?
836 _.isBoolean = function(obj) {
837 return obj === true || obj === false || toString.call(obj) == '[object Boolean]';
838 };
839
840 // Is a given value a date?
841 _.isDate = function(obj) {
842 return toString.call(obj) == '[object Date]';
843 };
844
845 // Is the given value a regular expression?
846 _.isRegExp = function(obj) {
847 return toString.call(obj) == '[object RegExp]';
848 };
849
850 // Is a given value equal to null?
851 _.isNull = function(obj) {
852 return obj === null;
853 };
854
855 // Is a given variable undefined?
856 _.isUndefined = function(obj) {
857 return obj === void 0;
858 };
859
860 // Has own property?
861 _.has = function(obj, key) {
862 return hasOwnProperty.call(obj, key);
863 };
864
865 // Utility Functions
866 // -----------------
867
868 // Run Underscore.js in *noConflict* mode, returning the `_` variable to its
869 // previous owner. Returns a reference to the Underscore object.
870 _.noConflict = function() {
871 root._ = previousUnderscore;
872 return this;
873 };
874
875 // Keep the identity function around for default iterators.
876 _.identity = function(value) {
877 return value;
878 };
879
880 // Run a function **n** times.
881 _.times = function (n, iterator, context) {
882 for (var i = 0; i < n; i++) iterator.call(context, i);
883 };
884
885 // Escape a string for HTML interpolation.
886 _.escape = function(string) {
887 return (''+string).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&#x27;').replace(/\//g,'&#x2F;');
888 };
889
890 // If the value of the named property is a function then invoke it;
891 // otherwise, return it.
892 _.result = function(object, property) {
893 if (object == null) return null;
894 var value = object[property];
895 return _.isFunction(value) ? value.call(object) : value;
896 };
897
898 // Add your own custom functions to the Underscore object, ensuring that
899 // they're correctly added to the OOP wrapper as well.
900 _.mixin = function(obj) {
901 each(_.functions(obj), function(name){
902 addToWrapper(name, _[name] = obj[name]);
903 });
904 };
905
906 // Generate a unique integer id (unique within the entire client session).
907 // Useful for temporary DOM ids.
908 var idCounter = 0;
909 _.uniqueId = function(prefix) {
910 var id = idCounter++;
911 return prefix ? prefix + id : id;
912 };
913
914 // By default, Underscore uses ERB-style template delimiters, change the
915 // following template settings to use alternative delimiters.
916 _.templateSettings = {
917 evaluate : /<%([\s\S]+?)%>/g,
918 interpolate : /<%=([\s\S]+?)%>/g,
919 escape : /<%-([\s\S]+?)%>/g
920 };
921
922 // When customizing `templateSettings`, if you don't want to define an
923 // interpolation, evaluation or escaping regex, we need one that is
924 // guaranteed not to match.
925 var noMatch = /.^/;
926
927 // Certain characters need to be escaped so that they can be put into a
928 // string literal.
929 var escapes = {
930 '\\': '\\',
931 "'": "'",
932 'r': '\r',
933 'n': '\n',
934 't': '\t',
935 'u2028': '\u2028',
936 'u2029': '\u2029'
937 };
938
939 for (var p in escapes) escapes[escapes[p]] = p;
940 var escaper = /\\|'|\r|\n|\t|\u2028|\u2029/g;
941 var unescaper = /\\(\\|'|r|n|t|u2028|u2029)/g;
942
943 // Within an interpolation, evaluation, or escaping, remove HTML escaping
944 // that had been previously added.
945 var unescape = function(code) {
946 return code.replace(unescaper, function(match, escape) {
947 return escapes[escape];
948 });
949 };
950
951 // JavaScript micro-templating, similar to John Resig's implementation.
952 // Underscore templating handles arbitrary delimiters, preserves whitespace,
953 // and correctly escapes quotes within interpolated code.
954 _.template = function(text, data, settings) {
955 settings = _.defaults(settings || {}, _.templateSettings);
956
957 // Compile the template source, taking care to escape characters that
958 // cannot be included in a string literal and then unescape them in code
959 // blocks.
960 var source = "__p+='" + text
961 .replace(escaper, function(match) {
962 return '\\' + escapes[match];
963 })
964 .replace(settings.escape || noMatch, function(match, code) {
965 return "'+\n_.escape(" + unescape(code) + ")+\n'";
966 })
967 .replace(settings.interpolate || noMatch, function(match, code) {
968 return "'+\n(" + unescape(code) + ")+\n'";
969 })
970 .replace(settings.evaluate || noMatch, function(match, code) {
971 return "';\n" + unescape(code) + "\n;__p+='";
972 }) + "';\n";
973
974 // If a variable is not specified, place data values in local scope.
975 if (!settings.variable) source = 'with(obj||{}){\n' + source + '}\n';
976
977 source = "var __p='';" +
978 "var print=function(){__p+=Array.prototype.join.call(arguments, '')};\n" +
979 source + "return __p;\n";
980
981 var render = new Function(settings.variable || 'obj', '_', source);
982 if (data) return render(data, _);
983 var template = function(data) {
984 return render.call(this, data, _);
985 };
986
987 // Provide the compiled function source as a convenience for build time
988 // precompilation.
989 template.source = 'function(' + (settings.variable || 'obj') + '){\n' +
990 source + '}';
991
992 return template;
993 };
994
995 // Add a "chain" function, which will delegate to the wrapper.
996 _.chain = function(obj) {
997 return _(obj).chain();
998 };
999
1000 // The OOP Wrapper
1001 // ---------------
1002
1003 // If Underscore is called as a function, it returns a wrapped object that
1004 // can be used OO-style. This wrapper holds altered versions of all the
1005 // underscore functions. Wrapped objects may be chained.
1006 var wrapper = function(obj) { this._wrapped = obj; };
1007
1008 // Expose `wrapper.prototype` as `_.prototype`
1009 _.prototype = wrapper.prototype;
1010
1011 // Helper function to continue chaining intermediate results.
1012 var result = function(obj, chain) {
1013 return chain ? _(obj).chain() : obj;
1014 };
1015
1016 // A method to easily add functions to the OOP wrapper.
1017 var addToWrapper = function(name, func) {
1018 wrapper.prototype[name] = function() {
1019 var args = slice.call(arguments);
1020 unshift.call(args, this._wrapped);
1021 return result(func.apply(_, args), this._chain);
1022 };
1023 };
1024
1025 // Add all of the Underscore functions to the wrapper object.
1026 _.mixin(_);
1027
1028 // Add all mutator Array functions to the wrapper.
1029 each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) {
1030 var method = ArrayProto[name];
1031 wrapper.prototype[name] = function() {
1032 var wrapped = this._wrapped;
1033 method.apply(wrapped, arguments);
1034 var length = wrapped.length;
1035 if ((name == 'shift' || name == 'splice') && length === 0) delete wrapped[0];
1036 return result(wrapped, this._chain);
1037 };
1038 });
1039
1040 // Add all accessor Array functions to the wrapper.
1041 each(['concat', 'join', 'slice'], function(name) {
1042 var method = ArrayProto[name];
1043 wrapper.prototype[name] = function() {
1044 return result(method.apply(this._wrapped, arguments), this._chain);
1045 };
1046 });
1047
1048 // Start chaining a wrapped Underscore object.
1049 wrapper.prototype.chain = function() {
1050 this._chain = true;
1051 return this;
1052 };
1053
1054 // Extracts the result from a wrapped and chained object.
1055 wrapper.prototype.value = function() {
1056 return this._wrapped;
1057 };
1058 return _;
1059 }).call({});
1060 /**
1061 * Core Emmet object, available in global scope
1062 */
1063 var emmet = (function(global) {
1064 var defaultSyntax = 'html';
1065 var defaultProfile = 'plain';
1066
1067 if (typeof _ == 'undefined') {
1068 try {
1069 // avoid collisions with RequireJS loader
1070 // also, JS obfuscators tends to translate
1071 // a["name"] to a.name, which also breaks RequireJS
1072 _ = global[['require'][0]]('underscore'); // node.js
1073 } catch (e) {}
1074 }
1075
1076 if (typeof _ == 'undefined') {
1077 throw 'Cannot access to Underscore.js lib';
1078 }
1079
1080 /** List of registered modules */
1081 var modules = {
1082 _ : _
1083 };
1084
1085 /**
1086 * Shared empty constructor function to aid in prototype-chain creation.
1087 */
1088 var ctor = function(){};
1089
1090 /**
1091 * Helper function to correctly set up the prototype chain, for subclasses.
1092 * Similar to `goog.inherits`, but uses a hash of prototype properties and
1093 * class properties to be extended.
1094 * Took it from Backbone.
1095 * @param {Object} parent
1096 * @param {Object} protoProps
1097 * @param {Object} staticProps
1098 * @returns {Object}
1099 */
1100 function inherits(parent, protoProps, staticProps) {
1101 var child;
1102
1103 // The constructor function for the new subclass is either defined by
1104 // you (the "constructor" property in your `extend` definition), or
1105 // defaulted by us to simply call the parent's constructor.
1106 if (protoProps && protoProps.hasOwnProperty('constructor')) {
1107 child = protoProps.constructor;
1108 } else {
1109 child = function() {
1110 parent.apply(this, arguments);
1111 };
1112 }
1113
1114 // Inherit class (static) properties from parent.
1115 _.extend(child, parent);
1116
1117 // Set the prototype chain to inherit from `parent`, without calling
1118 // `parent`'s constructor function.
1119 ctor.prototype = parent.prototype;
1120 child.prototype = new ctor();
1121
1122 // Add prototype properties (instance properties) to the subclass,
1123 // if supplied.
1124 if (protoProps)
1125 _.extend(child.prototype, protoProps);
1126
1127 // Add static properties to the constructor function, if supplied.
1128 if (staticProps)
1129 _.extend(child, staticProps);
1130
1131 // Correctly set child's `prototype.constructor`.
1132 child.prototype.constructor = child;
1133
1134 // Set a convenience property in case the parent's prototype is needed
1135 // later.
1136 child.__super__ = parent.prototype;
1137
1138 return child;
1139 };
1140
1141 /**
1142 * @type Function Function that loads module definition if it's not defined
1143 */
1144 var moduleLoader = null;
1145
1146 /**
1147 * Generic Emmet module loader (actually, it doesn’t load anything, just
1148 * returns module reference). Not using `require` name to avoid conflicts
1149 * with Node.js and RequireJS
1150 */
1151 function r(name) {
1152 if (!(name in modules) && moduleLoader)
1153 moduleLoader(name);
1154
1155 return modules[name];
1156 }
1157
1158 return {
1159 /**
1160 * Simple, AMD-like module definition. The module will be added into
1161 * <code>emmet</code> object and will be available via
1162 * <code>emmet.require(name)</code> or <code>emmet[name]</code>
1163 * @param {String} name
1164 * @param {Function} factory
1165 * @memberOf emmet
1166 */
1167 define: function(name, factory) {
1168 // do not let redefine existing properties
1169 if (!(name in modules)) {
1170 modules[name] = _.isFunction(factory)
1171 ? this.exec(factory)
1172 : factory;
1173 }
1174 },
1175
1176 /**
1177 * Returns reference to Emmet module
1178 * @param {String} name Module name
1179 */
1180 require: r,
1181
1182 /**
1183 * Helper method that just executes passed function but with all
1184 * important arguments like 'require' and '_'
1185 * @param {Function} fn
1186 * @param {Object} context Execution context
1187 */
1188 exec: function(fn, context) {
1189 return fn.call(context || global, _.bind(r, this), _, this);
1190 },
1191
1192 /**
1193 * The self-propagating extend function for classes.
1194 * Took it from Backbone
1195 * @param {Object} protoProps
1196 * @param {Object} classProps
1197 * @returns {Object}
1198 */
1199 extend: function(protoProps, classProps) {
1200 var child = inherits(this, protoProps, classProps);
1201 child.extend = this.extend;
1202 // a hack required to WSH inherit `toString` method
1203 if (protoProps.hasOwnProperty('toString'))
1204 child.prototype.toString = protoProps.toString;
1205 return child;
1206 },
1207
1208 /**
1209 * The essential function that expands Emmet abbreviation
1210 * @param {String} abbr Abbreviation to parse
1211 * @param {String} syntax Abbreviation's context syntax
1212 * @param {String} profile Output profile (or its name)
1213 * @param {Object} contextNode Contextual node where abbreviation is
1214 * written
1215 * @return {String}
1216 */
1217 expandAbbreviation: function(abbr, syntax, profile, contextNode) {
1218 if (!abbr) return '';
1219
1220 syntax = syntax || defaultSyntax;
1221 profile = profile || defaultProfile;
1222
1223 var filters = r('filters');
1224 var parser = r('abbreviationParser');
1225
1226 profile = r('profile').get(profile, syntax);
1227 r('tabStops').resetTabstopIndex();
1228
1229 var data = filters.extractFromAbbreviation(abbr);
1230 var outputTree = parser.parse(data[0], {
1231 syntax: syntax,
1232 contextNode: contextNode
1233 });
1234 var filtersList = filters.composeList(syntax, profile, data[1]);
1235 filters.apply(outputTree, filtersList, profile);
1236 return outputTree.toString();
1237 // return this.require('utils').replaceVariables(outputTree.toString());
1238 },
1239
1240 /**
1241 * Returns default syntax name used in abbreviation engine
1242 * @returns {String}
1243 */
1244 defaultSyntax: function() {
1245 return defaultSyntax;
1246 },
1247
1248 /**
1249 * Returns default profile name used in abbreviation engine
1250 * @returns {String}
1251 */
1252 defaultProfile: function() {
1253 return defaultProfile;
1254 },
1255
1256 /**
1257 * Log message into console if it exists
1258 */
1259 log: function() {
1260 if (global.console && global.console.log)
1261 global.console.log.apply(global.console, arguments);
1262 },
1263
1264 /**
1265 * Setups function that should synchronously load undefined modules
1266 * @param {Function} fn
1267 */
1268 setModuleLoader: function(fn) {
1269 moduleLoader = fn;
1270 }
1271 };
1272 })(this);
1273
1274 // export core for Node.JS
1275 if (typeof exports !== 'undefined') {
1276 if (typeof module !== 'undefined' && module.exports) {
1277 exports = module.exports = emmet;
1278 }
1279 exports.emmet = emmet;
1280 }/**
1281 * Emmet abbreviation parser.
1282 * Takes string abbreviation and recursively parses it into a tree. The parsed
1283 * tree can be transformed into a string representation with
1284 * <code>toString()</code> method. Note that string representation is defined
1285 * by custom processors (called <i>filters</i>), not by abbreviation parser
1286 * itself.
1287 *
1288 * This module can be extended with custom pre-/post-processors to shape-up
1289 * final tree or its representation. Actually, many features of abbreviation
1290 * engine are defined in other modules as tree processors
1291 *
1292 *
1293 * @author Sergey Chikuyonok (serge.che@gmail.com)
1294 * @link http://chikuyonok.ru
1295 * @memberOf __abbreviationParser
1296 * @constructor
1297 * @param {Function} require
1298 * @param {Underscore} _
1299 */
1300 emmet.define('abbreviationParser', function(require, _) {
1301 var reValidName = /^[\w\-\$\:@\!]+\+?$/i;
1302 var reWord = /[\w\-:\$]/;
1303
1304 var pairs = {
1305 '[': ']',
1306 '(': ')',
1307 '{': '}'
1308 };
1309
1310 var spliceFn = Array.prototype.splice;
1311
1312 var preprocessors = [];
1313 var postprocessors = [];
1314 var outputProcessors = [];
1315
1316 /**
1317 * @type AbbreviationNode
1318 */
1319 function AbbreviationNode(parent) {
1320 /** @type AbbreviationNode */
1321 this.parent = null;
1322 this.children = [];
1323 this._attributes = [];
1324
1325 /** @type String Raw abbreviation for current node */
1326 this.abbreviation = '';
1327 this.counter = 1;
1328 this._name = null;
1329 this._text = '';
1330 this.repeatCount = 1;
1331 this.hasImplicitRepeat = false;
1332
1333 /** Custom data dictionary */
1334 this._data = {};
1335
1336 // output properties
1337 this.start = '';
1338 this.end = '';
1339 this.content = '';
1340 this.padding = '';
1341 }
1342
1343 AbbreviationNode.prototype = {
1344 /**
1345 * Adds passed node as child or creates new child
1346 * @param {AbbreviationNode} child
1347 * @param {Number} position Index in children array where child should
1348 * be inserted
1349 * @return {AbbreviationNode}
1350 */
1351 addChild: function(child, position) {
1352 child = child || new AbbreviationNode;
1353 child.parent = this;
1354
1355 if (_.isUndefined(position)) {
1356 this.children.push(child);
1357 } else {
1358 this.children.splice(position, 0, child);
1359 }
1360
1361 return child;
1362 },
1363
1364 /**
1365 * Creates a deep copy of current node
1366 * @returns {AbbreviationNode}
1367 */
1368 clone: function() {
1369 var node = new AbbreviationNode();
1370 var attrs = ['abbreviation', 'counter', '_name', '_text', 'repeatCount', 'hasImplicitRepeat', 'start', 'end', 'content', 'padding'];
1371 _.each(attrs, function(a) {
1372 node[a] = this[a];
1373 }, this);
1374
1375 // clone attributes
1376 node._attributes = _.map(this._attributes, function(attr) {
1377 return _.clone(attr);
1378 });
1379
1380 node._data = _.clone(this._data);
1381
1382 // clone children
1383 node.children = _.map(this.children, function(child) {
1384 child = child.clone();
1385 child.parent = node;
1386 return child;
1387 });
1388
1389 return node;
1390 },
1391
1392 /**
1393 * Removes current node from parent‘s child list
1394 * @returns {AbbreviationNode} Current node itself
1395 */
1396 remove: function() {
1397 if (this.parent) {
1398 this.parent.children = _.without(this.parent.children, this);
1399 }
1400
1401 return this;
1402 },
1403
1404 /**
1405 * Replaces current node in parent‘s children list with passed nodes
1406 * @param {AbbreviationNode} node Replacement node or array of nodes
1407 */
1408 replace: function() {
1409 var parent = this.parent;
1410 var ix = _.indexOf(parent.children, this);
1411 var items = _.flatten(arguments);
1412 spliceFn.apply(parent.children, [ix, 1].concat(items));
1413
1414 // update parent
1415 _.each(items, function(item) {
1416 item.parent = parent;
1417 });
1418 },
1419
1420 /**
1421 * Recursively sets <code>property</code> to <code>value</code> of current
1422 * node and its children
1423 * @param {String} name Property to update
1424 * @param {Object} value New property value
1425 */
1426 updateProperty: function(name, value) {
1427 this[name] = value;
1428 _.each(this.children, function(child) {
1429 child.updateProperty(name, value);
1430 });
1431 },
1432
1433 /**
1434 * Finds first child node that matches truth test for passed
1435 * <code>fn</code> function
1436 * @param {Function} fn
1437 * @returns {AbbreviationNode}
1438 */
1439 find: function(fn) {
1440 return this.findAll(fn)[0];
1441 // if (!_.isFunction(fn)) {
1442 // var elemName = fn.toLowerCase();
1443 // fn = function(item) {return item.name().toLowerCase() == elemName;};
1444 // }
1445 //
1446 // var result = null;
1447 // _.find(this.children, function(child) {
1448 // if (fn(child)) {
1449 // return result = child;
1450 // }
1451 //
1452 // return result = child.find(fn);
1453 // });
1454 //
1455 // return result;
1456 },
1457
1458 /**
1459 * Finds all child nodes that matches truth test for passed
1460 * <code>fn</code> function
1461 * @param {Function} fn
1462 * @returns {Array}
1463 */
1464 findAll: function(fn) {
1465 if (!_.isFunction(fn)) {
1466 var elemName = fn.toLowerCase();
1467 fn = function(item) {return item.name().toLowerCase() == elemName;};
1468 }
1469
1470 var result = [];
1471 _.each(this.children, function(child) {
1472 if (fn(child))
1473 result.push(child);
1474
1475 result = result.concat(child.findAll(fn));
1476 });
1477
1478 return _.compact(result);
1479 },
1480
1481 /**
1482 * Sets/gets custom data
1483 * @param {String} name
1484 * @param {Object} value
1485 * @returns {Object}
1486 */
1487 data: function(name, value) {
1488 if (arguments.length == 2) {
1489 this._data[name] = value;
1490
1491 if (name == 'resource' && require('elements').is(value, 'snippet')) {
1492 // setting snippet as matched resource: update `content`
1493 // property with snippet value
1494 this.content = value.data;
1495 if (this._text) {
1496 this.content = require('abbreviationUtils')
1497 .insertChildContent(value.data, this._text);
1498 }
1499 }
1500 }
1501
1502 return this._data[name];
1503 },
1504
1505 /**
1506 * Returns name of current node
1507 * @returns {String}
1508 */
1509 name: function() {
1510 var res = this.matchedResource();
1511 if (require('elements').is(res, 'element')) {
1512 return res.name;
1513 }
1514
1515 return this._name;
1516 },
1517
1518 /**
1519 * Returns list of attributes for current node
1520 * @returns {Array}
1521 */
1522 attributeList: function() {
1523 var attrs = [];
1524
1525 var res = this.matchedResource();
1526 if (require('elements').is(res, 'element') && _.isArray(res.attributes)) {
1527 attrs = attrs.concat(res.attributes);
1528 }
1529
1530 return optimizeAttributes(attrs.concat(this._attributes));
1531 },
1532
1533 /**
1534 * Returns or sets attribute value
1535 * @param {String} name Attribute name
1536 * @param {String} value New attribute value
1537 * @returns {String}
1538 */
1539 attribute: function(name, value) {
1540 if (arguments.length == 2) {
1541 // modifying attribute
1542 var ix = _.indexOf(_.pluck(this._attributes, 'name'), name.toLowerCase());
1543 if (~ix) {
1544 this._attributes[ix].value = value;
1545 } else {
1546 this._attributes.push({
1547 name: name,
1548 value: value
1549 });
1550 }
1551 }
1552
1553 return (_.find(this.attributeList(), function(attr) {
1554 return attr.name == name;
1555 }) || {}).value;
1556 },
1557
1558 /**
1559 * Returns reference to the matched <code>element</code>, if any.
1560 * See {@link elements} module for a list of available elements
1561 * @returns {Object}
1562 */
1563 matchedResource: function() {
1564 return this.data('resource');
1565 },
1566
1567 /**
1568 * Returns index of current node in parent‘s children list
1569 * @returns {Number}
1570 */
1571 index: function() {
1572 return this.parent ? _.indexOf(this.parent.children, this) : -1;
1573 },
1574
1575 /**
1576 * Sets how many times current element should be repeated
1577 * @private
1578 */
1579 _setRepeat: function(count) {
1580 if (count) {
1581 this.repeatCount = parseInt(count, 10) || 1;
1582 } else {
1583 this.hasImplicitRepeat = true;
1584 }
1585 },
1586
1587 /**
1588 * Sets abbreviation that belongs to current node
1589 * @param {String} abbr
1590 */
1591 setAbbreviation: function(abbr) {
1592 abbr = abbr || '';
1593
1594 var that = this;
1595
1596 // find multiplier
1597 abbr = abbr.replace(/\*(\d+)?$/, function(str, repeatCount) {
1598 that._setRepeat(repeatCount);
1599 return '';
1600 });
1601
1602 this.abbreviation = abbr;
1603
1604 var abbrText = extractText(abbr);
1605 if (abbrText) {
1606 abbr = abbrText.element;
1607 this.content = this._text = abbrText.text;
1608 }
1609
1610 var abbrAttrs = parseAttributes(abbr);
1611 if (abbrAttrs) {
1612 abbr = abbrAttrs.element;
1613 this._attributes = abbrAttrs.attributes;
1614 }
1615
1616 this._name = abbr;
1617
1618 // validate name
1619 if (this._name && !reValidName.test(this._name)) {
1620 throw 'Invalid abbreviation';
1621 }
1622 },
1623
1624 /**
1625 * Returns string representation of current node
1626 * @return {String}
1627 */
1628 toString: function() {
1629 var utils = require('utils');
1630
1631 var start = this.start;
1632 var end = this.end;
1633 var content = this.content;
1634
1635 // apply output processors
1636 var node = this;
1637 _.each(outputProcessors, function(fn) {
1638 start = fn(start, node, 'start');
1639 content = fn(content, node, 'content');
1640 end = fn(end, node, 'end');
1641 });
1642
1643
1644 var innerContent = _.map(this.children, function(child) {
1645 return child.toString();
1646 }).join('');
1647
1648 content = require('abbreviationUtils').insertChildContent(content, innerContent, {
1649 keepVariable: false
1650 });
1651
1652 return start + utils.padString(content, this.padding) + end;
1653 },
1654
1655 /**
1656 * Check if current node contains children with empty <code>expr</code>
1657 * property
1658 * @return {Boolean}
1659 */
1660 hasEmptyChildren: function() {
1661 return !!_.find(this.children, function(child) {
1662 return child.isEmpty();
1663 });
1664 },
1665
1666 /**
1667 * Check if current node has implied name that should be resolved
1668 * @returns {Boolean}
1669 */
1670 hasImplicitName: function() {
1671 return !this._name && !this.isTextNode();
1672 },
1673
1674 /**
1675 * Indicates that current element is a grouping one, e.g. has no
1676 * representation but serves as a container for other nodes
1677 * @returns {Boolean}
1678 */
1679 isGroup: function() {
1680 return !this.abbreviation;
1681 },
1682
1683 /**
1684 * Indicates empty node (i.e. without abbreviation). It may be a
1685 * grouping node and should not be outputted
1686 * @return {Boolean}
1687 */
1688 isEmpty: function() {
1689 return !this.abbreviation && !this.children.length;
1690 },
1691
1692 /**
1693 * Indicates that current node should be repeated
1694 * @returns {Boolean}
1695 */
1696 isRepeating: function() {
1697 return this.repeatCount > 1 || this.hasImplicitRepeat;
1698 },
1699
1700 /**
1701 * Check if current node is a text-only node
1702 * @return {Boolean}
1703 */
1704 isTextNode: function() {
1705 return !this.name() && !this.attributeList().length;
1706 },
1707
1708 /**
1709 * Indicates whether this node may be used to build elements or snippets
1710 * @returns {Boolean}
1711 */
1712 isElement: function() {
1713 return !this.isEmpty() && !this.isTextNode();
1714 },
1715
1716 /**
1717 * Returns latest and deepest child of current tree
1718 * @returns {AbbreviationNode}
1719 */
1720 deepestChild: function() {
1721 if (!this.children.length)
1722 return null;
1723
1724 var deepestChild = this;
1725 while (deepestChild.children.length) {
1726 deepestChild = _.last(deepestChild.children);
1727 }
1728
1729 return deepestChild;
1730 }
1731 };
1732
1733 /**
1734 * Returns stripped string: a string without first and last character.
1735 * Used for “unquoting” strings
1736 * @param {String} str
1737 * @returns {String}
1738 */
1739 function stripped(str) {
1740 return str.substring(1, str.length - 1);
1741 }
1742
1743 function consumeQuotedValue(stream, quote) {
1744 var ch;
1745 while (ch = stream.next()) {
1746 if (ch === quote)
1747 return true;
1748
1749 if (ch == '\\')
1750 continue;
1751 }
1752
1753 return false;
1754 }
1755
1756 /**
1757 * Parses abbreviation into a tree
1758 * @param {String} abbr
1759 * @returns {AbbreviationNode}
1760 */
1761 function parseAbbreviation(abbr) {
1762 abbr = require('utils').trim(abbr);
1763
1764 var root = new AbbreviationNode;
1765 var context = root.addChild(), ch;
1766
1767 /** @type StringStream */
1768 var stream = require('stringStream').create(abbr);
1769 var loopProtector = 1000, multiplier;
1770
1771 while (!stream.eol() && --loopProtector > 0) {
1772 ch = stream.peek();
1773
1774 switch (ch) {
1775 case '(': // abbreviation group
1776 stream.start = stream.pos;
1777 if (stream.skipToPair('(', ')')) {
1778 var inner = parseAbbreviation(stripped(stream.current()));
1779 if (multiplier = stream.match(/^\*(\d+)?/, true)) {
1780 context._setRepeat(multiplier[1]);
1781 }
1782
1783 _.each(inner.children, function(child) {
1784 context.addChild(child);
1785 });
1786 } else {
1787 throw 'Invalid abbreviation: mo matching ")" found for character at ' + stream.pos;
1788 }
1789 break;
1790
1791 case '>': // child operator
1792 context = context.addChild();
1793 stream.next();
1794 break;
1795
1796 case '+': // sibling operator
1797 context = context.parent.addChild();
1798 stream.next();
1799 break;
1800
1801 case '^': // climb up operator
1802 var parent = context.parent || context;
1803 context = (parent.parent || parent).addChild();
1804 stream.next();
1805 break;
1806
1807 default: // consume abbreviation
1808 stream.start = stream.pos;
1809 stream.eatWhile(function(c) {
1810 if (c == '[' || c == '{') {
1811 if (stream.skipToPair(c, pairs[c])) {
1812 stream.backUp(1);
1813 return true;
1814 }
1815
1816 throw 'Invalid abbreviation: mo matching "' + pairs[c] + '" found for character at ' + stream.pos;
1817 }
1818
1819 if (c == '+') {
1820 // let's see if this is an expando marker
1821 stream.next();
1822 var isMarker = stream.eol() || ~'+>^*'.indexOf(stream.peek());
1823 stream.backUp(1);
1824 return isMarker;
1825 }
1826
1827 return c != '(' && isAllowedChar(c);
1828 });
1829
1830 context.setAbbreviation(stream.current());
1831 stream.start = stream.pos;
1832 }
1833 }
1834
1835 if (loopProtector < 1)
1836 throw 'Endless loop detected';
1837
1838 return root;
1839 }
1840
1841 /**
1842 * Extract attributes and their values from attribute set:
1843 * <code>[attr col=3 title="Quoted string"]</code>
1844 * @param {String} attrSet
1845 * @returns {Array}
1846 */
1847 function extractAttributes(attrSet, attrs) {
1848 attrSet = require('utils').trim(attrSet);
1849 var result = [];
1850
1851 /** @type StringStream */
1852 var stream = require('stringStream').create(attrSet);
1853 stream.eatSpace();
1854
1855 while (!stream.eol()) {
1856 stream.start = stream.pos;
1857 if (stream.eatWhile(reWord)) {
1858 var attrName = stream.current();
1859 var attrValue = '';
1860 if (stream.peek() == '=') {
1861 stream.next();
1862 stream.start = stream.pos;
1863 var quote = stream.peek();
1864
1865 if (quote == '"' || quote == "'") {
1866 stream.next();
1867 if (consumeQuotedValue(stream, quote)) {
1868 attrValue = stream.current();
1869 // strip quotes
1870 attrValue = attrValue.substring(1, attrValue.length - 1);
1871 } else {
1872 throw 'Invalid attribute value';
1873 }
1874 } else if (stream.eatWhile(/[^\s\]]/)) {
1875 attrValue = stream.current();
1876 } else {
1877 throw 'Invalid attribute value';
1878 }
1879 }
1880
1881 result.push({
1882 name: attrName,
1883 value: attrValue
1884 });
1885 stream.eatSpace();
1886 } else {
1887 break;
1888 }
1889 }
1890
1891 return result;
1892 }
1893
1894 /**
1895 * Parses tag attributes extracted from abbreviation. If attributes found,
1896 * returns object with <code>element</code> and <code>attributes</code>
1897 * properties
1898 * @param {String} abbr
1899 * @returns {Object} Returns <code>null</code> if no attributes found in
1900 * abbreviation
1901 */
1902 function parseAttributes(abbr) {
1903 /*
1904 * Example of incoming data:
1905 * #header
1906 * .some.data
1907 * .some.data#header
1908 * [attr]
1909 * #item[attr=Hello other="World"].class
1910 */
1911 var result = [];
1912 var attrMap = {'#': 'id', '.': 'class'};
1913 var nameEnd = null;
1914
1915 /** @type StringStream */
1916 var stream = require('stringStream').create(abbr);
1917 while (!stream.eol()) {
1918 switch (stream.peek()) {
1919 case '#': // id
1920 case '.': // class
1921 if (nameEnd === null)
1922 nameEnd = stream.pos;
1923
1924 var attrName = attrMap[stream.peek()];
1925
1926 stream.next();
1927 stream.start = stream.pos;
1928 stream.eatWhile(reWord);
1929 result.push({
1930 name: attrName,
1931 value: stream.current()
1932 });
1933 break;
1934 case '[': //begin attribute set
1935 if (nameEnd === null)
1936 nameEnd = stream.pos;
1937
1938 stream.start = stream.pos;
1939 if (!stream.skipToPair('[', ']'))
1940 throw 'Invalid attribute set definition';
1941
1942 result = result.concat(
1943 extractAttributes(stripped(stream.current()))
1944 );
1945 break;
1946 default:
1947 stream.next();
1948 }
1949 }
1950
1951 if (!result.length)
1952 return null;
1953
1954 return {
1955 element: abbr.substring(0, nameEnd),
1956 attributes: optimizeAttributes(result)
1957 };
1958 }
1959
1960 /**
1961 * Optimize attribute set: remove duplicates and merge class attributes
1962 * @param attrs
1963 */
1964 function optimizeAttributes(attrs) {
1965 // clone all attributes to make sure that original objects are
1966 // not modified
1967 attrs = _.map(attrs, function(attr) {
1968 return _.clone(attr);
1969 });
1970
1971 var lookup = {};
1972 return _.filter(attrs, function(attr) {
1973 if (!(attr.name in lookup)) {
1974 return lookup[attr.name] = attr;
1975 }
1976
1977 var la = lookup[attr.name];
1978
1979 if (attr.name.toLowerCase() == 'class') {
1980 la.value += (la.value.length ? ' ' : '') + attr.value;
1981 } else {
1982 la.value = attr.value;
1983 }
1984
1985 return false;
1986 });
1987 }
1988
1989 /**
1990 * Extract text data from abbreviation: if <code>a{hello}</code> abbreviation
1991 * is passed, returns object <code>{element: 'a', text: 'hello'}</code>.
1992 * If nothing found, returns <code>null</code>
1993 * @param {String} abbr
1994 *
1995 */
1996 function extractText(abbr) {
1997 if (!~abbr.indexOf('{'))
1998 return null;
1999
2000 /** @type StringStream */
2001 var stream = require('stringStream').create(abbr);
2002 while (!stream.eol()) {
2003 switch (stream.peek()) {
2004 case '[':
2005 case '(':
2006 stream.skipToPair(stream.peek(), pairs[stream.peek()]); break;
2007
2008 case '{':
2009 stream.start = stream.pos;
2010 stream.skipToPair('{', '}');
2011 return {
2012 element: abbr.substring(0, stream.start),
2013 text: stripped(stream.current())
2014 };
2015
2016 default:
2017 stream.next();
2018 }
2019 }
2020 }
2021
2022 /**
2023 * “Un-rolls“ contents of current node: recursively replaces all repeating
2024 * children with their repeated clones
2025 * @param {AbbreviationNode} node
2026 * @returns {AbbreviationNode}
2027 */
2028 function unroll(node) {
2029 for (var i = node.children.length - 1, j, child; i >= 0; i--) {
2030 child = node.children[i];
2031
2032 if (child.isRepeating()) {
2033 j = child.repeatCount;
2034 child.repeatCount = 1;
2035 child.updateProperty('counter', 1);
2036 while (--j > 0) {
2037 child.parent.addChild(child.clone(), i + 1)
2038 .updateProperty('counter', j + 1);
2039 }
2040 }
2041 }
2042
2043 // to keep proper 'counter' property, we need to walk
2044 // on children once again
2045 _.each(node.children, unroll);
2046
2047 return node;
2048 }
2049
2050 /**
2051 * Optimizes tree node: replaces empty nodes with their children
2052 * @param {AbbreviationNode} node
2053 * @return {AbbreviationNode}
2054 */
2055 function squash(node) {
2056 for (var i = node.children.length - 1; i >= 0; i--) {
2057 /** @type AbbreviationNode */
2058 var n = node.children[i];
2059 if (n.isGroup()) {
2060 n.replace(squash(n).children);
2061 } else if (n.isEmpty()) {
2062 n.remove();
2063 }
2064 }
2065
2066 _.each(node.children, squash);
2067
2068 return node;
2069 }
2070
2071 function isAllowedChar(ch) {
2072 var charCode = ch.charCodeAt(0);
2073 var specialChars = '#.*:$-_!@|';
2074
2075 return (charCode > 64 && charCode < 91) // uppercase letter
2076 || (charCode > 96 && charCode < 123) // lowercase letter
2077 || (charCode > 47 && charCode < 58) // number
2078 || specialChars.indexOf(ch) != -1; // special character
2079 }
2080
2081 // XXX add counter replacer function as output processor
2082 outputProcessors.push(function(text, node) {
2083 return require('utils').replaceCounter(text, node.counter);
2084 });
2085
2086 return {
2087 /**
2088 * Parses abbreviation into tree with respect of groups,
2089 * text nodes and attributes. Each node of the tree is a single
2090 * abbreviation. Tree represents actual structure of the outputted
2091 * result
2092 * @memberOf abbreviationParser
2093 * @param {String} abbr Abbreviation to parse
2094 * @param {Object} options Additional options for parser and processors
2095 *
2096 * @return {AbbreviationNode}
2097 */
2098 parse: function(abbr, options) {
2099 options = options || {};
2100
2101 var tree = parseAbbreviation(abbr);
2102
2103 if (options.contextNode) {
2104 // add info about context node –
2105 // a parent XHTML node in editor inside which abbreviation is
2106 // expanded
2107 tree._name = options.contextNode.name;
2108 var attrLookup = {};
2109 _.each(tree._attributes, function(attr) {
2110 attrLookup[attr.name] = attr;
2111 });
2112
2113 _.each(options.contextNode.attributes, function(attr) {
2114 if (attr.name in attrLookup) {
2115 attrLookup[attr.name].value = attr.value;
2116 } else {
2117 attr = _.clone(attr);
2118 tree._attributes.push(attr);
2119 attrLookup[attr.name] = attr;
2120 }
2121 });
2122 }
2123
2124
2125 // apply preprocessors
2126 _.each(preprocessors, function(fn) {
2127 fn(tree, options);
2128 });
2129
2130 tree = squash(unroll(tree));
2131
2132 // apply postprocessors
2133 _.each(postprocessors, function(fn) {
2134 fn(tree, options);
2135 });
2136
2137 return tree;
2138 },
2139
2140 AbbreviationNode: AbbreviationNode,
2141
2142 /**
2143 * Add new abbreviation preprocessor. <i>Preprocessor</i> is a function
2144 * that applies to a parsed abbreviation tree right after it get parsed.
2145 * The passed tree is in unoptimized state.
2146 * @param {Function} fn Preprocessor function. This function receives
2147 * two arguments: parsed abbreviation tree (<code>AbbreviationNode</code>)
2148 * and <code>options</code> hash that was passed to <code>parse</code>
2149 * method
2150 */
2151 addPreprocessor: function(fn) {
2152 if (!_.include(preprocessors, fn))
2153 preprocessors.push(fn);
2154 },
2155
2156 /**
2157 * Removes registered preprocessor
2158 */
2159 removeFilter: function(fn) {
2160 preprocessor = _.without(preprocessors, fn);
2161 },
2162
2163 /**
2164 * Adds new abbreviation postprocessor. <i>Postprocessor</i> is a
2165 * functinon that applies to <i>optimized</i> parsed abbreviation tree
2166 * right before it returns from <code>parse()</code> method
2167 * @param {Function} fn Postprocessor function. This function receives
2168 * two arguments: parsed abbreviation tree (<code>AbbreviationNode</code>)
2169 * and <code>options</code> hash that was passed to <code>parse</code>
2170 * method
2171 */
2172 addPostprocessor: function(fn) {
2173 if (!_.include(postprocessors, fn))
2174 postprocessors.push(fn);
2175 },
2176
2177 /**
2178 * Removes registered postprocessor function
2179 */
2180 removePostprocessor: function(fn) {
2181 postprocessors = _.without(postprocessors, fn);
2182 },
2183
2184 /**
2185 * Registers output postprocessor. <i>Output processor</i> is a
2186 * function that applies to output part (<code>start</code>,
2187 * <code>end</code> and <code>content</code>) when
2188 * <code>AbbreviationNode.toString()</code> method is called
2189 */
2190 addOutputProcessor: function(fn) {
2191 if (!_.include(outputProcessors, fn))
2192 outputProcessors.push(fn);
2193 },
2194
2195 /**
2196 * Removes registered output processor
2197 */
2198 removeOutputProcessor: function(fn) {
2199 outputProcessors = _.without(outputProcessors, fn);
2200 },
2201
2202 /**
2203 * Check if passed symbol is valid symbol for abbreviation expression
2204 * @param {String} ch
2205 * @return {Boolean}
2206 */
2207 isAllowedChar: function(ch) {
2208 ch = String(ch); // convert Java object to JS
2209 return isAllowedChar(ch) || ~'>+^[](){}'.indexOf(ch);
2210 }
2211 };
2212 });/**
2213 * Processor function that matches parsed <code>AbbreviationNode</code>
2214 * against resources defined in <code>resource</code> module
2215 * @param {Function} require
2216 * @param {Underscore} _
2217 */
2218 emmet.exec(function(require, _) {
2219 /**
2220 * Finds matched resources for child nodes of passed <code>node</code>
2221 * element. A matched resource is a reference to <i>snippets.json</i> entry
2222 * that describes output of parsed node
2223 * @param {AbbreviationNode} node
2224 * @param {String} syntax
2225 */
2226 function matchResources(node, syntax) {
2227 var resources = require('resources');
2228 var elements = require('elements');
2229 var parser = require('abbreviationParser');
2230
2231 // do a shallow copy because the children list can be modified during
2232 // resource matching
2233 _.each(_.clone(node.children), /** @param {AbbreviationNode} child */ function(child) {
2234 var r = resources.getMatchedResource(child, syntax);
2235 if (_.isString(r)) {
2236 child.data('resource', elements.create('snippet', r));
2237 } else if (elements.is(r, 'reference')) {
2238 // it’s a reference to another abbreviation:
2239 // parse it and insert instead of current child
2240 /** @type AbbreviationNode */
2241 var subtree = parser.parse(r.data, {
2242 syntax: syntax
2243 });
2244
2245 // if context element should be repeated, check if we need to
2246 // transfer repeated element to specific child node
2247 if (child.repeatCount > 1) {
2248 var repeatedChildren = subtree.findAll(function(node) {
2249 return node.hasImplicitRepeat;
2250 });
2251
2252 _.each(repeatedChildren, function(node) {
2253 node.repeatCount = child.repeatCount;
2254 node.hasImplicitRepeat = false;
2255 });
2256 }
2257
2258 // move child‘s children into the deepest child of new subtree
2259 var deepestChild = subtree.deepestChild();
2260 if (deepestChild) {
2261 _.each(child.children, function(c) {
2262 deepestChild.addChild(c);
2263 });
2264 }
2265
2266 // copy current attributes to children
2267 _.each(subtree.children, function(node) {
2268 _.each(child.attributeList(), function(attr) {
2269 node.attribute(attr.name, attr.value);
2270 });
2271 });
2272
2273 child.replace(subtree.children);
2274 } else {
2275 child.data('resource', r);
2276 }
2277
2278 matchResources(child, syntax);
2279 });
2280 }
2281
2282 // XXX register abbreviation filter that creates references to resources
2283 // on abbreviation nodes
2284 /**
2285 * @param {AbbreviationNode} tree
2286 */
2287 require('abbreviationParser').addPreprocessor(function(tree, options) {
2288 var syntax = options.syntax || emmet.defaultSyntax();
2289 matchResources(tree, syntax);
2290 });
2291
2292 });/**
2293 * Pasted content abbreviation processor. A pasted content is a content that
2294 * should be inserted into implicitly repeated abbreviation nodes.
2295 * This processor powers “Wrap With Abbreviation” action
2296 * @param {Function} require
2297 * @param {Underscore} _
2298 */
2299 emmet.exec(function(require, _) {
2300 var parser = require('abbreviationParser');
2301 var outputPlaceholder = '$#';
2302
2303 /**
2304 * Locates output placeholders inside text
2305 * @param {String} text
2306 * @returns {Array} Array of ranges of output placeholder in text
2307 */
2308 function locateOutputPlaceholder(text) {
2309 var range = require('range');
2310 var result = [];
2311
2312 /** @type StringStream */
2313 var stream = require('stringStream').create(text);
2314
2315 while (!stream.eol()) {
2316 if (stream.peek() == '\\') {
2317 stream.next();
2318 } else {
2319 stream.start = stream.pos;
2320 if (stream.match(outputPlaceholder, true)) {
2321 result.push(range.create(stream.start, outputPlaceholder));
2322 continue;
2323 }
2324 }
2325 stream.next();
2326 }
2327
2328 return result;
2329 }
2330
2331 /**
2332 * Replaces output placeholders inside <code>source</code> with
2333 * <code>value</code>
2334 * @param {String} source
2335 * @param {String} value
2336 * @returns {String}
2337 */
2338 function replaceOutputPlaceholders(source, value) {
2339 var utils = require('utils');
2340 var ranges = locateOutputPlaceholder(source);
2341
2342 ranges.reverse();
2343 _.each(ranges, function(r) {
2344 source = utils.replaceSubstring(source, value, r);
2345 });
2346
2347 return source;
2348 }
2349
2350 /**
2351 * Check if parsed node contains output placeholder – a target where
2352 * pasted content should be inserted
2353 * @param {AbbreviationNode} node
2354 * @returns {Boolean}
2355 */
2356 function hasOutputPlaceholder(node) {
2357 if (locateOutputPlaceholder(node.content).length)
2358 return true;
2359
2360 // check if attributes contains placeholder
2361 return !!_.find(node.attributeList(), function(attr) {
2362 return !!locateOutputPlaceholder(attr.value).length;
2363 });
2364 }
2365
2366 /**
2367 * Insert pasted content into correct positions of parsed node
2368 * @param {AbbreviationNode} node
2369 * @param {String} content
2370 * @param {Boolean} overwrite Overwrite node content if no value placeholders
2371 * found instead of appending to existing content
2372 */
2373 function insertPastedContent(node, content, overwrite) {
2374 var nodesWithPlaceholders = node.findAll(function(item) {
2375 return hasOutputPlaceholder(item);
2376 });
2377
2378 if (hasOutputPlaceholder(node))
2379 nodesWithPlaceholders.unshift(node);
2380
2381 if (nodesWithPlaceholders.length) {
2382 _.each(nodesWithPlaceholders, function(item) {
2383 item.content = replaceOutputPlaceholders(item.content, content);
2384 _.each(item._attributes, function(attr) {
2385 attr.value = replaceOutputPlaceholders(attr.value, content);
2386 });
2387 });
2388 } else {
2389 // on output placeholders in subtree, insert content in the deepest
2390 // child node
2391 var deepest = node.deepestChild() || node;
2392 if (overwrite) {
2393 deepest.content = content;
2394 } else {
2395 deepest.content = require('abbreviationUtils').insertChildContent(deepest.content, content);
2396 }
2397 }
2398 }
2399
2400 /**
2401 * @param {AbbreviationNode} tree
2402 * @param {Object} options
2403 */
2404 parser.addPreprocessor(function(tree, options) {
2405 if (options.pastedContent) {
2406 var utils = require('utils');
2407 var lines = _.map(utils.splitByLines(options.pastedContent, true), utils.trim);
2408
2409 // set repeat count for implicitly repeated elements before
2410 // tree is unrolled
2411 tree.findAll(function(item) {
2412 if (item.hasImplicitRepeat) {
2413 item.data('paste', lines);
2414 return item.repeatCount = lines.length;
2415 }
2416 });
2417 }
2418 });
2419
2420 /**
2421 * @param {AbbreviationNode} tree
2422 * @param {Object} options
2423 */
2424 parser.addPostprocessor(function(tree, options) {
2425 // for each node with pasted content, update text data
2426 var targets = tree.findAll(function(item) {
2427 var pastedContentObj = item.data('paste');
2428 var pastedContent = '';
2429 if (_.isArray(pastedContentObj)) {
2430 pastedContent = pastedContentObj[item.counter - 1];
2431 } else if (_.isFunction(pastedContentObj)) {
2432 pastedContent = pastedContentObj(item.counter - 1, item.content);
2433 } else if (pastedContentObj) {
2434 pastedContent = pastedContentObj;
2435 }
2436
2437 if (pastedContent) {
2438 insertPastedContent(item, pastedContent, !!item.data('pasteOverwrites'));
2439 }
2440
2441 item.data('paste', null);
2442 return !_.isUndefined(pastedContentObj);
2443 });
2444
2445 if (!targets.length && options.pastedContent) {
2446 // no implicitly repeated elements, put pasted content in
2447 // the deepest child
2448 insertPastedContent(tree, options.pastedContent);
2449 }
2450 });
2451 });/**
2452 * Resolves tag names in abbreviations with implied name
2453 */
2454 emmet.exec(function(require, _) {
2455 /**
2456 * Resolves implicit node names in parsed tree
2457 * @param {AbbreviationNode} tree
2458 */
2459 function resolveNodeNames(tree) {
2460 var tagName = require('tagName');
2461 _.each(tree.children, function(node) {
2462 if (node.hasImplicitName() || node.data('forceNameResolving')) {
2463 node._name = tagName.resolve(node.parent.name());
2464 }
2465 resolveNodeNames(node);
2466 });
2467
2468 return tree;
2469 }
2470
2471 require('abbreviationParser').addPostprocessor(resolveNodeNames);
2472 });/**
2473 * @author Stoyan Stefanov
2474 * @link https://github.com/stoyan/etc/tree/master/cssex
2475 */
2476
2477 emmet.define('cssParser', function(require, _) {
2478 var walker, tokens = [], isOp, isNameChar, isDigit;
2479
2480 // walks around the source
2481 walker = {
2482 lines: null,
2483 total_lines: 0,
2484 linenum: -1,
2485 line: '',
2486 ch: '',
2487 chnum: -1,
2488 init: function (source) {
2489 var me = walker;
2490
2491 // source, yumm
2492 me.lines = source
2493 .replace(/\r\n/g, '\n')
2494 .replace(/\r/g, '\n')
2495 .split('\n');
2496 me.total_lines = me.lines.length;
2497
2498 // reset
2499 me.chnum = -1;
2500 me.linenum = -1;
2501 me.ch = '';
2502 me.line = '';
2503
2504 // advance
2505 me.nextLine();
2506 me.nextChar();
2507 },
2508 nextLine: function () {
2509 var me = this;
2510 me.linenum += 1;
2511 if (me.total_lines <= me.linenum) {
2512 me.line = false;
2513 } else {
2514 me.line = me.lines[me.linenum];
2515 }
2516 if (me.chnum !== -1) {
2517 me.chnum = 0;
2518 }
2519 return me.line;
2520 },
2521 nextChar: function () {
2522 var me = this;
2523 me.chnum += 1;
2524 while (me.line.charAt(me.chnum) === '') {
2525 if (this.nextLine() === false) {
2526 me.ch = false;
2527 return false; // end of source
2528 }
2529 me.chnum = -1;
2530 me.ch = '\n';
2531 return '\n';
2532 }
2533 me.ch = me.line.charAt(me.chnum);
2534 return me.ch;
2535 },
2536 peek: function() {
2537 return this.line.charAt(this.chnum + 1);
2538 }
2539 };
2540
2541 // utility helpers
2542 isNameChar = function (c) {
2543 // be more tolerate for name tokens: allow & character for LESS syntax
2544 return (c == '&' || c === '_' || c === '-' || (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'));
2545 };
2546
2547 isDigit = function (ch) {
2548 return (ch !== false && ch >= '0' && ch <= '9');
2549 };
2550
2551 isOp = (function () {
2552 var opsa = "{}[]()+*=.,;:>~|\\%$#@^!".split(''),
2553 opsmatcha = "*^|$~".split(''),
2554 ops = {},
2555 opsmatch = {},
2556 i = 0;
2557 for (; i < opsa.length; i += 1) {
2558 ops[opsa[i]] = true;
2559 }
2560 for (i = 0; i < opsmatcha.length; i += 1) {
2561 opsmatch[opsmatcha[i]] = true;
2562 }
2563 return function (ch, matchattr) {
2564 if (matchattr) {
2565 return !!opsmatch[ch];
2566 }
2567 return !!ops[ch];
2568 };
2569 }());
2570
2571 // shorthands
2572 function isset(v) {
2573 return typeof v !== 'undefined';
2574 }
2575 function getConf() {
2576 return {
2577 'char': walker.chnum,
2578 line: walker.linenum
2579 };
2580 }
2581
2582
2583 // creates token objects and pushes them to a list
2584 function tokener(value, type, conf) {
2585 var w = walker, c = conf || {};
2586 tokens.push({
2587 charstart: isset(c['char']) ? c['char'] : w.chnum,
2588 charend: isset(c.charend) ? c.charend : w.chnum,
2589 linestart: isset(c.line) ? c.line : w.linenum,
2590 lineend: isset(c.lineend) ? c.lineend : w.linenum,
2591 value: value,
2592 type: type || value
2593 });
2594 }
2595
2596 // oops
2597 function error(m, config) {
2598 var w = walker,
2599 conf = config || {},
2600 c = isset(conf['char']) ? conf['char'] : w.chnum,
2601 l = isset(conf.line) ? conf.line : w.linenum;
2602 return {
2603 name: "ParseError",
2604 message: m + " at line " + (l + 1) + ' char ' + (c + 1),
2605 walker: w,
2606 tokens: tokens
2607 };
2608 }
2609
2610
2611 // token handlers follow for:
2612 // white space, comment, string, identifier, number, operator
2613 function white() {
2614
2615 var c = walker.ch,
2616 token = '',
2617 conf = getConf();
2618
2619 while (c === " " || c === "\t") {
2620 token += c;
2621 c = walker.nextChar();
2622 }
2623
2624 tokener(token, 'white', conf);
2625
2626 }
2627
2628 function comment() {
2629
2630 var w = walker,
2631 c = w.ch,
2632 token = c,
2633 cnext,
2634 conf = getConf();
2635
2636 cnext = w.nextChar();
2637
2638 if (cnext !== '*') {
2639 // oops, not a comment, just a /
2640 conf.charend = conf['char'];
2641 conf.lineend = conf.line;
2642 return tokener(token, token, conf);
2643 }
2644
2645 while (!(c === "*" && cnext === "/")) {
2646 token += cnext;
2647 c = cnext;
2648 cnext = w.nextChar();
2649 }
2650 token += cnext;
2651 w.nextChar();
2652 tokener(token, 'comment', conf);
2653 }
2654
2655 function str() {
2656 var w = walker,
2657 c = w.ch,
2658 q = c,
2659 token = c,
2660 cnext,
2661 conf = getConf();
2662
2663 c = w.nextChar();
2664
2665 while (c !== q) {
2666
2667 if (c === '\n') {
2668 cnext = w.nextChar();
2669 if (cnext === "\\") {
2670 token += c + cnext;
2671 } else {
2672 // end of line with no \ escape = bad
2673 throw error("Unterminated string", conf);
2674 }
2675 } else {
2676 if (c === "\\") {
2677 token += c + w.nextChar();
2678 } else {
2679 token += c;
2680 }
2681 }
2682
2683 c = w.nextChar();
2684
2685 }
2686 token += c;
2687 w.nextChar();
2688 tokener(token, 'string', conf);
2689 }
2690
2691 function brace() {
2692 var w = walker,
2693 c = w.ch,
2694 depth = 0,
2695 token = c,
2696 conf = getConf();
2697
2698 c = w.nextChar();
2699
2700 while (c !== ')' && !depth) {
2701 if (c === '(') {
2702 depth++;
2703 } else if (c === ')') {
2704 depth--;
2705 } else if (c === false) {
2706 throw error("Unterminated brace", conf);
2707 }
2708
2709 token += c;
2710 c = w.nextChar();
2711 }
2712
2713 token += c;
2714 w.nextChar();
2715 tokener(token, 'brace', conf);
2716 }
2717
2718 function identifier(pre) {
2719 var w = walker,
2720 c = w.ch,
2721 conf = getConf(),
2722 token = (pre) ? pre + c : c;
2723
2724 c = w.nextChar();
2725
2726 if (pre) { // adjust token position
2727 conf['char'] -= pre.length;
2728 }
2729
2730 while (isNameChar(c) || isDigit(c)) {
2731 token += c;
2732 c = w.nextChar();
2733 }
2734
2735 tokener(token, 'identifier', conf);
2736 }
2737
2738 function num() {
2739 var w = walker,
2740 c = w.ch,
2741 conf = getConf(),
2742 token = c,
2743 point = token === '.',
2744 nondigit;
2745
2746 c = w.nextChar();
2747 nondigit = !isDigit(c);
2748
2749 // .2px or .classname?
2750 if (point && nondigit) {
2751 // meh, NaN, could be a class name, so it's an operator for now
2752 conf.charend = conf['char'];
2753 conf.lineend = conf.line;
2754 return tokener(token, '.', conf);
2755 }
2756
2757 // -2px or -moz-something
2758 if (token === '-' && nondigit) {
2759 return identifier('-');
2760 }
2761
2762 while (c !== false && (isDigit(c) || (!point && c === '.'))) { // not end of source && digit or first instance of .
2763 if (c === '.') {
2764 point = true;
2765 }
2766 token += c;
2767 c = w.nextChar();
2768 }
2769
2770 tokener(token, 'number', conf);
2771
2772 }
2773
2774 function op() {
2775 var w = walker,
2776 c = w.ch,
2777 conf = getConf(),
2778 token = c,
2779 next = w.nextChar();
2780
2781 if (next === "=" && isOp(token, true)) {
2782 token += next;
2783 tokener(token, 'match', conf);
2784 w.nextChar();
2785 return;
2786 }
2787
2788 conf.charend = conf['char'] + 1;
2789 conf.lineend = conf.line;
2790 tokener(token, token, conf);
2791 }
2792
2793
2794 // call the appropriate handler based on the first character in a token suspect
2795 function tokenize() {
2796
2797 var ch = walker.ch;
2798
2799 if (ch === " " || ch === "\t") {
2800 return white();
2801 }
2802
2803 if (ch === '/') {
2804 return comment();
2805 }
2806
2807 if (ch === '"' || ch === "'") {
2808 return str();
2809 }
2810
2811 if (ch === '(') {
2812 return brace();
2813 }
2814
2815 if (ch === '-' || ch === '.' || isDigit(ch)) { // tricky - char: minus (-1px) or dash (-moz-stuff)
2816 return num();
2817 }
2818
2819 if (isNameChar(ch)) {
2820 return identifier();
2821 }
2822
2823 if (isOp(ch)) {
2824 return op();
2825 }
2826
2827 if (ch === "\n") {
2828 tokener("line");
2829 walker.nextChar();
2830 return;
2831 }
2832
2833 throw error("Unrecognized character");
2834 }
2835
2836 /**
2837 * Returns newline character at specified position in content
2838 * @param {String} content
2839 * @param {Number} pos
2840 * @return {String}
2841 */
2842 function getNewline(content, pos) {
2843 return content.charAt(pos) == '\r' && content.charAt(pos + 1) == '\n'
2844 ? '\r\n'
2845 : content.charAt(pos);
2846 }
2847
2848 return {
2849 /**
2850 * @param source
2851 * @returns
2852 * @memberOf emmet.cssParser
2853 */
2854 lex: function (source) {
2855 walker.init(source);
2856 tokens = [];
2857 while (walker.ch !== false) {
2858 tokenize();
2859 }
2860 return tokens;
2861 },
2862
2863 /**
2864 * Tokenizes CSS source
2865 * @param {String} source
2866 * @returns {Array}
2867 */
2868 parse: function(source) {
2869 // transform tokens
2870 var pos = 0;
2871 return _.map(this.lex(source), function(token) {
2872 if (token.type == 'line') {
2873 token.value = getNewline(source, pos);
2874 }
2875
2876 return {
2877 type: token.type,
2878 start: pos,
2879 end: (pos += token.value.length)
2880 };
2881 });
2882 },
2883
2884 toSource: function (toks) {
2885 var i = 0, max = toks.length, t, src = '';
2886 for (; i < max; i += 1) {
2887 t = toks[i];
2888 if (t.type === 'line') {
2889 src += '\n';
2890 } else {
2891 src += t.value;
2892 }
2893 }
2894 return src;
2895 }
2896 };
2897 });/**
2898 * HTML tokenizer by Marijn Haverbeke
2899 * http://codemirror.net/
2900 * @constructor
2901 * @memberOf __xmlParseDefine
2902 * @param {Function} require
2903 * @param {Underscore} _
2904 */
2905 emmet.define('xmlParser', function(require, _) {
2906 var Kludges = {
2907 autoSelfClosers : {},
2908 implicitlyClosed : {},
2909 contextGrabbers : {},
2910 doNotIndent : {},
2911 allowUnquoted : true,
2912 allowMissing : true
2913 };
2914
2915 // Return variables for tokenizers
2916 var tagName = null, type = null;
2917
2918 function inText(stream, state) {
2919 function chain(parser) {
2920 state.tokenize = parser;
2921 return parser(stream, state);
2922 }
2923
2924 var ch = stream.next();
2925 if (ch == "<") {
2926 if (stream.eat("!")) {
2927 if (stream.eat("[")) {
2928 if (stream.match("CDATA["))
2929 return chain(inBlock("atom", "]]>"));
2930 else
2931 return null;
2932 } else if (stream.match("--"))
2933 return chain(inBlock("comment", "-->"));
2934 else if (stream.match("DOCTYPE", true, true)) {
2935 stream.eatWhile(/[\w\._\-]/);
2936 return chain(doctype(1));
2937 } else
2938 return null;
2939 } else if (stream.eat("?")) {
2940 stream.eatWhile(/[\w\._\-]/);
2941 state.tokenize = inBlock("meta", "?>");
2942 return "meta";
2943 } else {
2944 type = stream.eat("/") ? "closeTag" : "openTag";
2945 stream.eatSpace();
2946 tagName = "";
2947 var c;
2948 while ((c = stream.eat(/[^\s\u00a0=<>\"\'\/?]/)))
2949 tagName += c;
2950 state.tokenize = inTag;
2951 return "tag";
2952 }
2953 } else if (ch == "&") {
2954 var ok;
2955 if (stream.eat("#")) {
2956 if (stream.eat("x")) {
2957 ok = stream.eatWhile(/[a-fA-F\d]/) && stream.eat(";");
2958 } else {
2959 ok = stream.eatWhile(/[\d]/) && stream.eat(";");
2960 }
2961 } else {
2962 ok = stream.eatWhile(/[\w\.\-:]/) && stream.eat(";");
2963 }
2964 return ok ? "atom" : "error";
2965 } else {
2966 stream.eatWhile(/[^&<]/);
2967 return "text";
2968 }
2969 }
2970
2971 function inTag(stream, state) {
2972 var ch = stream.next();
2973 if (ch == ">" || (ch == "/" && stream.eat(">"))) {
2974 state.tokenize = inText;
2975 type = ch == ">" ? "endTag" : "selfcloseTag";
2976 return "tag";
2977 } else if (ch == "=") {
2978 type = "equals";
2979 return null;
2980 } else if (/[\'\"]/.test(ch)) {
2981 state.tokenize = inAttribute(ch);
2982 return state.tokenize(stream, state);
2983 } else {
2984 stream.eatWhile(/[^\s\u00a0=<>\"\'\/?]/);
2985 return "word";
2986 }
2987 }
2988
2989 function inAttribute(quote) {
2990 return function(stream, state) {
2991 while (!stream.eol()) {
2992 if (stream.next() == quote) {
2993 state.tokenize = inTag;
2994 break;
2995 }
2996 }
2997 return "string";
2998 };
2999 }
3000
3001 function inBlock(style, terminator) {
3002 return function(stream, state) {
3003 while (!stream.eol()) {
3004 if (stream.match(terminator)) {
3005 state.tokenize = inText;
3006 break;
3007 }
3008 stream.next();
3009 }
3010 return style;
3011 };
3012 }
3013
3014 function doctype(depth) {
3015 return function(stream, state) {
3016 var ch;
3017 while ((ch = stream.next()) != null) {
3018 if (ch == "<") {
3019 state.tokenize = doctype(depth + 1);
3020 return state.tokenize(stream, state);
3021 } else if (ch == ">") {
3022 if (depth == 1) {
3023 state.tokenize = inText;
3024 break;
3025 } else {
3026 state.tokenize = doctype(depth - 1);
3027 return state.tokenize(stream, state);
3028 }
3029 }
3030 }
3031 return "meta";
3032 };
3033 }
3034
3035 var curState = null, setStyle;
3036 function pass() {
3037 for (var i = arguments.length - 1; i >= 0; i--)
3038 curState.cc.push(arguments[i]);
3039 }
3040
3041 function cont() {
3042 pass.apply(null, arguments);
3043 return true;
3044 }
3045
3046 function pushContext(tagName, startOfLine) {
3047 var noIndent = Kludges.doNotIndent.hasOwnProperty(tagName)
3048 || (curState.context && curState.context.noIndent);
3049 curState.context = {
3050 prev : curState.context,
3051 tagName : tagName,
3052 indent : curState.indented,
3053 startOfLine : startOfLine,
3054 noIndent : noIndent
3055 };
3056 }
3057
3058 function popContext() {
3059 if (curState.context)
3060 curState.context = curState.context.prev;
3061 }
3062
3063 function element(type) {
3064 if (type == "openTag") {
3065 curState.tagName = tagName;
3066 return cont(attributes, endtag(curState.startOfLine));
3067 } else if (type == "closeTag") {
3068 var err = false;
3069 if (curState.context) {
3070 if (curState.context.tagName != tagName) {
3071 if (Kludges.implicitlyClosed.hasOwnProperty(curState.context.tagName.toLowerCase())) {
3072 popContext();
3073 }
3074 err = !curState.context || curState.context.tagName != tagName;
3075 }
3076 } else {
3077 err = true;
3078 }
3079
3080 if (err)
3081 setStyle = "error";
3082 return cont(endclosetag(err));
3083 }
3084 return cont();
3085 }
3086
3087 function endtag(startOfLine) {
3088 return function(type) {
3089 if (type == "selfcloseTag"
3090 || (type == "endTag" && Kludges.autoSelfClosers
3091 .hasOwnProperty(curState.tagName
3092 .toLowerCase()))) {
3093 maybePopContext(curState.tagName.toLowerCase());
3094 return cont();
3095 }
3096 if (type == "endTag") {
3097 maybePopContext(curState.tagName.toLowerCase());
3098 pushContext(curState.tagName, startOfLine);
3099 return cont();
3100 }
3101 return cont();
3102 };
3103 }
3104
3105 function endclosetag(err) {
3106 return function(type) {
3107 if (err)
3108 setStyle = "error";
3109 if (type == "endTag") {
3110 popContext();
3111 return cont();
3112 }
3113 setStyle = "error";
3114 return cont(arguments.callee);
3115 };
3116 }
3117
3118 function maybePopContext(nextTagName) {
3119 var parentTagName;
3120 while (true) {
3121 if (!curState.context) {
3122 return;
3123 }
3124 parentTagName = curState.context.tagName.toLowerCase();
3125 if (!Kludges.contextGrabbers.hasOwnProperty(parentTagName)
3126 || !Kludges.contextGrabbers[parentTagName].hasOwnProperty(nextTagName)) {
3127 return;
3128 }
3129 popContext();
3130 }
3131 }
3132
3133 function attributes(type) {
3134 if (type == "word") {
3135 setStyle = "attribute";
3136 return cont(attribute, attributes);
3137 }
3138 if (type == "endTag" || type == "selfcloseTag")
3139 return pass();
3140 setStyle = "error";
3141 return cont(attributes);
3142 }
3143
3144 function attribute(type) {
3145 if (type == "equals")
3146 return cont(attvalue, attributes);
3147 if (!Kludges.allowMissing)
3148 setStyle = "error";
3149 return (type == "endTag" || type == "selfcloseTag") ? pass()
3150 : cont();
3151 }
3152
3153 function attvalue(type) {
3154 if (type == "string")
3155 return cont(attvaluemaybe);
3156 if (type == "word" && Kludges.allowUnquoted) {
3157 setStyle = "string";
3158 return cont();
3159 }
3160 setStyle = "error";
3161 return (type == "endTag" || type == "selfCloseTag") ? pass()
3162 : cont();
3163 }
3164
3165 function attvaluemaybe(type) {
3166 if (type == "string")
3167 return cont(attvaluemaybe);
3168 else
3169 return pass();
3170 }
3171
3172 function startState() {
3173 return {
3174 tokenize : inText,
3175 cc : [],
3176 indented : 0,
3177 startOfLine : true,
3178 tagName : null,
3179 context : null
3180 };
3181 }
3182
3183 function token(stream, state) {
3184 if (stream.sol()) {
3185 state.startOfLine = true;
3186 state.indented = 0;
3187 }
3188
3189 if (stream.eatSpace())
3190 return null;
3191
3192 setStyle = type = tagName = null;
3193 var style = state.tokenize(stream, state);
3194 state.type = type;
3195 if ((style || type) && style != "comment") {
3196 curState = state;
3197 while (true) {
3198 var comb = state.cc.pop() || element;
3199 if (comb(type || style))
3200 break;
3201 }
3202 }
3203 state.startOfLine = false;
3204 return setStyle || style;
3205 }
3206
3207 return {
3208 /**
3209 * @memberOf emmet.xmlParser
3210 * @returns
3211 */
3212 parse: function(data, offset) {
3213 offset = offset || 0;
3214 var state = startState();
3215 var stream = require('stringStream').create(data);
3216 var tokens = [];
3217 while (!stream.eol()) {
3218 tokens.push({
3219 type: token(stream, state),
3220 start: stream.start + offset,
3221 end: stream.pos + offset
3222 });
3223 stream.start = stream.pos;
3224 }
3225
3226 return tokens;
3227 }
3228 };
3229 });
3230 /**
3231 * Utility module for Emmet
3232 * @param {Function} require
3233 * @param {Underscore} _
3234 */
3235 emmet.define('utils', function(require, _) {
3236 /**
3237 * Special token used as a placeholder for caret positions inside
3238 * generated output
3239 */
3240 var caretPlaceholder = '${0}';
3241
3242 /**
3243 * A simple string builder, optimized for faster text concatenation
3244 * @param {String} value Initial value
3245 */
3246 function StringBuilder(value) {
3247 this._data = [];
3248 this.length = 0;
3249
3250 if (value)
3251 this.append(value);
3252 }
3253
3254 StringBuilder.prototype = {
3255 /**
3256 * Append string
3257 * @param {String} text
3258 */
3259 append: function(text) {
3260 this._data.push(text);
3261 this.length += text.length;
3262 },
3263
3264 /**
3265 * @returns {String}
3266 */
3267 toString: function() {
3268 return this._data.join('');
3269 },
3270
3271 /**
3272 * @returns {String}
3273 */
3274 valueOf: function() {
3275 return this.toString();
3276 }
3277 };
3278
3279 return {
3280 /** @memberOf utils */
3281 reTag: /<\/?[\w:\-]+(?:\s+[\w\-:]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*\s*(\/?)>$/,
3282
3283 /**
3284 * Test if passed string ends with XHTML tag. This method is used for testing
3285 * '>' character: it belongs to tag or it's a part of abbreviation?
3286 * @param {String} str
3287 * @return {Boolean}
3288 */
3289 endsWithTag: function(str) {
3290 return this.reTag.test(str);
3291 },
3292
3293 /**
3294 * Check if passed symbol is a number
3295 * @param {String} ch
3296 * @returns {Boolean}
3297 */
3298 isNumeric: function(ch) {
3299 if (typeof(ch) == 'string')
3300 ch = ch.charCodeAt(0);
3301
3302 return (ch && ch > 47 && ch < 58);
3303 },
3304
3305 /**
3306 * Trim whitespace from string
3307 * @param {String} text
3308 * @return {String}
3309 */
3310 trim: function(text) {
3311 return (text || "").replace(/^\s+|\s+$/g, "");
3312 },
3313
3314 /**
3315 * Returns newline character
3316 * @returns {String}
3317 */
3318 getNewline: function() {
3319 var res = require('resources');
3320 if (!res) {
3321 return '\n';
3322 }
3323
3324 var nl = res.getVariable('newline');
3325 return _.isString(nl) ? nl : '\n';
3326 },
3327
3328 /**
3329 * Sets new newline character that will be used in output
3330 * @param {String} str
3331 */
3332 setNewline: function(str) {
3333 var res = require('resources');
3334 res.setVariable('newline', str);
3335 res.setVariable('nl', str);
3336 },
3337
3338 /**
3339 * Split text into lines. Set <code>remove_empty</code> to true to filter
3340 * empty lines
3341 * @param {String} text Text to split
3342 * @param {Boolean} removeEmpty Remove empty lines from result
3343 * @return {Array}
3344 */
3345 splitByLines: function(text, removeEmpty) {
3346 // IE fails to split string by regexp,
3347 // need to normalize newlines first
3348 // Also, Mozilla's Rhiho JS engine has a weird newline bug
3349 var nl = this.getNewline();
3350 var lines = (text || '')
3351 .replace(/\r\n/g, '\n')
3352 .replace(/\n\r/g, '\n')
3353 .replace(/\r/g, '\n')
3354 .replace(/\n/g, nl)
3355 .split(nl);
3356
3357 if (removeEmpty) {
3358 lines = _.filter(lines, function(line) {
3359 return line.length && !!this.trim(line);
3360 }, this);
3361 }
3362
3363 return lines;
3364 },
3365
3366 /**
3367 * Normalizes newline character: replaces newlines in <code>text</code>
3368 * with newline defined in preferences
3369 * @param {String} text
3370 * @returns {String}
3371 */
3372 normalizeNewline: function(text) {
3373 return this.splitByLines(text).join(this.getNewline());
3374 },
3375
3376 /**
3377 * Repeats string <code>howMany</code> times
3378 * @param {String} str
3379 * @param {Number} how_many
3380 * @return {String}
3381 */
3382 repeatString: function(str, howMany) {
3383 var result = [];
3384
3385 for (var i = 0; i < howMany; i++)
3386 result.push(str);
3387
3388 return result.join('');
3389 },
3390
3391 /**
3392 * Indents text with padding
3393 * @param {String} text Text to indent
3394 * @param {String} pad Padding size (number) or padding itself (string)
3395 * @return {String}
3396 */
3397 padString: function(text, pad) {
3398 var padStr = (_.isNumber(pad))
3399 ? this.repeatString(require('resources').getVariable('indentation') || '\t', pad)
3400 : pad;
3401
3402 var result = [];
3403
3404 var lines = this.splitByLines(text);
3405 var nl = this.getNewline();
3406
3407 result.push(lines[0]);
3408 for (var j = 1; j < lines.length; j++)
3409 result.push(nl + padStr + lines[j]);
3410
3411 return result.join('');
3412 },
3413
3414 /**
3415 * Pad string with zeroes
3416 * @param {String} str String to pad
3417 * @param {Number} pad Desired string length
3418 * @return {String}
3419 */
3420 zeroPadString: function(str, pad) {
3421 var padding = '';
3422 var il = str.length;
3423
3424 while (pad > il++) padding += '0';
3425 return padding + str;
3426 },
3427
3428 /**
3429 * Removes padding at the beginning of each text's line
3430 * @param {String} text
3431 * @param {String} pad
3432 */
3433 unindentString: function(text, pad) {
3434 var lines = this.splitByLines(text);
3435 for (var i = 0; i < lines.length; i++) {
3436 if (lines[i].search(pad) == 0)
3437 lines[i] = lines[i].substr(pad.length);
3438 }
3439
3440 return lines.join(this.getNewline());
3441 },
3442
3443 /**
3444 * Replaces unescaped symbols in <code>str</code>. For example, the '$' symbol
3445 * will be replaced in 'item$count', but not in 'item\$count'.
3446 * @param {String} str Original string
3447 * @param {String} symbol Symbol to replace
3448 * @param {String} replace Symbol replacement. Might be a function that
3449 * returns new value
3450 * @return {String}
3451 */
3452 replaceUnescapedSymbol: function(str, symbol, replace) {
3453 var i = 0;
3454 var il = str.length;
3455 var sl = symbol.length;
3456 var matchCount = 0;
3457
3458 while (i < il) {
3459 if (str.charAt(i) == '\\') {
3460 // escaped symbol, skip next character
3461 i += sl + 1;
3462 } else if (str.substr(i, sl) == symbol) {
3463 // have match
3464 var curSl = sl;
3465 matchCount++;
3466 var newValue = replace;
3467 if (_.isFunction(replace)) {
3468 var replaceData = replace(str, symbol, i, matchCount);
3469 if (replaceData) {
3470 curSl = replaceData[0].length;
3471 newValue = replaceData[1];
3472 } else {
3473 newValue = false;
3474 }
3475 }
3476
3477 if (newValue === false) { // skip replacement
3478 i++;
3479 continue;
3480 }
3481
3482 str = str.substring(0, i) + newValue + str.substring(i + curSl);
3483 // adjust indexes
3484 il = str.length;
3485 i += newValue.length;
3486 } else {
3487 i++;
3488 }
3489 }
3490
3491 return str;
3492 },
3493
3494 /**
3495 * Replace variables like ${var} in string
3496 * @param {String} str
3497 * @param {Object} vars Variable set (defaults to variables defined in
3498 * <code>snippets.json</code>) or variable resolver (<code>Function</code>)
3499 * @return {String}
3500 */
3501 replaceVariables: function(str, vars) {
3502 vars = vars || {};
3503 var resolver = _.isFunction(vars) ? vars : function(str, p1) {
3504 return p1 in vars ? vars[p1] : null;
3505 };
3506
3507 var res = require('resources');
3508 return require('tabStops').processText(str, {
3509 variable: function(data) {
3510 var newValue = resolver(data.token, data.name, data);
3511 if (newValue === null) {
3512 // try to find variable in resources
3513 newValue = res.getVariable(data.name);
3514 }
3515
3516 if (newValue === null || _.isUndefined(newValue))
3517 // nothing found, return token itself
3518 newValue = data.token;
3519 return newValue;
3520 }
3521 });
3522 },
3523
3524 /**
3525 * Replaces '$' character in string assuming it might be escaped with '\'
3526 * @param {String} str String where caracter should be replaced
3527 * @param {String} value Replace value. Might be a <code>Function</code>
3528 * @return {String}
3529 */
3530 replaceCounter: function(str, value) {
3531 var symbol = '$';
3532 // in case we received strings from Java, convert the to native strings
3533 str = String(str);
3534 value = String(value);
3535 var that = this;
3536 return this.replaceUnescapedSymbol(str, symbol, function(str, symbol, pos, matchNum){
3537 if (str.charAt(pos + 1) == '{' || that.isNumeric(str.charAt(pos + 1)) ) {
3538 // it's a variable, skip it
3539 return false;
3540 }
3541
3542 // replace sequense of $ symbols with padded number
3543 var j = pos + 1;
3544 while(str.charAt(j) == '$' && str.charAt(j + 1) != '{') j++;
3545 return [str.substring(pos, j), that.zeroPadString(value, j - pos)];
3546 });
3547 },
3548
3549 /**
3550 * Check if string matches against <code>reTag</code> regexp. This
3551 * function may be used to test if provided string contains HTML tags
3552 * @param {String} str
3553 * @returns {Boolean}
3554 */
3555 matchesTag: function(str) {
3556 return this.reTag.test(str || '');
3557 },
3558
3559 /**
3560 * Escapes special characters used in Emmet, like '$', '|', etc.
3561 * Use this method before passing to actions like "Wrap with Abbreviation"
3562 * to make sure that existing special characters won't be altered
3563 * @param {String} text
3564 * @return {String}
3565 */
3566 escapeText: function(text) {
3567 return text.replace(/([\$\\])/g, '\\$1');
3568 },
3569
3570 /**
3571 * Unescapes special characters used in Emmet, like '$', '|', etc.
3572 * @param {String} text
3573 * @return {String}
3574 */
3575 unescapeText: function(text) {
3576 return text.replace(/\\(.)/g, '$1');
3577 },
3578
3579 /**
3580 * Returns caret placeholder
3581 * @returns {String}
3582 */
3583 getCaretPlaceholder: function() {
3584 return _.isFunction(caretPlaceholder)
3585 ? caretPlaceholder.apply(this, arguments)
3586 : caretPlaceholder;
3587 },
3588
3589 /**
3590 * Sets new representation for carets in generated output
3591 * @param {String} value New caret placeholder. Might be a
3592 * <code>Function</code>
3593 */
3594 setCaretPlaceholder: function(value) {
3595 caretPlaceholder = value;
3596 },
3597
3598 /**
3599 * Returns line padding
3600 * @param {String} line
3601 * @return {String}
3602 */
3603 getLinePadding: function(line) {
3604 return (line.match(/^(\s+)/) || [''])[0];
3605 },
3606
3607 /**
3608 * Helper function that returns padding of line of <code>pos</code>
3609 * position in <code>content</code>
3610 * @param {String} content
3611 * @param {Number} pos
3612 * @returns {String}
3613 */
3614 getLinePaddingFromPosition: function(content, pos) {
3615 var lineRange = this.findNewlineBounds(content, pos);
3616 return this.getLinePadding(lineRange.substring(content));
3617 },
3618
3619 /**
3620 * Escape special regexp chars in string, making it usable for creating dynamic
3621 * regular expressions
3622 * @param {String} str
3623 * @return {String}
3624 */
3625 escapeForRegexp: function(str) {
3626 var specials = new RegExp("[.*+?|()\\[\\]{}\\\\]", "g"); // .*+?|()[]{}\
3627 return str.replace(specials, "\\$&");
3628 },
3629
3630 /**
3631 * Make decimal number look good: convert it to fixed precision end remove
3632 * traling zeroes
3633 * @param {Number} num
3634 * @param {Number} fracion Fraction numbers (default is 2)
3635 * @return {String}
3636 */
3637 prettifyNumber: function(num, fraction) {
3638 return num.toFixed(typeof fraction == 'undefined' ? 2 : fraction).replace(/\.?0+$/, '');
3639 },
3640
3641 /**
3642 * A simple mutable string shim, optimized for faster text concatenation
3643 * @param {String} value Initial value
3644 * @returns {StringBuilder}
3645 */
3646 stringBuilder: function(value) {
3647 return new StringBuilder(value);
3648 },
3649
3650 /**
3651 * Replace substring of <code>str</code> with <code>value</code>
3652 * @param {String} str String where to replace substring
3653 * @param {String} value New substring value
3654 * @param {Number} start Start index of substring to replace. May also
3655 * be a <code>Range</code> object: in this case, the <code>end</code>
3656 * argument is not required
3657 * @param {Number} end End index of substring to replace. If ommited,
3658 * <code>start</code> argument is used
3659 */
3660 replaceSubstring: function(str, value, start, end) {
3661 if (_.isObject(start) && 'end' in start) {
3662 end = start.end;
3663 start = start.start;
3664 }
3665
3666 if (_.isString(end))
3667 end = start + end.length;
3668
3669 if (_.isUndefined(end))
3670 end = start;
3671
3672 if (start < 0 || start > str.length)
3673 return str;
3674
3675 return str.substring(0, start) + value + str.substring(end);
3676 },
3677
3678 /**
3679 * Narrows down text range, adjusting selection to non-space characters
3680 * @param {String} text
3681 * @param {Number} start Starting range in <code>text</code> where
3682 * slection should be adjusted. Can also be any object that is accepted
3683 * by <code>Range</code> class
3684 * @return {Range}
3685 */
3686 narrowToNonSpace: function(text, start, end) {
3687 var range = require('range').create(start, end);
3688
3689 var reSpace = /[\s\n\r\u00a0]/;
3690 // narrow down selection until first non-space character
3691 while (range.start < range.end) {
3692 if (!reSpace.test(text.charAt(range.start)))
3693 break;
3694
3695 range.start++;
3696 }
3697
3698 while (range.end > range.start) {
3699 range.end--;
3700 if (!reSpace.test(text.charAt(range.end))) {
3701 range.end++;
3702 break;
3703 }
3704 }
3705
3706 return range;
3707 },
3708
3709 /**
3710 * Find start and end index of text line for <code>from</code> index
3711 * @param {String} text
3712 * @param {Number} from
3713 */
3714 findNewlineBounds: function(text, from) {
3715 var len = text.length,
3716 start = 0,
3717 end = len - 1;
3718
3719 // search left
3720 for (var i = from - 1; i > 0; i--) {
3721 var ch = text.charAt(i);
3722 if (ch == '\n' || ch == '\r') {
3723 start = i + 1;
3724 break;
3725 }
3726 }
3727 // search right
3728 for (var j = from; j < len; j++) {
3729 var ch = text.charAt(j);
3730 if (ch == '\n' || ch == '\r') {
3731 end = j;
3732 break;
3733 }
3734 }
3735
3736 return require('range').create(start, end - start);
3737 },
3738
3739 /**
3740 * Deep merge of two or more objects. Taken from jQuery.extend()
3741 */
3742 deepMerge: function() {
3743 var options, name, src, copy, copyIsArray, clone,
3744 target = arguments[0] || {},
3745 i = 1,
3746 length = arguments.length;
3747
3748
3749 // Handle case when target is a string or something (possible in deep copy)
3750 if (!_.isObject(target) && !_.isFunction(target)) {
3751 target = {};
3752 }
3753
3754 for ( ; i < length; i++ ) {
3755 // Only deal with non-null/undefined values
3756 if ( (options = arguments[ i ]) != null ) {
3757 // Extend the base object
3758 for ( name in options ) {
3759 src = target[ name ];
3760 copy = options[ name ];
3761
3762 // Prevent never-ending loop
3763 if ( target === copy ) {
3764 continue;
3765 }
3766
3767 // Recurse if we're merging plain objects or arrays
3768 if ( copy && ( _.isObject(copy) || (copyIsArray = _.isArray(copy)) ) ) {
3769 if ( copyIsArray ) {
3770 copyIsArray = false;
3771 clone = src && _.isArray(src) ? src : [];
3772
3773 } else {
3774 clone = src && _.isObject(src) ? src : {};
3775 }
3776
3777 // Never move original objects, clone them
3778 target[ name ] = this.deepMerge(clone, copy );
3779
3780 // Don't bring in undefined values
3781 } else if ( copy !== undefined ) {
3782 target[ name ] = copy;
3783 }
3784 }
3785 }
3786 }
3787
3788 // Return the modified object
3789 return target;
3790 }
3791 };
3792 });
3793 /**
3794 * Helper module to work with ranges
3795 * @constructor
3796 * @memberOf __rangeDefine
3797 * @param {Function} require
3798 * @param {Underscore} _
3799 */
3800 emmet.define('range', function(require, _) {
3801 /**
3802 * @type Range
3803 * @constructor
3804 * @param {Object} start
3805 * @param {Number} len
3806 */
3807 function Range(start, len) {
3808 if (_.isObject(start) && 'start' in start) {
3809 // create range from object stub
3810 this.start = Math.min(start.start, start.end);
3811 this.end = Math.max(start.start, start.end);
3812 } else if (_.isArray(start)) {
3813 this.start = start[0];
3814 this.end = start[1];
3815 } else {
3816 len = _.isString(len) ? len.length : +len;
3817 this.start = start;
3818 this.end = start + len;
3819 }
3820 }
3821
3822 Range.prototype = {
3823 length: function() {
3824 return Math.abs(this.end - this.start);
3825 },
3826
3827 /**
3828 * Returns <code>true</code> if passed range is equals to current one
3829 * @param {Range} range
3830 * @returns {Boolean}
3831 */
3832 equal: function(range) {
3833 return this.start === range.start && this.end === range.end;
3834 },
3835
3836 /**
3837 * Shifts indexes position with passed <code>delat</code>
3838 * @param {Number} delta
3839 * @returns {Range} range itself
3840 */
3841 shift: function(delta) {
3842 this.start += delta;
3843 this.end += delta;
3844 return this;
3845 },
3846
3847 /**
3848 * Check if two ranges are overlapped
3849 * @param {Range} range
3850 * @returns {Boolean}
3851 */
3852 overlap: function(range) {
3853 return range.start <= this.end && range.end >= this.start;
3854 },
3855
3856 /**
3857 * Finds intersection of two ranges
3858 * @param {Range} range
3859 * @returns {Range} <code>null</code> if ranges does not overlap
3860 */
3861 intersection: function(range) {
3862 if (this.overlap(range)) {
3863 var start = Math.max(range.start, this.start);
3864 var end = Math.min(range.end, this.end);
3865 return new Range(start, end - start);
3866 }
3867
3868 return null;
3869 },
3870
3871 /**
3872 * Returns the union of the thow ranges.
3873 * @param {Range} range
3874 * @returns {Range} <code>null</code> if ranges are not overlapped
3875 */
3876 union: function(range) {
3877 if (this.overlap(range)) {
3878 var start = Math.min(range.start, this.start);
3879 var end = Math.max(range.end, this.end);
3880 return new Range(start, end - start);
3881 }
3882
3883 return null;
3884 },
3885
3886 /**
3887 * Returns a Boolean value that indicates whether a specified position
3888 * is in a given range.
3889 * @param {Number} loc
3890 */
3891 inside: function(loc) {
3892 return this.start <= loc && this.end > loc;
3893 },
3894
3895 /**
3896 * Check if current range completely includes specified one
3897 * @param {Range} r
3898 * @returns {Boolean}
3899 */
3900 include: function(r) {
3901 return this.start <= r.start && this.end >= r.end;
3902 },
3903
3904 /**
3905 * Returns substring of specified <code>str</code> for current range
3906 * @param {String} str
3907 * @returns {String}
3908 */
3909 substring: function(str) {
3910 return this.length() > 0
3911 ? str.substring(this.start, this.end)
3912 : '';
3913 },
3914
3915 /**
3916 * Creates copy of current range
3917 * @returns {Range}
3918 */
3919 clone: function() {
3920 return new Range(this.start, this.length());
3921 },
3922
3923 /**
3924 * @returns {Array}
3925 */
3926 toArray: function() {
3927 return [this.start, this.end];
3928 },
3929
3930 toString: function() {
3931 return '{' + this.start + ', ' + this.length() + '}';
3932 }
3933 };
3934
3935 return {
3936 /**
3937 * Creates new range object instance
3938 * @param {Object} start Range start or array with 'start' and 'end'
3939 * as two first indexes or object with 'start' and 'end' properties
3940 * @param {Number} len Range length or string to produce range from
3941 * @returns {Range}
3942 * @memberOf emmet.range
3943 */
3944 create: function(start, len) {
3945 if (_.isUndefined(start) || start === null)
3946 return null;
3947
3948 if (start instanceof Range)
3949 return start;
3950
3951 if (_.isObject(start) && 'start' in start && 'end' in start) {
3952 len = start.end - start.start;
3953 start = start.start;
3954 }
3955
3956 return new Range(start, len);
3957 },
3958
3959 /**
3960 * <code>Range</code> object factory, the same as <code>this.create()</code>
3961 * but last argument represents end of range, not length
3962 * @returns {Range}
3963 */
3964 create2: function(start, end) {
3965 if (_.isNumber(start) && _.isNumber(end)) {
3966 end -= start;
3967 }
3968
3969 return this.create(start, end);
3970 }
3971 };
3972 });/**
3973 * Utility module that provides ordered storage of function handlers.
3974 * Many Emmet modules' functionality can be extended/overridden by custom
3975 * function. This modules provides unified storage of handler functions, their
3976 * management and execution
3977 *
3978 * @constructor
3979 * @memberOf __handlerListDefine
3980 * @param {Function} require
3981 * @param {Underscore} _
3982 */
3983 emmet.define('handlerList', function(require, _) {
3984 /**
3985 * @type HandlerList
3986 * @constructor
3987 */
3988 function HandlerList() {
3989 this._list = [];
3990 }
3991
3992 HandlerList.prototype = {
3993 /**
3994 * Adds function handler
3995 * @param {Function} fn Handler
3996 * @param {Object} options Handler options. Possible values are:<br><br>
3997 * <b>order</b> : (<code>Number</code>) – order in handler list. Handlers
3998 * with higher order value will be executed earlier.
3999 */
4000 add: function(fn, options) {
4001 this._list.push(_.extend({order: 0}, options || {}, {fn: fn}));
4002 },
4003
4004 /**
4005 * Removes handler from list
4006 * @param {Function} fn
4007 */
4008 remove: function(fn) {
4009 this._list = _.without(this._list, _.find(this._list, function(item) {
4010 return item.fn === fn;
4011 }));
4012 },
4013
4014 /**
4015 * Returns ordered list of handlers. By default, handlers
4016 * with the same <code>order</code> option returned in reverse order,
4017 * i.e. the latter function was added into the handlers list, the higher
4018 * it will be in the returned array
4019 * @returns {Array}
4020 */
4021 list: function() {
4022 return _.sortBy(this._list, 'order').reverse();
4023 },
4024
4025 /**
4026 * Returns ordered list of handler functions
4027 * @returns {Array}
4028 */
4029 listFn: function() {
4030 return _.pluck(this.list(), 'fn');
4031 },
4032
4033 /**
4034 * Executes handler functions in their designated order. If function
4035 * returns <code>skipVal</code>, meaning that function was unable to
4036 * handle passed <code>args</code>, the next function will be executed
4037 * and so on.
4038 * @param {Object} skipValue If function returns this value, execute
4039 * next handler.
4040 * @param {Array} args Arguments to pass to handler function
4041 * @returns {Boolean} Whether any of registered handlers performed
4042 * successfully
4043 */
4044 exec: function(skipValue, args) {
4045 args = args || [];
4046 var result = null;
4047 _.find(this.list(), function(h) {
4048 result = h.fn.apply(h, args);
4049 if (result !== skipValue)
4050 return true;
4051 });
4052
4053 return result;
4054 }
4055 };
4056
4057 return {
4058 /**
4059 * Factory method that produces <code>HandlerList</code> instance
4060 * @returns {HandlerList}
4061 * @memberOf handlerList
4062 */
4063 create: function() {
4064 return new HandlerList();
4065 }
4066 };
4067 });/**
4068 * Helper class for convenient token iteration
4069 */
4070 emmet.define('tokenIterator', function(require, _) {
4071 /**
4072 * @type TokenIterator
4073 * @param {Array} tokens
4074 * @type TokenIterator
4075 * @constructor
4076 */
4077 function TokenIterator(tokens) {
4078 /** @type Array */
4079 this.tokens = tokens;
4080 this._position = 0;
4081 this.reset();
4082 }
4083
4084 TokenIterator.prototype = {
4085 next: function() {
4086 if (this.hasNext()) {
4087 var token = this.tokens[++this._i];
4088 this._position = token.start;
4089 return token;
4090 }
4091
4092 return null;
4093 },
4094
4095 current: function() {
4096 return this.tokens[this._i];
4097 },
4098
4099 position: function() {
4100 return this._position;
4101 },
4102
4103 hasNext: function() {
4104 return this._i < this._il - 1;
4105 },
4106
4107 reset: function() {
4108 this._i = -1;
4109 this._il = this.tokens.length;
4110 },
4111
4112 item: function() {
4113 return this.tokens[this._i];
4114 },
4115
4116 itemNext: function() {
4117 return this.tokens[this._i + 1];
4118 },
4119
4120 itemPrev: function() {
4121 return this.tokens[this._i - 1];
4122 },
4123
4124 nextUntil: function(type, callback) {
4125 var token;
4126 var test = _.isString(type)
4127 ? function(t){return t.type == type;}
4128 : type;
4129
4130 while (token = this.next()) {
4131 if (callback)
4132 callback.call(this, token);
4133 if (test.call(this, token))
4134 break;
4135 }
4136 }
4137 };
4138
4139 return {
4140 create: function(tokens) {
4141 return new TokenIterator(tokens);
4142 }
4143 };
4144 });/**
4145 * A trimmed version of CodeMirror's StringStream module for string parsing
4146 */
4147 emmet.define('stringStream', function(require, _) {
4148 /**
4149 * @type StringStream
4150 * @constructor
4151 * @param {String} string
4152 */
4153 function StringStream(string) {
4154 this.pos = this.start = 0;
4155 this.string = string;
4156 }
4157
4158 StringStream.prototype = {
4159 /**
4160 * Returns true only if the stream is at the end of the line.
4161 * @returns {Boolean}
4162 */
4163 eol: function() {
4164 return this.pos >= this.string.length;
4165 },
4166
4167 /**
4168 * Returns true only if the stream is at the start of the line
4169 * @returns {Boolean}
4170 */
4171 sol: function() {
4172 return this.pos == 0;
4173 },
4174
4175 /**
4176 * Returns the next character in the stream without advancing it.
4177 * Will return <code>undefined</code> at the end of the line.
4178 * @returns {String}
4179 */
4180 peek: function() {
4181 return this.string.charAt(this.pos);
4182 },
4183
4184 /**
4185 * Returns the next character in the stream and advances it.
4186 * Also returns <code>undefined</code> when no more characters are available.
4187 * @returns {String}
4188 */
4189 next: function() {
4190 if (this.pos < this.string.length)
4191 return this.string.charAt(this.pos++);
4192 },
4193
4194 /**
4195 * match can be a character, a regular expression, or a function that
4196 * takes a character and returns a boolean. If the next character in the
4197 * stream 'matches' the given argument, it is consumed and returned.
4198 * Otherwise, undefined is returned.
4199 * @param {Object} match
4200 * @returns {String}
4201 */
4202 eat: function(match) {
4203 var ch = this.string.charAt(this.pos), ok;
4204 if (typeof match == "string")
4205 ok = ch == match;
4206 else
4207 ok = ch && (match.test ? match.test(ch) : match(ch));
4208
4209 if (ok) {
4210 ++this.pos;
4211 return ch;
4212 }
4213 },
4214
4215 /**
4216 * Repeatedly calls <code>eat</code> with the given argument, until it
4217 * fails. Returns <code>true</code> if any characters were eaten.
4218 * @param {Object} match
4219 * @returns {Boolean}
4220 */
4221 eatWhile: function(match) {
4222 var start = this.pos;
4223 while (this.eat(match)) {}
4224 return this.pos > start;
4225 },
4226
4227 /**
4228 * Shortcut for <code>eatWhile</code> when matching white-space.
4229 * @returns {Boolean}
4230 */
4231 eatSpace: function() {
4232 var start = this.pos;
4233 while (/[\s\u00a0]/.test(this.string.charAt(this.pos)))
4234 ++this.pos;
4235 return this.pos > start;
4236 },
4237
4238 /**
4239 * Moves the position to the end of the line.
4240 */
4241 skipToEnd: function() {
4242 this.pos = this.string.length;
4243 },
4244
4245 /**
4246 * Skips to the next occurrence of the given character, if found on the
4247 * current line (doesn't advance the stream if the character does not
4248 * occur on the line). Returns true if the character was found.
4249 * @param {String} ch
4250 * @returns {Boolean}
4251 */
4252 skipTo: function(ch) {
4253 var found = this.string.indexOf(ch, this.pos);
4254 if (found > -1) {
4255 this.pos = found;
4256 return true;
4257 }
4258 },
4259
4260 /**
4261 * Skips to <code>close</code> character which is pair to <code>open</code>
4262 * character, considering possible pair nesting. This function is used
4263 * to consume pair of characters, like opening and closing braces
4264 * @param {String} open
4265 * @param {String} close
4266 * @returns {Boolean} Returns <code>true</code> if pair was successfully
4267 * consumed
4268 */
4269 skipToPair: function(open, close) {
4270 var braceCount = 0, ch;
4271 var pos = this.pos, len = this.string.length;
4272 while (pos < len) {
4273 ch = this.string.charAt(pos++);
4274 if (ch == open) {
4275 braceCount++;
4276 } else if (ch == close) {
4277 braceCount--;
4278 if (braceCount < 1) {
4279 this.pos = pos;
4280 return true;
4281 }
4282 }
4283 }
4284
4285 return false;
4286 },
4287
4288 /**
4289 * Backs up the stream n characters. Backing it up further than the
4290 * start of the current token will cause things to break, so be careful.
4291 * @param {Number} n
4292 */
4293 backUp : function(n) {
4294 this.pos -= n;
4295 },
4296
4297 /**
4298 * Act like a multi-character <code>eat</code>—if <code>consume</code> is true or
4299 * not given—or a look-ahead that doesn't update the stream position—if
4300 * it is false. <code>pattern</code> can be either a string or a
4301 * regular expression starting with ^. When it is a string,
4302 * <code>caseInsensitive</code> can be set to true to make the match
4303 * case-insensitive. When successfully matching a regular expression,
4304 * the returned value will be the array returned by <code>match</code>,
4305 * in case you need to extract matched groups.
4306 *
4307 * @param {RegExp} pattern
4308 * @param {Boolean} consume
4309 * @param {Boolean} caseInsensitive
4310 * @returns
4311 */
4312 match: function(pattern, consume, caseInsensitive) {
4313 if (typeof pattern == "string") {
4314 var cased = caseInsensitive
4315 ? function(str) {return str.toLowerCase();}
4316 : function(str) {return str;};
4317
4318 if (cased(this.string).indexOf(cased(pattern), this.pos) == this.pos) {
4319 if (consume !== false)
4320 this.pos += pattern.length;
4321 return true;
4322 }
4323 } else {
4324 var match = this.string.slice(this.pos).match(pattern);
4325 if (match && consume !== false)
4326 this.pos += match[0].length;
4327 return match;
4328 }
4329 },
4330
4331 /**
4332 * Get the string between the start of the current token and the
4333 * current stream position.
4334 * @returns {String}
4335 */
4336 current: function() {
4337 return this.string.slice(this.start, this.pos);
4338 }
4339 };
4340
4341 return {
4342 create: function(string) {
4343 return new StringStream(string);
4344 }
4345 };
4346 });/**
4347 * Parsed resources (snippets, abbreviations, variables, etc.) for Emmet.
4348 * Contains convenient method to get access for snippets with respect of
4349 * inheritance. Also provides ability to store data in different vocabularies
4350 * ('system' and 'user') for fast and safe resource update
4351 * @author Sergey Chikuyonok (serge.che@gmail.com)
4352 * @link http://chikuyonok.ru
4353 *
4354 * @param {Function} require
4355 * @param {Underscore} _
4356 */
4357 emmet.define('resources', function(require, _) {
4358 var VOC_SYSTEM = 'system';
4359 var VOC_USER = 'user';
4360
4361 var cache = {};
4362
4363 /** Regular expression for XML tag matching */
4364 var reTag = /^<(\w+\:?[\w\-]*)((?:\s+[\w\:\-]+\s*=\s*(['"]).*?\3)*)\s*(\/?)>/;
4365
4366 var systemSettings = {};
4367 var userSettings = {};
4368
4369 /** @type HandlerList List of registered abbreviation resolvers */
4370 var resolvers = require('handlerList').create();
4371
4372 /**
4373 * Normalizes caret plceholder in passed text: replaces | character with
4374 * default caret placeholder
4375 * @param {String} text
4376 * @returns {String}
4377 */
4378 function normalizeCaretPlaceholder(text) {
4379 var utils = require('utils');
4380 return utils.replaceUnescapedSymbol(text, '|', utils.getCaretPlaceholder());
4381 }
4382
4383 function parseItem(name, value, type) {
4384 value = normalizeCaretPlaceholder(value);
4385
4386 if (type == 'snippets') {
4387 return require('elements').create('snippet', value);
4388 }
4389
4390 if (type == 'abbreviations') {
4391 return parseAbbreviation(name, value);
4392 }
4393 }
4394
4395 /**
4396 * Parses single abbreviation
4397 * @param {String} key Abbreviation name
4398 * @param {String} value Abbreviation value
4399 * @return {Object}
4400 */
4401 function parseAbbreviation(key, value) {
4402 key = require('utils').trim(key);
4403 var elements = require('elements');
4404 var m;
4405 if (m = reTag.exec(value)) {
4406 return elements.create('element', m[1], m[2], m[4] == '/');
4407 } else {
4408 // assume it's reference to another abbreviation
4409 return elements.create('reference', value);
4410 }
4411 }
4412
4413 return {
4414 /**
4415 * Sets new unparsed data for specified settings vocabulary
4416 * @param {Object} data
4417 * @param {String} type Vocabulary type ('system' or 'user')
4418 * @memberOf resources
4419 */
4420 setVocabulary: function(data, type) {
4421 cache = {};
4422 if (type == VOC_SYSTEM)
4423 systemSettings = data;
4424 else
4425 userSettings = data;
4426 },
4427
4428 /**
4429 * Returns resource vocabulary by its name
4430 * @param {String} name Vocabulary name ('system' or 'user')
4431 * @return {Object}
4432 */
4433 getVocabulary: function(name) {
4434 return name == VOC_SYSTEM ? systemSettings : userSettings;
4435 },
4436
4437 /**
4438 * Returns resource (abbreviation, snippet, etc.) matched for passed
4439 * abbreviation
4440 * @param {TreeNode} node
4441 * @param {String} syntax
4442 * @returns {Object}
4443 */
4444 getMatchedResource: function(node, syntax) {
4445 return resolvers.exec(null, _.toArray(arguments))
4446 || this.findSnippet(syntax, node.name());
4447 },
4448
4449 /**
4450 * Returns variable value
4451 * @return {String}
4452 */
4453 getVariable: function(name) {
4454 return (this.getSection('variables') || {})[name];
4455 },
4456
4457 /**
4458 * Store runtime variable in user storage
4459 * @param {String} name Variable name
4460 * @param {String} value Variable value
4461 */
4462 setVariable: function(name, value){
4463 var voc = this.getVocabulary('user') || {};
4464 if (!('variables' in voc))
4465 voc.variables = {};
4466
4467 voc.variables[name] = value;
4468 this.setVocabulary(voc, 'user');
4469 },
4470
4471 /**
4472 * Check if there are resources for specified syntax
4473 * @param {String} syntax
4474 * @return {Boolean}
4475 */
4476 hasSyntax: function(syntax) {
4477 return syntax in this.getVocabulary(VOC_USER)
4478 || syntax in this.getVocabulary(VOC_SYSTEM);
4479 },
4480
4481 /**
4482 * Registers new abbreviation resolver.
4483 * @param {Function} fn Abbreviation resolver which will receive
4484 * abbreviation as first argument and should return parsed abbreviation
4485 * object if abbreviation has handled successfully, <code>null</code>
4486 * otherwise
4487 * @param {Object} options Options list as described in
4488 * {@link HandlerList#add()} method
4489 */
4490 addResolver: function(fn, options) {
4491 resolvers.add(fn, options);
4492 },
4493
4494 removeResolver: function(fn) {
4495 resolvers.remove(fn);
4496 },
4497
4498 /**
4499 * Returns actual section data, merged from both
4500 * system and user data
4501 * @param {String} name Section name (syntax)
4502 * @param {String} ...args Subsections
4503 * @returns
4504 */
4505 getSection: function(name) {
4506 if (!name)
4507 return null;
4508
4509 if (!(name in cache)) {
4510 cache[name] = require('utils').deepMerge({}, systemSettings[name], userSettings[name]);
4511 }
4512
4513 var data = cache[name], subsections = _.rest(arguments), key;
4514 while (data && (key = subsections.shift())) {
4515 if (key in data) {
4516 data = data[key];
4517 } else {
4518 return null;
4519 }
4520 }
4521
4522 return data;
4523 },
4524
4525 /**
4526 * Recursively searches for a item inside top level sections (syntaxes)
4527 * with respect of `extends` attribute
4528 * @param {String} topSection Top section name (syntax)
4529 * @param {String} subsection Inner section name
4530 * @returns {Object}
4531 */
4532 findItem: function(topSection, subsection) {
4533 var data = this.getSection(topSection);
4534 while (data) {
4535 if (subsection in data)
4536 return data[subsection];
4537
4538 data = this.getSection(data['extends']);
4539 }
4540 },
4541
4542 /**
4543 * Recursively searches for a snippet definition inside syntax section.
4544 * Definition is searched inside `snippets` and `abbreviations`
4545 * subsections
4546 * @param {String} syntax Top-level section name (syntax)
4547 * @param {Snippet name} name
4548 * @returns {Object}
4549 */
4550 findSnippet: function(syntax, name, memo) {
4551 if (!syntax || !name)
4552 return null;
4553
4554 memo = memo || [];
4555
4556 var names = [name];
4557 // create automatic aliases to properties with colons,
4558 // e.g. pos-a == pos:a
4559 if (~name.indexOf('-'))
4560 names.push(name.replace(/\-/g, ':'));
4561
4562 var data = this.getSection(syntax), matchedItem = null;
4563 _.find(['snippets', 'abbreviations'], function(sectionName) {
4564 var data = this.getSection(syntax, sectionName);
4565 if (data) {
4566 return _.find(names, function(n) {
4567 if (data[n])
4568 return matchedItem = parseItem(n, data[n], sectionName);
4569 });
4570 }
4571 }, this);
4572
4573 memo.push(syntax);
4574 if (!matchedItem && data['extends'] && !_.include(memo, data['extends'])) {
4575 // try to find item in parent syntax section
4576 return this.findSnippet(data['extends'], name, memo);
4577 }
4578
4579 return matchedItem;
4580 }
4581 };
4582 });/**
4583 * Module describes and performs Emmet actions. The actions themselves are
4584 * defined in <i>actions</i> folder
4585 * @param {Function} require
4586 * @param {Underscore} _
4587 */
4588 emmet.define('actions', function(require, _, zc) {
4589 var actions = {};
4590
4591 /**
4592 * “Humanizes” action name, makes it more readable for people
4593 * @param {String} name Action name (like 'expand_abbreviation')
4594 * @return Humanized name (like 'Expand Abbreviation')
4595 */
4596 function humanizeActionName(name) {
4597 return require('utils').trim(name.charAt(0).toUpperCase()
4598 + name.substring(1).replace(/_[a-z]/g, function(str) {
4599 return ' ' + str.charAt(1).toUpperCase();
4600 }));
4601 }
4602
4603 return {
4604 /**
4605 * Registers new action
4606 * @param {String} name Action name
4607 * @param {Function} fn Action function
4608 * @param {Object} options Custom action options:<br>
4609 * <b>label</b> : (<code>String</code>) – Human-readable action name.
4610 * May contain '/' symbols as submenu separators<br>
4611 * <b>hidden</b> : (<code>Boolean</code>) – Indicates whether action
4612 * should be displayed in menu (<code>getMenu()</code> method)
4613 *
4614 * @memberOf actions
4615 */
4616 add: function(name, fn, options) {
4617 name = name.toLowerCase();
4618 options = options || {};
4619 if (!options.label) {
4620 options.label = humanizeActionName(name);
4621 }
4622
4623 actions[name] = {
4624 name: name,
4625 fn: fn,
4626 options: options
4627 };
4628 },
4629
4630 /**
4631 * Returns action object
4632 * @param {String} name Action name
4633 * @returns {Object}
4634 */
4635 get: function(name) {
4636 return actions[name.toLowerCase()];
4637 },
4638
4639 /**
4640 * Runs Emmet action. For list of available actions and their
4641 * arguments see <i>actions</i> folder.
4642 * @param {String} name Action name
4643 * @param {Array} args Additional arguments. It may be array of arguments
4644 * or inline arguments. The first argument should be <code>IEmmetEditor</code> instance
4645 * @returns {Boolean} Status of performed operation, <code>true</code>
4646 * means action was performed successfully.
4647 * @example
4648 * emmet.require('actions').run('expand_abbreviation', editor);
4649 * emmet.require('actions').run('wrap_with_abbreviation', [editor, 'div']);
4650 */
4651 run: function(name, args) {
4652 if (!_.isArray(args)) {
4653 args = _.rest(arguments);
4654 }
4655
4656 var action = this.get(name);
4657 if (action) {
4658 return action.fn.apply(emmet, args);
4659 } else {
4660 emmet.log('Action "%s" is not defined', name);
4661 return false;
4662 }
4663 },
4664
4665 /**
4666 * Returns all registered actions as object
4667 * @returns {Object}
4668 */
4669 getAll: function() {
4670 return actions;
4671 },
4672
4673 /**
4674 * Returns all registered actions as array
4675 * @returns {Array}
4676 */
4677 getList: function() {
4678 return _.values(this.getAll());
4679 },
4680
4681 /**
4682 * Returns actions list as structured menu. If action has <i>label</i>,
4683 * it will be splitted by '/' symbol into submenus (for example:
4684 * CSS/Reflect Value) and grouped with other items
4685 * @param {Array} skipActions List of action identifiers that should be
4686 * skipped from menu
4687 * @returns {Array}
4688 */
4689 getMenu: function(skipActions) {
4690 var result = [];
4691 skipActions = skipActions || [];
4692 _.each(this.getList(), function(action) {
4693 if (action.options.hidden || _.include(skipActions, action.name))
4694 return;
4695
4696 var actionName = humanizeActionName(action.name);
4697 var ctx = result;
4698 if (action.options.label) {
4699 var parts = action.options.label.split('/');
4700 actionName = parts.pop();
4701
4702 // create submenus, if needed
4703 var menuName, submenu;
4704 while (menuName = parts.shift()) {
4705 submenu = _.find(ctx, function(item) {
4706 return item.type == 'submenu' && item.name == menuName;
4707 });
4708
4709 if (!submenu) {
4710 submenu = {
4711 name: menuName,
4712 type: 'submenu',
4713 items: []
4714 };
4715 ctx.push(submenu);
4716 }
4717
4718 ctx = submenu.items;
4719 }
4720 }
4721
4722 ctx.push({
4723 type: 'action',
4724 name: action.name,
4725 label: actionName
4726 });
4727 });
4728
4729 return result;
4730 },
4731
4732 /**
4733 * Returns action name associated with menu item title
4734 * @param {String} title
4735 * @returns {String}
4736 */
4737 getActionNameForMenuTitle: function(title, menu) {
4738 var item = null;
4739 _.find(menu || this.getMenu(), function(val) {
4740 if (val.type == 'action') {
4741 if (val.label == title || val.name == title) {
4742 return item = val.name;
4743 }
4744 } else {
4745 return item = this.getActionNameForMenuTitle(title, val.items);
4746 }
4747 }, this);
4748
4749 return item || null;
4750 }
4751 };
4752 });/**
4753 * Output profile module.
4754 * Profile defines how XHTML output data should look like
4755 * @param {Function} require
4756 * @param {Underscore} _
4757 */
4758 emmet.define('profile', function(require, _) {
4759 var profiles = {};
4760
4761 var defaultProfile = {
4762 tag_case: 'asis',
4763 attr_case: 'asis',
4764 attr_quotes: 'double',
4765
4766 // each tag on new line
4767 tag_nl: 'decide',
4768
4769 // with tag_nl === true, defines if leaf node (e.g. node with no children)
4770 // should have formatted line breaks
4771 tag_nl_leaf: false,
4772
4773 place_cursor: true,
4774
4775 // indent tags
4776 indent: true,
4777
4778 // how many inline elements should be to force line break
4779 // (set to 0 to disable)
4780 inline_break: 3,
4781
4782 // use self-closing style for writing empty elements, e.g. <br /> or <br>
4783 self_closing_tag: 'xhtml',
4784
4785 // Profile-level output filters, re-defines syntax filters
4786 filters: ''
4787 };
4788
4789 /**
4790 * @constructor
4791 * @type OutputProfile
4792 * @param {Object} options
4793 */
4794 function OutputProfile(options) {
4795 _.extend(this, defaultProfile, options);
4796 }
4797
4798 OutputProfile.prototype = {
4799 /**
4800 * Transforms tag name case depending on current profile settings
4801 * @param {String} name String to transform
4802 * @returns {String}
4803 */
4804 tagName: function(name) {
4805 return stringCase(name, this.tag_case);
4806 },
4807
4808 /**
4809 * Transforms attribute name case depending on current profile settings
4810 * @param {String} name String to transform
4811 * @returns {String}
4812 */
4813 attributeName: function(name) {
4814 return stringCase(name, this.attr_case);
4815 },
4816
4817 /**
4818 * Returns quote character for current profile
4819 * @returns {String}
4820 */
4821 attributeQuote: function() {
4822 return this.attr_quotes == 'single' ? "'" : '"';
4823 },
4824
4825 /**
4826 * Returns self-closing tag symbol for current profile
4827 * @param {String} param
4828 * @returns {String}
4829 */
4830 selfClosing: function(param) {
4831 if (this.self_closing_tag == 'xhtml')
4832 return ' /';
4833
4834 if (this.self_closing_tag === true)
4835 return '/';
4836
4837 return '';
4838 },
4839
4840 /**
4841 * Returns cursor token based on current profile settings
4842 * @returns {String}
4843 */
4844 cursor: function() {
4845 return this.place_cursor ? require('utils').getCaretPlaceholder() : '';
4846 }
4847 };
4848
4849 /**
4850 * Helper function that converts string case depending on
4851 * <code>caseValue</code>
4852 * @param {String} str String to transform
4853 * @param {String} caseValue Case value: can be <i>lower</i>,
4854 * <i>upper</i> and <i>leave</i>
4855 * @returns {String}
4856 */
4857 function stringCase(str, caseValue) {
4858 switch (String(caseValue || '').toLowerCase()) {
4859 case 'lower':
4860 return str.toLowerCase();
4861 case 'upper':
4862 return str.toUpperCase();
4863 }
4864
4865 return str;
4866 }
4867
4868 /**
4869 * Creates new output profile
4870 * @param {String} name Profile name
4871 * @param {Object} options Profile options
4872 */
4873 function createProfile(name, options) {
4874 return profiles[name.toLowerCase()] = new OutputProfile(options);
4875 }
4876
4877 function createDefaultProfiles() {
4878 createProfile('xhtml');
4879 createProfile('html', {self_closing_tag: false});
4880 createProfile('xml', {self_closing_tag: true, tag_nl: true});
4881 createProfile('plain', {tag_nl: false, indent: false, place_cursor: false});
4882 createProfile('line', {tag_nl: false, indent: false});
4883 }
4884
4885 createDefaultProfiles();
4886
4887 return {
4888 /**
4889 * Creates new output profile and adds it into internal dictionary
4890 * @param {String} name Profile name
4891 * @param {Object} options Profile options
4892 * @memberOf emmet.profile
4893 * @returns {Object} New profile
4894 */
4895 create: function(name, options) {
4896 if (arguments.length == 2)
4897 return createProfile(name, options);
4898 else
4899 // create profile object only
4900 return new OutputProfile(_.defaults(name || {}, defaultProfile));
4901 },
4902
4903 /**
4904 * Returns profile by its name. If profile wasn't found, returns
4905 * 'plain' profile
4906 * @param {String} name Profile name. Might be profile itself
4907 * @param {String} syntax. Optional. Current editor syntax. If defined,
4908 * profile is searched in resources first, then in predefined profiles
4909 * @returns {Object}
4910 */
4911 get: function(name, syntax) {
4912 if (syntax && _.isString(name)) {
4913 // search in user resources first
4914 var profile = require('resources').findItem(syntax, 'profile');
4915 if (profile) {
4916 name = profile;
4917 }
4918 }
4919
4920 if (!name)
4921 return profiles.plain;
4922
4923 if (name instanceof OutputProfile)
4924 return name;
4925
4926 if (_.isString(name) && name.toLowerCase() in profiles)
4927 return profiles[name.toLowerCase()];
4928
4929 return this.create(name);
4930 },
4931
4932 /**
4933 * Deletes profile with specified name
4934 * @param {String} name Profile name
4935 */
4936 remove: function(name) {
4937 name = (name || '').toLowerCase();
4938 if (name in profiles)
4939 delete profiles[name];
4940 },
4941
4942 /**
4943 * Resets all user-defined profiles
4944 */
4945 reset: function() {
4946 profiles = {};
4947 createDefaultProfiles();
4948 },
4949
4950 /**
4951 * Helper function that converts string case depending on
4952 * <code>caseValue</code>
4953 * @param {String} str String to transform
4954 * @param {String} caseValue Case value: can be <i>lower</i>,
4955 * <i>upper</i> and <i>leave</i>
4956 * @returns {String}
4957 */
4958 stringCase: stringCase
4959 };
4960 });/**
4961 * Utility module used to prepare text for pasting into back-end editor
4962 * @param {Function} require
4963 * @param {Underscore} _
4964 * @author Sergey Chikuyonok (serge.che@gmail.com) <http://chikuyonok.ru>
4965 */
4966 emmet.define('editorUtils', function(require, _) {
4967 return {
4968 /**
4969 * Check if cursor is placed inside XHTML tag
4970 * @param {String} html Contents of the document
4971 * @param {Number} caretPos Current caret position inside tag
4972 * @return {Boolean}
4973 */
4974 isInsideTag: function(html, caretPos) {
4975 var reTag = /^<\/?\w[\w\:\-]*.*?>/;
4976
4977 // search left to find opening brace
4978 var pos = caretPos;
4979 while (pos > -1) {
4980 if (html.charAt(pos) == '<')
4981 break;
4982 pos--;
4983 }
4984
4985 if (pos != -1) {
4986 var m = reTag.exec(html.substring(pos));
4987 if (m && caretPos > pos && caretPos < pos + m[0].length)
4988 return true;
4989 }
4990
4991 return false;
4992 },
4993
4994 /**
4995 * Sanitizes incoming editor data and provides default values for
4996 * output-specific info
4997 * @param {IEmmetEditor} editor
4998 * @param {String} syntax
4999 * @param {String} profile
5000 */
5001 outputInfo: function(editor, syntax, profile) {
5002 return {
5003 /** @memberOf outputInfo */
5004 syntax: String(syntax || editor.getSyntax()),
5005 profile: String(profile || editor.getProfileName()),
5006 content: String(editor.getContent())
5007 };
5008 },
5009
5010 /**
5011 * Unindent content, thus preparing text for tag wrapping
5012 * @param {IEmmetEditor} editor Editor instance
5013 * @param {String} text
5014 * @return {String}
5015 */
5016 unindent: function(editor, text) {
5017 return require('utils').unindentString(text, this.getCurrentLinePadding(editor));
5018 },
5019
5020 /**
5021 * Returns padding of current editor's line
5022 * @param {IEmmetEditor} Editor instance
5023 * @return {String}
5024 */
5025 getCurrentLinePadding: function(editor) {
5026 return require('utils').getLinePadding(editor.getCurrentLine());
5027 }
5028 };
5029 });
5030 /**
5031 * Utility methods for Emmet actions
5032 * @param {Function} require
5033 * @param {Underscore} _
5034 * @author Sergey Chikuyonok (serge.che@gmail.com) <http://chikuyonok.ru>
5035 */
5036 emmet.define('actionUtils', function(require, _) {
5037 return {
5038 mimeTypes: {
5039 'gif' : 'image/gif',
5040 'png' : 'image/png',
5041 'jpg' : 'image/jpeg',
5042 'jpeg': 'image/jpeg',
5043 'svg' : 'image/svg+xml',
5044 'html': 'text/html',
5045 'htm' : 'text/html'
5046 },
5047
5048 /**
5049 * Extracts abbreviations from text stream, starting from the end
5050 * @param {String} str
5051 * @return {String} Abbreviation or empty string
5052 * @memberOf emmet.actionUtils
5053 */
5054 extractAbbreviation: function(str) {
5055 var curOffset = str.length;
5056 var startIndex = -1;
5057 var groupCount = 0;
5058 var braceCount = 0;
5059 var textCount = 0;
5060
5061 var utils = require('utils');
5062 var parser = require('abbreviationParser');
5063
5064 while (true) {
5065 curOffset--;
5066 if (curOffset < 0) {
5067 // moved to the beginning of the line
5068 startIndex = 0;
5069 break;
5070 }
5071
5072 var ch = str.charAt(curOffset);
5073
5074 if (ch == ']') {
5075 braceCount++;
5076 } else if (ch == '[') {
5077 if (!braceCount) { // unexpected brace
5078 startIndex = curOffset + 1;
5079 break;
5080 }
5081 braceCount--;
5082 } else if (ch == '}') {
5083 textCount++;
5084 } else if (ch == '{') {
5085 if (!textCount) { // unexpected brace
5086 startIndex = curOffset + 1;
5087 break;
5088 }
5089 textCount--;
5090 } else if (ch == ')') {
5091 groupCount++;
5092 } else if (ch == '(') {
5093 if (!groupCount) { // unexpected brace
5094 startIndex = curOffset + 1;
5095 break;
5096 }
5097 groupCount--;
5098 } else {
5099 if (braceCount || textCount)
5100 // respect all characters inside attribute sets or text nodes
5101 continue;
5102 else if (!parser.isAllowedChar(ch) || (ch == '>' && utils.endsWithTag(str.substring(0, curOffset + 1)))) {
5103 // found stop symbol
5104 startIndex = curOffset + 1;
5105 break;
5106 }
5107 }
5108 }
5109
5110 if (startIndex != -1 && !textCount && !braceCount && !groupCount)
5111 // found something, remove some invalid symbols from the
5112 // beginning and return abbreviation
5113 return str.substring(startIndex).replace(/^[\*\+\>\^]+/, '');
5114 else
5115 return '';
5116 },
5117
5118 /**
5119 * Gets image size from image byte stream.
5120 * @author http://romeda.org/rePublish/
5121 * @param {String} stream Image byte stream (use <code>IEmmetFile.read()</code>)
5122 * @return {Object} Object with <code>width</code> and <code>height</code> properties
5123 */
5124 getImageSize: function(stream) {
5125 var pngMagicNum = "\211PNG\r\n\032\n",
5126 jpgMagicNum = "\377\330",
5127 gifMagicNum = "GIF8",
5128 nextByte = function() {
5129 return stream.charCodeAt(pos++);
5130 };
5131
5132 if (stream.substr(0, 8) === pngMagicNum) {
5133 // PNG. Easy peasy.
5134 var pos = stream.indexOf('IHDR') + 4;
5135
5136 return { width: (nextByte() << 24) | (nextByte() << 16) |
5137 (nextByte() << 8) | nextByte(),
5138 height: (nextByte() << 24) | (nextByte() << 16) |
5139 (nextByte() << 8) | nextByte() };
5140
5141 } else if (stream.substr(0, 4) === gifMagicNum) {
5142 pos = 6;
5143
5144 return {
5145 width: nextByte() | (nextByte() << 8),
5146 height: nextByte() | (nextByte() << 8)
5147 };
5148
5149 } else if (stream.substr(0, 2) === jpgMagicNum) {
5150 pos = 2;
5151
5152 var l = stream.length;
5153 while (pos < l) {
5154 if (nextByte() != 0xFF) return;
5155
5156 var marker = nextByte();
5157 if (marker == 0xDA) break;
5158
5159 var size = (nextByte() << 8) | nextByte();
5160
5161 if (marker >= 0xC0 && marker <= 0xCF && !(marker & 0x4) && !(marker & 0x8)) {
5162 pos += 1;
5163 return { height: (nextByte() << 8) | nextByte(),
5164 width: (nextByte() << 8) | nextByte() };
5165
5166 } else {
5167 pos += size - 2;
5168 }
5169 }
5170 }
5171 },
5172
5173 /**
5174 * Captures context XHTML element from editor under current caret position.
5175 * This node can be used as a helper for abbreviation extraction
5176 * @param {IEmmetEditor} editor
5177 * @returns {Object}
5178 */
5179 captureContext: function(editor) {
5180 var allowedSyntaxes = {'html': 1, 'xml': 1, 'xsl': 1};
5181 var syntax = String(editor.getSyntax());
5182 if (syntax in allowedSyntaxes) {
5183 var tags = require('html_matcher').getTags(
5184 String(editor.getContent()),
5185 editor.getCaretPos(),
5186 String(editor.getProfileName()));
5187
5188 if (tags && tags[0] && tags[0].type == 'tag') {
5189 var reAttr = /([\w\-:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g;
5190 var startTag = tags[0];
5191 var tagAttrs = startTag.full_tag.replace(/^<[\w\-\:]+/, '');
5192 var contextNode = {
5193 name: startTag.name,
5194 attributes: []
5195 };
5196
5197 // parse attributes
5198 var m;
5199 while (m = reAttr.exec(tagAttrs)) {
5200 contextNode.attributes.push({
5201 name: m[1],
5202 value: m[2]
5203 });
5204 }
5205
5206 return contextNode;
5207 }
5208 }
5209
5210 return null;
5211 },
5212
5213 /**
5214 * Find expression bounds in current editor at caret position.
5215 * On each character a <code>fn</code> function will be called and must
5216 * return <code>true</code> if current character meets requirements,
5217 * <code>false</code> otherwise
5218 * @param {IEmmetEditor} editor
5219 * @param {Function} fn Function to test each character of expression
5220 * @return {Range}
5221 */
5222 findExpressionBounds: function(editor, fn) {
5223 var content = String(editor.getContent());
5224 var il = content.length;
5225 var exprStart = editor.getCaretPos() - 1;
5226 var exprEnd = exprStart + 1;
5227
5228 // start by searching left
5229 while (exprStart >= 0 && fn(content.charAt(exprStart), exprStart, content)) exprStart--;
5230
5231 // then search right
5232 while (exprEnd < il && fn(content.charAt(exprEnd), exprEnd, content)) exprEnd++;
5233
5234 if (exprEnd > exprStart) {
5235 return require('range').create([++exprStart, exprEnd]);
5236 }
5237 },
5238
5239 /**
5240 * @param {IEmmetEditor} editor
5241 * @param {Object} data
5242 * @returns {Boolean}
5243 */
5244 compoundUpdate: function(editor, data) {
5245 if (data) {
5246 var sel = editor.getSelectionRange();
5247 editor.replaceContent(data.data, data.start, data.end, true);
5248 editor.createSelection(data.caret, data.caret + sel.end - sel.start);
5249 return true;
5250 }
5251
5252 return false;
5253 }
5254 };
5255 });/**
5256 * Utility functions to work with <code>AbbreviationNode</code> as HTML element
5257 * @param {Function} require
5258 * @param {Underscore} _
5259 */
5260 emmet.define('abbreviationUtils', function(require, _) {
5261 return {
5262 /**
5263 * Check if passed abbreviation node has matched snippet resource
5264 * @param {AbbreviationNode} node
5265 * @returns {Boolean}
5266 * @memberOf abbreviationUtils
5267 */
5268 isSnippet: function(node) {
5269 return require('elements').is(node.matchedResource(), 'snippet');
5270 },
5271
5272 /**
5273 * Test if passed node is unary (no closing tag)
5274 * @param {AbbreviationNode} node
5275 * @return {Boolean}
5276 */
5277 isUnary: function(node) {
5278 var r = node.matchedResource();
5279 if (node.children.length || this.isSnippet(node))
5280 return false;
5281
5282 return r && r.is_empty || require('tagName').isEmptyElement(node.name());
5283 },
5284
5285 /**
5286 * Test if passed node is inline-level (like &lt;strong&gt;, &lt;img&gt;)
5287 * @param {AbbreviationNode} node
5288 * @return {Boolean}
5289 */
5290 isInline: function(node) {
5291 return node.isTextNode()
5292 || !node.name()
5293 || require('tagName').isInlineLevel(node.name());
5294 },
5295
5296 /**
5297 * Test if passed node is block-level
5298 * @param {AbbreviationNode} node
5299 * @return {Boolean}
5300 */
5301 isBlock: function(node) {
5302 return require('elements').is(node.matchedResource(), 'snippet')
5303 || !this.isInline(node);
5304 },
5305
5306 /**
5307 * This function tests if passed node content contains HTML tags.
5308 * This function is mostly used for output formatting
5309 * @param {AbbreviationNode} node
5310 * @returns {Boolean}
5311 */
5312 hasTagsInContent: function(node) {
5313 return require('utils').matchesTag(node.content);
5314 },
5315
5316 /**
5317 * Test if current element contains block-level children
5318 * @param {AbbreviationNode} node
5319 * @return {Boolean}
5320 */
5321 hasBlockChildren: function(node) {
5322 return (this.hasTagsInContent(node) && this.isBlock(node))
5323 || _.any(node.children, function(child) {
5324 return this.isBlock(child);
5325 }, this);
5326 },
5327
5328 /**
5329 * Utility function that inserts content instead of <code>${child}</code>
5330 * variables on <code>text</code>
5331 * @param {String} text Text where child content should be inserted
5332 * @param {String} childContent Content to insert
5333 * @param {Object} options
5334 * @returns {String
5335 */
5336 insertChildContent: function(text, childContent, options) {
5337 options = _.extend({
5338 keepVariable: true,
5339 appendIfNoChild: true
5340 }, options || {});
5341
5342 var childVariableReplaced = false;
5343 var utils = require('utils');
5344 text = utils.replaceVariables(text, function(variable, name, data) {
5345 var output = variable;
5346 if (name == 'child') {
5347 // add correct indentation
5348 output = utils.padString(childContent, utils.getLinePaddingFromPosition(text, data.start));
5349 childVariableReplaced = true;
5350 if (options.keepVariable)
5351 output += variable;
5352 }
5353
5354 return output;
5355 });
5356
5357 if (!childVariableReplaced && options.appendIfNoChild) {
5358 text += childContent;
5359 }
5360
5361 return text;
5362 }
5363 };
5364 });/**
5365 * @author Sergey Chikuyonok (serge.che@gmail.com)
5366 * @link http://chikuyonok.ru
5367 */
5368 emmet.define('base64', function(require, _) {
5369 var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
5370
5371 return {
5372 /**
5373 * Encodes data using base64 algorithm
5374 * @author Tyler Akins (http://rumkin.com)
5375 * @param {String} input
5376 * @returns {String}
5377 * @memberOf emmet.base64
5378 */
5379 encode : function(input) {
5380 var output = [];
5381 var chr1, chr2, chr3, enc1, enc2, enc3, enc4, cdp1, cdp2, cdp3;
5382 var i = 0, il = input.length, b64 = chars;
5383
5384 while (i < il) {
5385
5386 cdp1 = input.charCodeAt(i++);
5387 cdp2 = input.charCodeAt(i++);
5388 cdp3 = input.charCodeAt(i++);
5389
5390 chr1 = cdp1 & 0xff;
5391 chr2 = cdp2 & 0xff;
5392 chr3 = cdp3 & 0xff;
5393
5394 enc1 = chr1 >> 2;
5395 enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
5396 enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
5397 enc4 = chr3 & 63;
5398
5399 if (isNaN(cdp2)) {
5400 enc3 = enc4 = 64;
5401 } else if (isNaN(cdp3)) {
5402 enc4 = 64;
5403 }
5404
5405 output.push(b64.charAt(enc1) + b64.charAt(enc2) + b64.charAt(enc3) + b64.charAt(enc4));
5406 }
5407
5408 return output.join('');
5409 },
5410
5411 /**
5412 * Decodes string using MIME base64 algorithm
5413 *
5414 * @author Tyler Akins (http://rumkin.com)
5415 * @param {String} data
5416 * @return {String}
5417 */
5418 decode : function(data) {
5419 var o1, o2, o3, h1, h2, h3, h4, bits, i = 0, ac = 0, tmpArr = [];
5420 var b64 = chars, il = data.length;
5421
5422 if (!data) {
5423 return data;
5424 }
5425
5426 data += '';
5427
5428 do { // unpack four hexets into three octets using index points in b64
5429 h1 = b64.indexOf(data.charAt(i++));
5430 h2 = b64.indexOf(data.charAt(i++));
5431 h3 = b64.indexOf(data.charAt(i++));
5432 h4 = b64.indexOf(data.charAt(i++));
5433
5434 bits = h1 << 18 | h2 << 12 | h3 << 6 | h4;
5435
5436 o1 = bits >> 16 & 0xff;
5437 o2 = bits >> 8 & 0xff;
5438 o3 = bits & 0xff;
5439
5440 if (h3 == 64) {
5441 tmpArr[ac++] = String.fromCharCode(o1);
5442 } else if (h4 == 64) {
5443 tmpArr[ac++] = String.fromCharCode(o1, o2);
5444 } else {
5445 tmpArr[ac++] = String.fromCharCode(o1, o2, o3);
5446 }
5447 } while (i < il);
5448
5449 return tmpArr.join('');
5450 }
5451 };
5452 });/**
5453 * @author Sergey Chikuyonok (serge.che@gmail.com)
5454 * @link http://chikuyonok.ru
5455 */
5456 (function(){
5457 // Regular Expressions for parsing tags and attributes
5458 var start_tag = /^<([\w\:\-]+)((?:\s+[\w\-:]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/,
5459 end_tag = /^<\/([\w\:\-]+)[^>]*>/,
5460 attr = /([\w\-:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g;
5461
5462 // Empty Elements - HTML 4.01
5463 var empty = makeMap("area,base,basefont,br,col,frame,hr,img,input,isindex,link,meta,param,embed");
5464
5465 // Block Elements - HTML 4.01
5466 var block = makeMap("address,applet,blockquote,button,center,dd,dir,div,dl,dt,fieldset,form,frameset,hr,iframe,isindex,li,map,menu,noframes,noscript,object,ol,p,pre,script,table,tbody,td,tfoot,th,thead,tr,ul");
5467
5468 // Inline Elements - HTML 4.01
5469 var inline = makeMap("a,abbr,acronym,applet,b,basefont,bdo,big,br,button,cite,code,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,select,small,span,strike,strong,sub,sup,textarea,tt,u,var");
5470
5471 // Elements that you can, intentionally, leave open
5472 // (and which close themselves)
5473 var close_self = makeMap("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr");
5474
5475 /** Current matching mode */
5476 var cur_mode = 'xhtml';
5477
5478 /** Last matched HTML pair */
5479 var last_match = {
5480 opening_tag: null, // tag() or comment() object
5481 closing_tag: null, // tag() or comment() object
5482 start_ix: -1,
5483 end_ix: -1
5484 };
5485
5486 function setMode(new_mode) {
5487 if (!new_mode || new_mode != 'html')
5488 new_mode = 'xhtml';
5489
5490 cur_mode = new_mode;
5491 }
5492
5493 function tag(match, ix) {
5494 var name = match[1].toLowerCase();
5495 return {
5496 name: name,
5497 full_tag: match[0],
5498 start: ix,
5499 end: ix + match[0].length,
5500 unary: Boolean(match[3]) || (name in empty && cur_mode == 'html'),
5501 has_close: Boolean(match[3]),
5502 type: 'tag',
5503 close_self: (name in close_self && cur_mode == 'html')
5504 };
5505 }
5506
5507 function comment(start, end) {
5508 return {
5509 start: start,
5510 end: end,
5511 type: 'comment'
5512 };
5513 }
5514
5515 function makeMap(str){
5516 var obj = {}, items = str.split(",");
5517 for ( var i = 0; i < items.length; i++ )
5518 obj[ items[i] ] = true;
5519 return obj;
5520 }
5521
5522 /**
5523 * Makes selection ranges for matched tag pair
5524 * @param {tag} opening_tag
5525 * @param {tag} closing_tag
5526 * @param {Number} ix
5527 */
5528 function makeRange(opening_tag, closing_tag, ix) {
5529 ix = ix || 0;
5530
5531 var start_ix = -1,
5532 end_ix = -1;
5533
5534 if (opening_tag && !closing_tag) { // unary element
5535 start_ix = opening_tag.start;
5536 end_ix = opening_tag.end;
5537 } else if (opening_tag && closing_tag) { // complete element
5538 if (
5539 (opening_tag.start < ix && opening_tag.end > ix) ||
5540 (closing_tag.start <= ix && closing_tag.end > ix)
5541 ) {
5542 start_ix = opening_tag.start;
5543 end_ix = closing_tag.end;
5544 } else {
5545 start_ix = opening_tag.end;
5546 end_ix = closing_tag.start;
5547 }
5548 }
5549
5550 return [start_ix, end_ix];
5551 }
5552
5553 /**
5554 * Save matched tag for later use and return found indexes
5555 * @param {tag} opening_tag
5556 * @param {tag} closing_tag
5557 * @param {Number} ix
5558 * @return {Array}
5559 */
5560 function saveMatch(opening_tag, closing_tag, ix) {
5561 ix = ix || 0;
5562 last_match.opening_tag = opening_tag;
5563 last_match.closing_tag = closing_tag;
5564
5565 var range = makeRange(opening_tag, closing_tag, ix);
5566 last_match.start_ix = range[0];
5567 last_match.end_ix = range[1];
5568
5569 return last_match.start_ix != -1 ? [last_match.start_ix, last_match.end_ix] : null;
5570 }
5571
5572 /**
5573 * Handle unary tag: find closing tag if needed
5574 * @param {String} text
5575 * @param {Number} ix
5576 * @param {tag} open_tag
5577 * @return {tag|null} Closing tag (or null if not found)
5578 */
5579 function handleUnaryTag(text, ix, open_tag) {
5580 if (open_tag.has_close)
5581 return null;
5582 else {
5583 // TODO finish this method
5584 }
5585 }
5586
5587 /**
5588 * Search for matching tags in <code>html</code>, starting from
5589 * <code>start_ix</code> position
5590 * @param {String} html Code to search
5591 * @param {Number} start_ix Character index where to start searching pair
5592 * (commonly, current caret position)
5593 * @param {Function} action Function that creates selection range
5594 * @return {Array}
5595 */
5596 function findPair(html, start_ix, mode, action) {
5597 action = action || makeRange;
5598 setMode(mode);
5599
5600 var forward_stack = [],
5601 backward_stack = [],
5602 /** @type {tag()} */
5603 opening_tag = null,
5604 /** @type {tag()} */
5605 closing_tag = null,
5606 html_len = html.length,
5607 m,
5608 ix,
5609 tmp_tag;
5610
5611 forward_stack.last = backward_stack.last = function() {
5612 return this[this.length - 1];
5613 };
5614
5615 function hasMatch(str, start) {
5616 if (arguments.length == 1)
5617 start = ix;
5618 return html.substr(start, str.length) == str;
5619 }
5620
5621 function searchCommentStart(from) {
5622 while (from--) {
5623 if (html.charAt(from) == '<' && hasMatch('<!--', from))
5624 break;
5625 }
5626
5627 return from;
5628 }
5629
5630 // find opening tag
5631 ix = start_ix;
5632 while (ix-- && ix >= 0) {
5633 var ch = html.charAt(ix);
5634 if (ch == '<') {
5635 var check_str = html.substring(ix, html_len);
5636
5637 if ( (m = check_str.match(end_tag)) ) { // found closing tag
5638 tmp_tag = tag(m, ix);
5639 if (tmp_tag.start < start_ix && tmp_tag.end > start_ix) // direct hit on searched closing tag
5640 closing_tag = tmp_tag;
5641 else
5642 backward_stack.push(tmp_tag);
5643 } else if ( (m = check_str.match(start_tag)) ) { // found opening tag
5644 tmp_tag = tag(m, ix);
5645
5646 if (tmp_tag.unary) {
5647 if (tmp_tag.start < start_ix && tmp_tag.end > start_ix) // exact match
5648 // TODO handle unary tag
5649 return action(tmp_tag, null, start_ix);
5650 } else if (backward_stack.last() && backward_stack.last().name == tmp_tag.name) {
5651 backward_stack.pop();
5652 } else { // found nearest unclosed tag
5653 opening_tag = tmp_tag;
5654 break;
5655 }
5656 } else if (check_str.indexOf('<!--') == 0) { // found comment start
5657 var end_ix = check_str.search('-->') + ix + 3;
5658 if (ix < start_ix && end_ix >= start_ix)
5659 return action( comment(ix, end_ix) );
5660 }
5661 } else if (ch == '-' && hasMatch('-->')) { // found comment end
5662 // search left until comment start is reached
5663 ix = searchCommentStart(ix);
5664 }
5665 }
5666
5667 if (!opening_tag)
5668 return action(null);
5669
5670 // find closing tag
5671 if (!closing_tag) {
5672 for (ix = start_ix; ix < html_len; ix++) {
5673 var ch = html.charAt(ix);
5674 if (ch == '<') {
5675 var check_str = html.substring(ix, html_len);
5676
5677 if ( (m = check_str.match(start_tag)) ) { // found opening tag
5678 tmp_tag = tag(m, ix);
5679 if (!tmp_tag.unary)
5680 forward_stack.push( tmp_tag );
5681 } else if ( (m = check_str.match(end_tag)) ) { // found closing tag
5682 var tmp_tag = tag(m, ix);
5683 if (forward_stack.last() && forward_stack.last().name == tmp_tag.name)
5684 forward_stack.pop();
5685 else { // found matched closing tag
5686 closing_tag = tmp_tag;
5687 break;
5688 }
5689 } else if (hasMatch('<!--')) { // found comment
5690 ix += check_str.search('-->') + 2;
5691 }
5692 } else if (ch == '-' && hasMatch('-->')) {
5693 // looks like cursor was inside comment with invalid HTML
5694 if (!forward_stack.last() || forward_stack.last().type != 'comment') {
5695 var end_ix = ix + 3;
5696 return action(comment( searchCommentStart(ix), end_ix ));
5697 }
5698 }
5699 }
5700 }
5701
5702 return action(opening_tag, closing_tag, start_ix);
5703 }
5704
5705 /**
5706 * Search for matching tags in <code>html</code>, starting
5707 * from <code>start_ix</code> position. The result is automatically saved in
5708 * <code>last_match</code> property
5709 *
5710 * @return {Array|null}
5711 */
5712 var HTMLPairMatcher = function(/* String */ html, /* Number */ start_ix, /* */ mode){
5713 return findPair(html, start_ix, mode, saveMatch);
5714 };
5715
5716 HTMLPairMatcher.start_tag = start_tag;
5717 HTMLPairMatcher.end_tag = end_tag;
5718
5719 /**
5720 * Search for matching tags in <code>html</code>, starting from
5721 * <code>start_ix</code> position. The difference between
5722 * <code>HTMLPairMatcher</code> function itself is that <code>find</code>
5723 * method doesn't save matched result in <code>last_match</code> property.
5724 * This method is generally used for lookups
5725 */
5726 HTMLPairMatcher.find = function(html, start_ix, mode) {
5727 return findPair(html, start_ix, mode);
5728 };
5729
5730 /**
5731 * Search for matching tags in <code>html</code>, starting from
5732 * <code>start_ix</code> position. The difference between
5733 * <code>HTMLPairMatcher</code> function itself is that <code>getTags</code>
5734 * method doesn't save matched result in <code>last_match</code> property
5735 * and returns array of opening and closing tags
5736 * This method is generally used for lookups
5737 */
5738 HTMLPairMatcher.getTags = function(html, start_ix, mode) {
5739 return findPair(html, start_ix, mode, function(opening_tag, closing_tag){
5740 return [opening_tag, closing_tag];
5741 });
5742 };
5743
5744 HTMLPairMatcher.last_match = last_match;
5745
5746 try {
5747 emmet.define('html_matcher', function() {
5748 return HTMLPairMatcher;
5749 });
5750 } catch(e){}
5751
5752 })();/**
5753 * Utility module for handling tabstops tokens generated by Emmet's
5754 * "Expand Abbreviation" action. The main <code>extract</code> method will take
5755 * raw text (for example: <i>${0} some ${1:text}</i>), find all tabstops
5756 * occurrences, replace them with tokens suitable for your editor of choice and
5757 * return object with processed text and list of found tabstops and their ranges.
5758 * For sake of portability (Objective-C/Java) the tabstops list is a plain
5759 * sorted array with plain objects.
5760 *
5761 * Placeholders with the same are meant to be <i>linked</i> in your editor.
5762 * @param {Function} require
5763 * @param {Underscore} _
5764 */
5765 emmet.define('tabStops', function(require, _) {
5766 /**
5767 * Global placeholder value, automatically incremented by
5768 * <code>variablesResolver()</code> function
5769 */
5770 var startPlaceholderNum = 100;
5771
5772 var tabstopIndex = 0;
5773
5774 var defaultOptions = {
5775 replaceCarets: false,
5776 escape: function(ch) {
5777 return '\\' + ch;
5778 },
5779 tabstop: function(data) {
5780 return data.token;
5781 },
5782 variable: function(data) {
5783 return data.token;
5784 }
5785 };
5786
5787 // XXX register output processor that will upgrade tabstops of parsed node
5788 // in order to prevent tabstop index conflicts
5789 require('abbreviationParser').addOutputProcessor(function(text, node, type) {
5790 var maxNum = 0;
5791 var tabstops = require('tabStops');
5792 var utils = require('utils');
5793
5794 // upgrade tabstops
5795 text = tabstops.processText(text, {
5796 tabstop: function(data) {
5797 var group = parseInt(data.group);
5798 if (group == 0)
5799 return '${0}';
5800
5801 if (group > maxNum) maxNum = group;
5802 if (data.placeholder)
5803 return '${' + (group + tabstopIndex) + ':' + data.placeholder + '}';
5804 else
5805 return '${' + (group + tabstopIndex) + '}';
5806 }
5807 });
5808
5809 // resolve variables
5810 text = utils.replaceVariables(text, tabstops.variablesResolver(node));
5811
5812 tabstopIndex += maxNum + 1;
5813 return text;
5814 });
5815
5816 return {
5817 /**
5818 * Main function that looks for a tabstops in provided <code>text</code>
5819 * and returns a processed version of <code>text</code> with expanded
5820 * placeholders and list of tabstops found.
5821 * @param {String} text Text to process
5822 * @param {Object} options List of processor options:<br>
5823 *
5824 * <b>replaceCarets</b> : <code>Boolean</code> — replace all default
5825 * caret placeholders (like <i>{%::emmet-caret::%}</i>) with <i>${0:caret}</i><br>
5826 *
5827 * <b>escape</b> : <code>Function</code> — function that handle escaped
5828 * characters (mostly '$'). By default, it returns the character itself
5829 * to be displayed as is in output, but sometimes you will use
5830 * <code>extract</code> method as intermediate solution for further
5831 * processing and want to keep character escaped. Thus, you should override
5832 * <code>escape</code> method to return escaped symbol (e.g. '\\$')<br>
5833 *
5834 * <b>tabstop</b> : <code>Function</code> – a tabstop handler. Receives
5835 * a single argument – an object describing token: its position, number
5836 * group, placeholder and token itself. Should return a replacement
5837 * string that will appear in final output
5838 *
5839 * <b>variable</b> : <code>Function</code> – variable handler. Receives
5840 * a single argument – an object describing token: its position, name
5841 * and original token itself. Should return a replacement
5842 * string that will appear in final output
5843 *
5844 * @returns {Object} Object with processed <code>text</code> property
5845 * and array of <code>tabstops</code> found
5846 * @memberOf tabStops
5847 */
5848 extract: function(text, options) {
5849 // prepare defaults
5850 var utils = require('utils');
5851 var placeholders = {carets: ''};
5852 var marks = [];
5853
5854 options = _.extend({}, defaultOptions, options, {
5855 tabstop: function(data) {
5856 var token = data.token;
5857 var ret = '';
5858 if (data.placeholder == 'cursor') {
5859 marks.push({
5860 start: data.start,
5861 end: data.start + token.length,
5862 group: 'carets',
5863 value: ''
5864 });
5865 } else {
5866 // unify placeholder value for single group
5867 if ('placeholder' in data)
5868 placeholders[data.group] = data.placeholder;
5869
5870 if (data.group in placeholders)
5871 ret = placeholders[data.group];
5872
5873 marks.push({
5874 start: data.start,
5875 end: data.start + token.length,
5876 group: data.group,
5877 value: ret
5878 });
5879 }
5880
5881 return token;
5882 }
5883 });
5884
5885 if (options.replaceCarets) {
5886 text = text.replace(new RegExp( utils.escapeForRegexp( utils.getCaretPlaceholder() ), 'g'), '${0:cursor}');
5887 }
5888
5889 // locate tabstops and unify group's placeholders
5890 text = this.processText(text, options);
5891
5892 // now, replace all tabstops with placeholders
5893 var buf = utils.stringBuilder(), lastIx = 0;
5894 var tabStops = _.map(marks, function(mark) {
5895 buf.append(text.substring(lastIx, mark.start));
5896
5897 var pos = buf.length;
5898 var ph = placeholders[mark.group] || '';
5899
5900 buf.append(ph);
5901 lastIx = mark.end;
5902
5903 return {
5904 group: mark.group,
5905 start: pos,
5906 end: pos + ph.length
5907 };
5908 });
5909
5910 buf.append(text.substring(lastIx));
5911
5912 return {
5913 text: buf.toString(),
5914 tabstops: _.sortBy(tabStops, 'start')
5915 };
5916 },
5917
5918 /**
5919 * Text processing routine. Locates escaped characters and tabstops and
5920 * replaces them with values returned by handlers defined in
5921 * <code>options</code>
5922 * @param {String} text
5923 * @param {Object} options See <code>extract</code> method options
5924 * description
5925 * @returns {String}
5926 */
5927 processText: function(text, options) {
5928 options = _.extend({}, defaultOptions, options);
5929
5930 var buf = require('utils').stringBuilder();
5931 /** @type StringStream */
5932 var stream = require('stringStream').create(text);
5933 var ch, m, a;
5934
5935 while (ch = stream.next()) {
5936 if (ch == '\\' && !stream.eol()) {
5937 // handle escaped character
5938 buf.append(options.escape(stream.next()));
5939 continue;
5940 }
5941
5942 a = ch;
5943
5944 if (ch == '$') {
5945 // looks like a tabstop
5946 stream.start = stream.pos - 1;
5947
5948 if (m = stream.match(/^[0-9]+/)) {
5949 // it's $N
5950 a = options.tabstop({
5951 start: buf.length,
5952 group: stream.current().substr(1),
5953 token: stream.current()
5954 });
5955 } else if (m = stream.match(/^\{([a-z_\-][\w\-]*)\}/)) {
5956 // ${variable}
5957 a = options.variable({
5958 start: buf.length,
5959 name: m[1],
5960 token: stream.current()
5961 });
5962 } else if (m = stream.match(/^\{([0-9]+)(:.+?)?\}/)) {
5963 // ${N:value} or ${N} placeholder
5964 var obj = {
5965 start: buf.length,
5966 group: m[1],
5967 token: stream.current()
5968 };
5969
5970 if (m[2]) {
5971 obj.placeholder = m[2].substr(1);
5972 }
5973
5974 a = options.tabstop(obj);
5975 }
5976 }
5977
5978 buf.append(a);
5979 }
5980
5981 return buf.toString();
5982 },
5983
5984 /**
5985 * Upgrades tabstops in output node in order to prevent naming conflicts
5986 * @param {AbbreviationNode} node
5987 * @param {Number} offset Tab index offset
5988 * @returns {Number} Maximum tabstop index in element
5989 */
5990 upgrade: function(node, offset) {
5991 var maxNum = 0;
5992 var options = {
5993 tabstop: function(data) {
5994 var group = parseInt(data.group);
5995 if (group > maxNum) maxNum = group;
5996
5997 if (data.placeholder)
5998 return '${' + (group + offset) + ':' + data.placeholder + '}';
5999 else
6000 return '${' + (group + offset) + '}';
6001 }
6002 };
6003
6004 _.each(['start', 'end', 'content'], function(p) {
6005 node[p] = this.processText(node[p], options);
6006 }, this);
6007
6008 return maxNum;
6009 },
6010
6011 /**
6012 * Helper function that produces a callback function for
6013 * <code>replaceVariables()</code> method from {@link utils}
6014 * module. This callback will replace variable definitions (like
6015 * ${var_name}) with their value defined in <i>resource</i> module,
6016 * or outputs tabstop with variable name otherwise.
6017 * @param {AbbreviationNode} node Context node
6018 * @returns {Function}
6019 */
6020 variablesResolver: function(node) {
6021 var placeholderMemo = {};
6022 var res = require('resources');
6023 return function(str, varName) {
6024 // do not mark `child` variable as placeholder – it‘s a reserved
6025 // variable name
6026 if (varName == 'child')
6027 return str;
6028
6029 if (varName == 'cursor')
6030 return require('utils').getCaretPlaceholder();
6031
6032 var attr = node.attribute(varName);
6033 if (!_.isUndefined(attr))
6034 return attr;
6035
6036 var varValue = res.getVariable(varName);
6037 if (varValue)
6038 return varValue;
6039
6040 // output as placeholder
6041 if (!placeholderMemo[varName])
6042 placeholderMemo[varName] = startPlaceholderNum++;
6043
6044 return '${' + placeholderMemo[varName] + ':' + varName + '}';
6045 };
6046 },
6047
6048 resetPlaceholderCounter: function() {
6049 console.log('deprecated');
6050 startPlaceholderNum = 100;
6051 },
6052
6053 /**
6054 * Resets global tabstop index. When parsed tree is converted to output
6055 * string (<code>AbbreviationNode.toString()</code>), all tabstops
6056 * defined in snippets and elements are upgraded in order to prevent
6057 * naming conflicts of nested. For example, <code>${1}</code> of a node
6058 * should not be linked with the same placehilder of the child node.
6059 * By default, <code>AbbreviationNode.toString()</code> automatically
6060 * upgrades tabstops of the same index for each node and writes maximum
6061 * tabstop index into the <code>tabstopIndex</code> variable. To keep
6062 * this variable at reasonable value, it is recommended to call
6063 * <code>resetTabstopIndex()</code> method each time you expand variable
6064 * @returns
6065 */
6066 resetTabstopIndex: function() {
6067 tabstopIndex = 0;
6068 startPlaceholderNum = 100;
6069 }
6070 };
6071 });/**
6072 * Common module's preferences storage. This module
6073 * provides general storage for all module preferences, their description and
6074 * default values.<br><br>
6075 *
6076 * This module can also be used to list all available properties to create
6077 * UI for updating properties
6078 *
6079 * @memberOf __preferencesDefine
6080 * @constructor
6081 * @param {Function} require
6082 * @param {Underscore} _
6083 */
6084 emmet.define('preferences', function(require, _) {
6085 var preferences = {};
6086 var defaults = {};
6087 var _dbgDefaults = null;
6088 var _dbgPreferences = null;
6089
6090 function toBoolean(val) {
6091 if (_.isString(val)) {
6092 val = val.toLowerCase();
6093 return val == 'yes' || val == 'true' || val == '1';
6094 }
6095
6096 return !!val;
6097 }
6098
6099 function isValueObj(obj) {
6100 return _.isObject(obj)
6101 && 'value' in obj
6102 && _.keys(obj).length < 3;
6103 }
6104
6105 return {
6106 /**
6107 * Creates new preference item with default value
6108 * @param {String} name Preference name. You can also pass object
6109 * with many options
6110 * @param {Object} value Preference default value
6111 * @param {String} description Item textual description
6112 * @memberOf preferences
6113 */
6114 define: function(name, value, description) {
6115 var prefs = name;
6116 if (_.isString(name)) {
6117 prefs = {};
6118 prefs[name] = {
6119 value: value,
6120 description: description
6121 };
6122 }
6123
6124 _.each(prefs, function(v, k) {
6125 defaults[k] = isValueObj(v) ? v : {value: v};
6126 });
6127 },
6128
6129 /**
6130 * Updates preference item value. Preference value should be defined
6131 * first with <code>define</code> method.
6132 * @param {String} name Preference name. You can also pass object
6133 * with many options
6134 * @param {Object} value Preference default value
6135 * @memberOf preferences
6136 */
6137 set: function(name, value) {
6138 var prefs = name;
6139 if (_.isString(name)) {
6140 prefs = {};
6141 prefs[name] = value;
6142 }
6143
6144 _.each(prefs, function(v, k) {
6145 if (!(k in defaults)) {
6146 throw 'Property "' + k + '" is not defined. You should define it first with `define` method of current module';
6147 }
6148
6149 // do not set value if it equals to default value
6150 if (v !== defaults[k].value) {
6151 // make sure we have value of correct type
6152 switch (typeof defaults[k].value) {
6153 case 'boolean':
6154 v = toBoolean(v);
6155 break;
6156 case 'number':
6157 v = parseInt(v + '', 10) || 0;
6158 break;
6159 default: // convert to string
6160 v += '';
6161 }
6162
6163 preferences[k] = v;
6164 } else if (k in preferences) {
6165 delete preferences[k];
6166 }
6167 });
6168 },
6169
6170 /**
6171 * Returns preference value
6172 * @param {String} name
6173 * @returns {String} Returns <code>undefined</code> if preference is
6174 * not defined
6175 */
6176 get: function(name) {
6177 if (name in preferences)
6178 return preferences[name];
6179
6180 if (name in defaults)
6181 return defaults[name].value;
6182
6183 return void 0;
6184 },
6185
6186 /**
6187 * Returns comma-separated preference value as array of values
6188 * @param {String} name
6189 * @returns {Array} Returns <code>undefined</code> if preference is
6190 * not defined, <code>null</code> if string cannot be converted to array
6191 */
6192 getArray: function(name) {
6193 var val = this.get(name);
6194 if (!_.isUndefined(val)) {
6195 val = _.map(val.split(','), require('utils').trim);
6196 if (!val.length)
6197 val = null;
6198 }
6199
6200 return val;
6201 },
6202
6203 /**
6204 * Returns comma and colon-separated preference value as dictionary
6205 * @param {String} name
6206 * @returns {Object}
6207 */
6208 getDict: function(name) {
6209 var result = {};
6210 _.each(this.getArray(name), function(val) {
6211 var parts = val.split(':');
6212 result[parts[0]] = parts[1];
6213 });
6214
6215 return result;
6216 },
6217
6218 /**
6219 * Returns description of preference item
6220 * @param {String} name Preference name
6221 * @returns {Object}
6222 */
6223 description: function(name) {
6224 return name in defaults ? defaults[name].description : void 0;
6225 },
6226
6227 /**
6228 * Completely removes specified preference(s)
6229 * @param {String} name Preference name (or array of names)
6230 */
6231 remove: function(name) {
6232 if (!_.isArray(name))
6233 name = [name];
6234
6235 _.each(name, function(key) {
6236 if (key in preferences)
6237 delete preferences[key];
6238
6239 if (key in defaults)
6240 delete defaults[key];
6241 });
6242 },
6243
6244 /**
6245 * Returns sorted list of all available properties
6246 * @returns {Array}
6247 */
6248 list: function() {
6249 return _.map(_.keys(defaults).sort(), function(key) {
6250 return {
6251 name: key,
6252 value: this.get(key),
6253 type: typeof defaults[key].value,
6254 description: defaults[key].description
6255 };
6256 }, this);
6257 },
6258
6259 /**
6260 * Loads user-defined preferences from JSON
6261 * @param {Object} json
6262 * @returns
6263 */
6264 load: function(json) {
6265 _.each(json, function(value, key) {
6266 this.set(key, value);
6267 }, this);
6268 },
6269
6270 /**
6271 * Returns hash of user-modified preferences
6272 * @returns {Object}
6273 */
6274 exportModified: function() {
6275 return _.clone(preferences);
6276 },
6277
6278 /**
6279 * Reset to defaults
6280 * @returns
6281 */
6282 reset: function() {
6283 preferences = {};
6284 },
6285
6286 /**
6287 * For unit testing: use empty storage
6288 */
6289 _startTest: function() {
6290 _dbgDefaults = defaults;
6291 _dbgPreferences = preferences;
6292 defaults = {};
6293 preferences = {};
6294 },
6295
6296 /**
6297 * For unit testing: restore original storage
6298 */
6299 _stopTest: function() {
6300 defaults = _dbgDefaults;
6301 preferences = _dbgPreferences;
6302 }
6303 };
6304 });/**
6305 * Module for handling filters
6306 * @param {Function} require
6307 * @param {Underscore} _
6308 * @author Sergey Chikuyonok (serge.che@gmail.com) <http://chikuyonok.ru>
6309 */
6310 emmet.define('filters', function(require, _) {
6311 /** List of registered filters */
6312 var registeredFilters = {};
6313
6314 /** Filters that will be applied for unknown syntax */
6315 var basicFilters = 'html';
6316
6317 function list(filters) {
6318 if (!filters)
6319 return [];
6320
6321 if (_.isString(filters))
6322 return filters.split(/[\|,]/g);
6323
6324 return filters;
6325 }
6326
6327 return {
6328 /**
6329 * Register new filter
6330 * @param {String} name Filter name
6331 * @param {Function} fn Filter function
6332 */
6333 add: function(name, fn) {
6334 registeredFilters[name] = fn;
6335 },
6336
6337 /**
6338 * Apply filters for final output tree
6339 * @param {AbbreviationNode} tree Output tree
6340 * @param {Array} filters List of filters to apply. Might be a
6341 * <code>String</code>
6342 * @param {Object} profile Output profile, defined in <i>profile</i>
6343 * module. Filters defined it profile are not used, <code>profile</code>
6344 * is passed to filter function
6345 * @memberOf emmet.filters
6346 * @returns {AbbreviationNode}
6347 */
6348 apply: function(tree, filters, profile) {
6349 var utils = require('utils');
6350 profile = require('profile').get(profile);
6351
6352 _.each(list(filters), function(filter) {
6353 var name = utils.trim(filter.toLowerCase());
6354 if (name && name in registeredFilters) {
6355 tree = registeredFilters[name](tree, profile);
6356 }
6357 });
6358
6359 return tree;
6360 },
6361
6362 /**
6363 * Composes list of filters that should be applied to a tree, based on
6364 * passed data
6365 * @param {String} syntax Syntax name ('html', 'css', etc.)
6366 * @param {Object} profile Output profile
6367 * @param {String} additionalFilters List or pipe-separated
6368 * string of additional filters to apply
6369 * @returns {Array}
6370 */
6371 composeList: function(syntax, profile, additionalFilters) {
6372 profile = require('profile').get(profile);
6373 var filters = list(profile.filters || require('resources').findItem(syntax, 'filters') || basicFilters);
6374
6375 if (additionalFilters)
6376 filters = filters.concat(list(additionalFilters));
6377
6378 if (!filters || !filters.length)
6379 // looks like unknown syntax, apply basic filters
6380 filters = list(basicFilters);
6381
6382 return filters;
6383 },
6384
6385 /**
6386 * Extracts filter list from abbreviation
6387 * @param {String} abbr
6388 * @returns {Array} Array with cleaned abbreviation and list of
6389 * extracted filters
6390 */
6391 extractFromAbbreviation: function(abbr) {
6392 var filters = '';
6393 abbr = abbr.replace(/\|([\w\|\-]+)$/, function(str, p1){
6394 filters = p1;
6395 return '';
6396 });
6397
6398 return [abbr, list(filters)];
6399 }
6400 };
6401 });/**
6402 * Module that contains factories for element types used by Emmet
6403 * @param {Function} require
6404 * @param {Underscore} _
6405 */
6406 emmet.define('elements', function(require, _) {
6407 var factories = {};
6408 var reAttrs = /([\w\-]+)\s*=\s*(['"])(.*?)\2/g;
6409
6410 var result = {
6411 /**
6412 * Create new element factory
6413 * @param {String} name Element identifier
6414 * @param {Function} factory Function that produces element of specified
6415 * type. The object generated by this factory is automatically
6416 * augmented with <code>type</code> property pointing to element
6417 * <code>name</code>
6418 * @memberOf elements
6419 */
6420 add: function(name, factory) {
6421 var that = this;
6422 factories[name] = function() {
6423 var elem = factory.apply(that, arguments);
6424 if (elem)
6425 elem.type = name;
6426
6427 return elem;
6428 };
6429 },
6430
6431 /**
6432 * Returns factory for specified name
6433 * @param {String} name
6434 * @returns {Function}
6435 */
6436 get: function(name) {
6437 return factories[name];
6438 },
6439
6440 /**
6441 * Creates new element with specified type
6442 * @param {String} name
6443 * @returns {Object}
6444 */
6445 create: function(name) {
6446 var args = [].slice.call(arguments, 1);
6447 var factory = this.get(name);
6448 return factory ? factory.apply(this, args) : null;
6449 },
6450
6451 /**
6452 * Check if passed element is of specified type
6453 * @param {Object} elem
6454 * @param {String} type
6455 * @returns {Boolean}
6456 */
6457 is: function(elem, type) {
6458 return elem && elem.type === type;
6459 }
6460 };
6461
6462 // register resource references
6463 function commonFactory(value) {
6464 return {data: value};
6465 }
6466
6467 /**
6468 * Element factory
6469 * @param {String} elementName Name of output element
6470 * @param {String} attrs Attributes definition. You may also pass
6471 * <code>Array</code> where each contains object with <code>name</code>
6472 * and <code>value</code> properties, or <code>Object</code>
6473 * @param {Boolean} isEmpty Is expanded element should be empty
6474 */
6475 result.add('element', function(elementName, attrs, isEmpty) {
6476 var ret = {
6477 /** @memberOf __emmetDataElement */
6478 name: elementName,
6479 is_empty: !!isEmpty
6480 };
6481
6482 if (attrs) {
6483 ret.attributes = [];
6484 if (_.isArray(attrs)) {
6485 ret.attributes = attrs;
6486 } else if (_.isString(attrs)) {
6487 var m;
6488 while (m = reAttrs.exec(attrs)) {
6489 ret.attributes.push({
6490 name: m[1],
6491 value: m[3]
6492 });
6493 }
6494 } else {
6495 _.each(attrs, function(value, name) {
6496 ret.attributes.push({
6497 name: name,
6498 value: value
6499 });
6500 });
6501 }
6502 }
6503
6504 return ret;
6505 });
6506
6507 result.add('snippet', commonFactory);
6508 result.add('reference', commonFactory);
6509 result.add('empty', function() {
6510 return {};
6511 });
6512
6513 return result;
6514 });/**
6515 * Abstract implementation of edit tree interface.
6516 * Edit tree is a named container of editable “name-value” child elements,
6517 * parsed from <code>source</code>. This container provides convenient methods
6518 * for editing/adding/removing child elements. All these update actions are
6519 * instantly reflected in the <code>source</code> code with respect of formatting.
6520 * <br><br>
6521 * For example, developer can create an edit tree from CSS rule and add or
6522 * remove properties from it–all changes will be immediately reflected in the
6523 * original source.
6524 * <br><br>
6525 * All classes defined in this module should be extended the same way as in
6526 * Backbone framework: using <code>extend</code> method to create new class and
6527 * <code>initialize</code> method to define custom class constructor.
6528 *
6529 * @example
6530 * <pre><code>
6531 * var MyClass = require('editTree').EditElement.extend({
6532 * initialize: function() {
6533 * // constructor code here
6534 * }
6535 * });
6536 *
6537 * var elem = new MyClass();
6538 * </code></pre>
6539 *
6540 *
6541 * @param {Function} require
6542 * @param {Underscore} _
6543 * @constructor
6544 * @memberOf __editTreeDefine
6545 */
6546 emmet.define('editTree', function(require, _, core) {
6547 var range = require('range').create;
6548
6549 /**
6550 * Named container of edited source
6551 * @type EditContainer
6552 * @param {String} source
6553 * @param {Object} options
6554 */
6555 function EditContainer(source, options) {
6556 this.options = _.extend({offset: 0}, options);
6557 /**
6558 * Source code of edited structure. All changes in the structure are
6559 * immediately reflected into this property
6560 */
6561 this.source = source;
6562
6563 /**
6564 * List of all editable children
6565 * @private
6566 */
6567 this._children = [];
6568
6569 /**
6570 * Hash of all positions of container
6571 * @private
6572 */
6573 this._positions = {
6574 name: 0
6575 };
6576
6577 this.initialize.apply(this, arguments);
6578 }
6579
6580 /**
6581 * The self-propagating extend function for classes.
6582 * @type Function
6583 */
6584 EditContainer.extend = core.extend;
6585
6586 EditContainer.prototype = {
6587 /**
6588 * Child class constructor
6589 */
6590 initialize: function() {},
6591
6592 /**
6593 * Replace substring of tag's source
6594 * @param {String} value
6595 * @param {Number} start
6596 * @param {Number} end
6597 * @private
6598 */
6599 _updateSource: function(value, start, end) {
6600 // create modification range
6601 var r = range(start, _.isUndefined(end) ? 0 : end - start);
6602 var delta = value.length - r.length();
6603
6604 var update = function(obj) {
6605 _.each(obj, function(v, k) {
6606 if (v >= r.end)
6607 obj[k] += delta;
6608 });
6609 };
6610
6611 // update affected positions of current container
6612 update(this._positions);
6613
6614 // update affected positions of children
6615 _.each(this.list(), function(item) {
6616 update(item._positions);
6617 });
6618
6619 this.source = require('utils').replaceSubstring(this.source, value, r);
6620 },
6621
6622
6623 /**
6624 * Adds new attribute
6625 * @param {String} name Property name
6626 * @param {String} value Property value
6627 * @param {Number} pos Position at which to insert new property. By
6628 * default the property is inserted at the end of rule
6629 * @returns {EditElement} Newly created element
6630 */
6631 add: function(name, value, pos) {
6632 // this is abstract implementation
6633 var item = new EditElement(name, value);
6634 this._children.push(item);
6635 return item;
6636 },
6637
6638 /**
6639 * Returns attribute object
6640 * @param {String} name Attribute name or its index
6641 * @returns {EditElement}
6642 */
6643 get: function(name) {
6644 if (_.isNumber(name))
6645 return this.list()[name];
6646
6647 if (_.isString(name))
6648 return _.find(this.list(), function(prop) {
6649 return prop.name() === name;
6650 });
6651
6652 return name;
6653 },
6654
6655 /**
6656 * Returns all children by name or indexes
6657 * @param {Object} name Element name(s) or indexes (<code>String</code>,
6658 * <code>Array</code>, <code>Number</code>)
6659 * @returns {Array}
6660 */
6661 getAll: function(name) {
6662 if (!_.isArray(name))
6663 name = [name];
6664
6665 // split names and indexes
6666 var names = [], indexes = [];
6667 _.each(name, function(item) {
6668 if (_.isString(item))
6669 names.push(item);
6670 else if (_.isNumber(item))
6671 indexes.push(item);
6672 });
6673
6674 return _.filter(this.list(), function(attribute, i) {
6675 return _.include(indexes, i) || _.include(names, attribute.name());
6676 });
6677 },
6678
6679 /**
6680 * Returns or updates element value. If such element doesn't exists,
6681 * it will be created automatically and added at the end of child list.
6682 * @param {String} name Element name or its index
6683 * @param {String} value New element value
6684 * @returns {String}
6685 */
6686 value: function(name, value, pos) {
6687 var element = this.get(name);
6688 if (element)
6689 return element.value(value);
6690
6691 if (!_.isUndefined(value)) {
6692 // no such element — create it
6693 return this.add(name, value, pos);
6694 }
6695 },
6696
6697 /**
6698 * Returns all values of child elements found by <code>getAll()</code>
6699 * method
6700 * @param {Object} name Element name(s) or indexes (<code>String</code>,
6701 * <code>Array</code>, <code>Number</code>)
6702 * @returns {Array}
6703 */
6704 values: function(name) {
6705 return _.map(this.getAll(name), function(element) {
6706 return element.value();
6707 });
6708 },
6709
6710 /**
6711 * Remove child element
6712 * @param {String} name Property name or its index
6713 */
6714 remove: function(name) {
6715 var element = this.get(name);
6716 if (element) {
6717 this._updateSource('', element.fullRange());
6718 this._children = _.without(this._children, element);
6719 }
6720 },
6721
6722 /**
6723 * Returns list of all editable child elements
6724 * @returns {Array}
6725 */
6726 list: function() {
6727 return this._children;
6728 },
6729
6730 /**
6731 * Returns index of editble child in list
6732 * @param {Object} item
6733 * @returns {Number}
6734 */
6735 indexOf: function(item) {
6736 return _.indexOf(this.list(), this.get(item));
6737 },
6738
6739 /**
6740 * Sets or gets container name
6741 * @param {String} val New name. If not passed, current
6742 * name is returned
6743 * @return {String}
6744 */
6745 name: function(val) {
6746 if (!_.isUndefined(val) && this._name !== (val = String(val))) {
6747 this._updateSource(val, this._positions.name, this._positions.name + this._name.length);
6748 this._name = val;
6749 }
6750
6751 return this._name;
6752 },
6753
6754 /**
6755 * Returns name range object
6756 * @param {Boolean} isAbsolute Return absolute range (with respect of
6757 * rule offset)
6758 * @returns {Range}
6759 */
6760 nameRange: function(isAbsolute) {
6761 return range(this._positions.name + (isAbsolute ? this.options.offset : 0), this.name());
6762 },
6763
6764 /**
6765 * Returns range of current source
6766 * @param {Boolean} isAbsolute
6767 */
6768 range: function(isAbsolute) {
6769 return range(isAbsolute ? this.options.offset : 0, this.toString());
6770 },
6771
6772 /**
6773 * Returns element that belongs to specified position
6774 * @param {Number} pos
6775 * @param {Boolean} isAbsolute
6776 * @returns {EditElement}
6777 */
6778 itemFromPosition: function(pos, isAbsolute) {
6779 return _.find(this.list(), function(elem) {
6780 return elem.range(isAbsolute).inside(pos);
6781 });
6782 },
6783
6784 /**
6785 * Returns source code of current container
6786 * @returns {String}
6787 */
6788 toString: function() {
6789 return this.source;
6790 }
6791 };
6792
6793 /**
6794 * @param {EditContainer} parent
6795 * @param {Object} nameToken
6796 * @param {Object} valueToken
6797 */
6798 function EditElement(parent, nameToken, valueToken) {
6799 /** @type EditContainer */
6800 this.parent = parent;
6801
6802 this._name = nameToken.value;
6803 this._value = valueToken ? valueToken.value : '';
6804
6805 this._positions = {
6806 name: nameToken.start,
6807 value: valueToken ? valueToken.start : -1
6808 };
6809
6810 this.initialize.apply(this, arguments);
6811 }
6812
6813 /**
6814 * The self-propagating extend function for classes.
6815 * @type Function
6816 */
6817 EditElement.extend = core.extend;
6818
6819 EditElement.prototype = {
6820 /**
6821 * Child class constructor
6822 */
6823 initialize: function() {},
6824
6825 /**
6826 * Make position absolute
6827 * @private
6828 * @param {Number} num
6829 * @param {Boolean} isAbsolute
6830 * @returns {Boolean}
6831 */
6832 _pos: function(num, isAbsolute) {
6833 return num + (isAbsolute ? this.parent.options.offset : 0);
6834 },
6835
6836 /**
6837 * Sets of gets element value
6838 * @param {String} val New element value. If not passed, current
6839 * value is returned
6840 * @returns {String}
6841 */
6842 value: function(val) {
6843 if (!_.isUndefined(val) && this._value !== (val = String(val))) {
6844 this.parent._updateSource(val, this.valueRange());
6845 this._value = val;
6846 }
6847
6848 return this._value;
6849 },
6850
6851 /**
6852 * Sets of gets element name
6853 * @param {String} val New element name. If not passed, current
6854 * name is returned
6855 * @returns {String}
6856 */
6857 name: function(val) {
6858 if (!_.isUndefined(val) && this._name !== (val = String(val))) {
6859 this.parent._updateSource(val, this.nameRange());
6860 this._name = val;
6861 }
6862
6863 return this._name;
6864 },
6865
6866 /**
6867 * Returns position of element name token
6868 * @param {Boolean} isAbsolute Return absolute position
6869 * @returns {Number}
6870 */
6871 namePosition: function(isAbsolute) {
6872 return this._pos(this._positions.name, isAbsolute);
6873 },
6874
6875 /**
6876 * Returns position of element value token
6877 * @param {Boolean} isAbsolute Return absolute position
6878 * @returns {Number}
6879 */
6880 valuePosition: function(isAbsolute) {
6881 return this._pos(this._positions.value, isAbsolute);
6882 },
6883
6884 /**
6885 * Returns element name
6886 * @param {Boolean} isAbsolute Return absolute range
6887 * @returns {Range}
6888 */
6889 range: function(isAbsolute) {
6890 return range(this.namePosition(isAbsolute), this.toString());
6891 },
6892
6893 /**
6894 * Returns full element range, including possible indentation
6895 * @param {Boolean} isAbsolute Return absolute range
6896 * @returns {Range}
6897 */
6898 fullRange: function(isAbsolute) {
6899 return this.range(isAbsolute);
6900 },
6901
6902 /**
6903 * Returns element name range
6904 * @param {Boolean} isAbsolute Return absolute range
6905 * @returns {Range}
6906 */
6907 nameRange: function(isAbsolute) {
6908 return range(this.namePosition(isAbsolute), this.name());
6909 },
6910
6911 /**
6912 * Returns element value range
6913 * @param {Boolean} isAbsolute Return absolute range
6914 * @returns {Range}
6915 */
6916 valueRange: function(isAbsolute) {
6917 return range(this.valuePosition(isAbsolute), this.value());
6918 },
6919
6920 /**
6921 * Returns current element string representation
6922 * @returns {String}
6923 */
6924 toString: function() {
6925 return this.name() + this.value();
6926 },
6927
6928 valueOf: function() {
6929 return this.toString();
6930 }
6931 };
6932
6933 return {
6934 EditContainer: EditContainer,
6935 EditElement: EditElement,
6936
6937 /**
6938 * Creates token that can be fed to <code>EditElement</code>
6939 * @param {Number} start
6940 * @param {String} value
6941 * @param {String} type
6942 * @returns
6943 */
6944 createToken: function(start, value, type) {
6945 var obj = {
6946 start: start || 0,
6947 value: value || '',
6948 type: type
6949 };
6950
6951 obj.end = obj.start + obj.value.length;
6952 return obj;
6953 }
6954 };
6955 });/**
6956 * CSS EditTree is a module that can parse a CSS rule into a tree with
6957 * convenient methods for adding, modifying and removing CSS properties. These
6958 * changes can be written back to string with respect of code formatting.
6959 *
6960 * @memberOf __cssEditTreeDefine
6961 * @constructor
6962 * @param {Function} require
6963 * @param {Underscore} _
6964 */
6965 emmet.define('cssEditTree', function(require, _) {
6966 var defaultOptions = {
6967 styleBefore: '\n\t',
6968 styleSeparator: ': ',
6969 offset: 0
6970 };
6971
6972 var WHITESPACE_REMOVE_FROM_START = 1;
6973 var WHITESPACE_REMOVE_FROM_END = 2;
6974
6975 /**
6976 * Returns range object
6977 * @param {Number} start
6978 * @param {Number} len
6979 * @returns {Range}
6980 */
6981 function range(start, len) {
6982 return require('range').create(start, len);
6983 }
6984
6985 /**
6986 * Removes whitespace tokens from the array ends
6987 * @param {Array} tokens
6988 * @param {Number} mask Mask indicating from which end whitespace should be
6989 * removed
6990 * @returns {Array}
6991 */
6992 function trimWhitespaceTokens(tokens, mask) {
6993 mask = mask || (WHITESPACE_REMOVE_FROM_START | WHITESPACE_REMOVE_FROM_END);
6994 var whitespace = ['white', 'line'];
6995
6996 if ((mask & WHITESPACE_REMOVE_FROM_END) == WHITESPACE_REMOVE_FROM_END)
6997 while (tokens.length && _.include(whitespace, _.last(tokens).type)) {
6998 tokens.pop();
6999 }
7000
7001 if ((mask & WHITESPACE_REMOVE_FROM_START) == WHITESPACE_REMOVE_FROM_START)
7002 while (tokens.length && _.include(whitespace, tokens[0].type)) {
7003 tokens.shift();
7004 }
7005
7006 return tokens;
7007 }
7008
7009 /**
7010 * Helper function that searches for selector range for <code>CSSEditRule</code>
7011 * @param {TokenIterator} it
7012 * @returns {Range}
7013 */
7014 function findSelectorRange(it) {
7015 var tokens = [], token;
7016 var start = it.position(), end;
7017
7018 while (token = it.next()) {
7019 if (token.type == '{')
7020 break;
7021 tokens.push(token);
7022 }
7023
7024 trimWhitespaceTokens(tokens);
7025
7026 if (tokens.length) {
7027 start = tokens[0].start;
7028 end = _.last(tokens).end;
7029 } else {
7030 end = start;
7031 }
7032
7033 return range(start, end - start);
7034 }
7035
7036 /**
7037 * Helper function that searches for CSS property value range next to
7038 * iterator's current position
7039 * @param {TokenIterator} it
7040 * @returns {Range}
7041 */
7042 function findValueRange(it) {
7043 // find value start position
7044 var skipTokens = ['white', 'line', ':'];
7045 var tokens = [], token, start, end;
7046
7047 it.nextUntil(function(tok) {
7048 return !_.include(skipTokens, this.itemNext().type);
7049 });
7050
7051 start = it.current().end;
7052 // consume value
7053 while (token = it.next()) {
7054 if (token.type == '}' || token.type == ';') {
7055 // found value end
7056 trimWhitespaceTokens(tokens, WHITESPACE_REMOVE_FROM_START
7057 | (token.type == '}' ? WHITESPACE_REMOVE_FROM_END : 0));
7058
7059 if (tokens.length) {
7060 start = tokens[0].start;
7061 end = _.last(tokens).end;
7062 } else {
7063 end = start;
7064 }
7065
7066 return range(start, end - start);
7067 }
7068
7069 tokens.push(token);
7070 }
7071
7072 // reached the end of tokens list
7073 if (tokens.length) {
7074 return range(tokens[0].start, _.last(tokens).end - tokens[0].start);
7075 }
7076 }
7077
7078 /**
7079 * Finds parts of complex CSS value
7080 * @param {String} str
7081 * @returns {Array} Returns list of <code>Range</code>'s
7082 */
7083 function findParts(str) {
7084 /** @type StringStream */
7085 var stream = require('stringStream').create(str);
7086 var ch;
7087 var result = [];
7088 var sep = /[\s\u00a0,]/;
7089
7090 var add = function() {
7091 stream.next();
7092 result.push(range(stream.start, stream.current()));
7093 stream.start = stream.pos;
7094 };
7095
7096 // skip whitespace
7097 stream.eatSpace();
7098 stream.start = stream.pos;
7099
7100 while (ch = stream.next()) {
7101 if (ch == '"' || ch == "'") {
7102 stream.next();
7103 if (!stream.skipTo(ch)) break;
7104 add();
7105 } else if (ch == '(') {
7106 // function found, may have nested function
7107 stream.backUp(1);
7108 if (!stream.skipToPair('(', ')')) break;
7109 stream.backUp(1);
7110 add();
7111 } else {
7112 if (sep.test(ch)) {
7113 result.push(range(stream.start, stream.current().length - 1));
7114 stream.eatWhile(sep);
7115 stream.start = stream.pos;
7116 }
7117 }
7118 }
7119
7120 add();
7121
7122 return _.chain(result)
7123 .filter(function(item) {
7124 return !!item.length();
7125 })
7126 .uniq(false, function(item) {
7127 return item.toString();
7128 })
7129 .value();
7130 }
7131
7132 /**
7133 * A bit hacky way to identify invalid CSS property definition: when user
7134 * starts writing new abbreviation in CSS rule, he actually creates invalid
7135 * CSS property definition and this method tries to identify such abbreviation
7136 * and prevent it from being added to CSS edit tree
7137 * @param {TokenIterator} it
7138 */
7139 function isValidIdentifier(it) {
7140 // return true;
7141 var tokens = it.tokens;
7142 for (var i = it._i + 1, il = tokens.length; i < il; i++) {
7143 if (tokens[i].type == ':')
7144 return true;
7145
7146 if (tokens[i].type == 'identifier' || tokens[i].type == 'line')
7147 return false;
7148 }
7149
7150 return false;
7151 }
7152
7153 /**
7154 * @class
7155 * @extends EditContainer
7156 */
7157 var CSSEditContainer = require('editTree').EditContainer.extend({
7158 initialize: function(source, options) {
7159 _.defaults(this.options, defaultOptions);
7160 var editTree = require('editTree');
7161
7162 /** @type TokenIterator */
7163 var it = require('tokenIterator').create(
7164 require('cssParser').parse(source));
7165
7166 var selectorRange = findSelectorRange(it);
7167 this._positions.name = selectorRange.start;
7168 this._name = selectorRange.substring(source);
7169
7170 if (!it.current() || it.current().type != '{')
7171 throw 'Invalid CSS rule';
7172
7173 this._positions.contentStart = it.position() + 1;
7174
7175 // consume properties
7176 var propertyRange, valueRange, token;
7177 while (token = it.next()) {
7178 if (token.type == 'identifier' && isValidIdentifier(it)) {
7179 propertyRange = range(token);
7180 valueRange = findValueRange(it);
7181 var end = (it.current() && it.current().type == ';')
7182 ? range(it.current())
7183 : range(valueRange.end, 0);
7184 this._children.push(new CSSEditElement(this,
7185 editTree.createToken(propertyRange.start, propertyRange.substring(source)),
7186 editTree.createToken(valueRange.start, valueRange.substring(source)),
7187 editTree.createToken(end.start, end.substring(source))
7188 ));
7189 }
7190 }
7191
7192 this._saveStyle();
7193 },
7194
7195 /**
7196 * Remembers all styles of properties
7197 * @private
7198 */
7199 _saveStyle: function() {
7200 var start = this._positions.contentStart;
7201 var source = this.source;
7202 var utils = require('utils');
7203
7204 _.each(this.list(), /** @param {CSSEditProperty} p */ function(p) {
7205 p.styleBefore = source.substring(start, p.namePosition());
7206 // a small hack here:
7207 // Sometimes users add empty lines before properties to logically
7208 // separate groups of properties. In this case, a blind copy of
7209 // characters between rules may lead to undesired behavior,
7210 // especially when current rule is duplicated or used as a donor
7211 // to create new rule.
7212 // To solve this issue, we‘ll take only last newline indentation
7213 var lines = utils.splitByLines(p.styleBefore);
7214 if (lines.length > 1) {
7215 p.styleBefore = '\n' + _.last(lines);
7216 }
7217
7218 p.styleSeparator = source.substring(p.nameRange().end, p.valuePosition());
7219
7220 // graceful and naive comments removal
7221 p.styleBefore = _.last(p.styleBefore.split('*/'));
7222 p.styleSeparator = p.styleSeparator.replace(/\/\*.*?\*\//g, '');
7223
7224 start = p.range().end;
7225 });
7226 },
7227
7228 /**
7229 * Adds new CSS property
7230 * @param {String} name Property name
7231 * @param {String} value Property value
7232 * @param {Number} pos Position at which to insert new property. By
7233 * default the property is inserted at the end of rule
7234 * @returns {CSSEditProperty}
7235 */
7236 add: function(name, value, pos) {
7237 var list = this.list();
7238 var start = this._positions.contentStart;
7239 var styles = _.pick(this.options, 'styleBefore', 'styleSeparator');
7240 var editTree = require('editTree');
7241
7242 if (_.isUndefined(pos))
7243 pos = list.length;
7244
7245 /** @type CSSEditProperty */
7246 var donor = list[pos];
7247 if (donor) {
7248 start = donor.fullRange().start;
7249 } else if (donor = list[pos - 1]) {
7250 // make sure that donor has terminating semicolon
7251 donor.end(';');
7252 start = donor.range().end;
7253 }
7254
7255 if (donor) {
7256 styles = _.pick(donor, 'styleBefore', 'styleSeparator');
7257 }
7258
7259 var nameToken = editTree.createToken(start + styles.styleBefore.length, name);
7260 var valueToken = editTree.createToken(nameToken.end + styles.styleSeparator.length, value);
7261
7262 var property = new CSSEditElement(this, nameToken, valueToken,
7263 editTree.createToken(valueToken.end, ';'));
7264
7265 _.extend(property, styles);
7266
7267 // write new property into the source
7268 this._updateSource(property.styleBefore + property.toString(), start);
7269
7270 // insert new property
7271 this._children.splice(pos, 0, property);
7272 return property;
7273 }
7274 });
7275
7276 /**
7277 * @class
7278 * @type CSSEditElement
7279 * @constructor
7280 */
7281 var CSSEditElement = require('editTree').EditElement.extend({
7282 initialize: function(rule, name, value, end) {
7283 this.styleBefore = rule.options.styleBefore;
7284 this.styleSeparator = rule.options.styleSeparator;
7285
7286 this._end = end.value;
7287 this._positions.end = end.start;
7288 },
7289
7290 /**
7291 * Returns ranges of complex value parts
7292 * @returns {Array} Returns <code>null</code> if value is not complex
7293 */
7294 valueParts: function(isAbsolute) {
7295 var parts = findParts(this.value());
7296 if (isAbsolute) {
7297 var offset = this.valuePosition(true);
7298 _.each(parts, function(p) {
7299 p.shift(offset);
7300 });
7301 }
7302
7303 return parts;
7304 },
7305
7306 /**
7307 * Sets of gets property end value (basically, it's a semicolon)
7308 * @param {String} val New end value. If not passed, current
7309 * value is returned
7310 */
7311 end: function(val) {
7312 if (!_.isUndefined(val) && this._end !== val) {
7313 this.parent._updateSource(val, this._positions.end, this._positions.end + this._end.length);
7314 this._end = val;
7315 }
7316
7317 return this._end;
7318 },
7319
7320 /**
7321 * Returns full rule range, with indentation
7322 * @param {Boolean} isAbsolute Return absolute range (with respect of
7323 * rule offset)
7324 * @returns {Range}
7325 */
7326 fullRange: function(isAbsolute) {
7327 var r = this.range(isAbsolute);
7328 r.start -= this.styleBefore.length;
7329 return r;
7330 },
7331
7332 /**
7333 * Returns item string representation
7334 * @returns {String}
7335 */
7336 toString: function() {
7337 return this.name() + this.styleSeparator + this.value() + this.end();
7338 }
7339 });
7340
7341 return {
7342 /**
7343 * Parses CSS rule into editable tree
7344 * @param {String} source
7345 * @param {Object} options
7346 * @memberOf emmet.cssEditTree
7347 * @returns {EditContainer}
7348 */
7349 parse: function(source, options) {
7350 return new CSSEditContainer(source, options);
7351 },
7352
7353 /**
7354 * Extract and parse CSS rule from specified position in <code>content</code>
7355 * @param {String} content CSS source code
7356 * @param {Number} pos Character position where to start source code extraction
7357 * @returns {EditContainer}
7358 */
7359 parseFromPosition: function(content, pos, isBackward) {
7360 var bounds = this.extractRule(content, pos, isBackward);
7361 if (!bounds || !bounds.inside(pos))
7362 // no matching CSS rule or caret outside rule bounds
7363 return null;
7364
7365 return this.parse(bounds.substring(content), {
7366 offset: bounds.start
7367 });
7368 },
7369
7370 /**
7371 * Extracts single CSS selector definition from source code
7372 * @param {String} content CSS source code
7373 * @param {Number} pos Character position where to start source code extraction
7374 * @returns {Range}
7375 */
7376 extractRule: function(content, pos, isBackward) {
7377 var result = '';
7378 var len = content.length;
7379 var offset = pos;
7380 var stopChars = '{}/\\<>\n\r';
7381 var bracePos = -1, ch;
7382
7383 // search left until we find rule edge
7384 while (offset >= 0) {
7385 ch = content.charAt(offset);
7386 if (ch == '{') {
7387 bracePos = offset;
7388 break;
7389 }
7390 else if (ch == '}' && !isBackward) {
7391 offset++;
7392 break;
7393 }
7394
7395 offset--;
7396 }
7397
7398 // search right for full rule set
7399 while (offset < len) {
7400 ch = content.charAt(offset);
7401 if (ch == '{') {
7402 bracePos = offset;
7403 } else if (ch == '}') {
7404 if (bracePos != -1)
7405 result = content.substring(bracePos, offset + 1);
7406 break;
7407 }
7408
7409 offset++;
7410 }
7411
7412 if (result) {
7413 // find CSS selector
7414 offset = bracePos - 1;
7415 var selector = '';
7416 while (offset >= 0) {
7417 ch = content.charAt(offset);
7418 if (stopChars.indexOf(ch) != -1) break;
7419 offset--;
7420 }
7421
7422 // also trim whitespace
7423 selector = content.substring(offset + 1, bracePos).replace(/^[\s\n\r]+/m, '');
7424 return require('range').create(bracePos - selector.length, result.length + selector.length);
7425 }
7426
7427 return null;
7428 },
7429
7430 /**
7431 * Removes vendor prefix from CSS property
7432 * @param {String} name CSS property
7433 * @return {String}
7434 */
7435 baseName: function(name) {
7436 return name.replace(/^\s*\-\w+\-/, '');
7437 },
7438
7439 /**
7440 * Finds parts of complex CSS value
7441 * @param {String} str
7442 * @returns {Array}
7443 */
7444 findParts: findParts
7445 };
7446 });/**
7447 * XML EditTree is a module that can parse an XML/HTML element into a tree with
7448 * convenient methods for adding, modifying and removing attributes. These
7449 * changes can be written back to string with respect of code formatting.
7450 *
7451 * @memberOf __xmlEditTreeDefine
7452 * @constructor
7453 * @param {Function} require
7454 * @param {Underscore} _
7455 */
7456 emmet.define('xmlEditTree', function(require, _) {
7457 var defaultOptions = {
7458 styleBefore: ' ',
7459 styleSeparator: '=',
7460 styleQuote: '"',
7461 offset: 0
7462 };
7463
7464 var startTag = /^<([\w\:\-]+)((?:\s+[\w\-:]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/m;
7465
7466 var XMLEditContainer = require('editTree').EditContainer.extend({
7467 initialize: function(source, options) {
7468 _.defaults(this.options, defaultOptions);
7469 this._positions.name = 1;
7470
7471 var attrToken = null;
7472 var tokens = require('xmlParser').parse(source);
7473 var range = require('range');
7474
7475 _.each(tokens, function(token) {
7476 token.value = range.create(token).substring(source);
7477 switch (token.type) {
7478 case 'tag':
7479 if (/^<[^\/]+/.test(token.value)) {
7480 this._name = token.value.substring(1);
7481 }
7482 break;
7483
7484 case 'attribute':
7485 // add empty attribute
7486 if (attrToken) {
7487 this._children.push(new XMLEditElement(this, attrToken));
7488 }
7489
7490 attrToken = token;
7491 break;
7492
7493 case 'string':
7494 this._children.push(new XMLEditElement(this, attrToken, token));
7495 attrToken = null;
7496 break;
7497 }
7498 }, this);
7499
7500 if (attrToken) {
7501 this._children.push(new XMLEditElement(this, attrToken));
7502 }
7503
7504 this._saveStyle();
7505 },
7506
7507 /**
7508 * Remembers all styles of properties
7509 * @private
7510 */
7511 _saveStyle: function() {
7512 var start = this.nameRange().end;
7513 var source = this.source;
7514
7515 _.each(this.list(), /** @param {EditElement} p */ function(p) {
7516 p.styleBefore = source.substring(start, p.namePosition());
7517
7518 if (p.valuePosition() !== -1) {
7519 p.styleSeparator = source.substring(p.namePosition() + p.name().length, p.valuePosition() - p.styleQuote.length);
7520 }
7521
7522 start = p.range().end;
7523 });
7524 },
7525
7526 /**
7527 * Adds new attribute
7528 * @param {String} name Property name
7529 * @param {String} value Property value
7530 * @param {Number} pos Position at which to insert new property. By
7531 * default the property is inserted at the end of rule
7532 */
7533 add: function(name, value, pos) {
7534 var list = this.list();
7535 var start = this.nameRange().end;
7536 var editTree = require('editTree');
7537 var styles = _.pick(this.options, 'styleBefore', 'styleSeparator', 'styleQuote');
7538
7539 if (_.isUndefined(pos))
7540 pos = list.length;
7541
7542
7543 /** @type XMLEditAttribute */
7544 var donor = list[pos];
7545 if (donor) {
7546 start = donor.fullRange().start;
7547 } else if (donor = list[pos - 1]) {
7548 start = donor.range().end;
7549 }
7550
7551 if (donor) {
7552 styles = _.pick(donor, 'styleBefore', 'styleSeparator', 'styleQuote');
7553 }
7554
7555 value = styles.styleQuote + value + styles.styleQuote;
7556
7557 var attribute = new XMLEditElement(this,
7558 editTree.createToken(start + styles.styleBefore.length, name),
7559 editTree.createToken(start + styles.styleBefore.length + name.length
7560 + styles.styleSeparator.length, value)
7561 );
7562
7563 _.extend(attribute, styles);
7564
7565 // write new attribute into the source
7566 this._updateSource(attribute.styleBefore + attribute.toString(), start);
7567
7568 // insert new attribute
7569 this._children.splice(pos, 0, attribute);
7570 return attribute;
7571 }
7572 });
7573
7574 var XMLEditElement = require('editTree').EditElement.extend({
7575 initialize: function(parent, nameToken, valueToken) {
7576 this.styleBefore = parent.options.styleBefore;
7577 this.styleSeparator = parent.options.styleSeparator;
7578
7579 var value = '', quote = parent.options.styleQuote;
7580 if (valueToken) {
7581 value = valueToken.value;
7582 quote = value.charAt(0);
7583 if (quote == '"' || quote == "'") {
7584 value = value.substring(1);
7585 } else {
7586 quote = '';
7587 }
7588
7589 if (quote && value.charAt(value.length - 1) == quote) {
7590 value = value.substring(0, value.length - 1);
7591 }
7592 }
7593
7594 this.styleQuote = quote;
7595
7596 this._value = value;
7597 this._positions.value = valueToken ? valueToken.start + quote.length : -1;
7598 },
7599
7600 /**
7601 * Returns full rule range, with indentation
7602 * @param {Boolean} isAbsolute Return absolute range (with respect of
7603 * rule offset)
7604 * @returns {Range}
7605 */
7606 fullRange: function(isAbsolute) {
7607 var r = this.range(isAbsolute);
7608 r.start -= this.styleBefore.length;
7609 return r;
7610 },
7611
7612 toString: function() {
7613 return this.name() + this.styleSeparator
7614 + this.styleQuote + this.value() + this.styleQuote;
7615 }
7616 });
7617
7618 return {
7619 /**
7620 * Parses HTML element into editable tree
7621 * @param {String} source
7622 * @param {Object} options
7623 * @memberOf emmet.htmlEditTree
7624 * @returns {EditContainer}
7625 */
7626 parse: function(source, options) {
7627 return new XMLEditContainer(source, options);
7628 },
7629
7630 /**
7631 * Extract and parse HTML from specified position in <code>content</code>
7632 * @param {String} content CSS source code
7633 * @param {Number} pos Character position where to start source code extraction
7634 * @returns {XMLEditElement}
7635 */
7636 parseFromPosition: function(content, pos, isBackward) {
7637 var bounds = this.extractTag(content, pos, isBackward);
7638 if (!bounds || !bounds.inside(pos))
7639 // no matching HTML tag or caret outside tag bounds
7640 return null;
7641
7642 return this.parse(bounds.substring(content), {
7643 offset: bounds.start
7644 });
7645 },
7646
7647 /**
7648 * Extracts nearest HTML tag range from <code>content</code>, starting at
7649 * <code>pos</code> position
7650 * @param {String} content
7651 * @param {Number} pos
7652 * @param {Boolean} isBackward
7653 * @returns {Range}
7654 */
7655 extractTag: function(content, pos, isBackward) {
7656 var len = content.length, i;
7657 var range = require('range');
7658
7659 // max extraction length. I don't think there may be tags larger
7660 // than 2000 characters length
7661 var maxLen = Math.min(2000, len);
7662
7663 /** @type Range */
7664 var r = null;
7665
7666 var match = function(pos) {
7667 var m;
7668 if (content.charAt(pos) == '<' && (m = content.substr(pos, maxLen).match(startTag)))
7669 return range.create(pos, m[0]);
7670 };
7671
7672 // lookup backward, in case we are inside tag already
7673 for (i = pos; i >= 0; i--) {
7674 if (r = match(i)) break;
7675 }
7676
7677 if (r && (r.inside(pos) || isBackward))
7678 return r;
7679
7680 if (!r && isBackward)
7681 return null;
7682
7683 // search forward
7684 for (i = pos; i < len; i++) {
7685 if (r = match(i))
7686 return r;
7687 }
7688 }
7689 };
7690 });/**
7691 * 'Expand abbreviation' editor action: extracts abbreviation from current caret
7692 * position and replaces it with formatted output.
7693 * <br><br>
7694 * This behavior can be overridden with custom handlers which can perform
7695 * different actions when 'Expand Abbreviation' action is called.
7696 * For example, a CSS gradient handler that produces vendor-prefixed gradient
7697 * definitions registers its own expand abbreviation handler.
7698 *
7699 * @constructor
7700 * @memberOf __expandAbbreviationActionDefine
7701 * @param {Function} require
7702 * @param {Underscore} _
7703 */
7704 emmet.define('expandAbbreviation', function(require, _) {
7705 /**
7706 * @type HandlerList List of registered handlers
7707 */
7708 var handlers = require('handlerList').create();
7709
7710 /** Back-reference to module */
7711 var module = null;
7712
7713 var actions = require('actions');
7714 /**
7715 * 'Expand abbreviation' editor action
7716 * @param {IEmmetEditor} editor Editor instance
7717 * @param {String} syntax Syntax type (html, css, etc.)
7718 * @param {String} profile Output profile name (html, xml, xhtml)
7719 * @return {Boolean} Returns <code>true</code> if abbreviation was expanded
7720 * successfully
7721 */
7722 actions.add('expand_abbreviation', function(editor, syntax, profile) {
7723 var args = _.toArray(arguments);
7724
7725 // normalize incoming arguments
7726 var info = require('editorUtils').outputInfo(editor, syntax, profile);
7727 args[1] = info.syntax;
7728 args[2] = info.profile;
7729
7730 return handlers.exec(false, args);
7731 });
7732
7733 /**
7734 * A special version of <code>expandAbbreviation</code> function: if it can't
7735 * find abbreviation, it will place Tab character at caret position
7736 * @param {IEmmetEditor} editor Editor instance
7737 * @param {String} syntax Syntax type (html, css, etc.)
7738 * @param {String} profile Output profile name (html, xml, xhtml)
7739 */
7740 actions.add('expand_abbreviation_with_tab', function(editor, syntax, profile) {
7741 if (!actions.run('expand_abbreviation', editor, syntax, profile))
7742 editor.replaceContent(require('resources').getVariable('indentation'), editor.getCaretPos());
7743 }, {hidden: true});
7744
7745 // XXX setup default handler
7746 /**
7747 * Extracts abbreviation from current caret
7748 * position and replaces it with formatted output
7749 * @param {IEmmetEditor} editor Editor instance
7750 * @param {String} syntax Syntax type (html, css, etc.)
7751 * @param {String} profile Output profile name (html, xml, xhtml)
7752 * @return {Boolean} Returns <code>true</code> if abbreviation was expanded
7753 * successfully
7754 */
7755 handlers.add(function(editor, syntax, profile) {
7756 var caretPos = editor.getSelectionRange().end;
7757 var abbr = module.findAbbreviation(editor);
7758
7759 if (abbr) {
7760 var content = emmet.expandAbbreviation(abbr, syntax, profile,
7761 require('actionUtils').captureContext(editor));
7762 if (content) {
7763 editor.replaceContent(content, caretPos - abbr.length, caretPos);
7764 return true;
7765 }
7766 }
7767
7768 return false;
7769 }, {order: -1});
7770
7771 return module = {
7772 /**
7773 * Adds custom expand abbreviation handler. The passed function should
7774 * return <code>true</code> if it was performed successfully,
7775 * <code>false</code> otherwise.
7776 *
7777 * Added handlers will be called when 'Expand Abbreviation' is called
7778 * in order they were added
7779 * @memberOf expandAbbreviation
7780 * @param {Function} fn
7781 * @param {Object} options
7782 */
7783 addHandler: function(fn, options) {
7784 handlers.add(fn, options);
7785 },
7786
7787 /**
7788 * Removes registered handler
7789 * @returns
7790 */
7791 removeHandler: function(fn) {
7792 handlers.remove(fn, options);
7793 },
7794
7795 /**
7796 * Search for abbreviation in editor from current caret position
7797 * @param {IEmmetEditor} editor Editor instance
7798 * @return {String}
7799 */
7800 findAbbreviation: function(editor) {
7801 /** @type Range */
7802 var range = require('range').create(editor.getSelectionRange());
7803 var content = String(editor.getContent());
7804 if (range.length()) {
7805 // abbreviation is selected by user
7806 return range.substring(content);
7807 }
7808
7809 // search for new abbreviation from current caret position
7810 var curLine = editor.getCurrentLineRange();
7811 return require('actionUtils').extractAbbreviation(content.substring(curLine.start, range.start));
7812 }
7813 };
7814 });/**
7815 * Action that wraps content with abbreviation. For convenience, action is
7816 * defined as reusable module
7817 * @constructor
7818 * @memberOf __wrapWithAbbreviationDefine
7819 */
7820 emmet.define('wrapWithAbbreviation', function(require, _) {
7821 /** Back-references to current module */
7822 var module = null;
7823
7824 /**
7825 * Wraps content with abbreviation
7826 * @param {IEmmetEditor} Editor instance
7827 * @param {String} abbr Abbreviation to wrap with
7828 * @param {String} syntax Syntax type (html, css, etc.)
7829 * @param {String} profile Output profile name (html, xml, xhtml)
7830 */
7831 require('actions').add('wrap_with_abbreviation', function (editor, abbr, syntax, profile) {
7832 var info = require('editorUtils').outputInfo(editor, syntax, profile);
7833 var utils = require('utils');
7834 /** @type emmet.editorUtils */
7835 var editorUtils = require('editorUtils');
7836 var matcher = require('html_matcher');
7837
7838 abbr = abbr || editor.prompt("Enter abbreviation");
7839
7840 if (!abbr)
7841 return null;
7842
7843 abbr = String(abbr);
7844
7845 var range = editor.getSelectionRange();
7846 var startOffset = range.start;
7847 var endOffset = range.end;
7848
7849 if (startOffset == endOffset) {
7850 // no selection, find tag pair
7851 range = matcher(info.content, startOffset, info.profile);
7852
7853 if (!range || range[0] == -1) // nothing to wrap
7854 return false;
7855
7856 /** @type Range */
7857 var narrowedSel = utils.narrowToNonSpace(info.content, range[0], range[1] - range[0]);
7858 startOffset = narrowedSel.start;
7859 endOffset = narrowedSel.end;
7860 }
7861
7862 var newContent = utils.escapeText(info.content.substring(startOffset, endOffset));
7863 var result = module
7864 .wrap(abbr, editorUtils.unindent(editor, newContent), info.syntax,
7865 info.profile, require('actionUtils').captureContext(editor));
7866
7867 if (result) {
7868 editor.replaceContent(result, startOffset, endOffset);
7869 return true;
7870 }
7871
7872 return false;
7873 });
7874
7875 return module = {
7876 /**
7877 * Wraps passed text with abbreviation. Text will be placed inside last
7878 * expanded element
7879 * @memberOf wrapWithAbbreviation
7880 * @param {String} abbr Abbreviation
7881 * @param {String} text Text to wrap
7882 * @param {String} syntax Document type (html, xml, etc.). Default is 'html'
7883 * @param {String} profile Output profile's name. Default is 'plain'
7884 * @param {Object} contextNode Context node inside which abbreviation
7885 * is wrapped. It will be used as a reference for node name resolvers
7886 * @return {String}
7887 */
7888 wrap: function(abbr, text, syntax, profile, contextNode) {
7889 /** @type emmet.filters */
7890 var filters = require('filters');
7891 /** @type emmet.utils */
7892 var utils = require('utils');
7893
7894 syntax = syntax || emmet.defaultSyntax();
7895 profile = profile || emmet.defaultProfile();
7896
7897 require('tabStops').resetTabstopIndex();
7898
7899 var data = filters.extractFromAbbreviation(abbr);
7900 var parsedTree = require('abbreviationParser').parse(data[0], {
7901 syntax: syntax,
7902 pastedContent: text,
7903 contextNode: contextNode
7904 });
7905 if (parsedTree) {
7906 var filtersList = filters.composeList(syntax, profile, data[1]);
7907 filters.apply(parsedTree, filtersList, profile);
7908 return utils.replaceVariables(parsedTree.toString());
7909 }
7910
7911 return null;
7912 }
7913 };
7914 });/**
7915 * Toggles HTML and CSS comments depending on current caret context. Unlike
7916 * the same action in most editors, this action toggles comment on currently
7917 * matched item—HTML tag or CSS selector—when nothing is selected.
7918 *
7919 * @param {Function} require
7920 * @param {Underscore} _
7921 * @memberOf __toggleCommentAction
7922 * @constructor
7923 */
7924 emmet.exec(function(require, _) {
7925 /**
7926 * Toggle HTML comment on current selection or tag
7927 * @param {IEmmetEditor} editor
7928 * @return {Boolean} Returns <code>true</code> if comment was toggled
7929 */
7930 function toggleHTMLComment(editor) {
7931 /** @type Range */
7932 var range = require('range').create(editor.getSelectionRange());
7933 var info = require('editorUtils').outputInfo(editor);
7934
7935 if (!range.length()) {
7936 // no selection, find matching tag
7937 var pair = require('html_matcher').getTags(info.content, editor.getCaretPos(), info.profile);
7938 if (pair && pair[0]) { // found pair
7939 range.start = pair[0].start;
7940 range.end = pair[1] ? pair[1].end : pair[0].end;
7941 }
7942 }
7943
7944 return genericCommentToggle(editor, '<!--', '-->', range);
7945 }
7946
7947 /**
7948 * Simple CSS commenting
7949 * @param {IEmmetEditor} editor
7950 * @return {Boolean} Returns <code>true</code> if comment was toggled
7951 */
7952 function toggleCSSComment(editor) {
7953 /** @type Range */
7954 var range = require('range').create(editor.getSelectionRange());
7955 var info = require('editorUtils').outputInfo(editor);
7956
7957 if (!range.length()) {
7958 // no selection, try to get current rule
7959 /** @type CSSRule */
7960 var rule = require('cssEditTree').parseFromPosition(info.content, editor.getCaretPos());
7961 if (rule) {
7962 var property = cssItemFromPosition(rule, editor.getCaretPos());
7963 range = property
7964 ? property.range(true)
7965 : require('range').create(rule.nameRange(true).start, rule.source);
7966 }
7967 }
7968
7969 if (!range.length()) {
7970 // still no selection, get current line
7971 range = require('range').create(editor.getCurrentLineRange());
7972 require('utils').narrowToNonSpace(info.content, range);
7973 }
7974
7975 return genericCommentToggle(editor, '/*', '*/', range);
7976 }
7977
7978 /**
7979 * Returns CSS property from <code>rule</code> that matches passed position
7980 * @param {EditContainer} rule
7981 * @param {Number} absPos
7982 * @returns {EditElement}
7983 */
7984 function cssItemFromPosition(rule, absPos) {
7985 // do not use default EditContainer.itemFromPosition() here, because
7986 // we need to make a few assumptions to make CSS commenting more reliable
7987 var relPos = absPos - (rule.options.offset || 0);
7988 var reSafeChar = /^[\s\n\r]/;
7989 return _.find(rule.list(), function(item) {
7990 if (item.range().end === relPos) {
7991 // at the end of property, but outside of it
7992 // if there’s a space character at current position,
7993 // use current property
7994 return reSafeChar.test(rule.source.charAt(relPos));
7995 }
7996
7997 return item.range().inside(relPos);
7998 });
7999 }
8000
8001 /**
8002 * Search for nearest comment in <code>str</code>, starting from index <code>from</code>
8003 * @param {String} text Where to search
8004 * @param {Number} from Search start index
8005 * @param {String} start_token Comment start string
8006 * @param {String} end_token Comment end string
8007 * @return {Range} Returns null if comment wasn't found
8008 */
8009 function searchComment(text, from, startToken, endToken) {
8010 var commentStart = -1;
8011 var commentEnd = -1;
8012
8013 var hasMatch = function(str, start) {
8014 return text.substr(start, str.length) == str;
8015 };
8016
8017 // search for comment start
8018 while (from--) {
8019 if (hasMatch(startToken, from)) {
8020 commentStart = from;
8021 break;
8022 }
8023 }
8024
8025 if (commentStart != -1) {
8026 // search for comment end
8027 from = commentStart;
8028 var contentLen = text.length;
8029 while (contentLen >= from++) {
8030 if (hasMatch(endToken, from)) {
8031 commentEnd = from + endToken.length;
8032 break;
8033 }
8034 }
8035 }
8036
8037 return (commentStart != -1 && commentEnd != -1)
8038 ? require('range').create(commentStart, commentEnd - commentStart)
8039 : null;
8040 }
8041
8042 /**
8043 * Generic comment toggling routine
8044 * @param {IEmmetEditor} editor
8045 * @param {String} commentStart Comment start token
8046 * @param {String} commentEnd Comment end token
8047 * @param {Range} range Selection range
8048 * @return {Boolean}
8049 */
8050 function genericCommentToggle(editor, commentStart, commentEnd, range) {
8051 var editorUtils = require('editorUtils');
8052 var content = editorUtils.outputInfo(editor).content;
8053 var caretPos = editor.getCaretPos();
8054 var newContent = null;
8055
8056 var utils = require('utils');
8057
8058 /**
8059 * Remove comment markers from string
8060 * @param {Sting} str
8061 * @return {String}
8062 */
8063 function removeComment(str) {
8064 return str
8065 .replace(new RegExp('^' + utils.escapeForRegexp(commentStart) + '\\s*'), function(str){
8066 caretPos -= str.length;
8067 return '';
8068 }).replace(new RegExp('\\s*' + utils.escapeForRegexp(commentEnd) + '$'), '');
8069 }
8070
8071 // first, we need to make sure that this substring is not inside
8072 // comment
8073 var commentRange = searchComment(content, caretPos, commentStart, commentEnd);
8074 if (commentRange && commentRange.overlap(range)) {
8075 // we're inside comment, remove it
8076 range = commentRange;
8077 newContent = removeComment(range.substring(content));
8078 } else {
8079 // should add comment
8080 // make sure that there's no comment inside selection
8081 newContent = commentStart + ' ' +
8082 range.substring(content)
8083 .replace(new RegExp(utils.escapeForRegexp(commentStart) + '\\s*|\\s*' + utils.escapeForRegexp(commentEnd), 'g'), '') +
8084 ' ' + commentEnd;
8085
8086 // adjust caret position
8087 caretPos += commentStart.length + 1;
8088 }
8089
8090 // replace editor content
8091 if (newContent !== null) {
8092 newContent = utils.escapeText(newContent);
8093 editor.setCaretPos(range.start);
8094 editor.replaceContent(editorUtils.unindent(editor, newContent), range.start, range.end);
8095 editor.setCaretPos(caretPos);
8096 return true;
8097 }
8098
8099 return false;
8100 }
8101
8102 /**
8103 * Toggle comment on current editor's selection or HTML tag/CSS rule
8104 * @param {IEmmetEditor} editor
8105 */
8106 require('actions').add('toggle_comment', function(editor) {
8107 var info = require('editorUtils').outputInfo(editor);
8108 if (info.syntax == 'css') {
8109 // in case our editor is good enough and can recognize syntax from
8110 // current token, we have to make sure that cursor is not inside
8111 // 'style' attribute of html element
8112 var caretPos = editor.getCaretPos();
8113 var pair = require('html_matcher').getTags(info.content, caretPos);
8114 if (pair && pair[0] && pair[0].type == 'tag' &&
8115 pair[0].start <= caretPos && pair[0].end >= caretPos) {
8116 info.syntax = 'html';
8117 }
8118 }
8119
8120 if (info.syntax == 'css')
8121 return toggleCSSComment(editor);
8122
8123 return toggleHTMLComment(editor);
8124 });
8125 });/**
8126 * Move between next/prev edit points. 'Edit points' are places between tags
8127 * and quotes of empty attributes in html
8128 * @constructor
8129 *
8130 * @memberOf __editPointActionDefine
8131 * @param {Function} require
8132 * @param {Underscore} _
8133 */
8134 emmet.exec(function(require, _) {
8135 /**
8136 * Search for new caret insertion point
8137 * @param {IEmmetEditor} editor Editor instance
8138 * @param {Number} inc Search increment: -1 — search left, 1 — search right
8139 * @param {Number} offset Initial offset relative to current caret position
8140 * @return {Number} Returns -1 if insertion point wasn't found
8141 */
8142 function findNewEditPoint(editor, inc, offset) {
8143 inc = inc || 1;
8144 offset = offset || 0;
8145
8146 var curPoint = editor.getCaretPos() + offset;
8147 var content = String(editor.getContent());
8148 var maxLen = content.length;
8149 var nextPoint = -1;
8150 var reEmptyLine = /^\s+$/;
8151
8152 function getLine(ix) {
8153 var start = ix;
8154 while (start >= 0) {
8155 var c = content.charAt(start);
8156 if (c == '\n' || c == '\r')
8157 break;
8158 start--;
8159 }
8160
8161 return content.substring(start, ix);
8162 }
8163
8164 while (curPoint <= maxLen && curPoint >= 0) {
8165 curPoint += inc;
8166 var curChar = content.charAt(curPoint);
8167 var nextChar = content.charAt(curPoint + 1);
8168 var prevChar = content.charAt(curPoint - 1);
8169
8170 switch (curChar) {
8171 case '"':
8172 case '\'':
8173 if (nextChar == curChar && prevChar == '=') {
8174 // empty attribute
8175 nextPoint = curPoint + 1;
8176 }
8177 break;
8178 case '>':
8179 if (nextChar == '<') {
8180 // between tags
8181 nextPoint = curPoint + 1;
8182 }
8183 break;
8184 case '\n':
8185 case '\r':
8186 // empty line
8187 if (reEmptyLine.test(getLine(curPoint - 1))) {
8188 nextPoint = curPoint;
8189 }
8190 break;
8191 }
8192
8193 if (nextPoint != -1)
8194 break;
8195 }
8196
8197 return nextPoint;
8198 }
8199
8200 /** @type emmet.actions */
8201 var actions = require('actions');
8202
8203 /**
8204 * Move caret to previous edit point
8205 * @param {IEmmetEditor} editor Editor instance
8206 */
8207 actions.add('prev_edit_point', function(editor) {
8208 var curPos = editor.getCaretPos();
8209 var newPoint = findNewEditPoint(editor, -1);
8210
8211 if (newPoint == curPos)
8212 // we're still in the same point, try searching from the other place
8213 newPoint = findNewEditPoint(editor, -1, -2);
8214
8215 if (newPoint != -1) {
8216 editor.setCaretPos(newPoint);
8217 return true;
8218 }
8219
8220 return false;
8221 }, {label: 'Previous Edit Point'});
8222
8223 /**
8224 * Move caret to next edit point
8225 * @param {IEmmetEditor} editor Editor instance
8226 */
8227 actions.add('next_edit_point', function(editor) {
8228 var newPoint = findNewEditPoint(editor, 1);
8229 if (newPoint != -1)
8230 editor.setCaretPos(newPoint);
8231 });
8232 });/**
8233 * Actions that use stream parsers and tokenizers for traversing:
8234 * -- Search for next/previous items in HTML
8235 * -- Search for next/previous items in CSS
8236 * @constructor
8237 * @memberOf __selectItemActionDefine
8238 * @param {Function} require
8239 * @param {Underscore} _
8240 */
8241 emmet.exec(function(require, _) {
8242 var startTag = /^<([\w\:\-]+)((?:\s+[\w\-:]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/;
8243
8244 /**
8245 * Generic function for searching for items to select
8246 * @param {IEmmetEditor} editor
8247 * @param {Boolean} isBackward Search backward (search forward otherwise)
8248 * @param {Function} extractFn Function that extracts item content
8249 * @param {Function} rangeFn Function that search for next token range
8250 */
8251 function findItem(editor, isBackward, extractFn, rangeFn) {
8252 var range = require('range');
8253 var content = require('editorUtils').outputInfo(editor).content;
8254
8255 var contentLength = content.length;
8256 var itemRange, rng;
8257 /** @type Range */
8258 var prevRange = range.create(-1, 0);
8259 /** @type Range */
8260 var sel = range.create(editor.getSelectionRange());
8261
8262 var searchPos = sel.start, loop = 100000; // endless loop protection
8263 while (searchPos >= 0 && searchPos < contentLength && --loop > 0) {
8264 if ( (itemRange = extractFn(content, searchPos, isBackward)) ) {
8265 if (prevRange.equal(itemRange)) {
8266 break;
8267 }
8268
8269 prevRange = itemRange.clone();
8270 rng = rangeFn(itemRange.substring(content), itemRange.start, sel.clone());
8271
8272 if (rng) {
8273 editor.createSelection(rng.start, rng.end);
8274 return true;
8275 } else {
8276 searchPos = isBackward ? itemRange.start : itemRange.end - 1;
8277 }
8278 }
8279
8280 searchPos += isBackward ? -1 : 1;
8281 }
8282
8283 return false;
8284 }
8285
8286 // XXX HTML section
8287
8288 /**
8289 * Find next HTML item
8290 * @param {IEmmetEditor} editor
8291 */
8292 function findNextHTMLItem(editor) {
8293 var isFirst = true;
8294 return findItem(editor, false, function(content, searchPos){
8295 if (isFirst) {
8296 isFirst = false;
8297 return findOpeningTagFromPosition(content, searchPos);
8298 } else {
8299 return getOpeningTagFromPosition(content, searchPos);
8300 }
8301 }, function(tag, offset, selRange) {
8302 return getRangeForHTMLItem(tag, offset, selRange, false);
8303 });
8304 }
8305
8306 /**
8307 * Find previous HTML item
8308 * @param {IEmmetEditor} editor
8309 */
8310 function findPrevHTMLItem(editor) {
8311 return findItem(editor, true, getOpeningTagFromPosition, function (tag, offset, selRange) {
8312 return getRangeForHTMLItem(tag, offset, selRange, true);
8313 });
8314 }
8315
8316 /**
8317 * Creates possible selection ranges for HTML tag
8318 * @param {String} source Original HTML source for tokens
8319 * @param {Array} tokens List of HTML tokens
8320 * @returns {Array}
8321 */
8322 function makePossibleRangesHTML(source, tokens, offset) {
8323 offset = offset || 0;
8324 var range = require('range');
8325 var result = [];
8326 var attrStart = -1, attrName = '', attrValue = '', attrValueRange, tagName;
8327 _.each(tokens, function(tok) {
8328 switch (tok.type) {
8329 case 'tag':
8330 tagName = source.substring(tok.start, tok.end);
8331 if (/^<[\w\:\-]/.test(tagName)) {
8332 // add tag name
8333 result.push(range.create({
8334 start: tok.start + 1,
8335 end: tok.end
8336 }));
8337 }
8338 break;
8339 case 'attribute':
8340 attrStart = tok.start;
8341 attrName = source.substring(tok.start, tok.end);
8342 break;
8343
8344 case 'string':
8345 // attribute value
8346 // push full attribute first
8347 result.push(range.create(attrStart, tok.end - attrStart));
8348
8349 attrValueRange = range.create(tok);
8350 attrValue = attrValueRange.substring(source);
8351
8352 // is this a quoted attribute?
8353 if (isQuote(attrValue.charAt(0)))
8354 attrValueRange.start++;
8355
8356 if (isQuote(attrValue.charAt(attrValue.length - 1)))
8357 attrValueRange.end--;
8358
8359 result.push(attrValueRange);
8360
8361 if (attrName == 'class') {
8362 result = result.concat(classNameRanges(attrValueRange.substring(source), attrValueRange.start));
8363 }
8364
8365 break;
8366 }
8367 });
8368
8369 // offset ranges
8370 _.each(result, function(r) {
8371 r.shift(offset);
8372 });
8373
8374 return _.chain(result)
8375 .filter(function(item) { // remove empty
8376 return !!item.length();
8377 })
8378 .uniq(false, function(item) { // remove duplicates
8379 return item.toString();
8380 })
8381 .value();
8382 }
8383
8384 /**
8385 * Returns ranges of class names in "class" attribute value
8386 * @param {String} className
8387 * @returns {Array}
8388 */
8389 function classNameRanges(className, offset) {
8390 offset = offset || 0;
8391 var result = [];
8392 /** @type StringStream */
8393 var stream = require('stringStream').create(className);
8394 var range = require('range');
8395
8396 // skip whitespace
8397 stream.eatSpace();
8398 stream.start = stream.pos;
8399
8400 var ch;
8401 while (ch = stream.next()) {
8402 if (/[\s\u00a0]/.test(ch)) {
8403 result.push(range.create(stream.start + offset, stream.pos - stream.start - 1));
8404 stream.eatSpace();
8405 stream.start = stream.pos;
8406 }
8407 }
8408
8409 result.push(range.create(stream.start + offset, stream.pos - stream.start));
8410 return result;
8411 }
8412
8413 /**
8414 * Returns best HTML tag range match for current selection
8415 * @param {String} tag Tag declaration
8416 * @param {Number} offset Tag's position index inside content
8417 * @param {Range} selRange Selection range
8418 * @return {Range} Returns range if next item was found, <code>null</code> otherwise
8419 */
8420 function getRangeForHTMLItem(tag, offset, selRange, isBackward) {
8421 var ranges = makePossibleRangesHTML(tag, require('xmlParser').parse(tag), offset);
8422
8423 if (isBackward)
8424 ranges.reverse();
8425
8426 // try to find selected range
8427 var curRange = _.find(ranges, function(r) {
8428 return r.equal(selRange);
8429 });
8430
8431 if (curRange) {
8432 var ix = _.indexOf(ranges, curRange);
8433 if (ix < ranges.length - 1)
8434 return ranges[ix + 1];
8435
8436 return null;
8437 }
8438
8439 // no selected range, find nearest one
8440 if (isBackward)
8441 // search backward
8442 return _.find(ranges, function(r) {
8443 return r.start < selRange.start;
8444 });
8445
8446 // search forward
8447 // to deal with overlapping ranges (like full attribute definition
8448 // and attribute value) let's find range under caret first
8449 if (!curRange) {
8450 var matchedRanges = _.filter(ranges, function(r) {
8451 return r.inside(selRange.end);
8452 });
8453
8454 if (matchedRanges.length > 1)
8455 return matchedRanges[1];
8456 }
8457
8458
8459 return _.find(ranges, function(r) {
8460 return r.end > selRange.end;
8461 });
8462 }
8463
8464 /**
8465 * Search for opening tag in content, starting at specified position
8466 * @param {String} html Where to search tag
8467 * @param {Number} pos Character index where to start searching
8468 * @return {Range} Returns range if valid opening tag was found,
8469 * <code>null</code> otherwise
8470 */
8471 function findOpeningTagFromPosition(html, pos) {
8472 var tag;
8473 while (pos >= 0) {
8474 if (tag = getOpeningTagFromPosition(html, pos))
8475 return tag;
8476 pos--;
8477 }
8478
8479 return null;
8480 }
8481
8482 /**
8483 * @param {String} html Where to search tag
8484 * @param {Number} pos Character index where to start searching
8485 * @return {Range} Returns range if valid opening tag was found,
8486 * <code>null</code> otherwise
8487 */
8488 function getOpeningTagFromPosition(html, pos) {
8489 var m;
8490 if (html.charAt(pos) == '<' && (m = html.substring(pos, html.length).match(startTag))) {
8491 return require('range').create(pos, m[0]);
8492 }
8493 }
8494
8495 function isQuote(ch) {
8496 return ch == '"' || ch == "'";
8497 }
8498
8499 /**
8500 * Makes all possible selection ranges for specified CSS property
8501 * @param {CSSProperty} property
8502 * @returns {Array}
8503 */
8504 function makePossibleRangesCSS(property) {
8505 // find all possible ranges, sorted by position and size
8506 var valueRange = property.valueRange(true);
8507 var result = [property.range(true), valueRange];
8508 var stringStream = require('stringStream');
8509 var cssEditTree = require('cssEditTree');
8510 var range = require('range');
8511
8512 // locate parts of complex values.
8513 // some examples:
8514 // – 1px solid red: 3 parts
8515 // – arial, sans-serif: enumeration, 2 parts
8516 // – url(image.png): function value part
8517 var value = property.value();
8518 _.each(property.valueParts(), function(r) {
8519 // add absolute range
8520 var clone = r.clone();
8521 result.push(clone.shift(valueRange.start));
8522
8523 /** @type StringStream */
8524 var stream = stringStream.create(r.substring(value));
8525 if (stream.match(/^[\w\-]+\(/, true)) {
8526 // we have a function, find values in it.
8527 // but first add function contents
8528 stream.start = stream.pos;
8529 stream.skipToPair('(', ')');
8530 var fnBody = stream.current();
8531 result.push(range.create(clone.start + stream.start, fnBody));
8532
8533 // find parts
8534 _.each(cssEditTree.findParts(fnBody), function(part) {
8535 result.push(range.create(clone.start + stream.start + part.start, part.substring(fnBody)));
8536 });
8537 }
8538 });
8539
8540 // optimize result: remove empty ranges and duplicates
8541 return _.chain(result)
8542 .filter(function(item) {
8543 return !!item.length();
8544 })
8545 .uniq(false, function(item) {
8546 return item.toString();
8547 })
8548 .value();
8549 }
8550
8551 /**
8552 * Tries to find matched CSS property and nearest range for selection
8553 * @param {CSSRule} rule
8554 * @param {Range} selRange
8555 * @param {Boolean} isBackward
8556 * @returns {Range}
8557 */
8558 function matchedRangeForCSSProperty(rule, selRange, isBackward) {
8559 /** @type CSSProperty */
8560 var property = null;
8561 var possibleRanges, curRange = null, ix;
8562 var list = rule.list();
8563 var searchFn, nearestItemFn;
8564
8565 if (isBackward) {
8566 list.reverse();
8567 searchFn = function(p) {
8568 return p.range(true).start <= selRange.start;
8569 };
8570 nearestItemFn = function(r) {
8571 return r.start < selRange.start;
8572 };
8573 } else {
8574 searchFn = function(p) {
8575 return p.range(true).end >= selRange.end;
8576 };
8577 nearestItemFn = function(r) {
8578 return r.end > selRange.start;
8579 };
8580 }
8581
8582 // search for nearest to selection CSS property
8583 while (property = _.find(list, searchFn)) {
8584 possibleRanges = makePossibleRangesCSS(property);
8585 if (isBackward)
8586 possibleRanges.reverse();
8587
8588 // check if any possible range is already selected
8589 curRange = _.find(possibleRanges, function(r) {
8590 return r.equal(selRange);
8591 });
8592
8593 if (!curRange) {
8594 // no selection, select nearest item
8595 var matchedRanges = _.filter(possibleRanges, function(r) {
8596 return r.inside(selRange.end);
8597 });
8598
8599 if (matchedRanges.length > 1) {
8600 curRange = matchedRanges[1];
8601 break;
8602 }
8603
8604 if (curRange = _.find(possibleRanges, nearestItemFn))
8605 break;
8606 } else {
8607 ix = _.indexOf(possibleRanges, curRange);
8608 if (ix != possibleRanges.length - 1) {
8609 curRange = possibleRanges[ix + 1];
8610 break;
8611 }
8612 }
8613
8614 curRange = null;
8615 selRange.start = selRange.end = isBackward
8616 ? property.range(true).start - 1
8617 : property.range(true).end + 1;
8618 }
8619
8620 return curRange;
8621 }
8622
8623 function findNextCSSItem(editor) {
8624 return findItem(editor, false, require('cssEditTree').extractRule, getRangeForNextItemInCSS);
8625 }
8626
8627 function findPrevCSSItem(editor) {
8628 return findItem(editor, true, require('cssEditTree').extractRule, getRangeForPrevItemInCSS);
8629 }
8630
8631 /**
8632 * Returns range for item to be selected in CSS after current caret
8633 * (selection) position
8634 * @param {String} rule CSS rule declaration
8635 * @param {Number} offset Rule's position index inside content
8636 * @param {Range} selRange Selection range
8637 * @return {Range} Returns range if next item was found, <code>null</code> otherwise
8638 */
8639 function getRangeForNextItemInCSS(rule, offset, selRange) {
8640 var tree = require('cssEditTree').parse(rule, {
8641 offset: offset
8642 });
8643
8644 // check if selector is matched
8645 var range = tree.nameRange(true);
8646 if (selRange.end < range.end) {
8647 return range;
8648 }
8649
8650 return matchedRangeForCSSProperty(tree, selRange, false);
8651 }
8652
8653 /**
8654 * Returns range for item to be selected in CSS before current caret
8655 * (selection) position
8656 * @param {String} rule CSS rule declaration
8657 * @param {Number} offset Rule's position index inside content
8658 * @param {Range} selRange Selection range
8659 * @return {Range} Returns range if previous item was found, <code>null</code> otherwise
8660 */
8661 function getRangeForPrevItemInCSS(rule, offset, selRange) {
8662 var tree = require('cssEditTree').parse(rule, {
8663 offset: offset
8664 });
8665
8666 var curRange = matchedRangeForCSSProperty(tree, selRange, true);
8667
8668 if (!curRange) {
8669 // no matched property, try to match selector
8670 var range = tree.nameRange(true);
8671 if (selRange.start > range.start) {
8672 return range;
8673 }
8674 }
8675
8676 return curRange;
8677 }
8678
8679 // XXX register actions
8680 var actions = require('actions');
8681 actions.add('select_next_item', function(editor){
8682 if (editor.getSyntax() == 'css')
8683 return findNextCSSItem(editor);
8684 else
8685 return findNextHTMLItem(editor);
8686 });
8687
8688 actions.add('select_previous_item', function(editor){
8689 if (editor.getSyntax() == 'css')
8690 return findPrevCSSItem(editor);
8691 else
8692 return findPrevHTMLItem(editor);
8693 });
8694 });/**
8695 * HTML pair matching (balancing) actions
8696 * @constructor
8697 * @memberOf __matchPairActionDefine
8698 * @param {Function} require
8699 * @param {Underscore} _
8700 */
8701 emmet.exec(function(require, _) {
8702 /** @type emmet.actions */
8703 var actions = require('actions');
8704 var matcher = require('html_matcher');
8705
8706 /**
8707 * Find and select HTML tag pair
8708 * @param {IEmmetEditor} editor Editor instance
8709 * @param {String} direction Direction of pair matching: 'in' or 'out'.
8710 * Default is 'out'
8711 */
8712 function matchPair(editor, direction, syntax) {
8713 direction = String((direction || 'out').toLowerCase());
8714 var info = require('editorUtils').outputInfo(editor, syntax);
8715 syntax = info.syntax;
8716
8717 var range = require('range');
8718 /** @type Range */
8719 var selRange = range.create(editor.getSelectionRange());
8720 var content = info.content;
8721 /** @type Range */
8722 var tagRange = null;
8723 /** @type Range */
8724 var _r;
8725
8726 var oldOpenTag = matcher.last_match['opening_tag'];
8727 var oldCloseTag = matcher.last_match['closing_tag'];
8728
8729 if (direction == 'in' && oldOpenTag && selRange.length()) {
8730 // user has previously selected tag and wants to move inward
8731 if (!oldCloseTag) {
8732 // unary tag was selected, can't move inward
8733 return false;
8734 } else if (oldOpenTag.start == selRange.start) {
8735 if (content.charAt(oldOpenTag.end) == '<') {
8736 // test if the first inward tag matches the entire parent tag's content
8737 _r = range.create(matcher.find(content, oldOpenTag.end + 1, syntax));
8738 if (_r.start == oldOpenTag.end && _r.end == oldCloseTag.start) {
8739 tagRange = range.create(matcher(content, oldOpenTag.end + 1, syntax));
8740 } else {
8741 tagRange = range.create(oldOpenTag.end, oldCloseTag.start - oldOpenTag.end);
8742 }
8743 } else {
8744 tagRange = range.create(oldOpenTag.end, oldCloseTag.start - oldOpenTag.end);
8745 }
8746 } else {
8747 var newCursor = content.substring(0, oldCloseTag.start).indexOf('<', oldOpenTag.end);
8748 var searchPos = newCursor != -1 ? newCursor + 1 : oldOpenTag.end;
8749 tagRange = range.create(matcher(content, searchPos, syntax));
8750 }
8751 } else {
8752 tagRange = range.create(matcher(content, selRange.end, syntax));
8753 }
8754
8755 if (tagRange && tagRange.start != -1) {
8756 editor.createSelection(tagRange.start, tagRange.end);
8757 return true;
8758 }
8759
8760 return false;
8761 }
8762
8763 actions.add('match_pair', matchPair, {hidden: true});
8764 actions.add('match_pair_inward', function(editor){
8765 return matchPair(editor, 'in');
8766 }, {label: 'HTML/Match Pair Tag (inward)'});
8767
8768 actions.add('match_pair_outward', function(editor){
8769 return matchPair(editor, 'out');
8770 }, {label: 'HTML/Match Pair Tag (outward)'});
8771
8772 /**
8773 * Moves caret to matching opening or closing tag
8774 * @param {IEmmetEditor} editor
8775 */
8776 actions.add('matching_pair', function(editor) {
8777 var content = String(editor.getContent());
8778 var caretPos = editor.getCaretPos();
8779
8780 if (content.charAt(caretPos) == '<')
8781 // looks like caret is outside of tag pair
8782 caretPos++;
8783
8784 var tags = matcher.getTags(content, caretPos, String(editor.getProfileName()));
8785
8786 if (tags && tags[0]) {
8787 // match found
8788 var openTag = tags[0];
8789 var closeTag = tags[1];
8790
8791 if (closeTag) { // exclude unary tags
8792 if (openTag.start <= caretPos && openTag.end >= caretPos) {
8793 editor.setCaretPos(closeTag.start);
8794 return true;
8795 } else if (closeTag.start <= caretPos && closeTag.end >= caretPos){
8796 editor.setCaretPos(openTag.start);
8797 return true;
8798 }
8799 }
8800 }
8801
8802 return false;
8803 }, {label: 'HTML/Go To Matching Tag Pair'});
8804 });/**
8805 * Gracefully removes tag under cursor
8806 *
8807 * @param {Function} require
8808 * @param {Underscore} _
8809 */
8810 emmet.exec(function(require, _) {
8811 require('actions').add('remove_tag', function(editor) {
8812 var utils = require('utils');
8813 var info = require('editorUtils').outputInfo(editor);
8814
8815 // search for tag
8816 var pair = require('html_matcher').getTags(info.content, editor.getCaretPos(), info.profile);
8817 if (pair && pair[0]) {
8818 if (!pair[1]) {
8819 // simply remove unary tag
8820 editor.replaceContent(utils.getCaretPlaceholder(), pair[0].start, pair[0].end);
8821 } else {
8822 // remove tag and its newlines
8823 /** @type Range */
8824 var tagContentRange = utils.narrowToNonSpace(info.content, pair[0].end, pair[1].start - pair[0].end);
8825 /** @type Range */
8826 var startLineBounds = utils.findNewlineBounds(info.content, tagContentRange.start);
8827 var startLinePad = utils.getLinePadding(startLineBounds.substring(info.content));
8828 var tagContent = tagContentRange.substring(info.content);
8829
8830 tagContent = utils.unindentString(tagContent, startLinePad);
8831 editor.replaceContent(utils.getCaretPlaceholder() + utils.escapeText(tagContent), pair[0].start, pair[1].end);
8832 }
8833
8834 return true;
8835 }
8836
8837 return false;
8838 }, {label: 'HTML/Remove Tag'});
8839 });
8840 /**
8841 * Splits or joins tag, e.g. transforms it into a short notation and vice versa:<br>
8842 * &lt;div&gt;&lt;/div&gt; → &lt;div /&gt; : join<br>
8843 * &lt;div /&gt; → &lt;div&gt;&lt;/div&gt; : split
8844 * @param {Function} require
8845 * @param {Underscore} _
8846 * @memberOf __splitJoinTagAction
8847 * @constructor
8848 */
8849 emmet.exec(function(require, _) {
8850 /**
8851 * @param {IEmmetEditor} editor
8852 * @param {Object} profile
8853 * @param {Object} htmlMatch
8854 */
8855 function joinTag(editor, profile, htmlMatch) {
8856 /** @type emmet.utils */
8857 var utils = require('utils');
8858
8859 var closingSlash = (profile.self_closing_tag === true) ? '/' : ' /';
8860 var content = htmlMatch[0].full_tag.replace(/\s*>$/, closingSlash + '>');
8861
8862 // add caret placeholder
8863 if (content.length + htmlMatch[0].start < editor.getCaretPos())
8864 content += utils.getCaretPlaceholder();
8865 else {
8866 var d = editor.getCaretPos() - htmlMatch[0].start;
8867 content = utils.replaceSubstring(content, utils.getCaretPlaceholder(), d);
8868 }
8869
8870 editor.replaceContent(content, htmlMatch[0].start, htmlMatch[1].end);
8871 return true;
8872 }
8873
8874 function splitTag(editor, profile, htmlMatch) {
8875 /** @type emmet.utils */
8876 var utils = require('utils');
8877
8878 var nl = utils.getNewline();
8879 var pad = require('resources').getVariable('indentation');
8880 var caret = utils.getCaretPlaceholder();
8881
8882 // define tag content depending on profile
8883 var tagContent = (profile.tag_nl === true) ? nl + pad + caret + nl : caret;
8884
8885 var content = htmlMatch[0].full_tag.replace(/\s*\/>$/, '>') + tagContent + '</' + htmlMatch[0].name + '>';
8886 editor.replaceContent(content, htmlMatch[0].start, htmlMatch[0].end);
8887 return true;
8888 }
8889
8890 require('actions').add('split_join_tag', function(editor, profileName) {
8891 var matcher = require('html_matcher');
8892
8893 var info = require('editorUtils').outputInfo(editor, null, profileName);
8894 var profile = require('profile').get(info.profile);
8895
8896 // find tag at current position
8897 var pair = matcher.getTags(info.content, editor.getCaretPos(), info.profile);
8898 if (pair && pair[0]) {
8899 if (pair[1]) { // join tag
8900 return joinTag(editor, profile, pair);
8901 }
8902 return splitTag(editor, profile, pair);
8903 }
8904
8905 return false;
8906 }, {label: 'HTML/Split\\Join Tag Declaration'});
8907 });/**
8908 * Reflect CSS value: takes rule's value under caret and pastes it for the same
8909 * rules with vendor prefixes
8910 * @constructor
8911 * @memberOf __reflectCSSActionDefine
8912 * @param {Function} require
8913 * @param {Underscore} _
8914 */
8915 emmet.define('reflectCSSValue', function(require, _) {
8916 /**
8917 * @type HandlerList List of registered handlers
8918 */
8919 var handlers = require('handlerList').create();
8920
8921 require('actions').add('reflect_css_value', function(editor) {
8922 if (editor.getSyntax() != 'css') return false;
8923
8924 return require('actionUtils').compoundUpdate(editor, doCSSReflection(editor));
8925 }, {label: 'CSS/Reflect Value'});
8926
8927 function doCSSReflection(editor) {
8928 /** @type emmet.cssEditTree */
8929 var cssEditTree = require('cssEditTree');
8930 var outputInfo = require('editorUtils').outputInfo(editor);
8931 var caretPos = editor.getCaretPos();
8932
8933 var cssRule = cssEditTree.parseFromPosition(outputInfo.content, caretPos);
8934 if (!cssRule) return;
8935
8936 var property = cssRule.itemFromPosition(caretPos, true);
8937 // no property under cursor, nothing to reflect
8938 if (!property) return;
8939
8940 var oldRule = cssRule.source;
8941 var offset = cssRule.options.offset;
8942 var caretDelta = caretPos - offset - property.range().start;
8943
8944 handlers.exec(false, [property]);
8945
8946 if (oldRule !== cssRule.source) {
8947 return {
8948 data: cssRule.source,
8949 start: offset,
8950 end: offset + oldRule.length,
8951 caret: offset + property.range().start + caretDelta
8952 };
8953 }
8954 }
8955
8956 /**
8957 * Returns regexp that should match reflected CSS property names
8958 * @param {String} name Current CSS property name
8959 * @return {RegExp}
8960 */
8961 function getReflectedCSSName(name) {
8962 name = require('cssEditTree').baseName(name);
8963 var vendorPrefix = '^(?:\\-\\w+\\-)?', m;
8964
8965 if (name == 'opacity' || name == 'filter') {
8966 return new RegExp(vendorPrefix + '(?:opacity|filter)$');
8967 } else if (m = name.match(/^border-radius-(top|bottom)(left|right)/)) {
8968 // Mozilla-style border radius
8969 return new RegExp(vendorPrefix + '(?:' + name + '|border-' + m[1] + '-' + m[2] + '-radius)$');
8970 } else if (m = name.match(/^border-(top|bottom)-(left|right)-radius/)) {
8971 return new RegExp(vendorPrefix + '(?:' + name + '|border-radius-' + m[1] + m[2] + ')$');
8972 }
8973
8974 return new RegExp(vendorPrefix + name + '$');
8975 }
8976
8977 /**
8978 * Reflects value from <code>donor</code> into <code>receiver</code>
8979 * @param {CSSProperty} donor Donor CSS property from which value should
8980 * be reflected
8981 * @param {CSSProperty} receiver Property that should receive reflected
8982 * value from donor
8983 */
8984 function reflectValue(donor, receiver) {
8985 var value = getReflectedValue(donor.name(), donor.value(),
8986 receiver.name(), receiver.value());
8987
8988 receiver.value(value);
8989 }
8990
8991 /**
8992 * Returns value that should be reflected for <code>refName</code> CSS property
8993 * from <code>curName</code> property. This function is used for special cases,
8994 * when the same result must be achieved with different properties for different
8995 * browsers. For example: opаcity:0.5; → filter:alpha(opacity=50);<br><br>
8996 *
8997 * This function does value conversion between different CSS properties
8998 *
8999 * @param {String} curName Current CSS property name
9000 * @param {String} curValue Current CSS property value
9001 * @param {String} refName Receiver CSS property's name
9002 * @param {String} refValue Receiver CSS property's value
9003 * @return {String} New value for receiver property
9004 */
9005 function getReflectedValue(curName, curValue, refName, refValue) {
9006 var cssEditTree = require('cssEditTree');
9007 var utils = require('utils');
9008 curName = cssEditTree.baseName(curName);
9009 refName = cssEditTree.baseName(refName);
9010
9011 if (curName == 'opacity' && refName == 'filter') {
9012 return refValue.replace(/opacity=[^)]*/i, 'opacity=' + Math.floor(parseFloat(curValue) * 100));
9013 } else if (curName == 'filter' && refName == 'opacity') {
9014 var m = curValue.match(/opacity=([^)]*)/i);
9015 return m ? utils.prettifyNumber(parseInt(m[1]) / 100) : refValue;
9016 }
9017
9018 return curValue;
9019 }
9020
9021 // XXX add default handler
9022 handlers.add(function(property) {
9023 var reName = getReflectedCSSName(property.name());
9024 _.each(property.parent.list(), function(p) {
9025 if (reName.test(p.name())) {
9026 reflectValue(property, p);
9027 }
9028 });
9029 }, {order: -1});
9030
9031 return {
9032 /**
9033 * Adds custom reflect handler. The passed function will receive matched
9034 * CSS property (as <code>CSSEditElement</code> object) and should
9035 * return <code>true</code> if it was performed successfully (handled
9036 * reflection), <code>false</code> otherwise.
9037 * @param {Function} fn
9038 * @param {Object} options
9039 */
9040 addHandler: function(fn, options) {
9041 handlers.add(fn, options);
9042 },
9043
9044 /**
9045 * Removes registered handler
9046 * @returns
9047 */
9048 removeHandler: function(fn) {
9049 handlers.remove(fn, options);
9050 }
9051 };
9052 });/**
9053 * Evaluates simple math expression under caret
9054 * @param {Function} require
9055 * @param {Underscore} _
9056 */
9057 emmet.exec(function(require, _) {
9058 require('actions').add('evaluate_math_expression', function(editor) {
9059 var actionUtils = require('actionUtils');
9060 var utils = require('utils');
9061
9062 var content = String(editor.getContent());
9063 var chars = '.+-*/\\';
9064
9065 /** @type Range */
9066 var sel = require('range').create(editor.getSelectionRange());
9067 if (!sel.length()) {
9068 sel = actionUtils.findExpressionBounds(editor, function(ch) {
9069 return utils.isNumeric(ch) || chars.indexOf(ch) != -1;
9070 });
9071 }
9072
9073 if (sel && sel.length()) {
9074 var expr = sel.substring(content);
9075
9076 // replace integral division: 11\2 => Math.round(11/2)
9077 expr = expr.replace(/([\d\.\-]+)\\([\d\.\-]+)/g, 'Math.round($1/$2)');
9078
9079 try {
9080 var result = utils.prettifyNumber(new Function('return ' + expr)());
9081 editor.replaceContent(result, sel.start, sel.end);
9082 editor.setCaretPos(sel.start + result.length);
9083 return true;
9084 } catch (e) {}
9085 }
9086
9087 return false;
9088 }, {label: 'Numbers/Evaluate Math Expression'});
9089 });
9090 /**
9091 * Increment/decrement number under cursor
9092 * @param {Function} require
9093 * @param {Underscore} _
9094 */
9095 emmet.exec(function(require, _) {
9096 /**
9097 * Extract number from current caret position of the <code>editor</code> and
9098 * increment it by <code>step</code>
9099 * @param {IEmmetEditor} editor
9100 * @param {Number} step Increment step (may be negative)
9101 */
9102 function incrementNumber(editor, step) {
9103 var utils = require('utils');
9104 var actionUtils = require('actionUtils');
9105
9106 var hasSign = false;
9107 var hasDecimal = false;
9108
9109 var r = actionUtils.findExpressionBounds(editor, function(ch, pos, content) {
9110 if (utils.isNumeric(ch))
9111 return true;
9112 if (ch == '.') {
9113 // make sure that next character is numeric too
9114 if (!utils.isNumeric(content.charAt(pos + 1)))
9115 return false;
9116
9117 return hasDecimal ? false : hasDecimal = true;
9118 }
9119 if (ch == '-')
9120 return hasSign ? false : hasSign = true;
9121
9122 return false;
9123 });
9124
9125 if (r && r.length()) {
9126 var strNum = r.substring(String(editor.getContent()));
9127 var num = parseFloat(strNum);
9128 if (!_.isNaN(num)) {
9129 num = utils.prettifyNumber(num + step);
9130
9131 // do we have zero-padded number?
9132 if (/^(\-?)0+[1-9]/.test(strNum)) {
9133 var minus = '';
9134 if (RegExp.$1) {
9135 minus = '-';
9136 num = num.substring(1);
9137 }
9138
9139 var parts = num.split('.');
9140 parts[0] = utils.zeroPadString(parts[0], intLength(strNum));
9141 num = minus + parts.join('.');
9142 }
9143
9144 editor.replaceContent(num, r.start, r.end);
9145 editor.createSelection(r.start, r.start + num.length);
9146 return true;
9147 }
9148 }
9149
9150 return false;
9151 }
9152
9153 /**
9154 * Returns length of integer part of number
9155 * @param {String} num
9156 */
9157 function intLength(num) {
9158 num = num.replace(/^\-/, '');
9159 if (~num.indexOf('.')) {
9160 return num.split('.')[0].length;
9161 }
9162
9163 return num.length;
9164 }
9165
9166 var actions = require('actions');
9167 _.each([1, -1, 10, -10, 0.1, -0.1], function(num) {
9168 var prefix = num > 0 ? 'increment' : 'decrement';
9169
9170 actions.add(prefix + '_number_by_' + String(Math.abs(num)).replace('.', '').substring(0, 2), function(editor) {
9171 return incrementNumber(editor, num);
9172 }, {label: 'Numbers/' + prefix.charAt(0).toUpperCase() + prefix.substring(1) + ' number by ' + Math.abs(num)});
9173 });
9174 });/**
9175 * Actions to insert line breaks. Some simple editors (like browser's
9176 * &lt;textarea&gt;, for example) do not provide such simple things
9177 * @param {Function} require
9178 * @param {Underscore} _
9179 */
9180 emmet.exec(function(require, _) {
9181 var actions = require('actions');
9182 /** @type emmet.preferences */
9183 var prefs = require('preferences');
9184
9185 // setup default preferences
9186 prefs.define('css.closeBraceIndentation', '\n',
9187 'Indentation before closing brace of CSS rule. Some users prefere '
9188 + 'indented closing brace of CSS rule for better readability. '
9189 + 'This preference’s value will be automatically inserted before '
9190 + 'closing brace when user adds newline in newly created CSS rule '
9191 + '(e.g. when “Insert formatted linebreak” action will be performed '
9192 + 'in CSS file). If you’re such user, you may want to write put a value '
9193 + 'like <code>\\n\\t</code> in this preference.');
9194
9195 /**
9196 * Inserts newline character with proper indentation in specific positions only.
9197 * @param {IEmmetEditor} editor
9198 * @return {Boolean} Returns <code>true</code> if line break was inserted
9199 */
9200 actions.add('insert_formatted_line_break_only', function(editor) {
9201 var utils = require('utils');
9202 /** @type emmet.resources */
9203 var res = require('resources');
9204
9205 var info = require('editorUtils').outputInfo(editor);
9206 var caretPos = editor.getCaretPos();
9207 var nl = utils.getNewline();
9208
9209 if (_.include(['html', 'xml', 'xsl'], info.syntax)) {
9210 var pad = res.getVariable('indentation');
9211 // let's see if we're breaking newly created tag
9212 var pair = require('html_matcher').getTags(info.content, caretPos, info.profile);
9213
9214 if (pair[0] && pair[1] && pair[0].type == 'tag' && pair[0].end == caretPos && pair[1].start == caretPos) {
9215 editor.replaceContent(nl + pad + utils.getCaretPlaceholder() + nl, caretPos);
9216 return true;
9217 }
9218 } else if (info.syntax == 'css') {
9219 /** @type String */
9220 var content = info.content;
9221 if (caretPos && content.charAt(caretPos - 1) == '{') {
9222 var append = prefs.get('css.closeBraceIndentation');
9223 var pad = res.getVariable('indentation');
9224
9225 var hasCloseBrace = content.charAt(caretPos) == '}';
9226 if (!hasCloseBrace) {
9227 // do we really need special formatting here?
9228 // check if this is really a newly created rule,
9229 // look ahead for a closing brace
9230 for (var i = caretPos, il = content.length, ch; i < il; i++) {
9231 ch = content.charAt(i);
9232 if (ch == '{') {
9233 // ok, this is a new rule without closing brace
9234 break;
9235 }
9236
9237 if (ch == '}') {
9238 // not a new rule, just add indentation
9239 append = '';
9240 hasCloseBrace = true;
9241 break;
9242 }
9243 }
9244 }
9245
9246 if (!hasCloseBrace) {
9247 append += '}';
9248 }
9249
9250 // defining rule set
9251 var insValue = nl + pad + utils.getCaretPlaceholder() + append;
9252 editor.replaceContent(insValue, caretPos);
9253 return true;
9254 }
9255 }
9256
9257 return false;
9258 }, {hidden: true});
9259
9260 /**
9261 * Inserts newline character with proper indentation. This action is used in
9262 * editors that doesn't have indentation control (like textarea element) to
9263 * provide proper indentation
9264 * @param {IEmmetEditor} editor Editor instance
9265 */
9266 actions.add('insert_formatted_line_break', function(editor) {
9267 if (!actions.run('insert_formatted_line_break_only', editor)) {
9268 var utils = require('utils');
9269
9270 var curPadding = require('editorUtils').getCurrentLinePadding(editor);
9271 var content = String(editor.getContent());
9272 var caretPos = editor.getCaretPos();
9273 var len = content.length;
9274 var nl = utils.getNewline();
9275
9276 // check out next line padding
9277 var lineRange = editor.getCurrentLineRange();
9278 var nextPadding = '';
9279
9280 for (var i = lineRange.end + 1, ch; i < len; i++) {
9281 ch = content.charAt(i);
9282 if (ch == ' ' || ch == '\t')
9283 nextPadding += ch;
9284 else
9285 break;
9286 }
9287
9288 if (nextPadding.length > curPadding.length)
9289 editor.replaceContent(nl + nextPadding, caretPos, caretPos, true);
9290 else
9291 editor.replaceContent(nl, caretPos);
9292 }
9293
9294 return true;
9295 }, {hidden: true});
9296 });/**
9297 * Merges selected lines or lines between XHTML tag pairs
9298 * @param {Function} require
9299 * @param {Underscore} _
9300 */
9301 emmet.exec(function(require, _) {
9302 require('actions').add('merge_lines', function(editor) {
9303 var matcher = require('html_matcher');
9304 var utils = require('utils');
9305 var editorUtils = require('editorUtils');
9306 var info = editorUtils.outputInfo(editor);
9307
9308 /** @type Range */
9309 var selection = require('range').create(editor.getSelectionRange());
9310 if (!selection.length()) {
9311 // find matching tag
9312 var pair = matcher(info.content, editor.getCaretPos(), info.profile);
9313 if (pair) {
9314 selection.start = pair[0];
9315 selection.end = pair[1];
9316 }
9317 }
9318
9319 if (selection.length()) {
9320 // got range, merge lines
9321 var text = selection.substring(info.content);
9322 var lines = utils.splitByLines(text);
9323
9324 for (var i = 1; i < lines.length; i++) {
9325 lines[i] = lines[i].replace(/^\s+/, '');
9326 }
9327
9328 text = lines.join('').replace(/\s{2,}/, ' ');
9329 editor.replaceContent(text, selection.start, selection.end);
9330 editor.createSelection(selection.start, selection.start + text.length);
9331
9332 return true;
9333 }
9334
9335 return false;
9336 });
9337 });/**
9338 * Encodes/decodes image under cursor to/from base64
9339 * @param {IEmmetEditor} editor
9340 * @since 0.65
9341 *
9342 * @memberOf __base64ActionDefine
9343 * @constructor
9344 * @param {Function} require
9345 * @param {Underscore} _
9346 */
9347 emmet.exec(function(require, _) {
9348 require('actions').add('encode_decode_data_url', function(editor) {
9349 var data = String(editor.getSelection());
9350 var caretPos = editor.getCaretPos();
9351
9352 if (!data) {
9353 // no selection, try to find image bounds from current caret position
9354 var text = String(editor.getContent()), m;
9355 while (caretPos-- >= 0) {
9356 if (startsWith('src=', text, caretPos)) { // found <img src="">
9357 if (m = text.substr(caretPos).match(/^(src=(["'])?)([^'"<>\s]+)\1?/)) {
9358 data = m[3];
9359 caretPos += m[1].length;
9360 }
9361 break;
9362 } else if (startsWith('url(', text, caretPos)) { // found CSS url() pattern
9363 if (m = text.substr(caretPos).match(/^(url\((['"])?)([^'"\)\s]+)\1?/)) {
9364 data = m[3];
9365 caretPos += m[1].length;
9366 }
9367 break;
9368 }
9369 }
9370 }
9371
9372 if (data) {
9373 if (startsWith('data:', data))
9374 return decodeFromBase64(editor, data, caretPos);
9375 else
9376 return encodeToBase64(editor, data, caretPos);
9377 }
9378
9379 return false;
9380 }, {label: 'Encode\\Decode data:URL image'});
9381
9382 /**
9383 * Test if <code>text</code> starts with <code>token</code> at <code>pos</code>
9384 * position. If <code>pos</code> is omitted, search from beginning of text
9385 * @param {String} token Token to test
9386 * @param {String} text Where to search
9387 * @param {Number} pos Position where to start search
9388 * @return {Boolean}
9389 * @since 0.65
9390 */
9391 function startsWith(token, text, pos) {
9392 pos = pos || 0;
9393 return text.charAt(pos) == token.charAt(0) && text.substr(pos, token.length) == token;
9394 }
9395
9396 /**
9397 * Encodes image to base64
9398 *
9399 * @param {IEmmetEditor} editor
9400 * @param {String} imgPath Path to image
9401 * @param {Number} pos Caret position where image is located in the editor
9402 * @return {Boolean}
9403 */
9404 function encodeToBase64(editor, imgPath, pos) {
9405 var file = require('file');
9406 var actionUtils = require('actionUtils');
9407
9408 var editorFile = editor.getFilePath();
9409 var defaultMimeType = 'application/octet-stream';
9410
9411 if (editorFile === null) {
9412 throw "You should save your file before using this action";
9413 }
9414
9415 // locate real image path
9416 var realImgPath = file.locateFile(editorFile, imgPath);
9417 if (realImgPath === null) {
9418 throw "Can't find " + imgPath + ' file';
9419 }
9420
9421 var b64 = require('base64').encode(String(file.read(realImgPath)));
9422 if (!b64) {
9423 throw "Can't encode file content to base64";
9424 }
9425
9426 b64 = 'data:' + (actionUtils.mimeTypes[String(file.getExt(realImgPath))] || defaultMimeType) +
9427 ';base64,' + b64;
9428
9429 editor.replaceContent('$0' + b64, pos, pos + imgPath.length);
9430 return true;
9431 }
9432
9433 /**
9434 * Decodes base64 string back to file.
9435 * @param {IEmmetEditor} editor
9436 * @param {String} data Base64-encoded file content
9437 * @param {Number} pos Caret position where image is located in the editor
9438 */
9439 function decodeFromBase64(editor, data, pos) {
9440 // ask user to enter path to file
9441 var filePath = String(editor.prompt('Enter path to file (absolute or relative)'));
9442 if (!filePath)
9443 return false;
9444
9445 var file = require('file');
9446 var absPath = file.createPath(editor.getFilePath(), filePath);
9447 if (!absPath) {
9448 throw "Can't save file";
9449 }
9450
9451 file.save(absPath, require('base64').decode( data.replace(/^data\:.+?;.+?,/, '') ));
9452 editor.replaceContent('$0' + filePath, pos, pos + data.length);
9453 return true;
9454 }
9455 });
9456 /**
9457 * Automatically updates image size attributes in HTML's &lt;img&gt; element or
9458 * CSS rule
9459 * @param {Function} require
9460 * @param {Underscore} _
9461 * @constructor
9462 * @memberOf __updateImageSizeAction
9463 */
9464 emmet.exec(function(require, _) {
9465 /**
9466 * Updates image size of &lt;img src=""&gt; tag
9467 * @param {IEmmetEditor} editor
9468 */
9469 function updateImageSizeHTML(editor) {
9470 var offset = editor.getCaretPos();
9471
9472 // find tag from current caret position
9473 var info = require('editorUtils').outputInfo(editor);
9474 var xmlElem = require('xmlEditTree').parseFromPosition(info.content, offset, true);
9475 if (xmlElem && (xmlElem.name() || '').toLowerCase() == 'img') {
9476
9477 var size = getImageSizeForSource(editor, xmlElem.value('src'));
9478 if (size) {
9479 var compoundData = xmlElem.range(true);
9480 xmlElem.value('width', size.width);
9481 xmlElem.value('height', size.height, xmlElem.indexOf('width') + 1);
9482
9483 return _.extend(compoundData, {
9484 data: xmlElem.toString(),
9485 caret: offset
9486 });
9487 }
9488 }
9489
9490 return null;
9491 }
9492
9493 /**
9494 * Updates image size of CSS property
9495 * @param {IEmmetEditor} editor
9496 */
9497 function updateImageSizeCSS(editor) {
9498 var offset = editor.getCaretPos();
9499
9500 // find tag from current caret position
9501 var info = require('editorUtils').outputInfo(editor);
9502 var cssRule = require('cssEditTree').parseFromPosition(info.content, offset, true);
9503 if (cssRule) {
9504 // check if there is property with image under caret
9505 var prop = cssRule.itemFromPosition(offset, true), m;
9506 if (prop && (m = /url\((["']?)(.+?)\1\)/i.exec(prop.value() || ''))) {
9507 var size = getImageSizeForSource(editor, m[2]);
9508 if (size) {
9509 var compoundData = cssRule.range(true);
9510 cssRule.value('width', size.width + 'px');
9511 cssRule.value('height', size.height + 'px', cssRule.indexOf('width') + 1);
9512
9513 return _.extend(compoundData, {
9514 data: cssRule.toString(),
9515 caret: offset
9516 });
9517 }
9518 }
9519 }
9520
9521 return null;
9522 }
9523
9524 /**
9525 * Returns image dimensions for source
9526 * @param {IEmmetEditor} editor
9527 * @param {String} src Image source (path or data:url)
9528 */
9529 function getImageSizeForSource(editor, src) {
9530 var fileContent;
9531 if (src) {
9532 // check if it is data:url
9533 if (/^data:/.test(src)) {
9534 fileContent = require('base64').decode( src.replace(/^data\:.+?;.+?,/, '') );
9535 } else {
9536 var file = require('file');
9537 var absPath = file.locateFile(editor.getFilePath(), src);
9538 if (absPath === null) {
9539 throw "Can't find " + src + ' file';
9540 }
9541
9542 fileContent = String(file.read(absPath));
9543 }
9544
9545 return require('actionUtils').getImageSize(fileContent);
9546 }
9547 }
9548
9549 require('actions').add('update_image_size', function(editor) {
9550 var result;
9551 if (String(editor.getSyntax()) == 'css') {
9552 result = updateImageSizeCSS(editor);
9553 } else {
9554 result = updateImageSizeHTML(editor);
9555 }
9556
9557 return require('actionUtils').compoundUpdate(editor, result);
9558 });
9559 });/**
9560 * Resolver for fast CSS typing. Handles abbreviations with the following
9561 * notation:<br>
9562 *
9563 * <code>(-vendor prefix)?property(value)*(!)?</code>
9564 *
9565 * <br><br>
9566 * <b>Abbreviation handling</b><br>
9567 *
9568 * By default, Emmet searches for matching snippet definition for provided abbreviation.
9569 * If snippet wasn't found, Emmet automatically generates element with
9570 * abbreviation's name. For example, <code>foo</code> abbreviation will generate
9571 * <code>&lt;foo&gt;&lt;/foo&gt;</code> output.
9572 * <br><br>
9573 * This module will capture all expanded properties and upgrade them with values,
9574 * vendor prefixes and !important declarations. All unmatched abbreviations will
9575 * be automatically transformed into <code>property-name: ${1}</code> snippets.
9576 *
9577 * <b>Vendor prefixes<b><br>
9578 *
9579 * If CSS-property is preceded with dash, resolver should output property with
9580 * all <i>known</i> vendor prefixes. For example, if <code>brad</code>
9581 * abbreviation generates <code>border-radius: ${value};</code> snippet,
9582 * the <code>-brad</code> abbreviation should generate:
9583 * <pre><code>
9584 * -webkit-border-radius: ${value};
9585 * -moz-border-radius: ${value};
9586 * border-radius: ${value};
9587 * </code></pre>
9588 * Note that <i>o</i> and <i>ms</i> prefixes are omitted since Opera and IE
9589 * supports unprefixed property.<br><br>
9590 *
9591 * Users can also provide an explicit list of one-character prefixes for any
9592 * CSS property. For example, <code>-wm-float</code> will produce
9593 *
9594 * <pre><code>
9595 * -webkit-float: ${1};
9596 * -moz-float: ${1};
9597 * float: ${1};
9598 * </code></pre>
9599 *
9600 * Although this example looks pointless, users can use this feature to write
9601 * cutting-edge properties implemented by browser vendors recently.
9602 *
9603 * @constructor
9604 * @memberOf __cssResolverDefine
9605 * @param {Function} require
9606 * @param {Underscore} _
9607 */
9608 emmet.define('cssResolver', function(require, _) {
9609 /** Back-reference to module */
9610 var module = null;
9611
9612 var prefixObj = {
9613 /** Real vendor prefix name */
9614 prefix: 'emmet',
9615
9616 /**
9617 * Indicates this prefix is obsolete and should't be used when user
9618 * wants to generate all-prefixed properties
9619 */
9620 obsolete: false,
9621
9622 /**
9623 * Returns prefixed CSS property name
9624 * @param {String} name Unprefixed CSS property
9625 */
9626 transformName: function(name) {
9627 return '-' + this.prefix + '-' + name;
9628 },
9629
9630 /**
9631 * @type {Array} List of unprefixed CSS properties that supported by
9632 * current prefix. This list is used to generate all-prefixed property
9633 */
9634 supports: null
9635 };
9636
9637
9638 /**
9639 * List of registered one-character prefixes. Key is a one-character prefix,
9640 * value is an <code>prefixObj</code> object
9641 */
9642 var vendorPrefixes = {};
9643
9644 var defaultValue = '${1};';
9645
9646 // XXX module preferences
9647 var prefs = require('preferences');
9648 prefs.define('css.valueSeparator', ': ',
9649 'Defines a symbol that should be placed between CSS property and '
9650 + 'value when expanding CSS abbreviations.');
9651 prefs.define('css.propertyEnd', ';',
9652 'Defines a symbol that should be placed at the end of CSS property '
9653 + 'when expanding CSS abbreviations.');
9654
9655 prefs.define('stylus.valueSeparator', ' ',
9656 'Defines a symbol that should be placed between CSS property and '
9657 + 'value when expanding CSS abbreviations in Stylus dialect.');
9658 prefs.define('stylus.propertyEnd', '',
9659 'Defines a symbol that should be placed at the end of CSS property '
9660 + 'when expanding CSS abbreviations in Stylus dialect.');
9661
9662 prefs.define('sass.propertyEnd', '',
9663 'Defines a symbol that should be placed at the end of CSS property '
9664 + 'when expanding CSS abbreviations in SASS dialect.');
9665
9666 prefs.define('css.autoInsertVendorPrefixes', true,
9667 'Automatically generate vendor-prefixed copies of expanded CSS '
9668 + 'property. By default, Emmet will generate vendor-prefixed '
9669 + 'properties only when you put dash before abbreviation '
9670 + '(e.g. <code>-bxsh</code>). With this option enabled, you don’t '
9671 + 'need dashes before abbreviations: Emmet will produce '
9672 + 'vendor-prefixed properties for you.');
9673
9674 var descTemplate = _.template('A comma-separated list of CSS properties that may have '
9675 + '<code><%= vendor %></code> vendor prefix. This list is used to generate '
9676 + 'a list of prefixed properties when expanding <code>-property</code> '
9677 + 'abbreviations. Empty list means that all possible CSS values may '
9678 + 'have <code><%= vendor %></code> prefix.');
9679
9680 var descAddonTemplate = _.template('A comma-separated list of <em>additions</em> CSS properties '
9681 + 'for <code>css.<%= vendor %>Preperties</code> preference. '
9682 + 'You should use this list if you want to add or remove a few CSS '
9683 + 'properties to original set. To add a new property, simply write its name, '
9684 + 'to remove it, precede property with hyphen.<br>'
9685 + 'For example, to add <em>foo</em> property and remove <em>border-radius</em> one, '
9686 + 'the preference value will look like this: <code>foo, -border-radius</code>.');
9687
9688 // properties list is created from cssFeatures.html file
9689 var props = {
9690 'webkit': 'animation, animation-delay, animation-direction, animation-duration, animation-fill-mode, animation-iteration-count, animation-name, animation-play-state, animation-timing-function, appearance, backface-visibility, background-clip, background-composite, background-origin, background-size, border-fit, border-horizontal-spacing, border-image, border-vertical-spacing, box-align, box-direction, box-flex, box-flex-group, box-lines, box-ordinal-group, box-orient, box-pack, box-reflect, box-shadow, color-correction, column-break-after, column-break-before, column-break-inside, column-count, column-gap, column-rule-color, column-rule-style, column-rule-width, column-span, column-width, dashboard-region, font-smoothing, highlight, hyphenate-character, hyphenate-limit-after, hyphenate-limit-before, hyphens, line-box-contain, line-break, line-clamp, locale, margin-before-collapse, margin-after-collapse, marquee-direction, marquee-increment, marquee-repetition, marquee-style, mask-attachment, mask-box-image, mask-box-image-outset, mask-box-image-repeat, mask-box-image-slice, mask-box-image-source, mask-box-image-width, mask-clip, mask-composite, mask-image, mask-origin, mask-position, mask-repeat, mask-size, nbsp-mode, perspective, perspective-origin, rtl-ordering, text-combine, text-decorations-in-effect, text-emphasis-color, text-emphasis-position, text-emphasis-style, text-fill-color, text-orientation, text-security, text-stroke-color, text-stroke-width, transform, transition, transform-origin, transform-style, transition-delay, transition-duration, transition-property, transition-timing-function, user-drag, user-modify, user-select, writing-mode, svg-shadow, box-sizing, border-radius',
9691 'moz': 'animation-delay, animation-direction, animation-duration, animation-fill-mode, animation-iteration-count, animation-name, animation-play-state, animation-timing-function, appearance, backface-visibility, background-inline-policy, binding, border-bottom-colors, border-image, border-left-colors, border-right-colors, border-top-colors, box-align, box-direction, box-flex, box-ordinal-group, box-orient, box-pack, box-shadow, box-sizing, column-count, column-gap, column-rule-color, column-rule-style, column-rule-width, column-width, float-edge, font-feature-settings, font-language-override, force-broken-image-icon, hyphens, image-region, orient, outline-radius-bottomleft, outline-radius-bottomright, outline-radius-topleft, outline-radius-topright, perspective, perspective-origin, stack-sizing, tab-size, text-blink, text-decoration-color, text-decoration-line, text-decoration-style, text-size-adjust, transform, transform-origin, transform-style, transition, transition-delay, transition-duration, transition-property, transition-timing-function, user-focus, user-input, user-modify, user-select, window-shadow, background-clip, border-radius',
9692 'ms': 'accelerator, backface-visibility, background-position-x, background-position-y, behavior, block-progression, box-align, box-direction, box-flex, box-line-progression, box-lines, box-ordinal-group, box-orient, box-pack, content-zoom-boundary, content-zoom-boundary-max, content-zoom-boundary-min, content-zoom-chaining, content-zoom-snap, content-zoom-snap-points, content-zoom-snap-type, content-zooming, filter, flow-from, flow-into, font-feature-settings, grid-column, grid-column-align, grid-column-span, grid-columns, grid-layer, grid-row, grid-row-align, grid-row-span, grid-rows, high-contrast-adjust, hyphenate-limit-chars, hyphenate-limit-lines, hyphenate-limit-zone, hyphens, ime-mode, interpolation-mode, layout-flow, layout-grid, layout-grid-char, layout-grid-line, layout-grid-mode, layout-grid-type, line-break, overflow-style, perspective, perspective-origin, perspective-origin-x, perspective-origin-y, scroll-boundary, scroll-boundary-bottom, scroll-boundary-left, scroll-boundary-right, scroll-boundary-top, scroll-chaining, scroll-rails, scroll-snap-points-x, scroll-snap-points-y, scroll-snap-type, scroll-snap-x, scroll-snap-y, scrollbar-arrow-color, scrollbar-base-color, scrollbar-darkshadow-color, scrollbar-face-color, scrollbar-highlight-color, scrollbar-shadow-color, scrollbar-track-color, text-align-last, text-autospace, text-justify, text-kashida-space, text-overflow, text-size-adjust, text-underline-position, touch-action, transform, transform-origin, transform-origin-x, transform-origin-y, transform-origin-z, transform-style, transition, transition-delay, transition-duration, transition-property, transition-timing-function, user-select, word-break, word-wrap, wrap-flow, wrap-margin, wrap-through, writing-mode',
9693 'o': 'dashboard-region, animation, animation-delay, animation-direction, animation-duration, animation-fill-mode, animation-iteration-count, animation-name, animation-play-state, animation-timing-function, border-image, link, link-source, object-fit, object-position, tab-size, table-baseline, transform, transform-origin, transition, transition-delay, transition-duration, transition-property, transition-timing-function, accesskey, input-format, input-required, marquee-dir, marquee-loop, marquee-speed, marquee-style'
9694 };
9695
9696 _.each(props, function(v, k) {
9697 prefs.define('css.' + k + 'Properties', v, descTemplate({vendor: k}));
9698 prefs.define('css.' + k + 'PropertiesAddon', '', descAddonTemplate({vendor: k}));
9699 });
9700
9701 prefs.define('css.unitlessProperties', 'z-index, line-height, opacity, font-weight, zoom',
9702 'The list of properties whose values ​​must not contain units.');
9703
9704 prefs.define('css.intUnit', 'px', 'Default unit for integer values');
9705 prefs.define('css.floatUnit', 'em', 'Default unit for float values');
9706
9707 prefs.define('css.keywords', 'auto, inherit',
9708 'A comma-separated list of valid keywords that can be used in CSS abbreviations.');
9709
9710 prefs.define('css.keywordAliases', 'a:auto, i:inherit',
9711 'A comma-separated list of keyword aliases, used in CSS abbreviation. '
9712 + 'Each alias should be defined as <code>alias:keyword_name</code>.');
9713
9714 prefs.define('css.unitAliases', 'e:em, p:%, x:ex, r:rem',
9715 'A comma-separated list of unit aliases, used in CSS abbreviation. '
9716 + 'Each alias should be defined as <code>alias:unit_value</code>.');
9717
9718
9719 function isNumeric(ch) {
9720 var code = ch && ch.charCodeAt(0);
9721 return (ch && ch == '.' || (code > 47 && code < 58));
9722 }
9723
9724 /**
9725 * Check if provided snippet contains only one CSS property and value.
9726 * @param {String} snippet
9727 * @returns {Boolean}
9728 */
9729 function isSingleProperty(snippet) {
9730 var utils = require('utils');
9731 snippet = utils.trim(snippet);
9732
9733 // check if it doesn't contain a comment and a newline
9734 if (~snippet.indexOf('/*') || /[\n\r]/.test(snippet)) {
9735 return false;
9736 }
9737
9738 // check if it's a valid snippet definition
9739 if (!/^[a-z0-9\-]+\s*\:/i.test(snippet)) {
9740 return false;
9741 }
9742
9743 snippet = require('tabStops').processText(snippet, {
9744 replaceCarets: true,
9745 tabstop: function() {
9746 return 'value';
9747 }
9748 });
9749
9750 return snippet.split(':').length == 2;
9751 }
9752
9753 function getKeyword(name) {
9754 var aliases = prefs.getDict('css.keywordAliases');
9755 return name in aliases ? aliases[name] : name;
9756 }
9757
9758 function getUnit(name) {
9759 var aliases = prefs.getDict('css.unitAliases');
9760 return name in aliases ? aliases[name] : name;
9761 }
9762
9763 function isValidKeyword(keyword) {
9764 return _.include(prefs.getArray('css.keywords'), getKeyword(keyword));
9765 }
9766
9767 /**
9768 * Split snippet into a CSS property-value pair
9769 * @param {String} snippet
9770 */
9771 function splitSnippet(snippet) {
9772 var utils = require('utils');
9773 snippet = utils.trim(snippet);
9774 if (snippet.indexOf(':') == -1) {
9775 return {
9776 name: snippet,
9777 value: defaultValue
9778 };
9779 }
9780
9781 var pair = snippet.split(':');
9782
9783 return {
9784 name: utils.trim(pair.shift()),
9785 // replace ${0} tabstop to produce valid vendor-prefixed values
9786 // where possible
9787 value: utils.trim(pair.join(':')).replace(/^(\$\{0\}|\$0)(\s*;?)$/, '${1}$2')
9788 };
9789 }
9790
9791 /**
9792 * Check if passed CSS property support specified vendor prefix
9793 * @param {String} property
9794 * @param {String} prefix
9795 */
9796 function hasPrefix(property, prefix) {
9797 var info = vendorPrefixes[prefix];
9798
9799 if (!info)
9800 info = _.find(vendorPrefixes, function(data) {
9801 return data.prefix == prefix;
9802 });
9803
9804 return info && info.supports && _.include(info.supports, property);
9805 }
9806
9807 /**
9808 * Search for a list of supported prefixes for CSS property. This list
9809 * is used to generate all-prefixed snippet
9810 * @param {String} property CSS property name
9811 * @returns {Array}
9812 */
9813 function findPrefixes(property, noAutofill) {
9814 var result = [];
9815 _.each(vendorPrefixes, function(obj, prefix) {
9816 if (hasPrefix(property, prefix)) {
9817 result.push(prefix);
9818 }
9819 });
9820
9821 if (!result.length && !noAutofill) {
9822 // add all non-obsolete prefixes
9823 _.each(vendorPrefixes, function(obj, prefix) {
9824 if (!obj.obsolete)
9825 result.push(prefix);
9826 });
9827 }
9828
9829 return result;
9830 }
9831
9832 function addPrefix(name, obj) {
9833 if (_.isString(obj))
9834 obj = {prefix: obj};
9835
9836 vendorPrefixes[name] = _.extend({}, prefixObj, obj);
9837 }
9838
9839 function getSyntaxPreference(name, syntax) {
9840 if (syntax) {
9841 var val = prefs.get(syntax + '.' + name);
9842 if (!_.isUndefined(val))
9843 return val;
9844 }
9845
9846 return prefs.get('css.' + name);
9847 }
9848
9849 /**
9850 * Format CSS property according to current syntax dialect
9851 * @param {String} property
9852 * @param {String} syntax
9853 * @returns {String}
9854 */
9855 function formatProperty(property, syntax) {
9856 var ix = property.indexOf(':');
9857 property = property.substring(0, ix).replace(/\s+$/, '')
9858 + getSyntaxPreference('valueSeparator', syntax)
9859 + require('utils').trim(property.substring(ix + 1));
9860
9861 return property.replace(/\s*;\s*$/, getSyntaxPreference('propertyEnd', syntax));
9862 }
9863
9864 /**
9865 * Transforms snippet value if required. For example, this transformation
9866 * may add <i>!important</i> declaration to CSS property
9867 * @param {String} snippet
9868 * @param {Boolean} isImportant
9869 * @returns {String}
9870 */
9871 function transformSnippet(snippet, isImportant, syntax) {
9872 if (!_.isString(snippet))
9873 snippet = snippet.data;
9874
9875 if (!isSingleProperty(snippet))
9876 return snippet;
9877
9878 if (isImportant) {
9879 if (~snippet.indexOf(';')) {
9880 snippet = snippet.split(';').join(' !important;');
9881 } else {
9882 snippet += ' !important';
9883 }
9884 }
9885
9886 return formatProperty(snippet, syntax);
9887
9888 // format value separator
9889 var ix = snippet.indexOf(':');
9890 snippet = snippet.substring(0, ix).replace(/\s+$/, '')
9891 + prefs.get('css.valueSeparator')
9892 + require('utils').trim(snippet.substring(ix + 1));
9893
9894 return snippet;
9895 }
9896
9897 /**
9898 * Helper function that parses comma-separated list of elements into array
9899 * @param {String} list
9900 * @returns {Array}
9901 */
9902 function parseList(list) {
9903 var result = _.map((list || '').split(','), require('utils').trim);
9904 return result.length ? result : null;
9905 }
9906
9907 function getProperties(key) {
9908 var list = prefs.getArray(key);
9909 _.each(prefs.getArray(key + 'Addon'), function(prop) {
9910 if (prop.charAt(0) == '-') {
9911 list = _.without(list, prop.substr(1));
9912 } else {
9913 if (prop.charAt(0) == '+')
9914 prop = prop.substr(1);
9915
9916 list.push(prop);
9917 }
9918 });
9919
9920 return list;
9921 }
9922
9923 addPrefix('w', {
9924 prefix: 'webkit',
9925 supports: getProperties('css.webkitProperties')
9926 });
9927 addPrefix('m', {
9928 prefix: 'moz',
9929 supports: getProperties('css.mozProperties')
9930 });
9931 addPrefix('s', {
9932 prefix: 'ms',
9933 supports: getProperties('css.msProperties')
9934 });
9935 addPrefix('o', {
9936 prefix: 'o',
9937 supports: getProperties('css.oProperties')
9938 });
9939
9940 // I think nobody uses it
9941 // addPrefix('k', {
9942 // prefix: 'khtml',
9943 // obsolete: true
9944 // });
9945
9946 var cssSyntaxes = ['css', 'less', 'sass', 'scss', 'stylus'];
9947
9948 /**
9949 * XXX register resolver
9950 * @param {TreeNode} node
9951 * @param {String} syntax
9952 */
9953 require('resources').addResolver(function(node, syntax) {
9954 if (_.include(cssSyntaxes, syntax) && node.isElement()) {
9955 return module.expandToSnippet(node.abbreviation, syntax);
9956 }
9957
9958 return null;
9959 });
9960
9961 var ea = require('expandAbbreviation');
9962 /**
9963 * For CSS-like syntaxes, we need to handle a special use case. Some editors
9964 * (like Sublime Text 2) may insert semicolons automatically when user types
9965 * abbreviation. After expansion, user receives a double semicolon. This
9966 * handler automatically removes semicolon from generated content in such cases.
9967 * @param {IEmmetEditor} editor
9968 * @param {String} syntax
9969 * @param {String} profile
9970 */
9971 ea.addHandler(function(editor, syntax, profile) {
9972 if (!_.include(cssSyntaxes, syntax)) {
9973 return false;
9974 }
9975
9976 var caretPos = editor.getSelectionRange().end;
9977 var abbr = ea.findAbbreviation(editor);
9978
9979 if (abbr) {
9980 var content = emmet.expandAbbreviation(abbr, syntax, profile);
9981 if (content) {
9982 var replaceFrom = caretPos - abbr.length;
9983 var replaceTo = caretPos;
9984 if (editor.getContent().charAt(caretPos) == ';' && content.charAt(content.length - 1) == ';') {
9985 replaceTo++;
9986 }
9987
9988 editor.replaceContent(content, replaceFrom, replaceTo);
9989 return true;
9990 }
9991 }
9992
9993 return false;
9994 });
9995
9996 return module = {
9997 /**
9998 * Adds vendor prefix
9999 * @param {String} name One-character prefix name
10000 * @param {Object} obj Object describing vendor prefix
10001 * @memberOf cssResolver
10002 */
10003 addPrefix: addPrefix,
10004
10005 /**
10006 * Check if passed CSS property supports specified vendor prefix
10007 * @param {String} property
10008 * @param {String} prefix
10009 */
10010 supportsPrefix: hasPrefix,
10011
10012 /**
10013 * Returns prefixed version of passed CSS property, only if this
10014 * property supports such prefix
10015 * @param {String} property
10016 * @param {String} prefix
10017 * @returns
10018 */
10019 prefixed: function(property, prefix) {
10020 return hasPrefix(property, prefix)
10021 ? '-' + prefix + '-' + property
10022 : property;
10023 },
10024
10025 /**
10026 * Returns list of all registered vendor prefixes
10027 * @returns {Array}
10028 */
10029 listPrefixes: function() {
10030 return _.map(vendorPrefixes, function(obj) {
10031 return obj.prefix;
10032 });
10033 },
10034
10035 /**
10036 * Returns object describing vendor prefix
10037 * @param {String} name
10038 * @returns {Object}
10039 */
10040 getPrefix: function(name) {
10041 return vendorPrefixes[name];
10042 },
10043
10044 /**
10045 * Removes prefix object
10046 * @param {String} name
10047 */
10048 removePrefix: function(name) {
10049 if (name in vendorPrefixes)
10050 delete vendorPrefixes[name];
10051 },
10052
10053 /**
10054 * Extract vendor prefixes from abbreviation
10055 * @param {String} abbr
10056 * @returns {Object} Object containing array of prefixes and clean
10057 * abbreviation name
10058 */
10059 extractPrefixes: function(abbr) {
10060 if (abbr.charAt(0) != '-') {
10061 return {
10062 property: abbr,
10063 prefixes: null
10064 };
10065 }
10066
10067 // abbreviation may either contain sequence of one-character prefixes
10068 // or just dash, meaning that user wants to produce all possible
10069 // prefixed properties
10070 var i = 1, il = abbr.length, ch;
10071 var prefixes = [];
10072
10073 while (i < il) {
10074 ch = abbr.charAt(i);
10075 if (ch == '-') {
10076 // end-sequence character found, stop searching
10077 i++;
10078 break;
10079 }
10080
10081 if (ch in vendorPrefixes) {
10082 prefixes.push(ch);
10083 } else {
10084 // no prefix found, meaning user want to produce all
10085 // vendor-prefixed properties
10086 prefixes.length = 0;
10087 i = 1;
10088 break;
10089 }
10090
10091 i++;
10092 }
10093
10094 // reached end of abbreviation and no property name left
10095 if (i == il -1) {
10096 i = 1;
10097 prefixes.length = 1;
10098 }
10099
10100 return {
10101 property: abbr.substring(i),
10102 prefixes: prefixes.length ? prefixes : 'all'
10103 };
10104 },
10105
10106 /**
10107 * Search for value substring in abbreviation
10108 * @param {String} abbr
10109 * @returns {String} Value substring
10110 */
10111 findValuesInAbbreviation: function(abbr, syntax) {
10112 syntax = syntax || 'css';
10113
10114 var i = 0, il = abbr.length, value = '', ch;
10115 while (i < il) {
10116 ch = abbr.charAt(i);
10117 if (isNumeric(ch) || (ch == '-' && isNumeric(abbr.charAt(i + 1)))) {
10118 value = abbr.substring(i);
10119 break;
10120 }
10121
10122 i++;
10123 }
10124
10125 // try to find keywords in abbreviation
10126 var property = abbr.substring(0, abbr.length - value.length);
10127 var res = require('resources');
10128 var keywords = [];
10129 // try to extract some commonly-used properties
10130 while (~property.indexOf('-') && !res.findSnippet(syntax, property)) {
10131 var parts = property.split('-');
10132 var lastPart = parts.pop();
10133 if (!isValidKeyword(lastPart)) {
10134 break;
10135 }
10136
10137 keywords.unshift(lastPart);
10138 property = parts.join('-');
10139 }
10140
10141 return keywords.join('-') + value;
10142 },
10143
10144 /**
10145 * Parses values defined in abbreviations
10146 * @param {String} abbrValues Values part of abbreviations (can be
10147 * extracted with <code>findValuesInAbbreviation</code>)
10148 * @returns {Array}
10149 */
10150 parseValues: function(abbrValues) {
10151 var valueStack = '';
10152 var values = [];
10153 var i = 0, il = abbrValues.length, ch, nextCh;
10154
10155 while (i < il) {
10156 ch = abbrValues.charAt(i);
10157 if (ch == '-' && valueStack) {
10158 // next value found
10159 values.push(valueStack);
10160 valueStack = '';
10161 i++;
10162 continue;
10163 }
10164
10165 valueStack += ch;
10166 i++;
10167
10168 nextCh = abbrValues.charAt(i);
10169 if (ch != '-' && !isNumeric(ch) && (isNumeric(nextCh) || nextCh == '-')) {
10170 if (isValidKeyword(valueStack)) {
10171 i++;
10172 }
10173 values.push(valueStack);
10174 valueStack = '';
10175 }
10176 }
10177
10178 if (valueStack) {
10179 values.push(valueStack);
10180 }
10181
10182 return _.map(values, getKeyword);
10183 },
10184
10185 /**
10186 * Extracts values from abbreviation
10187 * @param {String} abbr
10188 * @returns {Object} Object containing array of values and clean
10189 * abbreviation name
10190 */
10191 extractValues: function(abbr) {
10192 // search for value start
10193 var abbrValues = this.findValuesInAbbreviation(abbr);
10194 if (!abbrValues) {
10195 return {
10196 property: abbr,
10197 values: null
10198 };
10199 }
10200
10201 return {
10202 property: abbr.substring(0, abbr.length - abbrValues.length).replace(/-$/, ''),
10203 values: this.parseValues(abbrValues)
10204 };
10205 },
10206
10207 /**
10208 * Normalizes value, defined in abbreviation.
10209 * @param {String} value
10210 * @param {String} property
10211 * @returns {String}
10212 */
10213 normalizeValue: function(value, property) {
10214 property = (property || '').toLowerCase();
10215 var unitlessProps = prefs.getArray('css.unitlessProperties');
10216 return value.replace(/^(\-?[0-9\.]+)([a-z]*)$/, function(str, val, unit) {
10217 if (!unit && (val == '0' || _.include(unitlessProps, property)))
10218 return val;
10219
10220 if (!unit)
10221 return val + prefs.get(~val.indexOf('.') ? 'css.floatUnit' : 'css.intUnit');
10222
10223 return val + getUnit(unit);
10224 });
10225 },
10226
10227 /**
10228 * Expands abbreviation into a snippet
10229 * @param {String} abbr Abbreviation name to expand
10230 * @param {String} value Abbreviation value
10231 * @param {String} syntax Currect syntax or dialect. Default is 'css'
10232 * @returns {Object} Array of CSS properties and values or predefined
10233 * snippet (string or element)
10234 */
10235 expand: function(abbr, value, syntax) {
10236 syntax = syntax || 'css';
10237 var resources = require('resources');
10238 var autoInsertPrefixes = prefs.get('css.autoInsertVendorPrefixes');
10239
10240 // check if snippet should be transformed to !important
10241 var isImportant;
10242 if (isImportant = /^(.+)\!$/.test(abbr)) {
10243 abbr = RegExp.$1;
10244 }
10245
10246 // check if we have abbreviated resource
10247 var snippet = resources.findSnippet(syntax, abbr);
10248 if (snippet && !autoInsertPrefixes) {
10249 return transformSnippet(snippet, isImportant, syntax);
10250 }
10251
10252 // no abbreviated resource, parse abbreviation
10253 var prefixData = this.extractPrefixes(abbr);
10254 var valuesData = this.extractValues(prefixData.property);
10255 var abbrData = _.extend(prefixData, valuesData);
10256
10257 snippet = resources.findSnippet(syntax, abbrData.property);
10258
10259 // fallback to some old snippets like m:a
10260 if (!snippet && ~abbrData.property.indexOf(':')) {
10261 var parts = abbrData.property.split(':');
10262 var propertyName = parts.shift();
10263 snippet = resources.findSnippet(syntax, propertyName) || propertyName;
10264 abbrData.values = this.parseValues(parts.join(':'));
10265 }
10266
10267 if (!snippet) {
10268 snippet = abbrData.property + ':' + defaultValue;
10269 } else if (!_.isString(snippet)) {
10270 snippet = snippet.data;
10271 }
10272
10273 if (!isSingleProperty(snippet)) {
10274 return snippet;
10275 }
10276
10277 var snippetObj = splitSnippet(snippet);
10278 var result = [];
10279 if (!value && abbrData.values) {
10280 value = _.map(abbrData.values, function(val) {
10281 return this.normalizeValue(val, snippetObj.name);
10282 }, this).join(' ') + ';';
10283 }
10284
10285 snippetObj.value = value || snippetObj.value;
10286
10287 var prefixes = abbrData.prefixes == 'all' || (!abbrData.prefixes && autoInsertPrefixes)
10288 ? findPrefixes(snippetObj.name, autoInsertPrefixes && abbrData.prefixes != 'all')
10289 : abbrData.prefixes;
10290
10291 _.each(prefixes, function(p) {
10292 if (p in vendorPrefixes) {
10293 result.push(transformSnippet(
10294 vendorPrefixes[p].transformName(snippetObj.name)
10295 + ':' + snippetObj.value,
10296 isImportant, syntax));
10297
10298 }
10299 });
10300
10301 // put the original property
10302 result.push(transformSnippet(snippetObj.name + ':' + snippetObj.value, isImportant, syntax));
10303
10304 return result;
10305 },
10306
10307 /**
10308 * Same as <code>expand</code> method but transforms output into a
10309 * Emmet snippet
10310 * @param {String} abbr
10311 * @param {String} syntax
10312 * @returns {String}
10313 */
10314 expandToSnippet: function(abbr, syntax) {
10315 var snippet = this.expand(abbr, null, syntax);
10316 if (_.isArray(snippet)) {
10317 return snippet.join('\n');
10318 }
10319
10320 if (!_.isString(snippet))
10321 return snippet.data;
10322
10323 return String(snippet);
10324 },
10325
10326 getSyntaxPreference: getSyntaxPreference
10327 };
10328 });
10329 /**
10330 * 'Expand Abbreviation' handler that parses gradient definition from under
10331 * cursor and updates CSS rule with vendor-prefixed values.
10332 *
10333 * @memberOf __cssGradientHandlerDefine
10334 * @param {Function} require
10335 * @param {Underscore} _
10336 */
10337 emmet.define('cssGradient', function(require, _) {
10338 var defaultLinearDirections = ['top', 'to bottom', '0deg'];
10339 /** Back-reference to current module */
10340 var module = null;
10341
10342 var cssSyntaxes = ['css', 'less', 'sass', 'scss', 'stylus', 'styl'];
10343
10344 var reDeg = /\d+deg/i;
10345 var reKeyword = /top|bottom|left|right/i;
10346
10347 // XXX define preferences
10348 /** @type preferences */
10349 var prefs = require('preferences');
10350 prefs.define('css.gradient.prefixes', 'webkit, moz, o',
10351 'A comma-separated list of vendor-prefixes for which values should '
10352 + 'be generated.');
10353
10354 prefs.define('css.gradient.oldWebkit', true,
10355 'Generate gradient definition for old Webkit implementations');
10356
10357 prefs.define('css.gradient.omitDefaultDirection', true,
10358 'Do not output default direction definition in generated gradients.');
10359
10360 prefs.define('css.gradient.defaultProperty', 'background-image',
10361 'When gradient expanded outside CSS value context, it will produce '
10362 + 'properties with this name.');
10363
10364 prefs.define('css.gradient.fallback', false,
10365 'With this option enabled, CSS gradient generator will produce '
10366 + '<code>background-color</code> property with gradient first color '
10367 + 'as fallback for old browsers.');
10368
10369 function normalizeSpace(str) {
10370 return require('utils').trim(str).replace(/\s+/g, ' ');
10371 }
10372
10373 /**
10374 * Parses linear gradient definition
10375 * @param {String}
10376 */
10377 function parseLinearGradient(gradient) {
10378 var direction = defaultLinearDirections[0];
10379
10380 // extract tokens
10381 /** @type StringStream */
10382 var stream = require('stringStream').create(require('utils').trim(gradient));
10383 var colorStops = [], ch;
10384 while (ch = stream.next()) {
10385 if (stream.peek() == ',') {
10386 colorStops.push(stream.current());
10387 stream.next();
10388 stream.eatSpace();
10389 stream.start = stream.pos;
10390 } else if (ch == '(') { // color definition, like 'rgb(0,0,0)'
10391 stream.skipTo(')');
10392 }
10393 }
10394
10395 // add last token
10396 colorStops.push(stream.current());
10397 colorStops = _.compact(_.map(colorStops, normalizeSpace));
10398
10399 if (!colorStops.length)
10400 return null;
10401
10402 // let's see if the first color stop is actually a direction
10403 if (reDeg.test(colorStops[0]) || reKeyword.test(colorStops[0])) {
10404 direction = colorStops.shift();
10405 }
10406
10407 return {
10408 type: 'linear',
10409 direction: direction,
10410 colorStops: _.map(colorStops, parseColorStop)
10411 };
10412 }
10413
10414 /**
10415 * Parses color stop definition
10416 * @param {String} colorStop
10417 * @returns {Object}
10418 */
10419 function parseColorStop(colorStop) {
10420 colorStop = normalizeSpace(colorStop);
10421
10422 // find color declaration
10423 // first, try complex color declaration, like rgb(0,0,0)
10424 var color = null;
10425 colorStop = colorStop.replace(/^(\w+\(.+?\))\s*/, function(str, c) {
10426 color = c;
10427 return '';
10428 });
10429
10430 if (!color) {
10431 // try simple declaration, like yellow, #fco, #ffffff, etc.
10432 var parts = colorStop.split(' ');
10433 color = parts[0];
10434 colorStop = parts[1] || '';
10435 }
10436
10437 var result = {
10438 color: color
10439 };
10440
10441 if (colorStop) {
10442 // there's position in color stop definition
10443 colorStop.replace(/^(\-?[\d\.]+)([a-z%]+)?$/, function(str, pos, unit) {
10444 result.position = pos;
10445 if (~pos.indexOf('.')) {
10446 unit = '';
10447 } else if (!unit) {
10448 unit = '%';
10449 }
10450
10451 if (unit)
10452 result.unit = unit;
10453 });
10454 }
10455
10456 return result;
10457 }
10458
10459 /**
10460 * Fills-out implied positions in color-stops. This function is useful for
10461 * old Webkit gradient definitions
10462 */
10463 function fillImpliedPositions(colorStops) {
10464 var from = 0;
10465
10466 _.each(colorStops, function(cs, i) {
10467 // make sure that first and last positions are defined
10468 if (!i)
10469 return cs.position = cs.position || 0;
10470
10471 if (i == colorStops.length - 1 && !('position' in cs))
10472 cs.position = 1;
10473
10474 if ('position' in cs) {
10475 var start = colorStops[from].position || 0;
10476 var step = (cs.position - start) / (i - from);
10477 _.each(colorStops.slice(from, i), function(cs2, j) {
10478 cs2.position = start + step * j;
10479 });
10480
10481 from = i;
10482 }
10483 });
10484 }
10485
10486 /**
10487 * Returns textual version of direction expressed in degrees
10488 * @param {String} direction
10489 * @returns {String}
10490 */
10491 function textualDirection(direction) {
10492 var angle = parseFloat(direction);
10493
10494 if(!_.isNaN(angle)) {
10495 switch(angle % 360) {
10496 case 0: return 'left';
10497 case 90: return 'bottom';
10498 case 180: return 'right';
10499 case 240: return 'top';
10500 }
10501 }
10502
10503 return direction;
10504 }
10505
10506 /**
10507 * Creates direction definition for old Webkit gradients
10508 * @param {String} direction
10509 * @returns {String}
10510 */
10511 function oldWebkitDirection(direction) {
10512 direction = textualDirection(direction);
10513
10514 if(reDeg.test(direction))
10515 throw "The direction is an angle that can’t be converted.";
10516
10517 var v = function(pos) {
10518 return ~direction.indexOf(pos) ? '100%' : '0';
10519 };
10520
10521 return v('right') + ' ' + v('bottom') + ', ' + v('left') + ' ' + v('top');
10522 }
10523
10524 function getPrefixedNames(name) {
10525 var prefixes = prefs.getArray('css.gradient.prefixes');
10526 var names = _.map(prefixes, function(p) {
10527 return '-' + p + '-' + name;
10528 });
10529 names.push(name);
10530
10531 return names;
10532 }
10533
10534 /**
10535 * Returns list of CSS properties with gradient
10536 * @param {Object} gradient
10537 * @param {String} propertyName Original CSS property name
10538 * @returns {Array}
10539 */
10540 function getPropertiesForGradient(gradient, propertyName) {
10541 var props = [];
10542 var css = require('cssResolver');
10543
10544 if (prefs.get('css.gradient.fallback') && ~propertyName.toLowerCase().indexOf('background')) {
10545 props.push({
10546 name: 'background-color',
10547 value: '${1:' + gradient.colorStops[0].color + '}'
10548 });
10549 }
10550
10551 _.each(prefs.getArray('css.gradient.prefixes'), function(prefix) {
10552 var name = css.prefixed(propertyName, prefix);
10553 if (prefix == 'webkit' && prefs.get('css.gradient.oldWebkit')) {
10554 try {
10555 props.push({
10556 name: name,
10557 value: module.oldWebkitLinearGradient(gradient)
10558 });
10559 } catch(e) {}
10560 }
10561
10562 props.push({
10563 name: name,
10564 value: module.toString(gradient, prefix)
10565 });
10566 });
10567
10568 return props.sort(function(a, b) {
10569 return b.name.length - a.name.length;
10570 });
10571 }
10572
10573 /**
10574 * Pastes gradient definition into CSS rule with correct vendor-prefixes
10575 * @param {EditElement} property Matched CSS property
10576 * @param {Object} gradient Parsed gradient
10577 * @param {Range} valueRange If passed, only this range within property
10578 * value will be replaced with gradient. Otherwise, full value will be
10579 * replaced
10580 */
10581 function pasteGradient(property, gradient, valueRange) {
10582 var rule = property.parent;
10583 var utils = require('utils');
10584
10585 // first, remove all properties within CSS rule with the same name and
10586 // gradient definition
10587 _.each(rule.getAll(getPrefixedNames(property.name())), function(item) {
10588 if (item != property && /gradient/i.test(item.value())) {
10589 rule.remove(item);
10590 }
10591 });
10592
10593 var value = property.value();
10594 if (!valueRange)
10595 valueRange = require('range').create(0, property.value());
10596
10597 var val = function(v) {
10598 return utils.replaceSubstring(value, v, valueRange);
10599 };
10600
10601 // put vanilla-clean gradient definition into current rule
10602 property.value(val(module.toString(gradient)) + '${2}');
10603
10604 // create list of properties to insert
10605 var propsToInsert = getPropertiesForGradient(gradient, property.name());
10606
10607 // put vendor-prefixed definitions before current rule
10608 _.each(propsToInsert, function(prop) {
10609 rule.add(prop.name, prop.value, rule.indexOf(property));
10610 });
10611 }
10612
10613 /**
10614 * Search for gradient definition inside CSS property value
10615 */
10616 function findGradient(cssProp) {
10617 var value = cssProp.value();
10618 var gradient = null;
10619 var matchedPart = _.find(cssProp.valueParts(), function(part) {
10620 return gradient = module.parse(part.substring(value));
10621 });
10622
10623 if (matchedPart && gradient) {
10624 return {
10625 gradient: gradient,
10626 valueRange: matchedPart
10627 };
10628 }
10629
10630 return null;
10631 }
10632
10633 /**
10634 * Tries to expand gradient outside CSS value
10635 * @param {IEmmetEditor} editor
10636 * @param {String} syntax
10637 */
10638 function expandGradientOutsideValue(editor, syntax) {
10639 var propertyName = prefs.get('css.gradient.defaultProperty');
10640
10641 if (!propertyName)
10642 return false;
10643
10644 // assuming that gradient definition is written on new line,
10645 // do a simplified parsing
10646 var content = String(editor.getContent());
10647 /** @type Range */
10648 var lineRange = require('range').create(editor.getCurrentLineRange());
10649
10650 // get line content and adjust range with padding
10651 var line = lineRange.substring(content)
10652 .replace(/^\s+/, function(pad) {
10653 lineRange.start += pad.length;
10654 return '';
10655 })
10656 .replace(/\s+$/, function(pad) {
10657 lineRange.end -= pad.length;
10658 return '';
10659 });
10660
10661 var css = require('cssResolver');
10662 var gradient = module.parse(line);
10663 if (gradient) {
10664 var props = getPropertiesForGradient(gradient, propertyName);
10665 props.push({
10666 name: propertyName,
10667 value: module.toString(gradient) + '${2}'
10668 });
10669
10670 var sep = css.getSyntaxPreference('valueSeparator', syntax);
10671 var end = css.getSyntaxPreference('propertyEnd', syntax);
10672 props = _.map(props, function(item) {
10673 return item.name + sep + item.value + end;
10674 });
10675
10676 editor.replaceContent(props.join('\n'), lineRange.start, lineRange.end);
10677 return true;
10678 }
10679
10680 return false;
10681 }
10682
10683 /**
10684 * Search for gradient definition inside CSS value under cursor
10685 * @param {String} content
10686 * @param {Number} pos
10687 * @returns {Object}
10688 */
10689 function findGradientFromPosition(content, pos) {
10690 var cssProp = null;
10691 /** @type EditContainer */
10692 var cssRule = require('cssEditTree').parseFromPosition(content, pos, true);
10693
10694 if (cssRule) {
10695 cssProp = cssRule.itemFromPosition(pos, true);
10696 if (!cssProp) {
10697 // in case user just started writing CSS property
10698 // and didn't include semicolon–try another approach
10699 cssProp = _.find(cssRule.list(), function(elem) {
10700 return elem.range(true).end == pos;
10701 });
10702 }
10703 }
10704
10705 return {
10706 rule: cssRule,
10707 property: cssProp
10708 };
10709 }
10710
10711 // XXX register expand abbreviation handler
10712 /**
10713 * @param {IEmmetEditor} editor
10714 * @param {String} syntax
10715 * @param {String} profile
10716 */
10717 require('expandAbbreviation').addHandler(function(editor, syntax, profile) {
10718 var info = require('editorUtils').outputInfo(editor, syntax, profile);
10719 if (!_.include(cssSyntaxes, info.syntax))
10720 return false;
10721
10722 // let's see if we are expanding gradient definition
10723 var caret = editor.getCaretPos();
10724 var content = info.content;
10725 var css = findGradientFromPosition(content, caret);
10726
10727 if (css.property) {
10728 // make sure that caret is inside property value with gradient
10729 // definition
10730 var g = findGradient(css.property);
10731 if (g) {
10732 var ruleStart = css.rule.options.offset || 0;
10733 var ruleEnd = ruleStart + css.rule.toString().length;
10734
10735 // Handle special case:
10736 // user wrote gradient definition between existing CSS
10737 // properties and did not finished it with semicolon.
10738 // In this case, we have semicolon right after gradient
10739 // definition and re-parse rule again
10740 if (/[\n\r]/.test(css.property.value())) {
10741 // insert semicolon at the end of gradient definition
10742 var insertPos = css.property.valueRange(true).start + g.valueRange.end;
10743 content = require('utils').replaceSubstring(content, ';', insertPos);
10744 var newCss = findGradientFromPosition(content, caret);
10745 if (newCss.property) {
10746 g = findGradient(newCss.property);
10747 css = newCss;
10748 }
10749 }
10750
10751 // make sure current property has terminating semicolon
10752 css.property.end(';');
10753
10754 pasteGradient(css.property, g.gradient, g.valueRange);
10755 editor.replaceContent(css.rule.toString(), ruleStart, ruleEnd, true);
10756 return true;
10757 }
10758 }
10759
10760 return expandGradientOutsideValue(editor, syntax);
10761 });
10762
10763 // XXX register "Reflect CSS Value" action delegate
10764 /**
10765 * @param {EditElement} property
10766 */
10767 require('reflectCSSValue').addHandler(function(property) {
10768 var utils = require('utils');
10769
10770 var g = findGradient(property);
10771 if (!g)
10772 return false;
10773
10774 var value = property.value();
10775 var val = function(v) {
10776 return utils.replaceSubstring(value, v, g.valueRange);
10777 };
10778
10779 // reflect value for properties with the same name
10780 _.each(property.parent.getAll(getPrefixedNames(property.name())), function(prop) {
10781 if (prop === property)
10782 return;
10783
10784 // check if property value starts with gradient definition
10785 var m = prop.value().match(/^\s*(\-([a-z]+)\-)?linear\-gradient/);
10786 if (m) {
10787 prop.value(val(module.toString(g.gradient, m[2] || '')));
10788 } else if (m = prop.value().match(/\s*\-webkit\-gradient/)) {
10789 // old webkit gradient definition
10790 prop.value(val(module.oldWebkitLinearGradient(g.gradient)));
10791 }
10792 });
10793
10794 return true;
10795 });
10796
10797 return module = {
10798 /**
10799 * Parses gradient definition
10800 * @param {String} gradient
10801 * @returns {Object}
10802 */
10803 parse: function(gradient) {
10804 var result = null;
10805 require('utils').trim(gradient).replace(/^([\w\-]+)\((.+?)\)$/, function(str, type, definition) {
10806 // remove vendor prefix
10807 type = type.toLowerCase().replace(/^\-[a-z]+\-/, '');
10808 if (type == 'linear-gradient' || type == 'lg') {
10809 result = parseLinearGradient(definition);
10810 return '';
10811 }
10812
10813 return str;
10814 });
10815
10816 return result;
10817 },
10818
10819 /**
10820 * Produces linear gradient definition used in early Webkit
10821 * implementations
10822 * @param {Object} gradient Parsed gradient
10823 * @returns {String}
10824 */
10825 oldWebkitLinearGradient: function(gradient) {
10826 if (_.isString(gradient))
10827 gradient = this.parse(gradient);
10828
10829 if (!gradient)
10830 return null;
10831
10832 var colorStops = _.map(gradient.colorStops, _.clone);
10833
10834 // normalize color-stops position
10835 _.each(colorStops, function(cs) {
10836 if (!('position' in cs)) // implied position
10837 return;
10838
10839 if (~cs.position.indexOf('.') || cs.unit == '%') {
10840 cs.position = parseFloat(cs.position) / (cs.unit == '%' ? 100 : 1);
10841 } else {
10842 throw "Can't convert color stop '" + (cs.position + (cs.unit || '')) + "'";
10843 }
10844 });
10845
10846 fillImpliedPositions(colorStops);
10847
10848 // transform color-stops into string representation
10849 colorStops = _.map(colorStops, function(cs, i) {
10850 if (!cs.position && !i)
10851 return 'from(' + cs.color + ')';
10852
10853 if (cs.position == 1 && i == colorStops.length - 1)
10854 return 'to(' + cs.color + ')';
10855
10856 return 'color-stop(' + (cs.position.toFixed(2).replace(/\.?0+$/, '')) + ', ' + cs.color + ')';
10857 });
10858
10859 return '-webkit-gradient(linear, '
10860 + oldWebkitDirection(gradient.direction)
10861 + ', '
10862 + colorStops.join(', ')
10863 + ')';
10864 },
10865
10866 /**
10867 * Returns string representation of parsed gradient
10868 * @param {Object} gradient Parsed gradient
10869 * @param {String} prefix Vendor prefix
10870 * @returns {String}
10871 */
10872 toString: function(gradient, prefix) {
10873 if (gradient.type == 'linear') {
10874 var fn = (prefix ? '-' + prefix + '-' : '') + 'linear-gradient';
10875
10876 // transform color-stops
10877 var colorStops = _.map(gradient.colorStops, function(cs) {
10878 return cs.color + ('position' in cs
10879 ? ' ' + cs.position + (cs.unit || '')
10880 : '');
10881 });
10882
10883 if (gradient.direction
10884 && (!prefs.get('css.gradient.omitDefaultDirection')
10885 || !_.include(defaultLinearDirections, gradient.direction))) {
10886 colorStops.unshift(gradient.direction);
10887 }
10888
10889 return fn + '(' + colorStops.join(', ') + ')';
10890 }
10891 }
10892 };
10893 });/**
10894 * Module adds support for generators: a regexp-based abbreviation resolver
10895 * that can produce custom output.
10896 * @param {Function} require
10897 * @param {Underscore} _
10898 */
10899 emmet.exec(function(require, _) {
10900 /** @type HandlerList */
10901 var generators = require('handlerList').create();
10902 var resources = require('resources');
10903
10904 _.extend(resources, {
10905 /**
10906 * Add generator. A generator function <code>fn</code> will be called
10907 * only if current abbreviation matches <code>regexp</code> regular
10908 * expression and this function should return <code>null</code> if
10909 * abbreviation cannot be resolved
10910 * @param {RegExp} regexp Regular expression for abbreviation element name
10911 * @param {Function} fn Resolver function
10912 * @param {Object} options Options list as described in
10913 * {@link HandlerList#add()} method
10914 */
10915 addGenerator: function(regexp, fn, options) {
10916 if (_.isString(regexp))
10917 regexp = new RegExp(regexp);
10918
10919 generators.add(function(node, syntax) {
10920 var m;
10921 if ((m = regexp.exec(node.name()))) {
10922 return fn(m, node, syntax);
10923 }
10924
10925 return null;
10926 }, options);
10927 }
10928 });
10929
10930 resources.addResolver(function(node, syntax) {
10931 return generators.exec(null, _.toArray(arguments));
10932 });
10933 });/**
10934 * Module for resolving tag names: returns best matched tag name for child
10935 * element based on passed parent's tag name. Also provides utility function
10936 * for element type detection (inline, block-level, empty)
10937 * @param {Function} require
10938 * @param {Underscore} _
10939 */
10940 emmet.define('tagName', function(require, _) {
10941 var elementTypes = {
10942 empty: 'area,base,basefont,br,col,frame,hr,img,input,isindex,link,meta,param,embed,keygen,command'.split(','),
10943 blockLevel: 'address,applet,blockquote,button,center,dd,del,dir,div,dl,dt,fieldset,form,frameset,hr,iframe,ins,isindex,li,link,map,menu,noframes,noscript,object,ol,p,pre,script,table,tbody,td,tfoot,th,thead,tr,ul,h1,h2,h3,h4,h5,h6'.split(','),
10944 inlineLevel: 'a,abbr,acronym,applet,b,basefont,bdo,big,br,button,cite,code,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,select,small,span,strike,strong,sub,sup,textarea,tt,u,var'.split(',')
10945 };
10946
10947 var elementMap = {
10948 'p': 'span',
10949 'ul': 'li',
10950 'ol': 'li',
10951 'table': 'tr',
10952 'tr': 'td',
10953 'tbody': 'tr',
10954 'thead': 'tr',
10955 'tfoot': 'tr',
10956 'colgroup': 'col',
10957 'select': 'option',
10958 'optgroup': 'option',
10959 'audio': 'source',
10960 'video': 'source',
10961 'object': 'param',
10962 'map': 'area'
10963 };
10964
10965 return {
10966 /**
10967 * Returns best matched child element name for passed parent's
10968 * tag name
10969 * @param {String} name
10970 * @returns {String}
10971 * @memberOf tagName
10972 */
10973 resolve: function(name) {
10974 name = (name || '').toLowerCase();
10975
10976 if (name in elementMap)
10977 return this.getMapping(name);
10978
10979 if (this.isInlineLevel(name))
10980 return 'span';
10981
10982 return 'div';
10983 },
10984
10985 /**
10986 * Returns mapped child element name for passed parent's name
10987 * @param {String} name
10988 * @returns {String}
10989 */
10990 getMapping: function(name) {
10991 return elementMap[name.toLowerCase()];
10992 },
10993
10994 /**
10995 * Check if passed element name belongs to inline-level element
10996 * @param {String} name
10997 * @returns {Boolean}
10998 */
10999 isInlineLevel: function(name) {
11000 return this.isTypeOf(name, 'inlineLevel');
11001 },
11002
11003 /**
11004 * Check if passed element belongs to block-level element.
11005 * For better matching of unknown elements (for XML, for example),
11006 * you should use <code>!this.isInlineLevel(name)</code>
11007 * @returns {Boolean}
11008 */
11009 isBlockLevel: function(name) {
11010 return this.isTypeOf(name, 'blockLevel');
11011 },
11012
11013 /**
11014 * Check if passed element is void (i.e. should not have closing tag).
11015 * @returns {Boolean}
11016 */
11017 isEmptyElement: function(name) {
11018 return this.isTypeOf(name, 'empty');
11019 },
11020
11021 /**
11022 * Generic function for testing if element name belongs to specified
11023 * elements collection
11024 * @param {String} name Element name
11025 * @param {String} type Collection name
11026 * @returns {Boolean}
11027 */
11028 isTypeOf: function(name, type) {
11029 return _.include(elementTypes[type], name);
11030 },
11031
11032 /**
11033 * Adds new parent–child mapping
11034 * @param {String} parent
11035 * @param {String} child
11036 */
11037 addMapping: function(parent, child) {
11038 elementMap[parent] = child;
11039 },
11040
11041 /**
11042 * Removes parent-child mapping
11043 */
11044 removeMapping: function(parent) {
11045 if (parent in elementMap)
11046 delete elementMap[parent];
11047 },
11048
11049 /**
11050 * Adds new element into collection
11051 * @param {String} name Element name
11052 * @param {String} collection Collection name
11053 */
11054 addElementToCollection: function(name, collection) {
11055 if (!elementTypes[collection])
11056 elementTypes[collection] = [];
11057
11058 var col = this.getCollection(collection);
11059 if (!_.include(col, name))
11060 col.push(name);
11061 },
11062
11063 /**
11064 * Removes element name from specified collection
11065 * @param {String} name Element name
11066 * @param {String} collection Collection name
11067 * @returns
11068 */
11069 removeElementFromCollection: function(name, collection) {
11070 if (collection in elementTypes) {
11071 elementTypes[collection] = _.without(this.getCollection(collection), name);
11072 }
11073 },
11074
11075 /**
11076 * Returns elements name collection
11077 * @param {String} name Collection name
11078 * @returns {Array}
11079 */
11080 getCollection: function(name) {
11081 return elementTypes[name];
11082 }
11083 };
11084 });/**
11085 * Filter for aiding of writing elements with complex class names as described
11086 * in Yandex's BEM (Block, Element, Modifier) methodology. This filter will
11087 * automatically inherit block and element names from parent elements and insert
11088 * them into child element classes
11089 * @memberOf __bemFilterDefine
11090 * @constructor
11091 * @param {Function} require
11092 * @param {Underscore} _
11093 */
11094 emmet.exec(function(require, _) {
11095 var prefs = require('preferences');
11096 prefs.define('bem.elementSeparator', '__', 'Class name’s element separator.');
11097 prefs.define('bem.modifierSeparator', '_', 'Class name’s modifier separator.');
11098 prefs.define('bem.shortElementPrefix', '-',
11099 'Symbol for describing short “block-element” notation. Class names '
11100 + 'prefixed with this symbol will be treated as element name for parent‘s '
11101 + 'block name. Each symbol instance traverses one level up in parsed '
11102 + 'tree for block name lookup. Empty value will disable short notation.');
11103
11104 var shouldRunHtmlFilter = false;
11105
11106 function getSeparators() {
11107 return {
11108 element: prefs.get('bem.elementSeparator'),
11109 modifier: prefs.get('bem.modifierSeparator')
11110 };
11111 }
11112
11113 /**
11114 * @param {AbbreviationNode} item
11115 */
11116 function bemParse(item) {
11117 if (require('abbreviationUtils').isSnippet(item))
11118 return item;
11119
11120 // save BEM stuff in cache for faster lookups
11121 item.__bem = {
11122 block: '',
11123 element: '',
11124 modifier: ''
11125 };
11126
11127 var classNames = normalizeClassName(item.attribute('class')).split(' ');
11128
11129 // guess best match for block name
11130 var reBlockName = /^[a-z]\-/i;
11131 item.__bem.block = _.find(classNames, function(name) {
11132 return reBlockName.test(name);
11133 });
11134
11135 // guessing doesn't worked, pick first class name as block name
11136 if (!item.__bem.block) {
11137 reBlockName = /^[a-z]/i;
11138 item.__bem.block = _.find(classNames, function(name) {
11139 return reBlockName.test(name);
11140 }) || '';
11141 }
11142
11143 classNames = _.chain(classNames)
11144 .map(function(name) {return processClassName(name, item);})
11145 .flatten()
11146 .uniq()
11147 .value()
11148 .join(' ');
11149
11150 if (classNames)
11151 item.attribute('class', classNames);
11152
11153 return item;
11154 }
11155
11156 /**
11157 * @param {String} className
11158 * @returns {String}
11159 */
11160 function normalizeClassName(className) {
11161 var utils = require('utils');
11162 className = (' ' + (className || '') + ' ').replace(/\s+/g, ' ');
11163
11164 var shortSymbol = prefs.get('bem.shortElementPrefix');
11165 if (shortSymbol) {
11166 var re = new RegExp('\\s(' + utils.escapeForRegexp(shortSymbol) + '+)', 'g');
11167 className = className.replace(re, function(str, p1) {
11168 return ' ' + utils.repeatString(getSeparators().element, p1.length);
11169 });
11170 }
11171
11172 return utils.trim(className);
11173 }
11174
11175 /**
11176 * Processes class name
11177 * @param {String} name Class name item to process
11178 * @param {AbbreviationNode} item Host node for provided class name
11179 * @returns Processed class name. May return <code>Array</code> of
11180 * class names
11181 */
11182 function processClassName(name, item) {
11183 name = transformClassName(name, item, 'element');
11184 name = transformClassName(name, item, 'modifier');
11185
11186 // expand class name
11187 // possible values:
11188 // * block__element
11189 // * block__element_modifier
11190 // * block__element_modifier1_modifier2
11191 // * block_modifier
11192 var block = '', element = '', modifier = '';
11193 var separators = getSeparators();
11194 if (~name.indexOf(separators.element)) {
11195 var blockElem = name.split(separators.element);
11196 var elemModifiers = blockElem[1].split(separators.modifier);
11197
11198 block = blockElem[0];
11199 element = elemModifiers.shift();
11200 modifier = elemModifiers.join(separators.modifier);
11201 } else if (~name.indexOf(separators.modifier)) {
11202 var blockModifiers = name.split(separators.modifier);
11203
11204 block = blockModifiers.shift();
11205 modifier = blockModifiers.join(separators.modifier);
11206 }
11207
11208 if (block || element || modifier) {
11209 if (!block) {
11210 block = item.__bem.block;
11211 }
11212
11213 // inherit parent bem element, if exists
11214 // if (item.parent && item.parent.__bem && item.parent.__bem.element)
11215 // element = item.parent.__bem.element + separators.element + element;
11216
11217 // produce multiple classes
11218 var prefix = block;
11219 var result = [];
11220
11221 if (element) {
11222 prefix += separators.element + element;
11223 result.push(prefix);
11224 } else {
11225 result.push(prefix);
11226 }
11227
11228 if (modifier) {
11229 result.push(prefix + separators.modifier + modifier);
11230 }
11231
11232 item.__bem.block = block;
11233 item.__bem.element = element;
11234 item.__bem.modifier = modifier;
11235
11236 return result;
11237 }
11238
11239 // ...otherwise, return processed or original class name
11240 return name;
11241 }
11242
11243 /**
11244 * Low-level function to transform user-typed class name into full BEM class
11245 * @param {String} name Class name item to process
11246 * @param {AbbreviationNode} item Host node for provided class name
11247 * @param {String} entityType Type of entity to be tried to transform
11248 * ('element' or 'modifier')
11249 * @returns {String} Processed class name or original one if it can't be
11250 * transformed
11251 */
11252 function transformClassName(name, item, entityType) {
11253 var separators = getSeparators();
11254 var reSep = new RegExp('^(' + separators[entityType] + ')+', 'g');
11255 if (reSep.test(name)) {
11256 var depth = 0; // parent lookup depth
11257 var cleanName = name.replace(reSep, function(str, p1) {
11258 depth = str.length / separators[entityType].length;
11259 return '';
11260 });
11261
11262 // find donor element
11263 var donor = item;
11264 while (donor.parent && depth--) {
11265 donor = donor.parent;
11266 }
11267
11268 if (!donor || !donor.__bem)
11269 donor = item;
11270
11271 if (donor && donor.__bem) {
11272 var prefix = donor.__bem.block;
11273
11274 // decide if we should inherit element name
11275 // if (entityType == 'element') {
11276 // var curElem = cleanName.split(separators.modifier, 1)[0];
11277 // if (donor.__bem.element && donor.__bem.element != curElem)
11278 // prefix += separators.element + donor.__bem.element;
11279 // }
11280
11281 if (entityType == 'modifier' && donor.__bem.element)
11282 prefix += separators.element + donor.__bem.element;
11283
11284 return prefix + separators[entityType] + cleanName;
11285 }
11286 }
11287
11288 return name;
11289 }
11290
11291 /**
11292 * Recursive function for processing tags, which extends class names
11293 * according to BEM specs: http://bem.github.com/bem-method/pages/beginning/beginning.ru.html
11294 * <br><br>
11295 * It does several things:<br>
11296 * <ul>
11297 * <li>Expands complex class name (according to BEM symbol semantics):
11298 * .block__elem_modifier → .block.block__elem.block__elem_modifier
11299 * </li>
11300 * <li>Inherits block name on child elements:
11301 * .b-block > .__el > .__el → .b-block > .b-block__el > .b-block__el__el
11302 * </li>
11303 * <li>Treats first dash symbol as '__'</li>
11304 * <li>Double underscore (or typographic '–') is also treated as an element
11305 * level lookup, e.g. ____el will search for element definition in parent’s
11306 * parent element:
11307 * .b-block > .__el1 > .____el2 → .b-block > .b-block__el1 > .b-block__el2
11308 * </li>
11309 * </ul>
11310 *
11311 * @param {AbbreviationNode} tree
11312 * @param {Object} profile
11313 */
11314 function process(tree, profile) {
11315 if (tree.name)
11316 bemParse(tree, profile);
11317
11318 var abbrUtils = require('abbreviationUtils');
11319 _.each(tree.children, function(item) {
11320 process(item, profile);
11321 if (!abbrUtils.isSnippet(item) && item.start)
11322 shouldRunHtmlFilter = true;
11323 });
11324
11325 return tree;
11326 };
11327
11328 require('filters').add('bem', function(tree, profile) {
11329 shouldRunHtmlFilter = false;
11330 tree = process(tree, profile);
11331 // in case 'bem' filter is applied after 'html' filter: run it again
11332 // to update output
11333 if (shouldRunHtmlFilter) {
11334 tree = require('filters').apply(tree, 'html', profile);
11335 }
11336
11337 return tree;
11338 });
11339 });
11340
11341 /**
11342 * Comment important tags (with 'id' and 'class' attributes)
11343 * @author Sergey Chikuyonok (serge.che@gmail.com)
11344 * @link http://chikuyonok.ru
11345 * @constructor
11346 * @memberOf __commentFilterDefine
11347 * @param {Function} require
11348 * @param {Underscore} _
11349 */
11350 emmet.exec(function(require, _) {
11351 // define some preferences
11352 /** @type emmet.preferences */
11353 var prefs = require('preferences');
11354
11355 prefs.define('filter.commentAfter',
11356 '\n<!-- /<%= attr("id", "#") %><%= attr("class", ".") %> -->',
11357 'A definition of comment that should be placed <i>after</i> matched '
11358 + 'element when <code>comment</code> filter is applied. This definition '
11359 + 'is an ERB-style template passed to <code>_.template()</code> '
11360 + 'function (see Underscore.js docs for details). In template context, '
11361 + 'the following properties and functions are availabe:\n'
11362 + '<ul>'
11363
11364 + '<li><code>attr(name, before, after)</code> – a function that outputs'
11365 + 'specified attribute value concatenated with <code>before</code> '
11366 + 'and <code>after</code> strings. If attribute doesn\'t exists, the '
11367 + 'empty string will be returned.</li>'
11368
11369 + '<li><code>node</code> – current node (instance of <code>AbbreviationNode</code>)</li>'
11370
11371 + '<li><code>name</code> – name of current tag</li>'
11372
11373 + '<li><code>padding</code> – current string padding, can be used '
11374 + 'for formatting</li>'
11375
11376 +'</ul>');
11377
11378 prefs.define('filter.commentBefore',
11379 '',
11380 'A definition of comment that should be placed <i>before</i> matched '
11381 + 'element when <code>comment</code> filter is applied. '
11382 + 'For more info, read description of <code>filter.commentAfter</code> '
11383 + 'property');
11384
11385 prefs.define('filter.commentTrigger', 'id, class',
11386 'A comma-separated list of attribute names that should exist in abbreviatoin '
11387 + 'where comment should be added. If you wish to add comment for '
11388 + 'every element, set this option to <code>*</code>');
11389
11390 /**
11391 * Add comments to tag
11392 * @param {AbbreviationNode} node
11393 */
11394 function addComments(node, templateBefore, templateAfter) {
11395 var utils = require('utils');
11396
11397 // check if comments should be added
11398 var trigger = prefs.get('filter.commentTrigger');
11399 if (trigger != '*') {
11400 var shouldAdd = _.find(trigger.split(','), function(name) {
11401 return !!node.attribute(utils.trim(name));
11402 });
11403 if (!shouldAdd) return;
11404 }
11405
11406 var ctx = {
11407 node: node,
11408 name: node.name(),
11409 padding: node.parent ? node.parent.padding : '',
11410 attr: function(name, before, after) {
11411 var attr = node.attribute(name);
11412 if (attr) {
11413 return (before || '') + attr + (after || '');
11414 }
11415
11416 return '';
11417 }
11418 };
11419
11420 var nodeBefore = utils.normalizeNewline(templateBefore ? templateBefore(ctx) : '');
11421 var nodeAfter = utils.normalizeNewline(templateAfter ? templateAfter(ctx) : '');
11422
11423 node.start = node.start.replace(/</, nodeBefore + '<');
11424 node.end = node.end.replace(/>/, '>' + nodeAfter);
11425 }
11426
11427 function process(tree, before, after) {
11428 var abbrUtils = require('abbreviationUtils');
11429 _.each(tree.children, function(item) {
11430 if (abbrUtils.isBlock(item))
11431 addComments(item, before, after);
11432
11433 process(item, before, after);
11434 });
11435
11436 return tree;
11437 }
11438
11439 require('filters').add('c', function(tree) {
11440 var templateBefore = _.template(prefs.get('filter.commentBefore'));
11441 var templateAfter = _.template(prefs.get('filter.commentAfter'));
11442
11443 return process(tree, templateBefore, templateAfter);
11444 });
11445 });
11446 /**
11447 * Filter for escaping unsafe XML characters: <, >, &
11448 * @author Sergey Chikuyonok (serge.che@gmail.com)
11449 * @link http://chikuyonok.ru
11450 */
11451 emmet.exec(function(require, _) {
11452 var charMap = {
11453 '<': '&lt;',
11454 '>': '&gt;',
11455 '&': '&amp;'
11456 };
11457
11458 function escapeChars(str) {
11459 return str.replace(/([<>&])/g, function(str, p1){
11460 return charMap[p1];
11461 });
11462 }
11463
11464 require('filters').add('e', function process(tree) {
11465 _.each(tree.children, function(item) {
11466 item.start = escapeChars(item.start);
11467 item.end = escapeChars(item.end);
11468 item.content = escapeChars(item.content);
11469 process(item);
11470 });
11471
11472 return tree;
11473 });
11474 });/**
11475 * Generic formatting filter: creates proper indentation for each tree node,
11476 * placing "%s" placeholder where the actual output should be. You can use
11477 * this filter to preformat tree and then replace %s placeholder to whatever you
11478 * need. This filter should't be called directly from editor as a part
11479 * of abbreviation.
11480 * @author Sergey Chikuyonok (serge.che@gmail.com)
11481 * @link http://chikuyonok.ru
11482 * @constructor
11483 * @memberOf __formatFilterDefine
11484 * @param {Function} require
11485 * @param {Underscore} _
11486 */
11487 emmet.exec(function(require, _){
11488 var placeholder = '%s';
11489
11490 function getIndentation() {
11491 return require('resources').getVariable('indentation');
11492 }
11493
11494 /**
11495 * Test if passed node has block-level sibling element
11496 * @param {AbbreviationNode} item
11497 * @return {Boolean}
11498 */
11499 function hasBlockSibling(item) {
11500 return item.parent && require('abbreviationUtils').hasBlockChildren(item.parent);
11501 }
11502
11503 /**
11504 * Test if passed item is very first child in parsed tree
11505 * @param {AbbreviationNode} item
11506 */
11507 function isVeryFirstChild(item) {
11508 return item.parent && !item.parent.parent && !item.index();
11509 }
11510
11511 /**
11512 * Check if a newline should be added before element
11513 * @param {AbbreviationNode} node
11514 * @param {OutputProfile} profile
11515 * @return {Boolean}
11516 */
11517 function shouldAddLineBreak(node, profile) {
11518 var abbrUtils = require('abbreviationUtils');
11519 if (profile.tag_nl === true || abbrUtils.isBlock(node))
11520 return true;
11521
11522 if (!node.parent || !profile.inline_break)
11523 return false;
11524
11525 // check if there are required amount of adjacent inline element
11526 var nodeCount = 0;
11527 return !!_.find(node.parent.children, function(child) {
11528 if (child.isTextNode() || !abbrUtils.isInline(child))
11529 nodeCount = 0;
11530 else if (abbrUtils.isInline(child))
11531 nodeCount++;
11532
11533 if (nodeCount >= profile.inline_break)
11534 return true;
11535 });
11536 }
11537
11538 /**
11539 * Need to add newline because <code>item</code> has too many inline children
11540 * @param {AbbreviationNode} node
11541 * @param {OutputProfile} profile
11542 */
11543 function shouldBreakChild(node, profile) {
11544 // we need to test only one child element, because
11545 // hasBlockChildren() method will do the rest
11546 return node.children.length && shouldAddLineBreak(node.children[0], profile);
11547 }
11548
11549 /**
11550 * Processes element with matched resource of type <code>snippet</code>
11551 * @param {AbbreviationNode} item
11552 * @param {OutputProfile} profile
11553 * @param {Number} level Depth level
11554 */
11555 function processSnippet(item, profile, level) {
11556 if (!isVeryFirstChild(item)) {
11557 item.start = require('utils').getNewline() + item.start;
11558 }
11559
11560 return item;
11561 }
11562
11563 /**
11564 * Processes element with <code>tag</code> type
11565 * @param {AbbreviationNode} item
11566 * @param {OutputProfile} profile
11567 * @param {Number} level Depth level
11568 */
11569 function processTag(item, profile, level) {
11570 item.start = item.end = placeholder;
11571 var utils = require('utils');
11572 var abbrUtils = require('abbreviationUtils');
11573 var isUnary = abbrUtils.isUnary(item);
11574 var nl = utils.getNewline();
11575
11576 // formatting output
11577 if (profile.tag_nl !== false) {
11578 var forceNl = profile.tag_nl === true && (profile.tag_nl_leaf || item.children.length);
11579
11580 // formatting block-level elements
11581 if (!item.isTextNode()) {
11582 if (shouldAddLineBreak(item, profile)) {
11583 // - do not indent the very first element
11584 // - do not indent first child of a snippet
11585 if (!isVeryFirstChild(item) && (!abbrUtils.isSnippet(item.parent) || item.index()))
11586 item.start = nl + item.start;
11587
11588 if (abbrUtils.hasBlockChildren(item) || shouldBreakChild(item, profile) || (forceNl && !isUnary))
11589 item.end = nl + item.end;
11590
11591 if (abbrUtils.hasTagsInContent(item) || (forceNl && !item.children.length && !isUnary))
11592 item.start += nl + getIndentation();
11593 } else if (abbrUtils.isInline(item) && hasBlockSibling(item) && !isVeryFirstChild(item)) {
11594 item.start = nl + item.start;
11595 } else if (abbrUtils.isInline(item) && abbrUtils.hasBlockChildren(item)) {
11596 item.end = nl + item.end;
11597 }
11598
11599 item.padding = getIndentation() ;
11600 }
11601 }
11602
11603 return item;
11604 }
11605
11606 /**
11607 * Processes simplified tree, making it suitable for output as HTML structure
11608 * @param {AbbreviationNode} tree
11609 * @param {OutputProfile} profile
11610 * @param {Number} level Depth level
11611 */
11612 require('filters').add('_format', function process(tree, profile, level) {
11613 level = level || 0;
11614 var abbrUtils = require('abbreviationUtils');
11615
11616 _.each(tree.children, function(item) {
11617 if (abbrUtils.isSnippet(item))
11618 processSnippet(item, profile, level);
11619 else
11620 processTag(item, profile, level);
11621
11622 process(item, profile, level + 1);
11623 });
11624
11625 return tree;
11626 });
11627 });/**
11628 * Filter for producing HAML code from abbreviation.
11629 * @author Sergey Chikuyonok (serge.che@gmail.com)
11630 * @link http://chikuyonok.ru
11631 * @constructor
11632 * @memberOf __hamlFilterDefine
11633 * @param {Function} require
11634 * @param {Underscore} _
11635 */
11636 emmet.exec(function(require, _) {
11637 var childToken = '${child}';
11638
11639 function transformClassName(className) {
11640 return require('utils').trim(className).replace(/\s+/g, '.');
11641 }
11642
11643 /**
11644 * Creates HAML attributes string from tag according to profile settings
11645 * @param {AbbreviationNode} tag
11646 * @param {Object} profile
11647 */
11648 function makeAttributesString(tag, profile) {
11649 var attrs = '';
11650 var otherAttrs = [];
11651 var attrQuote = profile.attributeQuote();
11652 var cursor = profile.cursor();
11653
11654 _.each(tag.attributeList(), function(a) {
11655 var attrName = profile.attributeName(a.name);
11656 switch (attrName.toLowerCase()) {
11657 // use short notation for ID and CLASS attributes
11658 case 'id':
11659 attrs += '#' + (a.value || cursor);
11660 break;
11661 case 'class':
11662 attrs += '.' + transformClassName(a.value || cursor);
11663 break;
11664 // process other attributes
11665 default:
11666 otherAttrs.push(':' +attrName + ' => ' + attrQuote + (a.value || cursor) + attrQuote);
11667 }
11668 });
11669
11670 if (otherAttrs.length)
11671 attrs += '{' + otherAttrs.join(', ') + '}';
11672
11673 return attrs;
11674 }
11675
11676 /**
11677 * Test if passed node has block-level sibling element
11678 * @param {AbbreviationNode} item
11679 * @return {Boolean}
11680 */
11681 function hasBlockSibling(item) {
11682 return item.parent && item.parent.hasBlockChildren();
11683 }
11684
11685 /**
11686 * Processes element with <code>tag</code> type
11687 * @param {AbbreviationNode} item
11688 * @param {OutputProfile} profile
11689 * @param {Number} level Depth level
11690 */
11691 function processTag(item, profile, level) {
11692 if (!item.parent)
11693 // looks like it's root element
11694 return item;
11695
11696 var abbrUtils = require('abbreviationUtils');
11697 var utils = require('utils');
11698
11699 var attrs = makeAttributesString(item, profile);
11700 var cursor = profile.cursor();
11701 var isUnary = abbrUtils.isUnary(item);
11702 var selfClosing = profile.self_closing_tag && isUnary ? '/' : '';
11703 var start= '';
11704
11705 // define tag name
11706 var tagName = '%' + profile.tagName(item.name());
11707 if (tagName.toLowerCase() == '%div' && attrs && attrs.indexOf('{') == -1)
11708 // omit div tag
11709 tagName = '';
11710
11711 item.end = '';
11712 start = tagName + attrs + selfClosing + ' ';
11713
11714 var placeholder = '%s';
11715 // We can't just replace placeholder with new value because
11716 // JavaScript will treat double $ character as a single one, assuming
11717 // we're using RegExp literal.
11718 item.start = utils.replaceSubstring(item.start, start, item.start.indexOf(placeholder), placeholder);
11719
11720 if (!item.children.length && !isUnary)
11721 item.start += cursor;
11722
11723 return item;
11724 }
11725
11726 /**
11727 * Processes simplified tree, making it suitable for output as HTML structure
11728 * @param {AbbreviationNode} tree
11729 * @param {Object} profile
11730 * @param {Number} level Depth level
11731 */
11732 require('filters').add('haml', function process(tree, profile, level) {
11733 level = level || 0;
11734 var abbrUtils = require('abbreviationUtils');
11735
11736 if (!level) {
11737 tree = require('filters').apply(tree, '_format', profile);
11738 }
11739
11740 _.each(tree.children, function(item) {
11741 if (!abbrUtils.isSnippet(item))
11742 processTag(item, profile, level);
11743
11744 process(item, profile, level + 1);
11745 });
11746
11747 return tree;
11748 });
11749 });/**
11750 * Filter that produces HTML tree
11751 * @author Sergey Chikuyonok (serge.che@gmail.com)
11752 * @link http://chikuyonok.ru
11753 * @constructor
11754 * @memberOf __htmlFilterDefine
11755 * @param {Function} require
11756 * @param {Underscore} _
11757 */
11758 emmet.exec(function(require, _) {
11759 /**
11760 * Creates HTML attributes string from tag according to profile settings
11761 * @param {AbbreviationNode} node
11762 * @param {OutputProfile} profile
11763 */
11764 function makeAttributesString(node, profile) {
11765 var attrQuote = profile.attributeQuote();
11766 var cursor = profile.cursor();
11767
11768 return _.map(node.attributeList(), function(a) {
11769 var attrName = profile.attributeName(a.name);
11770 return ' ' + attrName + '=' + attrQuote + (a.value || cursor) + attrQuote;
11771 }).join('');
11772 }
11773
11774 /**
11775 * Processes element with <code>tag</code> type
11776 * @param {AbbreviationNode} item
11777 * @param {OutputProfile} profile
11778 * @param {Number} level Depth level
11779 */
11780 function processTag(item, profile, level) {
11781 if (!item.parent) // looks like it's root element
11782 return item;
11783
11784 var abbrUtils = require('abbreviationUtils');
11785 var utils = require('utils');
11786
11787 var attrs = makeAttributesString(item, profile);
11788 var cursor = profile.cursor();
11789 var isUnary = abbrUtils.isUnary(item);
11790 var start= '';
11791 var end = '';
11792
11793 // define opening and closing tags
11794 if (!item.isTextNode()) {
11795 var tagName = profile.tagName(item.name());
11796 if (isUnary) {
11797 start = '<' + tagName + attrs + profile.selfClosing() + '>';
11798 item.end = '';
11799 } else {
11800 start = '<' + tagName + attrs + '>';
11801 end = '</' + tagName + '>';
11802 }
11803 }
11804
11805 var placeholder = '%s';
11806 // We can't just replace placeholder with new value because
11807 // JavaScript will treat double $ character as a single one, assuming
11808 // we're using RegExp literal.
11809 item.start = utils.replaceSubstring(item.start, start, item.start.indexOf(placeholder), placeholder);
11810 item.end = utils.replaceSubstring(item.end, end, item.end.indexOf(placeholder), placeholder);
11811
11812 if (!item.children.length && !isUnary && item.content.indexOf(cursor) == -1)
11813 item.start += cursor;
11814
11815 return item;
11816 }
11817
11818 /**
11819 * Processes simplified tree, making it suitable for output as HTML structure
11820 * @param {AbbreviationNode} tree
11821 * @param {Object} profile
11822 * @param {Number} level Depth level
11823 */
11824 require('filters').add('html', function process(tree, profile, level) {
11825 level = level || 0;
11826 var abbrUtils = require('abbreviationUtils');
11827
11828 if (!level) {
11829 tree = require('filters').apply(tree, '_format', profile);
11830 }
11831
11832 _.each(tree.children, function(item) {
11833 if (!abbrUtils.isSnippet(item))
11834 processTag(item, profile, level);
11835
11836 process(item, profile, level + 1);
11837 });
11838
11839 return tree;
11840 });
11841 });/**
11842 * Output abbreviation on a single line (i.e. no line breaks)
11843 * @author Sergey Chikuyonok (serge.che@gmail.com)
11844 * @link http://chikuyonok.ru
11845 * @constructor
11846 * @memberOf __singleLineFilterDefine
11847 * @param {Function} require
11848 * @param {Underscore} _
11849 */
11850 emmet.exec(function(require, _) {
11851 var rePad = /^\s+/;
11852 var reNl = /[\n\r]/g;
11853
11854 require('filters').add('s', function process(tree, profile, level) {
11855 var abbrUtils = require('abbreviationUtils');
11856
11857 _.each(tree.children, function(item) {
11858 if (!abbrUtils.isSnippet(item)) {
11859 // remove padding from item
11860 item.start = item.start.replace(rePad, '');
11861 item.end = item.end.replace(rePad, '');
11862 }
11863
11864 // remove newlines
11865 item.start = item.start.replace(reNl, '');
11866 item.end = item.end.replace(reNl, '');
11867 item.content = item.content.replace(reNl, '');
11868
11869 process(item);
11870 });
11871
11872 return tree;
11873 });
11874 });
11875 /**
11876 * Trim filter: removes characters at the beginning of the text
11877 * content that indicates lists: numbers, #, *, -, etc.
11878 *
11879 * Useful for wrapping lists with abbreviation.
11880 *
11881 * @author Sergey Chikuyonok (serge.che@gmail.com)
11882 * @link http://chikuyonok.ru
11883 *
11884 * @constructor
11885 * @memberOf __trimFilterDefine
11886 * @param {Function} require
11887 * @param {Underscore} _
11888 */
11889 emmet.exec(function(require, _) {
11890 require('preferences').define('filter.trimRegexp', '[\\s|\\u00a0]*[\\d|#|\\-|\*|\\u2022]+\\.?\\s*',
11891 'Regular expression used to remove list markers (numbers, dashes, '
11892 + 'bullets, etc.) in <code>t</code> (trim) filter. The trim filter '
11893 + 'is useful for wrapping with abbreviation lists, pased from other '
11894 + 'documents (for example, Word documents).');
11895
11896 function process(tree, re) {
11897 _.each(tree.children, function(item) {
11898 if (item.content)
11899 item.content = item.content.replace(re, '');
11900
11901 process(item, re);
11902 });
11903
11904 return tree;
11905 }
11906
11907 require('filters').add('t', function(tree) {
11908 var re = new RegExp(require('preferences').get('filter.trimRegexp'));
11909 return process(tree, re);
11910 });
11911 });
11912 /**
11913 * Filter for trimming "select" attributes from some tags that contains
11914 * child elements
11915 * @author Sergey Chikuyonok (serge.che@gmail.com)
11916 * @link http://chikuyonok.ru
11917 *
11918 * @constructor
11919 * @memberOf __xslFilterDefine
11920 * @param {Function} require
11921 * @param {Underscore} _
11922 */
11923 emmet.exec(function(require, _) {
11924 var tags = {
11925 'xsl:variable': 1,
11926 'xsl:with-param': 1
11927 };
11928
11929 /**
11930 * Removes "select" attribute from node
11931 * @param {AbbreviationNode} node
11932 */
11933 function trimAttribute(node) {
11934 node.start = node.start.replace(/\s+select\s*=\s*(['"]).*?\1/, '');
11935 }
11936
11937 require('filters').add('xsl', function process(tree) {
11938 var abbrUtils = require('abbreviationUtils');
11939 _.each(tree.children, function(item) {
11940 if (!abbrUtils.isSnippet(item)
11941 && (item.name() || '').toLowerCase() in tags
11942 && item.children.length)
11943 trimAttribute(item);
11944 process(item);
11945 });
11946
11947 return tree;
11948 });
11949 });/**
11950 * "Lorem ipsum" text generator. Matches <code>lipsum(num)?</code> or
11951 * <code>lorem(num)?</code> abbreviation.
11952 * This code is based on Django's contribution:
11953 * https://code.djangoproject.com/browser/django/trunk/django/contrib/webdesign/lorem_ipsum.py
11954 * <br><br>
11955 * Examples to test:<br>
11956 * <code>lipsum</code> – generates 30 words text.<br>
11957 * <code>lipsum*6</code> – generates 6 paragraphs (autowrapped with &lt;p&gt; element) of text.<br>
11958 * <code>ol>lipsum10*5</code> — generates ordered list with 5 list items (autowrapped with &lt;li&gt; tag)
11959 * with text of 10 words on each line<br>
11960 * <code>span*3>lipsum20</code> – generates 3 paragraphs of 20-words text, each wrapped with &lt;span&gt; element .
11961 * Each paragraph phrase is unique
11962 * @param {Function} require
11963 * @param {Underscore} _
11964 * @constructor
11965 * @memberOf __loremIpsumGeneratorDefine
11966 */
11967 emmet.exec(function(require, _) {
11968 /**
11969 * @param {AbbreviationNode} tree
11970 * @param {Object} options
11971 */
11972 require('abbreviationParser').addPreprocessor(function(tree, options) {
11973 var re = /^(?:lorem|lipsum)(\d*)$/i, match;
11974
11975 /** @param {AbbreviationNode} node */
11976 tree.findAll(function(node) {
11977 if (node._name && (match = node._name.match(re))) {
11978 var wordCound = match[1] || 30;
11979
11980 // force node name resolving if node should be repeated
11981 // or contains attributes. In this case, node should be outputed
11982 // as tag, otherwise as text-only node
11983 node._name = '';
11984 node.data('forceNameResolving', node.isRepeating() || node.attributeList().length);
11985 node.data('pasteOverwrites', true);
11986 node.data('paste', function(i, content) {
11987 return paragraph(wordCound, !i);
11988 });
11989 }
11990 });
11991 });
11992
11993 var COMMON_P = 'lorem ipsum dolor sit amet consectetur adipisicing elit'.split(' ');
11994
11995 var WORDS = ['exercitationem', 'perferendis', 'perspiciatis', 'laborum', 'eveniet',
11996 'sunt', 'iure', 'nam', 'nobis', 'eum', 'cum', 'officiis', 'excepturi',
11997 'odio', 'consectetur', 'quasi', 'aut', 'quisquam', 'vel', 'eligendi',
11998 'itaque', 'non', 'odit', 'tempore', 'quaerat', 'dignissimos',
11999 'facilis', 'neque', 'nihil', 'expedita', 'vitae', 'vero', 'ipsum',
12000 'nisi', 'animi', 'cumque', 'pariatur', 'velit', 'modi', 'natus',
12001 'iusto', 'eaque', 'sequi', 'illo', 'sed', 'ex', 'et', 'voluptatibus',
12002 'tempora', 'veritatis', 'ratione', 'assumenda', 'incidunt', 'nostrum',
12003 'placeat', 'aliquid', 'fuga', 'provident', 'praesentium', 'rem',
12004 'necessitatibus', 'suscipit', 'adipisci', 'quidem', 'possimus',
12005 'voluptas', 'debitis', 'sint', 'accusantium', 'unde', 'sapiente',
12006 'voluptate', 'qui', 'aspernatur', 'laudantium', 'soluta', 'amet',
12007 'quo', 'aliquam', 'saepe', 'culpa', 'libero', 'ipsa', 'dicta',
12008 'reiciendis', 'nesciunt', 'doloribus', 'autem', 'impedit', 'minima',
12009 'maiores', 'repudiandae', 'ipsam', 'obcaecati', 'ullam', 'enim',
12010 'totam', 'delectus', 'ducimus', 'quis', 'voluptates', 'dolores',
12011 'molestiae', 'harum', 'dolorem', 'quia', 'voluptatem', 'molestias',
12012 'magni', 'distinctio', 'omnis', 'illum', 'dolorum', 'voluptatum', 'ea',
12013 'quas', 'quam', 'corporis', 'quae', 'blanditiis', 'atque', 'deserunt',
12014 'laboriosam', 'earum', 'consequuntur', 'hic', 'cupiditate',
12015 'quibusdam', 'accusamus', 'ut', 'rerum', 'error', 'minus', 'eius',
12016 'ab', 'ad', 'nemo', 'fugit', 'officia', 'at', 'in', 'id', 'quos',
12017 'reprehenderit', 'numquam', 'iste', 'fugiat', 'sit', 'inventore',
12018 'beatae', 'repellendus', 'magnam', 'recusandae', 'quod', 'explicabo',
12019 'doloremque', 'aperiam', 'consequatur', 'asperiores', 'commodi',
12020 'optio', 'dolor', 'labore', 'temporibus', 'repellat', 'veniam',
12021 'architecto', 'est', 'esse', 'mollitia', 'nulla', 'a', 'similique',
12022 'eos', 'alias', 'dolore', 'tenetur', 'deleniti', 'porro', 'facere',
12023 'maxime', 'corrupti'];
12024
12025 /**
12026 * Returns random integer between <code>from</code> and <code>to</code> values
12027 * @param {Number} from
12028 * @param {Number} to
12029 * @returns {Number}
12030 */
12031 function randint(from, to) {
12032 return Math.round(Math.random() * (to - from) + from);
12033 }
12034
12035 /**
12036 * @param {Array} arr
12037 * @param {Number} count
12038 * @returns {Array}
12039 */
12040 function sample(arr, count) {
12041 var len = arr.length;
12042 var iterations = Math.min(len, count);
12043 var result = [];
12044 while (result.length < iterations) {
12045 var randIx = randint(0, len - 1);
12046 if (!_.include(result, randIx))
12047 result.push(randIx);
12048 }
12049
12050 return _.map(result, function(ix) {
12051 return arr[ix];
12052 });
12053 }
12054
12055 function choice(val) {
12056 if (_.isString(val))
12057 return val.charAt(randint(0, val.length - 1));
12058
12059 return val[randint(0, val.length - 1)];
12060 }
12061
12062 function sentence(words, end) {
12063 if (words.length) {
12064 words[0] = words[0].charAt(0).toUpperCase() + words[0].substring(1);
12065 }
12066
12067 return words.join(' ') + (end || choice('?!...')); // more dots that question marks
12068 }
12069
12070 /**
12071 * Insert commas at randomly selected words. This function modifies values
12072 * inside <code>words</code> array
12073 * @param {Array} words
12074 */
12075 function insertCommas(words) {
12076 var len = words.length;
12077 var totalCommas = 0;
12078
12079 if (len > 3 && len <= 6) {
12080 totalCommas = randint(0, 1);
12081 } else if (len > 6 && len <= 12) {
12082 totalCommas = randint(0, 2);
12083 } else {
12084 totalCommas = randint(1, 4);
12085 }
12086
12087 _.each(sample(_.range(totalCommas)), function(ix) {
12088 words[ix] += ',';
12089 });
12090 }
12091
12092 /**
12093 * Generate a paragraph of "Lorem ipsum" text
12094 * @param {Number} wordCount Words count in paragraph
12095 * @param {Boolean} startWithCommon Should paragraph start with common
12096 * "lorem ipsum" sentence.
12097 * @returns {String}
12098 */
12099 function paragraph(wordCount, startWithCommon) {
12100 var result = [];
12101 var totalWords = 0;
12102 var words;
12103
12104 wordCount = parseInt(wordCount, 10);
12105
12106 if (startWithCommon) {
12107 words = COMMON_P.slice(0, wordCount);
12108 if (words.length > 5)
12109 words[4] += ',';
12110 totalWords += words.length;
12111 result.push(sentence(words, '.'));
12112 }
12113
12114 while (totalWords < wordCount) {
12115 words = sample(WORDS, Math.min(randint(3, 12) * randint(1, 5), wordCount - totalWords));
12116 totalWords += words.length;
12117 insertCommas(words);
12118 result.push(sentence(words));
12119 }
12120
12121 return result.join(' ');
12122 }
12123 });/**
12124 * Select current line (for simple editors like browser's &lt;textarea&gt;)
12125 */
12126 emmet.exec(function(require, _) {
12127 require('actions').add('select_line', function(editor) {
12128 var range = editor.getCurrentLineRange();
12129 editor.createSelection(range.start, range.end);
12130 return true;
12131 });
12132 });emmet.exec(function(require, _){require('resources').setVocabulary({
12133 "variables": {
12134 "lang": "en",
12135 "locale": "en-US",
12136 "charset": "UTF-8",
12137 "indentation": "\t",
12138 "newline": "\n"
12139 },
12140
12141 "css": {
12142 "filters": "html",
12143 "snippets": {
12144 "@i": "@import url(|);",
12145 "@m": "@media print {\n\t|\n}",
12146 "@f": "@font-face {\n\tfont-family:|;\n\tsrc:url(|);\n}",
12147 "@f+": "@font-face {\n\tfont-family: '${1:FontName}';\n\tsrc: url('${2:FileName}.eot');\n\tsrc: url('${2:FileName}.eot?#iefix') format('embedded-opentype'),\n\t\t url('${2:FileName}.woff') format('woff'),\n\t\t url('${2:FileName}.ttf') format('truetype'),\n\t\t url('${2:FileName}.svg#${1:FontName}') format('svg');\n\tfont-style: ${3:normal};\n\tfont-weight: ${4:normal};\n}",
12148 "!": "!important",
12149 "pos": "position:|;",
12150 "pos:s": "position:static;",
12151 "pos:a": "position:absolute;",
12152 "pos:r": "position:relative;",
12153 "pos:f": "position:fixed;",
12154 "t": "top:|;",
12155 "t:a": "top:auto;",
12156 "r": "right:|;",
12157 "r:a": "right:auto;",
12158 "b": "bottom:|;",
12159 "b:a": "bottom:auto;",
12160 "l": "left:|;",
12161 "l:a": "left:auto;",
12162 "z": "z-index:|;",
12163 "z:a": "z-index:auto;",
12164 "fl": "float:|;",
12165 "fl:n": "float:none;",
12166 "fl:l": "float:left;",
12167 "fl:r": "float:right;",
12168 "cl": "clear:|;",
12169 "cl:n": "clear:none;",
12170 "cl:l": "clear:left;",
12171 "cl:r": "clear:right;",
12172 "cl:b": "clear:both;",
12173 "d": "display:|;",
12174 "d:n": "display:none;",
12175 "d:b": "display:block;",
12176 "d:i": "display:inline;",
12177 "d:ib": "display:inline-block;",
12178 "d:li": "display:list-item;",
12179 "d:ri": "display:run-in;",
12180 "d:cp": "display:compact;",
12181 "d:tb": "display:table;",
12182 "d:itb": "display:inline-table;",
12183 "d:tbcp": "display:table-caption;",
12184 "d:tbcl": "display:table-column;",
12185 "d:tbclg": "display:table-column-group;",
12186 "d:tbhg": "display:table-header-group;",
12187 "d:tbfg": "display:table-footer-group;",
12188 "d:tbr": "display:table-row;",
12189 "d:tbrg": "display:table-row-group;",
12190 "d:tbc": "display:table-cell;",
12191 "d:rb": "display:ruby;",
12192 "d:rbb": "display:ruby-base;",
12193 "d:rbbg": "display:ruby-base-group;",
12194 "d:rbt": "display:ruby-text;",
12195 "d:rbtg": "display:ruby-text-group;",
12196 "v": "visibility:|;",
12197 "v:v": "visibility:visible;",
12198 "v:h": "visibility:hidden;",
12199 "v:c": "visibility:collapse;",
12200 "ov": "overflow:|;",
12201 "ov:v": "overflow:visible;",
12202 "ov:h": "overflow:hidden;",
12203 "ov:s": "overflow:scroll;",
12204 "ov:a": "overflow:auto;",
12205 "ovx": "overflow-x:|;",
12206 "ovx:v": "overflow-x:visible;",
12207 "ovx:h": "overflow-x:hidden;",
12208 "ovx:s": "overflow-x:scroll;",
12209 "ovx:a": "overflow-x:auto;",
12210 "ovy": "overflow-y:|;",
12211 "ovy:v": "overflow-y:visible;",
12212 "ovy:h": "overflow-y:hidden;",
12213 "ovy:s": "overflow-y:scroll;",
12214 "ovy:a": "overflow-y:auto;",
12215 "ovs": "overflow-style:|;",
12216 "ovs:a": "overflow-style:auto;",
12217 "ovs:s": "overflow-style:scrollbar;",
12218 "ovs:p": "overflow-style:panner;",
12219 "ovs:m": "overflow-style:move;",
12220 "ovs:mq": "overflow-style:marquee;",
12221 "zoo": "zoom:1;",
12222 "cp": "clip:|;",
12223 "cp:a": "clip:auto;",
12224 "cp:r": "clip:rect(|);",
12225 "bxz": "box-sizing:|;",
12226 "bxz:cb": "box-sizing:content-box;",
12227 "bxz:bb": "box-sizing:border-box;",
12228 "bxsh": "box-shadow:${1:hoff} ${2:voff} ${3:radius} ${4:color};",
12229 "bxsh:n": "box-shadow:none;",
12230 "m": "margin:|;",
12231 "mt": "margin-top:|;",
12232 "mt:a": "margin-top:auto;",
12233 "mr": "margin-right:|;",
12234 "mr:a": "margin-right:auto;",
12235 "mb": "margin-bottom:|;",
12236 "mb:a": "margin-bottom:auto;",
12237 "ml": "margin-left:|;",
12238 "ml:a": "margin-left:auto;",
12239 "p": "padding:|;",
12240 "pt": "padding-top:|;",
12241 "pr": "padding-right:|;",
12242 "pb": "padding-bottom:|;",
12243 "pl": "padding-left:|;",
12244 "w": "width:|;",
12245 "w:a": "width:auto;",
12246 "h": "height:|;",
12247 "h:a": "height:auto;",
12248 "maw": "max-width:|;",
12249 "maw:n": "max-width:none;",
12250 "mah": "max-height:|;",
12251 "mah:n": "max-height:none;",
12252 "miw": "min-width:|;",
12253 "mih": "min-height:|;",
12254 "o": "outline:|;",
12255 "o:n": "outline:none;",
12256 "oo": "outline-offset:|;",
12257 "ow": "outline-width:|;",
12258 "os": "outline-style:|;",
12259 "oc": "outline-color:#${1:000};",
12260 "oc:i": "outline-color:invert;",
12261 "bd": "border:|;",
12262 "bd+": "border:${1:1px} ${2:solid} ${3:#000};",
12263 "bd:n": "border:none;",
12264 "bdbk": "border-break:|;",
12265 "bdbk:c": "border-break:close;",
12266 "bdcl": "border-collapse:|;",
12267 "bdcl:c": "border-collapse:collapse;",
12268 "bdcl:s": "border-collapse:separate;",
12269 "bdc": "border-color:#${1:000};",
12270 "bdi": "border-image:url(|);",
12271 "bdi:n": "border-image:none;",
12272 "bdti": "border-top-image:url(|);",
12273 "bdti:n": "border-top-image:none;",
12274 "bdri": "border-right-image:url(|);",
12275 "bdri:n": "border-right-image:none;",
12276 "bdbi": "border-bottom-image:url(|);",
12277 "bdbi:n": "border-bottom-image:none;",
12278 "bdli": "border-left-image:url(|);",
12279 "bdli:n": "border-left-image:none;",
12280 "bdci": "border-corner-image:url(|);",
12281 "bdci:n": "border-corner-image:none;",
12282 "bdci:c": "border-corner-image:continue;",
12283 "bdtli": "border-top-left-image:url(|);",
12284 "bdtli:n": "border-top-left-image:none;",
12285 "bdtli:c": "border-top-left-image:continue;",
12286 "bdtri": "border-top-right-image:url(|);",
12287 "bdtri:n": "border-top-right-image:none;",
12288 "bdtri:c": "border-top-right-image:continue;",
12289 "bdbri": "border-bottom-right-image:url(|);",
12290 "bdbri:n": "border-bottom-right-image:none;",
12291 "bdbri:c": "border-bottom-right-image:continue;",
12292 "bdbli": "border-bottom-left-image:url(|);",
12293 "bdbli:n": "border-bottom-left-image:none;",
12294 "bdbli:c": "border-bottom-left-image:continue;",
12295 "bdf": "border-fit:|;",
12296 "bdf:c": "border-fit:clip;",
12297 "bdf:r": "border-fit:repeat;",
12298 "bdf:sc": "border-fit:scale;",
12299 "bdf:st": "border-fit:stretch;",
12300 "bdf:ow": "border-fit:overwrite;",
12301 "bdf:of": "border-fit:overflow;",
12302 "bdf:sp": "border-fit:space;",
12303 "bdl": "border-length:|;",
12304 "bdl:a": "border-length:auto;",
12305 "bdsp": "border-spacing:|;",
12306 "bds": "border-style:|;",
12307 "bds:n": "border-style:none;",
12308 "bds:h": "border-style:hidden;",
12309 "bds:dt": "border-style:dotted;",
12310 "bds:ds": "border-style:dashed;",
12311 "bds:s": "border-style:solid;",
12312 "bds:db": "border-style:double;",
12313 "bds:dtds": "border-style:dot-dash;",
12314 "bds:dtdtds": "border-style:dot-dot-dash;",
12315 "bds:w": "border-style:wave;",
12316 "bds:g": "border-style:groove;",
12317 "bds:r": "border-style:ridge;",
12318 "bds:i": "border-style:inset;",
12319 "bds:o": "border-style:outset;",
12320 "bdw": "border-width:|;",
12321 "bdt": "border-top:|;",
12322 "bdt+": "border-top:${1:1px} ${2:solid} ${3:#000};",
12323 "bdt:n": "border-top:none;",
12324 "bdtw": "border-top-width:|;",
12325 "bdts": "border-top-style:|;",
12326 "bdts:n": "border-top-style:none;",
12327 "bdtc": "border-top-color:#${1:000};",
12328 "bdr": "border-right:|;",
12329 "bdr+": "border-right:${1:1px} ${2:solid} ${3:#000};",
12330 "bdr:n": "border-right:none;",
12331 "bdrw": "border-right-width:|;",
12332 "bdrs": "border-right-style:|;",
12333 "bdrs:n": "border-right-style:none;",
12334 "bdrc": "border-right-color:#${1:000};",
12335 "bdb": "border-bottom:|;",
12336 "bdb+": "border-bottom:${1:1px} ${2:solid} ${3:#000};",
12337 "bdb:n": "border-bottom:none;",
12338 "bdbw": "border-bottom-width:|;",
12339 "bdbs": "border-bottom-style:|;",
12340 "bdbs:n": "border-bottom-style:none;",
12341 "bdbc": "border-bottom-color:#${1:000};",
12342 "bdl": "border-left:|;",
12343 "bdl+": "border-left:${1:1px} ${2:solid} ${3:#000};",
12344 "bdl:n": "border-left:none;",
12345 "bdlw": "border-left-width:|;",
12346 "bdls": "border-left-style:|;",
12347 "bdls:n": "border-left-style:none;",
12348 "bdlc": "border-left-color:#${1:000};",
12349 "bdrs": "border-radius:|;",
12350 "bdtrrs": "border-top-right-radius:|;",
12351 "bdtlrs": "border-top-left-radius:|;",
12352 "bdbrrs": "border-bottom-right-radius:|;",
12353 "bdblrs": "border-bottom-left-radius:|;",
12354 "bg": "background:|;",
12355 "bg+": "background:${1:#fff} url(${2}) ${3:0} ${4:0} ${5:no-repeat};",
12356 "bg:n": "background:none;",
12357 "bg:ie": "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='${1:x}.png',sizingMethod='${2:crop}');",
12358 "bgc": "background-color:#${1:fff};",
12359 "bgi": "background-image:url(|);",
12360 "bgi:n": "background-image:none;",
12361 "bgr": "background-repeat:|;",
12362 "bgr:n": "background-repeat:no-repeat;",
12363 "bgr:x": "background-repeat:repeat-x;",
12364 "bgr:y": "background-repeat:repeat-y;",
12365 "bga": "background-attachment:|;",
12366 "bga:f": "background-attachment:fixed;",
12367 "bga:s": "background-attachment:scroll;",
12368 "bgp": "background-position:${1:0} ${2:0};",
12369 "bgpx": "background-position-x:|;",
12370 "bgpy": "background-position-y:|;",
12371 "bgbk": "background-break:|;",
12372 "bgbk:bb": "background-break:bounding-box;",
12373 "bgbk:eb": "background-break:each-box;",
12374 "bgbk:c": "background-break:continuous;",
12375 "bgcp": "background-clip:|;",
12376 "bgcp:bb": "background-clip:border-box;",
12377 "bgcp:pb": "background-clip:padding-box;",
12378 "bgcp:cb": "background-clip:content-box;",
12379 "bgcp:nc": "background-clip:no-clip;",
12380 "bgo": "background-origin:|;",
12381 "bgo:pb": "background-origin:padding-box;",
12382 "bgo:bb": "background-origin:border-box;",
12383 "bgo:cb": "background-origin:content-box;",
12384 "bgz": "background-size:|;",
12385 "bgz:a": "background-size:auto;",
12386 "bgz:ct": "background-size:contain;",
12387 "bgz:cv": "background-size:cover;",
12388 "c": "color:#${1:000};",
12389 "cm": "/* |${child} */",
12390 "cn": "content:|;",
12391 "tbl": "table-layout:|;",
12392 "tbl:a": "table-layout:auto;",
12393 "tbl:f": "table-layout:fixed;",
12394 "cps": "caption-side:|;",
12395 "cps:t": "caption-side:top;",
12396 "cps:b": "caption-side:bottom;",
12397 "ec": "empty-cells:|;",
12398 "ec:s": "empty-cells:show;",
12399 "ec:h": "empty-cells:hide;",
12400 "lis": "list-style:|;",
12401 "lis:n": "list-style:none;",
12402 "lisp": "list-style-position:|;",
12403 "lisp:i": "list-style-position:inside;",
12404 "lisp:o": "list-style-position:outside;",
12405 "list": "list-style-type:|;",
12406 "list:n": "list-style-type:none;",
12407 "list:d": "list-style-type:disc;",
12408 "list:c": "list-style-type:circle;",
12409 "list:s": "list-style-type:square;",
12410 "list:dc": "list-style-type:decimal;",
12411 "list:dclz": "list-style-type:decimal-leading-zero;",
12412 "list:lr": "list-style-type:lower-roman;",
12413 "list:ur": "list-style-type:upper-roman;",
12414 "lisi": "list-style-image:|;",
12415 "lisi:n": "list-style-image:none;",
12416 "q": "quotes:|;",
12417 "q:n": "quotes:none;",
12418 "q:ru": "quotes:'\\00AB' '\\00BB' '\\201E' '\\201C';",
12419 "q:en": "quotes:'\\201C' '\\201D' '\\2018' '\\2019';",
12420 "ct": "content:|;",
12421 "ct:n": "content:normal;",
12422 "ct:oq": "content:open-quote;",
12423 "ct:noq": "content:no-open-quote;",
12424 "ct:cq": "content:close-quote;",
12425 "ct:ncq": "content:no-close-quote;",
12426 "ct:a": "content:attr(|);",
12427 "ct:c": "content:counter(|);",
12428 "ct:cs": "content:counters(|);",
12429 "coi": "counter-increment:|;",
12430 "cor": "counter-reset:|;",
12431 "va": "vertical-align:|;",
12432 "va:sup": "vertical-align:super;",
12433 "va:t": "vertical-align:top;",
12434 "va:tt": "vertical-align:text-top;",
12435 "va:m": "vertical-align:middle;",
12436 "va:bl": "vertical-align:baseline;",
12437 "va:b": "vertical-align:bottom;",
12438 "va:tb": "vertical-align:text-bottom;",
12439 "va:sub": "vertical-align:sub;",
12440 "ta": "text-align:|;",
12441 "ta:l": "text-align:left;",
12442 "ta:c": "text-align:center;",
12443 "ta:r": "text-align:right;",
12444 "tal": "text-align-last:|;",
12445 "tal:a": "text-align-last:auto;",
12446 "tal:l": "text-align-last:left;",
12447 "tal:c": "text-align-last:center;",
12448 "tal:r": "text-align-last:right;",
12449 "td": "text-decoration:|;",
12450 "td:n": "text-decoration:none;",
12451 "td:u": "text-decoration:underline;",
12452 "td:o": "text-decoration:overline;",
12453 "td:l": "text-decoration:line-through;",
12454 "te": "text-emphasis:|;",
12455 "te:n": "text-emphasis:none;",
12456 "te:ac": "text-emphasis:accent;",
12457 "te:dt": "text-emphasis:dot;",
12458 "te:c": "text-emphasis:circle;",
12459 "te:ds": "text-emphasis:disc;",
12460 "te:b": "text-emphasis:before;",
12461 "te:a": "text-emphasis:after;",
12462 "th": "text-height:|;",
12463 "th:a": "text-height:auto;",
12464 "th:f": "text-height:font-size;",
12465 "th:t": "text-height:text-size;",
12466 "th:m": "text-height:max-size;",
12467 "ti": "text-indent:|;",
12468 "ti:-": "text-indent:-9999px;",
12469 "tj": "text-justify:|;",
12470 "tj:a": "text-justify:auto;",
12471 "tj:iw": "text-justify:inter-word;",
12472 "tj:ii": "text-justify:inter-ideograph;",
12473 "tj:ic": "text-justify:inter-cluster;",
12474 "tj:d": "text-justify:distribute;",
12475 "tj:k": "text-justify:kashida;",
12476 "tj:t": "text-justify:tibetan;",
12477 "to": "text-outline:|;",
12478 "to+": "text-outline:${1:0} ${2:0} ${3:#000};",
12479 "to:n": "text-outline:none;",
12480 "tr": "text-replace:|;",
12481 "tr:n": "text-replace:none;",
12482 "tt": "text-transform:|;",
12483 "tt:n": "text-transform:none;",
12484 "tt:c": "text-transform:capitalize;",
12485 "tt:u": "text-transform:uppercase;",
12486 "tt:l": "text-transform:lowercase;",
12487 "tw": "text-wrap:|;",
12488 "tw:n": "text-wrap:normal;",
12489 "tw:no": "text-wrap:none;",
12490 "tw:u": "text-wrap:unrestricted;",
12491 "tw:s": "text-wrap:suppress;",
12492 "tsh": "text-shadow:${1:hoff} ${2:voff} ${3:blur} ${4:#000};",
12493 "tsh+": "text-shadow:${1:0} ${2:0} ${3:0} ${4:#000};",
12494 "tsh:n": "text-shadow:none;",
12495 "trf": "transform:|;",
12496 "trf:skx": "transform: skewX(${1:angle});",
12497 "trf:sky": "transform: skewY(${1:angle});",
12498 "trf:sc": "transform: scale(${1:x}, ${2:y});",
12499 "trf:scx": "transform: scaleX(${1:x});",
12500 "trf:scy": "transform: scaleY(${1:y});",
12501 "trf:r": "transform: rotate(${1:angle});",
12502 "trf:t": "transform: translate(${1:x}, ${2:y});",
12503 "trf:tx": "transform: translateX(${1:x});",
12504 "trf:ty": "transform: translateY(${1:y});",
12505 "trs": "transition:${1:prop} ${2:time};",
12506 "trsde": "transition-delay:${1:time};",
12507 "trsdu": "transition-duration:${1:time};",
12508 "trsp": "transition-property:${1:prop};",
12509 "trstf": "transition-timing-function:${1:tfunc};",
12510 "lh": "line-height:|;",
12511 "whs": "white-space:|;",
12512 "whs:n": "white-space:normal;",
12513 "whs:p": "white-space:pre;",
12514 "whs:nw": "white-space:nowrap;",
12515 "whs:pw": "white-space:pre-wrap;",
12516 "whs:pl": "white-space:pre-line;",
12517 "whsc": "white-space-collapse:|;",
12518 "whsc:n": "white-space-collapse:normal;",
12519 "whsc:k": "white-space-collapse:keep-all;",
12520 "whsc:l": "white-space-collapse:loose;",
12521 "whsc:bs": "white-space-collapse:break-strict;",
12522 "whsc:ba": "white-space-collapse:break-all;",
12523 "wob": "word-break:|;",
12524 "wob:n": "word-break:normal;",
12525 "wob:k": "word-break:keep-all;",
12526 "wob:l": "word-break:loose;",
12527 "wob:bs": "word-break:break-strict;",
12528 "wob:ba": "word-break:break-all;",
12529 "wos": "word-spacing:|;",
12530 "wow": "word-wrap:|;",
12531 "wow:nm": "word-wrap:normal;",
12532 "wow:n": "word-wrap:none;",
12533 "wow:u": "word-wrap:unrestricted;",
12534 "wow:s": "word-wrap:suppress;",
12535 "lts": "letter-spacing:|;",
12536 "f": "font:|;",
12537 "f+": "font:${1:1em} ${2:Arial,sans-serif};",
12538 "fw": "font-weight:|;",
12539 "fw:n": "font-weight:normal;",
12540 "fw:b": "font-weight:bold;",
12541 "fw:br": "font-weight:bolder;",
12542 "fw:lr": "font-weight:lighter;",
12543 "fs": "font-style:|;",
12544 "fs:n": "font-style:normal;",
12545 "fs:i": "font-style:italic;",
12546 "fs:o": "font-style:oblique;",
12547 "fv": "font-variant:|;",
12548 "fv:n": "font-variant:normal;",
12549 "fv:sc": "font-variant:small-caps;",
12550 "fz": "font-size:|;",
12551 "fza": "font-size-adjust:|;",
12552 "fza:n": "font-size-adjust:none;",
12553 "ff": "font-family:|;",
12554 "ff:s": "font-family:serif;",
12555 "ff:ss": "font-family:sans-serif;",
12556 "ff:c": "font-family:cursive;",
12557 "ff:f": "font-family:fantasy;",
12558 "ff:m": "font-family:monospace;",
12559 "fef": "font-effect:|;",
12560 "fef:n": "font-effect:none;",
12561 "fef:eg": "font-effect:engrave;",
12562 "fef:eb": "font-effect:emboss;",
12563 "fef:o": "font-effect:outline;",
12564 "fem": "font-emphasize:|;",
12565 "femp": "font-emphasize-position:|;",
12566 "femp:b": "font-emphasize-position:before;",
12567 "femp:a": "font-emphasize-position:after;",
12568 "fems": "font-emphasize-style:|;",
12569 "fems:n": "font-emphasize-style:none;",
12570 "fems:ac": "font-emphasize-style:accent;",
12571 "fems:dt": "font-emphasize-style:dot;",
12572 "fems:c": "font-emphasize-style:circle;",
12573 "fems:ds": "font-emphasize-style:disc;",
12574 "fsm": "font-smooth:|;",
12575 "fsm:a": "font-smooth:auto;",
12576 "fsm:n": "font-smooth:never;",
12577 "fsm:aw": "font-smooth:always;",
12578 "fst": "font-stretch:|;",
12579 "fst:n": "font-stretch:normal;",
12580 "fst:uc": "font-stretch:ultra-condensed;",
12581 "fst:ec": "font-stretch:extra-condensed;",
12582 "fst:c": "font-stretch:condensed;",
12583 "fst:sc": "font-stretch:semi-condensed;",
12584 "fst:se": "font-stretch:semi-expanded;",
12585 "fst:e": "font-stretch:expanded;",
12586 "fst:ee": "font-stretch:extra-expanded;",
12587 "fst:ue": "font-stretch:ultra-expanded;",
12588 "op": "opacity:|;",
12589 "op:ie": "filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100);",
12590 "op:ms": "-ms-filter:'progid:DXImageTransform.Microsoft.Alpha(Opacity=100)';",
12591 "rz": "resize:|;",
12592 "rz:n": "resize:none;",
12593 "rz:b": "resize:both;",
12594 "rz:h": "resize:horizontal;",
12595 "rz:v": "resize:vertical;",
12596 "cur": "cursor:|;",
12597 "cur:a": "cursor:auto;",
12598 "cur:d": "cursor:default;",
12599 "cur:c": "cursor:crosshair;",
12600 "cur:ha": "cursor:hand;",
12601 "cur:he": "cursor:help;",
12602 "cur:m": "cursor:move;",
12603 "cur:p": "cursor:pointer;",
12604 "cur:t": "cursor:text;",
12605 "pgbb": "page-break-before:|;",
12606 "pgbb:au": "page-break-before:auto;",
12607 "pgbb:al": "page-break-before:always;",
12608 "pgbb:l": "page-break-before:left;",
12609 "pgbb:r": "page-break-before:right;",
12610 "pgbi": "page-break-inside:|;",
12611 "pgbi:au": "page-break-inside:auto;",
12612 "pgbi:av": "page-break-inside:avoid;",
12613 "pgba": "page-break-after:|;",
12614 "pgba:au": "page-break-after:auto;",
12615 "pgba:al": "page-break-after:always;",
12616 "pgba:l": "page-break-after:left;",
12617 "pgba:r": "page-break-after:right;",
12618 "orp": "orphans:|;",
12619 "wid": "widows:|;"
12620 }
12621 },
12622
12623 "html": {
12624 "filters": "html",
12625 "snippets": {
12626 "c": "<!-- |${child} -->",
12627 "cc:ie6": "<!--[if lte IE 6]>\n\t${child}|\n<![endif]-->",
12628 "cc:ie": "<!--[if IE]>\n\t${child}|\n<![endif]-->",
12629 "cc:noie": "<!--[if !IE]><!-->\n\t${child}|\n<!--<![endif]-->",
12630 "html:4t": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n<html lang=\"${lang}\">\n<head>\n\t<meta http-equiv=\"Content-Type\" content=\"text/html;charset=${charset}\">\n\t<title>${1:Document}</title>\n</head>\n<body>\n\t${child}${2}\n</body>\n</html>",
12631 "html:4s": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n<html lang=\"${lang}\">\n<head>\n\t<meta http-equiv=\"Content-Type\" content=\"text/html;charset=${charset}\">\n\t<title>${1:Document}</title>\n</head>\n<body>\n\t${child}${2}\n</body>\n</html>",
12632 "html:xt": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"${lang}\">\n<head>\n\t<meta http-equiv=\"Content-Type\" content=\"text/html;charset=${charset}\" />\n\t<title></title>\n</head>\n<body>\n\t${child}${2}\n</body>\n</html>",
12633 "html:xs": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"${lang}\">\n<head>\n\t<meta http-equiv=\"Content-Type\" content=\"text/html;charset=${charset}\" />\n\t<title>${1:Document}</title>\n</head>\n<body>\n\t${child}${2}\n</body>\n</html>",
12634 "html:xxs": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\" \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"${lang}\">\n<head>\n\t<meta http-equiv=\"Content-Type\" content=\"text/html;charset=${charset}\" />\n\t<title>${1:Document}</title>\n</head>\n<body>\n\t${child}${2}\n</body>\n</html>",
12635 "html:5": "<!doctype html>\n<html lang=\"${lang}\">\n<head>\n\t<meta charset=\"${charset}\">\n\t<title>${1:Document}</title>\n</head>\n<body>\n\t${child}${2}\n</body>\n</html>"
12636 },
12637
12638 "abbreviations": {
12639 "!": "html:5",
12640 "a": "<a href=\"\">",
12641 "a:link": "<a href=\"http://|\">",
12642 "a:mail": "<a href=\"mailto:|\">",
12643 "abbr": "<abbr title=\"\">",
12644 "acronym": "<acronym title=\"\">",
12645 "base": "<base href=\"\" />",
12646 "bdo": "<bdo dir=\"\">",
12647 "bdo:r": "<bdo dir=\"rtl\">",
12648 "bdo:l": "<bdo dir=\"ltr\">",
12649 "link": "<link rel=\"stylesheet\" href=\"\" />",
12650 "link:css": "<link rel=\"stylesheet\" href=\"${1:style}.css\" media=\"all\" />",
12651 "link:print": "<link rel=\"stylesheet\" href=\"${1:print}.css\" media=\"print\" />",
12652 "link:favicon": "<link rel=\"shortcut icon\" type=\"image/x-icon\" href=\"${1:favicon.ico}\" />",
12653 "link:touch": "<link rel=\"apple-touch-icon\" href=\"${1:favicon.png}\" />",
12654 "link:rss": "<link rel=\"alternate\" type=\"application/rss+xml\" title=\"RSS\" href=\"${1:rss.xml}\" />",
12655 "link:atom": "<link rel=\"alternate\" type=\"application/atom+xml\" title=\"Atom\" href=\"${1:atom.xml}\" />",
12656 "meta:utf": "<meta http-equiv=\"Content-Type\" content=\"text/html;charset=UTF-8\" />",
12657 "meta:win": "<meta http-equiv=\"Content-Type\" content=\"text/html;charset=windows-1251\" />",
12658 "meta:compat": "<meta http-equiv=\"X-UA-Compatible\" content=\"${1:IE=7}\" />",
12659 "style": "<style>",
12660 "script": "<script>",
12661 "script:src": "<script src=\"\">",
12662 "img": "<img src=\"\" alt=\"\" />",
12663 "iframe": "<iframe src=\"\" frameborder=\"0\">",
12664 "embed": "<embed src=\"\" type=\"\" />",
12665 "object": "<object data=\"\" type=\"\">",
12666 "param": "<param name=\"\" value=\"\" />",
12667 "map": "<map name=\"\">",
12668 "area": "<area shape=\"\" coords=\"\" href=\"\" alt=\"\" />",
12669 "area:d": "<area shape=\"default\" href=\"\" alt=\"\" />",
12670 "area:c": "<area shape=\"circle\" coords=\"\" href=\"\" alt=\"\" />",
12671 "area:r": "<area shape=\"rect\" coords=\"\" href=\"\" alt=\"\" />",
12672 "area:p": "<area shape=\"poly\" coords=\"\" href=\"\" alt=\"\" />",
12673 "form": "<form action=\"\">",
12674 "form:get": "<form action=\"\" method=\"get\">",
12675 "form:post": "<form action=\"\" method=\"post\">",
12676 "label": "<label for=\"\">",
12677 "input": "<input type=\"\" />",
12678 "input:hidden": "<input type=\"hidden\" name=\"\" />",
12679 "input:h": "<input type=\"hidden\" name=\"\" />",
12680 "input:text": "<input type=\"text\" name=\"\" id=\"\" />",
12681 "input:t": "<input type=\"text\" name=\"\" id=\"\" />",
12682 "input:search": "<input type=\"search\" name=\"\" id=\"\" />",
12683 "input:email": "<input type=\"email\" name=\"\" id=\"\" />",
12684 "input:url": "<input type=\"url\" name=\"\" id=\"\" />",
12685 "input:password": "<input type=\"password\" name=\"\" id=\"\" />",
12686 "input:p": "<input type=\"password\" name=\"\" id=\"\" />",
12687 "input:datetime": "<input type=\"datetime\" name=\"\" id=\"\" />",
12688 "input:date": "<input type=\"date\" name=\"\" id=\"\" />",
12689 "input:datetime-local": "<input type=\"datetime-local\" name=\"\" id=\"\" />",
12690 "input:month": "<input type=\"month\" name=\"\" id=\"\" />",
12691 "input:week": "<input type=\"week\" name=\"\" id=\"\" />",
12692 "input:time": "<input type=\"time\" name=\"\" id=\"\" />",
12693 "input:number": "<input type=\"number\" name=\"\" id=\"\" />",
12694 "input:color": "<input type=\"color\" name=\"\" id=\"\" />",
12695 "input:checkbox": "<input type=\"checkbox\" name=\"\" id=\"\" />",
12696 "input:c": "<input type=\"checkbox\" name=\"\" id=\"\" />",
12697 "input:radio": "<input type=\"radio\" name=\"\" id=\"\" />",
12698 "input:r": "<input type=\"radio\" name=\"\" id=\"\" />",
12699 "input:range": "<input type=\"range\" name=\"\" id=\"\" />",
12700 "input:file": "<input type=\"file\" name=\"\" id=\"\" />",
12701 "input:f": "<input type=\"file\" name=\"\" id=\"\" />",
12702 "input:submit": "<input type=\"submit\" value=\"\" />",
12703 "input:s": "<input type=\"submit\" value=\"\" />",
12704 "input:image": "<input type=\"image\" src=\"\" alt=\"\" />",
12705 "input:i": "<input type=\"image\" src=\"\" alt=\"\" />",
12706 "input:reset": "<input type=\"reset\" value=\"\" />",
12707 "input:button": "<input type=\"button\" value=\"\" />",
12708 "input:b": "<input type=\"button\" value=\"\" />",
12709 "select": "<select name=\"\" id=\"\"></select>",
12710 "option": "<option value=\"\"></option>",
12711 "textarea": "<textarea name=\"\" id=\"\" cols=\"${1:30}\" rows=\"${2:10}\">",
12712 "menu:context": "<menu type=\"context\">",
12713 "menu:c": "<menu type=\"context\">",
12714 "menu:toolbar": "<menu type=\"toolbar\">",
12715 "menu:t": "<menu type=\"toolbar\">",
12716 "video": "<video src=\"\">",
12717 "audio": "<audio src=\"\">",
12718 "html:xml": "<html xmlns=\"http://www.w3.org/1999/xhtml\">",
12719
12720 "bq": "blockquote",
12721 "acr": "acronym",
12722 "fig": "figure",
12723 "figc": "figcaption",
12724 "ifr": "iframe",
12725 "emb": "embed",
12726 "obj": "object",
12727 "src": "source",
12728 "cap": "caption",
12729 "colg": "colgroup",
12730 "fst": "fieldset",
12731 "btn": "button",
12732 "optg": "optgroup",
12733 "opt": "option",
12734 "tarea": "textarea",
12735 "leg": "legend",
12736 "sect": "section",
12737 "art": "article",
12738 "hdr": "header",
12739 "ftr": "footer",
12740 "adr": "address",
12741 "dlg": "dialog",
12742 "str": "strong",
12743 "prog": "progress",
12744 "fset": "fieldset",
12745 "datag": "datagrid",
12746 "datal": "datalist",
12747 "kg": "keygen",
12748 "out": "output",
12749 "det": "details",
12750 "cmd": "command",
12751
12752 "ol+": "ol>li",
12753 "ul+": "ul>li",
12754 "dl+": "dl>dt+dd",
12755 "map+": "map>area",
12756 "table+": "table>tr>td",
12757 "colgroup+": "colgroup>col",
12758 "colg+": "colgroup>col",
12759 "tr+": "tr>td",
12760 "select+": "select>option",
12761 "optgroup+": "optgroup>option",
12762 "optg+": "optgroup>option"
12763 }
12764 },
12765
12766 "xml": {
12767 "extends": "html",
12768 "profile": "xml",
12769 "filters": "html"
12770 },
12771
12772 "xsl": {
12773 "extends": "html",
12774 "filters": "html, xsl",
12775 "abbreviations": {
12776 "tm": "<xsl:template match=\"\" mode=\"\">",
12777 "tmatch": "tm",
12778 "tn": "<xsl:template name=\"\">",
12779 "tname": "tn",
12780 "call": "<xsl:call-template name=\"\"/>",
12781 "ap": "<xsl:apply-templates select=\"\" mode=\"\"/>",
12782 "api": "<xsl:apply-imports/>",
12783 "imp": "<xsl:import href=\"\"/>",
12784 "inc": "<xsl:include href=\"\"/>",
12785
12786 "ch": "<xsl:choose>",
12787 "xsl:when": "<xsl:when test=\"\">",
12788 "wh": "xsl:when",
12789 "ot": "<xsl:otherwise>",
12790 "if": "<xsl:if test=\"\">",
12791
12792 "par": "<xsl:param name=\"\">",
12793 "pare": "<xsl:param name=\"\" select=\"\"/>",
12794 "var": "<xsl:variable name=\"\">",
12795 "vare": "<xsl:variable name=\"\" select=\"\"/>",
12796 "wp": "<xsl:with-param name=\"\" select=\"\"/>",
12797 "key": "<xsl:key name=\"\" match=\"\" use=\"\"/>",
12798
12799 "elem": "<xsl:element name=\"\">",
12800 "attr": "<xsl:attribute name=\"\">",
12801 "attrs": "<xsl:attribute-set name=\"\">",
12802
12803 "cp": "<xsl:copy select=\"\"/>",
12804 "co": "<xsl:copy-of select=\"\"/>",
12805 "val": "<xsl:value-of select=\"\"/>",
12806 "each": "<xsl:for-each select=\"\">",
12807 "for": "each",
12808 "tex": "<xsl:text></xsl:text>",
12809
12810 "com": "<xsl:comment>",
12811 "msg": "<xsl:message terminate=\"no\">",
12812 "fall": "<xsl:fallback>",
12813 "num": "<xsl:number value=\"\"/>",
12814 "nam": "<namespace-alias stylesheet-prefix=\"\" result-prefix=\"\"/>",
12815 "pres": "<xsl:preserve-space elements=\"\"/>",
12816 "strip": "<xsl:strip-space elements=\"\"/>",
12817 "proc": "<xsl:processing-instruction name=\"\">",
12818 "sort": "<xsl:sort select=\"\" order=\"\"/>",
12819
12820 "choose+": "xsl:choose>xsl:when+xsl:otherwise"
12821 }
12822 },
12823
12824 "haml": {
12825 "filters": "haml",
12826 "extends": "html"
12827 },
12828
12829 "scss": {
12830 "extends": "css"
12831 },
12832
12833 "sass": {
12834 "extends": "css"
12835 },
12836
12837 "less": {
12838 "extends": "css"
12839 },
12840
12841 "stylus": {
12842 "extends": "css"
12843 }
12844 }, 'system');});/**
12845 * Tests if passed keydown/keypress event corresponds to defied shortcut
12846 *
12847 * Based on http://www.openjs.com/scripts/events/keyboard_shortcuts/
12848 * By Binny V A
12849 * License : BSD
12850 */
12851 emmet.define('shortcut', function(){
12852 var is_opera = !!window.opera,
12853 is_mac = /mac\s+os/i.test(navigator.userAgent),
12854 //Work around for stupid Shift key bug created by using lowercase - as a result the shift+num combination was broken
12855 shift_nums = {
12856 "`":"~",
12857 "1":"!",
12858 "2":"@",
12859 "3":"#",
12860 "4":"$",
12861 "5":"%",
12862 "6":"^",
12863 "7":"&",
12864 "8":"*",
12865 "9":"(",
12866 "0":")",
12867 "-":"_",
12868 "=":"+",
12869 ";":":",
12870 "'":"\"",
12871 ",":"<",
12872 ".":">",
12873 "/":"?",
12874 "\\":"|"
12875 },
12876
12877 //Special Keys - and their codes
12878 special_keys = {
12879 'esc':27,
12880 'escape':27,
12881 'tab':9,
12882 'space':32,
12883 'return':13,
12884 'enter':13,
12885 'backspace':8,
12886
12887 'scrolllock':145,
12888 'scroll_lock':145,
12889 'scroll':145,
12890 'capslock':20,
12891 'caps_lock':20,
12892 'caps':20,
12893 'numlock':144,
12894 'num_lock':144,
12895 'num':144,
12896
12897 'pause':19,
12898 'break':19,
12899
12900 'insert':45,
12901 'home':36,
12902 'delete':46,
12903 'end':35,
12904
12905 'pageup':33,
12906 'page_up':33,
12907 'pu':33,
12908
12909 'pagedown':34,
12910 'page_down':34,
12911 'pd':34,
12912
12913 'plus': 187,
12914 'minus': 189,
12915
12916 'left':37,
12917 'up':38,
12918 'right':39,
12919 'down':40,
12920
12921 'f1':112,
12922 'f2':113,
12923 'f3':114,
12924 'f4':115,
12925 'f5':116,
12926 'f6':117,
12927 'f7':118,
12928 'f8':119,
12929 'f9':120,
12930 'f10':121,
12931 'f11':122,
12932 'f12':123
12933 },
12934
12935 mac_char_map = {
12936 'ctrl': '⌃',
12937 'control': '⌃',
12938 'meta': '⌘',
12939 'shift': '⇧',
12940 'alt': '⌥',
12941 'enter': '⏎',
12942 'tab': '⇥',
12943 'left': '←',
12944 'right': '→',
12945 'up': '↑',
12946 'down': '↓'
12947 },
12948
12949 pc_char_map = {
12950 'meta': 'Ctrl',
12951 'control': 'Ctrl',
12952 'left': '←',
12953 'right': '→',
12954 'up': '↑',
12955 'down': '↓'
12956 },
12957
12958 MODIFIERS = {
12959 SHIFT: 1,
12960 CTRL: 2,
12961 ALT: 4,
12962 META: 8
12963 };
12964
12965 /**
12966 * Makes first letter of string in uppercase
12967 * @param {String} str
12968 */
12969 function capitalize(str) {
12970 return str.charAt().toUpperCase() + str.substring(1);
12971 }
12972
12973 return {
12974 /**
12975 * Compile keyboard combination for faster tests
12976 * @param {String|Object} combination
12977 */
12978 compile: function(combination) {
12979 if (typeof combination != 'string') //already compiled
12980 return combination;
12981
12982 var mask = 0,
12983 keys = combination.toLowerCase().split('+'),
12984 key,
12985 k;
12986
12987 for(var i = 0, il = keys.length; i < il; i++) {
12988 k = keys[i];
12989 // Due to stupid Opera bug I have to swap Ctrl and Meta keys
12990 if (is_mac && is_opera) {
12991 if (k == 'ctrl' || k == 'control')
12992 k = 'meta';
12993 else if (k == 'meta')
12994 k = 'ctrl';
12995 } else if (!is_mac && k == 'meta') {
12996 k = 'ctrl';
12997 }
12998
12999 //Modifiers
13000 if(k == 'ctrl' || k == 'control')
13001 mask |= MODIFIERS.CTRL;
13002 else if (k == 'shift')
13003 mask |= MODIFIERS.SHIFT;
13004 else if (k == 'alt')
13005 mask |= MODIFIERS.ALT;
13006 else if (k == 'meta')
13007 mask |= MODIFIERS.META;
13008 else
13009 key = k;
13010 }
13011
13012 return {
13013 mask: mask,
13014 key: key
13015 };
13016 },
13017
13018 /**
13019 * Test shortcut combination against event
13020 * @param {String} combination Keyboard shortcut
13021 * @param {Event} evt
13022 */
13023 test: function(combination, evt) {
13024 var mask = 0,
13025 ccomb = this.compile(combination);
13026
13027 if (evt.ctrlKey) mask |= MODIFIERS.CTRL;
13028 if (evt.shiftKey) mask |= MODIFIERS.SHIFT;
13029 if (evt.altKey) mask |= MODIFIERS.ALT;
13030 if (evt.metaKey) mask |= MODIFIERS.META;
13031
13032 var code = evt.keyCode ? evt.keyCode : evt.which,
13033 character = String.fromCharCode(code).toLowerCase();
13034
13035 // if mask doesn't match, no need to test further
13036 if (mask !== ccomb.mask) return false;
13037
13038 if (ccomb.key.length > 1) { //If it is a special key
13039 return special_keys[ccomb.key] == code;
13040 } else { //The special keys did not match
13041 if(code == 188) character = ","; //If the user presses , when the type is onkeydown
13042 if(code == 190) character = ".";
13043 if(code == 191) character = "/";
13044
13045 if (character == ccomb.key) return true;
13046 if (evt.shiftKey && shift_nums[character]) //Stupid Shift key bug created by using lowercase
13047 return shift_nums[character] == ccomb.key;
13048 }
13049
13050 return false;
13051 },
13052
13053 /**
13054 * Format keystroke for better readability, considering current platform
13055 * mnemonics
13056 * @param {String} keystroke
13057 * @return {String}
13058 */
13059 format: function(keystroke) {
13060 var char_map = is_mac ? mac_char_map : pc_char_map,
13061 glue = is_mac ? '' : '+',
13062 keys = keystroke.toLowerCase().split('+'),
13063 ar = [],
13064 key;
13065
13066 for (var i = 0; i < keys.length; i++) {
13067 key = keys[i];
13068 ar.push(key in char_map ? char_map[key] : capitalize(key));
13069 }
13070
13071 return ar.join(glue);
13072 }
13073 };
13074 });/**
13075 * @author Sergey Chikuyonok (serge.che@gmail.com)
13076 * @link http://chikuyonok.ru
13077 * @constructor
13078 * @memberOf __emmetEditorTextarea
13079 * @param {Function} require
13080 * @param {Underscore} _
13081 */
13082 emmet.define('editor', function(require, _) {
13083 /** @param {Element} Source element */
13084 var target = null;
13085
13086 // different browser uses different newlines, so we have to figure out
13087 // native browser newline and sanitize incoming text with them
13088 var tx = document.createElement('textarea');
13089 tx.value = '\n';
13090
13091 require('utils').setNewline(tx.value);
13092 tx = null;
13093
13094 return {
13095 setContext: function(elem) {
13096 target = elem;
13097 },
13098
13099 getContext: function() {
13100 return target;
13101 },
13102
13103 getSelectionRange: function() {
13104 if ('selectionStart' in target) { // W3C's DOM
13105 return {
13106 start: target.selectionStart,
13107 end: target.selectionEnd
13108 };
13109 } else if (document.selection) { // IE
13110 target.focus();
13111
13112 var range = document.selection.createRange();
13113
13114 if (range === null) {
13115 return {
13116 start: 0,
13117 end: this.getContent().length
13118 };
13119 }
13120
13121 var re = target.createTextRange();
13122 var rc = re.duplicate();
13123 re.moveToBookmark(range.getBookmark());
13124 rc.setEndPoint('EndToStart', re);
13125
13126 return {
13127 start: rc.text.length,
13128 end: rc.text.length + range.text.length
13129 };
13130 } else {
13131 return null;
13132 }
13133 },
13134
13135 /**
13136 * Creates text selection on target element
13137 * @param {Number} start
13138 * @param {Number} end
13139 */
13140 createSelection: function(start, end) {
13141 // W3C's DOM
13142 if (typeof(end) == 'undefined')
13143 end = start;
13144
13145 if ('setSelectionRange' in target) {
13146 target.setSelectionRange(start, end);
13147 } else if ('createTextRange' in target) {
13148 var t = target.createTextRange();
13149
13150 t.collapse(true);
13151 var utils = require('utils');
13152 var delta = utils.splitByLines(this.getContent().substring(0, start)).length - 1;
13153
13154 // IE has an issue with handling newlines while creating selection,
13155 // so we need to adjust start and end indexes
13156 end -= delta + utils.splitByLines(this.getContent().substring(start, end)).length - 1;
13157 start -= delta;
13158
13159 t.moveStart('character', start);
13160 t.moveEnd('character', end - start);
13161 t.select();
13162 }
13163 },
13164
13165 /**
13166 * Returns current line's start and end indexes
13167 */
13168 getCurrentLineRange: function() {
13169 var caretPos = this.getCaretPos();
13170 if (caretPos === null) return null;
13171 return require('utils').findNewlineBounds(this.getContent(), caretPos);
13172 },
13173
13174 /**
13175 * Returns current caret position
13176 * @return {Number}
13177 */
13178 getCaretPos: function() {
13179 var selection = this.getSelectionRange();
13180 return selection ? selection.start : null;
13181 },
13182
13183 /**
13184 * Set new caret position
13185 * @param {Number} pos Caret position
13186 */
13187 setCaretPos: function(pos) {
13188 this.createSelection(pos);
13189 },
13190
13191 /**
13192 * Returns content of current line
13193 * @return {String}
13194 */
13195 getCurrentLine: function() {
13196 var range = this.getCurrentLineRange();
13197 return range.start < range.end ? this.getContent().substring(range.start, range.end) : '';
13198 },
13199
13200 /**
13201 * Replace editor's content or it's part (from <code>start</code> to
13202 * <code>end</code> index). If <code>value</code> contains
13203 * <code>caret_placeholder</code>, the editor will put caret into
13204 * this position. If you skip <code>start</code> and <code>end</code>
13205 * arguments, the whole target's content will be replaced with
13206 * <code>value</code>.
13207 *
13208 * If you pass <code>start</code> argument only,
13209 * the <code>value</code> will be placed at <code>start</code> string
13210 * index of current content.
13211 *
13212 * If you pass <code>start</code> and <code>end</code> arguments,
13213 * the corresponding substring of current target's content will be
13214 * replaced with <code>value</code>.
13215 * @param {String} value Content you want to paste
13216 * @param {Number} start Start index of editor's content
13217 * @param {Number} end End index of editor's content
13218 * @param {Boolean} noIndent Do not auto indent <code>value</code>
13219 */
13220 replaceContent: function(value, start, end, noIndent) {
13221 var content = this.getContent();
13222 var utils = require('utils');
13223
13224 if (_.isUndefined(end))
13225 end = _.isUndefined(start) ? content.length : start;
13226 if (_.isUndefined(start)) start = 0;
13227
13228 // indent new value
13229 if (!noIndent) {
13230 value = utils.padString(value, utils.getLinePaddingFromPosition(content, start));
13231 }
13232
13233 // find new caret position
13234 var tabstopData = emmet.require('tabStops').extract(value, {
13235 escape: function(ch) {
13236 return ch;
13237 }
13238 });
13239 value = tabstopData.text;
13240
13241 var firstTabStop = tabstopData.tabstops[0];
13242 if (firstTabStop) {
13243 firstTabStop.start += start;
13244 firstTabStop.end += start;
13245 } else {
13246 firstTabStop = {
13247 start: value.length + start,
13248 end: value.length + start
13249 };
13250 }
13251
13252 try {
13253 target.value = utils.replaceSubstring(content, value, start, end);
13254 this.createSelection(firstTabStop.start, firstTabStop.end);
13255 } catch(e){}
13256 },
13257
13258 /**
13259 * Returns editor's content
13260 * @return {String}
13261 */
13262 getContent: function() {
13263 return target.value || '';
13264 },
13265
13266 /**
13267 * Returns current editor's syntax mode
13268 * @return {String}
13269 */
13270 getSyntax: function(){
13271 var syntax = require('textarea').getOption('syntax');
13272 var caretPos = this.getCaretPos();
13273
13274 if (!require('resources').hasSyntax(syntax))
13275 syntax = 'html';
13276
13277 if (syntax == 'html') {
13278 // get the context tag
13279 var pair = require('html_matcher').getTags(this.getContent(), caretPos);
13280 if (pair && pair[0] && pair[0].type == 'tag' && pair[0].name.toLowerCase() == 'style') {
13281 // check that we're actually inside the tag
13282 if (pair[0].end <= caretPos && pair[1].start >= caretPos)
13283 syntax = 'css';
13284 }
13285 }
13286 return syntax;
13287 },
13288
13289 /**
13290 * Returns current output profile name (@see emmet#setupProfile)
13291 * @return {String}
13292 */
13293 getProfileName: function() {
13294 return require('textarea').getOption('profile');
13295 },
13296
13297 /**
13298 * Ask user to enter something
13299 * @param {String} title Dialog title
13300 * @return {String} Entered data
13301 * @since 0.65
13302 */
13303 prompt: function(title) {
13304 return prompt(title);
13305 },
13306
13307 /**
13308 * Returns current selection
13309 * @return {String}
13310 * @since 0.65
13311 */
13312 getSelection: function() {
13313 var sel = this.getSelectionRange();
13314 if (sel) {
13315 try {
13316 return this.getContent().substring(sel.start, sel.end);
13317 } catch(e) {}
13318 }
13319
13320 return '';
13321 },
13322
13323 /**
13324 * Returns current editor's file path
13325 * @return {String}
13326 * @since 0.65
13327 */
13328 getFilePath: function() {
13329 return location.href;
13330 }
13331 };
13332 });
13333 /**
13334 * Controller for Emmet for textarea plugin: handles user interaction
13335 * and calls Emmet commands
13336 * @param {Function} require
13337 * @param {Underscore} _
13338 */
13339 emmet.define('textarea', function(require, _) {
13340 var keymap = {
13341 'Meta+E': 'expand_abbreviation',
13342 'Tab': 'expand_abbreviation',
13343 'Meta+D': 'match_pair_outward',
13344 'Shift+Meta+D': 'match_pair_inward',
13345 'Shift+Meta+A': 'wrap_with_abbreviation',
13346 'Ctrl+Alt+Right': 'next_edit_point',
13347 'Ctrl+Alt+Left': 'prev_edit_point',
13348 'Meta+L': 'select_line',
13349 'Meta+Shift+M': 'merge_lines',
13350 'Meta+/': 'toggle_comment',
13351 'Meta+J': 'split_join_tag',
13352 'Meta+K': 'remove_tag',
13353 'Shift+Meta+Y': 'evaluate_math_expression',
13354
13355 'Ctrl+Up': 'increment_number_by_1',
13356 'Ctrl+Down': 'decrement_number_by_1',
13357 'Alt+Up': 'increment_number_by_01',
13358 'Alt+Down': 'decrement_number_by_01',
13359 'Ctrl+Alt+Up': 'increment_number_by_10',
13360 'Ctrl+Alt+Down': 'decrement_number_by_10',
13361
13362 'Meta+.': 'select_next_item',
13363 'Meta+,': 'select_previous_item',
13364 'Meta+Shift+B': 'reflect_css_value',
13365
13366 'Enter': 'insert_formatted_line_break'
13367 };
13368
13369 var defaultOptions = {
13370 profile: 'xhtml',
13371 syntax: 'html',
13372 use_tab: false,
13373 pretty_break: false
13374 };
13375
13376 var keyboardShortcuts = {};
13377 var options = {};
13378
13379
13380 /**
13381 * Get Emmet options from element's class name
13382 */
13383 function getOptionsFromContext() {
13384 var paramStr = require('editor').getContext().className || '';
13385 var reParam = /\bemmet\-(\w+)\-(\w+)/g;
13386 var result = copyOptions(options);
13387 var m;
13388
13389 while ( (m = reParam.exec(paramStr)) ) {
13390 var key = m[1].toLowerCase(),
13391 value = m[2].toLowerCase();
13392
13393 if (value == 'true' || value == 'yes' || value == '1')
13394 value = true;
13395 else if (value == 'false' || value == 'no' || value == '0')
13396 value = false;
13397
13398 result[key] = value;
13399 }
13400
13401 return result;
13402 }
13403
13404 function getOption(name) {
13405 return getOptionsFromContext()[name];
13406 }
13407
13408 function copyOptions(opt) {
13409 return _.extend({}, defaultOptions, opt || {});
13410 }
13411
13412 /**
13413 * Bind shortcut to Emmet action
13414 * @param {String} keystroke
13415 * @param {String} label
13416 * @param {String} actionName
13417 */
13418 function addShortcut(keystroke, actionName) {
13419 keyboardShortcuts[keystroke.toLowerCase()] = {
13420 compiled: require('shortcut').compile(keystroke),
13421 action: actionName
13422 };
13423 }
13424
13425 function stopEvent(evt) {
13426 evt.cancelBubble = true;
13427 evt.returnValue = false;
13428
13429 if (evt.stopPropagation) {
13430 evt.stopPropagation();
13431 evt.preventDefault();
13432 }
13433 }
13434
13435 /**
13436 * Runs actions called by user
13437 * @param {Event} evt Event object
13438 */
13439 function runAction(evt) {
13440 evt = evt || window.event;
13441
13442 /** @type {Element} */
13443 var targetElem = evt.target || evt.srcElement;
13444 var keyCode = evt.keyCode || evt.which;
13445
13446 var editor = require('editor');
13447 var shortcut = require('shortcut');
13448
13449 if (targetElem && targetElem.nodeType == 1 && targetElem.nodeName == 'TEXTAREA') {
13450 editor.setContext(targetElem);
13451
13452 // test if occurred event corresponds to one of the defined shortcut
13453 return !_.find(keyboardShortcuts, function(sh) {
13454 if (shortcut.test(sh.compiled, evt)) {
13455 var actionName = sh.action;
13456 switch (actionName) {
13457 case 'expand_abbreviation':
13458 if (keyCode == 9) {
13459 if (getOption('use_tab'))
13460 actionName = 'expand_abbreviation_with_tab';
13461 else
13462 // user pressed Tab key but it's forbidden in
13463 // Emmet: bubble up event
13464 return false;
13465 }
13466 break;
13467 case 'insert_formatted_line_break':
13468 if (keyCode == 13 && !getOption('pretty_break')) {
13469 // user pressed Enter but it's forbidden in
13470 // Emmet: bubble up event
13471 return false;
13472 }
13473 break;
13474 }
13475
13476 require('actions').run(actionName, editor);
13477 stopEvent(evt);
13478 return true;
13479 }
13480 });
13481 }
13482
13483 // allow event bubbling
13484 return true;
13485 }
13486
13487 var doc = document;
13488 var keyEvent = window.opera ? 'keypress' : 'keydown';
13489
13490 //Attach the function with the event
13491 if (doc.addEventListener) doc.addEventListener(keyEvent, runAction, false);
13492 else if(doc.attachEvent) ele.attachEvent('on' + keyEvent, runAction);
13493 else doc['on' + keyEvent] = func;
13494
13495 options = copyOptions();
13496 _.each(keymap, function(actionName, keystroke) {
13497 addShortcut(keystroke, actionName);
13498 });
13499
13500 return {
13501 /**
13502 * Custom editor method: set default options (like syntax, tabs,
13503 * etc.) for editor
13504 * @param {Object} opt
13505 */
13506 setOptions: function(opt) {
13507 options = copyOptions(opt);
13508 },
13509
13510 /**
13511 * Custom method: returns current context's option value
13512 * @param {String} name Option name
13513 * @return {String}
13514 */
13515 getOption: getOption,
13516
13517 addShortcut: addShortcut,
13518
13519 /**
13520 * Removes shortcut binding
13521 * @param {String} keystroke
13522 */
13523 unbindShortcut: function(keystroke) {
13524 keystroke = keystroke.toLowerCase();
13525 if (keystroke in keyboardShortcuts)
13526 delete keyboardShortcuts[keystroke];
13527 },
13528
13529 /**
13530 * Returns array of binded actions and their keystrokes
13531 * @return {Array}
13532 */
13533 getShortcuts: function() {
13534 var shortcut = require('shortcut');
13535 var actions = require('actions');
13536 return _.compact(_.map(keyboardShortcuts, function(sh, key) {
13537 var keyLower = key.toLowerCase();
13538
13539 // skip some internal bindings
13540 if (keyLower == 'tab' || keyLower == 'enter')
13541 return;
13542
13543 return {
13544 keystroke: shortcut.format(key),
13545 compiled: sh.compiled,
13546 label: _.last((actions.get(sh.action).options.label || sh.action).split('/')),
13547 action: sh.action
13548 };
13549 }));
13550 },
13551
13552 getInfo: function() {
13553 var message = 'This textareas on this page are powered by Emmet toolkit.\n\n' +
13554 'Available shortcuts:\n';
13555 var actions = _.map(this.getShortcuts(), function(shortcut) {
13556 return shortcut.keystroke + ' — ' + shortcut.label;
13557 });
13558
13559 message += actions.join('\n') + '\n\n';
13560 message += 'More info on http://emmet.io/';
13561
13562 return message;
13563 },
13564
13565 /**
13566 * Show info window about Emmet
13567 */
13568 showInfo: function() {
13569 alert(this.getInfo());
13570 },
13571
13572 /**
13573 * Setup editor. Pass object with values defined in
13574 * <code>default_options</code>
13575 */
13576 setup: function(opt) {
13577 this.setOptions(opt);
13578 }
13579 };
13580 });
forum/static/js/widget/emmet.min.js
File was created 1 var _=function(){function g(a,b,c){if(a===b)return a!==0||1/a==1/b;if(a==null||b==null)return a===b;if(a._chain)a=a._wrapped;if(b._chain)b=b._wrapped;if(a.isEqual&&k.isFunction(a.isEqual))return a.isEqual(b);if(b.isEqual&&k.isFunction(b.isEqual))return b.isEqual(a);var d=i.call(a);if(d!=i.call(b))return!1;switch(d){case "[object String]":return a==String(b);case "[object Number]":return a!=+a?b!=+b:a==0?1/a==1/b:a==+b;case "[object Date]":case "[object Boolean]":return+a==+b;case "[object RegExp]":return a.source==
2 b.source&&a.global==b.global&&a.multiline==b.multiline&&a.ignoreCase==b.ignoreCase}if(typeof a!="object"||typeof b!="object")return!1;for(var e=c.length;e--;)if(c[e]==a)return!0;c.push(a);var e=0,j=!0;if(d=="[object Array]"){if(e=a.length,j=e==b.length)for(;e--;)if(!(j=e in a==e in b&&g(a[e],b[e],c)))break}else{if("constructor"in a!="constructor"in b||a.constructor!=b.constructor)return!1;for(var h in a)if(k.has(a,h)&&(e++,!(j=k.has(b,h)&&g(a[h],b[h],c))))break;if(j){for(h in b)if(k.has(b,h)&&!e--)break;
3 j=!e}}c.pop();return j}var e=this,f=e._,h={},b=Array.prototype,c=Object.prototype,a=b.slice,d=b.unshift,i=c.toString,j=c.hasOwnProperty,n=b.forEach,m=b.map,l=b.reduce,o=b.reduceRight,p=b.filter,r=b.every,q=b.some,x=b.indexOf,s=b.lastIndexOf,c=Array.isArray,w=Object.keys,y=Function.prototype.bind,k=function(a){return new A(a)};if(typeof exports!=="undefined"){if(typeof module!=="undefined"&&module.exports)exports=module.exports=k;exports._=k}else e._=k;k.VERSION="1.3.3";var u=k.each=k.forEach=function(a,
4 b,c){if(a!=null)if(n&&a.forEach===n)a.forEach(b,c);else if(a.length===+a.length)for(var d=0,i=a.length;d<i;d++){if(d in a&&b.call(c,a[d],d,a)===h)break}else for(d in a)if(k.has(a,d)&&b.call(c,a[d],d,a)===h)break};k.map=k.collect=function(a,b,c){var d=[];if(a==null)return d;if(m&&a.map===m)return a.map(b,c);u(a,function(a,k,i){d[d.length]=b.call(c,a,k,i)});if(a.length===+a.length)d.length=a.length;return d};k.reduce=k.foldl=k.inject=function(a,b,c,d){var i=arguments.length>2;a==null&&(a=[]);if(l&&
5 a.reduce===l)return d&&(b=k.bind(b,d)),i?a.reduce(b,c):a.reduce(b);u(a,function(a,k,e){i?c=b.call(d,c,a,k,e):(c=a,i=!0)});if(!i)throw new TypeError("Reduce of empty array with no initial value");return c};k.reduceRight=k.foldr=function(a,b,c,d){var i=arguments.length>2;a==null&&(a=[]);if(o&&a.reduceRight===o)return d&&(b=k.bind(b,d)),i?a.reduceRight(b,c):a.reduceRight(b);var e=k.toArray(a).reverse();d&&!i&&(b=k.bind(b,d));return i?k.reduce(e,b,c,d):k.reduce(e,b)};k.find=k.detect=function(a,b,c){var d;
6 E(a,function(a,i,k){if(b.call(c,a,i,k))return d=a,!0});return d};k.filter=k.select=function(a,b,c){var d=[];if(a==null)return d;if(p&&a.filter===p)return a.filter(b,c);u(a,function(a,i,k){b.call(c,a,i,k)&&(d[d.length]=a)});return d};k.reject=function(a,b,c){var d=[];if(a==null)return d;u(a,function(a,i,k){b.call(c,a,i,k)||(d[d.length]=a)});return d};k.every=k.all=function(a,b,c){var d=!0;if(a==null)return d;if(r&&a.every===r)return a.every(b,c);u(a,function(a,i,k){if(!(d=d&&b.call(c,a,i,k)))return h});
7 return!!d};var E=k.some=k.any=function(a,b,c){b||(b=k.identity);var d=!1;if(a==null)return d;if(q&&a.some===q)return a.some(b,c);u(a,function(a,i,k){if(d||(d=b.call(c,a,i,k)))return h});return!!d};k.include=k.contains=function(a,b){var c=!1;return a==null?c:x&&a.indexOf===x?a.indexOf(b)!=-1:c=E(a,function(a){return a===b})};k.invoke=function(b,c){var d=a.call(arguments,2);return k.map(b,function(a){return(k.isFunction(c)?c||a:a[c]).apply(a,d)})};k.pluck=function(a,b){return k.map(a,function(a){return a[b]})};
8 k.max=function(a,b,c){if(!b&&k.isArray(a)&&a[0]===+a[0])return Math.max.apply(Math,a);if(!b&&k.isEmpty(a))return-Infinity;var d={computed:-Infinity};u(a,function(a,i,k){i=b?b.call(c,a,i,k):a;i>=d.computed&&(d={value:a,computed:i})});return d.value};k.min=function(a,b,c){if(!b&&k.isArray(a)&&a[0]===+a[0])return Math.min.apply(Math,a);if(!b&&k.isEmpty(a))return Infinity;var d={computed:Infinity};u(a,function(a,i,k){i=b?b.call(c,a,i,k):a;i<d.computed&&(d={value:a,computed:i})});return d.value};k.shuffle=
9 function(a){var b=[],c;u(a,function(a,d){c=Math.floor(Math.random()*(d+1));b[d]=b[c];b[c]=a});return b};k.sortBy=function(a,b,c){var d=k.isFunction(b)?b:function(a){return a[b]};return k.pluck(k.map(a,function(a,b,i){return{value:a,criteria:d.call(c,a,b,i)}}).sort(function(a,b){var c=a.criteria,d=b.criteria;return c===void 0?1:d===void 0?-1:c<d?-1:c>d?1:0}),"value")};k.groupBy=function(a,b){var c={},d=k.isFunction(b)?b:function(a){return a[b]};u(a,function(a,b){var i=d(a,b);(c[i]||(c[i]=[])).push(a)});
10 return c};k.sortedIndex=function(a,b,c){c||(c=k.identity);for(var d=0,i=a.length;d<i;){var e=d+i>>1;c(a[e])<c(b)?d=e+1:i=e}return d};k.toArray=function(b){return!b?[]:k.isArray(b)?a.call(b):k.isArguments(b)?a.call(b):b.toArray&&k.isFunction(b.toArray)?b.toArray():k.values(b)};k.size=function(a){return k.isArray(a)?a.length:k.keys(a).length};k.first=k.head=k.take=function(b,c,d){return c!=null&&!d?a.call(b,0,c):b[0]};k.initial=function(b,c,d){return a.call(b,0,b.length-(c==null||d?1:c))};k.last=function(b,
11 c,d){return c!=null&&!d?a.call(b,Math.max(b.length-c,0)):b[b.length-1]};k.rest=k.tail=function(b,c,d){return a.call(b,c==null||d?1:c)};k.compact=function(a){return k.filter(a,function(a){return!!a})};k.flatten=function(a,b){return k.reduce(a,function(a,c){if(k.isArray(c))return a.concat(b?c:k.flatten(c));a[a.length]=c;return a},[])};k.without=function(b){return k.difference(b,a.call(arguments,1))};k.uniq=k.unique=function(a,b,c){var c=c?k.map(a,c):a,d=[];a.length<3&&(b=!0);k.reduce(c,function(c,i,
12 e){if(b?k.last(c)!==i||!c.length:!k.include(c,i))c.push(i),d.push(a[e]);return c},[]);return d};k.union=function(){return k.uniq(k.flatten(arguments,!0))};k.intersection=k.intersect=function(b){var c=a.call(arguments,1);return k.filter(k.uniq(b),function(a){return k.every(c,function(b){return k.indexOf(b,a)>=0})})};k.difference=function(b){var c=k.flatten(a.call(arguments,1),!0);return k.filter(b,function(a){return!k.include(c,a)})};k.zip=function(){for(var b=a.call(arguments),c=k.max(k.pluck(b,"length")),
13 d=Array(c),i=0;i<c;i++)d[i]=k.pluck(b,""+i);return d};k.indexOf=function(a,b,c){if(a==null)return-1;var d;if(c)return c=k.sortedIndex(a,b),a[c]===b?c:-1;if(x&&a.indexOf===x)return a.indexOf(b);c=0;for(d=a.length;c<d;c++)if(c in a&&a[c]===b)return c;return-1};k.lastIndexOf=function(a,b){if(a==null)return-1;if(s&&a.lastIndexOf===s)return a.lastIndexOf(b);for(var c=a.length;c--;)if(c in a&&a[c]===b)return c;return-1};k.range=function(a,b,c){arguments.length<=1&&(b=a||0,a=0);for(var c=arguments[2]||1,
14 d=Math.max(Math.ceil((b-a)/c),0),i=0,k=Array(d);i<d;)k[i++]=a,a+=c;return k};var F=function(){};k.bind=function(b,c){var d,i;if(b.bind===y&&y)return y.apply(b,a.call(arguments,1));if(!k.isFunction(b))throw new TypeError;i=a.call(arguments,2);return d=function(){if(!(this instanceof d))return b.apply(c,i.concat(a.call(arguments)));F.prototype=b.prototype;var k=new F,e=b.apply(k,i.concat(a.call(arguments)));return Object(e)===e?e:k}};k.bindAll=function(b){var c=a.call(arguments,1);c.length==0&&(c=k.functions(b));
15 u(c,function(a){b[a]=k.bind(b[a],b)});return b};k.memoize=function(a,b){var c={};b||(b=k.identity);return function(){var d=b.apply(this,arguments);return k.has(c,d)?c[d]:c[d]=a.apply(this,arguments)}};k.delay=function(b,c){var d=a.call(arguments,2);return setTimeout(function(){return b.apply(null,d)},c)};k.defer=function(b){return k.delay.apply(k,[b,1].concat(a.call(arguments,1)))};k.throttle=function(a,b){var c,d,i,e,j,h,f=k.debounce(function(){j=e=!1},b);return function(){c=this;d=arguments;var k;
16 i||(i=setTimeout(function(){i=null;j&&a.apply(c,d);f()},b));e?j=!0:h=a.apply(c,d);f();e=!0;return h}};k.debounce=function(a,b,c){var d;return function(){var i=this,k=arguments;c&&!d&&a.apply(i,k);clearTimeout(d);d=setTimeout(function(){d=null;c||a.apply(i,k)},b)}};k.once=function(a){var b=!1,c;return function(){if(b)return c;b=!0;return c=a.apply(this,arguments)}};k.wrap=function(b,c){return function(){var d=[b].concat(a.call(arguments,0));return c.apply(this,d)}};k.compose=function(){var a=arguments;
17 return function(){for(var b=arguments,c=a.length-1;c>=0;c--)b=[a[c].apply(this,b)];return b[0]}};k.after=function(a,b){return a<=0?b():function(){if(--a<1)return b.apply(this,arguments)}};k.keys=w||function(a){if(a!==Object(a))throw new TypeError("Invalid object");var b=[],c;for(c in a)k.has(a,c)&&(b[b.length]=c);return b};k.values=function(a){return k.map(a,k.identity)};k.functions=k.methods=function(a){var b=[],c;for(c in a)k.isFunction(a[c])&&b.push(c);return b.sort()};k.extend=function(b){u(a.call(arguments,
18 1),function(a){for(var c in a)b[c]=a[c]});return b};k.pick=function(b){var c={};u(k.flatten(a.call(arguments,1)),function(a){a in b&&(c[a]=b[a])});return c};k.defaults=function(b){u(a.call(arguments,1),function(a){for(var c in a)b[c]==null&&(b[c]=a[c])});return b};k.clone=function(a){return!k.isObject(a)?a:k.isArray(a)?a.slice():k.extend({},a)};k.tap=function(a,b){b(a);return a};k.isEqual=function(a,b){return g(a,b,[])};k.isEmpty=function(a){if(a==null)return!0;if(k.isArray(a)||k.isString(a))return a.length===
19 0;for(var b in a)if(k.has(a,b))return!1;return!0};k.isElement=function(a){return!!(a&&a.nodeType==1)};k.isArray=c||function(a){return i.call(a)=="[object Array]"};k.isObject=function(a){return a===Object(a)};k.isArguments=function(a){return i.call(a)=="[object Arguments]"};if(!k.isArguments(arguments))k.isArguments=function(a){return!(!a||!k.has(a,"callee"))};k.isFunction=function(a){return i.call(a)=="[object Function]"};k.isString=function(a){return i.call(a)=="[object String]"};k.isNumber=function(a){return i.call(a)==
20 "[object Number]"};k.isFinite=function(a){return k.isNumber(a)&&isFinite(a)};k.isNaN=function(a){return a!==a};k.isBoolean=function(a){return a===!0||a===!1||i.call(a)=="[object Boolean]"};k.isDate=function(a){return i.call(a)=="[object Date]"};k.isRegExp=function(a){return i.call(a)=="[object RegExp]"};k.isNull=function(a){return a===null};k.isUndefined=function(a){return a===void 0};k.has=function(a,b){return j.call(a,b)};k.noConflict=function(){e._=f;return this};k.identity=function(a){return a};
21 k.times=function(a,b,c){for(var d=0;d<a;d++)b.call(c,d)};k.escape=function(a){return(""+a).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/\//g,"&#x2F;")};k.result=function(a,b){if(a==null)return null;var c=a[b];return k.isFunction(c)?c.call(a):c};k.mixin=function(a){u(k.functions(a),function(b){G(b,k[b]=a[b])})};var t=0;k.uniqueId=function(a){var b=t++;return a?a+b:b};k.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,
22 escape:/<%-([\s\S]+?)%>/g};var v=/.^/,z={"\\":"\\","'":"'",r:"\r",n:"\n",t:"\t",u2028:"\u2028",u2029:"\u2029"},B;for(B in z)z[z[B]]=B;var H=/\\|'|\r|\n|\t|\u2028|\u2029/g,I=/\\(\\|'|r|n|t|u2028|u2029)/g,C=function(a){return a.replace(I,function(a,b){return z[b]})};k.template=function(a,b,c){c=k.defaults(c||{},k.templateSettings);a="__p+='"+a.replace(H,function(a){return"\\"+z[a]}).replace(c.escape||v,function(a,b){return"'+\n_.escape("+C(b)+")+\n'"}).replace(c.interpolate||v,function(a,b){return"'+\n("+
23 C(b)+")+\n'"}).replace(c.evaluate||v,function(a,b){return"';\n"+C(b)+"\n;__p+='"})+"';\n";c.variable||(a="with(obj||{}){\n"+a+"}\n");var a="var __p='';var print=function(){__p+=Array.prototype.join.call(arguments, '')};\n"+a+"return __p;\n",d=new Function(c.variable||"obj","_",a);if(b)return d(b,k);b=function(a){return d.call(this,a,k)};b.source="function("+(c.variable||"obj")+"){\n"+a+"}";return b};k.chain=function(a){return k(a).chain()};var A=function(a){this._wrapped=a};k.prototype=A.prototype;
24 var D=function(a,b){return b?k(a).chain():a},G=function(b,c){A.prototype[b]=function(){var b=a.call(arguments);d.call(b,this._wrapped);return D(c.apply(k,b),this._chain)}};k.mixin(k);u(["pop","push","reverse","shift","sort","splice","unshift"],function(a){var c=b[a];A.prototype[a]=function(){var b=this._wrapped;c.apply(b,arguments);var d=b.length;(a=="shift"||a=="splice")&&d===0&&delete b[0];return D(b,this._chain)}});u(["concat","join","slice"],function(a){var c=b[a];A.prototype[a]=function(){return D(c.apply(this._wrapped,
25 arguments),this._chain)}});A.prototype.chain=function(){this._chain=!0;return this};A.prototype.value=function(){return this._wrapped};return k}.call({}),emmet=function(g){function e(a,b,e){var h;h=b&&b.hasOwnProperty("constructor")?b.constructor:function(){a.apply(this,arguments)};_.extend(h,a);c.prototype=a.prototype;h.prototype=new c;b&&_.extend(h.prototype,b);e&&_.extend(h,e);h.prototype.constructor=h;h.__super__=a.prototype;return h}function f(c){!(c in b)&&a&&a(c);return b[c]}if(typeof _=="undefined")try{_=
26 g.require("underscore")}catch(h){}if(typeof _=="undefined")throw"Cannot access to Underscore.js lib";var b={_:_},c=function(){},a=null;return{define:function(a,c){a in b||(b[a]=_.isFunction(c)?this.exec(c):c)},require:f,exec:function(a,b){return a.call(b||g,_.bind(f,this),_,this)},extend:function(a,b){var c=e(this,a,b);c.extend=this.extend;if(a.hasOwnProperty("toString"))c.prototype.toString=a.toString;return c},expandAbbreviation:function(a,b,c,e){if(!a)return"";var b=b||"html",c=c||"plain",h=f("filters"),
27 g=f("abbreviationParser"),c=f("profile").get(c,b);f("tabStops").resetTabstopIndex();a=h.extractFromAbbreviation(a);e=g.parse(a[0],{syntax:b,contextNode:e});b=h.composeList(b,c,a[1]);h.apply(e,b,c);return e.toString()},defaultSyntax:function(){return"html"},defaultProfile:function(){return"plain"},log:function(){g.console&&g.console.log&&g.console.log.apply(g.console,arguments)},setModuleLoader:function(b){a=b}}}(this);
28 if(typeof exports!=="undefined"){if(typeof module!=="undefined"&&module.exports)exports=module.exports=emmet;exports.emmet=emmet}
29 emmet.define("abbreviationParser",function(g,e){function f(){this.parent=null;this.children=[];this._attributes=[];this.abbreviation="";this.counter=1;this._name=null;this._text="";this.repeatCount=1;this.hasImplicitRepeat=!1;this._data={};this.padding=this.content=this.end=this.start=""}function h(a){return a.substring(1,a.length-1)}function b(a){for(var a=g("utils").trim(a),c=new f,d=c.addChild(),i,j=g("stringStream").create(a),a=1E3,n;!j.eol()&&--a>0;)switch(i=j.peek(),i){case "(":j.start=j.pos;
30 if(j.skipToPair("(",")"))i=b(h(j.current())),(n=j.match(/^\*(\d+)?/,!0))&&d._setRepeat(n[1]),e.each(i.children,function(a){d.addChild(a)});else throw'Invalid abbreviation: mo matching ")" found for character at '+j.pos;break;case ">":d=d.addChild();j.next();break;case "+":d=d.parent.addChild();j.next();break;case "^":i=d.parent||d;d=(i.parent||i).addChild();j.next();break;default:j.start=j.pos,j.eatWhile(function(a){if(a=="["||a=="{"){if(j.skipToPair(a,p[a]))return j.backUp(1),!0;throw'Invalid abbreviation: mo matching "'+
31 p[a]+'" found for character at '+j.pos;}return a=="+"?(j.next(),a=j.eol()||~"+>^*".indexOf(j.peek()),j.backUp(1),a):a!="("&&m(a)}),d.setAbbreviation(j.current()),j.start=j.pos}if(a<1)throw"Endless loop detected";return c}function c(a){var a=g("utils").trim(a),b=[],a=g("stringStream").create(a);for(a.eatSpace();!a.eol();)if(a.start=a.pos,a.eatWhile(o)){var c=a.current(),d="";if(a.peek()=="="){a.next();a.start=a.pos;var i=a.peek();if(i=='"'||i=="'"){a.next();a:{for(var d=a,e=void 0;e=d.next();)if(e===
32 i){d=!0;break a}d=!1}if(d)d=a.current(),d=d.substring(1,d.length-1);else throw"Invalid attribute value";}else if(a.eatWhile(/[^\s\]]/))d=a.current();else throw"Invalid attribute value";}b.push({name:c,value:d});a.eatSpace()}else break;return b}function a(a){for(var b=[],i={"#":"id",".":"class"},e=null,j=g("stringStream").create(a);!j.eol();)switch(j.peek()){case "#":case ".":if(e===null)e=j.pos;var f=i[j.peek()];j.next();j.start=j.pos;j.eatWhile(o);b.push({name:f,value:j.current()});break;case "[":if(e===
33 null)e=j.pos;j.start=j.pos;if(!j.skipToPair("[","]"))throw"Invalid attribute set definition";b=b.concat(c(h(j.current())));break;default:j.next()}return!b.length?null:{element:a.substring(0,e),attributes:d(b)}}function d(a){var a=e.map(a,function(a){return e.clone(a)}),b={};return e.filter(a,function(a){if(!(a.name in b))return b[a.name]=a;var c=b[a.name];a.name.toLowerCase()=="class"?c.value+=(c.value.length?" ":"")+a.value:c.value=a.value;return!1})}function i(a){if(!~a.indexOf("{"))return null;
34 for(var b=g("stringStream").create(a);!b.eol();)switch(b.peek()){case "[":case "(":b.skipToPair(b.peek(),p[b.peek()]);break;case "{":return b.start=b.pos,b.skipToPair("{","}"),{element:a.substring(0,b.start),text:h(b.current())};default:b.next()}}function j(a){for(var b=a.children.length-1,c,d;b>=0;b--)if(d=a.children[b],d.isRepeating()){c=d.repeatCount;d.repeatCount=1;for(d.updateProperty("counter",1);--c>0;)d.parent.addChild(d.clone(),b+1).updateProperty("counter",c+1)}e.each(a.children,j);return a}
35 function n(a){for(var b=a.children.length-1;b>=0;b--){var c=a.children[b];c.isGroup()?c.replace(n(c).children):c.isEmpty()&&c.remove()}e.each(a.children,n);return a}function m(a){var b=a.charCodeAt(0);return b>64&&b<91||b>96&&b<123||b>47&&b<58||"#.*:$-_!@|".indexOf(a)!=-1}var l=/^[\w\-\$\:@\!]+\+?$/i,o=/[\w\-:\$]/,p={"[":"]","(":")","{":"}"},r=Array.prototype.splice,q=[],x=[],s=[];f.prototype={addChild:function(a,b){a=a||new f;a.parent=this;e.isUndefined(b)?this.children.push(a):this.children.splice(b,
36 0,a);return a},clone:function(){var a=new f;e.each(["abbreviation","counter","_name","_text","repeatCount","hasImplicitRepeat","start","end","content","padding"],function(b){a[b]=this[b]},this);a._attributes=e.map(this._attributes,function(a){return e.clone(a)});a._data=e.clone(this._data);a.children=e.map(this.children,function(b){b=b.clone();b.parent=a;return b});return a},remove:function(){if(this.parent)this.parent.children=e.without(this.parent.children,this);return this},replace:function(){var a=
37 this.parent,b=e.indexOf(a.children,this),c=e.flatten(arguments);r.apply(a.children,[b,1].concat(c));e.each(c,function(b){b.parent=a})},updateProperty:function(a,b){this[a]=b;e.each(this.children,function(c){c.updateProperty(a,b)})},find:function(a){return this.findAll(a)[0]},findAll:function(a){if(!e.isFunction(a))var b=a.toLowerCase(),a=function(a){return a.name().toLowerCase()==b};var c=[];e.each(this.children,function(b){a(b)&&c.push(b);c=c.concat(b.findAll(a))});return e.compact(c)},data:function(a,
38 b){if(arguments.length==2&&(this._data[a]=b,a=="resource"&&g("elements").is(b,"snippet")&&(this.content=b.data,this._text)))this.content=g("abbreviationUtils").insertChildContent(b.data,this._text);return this._data[a]},name:function(){var a=this.matchedResource();return g("elements").is(a,"element")?a.name:this._name},attributeList:function(){var a=[],b=this.matchedResource();g("elements").is(b,"element")&&e.isArray(b.attributes)&&(a=a.concat(b.attributes));return d(a.concat(this._attributes))},
39 attribute:function(a,b){if(arguments.length==2){var c=e.indexOf(e.pluck(this._attributes,"name"),a.toLowerCase());~c?this._attributes[c].value=b:this._attributes.push({name:a,value:b})}return(e.find(this.attributeList(),function(b){return b.name==a})||{}).value},matchedResource:function(){return this.data("resource")},index:function(){return this.parent?e.indexOf(this.parent.children,this):-1},_setRepeat:function(a){a?this.repeatCount=parseInt(a,10)||1:this.hasImplicitRepeat=!0},setAbbreviation:function(b){var c=
40 this;this.abbreviation=b=(b||"").replace(/\*(\d+)?$/,function(a,b){c._setRepeat(b);return""});var d=i(b);if(d)b=d.element,this.content=this._text=d.text;if(d=a(b))b=d.element,this._attributes=d.attributes;if((this._name=b)&&!l.test(this._name))throw"Invalid abbreviation";},toString:function(){var a=g("utils"),b=this.start,c=this.end,d=this.content,i=this;e.each(s,function(a){b=a(b,i,"start");d=a(d,i,"content");c=a(c,i,"end")});var j=e.map(this.children,function(a){return a.toString()}).join(""),d=
41 g("abbreviationUtils").insertChildContent(d,j,{keepVariable:!1});return b+a.padString(d,this.padding)+c},hasEmptyChildren:function(){return!!e.find(this.children,function(a){return a.isEmpty()})},hasImplicitName:function(){return!this._name&&!this.isTextNode()},isGroup:function(){return!this.abbreviation},isEmpty:function(){return!this.abbreviation&&!this.children.length},isRepeating:function(){return this.repeatCount>1||this.hasImplicitRepeat},isTextNode:function(){return!this.name()&&!this.attributeList().length},
42 isElement:function(){return!this.isEmpty()&&!this.isTextNode()},deepestChild:function(){if(!this.children.length)return null;for(var a=this;a.children.length;)a=e.last(a.children);return a}};s.push(function(a,b){return g("utils").replaceCounter(a,b.counter)});return{parse:function(a,c){var c=c||{},d=b(a);if(c.contextNode){d._name=c.contextNode.name;var i={};e.each(d._attributes,function(a){i[a.name]=a});e.each(c.contextNode.attributes,function(a){a.name in i?i[a.name].value=a.value:(a=e.clone(a),
43 d._attributes.push(a),i[a.name]=a)})}e.each(q,function(a){a(d,c)});d=n(j(d));e.each(x,function(a){a(d,c)});return d},AbbreviationNode:f,addPreprocessor:function(a){e.include(q,a)||q.push(a)},removeFilter:function(a){preprocessor=e.without(q,a)},addPostprocessor:function(a){e.include(x,a)||x.push(a)},removePostprocessor:function(a){x=e.without(x,a)},addOutputProcessor:function(a){e.include(s,a)||s.push(a)},removeOutputProcessor:function(a){s=e.without(s,a)},isAllowedChar:function(a){a=String(a);return m(a)||
44 ~">+^[](){}".indexOf(a)}}});
45 emmet.exec(function(g,e){function f(h,b){var c=g("resources"),a=g("elements"),d=g("abbreviationParser");e.each(e.clone(h.children),function(i){var j=c.getMatchedResource(i,b);if(e.isString(j))i.data("resource",a.create("snippet",j));else if(a.is(j,"reference")){j=d.parse(j.data,{syntax:b});if(i.repeatCount>1){var h=j.findAll(function(a){return a.hasImplicitRepeat});e.each(h,function(a){a.repeatCount=i.repeatCount;a.hasImplicitRepeat=!1})}var g=j.deepestChild();g&&e.each(i.children,function(a){g.addChild(a)});
46 e.each(j.children,function(a){e.each(i.attributeList(),function(b){a.attribute(b.name,b.value)})});i.replace(j.children)}else i.data("resource",j);f(i,b)})}g("abbreviationParser").addPreprocessor(function(e,b){var c=b.syntax||emmet.defaultSyntax();f(e,c)})});
47 emmet.exec(function(g,e){function f(a){for(var b=g("range"),c=[],a=g("stringStream").create(a);!a.eol();){if(a.peek()=="\\")a.next();else if(a.start=a.pos,a.match(d,!0)){c.push(b.create(a.start,d));continue}a.next()}return c}function h(a,b){var c=g("utils"),d=f(a);d.reverse();e.each(d,function(d){a=c.replaceSubstring(a,b,d)});return a}function b(a){return f(a.content).length?!0:!!e.find(a.attributeList(),function(a){return!!f(a.value).length})}function c(a,c,d){var f=a.findAll(function(a){return b(a)});
48 b(a)&&f.unshift(a);f.length?e.each(f,function(a){a.content=h(a.content,c);e.each(a._attributes,function(a){a.value=h(a.value,c)})}):(a=a.deepestChild()||a,a.content=d?c:g("abbreviationUtils").insertChildContent(a.content,c))}var a=g("abbreviationParser"),d="$#";a.addPreprocessor(function(a,b){if(b.pastedContent){var c=g("utils"),d=e.map(c.splitByLines(b.pastedContent,!0),c.trim);a.findAll(function(a){if(a.hasImplicitRepeat)return a.data("paste",d),a.repeatCount=d.length})}});a.addPostprocessor(function(a,
49 b){!a.findAll(function(a){var b=a.data("paste"),d="";e.isArray(b)?d=b[a.counter-1]:e.isFunction(b)?d=b(a.counter-1,a.content):b&&(d=b);d&&c(a,d,!!a.data("pasteOverwrites"));a.data("paste",null);return!e.isUndefined(b)}).length&&b.pastedContent&&c(a,b.pastedContent)})});emmet.exec(function(g,e){function f(h){var b=g("tagName");e.each(h.children,function(c){if(c.hasImplicitName()||c.data("forceNameResolving"))c._name=b.resolve(c.parent.name());f(c)});return h}g("abbreviationParser").addPostprocessor(f)});
50 emmet.define("cssParser",function(g,e){function f(a){return typeof a!=="undefined"}function h(){return{"char":i.chnum,line:i.linenum}}function b(a,b,c){var d=i,c=c||{};j.push({charstart:f(c["char"])?c["char"]:d.chnum,charend:f(c.charend)?c.charend:d.chnum,linestart:f(c.line)?c.line:d.linenum,lineend:f(c.lineend)?c.lineend:d.linenum,value:a,type:b||a})}function c(a,b){var c=i,d=b||{},e=f(d["char"])?d["char"]:c.chnum,d=f(d.line)?d.line:c.linenum;return{name:"ParseError",message:a+" at line "+(d+1)+
51 " char "+(e+1),walker:c,tokens:j}}function a(a){var c=i,d=c.ch,e=h(),j=a?a+d:d,d=c.nextChar();for(a&&(e["char"]-=a.length);m(d)||l(d);)j+=d,d=c.nextChar();b(j,"identifier",e)}function d(){var d=i.ch;if(d===" "||d==="\t"){for(var e=i.ch,j="",f=h();e===" "||e==="\t";)j+=e,e=i.nextChar();b(j,"white",f)}else{if(d==="/"){var e=i,d=f=e.ch,g,s=h();g=e.nextChar();if(g!=="*")s.charend=s["char"],s.lineend=s.line,j=b(d,d,s);else{for(;!(f==="*"&&g==="/");)d+=g,f=g,g=e.nextChar();d+=g;e.nextChar();b(d,"comment",
52 s)}return j}if(d==='"'||d==="'"){e=i;d=f=j=e.ch;s=h();for(j=e.nextChar();j!==f;){if(j==="\n")if(g=e.nextChar(),g==="\\")d+=j+g;else throw c("Unterminated string",s);else d+=j==="\\"?j+e.nextChar():j;j=e.nextChar()}d+=j;e.nextChar();b(d,"string",s)}else if(d==="("){e=i;j=e.ch;f=0;d=j;g=h();for(j=e.nextChar();j!==")"&&!f;){if(j==="(")f++;else if(j===")")f--;else if(j===!1)throw c("Unterminated brace",g);d+=j;j=e.nextChar()}d+=j;e.nextChar();b(d,"brace",g)}else{if(d==="-"||d==="."||l(d)){j=i;f=j.ch;
53 d=h();g=f;var s=g===".",w,f=j.nextChar();w=!l(f);if(s&&w)d.charend=d["char"],d.lineend=d.line,e=b(g,".",d);else if(g==="-"&&w)e=a("-");else{for(;f!==!1&&(l(f)||!s&&f===".");)f==="."&&(s=!0),g+=f,f=j.nextChar();b(g,"number",d)}return e}if(m(d))return a();if(n(d))return e=i,d=e.ch,j=h(),g=e.nextChar(),g==="="&&n(d,!0)?(d+=g,b(d,"match",j),e.nextChar(),f=void 0):(j.charend=j["char"]+1,j.lineend=j.line,b(d,d,j)),f;if(d==="\n")b("line"),i.nextChar();else throw c("Unrecognized character");}}}var i,j=[],
54 n,m,l;i={lines:null,total_lines:0,linenum:-1,line:"",ch:"",chnum:-1,init:function(a){var b=i;b.lines=a.replace(/\r\n/g,"\n").replace(/\r/g,"\n").split("\n");b.total_lines=b.lines.length;b.chnum=-1;b.linenum=-1;b.ch="";b.line="";b.nextLine();b.nextChar()},nextLine:function(){this.linenum+=1;this.line=this.total_lines<=this.linenum?!1:this.lines[this.linenum];if(this.chnum!==-1)this.chnum=0;return this.line},nextChar:function(){for(this.chnum+=1;this.line.charAt(this.chnum)==="";){if(this.nextLine()===
55 !1)return this.ch=!1;this.chnum=-1;return this.ch="\n"}return this.ch=this.line.charAt(this.chnum)},peek:function(){return this.line.charAt(this.chnum+1)}};m=function(a){return a=="&"||a==="_"||a==="-"||a>="a"&&a<="z"||a>="A"&&a<="Z"};l=function(a){return a!==!1&&a>="0"&&a<="9"};n=function(){for(var a="{}[]()+*=.,;:>~|\\%$#@^!".split(""),b="*^|$~".split(""),c={},d={},e=0;e<a.length;e+=1)c[a[e]]=!0;for(e=0;e<b.length;e+=1)d[b[e]]=!0;return function(a,b){return b?!!d[a]:!!c[a]}}();return{lex:function(a){i.init(a);
56 for(j=[];i.ch!==!1;)d();return j},parse:function(a){var b=0;return e.map(this.lex(a),function(c){if(c.type=="line")c.value=a.charAt(b)=="\r"&&a.charAt(b+1)=="\n"?"\r\n":a.charAt(b);return{type:c.type,start:b,end:b+=c.value.length}})},toSource:function(a){for(var b=0,c=a.length,d,e="";b<c;b+=1)d=a[b],e+=d.type==="line"?"\n":d.value;return e}}});
57 emmet.define("xmlParser",function(g){function e(a,d){function e(b){d.tokenize=b;return b(a,d)}var i=a.next();if(i=="<")if(a.eat("!"))return a.eat("[")?a.match("CDATA[")?e(b("atom","]]\>")):null:a.match("--")?e(b("comment","--\>")):a.match("DOCTYPE",!0,!0)?(a.eatWhile(/[\w\._\-]/),e(c(1))):null;else if(a.eat("?"))return a.eatWhile(/[\w\._\-]/),d.tokenize=b("meta","?>"),"meta";else{y=a.eat("/")?"closeTag":"openTag";a.eatSpace();for(w="";i=a.eat(/[^\s\u00a0=<>\"\'\/?]/);)w+=i;d.tokenize=f;return"tag"}else return i==
58 "&"?(a.eat("#")?a.eat("x")?a.eatWhile(/[a-fA-F\d]/)&&a.eat(";"):a.eatWhile(/[\d]/)&&a.eat(";"):a.eatWhile(/[\w\.\-:]/)&&a.eat(";"))?"atom":"error":(a.eatWhile(/[^&<]/),"text")}function f(a,b){var c=a.next();return c==">"||c=="/"&&a.eat(">")?(b.tokenize=e,y=c==">"?"endTag":"selfcloseTag","tag"):c=="="?(y="equals",null):/[\'\"]/.test(c)?(b.tokenize=h(c),b.tokenize(a,b)):(a.eatWhile(/[^\s\u00a0=<>\"\'\/?]/),"word")}function h(a){return function(b,c){for(;!b.eol();)if(b.next()==a){c.tokenize=f;break}return"string"}}
59 function b(a,b){return function(c,d){for(;!c.eol();){if(c.match(b)){d.tokenize=e;break}c.next()}return a}}function c(a){return function(b,d){for(var i;(i=b.next())!=null;)if(i=="<")return d.tokenize=c(a+1),d.tokenize(b,d);else if(i==">")if(a==1){d.tokenize=e;break}else return d.tokenize=c(a-1),d.tokenize(b,d);return"meta"}}function a(){for(var a=arguments.length-1;a>=0;a--)k.cc.push(arguments[a])}function d(){a.apply(null,arguments);return!0}function i(){if(k.context)k.context=k.context.prev}function j(a){if(a==
60 "openTag")return k.tagName=w,d(o,n(k.startOfLine));else if(a=="closeTag")return a=!1,k.context?k.context.tagName!=w&&(s.implicitlyClosed.hasOwnProperty(k.context.tagName.toLowerCase())&&i(),a=!k.context||k.context.tagName!=w):a=!0,a&&(u="error"),d(m(a));return d()}function n(a){return function(b){if(b=="selfcloseTag"||b=="endTag"&&s.autoSelfClosers.hasOwnProperty(k.tagName.toLowerCase()))return l(k.tagName.toLowerCase()),d();if(b=="endTag"){l(k.tagName.toLowerCase());var b=k.tagName,c=s.doNotIndent.hasOwnProperty(b)||
61 k.context&&k.context.noIndent;k.context={prev:k.context,tagName:b,indent:k.indented,startOfLine:a,noIndent:c}}return d()}}function m(a){return function(b){a&&(u="error");if(b=="endTag")return i(),d();u="error";return d(arguments.callee)}}function l(a){for(var b;;){if(!k.context)break;b=k.context.tagName.toLowerCase();if(!s.contextGrabbers.hasOwnProperty(b)||!s.contextGrabbers[b].hasOwnProperty(a))break;i()}}function o(b){if(b=="word")return u="attribute",d(p,o);if(b=="endTag"||b=="selfcloseTag")return a();
62 u="error";return d(o)}function p(b){if(b=="equals")return d(r,o);s.allowMissing||(u="error");return b=="endTag"||b=="selfcloseTag"?a():d()}function r(b){if(b=="string")return d(q);if(b=="word"&&s.allowUnquoted)return u="string",d();u="error";return b=="endTag"||b=="selfCloseTag"?a():d()}function q(b){return b=="string"?d(q):a()}function x(a,b){if(a.sol())b.startOfLine=!0,b.indented=0;if(a.eatSpace())return null;u=y=w=null;var c=b.tokenize(a,b);b.type=y;if((c||y)&&c!="comment")for(k=b;;)if((b.cc.pop()||
63 j)(y||c))break;b.startOfLine=!1;return u||c}var s={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!0,allowMissing:!0},w=null,y=null,k=null,u;return{parse:function(a,b){for(var b=b||0,c={tokenize:e,cc:[],indented:0,startOfLine:!0,tagName:null,context:null},d=g("stringStream").create(a),i=[];!d.eol();)i.push({type:x(d,c),start:d.start+b,end:d.pos+b}),d.start=d.pos;return i}}});
64 emmet.define("utils",function(g,e){function f(b){this._data=[];this.length=0;b&&this.append(b)}var h="${0}";f.prototype={append:function(b){this._data.push(b);this.length+=b.length},toString:function(){return this._data.join("")},valueOf:function(){return this.toString()}};return{reTag:/<\/?[\w:\-]+(?:\s+[\w\-:]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*\s*(\/?)>$/,endsWithTag:function(b){return this.reTag.test(b)},isNumeric:function(b){typeof b=="string"&&(b=b.charCodeAt(0));return b&&b>47&&
65 b<58},trim:function(b){return(b||"").replace(/^\s+|\s+$/g,"")},getNewline:function(){var b=g("resources");if(!b)return"\n";b=b.getVariable("newline");return e.isString(b)?b:"\n"},setNewline:function(b){var c=g("resources");c.setVariable("newline",b);c.setVariable("nl",b)},splitByLines:function(b,c){var a=this.getNewline(),a=(b||"").replace(/\r\n/g,"\n").replace(/\n\r/g,"\n").replace(/\r/g,"\n").replace(/\n/g,a).split(a);c&&(a=e.filter(a,function(a){return a.length&&!!this.trim(a)},this));return a},
66 normalizeNewline:function(b){return this.splitByLines(b).join(this.getNewline())},repeatString:function(b,c){for(var a=[],d=0;d<c;d++)a.push(b);return a.join("")},padString:function(b,c){var a=e.isNumber(c)?this.repeatString(g("resources").getVariable("indentation")||"\t",c):c,d=[],i=this.splitByLines(b),j=this.getNewline();d.push(i[0]);for(var f=1;f<i.length;f++)d.push(j+a+i[f]);return d.join("")},zeroPadString:function(b,c){for(var a="",d=b.length;c>d++;)a+="0";return a+b},unindentString:function(b,
67 c){for(var a=this.splitByLines(b),d=0;d<a.length;d++)a[d].search(c)==0&&(a[d]=a[d].substr(c.length));return a.join(this.getNewline())},replaceUnescapedSymbol:function(b,c,a){for(var d=0,i=b.length,j=c.length,f=0;d<i;)if(b.charAt(d)=="\\")d+=j+1;else if(b.substr(d,j)==c){var h=j;f++;var g=a;if(e.isFunction(a))(g=a(b,c,d,f))?(h=g[0].length,g=g[1]):g=!1;g===!1?d++:(b=b.substring(0,d)+g+b.substring(d+h),i=b.length,d+=g.length)}else d++;return b},replaceVariables:function(b,c){var c=c||{},a=e.isFunction(c)?
68 c:function(a,b){return b in c?c[b]:null},d=g("resources");return g("tabStops").processText(b,{variable:function(b){var c=a(b.token,b.name,b);c===null&&(c=d.getVariable(b.name));if(c===null||e.isUndefined(c))c=b.token;return c}})},replaceCounter:function(b,c){var c=String(c),a=this;return this.replaceUnescapedSymbol(String(b),"$",function(b,e,j){if(b.charAt(j+1)=="{"||a.isNumeric(b.charAt(j+1)))return!1;for(e=j+1;b.charAt(e)=="$"&&b.charAt(e+1)!="{";)e++;return[b.substring(j,e),a.zeroPadString(c,e-
69 j)]})},matchesTag:function(b){return this.reTag.test(b||"")},escapeText:function(b){return b.replace(/([\$\\])/g,"\\$1")},unescapeText:function(b){return b.replace(/\\(.)/g,"$1")},getCaretPlaceholder:function(){return e.isFunction(h)?h.apply(this,arguments):h},setCaretPlaceholder:function(b){h=b},getLinePadding:function(b){return(b.match(/^(\s+)/)||[""])[0]},getLinePaddingFromPosition:function(b,c){return this.getLinePadding(this.findNewlineBounds(b,c).substring(b))},escapeForRegexp:function(b){return b.replace(RegExp("[.*+?|()\\[\\]{}\\\\]",
70 "g"),"\\$&")},prettifyNumber:function(b,c){return b.toFixed(typeof c=="undefined"?2:c).replace(/\.?0+$/,"")},stringBuilder:function(b){return new f(b)},replaceSubstring:function(b,c,a,d){if(e.isObject(a)&&"end"in a)d=a.end,a=a.start;e.isString(d)&&(d=a+d.length);e.isUndefined(d)&&(d=a);return a<0||a>b.length?b:b.substring(0,a)+c+b.substring(d)},narrowToNonSpace:function(b,c,a){c=g("range").create(c,a);for(a=/[\s\n\r\u00a0]/;c.start<c.end;){if(!a.test(b.charAt(c.start)))break;c.start++}for(;c.end>
71 c.start;)if(c.end--,!a.test(b.charAt(c.end))){c.end++;break}return c},findNewlineBounds:function(b,c){for(var a=b.length,d=0,e=a-1,j=c-1;j>0;j--){var f=b.charAt(j);if(f=="\n"||f=="\r"){d=j+1;break}}for(j=c;j<a;j++)if(f=b.charAt(j),f=="\n"||f=="\r"){e=j;break}return g("range").create(d,e-d)},deepMerge:function(){var b,c,a,d,i,j=arguments[0]||{},f=1,h=arguments.length;for(!e.isObject(j)&&!e.isFunction(j)&&(j={});f<h;f++)if((b=arguments[f])!=null)for(c in b)a=j[c],d=b[c],j!==d&&(d&&(e.isObject(d)||(i=
72 e.isArray(d)))?(i?(i=!1,a=a&&e.isArray(a)?a:[]):a=a&&e.isObject(a)?a:{},j[c]=this.deepMerge(a,d)):d!==void 0&&(j[c]=d));return j}}});
73 emmet.define("range",function(g,e){function f(f,b){e.isObject(f)&&"start"in f?(this.start=Math.min(f.start,f.end),this.end=Math.max(f.start,f.end)):e.isArray(f)?(this.start=f[0],this.end=f[1]):(b=e.isString(b)?b.length:+b,this.start=f,this.end=f+b)}f.prototype={length:function(){return Math.abs(this.end-this.start)},equal:function(e){return this.start===e.start&&this.end===e.end},shift:function(e){this.start+=e;this.end+=e;return this},overlap:function(e){return e.start<=this.end&&e.end>=this.start},
74 intersection:function(e){if(this.overlap(e)){var b=Math.max(e.start,this.start);return new f(b,Math.min(e.end,this.end)-b)}return null},union:function(e){if(this.overlap(e)){var b=Math.min(e.start,this.start);return new f(b,Math.max(e.end,this.end)-b)}return null},inside:function(e){return this.start<=e&&this.end>e},include:function(e){return this.start<=e.start&&this.end>=e.end},substring:function(e){return this.length()>0?e.substring(this.start,this.end):""},clone:function(){return new f(this.start,
75 this.length())},toArray:function(){return[this.start,this.end]},toString:function(){return"{"+this.start+", "+this.length()+"}"}};return{create:function(g,b){if(e.isUndefined(g)||g===null)return null;if(g instanceof f)return g;if(e.isObject(g)&&"start"in g&&"end"in g)b=g.end-g.start,g=g.start;return new f(g,b)},create2:function(f,b){e.isNumber(f)&&e.isNumber(b)&&(b-=f);return this.create(f,b)}}});
76 emmet.define("handlerList",function(g,e){function f(){this._list=[]}f.prototype={add:function(f,b){this._list.push(e.extend({order:0},b||{},{fn:f}))},remove:function(f){this._list=e.without(this._list,e.find(this._list,function(b){return b.fn===f}))},list:function(){return e.sortBy(this._list,"order").reverse()},listFn:function(){return e.pluck(this.list(),"fn")},exec:function(f,b){var b=b||[],c=null;e.find(this.list(),function(a){c=a.fn.apply(a,b);if(c!==f)return!0});return c}};return{create:function(){return new f}}});
77 emmet.define("tokenIterator",function(g,e){function f(e){this.tokens=e;this._position=0;this.reset()}f.prototype={next:function(){if(this.hasNext()){var e=this.tokens[++this._i];this._position=e.start;return e}return null},current:function(){return this.tokens[this._i]},position:function(){return this._position},hasNext:function(){return this._i<this._il-1},reset:function(){this._i=-1;this._il=this.tokens.length},item:function(){return this.tokens[this._i]},itemNext:function(){return this.tokens[this._i+
78 1]},itemPrev:function(){return this.tokens[this._i-1]},nextUntil:function(f,b){for(var c,a=e.isString(f)?function(a){return a.type==f}:f;c=this.next();)if(b&&b.call(this,c),a.call(this,c))break}};return{create:function(e){return new f(e)}}});
79 emmet.define("stringStream",function(){function g(e){this.pos=this.start=0;this.string=e}g.prototype={eol:function(){return this.pos>=this.string.length},sol:function(){return this.pos==0},peek:function(){return this.string.charAt(this.pos)},next:function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},eat:function(e){var f=this.string.charAt(this.pos);if(typeof e=="string"?f==e:f&&(e.test?e.test(f):e(f)))return++this.pos,f},eatWhile:function(e){for(var f=this.pos;this.eat(e););
80 return this.pos>f},eatSpace:function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},skipToEnd:function(){this.pos=this.string.length},skipTo:function(e){e=this.string.indexOf(e,this.pos);if(e>-1)return this.pos=e,!0},skipToPair:function(e,f){for(var g=0,b,c=this.pos,a=this.string.length;c<a;)if(b=this.string.charAt(c++),b==e)g++;else if(b==f&&(g--,g<1))return this.pos=c,!0;return!1},backUp:function(e){this.pos-=e},match:function(e,f,g){if(typeof e==
81 "string"){if(g=g?function(b){return b.toLowerCase()}:function(b){return b},g(this.string).indexOf(g(e),this.pos)==this.pos)return f!==!1&&(this.pos+=e.length),!0}else return(e=this.string.slice(this.pos).match(e))&&f!==!1&&(this.pos+=e[0].length),e},current:function(){return this.string.slice(this.start,this.pos)}};return{create:function(e){return new g(e)}}});
82 emmet.define("resources",function(g,e){var f={},h=/^<(\w+\:?[\w\-]*)((?:\s+[\w\:\-]+\s*=\s*(['"]).*?\3)*)\s*(\/?)>/,b={},c={},a=g("handlerList").create();return{setVocabulary:function(a,e){f={};e=="system"?b=a:c=a},getVocabulary:function(a){return a=="system"?b:c},getMatchedResource:function(b,c){return a.exec(null,e.toArray(arguments))||this.findSnippet(c,b.name())},getVariable:function(a){return(this.getSection("variables")||{})[a]},setVariable:function(a,b){var c=this.getVocabulary("user")||{};
83 if(!("variables"in c))c.variables={};c.variables[a]=b;this.setVocabulary(c,"user")},hasSyntax:function(a){return a in this.getVocabulary("user")||a in this.getVocabulary("system")},addResolver:function(b,c){a.add(b,c)},removeResolver:function(b){a.remove(b)},getSection:function(a){if(!a)return null;a in f||(f[a]=g("utils").deepMerge({},b[a],c[a]));for(var i=f[a],j=e.rest(arguments),h;i&&(h=j.shift());)if(h in i)i=i[h];else return null;return i},findItem:function(a,b){for(var c=this.getSection(a);c;){if(b in
84 c)return c[b];c=this.getSection(c["extends"])}},findSnippet:function(a,b,c){if(!a||!b)return null;var c=c||[],f=[b];~b.indexOf("-")&&f.push(b.replace(/\-/g,":"));var m=this.getSection(a),l=null;e.find(["snippets","abbreviations"],function(b){var c=this.getSection(a,b);if(c)return e.find(f,function(a){if(c[a]){var d;var e=c[a],i=g("utils"),e=i.replaceUnescapedSymbol(e,"|",i.getCaretPlaceholder());if(b=="snippets")d=g("elements").create("snippet",e);else if(b=="abbreviations"){d=e;g("utils").trim(a);
85 var a=g("elements"),j;d=(j=h.exec(d))?a.create("element",j[1],j[2],j[4]=="/"):a.create("reference",d)}return l=d}})},this);c.push(a);return!l&&m["extends"]&&!e.include(c,m["extends"])?this.findSnippet(m["extends"],b,c):l}}});
86 emmet.define("actions",function(g,e){function f(b){return g("utils").trim(b.charAt(0).toUpperCase()+b.substring(1).replace(/_[a-z]/g,function(b){return" "+b.charAt(1).toUpperCase()}))}var h={};return{add:function(b,c,a){b=b.toLowerCase();a=a||{};if(!a.label)a.label=f(b);h[b]={name:b,fn:c,options:a}},get:function(b){return h[b.toLowerCase()]},run:function(b,c){e.isArray(c)||(c=e.rest(arguments));var a=this.get(b);return a?a.fn.apply(emmet,c):(emmet.log('Action "%s" is not defined',b),!1)},getAll:function(){return h},
87 getList:function(){return e.values(this.getAll())},getMenu:function(b){var c=[],b=b||[];e.each(this.getList(),function(a){if(!a.options.hidden&&!e.include(b,a.name)){var d=f(a.name),i=c;if(a.options.label)for(var j=a.options.label.split("/"),d=j.pop(),g,h;g=j.shift();)h=e.find(i,function(a){return a.type=="submenu"&&a.name==g}),h||(h={name:g,type:"submenu",items:[]},i.push(h)),i=h.items;i.push({type:"action",name:a.name,label:d})}});return c},getActionNameForMenuTitle:function(b,c){var a=null;e.find(c||
88 this.getMenu(),function(c){if(c.type=="action"){if(c.label==b||c.name==b)return a=c.name}else return a=this.getActionNameForMenuTitle(b,c.items)},this);return a||null}}});
89 emmet.define("profile",function(g,e){function f(a){e.extend(this,d,a)}function h(a,b){switch(String(b||"").toLowerCase()){case "lower":return a.toLowerCase();case "upper":return a.toUpperCase()}return a}function b(b,c){return a[b.toLowerCase()]=new f(c)}function c(){b("xhtml");b("html",{self_closing_tag:!1});b("xml",{self_closing_tag:!0,tag_nl:!0});b("plain",{tag_nl:!1,indent:!1,place_cursor:!1});b("line",{tag_nl:!1,indent:!1})}var a={},d={tag_case:"asis",attr_case:"asis",attr_quotes:"double",tag_nl:"decide",
90 tag_nl_leaf:!1,place_cursor:!0,indent:!0,inline_break:3,self_closing_tag:"xhtml",filters:""};f.prototype={tagName:function(a){return h(a,this.tag_case)},attributeName:function(a){return h(a,this.attr_case)},attributeQuote:function(){return this.attr_quotes=="single"?"'":'"'},selfClosing:function(){return this.self_closing_tag=="xhtml"?" /":this.self_closing_tag===!0?"/":""},cursor:function(){return this.place_cursor?g("utils").getCaretPlaceholder():""}};c();return{create:function(a,c){return arguments.length==
91 2?b(a,c):new f(e.defaults(a||{},d))},get:function(b,c){if(c&&e.isString(b)){var d=g("resources").findItem(c,"profile");d&&(b=d)}return!b?a.plain:b instanceof f?b:e.isString(b)&&b.toLowerCase()in a?a[b.toLowerCase()]:this.create(b)},remove:function(b){b=(b||"").toLowerCase();b in a&&delete a[b]},reset:function(){a={};c()},stringCase:h}});
92 emmet.define("editorUtils",function(g){return{isInsideTag:function(e,f){for(var g=/^<\/?\w[\w\:\-]*.*?>/,b=f;b>-1;){if(e.charAt(b)=="<")break;b--}return b!=-1&&(g=g.exec(e.substring(b)))&&f>b&&f<b+g[0].length?!0:!1},outputInfo:function(e,f,g){return{syntax:String(f||e.getSyntax()),profile:String(g||e.getProfileName()),content:String(e.getContent())}},unindent:function(e,f){return g("utils").unindentString(f,this.getCurrentLinePadding(e))},getCurrentLinePadding:function(e){return g("utils").getLinePadding(e.getCurrentLine())}}});
93 emmet.define("actionUtils",function(g){return{mimeTypes:{gif:"image/gif",png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg",svg:"image/svg+xml",html:"text/html",htm:"text/html"},extractAbbreviation:function(e){for(var f=e.length,h=-1,b=0,c=0,a=0,d=g("utils"),i=g("abbreviationParser");;){f--;if(f<0){h=0;break}var j=e.charAt(f);if(j=="]")c++;else if(j=="["){if(!c){h=f+1;break}c--}else if(j=="}")a++;else if(j=="{"){if(!a){h=f+1;break}a--}else if(j==")")b++;else if(j=="("){if(!b){h=f+1;break}b--}else if(!c&&
94 !a&&(!i.isAllowedChar(j)||j==">"&&d.endsWithTag(e.substring(0,f+1)))){h=f+1;break}}return h!=-1&&!a&&!c&&!b?e.substring(h).replace(/^[\*\+\>\^]+/,""):""},getImageSize:function(e){var f=function(){return e.charCodeAt(g++)};if(e.substr(0,8)==="\u0089PNG\r\n\u001a\n"){var g=e.indexOf("IHDR")+4;return{width:f()<<24|f()<<16|f()<<8|f(),height:f()<<24|f()<<16|f()<<8|f()}}else if(e.substr(0,4)==="GIF8")return g=6,{width:f()|f()<<8,height:f()|f()<<8};else if(e.substr(0,2)==="\u00ff\u00d8")for(var g=2,b=e.length;g<
95 b;){if(f()!=255)break;var c=f();if(c==218)break;var a=f()<<8|f();if(c>=192&&c<=207&&!(c&4)&&!(c&8))return g+=1,{height:f()<<8|f(),width:f()<<8|f()};else g+=a-2}},captureContext:function(e){if(String(e.getSyntax())in{html:1,xml:1,xsl:1}){var f=g("html_matcher").getTags(String(e.getContent()),e.getCaretPos(),String(e.getProfileName()));if(f&&f[0]&&f[0].type=="tag"){for(var e=/([\w\-:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g,h=f[0],f=h.full_tag.replace(/^<[\w\-\:]+/,
96 ""),h={name:h.name,attributes:[]},b;b=e.exec(f);)h.attributes.push({name:b[1],value:b[2]});return h}}return null},findExpressionBounds:function(e,f){for(var h=String(e.getContent()),b=h.length,c=e.getCaretPos()-1,a=c+1;c>=0&&f(h.charAt(c),c,h);)c--;for(;a<b&&f(h.charAt(a),a,h);)a++;if(a>c)return g("range").create([++c,a])},compoundUpdate:function(e,f){if(f){var g=e.getSelectionRange();e.replaceContent(f.data,f.start,f.end,!0);e.createSelection(f.caret,f.caret+g.end-g.start);return!0}return!1}}});
97 emmet.define("abbreviationUtils",function(g,e){return{isSnippet:function(e){return g("elements").is(e.matchedResource(),"snippet")},isUnary:function(e){var h=e.matchedResource();return e.children.length||this.isSnippet(e)?!1:h&&h.is_empty||g("tagName").isEmptyElement(e.name())},isInline:function(e){return e.isTextNode()||!e.name()||g("tagName").isInlineLevel(e.name())},isBlock:function(e){return g("elements").is(e.matchedResource(),"snippet")||!this.isInline(e)},hasTagsInContent:function(e){return g("utils").matchesTag(e.content)},
98 hasBlockChildren:function(g){return this.hasTagsInContent(g)&&this.isBlock(g)||e.any(g.children,function(e){return this.isBlock(e)},this)},insertChildContent:function(f,h,b){var b=e.extend({keepVariable:!0,appendIfNoChild:!0},b||{}),c=!1,a=g("utils"),f=a.replaceVariables(f,function(d,e,j){var g=d;e=="child"&&(g=a.padString(h,a.getLinePaddingFromPosition(f,j.start)),c=!0,b.keepVariable&&(g+=d));return g});!c&&b.appendIfNoChild&&(f+=h);return f}}});
99 emmet.define("base64",function(){return{encode:function(g){for(var e=[],f,h,b,c,a,d,i=0,j=g.length;i<j;)c=g.charCodeAt(i++),a=g.charCodeAt(i++),d=g.charCodeAt(i++),f=c&255,h=a&255,b=d&255,c=f>>2,f=(f&3)<<4|h>>4,h=(h&15)<<2|b>>6,b&=63,isNaN(a)?h=b=64:isNaN(d)&&(b=64),e.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(c)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(f)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(h)+
100 "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(b));return e.join("")},decode:function(g){var e,f,h,b,c,a=0,d=0,i=[],j=g.length;if(!g)return g;g+="";do e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(g.charAt(a++)),f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(g.charAt(a++)),b="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(g.charAt(a++)),c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(g.charAt(a++)),
101 h=e<<18|f<<12|b<<6|c,e=h>>16&255,f=h>>8&255,h&=255,b==64?i[d++]=String.fromCharCode(e):c==64?i[d++]=String.fromCharCode(e,f):i[d++]=String.fromCharCode(e,f,h);while(a<j);return i.join("")}}});
102 (function(){function g(a){if(!a||a!="html")a="xhtml";m=a}function e(a,b){var c=a[1].toLowerCase();return{name:c,full_tag:a[0],start:b,end:b+a[0].length,unary:Boolean(a[3])||c in j&&m=="html",has_close:Boolean(a[3]),type:"tag",close_self:c in n&&m=="html"}}function f(a,b){return{start:a,end:b,type:"comment"}}function h(a){for(var b={},a=a.split(","),c=0;c<a.length;c++)b[a[c]]=!0;return b}function b(a,b,c){var c=c||0,d=-1,e=-1;if(a&&!b)d=a.start,e=a.end;else if(a&&b)a.start<c&&a.end>c||b.start<=c&&
103 b.end>c?(d=a.start,e=b.end):(d=a.end,e=b.start);return[d,e]}function c(a,c,d){l.opening_tag=a;l.closing_tag=c;a=b(a,c,d||0);l.start_ix=a[0];l.end_ix=a[1];return l.start_ix!=-1?[l.start_ix,l.end_ix]:null}function a(a,c,j,h){function m(b,c){arguments.length==1&&(c=v);return a.substr(c,b.length)==b}function n(b){for(;b--;)if(a.charAt(b)=="<"&&m("<\!--",b))break;return b}h=h||b;g(j);var j=[],k=[],l=null,o=null,p=a.length,t,v;j.last=k.last=function(){return this[this.length-1]};for(v=c;v--&&v>=0;)if(t=
104 a.charAt(v),t=="<"){var z=a.substring(v,p);if(t=z.match(i))t=e(t,v),t.start<c&&t.end>c?o=t:k.push(t);else if(t=z.match(d))if(t=e(t,v),t.unary){if(t.start<c&&t.end>c)return h(t,null,c)}else if(k.last()&&k.last().name==t.name)k.pop();else{l=t;break}else if(z.indexOf("<\!--")==0&&(t=z.search("--\>")+v+3,v<c&&t>=c))return h(f(v,t))}else t=="-"&&m("--\>")&&(v=n(v));if(!l)return h(null);if(!o)for(v=c;v<p;v++)if(t=a.charAt(v),t=="<")if(z=a.substring(v,p),t=z.match(d))t=e(t,v),t.unary||j.push(t);else if(t=
105 z.match(i))if(t=e(t,v),j.last()&&j.last().name==t.name)j.pop();else{o=t;break}else m("<\!--")&&(v+=z.search("--\>")+2);else if(t=="-"&&m("--\>")&&(!j.last()||j.last().type!="comment"))return t=v+3,h(f(n(v),t));return h(l,o,c)}var d=/^<([\w\:\-]+)((?:\s+[\w\-:]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/,i=/^<\/([\w\:\-]+)[^>]*>/,j=h("area,base,basefont,br,col,frame,hr,img,input,isindex,link,meta,param,embed");h("address,applet,blockquote,button,center,dd,dir,div,dl,dt,fieldset,form,frameset,hr,iframe,isindex,li,map,menu,noframes,noscript,object,ol,p,pre,script,table,tbody,td,tfoot,th,thead,tr,ul");
106 h("a,abbr,acronym,applet,b,basefont,bdo,big,br,button,cite,code,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,select,small,span,strike,strong,sub,sup,textarea,tt,u,var");var n=h("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr"),m="xhtml",l={opening_tag:null,closing_tag:null,start_ix:-1,end_ix:-1},o=function(b,d,e){return a(b,d,e,c)};o.start_tag=d;o.end_tag=i;o.find=function(b,c,d){return a(b,c,d)};o.getTags=function(b,c,d){return a(b,c,d,function(a,b){return[a,b]})};o.last_match=
107 l;try{emmet.define("html_matcher",function(){return o})}catch(p){}})();
108 emmet.define("tabStops",function(g,e){var f=100,h=0,b={replaceCarets:!1,escape:function(b){return"\\"+b},tabstop:function(b){return b.token},variable:function(b){return b.token}};g("abbreviationParser").addOutputProcessor(function(b,a){var d=0,e=g("tabStops"),j=g("utils"),b=e.processText(b,{tabstop:function(a){var b=parseInt(a.group);if(b==0)return"${0}";b>d&&(d=b);return a.placeholder?"${"+(b+h)+":"+a.placeholder+"}":"${"+(b+h)+"}"}}),b=j.replaceVariables(b,e.variablesResolver(a));h+=d+1;return b});
109 return{extract:function(c,a){var d=g("utils"),i={carets:""},j=[],a=e.extend({},b,a,{tabstop:function(a){var b=a.token,c="";if(a.placeholder=="cursor")j.push({start:a.start,end:a.start+b.length,group:"carets",value:""});else{if("placeholder"in a)i[a.group]=a.placeholder;a.group in i&&(c=i[a.group]);j.push({start:a.start,end:a.start+b.length,group:a.group,value:c})}return b}});a.replaceCarets&&(c=c.replace(RegExp(d.escapeForRegexp(d.getCaretPlaceholder()),"g"),"${0:cursor}"));var c=this.processText(c,
110 a),f=d.stringBuilder(),h=0,d=e.map(j,function(a){f.append(c.substring(h,a.start));var b=f.length,d=i[a.group]||"";f.append(d);h=a.end;return{group:a.group,start:b,end:b+d.length}});f.append(c.substring(h));return{text:f.toString(),tabstops:e.sortBy(d,"start")}},processText:function(c,a){for(var a=e.extend({},b,a),d=g("utils").stringBuilder(),i=g("stringStream").create(c),j,f;j=i.next();)if(j=="\\"&&!i.eol())d.append(a.escape(i.next()));else{f=j;if(j=="$")if(i.start=i.pos-1,i.match(/^[0-9]+/))f=a.tabstop({start:d.length,
111 group:i.current().substr(1),token:i.current()});else if(j=i.match(/^\{([a-z_\-][\w\-]*)\}/))f=a.variable({start:d.length,name:j[1],token:i.current()});else if(j=i.match(/^\{([0-9]+)(:.+?)?\}/)){f={start:d.length,group:j[1],token:i.current()};if(j[2])f.placeholder=j[2].substr(1);f=a.tabstop(f)}d.append(f)}return d.toString()},upgrade:function(b,a){var d=0,i={tabstop:function(b){var c=parseInt(b.group);c>d&&(d=c);return b.placeholder?"${"+(c+a)+":"+b.placeholder+"}":"${"+(c+a)+"}"}};e.each(["start",
112 "end","content"],function(a){b[a]=this.processText(b[a],i)},this);return d},variablesResolver:function(b){var a={},d=g("resources");return function(i,j){if(j=="child")return i;if(j=="cursor")return g("utils").getCaretPlaceholder();var h=b.attribute(j);if(!e.isUndefined(h))return h;if(h=d.getVariable(j))return h;a[j]||(a[j]=f++);return"${"+a[j]+":"+j+"}"}},resetPlaceholderCounter:function(){console.log("deprecated");f=100},resetTabstopIndex:function(){h=0;f=100}}});
113 emmet.define("preferences",function(g,e){var f={},h={},b=null,c=null;return{define:function(a,b,c){var j=a;e.isString(a)&&(j={},j[a]={value:b,description:c});e.each(j,function(a,b){h[b]=e.isObject(a)&&"value"in a&&e.keys(a).length<3?a:{value:a}})},set:function(a,b){var c=a;e.isString(a)&&(c={},c[a]=b);e.each(c,function(a,b){if(!(b in h))throw'Property "'+b+'" is not defined. You should define it first with `define` method of current module';if(a!==h[b].value){switch(typeof h[b].value){case "boolean":var c=
114 a;e.isString(c)?(c=c.toLowerCase(),a=c=="yes"||c=="true"||c=="1"):a=!!c;break;case "number":a=parseInt(a+"",10)||0;break;default:a+=""}f[b]=a}else b in f&&delete f[b]})},get:function(a){if(a in f)return f[a];if(a in h)return h[a].value},getArray:function(a){a=this.get(a);e.isUndefined(a)||(a=e.map(a.split(","),g("utils").trim),a.length||(a=null));return a},getDict:function(a){var b={};e.each(this.getArray(a),function(a){a=a.split(":");b[a[0]]=a[1]});return b},description:function(a){return a in h?
115 h[a].description:void 0},remove:function(a){e.isArray(a)||(a=[a]);e.each(a,function(a){a in f&&delete f[a];a in h&&delete h[a]})},list:function(){return e.map(e.keys(h).sort(),function(a){return{name:a,value:this.get(a),type:typeof h[a].value,description:h[a].description}},this)},load:function(a){e.each(a,function(a,b){this.set(b,a)},this)},exportModified:function(){return e.clone(f)},reset:function(){f={}},_startTest:function(){b=h;c=f;h={};f={}},_stopTest:function(){h=b;f=c}}});
116 emmet.define("filters",function(g,e){function f(b){return!b?[]:e.isString(b)?b.split(/[\|,]/g):b}var h={};return{add:function(b,c){h[b]=c},apply:function(b,c,a){var d=g("utils"),a=g("profile").get(a);e.each(f(c),function(c){(c=d.trim(c.toLowerCase()))&&c in h&&(b=h[c](b,a))});return b},composeList:function(b,c,a){c=g("profile").get(c);b=f(c.filters||g("resources").findItem(b,"filters")||"html");a&&(b=b.concat(f(a)));if(!b||!b.length)b=f("html");return b},extractFromAbbreviation:function(b){var c=
117 "",b=b.replace(/\|([\w\|\-]+)$/,function(a,b){c=b;return""});return[b,f(c)]}}});
118 emmet.define("elements",function(g,e){function f(a){return{data:a}}var h={},b=/([\w\-]+)\s*=\s*(['"])(.*?)\2/g,c={add:function(a,b){var c=this;h[a]=function(){var e=b.apply(c,arguments);if(e)e.type=a;return e}},get:function(a){return h[a]},create:function(a){var b=[].slice.call(arguments,1),c=this.get(a);return c?c.apply(this,b):null},is:function(a,b){return a&&a.type===b}};c.add("element",function(a,c,i){var f={name:a,is_empty:!!i};if(c)if(f.attributes=[],e.isArray(c))f.attributes=c;else if(e.isString(c))for(;a=
119 b.exec(c);)f.attributes.push({name:a[1],value:a[3]});else e.each(c,function(a,b){f.attributes.push({name:b,value:a})});return f});c.add("snippet",f);c.add("reference",f);c.add("empty",function(){return{}});return c});
120 emmet.define("editTree",function(g,e,f){function h(a,b){this.options=e.extend({offset:0},b);this.source=a;this._children=[];this._positions={name:0};this.initialize.apply(this,arguments)}function b(a,b,c){this.parent=a;this._name=b.value;this._value=c?c.value:"";this._positions={name:b.start,value:c?c.start:-1};this.initialize.apply(this,arguments)}var c=g("range").create;h.extend=f.extend;h.prototype={initialize:function(){},_updateSource:function(a,b,f){var j=c(b,e.isUndefined(f)?0:f-b),h=a.length-
121 j.length(),m=function(a){e.each(a,function(b,c){b>=j.end&&(a[c]+=h)})};m(this._positions);e.each(this.list(),function(a){m(a._positions)});this.source=g("utils").replaceSubstring(this.source,a,j)},add:function(a,c){var e=new b(a,c);this._children.push(e);return e},get:function(a){return e.isNumber(a)?this.list()[a]:e.isString(a)?e.find(this.list(),function(b){return b.name()===a}):a},getAll:function(a){e.isArray(a)||(a=[a]);var b=[],c=[];e.each(a,function(a){e.isString(a)?b.push(a):e.isNumber(a)&&
122 c.push(a)});return e.filter(this.list(),function(a,f){return e.include(c,f)||e.include(b,a.name())})},value:function(a,b,c){var f=this.get(a);if(f)return f.value(b);if(!e.isUndefined(b))return this.add(a,b,c)},values:function(a){return e.map(this.getAll(a),function(a){return a.value()})},remove:function(a){if(a=this.get(a))this._updateSource("",a.fullRange()),this._children=e.without(this._children,a)},list:function(){return this._children},indexOf:function(a){return e.indexOf(this.list(),this.get(a))},
123 name:function(a){if(!e.isUndefined(a)&&this._name!==(a=String(a)))this._updateSource(a,this._positions.name,this._positions.name+this._name.length),this._name=a;return this._name},nameRange:function(a){return c(this._positions.name+(a?this.options.offset:0),this.name())},range:function(a){return c(a?this.options.offset:0,this.toString())},itemFromPosition:function(a,b){return e.find(this.list(),function(c){return c.range(b).inside(a)})},toString:function(){return this.source}};b.extend=f.extend;b.prototype=
124 {initialize:function(){},_pos:function(a,b){return a+(b?this.parent.options.offset:0)},value:function(a){if(!e.isUndefined(a)&&this._value!==(a=String(a)))this.parent._updateSource(a,this.valueRange()),this._value=a;return this._value},name:function(a){if(!e.isUndefined(a)&&this._name!==(a=String(a)))this.parent._updateSource(a,this.nameRange()),this._name=a;return this._name},namePosition:function(a){return this._pos(this._positions.name,a)},valuePosition:function(a){return this._pos(this._positions.value,
125 a)},range:function(a){return c(this.namePosition(a),this.toString())},fullRange:function(a){return this.range(a)},nameRange:function(a){return c(this.namePosition(a),this.name())},valueRange:function(a){return c(this.valuePosition(a),this.value())},toString:function(){return this.name()+this.value()},valueOf:function(){return this.toString()}};return{EditContainer:h,EditElement:b,createToken:function(a,b,c){a={start:a||0,value:b||"",type:c};a.end=a.start+a.value.length;return a}}});
126 emmet.define("cssEditTree",function(g,e){function f(a,b){return g("range").create(a,b)}function h(a,b){var b=b||d|i,c=["white","line"];if((b&i)==i)for(;a.length&&e.include(c,e.last(a).type);)a.pop();if((b&d)==d)for(;a.length&&e.include(c,a[0].type);)a.shift();return a}function b(a){var b=["white","line",":"],c=[],g,j;a.nextUntil(function(){return!e.include(b,this.itemNext().type)});for(j=a.current().end;g=a.next();){if(g.type=="}"||g.type==";")return h(c,d|(g.type=="}"?i:0)),c.length?(j=c[0].start,
127 a=e.last(c).end):a=j,f(j,a-j);c.push(g)}if(c.length)return f(c[0].start,e.last(c).end-c[0].start)}function c(a){var b=g("stringStream").create(a),c=[],d=/[\s\u00a0,]/,i=function(){b.next();c.push(f(b.start,b.current()));b.start=b.pos};b.eatSpace();for(b.start=b.pos;a=b.next();)if(a=='"'||a=="'"){b.next();if(!b.skipTo(a))break;i()}else if(a=="("){b.backUp(1);if(!b.skipToPair("(",")"))break;b.backUp(1);i()}else if(d.test(a))c.push(f(b.start,b.current().length-1)),b.eatWhile(d),b.start=b.pos;i();return e.chain(c).filter(function(a){return!!a.length()}).uniq(!1,
128 function(a){return a.toString()}).value()}var a={styleBefore:"\n\t",styleSeparator:": ",offset:0},d=1,i=2,j=g("editTree").EditContainer.extend({initialize:function(c){e.defaults(this.options,a);var d=g("editTree"),i=g("tokenIterator").create(g("cssParser").parse(c)),j,r=[],q;for(j=i.position();q=i.next();){if(q.type=="{")break;r.push(q)}h(r);r.length?(j=r[0].start,r=e.last(r).end):r=j;j=f(j,r-j);this._positions.name=j.start;this._name=j.substring(c);if(!i.current()||i.current().type!="{")throw"Invalid CSS rule";
129 for(this._positions.contentStart=i.position()+1;j=i.next();){if(r=j.type=="identifier")a:{r=i.tokens;q=i._i+1;for(var x=r.length;q<x;q++){if(r[q].type==":"){r=!0;break a}if(r[q].type=="identifier"||r[q].type=="line"){r=!1;break a}}r=!1}r&&(j=f(j),r=b(i),q=i.current()&&i.current().type==";"?f(i.current()):f(r.end,0),this._children.push(new n(this,d.createToken(j.start,j.substring(c)),d.createToken(r.start,r.substring(c)),d.createToken(q.start,q.substring(c)))))}this._saveStyle()},_saveStyle:function(){var a=
130 this._positions.contentStart,b=this.source,c=g("utils");e.each(this.list(),function(d){d.styleBefore=b.substring(a,d.namePosition());var f=c.splitByLines(d.styleBefore);if(f.length>1)d.styleBefore="\n"+e.last(f);d.styleSeparator=b.substring(d.nameRange().end,d.valuePosition());d.styleBefore=e.last(d.styleBefore.split("*/"));d.styleSeparator=d.styleSeparator.replace(/\/\*.*?\*\//g,"");a=d.range().end})},add:function(a,b,c){var d=this.list(),f=this._positions.contentStart,i=e.pick(this.options,"styleBefore",
131 "styleSeparator"),j=g("editTree");if(e.isUndefined(c))c=d.length;var h=d[c];if(h)f=h.fullRange().start;else if(h=d[c-1])h.end(";"),f=h.range().end;h&&(i=e.pick(h,"styleBefore","styleSeparator"));a=j.createToken(f+i.styleBefore.length,a);b=j.createToken(a.end+i.styleSeparator.length,b);j=new n(this,a,b,j.createToken(b.end,";"));e.extend(j,i);this._updateSource(j.styleBefore+j.toString(),f);this._children.splice(c,0,j);return j}}),n=g("editTree").EditElement.extend({initialize:function(a,b,c,d){this.styleBefore=
132 a.options.styleBefore;this.styleSeparator=a.options.styleSeparator;this._end=d.value;this._positions.end=d.start},valueParts:function(a){var b=c(this.value());if(a){var d=this.valuePosition(!0);e.each(b,function(a){a.shift(d)})}return b},end:function(a){if(!e.isUndefined(a)&&this._end!==a)this.parent._updateSource(a,this._positions.end,this._positions.end+this._end.length),this._end=a;return this._end},fullRange:function(a){a=this.range(a);a.start-=this.styleBefore.length;return a},toString:function(){return this.name()+
133 this.styleSeparator+this.value()+this.end()}});return{parse:function(a,b){return new j(a,b)},parseFromPosition:function(a,b,c){c=this.extractRule(a,b,c);return!c||!c.inside(b)?null:this.parse(c.substring(a),{offset:c.start})},extractRule:function(a,b,c){for(var d="",e=a.length,f=-1,j;b>=0;){j=a.charAt(b);if(j=="{"){f=b;break}else if(j=="}"&&!c){b++;break}b--}for(;b<e;){j=a.charAt(b);if(j=="{")f=b;else if(j=="}"){f!=-1&&(d=a.substring(f,b+1));break}b++}if(d){b=f-1;for(c="";b>=0;){j=a.charAt(b);if("{}/\\<>\n\r".indexOf(j)!=
134 -1)break;b--}c=a.substring(b+1,f).replace(/^[\s\n\r]+/m,"");return g("range").create(f-c.length,d.length+c.length)}return null},baseName:function(a){return a.replace(/^\s*\-\w+\-/,"")},findParts:c}});
135 emmet.define("xmlEditTree",function(g,e){var f={styleBefore:" ",styleSeparator:"=",styleQuote:'"',offset:0},h=/^<([\w\:\-]+)((?:\s+[\w\-:]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/m,b=g("editTree").EditContainer.extend({initialize:function(a){e.defaults(this.options,f);this._positions.name=1;var b=null,i=g("xmlParser").parse(a),j=g("range");e.each(i,function(e){e.value=j.create(e).substring(a);switch(e.type){case "tag":if(/^<[^\/]+/.test(e.value))this._name=e.value.substring(1);
136 break;case "attribute":b&&this._children.push(new c(this,b));b=e;break;case "string":this._children.push(new c(this,b,e)),b=null}},this);b&&this._children.push(new c(this,b));this._saveStyle()},_saveStyle:function(){var a=this.nameRange().end,b=this.source;e.each(this.list(),function(c){c.styleBefore=b.substring(a,c.namePosition());if(c.valuePosition()!==-1)c.styleSeparator=b.substring(c.namePosition()+c.name().length,c.valuePosition()-c.styleQuote.length);a=c.range().end})},add:function(a,b,f){var j=
137 this.list(),h=this.nameRange().end,m=g("editTree"),l=e.pick(this.options,"styleBefore","styleSeparator","styleQuote");if(e.isUndefined(f))f=j.length;var o=j[f];if(o)h=o.fullRange().start;else if(o=j[f-1])h=o.range().end;o&&(l=e.pick(o,"styleBefore","styleSeparator","styleQuote"));b=l.styleQuote+b+l.styleQuote;a=new c(this,m.createToken(h+l.styleBefore.length,a),m.createToken(h+l.styleBefore.length+a.length+l.styleSeparator.length,b));e.extend(a,l);this._updateSource(a.styleBefore+a.toString(),h);
138 this._children.splice(f,0,a);return a}}),c=g("editTree").EditElement.extend({initialize:function(a,b,c){this.styleBefore=a.options.styleBefore;this.styleSeparator=a.options.styleSeparator;b="";a=a.options.styleQuote;if(c)b=c.value,a=b.charAt(0),a=='"'||a=="'"?b=b.substring(1):a="",a&&b.charAt(b.length-1)==a&&(b=b.substring(0,b.length-1));this.styleQuote=a;this._value=b;this._positions.value=c?c.start+a.length:-1},fullRange:function(a){a=this.range(a);a.start-=this.styleBefore.length;return a},toString:function(){return this.name()+
139 this.styleSeparator+this.styleQuote+this.value()+this.styleQuote}});return{parse:function(a,c){return new b(a,c)},parseFromPosition:function(a,b,c){c=this.extractTag(a,b,c);return!c||!c.inside(b)?null:this.parse(c.substring(a),{offset:c.start})},extractTag:function(a,b,c){var e=a.length,f,m=g("range"),l=Math.min(2E3,e),o=null,p=function(b){var c;if(a.charAt(b)=="<"&&(c=a.substr(b,l).match(h)))return m.create(b,c[0])};for(f=b;f>=0;f--)if(o=p(f))break;if(o&&(o.inside(b)||c))return o;if(!o&&c)return null;
140 for(f=b;f<e;f++)if(o=p(f))return o}}});
141 emmet.define("expandAbbreviation",function(g,e){var f=g("handlerList").create(),h=null,b=g("actions");b.add("expand_abbreviation",function(b,a,d){var i=e.toArray(arguments),j=g("editorUtils").outputInfo(b,a,d);i[1]=j.syntax;i[2]=j.profile;return f.exec(!1,i)});b.add("expand_abbreviation_with_tab",function(c,a,d){b.run("expand_abbreviation",c,a,d)||c.replaceContent(g("resources").getVariable("indentation"),c.getCaretPos())},{hidden:!0});f.add(function(b,a,d){var e=b.getSelectionRange().end,f=h.findAbbreviation(b);
142 return f&&(a=emmet.expandAbbreviation(f,a,d,g("actionUtils").captureContext(b)))?(b.replaceContent(a,e-f.length,e),!0):!1},{order:-1});return h={addHandler:function(b,a){f.add(b,a)},removeHandler:function(b){f.remove(b,options)},findAbbreviation:function(b){var a=g("range").create(b.getSelectionRange()),d=String(b.getContent());if(a.length())return a.substring(d);b=b.getCurrentLineRange();return g("actionUtils").extractAbbreviation(d.substring(b.start,a.start))}}});
143 emmet.define("wrapWithAbbreviation",function(g){var e=null;g("actions").add("wrap_with_abbreviation",function(f,h,b,c){var c=g("editorUtils").outputInfo(f,b,c),a=g("utils"),d=g("editorUtils"),i=g("html_matcher"),h=h||f.prompt("Enter abbreviation");if(!h)return null;var h=String(h),j=f.getSelectionRange(),b=j.start,j=j.end;if(b==j){j=i(c.content,b,c.profile);if(!j||j[0]==-1)return!1;j=a.narrowToNonSpace(c.content,j[0],j[1]-j[0]);b=j.start;j=j.end}a=a.escapeText(c.content.substring(b,j));return(h=e.wrap(h,
144 d.unindent(f,a),c.syntax,c.profile,g("actionUtils").captureContext(f)))?(f.replaceContent(h,b,j),!0):!1});return e={wrap:function(e,h,b,c,a){var d=g("filters"),i=g("utils"),b=b||emmet.defaultSyntax(),c=c||emmet.defaultProfile();g("tabStops").resetTabstopIndex();e=d.extractFromAbbreviation(e);return(h=g("abbreviationParser").parse(e[0],{syntax:b,pastedContent:h,contextNode:a}))?(b=d.composeList(b,c,e[1]),d.apply(h,b,c),i.replaceVariables(h.toString())):null}}});
145 emmet.exec(function(g,e){function f(b,a){var d=a-(b.options.offset||0),f=/^[\s\n\r]/;return e.find(b.list(),function(a){return a.range().end===d?f.test(b.source.charAt(d)):a.range().inside(d)})}function h(b,a,d,e){for(var f=-1,h=-1;a--;)if(b.substr(a,d.length)==d){f=a;break}if(f!=-1){a=f;for(d=b.length;d>=a++;)if(b.substr(a,e.length)==e){h=a+e.length;break}}return f!=-1&&h!=-1?g("range").create(f,h-f):null}function b(b,a,d,e){function f(b){return b.replace(RegExp("^"+p.escapeForRegexp(a)+"\\s*"),
146 function(a){l-=a.length;return""}).replace(RegExp("\\s*"+p.escapeForRegexp(d)+"$"),"")}var n=g("editorUtils"),m=n.outputInfo(b).content,l=b.getCaretPos(),o=null,p=g("utils");(o=h(m,l,a,d))&&o.overlap(e)?(e=o,o=f(e.substring(m))):(o=a+" "+e.substring(m).replace(RegExp(p.escapeForRegexp(a)+"\\s*|\\s*"+p.escapeForRegexp(d),"g"),"")+" "+d,l+=a.length+1);return o!==null?(o=p.escapeText(o),b.setCaretPos(e.start),b.replaceContent(n.unindent(b,o),e.start,e.end),b.setCaretPos(l),!0):!1}g("actions").add("toggle_comment",
147 function(c){var a=g("editorUtils").outputInfo(c);if(a.syntax=="css"){var d=c.getCaretPos(),e=g("html_matcher").getTags(a.content,d);if(e&&e[0]&&e[0].type=="tag"&&e[0].start<=d&&e[0].end>=d)a.syntax="html"}if(a.syntax=="css"){e=g("range").create(c.getSelectionRange());a=g("editorUtils").outputInfo(c);if(!e.length()&&(d=g("cssEditTree").parseFromPosition(a.content,c.getCaretPos())))e=(e=f(d,c.getCaretPos()))?e.range(!0):g("range").create(d.nameRange(!0).start,d.source);e.length()||(e=g("range").create(c.getCurrentLineRange()),
148 g("utils").narrowToNonSpace(a.content,e));c=b(c,"/*","*/",e)}else{a=g("range").create(c.getSelectionRange());d=g("editorUtils").outputInfo(c);if(!a.length()&&(d=g("html_matcher").getTags(d.content,c.getCaretPos(),d.profile))&&d[0])a.start=d[0].start,a.end=d[1]?d[1].end:d[0].end;c=b(c,"<\!--","--\>",a)}return c})});
149 emmet.exec(function(g){function e(e,g,b){function c(b){for(var c=b;c>=0;){var e=a.charAt(c);if(e=="\n"||e=="\r")break;c--}return a.substring(c,b)}for(var g=g||1,b=e.getCaretPos()+(b||0),a=String(e.getContent()),e=a.length,d=-1,i=/^\s+$/;b<=e&&b>=0;){b+=g;var j=a.charAt(b),n=a.charAt(b+1),m=a.charAt(b-1);switch(j){case '"':case "'":n==j&&m=="="&&(d=b+1);break;case ">":n=="<"&&(d=b+1);break;case "\n":case "\r":i.test(c(b-1))&&(d=b)}if(d!=-1)break}return d}g=g("actions");g.add("prev_edit_point",function(f){var g=
150 f.getCaretPos(),b=e(f,-1);b==g&&(b=e(f,-1,-2));return b!=-1?(f.setCaretPos(b),!0):!1},{label:"Previous Edit Point"});g.add("next_edit_point",function(f){var g=e(f,1);g!=-1&&f.setCaretPos(g)})});
151 emmet.exec(function(g,e){function f(a,b,c,e){var d=g("range"),f=g("editorUtils").outputInfo(a).content,j=f.length,i,h=d.create(-1,0),n=d.create(a.getSelectionRange());i=n.start;for(var m=1E5;i>=0&&i<j&&--m>0;){if(d=c(f,i,b)){if(h.equal(d))break;h=d.clone();if(i=e(d.substring(f),d.start,n.clone()))return a.createSelection(i.start,i.end),!0;else i=b?d.start:d.end-1}i+=b?-1:1}return!1}function h(a){var b=!0;return f(a,!1,function(a,c){if(b){b=!1;var d;a:{d=c;for(var e;d>=0;){if(e=i(a,d)){d=e;break a}d--}d=
152 null}return d}else return i(a,c)},function(a,b,c){return d(a,b,c,!1)})}function b(a){return f(a,!0,i,function(a,b,c){return d(a,b,c,!0)})}function c(b,c,d){var d=d||0,f=g("range"),i=[],k=-1,h="",n="",m,l;e.each(c,function(c){switch(c.type){case "tag":l=b.substring(c.start,c.end);/^<[\w\:\-]/.test(l)&&i.push(f.create({start:c.start+1,end:c.end}));break;case "attribute":k=c.start;h=b.substring(c.start,c.end);break;case "string":i.push(f.create(k,c.end-k)),m=f.create(c),n=m.substring(b),j(n.charAt(0))&&
153 m.start++,j(n.charAt(n.length-1))&&m.end--,i.push(m),h=="class"&&(i=i.concat(a(m.substring(b),m.start)))}});e.each(i,function(a){a.shift(d)});return e.chain(i).filter(function(a){return!!a.length()}).uniq(!1,function(a){return a.toString()}).value()}function a(a,b){var b=b||0,c=[],d=g("stringStream").create(a),e=g("range");d.eatSpace();d.start=d.pos;for(var f;f=d.next();)if(/[\s\u00a0]/.test(f))c.push(e.create(d.start+b,d.pos-d.start-1)),d.eatSpace(),d.start=d.pos;c.push(e.create(d.start+b,d.pos-
154 d.start));return c}function d(a,b,d,f){a=c(a,g("xmlParser").parse(a),b);f&&a.reverse();return(b=e.find(a,function(a){return a.equal(d)}))?(f=e.indexOf(a,b),f<a.length-1?a[f+1]:null):f?e.find(a,function(a){return a.start<d.start}):!b&&(f=e.filter(a,function(a){return a.inside(d.end)}),f.length>1)?f[1]:e.find(a,function(a){return a.end>d.end})}function i(a,b){var c;if(a.charAt(b)=="<"&&(c=a.substring(b,a.length).match(p)))return g("range").create(b,c[0])}function j(a){return a=='"'||a=="'"}function n(a){var b=
155 a.valueRange(!0),c=[a.range(!0),b],d=g("stringStream"),f=g("cssEditTree"),k=g("range"),j=a.value();e.each(a.valueParts(),function(a){var g=a.clone();c.push(g.shift(b.start));var i=d.create(a.substring(j));if(i.match(/^[\w\-]+\(/,!0)){i.start=i.pos;i.skipToPair("(",")");var h=i.current();c.push(k.create(g.start+i.start,h));e.each(f.findParts(h),function(a){c.push(k.create(g.start+i.start+a.start,a.substring(h)))})}});return e.chain(c).filter(function(a){return!!a.length()}).uniq(!1,function(a){return a.toString()}).value()}
156 function m(a,b,c){var d=null,f=null,g=a.list(),j,i;c?(g.reverse(),j=function(a){return a.range(!0).start<=b.start},i=function(a){return a.start<b.start}):(j=function(a){return a.range(!0).end>=b.end},i=function(a){return a.end>b.start});for(;d=e.find(g,j);){a=n(d);c&&a.reverse();if(f=e.find(a,function(a){return a.equal(b)})){if(f=e.indexOf(a,f),f!=a.length-1){f=a[f+1];break}}else{f=e.filter(a,function(a){return a.inside(b.end)});if(f.length>1){f=f[1];break}if(f=e.find(a,i))break}f=null;b.start=b.end=
157 c?d.range(!0).start-1:d.range(!0).end+1}return f}function l(a,b,c){a=g("cssEditTree").parse(a,{offset:b});b=a.nameRange(!0);return c.end<b.end?b:m(a,c,!1)}function o(a,b,c){b=g("cssEditTree").parse(a,{offset:b});a=m(b,c,!0);return!a&&(b=b.nameRange(!0),c.start>b.start)?b:a}var p=/^<([\w\:\-]+)((?:\s+[\w\-:]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/,r=g("actions");r.add("select_next_item",function(a){return a.getSyntax()=="css"?f(a,!1,g("cssEditTree").extractRule,l):h(a)});r.add("select_previous_item",
158 function(a){return a.getSyntax()=="css"?f(a,!0,g("cssEditTree").extractRule,o):b(a)})});
159 emmet.exec(function(g){function e(b,c,a){var c=String((c||"out").toLowerCase()),d=g("editorUtils").outputInfo(b,a),a=d.syntax,e=g("range"),f=e.create(b.getSelectionRange()),d=d.content,n=null,n=h.last_match.opening_tag,m=h.last_match.closing_tag;if(c=="in"&&n&&f.length())if(m)n.start==f.start?d.charAt(n.end)=="<"?(c=e.create(h.find(d,n.end+1,a)),n=c.start==n.end&&c.end==m.start?e.create(h(d,n.end+1,a)):e.create(n.end,m.start-n.end)):n=e.create(n.end,m.start-n.end):(c=d.substring(0,m.start).indexOf("<",
160 n.end),n=e.create(h(d,c!=-1?c+1:n.end,a)));else return!1;else n=e.create(h(d,f.end,a));return n&&n.start!=-1?(b.createSelection(n.start,n.end),!0):!1}var f=g("actions"),h=g("html_matcher");f.add("match_pair",e,{hidden:!0});f.add("match_pair_inward",function(b){return e(b,"in")},{label:"HTML/Match Pair Tag (inward)"});f.add("match_pair_outward",function(b){return e(b,"out")},{label:"HTML/Match Pair Tag (outward)"});f.add("matching_pair",function(b){var c=String(b.getContent()),a=b.getCaretPos();c.charAt(a)==
161 "<"&&a++;var d=h.getTags(c,a,String(b.getProfileName()));if(d&&d[0]&&(c=d[0],d=d[1]))if(c.start<=a&&c.end>=a)return b.setCaretPos(d.start),!0;else if(d.start<=a&&d.end>=a)return b.setCaretPos(c.start),!0;return!1},{label:"HTML/Go To Matching Tag Pair"})});
162 emmet.exec(function(g){g("actions").add("remove_tag",function(e){var f=g("utils"),h=g("editorUtils").outputInfo(e),b=g("html_matcher").getTags(h.content,e.getCaretPos(),h.profile);if(b&&b[0]){if(b[1]){var c=f.narrowToNonSpace(h.content,b[0].end,b[1].start-b[0].end),a=f.findNewlineBounds(h.content,c.start),a=f.getLinePadding(a.substring(h.content)),h=c.substring(h.content),h=f.unindentString(h,a);e.replaceContent(f.getCaretPlaceholder()+f.escapeText(h),b[0].start,b[1].end)}else e.replaceContent(f.getCaretPlaceholder(),
163 b[0].start,b[0].end);return!0}return!1},{label:"HTML/Remove Tag"})});
164 emmet.exec(function(g){g("actions").add("split_join_tag",function(e,f){var h=g("html_matcher"),b=g("editorUtils").outputInfo(e,null,f),c=g("profile").get(b.profile);if((h=h.getTags(b.content,e.getCaretPos(),b.profile))&&h[0]){if(h[1]){b=g("utils");c=h[0].full_tag.replace(/\s*>$/,(c.self_closing_tag===!0?"/":" /")+">");if(c.length+h[0].start<e.getCaretPos())c+=b.getCaretPlaceholder();else var a=e.getCaretPos()-h[0].start,c=b.replaceSubstring(c,b.getCaretPlaceholder(),a);e.replaceContent(c,h[0].start,
165 h[1].end)}else{var d=g("utils"),b=d.getNewline(),a=g("resources").getVariable("indentation"),d=d.getCaretPlaceholder(),c=c.tag_nl===!0?b+a+d+b:d,c=h[0].full_tag.replace(/\s*\/>$/,">")+c+"</"+h[0].name+">";e.replaceContent(c,h[0].start,h[0].end)}h=!0}else h=!1;return h},{label:"HTML/Split\\Join Tag Declaration"})});
166 emmet.define("reflectCSSValue",function(g,e){function f(c){var a=g("cssEditTree"),d=g("editorUtils").outputInfo(c),c=c.getCaretPos();if(a=a.parseFromPosition(d.content,c))if(d=a.itemFromPosition(c,!0)){var e=a.source,f=a.options.offset,c=c-f-d.range().start;b.exec(!1,[d]);if(e!==a.source)return{data:a.source,start:f,end:f+e.length,caret:f+d.range().start+c}}}function h(b){var b=g("cssEditTree").baseName(b),a;if(b=="opacity"||b=="filter")return/^(?:\-\w+\-)?(?:opacity|filter)$/;else if(a=b.match(/^border-radius-(top|bottom)(left|right)/))return RegExp("^(?:\\-\\w+\\-)?(?:"+
167 b+"|border-"+a[1]+"-"+a[2]+"-radius)$");else if(a=b.match(/^border-(top|bottom)-(left|right)-radius/))return RegExp("^(?:\\-\\w+\\-)?(?:"+b+"|border-radius-"+a[1]+a[2]+")$");return RegExp("^(?:\\-\\w+\\-)?"+b+"$")}var b=g("handlerList").create();g("actions").add("reflect_css_value",function(b){return b.getSyntax()!="css"?!1:g("actionUtils").compoundUpdate(b,f(b))},{label:"CSS/Reflect Value"});b.add(function(b){var a=h(b.name());e.each(b.parent.list(),function(d){if(a.test(d.name())){var e;var f=b.name(),
168 h=b.value(),m=d.name();e=d.value();var l=g("cssEditTree"),o=g("utils"),f=l.baseName(f),m=l.baseName(m);e=f=="opacity"&&m=="filter"?e.replace(/opacity=[^)]*/i,"opacity="+Math.floor(parseFloat(h)*100)):f=="filter"&&m=="opacity"?(f=h.match(/opacity=([^)]*)/i))?o.prettifyNumber(parseInt(f[1])/100):e:h;d.value(e)}})},{order:-1});return{addHandler:function(c,a){b.add(c,a)},removeHandler:function(c){b.remove(c,options)}}});
169 emmet.exec(function(g){g("actions").add("evaluate_math_expression",function(e){var f=g("actionUtils"),h=g("utils"),b=String(e.getContent()),c=g("range").create(e.getSelectionRange());c.length()||(c=f.findExpressionBounds(e,function(a){return h.isNumeric(a)||".+-*/\\".indexOf(a)!=-1}));if(c&&c.length()){f=c.substring(b);f=f.replace(/([\d\.\-]+)\\([\d\.\-]+)/g,"Math.round($1/$2)");try{var a=h.prettifyNumber((new Function("return "+f))());e.replaceContent(a,c.start,c.end);e.setCaretPos(c.start+a.length);
170 return!0}catch(d){}}return!1},{label:"Numbers/Evaluate Math Expression"})});
171 emmet.exec(function(g,e){function f(b,a){var d=g("utils"),f=!1,j=!1,n=g("actionUtils").findExpressionBounds(b,function(a,b,c){return d.isNumeric(a)?!0:a=="."?!d.isNumeric(c.charAt(b+1))?!1:j?!1:j=!0:a=="-"?f?!1:f=!0:!1});if(n&&n.length()){var m=n.substring(String(b.getContent())),l=parseFloat(m);if(!e.isNaN(l)){l=d.prettifyNumber(l+a);if(/^(\-?)0+[1-9]/.test(m)){var o="";RegExp.$1&&(o="-",l=l.substring(1));l=l.split(".");l[0]=d.zeroPadString(l[0],h(m));l=o+l.join(".")}b.replaceContent(l,n.start,n.end);
172 b.createSelection(n.start,n.start+l.length);return!0}}return!1}function h(b){b=b.replace(/^\-/,"");return~b.indexOf(".")?b.split(".")[0].length:b.length}var b=g("actions");e.each([1,-1,10,-10,0.1,-0.1],function(c){var a=c>0?"increment":"decrement";b.add(a+"_number_by_"+String(Math.abs(c)).replace(".","").substring(0,2),function(a){return f(a,c)},{label:"Numbers/"+a.charAt(0).toUpperCase()+a.substring(1)+" number by "+Math.abs(c)})})});
173 emmet.exec(function(g,e){var f=g("actions"),h=g("preferences");h.define("css.closeBraceIndentation","\n","Indentation before closing brace of CSS rule. Some users prefere indented closing brace of CSS rule for better readability. This preference\u2019s value will be automatically inserted before closing brace when user adds newline in newly created CSS rule (e.g. when \u201cInsert formatted linebreak\u201d action will be performed in CSS file). If you\u2019re such user, you may want to write put a value like <code>\\n\\t</code> in this preference.");
174 f.add("insert_formatted_line_break_only",function(b){var c=g("utils"),a=g("resources"),d=g("editorUtils").outputInfo(b),f=b.getCaretPos(),j=c.getNewline();if(e.include(["html","xml","xsl"],d.syntax)){if(a=a.getVariable("indentation"),d=g("html_matcher").getTags(d.content,f,d.profile),d[0]&&d[1]&&d[0].type=="tag"&&d[0].end==f&&d[1].start==f)return b.replaceContent(j+a+c.getCaretPlaceholder()+j,f),!0}else if(d.syntax=="css"&&(d=d.content,f&&d.charAt(f-1)=="{")){var n=h.get("css.closeBraceIndentation"),
175 a=a.getVariable("indentation"),m=d.charAt(f)=="}";if(!m)for(var l=f,o=d.length,p;l<o;l++){p=d.charAt(l);if(p=="{")break;if(p=="}"){n="";m=!0;break}}m||(n+="}");c=j+a+c.getCaretPlaceholder()+n;b.replaceContent(c,f);return!0}return!1},{hidden:!0});f.add("insert_formatted_line_break",function(b){if(!f.run("insert_formatted_line_break_only",b)){for(var c=g("utils"),a=g("editorUtils").getCurrentLinePadding(b),d=String(b.getContent()),e=b.getCaretPos(),j=d.length,c=c.getNewline(),h="",m=b.getCurrentLineRange().end+
176 1,l;m<j;m++)if(l=d.charAt(m),l==" "||l=="\t")h+=l;else break;h.length>a.length?b.replaceContent(c+h,e,e,!0):b.replaceContent(c,e)}return!0},{hidden:!0})});
177 emmet.exec(function(g){g("actions").add("merge_lines",function(e){var f=g("html_matcher"),h=g("utils"),b=g("editorUtils").outputInfo(e),c=g("range").create(e.getSelectionRange());if(!c.length()&&(f=f(b.content,e.getCaretPos(),b.profile)))c.start=f[0],c.end=f[1];if(c.length()){b=c.substring(b.content);h=h.splitByLines(b);for(b=1;b<h.length;b++)h[b]=h[b].replace(/^\s+/,"");b=h.join("").replace(/\s{2,}/," ");e.replaceContent(b,c.start,c.end);e.createSelection(c.start,c.start+b.length);return!0}return!1})});
178 emmet.exec(function(g){function e(e,g,b){b=b||0;return g.charAt(b)==e.charAt(0)&&g.substr(b,e.length)==e}g("actions").add("encode_decode_data_url",function(f){var h=String(f.getSelection()),b=f.getCaretPos();if(!h)for(var c=String(f.getContent());b-- >=0;)if(e("src=",c,b)){if(c=c.substr(b).match(/^(src=(["'])?)([^'"<>\s]+)\1?/))h=c[3],b+=c[1].length;break}else if(e("url(",c,b)){if(c=c.substr(b).match(/^(url\((['"])?)([^'"\)\s]+)\1?/))h=c[3],b+=c[1].length;break}if(h)if(e("data:",h))if(c=String(f.prompt("Enter path to file (absolute or relative)"))){var a=
179 g("file"),d=a.createPath(f.getFilePath(),c);if(!d)throw"Can't save file";a.save(d,g("base64").decode(h.replace(/^data\:.+?;.+?,/,"")));f.replaceContent("$0"+c,b,b+h.length);f=!0}else f=!1;else{c=g("file");a=g("actionUtils");d=f.getFilePath();if(d===null)throw"You should save your file before using this action";d=c.locateFile(d,h);if(d===null)throw"Can't find "+h+" file";var i=g("base64").encode(String(c.read(d)));if(!i)throw"Can't encode file content to base64";i="data:"+(a.mimeTypes[String(c.getExt(d))]||
180 "application/octet-stream")+";base64,"+i;f.replaceContent("$0"+i,b,b+h.length);f=!0}else f=!1;return f},{label:"Encode\\Decode data:URL image"})});
181 emmet.exec(function(g,e){function f(e,b){var c;if(b){if(/^data:/.test(b))c=g("base64").decode(b.replace(/^data\:.+?;.+?,/,""));else{c=g("file");var a=c.locateFile(e.getFilePath(),b);if(a===null)throw"Can't find "+b+" file";c=String(c.read(a))}return g("actionUtils").getImageSize(c)}}g("actions").add("update_image_size",function(h){var b;if(String(h.getSyntax())=="css")a:{b=h.getCaretPos();var c=g("editorUtils").outputInfo(h);if(c=g("cssEditTree").parseFromPosition(c.content,b,!0)){var a=c.itemFromPosition(b,
182 !0),d;if(a&&(d=/url\((["']?)(.+?)\1\)/i.exec(a.value()||"")))if(d=f(h,d[2])){a=c.range(!0);c.value("width",d.width+"px");c.value("height",d.height+"px",c.indexOf("width")+1);b=e.extend(a,{data:c.toString(),caret:b});break a}}b=null}else a:{b=h.getCaretPos();c=g("editorUtils").outputInfo(h);if((c=g("xmlEditTree").parseFromPosition(c.content,b,!0))&&(c.name()||"").toLowerCase()=="img")if(d=f(h,c.value("src"))){a=c.range(!0);c.value("width",d.width);c.value("height",d.height,c.indexOf("width")+1);b=
183 e.extend(a,{data:c.toString(),caret:b});break a}b=null}return g("actionUtils").compoundUpdate(h,b)})});
184 emmet.define("cssResolver",function(g,e){function f(a){var b=a&&a.charCodeAt(0);return a&&a=="."||b>47&&b<58}function h(a){a=g("utils").trim(a);if(~a.indexOf("/*")||/[\n\r]/.test(a))return!1;if(!/^[a-z0-9\-]+\s*\:/i.test(a))return!1;a=g("tabStops").processText(a,{replaceCarets:!0,tabstop:function(){return"value"}});return a.split(":").length==2}function b(a){var b=q.getDict("css.keywordAliases");return a in b?b[a]:a}function c(a){var b=g("utils"),a=b.trim(a);if(a.indexOf(":")==-1)return{name:a,value:r};
185 a=a.split(":");return{name:b.trim(a.shift()),value:b.trim(a.join(":")).replace(/^(\$\{0\}|\$0)(\s*;?)$/,"${1}$2")}}function a(a,b){var c=p[b];c||(c=e.find(p,function(a){return a.prefix==b}));return c&&c.supports&&e.include(c.supports,a)}function d(b,c){var d=[];e.each(p,function(c,e){a(b,e)&&d.push(e)});!d.length&&!c&&e.each(p,function(a,b){a.obsolete||d.push(b)});return d}function i(a,b){e.isString(b)&&(b={prefix:b});p[a]=e.extend({},o,b)}function j(a,b){if(b){var c=q.get(b+"."+a);if(!e.isUndefined(c))return c}return q.get("css."+
186 a)}function n(a,b,c){if(!e.isString(a))a=a.data;if(!h(a))return a;b&&(~a.indexOf(";")?a=a.split(";").join(" !important;"):a+=" !important");b=a.indexOf(":");a=a.substring(0,b).replace(/\s+$/,"")+j("valueSeparator",c)+g("utils").trim(a.substring(b+1));return a.replace(/\s*;\s*$/,j("propertyEnd",c))}function m(a){var b=q.getArray(a);e.each(q.getArray(a+"Addon"),function(a){a.charAt(0)=="-"?b=e.without(b,a.substr(1)):(a.charAt(0)=="+"&&(a=a.substr(1)),b.push(a))});return b}var l=null,o={prefix:"emmet",
187 obsolete:!1,transformName:function(a){return"-"+this.prefix+"-"+a},supports:null},p={},r="${1};",q=g("preferences");q.define("css.valueSeparator",": ","Defines a symbol that should be placed between CSS property and value when expanding CSS abbreviations.");q.define("css.propertyEnd",";","Defines a symbol that should be placed at the end of CSS property when expanding CSS abbreviations.");q.define("stylus.valueSeparator"," ","Defines a symbol that should be placed between CSS property and value when expanding CSS abbreviations in Stylus dialect.");
188 q.define("stylus.propertyEnd","","Defines a symbol that should be placed at the end of CSS property when expanding CSS abbreviations in Stylus dialect.");q.define("sass.propertyEnd","","Defines a symbol that should be placed at the end of CSS property when expanding CSS abbreviations in SASS dialect.");q.define("css.autoInsertVendorPrefixes",!0,"Automatically generate vendor-prefixed copies of expanded CSS property. By default, Emmet will generate vendor-prefixed properties only when you put dash before abbreviation (e.g. <code>-bxsh</code>). With this option enabled, you don\u2019t need dashes before abbreviations: Emmet will produce vendor-prefixed properties for you.");
189 var x=e.template("A comma-separated list of CSS properties that may have <code><%= vendor %></code> vendor prefix. This list is used to generate a list of prefixed properties when expanding <code>-property</code> abbreviations. Empty list means that all possible CSS values may have <code><%= vendor %></code> prefix."),s=e.template("A comma-separated list of <em>additions</em> CSS properties for <code>css.<%= vendor %>Preperties</code> preference. You should use this list if you want to add or remove a few CSS properties to original set. To add a new property, simply write its name, to remove it, precede property with hyphen.<br>For example, to add <em>foo</em> property and remove <em>border-radius</em> one, the preference value will look like this: <code>foo, -border-radius</code>.");
190 e.each({webkit:"animation, animation-delay, animation-direction, animation-duration, animation-fill-mode, animation-iteration-count, animation-name, animation-play-state, animation-timing-function, appearance, backface-visibility, background-clip, background-composite, background-origin, background-size, border-fit, border-horizontal-spacing, border-image, border-vertical-spacing, box-align, box-direction, box-flex, box-flex-group, box-lines, box-ordinal-group, box-orient, box-pack, box-reflect, box-shadow, color-correction, column-break-after, column-break-before, column-break-inside, column-count, column-gap, column-rule-color, column-rule-style, column-rule-width, column-span, column-width, dashboard-region, font-smoothing, highlight, hyphenate-character, hyphenate-limit-after, hyphenate-limit-before, hyphens, line-box-contain, line-break, line-clamp, locale, margin-before-collapse, margin-after-collapse, marquee-direction, marquee-increment, marquee-repetition, marquee-style, mask-attachment, mask-box-image, mask-box-image-outset, mask-box-image-repeat, mask-box-image-slice, mask-box-image-source, mask-box-image-width, mask-clip, mask-composite, mask-image, mask-origin, mask-position, mask-repeat, mask-size, nbsp-mode, perspective, perspective-origin, rtl-ordering, text-combine, text-decorations-in-effect, text-emphasis-color, text-emphasis-position, text-emphasis-style, text-fill-color, text-orientation, text-security, text-stroke-color, text-stroke-width, transform, transition, transform-origin, transform-style, transition-delay, transition-duration, transition-property, transition-timing-function, user-drag, user-modify, user-select, writing-mode, svg-shadow, box-sizing, border-radius",
191 moz:"animation-delay, animation-direction, animation-duration, animation-fill-mode, animation-iteration-count, animation-name, animation-play-state, animation-timing-function, appearance, backface-visibility, background-inline-policy, binding, border-bottom-colors, border-image, border-left-colors, border-right-colors, border-top-colors, box-align, box-direction, box-flex, box-ordinal-group, box-orient, box-pack, box-shadow, box-sizing, column-count, column-gap, column-rule-color, column-rule-style, column-rule-width, column-width, float-edge, font-feature-settings, font-language-override, force-broken-image-icon, hyphens, image-region, orient, outline-radius-bottomleft, outline-radius-bottomright, outline-radius-topleft, outline-radius-topright, perspective, perspective-origin, stack-sizing, tab-size, text-blink, text-decoration-color, text-decoration-line, text-decoration-style, text-size-adjust, transform, transform-origin, transform-style, transition, transition-delay, transition-duration, transition-property, transition-timing-function, user-focus, user-input, user-modify, user-select, window-shadow, background-clip, border-radius",
192 ms:"accelerator, backface-visibility, background-position-x, background-position-y, behavior, block-progression, box-align, box-direction, box-flex, box-line-progression, box-lines, box-ordinal-group, box-orient, box-pack, content-zoom-boundary, content-zoom-boundary-max, content-zoom-boundary-min, content-zoom-chaining, content-zoom-snap, content-zoom-snap-points, content-zoom-snap-type, content-zooming, filter, flow-from, flow-into, font-feature-settings, grid-column, grid-column-align, grid-column-span, grid-columns, grid-layer, grid-row, grid-row-align, grid-row-span, grid-rows, high-contrast-adjust, hyphenate-limit-chars, hyphenate-limit-lines, hyphenate-limit-zone, hyphens, ime-mode, interpolation-mode, layout-flow, layout-grid, layout-grid-char, layout-grid-line, layout-grid-mode, layout-grid-type, line-break, overflow-style, perspective, perspective-origin, perspective-origin-x, perspective-origin-y, scroll-boundary, scroll-boundary-bottom, scroll-boundary-left, scroll-boundary-right, scroll-boundary-top, scroll-chaining, scroll-rails, scroll-snap-points-x, scroll-snap-points-y, scroll-snap-type, scroll-snap-x, scroll-snap-y, scrollbar-arrow-color, scrollbar-base-color, scrollbar-darkshadow-color, scrollbar-face-color, scrollbar-highlight-color, scrollbar-shadow-color, scrollbar-track-color, text-align-last, text-autospace, text-justify, text-kashida-space, text-overflow, text-size-adjust, text-underline-position, touch-action, transform, transform-origin, transform-origin-x, transform-origin-y, transform-origin-z, transform-style, transition, transition-delay, transition-duration, transition-property, transition-timing-function, user-select, word-break, word-wrap, wrap-flow, wrap-margin, wrap-through, writing-mode",
193 o:"dashboard-region, animation, animation-delay, animation-direction, animation-duration, animation-fill-mode, animation-iteration-count, animation-name, animation-play-state, animation-timing-function, border-image, link, link-source, object-fit, object-position, tab-size, table-baseline, transform, transform-origin, transition, transition-delay, transition-duration, transition-property, transition-timing-function, accesskey, input-format, input-required, marquee-dir, marquee-loop, marquee-speed, marquee-style"},
194 function(a,b){q.define("css."+b+"Properties",a,x({vendor:b}));q.define("css."+b+"PropertiesAddon","",s({vendor:b}))});q.define("css.unitlessProperties","z-index, line-height, opacity, font-weight, zoom","The list of properties whose values \u200b\u200bmust not contain units.");q.define("css.intUnit","px","Default unit for integer values");q.define("css.floatUnit","em","Default unit for float values");q.define("css.keywords","auto, inherit","A comma-separated list of valid keywords that can be used in CSS abbreviations.");
195 q.define("css.keywordAliases","a:auto, i:inherit","A comma-separated list of keyword aliases, used in CSS abbreviation. Each alias should be defined as <code>alias:keyword_name</code>.");q.define("css.unitAliases","e:em, p:%, x:ex, r:rem","A comma-separated list of unit aliases, used in CSS abbreviation. Each alias should be defined as <code>alias:unit_value</code>.");i("w",{prefix:"webkit",supports:m("css.webkitProperties")});i("m",{prefix:"moz",supports:m("css.mozProperties")});i("s",{prefix:"ms",
196 supports:m("css.msProperties")});i("o",{prefix:"o",supports:m("css.oProperties")});var w=["css","less","sass","scss","stylus"];g("resources").addResolver(function(a,b){return e.include(w,b)&&a.isElement()?l.expandToSnippet(a.abbreviation,b):null});var y=g("expandAbbreviation");y.addHandler(function(a,b,c){if(!e.include(w,b))return!1;var d=a.getSelectionRange().end,f=y.findAbbreviation(a);return f&&(b=emmet.expandAbbreviation(f,b,c))?(f=d-f.length,c=d,a.getContent().charAt(d)==";"&&b.charAt(b.length-
197 1)==";"&&c++,a.replaceContent(b,f,c),!0):!1});return l={addPrefix:i,supportsPrefix:a,prefixed:function(b,c){return a(b,c)?"-"+c+"-"+b:b},listPrefixes:function(){return e.map(p,function(a){return a.prefix})},getPrefix:function(a){return p[a]},removePrefix:function(a){a in p&&delete p[a]},extractPrefixes:function(a){if(a.charAt(0)!="-")return{property:a,prefixes:null};for(var b=1,c=a.length,d,e=[];b<c;){d=a.charAt(b);if(d=="-"){b++;break}if(d in p)e.push(d);else{e.length=0;b=1;break}b++}if(b==c-1)b=
198 1,e.length=1;return{property:a.substring(b),prefixes:e.length?e:"all"}},findValuesInAbbreviation:function(a,c){for(var c=c||"css",d=0,j=a.length,i="",h;d<j;){h=a.charAt(d);if(f(h)||h=="-"&&f(a.charAt(d+1))){i=a.substring(d);break}d++}h=a.substring(0,a.length-i.length);d=g("resources");for(j=[];~h.indexOf("-")&&!d.findSnippet(c,h);){h=h.split("-");var n=h.pop();if(!e.include(q.getArray("css.keywords"),b(n)))break;j.unshift(n);h=h.join("-")}return j.join("-")+i},parseValues:function(a){for(var c="",
199 d=[],g=0,j=a.length,i,h;g<j;)if(i=a.charAt(g),i=="-"&&c)d.push(c),c="",g++;else if(c+=i,g++,h=a.charAt(g),i!="-"&&!f(i)&&(f(h)||h=="-"))e.include(q.getArray("css.keywords"),b(c))&&g++,d.push(c),c="";c&&d.push(c);return e.map(d,b)},extractValues:function(a){var b=this.findValuesInAbbreviation(a);return!b?{property:a,values:null}:{property:a.substring(0,a.length-b.length).replace(/-$/,""),values:this.parseValues(b)}},normalizeValue:function(a,b){var b=(b||"").toLowerCase(),c=q.getArray("css.unitlessProperties");
200 return a.replace(/^(\-?[0-9\.]+)([a-z]*)$/,function(a,d,f){if(!f&&(d=="0"||e.include(c,b)))return d;f?(a=q.getDict("css.unitAliases"),d+=f in a?a[f]:f):d+=q.get(~d.indexOf(".")?"css.floatUnit":"css.intUnit");return d})},expand:function(a,b,f){var f=f||"css",j=g("resources"),i=q.get("css.autoInsertVendorPrefixes"),m;if(m=/^(.+)\!$/.test(a))a=RegExp.$1;var l=j.findSnippet(f,a);if(l&&!i)return n(l,m,f);l=this.extractPrefixes(a);a=this.extractValues(l.property);a=e.extend(l,a);l=j.findSnippet(f,a.property);
201 if(!l&&~a.property.indexOf(":")){var o=a.property.split(":"),l=o.shift(),l=j.findSnippet(f,l)||l;a.values=this.parseValues(o.join(":"))}if(l){if(!e.isString(l))l=l.data}else l=a.property+":"+r;if(!h(l))return l;var w=c(l),y=[];!b&&a.values&&(b=e.map(a.values,function(a){return this.normalizeValue(a,w.name)},this).join(" ")+";");w.value=b||w.value;b=a.prefixes=="all"||!a.prefixes&&i?d(w.name,i&&a.prefixes!="all"):a.prefixes;e.each(b,function(a){a in p&&y.push(n(p[a].transformName(w.name)+":"+w.value,
202 m,f))});y.push(n(w.name+":"+w.value,m,f));return y},expandToSnippet:function(a,b){var c=this.expand(a,null,b);return e.isArray(c)?c.join("\n"):!e.isString(c)?c.data:String(c)},getSyntaxPreference:j}});
203 emmet.define("cssGradient",function(g,e){function f(a){return g("utils").trim(a).replace(/\s+/g," ")}function h(a){var a=f(a),b=null,a=a.replace(/^(\w+\(.+?\))\s*/,function(a,c){b=c;return""});b||(a=a.split(" "),b=a[0],a=a[1]||"");var c={color:b};a&&a.replace(/^(\-?[\d\.]+)([a-z%]+)?$/,function(a,b,d){c.position=b;~b.indexOf(".")?d="":d||(d="%");if(d)c.unit=d});return c}function b(a){var b=0;e.each(a,function(c,d){if(!d)return c.position=c.position||0;if(d==a.length-1&&!("position"in c))c.position=
204 1;if("position"in c){var f=a[b].position||0,g=(c.position-f)/(d-b);e.each(a.slice(b,d),function(a,b){a.position=f+g*b});b=d}})}function c(a){var b=parseFloat(a);if(!e.isNaN(b))switch(b%360){case 0:return"left";case 90:return"bottom";case 180:return"right";case 240:return"top"}return a}function a(a){a=c(a);if(q.test(a))throw"The direction is an angle that can\u2019t be converted.";var b=function(b){return~a.indexOf(b)?"100%":"0"};return b("right")+" "+b("bottom")+", "+b("left")+" "+b("top")}function d(a){var b=
205 s.getArray("css.gradient.prefixes"),b=e.map(b,function(b){return"-"+b+"-"+a});b.push(a);return b}function i(a,b){var c=[],d=g("cssResolver");s.get("css.gradient.fallback")&&~b.toLowerCase().indexOf("background")&&c.push({name:"background-color",value:"${1:"+a.colorStops[0].color+"}"});e.each(s.getArray("css.gradient.prefixes"),function(e){var f=d.prefixed(b,e);if(e=="webkit"&&s.get("css.gradient.oldWebkit"))try{c.push({name:f,value:p.oldWebkitLinearGradient(a)})}catch(g){}c.push({name:f,value:p.toString(a,
206 e)})});return c.sort(function(a,b){return b.name.length-a.name.length})}function j(a,b,c){var f=a.parent,j=g("utils");e.each(f.getAll(d(a.name())),function(b){b!=a&&/gradient/i.test(b.value())&&f.remove(b)});var h=a.value();c||(c=g("range").create(0,a.value()));a.value(function(a){return j.replaceSubstring(h,a,c)}(p.toString(b))+"${2}");b=i(b,a.name());e.each(b,function(b){f.add(b.name,b.value,f.indexOf(a))})}function n(a){var b=a.value(),c=null;return(a=e.find(a.valueParts(),function(a){return c=
207 p.parse(a.substring(b))}))&&c?{gradient:c,valueRange:a}:null}function m(a,b){var c=s.get("css.gradient.defaultProperty");if(!c)return!1;var d=String(a.getContent()),f=g("range").create(a.getCurrentLineRange()),j=f.substring(d).replace(/^\s+/,function(a){f.start+=a.length;return""}).replace(/\s+$/,function(a){f.end-=a.length;return""}),d=g("cssResolver");if(j=p.parse(j)){var h=i(j,c);h.push({name:c,value:p.toString(j)+"${2}"});var m=d.getSyntaxPreference("valueSeparator",b),n=d.getSyntaxPreference("propertyEnd",
208 b),h=e.map(h,function(a){return a.name+m+a.value+n});a.replaceContent(h.join("\n"),f.start,f.end);return!0}return!1}function l(a,b){var c=null,d=g("cssEditTree").parseFromPosition(a,b,!0);d&&((c=d.itemFromPosition(b,!0))||(c=e.find(d.list(),function(a){return a.range(!0).end==b})));return{rule:d,property:c}}var o=["top","to bottom","0deg"],p=null,r=["css","less","sass","scss","stylus","styl"],q=/\d+deg/i,x=/top|bottom|left|right/i,s=g("preferences");s.define("css.gradient.prefixes","webkit, moz, o",
209 "A comma-separated list of vendor-prefixes for which values should be generated.");s.define("css.gradient.oldWebkit",!0,"Generate gradient definition for old Webkit implementations");s.define("css.gradient.omitDefaultDirection",!0,"Do not output default direction definition in generated gradients.");s.define("css.gradient.defaultProperty","background-image","When gradient expanded outside CSS value context, it will produce properties with this name.");s.define("css.gradient.fallback",!1,"With this option enabled, CSS gradient generator will produce <code>background-color</code> property with gradient first color as fallback for old browsers.");
210 g("expandAbbreviation").addHandler(function(a,b,c){var d=g("editorUtils").outputInfo(a,b,c);if(!e.include(r,d.syntax))return!1;var c=a.getCaretPos(),f=d.content,d=l(f,c);if(d.property){var i=n(d.property);if(i){var b=d.rule.options.offset||0,h=b+d.rule.toString().length;if(/[\n\r]/.test(d.property.value())){var o=d.property.valueRange(!0).start+i.valueRange.end,f=g("utils").replaceSubstring(f,";",o),c=l(f,c);c.property&&(i=n(c.property),d=c)}d.property.end(";");j(d.property,i.gradient,i.valueRange);
211 a.replaceContent(d.rule.toString(),b,h,!0);return!0}}return m(a,b)});g("reflectCSSValue").addHandler(function(a){var b=g("utils"),c=n(a);if(!c)return!1;var f=a.value(),j=function(a){return b.replaceSubstring(f,a,c.valueRange)};e.each(a.parent.getAll(d(a.name())),function(b){if(b!==a){var d=b.value().match(/^\s*(\-([a-z]+)\-)?linear\-gradient/);d?b.value(j(p.toString(c.gradient,d[2]||""))):b.value().match(/\s*\-webkit\-gradient/)&&b.value(j(p.oldWebkitLinearGradient(c.gradient)))}});return!0});return p=
212 {parse:function(a){var b=null;g("utils").trim(a).replace(/^([\w\-]+)\((.+?)\)$/,function(a,c,d){c=c.toLowerCase().replace(/^\-[a-z]+\-/,"");if(c=="linear-gradient"||c=="lg"){for(var a=o[0],d=g("stringStream").create(g("utils").trim(d)),c=[],j;j=d.next();)d.peek()==","?(c.push(d.current()),d.next(),d.eatSpace(),d.start=d.pos):j=="("&&d.skipTo(")");c.push(d.current());c=e.compact(e.map(c,f));if(c.length){if(q.test(c[0])||x.test(c[0]))a=c.shift();b={type:"linear",direction:a,colorStops:e.map(c,h)}}else b=
213 null;return""}return a});return b},oldWebkitLinearGradient:function(c){e.isString(c)&&(c=this.parse(c));if(!c)return null;var d=e.map(c.colorStops,e.clone);e.each(d,function(a){if("position"in a)if(~a.position.indexOf(".")||a.unit=="%")a.position=parseFloat(a.position)/(a.unit=="%"?100:1);else throw"Can't convert color stop '"+(a.position+(a.unit||""))+"'";});b(d);d=e.map(d,function(a,b){return!a.position&&!b?"from("+a.color+")":a.position==1&&b==d.length-1?"to("+a.color+")":"color-stop("+a.position.toFixed(2).replace(/\.?0+$/,
214 "")+", "+a.color+")"});return"-webkit-gradient(linear, "+a(c.direction)+", "+d.join(", ")+")"},toString:function(a,b){if(a.type=="linear"){var c=(b?"-"+b+"-":"")+"linear-gradient",d=e.map(a.colorStops,function(a){return a.color+("position"in a?" "+a.position+(a.unit||""):"")});a.direction&&(!s.get("css.gradient.omitDefaultDirection")||!e.include(o,a.direction))&&d.unshift(a.direction);return c+"("+d.join(", ")+")"}}}});
215 emmet.exec(function(g,e){var f=g("handlerList").create(),h=g("resources");e.extend(h,{addGenerator:function(b,c,a){e.isString(b)&&(b=RegExp(b));f.add(function(a,e){var f;return(f=b.exec(a.name()))?c(f,a,e):null},a)}});h.addResolver(function(b,c){return f.exec(null,e.toArray(arguments))})});
216 emmet.define("tagName",function(g,e){var f={empty:"area,base,basefont,br,col,frame,hr,img,input,isindex,link,meta,param,embed,keygen,command".split(","),blockLevel:"address,applet,blockquote,button,center,dd,del,dir,div,dl,dt,fieldset,form,frameset,hr,iframe,ins,isindex,li,link,map,menu,noframes,noscript,object,ol,p,pre,script,table,tbody,td,tfoot,th,thead,tr,ul,h1,h2,h3,h4,h5,h6".split(","),inlineLevel:"a,abbr,acronym,applet,b,basefont,bdo,big,br,button,cite,code,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,select,small,span,strike,strong,sub,sup,textarea,tt,u,var".split(",")},
217 h={p:"span",ul:"li",ol:"li",table:"tr",tr:"td",tbody:"tr",thead:"tr",tfoot:"tr",colgroup:"col",select:"option",optgroup:"option",audio:"source",video:"source",object:"param",map:"area"};return{resolve:function(b){b=(b||"").toLowerCase();return b in h?this.getMapping(b):this.isInlineLevel(b)?"span":"div"},getMapping:function(b){return h[b.toLowerCase()]},isInlineLevel:function(b){return this.isTypeOf(b,"inlineLevel")},isBlockLevel:function(b){return this.isTypeOf(b,"blockLevel")},isEmptyElement:function(b){return this.isTypeOf(b,
218 "empty")},isTypeOf:function(b,c){return e.include(f[c],b)},addMapping:function(b,c){h[b]=c},removeMapping:function(b){b in h&&delete h[b]},addElementToCollection:function(b,c){f[c]||(f[c]=[]);var a=this.getCollection(c);e.include(a,b)||a.push(b)},removeElementFromCollection:function(b,c){c in f&&(f[c]=e.without(this.getCollection(c),b))},getCollection:function(b){return f[b]}}});
219 emmet.exec(function(g,e){function f(){return{element:d.get("bem.elementSeparator"),modifier:d.get("bem.modifierSeparator")}}function h(a){if(g("abbreviationUtils").isSnippet(a))return a;a.__bem={block:"",element:"",modifier:""};var d=b(a.attribute("class")).split(" "),i=/^[a-z]\-/i;a.__bem.block=e.find(d,function(a){return i.test(a)});if(!a.__bem.block)i=/^[a-z]/i,a.__bem.block=e.find(d,function(a){return i.test(a)})||"";(d=e.chain(d).map(function(b){var d;d=c(b,a,"element");d=c(d,a,"modifier");var e=
220 "",g="",i="",b=f();~d.indexOf(b.element)?(e=d.split(b.element),i=e[1].split(b.modifier),e=e[0],g=i.shift(),i=i.join(b.modifier)):~d.indexOf(b.modifier)&&(i=d.split(b.modifier),e=i.shift(),i=i.join(b.modifier));if(e||g||i){if(!e)e=a.__bem.block;d=e;var h=[];g&&(d+=b.element+g);h.push(d);i&&h.push(d+b.modifier+i);a.__bem.block=e;a.__bem.element=g;a.__bem.modifier=i;b=h}else b=d;return b}).flatten().uniq().value().join(" "))&&a.attribute("class",d);return a}function b(a){var b=g("utils"),a=(" "+(a||
221 "")+" ").replace(/\s+/g," "),c=d.get("bem.shortElementPrefix");c&&(c=RegExp("\\s("+b.escapeForRegexp(c)+"+)","g"),a=a.replace(c,function(a,c){return" "+b.repeatString(f().element,c.length)}));return b.trim(a)}function c(a,b,c){var d=f(),e=RegExp("^("+d[c]+")+","g");if(e.test(a)){for(var g=0,e=a.replace(e,function(a){g=a.length/d[c].length;return""}),i=b;i.parent&&g--;)i=i.parent;if(!i||!i.__bem)i=b;if(i&&i.__bem)return a=i.__bem.block,c=="modifier"&&i.__bem.element&&(a+=d.element+i.__bem.element),
222 a+d[c]+e}return a}function a(b,c){b.name&&h(b,c);var d=g("abbreviationUtils");e.each(b.children,function(b){a(b,c);!d.isSnippet(b)&&b.start&&(i=!0)});return b}var d=g("preferences");d.define("bem.elementSeparator","__","Class name\u2019s element separator.");d.define("bem.modifierSeparator","_","Class name\u2019s modifier separator.");d.define("bem.shortElementPrefix","-","Symbol for describing short \u201cblock-element\u201d notation. Class names prefixed with this symbol will be treated as element name for parent\u2018s block name. Each symbol instance traverses one level up in parsed tree for block name lookup. Empty value will disable short notation.");
223 var i=!1;g("filters").add("bem",function(b,c){i=!1;b=a(b,c);i&&(b=g("filters").apply(b,"html",c));return b})});
224 emmet.exec(function(g,e){function f(c,a,d){var f=g("utils"),j=b.get("filter.commentTrigger");if(j=="*"||e.find(j.split(","),function(a){return!!c.attribute(f.trim(a))}))j={node:c,name:c.name(),padding:c.parent?c.parent.padding:"",attr:function(a,b,d){return(a=c.attribute(a))?(b||"")+a+(d||""):""}},a=f.normalizeNewline(a?a(j):""),d=f.normalizeNewline(d?d(j):""),c.start=c.start.replace(/</,a+"<"),c.end=c.end.replace(/>/,">"+d)}function h(b,a,d){var i=g("abbreviationUtils");e.each(b.children,function(b){i.isBlock(b)&&
225 f(b,a,d);h(b,a,d)});return b}var b=g("preferences");b.define("filter.commentAfter",'\n<\!-- /<%= attr("id", "#") %><%= attr("class", ".") %> --\>',"A definition of comment that should be placed <i>after</i> matched element when <code>comment</code> filter is applied. This definition is an ERB-style template passed to <code>_.template()</code> function (see Underscore.js docs for details). In template context, the following properties and functions are availabe:\n<ul><li><code>attr(name, before, after)</code> \u2013 a function that outputsspecified attribute value concatenated with <code>before</code> and <code>after</code> strings. If attribute doesn't exists, the empty string will be returned.</li><li><code>node</code> \u2013 current node (instance of <code>AbbreviationNode</code>)</li><li><code>name</code> \u2013 name of current tag</li><li><code>padding</code> \u2013 current string padding, can be used for formatting</li></ul>");
226 b.define("filter.commentBefore","","A definition of comment that should be placed <i>before</i> matched element when <code>comment</code> filter is applied. For more info, read description of <code>filter.commentAfter</code> property");b.define("filter.commentTrigger","id, class","A comma-separated list of attribute names that should exist in abbreviatoin where comment should be added. If you wish to add comment for every element, set this option to <code>*</code>");g("filters").add("c",function(c){var a=
227 e.template(b.get("filter.commentBefore")),d=e.template(b.get("filter.commentAfter"));return h(c,a,d)})});emmet.exec(function(g,e){function f(b){return b.replace(/([<>&])/g,function(b,a){return h[a]})}var h={"<":"&lt;",">":"&gt;","&":"&amp;"};g("filters").add("e",function c(a){e.each(a.children,function(a){a.start=f(a.start);a.end=f(a.end);a.content=f(a.content);c(a)});return a})});
228 emmet.exec(function(g,e){function f(){return g("resources").getVariable("indentation")}function h(b){return b.parent&&!b.parent.parent&&!b.index()}function b(b,a){var d=g("abbreviationUtils");if(a.tag_nl===!0||d.isBlock(b))return!0;if(!b.parent||!a.inline_break)return!1;var f=0;return!!e.find(b.parent.children,function(b){b.isTextNode()||!d.isInline(b)?f=0:d.isInline(b)&&f++;if(f>=a.inline_break)return!0})}g("filters").add("_format",function a(d,i,j){var j=j||0,n=g("abbreviationUtils");e.each(d.children,
229 function(d){if(n.isSnippet(d)){if(!h(d))d.start=g("utils").getNewline()+d.start}else{d.start=d.end="%s";var e=g("utils"),o=g("abbreviationUtils"),p=o.isUnary(d),e=e.getNewline();if(i.tag_nl!==!1){var r=i.tag_nl===!0&&(i.tag_nl_leaf||d.children.length);if(!d.isTextNode()){if(b(d,i)){if(!h(d)&&(!o.isSnippet(d.parent)||d.index()))d.start=e+d.start;if(o.hasBlockChildren(d)||d.children.length&&b(d.children[0],i)||r&&!p)d.end=e+d.end;if(o.hasTagsInContent(d)||r&&!d.children.length&&!p)d.start+=e+f()}else if(o.isInline(d)&&
230 d.parent&&g("abbreviationUtils").hasBlockChildren(d.parent)&&!h(d))d.start=e+d.start;else if(o.isInline(d)&&o.hasBlockChildren(d))d.end=e+d.end;d.padding=f()}}}a(d,i,j+1)});return d})});
231 emmet.exec(function(g,e){function f(f,b){var c="",a=[],d=b.attributeQuote(),i=b.cursor();e.each(f.attributeList(),function(e){var f=b.attributeName(e.name);switch(f.toLowerCase()){case "id":c+="#"+(e.value||i);break;case "class":c+="."+g("utils").trim(e.value||i).replace(/\s+/g,".");break;default:a.push(":"+f+" => "+d+(e.value||i)+d)}});a.length&&(c+="{"+a.join(", ")+"}");return c}g("filters").add("haml",function b(c,a,d){var d=d||0,i=g("abbreviationUtils");d||(c=g("filters").apply(c,"_format",a));
232 e.each(c.children,function(c){if(!i.isSnippet(c)&&c.parent){var e=g("abbreviationUtils"),m=g("utils"),l=f(c,a),o=a.cursor(),e=e.isUnary(c),p=a.self_closing_tag&&e?"/":"",r="",r="%"+a.tagName(c.name());r.toLowerCase()=="%div"&&l&&l.indexOf("{")==-1&&(r="");c.end="";c.start=m.replaceSubstring(c.start,r+l+p+" ",c.start.indexOf("%s"),"%s");!c.children.length&&!e&&(c.start+=o)}b(c,a,d+1)});return c})});
233 emmet.exec(function(g,e){function f(f,b){var c=b.attributeQuote(),a=b.cursor();return e.map(f.attributeList(),function(d){return" "+b.attributeName(d.name)+"="+c+(d.value||a)+c}).join("")}g("filters").add("html",function b(c,a,d){var d=d||0,i=g("abbreviationUtils");d||(c=g("filters").apply(c,"_format",a));e.each(c.children,function(c){if(!i.isSnippet(c)&&c.parent){var e=g("abbreviationUtils"),m=g("utils"),l=f(c,a),o=a.cursor(),e=e.isUnary(c),p="",r="";if(!c.isTextNode()){var q=a.tagName(c.name());
234 e?(p="<"+q+l+a.selfClosing()+">",c.end=""):(p="<"+q+l+">",r="</"+q+">")}c.start=m.replaceSubstring(c.start,p,c.start.indexOf("%s"),"%s");c.end=m.replaceSubstring(c.end,r,c.end.indexOf("%s"),"%s");!c.children.length&&!e&&c.content.indexOf(o)==-1&&(c.start+=o)}b(c,a,d+1)});return c})});
235 emmet.exec(function(g,e){var f=/^\s+/,h=/[\n\r]/g;g("filters").add("s",function c(a){var d=g("abbreviationUtils");e.each(a.children,function(a){if(!d.isSnippet(a))a.start=a.start.replace(f,""),a.end=a.end.replace(f,"");a.start=a.start.replace(h,"");a.end=a.end.replace(h,"");a.content=a.content.replace(h,"");c(a)});return a})});
236 emmet.exec(function(g,e){function f(g,b){e.each(g.children,function(c){if(c.content)c.content=c.content.replace(b,"");f(c,b)});return g}g("preferences").define("filter.trimRegexp","[\\s|\\u00a0]*[\\d|#|\\-|*|\\u2022]+\\.?\\s*","Regular expression used to remove list markers (numbers, dashes, bullets, etc.) in <code>t</code> (trim) filter. The trim filter is useful for wrapping with abbreviation lists, pased from other documents (for example, Word documents).");g("filters").add("t",function(e){var b=
237 RegExp(g("preferences").get("filter.trimRegexp"));return f(e,b)})});emmet.exec(function(g,e){var f={"xsl:variable":1,"xsl:with-param":1};g("filters").add("xsl",function b(c){var a=g("abbreviationUtils");e.each(c.children,function(c){if(!a.isSnippet(c)&&(c.name()||"").toLowerCase()in f&&c.children.length)c.start=c.start.replace(/\s+select\s*=\s*(['"]).*?\1/,"");b(c)});return c})});
238 emmet.exec(function(g,e){function f(a,b){return Math.round(Math.random()*(b-a)+a)}function h(a,b){for(var c=a.length,d=Math.min(c,b),g=[];g.length<d;){var h=f(0,c-1);e.include(g,h)||g.push(h)}return e.map(g,function(b){return a[b]})}function b(a,b){a.length&&(a[0]=a[0].charAt(0).toUpperCase()+a[0].substring(1));return a.join(" ")+(b||(e.isString("?!...")?"?!...".charAt(f(0,4)):"?!..."[f(0,4)]))}function c(a){var b=a.length,c=0,c=b>3&&b<=6?f(0,1):b>6&&b<=12?f(0,2):f(1,4);e.each(h(e.range(c)),function(b){a[b]+=
239 ","})}g("abbreviationParser").addPreprocessor(function(e){var g=/^(?:lorem|lipsum)(\d*)$/i,n;e.findAll(function(e){if(e._name&&(n=e._name.match(g))){var i=n[1]||30;e._name="";e.data("forceNameResolving",e.isRepeating()||e.attributeList().length);e.data("pasteOverwrites",!0);e.data("paste",function(e){var g=i,j=!e,e=[],n=0,g=parseInt(g,10);j&&(j=a.slice(0,g),j.length>5&&(j[4]+=","),n+=j.length,e.push(b(j,".")));for(;n<g;)j=h(d,Math.min(f(3,12)*f(1,5),g-n)),n+=j.length,c(j),e.push(b(j));return e.join(" ")})}})});
240 var a="lorem ipsum dolor sit amet consectetur adipisicing elit".split(" "),d=["exercitationem","perferendis","perspiciatis","laborum","eveniet","sunt","iure","nam","nobis","eum","cum","officiis","excepturi","odio","consectetur","quasi","aut","quisquam","vel","eligendi","itaque","non","odit","tempore","quaerat","dignissimos","facilis","neque","nihil","expedita","vitae","vero","ipsum","nisi","animi","cumque","pariatur","velit","modi","natus","iusto","eaque","sequi","illo","sed","ex","et","voluptatibus",
241 "tempora","veritatis","ratione","assumenda","incidunt","nostrum","placeat","aliquid","fuga","provident","praesentium","rem","necessitatibus","suscipit","adipisci","quidem","possimus","voluptas","debitis","sint","accusantium","unde","sapiente","voluptate","qui","aspernatur","laudantium","soluta","amet","quo","aliquam","saepe","culpa","libero","ipsa","dicta","reiciendis","nesciunt","doloribus","autem","impedit","minima","maiores","repudiandae","ipsam","obcaecati","ullam","enim","totam","delectus","ducimus",
242 "quis","voluptates","dolores","molestiae","harum","dolorem","quia","voluptatem","molestias","magni","distinctio","omnis","illum","dolorum","voluptatum","ea","quas","quam","corporis","quae","blanditiis","atque","deserunt","laboriosam","earum","consequuntur","hic","cupiditate","quibusdam","accusamus","ut","rerum","error","minus","eius","ab","ad","nemo","fugit","officia","at","in","id","quos","reprehenderit","numquam","iste","fugiat","sit","inventore","beatae","repellendus","magnam","recusandae","quod",
243 "explicabo","doloremque","aperiam","consequatur","asperiores","commodi","optio","dolor","labore","temporibus","repellat","veniam","architecto","est","esse","mollitia","nulla","a","similique","eos","alias","dolore","tenetur","deleniti","porro","facere","maxime","corrupti"]});emmet.exec(function(g){g("actions").add("select_line",function(e){var f=e.getCurrentLineRange();e.createSelection(f.start,f.end);return!0})});
244 emmet.exec(function(g){g("resources").setVocabulary({variables:{lang:"en",locale:"en-US",charset:"UTF-8",indentation:"\t",newline:"\n"},css:{filters:"html",snippets:{"@i":"@import url(|);","@m":"@media print {\n\t|\n}","@f":"@font-face {\n\tfont-family:|;\n\tsrc:url(|);\n}","@f+":"@font-face {\n\tfont-family: '${1:FontName}';\n\tsrc: url('${2:FileName}.eot');\n\tsrc: url('${2:FileName}.eot?#iefix') format('embedded-opentype'),\n\t\t url('${2:FileName}.woff') format('woff'),\n\t\t url('${2:FileName}.ttf') format('truetype'),\n\t\t url('${2:FileName}.svg#${1:FontName}') format('svg');\n\tfont-style: ${3:normal};\n\tfont-weight: ${4:normal};\n}",
245 "!":"!important",pos:"position:|;","pos:s":"position:static;","pos:a":"position:absolute;","pos:r":"position:relative;","pos:f":"position:fixed;",t:"top:|;","t:a":"top:auto;",r:"right:|;","r:a":"right:auto;",b:"bottom:|;","b:a":"bottom:auto;",l:"left:|;","l:a":"left:auto;",z:"z-index:|;","z:a":"z-index:auto;",fl:"float:|;","fl:n":"float:none;","fl:l":"float:left;","fl:r":"float:right;",cl:"clear:|;","cl:n":"clear:none;","cl:l":"clear:left;","cl:r":"clear:right;","cl:b":"clear:both;",d:"display:|;",
246 "d:n":"display:none;","d:b":"display:block;","d:i":"display:inline;","d:ib":"display:inline-block;","d:li":"display:list-item;","d:ri":"display:run-in;","d:cp":"display:compact;","d:tb":"display:table;","d:itb":"display:inline-table;","d:tbcp":"display:table-caption;","d:tbcl":"display:table-column;","d:tbclg":"display:table-column-group;","d:tbhg":"display:table-header-group;","d:tbfg":"display:table-footer-group;","d:tbr":"display:table-row;","d:tbrg":"display:table-row-group;","d:tbc":"display:table-cell;",
247 "d:rb":"display:ruby;","d:rbb":"display:ruby-base;","d:rbbg":"display:ruby-base-group;","d:rbt":"display:ruby-text;","d:rbtg":"display:ruby-text-group;",v:"visibility:|;","v:v":"visibility:visible;","v:h":"visibility:hidden;","v:c":"visibility:collapse;",ov:"overflow:|;","ov:v":"overflow:visible;","ov:h":"overflow:hidden;","ov:s":"overflow:scroll;","ov:a":"overflow:auto;",ovx:"overflow-x:|;","ovx:v":"overflow-x:visible;","ovx:h":"overflow-x:hidden;","ovx:s":"overflow-x:scroll;","ovx:a":"overflow-x:auto;",
248 ovy:"overflow-y:|;","ovy:v":"overflow-y:visible;","ovy:h":"overflow-y:hidden;","ovy:s":"overflow-y:scroll;","ovy:a":"overflow-y:auto;",ovs:"overflow-style:|;","ovs:a":"overflow-style:auto;","ovs:s":"overflow-style:scrollbar;","ovs:p":"overflow-style:panner;","ovs:m":"overflow-style:move;","ovs:mq":"overflow-style:marquee;",zoo:"zoom:1;",cp:"clip:|;","cp:a":"clip:auto;","cp:r":"clip:rect(|);",bxz:"box-sizing:|;","bxz:cb":"box-sizing:content-box;","bxz:bb":"box-sizing:border-box;",bxsh:"box-shadow:${1:hoff} ${2:voff} ${3:radius} ${4:color};",
249 "bxsh:n":"box-shadow:none;",m:"margin:|;",mt:"margin-top:|;","mt:a":"margin-top:auto;",mr:"margin-right:|;","mr:a":"margin-right:auto;",mb:"margin-bottom:|;","mb:a":"margin-bottom:auto;",ml:"margin-left:|;","ml:a":"margin-left:auto;",p:"padding:|;",pt:"padding-top:|;",pr:"padding-right:|;",pb:"padding-bottom:|;",pl:"padding-left:|;",w:"width:|;","w:a":"width:auto;",h:"height:|;","h:a":"height:auto;",maw:"max-width:|;","maw:n":"max-width:none;",mah:"max-height:|;","mah:n":"max-height:none;",miw:"min-width:|;",
250 mih:"min-height:|;",o:"outline:|;","o:n":"outline:none;",oo:"outline-offset:|;",ow:"outline-width:|;",os:"outline-style:|;",oc:"outline-color:#${1:000};","oc:i":"outline-color:invert;",bd:"border:|;","bd+":"border:${1:1px} ${2:solid} ${3:#000};","bd:n":"border:none;",bdbk:"border-break:|;","bdbk:c":"border-break:close;",bdcl:"border-collapse:|;","bdcl:c":"border-collapse:collapse;","bdcl:s":"border-collapse:separate;",bdc:"border-color:#${1:000};",bdi:"border-image:url(|);","bdi:n":"border-image:none;",
251 bdti:"border-top-image:url(|);","bdti:n":"border-top-image:none;",bdri:"border-right-image:url(|);","bdri:n":"border-right-image:none;",bdbi:"border-bottom-image:url(|);","bdbi:n":"border-bottom-image:none;",bdli:"border-left-image:url(|);","bdli:n":"border-left-image:none;",bdci:"border-corner-image:url(|);","bdci:n":"border-corner-image:none;","bdci:c":"border-corner-image:continue;",bdtli:"border-top-left-image:url(|);","bdtli:n":"border-top-left-image:none;","bdtli:c":"border-top-left-image:continue;",
252 bdtri:"border-top-right-image:url(|);","bdtri:n":"border-top-right-image:none;","bdtri:c":"border-top-right-image:continue;",bdbri:"border-bottom-right-image:url(|);","bdbri:n":"border-bottom-right-image:none;","bdbri:c":"border-bottom-right-image:continue;",bdbli:"border-bottom-left-image:url(|);","bdbli:n":"border-bottom-left-image:none;","bdbli:c":"border-bottom-left-image:continue;",bdf:"border-fit:|;","bdf:c":"border-fit:clip;","bdf:r":"border-fit:repeat;","bdf:sc":"border-fit:scale;","bdf:st":"border-fit:stretch;",
253 "bdf:ow":"border-fit:overwrite;","bdf:of":"border-fit:overflow;","bdf:sp":"border-fit:space;",bdl:"border-length:|;","bdl:a":"border-length:auto;",bdsp:"border-spacing:|;",bds:"border-style:|;","bds:n":"border-style:none;","bds:h":"border-style:hidden;","bds:dt":"border-style:dotted;","bds:ds":"border-style:dashed;","bds:s":"border-style:solid;","bds:db":"border-style:double;","bds:dtds":"border-style:dot-dash;","bds:dtdtds":"border-style:dot-dot-dash;","bds:w":"border-style:wave;","bds:g":"border-style:groove;",
254 "bds:r":"border-style:ridge;","bds:i":"border-style:inset;","bds:o":"border-style:outset;",bdw:"border-width:|;",bdt:"border-top:|;","bdt+":"border-top:${1:1px} ${2:solid} ${3:#000};","bdt:n":"border-top:none;",bdtw:"border-top-width:|;",bdts:"border-top-style:|;","bdts:n":"border-top-style:none;",bdtc:"border-top-color:#${1:000};",bdr:"border-right:|;","bdr+":"border-right:${1:1px} ${2:solid} ${3:#000};","bdr:n":"border-right:none;",bdrw:"border-right-width:|;",bdrs:"border-right-style:|;","bdrs:n":"border-right-style:none;",
255 bdrc:"border-right-color:#${1:000};",bdb:"border-bottom:|;","bdb+":"border-bottom:${1:1px} ${2:solid} ${3:#000};","bdb:n":"border-bottom:none;",bdbw:"border-bottom-width:|;",bdbs:"border-bottom-style:|;","bdbs:n":"border-bottom-style:none;",bdbc:"border-bottom-color:#${1:000};",bdl:"border-left:|;","bdl+":"border-left:${1:1px} ${2:solid} ${3:#000};","bdl:n":"border-left:none;",bdlw:"border-left-width:|;",bdls:"border-left-style:|;","bdls:n":"border-left-style:none;",bdlc:"border-left-color:#${1:000};",
256 bdrs:"border-radius:|;",bdtrrs:"border-top-right-radius:|;",bdtlrs:"border-top-left-radius:|;",bdbrrs:"border-bottom-right-radius:|;",bdblrs:"border-bottom-left-radius:|;",bg:"background:|;","bg+":"background:${1:#fff} url(${2}) ${3:0} ${4:0} ${5:no-repeat};","bg:n":"background:none;","bg:ie":"filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='${1:x}.png',sizingMethod='${2:crop}');",bgc:"background-color:#${1:fff};",bgi:"background-image:url(|);","bgi:n":"background-image:none;",bgr:"background-repeat:|;",
257 "bgr:n":"background-repeat:no-repeat;","bgr:x":"background-repeat:repeat-x;","bgr:y":"background-repeat:repeat-y;",bga:"background-attachment:|;","bga:f":"background-attachment:fixed;","bga:s":"background-attachment:scroll;",bgp:"background-position:${1:0} ${2:0};",bgpx:"background-position-x:|;",bgpy:"background-position-y:|;",bgbk:"background-break:|;","bgbk:bb":"background-break:bounding-box;","bgbk:eb":"background-break:each-box;","bgbk:c":"background-break:continuous;",bgcp:"background-clip:|;",
258 "bgcp:bb":"background-clip:border-box;","bgcp:pb":"background-clip:padding-box;","bgcp:cb":"background-clip:content-box;","bgcp:nc":"background-clip:no-clip;",bgo:"background-origin:|;","bgo:pb":"background-origin:padding-box;","bgo:bb":"background-origin:border-box;","bgo:cb":"background-origin:content-box;",bgz:"background-size:|;","bgz:a":"background-size:auto;","bgz:ct":"background-size:contain;","bgz:cv":"background-size:cover;",c:"color:#${1:000};",cm:"/* |${child} */",cn:"content:|;",tbl:"table-layout:|;",
259 "tbl:a":"table-layout:auto;","tbl:f":"table-layout:fixed;",cps:"caption-side:|;","cps:t":"caption-side:top;","cps:b":"caption-side:bottom;",ec:"empty-cells:|;","ec:s":"empty-cells:show;","ec:h":"empty-cells:hide;",lis:"list-style:|;","lis:n":"list-style:none;",lisp:"list-style-position:|;","lisp:i":"list-style-position:inside;","lisp:o":"list-style-position:outside;",list:"list-style-type:|;","list:n":"list-style-type:none;","list:d":"list-style-type:disc;","list:c":"list-style-type:circle;","list:s":"list-style-type:square;",
260 "list:dc":"list-style-type:decimal;","list:dclz":"list-style-type:decimal-leading-zero;","list:lr":"list-style-type:lower-roman;","list:ur":"list-style-type:upper-roman;",lisi:"list-style-image:|;","lisi:n":"list-style-image:none;",q:"quotes:|;","q:n":"quotes:none;","q:ru":"quotes:'\\00AB' '\\00BB' '\\201E' '\\201C';","q:en":"quotes:'\\201C' '\\201D' '\\2018' '\\2019';",ct:"content:|;","ct:n":"content:normal;","ct:oq":"content:open-quote;","ct:noq":"content:no-open-quote;","ct:cq":"content:close-quote;",
261 "ct:ncq":"content:no-close-quote;","ct:a":"content:attr(|);","ct:c":"content:counter(|);","ct:cs":"content:counters(|);",coi:"counter-increment:|;",cor:"counter-reset:|;",va:"vertical-align:|;","va:sup":"vertical-align:super;","va:t":"vertical-align:top;","va:tt":"vertical-align:text-top;","va:m":"vertical-align:middle;","va:bl":"vertical-align:baseline;","va:b":"vertical-align:bottom;","va:tb":"vertical-align:text-bottom;","va:sub":"vertical-align:sub;",ta:"text-align:|;","ta:l":"text-align:left;",
262 "ta:c":"text-align:center;","ta:r":"text-align:right;",tal:"text-align-last:|;","tal:a":"text-align-last:auto;","tal:l":"text-align-last:left;","tal:c":"text-align-last:center;","tal:r":"text-align-last:right;",td:"text-decoration:|;","td:n":"text-decoration:none;","td:u":"text-decoration:underline;","td:o":"text-decoration:overline;","td:l":"text-decoration:line-through;",te:"text-emphasis:|;","te:n":"text-emphasis:none;","te:ac":"text-emphasis:accent;","te:dt":"text-emphasis:dot;","te:c":"text-emphasis:circle;",
263 "te:ds":"text-emphasis:disc;","te:b":"text-emphasis:before;","te:a":"text-emphasis:after;",th:"text-height:|;","th:a":"text-height:auto;","th:f":"text-height:font-size;","th:t":"text-height:text-size;","th:m":"text-height:max-size;",ti:"text-indent:|;","ti:-":"text-indent:-9999px;",tj:"text-justify:|;","tj:a":"text-justify:auto;","tj:iw":"text-justify:inter-word;","tj:ii":"text-justify:inter-ideograph;","tj:ic":"text-justify:inter-cluster;","tj:d":"text-justify:distribute;","tj:k":"text-justify:kashida;",
264 "tj:t":"text-justify:tibetan;",to:"text-outline:|;","to+":"text-outline:${1:0} ${2:0} ${3:#000};","to:n":"text-outline:none;",tr:"text-replace:|;","tr:n":"text-replace:none;",tt:"text-transform:|;","tt:n":"text-transform:none;","tt:c":"text-transform:capitalize;","tt:u":"text-transform:uppercase;","tt:l":"text-transform:lowercase;",tw:"text-wrap:|;","tw:n":"text-wrap:normal;","tw:no":"text-wrap:none;","tw:u":"text-wrap:unrestricted;","tw:s":"text-wrap:suppress;",tsh:"text-shadow:${1:hoff} ${2:voff} ${3:blur} ${4:#000};",
265 "tsh+":"text-shadow:${1:0} ${2:0} ${3:0} ${4:#000};","tsh:n":"text-shadow:none;",trf:"transform:|;","trf:skx":"transform: skewX(${1:angle});","trf:sky":"transform: skewY(${1:angle});","trf:sc":"transform: scale(${1:x}, ${2:y});","trf:scx":"transform: scaleX(${1:x});","trf:scy":"transform: scaleY(${1:y});","trf:r":"transform: rotate(${1:angle});","trf:t":"transform: translate(${1:x}, ${2:y});","trf:tx":"transform: translateX(${1:x});","trf:ty":"transform: translateY(${1:y});",trs:"transition:${1:prop} ${2:time};",
266 trsde:"transition-delay:${1:time};",trsdu:"transition-duration:${1:time};",trsp:"transition-property:${1:prop};",trstf:"transition-timing-function:${1:tfunc};",lh:"line-height:|;",whs:"white-space:|;","whs:n":"white-space:normal;","whs:p":"white-space:pre;","whs:nw":"white-space:nowrap;","whs:pw":"white-space:pre-wrap;","whs:pl":"white-space:pre-line;",whsc:"white-space-collapse:|;","whsc:n":"white-space-collapse:normal;","whsc:k":"white-space-collapse:keep-all;","whsc:l":"white-space-collapse:loose;",
267 "whsc:bs":"white-space-collapse:break-strict;","whsc:ba":"white-space-collapse:break-all;",wob:"word-break:|;","wob:n":"word-break:normal;","wob:k":"word-break:keep-all;","wob:l":"word-break:loose;","wob:bs":"word-break:break-strict;","wob:ba":"word-break:break-all;",wos:"word-spacing:|;",wow:"word-wrap:|;","wow:nm":"word-wrap:normal;","wow:n":"word-wrap:none;","wow:u":"word-wrap:unrestricted;","wow:s":"word-wrap:suppress;",lts:"letter-spacing:|;",f:"font:|;","f+":"font:${1:1em} ${2:Arial,sans-serif};",
268 fw:"font-weight:|;","fw:n":"font-weight:normal;","fw:b":"font-weight:bold;","fw:br":"font-weight:bolder;","fw:lr":"font-weight:lighter;",fs:"font-style:|;","fs:n":"font-style:normal;","fs:i":"font-style:italic;","fs:o":"font-style:oblique;",fv:"font-variant:|;","fv:n":"font-variant:normal;","fv:sc":"font-variant:small-caps;",fz:"font-size:|;",fza:"font-size-adjust:|;","fza:n":"font-size-adjust:none;",ff:"font-family:|;","ff:s":"font-family:serif;","ff:ss":"font-family:sans-serif;","ff:c":"font-family:cursive;",
269 "ff:f":"font-family:fantasy;","ff:m":"font-family:monospace;",fef:"font-effect:|;","fef:n":"font-effect:none;","fef:eg":"font-effect:engrave;","fef:eb":"font-effect:emboss;","fef:o":"font-effect:outline;",fem:"font-emphasize:|;",femp:"font-emphasize-position:|;","femp:b":"font-emphasize-position:before;","femp:a":"font-emphasize-position:after;",fems:"font-emphasize-style:|;","fems:n":"font-emphasize-style:none;","fems:ac":"font-emphasize-style:accent;","fems:dt":"font-emphasize-style:dot;","fems:c":"font-emphasize-style:circle;",
270 "fems:ds":"font-emphasize-style:disc;",fsm:"font-smooth:|;","fsm:a":"font-smooth:auto;","fsm:n":"font-smooth:never;","fsm:aw":"font-smooth:always;",fst:"font-stretch:|;","fst:n":"font-stretch:normal;","fst:uc":"font-stretch:ultra-condensed;","fst:ec":"font-stretch:extra-condensed;","fst:c":"font-stretch:condensed;","fst:sc":"font-stretch:semi-condensed;","fst:se":"font-stretch:semi-expanded;","fst:e":"font-stretch:expanded;","fst:ee":"font-stretch:extra-expanded;","fst:ue":"font-stretch:ultra-expanded;",
271 op:"opacity:|;","op:ie":"filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100);","op:ms":"-ms-filter:'progid:DXImageTransform.Microsoft.Alpha(Opacity=100)';",rz:"resize:|;","rz:n":"resize:none;","rz:b":"resize:both;","rz:h":"resize:horizontal;","rz:v":"resize:vertical;",cur:"cursor:|;","cur:a":"cursor:auto;","cur:d":"cursor:default;","cur:c":"cursor:crosshair;","cur:ha":"cursor:hand;","cur:he":"cursor:help;","cur:m":"cursor:move;","cur:p":"cursor:pointer;","cur:t":"cursor:text;",pgbb:"page-break-before:|;",
272 "pgbb:au":"page-break-before:auto;","pgbb:al":"page-break-before:always;","pgbb:l":"page-break-before:left;","pgbb:r":"page-break-before:right;",pgbi:"page-break-inside:|;","pgbi:au":"page-break-inside:auto;","pgbi:av":"page-break-inside:avoid;",pgba:"page-break-after:|;","pgba:au":"page-break-after:auto;","pgba:al":"page-break-after:always;","pgba:l":"page-break-after:left;","pgba:r":"page-break-after:right;",orp:"orphans:|;",wid:"widows:|;"}},html:{filters:"html",snippets:{c:"<\!-- |${child} --\>",
273 "cc:ie6":"<\!--[if lte IE 6]>\n\t${child}|\n<![endif]--\>","cc:ie":"<\!--[if IE]>\n\t${child}|\n<![endif]--\>","cc:noie":"<\!--[if !IE]><\!--\>\n\t${child}|\n<\!--<![endif]--\>","html:4t":'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">\n<html lang="${lang}">\n<head>\n\t<meta http-equiv="Content-Type" content="text/html;charset=${charset}">\n\t<title>${1:Document}</title>\n</head>\n<body>\n\t${child}${2}\n</body>\n</html>',"html:4s":'<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">\n<html lang="${lang}">\n<head>\n\t<meta http-equiv="Content-Type" content="text/html;charset=${charset}">\n\t<title>${1:Document}</title>\n</head>\n<body>\n\t${child}${2}\n</body>\n</html>',
274 "html:xt":'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\n<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="${lang}">\n<head>\n\t<meta http-equiv="Content-Type" content="text/html;charset=${charset}" />\n\t<title></title>\n</head>\n<body>\n\t${child}${2}\n</body>\n</html>',"html:xs":'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\n<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="${lang}">\n<head>\n\t<meta http-equiv="Content-Type" content="text/html;charset=${charset}" />\n\t<title>${1:Document}</title>\n</head>\n<body>\n\t${child}${2}\n</body>\n</html>',
275 "html:xxs":'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">\n<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="${lang}">\n<head>\n\t<meta http-equiv="Content-Type" content="text/html;charset=${charset}" />\n\t<title>${1:Document}</title>\n</head>\n<body>\n\t${child}${2}\n</body>\n</html>',"html:5":'<!doctype html>\n<html lang="${lang}">\n<head>\n\t<meta charset="${charset}">\n\t<title>${1:Document}</title>\n</head>\n<body>\n\t${child}${2}\n</body>\n</html>'},
276 abbreviations:{"!":"html:5",a:'<a href="">',"a:link":'<a href="http://|">',"a:mail":'<a href="mailto:|">',abbr:'<abbr title="">',acronym:'<acronym title="">',base:'<base href="" />',bdo:'<bdo dir="">',"bdo:r":'<bdo dir="rtl">',"bdo:l":'<bdo dir="ltr">',link:'<link rel="stylesheet" href="" />',"link:css":'<link rel="stylesheet" href="${1:style}.css" media="all" />',"link:print":'<link rel="stylesheet" href="${1:print}.css" media="print" />',"link:favicon":'<link rel="shortcut icon" type="image/x-icon" href="${1:favicon.ico}" />',
277 "link:touch":'<link rel="apple-touch-icon" href="${1:favicon.png}" />',"link:rss":'<link rel="alternate" type="application/rss+xml" title="RSS" href="${1:rss.xml}" />',"link:atom":'<link rel="alternate" type="application/atom+xml" title="Atom" href="${1:atom.xml}" />',"meta:utf":'<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />',"meta:win":'<meta http-equiv="Content-Type" content="text/html;charset=windows-1251" />',"meta:compat":'<meta http-equiv="X-UA-Compatible" content="${1:IE=7}" />',
278 style:"<style>",script:"<script>","script:src":'<script src="">',img:'<img src="" alt="" />',iframe:'<iframe src="" frameborder="0">',embed:'<embed src="" type="" />',object:'<object data="" type="">',param:'<param name="" value="" />',map:'<map name="">',area:'<area shape="" coords="" href="" alt="" />',"area:d":'<area shape="default" href="" alt="" />',"area:c":'<area shape="circle" coords="" href="" alt="" />',"area:r":'<area shape="rect" coords="" href="" alt="" />',"area:p":'<area shape="poly" coords="" href="" alt="" />',
279 form:'<form action="">',"form:get":'<form action="" method="get">',"form:post":'<form action="" method="post">',label:'<label for="">',input:'<input type="" />',"input:hidden":'<input type="hidden" name="" />',"input:h":'<input type="hidden" name="" />',"input:text":'<input type="text" name="" id="" />',"input:t":'<input type="text" name="" id="" />',"input:search":'<input type="search" name="" id="" />',"input:email":'<input type="email" name="" id="" />',"input:url":'<input type="url" name="" id="" />',
280 "input:password":'<input type="password" name="" id="" />',"input:p":'<input type="password" name="" id="" />',"input:datetime":'<input type="datetime" name="" id="" />',"input:date":'<input type="date" name="" id="" />',"input:datetime-local":'<input type="datetime-local" name="" id="" />',"input:month":'<input type="month" name="" id="" />',"input:week":'<input type="week" name="" id="" />',"input:time":'<input type="time" name="" id="" />',"input:number":'<input type="number" name="" id="" />',
281 "input:color":'<input type="color" name="" id="" />',"input:checkbox":'<input type="checkbox" name="" id="" />',"input:c":'<input type="checkbox" name="" id="" />',"input:radio":'<input type="radio" name="" id="" />',"input:r":'<input type="radio" name="" id="" />',"input:range":'<input type="range" name="" id="" />',"input:file":'<input type="file" name="" id="" />',"input:f":'<input type="file" name="" id="" />',"input:submit":'<input type="submit" value="" />',"input:s":'<input type="submit" value="" />',
282 "input:image":'<input type="image" src="" alt="" />',"input:i":'<input type="image" src="" alt="" />',"input:reset":'<input type="reset" value="" />',"input:button":'<input type="button" value="" />',"input:b":'<input type="button" value="" />',select:'<select name="" id=""></select>',option:'<option value=""></option>',textarea:'<textarea name="" id="" cols="${1:30}" rows="${2:10}">',"menu:context":'<menu type="context">',"menu:c":'<menu type="context">',"menu:toolbar":'<menu type="toolbar">',"menu:t":'<menu type="toolbar">',
283 video:'<video src="">',audio:'<audio src="">',"html:xml":'<html xmlns="http://www.w3.org/1999/xhtml">',bq:"blockquote",acr:"acronym",fig:"figure",figc:"figcaption",ifr:"iframe",emb:"embed",obj:"object",src:"source",cap:"caption",colg:"colgroup",fst:"fieldset",btn:"button",optg:"optgroup",opt:"option",tarea:"textarea",leg:"legend",sect:"section",art:"article",hdr:"header",ftr:"footer",adr:"address",dlg:"dialog",str:"strong",prog:"progress",fset:"fieldset",datag:"datagrid",datal:"datalist",kg:"keygen",
284 out:"output",det:"details",cmd:"command","ol+":"ol>li","ul+":"ul>li","dl+":"dl>dt+dd","map+":"map>area","table+":"table>tr>td","colgroup+":"colgroup>col","colg+":"colgroup>col","tr+":"tr>td","select+":"select>option","optgroup+":"optgroup>option","optg+":"optgroup>option"}},xml:{"extends":"html",profile:"xml",filters:"html"},xsl:{"extends":"html",filters:"html, xsl",abbreviations:{tm:'<xsl:template match="" mode="">',tmatch:"tm",tn:'<xsl:template name="">',tname:"tn",call:'<xsl:call-template name=""/>',
285 ap:'<xsl:apply-templates select="" mode=""/>',api:"<xsl:apply-imports/>",imp:'<xsl:import href=""/>',inc:'<xsl:include href=""/>',ch:"<xsl:choose>","xsl:when":'<xsl:when test="">',wh:"xsl:when",ot:"<xsl:otherwise>","if":'<xsl:if test="">',par:'<xsl:param name="">',pare:'<xsl:param name="" select=""/>',"var":'<xsl:variable name="">',vare:'<xsl:variable name="" select=""/>',wp:'<xsl:with-param name="" select=""/>',key:'<xsl:key name="" match="" use=""/>',elem:'<xsl:element name="">',attr:'<xsl:attribute name="">',
286 attrs:'<xsl:attribute-set name="">',cp:'<xsl:copy select=""/>',co:'<xsl:copy-of select=""/>',val:'<xsl:value-of select=""/>',each:'<xsl:for-each select="">',"for":"each",tex:"<xsl:text></xsl:text>",com:"<xsl:comment>",msg:'<xsl:message terminate="no">',fall:"<xsl:fallback>",num:'<xsl:number value=""/>',nam:'<namespace-alias stylesheet-prefix="" result-prefix=""/>',pres:'<xsl:preserve-space elements=""/>',strip:'<xsl:strip-space elements=""/>',proc:'<xsl:processing-instruction name="">',sort:'<xsl:sort select="" order=""/>',
287 "choose+":"xsl:choose>xsl:when+xsl:otherwise"}},haml:{filters:"haml","extends":"html"},scss:{"extends":"css"},sass:{"extends":"css"},less:{"extends":"css"},stylus:{"extends":"css"}},"system")});
288 emmet.define("shortcut",function(){var g=!!window.opera,e=/mac\s+os/i.test(navigator.userAgent),f={"`":"~",1:"!",2:"@",3:"#",4:"$",5:"%",6:"^",7:"&",8:"*",9:"(",0:")","-":"_","=":"+",";":":","'":'"',",":"<",".":">","/":"?","\\":"|"},h={esc:27,escape:27,tab:9,space:32,"return":13,enter:13,backspace:8,scrolllock:145,scroll_lock:145,scroll:145,capslock:20,caps_lock:20,caps:20,numlock:144,num_lock:144,num:144,pause:19,"break":19,insert:45,home:36,"delete":46,end:35,pageup:33,page_up:33,pu:33,pagedown:34,
289 page_down:34,pd:34,plus:187,minus:189,left:37,up:38,right:39,down:40,f1:112,f2:113,f3:114,f4:115,f5:116,f6:117,f7:118,f8:119,f9:120,f10:121,f11:122,f12:123},b={ctrl:"\u2303",control:"\u2303",meta:"\u2318",shift:"\u21e7",alt:"\u2325",enter:"\u23ce",tab:"\u21e5",left:"\u2190",right:"\u2192",up:"\u2191",down:"\u2193"},c={meta:"Ctrl",control:"Ctrl",left:"\u2190",right:"\u2192",up:"\u2191",down:"\u2193"},a={SHIFT:1,CTRL:2,ALT:4,META:8};return{compile:function(b){if(typeof b!="string")return b;for(var c=
290 0,b=b.toLowerCase().split("+"),f,h,m=0,l=b.length;m<l;m++)h=b[m],e&&g?h=="ctrl"||h=="control"?h="meta":h=="meta"&&(h="ctrl"):!e&&h=="meta"&&(h="ctrl"),h=="ctrl"||h=="control"?c|=a.CTRL:h=="shift"?c|=a.SHIFT:h=="alt"?c|=a.ALT:h=="meta"?c|=a.META:f=h;return{mask:c,key:f}},test:function(b,c){var e=0,g=this.compile(b);c.ctrlKey&&(e|=a.CTRL);c.shiftKey&&(e|=a.SHIFT);c.altKey&&(e|=a.ALT);c.metaKey&&(e|=a.META);var m=c.keyCode?c.keyCode:c.which,l=String.fromCharCode(m).toLowerCase();if(e!==g.mask)return!1;
291 if(g.key.length>1)return h[g.key]==m;else{m==188&&(l=",");m==190&&(l=".");m==191&&(l="/");if(l==g.key)return!0;if(c.shiftKey&&f[l])return f[l]==g.key}return!1},format:function(a){for(var f=e?b:c,g=e?"":"+",a=a.toLowerCase().split("+"),h=[],m,l=0;l<a.length;l++)m=a[l],h.push(m in f?f[m]:m.charAt().toUpperCase()+m.substring(1));return h.join(g)}}});
292 emmet.define("editor",function(g,e){var f=null,h=document.createElement("textarea");h.value="\n";g("utils").setNewline(h.value);h=null;return{setContext:function(b){f=b},getContext:function(){return f},getSelectionRange:function(){if("selectionStart"in f)return{start:f.selectionStart,end:f.selectionEnd};else if(document.selection){f.focus();var b=document.selection.createRange();if(b===null)return{start:0,end:this.getContent().length};var c=f.createTextRange(),a=c.duplicate();c.moveToBookmark(b.getBookmark());
293 a.setEndPoint("EndToStart",c);return{start:a.text.length,end:a.text.length+b.text.length}}else return null},createSelection:function(b,c){typeof c=="undefined"&&(c=b);if("setSelectionRange"in f)f.setSelectionRange(b,c);else if("createTextRange"in f){var a=f.createTextRange();a.collapse(!0);var d=g("utils"),e=d.splitByLines(this.getContent().substring(0,b)).length-1;c-=e+d.splitByLines(this.getContent().substring(b,c)).length-1;b-=e;a.moveStart("character",b);a.moveEnd("character",c-b);a.select()}},
294 getCurrentLineRange:function(){var b=this.getCaretPos();return b===null?null:g("utils").findNewlineBounds(this.getContent(),b)},getCaretPos:function(){var b=this.getSelectionRange();return b?b.start:null},setCaretPos:function(b){this.createSelection(b)},getCurrentLine:function(){var b=this.getCurrentLineRange();return b.start<b.end?this.getContent().substring(b.start,b.end):""},replaceContent:function(b,c,a,d){var h=this.getContent(),j=g("utils");e.isUndefined(a)&&(a=e.isUndefined(c)?h.length:c);
295 e.isUndefined(c)&&(c=0);d||(b=j.padString(b,j.getLinePaddingFromPosition(h,c)));d=emmet.require("tabStops").extract(b,{escape:function(a){return a}});b=d.text;(d=d.tabstops[0])?(d.start+=c,d.end+=c):d={start:b.length+c,end:b.length+c};try{f.value=j.replaceSubstring(h,b,c,a),this.createSelection(d.start,d.end)}catch(n){}},getContent:function(){return f.value||""},getSyntax:function(){var b=g("textarea").getOption("syntax"),c=this.getCaretPos();g("resources").hasSyntax(b)||(b="html");if(b=="html"){var a=
296 g("html_matcher").getTags(this.getContent(),c);a&&a[0]&&a[0].type=="tag"&&a[0].name.toLowerCase()=="style"&&a[0].end<=c&&a[1].start>=c&&(b="css")}return b},getProfileName:function(){return g("textarea").getOption("profile")},prompt:function(b){return prompt(b)},getSelection:function(){var b=this.getSelectionRange();if(b)try{return this.getContent().substring(b.start,b.end)}catch(c){}return""},getFilePath:function(){return location.href}}});
297 emmet.define("textarea",function(g,e){function f(a){for(var b=g("editor").getContext().className||"",f=/\bemmet\-(\w+)\-(\w+)/g,h=e.extend({},c,d||{}),i;i=f.exec(b);){var j=i[1].toLowerCase();i=i[2].toLowerCase();if(i=="true"||i=="yes"||i=="1")i=!0;else if(i=="false"||i=="no"||i=="0")i=!1;h[j]=i}return h[a]}function h(b,c){a[b.toLowerCase()]={compiled:g("shortcut").compile(b),action:c}}function b(b){var b=b||window.event,c=b.target||b.srcElement,d=b.keyCode||b.which,h=g("editor"),i=g("shortcut");
298 return c&&c.nodeType==1&&c.nodeName=="TEXTAREA"?(h.setContext(c),!e.find(a,function(a){if(i.test(a.compiled,b)){a=a.action;switch(a){case "expand_abbreviation":if(d==9)if(f("use_tab"))a="expand_abbreviation_with_tab";else return!1;break;case "insert_formatted_line_break":if(d==13&&!f("pretty_break"))return!1}g("actions").run(a,h);a=b;a.cancelBubble=!0;a.returnValue=!1;a.stopPropagation&&(a.stopPropagation(),a.preventDefault());return!0}})):!0}var c={profile:"xhtml",syntax:"html",use_tab:!1,pretty_break:!1},
299 a={},d={},i=document,j=window.opera?"keypress":"keydown";i.addEventListener?i.addEventListener(j,b,!1):i.attachEvent?ele.attachEvent("on"+j,b):i["on"+j]=func;d=e.extend({},c,{});e.each({"Meta+E":"expand_abbreviation",Tab:"expand_abbreviation","Meta+D":"match_pair_outward","Shift+Meta+D":"match_pair_inward","Shift+Meta+A":"wrap_with_abbreviation","Ctrl+Alt+Right":"next_edit_point","Ctrl+Alt+Left":"prev_edit_point","Meta+L":"select_line","Meta+Shift+M":"merge_lines","Meta+/":"toggle_comment","Meta+J":"split_join_tag",
300 "Meta+K":"remove_tag","Shift+Meta+Y":"evaluate_math_expression","Ctrl+Up":"increment_number_by_1","Ctrl+Down":"decrement_number_by_1","Alt+Up":"increment_number_by_01","Alt+Down":"decrement_number_by_01","Ctrl+Alt+Up":"increment_number_by_10","Ctrl+Alt+Down":"decrement_number_by_10","Meta+.":"select_next_item","Meta+,":"select_previous_item","Meta+Shift+B":"reflect_css_value",Enter:"insert_formatted_line_break"},function(a,b){h(b,a)});return{setOptions:function(a){d=e.extend({},c,a||{})},getOption:f,
301 addShortcut:h,unbindShortcut:function(b){b=b.toLowerCase();b in a&&delete a[b]},getShortcuts:function(){var b=g("shortcut"),c=g("actions");return e.compact(e.map(a,function(a,d){var f=d.toLowerCase();return f=="tab"||f=="enter"?void 0:{keystroke:b.format(d),compiled:a.compiled,label:e.last((c.get(a.action).options.label||a.action).split("/")),action:a.action}}))},getInfo:function(){var a="This textareas on this page are powered by Emmet toolkit.\n\nAvailable shortcuts:\n",b=e.map(this.getShortcuts(),
302 function(a){return a.keystroke+" \u2014 "+a.label});a+=b.join("\n")+"\n\n";a+="More info on http://emmet.io/";return a},showInfo:function(){alert(this.getInfo())},setup:function(a){this.setOptions(a)}}});
forum/static/js/widget/jquery-ui-datepicker/images/ui-bg_flat_75_ffffff_40x100.png

178 Bytes

forum/static/js/widget/jquery-ui-datepicker/images/ui-bg_glass_55_fbf9ee_1x400.png

120 Bytes

forum/static/js/widget/jquery-ui-datepicker/images/ui-bg_glass_75_dadada_1x400.png

111 Bytes

forum/static/js/widget/jquery-ui-datepicker/images/ui-bg_glass_75_e6e6e6_1x400.png

110 Bytes

forum/static/js/widget/jquery-ui-datepicker/images/ui-bg_highlight-soft_75_cccccc_1x100.png

101 Bytes

forum/static/js/widget/jquery-ui-datepicker/images/ui-icons_222222_256x240.png

4.27 KB

forum/static/js/widget/jquery-ui-datepicker/images/ui-icons_454545_256x240.png

4.27 KB

forum/static/js/widget/jquery-ui-datepicker/jquery-ui-datepicker-zh-CN.js
File was created 1 /* Chinese initialisation for the jQuery UI date picker plugin. */
2 /* Written by Cloudream (cloudream@gmail.com). */
3 jQuery(function($){
4 $.datepicker.regional['zh-CN'] = {
5 closeText: '关闭',
6 prevText: '&#x3c;上月',
7 nextText: '下月&#x3e;',
8 currentText: '今天',
9 monthNames: ['一月','二月','三月','四月','五月','六月',
10 '七月','八月','九月','十月','十一月','十二月'],
11 monthNamesShort: ['一','二','三','四','五','六',
12 '七','八','九','十','十一','十二'],
13 dayNames: ['星期日','星期一','星期二','星期三','星期四','星期五','星期六'],
14 dayNamesShort: ['周日','周一','周二','周三','周四','周五','周六'],
15 dayNamesMin: ['日','一','二','三','四','五','六'],
16 weekHeader: '周',
17 dateFormat: 'yy-mm-dd',
18 firstDay: 1,
19 isRTL: false,
20 showMonthAfterYear: true,
21 yearSuffix: '年'};
22 $.datepicker.setDefaults($.datepicker.regional['zh-CN']);
23 });
forum/static/js/widget/jquery-ui-datepicker/jquery-ui.css
File was created 1 /*
2 * jQuery UI CSS Framework 1.8.8
3 *
4 * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
5 * Dual licensed under the MIT or GPL Version 2 licenses.
6 * http://jquery.org/license
7 *
8 * http://docs.jquery.com/UI/Theming/API
9 */
10
11 /* Layout helpers
12 ----------------------------------*/
13 .ui-helper-hidden { display: none; }
14 .ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); }
15 .ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
16 .ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
17 .ui-helper-clearfix { display: inline-block; }
18 /* required comment for clearfix to work in Opera \*/
19 * html .ui-helper-clearfix { height:1%; }
20 .ui-helper-clearfix { display:block; }
21 /* end clearfix */
22 .ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
23
24
25 /* Interaction Cues
26 ----------------------------------*/
27 .ui-state-disabled { cursor: default !important; }
28
29
30 /* Icons
31 ----------------------------------*/
32
33 /* states and images */
34 .ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
35
36
37 /* Misc visuals
38 ----------------------------------*/
39
40 /* Overlays */
41 .ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
42 /*
43 * jQuery UI Accordion 1.8.8
44 *
45 * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
46 * Dual licensed under the MIT or GPL Version 2 licenses.
47 * http://jquery.org/license
48 *
49 * http://docs.jquery.com/UI/Accordion#theming
50 */
51 /* IE/Win - Fix animation bug - #4615 */
52 .ui-accordion { width: 100%; }
53 .ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; }
54 .ui-accordion .ui-accordion-li-fix { display: inline; }
55 .ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; }
56 .ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em .7em; }
57 .ui-accordion-icons .ui-accordion-header a { padding-left: 2.2em; }
58 .ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; }
59 .ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; }
60 .ui-accordion .ui-accordion-content-active { display: block; }/*
61 * jQuery UI Autocomplete 1.8.8
62 *
63 * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
64 * Dual licensed under the MIT or GPL Version 2 licenses.
65 * http://jquery.org/license
66 *
67 * http://docs.jquery.com/UI/Autocomplete#theming
68 */
69 .ui-autocomplete { position: absolute; cursor: default; }
70
71 /* workarounds */
72 * html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */
73
74 /*
75 * jQuery UI Menu 1.8.8
76 *
77 * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
78 * Dual licensed under the MIT or GPL Version 2 licenses.
79 * http://jquery.org/license
80 *
81 * http://docs.jquery.com/UI/Menu#theming
82 */
83 .ui-menu {
84 list-style:none;
85 padding: 2px;
86 margin: 0;
87 display:block;
88 float: left;
89 }
90 .ui-menu .ui-menu {
91 margin-top: -3px;
92 }
93 .ui-menu .ui-menu-item {
94 margin:0;
95 padding: 0;
96 zoom: 1;
97 float: left;
98 clear: left;
99 width: 100%;
100 }
101 .ui-menu .ui-menu-item a {
102 text-decoration:none;
103 display:block;
104 padding:.2em .4em;
105 line-height:1.5;
106 zoom:1;
107 }
108 .ui-menu .ui-menu-item a.ui-state-hover,
109 .ui-menu .ui-menu-item a.ui-state-active {
110 font-weight: normal;
111 margin: -1px;
112 }
113 /*
114 * jQuery UI Button 1.8.8
115 *
116 * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
117 * Dual licensed under the MIT or GPL Version 2 licenses.
118 * http://jquery.org/license
119 *
120 * http://docs.jquery.com/UI/Button#theming
121 */
122 .ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; text-decoration: none !important; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */
123 .ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */
124 button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */
125 .ui-button-icons-only { width: 3.4em; }
126 button.ui-button-icons-only { width: 3.7em; }
127
128 /*button text element */
129 .ui-button .ui-button-text { display: block; line-height: 1.4; }
130 .ui-button-text-only .ui-button-text { padding: .4em 1em; }
131 .ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; }
132 .ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; }
133 .ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 2.1em .4em 1em; }
134 .ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; }
135 /* no icon support for input elements, provide padding by default */
136 input.ui-button { padding: .4em 1em; }
137
138 /*button icon element(s) */
139 .ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; }
140 .ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; }
141 .ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; }
142 .ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
143 .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
144
145 /*button sets*/
146 .ui-buttonset { margin-right: 7px; }
147 .ui-buttonset .ui-button { margin-left: 0; margin-right: -.3em; }
148
149 /* workarounds */
150 button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */
151 /*
152 * jQuery UI Datepicker 1.8.8
153 *
154 * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
155 * Dual licensed under the MIT or GPL Version 2 licenses.
156 * http://jquery.org/license
157 *
158 * http://docs.jquery.com/UI/Datepicker#theming
159 */
160 .ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; }
161 .ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; }
162 .ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; }
163 .ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; }
164 .ui-datepicker .ui-datepicker-prev { left:2px; }
165 .ui-datepicker .ui-datepicker-next { right:2px; }
166 .ui-datepicker .ui-datepicker-prev-hover { left:1px; }
167 .ui-datepicker .ui-datepicker-next-hover { right:1px; }
168 .ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; }
169 .ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; }
170 .ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; }
171 .ui-datepicker select.ui-datepicker-month-year {width: 100%;}
172 .ui-datepicker select.ui-datepicker-month,
173 .ui-datepicker select.ui-datepicker-year { width: 49%;}
174 .ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; }
175 .ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; }
176 .ui-datepicker td { border: 0; padding: 1px; }
177 .ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; }
178 .ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; }
179 .ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }
180 .ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; }
181
182 /* with multiple calendars */
183 .ui-datepicker.ui-datepicker-multi { width:auto; }
184 .ui-datepicker-multi .ui-datepicker-group { float:left; }
185 .ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; }
186 .ui-datepicker-multi-2 .ui-datepicker-group { width:50%; }
187 .ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; }
188 .ui-datepicker-multi-4 .ui-datepicker-group { width:25%; }
189 .ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; }
190 .ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; }
191 .ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; }
192 .ui-datepicker-row-break { clear:both; width:100%; }
193
194 /* RTL support */
195 .ui-datepicker-rtl { direction: rtl; }
196 .ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; }
197 .ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; }
198 .ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; }
199 .ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; }
200 .ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; }
201 .ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; }
202 .ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; }
203 .ui-datepicker-rtl .ui-datepicker-group { float:right; }
204 .ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
205 .ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
206
207 /* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
208 .ui-datepicker-cover {
209 display: none; /*sorry for IE5*/
210 display/**/: block; /*sorry for IE5*/
211 position: absolute; /*must have*/
212 z-index: -1; /*must have*/
213 filter: mask(); /*must have*/
214 top: -4px; /*must have*/
215 left: -4px; /*must have*/
216 width: 200px; /*must have*/
217 height: 200px; /*must have*/
218 }/*
219 * jQuery UI Dialog 1.8.8
220 *
221 * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
222 * Dual licensed under the MIT or GPL Version 2 licenses.
223 * http://jquery.org/license
224 *
225 * http://docs.jquery.com/UI/Dialog#theming
226 */
227 .ui-dialog { position: absolute; padding: .2em; width: 300px; overflow: hidden; }
228 .ui-dialog .ui-dialog-titlebar { padding: .4em 1em; position: relative; }
229 .ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .1em 0; }
230 .ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; }
231 .ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; }
232 .ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; }
233 .ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; }
234 .ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; }
235 .ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; }
236 .ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; }
237 .ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; }
238 .ui-draggable .ui-dialog-titlebar { cursor: move; }
239 /*
240 * jQuery UI Progressbar 1.8.8
241 *
242 * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
243 * Dual licensed under the MIT or GPL Version 2 licenses.
244 * http://jquery.org/license
245 *
246 * http://docs.jquery.com/UI/Progressbar#theming
247 */
248 .ui-progressbar { height:2em; text-align: left; }
249 .ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; }/*
250 * jQuery UI Resizable 1.8.8
251 *
252 * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
253 * Dual licensed under the MIT or GPL Version 2 licenses.
254 * http://jquery.org/license
255 *
256 * http://docs.jquery.com/UI/Resizable#theming
257 */
258 .ui-resizable { position: relative;}
259 .ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block;}
260 .ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; }
261 .ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; }
262 .ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; }
263 .ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; }
264 .ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; }
265 .ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; }
266 .ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; }
267 .ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; }
268 .ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/*
269 * jQuery UI Selectable 1.8.8
270 *
271 * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
272 * Dual licensed under the MIT or GPL Version 2 licenses.
273 * http://jquery.org/license
274 *
275 * http://docs.jquery.com/UI/Selectable#theming
276 */
277 .ui-selectable-helper { position: absolute; z-index: 100; border:1px dotted black; }
278 /*
279 * jQuery UI Slider 1.8.8
280 *
281 * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
282 * Dual licensed under the MIT or GPL Version 2 licenses.
283 * http://jquery.org/license
284 *
285 * http://docs.jquery.com/UI/Slider#theming
286 */
287 .ui-slider { position: relative; text-align: left; }
288 .ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; }
289 .ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; }
290
291 .ui-slider-horizontal { height: .8em; }
292 .ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; }
293 .ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
294 .ui-slider-horizontal .ui-slider-range-min { left: 0; }
295 .ui-slider-horizontal .ui-slider-range-max { right: 0; }
296
297 .ui-slider-vertical { width: .8em; height: 100px; }
298 .ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; }
299 .ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }
300 .ui-slider-vertical .ui-slider-range-min { bottom: 0; }
301 .ui-slider-vertical .ui-slider-range-max { top: 0; }/*
302 * jQuery UI Tabs 1.8.8
303 *
304 * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
305 * Dual licensed under the MIT or GPL Version 2 licenses.
306 * http://jquery.org/license
307 *
308 * http://docs.jquery.com/UI/Tabs#theming
309 */
310 .ui-tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
311 .ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; }
312 .ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; }
313 .ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; }
314 .ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 1px; }
315 .ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; }
316 .ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
317 .ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; }
318 .ui-tabs .ui-tabs-hide { display: none !important; }
319 /*
320 * jQuery UI CSS Framework 1.8.8
321 *
322 * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
323 * Dual licensed under the MIT or GPL Version 2 licenses.
324 * http://jquery.org/license
325 *
326 * http://docs.jquery.com/UI/Theming/API
327 *
328 * To view and modify this theme, visit http://jqueryui.com/themeroller/
329 */
330
331
332 /* Component containers
333 ----------------------------------*/
334 .ui-widget { font-family: Verdana,Arial,sans-serif/*{ffDefault}*/; font-size: 1.1em/*{fsDefault}*/; }
335 .ui-widget .ui-widget { font-size: 1em; }
336 .ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Verdana,Arial,sans-serif/*{ffDefault}*/; font-size: 1em; }
337 .ui-widget-content { border: 1px solid #aaaaaa/*{borderColorContent}*/; background: #ffffff/*{bgColorContent}*/ url(images/ui-bg_flat_75_ffffff_40x100.png)/*{bgImgUrlContent}*/ 50%/*{bgContentXPos}*/ 50%/*{bgContentYPos}*/ repeat-x/*{bgContentRepeat}*/; color: #222222/*{fcContent}*/; }
338 .ui-widget-content a { color: #222222/*{fcContent}*/; }
339 .ui-widget-header { border: 1px solid #aaaaaa/*{borderColorHeader}*/; background: #cccccc/*{bgColorHeader}*/ url(images/ui-bg_highlight-soft_75_cccccc_1x100.png)/*{bgImgUrlHeader}*/ 50%/*{bgHeaderXPos}*/ 50%/*{bgHeaderYPos}*/ repeat-x/*{bgHeaderRepeat}*/; color: #222222/*{fcHeader}*/; font-weight: bold; }
340 .ui-widget-header a { color: #222222/*{fcHeader}*/; }
341
342 /* Interaction states
343 ----------------------------------*/
344 .ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #d3d3d3/*{borderColorDefault}*/; background: #e6e6e6/*{bgColorDefault}*/ url(images/ui-bg_glass_75_e6e6e6_1x400.png)/*{bgImgUrlDefault}*/ 50%/*{bgDefaultXPos}*/ 50%/*{bgDefaultYPos}*/ repeat-x/*{bgDefaultRepeat}*/; font-weight: normal/*{fwDefault}*/; color: #555555/*{fcDefault}*/; }
345 .ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #555555/*{fcDefault}*/; text-decoration: none; }
346 .ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #999999/*{borderColorHover}*/; background: #dadada/*{bgColorHover}*/ url(images/ui-bg_glass_75_dadada_1x400.png)/*{bgImgUrlHover}*/ 50%/*{bgHoverXPos}*/ 50%/*{bgHoverYPos}*/ repeat-x/*{bgHoverRepeat}*/; font-weight: normal/*{fwDefault}*/; color: #212121/*{fcHover}*/; }
347 .ui-state-hover a, .ui-state-hover a:hover { color: #212121/*{fcHover}*/; text-decoration: none; }
348 .ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #aaaaaa/*{borderColorActive}*/; background: #ffffff/*{bgColorActive}*/ url(images/ui-bg_glass_65_ffffff_1x400.png)/*{bgImgUrlActive}*/ 50%/*{bgActiveXPos}*/ 50%/*{bgActiveYPos}*/ repeat-x/*{bgActiveRepeat}*/; font-weight: normal/*{fwDefault}*/; color: #212121/*{fcActive}*/; }
349 .ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #212121/*{fcActive}*/; text-decoration: none; }
350 .ui-widget :active { outline: none; }
351
352 /* Interaction Cues
353 ----------------------------------*/
354 .ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #fcefa1/*{borderColorHighlight}*/; background: #fbf9ee/*{bgColorHighlight}*/ url(images/ui-bg_glass_55_fbf9ee_1x400.png)/*{bgImgUrlHighlight}*/ 50%/*{bgHighlightXPos}*/ 50%/*{bgHighlightYPos}*/ repeat-x/*{bgHighlightRepeat}*/; color: #363636/*{fcHighlight}*/; }
355 .ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636/*{fcHighlight}*/; }
356 .ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a/*{borderColorError}*/; background: #fef1ec/*{bgColorError}*/ url(images/ui-bg_glass_95_fef1ec_1x400.png)/*{bgImgUrlError}*/ 50%/*{bgErrorXPos}*/ 50%/*{bgErrorYPos}*/ repeat-x/*{bgErrorRepeat}*/; color: #cd0a0a/*{fcError}*/; }
357 .ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #cd0a0a/*{fcError}*/; }
358 .ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #cd0a0a/*{fcError}*/; }
359 .ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; }
360 .ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
361 .ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
362
363 /* Icons
364 ----------------------------------*/
365
366 /* states and images */
367 .ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_222222_256x240.png)/*{iconsContent}*/; }
368 .ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_256x240.png)/*{iconsContent}*/; }
369 .ui-widget-header .ui-icon {background-image: url(images/ui-icons_222222_256x240.png)/*{iconsHeader}*/; }
370 .ui-state-default .ui-icon { background-image: url(images/ui-icons_888888_256x240.png)/*{iconsDefault}*/; }
371 .ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_454545_256x240.png)/*{iconsHover}*/; }
372 .ui-state-active .ui-icon {background-image: url(images/ui-icons_454545_256x240.png)/*{iconsActive}*/; }
373 .ui-state-highlight .ui-icon {background-image: url(images/ui-icons_2e83ff_256x240.png)/*{iconsHighlight}*/; }
374 .ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_cd0a0a_256x240.png)/*{iconsError}*/; }
375
376 /* positioning */
377 .ui-icon-carat-1-n { background-position: 0 0; }
378 .ui-icon-carat-1-ne { background-position: -16px 0; }
379 .ui-icon-carat-1-e { background-position: -32px 0; }
380 .ui-icon-carat-1-se { background-position: -48px 0; }
381 .ui-icon-carat-1-s { background-position: -64px 0; }
382 .ui-icon-carat-1-sw { background-position: -80px 0; }
383 .ui-icon-carat-1-w { background-position: -96px 0; }
384 .ui-icon-carat-1-nw { background-position: -112px 0; }
385 .ui-icon-carat-2-n-s { background-position: -128px 0; }
386 .ui-icon-carat-2-e-w { background-position: -144px 0; }
387 .ui-icon-triangle-1-n { background-position: 0 -16px; }
388 .ui-icon-triangle-1-ne { background-position: -16px -16px; }
389 .ui-icon-triangle-1-e { background-position: -32px -16px; }
390 .ui-icon-triangle-1-se { background-position: -48px -16px; }
391 .ui-icon-triangle-1-s { background-position: -64px -16px; }
392 .ui-icon-triangle-1-sw { background-position: -80px -16px; }
393 .ui-icon-triangle-1-w { background-position: -96px -16px; }
394 .ui-icon-triangle-1-nw { background-position: -112px -16px; }
395 .ui-icon-triangle-2-n-s { background-position: -128px -16px; }
396 .ui-icon-triangle-2-e-w { background-position: -144px -16px; }
397 .ui-icon-arrow-1-n { background-position: 0 -32px; }
398 .ui-icon-arrow-1-ne { background-position: -16px -32px; }
399 .ui-icon-arrow-1-e { background-position: -32px -32px; }
400 .ui-icon-arrow-1-se { background-position: -48px -32px; }
401 .ui-icon-arrow-1-s { background-position: -64px -32px; }
402 .ui-icon-arrow-1-sw { background-position: -80px -32px; }
403 .ui-icon-arrow-1-w { background-position: -96px -32px; }
404 .ui-icon-arrow-1-nw { background-position: -112px -32px; }
405 .ui-icon-arrow-2-n-s { background-position: -128px -32px; }
406 .ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
407 .ui-icon-arrow-2-e-w { background-position: -160px -32px; }
408 .ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
409 .ui-icon-arrowstop-1-n { background-position: -192px -32px; }
410 .ui-icon-arrowstop-1-e { background-position: -208px -32px; }
411 .ui-icon-arrowstop-1-s { background-position: -224px -32px; }
412 .ui-icon-arrowstop-1-w { background-position: -240px -32px; }
413 .ui-icon-arrowthick-1-n { background-position: 0 -48px; }
414 .ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
415 .ui-icon-arrowthick-1-e { background-position: -32px -48px; }
416 .ui-icon-arrowthick-1-se { background-position: -48px -48px; }
417 .ui-icon-arrowthick-1-s { background-position: -64px -48px; }
418 .ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
419 .ui-icon-arrowthick-1-w { background-position: -96px -48px; }
420 .ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
421 .ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
422 .ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
423 .ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
424 .ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
425 .ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
426 .ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
427 .ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
428 .ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
429 .ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
430 .ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
431 .ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
432 .ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
433 .ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
434 .ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
435 .ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
436 .ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
437 .ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
438 .ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
439 .ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
440 .ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
441 .ui-icon-arrow-4 { background-position: 0 -80px; }
442 .ui-icon-arrow-4-diag { background-position: -16px -80px; }
443 .ui-icon-extlink { background-position: -32px -80px; }
444 .ui-icon-newwin { background-position: -48px -80px; }
445 .ui-icon-refresh { background-position: -64px -80px; }
446 .ui-icon-shuffle { background-position: -80px -80px; }
447 .ui-icon-transfer-e-w { background-position: -96px -80px; }
448 .ui-icon-transferthick-e-w { background-position: -112px -80px; }
449 .ui-icon-folder-collapsed { background-position: 0 -96px; }
450 .ui-icon-folder-open { background-position: -16px -96px; }
451 .ui-icon-document { background-position: -32px -96px; }
452 .ui-icon-document-b { background-position: -48px -96px; }
453 .ui-icon-note { background-position: -64px -96px; }
454 .ui-icon-mail-closed { background-position: -80px -96px; }
455 .ui-icon-mail-open { background-position: -96px -96px; }
456 .ui-icon-suitcase { background-position: -112px -96px; }
457 .ui-icon-comment { background-position: -128px -96px; }
458 .ui-icon-person { background-position: -144px -96px; }
459 .ui-icon-print { background-position: -160px -96px; }
460 .ui-icon-trash { background-position: -176px -96px; }
461 .ui-icon-locked { background-position: -192px -96px; }
462 .ui-icon-unlocked { background-position: -208px -96px; }
463 .ui-icon-bookmark { background-position: -224px -96px; }
464 .ui-icon-tag { background-position: -240px -96px; }
465 .ui-icon-home { background-position: 0 -112px; }
466 .ui-icon-flag { background-position: -16px -112px; }
467 .ui-icon-calendar { background-position: -32px -112px; }
468 .ui-icon-cart { background-position: -48px -112px; }
469 .ui-icon-pencil { background-position: -64px -112px; }
470 .ui-icon-clock { background-position: -80px -112px; }
471 .ui-icon-disk { background-position: -96px -112px; }
472 .ui-icon-calculator { background-position: -112px -112px; }
473 .ui-icon-zoomin { background-position: -128px -112px; }
474 .ui-icon-zoomout { background-position: -144px -112px; }
475 .ui-icon-search { background-position: -160px -112px; }
476 .ui-icon-wrench { background-position: -176px -112px; }
477 .ui-icon-gear { background-position: -192px -112px; }
478 .ui-icon-heart { background-position: -208px -112px; }
479 .ui-icon-star { background-position: -224px -112px; }
480 .ui-icon-link { background-position: -240px -112px; }
481 .ui-icon-cancel { background-position: 0 -128px; }
482 .ui-icon-plus { background-position: -16px -128px; }
483 .ui-icon-plusthick { background-position: -32px -128px; }
484 .ui-icon-minus { background-position: -48px -128px; }
485 .ui-icon-minusthick { background-position: -64px -128px; }
486 .ui-icon-close { background-position: -80px -128px; }
487 .ui-icon-closethick { background-position: -96px -128px; }
488 .ui-icon-key { background-position: -112px -128px; }
489 .ui-icon-lightbulb { background-position: -128px -128px; }
490 .ui-icon-scissors { background-position: -144px -128px; }
491 .ui-icon-clipboard { background-position: -160px -128px; }
492 .ui-icon-copy { background-position: -176px -128px; }
493 .ui-icon-contact { background-position: -192px -128px; }
494 .ui-icon-image { background-position: -208px -128px; }
495 .ui-icon-video { background-position: -224px -128px; }
496 .ui-icon-script { background-position: -240px -128px; }
497 .ui-icon-alert { background-position: 0 -144px; }
498 .ui-icon-info { background-position: -16px -144px; }
499 .ui-icon-notice { background-position: -32px -144px; }
500 .ui-icon-help { background-position: -48px -144px; }
501 .ui-icon-check { background-position: -64px -144px; }
502 .ui-icon-bullet { background-position: -80px -144px; }
503 .ui-icon-radio-off { background-position: -96px -144px; }
504 .ui-icon-radio-on { background-position: -112px -144px; }
505 .ui-icon-pin-w { background-position: -128px -144px; }
506 .ui-icon-pin-s { background-position: -144px -144px; }
507 .ui-icon-play { background-position: 0 -160px; }
508 .ui-icon-pause { background-position: -16px -160px; }
509 .ui-icon-seek-next { background-position: -32px -160px; }
510 .ui-icon-seek-prev { background-position: -48px -160px; }
511 .ui-icon-seek-end { background-position: -64px -160px; }
512 .ui-icon-seek-start { background-position: -80px -160px; }
513 /* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
514 .ui-icon-seek-first { background-position: -80px -160px; }
515 .ui-icon-stop { background-position: -96px -160px; }
516 .ui-icon-eject { background-position: -112px -160px; }
517 .ui-icon-volume-off { background-position: -128px -160px; }
518 .ui-icon-volume-on { background-position: -144px -160px; }
519 .ui-icon-power { background-position: 0 -176px; }
520 .ui-icon-signal-diag { background-position: -16px -176px; }
521 .ui-icon-signal { background-position: -32px -176px; }
522 .ui-icon-battery-0 { background-position: -48px -176px; }
523 .ui-icon-battery-1 { background-position: -64px -176px; }
524 .ui-icon-battery-2 { background-position: -80px -176px; }
525 .ui-icon-battery-3 { background-position: -96px -176px; }
526 .ui-icon-circle-plus { background-position: 0 -192px; }
527 .ui-icon-circle-minus { background-position: -16px -192px; }
528 .ui-icon-circle-close { background-position: -32px -192px; }
529 .ui-icon-circle-triangle-e { background-position: -48px -192px; }
530 .ui-icon-circle-triangle-s { background-position: -64px -192px; }
531 .ui-icon-circle-triangle-w { background-position: -80px -192px; }
532 .ui-icon-circle-triangle-n { background-position: -96px -192px; }
533 .ui-icon-circle-arrow-e { background-position: -112px -192px; }
534 .ui-icon-circle-arrow-s { background-position: -128px -192px; }
535 .ui-icon-circle-arrow-w { background-position: -144px -192px; }
536 .ui-icon-circle-arrow-n { background-position: -160px -192px; }
537 .ui-icon-circle-zoomin { background-position: -176px -192px; }
538 .ui-icon-circle-zoomout { background-position: -192px -192px; }
539 .ui-icon-circle-check { background-position: -208px -192px; }
540 .ui-icon-circlesmall-plus { background-position: 0 -208px; }
541 .ui-icon-circlesmall-minus { background-position: -16px -208px; }
542 .ui-icon-circlesmall-close { background-position: -32px -208px; }
543 .ui-icon-squaresmall-plus { background-position: -48px -208px; }
544 .ui-icon-squaresmall-minus { background-position: -64px -208px; }
545 .ui-icon-squaresmall-close { background-position: -80px -208px; }
546 .ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
547 .ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
548 .ui-icon-grip-solid-vertical { background-position: -32px -224px; }
549 .ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
550 .ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
551 .ui-icon-grip-diagonal-se { background-position: -80px -224px; }
552
553
554 /* Misc visuals
555 ----------------------------------*/
556
557 /* Corner radius */
558 .ui-corner-tl { -moz-border-radius-topleft: 4px/*{cornerRadius}*/; -webkit-border-top-left-radius: 4px/*{cornerRadius}*/; border-top-left-radius: 4px/*{cornerRadius}*/; }
559 .ui-corner-tr { -moz-border-radius-topright: 4px/*{cornerRadius}*/; -webkit-border-top-right-radius: 4px/*{cornerRadius}*/; border-top-right-radius: 4px/*{cornerRadius}*/; }
560 .ui-corner-bl { -moz-border-radius-bottomleft: 4px/*{cornerRadius}*/; -webkit-border-bottom-left-radius: 4px/*{cornerRadius}*/; border-bottom-left-radius: 4px/*{cornerRadius}*/; }
561 .ui-corner-br { -moz-border-radius-bottomright: 4px/*{cornerRadius}*/; -webkit-border-bottom-right-radius: 4px/*{cornerRadius}*/; border-bottom-right-radius: 4px/*{cornerRadius}*/; }
562 .ui-corner-top { -moz-border-radius-topleft: 4px/*{cornerRadius}*/; -webkit-border-top-left-radius: 4px/*{cornerRadius}*/; border-top-left-radius: 4px/*{cornerRadius}*/; -moz-border-radius-topright: 4px/*{cornerRadius}*/; -webkit-border-top-right-radius: 4px/*{cornerRadius}*/; border-top-right-radius: 4px/*{cornerRadius}*/; }
563 .ui-corner-bottom { -moz-border-radius-bottomleft: 4px/*{cornerRadius}*/; -webkit-border-bottom-left-radius: 4px/*{cornerRadius}*/; border-bottom-left-radius: 4px/*{cornerRadius}*/; -moz-border-radius-bottomright: 4px/*{cornerRadius}*/; -webkit-border-bottom-right-radius: 4px/*{cornerRadius}*/; border-bottom-right-radius: 4px/*{cornerRadius}*/; }
564 .ui-corner-right { -moz-border-radius-topright: 4px/*{cornerRadius}*/; -webkit-border-top-right-radius: 4px/*{cornerRadius}*/; border-top-right-radius: 4px/*{cornerRadius}*/; -moz-border-radius-bottomright: 4px/*{cornerRadius}*/; -webkit-border-bottom-right-radius: 4px/*{cornerRadius}*/; border-bottom-right-radius: 4px/*{cornerRadius}*/; }
565 .ui-corner-left { -moz-border-radius-topleft: 4px/*{cornerRadius}*/; -webkit-border-top-left-radius: 4px/*{cornerRadius}*/; border-top-left-radius: 4px/*{cornerRadius}*/; -moz-border-radius-bottomleft: 4px/*{cornerRadius}*/; -webkit-border-bottom-left-radius: 4px/*{cornerRadius}*/; border-bottom-left-radius: 4px/*{cornerRadius}*/; }
566 .ui-corner-all { -moz-border-radius: 4px/*{cornerRadius}*/; -webkit-border-radius: 4px/*{cornerRadius}*/; border-radius: 4px/*{cornerRadius}*/; }
567
568 /* Overlays */
569 .ui-widget-overlay { background: #aaaaaa/*{bgColorOverlay}*/ url(images/ui-bg_flat_0_aaaaaa_40x100.png)/*{bgImgUrlOverlay}*/ 50%/*{bgOverlayXPos}*/ 50%/*{bgOverlayYPos}*/ repeat-x/*{bgOverlayRepeat}*/; opacity: .3;filter:Alpha(Opacity=30)/*{opacityOverlay}*/; }
570 .ui-widget-shadow { margin: -8px/*{offsetTopShadow}*/ 0 0 -8px/*{offsetLeftShadow}*/; padding: 8px/*{thicknessShadow}*/; background: #aaaaaa/*{bgColorShadow}*/ url(images/ui-bg_flat_0_aaaaaa_40x100.png)/*{bgImgUrlShadow}*/ 50%/*{bgShadowXPos}*/ 50%/*{bgShadowYPos}*/ repeat-x/*{bgShadowRepeat}*/; opacity: .3;filter:Alpha(Opacity=30)/*{opacityShadow}*/; -moz-border-radius: 8px/*{cornerRadiusShadow}*/; -webkit-border-radius: 8px/*{cornerRadiusShadow}*/; border-radius: 8px/*{cornerRadiusShadow}*/; }
forum/static/js/widget/jquery-ui-datepicker/jquery-ui.min.js
File was created 1 /*!
2 * jQuery UI 1.8.8
3 *
4 * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
5 * Dual licensed under the MIT or GPL Version 2 licenses.
6 * http://jquery.org/license
7 *
8 * http://docs.jquery.com/UI
9 */
10 (function(b,c){function f(g){return!b(g).parents().andSelf().filter(function(){return b.curCSS(this,"visibility")==="hidden"||b.expr.filters.hidden(this)}).length}b.ui=b.ui||{};if(!b.ui.version){b.extend(b.ui,{version:"1.8.8",keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,
11 NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}});b.fn.extend({_focus:b.fn.focus,focus:function(g,e){return typeof g==="number"?this.each(function(){var a=this;setTimeout(function(){b(a).focus();e&&e.call(a)},g)}):this._focus.apply(this,arguments)},scrollParent:function(){var g;g=b.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(b.curCSS(this,
12 "position",1))&&/(auto|scroll)/.test(b.curCSS(this,"overflow",1)+b.curCSS(this,"overflow-y",1)+b.curCSS(this,"overflow-x",1))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(b.curCSS(this,"overflow",1)+b.curCSS(this,"overflow-y",1)+b.curCSS(this,"overflow-x",1))}).eq(0);return/fixed/.test(this.css("position"))||!g.length?b(document):g},zIndex:function(g){if(g!==c)return this.css("zIndex",g);if(this.length){g=b(this[0]);for(var e;g.length&&g[0]!==document;){e=g.css("position");
13 if(e==="absolute"||e==="relative"||e==="fixed"){e=parseInt(g.css("zIndex"),10);if(!isNaN(e)&&e!==0)return e}g=g.parent()}}return 0},disableSelection:function(){return this.bind((b.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(g){g.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});b.each(["Width","Height"],function(g,e){function a(j,n,q,l){b.each(d,function(){n-=parseFloat(b.curCSS(j,"padding"+this,true))||0;if(q)n-=parseFloat(b.curCSS(j,
14 "border"+this+"Width",true))||0;if(l)n-=parseFloat(b.curCSS(j,"margin"+this,true))||0});return n}var d=e==="Width"?["Left","Right"]:["Top","Bottom"],h=e.toLowerCase(),i={innerWidth:b.fn.innerWidth,innerHeight:b.fn.innerHeight,outerWidth:b.fn.outerWidth,outerHeight:b.fn.outerHeight};b.fn["inner"+e]=function(j){if(j===c)return i["inner"+e].call(this);return this.each(function(){b(this).css(h,a(this,j)+"px")})};b.fn["outer"+e]=function(j,n){if(typeof j!=="number")return i["outer"+e].call(this,j);return this.each(function(){b(this).css(h,
15 a(this,j,true,n)+"px")})}});b.extend(b.expr[":"],{data:function(g,e,a){return!!b.data(g,a[3])},focusable:function(g){var e=g.nodeName.toLowerCase(),a=b.attr(g,"tabindex");if("area"===e){e=g.parentNode;a=e.name;if(!g.href||!a||e.nodeName.toLowerCase()!=="map")return false;g=b("img[usemap=#"+a+"]")[0];return!!g&&f(g)}return(/input|select|textarea|button|object/.test(e)?!g.disabled:"a"==e?g.href||!isNaN(a):!isNaN(a))&&f(g)},tabbable:function(g){var e=b.attr(g,"tabindex");return(isNaN(e)||e>=0)&&b(g).is(":focusable")}});
16 b(function(){var g=document.body,e=g.appendChild(e=document.createElement("div"));b.extend(e.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});b.support.minHeight=e.offsetHeight===100;b.support.selectstart="onselectstart"in e;g.removeChild(e).style.display="none"});b.extend(b.ui,{plugin:{add:function(g,e,a){g=b.ui[g].prototype;for(var d in a){g.plugins[d]=g.plugins[d]||[];g.plugins[d].push([e,a[d]])}},call:function(g,e,a){if((e=g.plugins[e])&&g.element[0].parentNode)for(var d=0;d<e.length;d++)g.options[e[d][0]]&&
17 e[d][1].apply(g.element,a)}},contains:function(g,e){return document.compareDocumentPosition?g.compareDocumentPosition(e)&16:g!==e&&g.contains(e)},hasScroll:function(g,e){if(b(g).css("overflow")==="hidden")return false;e=e&&e==="left"?"scrollLeft":"scrollTop";var a=false;if(g[e]>0)return true;g[e]=1;a=g[e]>0;g[e]=0;return a},isOverAxis:function(g,e,a){return g>e&&g<e+a},isOver:function(g,e,a,d,h,i){return b.ui.isOverAxis(g,a,h)&&b.ui.isOverAxis(e,d,i)}})}})(jQuery);
18 (function(b,c){if(b.cleanData){var f=b.cleanData;b.cleanData=function(e){for(var a=0,d;(d=e[a])!=null;a++)b(d).triggerHandler("remove");f(e)}}else{var g=b.fn.remove;b.fn.remove=function(e,a){return this.each(function(){if(!a)if(!e||b.filter(e,[this]).length)b("*",this).add([this]).each(function(){b(this).triggerHandler("remove")});return g.call(b(this),e,a)})}}b.widget=function(e,a,d){var h=e.split(".")[0],i;e=e.split(".")[1];i=h+"-"+e;if(!d){d=a;a=b.Widget}b.expr[":"][i]=function(j){return!!b.data(j,
19 e)};b[h]=b[h]||{};b[h][e]=function(j,n){arguments.length&&this._createWidget(j,n)};a=new a;a.options=b.extend(true,{},a.options);b[h][e].prototype=b.extend(true,a,{namespace:h,widgetName:e,widgetEventPrefix:b[h][e].prototype.widgetEventPrefix||e,widgetBaseClass:i},d);b.widget.bridge(e,b[h][e])};b.widget.bridge=function(e,a){b.fn[e]=function(d){var h=typeof d==="string",i=Array.prototype.slice.call(arguments,1),j=this;d=!h&&i.length?b.extend.apply(null,[true,d].concat(i)):d;if(h&&d.charAt(0)==="_")return j;
20 h?this.each(function(){var n=b.data(this,e),q=n&&b.isFunction(n[d])?n[d].apply(n,i):n;if(q!==n&&q!==c){j=q;return false}}):this.each(function(){var n=b.data(this,e);n?n.option(d||{})._init():b.data(this,e,new a(d,this))});return j}};b.Widget=function(e,a){arguments.length&&this._createWidget(e,a)};b.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:false},_createWidget:function(e,a){b.data(a,this.widgetName,this);this.element=b(a);this.options=b.extend(true,{},this.options,
21 this._getCreateOptions(),e);var d=this;this.element.bind("remove."+this.widgetName,function(){d.destroy()});this._create();this._trigger("create");this._init()},_getCreateOptions:function(){return b.metadata&&b.metadata.get(this.element[0])[this.widgetName]},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled ui-state-disabled")},
22 widget:function(){return this.element},option:function(e,a){var d=e;if(arguments.length===0)return b.extend({},this.options);if(typeof e==="string"){if(a===c)return this.options[e];d={};d[e]=a}this._setOptions(d);return this},_setOptions:function(e){var a=this;b.each(e,function(d,h){a._setOption(d,h)});return this},_setOption:function(e,a){this.options[e]=a;if(e==="disabled")this.widget()[a?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",a);return this},
23 enable:function(){return this._setOption("disabled",false)},disable:function(){return this._setOption("disabled",true)},_trigger:function(e,a,d){var h=this.options[e];a=b.Event(a);a.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase();d=d||{};if(a.originalEvent){e=b.event.props.length;for(var i;e;){i=b.event.props[--e];a[i]=a.originalEvent[i]}}this.element.trigger(a,d);return!(b.isFunction(h)&&h.call(this.element[0],a,d)===false||a.isDefaultPrevented())}}})(jQuery);
24 (function(b){b.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var c=this;this.element.bind("mousedown."+this.widgetName,function(f){return c._mouseDown(f)}).bind("click."+this.widgetName,function(f){if(true===b.data(f.target,c.widgetName+".preventClickEvent")){b.removeData(f.target,c.widgetName+".preventClickEvent");f.stopImmediatePropagation();return false}});this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName)},_mouseDown:function(c){c.originalEvent=
25 c.originalEvent||{};if(!c.originalEvent.mouseHandled){this._mouseStarted&&this._mouseUp(c);this._mouseDownEvent=c;var f=this,g=c.which==1,e=typeof this.options.cancel=="string"?b(c.target).parents().add(c.target).filter(this.options.cancel).length:false;if(!g||e||!this._mouseCapture(c))return true;this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet)this._mouseDelayTimer=setTimeout(function(){f.mouseDelayMet=true},this.options.delay);if(this._mouseDistanceMet(c)&&this._mouseDelayMet(c)){this._mouseStarted=
26 this._mouseStart(c)!==false;if(!this._mouseStarted){c.preventDefault();return true}}this._mouseMoveDelegate=function(a){return f._mouseMove(a)};this._mouseUpDelegate=function(a){return f._mouseUp(a)};b(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);c.preventDefault();return c.originalEvent.mouseHandled=true}},_mouseMove:function(c){if(b.browser.msie&&!(document.documentMode>=9)&&!c.button)return this._mouseUp(c);if(this._mouseStarted){this._mouseDrag(c);
27 return c.preventDefault()}if(this._mouseDistanceMet(c)&&this._mouseDelayMet(c))(this._mouseStarted=this._mouseStart(this._mouseDownEvent,c)!==false)?this._mouseDrag(c):this._mouseUp(c);return!this._mouseStarted},_mouseUp:function(c){b(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;c.target==this._mouseDownEvent.target&&b.data(c.target,this.widgetName+".preventClickEvent",
28 true);this._mouseStop(c)}return false},_mouseDistanceMet:function(c){return Math.max(Math.abs(this._mouseDownEvent.pageX-c.pageX),Math.abs(this._mouseDownEvent.pageY-c.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return true}})})(jQuery);
29 (function(b){b.widget("ui.draggable",b.ui.mouse,{widgetEventPrefix:"drag",options:{addClasses:true,appendTo:"parent",axis:false,connectToSortable:false,containment:false,cursor:"auto",cursorAt:false,grid:false,handle:false,helper:"original",iframeFix:false,opacity:false,refreshPositions:false,revert:false,revertDuration:500,scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:"both",snapTolerance:20,stack:false,zIndex:false},_create:function(){if(this.options.helper==
30 "original"&&!/^(?:r|a|f)/.test(this.element.css("position")))this.element[0].style.position="relative";this.options.addClasses&&this.element.addClass("ui-draggable");this.options.disabled&&this.element.addClass("ui-draggable-disabled");this._mouseInit()},destroy:function(){if(this.element.data("draggable")){this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._mouseDestroy();return this}},_mouseCapture:function(c){var f=
31 this.options;if(this.helper||f.disabled||b(c.target).is(".ui-resizable-handle"))return false;this.handle=this._getHandle(c);if(!this.handle)return false;return true},_mouseStart:function(c){var f=this.options;this.helper=this._createHelper(c);this._cacheHelperProportions();if(b.ui.ddmanager)b.ui.ddmanager.current=this;this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent();this.offset=this.positionAbs=this.element.offset();this.offset={top:this.offset.top-
32 this.margins.top,left:this.offset.left-this.margins.left};b.extend(this.offset,{click:{left:c.pageX-this.offset.left,top:c.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this.position=this._generatePosition(c);this.originalPageX=c.pageX;this.originalPageY=c.pageY;f.cursorAt&&this._adjustOffsetFromHelper(f.cursorAt);f.containment&&this._setContainment();if(this._trigger("start",c)===false){this._clear();return false}this._cacheHelperProportions();
33 b.ui.ddmanager&&!f.dropBehaviour&&b.ui.ddmanager.prepareOffsets(this,c);this.helper.addClass("ui-draggable-dragging");this._mouseDrag(c,true);return true},_mouseDrag:function(c,f){this.position=this._generatePosition(c);this.positionAbs=this._convertPositionTo("absolute");if(!f){f=this._uiHash();if(this._trigger("drag",c,f)===false){this._mouseUp({});return false}this.position=f.position}if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+"px";if(!this.options.axis||
34 this.options.axis!="x")this.helper[0].style.top=this.position.top+"px";b.ui.ddmanager&&b.ui.ddmanager.drag(this,c);return false},_mouseStop:function(c){var f=false;if(b.ui.ddmanager&&!this.options.dropBehaviour)f=b.ui.ddmanager.drop(this,c);if(this.dropped){f=this.dropped;this.dropped=false}if(!this.element[0]||!this.element[0].parentNode)return false;if(this.options.revert=="invalid"&&!f||this.options.revert=="valid"&&f||this.options.revert===true||b.isFunction(this.options.revert)&&this.options.revert.call(this.element,
35 f)){var g=this;b(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){g._trigger("stop",c)!==false&&g._clear()})}else this._trigger("stop",c)!==false&&this._clear();return false},cancel:function(){this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear();return this},_getHandle:function(c){var f=!this.options.handle||!b(this.options.handle,this.element).length?true:false;b(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==
36 c.target)f=true});return f},_createHelper:function(c){var f=this.options;c=b.isFunction(f.helper)?b(f.helper.apply(this.element[0],[c])):f.helper=="clone"?this.element.clone():this.element;c.parents("body").length||c.appendTo(f.appendTo=="parent"?this.element[0].parentNode:f.appendTo);c[0]!=this.element[0]&&!/(fixed|absolute)/.test(c.css("position"))&&c.css("position","absolute");return c},_adjustOffsetFromHelper:function(c){if(typeof c=="string")c=c.split(" ");if(b.isArray(c))c={left:+c[0],top:+c[1]||
37 0};if("left"in c)this.offset.click.left=c.left+this.margins.left;if("right"in c)this.offset.click.left=this.helperProportions.width-c.right+this.margins.left;if("top"in c)this.offset.click.top=c.top+this.margins.top;if("bottom"in c)this.offset.click.top=this.helperProportions.height-c.bottom+this.margins.top},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var c=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&b.ui.contains(this.scrollParent[0],
38 this.offsetParent[0])){c.left+=this.scrollParent.scrollLeft();c.top+=this.scrollParent.scrollTop()}if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&b.browser.msie)c={top:0,left:0};return{top:c.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:c.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var c=this.element.position();return{top:c.top-
39 (parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:c.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var c=this.options;if(c.containment==
40 "parent")c.containment=this.helper[0].parentNode;if(c.containment=="document"||c.containment=="window")this.containment=[(c.containment=="document"?0:b(window).scrollLeft())-this.offset.relative.left-this.offset.parent.left,(c.containment=="document"?0:b(window).scrollTop())-this.offset.relative.top-this.offset.parent.top,(c.containment=="document"?0:b(window).scrollLeft())+b(c.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(c.containment=="document"?
41 0:b(window).scrollTop())+(b(c.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(c.containment)&&c.containment.constructor!=Array){var f=b(c.containment)[0];if(f){c=b(c.containment).offset();var g=b(f).css("overflow")!="hidden";this.containment=[c.left+(parseInt(b(f).css("borderLeftWidth"),10)||0)+(parseInt(b(f).css("paddingLeft"),10)||0)-this.margins.left,c.top+(parseInt(b(f).css("borderTopWidth"),
42 10)||0)+(parseInt(b(f).css("paddingTop"),10)||0)-this.margins.top,c.left+(g?Math.max(f.scrollWidth,f.offsetWidth):f.offsetWidth)-(parseInt(b(f).css("borderLeftWidth"),10)||0)-(parseInt(b(f).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,c.top+(g?Math.max(f.scrollHeight,f.offsetHeight):f.offsetHeight)-(parseInt(b(f).css("borderTopWidth"),10)||0)-(parseInt(b(f).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}}else if(c.containment.constructor==
43 Array)this.containment=c.containment},_convertPositionTo:function(c,f){if(!f)f=this.position;c=c=="absolute"?1:-1;var g=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&b.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,e=/(html|body)/i.test(g[0].tagName);return{top:f.top+this.offset.relative.top*c+this.offset.parent.top*c-(b.browser.safari&&b.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():
44 e?0:g.scrollTop())*c),left:f.left+this.offset.relative.left*c+this.offset.parent.left*c-(b.browser.safari&&b.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():e?0:g.scrollLeft())*c)}},_generatePosition:function(c){var f=this.options,g=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&b.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,e=/(html|body)/i.test(g[0].tagName),a=c.pageX,d=c.pageY;
45 if(this.originalPosition){if(this.containment){if(c.pageX-this.offset.click.left<this.containment[0])a=this.containment[0]+this.offset.click.left;if(c.pageY-this.offset.click.top<this.containment[1])d=this.containment[1]+this.offset.click.top;if(c.pageX-this.offset.click.left>this.containment[2])a=this.containment[2]+this.offset.click.left;if(c.pageY-this.offset.click.top>this.containment[3])d=this.containment[3]+this.offset.click.top}if(f.grid){d=this.originalPageY+Math.round((d-this.originalPageY)/
46 f.grid[1])*f.grid[1];d=this.containment?!(d-this.offset.click.top<this.containment[1]||d-this.offset.click.top>this.containment[3])?d:!(d-this.offset.click.top<this.containment[1])?d-f.grid[1]:d+f.grid[1]:d;a=this.originalPageX+Math.round((a-this.originalPageX)/f.grid[0])*f.grid[0];a=this.containment?!(a-this.offset.click.left<this.containment[0]||a-this.offset.click.left>this.containment[2])?a:!(a-this.offset.click.left<this.containment[0])?a-f.grid[0]:a+f.grid[0]:a}}return{top:d-this.offset.click.top-
47 this.offset.relative.top-this.offset.parent.top+(b.browser.safari&&b.browser.version<526&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollTop():e?0:g.scrollTop()),left:a-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(b.browser.safari&&b.browser.version<526&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():e?0:g.scrollLeft())}},_clear:function(){this.helper.removeClass("ui-draggable-dragging");this.helper[0]!=
48 this.element[0]&&!this.cancelHelperRemoval&&this.helper.remove();this.helper=null;this.cancelHelperRemoval=false},_trigger:function(c,f,g){g=g||this._uiHash();b.ui.plugin.call(this,c,[f,g]);if(c=="drag")this.positionAbs=this._convertPositionTo("absolute");return b.Widget.prototype._trigger.call(this,c,f,g)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}});b.extend(b.ui.draggable,{version:"1.8.8"});
49 b.ui.plugin.add("draggable","connectToSortable",{start:function(c,f){var g=b(this).data("draggable"),e=g.options,a=b.extend({},f,{item:g.element});g.sortables=[];b(e.connectToSortable).each(function(){var d=b.data(this,"sortable");if(d&&!d.options.disabled){g.sortables.push({instance:d,shouldRevert:d.options.revert});d._refreshItems();d._trigger("activate",c,a)}})},stop:function(c,f){var g=b(this).data("draggable"),e=b.extend({},f,{item:g.element});b.each(g.sortables,function(){if(this.instance.isOver){this.instance.isOver=
50 0;g.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=false;if(this.shouldRevert)this.instance.options.revert=true;this.instance._mouseStop(c);this.instance.options.helper=this.instance.options._helper;g.options.helper=="original"&&this.instance.currentItem.css({top:"auto",left:"auto"})}else{this.instance.cancelHelperRemoval=false;this.instance._trigger("deactivate",c,e)}})},drag:function(c,f){var g=b(this).data("draggable"),e=this;b.each(g.sortables,function(){this.instance.positionAbs=
51 g.positionAbs;this.instance.helperProportions=g.helperProportions;this.instance.offset.click=g.offset.click;if(this.instance._intersectsWith(this.instance.containerCache)){if(!this.instance.isOver){this.instance.isOver=1;this.instance.currentItem=b(e).clone().appendTo(this.instance.element).data("sortable-item",true);this.instance.options._helper=this.instance.options.helper;this.instance.options.helper=function(){return f.helper[0]};c.target=this.instance.currentItem[0];this.instance._mouseCapture(c,
52 true);this.instance._mouseStart(c,true,true);this.instance.offset.click.top=g.offset.click.top;this.instance.offset.click.left=g.offset.click.left;this.instance.offset.parent.left-=g.offset.parent.left-this.instance.offset.parent.left;this.instance.offset.parent.top-=g.offset.parent.top-this.instance.offset.parent.top;g._trigger("toSortable",c);g.dropped=this.instance.element;g.currentItem=g.element;this.instance.fromOutside=g}this.instance.currentItem&&this.instance._mouseDrag(c)}else if(this.instance.isOver){this.instance.isOver=
53 0;this.instance.cancelHelperRemoval=true;this.instance.options.revert=false;this.instance._trigger("out",c,this.instance._uiHash(this.instance));this.instance._mouseStop(c,true);this.instance.options.helper=this.instance.options._helper;this.instance.currentItem.remove();this.instance.placeholder&&this.instance.placeholder.remove();g._trigger("fromSortable",c);g.dropped=false}})}});b.ui.plugin.add("draggable","cursor",{start:function(){var c=b("body"),f=b(this).data("draggable").options;if(c.css("cursor"))f._cursor=
54 c.css("cursor");c.css("cursor",f.cursor)},stop:function(){var c=b(this).data("draggable").options;c._cursor&&b("body").css("cursor",c._cursor)}});b.ui.plugin.add("draggable","iframeFix",{start:function(){var c=b(this).data("draggable").options;b(c.iframeFix===true?"iframe":c.iframeFix).each(function(){b('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1E3}).css(b(this).offset()).appendTo("body")})},
55 stop:function(){b("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)})}});b.ui.plugin.add("draggable","opacity",{start:function(c,f){c=b(f.helper);f=b(this).data("draggable").options;if(c.css("opacity"))f._opacity=c.css("opacity");c.css("opacity",f.opacity)},stop:function(c,f){c=b(this).data("draggable").options;c._opacity&&b(f.helper).css("opacity",c._opacity)}});b.ui.plugin.add("draggable","scroll",{start:function(){var c=b(this).data("draggable");if(c.scrollParent[0]!=
56 document&&c.scrollParent[0].tagName!="HTML")c.overflowOffset=c.scrollParent.offset()},drag:function(c){var f=b(this).data("draggable"),g=f.options,e=false;if(f.scrollParent[0]!=document&&f.scrollParent[0].tagName!="HTML"){if(!g.axis||g.axis!="x")if(f.overflowOffset.top+f.scrollParent[0].offsetHeight-c.pageY<g.scrollSensitivity)f.scrollParent[0].scrollTop=e=f.scrollParent[0].scrollTop+g.scrollSpeed;else if(c.pageY-f.overflowOffset.top<g.scrollSensitivity)f.scrollParent[0].scrollTop=e=f.scrollParent[0].scrollTop-
57 g.scrollSpeed;if(!g.axis||g.axis!="y")if(f.overflowOffset.left+f.scrollParent[0].offsetWidth-c.pageX<g.scrollSensitivity)f.scrollParent[0].scrollLeft=e=f.scrollParent[0].scrollLeft+g.scrollSpeed;else if(c.pageX-f.overflowOffset.left<g.scrollSensitivity)f.scrollParent[0].scrollLeft=e=f.scrollParent[0].scrollLeft-g.scrollSpeed}else{if(!g.axis||g.axis!="x")if(c.pageY-b(document).scrollTop()<g.scrollSensitivity)e=b(document).scrollTop(b(document).scrollTop()-g.scrollSpeed);else if(b(window).height()-
58 (c.pageY-b(document).scrollTop())<g.scrollSensitivity)e=b(document).scrollTop(b(document).scrollTop()+g.scrollSpeed);if(!g.axis||g.axis!="y")if(c.pageX-b(document).scrollLeft()<g.scrollSensitivity)e=b(document).scrollLeft(b(document).scrollLeft()-g.scrollSpeed);else if(b(window).width()-(c.pageX-b(document).scrollLeft())<g.scrollSensitivity)e=b(document).scrollLeft(b(document).scrollLeft()+g.scrollSpeed)}e!==false&&b.ui.ddmanager&&!g.dropBehaviour&&b.ui.ddmanager.prepareOffsets(f,c)}});b.ui.plugin.add("draggable",
59 "snap",{start:function(){var c=b(this).data("draggable"),f=c.options;c.snapElements=[];b(f.snap.constructor!=String?f.snap.items||":data(draggable)":f.snap).each(function(){var g=b(this),e=g.offset();this!=c.element[0]&&c.snapElements.push({item:this,width:g.outerWidth(),height:g.outerHeight(),top:e.top,left:e.left})})},drag:function(c,f){for(var g=b(this).data("draggable"),e=g.options,a=e.snapTolerance,d=f.offset.left,h=d+g.helperProportions.width,i=f.offset.top,j=i+g.helperProportions.height,n=
60 g.snapElements.length-1;n>=0;n--){var q=g.snapElements[n].left,l=q+g.snapElements[n].width,k=g.snapElements[n].top,m=k+g.snapElements[n].height;if(q-a<d&&d<l+a&&k-a<i&&i<m+a||q-a<d&&d<l+a&&k-a<j&&j<m+a||q-a<h&&h<l+a&&k-a<i&&i<m+a||q-a<h&&h<l+a&&k-a<j&&j<m+a){if(e.snapMode!="inner"){var o=Math.abs(k-j)<=a,p=Math.abs(m-i)<=a,s=Math.abs(q-h)<=a,r=Math.abs(l-d)<=a;if(o)f.position.top=g._convertPositionTo("relative",{top:k-g.helperProportions.height,left:0}).top-g.margins.top;if(p)f.position.top=g._convertPositionTo("relative",
61 {top:m,left:0}).top-g.margins.top;if(s)f.position.left=g._convertPositionTo("relative",{top:0,left:q-g.helperProportions.width}).left-g.margins.left;if(r)f.position.left=g._convertPositionTo("relative",{top:0,left:l}).left-g.margins.left}var u=o||p||s||r;if(e.snapMode!="outer"){o=Math.abs(k-i)<=a;p=Math.abs(m-j)<=a;s=Math.abs(q-d)<=a;r=Math.abs(l-h)<=a;if(o)f.position.top=g._convertPositionTo("relative",{top:k,left:0}).top-g.margins.top;if(p)f.position.top=g._convertPositionTo("relative",{top:m-g.helperProportions.height,
62 left:0}).top-g.margins.top;if(s)f.position.left=g._convertPositionTo("relative",{top:0,left:q}).left-g.margins.left;if(r)f.position.left=g._convertPositionTo("relative",{top:0,left:l-g.helperProportions.width}).left-g.margins.left}if(!g.snapElements[n].snapping&&(o||p||s||r||u))g.options.snap.snap&&g.options.snap.snap.call(g.element,c,b.extend(g._uiHash(),{snapItem:g.snapElements[n].item}));g.snapElements[n].snapping=o||p||s||r||u}else{g.snapElements[n].snapping&&g.options.snap.release&&g.options.snap.release.call(g.element,
63 c,b.extend(g._uiHash(),{snapItem:g.snapElements[n].item}));g.snapElements[n].snapping=false}}}});b.ui.plugin.add("draggable","stack",{start:function(){var c=b(this).data("draggable").options;c=b.makeArray(b(c.stack)).sort(function(g,e){return(parseInt(b(g).css("zIndex"),10)||0)-(parseInt(b(e).css("zIndex"),10)||0)});if(c.length){var f=parseInt(c[0].style.zIndex)||0;b(c).each(function(g){this.style.zIndex=f+g});this[0].style.zIndex=f+c.length}}});b.ui.plugin.add("draggable","zIndex",{start:function(c,
64 f){c=b(f.helper);f=b(this).data("draggable").options;if(c.css("zIndex"))f._zIndex=c.css("zIndex");c.css("zIndex",f.zIndex)},stop:function(c,f){c=b(this).data("draggable").options;c._zIndex&&b(f.helper).css("zIndex",c._zIndex)}})})(jQuery);
65 (function(b){b.widget("ui.droppable",{widgetEventPrefix:"drop",options:{accept:"*",activeClass:false,addClasses:true,greedy:false,hoverClass:false,scope:"default",tolerance:"intersect"},_create:function(){var c=this.options,f=c.accept;this.isover=0;this.isout=1;this.accept=b.isFunction(f)?f:function(g){return g.is(f)};this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight};b.ui.ddmanager.droppables[c.scope]=b.ui.ddmanager.droppables[c.scope]||[];b.ui.ddmanager.droppables[c.scope].push(this);
66 c.addClasses&&this.element.addClass("ui-droppable")},destroy:function(){for(var c=b.ui.ddmanager.droppables[this.options.scope],f=0;f<c.length;f++)c[f]==this&&c.splice(f,1);this.element.removeClass("ui-droppable ui-droppable-disabled").removeData("droppable").unbind(".droppable");return this},_setOption:function(c,f){if(c=="accept")this.accept=b.isFunction(f)?f:function(g){return g.is(f)};b.Widget.prototype._setOption.apply(this,arguments)},_activate:function(c){var f=b.ui.ddmanager.current;this.options.activeClass&&
67 this.element.addClass(this.options.activeClass);f&&this._trigger("activate",c,this.ui(f))},_deactivate:function(c){var f=b.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass);f&&this._trigger("deactivate",c,this.ui(f))},_over:function(c){var f=b.ui.ddmanager.current;if(!(!f||(f.currentItem||f.element)[0]==this.element[0]))if(this.accept.call(this.element[0],f.currentItem||f.element)){this.options.hoverClass&&this.element.addClass(this.options.hoverClass);
68 this._trigger("over",c,this.ui(f))}},_out:function(c){var f=b.ui.ddmanager.current;if(!(!f||(f.currentItem||f.element)[0]==this.element[0]))if(this.accept.call(this.element[0],f.currentItem||f.element)){this.options.hoverClass&&this.element.removeClass(this.options.hoverClass);this._trigger("out",c,this.ui(f))}},_drop:function(c,f){var g=f||b.ui.ddmanager.current;if(!g||(g.currentItem||g.element)[0]==this.element[0])return false;var e=false;this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function(){var a=
69 b.data(this,"droppable");if(a.options.greedy&&!a.options.disabled&&a.options.scope==g.options.scope&&a.accept.call(a.element[0],g.currentItem||g.element)&&b.ui.intersect(g,b.extend(a,{offset:a.element.offset()}),a.options.tolerance)){e=true;return false}});if(e)return false;if(this.accept.call(this.element[0],g.currentItem||g.element)){this.options.activeClass&&this.element.removeClass(this.options.activeClass);this.options.hoverClass&&this.element.removeClass(this.options.hoverClass);this._trigger("drop",
70 c,this.ui(g));return this.element}return false},ui:function(c){return{draggable:c.currentItem||c.element,helper:c.helper,position:c.position,offset:c.positionAbs}}});b.extend(b.ui.droppable,{version:"1.8.8"});b.ui.intersect=function(c,f,g){if(!f.offset)return false;var e=(c.positionAbs||c.position.absolute).left,a=e+c.helperProportions.width,d=(c.positionAbs||c.position.absolute).top,h=d+c.helperProportions.height,i=f.offset.left,j=i+f.proportions.width,n=f.offset.top,q=n+f.proportions.height;
71 switch(g){case "fit":return i<=e&&a<=j&&n<=d&&h<=q;case "intersect":return i<e+c.helperProportions.width/2&&a-c.helperProportions.width/2<j&&n<d+c.helperProportions.height/2&&h-c.helperProportions.height/2<q;case "pointer":return b.ui.isOver((c.positionAbs||c.position.absolute).top+(c.clickOffset||c.offset.click).top,(c.positionAbs||c.position.absolute).left+(c.clickOffset||c.offset.click).left,n,i,f.proportions.height,f.proportions.width);case "touch":return(d>=n&&d<=q||h>=n&&h<=q||d<n&&h>q)&&(e>=
72 i&&e<=j||a>=i&&a<=j||e<i&&a>j);default:return false}};b.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(c,f){var g=b.ui.ddmanager.droppables[c.options.scope]||[],e=f?f.type:null,a=(c.currentItem||c.element).find(":data(droppable)").andSelf(),d=0;a:for(;d<g.length;d++)if(!(g[d].options.disabled||c&&!g[d].accept.call(g[d].element[0],c.currentItem||c.element))){for(var h=0;h<a.length;h++)if(a[h]==g[d].element[0]){g[d].proportions.height=0;continue a}g[d].visible=g[d].element.css("display")!=
73 "none";if(g[d].visible){g[d].offset=g[d].element.offset();g[d].proportions={width:g[d].element[0].offsetWidth,height:g[d].element[0].offsetHeight};e=="mousedown"&&g[d]._activate.call(g[d],f)}}},drop:function(c,f){var g=false;b.each(b.ui.ddmanager.droppables[c.options.scope]||[],function(){if(this.options){if(!this.options.disabled&&this.visible&&b.ui.intersect(c,this,this.options.tolerance))g=g||this._drop.call(this,f);if(!this.options.disabled&&this.visible&&this.accept.call(this.element[0],c.currentItem||
74 c.element)){this.isout=1;this.isover=0;this._deactivate.call(this,f)}}});return g},drag:function(c,f){c.options.refreshPositions&&b.ui.ddmanager.prepareOffsets(c,f);b.each(b.ui.ddmanager.droppables[c.options.scope]||[],function(){if(!(this.options.disabled||this.greedyChild||!this.visible)){var g=b.ui.intersect(c,this,this.options.tolerance);if(g=!g&&this.isover==1?"isout":g&&this.isover==0?"isover":null){var e;if(this.options.greedy){var a=this.element.parents(":data(droppable):eq(0)");if(a.length){e=
75 b.data(a[0],"droppable");e.greedyChild=g=="isover"?1:0}}if(e&&g=="isover"){e.isover=0;e.isout=1;e._out.call(e,f)}this[g]=1;this[g=="isout"?"isover":"isout"]=0;this[g=="isover"?"_over":"_out"].call(this,f);if(e&&g=="isout"){e.isout=0;e.isover=1;e._over.call(e,f)}}}})}}})(jQuery);
76 (function(b){b.widget("ui.resizable",b.ui.mouse,{widgetEventPrefix:"resize",options:{alsoResize:false,animate:false,animateDuration:"slow",animateEasing:"swing",aspectRatio:false,autoHide:false,containment:false,ghost:false,grid:false,handles:"e,s,se",helper:false,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1E3},_create:function(){var g=this,e=this.options;this.element.addClass("ui-resizable");b.extend(this,{_aspectRatio:!!e.aspectRatio,aspectRatio:e.aspectRatio,originalElement:this.element,
77 _proportionallyResizeElements:[],_helper:e.helper||e.ghost||e.animate?e.helper||"ui-resizable-helper":null});if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)){/relative/.test(this.element.css("position"))&&b.browser.opera&&this.element.css({position:"relative",top:"auto",left:"auto"});this.element.wrap(b('<div class="ui-wrapper" style="overflow: hidden;"></div>').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),
78 top:this.element.css("top"),left:this.element.css("left")}));this.element=this.element.parent().data("resizable",this.element.data("resizable"));this.elementIsWrapper=true;this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")});this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle=
79 this.originalElement.css("resize");this.originalElement.css("resize","none");this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));this.originalElement.css({margin:this.originalElement.css("margin")});this._proportionallyResize()}this.handles=e.handles||(!b(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",
80 nw:".ui-resizable-nw"});if(this.handles.constructor==String){if(this.handles=="all")this.handles="n,e,s,w,se,sw,ne,nw";var a=this.handles.split(",");this.handles={};for(var d=0;d<a.length;d++){var h=b.trim(a[d]),i=b('<div class="ui-resizable-handle '+("ui-resizable-"+h)+'"></div>');/sw|se|ne|nw/.test(h)&&i.css({zIndex:++e.zIndex});"se"==h&&i.addClass("ui-icon ui-icon-gripsmall-diagonal-se");this.handles[h]=".ui-resizable-"+h;this.element.append(i)}}this._renderAxis=function(j){j=j||this.element;for(var n in this.handles){if(this.handles[n].constructor==
81 String)this.handles[n]=b(this.handles[n],this.element).show();if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var q=b(this.handles[n],this.element),l=0;l=/sw|ne|nw|se|n|s/.test(n)?q.outerHeight():q.outerWidth();q=["padding",/ne|nw|n/.test(n)?"Top":/se|sw|s/.test(n)?"Bottom":/^e$/.test(n)?"Right":"Left"].join("");j.css(q,l);this._proportionallyResize()}b(this.handles[n])}};this._renderAxis(this.element);this._handles=b(".ui-resizable-handle",this.element).disableSelection();
82 this._handles.mouseover(function(){if(!g.resizing){if(this.className)var j=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);g.axis=j&&j[1]?j[1]:"se"}});if(e.autoHide){this._handles.hide();b(this.element).addClass("ui-resizable-autohide").hover(function(){b(this).removeClass("ui-resizable-autohide");g._handles.show()},function(){if(!g.resizing){b(this).addClass("ui-resizable-autohide");g._handles.hide()}})}this._mouseInit()},destroy:function(){this._mouseDestroy();var g=function(a){b(a).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};
83 if(this.elementIsWrapper){g(this.element);var e=this.element;e.after(this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")})).remove()}this.originalElement.css("resize",this.originalResizeStyle);g(this.originalElement);return this},_mouseCapture:function(g){var e=false;for(var a in this.handles)if(b(this.handles[a])[0]==g.target)e=true;return!this.options.disabled&&e},_mouseStart:function(g){var e=this.options,a=this.element.position(),
84 d=this.element;this.resizing=true;this.documentScroll={top:b(document).scrollTop(),left:b(document).scrollLeft()};if(d.is(".ui-draggable")||/absolute/.test(d.css("position")))d.css({position:"absolute",top:a.top,left:a.left});b.browser.opera&&/relative/.test(d.css("position"))&&d.css({position:"relative",top:"auto",left:"auto"});this._renderProxy();a=c(this.helper.css("left"));var h=c(this.helper.css("top"));if(e.containment){a+=b(e.containment).scrollLeft()||0;h+=b(e.containment).scrollTop()||0}this.offset=
85 this.helper.offset();this.position={left:a,top:h};this.size=this._helper?{width:d.outerWidth(),height:d.outerHeight()}:{width:d.width(),height:d.height()};this.originalSize=this._helper?{width:d.outerWidth(),height:d.outerHeight()}:{width:d.width(),height:d.height()};this.originalPosition={left:a,top:h};this.sizeDiff={width:d.outerWidth()-d.width(),height:d.outerHeight()-d.height()};this.originalMousePosition={left:g.pageX,top:g.pageY};this.aspectRatio=typeof e.aspectRatio=="number"?e.aspectRatio:
86 this.originalSize.width/this.originalSize.height||1;e=b(".ui-resizable-"+this.axis).css("cursor");b("body").css("cursor",e=="auto"?this.axis+"-resize":e);d.addClass("ui-resizable-resizing");this._propagate("start",g);return true},_mouseDrag:function(g){var e=this.helper,a=this.originalMousePosition,d=this._change[this.axis];if(!d)return false;a=d.apply(this,[g,g.pageX-a.left||0,g.pageY-a.top||0]);if(this._aspectRatio||g.shiftKey)a=this._updateRatio(a,g);a=this._respectSize(a,g);this._propagate("resize",
87 g);e.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize();this._updateCache(a);this._trigger("resize",g,this.ui());return false},_mouseStop:function(g){this.resizing=false;var e=this.options,a=this;if(this._helper){var d=this._proportionallyResizeElements,h=d.length&&/textarea/i.test(d[0].nodeName);d=h&&b.ui.hasScroll(d[0],"left")?0:a.sizeDiff.height;
88 h={width:a.size.width-(h?0:a.sizeDiff.width),height:a.size.height-d};d=parseInt(a.element.css("left"),10)+(a.position.left-a.originalPosition.left)||null;var i=parseInt(a.element.css("top"),10)+(a.position.top-a.originalPosition.top)||null;e.animate||this.element.css(b.extend(h,{top:i,left:d}));a.helper.height(a.size.height);a.helper.width(a.size.width);this._helper&&!e.animate&&this._proportionallyResize()}b("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");this._propagate("stop",
89 g);this._helper&&this.helper.remove();return false},_updateCache:function(g){this.offset=this.helper.offset();if(f(g.left))this.position.left=g.left;if(f(g.top))this.position.top=g.top;if(f(g.height))this.size.height=g.height;if(f(g.width))this.size.width=g.width},_updateRatio:function(g){var e=this.position,a=this.size,d=this.axis;if(g.height)g.width=a.height*this.aspectRatio;else if(g.width)g.height=a.width/this.aspectRatio;if(d=="sw"){g.left=e.left+(a.width-g.width);g.top=null}if(d=="nw"){g.top=
90 e.top+(a.height-g.height);g.left=e.left+(a.width-g.width)}return g},_respectSize:function(g){var e=this.options,a=this.axis,d=f(g.width)&&e.maxWidth&&e.maxWidth<g.width,h=f(g.height)&&e.maxHeight&&e.maxHeight<g.height,i=f(g.width)&&e.minWidth&&e.minWidth>g.width,j=f(g.height)&&e.minHeight&&e.minHeight>g.height;if(i)g.width=e.minWidth;if(j)g.height=e.minHeight;if(d)g.width=e.maxWidth;if(h)g.height=e.maxHeight;var n=this.originalPosition.left+this.originalSize.width,q=this.position.top+this.size.height,
91 l=/sw|nw|w/.test(a);a=/nw|ne|n/.test(a);if(i&&l)g.left=n-e.minWidth;if(d&&l)g.left=n-e.maxWidth;if(j&&a)g.top=q-e.minHeight;if(h&&a)g.top=q-e.maxHeight;if((e=!g.width&&!g.height)&&!g.left&&g.top)g.top=null;else if(e&&!g.top&&g.left)g.left=null;return g},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var g=this.helper||this.element,e=0;e<this._proportionallyResizeElements.length;e++){var a=this._proportionallyResizeElements[e];if(!this.borderDif){var d=[a.css("borderTopWidth"),
92 a.css("borderRightWidth"),a.css("borderBottomWidth"),a.css("borderLeftWidth")],h=[a.css("paddingTop"),a.css("paddingRight"),a.css("paddingBottom"),a.css("paddingLeft")];this.borderDif=b.map(d,function(i,j){i=parseInt(i,10)||0;j=parseInt(h[j],10)||0;return i+j})}b.browser.msie&&(b(g).is(":hidden")||b(g).parents(":hidden").length)||a.css({height:g.height()-this.borderDif[0]-this.borderDif[2]||0,width:g.width()-this.borderDif[1]-this.borderDif[3]||0})}},_renderProxy:function(){var g=this.options;this.elementOffset=
93 this.element.offset();if(this._helper){this.helper=this.helper||b('<div style="overflow:hidden;"></div>');var e=b.browser.msie&&b.browser.version<7,a=e?1:0;e=e?2:-1;this.helper.addClass(this._helper).css({width:this.element.outerWidth()+e,height:this.element.outerHeight()+e,position:"absolute",left:this.elementOffset.left-a+"px",top:this.elementOffset.top-a+"px",zIndex:++g.zIndex});this.helper.appendTo("body").disableSelection()}else this.helper=this.element},_change:{e:function(g,e){return{width:this.originalSize.width+
94 e}},w:function(g,e){return{left:this.originalPosition.left+e,width:this.originalSize.width-e}},n:function(g,e,a){return{top:this.originalPosition.top+a,height:this.originalSize.height-a}},s:function(g,e,a){return{height:this.originalSize.height+a}},se:function(g,e,a){return b.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[g,e,a]))},sw:function(g,e,a){return b.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[g,e,a]))},ne:function(g,e,a){return b.extend(this._change.n.apply(this,
95 arguments),this._change.e.apply(this,[g,e,a]))},nw:function(g,e,a){return b.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[g,e,a]))}},_propagate:function(g,e){b.ui.plugin.call(this,g,[e,this.ui()]);g!="resize"&&this._trigger(g,e,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}});b.extend(b.ui.resizable,
96 {version:"1.8.8"});b.ui.plugin.add("resizable","alsoResize",{start:function(){var g=b(this).data("resizable").options,e=function(a){b(a).each(function(){var d=b(this);d.data("resizable-alsoresize",{width:parseInt(d.width(),10),height:parseInt(d.height(),10),left:parseInt(d.css("left"),10),top:parseInt(d.css("top"),10),position:d.css("position")})})};if(typeof g.alsoResize=="object"&&!g.alsoResize.parentNode)if(g.alsoResize.length){g.alsoResize=g.alsoResize[0];e(g.alsoResize)}else b.each(g.alsoResize,
97 function(a){e(a)});else e(g.alsoResize)},resize:function(g,e){var a=b(this).data("resizable");g=a.options;var d=a.originalSize,h=a.originalPosition,i={height:a.size.height-d.height||0,width:a.size.width-d.width||0,top:a.position.top-h.top||0,left:a.position.left-h.left||0},j=function(n,q){b(n).each(function(){var l=b(this),k=b(this).data("resizable-alsoresize"),m={},o=q&&q.length?q:l.parents(e.originalElement[0]).length?["width","height"]:["width","height","top","left"];b.each(o,function(p,s){if((p=
98 (k[s]||0)+(i[s]||0))&&p>=0)m[s]=p||null});if(b.browser.opera&&/relative/.test(l.css("position"))){a._revertToRelativePosition=true;l.css({position:"absolute",top:"auto",left:"auto"})}l.css(m)})};typeof g.alsoResize=="object"&&!g.alsoResize.nodeType?b.each(g.alsoResize,function(n,q){j(n,q)}):j(g.alsoResize)},stop:function(){var g=b(this).data("resizable"),e=g.options,a=function(d){b(d).each(function(){var h=b(this);h.css({position:h.data("resizable-alsoresize").position})})};if(g._revertToRelativePosition){g._revertToRelativePosition=
99 false;typeof e.alsoResize=="object"&&!e.alsoResize.nodeType?b.each(e.alsoResize,function(d){a(d)}):a(e.alsoResize)}b(this).removeData("resizable-alsoresize")}});b.ui.plugin.add("resizable","animate",{stop:function(g){var e=b(this).data("resizable"),a=e.options,d=e._proportionallyResizeElements,h=d.length&&/textarea/i.test(d[0].nodeName),i=h&&b.ui.hasScroll(d[0],"left")?0:e.sizeDiff.height;h={width:e.size.width-(h?0:e.sizeDiff.width),height:e.size.height-i};i=parseInt(e.element.css("left"),10)+(e.position.left-
100 e.originalPosition.left)||null;var j=parseInt(e.element.css("top"),10)+(e.position.top-e.originalPosition.top)||null;e.element.animate(b.extend(h,j&&i?{top:j,left:i}:{}),{duration:a.animateDuration,easing:a.animateEasing,step:function(){var n={width:parseInt(e.element.css("width"),10),height:parseInt(e.element.css("height"),10),top:parseInt(e.element.css("top"),10),left:parseInt(e.element.css("left"),10)};d&&d.length&&b(d[0]).css({width:n.width,height:n.height});e._updateCache(n);e._propagate("resize",
101 g)}})}});b.ui.plugin.add("resizable","containment",{start:function(){var g=b(this).data("resizable"),e=g.element,a=g.options.containment;if(e=a instanceof b?a.get(0):/parent/.test(a)?e.parent().get(0):a){g.containerElement=b(e);if(/document/.test(a)||a==document){g.containerOffset={left:0,top:0};g.containerPosition={left:0,top:0};g.parentData={element:b(document),left:0,top:0,width:b(document).width(),height:b(document).height()||document.body.parentNode.scrollHeight}}else{var d=b(e),h=[];b(["Top",
102 "Right","Left","Bottom"]).each(function(n,q){h[n]=c(d.css("padding"+q))});g.containerOffset=d.offset();g.containerPosition=d.position();g.containerSize={height:d.innerHeight()-h[3],width:d.innerWidth()-h[1]};a=g.containerOffset;var i=g.containerSize.height,j=g.containerSize.width;j=b.ui.hasScroll(e,"left")?e.scrollWidth:j;i=b.ui.hasScroll(e)?e.scrollHeight:i;g.parentData={element:e,left:a.left,top:a.top,width:j,height:i}}}},resize:function(g){var e=b(this).data("resizable"),a=e.options,d=e.containerOffset,
103 h=e.position;g=e._aspectRatio||g.shiftKey;var i={top:0,left:0},j=e.containerElement;if(j[0]!=document&&/static/.test(j.css("position")))i=d;if(h.left<(e._helper?d.left:0)){e.size.width+=e._helper?e.position.left-d.left:e.position.left-i.left;if(g)e.size.height=e.size.width/a.aspectRatio;e.position.left=a.helper?d.left:0}if(h.top<(e._helper?d.top:0)){e.size.height+=e._helper?e.position.top-d.top:e.position.top;if(g)e.size.width=e.size.height*a.aspectRatio;e.position.top=e._helper?d.top:0}e.offset.left=
104 e.parentData.left+e.position.left;e.offset.top=e.parentData.top+e.position.top;a=Math.abs((e._helper?e.offset.left-i.left:e.offset.left-i.left)+e.sizeDiff.width);d=Math.abs((e._helper?e.offset.top-i.top:e.offset.top-d.top)+e.sizeDiff.height);h=e.containerElement.get(0)==e.element.parent().get(0);i=/relative|absolute/.test(e.containerElement.css("position"));if(h&&i)a-=e.parentData.left;if(a+e.size.width>=e.parentData.width){e.size.width=e.parentData.width-a;if(g)e.size.height=e.size.width/e.aspectRatio}if(d+
105 e.size.height>=e.parentData.height){e.size.height=e.parentData.height-d;if(g)e.size.width=e.size.height*e.aspectRatio}},stop:function(){var g=b(this).data("resizable"),e=g.options,a=g.containerOffset,d=g.containerPosition,h=g.containerElement,i=b(g.helper),j=i.offset(),n=i.outerWidth()-g.sizeDiff.width;i=i.outerHeight()-g.sizeDiff.height;g._helper&&!e.animate&&/relative/.test(h.css("position"))&&b(this).css({left:j.left-d.left-a.left,width:n,height:i});g._helper&&!e.animate&&/static/.test(h.css("position"))&&
106 b(this).css({left:j.left-d.left-a.left,width:n,height:i})}});b.ui.plugin.add("resizable","ghost",{start:function(){var g=b(this).data("resizable"),e=g.options,a=g.size;g.ghost=g.originalElement.clone();g.ghost.css({opacity:0.25,display:"block",position:"relative",height:a.height,width:a.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof e.ghost=="string"?e.ghost:"");g.ghost.appendTo(g.helper)},resize:function(){var g=b(this).data("resizable");g.ghost&&g.ghost.css({position:"relative",
107 height:g.size.height,width:g.size.width})},stop:function(){var g=b(this).data("resizable");g.ghost&&g.helper&&g.helper.get(0).removeChild(g.ghost.get(0))}});b.ui.plugin.add("resizable","grid",{resize:function(){var g=b(this).data("resizable"),e=g.options,a=g.size,d=g.originalSize,h=g.originalPosition,i=g.axis;e.grid=typeof e.grid=="number"?[e.grid,e.grid]:e.grid;var j=Math.round((a.width-d.width)/(e.grid[0]||1))*(e.grid[0]||1);e=Math.round((a.height-d.height)/(e.grid[1]||1))*(e.grid[1]||1);if(/^(se|s|e)$/.test(i)){g.size.width=
108 d.width+j;g.size.height=d.height+e}else if(/^(ne)$/.test(i)){g.size.width=d.width+j;g.size.height=d.height+e;g.position.top=h.top-e}else{if(/^(sw)$/.test(i)){g.size.width=d.width+j;g.size.height=d.height+e}else{g.size.width=d.width+j;g.size.height=d.height+e;g.position.top=h.top-e}g.position.left=h.left-j}}});var c=function(g){return parseInt(g,10)||0},f=function(g){return!isNaN(parseInt(g,10))}})(jQuery);
109 (function(b){b.widget("ui.selectable",b.ui.mouse,{options:{appendTo:"body",autoRefresh:true,distance:0,filter:"*",tolerance:"touch"},_create:function(){var c=this;this.element.addClass("ui-selectable");this.dragged=false;var f;this.refresh=function(){f=b(c.options.filter,c.element[0]);f.each(function(){var g=b(this),e=g.offset();b.data(this,"selectable-item",{element:this,$element:g,left:e.left,top:e.top,right:e.left+g.outerWidth(),bottom:e.top+g.outerHeight(),startselected:false,selected:g.hasClass("ui-selected"),
110 selecting:g.hasClass("ui-selecting"),unselecting:g.hasClass("ui-unselecting")})})};this.refresh();this.selectees=f.addClass("ui-selectee");this._mouseInit();this.helper=b("<div class='ui-selectable-helper'></div>")},destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item");this.element.removeClass("ui-selectable ui-selectable-disabled").removeData("selectable").unbind(".selectable");this._mouseDestroy();return this},_mouseStart:function(c){var f=this;this.opos=[c.pageX,
111 c.pageY];if(!this.options.disabled){var g=this.options;this.selectees=b(g.filter,this.element[0]);this._trigger("start",c);b(g.appendTo).append(this.helper);this.helper.css({left:c.clientX,top:c.clientY,width:0,height:0});g.autoRefresh&&this.refresh();this.selectees.filter(".ui-selected").each(function(){var e=b.data(this,"selectable-item");e.startselected=true;if(!c.metaKey){e.$element.removeClass("ui-selected");e.selected=false;e.$element.addClass("ui-unselecting");e.unselecting=true;f._trigger("unselecting",
112 c,{unselecting:e.element})}});b(c.target).parents().andSelf().each(function(){var e=b.data(this,"selectable-item");if(e){var a=!c.metaKey||!e.$element.hasClass("ui-selected");e.$element.removeClass(a?"ui-unselecting":"ui-selected").addClass(a?"ui-selecting":"ui-unselecting");e.unselecting=!a;e.selecting=a;(e.selected=a)?f._trigger("selecting",c,{selecting:e.element}):f._trigger("unselecting",c,{unselecting:e.element});return false}})}},_mouseDrag:function(c){var f=this;this.dragged=true;if(!this.options.disabled){var g=
113 this.options,e=this.opos[0],a=this.opos[1],d=c.pageX,h=c.pageY;if(e>d){var i=d;d=e;e=i}if(a>h){i=h;h=a;a=i}this.helper.css({left:e,top:a,width:d-e,height:h-a});this.selectees.each(function(){var j=b.data(this,"selectable-item");if(!(!j||j.element==f.element[0])){var n=false;if(g.tolerance=="touch")n=!(j.left>d||j.right<e||j.top>h||j.bottom<a);else if(g.tolerance=="fit")n=j.left>e&&j.right<d&&j.top>a&&j.bottom<h;if(n){if(j.selected){j.$element.removeClass("ui-selected");j.selected=false}if(j.unselecting){j.$element.removeClass("ui-unselecting");
114 j.unselecting=false}if(!j.selecting){j.$element.addClass("ui-selecting");j.selecting=true;f._trigger("selecting",c,{selecting:j.element})}}else{if(j.selecting)if(c.metaKey&&j.startselected){j.$element.removeClass("ui-selecting");j.selecting=false;j.$element.addClass("ui-selected");j.selected=true}else{j.$element.removeClass("ui-selecting");j.selecting=false;if(j.startselected){j.$element.addClass("ui-unselecting");j.unselecting=true}f._trigger("unselecting",c,{unselecting:j.element})}if(j.selected)if(!c.metaKey&&
115 !j.startselected){j.$element.removeClass("ui-selected");j.selected=false;j.$element.addClass("ui-unselecting");j.unselecting=true;f._trigger("unselecting",c,{unselecting:j.element})}}}});return false}},_mouseStop:function(c){var f=this;this.dragged=false;b(".ui-unselecting",this.element[0]).each(function(){var g=b.data(this,"selectable-item");g.$element.removeClass("ui-unselecting");g.unselecting=false;g.startselected=false;f._trigger("unselected",c,{unselected:g.element})});b(".ui-selecting",this.element[0]).each(function(){var g=
116 b.data(this,"selectable-item");g.$element.removeClass("ui-selecting").addClass("ui-selected");g.selecting=false;g.selected=true;g.startselected=true;f._trigger("selected",c,{selected:g.element})});this._trigger("stop",c);this.helper.remove();return false}});b.extend(b.ui.selectable,{version:"1.8.8"})})(jQuery);
117 (function(b){b.widget("ui.sortable",b.ui.mouse,{widgetEventPrefix:"sort",options:{appendTo:"parent",axis:false,connectWith:false,containment:false,cursor:"auto",cursorAt:false,dropOnEmpty:true,forcePlaceholderSize:false,forceHelperSize:false,grid:false,handle:false,helper:"original",items:"> *",opacity:false,placeholder:false,revert:false,scroll:true,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1E3},_create:function(){this.containerCache={};this.element.addClass("ui-sortable");
118 this.refresh();this.floating=this.items.length?/left|right/.test(this.items[0].item.css("float")):false;this.offset=this.element.offset();this._mouseInit()},destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").removeData("sortable").unbind(".sortable");this._mouseDestroy();for(var c=this.items.length-1;c>=0;c--)this.items[c].item.removeData("sortable-item");return this},_setOption:function(c,f){if(c==="disabled"){this.options[c]=f;this.widget()[f?"addClass":"removeClass"]("ui-sortable-disabled")}else b.Widget.prototype._setOption.apply(this,
119 arguments)},_mouseCapture:function(c,f){if(this.reverting)return false;if(this.options.disabled||this.options.type=="static")return false;this._refreshItems(c);var g=null,e=this;b(c.target).parents().each(function(){if(b.data(this,"sortable-item")==e){g=b(this);return false}});if(b.data(c.target,"sortable-item")==e)g=b(c.target);if(!g)return false;if(this.options.handle&&!f){var a=false;b(this.options.handle,g).find("*").andSelf().each(function(){if(this==c.target)a=true});if(!a)return false}this.currentItem=
120 g;this._removeCurrentsFromItems();return true},_mouseStart:function(c,f,g){f=this.options;var e=this;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(c);this._cacheHelperProportions();this._cacheMargins();this.scrollParent=this.helper.scrollParent();this.offset=this.currentItem.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};this.helper.css("position","absolute");this.cssPosition=this.helper.css("position");b.extend(this.offset,
121 {click:{left:c.pageX-this.offset.left,top:c.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(c);this.originalPageX=c.pageX;this.originalPageY=c.pageY;f.cursorAt&&this._adjustOffsetFromHelper(f.cursorAt);this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};this.helper[0]!=this.currentItem[0]&&this.currentItem.hide();this._createPlaceholder();f.containment&&this._setContainment();
122 if(f.cursor){if(b("body").css("cursor"))this._storedCursor=b("body").css("cursor");b("body").css("cursor",f.cursor)}if(f.opacity){if(this.helper.css("opacity"))this._storedOpacity=this.helper.css("opacity");this.helper.css("opacity",f.opacity)}if(f.zIndex){if(this.helper.css("zIndex"))this._storedZIndex=this.helper.css("zIndex");this.helper.css("zIndex",f.zIndex)}if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML")this.overflowOffset=this.scrollParent.offset();this._trigger("start",
123 c,this._uiHash());this._preserveHelperProportions||this._cacheHelperProportions();if(!g)for(g=this.containers.length-1;g>=0;g--)this.containers[g]._trigger("activate",c,e._uiHash(this));if(b.ui.ddmanager)b.ui.ddmanager.current=this;b.ui.ddmanager&&!f.dropBehaviour&&b.ui.ddmanager.prepareOffsets(this,c);this.dragging=true;this.helper.addClass("ui-sortable-helper");this._mouseDrag(c);return true},_mouseDrag:function(c){this.position=this._generatePosition(c);this.positionAbs=this._convertPositionTo("absolute");
124 if(!this.lastPositionAbs)this.lastPositionAbs=this.positionAbs;if(this.options.scroll){var f=this.options,g=false;if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){if(this.overflowOffset.top+this.scrollParent[0].offsetHeight-c.pageY<f.scrollSensitivity)this.scrollParent[0].scrollTop=g=this.scrollParent[0].scrollTop+f.scrollSpeed;else if(c.pageY-this.overflowOffset.top<f.scrollSensitivity)this.scrollParent[0].scrollTop=g=this.scrollParent[0].scrollTop-f.scrollSpeed;if(this.overflowOffset.left+
125 this.scrollParent[0].offsetWidth-c.pageX<f.scrollSensitivity)this.scrollParent[0].scrollLeft=g=this.scrollParent[0].scrollLeft+f.scrollSpeed;else if(c.pageX-this.overflowOffset.left<f.scrollSensitivity)this.scrollParent[0].scrollLeft=g=this.scrollParent[0].scrollLeft-f.scrollSpeed}else{if(c.pageY-b(document).scrollTop()<f.scrollSensitivity)g=b(document).scrollTop(b(document).scrollTop()-f.scrollSpeed);else if(b(window).height()-(c.pageY-b(document).scrollTop())<f.scrollSensitivity)g=b(document).scrollTop(b(document).scrollTop()+
126 f.scrollSpeed);if(c.pageX-b(document).scrollLeft()<f.scrollSensitivity)g=b(document).scrollLeft(b(document).scrollLeft()-f.scrollSpeed);else if(b(window).width()-(c.pageX-b(document).scrollLeft())<f.scrollSensitivity)g=b(document).scrollLeft(b(document).scrollLeft()+f.scrollSpeed)}g!==false&&b.ui.ddmanager&&!f.dropBehaviour&&b.ui.ddmanager.prepareOffsets(this,c)}this.positionAbs=this._convertPositionTo("absolute");if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+
127 "px";if(!this.options.axis||this.options.axis!="x")this.helper[0].style.top=this.position.top+"px";for(f=this.items.length-1;f>=0;f--){g=this.items[f];var e=g.item[0],a=this._intersectsWithPointer(g);if(a)if(e!=this.currentItem[0]&&this.placeholder[a==1?"next":"prev"]()[0]!=e&&!b.ui.contains(this.placeholder[0],e)&&(this.options.type=="semi-dynamic"?!b.ui.contains(this.element[0],e):true)){this.direction=a==1?"down":"up";if(this.options.tolerance=="pointer"||this._intersectsWithSides(g))this._rearrange(c,
128 g);else break;this._trigger("change",c,this._uiHash());break}}this._contactContainers(c);b.ui.ddmanager&&b.ui.ddmanager.drag(this,c);this._trigger("sort",c,this._uiHash());this.lastPositionAbs=this.positionAbs;return false},_mouseStop:function(c,f){if(c){b.ui.ddmanager&&!this.options.dropBehaviour&&b.ui.ddmanager.drop(this,c);if(this.options.revert){var g=this;f=g.placeholder.offset();g.reverting=true;b(this.helper).animate({left:f.left-this.offset.parent.left-g.margins.left+(this.offsetParent[0]==
129 document.body?0:this.offsetParent[0].scrollLeft),top:f.top-this.offset.parent.top-g.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){g._clear(c)})}else this._clear(c,f);return false}},cancel:function(){var c=this;if(this.dragging){this._mouseUp();this.options.helper=="original"?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var f=this.containers.length-1;f>=0;f--){this.containers[f]._trigger("deactivate",
130 null,c._uiHash(this));if(this.containers[f].containerCache.over){this.containers[f]._trigger("out",null,c._uiHash(this));this.containers[f].containerCache.over=0}}}this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]);this.options.helper!="original"&&this.helper&&this.helper[0].parentNode&&this.helper.remove();b.extend(this,{helper:null,dragging:false,reverting:false,_noFinalSort:null});this.domPosition.prev?b(this.domPosition.prev).after(this.currentItem):
131 b(this.domPosition.parent).prepend(this.currentItem);return this},serialize:function(c){var f=this._getItemsAsjQuery(c&&c.connected),g=[];c=c||{};b(f).each(function(){var e=(b(c.item||this).attr(c.attribute||"id")||"").match(c.expression||/(.+)[-=_](.+)/);if(e)g.push((c.key||e[1]+"[]")+"="+(c.key&&c.expression?e[1]:e[2]))});!g.length&&c.key&&g.push(c.key+"=");return g.join("&")},toArray:function(c){var f=this._getItemsAsjQuery(c&&c.connected),g=[];c=c||{};f.each(function(){g.push(b(c.item||this).attr(c.attribute||
132 "id")||"")});return g},_intersectsWith:function(c){var f=this.positionAbs.left,g=f+this.helperProportions.width,e=this.positionAbs.top,a=e+this.helperProportions.height,d=c.left,h=d+c.width,i=c.top,j=i+c.height,n=this.offset.click.top,q=this.offset.click.left;n=e+n>i&&e+n<j&&f+q>d&&f+q<h;return this.options.tolerance=="pointer"||this.options.forcePointerForContainers||this.options.tolerance!="pointer"&&this.helperProportions[this.floating?"width":"height"]>c[this.floating?"width":"height"]?n:d<f+
133 this.helperProportions.width/2&&g-this.helperProportions.width/2<h&&i<e+this.helperProportions.height/2&&a-this.helperProportions.height/2<j},_intersectsWithPointer:function(c){var f=b.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,c.top,c.height);c=b.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,c.left,c.width);f=f&&c;c=this._getDragVerticalDirection();var g=this._getDragHorizontalDirection();if(!f)return false;return this.floating?g&&g=="right"||c=="down"?2:1:c&&(c=="down"?
134 2:1)},_intersectsWithSides:function(c){var f=b.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,c.top+c.height/2,c.height);c=b.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,c.left+c.width/2,c.width);var g=this._getDragVerticalDirection(),e=this._getDragHorizontalDirection();return this.floating&&e?e=="right"&&c||e=="left"&&!c:g&&(g=="down"&&f||g=="up"&&!f)},_getDragVerticalDirection:function(){var c=this.positionAbs.top-this.lastPositionAbs.top;return c!=0&&(c>0?"down":"up")},
135 _getDragHorizontalDirection:function(){var c=this.positionAbs.left-this.lastPositionAbs.left;return c!=0&&(c>0?"right":"left")},refresh:function(c){this._refreshItems(c);this.refreshPositions();return this},_connectWith:function(){var c=this.options;return c.connectWith.constructor==String?[c.connectWith]:c.connectWith},_getItemsAsjQuery:function(c){var f=[],g=[],e=this._connectWith();if(e&&c)for(c=e.length-1;c>=0;c--)for(var a=b(e[c]),d=a.length-1;d>=0;d--){var h=b.data(a[d],"sortable");if(h&&h!=
136 this&&!h.options.disabled)g.push([b.isFunction(h.options.items)?h.options.items.call(h.element):b(h.options.items,h.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),h])}g.push([b.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):b(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]);for(c=g.length-1;c>=0;c--)g[c][0].each(function(){f.push(this)});return b(f)},_removeCurrentsFromItems:function(){for(var c=
137 this.currentItem.find(":data(sortable-item)"),f=0;f<this.items.length;f++)for(var g=0;g<c.length;g++)c[g]==this.items[f].item[0]&&this.items.splice(f,1)},_refreshItems:function(c){this.items=[];this.containers=[this];var f=this.items,g=[[b.isFunction(this.options.items)?this.options.items.call(this.element[0],c,{item:this.currentItem}):b(this.options.items,this.element),this]],e=this._connectWith();if(e)for(var a=e.length-1;a>=0;a--)for(var d=b(e[a]),h=d.length-1;h>=0;h--){var i=b.data(d[h],"sortable");
138 if(i&&i!=this&&!i.options.disabled){g.push([b.isFunction(i.options.items)?i.options.items.call(i.element[0],c,{item:this.currentItem}):b(i.options.items,i.element),i]);this.containers.push(i)}}for(a=g.length-1;a>=0;a--){c=g[a][1];e=g[a][0];h=0;for(d=e.length;h<d;h++){i=b(e[h]);i.data("sortable-item",c);f.push({item:i,instance:c,width:0,height:0,left:0,top:0})}}},refreshPositions:function(c){if(this.offsetParent&&this.helper)this.offset.parent=this._getParentOffset();for(var f=this.items.length-1;f>=
139 0;f--){var g=this.items[f],e=this.options.toleranceElement?b(this.options.toleranceElement,g.item):g.item;if(!c){g.width=e.outerWidth();g.height=e.outerHeight()}e=e.offset();g.left=e.left;g.top=e.top}if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(f=this.containers.length-1;f>=0;f--){e=this.containers[f].element.offset();this.containers[f].containerCache.left=e.left;this.containers[f].containerCache.top=e.top;this.containers[f].containerCache.width=
140 this.containers[f].element.outerWidth();this.containers[f].containerCache.height=this.containers[f].element.outerHeight()}return this},_createPlaceholder:function(c){var f=c||this,g=f.options;if(!g.placeholder||g.placeholder.constructor==String){var e=g.placeholder;g.placeholder={element:function(){var a=b(document.createElement(f.currentItem[0].nodeName)).addClass(e||f.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];if(!e)a.style.visibility="hidden";return a},
141 update:function(a,d){if(!(e&&!g.forcePlaceholderSize)){d.height()||d.height(f.currentItem.innerHeight()-parseInt(f.currentItem.css("paddingTop")||0,10)-parseInt(f.currentItem.css("paddingBottom")||0,10));d.width()||d.width(f.currentItem.innerWidth()-parseInt(f.currentItem.css("paddingLeft")||0,10)-parseInt(f.currentItem.css("paddingRight")||0,10))}}}}f.placeholder=b(g.placeholder.element.call(f.element,f.currentItem));f.currentItem.after(f.placeholder);g.placeholder.update(f,f.placeholder)},_contactContainers:function(c){for(var f=
142 null,g=null,e=this.containers.length-1;e>=0;e--)if(!b.ui.contains(this.currentItem[0],this.containers[e].element[0]))if(this._intersectsWith(this.containers[e].containerCache)){if(!(f&&b.ui.contains(this.containers[e].element[0],f.element[0]))){f=this.containers[e];g=e}}else if(this.containers[e].containerCache.over){this.containers[e]._trigger("out",c,this._uiHash(this));this.containers[e].containerCache.over=0}if(f)if(this.containers.length===1){this.containers[g]._trigger("over",c,this._uiHash(this));
143 this.containers[g].containerCache.over=1}else if(this.currentContainer!=this.containers[g]){f=1E4;e=null;for(var a=this.positionAbs[this.containers[g].floating?"left":"top"],d=this.items.length-1;d>=0;d--)if(b.ui.contains(this.containers[g].element[0],this.items[d].item[0])){var h=this.items[d][this.containers[g].floating?"left":"top"];if(Math.abs(h-a)<f){f=Math.abs(h-a);e=this.items[d]}}if(e||this.options.dropOnEmpty){this.currentContainer=this.containers[g];e?this._rearrange(c,e,null,true):this._rearrange(c,
144 null,this.containers[g].element,true);this._trigger("change",c,this._uiHash());this.containers[g]._trigger("change",c,this._uiHash(this));this.options.placeholder.update(this.currentContainer,this.placeholder);this.containers[g]._trigger("over",c,this._uiHash(this));this.containers[g].containerCache.over=1}}},_createHelper:function(c){var f=this.options;c=b.isFunction(f.helper)?b(f.helper.apply(this.element[0],[c,this.currentItem])):f.helper=="clone"?this.currentItem.clone():this.currentItem;c.parents("body").length||
145 b(f.appendTo!="parent"?f.appendTo:this.currentItem[0].parentNode)[0].appendChild(c[0]);if(c[0]==this.currentItem[0])this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")};if(c[0].style.width==""||f.forceHelperSize)c.width(this.currentItem.width());if(c[0].style.height==""||f.forceHelperSize)c.height(this.currentItem.height());return c},_adjustOffsetFromHelper:function(c){if(typeof c==
146 "string")c=c.split(" ");if(b.isArray(c))c={left:+c[0],top:+c[1]||0};if("left"in c)this.offset.click.left=c.left+this.margins.left;if("right"in c)this.offset.click.left=this.helperProportions.width-c.right+this.margins.left;if("top"in c)this.offset.click.top=c.top+this.margins.top;if("bottom"in c)this.offset.click.top=this.helperProportions.height-c.bottom+this.margins.top},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var c=this.offsetParent.offset();if(this.cssPosition==
147 "absolute"&&this.scrollParent[0]!=document&&b.ui.contains(this.scrollParent[0],this.offsetParent[0])){c.left+=this.scrollParent.scrollLeft();c.top+=this.scrollParent.scrollTop()}if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&b.browser.msie)c={top:0,left:0};return{top:c.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:c.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition==
148 "relative"){var c=this.currentItem.position();return{top:c.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:c.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},
149 _setContainment:function(){var c=this.options;if(c.containment=="parent")c.containment=this.helper[0].parentNode;if(c.containment=="document"||c.containment=="window")this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,b(c.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(b(c.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-
150 this.margins.top];if(!/^(document|window|parent)$/.test(c.containment)){var f=b(c.containment)[0];c=b(c.containment).offset();var g=b(f).css("overflow")!="hidden";this.containment=[c.left+(parseInt(b(f).css("borderLeftWidth"),10)||0)+(parseInt(b(f).css("paddingLeft"),10)||0)-this.margins.left,c.top+(parseInt(b(f).css("borderTopWidth"),10)||0)+(parseInt(b(f).css("paddingTop"),10)||0)-this.margins.top,c.left+(g?Math.max(f.scrollWidth,f.offsetWidth):f.offsetWidth)-(parseInt(b(f).css("borderLeftWidth"),
151 10)||0)-(parseInt(b(f).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,c.top+(g?Math.max(f.scrollHeight,f.offsetHeight):f.offsetHeight)-(parseInt(b(f).css("borderTopWidth"),10)||0)-(parseInt(b(f).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}},_convertPositionTo:function(c,f){if(!f)f=this.position;c=c=="absolute"?1:-1;var g=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&b.ui.contains(this.scrollParent[0],this.offsetParent[0]))?
152 this.offsetParent:this.scrollParent,e=/(html|body)/i.test(g[0].tagName);return{top:f.top+this.offset.relative.top*c+this.offset.parent.top*c-(b.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():e?0:g.scrollTop())*c),left:f.left+this.offset.relative.left*c+this.offset.parent.left*c-(b.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():e?0:g.scrollLeft())*c)}},_generatePosition:function(c){var f=
153 this.options,g=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&b.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,e=/(html|body)/i.test(g[0].tagName);if(this.cssPosition=="relative"&&!(this.scrollParent[0]!=document&&this.scrollParent[0]!=this.offsetParent[0]))this.offset.relative=this._getRelativeOffset();var a=c.pageX,d=c.pageY;if(this.originalPosition){if(this.containment){if(c.pageX-this.offset.click.left<this.containment[0])a=this.containment[0]+
154 this.offset.click.left;if(c.pageY-this.offset.click.top<this.containment[1])d=this.containment[1]+this.offset.click.top;if(c.pageX-this.offset.click.left>this.containment[2])a=this.containment[2]+this.offset.click.left;if(c.pageY-this.offset.click.top>this.containment[3])d=this.containment[3]+this.offset.click.top}if(f.grid){d=this.originalPageY+Math.round((d-this.originalPageY)/f.grid[1])*f.grid[1];d=this.containment?!(d-this.offset.click.top<this.containment[1]||d-this.offset.click.top>this.containment[3])?
155 d:!(d-this.offset.click.top<this.containment[1])?d-f.grid[1]:d+f.grid[1]:d;a=this.originalPageX+Math.round((a-this.originalPageX)/f.grid[0])*f.grid[0];a=this.containment?!(a-this.offset.click.left<this.containment[0]||a-this.offset.click.left>this.containment[2])?a:!(a-this.offset.click.left<this.containment[0])?a-f.grid[0]:a+f.grid[0]:a}}return{top:d-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(b.browser.safari&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollTop():
156 e?0:g.scrollTop()),left:a-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(b.browser.safari&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():e?0:g.scrollLeft())}},_rearrange:function(c,f,g,e){g?g[0].appendChild(this.placeholder[0]):f.item[0].parentNode.insertBefore(this.placeholder[0],this.direction=="down"?f.item[0]:f.item[0].nextSibling);this.counter=this.counter?++this.counter:1;var a=this,d=this.counter;window.setTimeout(function(){d==
157 a.counter&&a.refreshPositions(!e)},0)},_clear:function(c,f){this.reverting=false;var g=[];!this._noFinalSort&&this.currentItem[0].parentNode&&this.placeholder.before(this.currentItem);this._noFinalSort=null;if(this.helper[0]==this.currentItem[0]){for(var e in this._storedCSS)if(this._storedCSS[e]=="auto"||this._storedCSS[e]=="static")this._storedCSS[e]="";this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();this.fromOutside&&!f&&g.push(function(a){this._trigger("receive",
158 a,this._uiHash(this.fromOutside))});if((this.fromOutside||this.domPosition.prev!=this.currentItem.prev().not(".ui-sortable-helper")[0]||this.domPosition.parent!=this.currentItem.parent()[0])&&!f)g.push(function(a){this._trigger("update",a,this._uiHash())});if(!b.ui.contains(this.element[0],this.currentItem[0])){f||g.push(function(a){this._trigger("remove",a,this._uiHash())});for(e=this.containers.length-1;e>=0;e--)if(b.ui.contains(this.containers[e].element[0],this.currentItem[0])&&!f){g.push(function(a){return function(d){a._trigger("receive",
159 d,this._uiHash(this))}}.call(this,this.containers[e]));g.push(function(a){return function(d){a._trigger("update",d,this._uiHash(this))}}.call(this,this.containers[e]))}}for(e=this.containers.length-1;e>=0;e--){f||g.push(function(a){return function(d){a._trigger("deactivate",d,this._uiHash(this))}}.call(this,this.containers[e]));if(this.containers[e].containerCache.over){g.push(function(a){return function(d){a._trigger("out",d,this._uiHash(this))}}.call(this,this.containers[e]));this.containers[e].containerCache.over=
160 0}}this._storedCursor&&b("body").css("cursor",this._storedCursor);this._storedOpacity&&this.helper.css("opacity",this._storedOpacity);if(this._storedZIndex)this.helper.css("zIndex",this._storedZIndex=="auto"?"":this._storedZIndex);this.dragging=false;if(this.cancelHelperRemoval){if(!f){this._trigger("beforeStop",c,this._uiHash());for(e=0;e<g.length;e++)g[e].call(this,c);this._trigger("stop",c,this._uiHash())}return false}f||this._trigger("beforeStop",c,this._uiHash());this.placeholder[0].parentNode.removeChild(this.placeholder[0]);
161 this.helper[0]!=this.currentItem[0]&&this.helper.remove();this.helper=null;if(!f){for(e=0;e<g.length;e++)g[e].call(this,c);this._trigger("stop",c,this._uiHash())}this.fromOutside=false;return true},_trigger:function(){b.Widget.prototype._trigger.apply(this,arguments)===false&&this.cancel()},_uiHash:function(c){var f=c||this;return{helper:f.helper,placeholder:f.placeholder||b([]),position:f.position,originalPosition:f.originalPosition,offset:f.positionAbs,item:f.currentItem,sender:c?c.element:null}}});
162 b.extend(b.ui.sortable,{version:"1.8.8"})})(jQuery);
163 jQuery.effects||function(b,c){function f(l){var k;if(l&&l.constructor==Array&&l.length==3)return l;if(k=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(l))return[parseInt(k[1],10),parseInt(k[2],10),parseInt(k[3],10)];if(k=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(l))return[parseFloat(k[1])*2.55,parseFloat(k[2])*2.55,parseFloat(k[3])*2.55];if(k=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(l))return[parseInt(k[1],16),
164 parseInt(k[2],16),parseInt(k[3],16)];if(k=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(l))return[parseInt(k[1]+k[1],16),parseInt(k[2]+k[2],16),parseInt(k[3]+k[3],16)];if(/rgba\(0, 0, 0, 0\)/.exec(l))return j.transparent;return j[b.trim(l).toLowerCase()]}function g(l,k){var m;do{m=b.curCSS(l,k);if(m!=""&&m!="transparent"||b.nodeName(l,"body"))break;k="backgroundColor"}while(l=l.parentNode);return f(m)}function e(){var l=document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle,
165 k={},m,o;if(l&&l.length&&l[0]&&l[l[0]])for(var p=l.length;p--;){m=l[p];if(typeof l[m]=="string"){o=m.replace(/\-(\w)/g,function(s,r){return r.toUpperCase()});k[o]=l[m]}}else for(m in l)if(typeof l[m]==="string")k[m]=l[m];return k}function a(l){var k,m;for(k in l){m=l[k];if(m==null||b.isFunction(m)||k in q||/scrollbar/.test(k)||!/color/i.test(k)&&isNaN(parseFloat(m)))delete l[k]}return l}function d(l,k){var m={_:0},o;for(o in k)if(l[o]!=k[o])m[o]=k[o];return m}function h(l,k,m,o){if(typeof l=="object"){o=
166 k;m=null;k=l;l=k.effect}if(b.isFunction(k)){o=k;m=null;k={}}if(typeof k=="number"||b.fx.speeds[k]){o=m;m=k;k={}}if(b.isFunction(m)){o=m;m=null}k=k||{};m=m||k.duration;m=b.fx.off?0:typeof m=="number"?m:m in b.fx.speeds?b.fx.speeds[m]:b.fx.speeds._default;o=o||k.complete;return[l,k,m,o]}function i(l){if(!l||typeof l==="number"||b.fx.speeds[l])return true;if(typeof l==="string"&&!b.effects[l])return true;return false}b.effects={};b.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor",
167 "borderTopColor","borderColor","color","outlineColor"],function(l,k){b.fx.step[k]=function(m){if(!m.colorInit){m.start=g(m.elem,k);m.end=f(m.end);m.colorInit=true}m.elem.style[k]="rgb("+Math.max(Math.min(parseInt(m.pos*(m.end[0]-m.start[0])+m.start[0],10),255),0)+","+Math.max(Math.min(parseInt(m.pos*(m.end[1]-m.start[1])+m.start[1],10),255),0)+","+Math.max(Math.min(parseInt(m.pos*(m.end[2]-m.start[2])+m.start[2],10),255),0)+")"}});var j={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,
168 0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,
169 211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]},n=["add","remove","toggle"],q={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};b.effects.animateClass=function(l,k,m,
170 o){if(b.isFunction(m)){o=m;m=null}return this.queue("fx",function(){var p=b(this),s=p.attr("style")||" ",r=a(e.call(this)),u,v=p.attr("className");b.each(n,function(w,y){l[y]&&p[y+"Class"](l[y])});u=a(e.call(this));p.attr("className",v);p.animate(d(r,u),k,m,function(){b.each(n,function(w,y){l[y]&&p[y+"Class"](l[y])});if(typeof p.attr("style")=="object"){p.attr("style").cssText="";p.attr("style").cssText=s}else p.attr("style",s);o&&o.apply(this,arguments)});r=b.queue(this);u=r.splice(r.length-1,1)[0];
171 r.splice(1,0,u);b.dequeue(this)})};b.fn.extend({_addClass:b.fn.addClass,addClass:function(l,k,m,o){return k?b.effects.animateClass.apply(this,[{add:l},k,m,o]):this._addClass(l)},_removeClass:b.fn.removeClass,removeClass:function(l,k,m,o){return k?b.effects.animateClass.apply(this,[{remove:l},k,m,o]):this._removeClass(l)},_toggleClass:b.fn.toggleClass,toggleClass:function(l,k,m,o,p){return typeof k=="boolean"||k===c?m?b.effects.animateClass.apply(this,[k?{add:l}:{remove:l},m,o,p]):this._toggleClass(l,
172 k):b.effects.animateClass.apply(this,[{toggle:l},k,m,o])},switchClass:function(l,k,m,o,p){return b.effects.animateClass.apply(this,[{add:k,remove:l},m,o,p])}});b.extend(b.effects,{version:"1.8.8",save:function(l,k){for(var m=0;m<k.length;m++)k[m]!==null&&l.data("ec.storage."+k[m],l[0].style[k[m]])},restore:function(l,k){for(var m=0;m<k.length;m++)k[m]!==null&&l.css(k[m],l.data("ec.storage."+k[m]))},setMode:function(l,k){if(k=="toggle")k=l.is(":hidden")?"show":"hide";return k},getBaseline:function(l,
173 k){var m;switch(l[0]){case "top":m=0;break;case "middle":m=0.5;break;case "bottom":m=1;break;default:m=l[0]/k.height}switch(l[1]){case "left":l=0;break;case "center":l=0.5;break;case "right":l=1;break;default:l=l[1]/k.width}return{x:l,y:m}},createWrapper:function(l){if(l.parent().is(".ui-effects-wrapper"))return l.parent();var k={width:l.outerWidth(true),height:l.outerHeight(true),"float":l.css("float")},m=b("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",
174 border:"none",margin:0,padding:0});l.wrap(m);m=l.parent();if(l.css("position")=="static"){m.css({position:"relative"});l.css({position:"relative"})}else{b.extend(k,{position:l.css("position"),zIndex:l.css("z-index")});b.each(["top","left","bottom","right"],function(o,p){k[p]=l.css(p);if(isNaN(parseInt(k[p],10)))k[p]="auto"});l.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})}return m.css(k).show()},removeWrapper:function(l){if(l.parent().is(".ui-effects-wrapper"))return l.parent().replaceWith(l);
175 return l},setTransition:function(l,k,m,o){o=o||{};b.each(k,function(p,s){unit=l.cssUnit(s);if(unit[0]>0)o[s]=unit[0]*m+unit[1]});return o}});b.fn.extend({effect:function(l){var k=h.apply(this,arguments),m={options:k[1],duration:k[2],callback:k[3]};k=m.options.mode;var o=b.effects[l];if(b.fx.off||!o)return k?this[k](m.duration,m.callback):this.each(function(){m.callback&&m.callback.call(this)});return o.call(this,m)},_show:b.fn.show,show:function(l){if(i(l))return this._show.apply(this,arguments);
176 else{var k=h.apply(this,arguments);k[1].mode="show";return this.effect.apply(this,k)}},_hide:b.fn.hide,hide:function(l){if(i(l))return this._hide.apply(this,arguments);else{var k=h.apply(this,arguments);k[1].mode="hide";return this.effect.apply(this,k)}},__toggle:b.fn.toggle,toggle:function(l){if(i(l)||typeof l==="boolean"||b.isFunction(l))return this.__toggle.apply(this,arguments);else{var k=h.apply(this,arguments);k[1].mode="toggle";return this.effect.apply(this,k)}},cssUnit:function(l){var k=this.css(l),
177 m=[];b.each(["em","px","%","pt"],function(o,p){if(k.indexOf(p)>0)m=[parseFloat(k),p]});return m}});b.easing.jswing=b.easing.swing;b.extend(b.easing,{def:"easeOutQuad",swing:function(l,k,m,o,p){return b.easing[b.easing.def](l,k,m,o,p)},easeInQuad:function(l,k,m,o,p){return o*(k/=p)*k+m},easeOutQuad:function(l,k,m,o,p){return-o*(k/=p)*(k-2)+m},easeInOutQuad:function(l,k,m,o,p){if((k/=p/2)<1)return o/2*k*k+m;return-o/2*(--k*(k-2)-1)+m},easeInCubic:function(l,k,m,o,p){return o*(k/=p)*k*k+m},easeOutCubic:function(l,
178 k,m,o,p){return o*((k=k/p-1)*k*k+1)+m},easeInOutCubic:function(l,k,m,o,p){if((k/=p/2)<1)return o/2*k*k*k+m;return o/2*((k-=2)*k*k+2)+m},easeInQuart:function(l,k,m,o,p){return o*(k/=p)*k*k*k+m},easeOutQuart:function(l,k,m,o,p){return-o*((k=k/p-1)*k*k*k-1)+m},easeInOutQuart:function(l,k,m,o,p){if((k/=p/2)<1)return o/2*k*k*k*k+m;return-o/2*((k-=2)*k*k*k-2)+m},easeInQuint:function(l,k,m,o,p){return o*(k/=p)*k*k*k*k+m},easeOutQuint:function(l,k,m,o,p){return o*((k=k/p-1)*k*k*k*k+1)+m},easeInOutQuint:function(l,
179 k,m,o,p){if((k/=p/2)<1)return o/2*k*k*k*k*k+m;return o/2*((k-=2)*k*k*k*k+2)+m},easeInSine:function(l,k,m,o,p){return-o*Math.cos(k/p*(Math.PI/2))+o+m},easeOutSine:function(l,k,m,o,p){return o*Math.sin(k/p*(Math.PI/2))+m},easeInOutSine:function(l,k,m,o,p){return-o/2*(Math.cos(Math.PI*k/p)-1)+m},easeInExpo:function(l,k,m,o,p){return k==0?m:o*Math.pow(2,10*(k/p-1))+m},easeOutExpo:function(l,k,m,o,p){return k==p?m+o:o*(-Math.pow(2,-10*k/p)+1)+m},easeInOutExpo:function(l,k,m,o,p){if(k==0)return m;if(k==
180 p)return m+o;if((k/=p/2)<1)return o/2*Math.pow(2,10*(k-1))+m;return o/2*(-Math.pow(2,-10*--k)+2)+m},easeInCirc:function(l,k,m,o,p){return-o*(Math.sqrt(1-(k/=p)*k)-1)+m},easeOutCirc:function(l,k,m,o,p){return o*Math.sqrt(1-(k=k/p-1)*k)+m},easeInOutCirc:function(l,k,m,o,p){if((k/=p/2)<1)return-o/2*(Math.sqrt(1-k*k)-1)+m;return o/2*(Math.sqrt(1-(k-=2)*k)+1)+m},easeInElastic:function(l,k,m,o,p){l=1.70158;var s=0,r=o;if(k==0)return m;if((k/=p)==1)return m+o;s||(s=p*0.3);if(r<Math.abs(o)){r=o;l=s/4}else l=
181 s/(2*Math.PI)*Math.asin(o/r);return-(r*Math.pow(2,10*(k-=1))*Math.sin((k*p-l)*2*Math.PI/s))+m},easeOutElastic:function(l,k,m,o,p){l=1.70158;var s=0,r=o;if(k==0)return m;if((k/=p)==1)return m+o;s||(s=p*0.3);if(r<Math.abs(o)){r=o;l=s/4}else l=s/(2*Math.PI)*Math.asin(o/r);return r*Math.pow(2,-10*k)*Math.sin((k*p-l)*2*Math.PI/s)+o+m},easeInOutElastic:function(l,k,m,o,p){l=1.70158;var s=0,r=o;if(k==0)return m;if((k/=p/2)==2)return m+o;s||(s=p*0.3*1.5);if(r<Math.abs(o)){r=o;l=s/4}else l=s/(2*Math.PI)*Math.asin(o/
182 r);if(k<1)return-0.5*r*Math.pow(2,10*(k-=1))*Math.sin((k*p-l)*2*Math.PI/s)+m;return r*Math.pow(2,-10*(k-=1))*Math.sin((k*p-l)*2*Math.PI/s)*0.5+o+m},easeInBack:function(l,k,m,o,p,s){if(s==c)s=1.70158;return o*(k/=p)*k*((s+1)*k-s)+m},easeOutBack:function(l,k,m,o,p,s){if(s==c)s=1.70158;return o*((k=k/p-1)*k*((s+1)*k+s)+1)+m},easeInOutBack:function(l,k,m,o,p,s){if(s==c)s=1.70158;if((k/=p/2)<1)return o/2*k*k*(((s*=1.525)+1)*k-s)+m;return o/2*((k-=2)*k*(((s*=1.525)+1)*k+s)+2)+m},easeInBounce:function(l,
183 k,m,o,p){return o-b.easing.easeOutBounce(l,p-k,0,o,p)+m},easeOutBounce:function(l,k,m,o,p){return(k/=p)<1/2.75?o*7.5625*k*k+m:k<2/2.75?o*(7.5625*(k-=1.5/2.75)*k+0.75)+m:k<2.5/2.75?o*(7.5625*(k-=2.25/2.75)*k+0.9375)+m:o*(7.5625*(k-=2.625/2.75)*k+0.984375)+m},easeInOutBounce:function(l,k,m,o,p){if(k<p/2)return b.easing.easeInBounce(l,k*2,0,o,p)*0.5+m;return b.easing.easeOutBounce(l,k*2-p,0,o,p)*0.5+o*0.5+m}})}(jQuery);
184 (function(b){b.effects.blind=function(c){return this.queue(function(){var f=b(this),g=["position","top","bottom","left","right"],e=b.effects.setMode(f,c.options.mode||"hide"),a=c.options.direction||"vertical";b.effects.save(f,g);f.show();var d=b.effects.createWrapper(f).css({overflow:"hidden"}),h=a=="vertical"?"height":"width";a=a=="vertical"?d.height():d.width();e=="show"&&d.css(h,0);var i={};i[h]=e=="show"?a:0;d.animate(i,c.duration,c.options.easing,function(){e=="hide"&&f.hide();b.effects.restore(f,
185 g);b.effects.removeWrapper(f);c.callback&&c.callback.apply(f[0],arguments);f.dequeue()})})}})(jQuery);
186 (function(b){b.effects.bounce=function(c){return this.queue(function(){var f=b(this),g=["position","top","bottom","left","right"],e=b.effects.setMode(f,c.options.mode||"effect"),a=c.options.direction||"up",d=c.options.distance||20,h=c.options.times||5,i=c.duration||250;/show|hide/.test(e)&&g.push("opacity");b.effects.save(f,g);f.show();b.effects.createWrapper(f);var j=a=="up"||a=="down"?"top":"left";a=a=="up"||a=="left"?"pos":"neg";d=c.options.distance||(j=="top"?f.outerHeight({margin:true})/3:f.outerWidth({margin:true})/
187 3);if(e=="show")f.css("opacity",0).css(j,a=="pos"?-d:d);if(e=="hide")d/=h*2;e!="hide"&&h--;if(e=="show"){var n={opacity:1};n[j]=(a=="pos"?"+=":"-=")+d;f.animate(n,i/2,c.options.easing);d/=2;h--}for(n=0;n<h;n++){var q={},l={};q[j]=(a=="pos"?"-=":"+=")+d;l[j]=(a=="pos"?"+=":"-=")+d;f.animate(q,i/2,c.options.easing).animate(l,i/2,c.options.easing);d=e=="hide"?d*2:d/2}if(e=="hide"){n={opacity:0};n[j]=(a=="pos"?"-=":"+=")+d;f.animate(n,i/2,c.options.easing,function(){f.hide();b.effects.restore(f,g);b.effects.removeWrapper(f);
188 c.callback&&c.callback.apply(this,arguments)})}else{q={};l={};q[j]=(a=="pos"?"-=":"+=")+d;l[j]=(a=="pos"?"+=":"-=")+d;f.animate(q,i/2,c.options.easing).animate(l,i/2,c.options.easing,function(){b.effects.restore(f,g);b.effects.removeWrapper(f);c.callback&&c.callback.apply(this,arguments)})}f.queue("fx",function(){f.dequeue()});f.dequeue()})}})(jQuery);
189 (function(b){b.effects.clip=function(c){return this.queue(function(){var f=b(this),g=["position","top","bottom","left","right","height","width"],e=b.effects.setMode(f,c.options.mode||"hide"),a=c.options.direction||"vertical";b.effects.save(f,g);f.show();var d=b.effects.createWrapper(f).css({overflow:"hidden"});d=f[0].tagName=="IMG"?d:f;var h={size:a=="vertical"?"height":"width",position:a=="vertical"?"top":"left"};a=a=="vertical"?d.height():d.width();if(e=="show"){d.css(h.size,0);d.css(h.position,
190 a/2)}var i={};i[h.size]=e=="show"?a:0;i[h.position]=e=="show"?0:a/2;d.animate(i,{queue:false,duration:c.duration,easing:c.options.easing,complete:function(){e=="hide"&&f.hide();b.effects.restore(f,g);b.effects.removeWrapper(f);c.callback&&c.callback.apply(f[0],arguments);f.dequeue()}})})}})(jQuery);
191 (function(b){b.effects.drop=function(c){return this.queue(function(){var f=b(this),g=["position","top","bottom","left","right","opacity"],e=b.effects.setMode(f,c.options.mode||"hide"),a=c.options.direction||"left";b.effects.save(f,g);f.show();b.effects.createWrapper(f);var d=a=="up"||a=="down"?"top":"left";a=a=="up"||a=="left"?"pos":"neg";var h=c.options.distance||(d=="top"?f.outerHeight({margin:true})/2:f.outerWidth({margin:true})/2);if(e=="show")f.css("opacity",0).css(d,a=="pos"?-h:h);var i={opacity:e==
192 "show"?1:0};i[d]=(e=="show"?a=="pos"?"+=":"-=":a=="pos"?"-=":"+=")+h;f.animate(i,{queue:false,duration:c.duration,easing:c.options.easing,complete:function(){e=="hide"&&f.hide();b.effects.restore(f,g);b.effects.removeWrapper(f);c.callback&&c.callback.apply(this,arguments);f.dequeue()}})})}})(jQuery);
193 (function(b){b.effects.explode=function(c){return this.queue(function(){var f=c.options.pieces?Math.round(Math.sqrt(c.options.pieces)):3,g=c.options.pieces?Math.round(Math.sqrt(c.options.pieces)):3;c.options.mode=c.options.mode=="toggle"?b(this).is(":visible")?"hide":"show":c.options.mode;var e=b(this).show().css("visibility","hidden"),a=e.offset();a.top-=parseInt(e.css("marginTop"),10)||0;a.left-=parseInt(e.css("marginLeft"),10)||0;for(var d=e.outerWidth(true),h=e.outerHeight(true),i=0;i<f;i++)for(var j=
194 0;j<g;j++)e.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-j*(d/g),top:-i*(h/f)}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:d/g,height:h/f,left:a.left+j*(d/g)+(c.options.mode=="show"?(j-Math.floor(g/2))*(d/g):0),top:a.top+i*(h/f)+(c.options.mode=="show"?(i-Math.floor(f/2))*(h/f):0),opacity:c.options.mode=="show"?0:1}).animate({left:a.left+j*(d/g)+(c.options.mode=="show"?0:(j-Math.floor(g/2))*(d/g)),top:a.top+
195 i*(h/f)+(c.options.mode=="show"?0:(i-Math.floor(f/2))*(h/f)),opacity:c.options.mode=="show"?1:0},c.duration||500);setTimeout(function(){c.options.mode=="show"?e.css({visibility:"visible"}):e.css({visibility:"visible"}).hide();c.callback&&c.callback.apply(e[0]);e.dequeue();b("div.ui-effects-explode").remove()},c.duration||500)})}})(jQuery);
196 (function(b){b.effects.fade=function(c){return this.queue(function(){var f=b(this),g=b.effects.setMode(f,c.options.mode||"hide");f.animate({opacity:g},{queue:false,duration:c.duration,easing:c.options.easing,complete:function(){c.callback&&c.callback.apply(this,arguments);f.dequeue()}})})}})(jQuery);
197 (function(b){b.effects.fold=function(c){return this.queue(function(){var f=b(this),g=["position","top","bottom","left","right"],e=b.effects.setMode(f,c.options.mode||"hide"),a=c.options.size||15,d=!!c.options.horizFirst,h=c.duration?c.duration/2:b.fx.speeds._default/2;b.effects.save(f,g);f.show();var i=b.effects.createWrapper(f).css({overflow:"hidden"}),j=e=="show"!=d,n=j?["width","height"]:["height","width"];j=j?[i.width(),i.height()]:[i.height(),i.width()];var q=/([0-9]+)%/.exec(a);if(q)a=parseInt(q[1],
198 10)/100*j[e=="hide"?0:1];if(e=="show")i.css(d?{height:0,width:a}:{height:a,width:0});d={};q={};d[n[0]]=e=="show"?j[0]:a;q[n[1]]=e=="show"?j[1]:0;i.animate(d,h,c.options.easing).animate(q,h,c.options.easing,function(){e=="hide"&&f.hide();b.effects.restore(f,g);b.effects.removeWrapper(f);c.callback&&c.callback.apply(f[0],arguments);f.dequeue()})})}})(jQuery);
199 (function(b){b.effects.highlight=function(c){return this.queue(function(){var f=b(this),g=["backgroundImage","backgroundColor","opacity"],e=b.effects.setMode(f,c.options.mode||"show"),a={backgroundColor:f.css("backgroundColor")};if(e=="hide")a.opacity=0;b.effects.save(f,g);f.show().css({backgroundImage:"none",backgroundColor:c.options.color||"#ffff99"}).animate(a,{queue:false,duration:c.duration,easing:c.options.easing,complete:function(){e=="hide"&&f.hide();b.effects.restore(f,g);e=="show"&&!b.support.opacity&&
200 this.style.removeAttribute("filter");c.callback&&c.callback.apply(this,arguments);f.dequeue()}})})}})(jQuery);
201 (function(b){b.effects.pulsate=function(c){return this.queue(function(){var f=b(this),g=b.effects.setMode(f,c.options.mode||"show");times=(c.options.times||5)*2-1;duration=c.duration?c.duration/2:b.fx.speeds._default/2;isVisible=f.is(":visible");animateTo=0;if(!isVisible){f.css("opacity",0).show();animateTo=1}if(g=="hide"&&isVisible||g=="show"&&!isVisible)times--;for(g=0;g<times;g++){f.animate({opacity:animateTo},duration,c.options.easing);animateTo=(animateTo+1)%2}f.animate({opacity:animateTo},duration,
202 c.options.easing,function(){animateTo==0&&f.hide();c.callback&&c.callback.apply(this,arguments)});f.queue("fx",function(){f.dequeue()}).dequeue()})}})(jQuery);
203 (function(b){b.effects.puff=function(c){return this.queue(function(){var f=b(this),g=b.effects.setMode(f,c.options.mode||"hide"),e=parseInt(c.options.percent,10)||150,a=e/100,d={height:f.height(),width:f.width()};b.extend(c.options,{fade:true,mode:g,percent:g=="hide"?e:100,from:g=="hide"?d:{height:d.height*a,width:d.width*a}});f.effect("scale",c.options,c.duration,c.callback);f.dequeue()})};b.effects.scale=function(c){return this.queue(function(){var f=b(this),g=b.extend(true,{},c.options),e=b.effects.setMode(f,
204 c.options.mode||"effect"),a=parseInt(c.options.percent,10)||(parseInt(c.options.percent,10)==0?0:e=="hide"?0:100),d=c.options.direction||"both",h=c.options.origin;if(e!="effect"){g.origin=h||["middle","center"];g.restore=true}h={height:f.height(),width:f.width()};f.from=c.options.from||(e=="show"?{height:0,width:0}:h);a={y:d!="horizontal"?a/100:1,x:d!="vertical"?a/100:1};f.to={height:h.height*a.y,width:h.width*a.x};if(c.options.fade){if(e=="show"){f.from.opacity=0;f.to.opacity=1}if(e=="hide"){f.from.opacity=
205 1;f.to.opacity=0}}g.from=f.from;g.to=f.to;g.mode=e;f.effect("size",g,c.duration,c.callback);f.dequeue()})};b.effects.size=function(c){return this.queue(function(){var f=b(this),g=["position","top","bottom","left","right","width","height","overflow","opacity"],e=["position","top","bottom","left","right","overflow","opacity"],a=["width","height","overflow"],d=["fontSize"],h=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],i=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],
206 j=b.effects.setMode(f,c.options.mode||"effect"),n=c.options.restore||false,q=c.options.scale||"both",l=c.options.origin,k={height:f.height(),width:f.width()};f.from=c.options.from||k;f.to=c.options.to||k;if(l){l=b.effects.getBaseline(l,k);f.from.top=(k.height-f.from.height)*l.y;f.from.left=(k.width-f.from.width)*l.x;f.to.top=(k.height-f.to.height)*l.y;f.to.left=(k.width-f.to.width)*l.x}var m={from:{y:f.from.height/k.height,x:f.from.width/k.width},to:{y:f.to.height/k.height,x:f.to.width/k.width}};
207 if(q=="box"||q=="both"){if(m.from.y!=m.to.y){g=g.concat(h);f.from=b.effects.setTransition(f,h,m.from.y,f.from);f.to=b.effects.setTransition(f,h,m.to.y,f.to)}if(m.from.x!=m.to.x){g=g.concat(i);f.from=b.effects.setTransition(f,i,m.from.x,f.from);f.to=b.effects.setTransition(f,i,m.to.x,f.to)}}if(q=="content"||q=="both")if(m.from.y!=m.to.y){g=g.concat(d);f.from=b.effects.setTransition(f,d,m.from.y,f.from);f.to=b.effects.setTransition(f,d,m.to.y,f.to)}b.effects.save(f,n?g:e);f.show();b.effects.createWrapper(f);
208 f.css("overflow","hidden").css(f.from);if(q=="content"||q=="both"){h=h.concat(["marginTop","marginBottom"]).concat(d);i=i.concat(["marginLeft","marginRight"]);a=g.concat(h).concat(i);f.find("*[width]").each(function(){child=b(this);n&&b.effects.save(child,a);var o={height:child.height(),width:child.width()};child.from={height:o.height*m.from.y,width:o.width*m.from.x};child.to={height:o.height*m.to.y,width:o.width*m.to.x};if(m.from.y!=m.to.y){child.from=b.effects.setTransition(child,h,m.from.y,child.from);
209 child.to=b.effects.setTransition(child,h,m.to.y,child.to)}if(m.from.x!=m.to.x){child.from=b.effects.setTransition(child,i,m.from.x,child.from);child.to=b.effects.setTransition(child,i,m.to.x,child.to)}child.css(child.from);child.animate(child.to,c.duration,c.options.easing,function(){n&&b.effects.restore(child,a)})})}f.animate(f.to,{queue:false,duration:c.duration,easing:c.options.easing,complete:function(){f.to.opacity===0&&f.css("opacity",f.from.opacity);j=="hide"&&f.hide();b.effects.restore(f,
210 n?g:e);b.effects.removeWrapper(f);c.callback&&c.callback.apply(this,arguments);f.dequeue()}})})}})(jQuery);
211 (function(b){b.effects.shake=function(c){return this.queue(function(){var f=b(this),g=["position","top","bottom","left","right"];b.effects.setMode(f,c.options.mode||"effect");var e=c.options.direction||"left",a=c.options.distance||20,d=c.options.times||3,h=c.duration||c.options.duration||140;b.effects.save(f,g);f.show();b.effects.createWrapper(f);var i=e=="up"||e=="down"?"top":"left",j=e=="up"||e=="left"?"pos":"neg";e={};var n={},q={};e[i]=(j=="pos"?"-=":"+=")+a;n[i]=(j=="pos"?"+=":"-=")+a*2;q[i]=
212 (j=="pos"?"-=":"+=")+a*2;f.animate(e,h,c.options.easing);for(a=1;a<d;a++)f.animate(n,h,c.options.easing).animate(q,h,c.options.easing);f.animate(n,h,c.options.easing).animate(e,h/2,c.options.easing,function(){b.effects.restore(f,g);b.effects.removeWrapper(f);c.callback&&c.callback.apply(this,arguments)});f.queue("fx",function(){f.dequeue()});f.dequeue()})}})(jQuery);
213 (function(b){b.effects.slide=function(c){return this.queue(function(){var f=b(this),g=["position","top","bottom","left","right"],e=b.effects.setMode(f,c.options.mode||"show"),a=c.options.direction||"left";b.effects.save(f,g);f.show();b.effects.createWrapper(f).css({overflow:"hidden"});var d=a=="up"||a=="down"?"top":"left";a=a=="up"||a=="left"?"pos":"neg";var h=c.options.distance||(d=="top"?f.outerHeight({margin:true}):f.outerWidth({margin:true}));if(e=="show")f.css(d,a=="pos"?isNaN(h)?"-"+h:-h:h);
214 var i={};i[d]=(e=="show"?a=="pos"?"+=":"-=":a=="pos"?"-=":"+=")+h;f.animate(i,{queue:false,duration:c.duration,easing:c.options.easing,complete:function(){e=="hide"&&f.hide();b.effects.restore(f,g);b.effects.removeWrapper(f);c.callback&&c.callback.apply(this,arguments);f.dequeue()}})})}})(jQuery);
215 (function(b){b.effects.transfer=function(c){return this.queue(function(){var f=b(this),g=b(c.options.to),e=g.offset();g={top:e.top,left:e.left,height:g.innerHeight(),width:g.innerWidth()};e=f.offset();var a=b('<div class="ui-effects-transfer"></div>').appendTo(document.body).addClass(c.options.className).css({top:e.top,left:e.left,height:f.innerHeight(),width:f.innerWidth(),position:"absolute"}).animate(g,c.duration,c.options.easing,function(){a.remove();c.callback&&c.callback.apply(f[0],arguments);
216 f.dequeue()})})}})(jQuery);
217 (function(b){b.widget("ui.accordion",{options:{active:0,animated:"slide",autoHeight:true,clearStyle:false,collapsible:false,event:"click",fillSpace:false,header:"> li > :first-child,> :not(li):even",icons:{header:"ui-icon-triangle-1-e",headerSelected:"ui-icon-triangle-1-s"},navigation:false,navigationFilter:function(){return this.href.toLowerCase()===location.href.toLowerCase()}},_create:function(){var c=this,f=c.options;c.running=0;c.element.addClass("ui-accordion ui-widget ui-helper-reset").children("li").addClass("ui-accordion-li-fix");c.headers=
218 c.element.find(f.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all").bind("mouseenter.accordion",function(){f.disabled||b(this).addClass("ui-state-hover")}).bind("mouseleave.accordion",function(){f.disabled||b(this).removeClass("ui-state-hover")}).bind("focus.accordion",function(){f.disabled||b(this).addClass("ui-state-focus")}).bind("blur.accordion",function(){f.disabled||b(this).removeClass("ui-state-focus")});c.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom");
219 if(f.navigation){var g=c.element.find("a").filter(f.navigationFilter).eq(0);if(g.length){var e=g.closest(".ui-accordion-header");c.active=e.length?e:g.closest(".ui-accordion-content").prev()}}c.active=c._findActive(c.active||f.active).addClass("ui-state-default ui-state-active").toggleClass("ui-corner-all").toggleClass("ui-corner-top");c.active.next().addClass("ui-accordion-content-active");c._createIcons();c.resize();c.element.attr("role","tablist");c.headers.attr("role","tab").bind("keydown.accordion",
220 function(a){return c._keydown(a)}).next().attr("role","tabpanel");c.headers.not(c.active||"").attr({"aria-expanded":"false",tabIndex:-1}).next().hide();c.active.length?c.active.attr({"aria-expanded":"true",tabIndex:0}):c.headers.eq(0).attr("tabIndex",0);b.browser.safari||c.headers.find("a").attr("tabIndex",-1);f.event&&c.headers.bind(f.event.split(" ").join(".accordion ")+".accordion",function(a){c._clickHandler.call(c,a,this);a.preventDefault()})},_createIcons:function(){var c=this.options;if(c.icons){b("<span></span>").addClass("ui-icon "+
221 c.icons.header).prependTo(this.headers);this.active.children(".ui-icon").toggleClass(c.icons.header).toggleClass(c.icons.headerSelected);this.element.addClass("ui-accordion-icons")}},_destroyIcons:function(){this.headers.children(".ui-icon").remove();this.element.removeClass("ui-accordion-icons")},destroy:function(){var c=this.options;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role");this.headers.unbind(".accordion").removeClass("ui-accordion-header ui-accordion-disabled ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("tabIndex");
222 this.headers.find("a").removeAttr("tabIndex");this._destroyIcons();var f=this.headers.next().css("display","").removeAttr("role").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-accordion-disabled ui-state-disabled");if(c.autoHeight||c.fillHeight)f.css("height","");return b.Widget.prototype.destroy.call(this)},_setOption:function(c,f){b.Widget.prototype._setOption.apply(this,arguments);c=="active"&&this.activate(f);if(c=="icons"){this._destroyIcons();
223 f&&this._createIcons()}if(c=="disabled")this.headers.add(this.headers.next())[f?"addClass":"removeClass"]("ui-accordion-disabled ui-state-disabled")},_keydown:function(c){if(!(this.options.disabled||c.altKey||c.ctrlKey)){var f=b.ui.keyCode,g=this.headers.length,e=this.headers.index(c.target),a=false;switch(c.keyCode){case f.RIGHT:case f.DOWN:a=this.headers[(e+1)%g];break;case f.LEFT:case f.UP:a=this.headers[(e-1+g)%g];break;case f.SPACE:case f.ENTER:this._clickHandler({target:c.target},c.target);
224 c.preventDefault()}if(a){b(c.target).attr("tabIndex",-1);b(a).attr("tabIndex",0);a.focus();return false}return true}},resize:function(){var c=this.options,f;if(c.fillSpace){if(b.browser.msie){var g=this.element.parent().css("overflow");this.element.parent().css("overflow","hidden")}f=this.element.parent().height();b.browser.msie&&this.element.parent().css("overflow",g);this.headers.each(function(){f-=b(this).outerHeight(true)});this.headers.next().each(function(){b(this).height(Math.max(0,f-b(this).innerHeight()+
225 b(this).height()))}).css("overflow","auto")}else if(c.autoHeight){f=0;this.headers.next().each(function(){f=Math.max(f,b(this).height("").height())}).height(f)}return this},activate:function(c){this.options.active=c;c=this._findActive(c)[0];this._clickHandler({target:c},c);return this},_findActive:function(c){return c?typeof c==="number"?this.headers.filter(":eq("+c+")"):this.headers.not(this.headers.not(c)):c===false?b([]):this.headers.filter(":eq(0)")},_clickHandler:function(c,f){var g=this.options;
226 if(!g.disabled)if(c.target){c=b(c.currentTarget||f);f=c[0]===this.active[0];g.active=g.collapsible&&f?false:this.headers.index(c);if(!(this.running||!g.collapsible&&f)){var e=this.active;i=c.next();d=this.active.next();h={options:g,newHeader:f&&g.collapsible?b([]):c,oldHeader:this.active,newContent:f&&g.collapsible?b([]):i,oldContent:d};var a=this.headers.index(this.active[0])>this.headers.index(c[0]);this.active=f?b([]):c;this._toggle(i,d,h,f,a);e.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(g.icons.headerSelected).addClass(g.icons.header);
227 if(!f){c.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top").children(".ui-icon").removeClass(g.icons.header).addClass(g.icons.headerSelected);c.next().addClass("ui-accordion-content-active")}}}else if(g.collapsible){this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(g.icons.headerSelected).addClass(g.icons.header);this.active.next().addClass("ui-accordion-content-active");var d=this.active.next(),
228 h={options:g,newHeader:b([]),oldHeader:g.active,newContent:b([]),oldContent:d},i=this.active=b([]);this._toggle(i,d,h)}},_toggle:function(c,f,g,e,a){var d=this,h=d.options;d.toShow=c;d.toHide=f;d.data=g;var i=function(){if(d)return d._completed.apply(d,arguments)};d._trigger("changestart",null,d.data);d.running=f.size()===0?c.size():f.size();if(h.animated){g={};g=h.collapsible&&e?{toShow:b([]),toHide:f,complete:i,down:a,autoHeight:h.autoHeight||h.fillSpace}:{toShow:c,toHide:f,complete:i,down:a,autoHeight:h.autoHeight||
229 h.fillSpace};if(!h.proxied)h.proxied=h.animated;if(!h.proxiedDuration)h.proxiedDuration=h.duration;h.animated=b.isFunction(h.proxied)?h.proxied(g):h.proxied;h.duration=b.isFunction(h.proxiedDuration)?h.proxiedDuration(g):h.proxiedDuration;e=b.ui.accordion.animations;var j=h.duration,n=h.animated;if(n&&!e[n]&&!b.easing[n])n="slide";e[n]||(e[n]=function(q){this.slide(q,{easing:n,duration:j||700})});e[n](g)}else{if(h.collapsible&&e)c.toggle();else{f.hide();c.show()}i(true)}f.prev().attr({"aria-expanded":"false",
230 tabIndex:-1}).blur();c.prev().attr({"aria-expanded":"true",tabIndex:0}).focus()},_completed:function(c){this.running=c?0:--this.running;if(!this.running){this.options.clearStyle&&this.toShow.add(this.toHide).css({height:"",overflow:""});this.toHide.removeClass("ui-accordion-content-active");this.toHide.parent()[0].className=this.toHide.parent()[0].className;this._trigger("change",null,this.data)}}});b.extend(b.ui.accordion,{version:"1.8.8",animations:{slide:function(c,f){c=b.extend({easing:"swing",
231 duration:300},c,f);if(c.toHide.size())if(c.toShow.size()){var g=c.toShow.css("overflow"),e=0,a={},d={},h;f=c.toShow;h=f[0].style.width;f.width(parseInt(f.parent().width(),10)-parseInt(f.css("paddingLeft"),10)-parseInt(f.css("paddingRight"),10)-(parseInt(f.css("borderLeftWidth"),10)||0)-(parseInt(f.css("borderRightWidth"),10)||0));b.each(["height","paddingTop","paddingBottom"],function(i,j){d[j]="hide";i=(""+b.css(c.toShow[0],j)).match(/^([\d+-.]+)(.*)$/);a[j]={value:i[1],unit:i[2]||"px"}});c.toShow.css({height:0,
232 overflow:"hidden"}).show();c.toHide.filter(":hidden").each(c.complete).end().filter(":visible").animate(d,{step:function(i,j){if(j.prop=="height")e=j.end-j.start===0?0:(j.now-j.start)/(j.end-j.start);c.toShow[0].style[j.prop]=e*a[j.prop].value+a[j.prop].unit},duration:c.duration,easing:c.easing,complete:function(){c.autoHeight||c.toShow.css("height","");c.toShow.css({width:h,overflow:g});c.complete()}})}else c.toHide.animate({height:"hide",paddingTop:"hide",paddingBottom:"hide"},c);else c.toShow.animate({height:"show",
233 paddingTop:"show",paddingBottom:"show"},c)},bounceslide:function(c){this.slide(c,{easing:c.down?"easeOutBounce":"swing",duration:c.down?1E3:200})}}})})(jQuery);
234 (function(b){b.widget("ui.autocomplete",{options:{appendTo:"body",delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null},pending:0,_create:function(){var c=this,f=this.element[0].ownerDocument,g;this.element.addClass("ui-autocomplete-input").attr("autocomplete","off").attr({role:"textbox","aria-autocomplete":"list","aria-haspopup":"true"}).bind("keydown.autocomplete",function(e){if(!(c.options.disabled||c.element.attr("readonly"))){g=false;var a=b.ui.keyCode;
235 switch(e.keyCode){case a.PAGE_UP:c._move("previousPage",e);break;case a.PAGE_DOWN:c._move("nextPage",e);break;case a.UP:c._move("previous",e);e.preventDefault();break;case a.DOWN:c._move("next",e);e.preventDefault();break;case a.ENTER:case a.NUMPAD_ENTER:if(c.menu.active){g=true;e.preventDefault()}case a.TAB:if(!c.menu.active)return;c.menu.select(e);break;case a.ESCAPE:c.element.val(c.term);c.close(e);break;default:clearTimeout(c.searching);c.searching=setTimeout(function(){if(c.term!=c.element.val()){c.selectedItem=
236 null;c.search(null,e)}},c.options.delay);break}}}).bind("keypress.autocomplete",function(e){if(g){g=false;e.preventDefault()}}).bind("focus.autocomplete",function(){if(!c.options.disabled){c.selectedItem=null;c.previous=c.element.val()}}).bind("blur.autocomplete",function(e){if(!c.options.disabled){clearTimeout(c.searching);c.closing=setTimeout(function(){c.close(e);c._change(e)},150)}});this._initSource();this.response=function(){return c._response.apply(c,arguments)};this.menu=b("<ul></ul>").addClass("ui-autocomplete").appendTo(b(this.options.appendTo||
237 "body",f)[0]).mousedown(function(e){var a=c.menu.element[0];b(e.target).closest(".ui-menu-item").length||setTimeout(function(){b(document).one("mousedown",function(d){d.target!==c.element[0]&&d.target!==a&&!b.ui.contains(a,d.target)&&c.close()})},1);setTimeout(function(){clearTimeout(c.closing)},13)}).menu({focus:function(e,a){a=a.item.data("item.autocomplete");false!==c._trigger("focus",e,{item:a})&&/^key/.test(e.originalEvent.type)&&c.element.val(a.value)},selected:function(e,a){var d=a.item.data("item.autocomplete"),
238 h=c.previous;if(c.element[0]!==f.activeElement){c.element.focus();c.previous=h;setTimeout(function(){c.previous=h;c.selectedItem=d},1)}false!==c._trigger("select",e,{item:d})&&c.element.val(d.value);c.term=c.element.val();c.close(e);c.selectedItem=d},blur:function(){c.menu.element.is(":visible")&&c.element.val()!==c.term&&c.element.val(c.term)}}).zIndex(this.element.zIndex()+1).css({top:0,left:0}).hide().data("menu");b.fn.bgiframe&&this.menu.element.bgiframe()},destroy:function(){this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete").removeAttr("role").removeAttr("aria-autocomplete").removeAttr("aria-haspopup");
239 this.menu.element.remove();b.Widget.prototype.destroy.call(this)},_setOption:function(c,f){b.Widget.prototype._setOption.apply(this,arguments);c==="source"&&this._initSource();if(c==="appendTo")this.menu.element.appendTo(b(f||"body",this.element[0].ownerDocument)[0]);c==="disabled"&&f&&this.xhr&&this.xhr.abort()},_initSource:function(){var c=this,f,g;if(b.isArray(this.options.source)){f=this.options.source;this.source=function(e,a){a(b.ui.autocomplete.filter(f,e.term))}}else if(typeof this.options.source===
240 "string"){g=this.options.source;this.source=function(e,a){c.xhr&&c.xhr.abort();c.xhr=b.ajax({url:g,data:e,dataType:"json",success:function(d,h,i){i===c.xhr&&a(d);c.xhr=null},error:function(d){d===c.xhr&&a([]);c.xhr=null}})}}else this.source=this.options.source},search:function(c,f){c=c!=null?c:this.element.val();this.term=this.element.val();if(c.length<this.options.minLength)return this.close(f);clearTimeout(this.closing);if(this._trigger("search",f)!==false)return this._search(c)},_search:function(c){this.pending++;
241 this.element.addClass("ui-autocomplete-loading");this.source({term:c},this.response)},_response:function(c){if(!this.options.disabled&&c&&c.length){c=this._normalize(c);this._suggest(c);this._trigger("open")}else this.close();this.pending--;this.pending||this.element.removeClass("ui-autocomplete-loading")},close:function(c){clearTimeout(this.closing);if(this.menu.element.is(":visible")){this.menu.element.hide();this.menu.deactivate();this._trigger("close",c)}},_change:function(c){this.previous!==
242 this.element.val()&&this._trigger("change",c,{item:this.selectedItem})},_normalize:function(c){if(c.length&&c[0].label&&c[0].value)return c;return b.map(c,function(f){if(typeof f==="string")return{label:f,value:f};return b.extend({label:f.label||f.value,value:f.value||f.label},f)})},_suggest:function(c){var f=this.menu.element.empty().zIndex(this.element.zIndex()+1);this._renderMenu(f,c);this.menu.deactivate();this.menu.refresh();f.show();this._resizeMenu();f.position(b.extend({of:this.element},this.options.position))},
243 _resizeMenu:function(){var c=this.menu.element;c.outerWidth(Math.max(c.width("").outerWidth(),this.element.outerWidth()))},_renderMenu:function(c,f){var g=this;b.each(f,function(e,a){g._renderItem(c,a)})},_renderItem:function(c,f){return b("<li></li>").data("item.autocomplete",f).append(b("<a></a>").text(f.label)).appendTo(c)},_move:function(c,f){if(this.menu.element.is(":visible"))if(this.menu.first()&&/^previous/.test(c)||this.menu.last()&&/^next/.test(c)){this.element.val(this.term);this.menu.deactivate()}else this.menu[c](f);
244 else this.search(null,f)},widget:function(){return this.menu.element}});b.extend(b.ui.autocomplete,{escapeRegex:function(c){return c.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")},filter:function(c,f){var g=new RegExp(b.ui.autocomplete.escapeRegex(f),"i");return b.grep(c,function(e){return g.test(e.label||e.value||e)})}})})(jQuery);
245 (function(b){b.widget("ui.menu",{_create:function(){var c=this;this.element.addClass("ui-menu ui-widget ui-widget-content ui-corner-all").attr({role:"listbox","aria-activedescendant":"ui-active-menuitem"}).click(function(f){if(b(f.target).closest(".ui-menu-item a").length){f.preventDefault();c.select(f)}});this.refresh()},refresh:function(){var c=this;this.element.children("li:not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","menuitem").children("a").addClass("ui-corner-all").attr("tabindex",
246 -1).mouseenter(function(f){c.activate(f,b(this).parent())}).mouseleave(function(){c.deactivate()})},activate:function(c,f){this.deactivate();if(this.hasScroll()){var g=f.offset().top-this.element.offset().top,e=this.element.attr("scrollTop"),a=this.element.height();if(g<0)this.element.attr("scrollTop",e+g);else g>=a&&this.element.attr("scrollTop",e+g-a+f.height())}this.active=f.eq(0).children("a").addClass("ui-state-hover").attr("id","ui-active-menuitem").end();this._trigger("focus",c,{item:f})},
247 deactivate:function(){if(this.active){this.active.children("a").removeClass("ui-state-hover").removeAttr("id");this._trigger("blur");this.active=null}},next:function(c){this.move("next",".ui-menu-item:first",c)},previous:function(c){this.move("prev",".ui-menu-item:last",c)},first:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},last:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},move:function(c,f,g){if(this.active){c=this.active[c+"All"](".ui-menu-item").eq(0);
248 c.length?this.activate(g,c):this.activate(g,this.element.children(f))}else this.activate(g,this.element.children(f))},nextPage:function(c){if(this.hasScroll())if(!this.active||this.last())this.activate(c,this.element.children(".ui-menu-item:first"));else{var f=this.active.offset().top,g=this.element.height(),e=this.element.children(".ui-menu-item").filter(function(){var a=b(this).offset().top-f-g+b(this).height();return a<10&&a>-10});e.length||(e=this.element.children(".ui-menu-item:last"));this.activate(c,
249 e)}else this.activate(c,this.element.children(".ui-menu-item").filter(!this.active||this.last()?":first":":last"))},previousPage:function(c){if(this.hasScroll())if(!this.active||this.first())this.activate(c,this.element.children(".ui-menu-item:last"));else{var f=this.active.offset().top,g=this.element.height();result=this.element.children(".ui-menu-item").filter(function(){var e=b(this).offset().top-f+g-b(this).height();return e<10&&e>-10});result.length||(result=this.element.children(".ui-menu-item:first"));
250 this.activate(c,result)}else this.activate(c,this.element.children(".ui-menu-item").filter(!this.active||this.first()?":last":":first"))},hasScroll:function(){return this.element.height()<this.element.attr("scrollHeight")},select:function(c){this._trigger("selected",c,{item:this.active})}})})(jQuery);
251 (function(b){var c,f=function(e){b(":ui-button",e.target.form).each(function(){var a=b(this).data("button");setTimeout(function(){a.refresh()},1)})},g=function(e){var a=e.name,d=e.form,h=b([]);if(a)h=d?b(d).find("[name='"+a+"']"):b("[name='"+a+"']",e.ownerDocument).filter(function(){return!this.form});return h};b.widget("ui.button",{options:{disabled:null,text:true,label:null,icons:{primary:null,secondary:null}},_create:function(){this.element.closest("form").unbind("reset.button").bind("reset.button",
252 f);if(typeof this.options.disabled!=="boolean")this.options.disabled=this.element.attr("disabled");this._determineButtonType();this.hasTitle=!!this.buttonElement.attr("title");var e=this,a=this.options,d=this.type==="checkbox"||this.type==="radio",h="ui-state-hover"+(!d?" ui-state-active":"");if(a.label===null)a.label=this.buttonElement.html();if(this.element.is(":disabled"))a.disabled=true;this.buttonElement.addClass("ui-button ui-widget ui-state-default ui-corner-all").attr("role","button").bind("mouseenter.button",
253 function(){if(!a.disabled){b(this).addClass("ui-state-hover");this===c&&b(this).addClass("ui-state-active")}}).bind("mouseleave.button",function(){a.disabled||b(this).removeClass(h)}).bind("focus.button",function(){b(this).addClass("ui-state-focus")}).bind("blur.button",function(){b(this).removeClass("ui-state-focus")});d&&this.element.bind("change.button",function(){e.refresh()});if(this.type==="checkbox")this.buttonElement.bind("click.button",function(){if(a.disabled)return false;b(this).toggleClass("ui-state-active");
254 e.buttonElement.attr("aria-pressed",e.element[0].checked)});else if(this.type==="radio")this.buttonElement.bind("click.button",function(){if(a.disabled)return false;b(this).addClass("ui-state-active");e.buttonElement.attr("aria-pressed",true);var i=e.element[0];g(i).not(i).map(function(){return b(this).button("widget")[0]}).removeClass("ui-state-active").attr("aria-pressed",false)});else{this.buttonElement.bind("mousedown.button",function(){if(a.disabled)return false;b(this).addClass("ui-state-active");
255 c=this;b(document).one("mouseup",function(){c=null})}).bind("mouseup.button",function(){if(a.disabled)return false;b(this).removeClass("ui-state-active")}).bind("keydown.button",function(i){if(a.disabled)return false;if(i.keyCode==b.ui.keyCode.SPACE||i.keyCode==b.ui.keyCode.ENTER)b(this).addClass("ui-state-active")}).bind("keyup.button",function(){b(this).removeClass("ui-state-active")});this.buttonElement.is("a")&&this.buttonElement.keyup(function(i){i.keyCode===b.ui.keyCode.SPACE&&b(this).click()})}this._setOption("disabled",
256 a.disabled)},_determineButtonType:function(){this.type=this.element.is(":checkbox")?"checkbox":this.element.is(":radio")?"radio":this.element.is("input")?"input":"button";if(this.type==="checkbox"||this.type==="radio"){this.buttonElement=this.element.parents().last().find("label[for="+this.element.attr("id")+"]");this.element.addClass("ui-helper-hidden-accessible");var e=this.element.is(":checked");e&&this.buttonElement.addClass("ui-state-active");this.buttonElement.attr("aria-pressed",e)}else this.buttonElement=
257 this.element},widget:function(){return this.buttonElement},destroy:function(){this.element.removeClass("ui-helper-hidden-accessible");this.buttonElement.removeClass("ui-button ui-widget ui-state-default ui-corner-all ui-state-hover ui-state-active ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only").removeAttr("role").removeAttr("aria-pressed").html(this.buttonElement.find(".ui-button-text").html());this.hasTitle||
258 this.buttonElement.removeAttr("title");b.Widget.prototype.destroy.call(this)},_setOption:function(e,a){b.Widget.prototype._setOption.apply(this,arguments);if(e==="disabled")a?this.element.attr("disabled",true):this.element.removeAttr("disabled");this._resetButton()},refresh:function(){var e=this.element.is(":disabled");e!==this.options.disabled&&this._setOption("disabled",e);if(this.type==="radio")g(this.element[0]).each(function(){b(this).is(":checked")?b(this).button("widget").addClass("ui-state-active").attr("aria-pressed",
259 true):b(this).button("widget").removeClass("ui-state-active").attr("aria-pressed",false)});else if(this.type==="checkbox")this.element.is(":checked")?this.buttonElement.addClass("ui-state-active").attr("aria-pressed",true):this.buttonElement.removeClass("ui-state-active").attr("aria-pressed",false)},_resetButton:function(){if(this.type==="input")this.options.label&&this.element.val(this.options.label);else{var e=this.buttonElement.removeClass("ui-button-icons-only ui-button-icon-only ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary ui-button-text-only"),
260 a=b("<span></span>").addClass("ui-button-text").html(this.options.label).appendTo(e.empty()).text(),d=this.options.icons,h=d.primary&&d.secondary;if(d.primary||d.secondary){e.addClass("ui-button-text-icon"+(h?"s":d.primary?"-primary":"-secondary"));d.primary&&e.prepend("<span class='ui-button-icon-primary ui-icon "+d.primary+"'></span>");d.secondary&&e.append("<span class='ui-button-icon-secondary ui-icon "+d.secondary+"'></span>");if(!this.options.text){e.addClass(h?"ui-button-icons-only":"ui-button-icon-only").removeClass("ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary");
261 this.hasTitle||e.attr("title",a)}}else e.addClass("ui-button-text-only")}}});b.widget("ui.buttonset",{options:{items:":button, :submit, :reset, :checkbox, :radio, a, :data(button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(e,a){e==="disabled"&&this.buttons.button("option",e,a);b.Widget.prototype._setOption.apply(this,arguments)},refresh:function(){this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return b(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass("ui-corner-left").end().filter(":last").addClass("ui-corner-right").end().end()},
262 destroy:function(){this.element.removeClass("ui-buttonset");this.buttons.map(function(){return b(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy");b.Widget.prototype.destroy.call(this)}})})(jQuery);
263 (function(b,c){function f(){this.debug=false;this._curInst=null;this._keyEvent=false;this._disabledInputs=[];this._inDialog=this._datepickerShowing=false;this._mainDivId="ui-datepicker-div";this._inlineClass="ui-datepicker-inline";this._appendClass="ui-datepicker-append";this._triggerClass="ui-datepicker-trigger";this._dialogClass="ui-datepicker-dialog";this._disableClass="ui-datepicker-disabled";this._unselectableClass="ui-datepicker-unselectable";this._currentClass="ui-datepicker-current-day";this._dayOverClass=
264 "ui-datepicker-days-cell-over";this.regional=[];this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su",
265 "Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:false,showMonthAfterYear:false,yearSuffix:""};this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:false,hideIfNoPrevNext:false,navigationAsDateFormat:false,gotoCurrent:false,changeMonth:false,changeYear:false,yearRange:"c-10:c+10",showOtherMonths:false,selectOtherMonths:false,showWeek:false,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",
266 minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:true,showButtonPanel:false,autoSize:false};b.extend(this._defaults,this.regional[""]);this.dpDiv=b('<div id="'+this._mainDivId+'" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>')}function g(a,d){b.extend(a,d);for(var h in d)if(d[h]==
267 null||d[h]==c)a[h]=d[h];return a}b.extend(b.ui,{datepicker:{version:"1.8.8"}});var e=(new Date).getTime();b.extend(f.prototype,{markerClassName:"hasDatepicker",log:function(){this.debug&&console.log.apply("",arguments)},_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(a){g(this._defaults,a||{});return this},_attachDatepicker:function(a,d){var h=null;for(var i in this._defaults){var j=a.getAttribute("date:"+i);if(j){h=h||{};try{h[i]=eval(j)}catch(n){h[i]=j}}}i=a.nodeName.toLowerCase();
268 j=i=="div"||i=="span";if(!a.id){this.uuid+=1;a.id="dp"+this.uuid}var q=this._newInst(b(a),j);q.settings=b.extend({},d||{},h||{});if(i=="input")this._connectDatepicker(a,q);else j&&this._inlineDatepicker(a,q)},_newInst:function(a,d){return{id:a[0].id.replace(/([^A-Za-z0-9_-])/g,"\\\\$1"),input:a,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:d,dpDiv:!d?this.dpDiv:b('<div class="'+this._inlineClass+' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>')}},
269 _connectDatepicker:function(a,d){var h=b(a);d.append=b([]);d.trigger=b([]);if(!h.hasClass(this.markerClassName)){this._attachments(h,d);h.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp).bind("setData.datepicker",function(i,j,n){d.settings[j]=n}).bind("getData.datepicker",function(i,j){return this._get(d,j)});this._autoSize(d);b.data(a,"datepicker",d)}},_attachments:function(a,d){var h=this._get(d,"appendText"),i=this._get(d,"isRTL");d.append&&
270 d.append.remove();if(h){d.append=b('<span class="'+this._appendClass+'">'+h+"</span>");a[i?"before":"after"](d.append)}a.unbind("focus",this._showDatepicker);d.trigger&&d.trigger.remove();h=this._get(d,"showOn");if(h=="focus"||h=="both")a.focus(this._showDatepicker);if(h=="button"||h=="both"){h=this._get(d,"buttonText");var j=this._get(d,"buttonImage");d.trigger=b(this._get(d,"buttonImageOnly")?b("<img/>").addClass(this._triggerClass).attr({src:j,alt:h,title:h}):b('<button type="button"></button>').addClass(this._triggerClass).html(j==
271 ""?h:b("<img/>").attr({src:j,alt:h,title:h})));a[i?"before":"after"](d.trigger);d.trigger.click(function(){b.datepicker._datepickerShowing&&b.datepicker._lastInput==a[0]?b.datepicker._hideDatepicker():b.datepicker._showDatepicker(a[0]);return false})}},_autoSize:function(a){if(this._get(a,"autoSize")&&!a.inline){var d=new Date(2009,11,20),h=this._get(a,"dateFormat");if(h.match(/[DM]/)){var i=function(j){for(var n=0,q=0,l=0;l<j.length;l++)if(j[l].length>n){n=j[l].length;q=l}return q};d.setMonth(i(this._get(a,
272 h.match(/MM/)?"monthNames":"monthNamesShort")));d.setDate(i(this._get(a,h.match(/DD/)?"dayNames":"dayNamesShort"))+20-d.getDay())}a.input.attr("size",this._formatDate(a,d).length)}},_inlineDatepicker:function(a,d){var h=b(a);if(!h.hasClass(this.markerClassName)){h.addClass(this.markerClassName).append(d.dpDiv).bind("setData.datepicker",function(i,j,n){d.settings[j]=n}).bind("getData.datepicker",function(i,j){return this._get(d,j)});b.data(a,"datepicker",d);this._setDate(d,this._getDefaultDate(d),
273 true);this._updateDatepicker(d);this._updateAlternate(d);d.dpDiv.show()}},_dialogDatepicker:function(a,d,h,i,j){a=this._dialogInst;if(!a){this.uuid+=1;this._dialogInput=b('<input type="text" id="'+("dp"+this.uuid)+'" style="position: absolute; top: -100px; width: 0px; z-index: -10;"/>');this._dialogInput.keydown(this._doKeyDown);b("body").append(this._dialogInput);a=this._dialogInst=this._newInst(this._dialogInput,false);a.settings={};b.data(this._dialogInput[0],"datepicker",a)}g(a.settings,i||{});
274 d=d&&d.constructor==Date?this._formatDate(a,d):d;this._dialogInput.val(d);this._pos=j?j.length?j:[j.pageX,j.pageY]:null;if(!this._pos)this._pos=[document.documentElement.clientWidth/2-100+(document.documentElement.scrollLeft||document.body.scrollLeft),document.documentElement.clientHeight/2-150+(document.documentElement.scrollTop||document.body.scrollTop)];this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px");a.settings.onSelect=h;this._inDialog=true;this.dpDiv.addClass(this._dialogClass);
275 this._showDatepicker(this._dialogInput[0]);b.blockUI&&b.blockUI(this.dpDiv);b.data(this._dialogInput[0],"datepicker",a);return this},_destroyDatepicker:function(a){var d=b(a),h=b.data(a,"datepicker");if(d.hasClass(this.markerClassName)){var i=a.nodeName.toLowerCase();b.removeData(a,"datepicker");if(i=="input"){h.append.remove();h.trigger.remove();d.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",
276 this._doKeyUp)}else if(i=="div"||i=="span")d.removeClass(this.markerClassName).empty()}},_enableDatepicker:function(a){var d=b(a),h=b.data(a,"datepicker");if(d.hasClass(this.markerClassName)){var i=a.nodeName.toLowerCase();if(i=="input"){a.disabled=false;h.trigger.filter("button").each(function(){this.disabled=false}).end().filter("img").css({opacity:"1.0",cursor:""})}else if(i=="div"||i=="span")d.children("."+this._inlineClass).children().removeClass("ui-state-disabled");this._disabledInputs=b.map(this._disabledInputs,
277 function(j){return j==a?null:j})}},_disableDatepicker:function(a){var d=b(a),h=b.data(a,"datepicker");if(d.hasClass(this.markerClassName)){var i=a.nodeName.toLowerCase();if(i=="input"){a.disabled=true;h.trigger.filter("button").each(function(){this.disabled=true}).end().filter("img").css({opacity:"0.5",cursor:"default"})}else if(i=="div"||i=="span")d.children("."+this._inlineClass).children().addClass("ui-state-disabled");this._disabledInputs=b.map(this._disabledInputs,function(j){return j==a?null:
278 j});this._disabledInputs[this._disabledInputs.length]=a}},_isDisabledDatepicker:function(a){if(!a)return false;for(var d=0;d<this._disabledInputs.length;d++)if(this._disabledInputs[d]==a)return true;return false},_getInst:function(a){try{return b.data(a,"datepicker")}catch(d){throw"Missing instance data for this datepicker";}},_optionDatepicker:function(a,d,h){var i=this._getInst(a);if(arguments.length==2&&typeof d=="string")return d=="defaults"?b.extend({},b.datepicker._defaults):i?d=="all"?b.extend({},
279 i.settings):this._get(i,d):null;var j=d||{};if(typeof d=="string"){j={};j[d]=h}if(i){this._curInst==i&&this._hideDatepicker();var n=this._getDateDatepicker(a,true);g(i.settings,j);this._attachments(b(a),i);this._autoSize(i);this._setDateDatepicker(a,n);this._updateDatepicker(i)}},_changeDatepicker:function(a,d,h){this._optionDatepicker(a,d,h)},_refreshDatepicker:function(a){(a=this._getInst(a))&&this._updateDatepicker(a)},_setDateDatepicker:function(a,d){if(a=this._getInst(a)){this._setDate(a,d);
280 this._updateDatepicker(a);this._updateAlternate(a)}},_getDateDatepicker:function(a,d){(a=this._getInst(a))&&!a.inline&&this._setDateFromField(a,d);return a?this._getDate(a):null},_doKeyDown:function(a){var d=b.datepicker._getInst(a.target),h=true,i=d.dpDiv.is(".ui-datepicker-rtl");d._keyEvent=true;if(b.datepicker._datepickerShowing)switch(a.keyCode){case 9:b.datepicker._hideDatepicker();h=false;break;case 13:h=b("td."+b.datepicker._dayOverClass+":not(."+b.datepicker._currentClass+")",d.dpDiv);h[0]?
281 b.datepicker._selectDay(a.target,d.selectedMonth,d.selectedYear,h[0]):b.datepicker._hideDatepicker();return false;case 27:b.datepicker._hideDatepicker();break;case 33:b.datepicker._adjustDate(a.target,a.ctrlKey?-b.datepicker._get(d,"stepBigMonths"):-b.datepicker._get(d,"stepMonths"),"M");break;case 34:b.datepicker._adjustDate(a.target,a.ctrlKey?+b.datepicker._get(d,"stepBigMonths"):+b.datepicker._get(d,"stepMonths"),"M");break;case 35:if(a.ctrlKey||a.metaKey)b.datepicker._clearDate(a.target);h=a.ctrlKey||
282 a.metaKey;break;case 36:if(a.ctrlKey||a.metaKey)b.datepicker._gotoToday(a.target);h=a.ctrlKey||a.metaKey;break;case 37:if(a.ctrlKey||a.metaKey)b.datepicker._adjustDate(a.target,i?+1:-1,"D");h=a.ctrlKey||a.metaKey;if(a.originalEvent.altKey)b.datepicker._adjustDate(a.target,a.ctrlKey?-b.datepicker._get(d,"stepBigMonths"):-b.datepicker._get(d,"stepMonths"),"M");break;case 38:if(a.ctrlKey||a.metaKey)b.datepicker._adjustDate(a.target,-7,"D");h=a.ctrlKey||a.metaKey;break;case 39:if(a.ctrlKey||a.metaKey)b.datepicker._adjustDate(a.target,
283 i?-1:+1,"D");h=a.ctrlKey||a.metaKey;if(a.originalEvent.altKey)b.datepicker._adjustDate(a.target,a.ctrlKey?+b.datepicker._get(d,"stepBigMonths"):+b.datepicker._get(d,"stepMonths"),"M");break;case 40:if(a.ctrlKey||a.metaKey)b.datepicker._adjustDate(a.target,+7,"D");h=a.ctrlKey||a.metaKey;break;default:h=false}else if(a.keyCode==36&&a.ctrlKey)b.datepicker._showDatepicker(this);else h=false;if(h){a.preventDefault();a.stopPropagation()}},_doKeyPress:function(a){var d=b.datepicker._getInst(a.target);if(b.datepicker._get(d,
284 "constrainInput")){d=b.datepicker._possibleChars(b.datepicker._get(d,"dateFormat"));var h=String.fromCharCode(a.charCode==c?a.keyCode:a.charCode);return a.ctrlKey||a.metaKey||h<" "||!d||d.indexOf(h)>-1}},_doKeyUp:function(a){a=b.datepicker._getInst(a.target);if(a.input.val()!=a.lastVal)try{if(b.datepicker.parseDate(b.datepicker._get(a,"dateFormat"),a.input?a.input.val():null,b.datepicker._getFormatConfig(a))){b.datepicker._setDateFromField(a);b.datepicker._updateAlternate(a);b.datepicker._updateDatepicker(a)}}catch(d){b.datepicker.log(d)}return true},
285 _showDatepicker:function(a){a=a.target||a;if(a.nodeName.toLowerCase()!="input")a=b("input",a.parentNode)[0];if(!(b.datepicker._isDisabledDatepicker(a)||b.datepicker._lastInput==a)){var d=b.datepicker._getInst(a);b.datepicker._curInst&&b.datepicker._curInst!=d&&b.datepicker._curInst.dpDiv.stop(true,true);var h=b.datepicker._get(d,"beforeShow");g(d.settings,h?h.apply(a,[a,d]):{});d.lastVal=null;b.datepicker._lastInput=a;b.datepicker._setDateFromField(d);if(b.datepicker._inDialog)a.value="";if(!b.datepicker._pos){b.datepicker._pos=
286 b.datepicker._findPos(a);b.datepicker._pos[1]+=a.offsetHeight}var i=false;b(a).parents().each(function(){i|=b(this).css("position")=="fixed";return!i});if(i&&b.browser.opera){b.datepicker._pos[0]-=document.documentElement.scrollLeft;b.datepicker._pos[1]-=document.documentElement.scrollTop}h={left:b.datepicker._pos[0],top:b.datepicker._pos[1]};b.datepicker._pos=null;d.dpDiv.empty();d.dpDiv.css({position:"absolute",display:"block",top:"-1000px"});b.datepicker._updateDatepicker(d);h=b.datepicker._checkOffset(d,
287 h,i);d.dpDiv.css({position:b.datepicker._inDialog&&b.blockUI?"static":i?"fixed":"absolute",display:"none",left:h.left+"px",top:h.top+"px"});if(!d.inline){h=b.datepicker._get(d,"showAnim");var j=b.datepicker._get(d,"duration"),n=function(){b.datepicker._datepickerShowing=true;var q=d.dpDiv.find("iframe.ui-datepicker-cover");if(q.length){var l=b.datepicker._getBorders(d.dpDiv);q.css({left:-l[0],top:-l[1],width:d.dpDiv.outerWidth(),height:d.dpDiv.outerHeight()})}};d.dpDiv.zIndex(b(a).zIndex()+1);b.effects&&
288 b.effects[h]?d.dpDiv.show(h,b.datepicker._get(d,"showOptions"),j,n):d.dpDiv[h||"show"](h?j:null,n);if(!h||!j)n();d.input.is(":visible")&&!d.input.is(":disabled")&&d.input.focus();b.datepicker._curInst=d}}},_updateDatepicker:function(a){var d=this,h=b.datepicker._getBorders(a.dpDiv);a.dpDiv.empty().append(this._generateHTML(a));var i=a.dpDiv.find("iframe.ui-datepicker-cover");i.length&&i.css({left:-h[0],top:-h[1],width:a.dpDiv.outerWidth(),height:a.dpDiv.outerHeight()});a.dpDiv.find("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a").bind("mouseout",
289 function(){b(this).removeClass("ui-state-hover");this.className.indexOf("ui-datepicker-prev")!=-1&&b(this).removeClass("ui-datepicker-prev-hover");this.className.indexOf("ui-datepicker-next")!=-1&&b(this).removeClass("ui-datepicker-next-hover")}).bind("mouseover",function(){if(!d._isDisabledDatepicker(a.inline?a.dpDiv.parent()[0]:a.input[0])){b(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover");b(this).addClass("ui-state-hover");this.className.indexOf("ui-datepicker-prev")!=
290 -1&&b(this).addClass("ui-datepicker-prev-hover");this.className.indexOf("ui-datepicker-next")!=-1&&b(this).addClass("ui-datepicker-next-hover")}}).end().find("."+this._dayOverClass+" a").trigger("mouseover").end();h=this._getNumberOfMonths(a);i=h[1];i>1?a.dpDiv.addClass("ui-datepicker-multi-"+i).css("width",17*i+"em"):a.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("");a.dpDiv[(h[0]!=1||h[1]!=1?"add":"remove")+"Class"]("ui-datepicker-multi");a.dpDiv[(this._get(a,
291 "isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");a==b.datepicker._curInst&&b.datepicker._datepickerShowing&&a.input&&a.input.is(":visible")&&!a.input.is(":disabled")&&a.input.focus();if(a.yearshtml){var j=a.yearshtml;setTimeout(function(){j===a.yearshtml&&a.dpDiv.find("select.ui-datepicker-year:first").replaceWith(a.yearshtml);j=a.yearshtml=null},0)}},_getBorders:function(a){var d=function(h){return{thin:1,medium:2,thick:3}[h]||h};return[parseFloat(d(a.css("border-left-width"))),parseFloat(d(a.css("border-top-width")))]},
292 _checkOffset:function(a,d,h){var i=a.dpDiv.outerWidth(),j=a.dpDiv.outerHeight(),n=a.input?a.input.outerWidth():0,q=a.input?a.input.outerHeight():0,l=document.documentElement.clientWidth+b(document).scrollLeft(),k=document.documentElement.clientHeight+b(document).scrollTop();d.left-=this._get(a,"isRTL")?i-n:0;d.left-=h&&d.left==a.input.offset().left?b(document).scrollLeft():0;d.top-=h&&d.top==a.input.offset().top+q?b(document).scrollTop():0;d.left-=Math.min(d.left,d.left+i>l&&l>i?Math.abs(d.left+i-
293 l):0);d.top-=Math.min(d.top,d.top+j>k&&k>j?Math.abs(j+q):0);return d},_findPos:function(a){for(var d=this._get(this._getInst(a),"isRTL");a&&(a.type=="hidden"||a.nodeType!=1);)a=a[d?"previousSibling":"nextSibling"];a=b(a).offset();return[a.left,a.top]},_hideDatepicker:function(a){var d=this._curInst;if(!(!d||a&&d!=b.data(a,"datepicker")))if(this._datepickerShowing){a=this._get(d,"showAnim");var h=this._get(d,"duration"),i=function(){b.datepicker._tidyDialog(d);this._curInst=null};b.effects&&b.effects[a]?
294 d.dpDiv.hide(a,b.datepicker._get(d,"showOptions"),h,i):d.dpDiv[a=="slideDown"?"slideUp":a=="fadeIn"?"fadeOut":"hide"](a?h:null,i);a||i();if(a=this._get(d,"onClose"))a.apply(d.input?d.input[0]:null,[d.input?d.input.val():"",d]);this._datepickerShowing=false;this._lastInput=null;if(this._inDialog){this._dialogInput.css({position:"absolute",left:"0",top:"-100px"});if(b.blockUI){b.unblockUI();b("body").append(this.dpDiv)}}this._inDialog=false}},_tidyDialog:function(a){a.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},
295 _checkExternalClick:function(a){if(b.datepicker._curInst){a=b(a.target);a[0].id!=b.datepicker._mainDivId&&a.parents("#"+b.datepicker._mainDivId).length==0&&!a.hasClass(b.datepicker.markerClassName)&&!a.hasClass(b.datepicker._triggerClass)&&b.datepicker._datepickerShowing&&!(b.datepicker._inDialog&&b.blockUI)&&b.datepicker._hideDatepicker()}},_adjustDate:function(a,d,h){a=b(a);var i=this._getInst(a[0]);if(!this._isDisabledDatepicker(a[0])){this._adjustInstDate(i,d+(h=="M"?this._get(i,"showCurrentAtPos"):
296 0),h);this._updateDatepicker(i)}},_gotoToday:function(a){a=b(a);var d=this._getInst(a[0]);if(this._get(d,"gotoCurrent")&&d.currentDay){d.selectedDay=d.currentDay;d.drawMonth=d.selectedMonth=d.currentMonth;d.drawYear=d.selectedYear=d.currentYear}else{var h=new Date;d.selectedDay=h.getDate();d.drawMonth=d.selectedMonth=h.getMonth();d.drawYear=d.selectedYear=h.getFullYear()}this._notifyChange(d);this._adjustDate(a)},_selectMonthYear:function(a,d,h){a=b(a);var i=this._getInst(a[0]);i._selectingMonthYear=
297 false;i["selected"+(h=="M"?"Month":"Year")]=i["draw"+(h=="M"?"Month":"Year")]=parseInt(d.options[d.selectedIndex].value,10);this._notifyChange(i);this._adjustDate(a)},_clickMonthYear:function(a){var d=this._getInst(b(a)[0]);d.input&&d._selectingMonthYear&&setTimeout(function(){d.input.focus()},0);d._selectingMonthYear=!d._selectingMonthYear},_selectDay:function(a,d,h,i){var j=b(a);if(!(b(i).hasClass(this._unselectableClass)||this._isDisabledDatepicker(j[0]))){j=this._getInst(j[0]);j.selectedDay=j.currentDay=
298 b("a",i).html();j.selectedMonth=j.currentMonth=d;j.selectedYear=j.currentYear=h;this._selectDate(a,this._formatDate(j,j.currentDay,j.currentMonth,j.currentYear))}},_clearDate:function(a){a=b(a);this._getInst(a[0]);this._selectDate(a,"")},_selectDate:function(a,d){a=this._getInst(b(a)[0]);d=d!=null?d:this._formatDate(a);a.input&&a.input.val(d);this._updateAlternate(a);var h=this._get(a,"onSelect");if(h)h.apply(a.input?a.input[0]:null,[d,a]);else a.input&&a.input.trigger("change");if(a.inline)this._updateDatepicker(a);
299 else{this._hideDatepicker();this._lastInput=a.input[0];typeof a.input[0]!="object"&&a.input.focus();this._lastInput=null}},_updateAlternate:function(a){var d=this._get(a,"altField");if(d){var h=this._get(a,"altFormat")||this._get(a,"dateFormat"),i=this._getDate(a),j=this.formatDate(h,i,this._getFormatConfig(a));b(d).each(function(){b(this).val(j)})}},noWeekends:function(a){a=a.getDay();return[a>0&&a<6,""]},iso8601Week:function(a){a=new Date(a.getTime());a.setDate(a.getDate()+4-(a.getDay()||7));var d=
300 a.getTime();a.setMonth(0);a.setDate(1);return Math.floor(Math.round((d-a)/864E5)/7)+1},parseDate:function(a,d,h){if(a==null||d==null)throw"Invalid arguments";d=typeof d=="object"?d.toString():d+"";if(d=="")return null;for(var i=(h?h.shortYearCutoff:null)||this._defaults.shortYearCutoff,j=(h?h.dayNamesShort:null)||this._defaults.dayNamesShort,n=(h?h.dayNames:null)||this._defaults.dayNames,q=(h?h.monthNamesShort:null)||this._defaults.monthNamesShort,l=(h?h.monthNames:null)||this._defaults.monthNames,
301 k=h=-1,m=-1,o=-1,p=false,s=function(x){(x=y+1<a.length&&a.charAt(y+1)==x)&&y++;return x},r=function(x){var C=s(x);x=new RegExp("^\\d{1,"+(x=="@"?14:x=="!"?20:x=="y"&&C?4:x=="o"?3:2)+"}");x=d.substring(w).match(x);if(!x)throw"Missing number at position "+w;w+=x[0].length;return parseInt(x[0],10)},u=function(x,C,J){x=s(x)?J:C;for(C=0;C<x.length;C++)if(d.substr(w,x[C].length).toLowerCase()==x[C].toLowerCase()){w+=x[C].length;return C+1}throw"Unknown name at position "+w;},v=function(){if(d.charAt(w)!=
302 a.charAt(y))throw"Unexpected literal at position "+w;w++},w=0,y=0;y<a.length;y++)if(p)if(a.charAt(y)=="'"&&!s("'"))p=false;else v();else switch(a.charAt(y)){case "d":m=r("d");break;case "D":u("D",j,n);break;case "o":o=r("o");break;case "m":k=r("m");break;case "M":k=u("M",q,l);break;case "y":h=r("y");break;case "@":var B=new Date(r("@"));h=B.getFullYear();k=B.getMonth()+1;m=B.getDate();break;case "!":B=new Date((r("!")-this._ticksTo1970)/1E4);h=B.getFullYear();k=B.getMonth()+1;m=B.getDate();break;
303 case "'":if(s("'"))v();else p=true;break;default:v()}if(h==-1)h=(new Date).getFullYear();else if(h<100)h+=(new Date).getFullYear()-(new Date).getFullYear()%100+(h<=i?0:-100);if(o>-1){k=1;m=o;do{i=this._getDaysInMonth(h,k-1);if(m<=i)break;k++;m-=i}while(1)}B=this._daylightSavingAdjust(new Date(h,k-1,m));if(B.getFullYear()!=h||B.getMonth()+1!=k||B.getDate()!=m)throw"Invalid date";return B},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",
304 RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*24*60*60*1E7,formatDate:function(a,d,h){if(!d)return"";var i=(h?h.dayNamesShort:null)||this._defaults.dayNamesShort,j=(h?h.dayNames:null)||this._defaults.dayNames,n=(h?h.monthNamesShort:null)||this._defaults.monthNamesShort;h=(h?h.monthNames:null)||this._defaults.monthNames;var q=function(s){(s=p+1<a.length&&a.charAt(p+1)==s)&&p++;
305 return s},l=function(s,r,u){r=""+r;if(q(s))for(;r.length<u;)r="0"+r;return r},k=function(s,r,u,v){return q(s)?v[r]:u[r]},m="",o=false;if(d)for(var p=0;p<a.length;p++)if(o)if(a.charAt(p)=="'"&&!q("'"))o=false;else m+=a.charAt(p);else switch(a.charAt(p)){case "d":m+=l("d",d.getDate(),2);break;case "D":m+=k("D",d.getDay(),i,j);break;case "o":m+=l("o",(d.getTime()-(new Date(d.getFullYear(),0,0)).getTime())/864E5,3);break;case "m":m+=l("m",d.getMonth()+1,2);break;case "M":m+=k("M",d.getMonth(),n,h);break;
306 case "y":m+=q("y")?d.getFullYear():(d.getYear()%100<10?"0":"")+d.getYear()%100;break;case "@":m+=d.getTime();break;case "!":m+=d.getTime()*1E4+this._ticksTo1970;break;case "'":if(q("'"))m+="'";else o=true;break;default:m+=a.charAt(p)}return m},_possibleChars:function(a){for(var d="",h=false,i=function(n){(n=j+1<a.length&&a.charAt(j+1)==n)&&j++;return n},j=0;j<a.length;j++)if(h)if(a.charAt(j)=="'"&&!i("'"))h=false;else d+=a.charAt(j);else switch(a.charAt(j)){case "d":case "m":case "y":case "@":d+=
307 "0123456789";break;case "D":case "M":return null;case "'":if(i("'"))d+="'";else h=true;break;default:d+=a.charAt(j)}return d},_get:function(a,d){return a.settings[d]!==c?a.settings[d]:this._defaults[d]},_setDateFromField:function(a,d){if(a.input.val()!=a.lastVal){var h=this._get(a,"dateFormat"),i=a.lastVal=a.input?a.input.val():null,j,n;j=n=this._getDefaultDate(a);var q=this._getFormatConfig(a);try{j=this.parseDate(h,i,q)||n}catch(l){this.log(l);i=d?"":i}a.selectedDay=j.getDate();a.drawMonth=a.selectedMonth=
308 j.getMonth();a.drawYear=a.selectedYear=j.getFullYear();a.currentDay=i?j.getDate():0;a.currentMonth=i?j.getMonth():0;a.currentYear=i?j.getFullYear():0;this._adjustInstDate(a)}},_getDefaultDate:function(a){return this._restrictMinMax(a,this._determineDate(a,this._get(a,"defaultDate"),new Date))},_determineDate:function(a,d,h){var i=function(n){var q=new Date;q.setDate(q.getDate()+n);return q},j=function(n){try{return b.datepicker.parseDate(b.datepicker._get(a,"dateFormat"),n,b.datepicker._getFormatConfig(a))}catch(q){}var l=
309 (n.toLowerCase().match(/^c/)?b.datepicker._getDate(a):null)||new Date,k=l.getFullYear(),m=l.getMonth();l=l.getDate();for(var o=/([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,p=o.exec(n);p;){switch(p[2]||"d"){case "d":case "D":l+=parseInt(p[1],10);break;case "w":case "W":l+=parseInt(p[1],10)*7;break;case "m":case "M":m+=parseInt(p[1],10);l=Math.min(l,b.datepicker._getDaysInMonth(k,m));break;case "y":case "Y":k+=parseInt(p[1],10);l=Math.min(l,b.datepicker._getDaysInMonth(k,m));break}p=o.exec(n)}return new Date(k,
310 m,l)};if(d=(d=d==null||d===""?h:typeof d=="string"?j(d):typeof d=="number"?isNaN(d)?h:i(d):new Date(d.getTime()))&&d.toString()=="Invalid Date"?h:d){d.setHours(0);d.setMinutes(0);d.setSeconds(0);d.setMilliseconds(0)}return this._daylightSavingAdjust(d)},_daylightSavingAdjust:function(a){if(!a)return null;a.setHours(a.getHours()>12?a.getHours()+2:0);return a},_setDate:function(a,d,h){var i=!d,j=a.selectedMonth,n=a.selectedYear;d=this._restrictMinMax(a,this._determineDate(a,d,new Date));a.selectedDay=
311 a.currentDay=d.getDate();a.drawMonth=a.selectedMonth=a.currentMonth=d.getMonth();a.drawYear=a.selectedYear=a.currentYear=d.getFullYear();if((j!=a.selectedMonth||n!=a.selectedYear)&&!h)this._notifyChange(a);this._adjustInstDate(a);if(a.input)a.input.val(i?"":this._formatDate(a))},_getDate:function(a){return!a.currentYear||a.input&&a.input.val()==""?null:this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay))},_generateHTML:function(a){var d=new Date;d=this._daylightSavingAdjust(new Date(d.getFullYear(),
312 d.getMonth(),d.getDate()));var h=this._get(a,"isRTL"),i=this._get(a,"showButtonPanel"),j=this._get(a,"hideIfNoPrevNext"),n=this._get(a,"navigationAsDateFormat"),q=this._getNumberOfMonths(a),l=this._get(a,"showCurrentAtPos"),k=this._get(a,"stepMonths"),m=q[0]!=1||q[1]!=1,o=this._daylightSavingAdjust(!a.currentDay?new Date(9999,9,9):new Date(a.currentYear,a.currentMonth,a.currentDay)),p=this._getMinMaxDate(a,"min"),s=this._getMinMaxDate(a,"max");l=a.drawMonth-l;var r=a.drawYear;if(l<0){l+=12;r--}if(s){var u=
313 this._daylightSavingAdjust(new Date(s.getFullYear(),s.getMonth()-q[0]*q[1]+1,s.getDate()));for(u=p&&u<p?p:u;this._daylightSavingAdjust(new Date(r,l,1))>u;){l--;if(l<0){l=11;r--}}}a.drawMonth=l;a.drawYear=r;u=this._get(a,"prevText");u=!n?u:this.formatDate(u,this._daylightSavingAdjust(new Date(r,l-k,1)),this._getFormatConfig(a));u=this._canAdjustMonth(a,-1,r,l)?'<a class="ui-datepicker-prev ui-corner-all" onclick="DP_jQuery_'+e+".datepicker._adjustDate('#"+a.id+"', -"+k+", 'M');\" title=\""+u+'"><span class="ui-icon ui-icon-circle-triangle-'+
314 (h?"e":"w")+'">'+u+"</span></a>":j?"":'<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="'+u+'"><span class="ui-icon ui-icon-circle-triangle-'+(h?"e":"w")+'">'+u+"</span></a>";var v=this._get(a,"nextText");v=!n?v:this.formatDate(v,this._daylightSavingAdjust(new Date(r,l+k,1)),this._getFormatConfig(a));j=this._canAdjustMonth(a,+1,r,l)?'<a class="ui-datepicker-next ui-corner-all" onclick="DP_jQuery_'+e+".datepicker._adjustDate('#"+a.id+"', +"+k+", 'M');\" title=\""+v+'"><span class="ui-icon ui-icon-circle-triangle-'+
315 (h?"w":"e")+'">'+v+"</span></a>":j?"":'<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="'+v+'"><span class="ui-icon ui-icon-circle-triangle-'+(h?"w":"e")+'">'+v+"</span></a>";k=this._get(a,"currentText");v=this._get(a,"gotoCurrent")&&a.currentDay?o:d;k=!n?k:this.formatDate(k,v,this._getFormatConfig(a));n=!a.inline?'<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" onclick="DP_jQuery_'+e+'.datepicker._hideDatepicker();">'+this._get(a,
316 "closeText")+"</button>":"";i=i?'<div class="ui-datepicker-buttonpane ui-widget-content">'+(h?n:"")+(this._isInRange(a,v)?'<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" onclick="DP_jQuery_'+e+".datepicker._gotoToday('#"+a.id+"');\">"+k+"</button>":"")+(h?"":n)+"</div>":"";n=parseInt(this._get(a,"firstDay"),10);n=isNaN(n)?0:n;k=this._get(a,"showWeek");v=this._get(a,"dayNames");this._get(a,"dayNamesShort");var w=this._get(a,"dayNamesMin"),y=
317 this._get(a,"monthNames"),B=this._get(a,"monthNamesShort"),x=this._get(a,"beforeShowDay"),C=this._get(a,"showOtherMonths"),J=this._get(a,"selectOtherMonths");this._get(a,"calculateWeek");for(var M=this._getDefaultDate(a),K="",G=0;G<q[0];G++){for(var N="",H=0;H<q[1];H++){var O=this._daylightSavingAdjust(new Date(r,l,a.selectedDay)),A=" ui-corner-all",D="";if(m){D+='<div class="ui-datepicker-group';if(q[1]>1)switch(H){case 0:D+=" ui-datepicker-group-first";A=" ui-corner-"+(h?"right":"left");break;case q[1]-
318 1:D+=" ui-datepicker-group-last";A=" ui-corner-"+(h?"left":"right");break;default:D+=" ui-datepicker-group-middle";A="";break}D+='">'}D+='<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix'+A+'">'+(/all|left/.test(A)&&G==0?h?j:u:"")+(/all|right/.test(A)&&G==0?h?u:j:"")+this._generateMonthYearHeader(a,l,r,p,s,G>0||H>0,y,B)+'</div><table class="ui-datepicker-calendar"><thead><tr>';var E=k?'<th class="ui-datepicker-week-col">'+this._get(a,"weekHeader")+"</th>":"";for(A=0;A<7;A++){var z=
319 (A+n)%7;E+="<th"+((A+n+6)%7>=5?' class="ui-datepicker-week-end"':"")+'><span title="'+v[z]+'">'+w[z]+"</span></th>"}D+=E+"</tr></thead><tbody>";E=this._getDaysInMonth(r,l);if(r==a.selectedYear&&l==a.selectedMonth)a.selectedDay=Math.min(a.selectedDay,E);A=(this._getFirstDayOfMonth(r,l)-n+7)%7;E=m?6:Math.ceil((A+E)/7);z=this._daylightSavingAdjust(new Date(r,l,1-A));for(var P=0;P<E;P++){D+="<tr>";var Q=!k?"":'<td class="ui-datepicker-week-col">'+this._get(a,"calculateWeek")(z)+"</td>";for(A=0;A<7;A++){var I=
320 x?x.apply(a.input?a.input[0]:null,[z]):[true,""],F=z.getMonth()!=l,L=F&&!J||!I[0]||p&&z<p||s&&z>s;Q+='<td class="'+((A+n+6)%7>=5?" ui-datepicker-week-end":"")+(F?" ui-datepicker-other-month":"")+(z.getTime()==O.getTime()&&l==a.selectedMonth&&a._keyEvent||M.getTime()==z.getTime()&&M.getTime()==O.getTime()?" "+this._dayOverClass:"")+(L?" "+this._unselectableClass+" ui-state-disabled":"")+(F&&!C?"":" "+I[1]+(z.getTime()==o.getTime()?" "+this._currentClass:"")+(z.getTime()==d.getTime()?" ui-datepicker-today":
321 ""))+'"'+((!F||C)&&I[2]?' title="'+I[2]+'"':"")+(L?"":' onclick="DP_jQuery_'+e+".datepicker._selectDay('#"+a.id+"',"+z.getMonth()+","+z.getFullYear()+', this);return false;"')+">"+(F&&!C?"&#xa0;":L?'<span class="ui-state-default">'+z.getDate()+"</span>":'<a class="ui-state-default'+(z.getTime()==d.getTime()?" ui-state-highlight":"")+(z.getTime()==o.getTime()?" ui-state-active":"")+(F?" ui-priority-secondary":"")+'" href="#">'+z.getDate()+"</a>")+"</td>";z.setDate(z.getDate()+1);z=this._daylightSavingAdjust(z)}D+=
322 Q+"</tr>"}l++;if(l>11){l=0;r++}D+="</tbody></table>"+(m?"</div>"+(q[0]>0&&H==q[1]-1?'<div class="ui-datepicker-row-break"></div>':""):"");N+=D}K+=N}K+=i+(b.browser.msie&&parseInt(b.browser.version,10)<7&&!a.inline?'<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>':"");a._keyEvent=false;return K},_generateMonthYearHeader:function(a,d,h,i,j,n,q,l){var k=this._get(a,"changeMonth"),m=this._get(a,"changeYear"),o=this._get(a,"showMonthAfterYear"),p='<div class="ui-datepicker-title">',
323 s="";if(n||!k)s+='<span class="ui-datepicker-month">'+q[d]+"</span>";else{q=i&&i.getFullYear()==h;var r=j&&j.getFullYear()==h;s+='<select class="ui-datepicker-month" onchange="DP_jQuery_'+e+".datepicker._selectMonthYear('#"+a.id+"', this, 'M');\" onclick=\"DP_jQuery_"+e+".datepicker._clickMonthYear('#"+a.id+"');\">";for(var u=0;u<12;u++)if((!q||u>=i.getMonth())&&(!r||u<=j.getMonth()))s+='<option value="'+u+'"'+(u==d?' selected="selected"':"")+">"+l[u]+"</option>";s+="</select>"}o||(p+=s+(n||!(k&&
324 m)?"&#xa0;":""));a.yearshtml="";if(n||!m)p+='<span class="ui-datepicker-year">'+h+"</span>";else{l=this._get(a,"yearRange").split(":");var v=(new Date).getFullYear();q=function(w){w=w.match(/c[+-].*/)?h+parseInt(w.substring(1),10):w.match(/[+-].*/)?v+parseInt(w,10):parseInt(w,10);return isNaN(w)?v:w};d=q(l[0]);l=Math.max(d,q(l[1]||""));d=i?Math.max(d,i.getFullYear()):d;l=j?Math.min(l,j.getFullYear()):l;for(a.yearshtml+='<select class="ui-datepicker-year" onchange="DP_jQuery_'+e+".datepicker._selectMonthYear('#"+
325 a.id+"', this, 'Y');\" onclick=\"DP_jQuery_"+e+".datepicker._clickMonthYear('#"+a.id+"');\">";d<=l;d++)a.yearshtml+='<option value="'+d+'"'+(d==h?' selected="selected"':"")+">"+d+"</option>";a.yearshtml+="</select>";if(b.browser.mozilla)p+='<select class="ui-datepicker-year"><option value="'+h+'" selected="selected">'+h+"</option></select>";else{p+=a.yearshtml;a.yearshtml=null}}p+=this._get(a,"yearSuffix");if(o)p+=(n||!(k&&m)?"&#xa0;":"")+s;p+="</div>";return p},_adjustInstDate:function(a,d,h){var i=
326 a.drawYear+(h=="Y"?d:0),j=a.drawMonth+(h=="M"?d:0);d=Math.min(a.selectedDay,this._getDaysInMonth(i,j))+(h=="D"?d:0);i=this._restrictMinMax(a,this._daylightSavingAdjust(new Date(i,j,d)));a.selectedDay=i.getDate();a.drawMonth=a.selectedMonth=i.getMonth();a.drawYear=a.selectedYear=i.getFullYear();if(h=="M"||h=="Y")this._notifyChange(a)},_restrictMinMax:function(a,d){var h=this._getMinMaxDate(a,"min");a=this._getMinMaxDate(a,"max");d=h&&d<h?h:d;return d=a&&d>a?a:d},_notifyChange:function(a){var d=this._get(a,
327 "onChangeMonthYear");if(d)d.apply(a.input?a.input[0]:null,[a.selectedYear,a.selectedMonth+1,a])},_getNumberOfMonths:function(a){a=this._get(a,"numberOfMonths");return a==null?[1,1]:typeof a=="number"?[1,a]:a},_getMinMaxDate:function(a,d){return this._determineDate(a,this._get(a,d+"Date"),null)},_getDaysInMonth:function(a,d){return 32-(new Date(a,d,32)).getDate()},_getFirstDayOfMonth:function(a,d){return(new Date(a,d,1)).getDay()},_canAdjustMonth:function(a,d,h,i){var j=this._getNumberOfMonths(a);
328 h=this._daylightSavingAdjust(new Date(h,i+(d<0?d:j[0]*j[1]),1));d<0&&h.setDate(this._getDaysInMonth(h.getFullYear(),h.getMonth()));return this._isInRange(a,h)},_isInRange:function(a,d){var h=this._getMinMaxDate(a,"min");a=this._getMinMaxDate(a,"max");return(!h||d.getTime()>=h.getTime())&&(!a||d.getTime()<=a.getTime())},_getFormatConfig:function(a){var d=this._get(a,"shortYearCutoff");d=typeof d!="string"?d:(new Date).getFullYear()%100+parseInt(d,10);return{shortYearCutoff:d,dayNamesShort:this._get(a,
329 "dayNamesShort"),dayNames:this._get(a,"dayNames"),monthNamesShort:this._get(a,"monthNamesShort"),monthNames:this._get(a,"monthNames")}},_formatDate:function(a,d,h,i){if(!d){a.currentDay=a.selectedDay;a.currentMonth=a.selectedMonth;a.currentYear=a.selectedYear}d=d?typeof d=="object"?d:this._daylightSavingAdjust(new Date(i,h,d)):this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return this.formatDate(this._get(a,"dateFormat"),d,this._getFormatConfig(a))}});b.fn.datepicker=
330 function(a){if(!b.datepicker.initialized){b(document).mousedown(b.datepicker._checkExternalClick).find("body").append(b.datepicker.dpDiv);b.datepicker.initialized=true}var d=Array.prototype.slice.call(arguments,1);if(typeof a=="string"&&(a=="isDisabled"||a=="getDate"||a=="widget"))return b.datepicker["_"+a+"Datepicker"].apply(b.datepicker,[this[0]].concat(d));if(a=="option"&&arguments.length==2&&typeof arguments[1]=="string")return b.datepicker["_"+a+"Datepicker"].apply(b.datepicker,[this[0]].concat(d));
331 return this.each(function(){typeof a=="string"?b.datepicker["_"+a+"Datepicker"].apply(b.datepicker,[this].concat(d)):b.datepicker._attachDatepicker(this,a)})};b.datepicker=new f;b.datepicker.initialized=false;b.datepicker.uuid=(new Date).getTime();b.datepicker.version="1.8.8";window["DP_jQuery_"+e]=b})(jQuery);
332 (function(b,c){var f={buttons:true,height:true,maxHeight:true,maxWidth:true,minHeight:true,minWidth:true,width:true},g={maxHeight:true,maxWidth:true,minHeight:true,minWidth:true};b.widget("ui.dialog",{options:{autoOpen:true,buttons:{},closeOnEscape:true,closeText:"close",dialogClass:"",draggable:true,hide:null,height:"auto",maxHeight:false,maxWidth:false,minHeight:150,minWidth:150,modal:false,position:{my:"center",at:"center",collision:"fit",using:function(e){var a=b(this).css(e).offset().top;a<0&&
333 b(this).css("top",e.top-a)}},resizable:true,show:null,stack:true,title:"",width:300,zIndex:1E3},_create:function(){this.originalTitle=this.element.attr("title");if(typeof this.originalTitle!=="string")this.originalTitle="";this.options.title=this.options.title||this.originalTitle;var e=this,a=e.options,d=a.title||"&#160;",h=b.ui.dialog.getTitleId(e.element),i=(e.uiDialog=b("<div></div>")).appendTo(document.body).hide().addClass("ui-dialog ui-widget ui-widget-content ui-corner-all "+a.dialogClass).css({zIndex:a.zIndex}).attr("tabIndex",
334 -1).css("outline",0).keydown(function(q){if(a.closeOnEscape&&q.keyCode&&q.keyCode===b.ui.keyCode.ESCAPE){e.close(q);q.preventDefault()}}).attr({role:"dialog","aria-labelledby":h}).mousedown(function(q){e.moveToTop(false,q)});e.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(i);var j=(e.uiDialogTitlebar=b("<div></div>")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(i),n=b('<a href="#"></a>').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role",
335 "button").hover(function(){n.addClass("ui-state-hover")},function(){n.removeClass("ui-state-hover")}).focus(function(){n.addClass("ui-state-focus")}).blur(function(){n.removeClass("ui-state-focus")}).click(function(q){e.close(q);return false}).appendTo(j);(e.uiDialogTitlebarCloseText=b("<span></span>")).addClass("ui-icon ui-icon-closethick").text(a.closeText).appendTo(n);b("<span></span>").addClass("ui-dialog-title").attr("id",h).html(d).prependTo(j);if(b.isFunction(a.beforeclose)&&!b.isFunction(a.beforeClose))a.beforeClose=
336 a.beforeclose;j.find("*").add(j).disableSelection();a.draggable&&b.fn.draggable&&e._makeDraggable();a.resizable&&b.fn.resizable&&e._makeResizable();e._createButtons(a.buttons);e._isOpen=false;b.fn.bgiframe&&i.bgiframe()},_init:function(){this.options.autoOpen&&this.open()},destroy:function(){var e=this;e.overlay&&e.overlay.destroy();e.uiDialog.hide();e.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body");e.uiDialog.remove();e.originalTitle&&
337 e.element.attr("title",e.originalTitle);return e},widget:function(){return this.uiDialog},close:function(e){var a=this,d,h;if(false!==a._trigger("beforeClose",e)){a.overlay&&a.overlay.destroy();a.uiDialog.unbind("keypress.ui-dialog");a._isOpen=false;if(a.options.hide)a.uiDialog.hide(a.options.hide,function(){a._trigger("close",e)});else{a.uiDialog.hide();a._trigger("close",e)}b.ui.dialog.overlay.resize();if(a.options.modal){d=0;b(".ui-dialog").each(function(){if(this!==a.uiDialog[0]){h=b(this).css("z-index");
338 isNaN(h)||(d=Math.max(d,h))}});b.ui.dialog.maxZ=d}return a}},isOpen:function(){return this._isOpen},moveToTop:function(e,a){var d=this,h=d.options;if(h.modal&&!e||!h.stack&&!h.modal)return d._trigger("focus",a);if(h.zIndex>b.ui.dialog.maxZ)b.ui.dialog.maxZ=h.zIndex;if(d.overlay){b.ui.dialog.maxZ+=1;d.overlay.$el.css("z-index",b.ui.dialog.overlay.maxZ=b.ui.dialog.maxZ)}e={scrollTop:d.element.attr("scrollTop"),scrollLeft:d.element.attr("scrollLeft")};b.ui.dialog.maxZ+=1;d.uiDialog.css("z-index",b.ui.dialog.maxZ);
339 d.element.attr(e);d._trigger("focus",a);return d},open:function(){if(!this._isOpen){var e=this,a=e.options,d=e.uiDialog;e.overlay=a.modal?new b.ui.dialog.overlay(e):null;e._size();e._position(a.position);d.show(a.show);e.moveToTop(true);a.modal&&d.bind("keypress.ui-dialog",function(h){if(h.keyCode===b.ui.keyCode.TAB){var i=b(":tabbable",this),j=i.filter(":first");i=i.filter(":last");if(h.target===i[0]&&!h.shiftKey){j.focus(1);return false}else if(h.target===j[0]&&h.shiftKey){i.focus(1);return false}}});
340 b(e.element.find(":tabbable").get().concat(d.find(".ui-dialog-buttonpane :tabbable").get().concat(d.get()))).eq(0).focus();e._isOpen=true;e._trigger("open");return e}},_createButtons:function(e){var a=this,d=false,h=b("<div></div>").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),i=b("<div></div>").addClass("ui-dialog-buttonset").appendTo(h);a.uiDialog.find(".ui-dialog-buttonpane").remove();typeof e==="object"&&e!==null&&b.each(e,function(){return!(d=true)});if(d){b.each(e,function(j,
341 n){n=b.isFunction(n)?{click:n,text:j}:n;j=b('<button type="button"></button>').attr(n,true).unbind("click").click(function(){n.click.apply(a.element[0],arguments)}).appendTo(i);b.fn.button&&j.button()});h.appendTo(a.uiDialog)}},_makeDraggable:function(){function e(j){return{position:j.position,offset:j.offset}}var a=this,d=a.options,h=b(document),i;a.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(j,n){i=
342 d.height==="auto"?"auto":b(this).height();b(this).height(b(this).height()).addClass("ui-dialog-dragging");a._trigger("dragStart",j,e(n))},drag:function(j,n){a._trigger("drag",j,e(n))},stop:function(j,n){d.position=[n.position.left-h.scrollLeft(),n.position.top-h.scrollTop()];b(this).removeClass("ui-dialog-dragging").height(i);a._trigger("dragStop",j,e(n));b.ui.dialog.overlay.resize()}})},_makeResizable:function(e){function a(j){return{originalPosition:j.originalPosition,originalSize:j.originalSize,
343 position:j.position,size:j.size}}e=e===c?this.options.resizable:e;var d=this,h=d.options,i=d.uiDialog.css("position");e=typeof e==="string"?e:"n,e,s,w,se,sw,ne,nw";d.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:d.element,maxWidth:h.maxWidth,maxHeight:h.maxHeight,minWidth:h.minWidth,minHeight:d._minHeight(),handles:e,start:function(j,n){b(this).addClass("ui-dialog-resizing");d._trigger("resizeStart",j,a(n))},resize:function(j,n){d._trigger("resize",j,a(n))},stop:function(j,
344 n){b(this).removeClass("ui-dialog-resizing");h.height=b(this).height();h.width=b(this).width();d._trigger("resizeStop",j,a(n));b.ui.dialog.overlay.resize()}}).css("position",i).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_minHeight:function(){var e=this.options;return e.height==="auto"?e.minHeight:Math.min(e.minHeight,e.height)},_position:function(e){var a=[],d=[0,0],h;if(e){if(typeof e==="string"||typeof e==="object"&&"0"in e){a=e.split?e.split(" "):[e[0],e[1]];if(a.length===
345 1)a[1]=a[0];b.each(["left","top"],function(i,j){if(+a[i]===a[i]){d[i]=a[i];a[i]=j}});e={my:a.join(" "),at:a.join(" "),offset:d.join(" ")}}e=b.extend({},b.ui.dialog.prototype.options.position,e)}else e=b.ui.dialog.prototype.options.position;(h=this.uiDialog.is(":visible"))||this.uiDialog.show();this.uiDialog.css({top:0,left:0}).position(b.extend({of:window},e));h||this.uiDialog.hide()},_setOptions:function(e){var a=this,d={},h=false;b.each(e,function(i,j){a._setOption(i,j);if(i in f)h=true;if(i in
346 g)d[i]=j});h&&this._size();this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option",d)},_setOption:function(e,a){var d=this,h=d.uiDialog;switch(e){case "beforeclose":e="beforeClose";break;case "buttons":d._createButtons(a);break;case "closeText":d.uiDialogTitlebarCloseText.text(""+a);break;case "dialogClass":h.removeClass(d.options.dialogClass).addClass("ui-dialog ui-widget ui-widget-content ui-corner-all "+a);break;case "disabled":a?h.addClass("ui-dialog-disabled"):h.removeClass("ui-dialog-disabled");
347 break;case "draggable":var i=h.is(":data(draggable)");i&&!a&&h.draggable("destroy");!i&&a&&d._makeDraggable();break;case "position":d._position(a);break;case "resizable":(i=h.is(":data(resizable)"))&&!a&&h.resizable("destroy");i&&typeof a==="string"&&h.resizable("option","handles",a);!i&&a!==false&&d._makeResizable(a);break;case "title":b(".ui-dialog-title",d.uiDialogTitlebar).html(""+(a||"&#160;"));break}b.Widget.prototype._setOption.apply(d,arguments)},_size:function(){var e=this.options,a,d,h=
348 this.uiDialog.is(":visible");this.element.show().css({width:"auto",minHeight:0,height:0});if(e.minWidth>e.width)e.width=e.minWidth;a=this.uiDialog.css({height:"auto",width:e.width}).height();d=Math.max(0,e.minHeight-a);if(e.height==="auto")if(b.support.minHeight)this.element.css({minHeight:d,height:"auto"});else{this.uiDialog.show();e=this.element.css("height","auto").height();h||this.uiDialog.hide();this.element.height(Math.max(e,d))}else this.element.height(Math.max(e.height-a,0));this.uiDialog.is(":data(resizable)")&&
349 this.uiDialog.resizable("option","minHeight",this._minHeight())}});b.extend(b.ui.dialog,{version:"1.8.8",uuid:0,maxZ:0,getTitleId:function(e){e=e.attr("id");if(!e){this.uuid+=1;e=this.uuid}return"ui-dialog-title-"+e},overlay:function(e){this.$el=b.ui.dialog.overlay.create(e)}});b.extend(b.ui.dialog.overlay,{instances:[],oldInstances:[],maxZ:0,events:b.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(e){return e+".dialog-overlay"}).join(" "),create:function(e){if(this.instances.length===
350 0){setTimeout(function(){b.ui.dialog.overlay.instances.length&&b(document).bind(b.ui.dialog.overlay.events,function(d){if(b(d.target).zIndex()<b.ui.dialog.overlay.maxZ)return false})},1);b(document).bind("keydown.dialog-overlay",function(d){if(e.options.closeOnEscape&&d.keyCode&&d.keyCode===b.ui.keyCode.ESCAPE){e.close(d);d.preventDefault()}});b(window).bind("resize.dialog-overlay",b.ui.dialog.overlay.resize)}var a=(this.oldInstances.pop()||b("<div></div>").addClass("ui-widget-overlay")).appendTo(document.body).css({width:this.width(),
351 height:this.height()});b.fn.bgiframe&&a.bgiframe();this.instances.push(a);return a},destroy:function(e){var a=b.inArray(e,this.instances);a!=-1&&this.oldInstances.push(this.instances.splice(a,1)[0]);this.instances.length===0&&b([document,window]).unbind(".dialog-overlay");e.remove();var d=0;b.each(this.instances,function(){d=Math.max(d,this.css("z-index"))});this.maxZ=d},height:function(){var e,a;if(b.browser.msie&&b.browser.version<7){e=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);
352 a=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight);return e<a?b(window).height()+"px":e+"px"}else return b(document).height()+"px"},width:function(){var e,a;if(b.browser.msie&&b.browser.version<7){e=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth);a=Math.max(document.documentElement.offsetWidth,document.body.offsetWidth);return e<a?b(window).width()+"px":e+"px"}else return b(document).width()+"px"},resize:function(){var e=b([]);b.each(b.ui.dialog.overlay.instances,
353 function(){e=e.add(this)});e.css({width:0,height:0}).css({width:b.ui.dialog.overlay.width(),height:b.ui.dialog.overlay.height()})}});b.extend(b.ui.dialog.overlay.prototype,{destroy:function(){b.ui.dialog.overlay.destroy(this.$el)}})})(jQuery);
354 (function(b){b.ui=b.ui||{};var c=/left|center|right/,f=/top|center|bottom/,g=b.fn.position,e=b.fn.offset;b.fn.position=function(a){if(!a||!a.of)return g.apply(this,arguments);a=b.extend({},a);var d=b(a.of),h=d[0],i=(a.collision||"flip").split(" "),j=a.offset?a.offset.split(" "):[0,0],n,q,l;if(h.nodeType===9){n=d.width();q=d.height();l={top:0,left:0}}else if(h.setTimeout){n=d.width();q=d.height();l={top:d.scrollTop(),left:d.scrollLeft()}}else if(h.preventDefault){a.at="left top";n=q=0;l={top:a.of.pageY,
355 left:a.of.pageX}}else{n=d.outerWidth();q=d.outerHeight();l=d.offset()}b.each(["my","at"],function(){var k=(a[this]||"").split(" ");if(k.length===1)k=c.test(k[0])?k.concat(["center"]):f.test(k[0])?["center"].concat(k):["center","center"];k[0]=c.test(k[0])?k[0]:"center";k[1]=f.test(k[1])?k[1]:"center";a[this]=k});if(i.length===1)i[1]=i[0];j[0]=parseInt(j[0],10)||0;if(j.length===1)j[1]=j[0];j[1]=parseInt(j[1],10)||0;if(a.at[0]==="right")l.left+=n;else if(a.at[0]==="center")l.left+=n/2;if(a.at[1]==="bottom")l.top+=
356 q;else if(a.at[1]==="center")l.top+=q/2;l.left+=j[0];l.top+=j[1];return this.each(function(){var k=b(this),m=k.outerWidth(),o=k.outerHeight(),p=parseInt(b.curCSS(this,"marginLeft",true))||0,s=parseInt(b.curCSS(this,"marginTop",true))||0,r=m+p+(parseInt(b.curCSS(this,"marginRight",true))||0),u=o+s+(parseInt(b.curCSS(this,"marginBottom",true))||0),v=b.extend({},l),w;if(a.my[0]==="right")v.left-=m;else if(a.my[0]==="center")v.left-=m/2;if(a.my[1]==="bottom")v.top-=o;else if(a.my[1]==="center")v.top-=
357 o/2;v.left=Math.round(v.left);v.top=Math.round(v.top);w={left:v.left-p,top:v.top-s};b.each(["left","top"],function(y,B){b.ui.position[i[y]]&&b.ui.position[i[y]][B](v,{targetWidth:n,targetHeight:q,elemWidth:m,elemHeight:o,collisionPosition:w,collisionWidth:r,collisionHeight:u,offset:j,my:a.my,at:a.at})});b.fn.bgiframe&&k.bgiframe();k.offset(b.extend(v,{using:a.using}))})};b.ui.position={fit:{left:function(a,d){var h=b(window);h=d.collisionPosition.left+d.collisionWidth-h.width()-h.scrollLeft();a.left=
358 h>0?a.left-h:Math.max(a.left-d.collisionPosition.left,a.left)},top:function(a,d){var h=b(window);h=d.collisionPosition.top+d.collisionHeight-h.height()-h.scrollTop();a.top=h>0?a.top-h:Math.max(a.top-d.collisionPosition.top,a.top)}},flip:{left:function(a,d){if(d.at[0]!=="center"){var h=b(window);h=d.collisionPosition.left+d.collisionWidth-h.width()-h.scrollLeft();var i=d.my[0]==="left"?-d.elemWidth:d.my[0]==="right"?d.elemWidth:0,j=d.at[0]==="left"?d.targetWidth:-d.targetWidth,n=-2*d.offset[0];a.left+=
359 d.collisionPosition.left<0?i+j+n:h>0?i+j+n:0}},top:function(a,d){if(d.at[1]!=="center"){var h=b(window);h=d.collisionPosition.top+d.collisionHeight-h.height()-h.scrollTop();var i=d.my[1]==="top"?-d.elemHeight:d.my[1]==="bottom"?d.elemHeight:0,j=d.at[1]==="top"?d.targetHeight:-d.targetHeight,n=-2*d.offset[1];a.top+=d.collisionPosition.top<0?i+j+n:h>0?i+j+n:0}}}};if(!b.offset.setOffset){b.offset.setOffset=function(a,d){if(/static/.test(b.curCSS(a,"position")))a.style.position="relative";var h=b(a),
360 i=h.offset(),j=parseInt(b.curCSS(a,"top",true),10)||0,n=parseInt(b.curCSS(a,"left",true),10)||0;i={top:d.top-i.top+j,left:d.left-i.left+n};"using"in d?d.using.call(a,i):h.css(i)};b.fn.offset=function(a){var d=this[0];if(!d||!d.ownerDocument)return null;if(a)return this.each(function(){b.offset.setOffset(this,a)});return e.call(this)}}})(jQuery);
361 (function(b,c){b.widget("ui.progressbar",{options:{value:0,max:100},min:0,_create:function(){this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min,"aria-valuemax":this.options.max,"aria-valuenow":this._value()});this.valueDiv=b("<div class='ui-progressbar-value ui-widget-header ui-corner-left'></div>").appendTo(this.element);this.oldValue=this._value();this._refreshValue()},destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow");
362 this.valueDiv.remove();b.Widget.prototype.destroy.apply(this,arguments)},value:function(f){if(f===c)return this._value();this._setOption("value",f);return this},_setOption:function(f,g){if(f==="value"){this.options.value=g;this._refreshValue();this._value()===this.options.max&&this._trigger("complete")}b.Widget.prototype._setOption.apply(this,arguments)},_value:function(){var f=this.options.value;if(typeof f!=="number")f=0;return Math.min(this.options.max,Math.max(this.min,f))},_percentage:function(){return 100*
363 this._value()/this.options.max},_refreshValue:function(){var f=this.value(),g=this._percentage();if(this.oldValue!==f){this.oldValue=f;this._trigger("change")}this.valueDiv.toggleClass("ui-corner-right",f===this.options.max).width(g.toFixed(0)+"%");this.element.attr("aria-valuenow",f)}});b.extend(b.ui.progressbar,{version:"1.8.8"})})(jQuery);
364 (function(b){b.widget("ui.slider",b.ui.mouse,{widgetEventPrefix:"slide",options:{animate:false,distance:0,max:100,min:0,orientation:"horizontal",range:false,step:1,value:0,values:null},_create:function(){var c=this,f=this.options;this._mouseSliding=this._keySliding=false;this._animateOff=true;this._handleIndex=null;this._detectOrientation();this._mouseInit();this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all");f.disabled&&this.element.addClass("ui-slider-disabled ui-disabled");
365 this.range=b([]);if(f.range){if(f.range===true){this.range=b("<div></div>");if(!f.values)f.values=[this._valueMin(),this._valueMin()];if(f.values.length&&f.values.length!==2)f.values=[f.values[0],f.values[0]]}else this.range=b("<div></div>");this.range.appendTo(this.element).addClass("ui-slider-range");if(f.range==="min"||f.range==="max")this.range.addClass("ui-slider-range-"+f.range);this.range.addClass("ui-widget-header")}b(".ui-slider-handle",this.element).length===0&&b("<a href='#'></a>").appendTo(this.element).addClass("ui-slider-handle");
366 if(f.values&&f.values.length)for(;b(".ui-slider-handle",this.element).length<f.values.length;)b("<a href='#'></a>").appendTo(this.element).addClass("ui-slider-handle");this.handles=b(".ui-slider-handle",this.element).addClass("ui-state-default ui-corner-all");this.handle=this.handles.eq(0);this.handles.add(this.range).filter("a").click(function(g){g.preventDefault()}).hover(function(){f.disabled||b(this).addClass("ui-state-hover")},function(){b(this).removeClass("ui-state-hover")}).focus(function(){if(f.disabled)b(this).blur();
367 else{b(".ui-slider .ui-state-focus").removeClass("ui-state-focus");b(this).addClass("ui-state-focus")}}).blur(function(){b(this).removeClass("ui-state-focus")});this.handles.each(function(g){b(this).data("index.ui-slider-handle",g)});this.handles.keydown(function(g){var e=true,a=b(this).data("index.ui-slider-handle"),d,h,i;if(!c.options.disabled){switch(g.keyCode){case b.ui.keyCode.HOME:case b.ui.keyCode.END:case b.ui.keyCode.PAGE_UP:case b.ui.keyCode.PAGE_DOWN:case b.ui.keyCode.UP:case b.ui.keyCode.RIGHT:case b.ui.keyCode.DOWN:case b.ui.keyCode.LEFT:e=
368 false;if(!c._keySliding){c._keySliding=true;b(this).addClass("ui-state-active");d=c._start(g,a);if(d===false)return}break}i=c.options.step;d=c.options.values&&c.options.values.length?(h=c.values(a)):(h=c.value());switch(g.keyCode){case b.ui.keyCode.HOME:h=c._valueMin();break;case b.ui.keyCode.END:h=c._valueMax();break;case b.ui.keyCode.PAGE_UP:h=c._trimAlignValue(d+(c._valueMax()-c._valueMin())/5);break;case b.ui.keyCode.PAGE_DOWN:h=c._trimAlignValue(d-(c._valueMax()-c._valueMin())/5);break;case b.ui.keyCode.UP:case b.ui.keyCode.RIGHT:if(d===
369 c._valueMax())return;h=c._trimAlignValue(d+i);break;case b.ui.keyCode.DOWN:case b.ui.keyCode.LEFT:if(d===c._valueMin())return;h=c._trimAlignValue(d-i);break}c._slide(g,a,h);return e}}).keyup(function(g){var e=b(this).data("index.ui-slider-handle");if(c._keySliding){c._keySliding=false;c._stop(g,e);c._change(g,e);b(this).removeClass("ui-state-active")}});this._refreshValue();this._animateOff=false},destroy:function(){this.handles.remove();this.range.remove();this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider");
370 this._mouseDestroy();return this},_mouseCapture:function(c){var f=this.options,g,e,a,d,h;if(f.disabled)return false;this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();g=this._normValueFromMouse({x:c.pageX,y:c.pageY});e=this._valueMax()-this._valueMin()+1;d=this;this.handles.each(function(i){var j=Math.abs(g-d.values(i));if(e>j){e=j;a=b(this);h=i}});if(f.range===true&&this.values(1)===f.min){h+=1;a=b(this.handles[h])}if(this._start(c,
371 h)===false)return false;this._mouseSliding=true;d._handleIndex=h;a.addClass("ui-state-active").focus();f=a.offset();this._clickOffset=!b(c.target).parents().andSelf().is(".ui-slider-handle")?{left:0,top:0}:{left:c.pageX-f.left-a.width()/2,top:c.pageY-f.top-a.height()/2-(parseInt(a.css("borderTopWidth"),10)||0)-(parseInt(a.css("borderBottomWidth"),10)||0)+(parseInt(a.css("marginTop"),10)||0)};this.handles.hasClass("ui-state-hover")||this._slide(c,h,g);return this._animateOff=true},_mouseStart:function(){return true},
372 _mouseDrag:function(c){var f=this._normValueFromMouse({x:c.pageX,y:c.pageY});this._slide(c,this._handleIndex,f);return false},_mouseStop:function(c){this.handles.removeClass("ui-state-active");this._mouseSliding=false;this._stop(c,this._handleIndex);this._change(c,this._handleIndex);this._clickOffset=this._handleIndex=null;return this._animateOff=false},_detectOrientation:function(){this.orientation=this.options.orientation==="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(c){var f;
373 if(this.orientation==="horizontal"){f=this.elementSize.width;c=c.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)}else{f=this.elementSize.height;c=c.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)}f=c/f;if(f>1)f=1;if(f<0)f=0;if(this.orientation==="vertical")f=1-f;c=this._valueMax()-this._valueMin();return this._trimAlignValue(this._valueMin()+f*c)},_start:function(c,f){var g={handle:this.handles[f],value:this.value()};if(this.options.values&&this.options.values.length){g.value=
374 this.values(f);g.values=this.values()}return this._trigger("start",c,g)},_slide:function(c,f,g){var e;if(this.options.values&&this.options.values.length){e=this.values(f?0:1);if(this.options.values.length===2&&this.options.range===true&&(f===0&&g>e||f===1&&g<e))g=e;if(g!==this.values(f)){e=this.values();e[f]=g;c=this._trigger("slide",c,{handle:this.handles[f],value:g,values:e});this.values(f?0:1);c!==false&&this.values(f,g,true)}}else if(g!==this.value()){c=this._trigger("slide",c,{handle:this.handles[f],
375 value:g});c!==false&&this.value(g)}},_stop:function(c,f){var g={handle:this.handles[f],value:this.value()};if(this.options.values&&this.options.values.length){g.value=this.values(f);g.values=this.values()}this._trigger("stop",c,g)},_change:function(c,f){if(!this._keySliding&&!this._mouseSliding){var g={handle:this.handles[f],value:this.value()};if(this.options.values&&this.options.values.length){g.value=this.values(f);g.values=this.values()}this._trigger("change",c,g)}},value:function(c){if(arguments.length){this.options.value=
376 this._trimAlignValue(c);this._refreshValue();this._change(null,0)}return this._value()},values:function(c,f){var g,e,a;if(arguments.length>1){this.options.values[c]=this._trimAlignValue(f);this._refreshValue();this._change(null,c)}if(arguments.length)if(b.isArray(arguments[0])){g=this.options.values;e=arguments[0];for(a=0;a<g.length;a+=1){g[a]=this._trimAlignValue(e[a]);this._change(null,a)}this._refreshValue()}else return this.options.values&&this.options.values.length?this._values(c):this.value();
377 else return this._values()},_setOption:function(c,f){var g,e=0;if(b.isArray(this.options.values))e=this.options.values.length;b.Widget.prototype._setOption.apply(this,arguments);switch(c){case "disabled":if(f){this.handles.filter(".ui-state-focus").blur();this.handles.removeClass("ui-state-hover");this.handles.attr("disabled","disabled");this.element.addClass("ui-disabled")}else{this.handles.removeAttr("disabled");this.element.removeClass("ui-disabled")}break;case "orientation":this._detectOrientation();
378 this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-"+this.orientation);this._refreshValue();break;case "value":this._animateOff=true;this._refreshValue();this._change(null,0);this._animateOff=false;break;case "values":this._animateOff=true;this._refreshValue();for(g=0;g<e;g+=1)this._change(null,g);this._animateOff=false;break}},_value:function(){var c=this.options.value;return c=this._trimAlignValue(c)},_values:function(c){var f,g;if(arguments.length){f=this.options.values[c];
379 return f=this._trimAlignValue(f)}else{f=this.options.values.slice();for(g=0;g<f.length;g+=1)f[g]=this._trimAlignValue(f[g]);return f}},_trimAlignValue:function(c){if(c<=this._valueMin())return this._valueMin();if(c>=this._valueMax())return this._valueMax();var f=this.options.step>0?this.options.step:1,g=(c-this._valueMin())%f;alignValue=c-g;if(Math.abs(g)*2>=f)alignValue+=g>0?f:-f;return parseFloat(alignValue.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},
380 _refreshValue:function(){var c=this.options.range,f=this.options,g=this,e=!this._animateOff?f.animate:false,a,d={},h,i,j,n;if(this.options.values&&this.options.values.length)this.handles.each(function(q){a=(g.values(q)-g._valueMin())/(g._valueMax()-g._valueMin())*100;d[g.orientation==="horizontal"?"left":"bottom"]=a+"%";b(this).stop(1,1)[e?"animate":"css"](d,f.animate);if(g.options.range===true)if(g.orientation==="horizontal"){if(q===0)g.range.stop(1,1)[e?"animate":"css"]({left:a+"%"},f.animate);
381 if(q===1)g.range[e?"animate":"css"]({width:a-h+"%"},{queue:false,duration:f.animate})}else{if(q===0)g.range.stop(1,1)[e?"animate":"css"]({bottom:a+"%"},f.animate);if(q===1)g.range[e?"animate":"css"]({height:a-h+"%"},{queue:false,duration:f.animate})}h=a});else{i=this.value();j=this._valueMin();n=this._valueMax();a=n!==j?(i-j)/(n-j)*100:0;d[g.orientation==="horizontal"?"left":"bottom"]=a+"%";this.handle.stop(1,1)[e?"animate":"css"](d,f.animate);if(c==="min"&&this.orientation==="horizontal")this.range.stop(1,
382 1)[e?"animate":"css"]({width:a+"%"},f.animate);if(c==="max"&&this.orientation==="horizontal")this.range[e?"animate":"css"]({width:100-a+"%"},{queue:false,duration:f.animate});if(c==="min"&&this.orientation==="vertical")this.range.stop(1,1)[e?"animate":"css"]({height:a+"%"},f.animate);if(c==="max"&&this.orientation==="vertical")this.range[e?"animate":"css"]({height:100-a+"%"},{queue:false,duration:f.animate})}}});b.extend(b.ui.slider,{version:"1.8.8"})})(jQuery);
383 (function(b,c){function f(){return++e}function g(){return++a}var e=0,a=0;b.widget("ui.tabs",{options:{add:null,ajaxOptions:null,cache:false,cookie:null,collapsible:false,disable:null,disabled:[],enable:null,event:"click",fx:null,idPrefix:"ui-tabs-",load:null,panelTemplate:"<div></div>",remove:null,select:null,show:null,spinner:"<em>Loading&#8230;</em>",tabTemplate:"<li><a href='#{href}'><span>#{label}</span></a></li>"},_create:function(){this._tabify(true)},_setOption:function(d,h){if(d=="selected")this.options.collapsible&&
384 h==this.options.selected||this.select(h);else{this.options[d]=h;this._tabify()}},_tabId:function(d){return d.title&&d.title.replace(/\s/g,"_").replace(/[^\w\u00c0-\uFFFF-]/g,"")||this.options.idPrefix+f()},_sanitizeSelector:function(d){return d.replace(/:/g,"\\:")},_cookie:function(){var d=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+g());return b.cookie.apply(null,[d].concat(b.makeArray(arguments)))},_ui:function(d,h){return{tab:d,panel:h,index:this.anchors.index(d)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var d=
385 b(this);d.html(d.data("label.tabs")).removeData("label.tabs")})},_tabify:function(d){function h(r,u){r.css("display","");!b.support.opacity&&u.opacity&&r[0].style.removeAttribute("filter")}var i=this,j=this.options,n=/^#.+/;this.list=this.element.find("ol,ul").eq(0);this.lis=b(" > li:has(a[href])",this.list);this.anchors=this.lis.map(function(){return b("a",this)[0]});this.panels=b([]);this.anchors.each(function(r,u){var v=b(u).attr("href"),w=v.split("#")[0],y;if(w&&(w===location.toString().split("#")[0]||
386 (y=b("base")[0])&&w===y.href)){v=u.hash;u.href=v}if(n.test(v))i.panels=i.panels.add(i.element.find(i._sanitizeSelector(v)));else if(v&&v!=="#"){b.data(u,"href.tabs",v);b.data(u,"load.tabs",v.replace(/#.*$/,""));v=i._tabId(u);u.href="#"+v;u=i.element.find("#"+v);if(!u.length){u=b(j.panelTemplate).attr("id",v).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(i.panels[r-1]||i.list);u.data("destroy.tabs",true)}i.panels=i.panels.add(u)}else j.disabled.push(r)});if(d){this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all");
387 this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.lis.addClass("ui-state-default ui-corner-top");this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom");if(j.selected===c){location.hash&&this.anchors.each(function(r,u){if(u.hash==location.hash){j.selected=r;return false}});if(typeof j.selected!=="number"&&j.cookie)j.selected=parseInt(i._cookie(),10);if(typeof j.selected!=="number"&&this.lis.filter(".ui-tabs-selected").length)j.selected=
388 this.lis.index(this.lis.filter(".ui-tabs-selected"));j.selected=j.selected||(this.lis.length?0:-1)}else if(j.selected===null)j.selected=-1;j.selected=j.selected>=0&&this.anchors[j.selected]||j.selected<0?j.selected:0;j.disabled=b.unique(j.disabled.concat(b.map(this.lis.filter(".ui-state-disabled"),function(r){return i.lis.index(r)}))).sort();b.inArray(j.selected,j.disabled)!=-1&&j.disabled.splice(b.inArray(j.selected,j.disabled),1);this.panels.addClass("ui-tabs-hide");this.lis.removeClass("ui-tabs-selected ui-state-active");
389 if(j.selected>=0&&this.anchors.length){i.element.find(i._sanitizeSelector(i.anchors[j.selected].hash)).removeClass("ui-tabs-hide");this.lis.eq(j.selected).addClass("ui-tabs-selected ui-state-active");i.element.queue("tabs",function(){i._trigger("show",null,i._ui(i.anchors[j.selected],i.element.find(i._sanitizeSelector(i.anchors[j.selected].hash))))});this.load(j.selected)}b(window).bind("unload",function(){i.lis.add(i.anchors).unbind(".tabs");i.lis=i.anchors=i.panels=null})}else j.selected=this.lis.index(this.lis.filter(".ui-tabs-selected"));
390 this.element[j.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible");j.cookie&&this._cookie(j.selected,j.cookie);d=0;for(var q;q=this.lis[d];d++)b(q)[b.inArray(d,j.disabled)!=-1&&!b(q).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled");j.cache===false&&this.anchors.removeData("cache.tabs");this.lis.add(this.anchors).unbind(".tabs");if(j.event!=="mouseover"){var l=function(r,u){u.is(":not(.ui-state-disabled)")&&u.addClass("ui-state-"+r)},k=function(r,u){u.removeClass("ui-state-"+
391 r)};this.lis.bind("mouseover.tabs",function(){l("hover",b(this))});this.lis.bind("mouseout.tabs",function(){k("hover",b(this))});this.anchors.bind("focus.tabs",function(){l("focus",b(this).closest("li"))});this.anchors.bind("blur.tabs",function(){k("focus",b(this).closest("li"))})}var m,o;if(j.fx)if(b.isArray(j.fx)){m=j.fx[0];o=j.fx[1]}else m=o=j.fx;var p=o?function(r,u){b(r).closest("li").addClass("ui-tabs-selected ui-state-active");u.hide().removeClass("ui-tabs-hide").animate(o,o.duration||"normal",
392 function(){h(u,o);i._trigger("show",null,i._ui(r,u[0]))})}:function(r,u){b(r).closest("li").addClass("ui-tabs-selected ui-state-active");u.removeClass("ui-tabs-hide");i._trigger("show",null,i._ui(r,u[0]))},s=m?function(r,u){u.animate(m,m.duration||"normal",function(){i.lis.removeClass("ui-tabs-selected ui-state-active");u.addClass("ui-tabs-hide");h(u,m);i.element.dequeue("tabs")})}:function(r,u){i.lis.removeClass("ui-tabs-selected ui-state-active");u.addClass("ui-tabs-hide");i.element.dequeue("tabs")};
393 this.anchors.bind(j.event+".tabs",function(){var r=this,u=b(r).closest("li"),v=i.panels.filter(":not(.ui-tabs-hide)"),w=i.element.find(i._sanitizeSelector(r.hash));if(u.hasClass("ui-tabs-selected")&&!j.collapsible||u.hasClass("ui-state-disabled")||u.hasClass("ui-state-processing")||i.panels.filter(":animated").length||i._trigger("select",null,i._ui(this,w[0]))===false){this.blur();return false}j.selected=i.anchors.index(this);i.abort();if(j.collapsible)if(u.hasClass("ui-tabs-selected")){j.selected=
394 -1;j.cookie&&i._cookie(j.selected,j.cookie);i.element.queue("tabs",function(){s(r,v)}).dequeue("tabs");this.blur();return false}else if(!v.length){j.cookie&&i._cookie(j.selected,j.cookie);i.element.queue("tabs",function(){p(r,w)});i.load(i.anchors.index(this));this.blur();return false}j.cookie&&i._cookie(j.selected,j.cookie);if(w.length){v.length&&i.element.queue("tabs",function(){s(r,v)});i.element.queue("tabs",function(){p(r,w)});i.load(i.anchors.index(this))}else throw"jQuery UI Tabs: Mismatching fragment identifier.";
395 b.browser.msie&&this.blur()});this.anchors.bind("click.tabs",function(){return false})},_getIndex:function(d){if(typeof d=="string")d=this.anchors.index(this.anchors.filter("[href$="+d+"]"));return d},destroy:function(){var d=this.options;this.abort();this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs");this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.anchors.each(function(){var h=
396 b.data(this,"href.tabs");if(h)this.href=h;var i=b(this).unbind(".tabs");b.each(["href","load","cache"],function(j,n){i.removeData(n+".tabs")})});this.lis.unbind(".tabs").add(this.panels).each(function(){b.data(this,"destroy.tabs")?b(this).remove():b(this).removeClass("ui-state-default ui-corner-top ui-tabs-selected ui-state-active ui-state-hover ui-state-focus ui-state-disabled ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide")});d.cookie&&this._cookie(null,d.cookie);return this},add:function(d,
397 h,i){if(i===c)i=this.anchors.length;var j=this,n=this.options;h=b(n.tabTemplate.replace(/#\{href\}/g,d).replace(/#\{label\}/g,h));d=!d.indexOf("#")?d.replace("#",""):this._tabId(b("a",h)[0]);h.addClass("ui-state-default ui-corner-top").data("destroy.tabs",true);var q=j.element.find("#"+d);q.length||(q=b(n.panelTemplate).attr("id",d).data("destroy.tabs",true));q.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide");if(i>=this.lis.length){h.appendTo(this.list);q.appendTo(this.list[0].parentNode)}else{h.insertBefore(this.lis[i]);
398 q.insertBefore(this.panels[i])}n.disabled=b.map(n.disabled,function(l){return l>=i?++l:l});this._tabify();if(this.anchors.length==1){n.selected=0;h.addClass("ui-tabs-selected ui-state-active");q.removeClass("ui-tabs-hide");this.element.queue("tabs",function(){j._trigger("show",null,j._ui(j.anchors[0],j.panels[0]))});this.load(0)}this._trigger("add",null,this._ui(this.anchors[i],this.panels[i]));return this},remove:function(d){d=this._getIndex(d);var h=this.options,i=this.lis.eq(d).remove(),j=this.panels.eq(d).remove();
399 if(i.hasClass("ui-tabs-selected")&&this.anchors.length>1)this.select(d+(d+1<this.anchors.length?1:-1));h.disabled=b.map(b.grep(h.disabled,function(n){return n!=d}),function(n){return n>=d?--n:n});this._tabify();this._trigger("remove",null,this._ui(i.find("a")[0],j[0]));return this},enable:function(d){d=this._getIndex(d);var h=this.options;if(b.inArray(d,h.disabled)!=-1){this.lis.eq(d).removeClass("ui-state-disabled");h.disabled=b.grep(h.disabled,function(i){return i!=d});this._trigger("enable",null,
400 this._ui(this.anchors[d],this.panels[d]));return this}},disable:function(d){d=this._getIndex(d);var h=this.options;if(d!=h.selected){this.lis.eq(d).addClass("ui-state-disabled");h.disabled.push(d);h.disabled.sort();this._trigger("disable",null,this._ui(this.anchors[d],this.panels[d]))}return this},select:function(d){d=this._getIndex(d);if(d==-1)if(this.options.collapsible&&this.options.selected!=-1)d=this.options.selected;else return this;this.anchors.eq(d).trigger(this.options.event+".tabs");return this},
401 load:function(d){d=this._getIndex(d);var h=this,i=this.options,j=this.anchors.eq(d)[0],n=b.data(j,"load.tabs");this.abort();if(!n||this.element.queue("tabs").length!==0&&b.data(j,"cache.tabs"))this.element.dequeue("tabs");else{this.lis.eq(d).addClass("ui-state-processing");if(i.spinner){var q=b("span",j);q.data("label.tabs",q.html()).html(i.spinner)}this.xhr=b.ajax(b.extend({},i.ajaxOptions,{url:n,success:function(l,k){h.element.find(h._sanitizeSelector(j.hash)).html(l);h._cleanup();i.cache&&b.data(j,
402 "cache.tabs",true);h._trigger("load",null,h._ui(h.anchors[d],h.panels[d]));try{i.ajaxOptions.success(l,k)}catch(m){}},error:function(l,k){h._cleanup();h._trigger("load",null,h._ui(h.anchors[d],h.panels[d]));try{i.ajaxOptions.error(l,k,d,j)}catch(m){}}}));h.element.dequeue("tabs");return this}},abort:function(){this.element.queue([]);this.panels.stop(false,true);this.element.queue("tabs",this.element.queue("tabs").splice(-2,2));if(this.xhr){this.xhr.abort();delete this.xhr}this._cleanup();return this},
403 url:function(d,h){this.anchors.eq(d).removeData("cache.tabs").data("load.tabs",h);return this},length:function(){return this.anchors.length}});b.extend(b.ui.tabs,{version:"1.8.8"});b.extend(b.ui.tabs.prototype,{rotation:null,rotate:function(d,h){var i=this,j=this.options,n=i._rotate||(i._rotate=function(q){clearTimeout(i.rotation);i.rotation=setTimeout(function(){var l=j.selected;i.select(++l<i.anchors.length?l:0)},d);q&&q.stopPropagation()});h=i._unrotate||(i._unrotate=!h?function(q){q.clientX&&
404 i.rotate(null)}:function(){t=j.selected;n()});if(d){this.element.bind("tabsshow",n);this.anchors.bind(j.event+".tabs",h);n()}else{clearTimeout(i.rotation);this.element.unbind("tabsshow",n);this.anchors.unbind(j.event+".tabs",h);delete this._rotate;delete this._unrotate}return this}})})(jQuery);
405
forum/static/js/widget/jquery-ui-datepicker/jquery.min.js
File was created 1 /*!
2 * jQuery JavaScript Library v1.4.4
3 * http://jquery.com/
4 *
5 * Copyright 2010, John Resig
6 * Dual licensed under the MIT or GPL Version 2 licenses.
7 * http://jquery.org/license
8 *
9 * Includes Sizzle.js
10 * http://sizzlejs.com/
11 * Copyright 2010, The Dojo Foundation
12 * Released under the MIT, BSD, and GPL Licenses.
13 *
14 * Date: Thu Nov 11 19:04:53 2010 -0500
15 */
16 (function(E,B){function ka(a,b,d){if(d===B&&a.nodeType===1){d=a.getAttribute("data-"+b);if(typeof d==="string"){try{d=d==="true"?true:d==="false"?false:d==="null"?null:!c.isNaN(d)?parseFloat(d):Ja.test(d)?c.parseJSON(d):d}catch(e){}c.data(a,b,d)}else d=B}return d}function U(){return false}function ca(){return true}function la(a,b,d){d[0].type=a;return c.event.handle.apply(b,d)}function Ka(a){var b,d,e,f,h,l,k,o,x,r,A,C=[];f=[];h=c.data(this,this.nodeType?"events":"__events__");if(typeof h==="function")h=
17 h.events;if(!(a.liveFired===this||!h||!h.live||a.button&&a.type==="click")){if(a.namespace)A=RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)");a.liveFired=this;var J=h.live.slice(0);for(k=0;k<J.length;k++){h=J[k];h.origType.replace(X,"")===a.type?f.push(h.selector):J.splice(k--,1)}f=c(a.target).closest(f,a.currentTarget);o=0;for(x=f.length;o<x;o++){r=f[o];for(k=0;k<J.length;k++){h=J[k];if(r.selector===h.selector&&(!A||A.test(h.namespace))){l=r.elem;e=null;if(h.preType==="mouseenter"||
18 h.preType==="mouseleave"){a.type=h.preType;e=c(a.relatedTarget).closest(h.selector)[0]}if(!e||e!==l)C.push({elem:l,handleObj:h,level:r.level})}}}o=0;for(x=C.length;o<x;o++){f=C[o];if(d&&f.level>d)break;a.currentTarget=f.elem;a.data=f.handleObj.data;a.handleObj=f.handleObj;A=f.handleObj.origHandler.apply(f.elem,arguments);if(A===false||a.isPropagationStopped()){d=f.level;if(A===false)b=false;if(a.isImmediatePropagationStopped())break}}return b}}function Y(a,b){return(a&&a!=="*"?a+".":"")+b.replace(La,
19 "`").replace(Ma,"&")}function ma(a,b,d){if(c.isFunction(b))return c.grep(a,function(f,h){return!!b.call(f,h,f)===d});else if(b.nodeType)return c.grep(a,function(f){return f===b===d});else if(typeof b==="string"){var e=c.grep(a,function(f){return f.nodeType===1});if(Na.test(b))return c.filter(b,e,!d);else b=c.filter(b,e)}return c.grep(a,function(f){return c.inArray(f,b)>=0===d})}function na(a,b){var d=0;b.each(function(){if(this.nodeName===(a[d]&&a[d].nodeName)){var e=c.data(a[d++]),f=c.data(this,
20 e);if(e=e&&e.events){delete f.handle;f.events={};for(var h in e)for(var l in e[h])c.event.add(this,h,e[h][l],e[h][l].data)}}})}function Oa(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function oa(a,b,d){var e=b==="width"?a.offsetWidth:a.offsetHeight;if(d==="border")return e;c.each(b==="width"?Pa:Qa,function(){d||(e-=parseFloat(c.css(a,"padding"+this))||0);if(d==="margin")e+=parseFloat(c.css(a,
21 "margin"+this))||0;else e-=parseFloat(c.css(a,"border"+this+"Width"))||0});return e}function da(a,b,d,e){if(c.isArray(b)&&b.length)c.each(b,function(f,h){d||Ra.test(a)?e(a,h):da(a+"["+(typeof h==="object"||c.isArray(h)?f:"")+"]",h,d,e)});else if(!d&&b!=null&&typeof b==="object")c.isEmptyObject(b)?e(a,""):c.each(b,function(f,h){da(a+"["+f+"]",h,d,e)});else e(a,b)}function S(a,b){var d={};c.each(pa.concat.apply([],pa.slice(0,b)),function(){d[this]=a});return d}function qa(a){if(!ea[a]){var b=c("<"+
22 a+">").appendTo("body"),d=b.css("display");b.remove();if(d==="none"||d==="")d="block";ea[a]=d}return ea[a]}function fa(a){return c.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:false}var t=E.document,c=function(){function a(){if(!b.isReady){try{t.documentElement.doScroll("left")}catch(j){setTimeout(a,1);return}b.ready()}}var b=function(j,s){return new b.fn.init(j,s)},d=E.jQuery,e=E.$,f,h=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]+)$)/,l=/\S/,k=/^\s+/,o=/\s+$/,x=/\W/,r=/\d/,A=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,
23 C=/^[\],:{}\s]*$/,J=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,w=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,I=/(?:^|:|,)(?:\s*\[)+/g,L=/(webkit)[ \/]([\w.]+)/,g=/(opera)(?:.*version)?[ \/]([\w.]+)/,i=/(msie) ([\w.]+)/,n=/(mozilla)(?:.*? rv:([\w.]+))?/,m=navigator.userAgent,p=false,q=[],u,y=Object.prototype.toString,F=Object.prototype.hasOwnProperty,M=Array.prototype.push,N=Array.prototype.slice,O=String.prototype.trim,D=Array.prototype.indexOf,R={};b.fn=b.prototype={init:function(j,
24 s){var v,z,H;if(!j)return this;if(j.nodeType){this.context=this[0]=j;this.length=1;return this}if(j==="body"&&!s&&t.body){this.context=t;this[0]=t.body;this.selector="body";this.length=1;return this}if(typeof j==="string")if((v=h.exec(j))&&(v[1]||!s))if(v[1]){H=s?s.ownerDocument||s:t;if(z=A.exec(j))if(b.isPlainObject(s)){j=[t.createElement(z[1])];b.fn.attr.call(j,s,true)}else j=[H.createElement(z[1])];else{z=b.buildFragment([v[1]],[H]);j=(z.cacheable?z.fragment.cloneNode(true):z.fragment).childNodes}return b.merge(this,
25 j)}else{if((z=t.getElementById(v[2]))&&z.parentNode){if(z.id!==v[2])return f.find(j);this.length=1;this[0]=z}this.context=t;this.selector=j;return this}else if(!s&&!x.test(j)){this.selector=j;this.context=t;j=t.getElementsByTagName(j);return b.merge(this,j)}else return!s||s.jquery?(s||f).find(j):b(s).find(j);else if(b.isFunction(j))return f.ready(j);if(j.selector!==B){this.selector=j.selector;this.context=j.context}return b.makeArray(j,this)},selector:"",jquery:"1.4.4",length:0,size:function(){return this.length},
26 toArray:function(){return N.call(this,0)},get:function(j){return j==null?this.toArray():j<0?this.slice(j)[0]:this[j]},pushStack:function(j,s,v){var z=b();b.isArray(j)?M.apply(z,j):b.merge(z,j);z.prevObject=this;z.context=this.context;if(s==="find")z.selector=this.selector+(this.selector?" ":"")+v;else if(s)z.selector=this.selector+"."+s+"("+v+")";return z},each:function(j,s){return b.each(this,j,s)},ready:function(j){b.bindReady();if(b.isReady)j.call(t,b);else q&&q.push(j);return this},eq:function(j){return j===
27 -1?this.slice(j):this.slice(j,+j+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(N.apply(this,arguments),"slice",N.call(arguments).join(","))},map:function(j){return this.pushStack(b.map(this,function(s,v){return j.call(s,v,s)}))},end:function(){return this.prevObject||b(null)},push:M,sort:[].sort,splice:[].splice};b.fn.init.prototype=b.fn;b.extend=b.fn.extend=function(){var j,s,v,z,H,G=arguments[0]||{},K=1,Q=arguments.length,ga=false;
28 if(typeof G==="boolean"){ga=G;G=arguments[1]||{};K=2}if(typeof G!=="object"&&!b.isFunction(G))G={};if(Q===K){G=this;--K}for(;K<Q;K++)if((j=arguments[K])!=null)for(s in j){v=G[s];z=j[s];if(G!==z)if(ga&&z&&(b.isPlainObject(z)||(H=b.isArray(z)))){if(H){H=false;v=v&&b.isArray(v)?v:[]}else v=v&&b.isPlainObject(v)?v:{};G[s]=b.extend(ga,v,z)}else if(z!==B)G[s]=z}return G};b.extend({noConflict:function(j){E.$=e;if(j)E.jQuery=d;return b},isReady:false,readyWait:1,ready:function(j){j===true&&b.readyWait--;
29 if(!b.readyWait||j!==true&&!b.isReady){if(!t.body)return setTimeout(b.ready,1);b.isReady=true;if(!(j!==true&&--b.readyWait>0))if(q){var s=0,v=q;for(q=null;j=v[s++];)j.call(t,b);b.fn.trigger&&b(t).trigger("ready").unbind("ready")}}},bindReady:function(){if(!p){p=true;if(t.readyState==="complete")return setTimeout(b.ready,1);if(t.addEventListener){t.addEventListener("DOMContentLoaded",u,false);E.addEventListener("load",b.ready,false)}else if(t.attachEvent){t.attachEvent("onreadystatechange",u);E.attachEvent("onload",
30 b.ready);var j=false;try{j=E.frameElement==null}catch(s){}t.documentElement.doScroll&&j&&a()}}},isFunction:function(j){return b.type(j)==="function"},isArray:Array.isArray||function(j){return b.type(j)==="array"},isWindow:function(j){return j&&typeof j==="object"&&"setInterval"in j},isNaN:function(j){return j==null||!r.test(j)||isNaN(j)},type:function(j){return j==null?String(j):R[y.call(j)]||"object"},isPlainObject:function(j){if(!j||b.type(j)!=="object"||j.nodeType||b.isWindow(j))return false;if(j.constructor&&
31 !F.call(j,"constructor")&&!F.call(j.constructor.prototype,"isPrototypeOf"))return false;for(var s in j);return s===B||F.call(j,s)},isEmptyObject:function(j){for(var s in j)return false;return true},error:function(j){throw j;},parseJSON:function(j){if(typeof j!=="string"||!j)return null;j=b.trim(j);if(C.test(j.replace(J,"@").replace(w,"]").replace(I,"")))return E.JSON&&E.JSON.parse?E.JSON.parse(j):(new Function("return "+j))();else b.error("Invalid JSON: "+j)},noop:function(){},globalEval:function(j){if(j&&
32 l.test(j)){var s=t.getElementsByTagName("head")[0]||t.documentElement,v=t.createElement("script");v.type="text/javascript";if(b.support.scriptEval)v.appendChild(t.createTextNode(j));else v.text=j;s.insertBefore(v,s.firstChild);s.removeChild(v)}},nodeName:function(j,s){return j.nodeName&&j.nodeName.toUpperCase()===s.toUpperCase()},each:function(j,s,v){var z,H=0,G=j.length,K=G===B||b.isFunction(j);if(v)if(K)for(z in j){if(s.apply(j[z],v)===false)break}else for(;H<G;){if(s.apply(j[H++],v)===false)break}else if(K)for(z in j){if(s.call(j[z],
33 z,j[z])===false)break}else for(v=j[0];H<G&&s.call(v,H,v)!==false;v=j[++H]);return j},trim:O?function(j){return j==null?"":O.call(j)}:function(j){return j==null?"":j.toString().replace(k,"").replace(o,"")},makeArray:function(j,s){var v=s||[];if(j!=null){var z=b.type(j);j.length==null||z==="string"||z==="function"||z==="regexp"||b.isWindow(j)?M.call(v,j):b.merge(v,j)}return v},inArray:function(j,s){if(s.indexOf)return s.indexOf(j);for(var v=0,z=s.length;v<z;v++)if(s[v]===j)return v;return-1},merge:function(j,
34 s){var v=j.length,z=0;if(typeof s.length==="number")for(var H=s.length;z<H;z++)j[v++]=s[z];else for(;s[z]!==B;)j[v++]=s[z++];j.length=v;return j},grep:function(j,s,v){var z=[],H;v=!!v;for(var G=0,K=j.length;G<K;G++){H=!!s(j[G],G);v!==H&&z.push(j[G])}return z},map:function(j,s,v){for(var z=[],H,G=0,K=j.length;G<K;G++){H=s(j[G],G,v);if(H!=null)z[z.length]=H}return z.concat.apply([],z)},guid:1,proxy:function(j,s,v){if(arguments.length===2)if(typeof s==="string"){v=j;j=v[s];s=B}else if(s&&!b.isFunction(s)){v=
35 s;s=B}if(!s&&j)s=function(){return j.apply(v||this,arguments)};if(j)s.guid=j.guid=j.guid||s.guid||b.guid++;return s},access:function(j,s,v,z,H,G){var K=j.length;if(typeof s==="object"){for(var Q in s)b.access(j,Q,s[Q],z,H,v);return j}if(v!==B){z=!G&&z&&b.isFunction(v);for(Q=0;Q<K;Q++)H(j[Q],s,z?v.call(j[Q],Q,H(j[Q],s)):v,G);return j}return K?H(j[0],s):B},now:function(){return(new Date).getTime()},uaMatch:function(j){j=j.toLowerCase();j=L.exec(j)||g.exec(j)||i.exec(j)||j.indexOf("compatible")<0&&n.exec(j)||
36 [];return{browser:j[1]||"",version:j[2]||"0"}},browser:{}});b.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(j,s){R["[object "+s+"]"]=s.toLowerCase()});m=b.uaMatch(m);if(m.browser){b.browser[m.browser]=true;b.browser.version=m.version}if(b.browser.webkit)b.browser.safari=true;if(D)b.inArray=function(j,s){return D.call(s,j)};if(!/\s/.test("\u00a0")){k=/^[\s\xA0]+/;o=/[\s\xA0]+$/}f=b(t);if(t.addEventListener)u=function(){t.removeEventListener("DOMContentLoaded",u,
37 false);b.ready()};else if(t.attachEvent)u=function(){if(t.readyState==="complete"){t.detachEvent("onreadystatechange",u);b.ready()}};return E.jQuery=E.$=b}();(function(){c.support={};var a=t.documentElement,b=t.createElement("script"),d=t.createElement("div"),e="script"+c.now();d.style.display="none";d.innerHTML=" <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";var f=d.getElementsByTagName("*"),h=d.getElementsByTagName("a")[0],l=t.createElement("select"),
38 k=l.appendChild(t.createElement("option"));if(!(!f||!f.length||!h)){c.support={leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(h.getAttribute("style")),hrefNormalized:h.getAttribute("href")==="/a",opacity:/^0.55$/.test(h.style.opacity),cssFloat:!!h.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:k.selected,deleteExpando:true,optDisabled:false,checkClone:false,
39 scriptEval:false,noCloneEvent:true,boxModel:null,inlineBlockNeedsLayout:false,shrinkWrapBlocks:false,reliableHiddenOffsets:true};l.disabled=true;c.support.optDisabled=!k.disabled;b.type="text/javascript";try{b.appendChild(t.createTextNode("window."+e+"=1;"))}catch(o){}a.insertBefore(b,a.firstChild);if(E[e]){c.support.scriptEval=true;delete E[e]}try{delete b.test}catch(x){c.support.deleteExpando=false}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function r(){c.support.noCloneEvent=
40 false;d.detachEvent("onclick",r)});d.cloneNode(true).fireEvent("onclick")}d=t.createElement("div");d.innerHTML="<input type='radio' name='radiotest' checked='checked'/>";a=t.createDocumentFragment();a.appendChild(d.firstChild);c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var r=t.createElement("div");r.style.width=r.style.paddingLeft="1px";t.body.appendChild(r);c.boxModel=c.support.boxModel=r.offsetWidth===2;if("zoom"in r.style){r.style.display="inline";r.style.zoom=
41 1;c.support.inlineBlockNeedsLayout=r.offsetWidth===2;r.style.display="";r.innerHTML="<div style='width:4px;'></div>";c.support.shrinkWrapBlocks=r.offsetWidth!==2}r.innerHTML="<table><tr><td style='padding:0;display:none'></td><td>t</td></tr></table>";var A=r.getElementsByTagName("td");c.support.reliableHiddenOffsets=A[0].offsetHeight===0;A[0].style.display="";A[1].style.display="none";c.support.reliableHiddenOffsets=c.support.reliableHiddenOffsets&&A[0].offsetHeight===0;r.innerHTML="";t.body.removeChild(r).style.display=
42 "none"});a=function(r){var A=t.createElement("div");r="on"+r;var C=r in A;if(!C){A.setAttribute(r,"return;");C=typeof A[r]==="function"}return C};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=f=h=null}})();var ra={},Ja=/^(?:\{.*\}|\[.*\])$/;c.extend({cache:{},uuid:0,expando:"jQuery"+c.now(),noData:{embed:true,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:true},data:function(a,b,d){if(c.acceptData(a)){a=a==E?ra:a;var e=a.nodeType,f=e?a[c.expando]:null,h=
43 c.cache;if(!(e&&!f&&typeof b==="string"&&d===B)){if(e)f||(a[c.expando]=f=++c.uuid);else h=a;if(typeof b==="object")if(e)h[f]=c.extend(h[f],b);else c.extend(h,b);else if(e&&!h[f])h[f]={};a=e?h[f]:h;if(d!==B)a[b]=d;return typeof b==="string"?a[b]:a}}},removeData:function(a,b){if(c.acceptData(a)){a=a==E?ra:a;var d=a.nodeType,e=d?a[c.expando]:a,f=c.cache,h=d?f[e]:e;if(b){if(h){delete h[b];d&&c.isEmptyObject(h)&&c.removeData(a)}}else if(d&&c.support.deleteExpando)delete a[c.expando];else if(a.removeAttribute)a.removeAttribute(c.expando);
44 else if(d)delete f[e];else for(var l in a)delete a[l]}},acceptData:function(a){if(a.nodeName){var b=c.noData[a.nodeName.toLowerCase()];if(b)return!(b===true||a.getAttribute("classid")!==b)}return true}});c.fn.extend({data:function(a,b){var d=null;if(typeof a==="undefined"){if(this.length){var e=this[0].attributes,f;d=c.data(this[0]);for(var h=0,l=e.length;h<l;h++){f=e[h].name;if(f.indexOf("data-")===0){f=f.substr(5);ka(this[0],f,d[f])}}}return d}else if(typeof a==="object")return this.each(function(){c.data(this,
45 a)});var k=a.split(".");k[1]=k[1]?"."+k[1]:"";if(b===B){d=this.triggerHandler("getData"+k[1]+"!",[k[0]]);if(d===B&&this.length){d=c.data(this[0],a);d=ka(this[0],a,d)}return d===B&&k[1]?this.data(k[0]):d}else return this.each(function(){var o=c(this),x=[k[0],b];o.triggerHandler("setData"+k[1]+"!",x);c.data(this,a,b);o.triggerHandler("changeData"+k[1]+"!",x)})},removeData:function(a){return this.each(function(){c.removeData(this,a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var e=
46 c.data(a,b);if(!d)return e||[];if(!e||c.isArray(d))e=c.data(a,b,c.makeArray(d));else e.push(d);return e}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),e=d.shift();if(e==="inprogress")e=d.shift();if(e){b==="fx"&&d.unshift("inprogress");e.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b===B)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,
47 a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var sa=/[\n\t]/g,ha=/\s+/,Sa=/\r/g,Ta=/^(?:href|src|style)$/,Ua=/^(?:button|input)$/i,Va=/^(?:button|input|object|select|textarea)$/i,Wa=/^a(?:rea)?$/i,ta=/^(?:radio|checkbox)$/i;c.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",
48 colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};c.fn.extend({attr:function(a,b){return c.access(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(x){var r=c(this);r.addClass(a.call(this,x,r.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(ha),d=0,e=this.length;d<e;d++){var f=this[d];if(f.nodeType===
49 1)if(f.className){for(var h=" "+f.className+" ",l=f.className,k=0,o=b.length;k<o;k++)if(h.indexOf(" "+b[k]+" ")<0)l+=" "+b[k];f.className=c.trim(l)}else f.className=a}return this},removeClass:function(a){if(c.isFunction(a))return this.each(function(o){var x=c(this);x.removeClass(a.call(this,o,x.attr("class")))});if(a&&typeof a==="string"||a===B)for(var b=(a||"").split(ha),d=0,e=this.length;d<e;d++){var f=this[d];if(f.nodeType===1&&f.className)if(a){for(var h=(" "+f.className+" ").replace(sa," "),
50 l=0,k=b.length;l<k;l++)h=h.replace(" "+b[l]+" "," ");f.className=c.trim(h)}else f.className=""}return this},toggleClass:function(a,b){var d=typeof a,e=typeof b==="boolean";if(c.isFunction(a))return this.each(function(f){var h=c(this);h.toggleClass(a.call(this,f,h.attr("class"),b),b)});return this.each(function(){if(d==="string")for(var f,h=0,l=c(this),k=b,o=a.split(ha);f=o[h++];){k=e?k:!l.hasClass(f);l[k?"addClass":"removeClass"](f)}else if(d==="undefined"||d==="boolean"){this.className&&c.data(this,
51 "__className__",this.className);this.className=this.className||a===false?"":c.data(this,"__className__")||""}})},hasClass:function(a){a=" "+a+" ";for(var b=0,d=this.length;b<d;b++)if((" "+this[b].className+" ").replace(sa," ").indexOf(a)>-1)return true;return false},val:function(a){if(!arguments.length){var b=this[0];if(b){if(c.nodeName(b,"option")){var d=b.attributes.value;return!d||d.specified?b.value:b.text}if(c.nodeName(b,"select")){var e=b.selectedIndex;d=[];var f=b.options;b=b.type==="select-one";
52 if(e<0)return null;var h=b?e:0;for(e=b?e+1:f.length;h<e;h++){var l=f[h];if(l.selected&&(c.support.optDisabled?!l.disabled:l.getAttribute("disabled")===null)&&(!l.parentNode.disabled||!c.nodeName(l.parentNode,"optgroup"))){a=c(l).val();if(b)return a;d.push(a)}}return d}if(ta.test(b.type)&&!c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Sa,"")}return B}var k=c.isFunction(a);return this.each(function(o){var x=c(this),r=a;if(this.nodeType===1){if(k)r=
53 a.call(this,o,x.val());if(r==null)r="";else if(typeof r==="number")r+="";else if(c.isArray(r))r=c.map(r,function(C){return C==null?"":C+""});if(c.isArray(r)&&ta.test(this.type))this.checked=c.inArray(x.val(),r)>=0;else if(c.nodeName(this,"select")){var A=c.makeArray(r);c("option",this).each(function(){this.selected=c.inArray(c(this).val(),A)>=0});if(!A.length)this.selectedIndex=-1}else this.value=r}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},
54 attr:function(a,b,d,e){if(!a||a.nodeType===3||a.nodeType===8)return B;if(e&&b in c.attrFn)return c(a)[b](d);e=a.nodeType!==1||!c.isXMLDoc(a);var f=d!==B;b=e&&c.props[b]||b;var h=Ta.test(b);if((b in a||a[b]!==B)&&e&&!h){if(f){b==="type"&&Ua.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed");if(d===null)a.nodeType===1&&a.removeAttribute(b);else a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&
55 b.specified?b.value:Va.test(a.nodeName)||Wa.test(a.nodeName)&&a.href?0:B;return a[b]}if(!c.support.style&&e&&b==="style"){if(f)a.style.cssText=""+d;return a.style.cssText}f&&a.setAttribute(b,""+d);if(!a.attributes[b]&&a.hasAttribute&&!a.hasAttribute(b))return B;a=!c.support.hrefNormalized&&e&&h?a.getAttribute(b,2):a.getAttribute(b);return a===null?B:a}});var X=/\.(.*)$/,ia=/^(?:textarea|input|select)$/i,La=/\./g,Ma=/ /g,Xa=/[^\w\s.|`]/g,Ya=function(a){return a.replace(Xa,"\\$&")},ua={focusin:0,focusout:0};
56 c.event={add:function(a,b,d,e){if(!(a.nodeType===3||a.nodeType===8)){if(c.isWindow(a)&&a!==E&&!a.frameElement)a=E;if(d===false)d=U;else if(!d)return;var f,h;if(d.handler){f=d;d=f.handler}if(!d.guid)d.guid=c.guid++;if(h=c.data(a)){var l=a.nodeType?"events":"__events__",k=h[l],o=h.handle;if(typeof k==="function"){o=k.handle;k=k.events}else if(!k){a.nodeType||(h[l]=h=function(){});h.events=k={}}if(!o)h.handle=o=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(o.elem,
57 arguments):B};o.elem=a;b=b.split(" ");for(var x=0,r;l=b[x++];){h=f?c.extend({},f):{handler:d,data:e};if(l.indexOf(".")>-1){r=l.split(".");l=r.shift();h.namespace=r.slice(0).sort().join(".")}else{r=[];h.namespace=""}h.type=l;if(!h.guid)h.guid=d.guid;var A=k[l],C=c.event.special[l]||{};if(!A){A=k[l]=[];if(!C.setup||C.setup.call(a,e,r,o)===false)if(a.addEventListener)a.addEventListener(l,o,false);else a.attachEvent&&a.attachEvent("on"+l,o)}if(C.add){C.add.call(a,h);if(!h.handler.guid)h.handler.guid=
58 d.guid}A.push(h);c.event.global[l]=true}a=null}}},global:{},remove:function(a,b,d,e){if(!(a.nodeType===3||a.nodeType===8)){if(d===false)d=U;var f,h,l=0,k,o,x,r,A,C,J=a.nodeType?"events":"__events__",w=c.data(a),I=w&&w[J];if(w&&I){if(typeof I==="function"){w=I;I=I.events}if(b&&b.type){d=b.handler;b=b.type}if(!b||typeof b==="string"&&b.charAt(0)==="."){b=b||"";for(f in I)c.event.remove(a,f+b)}else{for(b=b.split(" ");f=b[l++];){r=f;k=f.indexOf(".")<0;o=[];if(!k){o=f.split(".");f=o.shift();x=RegExp("(^|\\.)"+
59 c.map(o.slice(0).sort(),Ya).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(A=I[f])if(d){r=c.event.special[f]||{};for(h=e||0;h<A.length;h++){C=A[h];if(d.guid===C.guid){if(k||x.test(C.namespace)){e==null&&A.splice(h--,1);r.remove&&r.remove.call(a,C)}if(e!=null)break}}if(A.length===0||e!=null&&A.length===1){if(!r.teardown||r.teardown.call(a,o)===false)c.removeEvent(a,f,w.handle);delete I[f]}}else for(h=0;h<A.length;h++){C=A[h];if(k||x.test(C.namespace)){c.event.remove(a,r,C.handler,h);A.splice(h--,1)}}}if(c.isEmptyObject(I)){if(b=
60 w.handle)b.elem=null;delete w.events;delete w.handle;if(typeof w==="function")c.removeData(a,J);else c.isEmptyObject(w)&&c.removeData(a)}}}}},trigger:function(a,b,d,e){var f=a.type||a;if(!e){a=typeof a==="object"?a[c.expando]?a:c.extend(c.Event(f),a):c.Event(f);if(f.indexOf("!")>=0){a.type=f=f.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();c.event.global[f]&&c.each(c.cache,function(){this.events&&this.events[f]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===
61 8)return B;a.result=B;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(e=d.nodeType?c.data(d,"handle"):(c.data(d,"__events__")||{}).handle)&&e.apply(d,b);e=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()]))if(d["on"+f]&&d["on"+f].apply(d,b)===false){a.result=false;a.preventDefault()}}catch(h){}if(!a.isPropagationStopped()&&e)c.event.trigger(a,b,e,true);else if(!a.isDefaultPrevented()){var l;e=a.target;var k=f.replace(X,""),o=c.nodeName(e,"a")&&k===
62 "click",x=c.event.special[k]||{};if((!x._default||x._default.call(d,a)===false)&&!o&&!(e&&e.nodeName&&c.noData[e.nodeName.toLowerCase()])){try{if(e[k]){if(l=e["on"+k])e["on"+k]=null;c.event.triggered=true;e[k]()}}catch(r){}if(l)e["on"+k]=l;c.event.triggered=false}}},handle:function(a){var b,d,e,f;d=[];var h=c.makeArray(arguments);a=h[0]=c.event.fix(a||E.event);a.currentTarget=this;b=a.type.indexOf(".")<0&&!a.exclusive;if(!b){e=a.type.split(".");a.type=e.shift();d=e.slice(0).sort();e=RegExp("(^|\\.)"+
63 d.join("\\.(?:.*\\.)?")+"(\\.|$)")}a.namespace=a.namespace||d.join(".");f=c.data(this,this.nodeType?"events":"__events__");if(typeof f==="function")f=f.events;d=(f||{})[a.type];if(f&&d){d=d.slice(0);f=0;for(var l=d.length;f<l;f++){var k=d[f];if(b||e.test(k.namespace)){a.handler=k.handler;a.data=k.data;a.handleObj=k;k=k.handler.apply(this,h);if(k!==B){a.result=k;if(k===false){a.preventDefault();a.stopPropagation()}}if(a.isImmediatePropagationStopped())break}}}return a.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),
64 fix:function(a){if(a[c.expando])return a;var b=a;a=c.Event(b);for(var d=this.props.length,e;d;){e=this.props[--d];a[e]=b[e]}if(!a.target)a.target=a.srcElement||t;if(a.target.nodeType===3)a.target=a.target.parentNode;if(!a.relatedTarget&&a.fromElement)a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement;if(a.pageX==null&&a.clientX!=null){b=t.documentElement;d=t.body;a.pageX=a.clientX+(b&&b.scrollLeft||d&&d.scrollLeft||0)-(b&&b.clientLeft||d&&d.clientLeft||0);a.pageY=a.clientY+(b&&b.scrollTop||
65 d&&d.scrollTop||0)-(b&&b.clientTop||d&&d.clientTop||0)}if(a.which==null&&(a.charCode!=null||a.keyCode!=null))a.which=a.charCode!=null?a.charCode:a.keyCode;if(!a.metaKey&&a.ctrlKey)a.metaKey=a.ctrlKey;if(!a.which&&a.button!==B)a.which=a.button&1?1:a.button&2?3:a.button&4?2:0;return a},guid:1E8,proxy:c.proxy,special:{ready:{setup:c.bindReady,teardown:c.noop},live:{add:function(a){c.event.add(this,Y(a.origType,a.selector),c.extend({},a,{handler:Ka,guid:a.handler.guid}))},remove:function(a){c.event.remove(this,
66 Y(a.origType,a.selector),a)}},beforeunload:{setup:function(a,b,d){if(c.isWindow(this))this.onbeforeunload=d},teardown:function(a,b){if(this.onbeforeunload===b)this.onbeforeunload=null}}}};c.removeEvent=t.removeEventListener?function(a,b,d){a.removeEventListener&&a.removeEventListener(b,d,false)}:function(a,b,d){a.detachEvent&&a.detachEvent("on"+b,d)};c.Event=function(a){if(!this.preventDefault)return new c.Event(a);if(a&&a.type){this.originalEvent=a;this.type=a.type}else this.type=a;this.timeStamp=
67 c.now();this[c.expando]=true};c.Event.prototype={preventDefault:function(){this.isDefaultPrevented=ca;var a=this.originalEvent;if(a)if(a.preventDefault)a.preventDefault();else a.returnValue=false},stopPropagation:function(){this.isPropagationStopped=ca;var a=this.originalEvent;if(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=true}},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=ca;this.stopPropagation()},isDefaultPrevented:U,isPropagationStopped:U,isImmediatePropagationStopped:U};
68 var va=function(a){var b=a.relatedTarget;try{for(;b&&b!==this;)b=b.parentNode;if(b!==this){a.type=a.data;c.event.handle.apply(this,arguments)}}catch(d){}},wa=function(a){a.type=a.data;c.event.handle.apply(this,arguments)};c.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){c.event.special[a]={setup:function(d){c.event.add(this,b,d&&d.selector?wa:va,a)},teardown:function(d){c.event.remove(this,b,d&&d.selector?wa:va)}}});if(!c.support.submitBubbles)c.event.special.submit={setup:function(){if(this.nodeName.toLowerCase()!==
69 "form"){c.event.add(this,"click.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="submit"||d==="image")&&c(b).closest("form").length){a.liveFired=B;return la("submit",this,arguments)}});c.event.add(this,"keypress.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="text"||d==="password")&&c(b).closest("form").length&&a.keyCode===13){a.liveFired=B;return la("submit",this,arguments)}})}else return false},teardown:function(){c.event.remove(this,".specialSubmit")}};if(!c.support.changeBubbles){var V,
70 xa=function(a){var b=a.type,d=a.value;if(b==="radio"||b==="checkbox")d=a.checked;else if(b==="select-multiple")d=a.selectedIndex>-1?c.map(a.options,function(e){return e.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d},Z=function(a,b){var d=a.target,e,f;if(!(!ia.test(d.nodeName)||d.readOnly)){e=c.data(d,"_change_data");f=xa(d);if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data",f);if(!(e===B||f===e))if(e!=null||f){a.type="change";a.liveFired=
71 B;return c.event.trigger(a,b,d)}}};c.event.special.change={filters:{focusout:Z,beforedeactivate:Z,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return Z.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple")return Z.call(this,a)},beforeactivate:function(a){a=a.target;c.data(a,"_change_data",xa(a))}},setup:function(){if(this.type===
72 "file")return false;for(var a in V)c.event.add(this,a+".specialChange",V[a]);return ia.test(this.nodeName)},teardown:function(){c.event.remove(this,".specialChange");return ia.test(this.nodeName)}};V=c.event.special.change.filters;V.focus=V.beforeactivate}t.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(e){e=c.event.fix(e);e.type=b;return c.event.trigger(e,null,e.target)}c.event.special[b]={setup:function(){ua[b]++===0&&t.addEventListener(a,d,true)},teardown:function(){--ua[b]===
73 0&&t.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,e,f){if(typeof d==="object"){for(var h in d)this[b](h,e,d[h],f);return this}if(c.isFunction(e)||e===false){f=e;e=B}var l=b==="one"?c.proxy(f,function(o){c(this).unbind(o,l);return f.apply(this,arguments)}):f;if(d==="unload"&&b!=="one")this.one(d,e,f);else{h=0;for(var k=this.length;h<k;h++)c.event.add(this[h],d,l,e)}return this}});c.fn.extend({unbind:function(a,b){if(typeof a==="object"&&!a.preventDefault)for(var d in a)this.unbind(d,
74 a[d]);else{d=0;for(var e=this.length;d<e;d++)c.event.remove(this[d],a,b)}return this},delegate:function(a,b,d,e){return this.live(b,d,e,a)},undelegate:function(a,b,d){return arguments.length===0?this.unbind("live"):this.die(b,null,d,a)},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){var d=c.Event(a);d.preventDefault();d.stopPropagation();c.event.trigger(d,b,this[0]);return d.result}},toggle:function(a){for(var b=arguments,d=
75 1;d<b.length;)c.proxy(a,b[d++]);return this.click(c.proxy(a,function(e){var f=(c.data(this,"lastToggle"+a.guid)||0)%d;c.data(this,"lastToggle"+a.guid,f+1);e.preventDefault();return b[f].apply(this,arguments)||false}))},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var ya={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};c.each(["live","die"],function(a,b){c.fn[b]=function(d,e,f,h){var l,k=0,o,x,r=h||this.selector;h=h?this:c(this.context);if(typeof d===
76 "object"&&!d.preventDefault){for(l in d)h[b](l,e,d[l],r);return this}if(c.isFunction(e)){f=e;e=B}for(d=(d||"").split(" ");(l=d[k++])!=null;){o=X.exec(l);x="";if(o){x=o[0];l=l.replace(X,"")}if(l==="hover")d.push("mouseenter"+x,"mouseleave"+x);else{o=l;if(l==="focus"||l==="blur"){d.push(ya[l]+x);l+=x}else l=(ya[l]||l)+x;if(b==="live"){x=0;for(var A=h.length;x<A;x++)c.event.add(h[x],"live."+Y(l,r),{data:e,selector:r,handler:f,origType:l,origHandler:f,preType:o})}else h.unbind("live."+Y(l,r),f)}}return this}});
77 c.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "),function(a,b){c.fn[b]=function(d,e){if(e==null){e=d;d=null}return arguments.length>0?this.bind(b,d,e):this.trigger(b)};if(c.attrFn)c.attrFn[b]=true});E.attachEvent&&!E.addEventListener&&c(E).bind("unload",function(){for(var a in c.cache)if(c.cache[a].handle)try{c.event.remove(c.cache[a].handle.elem)}catch(b){}});
78 (function(){function a(g,i,n,m,p,q){p=0;for(var u=m.length;p<u;p++){var y=m[p];if(y){var F=false;for(y=y[g];y;){if(y.sizcache===n){F=m[y.sizset];break}if(y.nodeType===1&&!q){y.sizcache=n;y.sizset=p}if(y.nodeName.toLowerCase()===i){F=y;break}y=y[g]}m[p]=F}}}function b(g,i,n,m,p,q){p=0;for(var u=m.length;p<u;p++){var y=m[p];if(y){var F=false;for(y=y[g];y;){if(y.sizcache===n){F=m[y.sizset];break}if(y.nodeType===1){if(!q){y.sizcache=n;y.sizset=p}if(typeof i!=="string"){if(y===i){F=true;break}}else if(k.filter(i,
79 [y]).length>0){F=y;break}}y=y[g]}m[p]=F}}}var d=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,e=0,f=Object.prototype.toString,h=false,l=true;[0,0].sort(function(){l=false;return 0});var k=function(g,i,n,m){n=n||[];var p=i=i||t;if(i.nodeType!==1&&i.nodeType!==9)return[];if(!g||typeof g!=="string")return n;var q,u,y,F,M,N=true,O=k.isXML(i),D=[],R=g;do{d.exec("");if(q=d.exec(R)){R=q[3];D.push(q[1]);if(q[2]){F=q[3];
80 break}}}while(q);if(D.length>1&&x.exec(g))if(D.length===2&&o.relative[D[0]])u=L(D[0]+D[1],i);else for(u=o.relative[D[0]]?[i]:k(D.shift(),i);D.length;){g=D.shift();if(o.relative[g])g+=D.shift();u=L(g,u)}else{if(!m&&D.length>1&&i.nodeType===9&&!O&&o.match.ID.test(D[0])&&!o.match.ID.test(D[D.length-1])){q=k.find(D.shift(),i,O);i=q.expr?k.filter(q.expr,q.set)[0]:q.set[0]}if(i){q=m?{expr:D.pop(),set:C(m)}:k.find(D.pop(),D.length===1&&(D[0]==="~"||D[0]==="+")&&i.parentNode?i.parentNode:i,O);u=q.expr?k.filter(q.expr,
81 q.set):q.set;if(D.length>0)y=C(u);else N=false;for(;D.length;){q=M=D.pop();if(o.relative[M])q=D.pop();else M="";if(q==null)q=i;o.relative[M](y,q,O)}}else y=[]}y||(y=u);y||k.error(M||g);if(f.call(y)==="[object Array]")if(N)if(i&&i.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&k.contains(i,y[g])))n.push(u[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&n.push(u[g]);else n.push.apply(n,y);else C(y,n);if(F){k(F,p,n,m);k.uniqueSort(n)}return n};k.uniqueSort=function(g){if(w){h=
82 l;g.sort(w);if(h)for(var i=1;i<g.length;i++)g[i]===g[i-1]&&g.splice(i--,1)}return g};k.matches=function(g,i){return k(g,null,null,i)};k.matchesSelector=function(g,i){return k(i,null,null,[g]).length>0};k.find=function(g,i,n){var m;if(!g)return[];for(var p=0,q=o.order.length;p<q;p++){var u,y=o.order[p];if(u=o.leftMatch[y].exec(g)){var F=u[1];u.splice(1,1);if(F.substr(F.length-1)!=="\\"){u[1]=(u[1]||"").replace(/\\/g,"");m=o.find[y](u,i,n);if(m!=null){g=g.replace(o.match[y],"");break}}}}m||(m=i.getElementsByTagName("*"));
83 return{set:m,expr:g}};k.filter=function(g,i,n,m){for(var p,q,u=g,y=[],F=i,M=i&&i[0]&&k.isXML(i[0]);g&&i.length;){for(var N in o.filter)if((p=o.leftMatch[N].exec(g))!=null&&p[2]){var O,D,R=o.filter[N];D=p[1];q=false;p.splice(1,1);if(D.substr(D.length-1)!=="\\"){if(F===y)y=[];if(o.preFilter[N])if(p=o.preFilter[N](p,F,n,y,m,M)){if(p===true)continue}else q=O=true;if(p)for(var j=0;(D=F[j])!=null;j++)if(D){O=R(D,p,j,F);var s=m^!!O;if(n&&O!=null)if(s)q=true;else F[j]=false;else if(s){y.push(D);q=true}}if(O!==
84 B){n||(F=y);g=g.replace(o.match[N],"");if(!q)return[];break}}}if(g===u)if(q==null)k.error(g);else break;u=g}return F};k.error=function(g){throw"Syntax error, unrecognized expression: "+g;};var o=k.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+\-]*)\))?/,
85 POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(g){return g.getAttribute("href")}},relative:{"+":function(g,i){var n=typeof i==="string",m=n&&!/\W/.test(i);n=n&&!m;if(m)i=i.toLowerCase();m=0;for(var p=g.length,q;m<p;m++)if(q=g[m]){for(;(q=q.previousSibling)&&q.nodeType!==1;);g[m]=n||q&&q.nodeName.toLowerCase()===
86 i?q||false:q===i}n&&k.filter(i,g,true)},">":function(g,i){var n,m=typeof i==="string",p=0,q=g.length;if(m&&!/\W/.test(i))for(i=i.toLowerCase();p<q;p++){if(n=g[p]){n=n.parentNode;g[p]=n.nodeName.toLowerCase()===i?n:false}}else{for(;p<q;p++)if(n=g[p])g[p]=m?n.parentNode:n.parentNode===i;m&&k.filter(i,g,true)}},"":function(g,i,n){var m,p=e++,q=b;if(typeof i==="string"&&!/\W/.test(i)){m=i=i.toLowerCase();q=a}q("parentNode",i,p,g,m,n)},"~":function(g,i,n){var m,p=e++,q=b;if(typeof i==="string"&&!/\W/.test(i)){m=
87 i=i.toLowerCase();q=a}q("previousSibling",i,p,g,m,n)}},find:{ID:function(g,i,n){if(typeof i.getElementById!=="undefined"&&!n)return(g=i.getElementById(g[1]))&&g.parentNode?[g]:[]},NAME:function(g,i){if(typeof i.getElementsByName!=="undefined"){for(var n=[],m=i.getElementsByName(g[1]),p=0,q=m.length;p<q;p++)m[p].getAttribute("name")===g[1]&&n.push(m[p]);return n.length===0?null:n}},TAG:function(g,i){return i.getElementsByTagName(g[1])}},preFilter:{CLASS:function(g,i,n,m,p,q){g=" "+g[1].replace(/\\/g,
88 "")+" ";if(q)return g;q=0;for(var u;(u=i[q])!=null;q++)if(u)if(p^(u.className&&(" "+u.className+" ").replace(/[\t\n]/g," ").indexOf(g)>=0))n||m.push(u);else if(n)i[q]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()},CHILD:function(g){if(g[1]==="nth"){var i=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=i[1]+(i[2]||1)-0;g[3]=i[3]-0}g[0]=e++;return g},ATTR:function(g,i,n,
89 m,p,q){i=g[1].replace(/\\/g,"");if(!q&&o.attrMap[i])g[1]=o.attrMap[i];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,i,n,m,p){if(g[1]==="not")if((d.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=k(g[3],null,null,i);else{g=k.filter(g[3],i,n,true^p);n||m.push.apply(m,g);return false}else if(o.match.POS.test(g[0])||o.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===
90 true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,i,n){return!!k(n[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)},text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"===
91 g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}},setFilters:{first:function(g,i){return i===0},last:function(g,i,n,m){return i===m.length-1},even:function(g,i){return i%2===0},odd:function(g,i){return i%2===1},lt:function(g,i,n){return i<n[3]-0},gt:function(g,i,n){return i>n[3]-0},nth:function(g,i,n){return n[3]-
92 0===i},eq:function(g,i,n){return n[3]-0===i}},filter:{PSEUDO:function(g,i,n,m){var p=i[1],q=o.filters[p];if(q)return q(g,n,i,m);else if(p==="contains")return(g.textContent||g.innerText||k.getText([g])||"").indexOf(i[3])>=0;else if(p==="not"){i=i[3];n=0;for(m=i.length;n<m;n++)if(i[n]===g)return false;return true}else k.error("Syntax error, unrecognized expression: "+p)},CHILD:function(g,i){var n=i[1],m=g;switch(n){case "only":case "first":for(;m=m.previousSibling;)if(m.nodeType===1)return false;if(n===
93 "first")return true;m=g;case "last":for(;m=m.nextSibling;)if(m.nodeType===1)return false;return true;case "nth":n=i[2];var p=i[3];if(n===1&&p===0)return true;var q=i[0],u=g.parentNode;if(u&&(u.sizcache!==q||!g.nodeIndex)){var y=0;for(m=u.firstChild;m;m=m.nextSibling)if(m.nodeType===1)m.nodeIndex=++y;u.sizcache=q}m=g.nodeIndex-p;return n===0?m===0:m%n===0&&m/n>=0}},ID:function(g,i){return g.nodeType===1&&g.getAttribute("id")===i},TAG:function(g,i){return i==="*"&&g.nodeType===1||g.nodeName.toLowerCase()===
94 i},CLASS:function(g,i){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(i)>-1},ATTR:function(g,i){var n=i[1];n=o.attrHandle[n]?o.attrHandle[n](g):g[n]!=null?g[n]:g.getAttribute(n);var m=n+"",p=i[2],q=i[4];return n==null?p==="!=":p==="="?m===q:p==="*="?m.indexOf(q)>=0:p==="~="?(" "+m+" ").indexOf(q)>=0:!q?m&&n!==false:p==="!="?m!==q:p==="^="?m.indexOf(q)===0:p==="$="?m.substr(m.length-q.length)===q:p==="|="?m===q||m.substr(0,q.length+1)===q+"-":false},POS:function(g,i,n,m){var p=o.setFilters[i[2]];
95 if(p)return p(g,n,i,m)}}},x=o.match.POS,r=function(g,i){return"\\"+(i-0+1)},A;for(A in o.match){o.match[A]=RegExp(o.match[A].source+/(?![^\[]*\])(?![^\(]*\))/.source);o.leftMatch[A]=RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[A].source.replace(/\\(\d+)/g,r))}var C=function(g,i){g=Array.prototype.slice.call(g,0);if(i){i.push.apply(i,g);return i}return g};try{Array.prototype.slice.call(t.documentElement.childNodes,0)}catch(J){C=function(g,i){var n=0,m=i||[];if(f.call(g)==="[object Array]")Array.prototype.push.apply(m,
96 g);else if(typeof g.length==="number")for(var p=g.length;n<p;n++)m.push(g[n]);else for(;g[n];n++)m.push(g[n]);return m}}var w,I;if(t.documentElement.compareDocumentPosition)w=function(g,i){if(g===i){h=true;return 0}if(!g.compareDocumentPosition||!i.compareDocumentPosition)return g.compareDocumentPosition?-1:1;return g.compareDocumentPosition(i)&4?-1:1};else{w=function(g,i){var n,m,p=[],q=[];n=g.parentNode;m=i.parentNode;var u=n;if(g===i){h=true;return 0}else if(n===m)return I(g,i);else if(n){if(!m)return 1}else return-1;
97 for(;u;){p.unshift(u);u=u.parentNode}for(u=m;u;){q.unshift(u);u=u.parentNode}n=p.length;m=q.length;for(u=0;u<n&&u<m;u++)if(p[u]!==q[u])return I(p[u],q[u]);return u===n?I(g,q[u],-1):I(p[u],i,1)};I=function(g,i,n){if(g===i)return n;for(g=g.nextSibling;g;){if(g===i)return-1;g=g.nextSibling}return 1}}k.getText=function(g){for(var i="",n,m=0;g[m];m++){n=g[m];if(n.nodeType===3||n.nodeType===4)i+=n.nodeValue;else if(n.nodeType!==8)i+=k.getText(n.childNodes)}return i};(function(){var g=t.createElement("div"),
98 i="script"+(new Date).getTime(),n=t.documentElement;g.innerHTML="<a name='"+i+"'/>";n.insertBefore(g,n.firstChild);if(t.getElementById(i)){o.find.ID=function(m,p,q){if(typeof p.getElementById!=="undefined"&&!q)return(p=p.getElementById(m[1]))?p.id===m[1]||typeof p.getAttributeNode!=="undefined"&&p.getAttributeNode("id").nodeValue===m[1]?[p]:B:[]};o.filter.ID=function(m,p){var q=typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id");return m.nodeType===1&&q&&q.nodeValue===p}}n.removeChild(g);
99 n=g=null})();(function(){var g=t.createElement("div");g.appendChild(t.createComment(""));if(g.getElementsByTagName("*").length>0)o.find.TAG=function(i,n){var m=n.getElementsByTagName(i[1]);if(i[1]==="*"){for(var p=[],q=0;m[q];q++)m[q].nodeType===1&&p.push(m[q]);m=p}return m};g.innerHTML="<a href='#'></a>";if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")o.attrHandle.href=function(i){return i.getAttribute("href",2)};g=null})();t.querySelectorAll&&
100 function(){var g=k,i=t.createElement("div");i.innerHTML="<p class='TEST'></p>";if(!(i.querySelectorAll&&i.querySelectorAll(".TEST").length===0)){k=function(m,p,q,u){p=p||t;m=m.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!u&&!k.isXML(p))if(p.nodeType===9)try{return C(p.querySelectorAll(m),q)}catch(y){}else if(p.nodeType===1&&p.nodeName.toLowerCase()!=="object"){var F=p.getAttribute("id"),M=F||"__sizzle__";F||p.setAttribute("id",M);try{return C(p.querySelectorAll("#"+M+" "+m),q)}catch(N){}finally{F||
101 p.removeAttribute("id")}}return g(m,p,q,u)};for(var n in g)k[n]=g[n];i=null}}();(function(){var g=t.documentElement,i=g.matchesSelector||g.mozMatchesSelector||g.webkitMatchesSelector||g.msMatchesSelector,n=false;try{i.call(t.documentElement,"[test!='']:sizzle")}catch(m){n=true}if(i)k.matchesSelector=function(p,q){q=q.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!k.isXML(p))try{if(n||!o.match.PSEUDO.test(q)&&!/!=/.test(q))return i.call(p,q)}catch(u){}return k(q,null,null,[p]).length>0}})();(function(){var g=
102 t.createElement("div");g.innerHTML="<div class='test e'></div><div class='test'></div>";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length===0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){o.order.splice(1,0,"CLASS");o.find.CLASS=function(i,n,m){if(typeof n.getElementsByClassName!=="undefined"&&!m)return n.getElementsByClassName(i[1])};g=null}}})();k.contains=t.documentElement.contains?function(g,i){return g!==i&&(g.contains?g.contains(i):true)}:t.documentElement.compareDocumentPosition?
103 function(g,i){return!!(g.compareDocumentPosition(i)&16)}:function(){return false};k.isXML=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false};var L=function(g,i){for(var n,m=[],p="",q=i.nodeType?[i]:i;n=o.match.PSEUDO.exec(g);){p+=n[0];g=g.replace(o.match.PSEUDO,"")}g=o.relative[g]?g+"*":g;n=0;for(var u=q.length;n<u;n++)k(g,q[n],m);return k.filter(p,m)};c.find=k;c.expr=k.selectors;c.expr[":"]=c.expr.filters;c.unique=k.uniqueSort;c.text=k.getText;c.isXMLDoc=k.isXML;
104 c.contains=k.contains})();var Za=/Until$/,$a=/^(?:parents|prevUntil|prevAll)/,ab=/,/,Na=/^.[^:#\[\.,]*$/,bb=Array.prototype.slice,cb=c.expr.match.POS;c.fn.extend({find:function(a){for(var b=this.pushStack("","find",a),d=0,e=0,f=this.length;e<f;e++){d=b.length;c.find(a,this[e],b);if(e>0)for(var h=d;h<b.length;h++)for(var l=0;l<d;l++)if(b[l]===b[h]){b.splice(h--,1);break}}return b},has:function(a){var b=c(a);return this.filter(function(){for(var d=0,e=b.length;d<e;d++)if(c.contains(this,b[d]))return true})},
105 not:function(a){return this.pushStack(ma(this,a,false),"not",a)},filter:function(a){return this.pushStack(ma(this,a,true),"filter",a)},is:function(a){return!!a&&c.filter(a,this).length>0},closest:function(a,b){var d=[],e,f,h=this[0];if(c.isArray(a)){var l,k={},o=1;if(h&&a.length){e=0;for(f=a.length;e<f;e++){l=a[e];k[l]||(k[l]=c.expr.match.POS.test(l)?c(l,b||this.context):l)}for(;h&&h.ownerDocument&&h!==b;){for(l in k){e=k[l];if(e.jquery?e.index(h)>-1:c(h).is(e))d.push({selector:l,elem:h,level:o})}h=
106 h.parentNode;o++}}return d}l=cb.test(a)?c(a,b||this.context):null;e=0;for(f=this.length;e<f;e++)for(h=this[e];h;)if(l?l.index(h)>-1:c.find.matchesSelector(h,a)){d.push(h);break}else{h=h.parentNode;if(!h||!h.ownerDocument||h===b)break}d=d.length>1?c.unique(d):d;return this.pushStack(d,"closest",a)},index:function(a){if(!a||typeof a==="string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var d=typeof a==="string"?c(a,b||this.context):
107 c.makeArray(a),e=c.merge(this.get(),d);return this.pushStack(!d[0]||!d[0].parentNode||d[0].parentNode.nodeType===11||!e[0]||!e[0].parentNode||e[0].parentNode.nodeType===11?e:c.unique(e))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode",d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,
108 2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,
109 b){c.fn[a]=function(d,e){var f=c.map(this,b,d);Za.test(a)||(e=d);if(e&&typeof e==="string")f=c.filter(e,f);f=this.length>1?c.unique(f):f;if((this.length>1||ab.test(e))&&$a.test(a))f=f.reverse();return this.pushStack(f,a,bb.call(arguments).join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return b.length===1?c.find.matchesSelector(b[0],a)?[b[0]]:[]:c.find.matches(a,b)},dir:function(a,b,d){var e=[];for(a=a[b];a&&a.nodeType!==9&&(d===B||a.nodeType!==1||!c(a).is(d));){a.nodeType===1&&
110 e.push(a);a=a[b]}return e},nth:function(a,b,d){b=b||1;for(var e=0;a;a=a[d])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!==b&&d.push(a);return d}});var za=/ jQuery\d+="(?:\d+|null)"/g,$=/^\s+/,Aa=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Ba=/<([\w:]+)/,db=/<tbody/i,eb=/<|&#?\w+;/,Ca=/<(?:script|object|embed|option|style)/i,Da=/checked\s*(?:[^=]|=\s*.checked.)/i,fb=/\=([^="'>\s]+\/)>/g,P={option:[1,
111 "<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};P.optgroup=P.option;P.tbody=P.tfoot=P.colgroup=P.caption=P.thead;P.th=P.td;if(!c.support.htmlSerialize)P._default=[1,"div<div>","</div>"];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d=
112 c(this);d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==B)return this.empty().append((this[0]&&this[0].ownerDocument||t).createTextNode(a));return c.text(this)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this},
113 wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})},
114 prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,
115 this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},remove:function(a,b){for(var d=0,e;(e=this[d])!=null;d++)if(!a||c.filter(a,[e]).length){if(!b&&e.nodeType===1){c.cleanData(e.getElementsByTagName("*"));c.cleanData([e])}e.parentNode&&e.parentNode.removeChild(e)}return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++)for(b.nodeType===1&&c.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild);
116 return this},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var d=this.outerHTML,e=this.ownerDocument;if(!d){d=e.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(za,"").replace(fb,'="$1">').replace($,"")],e)[0]}else return this.cloneNode(true)});if(a===true){na(this,b);na(this.find("*"),b.find("*"))}return b},html:function(a){if(a===B)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(za,""):null;
117 else if(typeof a==="string"&&!Ca.test(a)&&(c.support.leadingWhitespace||!$.test(a))&&!P[(Ba.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Aa,"<$1></$2>");try{for(var b=0,d=this.length;b<d;b++)if(this[b].nodeType===1){c.cleanData(this[b].getElementsByTagName("*"));this[b].innerHTML=a}}catch(e){this.empty().append(a)}}else c.isFunction(a)?this.each(function(f){var h=c(this);h.html(a.call(this,f,h.html()))}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(c.isFunction(a))return this.each(function(b){var d=
118 c(this),e=d.html();d.replaceWith(a.call(this,b,e))});if(typeof a!=="string")a=c(a).detach();return this.each(function(){var b=this.nextSibling,d=this.parentNode;c(this).remove();b?c(b).before(a):c(d).append(a)})}else return this.pushStack(c(c.isFunction(a)?a():a),"replaceWith",a)},detach:function(a){return this.remove(a,true)},domManip:function(a,b,d){var e,f,h,l=a[0],k=[];if(!c.support.checkClone&&arguments.length===3&&typeof l==="string"&&Da.test(l))return this.each(function(){c(this).domManip(a,
119 b,d,true)});if(c.isFunction(l))return this.each(function(x){var r=c(this);a[0]=l.call(this,x,b?r.html():B);r.domManip(a,b,d)});if(this[0]){e=l&&l.parentNode;e=c.support.parentNode&&e&&e.nodeType===11&&e.childNodes.length===this.length?{fragment:e}:c.buildFragment(a,this,k);h=e.fragment;if(f=h.childNodes.length===1?h=h.firstChild:h.firstChild){b=b&&c.nodeName(f,"tr");f=0;for(var o=this.length;f<o;f++)d.call(b?c.nodeName(this[f],"table")?this[f].getElementsByTagName("tbody")[0]||this[f].appendChild(this[f].ownerDocument.createElement("tbody")):
120 this[f]:this[f],f>0||e.cacheable||this.length>1?h.cloneNode(true):h)}k.length&&c.each(k,Oa)}return this}});c.buildFragment=function(a,b,d){var e,f,h;b=b&&b[0]?b[0].ownerDocument||b[0]:t;if(a.length===1&&typeof a[0]==="string"&&a[0].length<512&&b===t&&!Ca.test(a[0])&&(c.support.checkClone||!Da.test(a[0]))){f=true;if(h=c.fragments[a[0]])if(h!==1)e=h}if(!e){e=b.createDocumentFragment();c.clean(a,b,e,d)}if(f)c.fragments[a[0]]=h?e:1;return{fragment:e,cacheable:f}};c.fragments={};c.each({appendTo:"append",
121 prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){c.fn[a]=function(d){var e=[];d=c(d);var f=this.length===1&&this[0].parentNode;if(f&&f.nodeType===11&&f.childNodes.length===1&&d.length===1){d[b](this[0]);return this}else{f=0;for(var h=d.length;f<h;f++){var l=(f>0?this.clone(true):this).get();c(d[f])[b](l);e=e.concat(l)}return this.pushStack(e,a,d.selector)}}});c.extend({clean:function(a,b,d,e){b=b||t;if(typeof b.createElement==="undefined")b=b.ownerDocument||
122 b[0]&&b[0].ownerDocument||t;for(var f=[],h=0,l;(l=a[h])!=null;h++){if(typeof l==="number")l+="";if(l){if(typeof l==="string"&&!eb.test(l))l=b.createTextNode(l);else if(typeof l==="string"){l=l.replace(Aa,"<$1></$2>");var k=(Ba.exec(l)||["",""])[1].toLowerCase(),o=P[k]||P._default,x=o[0],r=b.createElement("div");for(r.innerHTML=o[1]+l+o[2];x--;)r=r.lastChild;if(!c.support.tbody){x=db.test(l);k=k==="table"&&!x?r.firstChild&&r.firstChild.childNodes:o[1]==="<table>"&&!x?r.childNodes:[];for(o=k.length-
123 1;o>=0;--o)c.nodeName(k[o],"tbody")&&!k[o].childNodes.length&&k[o].parentNode.removeChild(k[o])}!c.support.leadingWhitespace&&$.test(l)&&r.insertBefore(b.createTextNode($.exec(l)[0]),r.firstChild);l=r.childNodes}if(l.nodeType)f.push(l);else f=c.merge(f,l)}}if(d)for(h=0;f[h];h++)if(e&&c.nodeName(f[h],"script")&&(!f[h].type||f[h].type.toLowerCase()==="text/javascript"))e.push(f[h].parentNode?f[h].parentNode.removeChild(f[h]):f[h]);else{f[h].nodeType===1&&f.splice.apply(f,[h+1,0].concat(c.makeArray(f[h].getElementsByTagName("script"))));
124 d.appendChild(f[h])}return f},cleanData:function(a){for(var b,d,e=c.cache,f=c.event.special,h=c.support.deleteExpando,l=0,k;(k=a[l])!=null;l++)if(!(k.nodeName&&c.noData[k.nodeName.toLowerCase()]))if(d=k[c.expando]){if((b=e[d])&&b.events)for(var o in b.events)f[o]?c.event.remove(k,o):c.removeEvent(k,o,b.handle);if(h)delete k[c.expando];else k.removeAttribute&&k.removeAttribute(c.expando);delete e[d]}}});var Ea=/alpha\([^)]*\)/i,gb=/opacity=([^)]*)/,hb=/-([a-z])/ig,ib=/([A-Z])/g,Fa=/^-?\d+(?:px)?$/i,
125 jb=/^-?\d/,kb={position:"absolute",visibility:"hidden",display:"block"},Pa=["Left","Right"],Qa=["Top","Bottom"],W,Ga,aa,lb=function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){if(arguments.length===2&&b===B)return this;return c.access(this,a,b,true,function(d,e,f){return f!==B?c.style(d,e,f):c.css(d,e)})};c.extend({cssHooks:{opacity:{get:function(a,b){if(b){var d=W(a,"opacity","opacity");return d===""?"1":d}else return a.style.opacity}}},cssNumber:{zIndex:true,fontWeight:true,opacity:true,
126 zoom:true,lineHeight:true},cssProps:{"float":c.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,d,e){if(!(!a||a.nodeType===3||a.nodeType===8||!a.style)){var f,h=c.camelCase(b),l=a.style,k=c.cssHooks[h];b=c.cssProps[h]||h;if(d!==B){if(!(typeof d==="number"&&isNaN(d)||d==null)){if(typeof d==="number"&&!c.cssNumber[h])d+="px";if(!k||!("set"in k)||(d=k.set(a,d))!==B)try{l[b]=d}catch(o){}}}else{if(k&&"get"in k&&(f=k.get(a,false,e))!==B)return f;return l[b]}}},css:function(a,b,d){var e,f=c.camelCase(b),
127 h=c.cssHooks[f];b=c.cssProps[f]||f;if(h&&"get"in h&&(e=h.get(a,true,d))!==B)return e;else if(W)return W(a,b,f)},swap:function(a,b,d){var e={},f;for(f in b){e[f]=a.style[f];a.style[f]=b[f]}d.call(a);for(f in b)a.style[f]=e[f]},camelCase:function(a){return a.replace(hb,lb)}});c.curCSS=c.css;c.each(["height","width"],function(a,b){c.cssHooks[b]={get:function(d,e,f){var h;if(e){if(d.offsetWidth!==0)h=oa(d,b,f);else c.swap(d,kb,function(){h=oa(d,b,f)});if(h<=0){h=W(d,b,b);if(h==="0px"&&aa)h=aa(d,b,b);
128 if(h!=null)return h===""||h==="auto"?"0px":h}if(h<0||h==null){h=d.style[b];return h===""||h==="auto"?"0px":h}return typeof h==="string"?h:h+"px"}},set:function(d,e){if(Fa.test(e)){e=parseFloat(e);if(e>=0)return e+"px"}else return e}}});if(!c.support.opacity)c.cssHooks.opacity={get:function(a,b){return gb.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var d=a.style;d.zoom=1;var e=c.isNaN(b)?"":"alpha(opacity="+b*100+")",f=
129 d.filter||"";d.filter=Ea.test(f)?f.replace(Ea,e):d.filter+" "+e}};if(t.defaultView&&t.defaultView.getComputedStyle)Ga=function(a,b,d){var e;d=d.replace(ib,"-$1").toLowerCase();if(!(b=a.ownerDocument.defaultView))return B;if(b=b.getComputedStyle(a,null)){e=b.getPropertyValue(d);if(e===""&&!c.contains(a.ownerDocument.documentElement,a))e=c.style(a,d)}return e};if(t.documentElement.currentStyle)aa=function(a,b){var d,e,f=a.currentStyle&&a.currentStyle[b],h=a.style;if(!Fa.test(f)&&jb.test(f)){d=h.left;
130 e=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;h.left=b==="fontSize"?"1em":f||0;f=h.pixelLeft+"px";h.left=d;a.runtimeStyle.left=e}return f===""?"auto":f};W=Ga||aa;if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b=a.offsetHeight;return a.offsetWidth===0&&b===0||!c.support.reliableHiddenOffsets&&(a.style.display||c.css(a,"display"))==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var mb=c.now(),nb=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,
131 ob=/^(?:select|textarea)/i,pb=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,qb=/^(?:GET|HEAD)$/,Ra=/\[\]$/,T=/\=\?(&|$)/,ja=/\?/,rb=/([?&])_=[^&]*/,sb=/^(\w+:)?\/\/([^\/?#]+)/,tb=/%20/g,ub=/#.*$/,Ha=c.fn.load;c.fn.extend({load:function(a,b,d){if(typeof a!=="string"&&Ha)return Ha.apply(this,arguments);else if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var f=a.slice(e,a.length);a=a.slice(0,e)}e="GET";if(b)if(c.isFunction(b)){d=b;b=null}else if(typeof b===
132 "object"){b=c.param(b,c.ajaxSettings.traditional);e="POST"}var h=this;c.ajax({url:a,type:e,dataType:"html",data:b,complete:function(l,k){if(k==="success"||k==="notmodified")h.html(f?c("<div>").append(l.responseText.replace(nb,"")).find(f):l.responseText);d&&h.each(d,[l.responseText,k,l])}});return this},serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&&
133 !this.disabled&&(this.checked||ob.test(this.nodeName)||pb.test(this.type))}).map(function(a,b){var d=c(this).val();return d==null?null:c.isArray(d)?c.map(d,function(e){return{name:b.name,value:e}}):{name:b.name,value:d}}).get()}});c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){c.fn[b]=function(d){return this.bind(b,d)}});c.extend({get:function(a,b,d,e){if(c.isFunction(b)){e=e||d;d=b;b=null}return c.ajax({type:"GET",url:a,data:b,success:d,dataType:e})},
134 getScript:function(a,b){return c.get(a,null,b,"script")},getJSON:function(a,b,d){return c.get(a,b,d,"json")},post:function(a,b,d,e){if(c.isFunction(b)){e=e||d;d=b;b={}}return c.ajax({type:"POST",url:a,data:b,success:d,dataType:e})},ajaxSetup:function(a){c.extend(c.ajaxSettings,a)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:function(){return new E.XMLHttpRequest},accepts:{xml:"application/xml, text/xml",html:"text/html",
135 script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},ajax:function(a){var b=c.extend(true,{},c.ajaxSettings,a),d,e,f,h=b.type.toUpperCase(),l=qb.test(h);b.url=b.url.replace(ub,"");b.context=a&&a.context!=null?a.context:b;if(b.data&&b.processData&&typeof b.data!=="string")b.data=c.param(b.data,b.traditional);if(b.dataType==="jsonp"){if(h==="GET")T.test(b.url)||(b.url+=(ja.test(b.url)?"&":"?")+(b.jsonp||"callback")+"=?");else if(!b.data||
136 !T.test(b.data))b.data=(b.data?b.data+"&":"")+(b.jsonp||"callback")+"=?";b.dataType="json"}if(b.dataType==="json"&&(b.data&&T.test(b.data)||T.test(b.url))){d=b.jsonpCallback||"jsonp"+mb++;if(b.data)b.data=(b.data+"").replace(T,"="+d+"$1");b.url=b.url.replace(T,"="+d+"$1");b.dataType="script";var k=E[d];E[d]=function(m){if(c.isFunction(k))k(m);else{E[d]=B;try{delete E[d]}catch(p){}}f=m;c.handleSuccess(b,w,e,f);c.handleComplete(b,w,e,f);r&&r.removeChild(A)}}if(b.dataType==="script"&&b.cache===null)b.cache=
137 false;if(b.cache===false&&l){var o=c.now(),x=b.url.replace(rb,"$1_="+o);b.url=x+(x===b.url?(ja.test(b.url)?"&":"?")+"_="+o:"")}if(b.data&&l)b.url+=(ja.test(b.url)?"&":"?")+b.data;b.global&&c.active++===0&&c.event.trigger("ajaxStart");o=(o=sb.exec(b.url))&&(o[1]&&o[1].toLowerCase()!==location.protocol||o[2].toLowerCase()!==location.host);if(b.dataType==="script"&&h==="GET"&&o){var r=t.getElementsByTagName("head")[0]||t.documentElement,A=t.createElement("script");if(b.scriptCharset)A.charset=b.scriptCharset;
138 A.src=b.url;if(!d){var C=false;A.onload=A.onreadystatechange=function(){if(!C&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){C=true;c.handleSuccess(b,w,e,f);c.handleComplete(b,w,e,f);A.onload=A.onreadystatechange=null;r&&A.parentNode&&r.removeChild(A)}}}r.insertBefore(A,r.firstChild);return B}var J=false,w=b.xhr();if(w){b.username?w.open(h,b.url,b.async,b.username,b.password):w.open(h,b.url,b.async);try{if(b.data!=null&&!l||a&&a.contentType)w.setRequestHeader("Content-Type",
139 b.contentType);if(b.ifModified){c.lastModified[b.url]&&w.setRequestHeader("If-Modified-Since",c.lastModified[b.url]);c.etag[b.url]&&w.setRequestHeader("If-None-Match",c.etag[b.url])}o||w.setRequestHeader("X-Requested-With","XMLHttpRequest");w.setRequestHeader("Accept",b.dataType&&b.accepts[b.dataType]?b.accepts[b.dataType]+", */*; q=0.01":b.accepts._default)}catch(I){}if(b.beforeSend&&b.beforeSend.call(b.context,w,b)===false){b.global&&c.active--===1&&c.event.trigger("ajaxStop");w.abort();return false}b.global&&
140 c.triggerGlobal(b,"ajaxSend",[w,b]);var L=w.onreadystatechange=function(m){if(!w||w.readyState===0||m==="abort"){J||c.handleComplete(b,w,e,f);J=true;if(w)w.onreadystatechange=c.noop}else if(!J&&w&&(w.readyState===4||m==="timeout")){J=true;w.onreadystatechange=c.noop;e=m==="timeout"?"timeout":!c.httpSuccess(w)?"error":b.ifModified&&c.httpNotModified(w,b.url)?"notmodified":"success";var p;if(e==="success")try{f=c.httpData(w,b.dataType,b)}catch(q){e="parsererror";p=q}if(e==="success"||e==="notmodified")d||
141 c.handleSuccess(b,w,e,f);else c.handleError(b,w,e,p);d||c.handleComplete(b,w,e,f);m==="timeout"&&w.abort();if(b.async)w=null}};try{var g=w.abort;w.abort=function(){w&&Function.prototype.call.call(g,w);L("abort")}}catch(i){}b.async&&b.timeout>0&&setTimeout(function(){w&&!J&&L("timeout")},b.timeout);try{w.send(l||b.data==null?null:b.data)}catch(n){c.handleError(b,w,null,n);c.handleComplete(b,w,e,f)}b.async||L();return w}},param:function(a,b){var d=[],e=function(h,l){l=c.isFunction(l)?l():l;d[d.length]=
142 encodeURIComponent(h)+"="+encodeURIComponent(l)};if(b===B)b=c.ajaxSettings.traditional;if(c.isArray(a)||a.jquery)c.each(a,function(){e(this.name,this.value)});else for(var f in a)da(f,a[f],b,e);return d.join("&").replace(tb,"+")}});c.extend({active:0,lastModified:{},etag:{},handleError:function(a,b,d,e){a.error&&a.error.call(a.context,b,d,e);a.global&&c.triggerGlobal(a,"ajaxError",[b,a,e])},handleSuccess:function(a,b,d,e){a.success&&a.success.call(a.context,e,d,b);a.global&&c.triggerGlobal(a,"ajaxSuccess",
143 [b,a])},handleComplete:function(a,b,d){a.complete&&a.complete.call(a.context,b,d);a.global&&c.triggerGlobal(a,"ajaxComplete",[b,a]);a.global&&c.active--===1&&c.event.trigger("ajaxStop")},triggerGlobal:function(a,b,d){(a.context&&a.context.url==null?c(a.context):c.event).trigger(b,d)},httpSuccess:function(a){try{return!a.status&&location.protocol==="file:"||a.status>=200&&a.status<300||a.status===304||a.status===1223}catch(b){}return false},httpNotModified:function(a,b){var d=a.getResponseHeader("Last-Modified"),
144 e=a.getResponseHeader("Etag");if(d)c.lastModified[b]=d;if(e)c.etag[b]=e;return a.status===304},httpData:function(a,b,d){var e=a.getResponseHeader("content-type")||"",f=b==="xml"||!b&&e.indexOf("xml")>=0;a=f?a.responseXML:a.responseText;f&&a.documentElement.nodeName==="parsererror"&&c.error("parsererror");if(d&&d.dataFilter)a=d.dataFilter(a,b);if(typeof a==="string")if(b==="json"||!b&&e.indexOf("json")>=0)a=c.parseJSON(a);else if(b==="script"||!b&&e.indexOf("javascript")>=0)c.globalEval(a);return a}});
145 if(E.ActiveXObject)c.ajaxSettings.xhr=function(){if(E.location.protocol!=="file:")try{return new E.XMLHttpRequest}catch(a){}try{return new E.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}};c.support.ajax=!!c.ajaxSettings.xhr();var ea={},vb=/^(?:toggle|show|hide)$/,wb=/^([+\-]=)?([\d+.\-]+)(.*)$/,ba,pa=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];c.fn.extend({show:function(a,b,d){if(a||a===0)return this.animate(S("show",
146 3),a,b,d);else{d=0;for(var e=this.length;d<e;d++){a=this[d];b=a.style.display;if(!c.data(a,"olddisplay")&&b==="none")b=a.style.display="";b===""&&c.css(a,"display")==="none"&&c.data(a,"olddisplay",qa(a.nodeName))}for(d=0;d<e;d++){a=this[d];b=a.style.display;if(b===""||b==="none")a.style.display=c.data(a,"olddisplay")||""}return this}},hide:function(a,b,d){if(a||a===0)return this.animate(S("hide",3),a,b,d);else{a=0;for(b=this.length;a<b;a++){d=c.css(this[a],"display");d!=="none"&&c.data(this[a],"olddisplay",
147 d)}for(a=0;a<b;a++)this[a].style.display="none";return this}},_toggle:c.fn.toggle,toggle:function(a,b,d){var e=typeof a==="boolean";if(c.isFunction(a)&&c.isFunction(b))this._toggle.apply(this,arguments);else a==null||e?this.each(function(){var f=e?a:c(this).is(":hidden");c(this)[f?"show":"hide"]()}):this.animate(S("toggle",3),a,b,d);return this},fadeTo:function(a,b,d,e){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,d,e)},animate:function(a,b,d,e){var f=c.speed(b,
148 d,e);if(c.isEmptyObject(a))return this.each(f.complete);return this[f.queue===false?"each":"queue"](function(){var h=c.extend({},f),l,k=this.nodeType===1,o=k&&c(this).is(":hidden"),x=this;for(l in a){var r=c.camelCase(l);if(l!==r){a[r]=a[l];delete a[l];l=r}if(a[l]==="hide"&&o||a[l]==="show"&&!o)return h.complete.call(this);if(k&&(l==="height"||l==="width")){h.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY];if(c.css(this,"display")==="inline"&&c.css(this,"float")==="none")if(c.support.inlineBlockNeedsLayout)if(qa(this.nodeName)===
149 "inline")this.style.display="inline-block";else{this.style.display="inline";this.style.zoom=1}else this.style.display="inline-block"}if(c.isArray(a[l])){(h.specialEasing=h.specialEasing||{})[l]=a[l][1];a[l]=a[l][0]}}if(h.overflow!=null)this.style.overflow="hidden";h.curAnim=c.extend({},a);c.each(a,function(A,C){var J=new c.fx(x,h,A);if(vb.test(C))J[C==="toggle"?o?"show":"hide":C](a);else{var w=wb.exec(C),I=J.cur()||0;if(w){var L=parseFloat(w[2]),g=w[3]||"px";if(g!=="px"){c.style(x,A,(L||1)+g);I=(L||
150 1)/J.cur()*I;c.style(x,A,I+g)}if(w[1])L=(w[1]==="-="?-1:1)*L+I;J.custom(I,L,g)}else J.custom(I,C,"")}});return true})},stop:function(a,b){var d=c.timers;a&&this.queue([]);this.each(function(){for(var e=d.length-1;e>=0;e--)if(d[e].elem===this){b&&d[e](true);d.splice(e,1)}});b||this.dequeue();return this}});c.each({slideDown:S("show",1),slideUp:S("hide",1),slideToggle:S("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){c.fn[a]=function(d,e,f){return this.animate(b,
151 d,e,f)}});c.extend({speed:function(a,b,d){var e=a&&typeof a==="object"?c.extend({},a):{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};e.duration=c.fx.off?0:typeof e.duration==="number"?e.duration:e.duration in c.fx.speeds?c.fx.speeds[e.duration]:c.fx.speeds._default;e.old=e.complete;e.complete=function(){e.queue!==false&&c(this).dequeue();c.isFunction(e.old)&&e.old.call(this)};return e},easing:{linear:function(a,b,d,e){return d+e*a},swing:function(a,b,d,e){return(-Math.cos(a*
152 Math.PI)/2+0.5)*e+d}},timers:[],fx:function(a,b,d){this.options=b;this.elem=a;this.prop=d;if(!b.orig)b.orig={}}});c.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(c.fx.step[this.prop]||c.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a=parseFloat(c.css(this.elem,this.prop));return a&&a>-1E4?a:0},custom:function(a,b,d){function e(l){return f.step(l)}
153 var f=this,h=c.fx;this.startTime=c.now();this.start=a;this.end=b;this.unit=d||this.unit||"px";this.now=this.start;this.pos=this.state=0;e.elem=this.elem;if(e()&&c.timers.push(e)&&!ba)ba=setInterval(h.tick,h.interval)},show:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());c(this.elem).show()},hide:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.hide=true;
154 this.custom(this.cur(),0)},step:function(a){var b=c.now(),d=true;if(a||b>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var e in this.options.curAnim)if(this.options.curAnim[e]!==true)d=false;if(d){if(this.options.overflow!=null&&!c.support.shrinkWrapBlocks){var f=this.elem,h=this.options;c.each(["","X","Y"],function(k,o){f.style["overflow"+o]=h.overflow[k]})}this.options.hide&&c(this.elem).hide();if(this.options.hide||
155 this.options.show)for(var l in this.options.curAnim)c.style(this.elem,l,this.options.orig[l]);this.options.complete.call(this.elem)}return false}else{a=b-this.startTime;this.state=a/this.options.duration;b=this.options.easing||(c.easing.swing?"swing":"linear");this.pos=c.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||b](this.state,a,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};c.extend(c.fx,{tick:function(){for(var a=
156 c.timers,b=0;b<a.length;b++)a[b]()||a.splice(b--,1);a.length||c.fx.stop()},interval:13,stop:function(){clearInterval(ba);ba=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){c.style(a.elem,"opacity",a.now)},_default:function(a){if(a.elem.style&&a.elem.style[a.prop]!=null)a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit;else a.elem[a.prop]=a.now}}});if(c.expr&&c.expr.filters)c.expr.filters.animated=function(a){return c.grep(c.timers,function(b){return a===
157 b.elem}).length};var xb=/^t(?:able|d|h)$/i,Ia=/^(?:body|html)$/i;c.fn.offset="getBoundingClientRect"in t.documentElement?function(a){var b=this[0],d;if(a)return this.each(function(l){c.offset.setOffset(this,a,l)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);try{d=b.getBoundingClientRect()}catch(e){}var f=b.ownerDocument,h=f.documentElement;if(!d||!c.contains(h,b))return d||{top:0,left:0};b=f.body;f=fa(f);return{top:d.top+(f.pageYOffset||c.support.boxModel&&
158 h.scrollTop||b.scrollTop)-(h.clientTop||b.clientTop||0),left:d.left+(f.pageXOffset||c.support.boxModel&&h.scrollLeft||b.scrollLeft)-(h.clientLeft||b.clientLeft||0)}}:function(a){var b=this[0];if(a)return this.each(function(x){c.offset.setOffset(this,a,x)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);c.offset.initialize();var d,e=b.offsetParent,f=b.ownerDocument,h=f.documentElement,l=f.body;d=(f=f.defaultView)?f.getComputedStyle(b,null):b.currentStyle;
159 for(var k=b.offsetTop,o=b.offsetLeft;(b=b.parentNode)&&b!==l&&b!==h;){if(c.offset.supportsFixedPosition&&d.position==="fixed")break;d=f?f.getComputedStyle(b,null):b.currentStyle;k-=b.scrollTop;o-=b.scrollLeft;if(b===e){k+=b.offsetTop;o+=b.offsetLeft;if(c.offset.doesNotAddBorder&&!(c.offset.doesAddBorderForTableAndCells&&xb.test(b.nodeName))){k+=parseFloat(d.borderTopWidth)||0;o+=parseFloat(d.borderLeftWidth)||0}e=b.offsetParent}if(c.offset.subtractsBorderForOverflowNotVisible&&d.overflow!=="visible"){k+=
160 parseFloat(d.borderTopWidth)||0;o+=parseFloat(d.borderLeftWidth)||0}d=d}if(d.position==="relative"||d.position==="static"){k+=l.offsetTop;o+=l.offsetLeft}if(c.offset.supportsFixedPosition&&d.position==="fixed"){k+=Math.max(h.scrollTop,l.scrollTop);o+=Math.max(h.scrollLeft,l.scrollLeft)}return{top:k,left:o}};c.offset={initialize:function(){var a=t.body,b=t.createElement("div"),d,e,f,h=parseFloat(c.css(a,"marginTop"))||0;c.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",
161 height:"1px",visibility:"hidden"});b.innerHTML="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";a.insertBefore(b,a.firstChild);d=b.firstChild;e=d.firstChild;f=d.nextSibling.firstChild.firstChild;this.doesNotAddBorder=e.offsetTop!==5;this.doesAddBorderForTableAndCells=
162 f.offsetTop===5;e.style.position="fixed";e.style.top="20px";this.supportsFixedPosition=e.offsetTop===20||e.offsetTop===15;e.style.position=e.style.top="";d.style.overflow="hidden";d.style.position="relative";this.subtractsBorderForOverflowNotVisible=e.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==h;a.removeChild(b);c.offset.initialize=c.noop},bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(c.css(a,
163 "marginTop"))||0;d+=parseFloat(c.css(a,"marginLeft"))||0}return{top:b,left:d}},setOffset:function(a,b,d){var e=c.css(a,"position");if(e==="static")a.style.position="relative";var f=c(a),h=f.offset(),l=c.css(a,"top"),k=c.css(a,"left"),o=e==="absolute"&&c.inArray("auto",[l,k])>-1;e={};var x={};if(o)x=f.position();l=o?x.top:parseInt(l,10)||0;k=o?x.left:parseInt(k,10)||0;if(c.isFunction(b))b=b.call(a,d,h);if(b.top!=null)e.top=b.top-h.top+l;if(b.left!=null)e.left=b.left-h.left+k;"using"in b?b.using.call(a,
164 e):f.css(e)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),e=Ia.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.css(a,"marginTop"))||0;d.left-=parseFloat(c.css(a,"marginLeft"))||0;e.top+=parseFloat(c.css(b[0],"borderTopWidth"))||0;e.left+=parseFloat(c.css(b[0],"borderLeftWidth"))||0;return{top:d.top-e.top,left:d.left-e.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||t.body;a&&!Ia.test(a.nodeName)&&
165 c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(e){var f=this[0],h;if(!f)return null;if(e!==B)return this.each(function(){if(h=fa(this))h.scrollTo(!a?e:c(h).scrollLeft(),a?e:c(h).scrollTop());else this[d]=e});else return(h=fa(f))?"pageXOffset"in h?h[a?"pageYOffset":"pageXOffset"]:c.support.boxModel&&h.document.documentElement[d]||h.document.body[d]:f[d]}});c.each(["Height","Width"],function(a,b){var d=b.toLowerCase();
166 c.fn["inner"+b]=function(){return this[0]?parseFloat(c.css(this[0],d,"padding")):null};c.fn["outer"+b]=function(e){return this[0]?parseFloat(c.css(this[0],d,e?"margin":"border")):null};c.fn[d]=function(e){var f=this[0];if(!f)return e==null?null:this;if(c.isFunction(e))return this.each(function(l){var k=c(this);k[d](e.call(this,l,k[d]()))});if(c.isWindow(f))return f.document.compatMode==="CSS1Compat"&&f.document.documentElement["client"+b]||f.document.body["client"+b];else if(f.nodeType===9)return Math.max(f.documentElement["client"+
167 b],f.body["scroll"+b],f.documentElement["scroll"+b],f.body["offset"+b],f.documentElement["offset"+b]);else if(e===B){f=c.css(f,d);var h=parseFloat(f);return c.isNaN(h)?f:h}else return this.css(d,typeof e==="string"?e:e+"px")}})})(window);
168
forum/static/js/widget/jquery.colorbox-min.js
File was created 1 // ColorBox v1.3.19 - jQuery lightbox plugin
2 // (c) 2011 Jack Moore - jacklmoore.com
3 // License: http://www.opensource.org/licenses/mit-license.php
4 (function(a,b,c){function Z(c,d,e){var g=b.createElement(c);return d&&(g.id=f+d),e&&(g.style.cssText=e),a(g)}function $(a){var b=y.length,c=(Q+a)%b;return c<0?b+c:c}function _(a,b){return Math.round((/%/.test(a)?(b==="x"?z.width():z.height())/100:1)*parseInt(a,10))}function ba(a){return K.photo||/\.(gif|png|jpe?g|bmp|ico)((#|\?).*)?$/i.test(a)}function bb(){var b;K=a.extend({},a.data(P,e));for(b in K)a.isFunction(K[b])&&b.slice(0,2)!=="on"&&(K[b]=K[b].call(P));K.rel=K.rel||P.rel||"nofollow",K.href=K.href||a(P).attr("href"),K.title=K.title||P.title,typeof K.href=="string"&&(K.href=a.trim(K.href))}function bc(b,c){a.event.trigger(b),c&&c.call(P)}function bd(){var a,b=f+"Slideshow_",c="click."+f,d,e,g;K.slideshow&&y[1]?(d=function(){F.text(K.slideshowStop).unbind(c).bind(j,function(){if(K.loop||y[Q+1])a=setTimeout(W.next,K.slideshowSpeed)}).bind(i,function(){clearTimeout(a)}).one(c+" "+k,e),r.removeClass(b+"off").addClass(b+"on"),a=setTimeout(W.next,K.slideshowSpeed)},e=function(){clearTimeout(a),F.text(K.slideshowStart).unbind([j,i,k,c].join(" ")).one(c,function(){W.next(),d()}),r.removeClass(b+"on").addClass(b+"off")},K.slideshowAuto?d():e()):r.removeClass(b+"off "+b+"on")}function be(b){U||(P=b,bb(),y=a(P),Q=0,K.rel!=="nofollow"&&(y=a("."+g).filter(function(){var b=a.data(this,e).rel||this.rel;return b===K.rel}),Q=y.index(P),Q===-1&&(y=y.add(P),Q=y.length-1)),S||(S=T=!0,r.show(),K.returnFocus&&a(P).blur().one(l,function(){a(this).focus()}),q.css({opacity:+K.opacity,cursor:K.overlayClose?"pointer":"auto"}).show(),K.w=_(K.initialWidth,"x"),K.h=_(K.initialHeight,"y"),W.position(),o&&z.bind("resize."+p+" scroll."+p,function(){q.css({width:z.width(),height:z.height(),top:z.scrollTop(),left:z.scrollLeft()})}).trigger("resize."+p),bc(h,K.onOpen),J.add(D).hide(),I.html(K.close).show()),W.load(!0))}function bf(){!r&&b.body&&(Y=!1,z=a(c),r=Z(X).attr({id:e,"class":n?f+(o?"IE6":"IE"):""}).hide(),q=Z(X,"Overlay",o?"position:absolute":"").hide(),s=Z(X,"Wrapper"),t=Z(X,"Content").append(A=Z(X,"LoadedContent","width:0; height:0; overflow:hidden"),C=Z(X,"LoadingOverlay").add(Z(X,"LoadingGraphic")),D=Z(X,"Title"),E=Z(X,"Current"),G=Z(X,"Next"),H=Z(X,"Previous"),F=Z(X,"Slideshow").bind(h,bd),I=Z(X,"Close")),s.append(Z(X).append(Z(X,"TopLeft"),u=Z(X,"TopCenter"),Z(X,"TopRight")),Z(X,!1,"clear:left").append(v=Z(X,"MiddleLeft"),t,w=Z(X,"MiddleRight")),Z(X,!1,"clear:left").append(Z(X,"BottomLeft"),x=Z(X,"BottomCenter"),Z(X,"BottomRight"))).find("div div").css({"float":"left"}),B=Z(X,!1,"position:absolute; width:9999px; visibility:hidden; display:none"),J=G.add(H).add(E).add(F),a(b.body).append(q,r.append(s,B)))}function bg(){return r?(Y||(Y=!0,L=u.height()+x.height()+t.outerHeight(!0)-t.height(),M=v.width()+w.width()+t.outerWidth(!0)-t.width(),N=A.outerHeight(!0),O=A.outerWidth(!0),r.css({"padding-bottom":L,"padding-right":M}),G.click(function(){W.next()}),H.click(function(){W.prev()}),I.click(function(){W.close()}),q.click(function(){K.overlayClose&&W.close()}),a(b).bind("keydown."+f,function(a){var b=a.keyCode;S&&K.escKey&&b===27&&(a.preventDefault(),W.close()),S&&K.arrowKey&&y[1]&&(b===37?(a.preventDefault(),H.click()):b===39&&(a.preventDefault(),G.click()))}),a("."+g,b).live("click",function(a){a.which>1||a.shiftKey||a.altKey||a.metaKey||(a.preventDefault(),be(this))})),!0):!1}var d={transition:"elastic",speed:300,width:!1,initialWidth:"600",innerWidth:!1,maxWidth:!1,height:!1,initialHeight:"450",innerHeight:!1,maxHeight:!1,scalePhotos:!0,scrolling:!0,inline:!1,html:!1,iframe:!1,fastIframe:!0,photo:!1,href:!1,title:!1,rel:!1,opacity:.9,preloading:!0,current:"image {current} of {total}",previous:"previous",next:"next",close:"close",open:!1,returnFocus:!0,reposition:!0,loop:!0,slideshow:!1,slideshowAuto:!0,slideshowSpeed:2500,slideshowStart:"start slideshow",slideshowStop:"stop slideshow",onOpen:!1,onLoad:!1,onComplete:!1,onCleanup:!1,onClosed:!1,overlayClose:!0,escKey:!0,arrowKey:!0,top:!1,bottom:!1,left:!1,right:!1,fixed:!1,data:undefined},e="colorbox",f="cbox",g=f+"Element",h=f+"_open",i=f+"_load",j=f+"_complete",k=f+"_cleanup",l=f+"_closed",m=f+"_purge",n=!a.support.opacity&&!a.support.style,o=n&&!c.XMLHttpRequest,p=f+"_IE6",q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X="div",Y;if(a.colorbox)return;a(bf),W=a.fn[e]=a[e]=function(b,c){var f=this;b=b||{},bf();if(bg()){if(!f[0]){if(f.selector)return f;f=a("<a/>"),b.open=!0}c&&(b.onComplete=c),f.each(function(){a.data(this,e,a.extend({},a.data(this,e)||d,b))}).addClass(g),(a.isFunction(b.open)&&b.open.call(f)||b.open)&&be(f[0])}return f},W.position=function(a,b){function i(a){u[0].style.width=x[0].style.width=t[0].style.width=a.style.width,t[0].style.height=v[0].style.height=w[0].style.height=a.style.height}var c=0,d=0,e=r.offset(),g=z.scrollTop(),h=z.scrollLeft();z.unbind("resize."+f),r.css({top:-9e4,left:-9e4}),K.fixed&&!o?(e.top-=g,e.left-=h,r.css({position:"fixed"})):(c=g,d=h,r.css({position:"absolute"})),K.right!==!1?d+=Math.max(z.width()-K.w-O-M-_(K.right,"x"),0):K.left!==!1?d+=_(K.left,"x"):d+=Math.round(Math.max(z.width()-K.w-O-M,0)/2),K.bottom!==!1?c+=Math.max(z.height()-K.h-N-L-_(K.bottom,"y"),0):K.top!==!1?c+=_(K.top,"y"):c+=Math.round(Math.max(z.height()-K.h-N-L,0)/2),r.css({top:e.top,left:e.left}),a=r.width()===K.w+O&&r.height()===K.h+N?0:a||0,s[0].style.width=s[0].style.height="9999px",r.dequeue().animate({width:K.w+O,height:K.h+N,top:c,left:d},{duration:a,complete:function(){i(this),T=!1,s[0].style.width=K.w+O+M+"px",s[0].style.height=K.h+N+L+"px",K.reposition&&setTimeout(function(){z.bind("resize."+f,W.position)},1),b&&b()},step:function(){i(this)}})},W.resize=function(a){S&&(a=a||{},a.width&&(K.w=_(a.width,"x")-O-M),a.innerWidth&&(K.w=_(a.innerWidth,"x")),A.css({width:K.w}),a.height&&(K.h=_(a.height,"y")-N-L),a.innerHeight&&(K.h=_(a.innerHeight,"y")),!a.innerHeight&&!a.height&&(A.css({height:"auto"}),K.h=A.height()),A.css({height:K.h}),W.position(K.transition==="none"?0:K.speed))},W.prep=function(b){function g(){return K.w=K.w||A.width(),K.w=K.mw&&K.mw<K.w?K.mw:K.w,K.w}function h(){return K.h=K.h||A.height(),K.h=K.mh&&K.mh<K.h?K.mh:K.h,K.h}if(!S)return;var c,d=K.transition==="none"?0:K.speed;A.remove(),A=Z(X,"LoadedContent").append(b),A.hide().appendTo(B.show()).css({width:g(),overflow:K.scrolling?"auto":"hidden"}).css({height:h()}).prependTo(t),B.hide(),a(R).css({"float":"none"}),o&&a("select").not(r.find("select")).filter(function(){return this.style.visibility!=="hidden"}).css({visibility:"hidden"}).one(k,function(){this.style.visibility="inherit"}),c=function(){function q(){n&&r[0].style.removeAttribute("filter")}var b,c,g=y.length,h,i="frameBorder",k="allowTransparency",l,o,p;if(!S)return;l=function(){clearTimeout(V),C.hide(),bc(j,K.onComplete)},n&&R&&A.fadeIn(100),D.html(K.title).add(A).show();if(g>1){typeof K.current=="string"&&E.html(K.current.replace("{current}",Q+1).replace("{total}",g)).show(),G[K.loop||Q<g-1?"show":"hide"]().html(K.next),H[K.loop||Q?"show":"hide"]().html(K.previous),K.slideshow&&F.show();if(K.preloading){b=[$(-1),$(1)];while(c=y[b.pop()])o=a.data(c,e).href||c.href,a.isFunction(o)&&(o=o.call(c)),ba(o)&&(p=new Image,p.src=o)}}else J.hide();K.iframe?(h=Z("iframe")[0],i in h&&(h[i]=0),k in h&&(h[k]="true"),h.name=f+ +(new Date),K.fastIframe?l():a(h).one("load",l),h.src=K.href,K.scrolling||(h.scrolling="no"),a(h).addClass(f+"Iframe").appendTo(A).one(m,function(){h.src="//about:blank"})):l(),K.transition==="fade"?r.fadeTo(d,1,q):q()},K.transition==="fade"?r.fadeTo(d,0,function(){W.position(0,c)}):W.position(d,c)},W.load=function(b){var c,d,e=W.prep;T=!0,R=!1,P=y[Q],b||bb(),bc(m),bc(i,K.onLoad),K.h=K.height?_(K.height,"y")-N-L:K.innerHeight&&_(K.innerHeight,"y"),K.w=K.width?_(K.width,"x")-O-M:K.innerWidth&&_(K.innerWidth,"x"),K.mw=K.w,K.mh=K.h,K.maxWidth&&(K.mw=_(K.maxWidth,"x")-O-M,K.mw=K.w&&K.w<K.mw?K.w:K.mw),K.maxHeight&&(K.mh=_(K.maxHeight,"y")-N-L,K.mh=K.h&&K.h<K.mh?K.h:K.mh),c=K.href,V=setTimeout(function(){C.show()},100),K.inline?(Z(X).hide().insertBefore(a(c)[0]).one(m,function(){a(this).replaceWith(A.children())}),e(a(c))):K.iframe?e(" "):K.html?e(K.html):ba(c)?(a(R=new Image).addClass(f+"Photo").error(function(){K.title=!1,e(Z(X,"Error").text("This image could not be loaded"))}).load(function(){var a;R.onload=null,K.scalePhotos&&(d=function(){R.height-=R.height*a,R.width-=R.width*a},K.mw&&R.width>K.mw&&(a=(R.width-K.mw)/R.width,d()),K.mh&&R.height>K.mh&&(a=(R.height-K.mh)/R.height,d())),K.h&&(R.style.marginTop=Math.max(K.h-R.height,0)/2+"px"),y[1]&&(K.loop||y[Q+1])&&(R.style.cursor="pointer",R.onclick=function(){W.next()}),n&&(R.style.msInterpolationMode="bicubic"),setTimeout(function(){e(R)},1)}),setTimeout(function(){R.src=c},1)):c&&B.load(c,K.data,function(b,c,d){e(c==="error"?Z(X,"Error").text("Request unsuccessful: "+d.statusText):a(this).contents())})},W.next=function(){!T&&y[1]&&(K.loop||y[Q+1])&&(Q=$(1),W.load())},W.prev=function(){!T&&y[1]&&(K.loop||Q)&&(Q=$(-1),W.load())},W.close=function(){S&&!U&&(U=!0,S=!1,bc(k,K.onCleanup),z.unbind("."+f+" ."+p),q.fadeTo(200,0),r.stop().fadeTo(300,0,function(){r.add(q).css({opacity:1,cursor:"auto"}).hide(),bc(m),A.remove(),setTimeout(function(){U=!1,bc(l,K.onClosed)},1)}))},W.remove=function(){a([]).add(r).add(q).remove(),r=null,a("."+g).removeData(e).removeClass(g).die()},W.element=function(){return a(P)},W.settings=d})(jQuery,document,this);
forum/static/js/widget/jquery.scrolltotop-min.js
File was created 1 (function(a){a.scrolltotop=function(k){k=jQuery.extend({startline:100,scrollto:0,scrollduration:500,fadeduration:[500,100],controlHTML:'<a href="javascript:;"><b>\ufffd\u0635\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd</b></a>',className:"",titleName:"\ufffd\u0635\ufffd\ufffd\ufffd\ufffd\ufffd",offsetx:5,offsety:5,anchorkeyword:"#top",},k);var c={isvisible:false,shouldvisible:false};var f=this;var e,i,d;var j=function(){var l=document.all;d=!l||l&&document.compatMode=="CSS1Compat"&&window.XMLHttpRequest;e=(window.opera)?(document.compatMode=="CSS1Compat"?a("html"):a("body")):a("html,body");i=a('<div class="'+k.className+'" id="topcontrol">'+k.controlHTML+"</div>").css({position:d?"fixed":"absolute",bottom:k.offsety,right:k.offsetx,opacity:0,cursor:"pointer"}).attr({title:k.titleName}).click(function(){b();return false;}).appendTo("body");if(document.all&&!window.XMLHttpRequest&&i.text()!=""){i.css({width:i.width()});}h();a('a[href="'+k.anchorkeyword+'"]').click(function(){b();return false;});a(window).bind("scroll resize",function(m){h();});return f;};var b=function(){if(!d){i.css({opacity:0});}var l=isNaN(k.scrollto)?parseInt(k.scrollto):k.scrollto;if(typeof l=="string"){l=jQuery("#"+l).length>=1?jQuery("#"+l).offset().top:0;}e.animate({scrollTop:l},k.scrollduration);};var g=function(){var n=jQuery(window);var m=n.scrollLeft()+n.width()-i.width()-k.offsetx;var l=n.scrollTop()+n.height()-i.height()-k.offsety;i.css({left:m+"px",top:l+"px"});};var h=function(){var l=jQuery(window).scrollTop();if(!d){this.keepfixed();}c.shouldvisible=(l>=k.startline)?true:false;if(c.shouldvisible&&!c.isvisible){i.stop().animate({opacity:1},k.fadeduration[0]);c.isvisible=true;}else{if(c.shouldvisible==false&&c.isvisible){i.stop().animate({opacity:0},k.fadeduration[1]);c.isvisible=false;}}};return j();};})(jQuery);
forum/static/js/widget/jquery.scrolltotop.js
File was created 1 /**
2 * escrolltotop jquery回到顶部插件,平滑返回顶部、
3 *
4 * 参数设置
5 * startline : 出现返回顶部按钮离顶部的距离
6 * scrollto : 滚动到距离顶部的距离,或者某个id元素的位置
7 * scrollduration : 平滑滚动时间
8 * fadeduration : 淡入淡出时间 eg:[ 500, 100 ] [0]淡入、[1]淡出
9 * controlHTML : html代码
10 * className :样式名称
11 * titleName : 回到顶部的title属性
12 * offsetx : 回到顶部 right 偏移位置
13 * offsety : 回到顶部 bottom 偏移位置
14 * anchorkeyword : 猫点链接
15 * eg:
16 * $.scrolltotop({
17 * scrollduration: 1000
18 * });
19 */
20 (function($){
21 $.scrolltotop = function(options){
22 options = jQuery.extend({
23 startline : 100, //出现返回顶部按钮离顶部的距离
24 scrollto : 0, //滚动到距离顶部的距离,或者某个id元素的位置
25 scrollduration : 500, //平滑滚动时间
26 fadeduration : [ 500, 100 ], //淡入淡出时间 ,[0]淡入、[1]淡出
27 controlHTML : '<a href="javascript:;"><b>回到顶部↑</b></a>', //html代码
28 className: '', //样式名称
29 titleName: '回到顶部', //回到顶部的title属性
30 offsetx : 5, //回到顶部 right 偏移位置
31 offsety : 5, //回到顶部 bottom 偏移位置
32 anchorkeyword : '#top', //猫点链接
33 }, options);
34
35 var state = {
36 isvisible : false,
37 shouldvisible : false
38 };
39
40 var current = this;
41
42 var $body,$control,$cssfixedsupport;
43
44 var init = function(){
45 var iebrws = document.all;
46 $cssfixedsupport = !iebrws || iebrws
47 && document.compatMode == "CSS1Compat"
48 && window.XMLHttpRequest
49 $body = (window.opera) ? (document.compatMode == "CSS1Compat" ? $('html') : $('body')) : $('html,body');
50 $control = $('<div class="'+options.className+'" id="topcontrol">' + options.controlHTML + '</div>').css({
51 position : $cssfixedsupport ? 'fixed': 'absolute',
52 bottom : options.offsety,
53 right : options.offsetx,
54 opacity : 0,
55 cursor : 'pointer'
56 }).attr({
57 title : options.titleName
58 }).click(function() {
59 scrollup();
60 return false;
61 }).appendTo('body');
62 if (document.all && !window.XMLHttpRequest && $control.text() != ''){
63 $control.css({
64 width : $control.width()
65 });
66 }
67 togglecontrol();
68 $('a[href="' + options.anchorkeyword + '"]').click(function() {
69 scrollup();
70 return false;
71 });
72 $(window).bind('scroll resize', function(e) {
73 togglecontrol();
74 })
75
76 return current;
77 };
78
79 var scrollup = function() {
80 if (!$cssfixedsupport){
81 $control.css( {
82 opacity : 0
83 });
84 }
85 var dest = isNaN(options.scrollto) ? parseInt(options.scrollto): options.scrollto;
86 if(typeof dest == "string"){
87 dest = jQuery('#' + dest).length >= 1 ? jQuery('#' + dest).offset().top : 0;
88 }
89 $body.animate( {
90 scrollTop : dest
91 }, options.scrollduration);
92 };
93
94 var keepfixed = function() {
95 var $window = jQuery(window);
96 var controlx = $window.scrollLeft() + $window.width()
97 - $control.width() - options.offsetx;
98 var controly = $window.scrollTop() + $window.height()
99 - $control.height() - options.offsety;
100 $control.css( {
101 left : controlx + 'px',
102 top : controly + 'px'
103 });
104 };
105
106 var togglecontrol = function() {
107 var scrolltop = jQuery(window).scrollTop();
108 if (!$cssfixedsupport){
109 this.keepfixed()
110 }
111 state.shouldvisible = (scrolltop >= options.startline) ? true : false;
112 if (state.shouldvisible && !state.isvisible) {
113 $control.stop().animate( {
114 opacity : 1
115 }, options.fadeduration[0]);
116 state.isvisible = true;
117 } else if (state.shouldvisible == false && state.isvisible) {
118 $control.stop().animate( {
119 opacity : 0
120 }, options.fadeduration[1]);
121 state.isvisible = false;
122 }
123 };
124
125 return init();
126 };
127 })(jQuery);
forum/static/js/widget/jquery.textarea.js
File was created 1 /*
2 * Tabby jQuery plugin version 0.12
3 *
4 * Ted Devito - http://teddevito.com/demos/textarea.html
5 *
6 * Copyright (c) 2009 Ted Devito
7 *
8 * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following
9 * conditions are met:
10 *
11 * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer
13 * in the documentation and/or other materials provided with the distribution.
14 * 3. The name of the author may not be used to endorse or promote products derived from this software without specific prior written
15 * permission.
16 *
17 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE
19 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
20 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
21 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
22 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23 *
24 */
25
26 // create closure
27
28 (function($) {
29
30 // plugin definition
31
32 $.fn.tabby = function(options) {
33 //debug(this);
34 // build main options before element iteration
35 var opts = $.extend({}, $.fn.tabby.defaults, options);
36 var pressed = $.fn.tabby.pressed;
37
38 // iterate and reformat each matched element
39 return this.each(function() {
40 $this = $(this);
41
42 // build element specific options
43 var options = $.meta ? $.extend({}, opts, $this.data()) : opts;
44
45 $this.bind('keydown',function (e) {
46 var kc = $.fn.tabby.catch_kc(e);
47 if (16 == kc) pressed.shft = true;
48 /*
49 because both CTRL+TAB and ALT+TAB default to an event (changing tab/window) that
50 will prevent js from capturing the keyup event, we'll set a timer on releasing them.
51 */
52 if (17 == kc) {pressed.ctrl = true; setTimeout("$.fn.tabby.pressed.ctrl = false;",1000);}
53 if (18 == kc) {pressed.alt = true; setTimeout("$.fn.tabby.pressed.alt = false;",1000);}
54
55 if (9 == kc && !pressed.ctrl && !pressed.alt) {
56 e.preventDefault; // does not work in O9.63 ??
57 pressed.last = kc; setTimeout("$.fn.tabby.pressed.last = null;",0);
58 process_keypress ($(e.target).get(0), pressed.shft, options);
59 return false;
60 }
61
62 }).bind('keyup',function (e) {
63 if (16 == $.fn.tabby.catch_kc(e)) pressed.shft = false;
64 }).bind('blur',function (e) { // workaround for Opera -- http://www.webdeveloper.com/forum/showthread.php?p=806588
65 if (9 == pressed.last) $(e.target).one('focus',function (e) {pressed.last = null;}).get(0).focus();
66 });
67
68 });
69 };
70
71 // define and expose any extra methods
72 $.fn.tabby.catch_kc = function(e) { return e.keyCode ? e.keyCode : e.charCode ? e.charCode : e.which; };
73 $.fn.tabby.pressed = {shft : false, ctrl : false, alt : false, last: null};
74
75 // private function for debugging
76 function debug($obj) {
77 if (window.console && window.console.log)
78 window.console.log('textarea count: ' + $obj.size());
79 };
80
81 function process_keypress (o,shft,options) {
82 var scrollTo = o.scrollTop;
83 //var tabString = String.fromCharCode(9);
84
85 // gecko; o.setSelectionRange is only available when the text box has focus
86 if (o.setSelectionRange) gecko_tab (o, shft, options);
87
88 // ie; document.selection is always available
89 else if (document.selection) ie_tab (o, shft, options);
90
91 o.scrollTop = scrollTo;
92 }
93
94 // plugin defaults
95 $.fn.tabby.defaults = {tabString : String.fromCharCode(9)};
96
97 function gecko_tab (o, shft, options) {
98 var ss = o.selectionStart;
99 var es = o.selectionEnd;
100
101 // when there's no selection and we're just working with the caret, we'll add/remove the tabs at the caret, providing more control
102 if(ss == es) {
103 // SHIFT+TAB
104 if (shft) {
105 // check to the left of the caret first
106 if (ss-options.tabString == o.value.substring(ss-options.tabString.length, ss)) {
107 o.value = o.value.substring(0, ss-options.tabString.length) + o.value.substring(ss); // put it back together omitting one character to the left
108 o.focus();
109 o.setSelectionRange(ss - options.tabString.length, ss - options.tabString.length);
110 }
111 // then check to the right of the caret
112 else if (ss-options.tabString == o.value.substring(ss, ss + options.tabString.length)) {
113 o.value = o.value.substring(0, ss) + o.value.substring(ss + options.tabString.length); // put it back together omitting one character to the right
114 o.focus();
115 o.setSelectionRange(ss,ss);
116 }
117 }
118 // TAB
119 else {
120 o.value = o.value.substring(0, ss) + options.tabString + o.value.substring(ss);
121 o.focus();
122 o.setSelectionRange(ss + options.tabString.length, ss + options.tabString.length);
123 }
124 }
125 // selections will always add/remove tabs from the start of the line
126 else {
127 while (ss < o.value.length && o.value.charAt(ss).match(/[ \t]/)) ss++;
128 // split the textarea up into lines and figure out which lines are included in the selection
129 var lines = o.value.split("\n");
130 var indices = new Array();
131 var sl = 0; // start of the line
132 var el = 0; // end of the line
133 var sel = false;
134 for (var i in lines) {
135 el = sl + lines[i].length;
136 indices.push({start: sl, end: el, selected: (sl <= ss && el > ss) || (el >= es && sl < es) || (sl > ss && el < es)});
137 sl = el + 1;// for "\n"
138 }
139
140 // walk through the array of lines (indices) and add tabs where appropriate
141 var modifier = 0;
142 for (var i in indices) {
143 if (indices[i].selected) {
144 var pos = indices[i].start + modifier; // adjust for tabs already inserted/removed
145 // SHIFT+TAB
146 if (shft && options.tabString == o.value.substring(pos,pos+options.tabString.length)) { // only SHIFT+TAB if there's a tab at the start of the line
147 o.value = o.value.substring(0,pos) + o.value.substring(pos + options.tabString.length); // omit the tabstring to the right
148 modifier -= options.tabString.length;
149 }
150 // TAB
151 else if (!shft) {
152 o.value = o.value.substring(0,pos) + options.tabString + o.value.substring(pos); // insert the tabstring
153 modifier += options.tabString.length;
154 }
155 }
156 }
157 o.focus();
158 var ns = ss + ((modifier > 0) ? options.tabString.length : (modifier < 0) ? -options.tabString.length : 0);
159 var ne = es + modifier;
160 o.setSelectionRange(ns,ne);
161 }
162 }
163
164 function ie_tab (o, shft, options) {
165 var range = document.selection.createRange();
166
167 if (o == range.parentElement()) {
168 // when there's no selection and we're just working with the caret, we'll add/remove the tabs at the caret, providing more control
169 if ('' == range.text) {
170 // SHIFT+TAB
171 if (shft) {
172 var bookmark = range.getBookmark();
173 //first try to the left by moving opening up our empty range to the left
174 range.moveStart('character', -options.tabString.length);
175 if (options.tabString == range.text) {
176 range.text = '';
177 } else {
178 // if that didn't work then reset the range and try opening it to the right
179 range.moveToBookmark(bookmark);
180 range.moveEnd('character', options.tabString.length);
181 if (options.tabString == range.text)
182 range.text = '';
183 }
184 // move the pointer to the start of them empty range and select it
185 range.collapse(true);
186 range.select();
187 }
188
189 else {
190 // very simple here. just insert the tab into the range and put the pointer at the end
191 range.text = options.tabString;
192 range.collapse(false);
193 range.select();
194 }
195 }
196 // selections will always add/remove tabs from the start of the line
197 else {
198
199 var selection_text = range.text;
200 var selection_len = selection_text.length;
201 var selection_arr = selection_text.split("\r\n");
202
203 var before_range = document.body.createTextRange();
204 before_range.moveToElementText(o);
205 before_range.setEndPoint("EndToStart", range);
206 var before_text = before_range.text;
207 var before_arr = before_text.split("\r\n");
208 var before_len = before_text.length; // - before_arr.length + 1;
209
210 var after_range = document.body.createTextRange();
211 after_range.moveToElementText(o);
212 after_range.setEndPoint("StartToEnd", range);
213 var after_text = after_range.text; // we can accurately calculate distance to the end because we're not worried about MSIE trimming a \r\n
214
215 var end_range = document.body.createTextRange();
216 end_range.moveToElementText(o);
217 end_range.setEndPoint("StartToEnd", before_range);
218 var end_text = end_range.text; // we can accurately calculate distance to the end because we're not worried about MSIE trimming a \r\n
219
220 var check_html = $(o).html();
221 $("#r3").text(before_len + " + " + selection_len + " + " + after_text.length + " = " + check_html.length);
222 if((before_len + end_text.length) < check_html.length) {
223 before_arr.push("");
224 before_len += 2; // for the \r\n that was trimmed
225 if (shft && options.tabString == selection_arr[0].substring(0,options.tabString.length))
226 selection_arr[0] = selection_arr[0].substring(options.tabString.length);
227 else if (!shft) selection_arr[0] = options.tabString + selection_arr[0];
228 } else {
229 if (shft && options.tabString == before_arr[before_arr.length-1].substring(0,options.tabString.length))
230 before_arr[before_arr.length-1] = before_arr[before_arr.length-1].substring(options.tabString.length);
231 else if (!shft) before_arr[before_arr.length-1] = options.tabString + before_arr[before_arr.length-1];
232 }
233
234 for (var i = 1; i < selection_arr.length; i++) {
235 if (shft && options.tabString == selection_arr[i].substring(0,options.tabString.length))
236 selection_arr[i] = selection_arr[i].substring(options.tabString.length);
237 else if (!shft) selection_arr[i] = options.tabString + selection_arr[i];
238 }
239
240 if (1 == before_arr.length && 0 == before_len) {
241 if (shft && options.tabString == selection_arr[0].substring(0,options.tabString.length))
242 selection_arr[0] = selection_arr[0].substring(options.tabString.length);
243 else if (!shft) selection_arr[0] = options.tabString + selection_arr[0];
244 }
245
246 if ((before_len + selection_len + after_text.length) < check_html.length) {
247 selection_arr.push("");
248 selection_len += 2; // for the \r\n that was trimmed
249 }
250
251 before_range.text = before_arr.join("\r\n");
252 range.text = selection_arr.join("\r\n");
253
254 var new_range = document.body.createTextRange();
255 new_range.moveToElementText(o);
256
257 if (0 < before_len) new_range.setEndPoint("StartToEnd", before_range);
258 else new_range.setEndPoint("StartToStart", before_range);
259 new_range.setEndPoint("EndToEnd", range);
260
261 new_range.select();
262
263 }
264 }
265 }
266
267 // end of closure
268 })(jQuery);
forum/static/js/widget/jquery.textarea.min.js
File was created 1 (function(d){d.fn.tabby=function(f){var g=d.extend({},d.fn.tabby.defaults,f);var h=d.fn.tabby.pressed;return this.each(function(){$this=d(this);var i=d.meta?d.extend({},g,$this.data()):g;$this.bind("keydown",function(k){var j=d.fn.tabby.catch_kc(k);if(16==j){h.shft=true}if(17==j){h.ctrl=true;setTimeout("$.fn.tabby.pressed.ctrl = false;",1000)}if(18==j){h.alt=true;setTimeout("$.fn.tabby.pressed.alt = false;",1000)}if(9==j&&!h.ctrl&&!h.alt){k.preventDefault;h.last=j;setTimeout("$.fn.tabby.pressed.last = null;",0);e(d(k.target).get(0),h.shft,i);return false}}).bind("keyup",function(j){if(16==d.fn.tabby.catch_kc(j)){h.shft=false}}).bind("blur",function(j){if(9==h.last){d(j.target).one("focus",function(k){h.last=null}).get(0).focus()}})})};d.fn.tabby.catch_kc=function(f){return f.keyCode?f.keyCode:f.charCode?f.charCode:f.which};d.fn.tabby.pressed={shft:false,ctrl:false,alt:false,last:null};function b(f){if(window.console&&window.console.log){window.console.log("textarea count: "+f.size())}}function e(i,h,g){var f=i.scrollTop;if(i.setSelectionRange){a(i,h,g)}else{if(document.selection){c(i,h,g)}}i.scrollTop=f}d.fn.tabby.defaults={tabString:String.fromCharCode(9)};function a(j,f,u){var t=j.selectionStart;var r=j.selectionEnd;if(t==r){if(f){if(t-u.tabString==j.value.substring(t-u.tabString.length,t)){j.value=j.value.substring(0,t-u.tabString.length)+j.value.substring(t);j.focus();j.setSelectionRange(t-u.tabString.length,t-u.tabString.length)}else{if(t-u.tabString==j.value.substring(t,t+u.tabString.length)){j.value=j.value.substring(0,t)+j.value.substring(t+u.tabString.length);j.focus();j.setSelectionRange(t,t)}}}else{j.value=j.value.substring(0,t)+u.tabString+j.value.substring(t);j.focus();j.setSelectionRange(t+u.tabString.length,t+u.tabString.length)}}else{while(t<j.value.length&&j.value.charAt(t).match(/[ \t]/)){t++}var v=j.value.split("\n");var s=new Array();var l=0;var h=0;var g=false;for(var n in v){h=l+v[n].length;s.push({start:l,end:h,selected:(l<=t&&h>t)||(h>=r&&l<r)||(l>t&&h<r)});l=h+1}var k=0;for(var n in s){if(s[n].selected){var q=s[n].start+k;if(f&&u.tabString==j.value.substring(q,q+u.tabString.length)){j.value=j.value.substring(0,q)+j.value.substring(q+u.tabString.length);k-=u.tabString.length}else{if(!f){j.value=j.value.substring(0,q)+u.tabString+j.value.substring(q);k+=u.tabString.length}}}}j.focus();var p=t+((k>0)?u.tabString.length:(k<0)?-u.tabString.length:0);var m=r+k;j.setSelectionRange(p,m)}}function c(q,w,f){var p=document.selection.createRange();if(q==p.parentElement()){if(""==p.text){if(w){var l=p.getBookmark();p.moveStart("character",-f.tabString.length);if(f.tabString==p.text){p.text=""}else{p.moveToBookmark(l);p.moveEnd("character",f.tabString.length);if(f.tabString==p.text){p.text=""}}p.collapse(true);p.select()}else{p.text=f.tabString;p.collapse(false);p.select()}}else{var k=p.text;var n=k.length;var u=k.split("\r\n");var z=document.body.createTextRange();z.moveToElementText(q);z.setEndPoint("EndToStart",p);var m=z.text;var x=m.split("\r\n");var r=m.length;var y=document.body.createTextRange();y.moveToElementText(q);y.setEndPoint("StartToEnd",p);var v=y.text;var g=document.body.createTextRange();g.moveToElementText(q);g.setEndPoint("StartToEnd",z);var s=g.text;var h=d(q).html();d("#r3").text(r+" + "+n+" + "+v.length+" = "+h.length);if((r+s.length)<h.length){x.push("");r+=2;if(w&&f.tabString==u[0].substring(0,f.tabString.length)){u[0]=u[0].substring(f.tabString.length)}else{if(!w){u[0]=f.tabString+u[0]}}}else{if(w&&f.tabString==x[x.length-1].substring(0,f.tabString.length)){x[x.length-1]=x[x.length-1].substring(f.tabString.length)}else{if(!w){x[x.length-1]=f.tabString+x[x.length-1]}}}for(var t=1;t<u.length;t++){if(w&&f.tabString==u[t].substring(0,f.tabString.length)){u[t]=u[t].substring(f.tabString.length)}else{if(!w){u[t]=f.tabString+u[t]}}}if(1==x.length&&0==r){if(w&&f.tabString==u[0].substring(0,f.tabString.length)){u[0]=u[0].substring(f.tabString.length)}else{if(!w){u[0]=f.tabString+u[0]}}}if((r+n+v.length)<h.length){u.push("");n+=2}z.text=x.join("\r\n");p.text=u.join("\r\n");var j=document.body.createTextRange();j.moveToElementText(q);if(0<r){j.setEndPoint("StartToEnd",z)}else{j.setEndPoint("StartToStart",z)}j.setEndPoint("EndToEnd",p);j.select()}}}})(jQuery);
forum/static/octicons/octicons-8b97c2cd5068ec4620cbde3140db257b1924a192.ttf
No preview for this file type
forum/static/octicons/octicons-a60d585f754059c3c2ef731f853c38c157040b9c.woff
No preview for this file type
forum/static/octicons/octicons-a8248bbb3baccca60948d81d69e3406b71956a69.svg
File was created 1 <?xml version="1.0" standalone="no"?>
2 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
3 <svg xmlns="http://www.w3.org/2000/svg">
4 <metadata>Copyright (C) 2013 by GitHub</metadata>
5 <defs>
6 <font id="octicons" horiz-adv-x="1024" >
7 <font-face font-family="Octicons" font-weight="400" font-stretch="normal" units-per-em="1024" ascent="832" descent="-192" />
8 <missing-glyph horiz-adv-x="1024" />
9 <glyph glyph-name="alert" unicode="&#xf02d;" d="M448 64h128v64h-128v-64z m0 384v-256h128v256h-128z m64 384l-512-896h1024l-512 896z m0-128l384-704h-768l384 704z" horiz-adv-x="1024" />
10 <glyph glyph-name="alignment-align" unicode="&#xf08a;" d="M192 768c-106 0-192-86-192-192s86-192 192-192 192 86 192 192-86 192-192 192z m480-544l160 160h-448v-448l160 160 288-288 128 128-288 288z" horiz-adv-x="960" />
11 <glyph glyph-name="alignment-aligned-to" unicode="&#xf08e;" d="M384 256l128 128 288-288 160 160v-448h-448l160 160-288 288z m-192 128c-106 0-192 86-192 192s86 192 192 192 192-86 192-192-86-192-192-192z" horiz-adv-x="960" />
12 <glyph glyph-name="alignment-unalign" unicode="&#xf08b;" d="M512 640l-128-128-256 256-128-128 256-256-128-128 64-64 384 384-64 64z m128-384l128 128-64 64-384-384 64-64 128 128 256-256 128 128-256 256z" horiz-adv-x="896" />
13 <glyph glyph-name="arrow-down" unicode="&#xf03f;" d="M448 384v256h-256v-256h-192l320-384 320 384h-192z" horiz-adv-x="640" />
14 <glyph glyph-name="arrow-left" unicode="&#xf040;" d="M384 448v192l-384-320 384-320v192h256v256h-256z" horiz-adv-x="640" />
15 <glyph glyph-name="arrow-right" unicode="&#xf03e;" d="M640 320l-384 320v-192h-256v-256h256v-192l384 320z" horiz-adv-x="640" />
16 <glyph glyph-name="arrow-small-down" unicode="&#xf0a0;" d="M256 384v128h-128v-128h-128l192-256 192 256h-128z" horiz-adv-x="384" />
17 <glyph glyph-name="arrow-small-left" unicode="&#xf0a1;" d="M256 384v128l-256-192 256-192v128h128v128h-128z" horiz-adv-x="384" />
18 <glyph glyph-name="arrow-small-right" unicode="&#xf071;" d="M384 320l-256 192v-128h-128v-128h128v-128l256 192z" horiz-adv-x="384" />
19 <glyph glyph-name="arrow-small-up" unicode="&#xf09f;" d="M192 512l-192-256h128v-128h128v128h128l-192 256z" horiz-adv-x="384" />
20 <glyph glyph-name="arrow-up" unicode="&#xf03d;" d="M320 640l-320-384h192v-256h256v256h192l-320 384z" horiz-adv-x="640" />
21 <glyph glyph-name="beer" unicode="&#xf069;" d="M896 576h-192v128c0 71-158 128-352 128s-352-57-352-128v-768c0-71 158-128 352-128s352 57 352 128v128h192s64 0 64 64v384c0 64-64 64-64 64z m-704-576h-64v512h64v-512z m192-64h-64v512h64v-512z m192 64h-64v512h64v-512z m-224 640c-124 0-224 29-224 64s100 64 224 64 224-29 224-64-100-64-224-64z m480-448h-128v256h128v-256z" horiz-adv-x="1024" />
22 <glyph glyph-name="book" unicode="&#xf007;" d="M320 512h-128c-64 0-64-64-64-64h256s0 64-64 64z m0-128h-128c-64 0-64-64-64-64h256s0 64-64 64z m0-128h-128c-64 0-64-64-64-64h256s0 64-64 64z m448 256h-128c-64 0-64-64-64-64h256s0 64-64 64z m0-128h-128c-64 0-64-64-64-64h256s0 64-64 64z m0-128h-128c-64 0-64-64-64-64h256s0 64-64 64z m-160 416c-64 0-128-64-128-64s-64 64-128 64c-160 0-352-64-352-64v-608l448 32s-1-32 31-32c33 0 33 32 33 32l448-32v608s-192 64-352 64z m-160-608s1 64-64 64c-193 0-320-64-320-64v512s128 32 256 32c64 0 128-64 128-64v-480z m448 32s-97 32-320 32c-62 0-64-64-64-64v480s64 64 128 64c128 0 256-64 256-64v-448z" horiz-adv-x="1024" />
23 <glyph glyph-name="bookmark" unicode="&#xf07b;" d="M0 704v-768l192 128 192-128v768h-384z m316-197l-72-52 27-83c3-8-1-11-8-7l-72 52-72-52c-7-4-10-2-8 7l27 83-72 52c-6 5-5 9 4 9h88l27 83c3 9 8 9 10 0l27-83h88c9 0 10-4 4-9z" horiz-adv-x="384" />
24 <glyph glyph-name="broadcast" unicode="&#xf048;" d="M320 256v-128c0-64 64-64 64-64v-256h128v256s64 0 64 64v128c0 64-64 64-64 64h-128s-64 0-64-64z m256 192c0 128-128 128-128 128s-128 0-128-128 128-128 128-128 128 0 128 128z m-128 384c-247 0-448-201-448-448 0-197 128-363 305-423l-12 72c-135 60-229 194-229 351 0 212 172 384 384 384s384-172 384-384c0-157-94-291-229-351l-12-72c177 60 305 225 305 423 0 247-201 448-448 448z m0-192c142 0 256-115 256-256 0-69-28-132-72-178l-16-93c91 56 152 156 152 271 0 177-143 320-320 320s-320-143-320-320c0-115 61-215 152-271l-16 93c-45 46-72 109-72 178 0 142 115 256 256 256z" horiz-adv-x="896" />
25 <glyph glyph-name="bug" unicode="&#xf091;" d="M244 675c-53-57-38-147-38-147s54-64 160-64 160 64 160 64 14 89-37 146c32 18 51 44 44 62-9 20-48 22-88 4-15-7-27-15-37-24-12 2-26 4-41 4-14 0-27-1-38-3-10 9-22 17-37 23-40 18-79 16-88-4-8-17 10-43 41-61z m401-413c-8 2-16 3-24 4 0 2 0 4 0 6 0 34-5 66-12 96 16-1 37 2 59 12 40 18 65 48 56 68s-48 22-88 4c-19-8-34-19-44-31-8 18-17 36-27 52-30-25-87-63-167-71v-322s0-32-32-32-32 32-32 32v322c-80 8-137 46-167 71-10-15-18-32-26-49-10 11-25 21-42 29-40 18-79 16-88-4s16-50 56-68c20-9 40-13 55-12-8-30-12-62-12-96 0-2 0-4 0-7-7-1-14-2-21-3-52-11-92-38-89-60s48-32 100-21c7 1 13 3 20 5 9-41 24-79 44-111-12-6-25-15-36-27-32-32-45-71-29-87s55-3 87 29c9 9 17 19 23 29 44-43 98-68 158-68s116 26 160 70c6-10 14-21 24-31 32-32 71-45 87-29s3 55-29 87c-12 12-26 22-38 28 20 33 35 70 44 111 7-2 15-4 23-6 52-11 97-2 100 21 3 22-37 49-89 60z" horiz-adv-x="733.886" />
26 <glyph glyph-name="calendar" unicode="&#xf068;" d="M704 320h-64v-128h64v128z m-128 0h-64v-128h64v128z m128 192h-64v-128h64v128z m128-192h-64v-128h64v128z m-256-192h-64v-128h64v128z m192 704h-64v-128h64v128z m-512 0h-64v-128h64v128z m576-320h-64v-128h64v128z m-256 0h-64v-128h64v128z m-256-384h-64v-128h64v128z m-128 192h-64v-128h64v128z m128 0h-64v-128h64v128z m512 448v-128h-192v128h-320v-128h-192v128h-128v-896h960v896h-128z m64-832h-832v640h832v-640z m-704 192h-64v-128h64v128z m256 384h-64v-128h64v128z m0-384h-64v-128h64v128z m-128 384h-64v-128h64v128z m128-192h-64v-128h64v128z m256-192h-64v-128h64v128z" horiz-adv-x="1024" />
27 <glyph glyph-name="check" unicode="&#xf03a;" d="M640 640l-384-384-128 128-128-128 256-256 512 512-128 128z" horiz-adv-x="768" />
28 <glyph glyph-name="checklist" unicode="&#xf076;" d="M761 316l-50 50c-6 7-17 7-23 0l-105-105-120-120-93 93c-7 7-17 7-24 0l-50-50c-7-7-7-17 0-24l105-105 18-18 32-32c7-7 17-7 24 0l50 50 237 237c7 6 7 17 0 24z m-532-65l50 50c42 42 116 42 159 0l25-25 114 108v320h-576v-704h320l-92 92c-44 44-44 115 0 159z m-36 389h320v-64h-320v64z m0-128h320v-64h-320v64z m-64-192h-64v64h64v-64z m0 128h-64v64h64v-64z m0 128h-64v64h64v-64z m64-192h64v-64h-64v64z" horiz-adv-x="765.602" />
29 <glyph glyph-name="chevron-down" unicode="&#xf0a3;" d="M512 512l-192-192-192 192-128-128 320-320 320 320-128 128z" horiz-adv-x="640" />
30 <glyph glyph-name="chevron-left" unicode="&#xf0a4;" d="M448 512l-128 128-320-320 320-320 128 128-192 192 192 192z" horiz-adv-x="448" />
31 <glyph glyph-name="chevron-right" unicode="&#xf078;" d="M128 640l-128-128 192-192-192-192 128-128 320 320-320 320z" horiz-adv-x="448" />
32 <glyph glyph-name="chevron-up" unicode="&#xf0a2;" d="M320 576l-320-320 128-128 192 192 192-192 128 128-320 320z" horiz-adv-x="640" />
33 <glyph glyph-name="circle-slash" unicode="&#xf084;" d="M320 640c-177 0-320-143-320-320s143-320 320-320 320 143 320 320-143 320-320 320z m0-128c28 0 54-6 77-17l-253-253c-10 24-17 50-17 77 0 106 86 192 192 192z m0-384c-28 0-55 6-79 17l254 253c11-24 17-50 17-78 0-106-86-192-192-192z" horiz-adv-x="640" />
34 <glyph glyph-name="clippy" unicode="&#xf035;" d="M704-64h-640v576h640v-192h64v320c0 35-29 64-64 64h-192c0 71-57 128-128 128s-128-57-128-128h-192c-35 0-64-29-64-64v-704c0-35 29-64 64-64h640c35 0 64 29 64 64v128h-64v-128z m-512 704s0 0 64 0 64 64 64 64c0 35 29 64 64 64s64-29 64-64c0 0 0-64 64-64h64c64 0 64-64 64-64h-512s0 64 64 64z m-64-512h128v64h-128v-64z m448 128v128l-256-192 256-192v128h320v128h-320z m-448-256h192v64h-192v-64z m320 448h-320v-64h320v64z m-192-128h-128v-64h128v64z" horiz-adv-x="896" />
35 <glyph glyph-name="clock" unicode="&#xf046;" d="M384 256h256l64 64-64 64h-128v192l-64 64-64-64v-320z m64 512c-247 0-448-201-448-448s201-448 448-448 448 201 448 448-201 448-448 448z m0-768c-176 0-320 144-320 320s144 320 320 320c176-1 320-144 320-320s-144-320-320-320z" horiz-adv-x="896" />
36 <glyph glyph-name="cloud-download" unicode="&#xf00b;" d="M832 512c-9 0-17-1-26-3-49 114-162 195-294 195s-246-80-294-195c-8 1-17 3-26 3-106 0-192-86-192-192s86-192 192-192c21 0 40 4 58 10 34-38 81-63 134-71v65c-50 10-92 43-113 88-22-18-49-29-79-29-71 0-128 57-128 128s57 128 128 128c25 0 49-8 68-20 21 120 125 212 252 212s230-92 251-213c20 13 44 21 70 21 71 0 128-57 128-128s-57-128-128-128c-10 0-20 2-30 4-29-41-76-68-130-68-11 0-22 2-32 4v-65c10-2 21-3 32-3 61 0 117 25 157 64 1 0 2 0 3 0 106 0 192 86 192 192s-86 192-192 192z m-256-192h-128v-320h-128l192-192 192 192h-128v320z" horiz-adv-x="1024" />
37 <glyph glyph-name="cloud-upload" unicode="&#xf00c;" d="M512 448l-192-192h128v-320h128v320h128l-192 192z m320 64c-9 0-17-1-26-3-49 114-162 195-294 195s-246-80-294-195c-8 1-17 3-26 3-106 0-192-86-192-192s86-192 192-192c21 0 40 4 58 10 34-38 81-63 134-71v65c-50 10-92 43-113 88-22-18-49-29-79-29-71 0-128 57-128 128s57 128 128 128c25 0 49-8 68-20 21 120 125 212 252 212s230-92 251-213c20 13 44 21 70 21 71 0 128-57 128-128s-57-128-128-128c-10 0-20 2-30 4-29-41-76-68-130-68-11 0-22 2-32 4v-65c10-2 21-3 32-3 61 0 117 25 157 64 1 0 2 0 3 0 106 0 192 86 192 192s-86 192-192 192z" horiz-adv-x="1024" />
38 <glyph glyph-name="code" unicode="&#xf05f;" d="M608 640l-96-96 224-224-224-224 96-96 288 320-288 320z m-320 0l-288-320 288-320 96 96-224 224 224 224-96 96z" horiz-adv-x="896" />
39 <glyph glyph-name="color-mode" unicode="&#xf065;" d="M0 704v-768h768v768h-768z m64-704v640h640l-640-640z" horiz-adv-x="768" />
40 <glyph glyph-name="comment" unicode="&#xf02b;" d="M768 704h-640c-62 0-128-64-128-128v-384c0-128 128-128 128-128h64v-256l256 256s258 0 320 0 128 68 128 128v384c0 62-64 128-128 128z" horiz-adv-x="896" />
41 <glyph glyph-name="comment-add" unicode="&#xf06f;" d="M768 768h-640c-64 0-128-66-128-128v-384c0-60 66-128 128-128s320 0 320 0l256-256v256h64s128 0 128 128v384c0 64-66 128-128 128z m-128-384h-128v-128h-128v128h-128v128h128v128h128v-128h128v-128z" horiz-adv-x="896" />
42 <glyph glyph-name="comment-discussion" unicode="&#xf04f;" d="M256 320v192h-192c-64 0-64-64-64-64s0-258 0-320 64-64 64-64h64v-192l194 192h192s62 4 62 64v64s-64 0-192 0-128 128-128 128z m576 384s-384 0-448 0-64-64-64-64 0-260 0-320 62-64 62-64h192l194-192v192h64s64 2 64 64v320c0 64-64 64-64 64z" horiz-adv-x="896" />
43 <glyph glyph-name="credit-card" unicode="&#xf045;" d="M128 128h128v64h-128v-64z m192 0h128v64h-128v-64z m64 192h-256v-64h256v64z m-128 64h64l128 128h-64l-128-128z m192-128h192v64h-192v-64z m512 384h-896c-64 0-64-64-64-64v-512s0-64 64-64h896c64 0 64 64 64 64v512s0 64-64 64z m0-256v-288s0-32-32-32h-832c-32 0-32 32-32 32v288h64l128 128h-192v32s0 32 32 32h832c32 0 32-32 32-32v-32h-384l-128-128h512z" horiz-adv-x="1024" />
44 <glyph glyph-name="dashboard" unicode="&#xf07d;" d="M416 368c-62 0-112-50-112-112s50-112 112-112 112 50 112 112c0 9-1 17-3 25 82 95 208 243 276 327 23 29-2 56-32 32-85-69-232-195-327-276-8 2-16 3-25 3z m32 209c0 18-14 32-32 32s-32-14-32-32 14-32 32-32 32 14 32 32z m192-256c0-18 14-32 32-32s32 14 32 32-14 32-32 32-32-14-32-32z m-352 256c-18 0-32-14-32-32s14-32 32-32 32 14 32 32-14 32-32 32z m-64-128c0 18-14 32-32 32s-32-14-32-32 14-32 32-32 32 14 32 32z m-96-128c0-18 14-32 32-32s32 14 32 32-14 32-32 32-32-14-32-32z m448 224c0 18-14 32-32 32s-32-14-32-32 14-32 32-32 32 14 32 32z m217-49l-69-90c8-27 12-56 12-85 0-177-143-320-320-320s-320 143-320 320 143 320 320 320c66 0 127-20 178-54l79 61c-71 56-160 89-257 89-230 0-416-186-416-416s186-416 416-416 416 186 416 416c0 63-14 122-39 175z" horiz-adv-x="832" />
45 <glyph glyph-name="database" unicode="&#xf096;" d="M384-128c-212 0-384 57-384 128 0 39 0 81 0 128 0 11 6 22 14 32 43-55 192-96 370-96s328 41 370 96c8-10 14-21 14-32 0-37 0-76 0-128 0-71-172-128-384-128z m0 256c-212 0-384 57-384 128 0 39 0 81 0 128 0 7 3 13 6 20 2 4 5 8 8 12 43-55 192-96 370-96s328 41 370 96c3-4 6-8 8-12 3-7 6-13 6-20 0-37 0-76 0-128 0-71-172-128-384-128z m0 256c-212 0-384 57-384 128 0 20 0 42 0 64 0 20 0 41 0 64 0 71 172 128 384 128s384-57 384-128c0-20 0-41 0-64 0-20 0-40 0-64 0-71-172-128-384-128z m0 320c-141 0-256-29-256-64s115-64 256-64 256 29 256 64-115 64-256 64z" horiz-adv-x="768" />
46 <glyph glyph-name="device-camera" unicode="&#xf056;" d="M512 448c-71 0-128-57-128-128s57-128 128-128c6 0 11 0 17 1-46 7-82 47-82 95 0 53 43 96 96 96 48 0 88-36 95-82 1 6 1 11 1 17 0 71-57 128-128 128z m384 128h-128l-128 128h-256l-128-128h-128c-35 0-64-29-64-64v-448c0-35 29-64 64-64h768c35 0 64 29 64 64v448c0 35-29 64-64 64z m-480 64h192l64-64h-320l64 64z m-256-576c-18 0-32 14-32 32v288h64v64h-64v32c0 18 14 32 32 32h183c-4-4-8-7-12-11-100-100-100-262 0-362l75-75h-246z m352 64c-106 0-192 86-192 192s86 192 192 192 192-86 192-192-86-192-192-192z m320 224l-151 160h151v-160z" horiz-adv-x="1024" />
47 <glyph glyph-name="device-camera-video" unicode="&#xf057;" d="M576 640c-35 0-64-29-64-64s29-64 64-64 64 29 64 64-29 64-64 64z m320-192l-128-128v64c0 31-22 56-50 63 31 34 50 80 50 129 0 106-86 192-192 192-101 0-184-78-191-177-34 31-79 49-129 49-106 0-192-86-192-192s86-192 192-192h-64v-128h64v-128c0-35 29-64 64-64h384c35 0 64 29 64 64v64l128-128h64v512h-64z m-640 64c-35 0-64-29-64-64s29-64 64-64v-64c-71 0-128 57-128 128s57 128 128 128 128-57 128-128h-64c0 35-29 64-64 64z m320-384h-128v128h128v-128z m128 109c-34 34-70 70-73 73-6 6-14 9-23 9h-192c-18 0-32-14-32-32v-192c0-8 3-16 8-22 1-1 39-39 74-74h-115c-18 0-32 14-32 32v320c0 18 14 32 32 32h320c18 0 32-14 32-32v-115z m-128 211c-71 0-128 57-128 128s57 128 128 128 128-57 128-128-57-128-128-128z m320-320l-64 64v128l64 64v-256z" horiz-adv-x="1024" />
48 <glyph glyph-name="device-desktop" unicode="&#xf27c;" d="M960 768c-64 0-896 0-896 0-64 0-64-64-64-64v-576s0-64 64-64h320s-192-64-192-128 64-64 64-64h512s64 0 64 64-192 128-192 128h320c64 0 64 64 64 64v576s0 64-64 64z m0-640h-896v576h896v-576z m-64 512h-192c-384-64-576-384-576-384v-64h768v448z" horiz-adv-x="1024" />
49 <glyph glyph-name="device-mobile" unicode="&#xf038;" d="M576 832h-512c-35 0-64-29-64-64v-896c0-35 29-64 64-64h512c35 0 64 29 64 64v896c0 35-29 64-64 64z m-288-64h64c18 0 32-14 32-32s-14-32-32-32h-64c-18 0-32 14-32 32s14 32 32 32z m64-896h-64c-18 0-32 14-32 32s14 32 32 32h64c18 0 32-14 32-32s-14-32-32-32z m224 128h-512v640h512v-640z" horiz-adv-x="640" />
50 <glyph glyph-name="diff" unicode="&#xf04d;" d="M448 576h-128v-128h-128v-128h128v-128h128v128h128v128h-128v128z m-256-640h384v128h-384v-128z m448 896h-512v-64h480l224-224v-608h64v640l-256 256z m-640-128v-896h768v704l-192 192h-576z m704-832h-640v768h480l160-160v-608z" horiz-adv-x="896" />
51 <glyph glyph-name="diff-added" unicode="&#xf06b;" d="M512 512h-128v-128h-128v-128h128v-128h128v128h128v128h-128v128z m320 256h-768c-64 0-64-64-64-64v-768s0-64 64-64c0 0 704 0 768 0s64 64 64 64v768s0 64-64 64z m-64-736c0-32-32-32-32-32h-576s-32 0-32 32v576c0 32 32 32 32 32h576s32 0 32-32c0 0 0-549 0-576z" horiz-adv-x="896" />
52 <glyph glyph-name="diff-ignored" unicode="&#xf099;" d="M832 768h-768c-64 0-64-64-64-64v-768s0-64 64-64c0 0 704 0 768 0s64 64 64 64v768s0 64-64 64z m-64-736c0-32-32-32-32-32h-576s-32 0-32 32v576c0 32 32 32 32 32h576s32 0 32-32c0 0 0-549 0-576z m-512 194v-98h98l286 286v98h-98l-286-286z" horiz-adv-x="896" />
53 <glyph glyph-name="diff-modified" unicode="&#xf06d;" d="M832 768h-768c-64 0-64-64-64-64v-768s0-64 64-64c0 0 704 0 768 0s64 64 64 64v768s0 64-64 64z m-64-736c0-32-32-32-32-32h-576s-32 0-32 32v576c0 32 32 32 32 32h576s32 0 32-32c0 0 0-549 0-576z m-320 416c-71 0-128-57-128-128s57-128 128-128 128 57 128 128-57 128-128 128z" horiz-adv-x="896" />
54 <glyph glyph-name="diff-removed" unicode="&#xf06c;" d="M256 384v-128h384v128h-384z m576 384h-768c-64 0-64-64-64-64v-768s0-64 64-64c0 0 704 0 768 0s64 64 64 64v768s0 64-64 64z m-64-736c0-32-32-32-32-32h-576s-32 0-32 32v576c0 32 32 32 32 32h576s32 0 32-32c0 0 0-549 0-576z" horiz-adv-x="896" />
55 <glyph glyph-name="diff-renamed" unicode="&#xf06e;" d="M832 768h-768c-64 0-64-64-64-64v-768s0-64 64-64c0 0 704 0 768 0s64 64 64 64v768s0 64-64 64z m-64-736c0-32-32-32-32-32h-576s-32 0-32 32v576c0 32 32 32 32 32h576s32 0 32-32c0 0 0-549 0-576z m-320 352h-192v-128h192v-128l256 192-256 192v-128z" horiz-adv-x="896" />
56 <glyph glyph-name="ellipsis" unicode="&#xf09a;" d="M640 512c-103 0-512 0-512 0s-128 0-128-128 0-128 0-128 0-128 128-128 512 0 512 0 128 4 128 128 0 128 0 128-4 128-128 128z m-384-256h-128v128h128v-128z m192 0h-128v128h128v-128z m192 0h-128v128h128v-128z" horiz-adv-x="768" />
57 <glyph glyph-name="eye" unicode="&#xf04e;" d="M512 704c-384 0-512-384-512-384s122-320 512-320 512 320 512 320-128 384-512 384z m0-640c-320 0-384 256-384 256s66 256 384 256 384-256 384-256-64-256-384-256z m0 448c-20 0-38-4-56-9 33-15 56-48 56-87 0-53-43-96-96-96-39 0-72 23-87 56-5-18-9-36-9-56 0-106 86-192 192-192s192 86 192 192-86 192-192 192z" horiz-adv-x="1024" />
58 <glyph glyph-name="eye-unwatch" unicode="&#xf01e;" d="M456 503c33-15 56-48 56-87 0-53-43-96-96-96-39 0-72 23-87 56-5-18-9-36-9-56 0-106 86-192 192-192s192 86 192 192-86 192-192 192c-20 0-38-4-56-9z m540-119h-128c21-37 28-64 28-64s-64-256-384-256-384 256-384 256 66 256 384 256c25 0 49-2 71-5l-7 5v124c-21 2-42 4-64 4-384 0-512-384-512-384s122-320 512-320 512 320 512 320-9 26-28 64z m-266 87l103 103 103-103 67 67-103 103 103 103-67 67-103-103-103 103-67-67 103-103-103-103 67-67z" horiz-adv-x="1024" />
59 <glyph glyph-name="eye-watch" unicode="&#xf01d;" d="M960 384l-81-20c13-26 17-44 17-44s-64-256-384-256-384 256-384 256 66 256 384 256c17 0 33-1 49-3l-32 129c-6 0-11 1-16 1-384 0-512-384-512-384s122-320 512-320 512 320 512 320-19 57-64 126v-62z m-544-64c-39 0-72 23-87 56-6-18-9-36-9-56 0-106 86-192 192-192s192 86 192 192-86 192-192 192c-20 0-38-4-56-9 33-15 56-48 56-87 0-53-43-96-96-96z m480 384v128h-128v-128h-128v-128h128v-128h128v128h128v128h-128z" horiz-adv-x="1024" />
60 <glyph glyph-name="file-add" unicode="&#xf086;" d="M448 512h-128v-128h-128v-128h128v-128h128v128h128v128h-128v128z m128 256h-576v-896h768v704l-192 192z m128-832h-640v768h480l160-160v-608z" horiz-adv-x="768" />
61 <glyph glyph-name="file-binary" unicode="&#xf094;" d="M0-128v896h576l192-192v-704h-768z m704 640l-192 192h-448v-768h640v576z m-384-192h-192v256h192v-256z m-64 192h-64v-128h64v128z m0-448h64v-64h-192v64h64v128h-64v64h128v-192z m256 320h64v-64h-192v64h64v128h-64v64h128v-192z m64-384h-192v256h192v-256z m-64 192h-64v-128h64v128z" horiz-adv-x="768" />
62 <glyph glyph-name="file-code" unicode="&#xf010;" d="M288 448l-160-160 160-160 64 64-96 96 96 96-64 64z m128-64l96-96-96-96 64-64 160 160-160 160-64-64z m160 384h-576v-896h768v704l-192 192z m128-832h-640v768h448l192-192v-576z" horiz-adv-x="768" />
63 <glyph glyph-name="file-directory" unicode="&#xf016;" d="M832 640s-320 0-352 0-32 32-32 32 0 21 0 32c0 64-64 64-64 64s-256 0-320 0-64-64-64-64v-704h896s0 510 0 576-64 64-64 64z m-448 0h-320v32s0 32 32 32h256c32 0 32-32 32-32v-32z" horiz-adv-x="896" />
64 <glyph glyph-name="file-directory-create" unicode="&#xf095;" d="M832 640s-320 0-352 0-32 32-32 32 0 21 0 32c0 64-64 64-64 64s-256 0-320 0-64-64-64-64v-704h896s0 510 0 576-64 64-64 64z m-768 32s0 32 32 32h256c32 0 32-32 32-32v-32h-320v32z m576-416h-128v-128h-128v128h-128v128h128v128h128v-128h128v-128z" horiz-adv-x="896" />
65 <glyph glyph-name="file-media" unicode="&#xf012;" d="M576 768h-576v-896h768v704l-192 192z m128-832h-640v768h448l192-192v-576z m-576 640v-512h128c0 71 57 128 128 128-71 0-128 57-128 128s57 128 128 128 128-57 128-128-57-128-128-128c71 0 128-57 128-128h128v384l-128 128h-384z" horiz-adv-x="768" />
66 <glyph glyph-name="file-pdf" unicode="&#xf014;" d="M576 768h-576v-896h768v704l-192 192z m-512-64h256c-13-4-27-15-35-43-13-49-7-131 16-209-24-81-123-277-129-288-16-5-65-24-108-60v600z m283-307c58-150 95-150 135-168-84-13-148-22-233-59-4-6 77 146 97 227z m357-461h-640c1 0 1 0 2 0 34 0 85 21 181 182 38 15 72 27 78 29 59 15 125 27 188 33 54-27 127-46 168-48 10-1 16 1 24 2v-198z m0 311c-24 15-54 25-89 25-24 0-51-1-79-4-27 13-93 33-147 190 17 104 13 174 13 174 7 53-23 73-52 73h162l192-192v-265z" horiz-adv-x="768" />
67 <glyph glyph-name="file-submodule" unicode="&#xf017;" d="M832 320h-192s2 64-64 64-64 0-128 0-64-64-64-64v-320h512s0 190 0 256-64 64-64 64z m-256-64h-128v32s0 32 32 32h64c32 0 32-32 32-32v-32z m256 320s-320 0-352 0-32 32-32 32v32s0 64-64 64h-320c-64 0-64-64-64-64v-640h320v384c0 62 64 64 64 64s190 0 256 0 64-64 64-64h192v128c0 66-64 64-64 64z m-448 0h-320v32s0 32 32 32h256c32 0 32-32 32-32v-32z" horiz-adv-x="896" />
68 <glyph glyph-name="file-symlink-directory" unicode="&#xf0b1;" d="M832 640s-320 0-352 0-32 32-32 32 0 21 0 32c0 64-64 64-64 64s-256 0-320 0-64-64-64-64v-704h896s0 510 0 576-64 64-64 64z m-768 32s0 32 32 32h256c32 0 32-32 32-32v-32h-320v32z m384-544v128s-192-5-256-192c0 315 256 320 256 320v128l256-192-256-192z" horiz-adv-x="896" />
69 <glyph glyph-name="file-symlink-file" unicode="&#xf0b0;" d="M576 768h-576v-896h768v704l-192 192z m128-832h-640v768h448l192-192v-576z m-320 448s-256 0-256-315c64 187 256 187 256 187v-128l256 192-256 192v-128z" horiz-adv-x="768" />
70 <glyph glyph-name="file-text" unicode="&#xf011;" d="M448 576h-320v-64h320v64z m128 192h-576v-896h768v704l-192 192z m128-832h-640v768h448l192-192v-576z m-576 128h512v64h-512v-64z m0 128h512v64h-512v-64z m0 128h512v64h-512v-64z" horiz-adv-x="768" />
71 <glyph glyph-name="file-zip" unicode="&#xf013;" d="M320 256v64h-64v-64h64z m0 128v64h-64v-64h64z m0 128v64h-64v-64h64z m-128-64h64v64h-64v-64z m384 320h-576v-896h768v704l-192 192z m128-832h-640v768h192v-64h64v64h192l192-192v-576z m-512 640h64v64h-64v-64z m0-256h64v64h-64v-64z m0-128l-64-64v-128h256v128l-64 64h-64v64h-64v-64z m128-64v-64h-128v64h128z" horiz-adv-x="768" />
72 <glyph glyph-name="gear" unicode="&#xf02f;" d="M448 482c-89 0-162-73-162-162s73-162 162-162 161 73 161 162-72 162-161 162z m325-255l-29-70 52-102 7-14-72-72-118 56-70-29-36-109-5-15h-102l-44 123-70 29-102-52-14-7-72 72 56 119-29 70-109 36-14 5v102l123 44 29 70-52 102-7 13 72 72 119-56 70 29 36 109 5 14h102l44-123 70-29 102 52 14 7 72-72-56-118 29-70 109-36 14-5v-102l-123-44z" horiz-adv-x="896" />
73 <glyph glyph-name="gift" unicode="&#xf042;" d="M448-128h320v320h-320v-320z m-384 0h320v320h-320v-320z m384 584c31 4 67 7 87 10 84 9 159 85 169 169 9 84-51 144-135 135-65-7-125-55-153-115-28 60-88 108-153 115-84 9-144-51-135-135s85-159 169-169c21-2 56-6 87-10-1-4 0-8 0-8h64s0 4 0 8z m108 236c45 5 78-28 73-73s-46-86-91-91-78 28-73 73 46 86 91 91z m-260-164c-45 5-86 46-91 91s28 78 73 73 86-46 91-91-28-78-73-73z m153-79v-192h384v192h-384z m-448-192h384v192h-384v-192z" horiz-adv-x="896" />
74 <glyph glyph-name="gist" unicode="&#xf00e;" d="M416 384l96-96-96-96 64-64 160 160-160 160-64-64z m160 256h-384c-62 0-64-64-64-64h512s0 64-64 64z m-576 128v-832h768v832h-768z m704-768h-640v704h640v-704z m-352 192l-96 96 96 96-64 64-160-160 160-160 64 64z" horiz-adv-x="768" />
75 <glyph glyph-name="gist-fork" unicode="&#xf079;" d="M448 384l-64-64-64 62v130h-128v-192l128-128v-128h128v128l128 128v192h-128v-128z m128 256h-384c-64 0-64-64-64-64h512s-2 64-64 64z m-576 128v-832h768v832h-768z m704-768h-640v704h640v-704z" horiz-adv-x="768" />
76 <glyph glyph-name="gist-new" unicode="&#xf07a;" d="M448 512h-128v-128h-128v-128h128v-128h128v128h128v128h-128v128z m128 128h-384c-64 0-64-64-64-64h512s-2 64-64 64z m-576 128v-832h768v832h-768z m704-768h-640v704h640v-704z" horiz-adv-x="768" />
77 <glyph glyph-name="gist-private" unicode="&#xf00f;" d="M384 448c-128 0-128-128-128-128v-192h256v192s0 128-128 128z m-64-128s0 64 64 64 64-64 64-64h-128z m-320 448v-832h768v832h-768z m704-768h-640v704h640v-704z m-128 640h-384c-64 0-64-64-64-64h512s0 64-64 64z" horiz-adv-x="768" />
78 <glyph glyph-name="gist-secret" unicode="&#xf08c;" d="M448 512l-64-32-64 32-64-128h256l-64 128z m-256-192h384l-64 32h-256l-64-32z m384 320h-384c-62 0-64-64-64-64h512s0 64-64 64z m64-416l-160 32 32-64-64-128h160l32 160z m-224-32l32 64h-128l32-64-32-128h128l-32 128z m-416 576v-832h768v832h-768z m704-768h-640v704h640v-704z m-384 64l-64 128 32 64-160-32 32-160h160z" horiz-adv-x="768" />
79 <glyph glyph-name="git-branch" unicode="&#xf020;" d="M512 640c-71 0-128-57-128-128 0-47 26-88 64-110v-18s0-128-128-128c-53 0-95-11-128-29v303c38 22 64 63 64 110 0 71-57 128-128 128s-128-57-128-128c0-47 26-88 64-110v-419c-38-22-64-63-64-110 0-71 57-128 128-128s128 57 128 128c0 34-13 64-34 87 19 23 49 41 98 41 254 0 256 256 256 256v18c38 22 64 63 64 110 0 71-57 128-128 128z m-384 64c35 0 64-29 64-64s-29-64-64-64-64 29-64 64 29 64 64 64z m0-768c-35 0-64 29-64 64s29 64 64 64 64-29 64-64-29-64-64-64z m384 512c-35 0-64 29-64 64s29 64 64 64 64-29 64-64-29-64-64-64z" horiz-adv-x="640" />
80 <glyph glyph-name="git-branch-create" unicode="&#xf098;" d="M576 704v128h-128v-128h-128v-128h128v-128h128v128h128v128h-128z m-256-448c-53 0-95-11-128-29v303c38 22 64 63 64 110 0 71-57 128-128 128s-128-57-128-128c0-47 26-88 64-110v-419c-38-22-64-63-64-110 0-71 57-128 128-128s128 57 128 128c0 34-13 64-34 87 19 23 49 41 98 41 254 0 256 256 256 256h-128s0-128-128-128z m-192 448c35 0 64-29 64-64s-29-64-64-64-64 29-64 64 29 64 64 64z m0-768c-35 0-64 29-64 64s29 64 64 64 64-29 64-64-29-64-64-64z" horiz-adv-x="704" />
81 <glyph glyph-name="git-branch-delete" unicode="&#xf09b;" d="M448 384s0-128-128-128c-53 0-95-11-128-29v303c38 22 64 63 64 110 0 71-57 128-128 128s-128-57-128-128c0-47 26-88 64-110v-419c-38-22-64-63-64-110 0-71 57-128 128-128s128 57 128 128c0 34-13 64-34 87 19 23 49 41 98 41 254 0 256 256 256 256l-64 64-64-64z m-320 320c35 0 64-29 64-64s-29-64-64-64-64 29-64 64 29 64 64 64z m0-768c-35 0-64 29-64 64s29 64 64 64 64-29 64-64-29-64-64-64z m553 807l-67 67-103-103-103 103-67-67 103-103-103-103 67-67 103 103 103-103 67 67-103 103 103 103z" horiz-adv-x="681" />
82 <glyph glyph-name="git-commit" unicode="&#xf01f;" d="M695 384c-29 110-128 192-247 192s-218-82-247-192h-201v-128h201c29-110 128-192 247-192s218 82 247 192h201v128h-201z m-247-192c-71 0-128 57-128 128s57 128 128 128 128-57 128-128-57-128-128-128z" horiz-adv-x="896" />
83 <glyph glyph-name="git-compare" unicode="&#xf0ac;" d="M832 110v402c0 193-192 192-192 192h-64v128l-192-192 192-192v128s27 0 64 0c56 0 64-64 64-64v-402c-38-22-64-63-64-110 0-71 57-128 128-128s128 57 128 128c0 47-26 88-64 110z m-64-174c-35 0-64 29-64 64s29 64 64 64 64-29 64-64-29-64-64-64z m-704 580v-402c0-193 192-192 192-192h64v-128l192 192-192 192v-128s-27 0-64 0c-56 0-64 64-64 64v402c38 22 64 63 64 110 0 71-57 128-128 128s-128-57-128-128c0-47 26-88 64-110z m64 44c-35 0-64 29-64 64s29 64 64 64 64-29 64-64-29-64-64-64z" horiz-adv-x="896" />
84 <glyph glyph-name="git-fork-private" unicode="&#xf021;" d="M320 256c-47 0-90-14-128-36v309c38 22 64 63 64 110 0 71-57 128-128 128s-128-57-128-128c0-47 26-88 64-110v-419c-38-22-64-63-64-110 0-71 57-128 128-128s128 57 128 128c0 32-12 61-32 84 24 27 58 44 96 44 141 0 256 115 256 256 0 0-64 0-128 0 0-71-57-128-128-128z m-192 448c35 0 64-29 64-64s-29-64-64-64-64 29-64 64 29 64 64 64z m0-768c-35 0-64 29-64 64s29 64 64 64 64-29 64-64-29-64-64-64z m384 832c-128 0-128-128-128-128v-192h256v192s0 128-128 128z m-64-128s0 64 64 64 64-64 64-64h-128z" horiz-adv-x="640" />
85 <glyph glyph-name="git-merge" unicode="&#xf023;" d="M640 384c-48 0-89-26-111-65-6 0-11 1-17 1-131 0-255 100-301 223 27 23 45 58 45 97 0 71-57 128-128 128s-128-57-128-128c0-47 26-88 64-110v-419c-38-22-64-63-64-110 0-71 57-128 128-128s128 57 128 128c0 47-26 88-64 110v230c84-89 200-149 320-149 6 0 12 0 17 1 22-38 63-65 111-65 71 0 128 57 128 128s-57 128-128 128z m-512-448c-35 0-64 29-64 64s29 64 64 64 64-29 64-64-29-64-64-64z m0 640c-35 0-64 29-64 64s29 64 64 64 64-29 64-64-29-64-64-64z m512-384c-35 0-64 29-64 64s29 64 64 64 64-29 64-64-29-64-64-64z" horiz-adv-x="768" />
86 <glyph glyph-name="git-pull-request" unicode="&#xf009;" d="M128 768c-71 0-128-57-128-128 0-47 26-88 64-110v-419c-38-22-64-63-64-110 0-71 57-128 128-128s128 57 128 128c0 47-26 88-64 110v419c38 22 64 63 64 110 0 71-57 128-128 128z m0-832c-35 0-64 29-64 64s29 64 64 64 64-29 64-64-29-64-64-64z m0 640c-35 0-64 29-64 64s29 64 64 64 64-29 64-64-29-64-64-64z m576-466v402c0 193-192 192-192 192h-64v128l-192-192 192-192v128s27 0 64 0c56 0 64-64 64-64v-402c-38-22-64-63-64-110 0-71 57-128 128-128s128 57 128 128c0 47-26 88-64 110z m-64-174c-35 0-64 29-64 64s29 64 64 64 64-29 64-64-29-64-64-64z" horiz-adv-x="768" />
87 <glyph glyph-name="git-pull-request-abandoned" unicode="&#xf090;" d="M256 640c0 71-57 128-128 128s-128-57-128-128c0-47 26-88 64-110v-419c-38-22-64-63-64-110 0-71 57-128 128-128s128 57 128 128c0 47-26 88-64 110v419c38 22 64 63 64 110z m-128-704c-35 0-64 29-64 64s29 64 64 64 64-29 64-64-29-64-64-64z m0 640c-35 0-64 29-64 64s29 64 64 64 64-29 64-64-29-64-64-64z m576-466v274l-64 64-64-64v-274c-38-22-64-63-64-110 0-71 57-128 128-128s128 57 128 128c0 47-26 88-64 110z m-64-174c-35 0-64 29-64 64s29 64 64 64 64-29 64-64-29-64-64-64z m169 807l-67 67-103-103-103 103-67-67 103-103-103-103 67-67 103 103 103-103 67 67-102 103 103 103z" horiz-adv-x="896" />
88 <glyph glyph-name="globe" unicode="&#xf0b6;" d="M512 704c-212 0-384-172-384-384s172-384 384-384c26 0 51 3 76 7-10 5-11 40-1 60 11 23 45 80 11 99s-24 28-45 50-12 25-14 31c-5 20 20 49 21 52s1 14 1 18-15 12-19 13-6-6-11-6-28 14-33 18-7 13-14 20-8 2-18 6-44 17-70 27-28 25-29 36-16 26-23 36c-7 11-9 26-11 23s14-43 11-44-8 11-16 21 8 5-16 52 8 71 9 96 20-9 11 7 1 49-7 61-50-14-50-14c1 12 38 32 64 50s42 4 63-3 23-5 15 2 3 10 20 8 21-23 46-21 3-5 6-11-4-6-20-17 0-11 30-33 20 14 17 30 21 3 21 3c18-12 15-1 28-5s49-34 49-34c-45-24-17-27-9-33s-15-17-15-17c-9 9-11 0-17-4s0-12 0-12c-31-5-24-38-24-45s-20-20-25-31 14-36 4-37-20 37-72 23c-16-4-51-23-32-60s50 11 60 5-3-29-1-29 30-1 31-33 42-29 50-30 38 24 42 25 21 15 57-6 54-18 67-26 4-26 15-32 58 2 70-17-48-115-67-126-27-35-46-50-45-34-70-49c-22-13-26-36-36-44 172 38 300 192 300 375 0 212-172 384-384 384z m90-360c-5-2-16-11-43 5s-45 13-47 15c0 0-2 6 9 8 24 2 54-22 61-23s10 7 22 3 3-6-2-8z m-126 322c-3 2 2 4 5 8 2 2 0 6 2 8 6 6 33 14 28-2-5-15-31-17-35-14z m67-49c-9 0-31 3-27 7 16 16-6 20-20 21s-19 9-12 9 34 0 38-4 29-14 30-21 0-13-9-13z m81 3c-8-6-45 22-53 28-32 27-48 18-55 23s-4 11 6 20 39-3 55-5 36-15 36-30 18-29 11-35z" horiz-adv-x="1024" />
89 <glyph glyph-name="graph" unicode="&#xf043;" d="M704 576h-192v-640h192v640z m256-192h-192v-448h192v448z m-896-512v128h64v64h-64v128h64v64h-64v128h64v64h-64v128h64v64h-64v128h64v64h-128v-1024h1024v64h-960z m384 384h-192v-320h192v320z" horiz-adv-x="1024" />
90 <glyph glyph-name="history" unicode="&#xf07e;" d="M448 768c-91 0-175-28-246-74l-74 74v-256h256l-88 88c45 25 97 40 152 40 177 0 320-143 320-320s-143-320-320-320-320 143-320 320c0 46 10 89 27 128h-91v99c-40-67-64-144-64-227 0-247 201-448 448-448s448 201 448 448-201 448-448 448z m-1-767l65 63v192h128l64 64-64 64h-128l-64 64-128-128 64-64v-192l63-63z" horiz-adv-x="896" />
91 <glyph glyph-name="home" unicode="&#xf08d;" d="M192 256l64-384h192v320h128v-320h192l64 384-320 320-320-320z m640 192v256h-128v-128l-192 192-512-512h128l384 384 384-384h128l-192 192z" horiz-adv-x="1024" />
92 <glyph glyph-name="horizontal-rule" unicode="&#xf070;" d="M64 384h128v-128h64v384h-64v-192h-128v192h-64v-384h64v128z m576-128v128h-64v-128h64z m0 192v128h-64v-128h64z m-192 0v128h128v64h-192v-384h64v128h128v64h-128z m-448-448h640v128h-640v-128z" horiz-adv-x="639.875" />
93 <glyph glyph-name="hourglass" unicode="&#xf09e;" d="M571 318c118 85 197 240 197 384 0 71-172 128-384 128s-384-57-384-128c0-144 80-299 197-384-118-85-197-240-197-384 0-71 172-128 384-128s384 57 384 128c0 144-80 299-197 384z m-187 448c141 0 256-29 256-64s-115-64-256-64-256 29-256 64 115 64 256 64z m-64-706c-154-7-238-40-253-82 16 114 89 215 189 275 0 0 64-1 64 64v-258z m62 386c-97 0-145-17-168-33-69 55-121 130-141 214 70-32 182-53 311-53s241 21 311 53c-20-85-72-160-142-215-24 17-72 34-171 34z m66-386v258c0-62 64-64 64-64 100-60 173-162 189-275-14 41-99 75-253 82z" horiz-adv-x="768" />
94 <glyph glyph-name="hubot" unicode="&#xf09d;" d="M512 768c-283 0-512-229-512-512v-256c0-126 128-128 128-128h768s128 1 128 128v256c0 283-229 512-512 512z m96-768h-192c-18 0-32 14-32 32s14 32 32 32h192c18 0 32-14 32-32s-14-32-32-32z m288 128c0-61-64-64-64-64h-128s0 64-64 64h-256c-64 0-64-64-64-64h-128c-63 0-64 64-64 64v360c78 129 220 216 384 216s306-87 384-216v-360z m-128 384h-512c-35 0-64-29-64-64v-128c0-35 29-64 64-64h512c35 0 64 29 64 64v128c0 35-29 64-64 64z m0-128l-64-64h-128l-64 64-64-64h-128l-64 64v64h64l64-64 64 64h128l64-64 64 64h64v-64z" horiz-adv-x="1024" />
95 <glyph glyph-name="info" unicode="&#xf059;" d="M448 448c35 0 64 29 64 64s-29 64-64 64-64-29-64-64 29-64 64-64z m0 320c-247 0-448-201-448-448s201-448 448-448 448 201 448 448-201 448-448 448z m0-768c-177 0-320 143-320 320s143 320 320 320 320-143 320-320-143-320-320-320z m64 320c0 66-64 64-64 64s0 0-64 0-64-64-64-64h64s0-128 0-192 64-64 64-64 0 0 64 0 64 64 64 64h-64s0 126 0 192z" horiz-adv-x="896" />
96 <glyph glyph-name="issue-closed" unicode="&#xf028;" d="M704 516l-96-96 160-164 256 256-96 96-159-159-65 67z m-192-516c-177 0-320 143-320 320s143 320 320 320c88 0 168-36 226-94l91 91c-81 81-193 131-317 131-247 0-448-201-448-448s201-448 448-448 448 201 448 448l-200-200c9 11-75-120-248-120z m64 576h-128v-320h128v320z m-128-512h128v128h-128v-128z" horiz-adv-x="1024" />
97 <glyph glyph-name="issue-opened" unicode="&#xf026;" d="M448 768c-247 0-448-201-448-448s201-448 448-448 448 201 448 448-201 448-448 448z m0-768c-177 0-320 143-320 320s143 320 320 320 320-143 320-320-143-320-320-320z m-64 64h128v128h-128v-128z m0 192h128v320h-128v-320z" horiz-adv-x="896" />
98 <glyph glyph-name="issue-reopened" unicode="&#xf027;" d="M639 65c-53-40-119-65-191-65-177 0-320 143-320 320 0 46 10 89 27 128h-91v99c-40-67-64-144-64-227 0-247 201-448 448-448 107 0 205 39 282 102l38-38v192h-192l63-63z m-255-1h128v128h-128v-128z m128 512h-128v-320h128v320z m384-256c0 247-201 448-448 448-107 0-205-39-282-102l-38 38v-192h192l-63 63c53 40 119 65 191 65 177 0 320-143 320-320 0-46-10-89-27-128h91v-100c40 67 64 144 64 228z" horiz-adv-x="896" />
99 <glyph glyph-name="jersey" unicode="&#xf019;" d="M704 832h-192s-1-64-97-64-95 64-95 64h-192c0-128-2-384-128-384l-1-576s0-64 64-64h704c64 0 64 64 64 64v576c-126 0-128 256-128 384z m-609-960c-32 0-32 32-32 32l1 480c119 64 128 192 128 384h64s0-192 160-192 160 192 160 192 38 0 64 0c0-186 32-276 64-339v-557h-609z m385 576l-32-32v-320l32-32h128l32 32v320l-32 32h-128z m96-320h-64v256h64v-256z m-352 320l-32-32v-320l32-32h128l32 32v320l-32 32h-128z m96-320h-64v256h64v-256z" horiz-adv-x="896" />
100 <glyph glyph-name="jump-down" unicode="&#xf072;" d="M768 640h-768l384-384 384 384z m-768-512v-128h768v128h-768z" horiz-adv-x="768" />
101 <glyph glyph-name="jump-left" unicode="&#xf0a5;" d="M256 320l384-384v768l-384-384z m-256-384h128v768h-128v-768z" horiz-adv-x="640" />
102 <glyph glyph-name="jump-right" unicode="&#xf0a6;" d="M0-64l384 384-384 384v-768z m512 768v-768h128v768h-128z" horiz-adv-x="640" />
103 <glyph glyph-name="jump-up" unicode="&#xf073;" d="M0 0h768l-384 384-384-384z m0 640v-128h768v128h-768z" horiz-adv-x="768" />
104 <glyph glyph-name="key" unicode="&#xf049;" d="M384 448v64h-64s0 64-64 64h-128s-44 8-64-22-64-106-64-106v-192s38-60 64-96 64-32 64-32h128c64 0 64 64 64 64h64v64h64l128 128 128-128 128 128 128-128 64 64v128h-640z m-128-256h-128l128 64v-64z m-96 64l-96 96 96 96 96-96-96-96z m96 192l-128 64h128v-64z" horiz-adv-x="1024" />
105 <glyph glyph-name="keyboard" unicode="&#xf00d;" d="M640 256h64v128h-64v-128z m128 320h-64v-128h64v128z m-128 0h-64v-128h64v128z m-128-320h64v128h-64v-128z m-128-192h320v128h-320v-128z m384 192h128v320h-64v-192h-64v-128z m-512-192h64v128h-64v-128z m512 0h128v128h-128v-128z m-256 512h-64v-128h64v128z m-320-192h-64v-128h64v128z m0-192h-64v-128h64v128z m-192 512v-768h1024v768h-1024z m960-704h-896v640h896v-640z m-576 256h64v128h-64v-128z m-128 320h-128v-128h128v128z m128 0h-64v-128h64v128z m-128-320h64v128h-64v-128z" horiz-adv-x="1024" />
106 <glyph glyph-name="light-bulb" unicode="&#xf000;" d="M512 768c-177 0-320-143-320-320 0-105 50-198 128-256v-192c0-35 29-64 64-64 0-35 29-64 64-64h128c35 0 64 29 64 64 35 0 64 29 64 64v192c78 58 128 151 128 256 0 177-143 320-320 320z m128-736c0-18-14-32-32-32h-192c-18 0-32 14-32 32v32h256v-32z m64 247c-33-33-64-42-64-124v-27h-64v128l128 128v64l-64 64-64-64-64 64-64-64-64 64-64-64v-64l128-128v-128h-64v27c0 82-31 91-64 124-40 45-64 104-64 169 0 141 115 256 256 256s256-115 256-256c0-65-24-124-64-169z m-192-23l-128 128v64l64-64 64 64 64-64 64 64v-64l-128-128z" horiz-adv-x="1024" />
107 <glyph glyph-name="link" unicode="&#xf05c;" d="M768 64h-192s-254 0-256 256c0 22 3 43 8 64h137c-11-19-18-41-18-64 0-128 128-128 128-128h192s128 0 128 128-128 128-128 128 0 64-64 128h64s256 0 256-256-256-256-256-256z m-72 192h-137c11 19 18 41 18 64 0 128-128 128-128 128h-192s-128 0-128-128 128-128 128-128-4-65 66-128h-66s-256 0-256 256 256 256 256 256h192s256 0 256-256c0-22-4-44-8-64z" horiz-adv-x="1024" />
108 <glyph glyph-name="link-external" unicode="&#xf07f;" d="M640 64h-512v510l128 2v128h-256v-768h768v320h-128v-192z m-256 640l128-128-192-192 128-128 192 192 128-128v384h-384z" horiz-adv-x="768" />
109 <glyph glyph-name="list-ordered" unicode="&#xf062;" d="M0 128h64v64h128v-64l-192-160v-96h256v64h-192l192 160v160h-256v-128z m384-256h512v128h-512v-128z m-192 832h-128v-64h128v-256h64v384h-64v-64z m192 64v-128h512v128h-512z m0-384h512v128h-512v-128z m0-256h512v128h-512v-128z" horiz-adv-x="896" />
110 <glyph glyph-name="list-unordered" unicode="&#xf061;" d="M0 640h128v128h-128v-128z m0-512h128v128h-128v-128z m0 256h128v128h-128v-128z m0-512h128v128h-128v-128z m256 256h640v128h-640v-128z m0 256h640v128h-640v-128z m0-512h640v128h-640v-128z m0 896v-128h640v128h-640z" horiz-adv-x="896" />
111 <glyph glyph-name="location" unicode="&#xf060;" d="M320 832c-177 0-320-143-320-320s320-704 320-704 320 527 320 704-143 320-320 320z m0-448c-71 0-128 57-128 128s57 128 128 128 128-57 128-128-57-128-128-128z" horiz-adv-x="640" />
112 <glyph glyph-name="lock" unicode="&#xf06a;" d="M704 384h-64v192s0 256-256 256-256-256-256-256v-192h-64s-64 0-64-64v-448c0-64 64-64 64-64h640s64 0 64 64v448c0 64-64 64-64 64z m-192-128h-384v-64h384v-64h-384v-64h384v-64h-384v-64h384v-64h-448v448h448v-64z m0 128h-256v192s0 128 128 128 128-128 128-128v-192z" horiz-adv-x="768" />
113 <glyph glyph-name="log-in" unicode="&#xf036;" d="M640 256v128h256v128h-256v128l-192-144v144l-256 128h512v-192h64v256h-704v-832l384-192v192h320v320h-64v-256h-256v336z" horiz-adv-x="896" />
114 <glyph glyph-name="log-out" unicode="&#xf032;" d="M640 64h-256v576l-256 128h512v-192h64v256h-704v-832l384-192v192h320v320h-64v-256z m384 384l-256 192v-128h-256v-128h256v-128l256 192z" horiz-adv-x="1024" />
115 <glyph glyph-name="logo-github" unicode="&#xf092;" d="M553 500h-241c-6 0-11-5-11-11v-118c0-6 5-11 11-11h94v-147s-21-7-79-7c-69 0-165 25-165 237s100 239 194 239c81 0 117-14 139-21 7-2 13 5 13 11l27 114c0 3-1 6-4 9-9 6-64 37-204 37-161 0-326-68-326-398 0-329 189-378 348-378 132 0 212 56 212 56 3 2 4 6 4 8v368c0 6-5 11-11 11z m1220 304h-136c-6 0-11-5-11-11v-262h-212v262c0 6-5 11-11 11h-136c-6 0-11-5-11-11v-710c0-6 5-11 11-11h136c6 0 11 5 11 11v304h212v-304c0-6 5-11 11-11h136c6 0 11 5 11 11v711c0 6-5 11-11 11z m-1057-16c-48 0-88-40-88-88 0-49 39-88 88-88s88 40 88 88c0 49-39 88-88 88z m78-228c0 6-5 11-11 11h-135c-6 0-12-6-12-13 0 0 0-395 0-470 0-14 9-18 20-18 0 0 58 0 122 0 13 0 17 7 17 18 0 25 0 124 0 143 0 18 0 328 0 328z m1505 10h-135c-6 0-11-5-11-11v-348s-34-25-83-25-62 22-62 70 0 304 0 304c0 6-5 11-11 11h-137c-6 0-11-5-11-11 0 0 0-186 0-327s79-176 187-176c89 0 161 49 161 49s3-26 5-29c1-3 5-6 10-6h87c6 0 11 5 11 11v477c0 6-5 11-11 11z m369 16c-77 0-129-34-129-34v241c0 6-5 11-11 11h-136c-6 0-11-5-11-11v-711c0-6 5-11 11-11 0 0 95 0 95 0 4 0 7 2 10 6 2 4 6 33 6 33s56-53 161-53c124 0 195 63 195 282s-113 247-190 247z m-53-400c-47 1-78 23-78 23v225s31 19 70 23c49 4 95-10 95-126 0-122-21-146-87-144z m-1429 3c-6 0-21-2-37-2-50 0-67 23-67 53s0 200 0 200h102c6 0 11 5 11 11v109c0 6-5 11-11 11h-102v135c0 5-3 8-9 8h-139c-5 0-8-2-8-8v-139s-70-17-74-18c-5-1-8-6-8-11v-87c0-6 5-11 11-11h71s0-91 0-210c0-156 110-171 183-171 34 0 74 11 81 13 4 1 6 6 6 10v96c0 6-5 11-11 11z" horiz-adv-x="2856.857" />
116 <glyph glyph-name="mail" unicode="&#xf03b;" d="M0 640v-640h896v640h-896z m768-64l-320-264-320 264h640z m-704-64l252-192-252-192v384z m64-448l254 206 66-50 66 50 254-206h-640z m704 64l-252 192 252 192v-384z" horiz-adv-x="896" />
117 <glyph glyph-name="mail-read" unicode="&#xf03c;" d="M576 448h-320v-64h320v64z m-192 128h-128v-64h128v64z m384 27v101h-141l-179 128-179-128h-141v-101l-128-91v-640h896v640l-128 91z m-576 37h512v-245l-256-211-256 211v245z m-128-256l252-192-252-192v384z m64-448l254 206 66-50 66 50 254-206h-640z m704 64l-252 192 252 192v-384z" horiz-adv-x="896" />
118 <glyph glyph-name="mail-reply" unicode="&#xf051;" d="M256 576h128v-320h128s0 306 0 384-64 64-64 64h-192v96l-192-160 192-160v96z m320-128v-64h192l-320-256-320 256h192v64h-320v-640h896v640h-320z m-512-128l256-192-256-192v384z m64-448l254 206 66-46 66 46 254-206h-640z m704 64l-256 192 256 192v-384z" horiz-adv-x="896" />
119 <glyph glyph-name="mark-github" unicode="&#xf00a;" d="M512 832c-283 0-512-229-512-512 0-226 147-418 350-486 26-5 35 11 35 25 0 12 0 53-1 95-142-31-172 60-172 60-23 59-57 75-57 75-47 32 4 31 4 31 51-4 78-53 78-53 46-78 120-56 149-43 5 33 18 56 33 68-114 13-233 57-233 253 0 56 20 102 53 137-5 13-23 65 5 136 0 0 43 14 141-53 41 11 85 17 128 17 44 0 87-6 128-17 98 66 141 53 141 53 28-71 10-123 5-136 33-36 53-81 53-137 0-197-120-240-234-253 18-16 35-47 35-95 0-68-1-124-1-141 0-14 9-30 35-25 203 68 350 260 350 486 0 283-229 512-512 512z" horiz-adv-x="1024" />
120 <glyph glyph-name="mark-twitter" unicode="&#xf0ae;" d="M1024 638c-38-17-78-28-121-33 43 26 77 67 92 116-41-24-86-42-133-51-38 41-93 66-153 66-116 0-210-94-210-210 0-16 2-33 5-48-175 9-329 92-433 220-18-31-28-67-28-106 0-73 37-137 93-175-34 1-67 11-95 26 0-1 0-2 0-3 0-102 72-187 169-206-18-5-36-7-55-7-14 0-27 1-40 4 27-83 104-144 196-146-72-56-162-90-261-90-17 0-34 1-50 3 93-60 203-94 322-94 386 0 598 320 598 598 0 9 0 18-1 27 41 30 77 67 105 109z" horiz-adv-x="1024" />
121 <glyph glyph-name="megaphone" unicode="&#xf077;" d="M832 800c-130 0-124-130-704-128-71 0-128-115-128-256s57-256 128-256c23 0 43-1 64-1l64-287 192-32 64 96-45 203c243-36 267-107 365-107 106 0 192 172 192 384s-86 384-192 384z m-635-451c-39 1-82 2-128 3-3 20-5 41-5 64 0 88 29 192 64 192 39 0 75 0 109 1-27-47-45-116-45-193 0-23 2-45 5-67z m64-3c-3 22-5 46-5 70 0 80 18 150 47 196 155 8 252 28 319 50-28-67-46-152-46-246 0-40 4-78 10-114-72 19-173 36-324 44z m571-218c-12 0-24 5-35 12-15 67-83 418 117 494 27-53 45-131 45-218 0-159-57-288-128-288z" horiz-adv-x="1024" />
122 <glyph glyph-name="microscope" unicode="&#xf089;" d="M617-64c86 19 151 100 151 192 0 58-27 110-68 145 2 15 4 31 4 47 0 105-50 198-128 256l64 64v64l64 64-64 64-64-64h-64l-256-256-128-64v-128l64-64h128l64 128 96 96c56-33 96-90 96-160-106 0-192-86-192-192h-384v-64h192c19-14 42-22 64-32v-96h-128l-128-128h768l-128 128h-23z m-105 192c0 35 29 64 64 64s64-29 64-64-29-64-64-64-64 29-64 64z" horiz-adv-x="768" />
123 <glyph glyph-name="milestone" unicode="&#xf075;" d="M704 640h-704v-256h704l128 128-128 128z m-256-192h-128v128h128v-128z m0 384h-128v-128h128v128z m-128-1024h128v512h-128v-512z" horiz-adv-x="832" />
124 <glyph glyph-name="mirror-private" unicode="&#xf025;" d="M704 512v-320l192 160-192 160z m-384-320v320l-192-160 192-160z m192 640l-512-256v-768l512 256 512-256v768l-512 256z m448-896l-384 192h-128l-384-192v576l384 192v-128h128v128l384-192v-576z m-576 448v-192h256v192c0 71-57 128-128 128s-128-57-128-128z m192 0h-128c0 35 29 64 64 64s64-29 64-64z" horiz-adv-x="1024" />
125 <glyph glyph-name="mirror-public" unicode="&#xf024;" d="M320 512l-192-192 192-192v128h384v-128l192 192-192 192v-128h-384v128z m192 320l-512-320v-704l512 256 512-256v704l-512 320z m448-896l-384 192v64h-128v-64l-384-192v512l384 256v-256h128v256l384-256v-512z" horiz-adv-x="1024" />
126 <glyph glyph-name="move-down" unicode="&#xf0a8;" d="M640 512h-192v320h-256v-320h-192l320-384 320 384z m-640-704h640v192h-640v-192z" horiz-adv-x="640" />
127 <glyph glyph-name="move-left" unicode="&#xf074;" d="M0 0h192v640h-192v-640z m704 448v192l-384-320 384-320v192h320v256h-320z" horiz-adv-x="1024" />
128 <glyph glyph-name="move-right" unicode="&#xf0a9;" d="M832 640v-640h192v640h-192z m-512-192h-320v-256h320v-192l384 320-384 320v-192z" horiz-adv-x="1024" />
129 <glyph glyph-name="move-up" unicode="&#xf0a7;" d="M0 128h192v-320h256v320h192l-320 384-320-384z m0 704v-192h640v192h-640z" horiz-adv-x="640" />
130 <glyph glyph-name="mute" unicode="&#xf080;" d="M128 448h-128v-256h128l256-192h64v640h-64l-256-192z m736-32l-64 64-96-96-96 96-63-64 95-97-96-96 64-64 96 96 96-96 64 64-96 96 96 96z" horiz-adv-x="864" />
131 <glyph glyph-name="no-newline" unicode="&#xf09c;" d="M896 512v-128h-128v128l-192-192 192-192v128h192s64 0 64 64 0 192 0 192h-128z m-672 32c-124 0-224-100-224-224s100-224 224-224 224 100 224 224-100 224-224 224z m-128-224c0 71 57 128 128 128 19 0 36-4 52-12l-169-169c-7 16-12 34-12 53z m128-128c-19 0-36 4-52 12l169 169c7-16 12-34 12-52 0-71-57-128-128-128z" horiz-adv-x="1024" />
132 <glyph glyph-name="octoface" unicode="&#xf008;" d="M941 554c8 20 35 102-9 212 0 0-67 21-220-83-64 18-133 20-200 20-68 0-136-3-201-20-152 104-220 83-220 83-44-110-17-192-9-212-52-56-83-127-83-215 0-329 213-404 511-404s513 74 513 404c0 87-32 159-83 215z m-429-555c-211 0-383 10-383 215 0 49 24 95 65 132 69 63 185 30 317 30s249 33 317-30c41-38 65-83 65-132 0-205-172-215-383-215z m-161 321c-42 0-77-51-77-114s34-114 77-114c42 0 77 51 77 114s-34 114-77 114z m322 0c-42 0-77-51-77-114s35-114 77-114 77 51 77 114-34 114-77 114z" horiz-adv-x="1024" />
133 <glyph glyph-name="organization" unicode="&#xf037;" d="M768 448h-640c-71 0-128-57-128-128v-64c0-47 26-88 64-110v-210h256v-128h256v128h256v210c38 22 64 63 64 110v64c0 71-57 128-128 128z m-512-448h-128v256h-64v64c0 35 29 64 64 64h82c-11-19-18-41-18-64v-128c0-47 26-88 64-110v-82z m320 128v128h-64v-384h-128v384h-64v-128c-35 0-64 29-64 64v128c0 35 29 64 64 64h256c35 0 64-29 64-64v-128c0-35-29-64-64-64z m256 128h-64v-256h-128v82c38 22 64 63 64 110v128c0 23-7 45-18 64h82c35 0 64-29 64-64v-64z m-528 259c35-41 86-67 144-67s109 26 144 67c22-40 63-67 112-67 71 0 128 57 128 128s-57 128-128 128c-26 0-49-8-69-21-20 85-96 149-187 149s-167-64-187-149c-20 13-44 21-69 21-71 0-128-57-128-128s57-128 128-128c48 0 90 27 112 67z m400 125c35 0 64-29 64-64s-29-64-64-64-64 29-64 64 29 64 64 64z m-256 128c71 0 128-57 128-128s-57-128-128-128-128 57-128 128 57 128 128 128z m-256-256c-35 0-64 29-64 64s29 64 64 64 64-29 64-64-29-64-64-64z" horiz-adv-x="896" />
134 <glyph glyph-name="pencil" unicode="&#xf058;" d="M704 768l-128-128 192-192 128 128-192 192z m-704-704l1-193 191 1 512 512-192 192-512-512z m192-128h-128v128h64v-64h64v-64z" horiz-adv-x="896" />
135 <glyph glyph-name="person" unicode="&#xf018;" d="M448 640c0 106-86 192-192 192s-192-86-192-192 86-192 192-192 192 86 192 192z m-192-128c-71 0-128 57-128 128s57 128 128 128 128-57 128-128-57-128-128-128z m128-64h-256c-71 0-128-57-128-128v-128c0-71 57-128 128-128v-256h256v256c71 0 128 57 128 128v128c0 71-57 128-128 128z m64-256c0-35-29-64-64-64v128h-64v-384h-128v384h-64v-128c-35 0-64 29-64 64v128c0 35 29 64 64 64h256c35 0 64-29 64-64v-128z" horiz-adv-x="512" />
136 <glyph glyph-name="person-add" unicode="&#xf01a;" d="M448 640c0 106-86 192-192 192s-192-86-192-192 86-192 192-192 192 86 192 192z m-192-128c-71 0-128 57-128 128s57 128 128 128 128-57 128-128-57-128-128-128z m128-64h-256c-71 0-128-57-128-128v-128c0-71 57-128 128-128v-256h256v256c71 0 128 57 128 128v128c0 71-57 128-128 128z m64-256c0-35-29-64-64-64v128h-64v-384h-128v384h-64v-128c-35 0-64 29-64 64v128c0 35 29 64 64 64h256c35 0 64-29 64-64v-128z m320 448v128h-128v-128h-128v-128h128v-128h128v128h128v128h-128z" horiz-adv-x="896" />
137 <glyph glyph-name="person-follow" unicode="&#xf01c;" d="M128 384h-128v-128h128v-128l192 192-192 192v-128z m640 64h-256c-71 0-128-57-128-128v-128c0-71 57-128 128-128v-256h256v256c71 0 128 57 128 128v128c0 71-57 128-128 128z m64-256c0-35-29-64-64-64v128h-64v-384h-128v384h-64v-128c-35 0-64 29-64 64v128c0 35 29 64 64 64h256c35 0 64-29 64-64v-128z m0 448c0 106-86 192-192 192s-192-86-192-192 86-192 192-192 192 86 192 192z m-192-128c-71 0-128 57-128 128s57 128 128 128 128-57 128-128-57-128-128-128z" horiz-adv-x="896" />
138 <glyph glyph-name="person-remove" unicode="&#xf01b;" d="M384 448h-256c-71 0-128-57-128-128v-128c0-71 57-128 128-128v-256h256v256c71 0 128 57 128 128v128c0 71-57 128-128 128z m64-256c0-35-29-64-64-64v128h-64v-384h-128v384h-64v-128c-35 0-64 29-64 64v128c0 35 29 64 64 64h256c35 0 64-29 64-64v-128z m64 448v-128h384v128h-384z m-64 0c0 106-86 192-192 192s-192-86-192-192 86-192 192-192 192 86 192 192z m-192-128c-71 0-128 57-128 128s57 128 128 128 128-57 128-128-57-128-128-128z" horiz-adv-x="896" />
139 <glyph glyph-name="pin" unicode="&#xf041;" d="M196 128l64-320 64 320c-20-2-41-3-62-3-23 0-44 1-66 3z m254 299c-16 16-40 44-62 85v64c8 12 12 39 23 52 15 13 24 29 24 45 0 53-61 95-175 95s-182-42-182-95c0-16 8-31 23-44 13-15 23-38 31-53v-64c-32-63-82-96-82-96h1c-32-22-51-48-51-76 0-74 101-148 260-148s260 73 260 148c0 33-26 64-70 88z" horiz-adv-x="519.657" />
140 <glyph glyph-name="plus" unicode="&#xf05d;" d="M384 384v256h-128v-256h-256v-128h256v-256h128v256h256v128h-256z" horiz-adv-x="640" />
141 <glyph glyph-name="podium" unicode="&#xf0af;" d="M320 832c-64 0-64-64-64-64v-64h-64l-192-192v-128h192l64-384-128-64v-64h512v64l-128 64 64 384h192v128l-192 192h-256v64h32c18 0 32 14 32 32s-14 32-32 32h-32z m0-832l-53 320h118l-1-320h-64z m-224 512l128 128h32v-64h64v64h224l128-128h-576z" horiz-adv-x="768" />
142 <glyph glyph-name="primitive-dot" unicode="&#xf052;" d="M0 320c0 142 115 256 256 256s256-115 256-256-115-256-256-256-256 115-256 256z" horiz-adv-x="511.825" />
143 <glyph glyph-name="primitive-square" unicode="&#xf053;" d="M512 64h-512v512h512v-512z" horiz-adv-x="512" />
144 <glyph glyph-name="pulse" unicode="&#xf085;" d="M736 320l-173 166-141-198-70 442-200-410h-152v-128h230l58 115 58-346 230 326 102-96h218v128h-160z" horiz-adv-x="896" />
145 <glyph glyph-name="question" unicode="&#xf02c;" d="M448 64h128v128h-128v-128z m64 512s-192 0-192-192c8-1 128 0 128 0s0 64 64 64 64-64 64-64c0-64-130-64-130-128h130s128 0 128 160-192 160-192 160z m0 256c-283 0-512-229-512-512s229-512 512-512 512 229 512 512-229 512-512 512z m0-896c-212 0-384 172-384 384s172 384 384 384 384-172 384-384-172-384-384-384z" horiz-adv-x="1024" />
146 <glyph glyph-name="quote" unicode="&#xf063;" d="M0 320v-256h256v256h-128s0 128 128 128v128s-256 0-256-256z m640 128v128s-256 0-256-256v-256h256v256h-128s0 128 128 128z" horiz-adv-x="640" />
147 <glyph glyph-name="radio-tower" unicode="&#xf030;" d="M307 441c16 16 16 43 0 59-21 21-31 48-31 76s10 55 31 76c16 16 16 43 0 59-8 8-18 12-29 12-10 0-21-4-29-12-36-37-55-86-55-135s18-98 55-135c16-16 42-16 57 0z m-158 358c-8 8-19 12-29 12-11 0-21-4-29-12-60-61-90-142-90-222s30-161 90-222c16-17 42-17 59 0 16 17 16 44 0 60-44 45-65 103-65 162s22 117 65 162c16 17 16 44 0 60z m364-327c57 0 104 47 104 104s-47 104-104 104-104-47-104-104 47-104 104-104z m421 326c-16 17-42 17-58 0s-16-44 0-60c44-45 65-103 65-162s-22-117-65-162c-16-17-16-44 0-60 8-8 19-12 29-12 11 0 21 4 29 12 60 61 90 142 90 222s-30 161-90 222z m-420-409c-26 0-53 6-77 19l-201-536h95l55 64h256l54-64h95l-201 536c-24-13-50-19-76-19z m-1-31l64-230h-128l64 230z m-128-358l64 64h128l64-64h-256z m332 711c-16-16-16-43 0-59 20-21 31-49 31-76 0-28-10-55-31-76-16-16-16-43 0-59 8-8 18-12 29-12 10 0 21 4 29 12 36 37 55 86 55 135s-18 98-55 135c-16 16-42 16-57 0z" horiz-adv-x="1024" />
148 <glyph glyph-name="remove-close" unicode="&#xf050;" d="M448-128c-247 0-448 201-448 448s201 448 448 448 448-201 448-448-201-448-448-448z m0 768c-177 0-320-143-320-320s143-320 320-320 320 143 320 320-143 320-320 320z m107-509l-107 107-107-107-83 83 107 107-107 107 83 83 107-107 107 107 83-83-107-107 107-107-83-83z" horiz-adv-x="896" />
149 <glyph glyph-name="repo" unicode="&#xf001;" d="M320 576h-64v-64h64v64z m0 128h-64v-64h64v64z m384 128h-640s-64 0-64-64v-768c0-64 64-64 64-64h128v-128l96 96 96-96v128h320s64 1 64 64v768c0 64-64 64-64 64z m0-768c0-62-64-64-64-64h-256v64h-192v-64h-64c-64 0-64 64-64 64v64h640v-64z m0 128h-512v576h513l-1-576z m-384 128h-64v-64h64v64z m0 128h-64v-64h64v64z" horiz-adv-x="768" />
150 <glyph glyph-name="repo-clone" unicode="&#xf04c;" d="M384 384l128 160-128 160v-320z m-64 64h-64v-64h64v64z m-128 320h256v64h-384s-64 1-64-64c0-293 0-768 0-768 0-10 3-64 64-64h128v-128l96 96 96-96v128h318c67 0 66 64 66 64v192h-576v576z m512-640s0-32 0-64c0-62-66-64-66-64s-124 0-254 0v64h-192v-64h-66c-64 0-62 64-62 64v64h640z m-384 448h-64v-64h64v64z m-64-320h64v64h-64v-64z m704 576h-320s-64 0-64-64v-384c0-64 64-64 64-64h64v-64l32 32 32-32v64h192s64 0 64 64v384c0 64-64 64-64 64z m-256-448s0 0-32 0-32 32-32 32v32h64v-64z m256 32s0-32-32-32-160 0-160 0v64h192v-32z m0 96h-256v256h224s32 0 32-32 0-224 0-224z m-640 192h-64v-64h64v64z" horiz-adv-x="1024" />
151 <glyph glyph-name="repo-create" unicode="&#xf003;" d="M768 704v128h-128v-128h-128v-128h128v-128h128v128h128v128h-128z m-384-256h-64v-64h64v64z m0 256h-64v-64h64v64z m384-512h-512v576h256v64h-384s-64 0-64-64v-768c0-64 64-64 64-64h128v-128l96 96 96-96v128h320s64 1 64 64v384h-64v-192z m0-128c0-62-64-64-64-64h-256v64h-192v-64h-64c-64 0-64 64-64 64v64h640v-64z m-448 192h64v64h-64v-64z m64 320h-64v-64h64v64z" horiz-adv-x="896" />
152 <glyph glyph-name="repo-delete" unicode="&#xf004;" d="M512 704v-128h384v128h-384z m-128-256h-64v-64h64v64z m0 256h-64v-64h64v64z m384-512h-512v576h576s0 64-64 64h-640s-64 0-64-64v-768c0-64 64-64 64-64h128v-128l96 96 96-96v128h320s64 1 64 64v512h-64v-320z m0-128c0-62-64-64-64-64h-256v64h-192v-64h-64c-64 0-64 64-64 64v64h640v-64z m-448 192h64v64h-64v-64z m64 320h-64v-64h64v64z" horiz-adv-x="896" />
153 <glyph glyph-name="repo-force-push" unicode="&#xf04a;" d="M768 768c-2 64-64 64-64 64h-640s-64 1-64-64c0-293 0-768 0-768 0-10 3-64 64-64h128v-128l128 128v128h-128v-64h-66c-64 0-62 64-62 64v64h256v64h-128v576h512v-576h-128v-64h128s0-32 0-64c0-62-66-64-66-64s-25 0-62 0v-64h126c67 0 66 64 66 64v768z m-272-320h144l-192 256-192-256h144l-144-192h128v-448h128v448h128l-144 192z" horiz-adv-x="767.896" />
154 <glyph glyph-name="repo-forked" unicode="&#xf002;" d="M384 256h128v128l128 128v192h-128v-128l-64-64-64 64v128h-128v-192l128-128v-128z m320 576h-640c-64 0-64-64-64-64v-768s0-64 64-64h128v-128l96 96 96-96v128h320c64 0 64 64 64 64v768s0 64-64 64z m0-768s0-64-64-64h-256v64h-192v-64h-64c-64 0-64 64-64 64v64h640v-64z m0 128h-512v576h512v-576z" horiz-adv-x="768" />
155 <glyph glyph-name="repo-pull" unicode="&#xf006;" d="M1024 512l-192 192v-128h-384v-128h384v-128l192 192z m-320-320h-512v576h512v-128h64v128c0 64-64 64-64 64h-640s-64 0-64-64v-768c0-64 64-64 64-64h128v-128l96 96 96-96v128h320s64 1 64 64v384h-64v-192z m0-128c0-62-64-64-64-64h-256v64h-192v-64h-64c-64 0-64 64-64 64v64h640v-64z m-384 512h-64v-64h64v64z m0 128h-64v-64h64v64z m0-256h-64v-64h64v64z m-64-192h64v64h-64v-64z" horiz-adv-x="1024" />
156 <glyph glyph-name="repo-push" unicode="&#xf005;" d="M448 512l-192-256h128v-448h128v448h128l-192 256z m-192 0h64v64h-64v-64z m64 192h-64v-64h64v64z m384 128h-640s-64 0-64-64v-768c0-64 64-64 64-64h128v-128l128 128v128h-128v-64h-64c-64 0-64 64-64 64v64h256v64h-128v576h513l-1-576h-128v-64h128v-64c0-62-64-64-64-64h-64v-64h128s64 1 64 64v768c0 64-64 64-64 64z" horiz-adv-x="768" />
157 <glyph glyph-name="repo-sync" unicode="&#xf04b;" d="M254 768h512v-64h64v64c-2 64-64 64-64 64h-640s-64 1-64-64c0-293 0-768 0-768 0-10 3-64 64-64h128v-128l96 96 96-96v128h318c67 0 66 64 66 64v192h-576v576z m512-640s0-32 0-64c0-62-66-64-66-64s-124 0-254 0v64h-192v-64h-66c-64 0-62 64-62 64v64h640z m0 448v64h-192v-128h-98l130-166 130 166h-98v64h128z m96-26l-130-166h98v-64h-128v-64h192v128h98l-130 166z m-480 154h-64v-64h64v64z m0-128h-64v-64h64v64z m-64-320h64v64h-64v-64z m64 192h-64v-64h64v64z" horiz-adv-x="1024" />
158 <glyph glyph-name="rocket" unicode="&#xf033;" d="M717 708c-72-42-148-96-218-167-45-45-81-89-110-130l-178-33-209-210 187-6 132 132c-46-96-51-160-51-160l59-59s66 6 163 53l-134-134 6-187 210 210 33 179c41 29 85 65 130 110 70 70 125 147 167 218-46 9-88 28-121 62-33 33-53 76-62 121z m69 37c5-45 20-81 45-106s61-40 106-45c66 133 87 238 87 238s-104-21-238-87z" horiz-adv-x="1024" />
159 <glyph glyph-name="rss" unicode="&#xf034;" d="M128 192c-71 0-128-57-128-128s57-128 128-128 128 57 128 128-57 128-128 128z m0 256s-64-2-64-64 64-64 64-64c141 0 256-115 256-256 0 0 0-64 64-64s64 64 64 64c0 212-172 384-384 384z m0 256s-64 0-64-64 64-64 64-64c283 0 512-229 512-512 0 0 0-64 64-64s64 64 64 64c0 353-287 640-640 640z" horiz-adv-x="768" />
160 <glyph glyph-name="ruby" unicode="&#xf047;" d="M768 704h-512l-256-256 512-512 512 512-256 256z m-640-256l192 192h384l192-192-384-384-384 384z m576 128h-192v-448l320 320-128 128z" horiz-adv-x="1024" />
161 <glyph glyph-name="screen-full" unicode="&#xf066;" d="M128 64h640v512h-640v-512z m128 384h384v-256h-384v256z m-192 192h192v64h-256v-256h64v192z m0-448h-64v-256h256v64h-192v192z m576 512v-64h192v-192h64v256h-256z m192-704h-192v-64h256v256h-64v-192z" horiz-adv-x="895.875" />
162 <glyph glyph-name="screen-normal" unicode="&#xf067;" d="M128 640h-128v-64h192v192h-64v-128z m-128-640h128v-128h64v192h-192v-64z m768 640v128h-64v-192h192v64h-128z m-64-768h64v128h128v64h-192v-192z m-512 256h512v384h-512v-384z m128 256h256v-128h-256v128z" horiz-adv-x="896" />
163 <glyph glyph-name="search" unicode="&#xf02e;" d="M960 0l-249 249c36 58 57 126 57 199 0 212-172 384-384 384s-384-172-384-384 172-384 384-384c73 0 141 22 199 57l249-249c18-18 47-17 64 0l64 64c18 18 18 47 0 64z m-576 192c-141 0-256 115-256 256s115 256 256 256 256-115 256-256-115-256-256-256z" horiz-adv-x="973.125" />
164 <glyph glyph-name="server" unicode="&#xf097;" d="M0 704v-128s2-64 64-64 577 0 640 0 64 64 64 64v128s-1 64-64 64-588 0-640 0c-65 0-64-64-64-64z m0-320v-128s2-64 64-64 577 0 640 0 64 64 64 64v128s-1 64-64 64-588 0-640 0c-65 0-64-64-64-64z m0-320v-128s2-64 64-64 577 0 640 0 64 64 64 64v128s-1 64-64 64-588 0-640 0c-65 0-64-64-64-64z m64 192v128h64v-128h-64z m128 0v128h64v-128h-64z m128 0v128h64v-128h-64z m128 0v128h64v-128h-64z m192 64v64h64v-64h-64z m-576 256v128h64v-128h-64z m128 0v128h64v-128h-64z m128 0v128h64v-128h-64z m128 0v128h64v-128h-64z m192 64v64h64v-64h-64z m-576-704v128h64v-128h-64z m128 0v128h64v-128h-64z m128 0v128h64v-128h-64z m128 0v128h64v-128h-64z m192 64v64h64v-64h-64z" horiz-adv-x="768" />
165 <glyph glyph-name="settings" unicode="&#xf07c;" d="M64-64h128v192h-128v-192z m128 768h-128v-320h128v320z m320 0h-128v-128h128v128z m-512-512h256v128h-256v-128z m384-256h128v384h-128v-384z m-64 448h256v128h-256v-128z m512 320h-128v-384h128v384z m-192-448v-128h256v128h-256z m64-320h128v128h-128v-128z" horiz-adv-x="896" />
166 <glyph glyph-name="squirrel" unicode="&#xf0b2;" d="M768 768c-141 0-256-84-256-187 0-124 32-194 0-389 0 288-177 406-256 406 3 32-31 42-31 42s-14-7-19-22c-17 20-36 18-36 18l-8-37s-117-41-119-206c14-22 99-39 159-28 57-3 43-51 30-63-54-54-104 19-168 19s-64-64 0-64 64-64 192-64c-198-77 0-256 0-256h-64c-64 0-64-64-64-64s256 0 384 0c192 0 320 64 320 222 0 54-28 115-64 162-71 93 14 171 64 128s192-64 192 128c0 141-115 256-256 256z m-608-320c-18 0-32 14-32 32s14 32 32 32 32-14 32-32-14-32-32-32z" horiz-adv-x="1024" />
167 <glyph glyph-name="star" unicode="&#xf02a;" d="M896 448l-314 41-135 279-135-279-313-41 230-209-59-303 277 149 277-149-60 303 231 209z" horiz-adv-x="896" />
168 <glyph glyph-name="star-add" unicode="&#xf082;" d="M896 450z m-256-66v98l-69 30h-59v123l-64 133-135-279-313-41 230-209-58-303 275 147 275-147-58 303 166 145h-192z m192 320v128h-128v-128h-128v-128h128v-128h128v128h128v128h-128z" horiz-adv-x="960" />
169 <glyph glyph-name="star-delete" unicode="&#xf083;" d="M576 448l-64 128v64l-64 128-135-279-313-41 230-209-58-303 275 149 275-149-58 303 166 145-256 64z m358 294l-64 64-102-102-103 105-64-67 102-102-102-102 64-64 102 102 102-102 64 64-102 102 102 102z" horiz-adv-x="934.375" />
170 <glyph glyph-name="stop" unicode="&#xf08f;" d="M704 832h-384l-320-320v-384l320-320h384l320 320v384l-320 320z m192-640l-256-256h-256l-256 256v256l256 256h256l256-256v-256z m-448 64h128v320h-128v-320z m0-192h128v128h-128v-128z" horiz-adv-x="1024" />
171 <glyph glyph-name="sync" unicode="&#xf087;" d="M655 359c12-82-13-168-77-231-94-93-240-104-346-35l75 73-275 38 38-269 84 81c151-111 365-101 502 35 80 78 116 183 111 285l-112 22z m-466 153c94 93 239 104 346 35l-75-73 275-38-38 269-84-81c-151 111-365 101-502-35-79-78-116-183-111-285l112-22c-12 82 13 168 77 231z" horiz-adv-x="768.051" />
172 <glyph glyph-name="tag" unicode="&#xf015;" d="M384 768h-256l-128-128v-256l512-512 384 384-512 512z m-320-352v192l96 96h192l448-448-288-288-448 448z m384 96l-192-192 256-256 192 192-256 256z m-96-192l96 96 160-160-96-96-160 160z m-32 224c0 53-43 96-96 96s-96-43-96-96 43-96 96-96 96 43 96 96z m-96-32c-18 0-32 14-32 32s14 32 32 32 32-14 32-32-14-32-32-32z" horiz-adv-x="896" />
173 <glyph glyph-name="tag-add" unicode="&#xf054;" d="M736 320l64-64-288-288-448 448v192l96 96h186l102-96v96l-64 64h-256l-128-128v-256l512-512 384 384-64 64h-96z m32 320v128h-128v-128h-128v-128h128v-128h128v128h128v128h-128z m-544 0c-53 0-96-43-96-96s43-96 96-96 96 43 96 96-43 96-96 96z m0-128c-18 0-32 14-32 32s14 32 32 32 32-14 32-32-14-32-32-32z m480-256l-256 256-192-192 256-256 192 192z m-256 160l160-160-96-96-160 160 96 96z" horiz-adv-x="896" />
174 <glyph glyph-name="tag-remove" unicode="&#xf055;" d="M672 384l128-128-288-288-448 448v192l96 96h192l160-160v96l-128 128h-256l-128-128v-256l512-512 384 384-128 128h-96z m32-128l-256 256-192-192 256-256 192 192z m-256 160l160-160-96-96-160 160 96 96z m-224 224c-53 0-96-43-96-96s43-96 96-96 96 43 96 96-43 96-96 96z m0-128c-18 0-32 14-32 32s14 32 32 32 32-14 32-32-14-32-32-32z m713 231l-67 67-103-103-103 103-67-67 103-103-103-103 67-67 103 103 103-103 67 67-103 103 103 103z" horiz-adv-x="937" />
175 <glyph glyph-name="telescope" unicode="&#xf088;" d="M78 407l1 3 226 58c-1-6-2-19-2-19 0-128 128-128 128-128s128 0 128 128c0 11-8 22-19 32l49-3s7 2 31 8c-51-14-108 31-126 99s8 135 60 149c-24-6-31-8-31-8l-168-110c-34-9-55-46-46-80 2-9 7-17 12-23-7-12-12-26-15-40-27 1-51 19-59 46-9 34 11 69 45 78l-245-65c-34-9-54-43-45-77s41-57 76-48z m417-151h-128v-64l-320-320h128l192 128v-128h128v128l192-128h128l-320 320v64z m429 448c-18 68-70 110-122 96-69-18-98-28-186-51-51-14-79-80-61-148s74-115 125-102c87 23 117 33 186 51 51 14 76 85 58 154z m-70-90c-17-5-41 19-50 53l-1-2c-9 34-4 66 13 70s42-17 51-51 4-66-13-70z" horiz-adv-x="929.875" />
176 <glyph glyph-name="three-bars" unicode="&#xf05e;" d="M0 640v-128h640v128h-640z m0-384h640v128h-640v-128z m0-256h640v128h-640v-128z" horiz-adv-x="640" />
177 <glyph glyph-name="tools" unicode="&#xf031;" d="M287 367c17-17 82-85 82-85l36 37-56 58 108 115s-49 48-27 29c20 76 2 161-56 220-57 59-138 79-211 58l124-128-33-125-121-33-124 128c-20-75-1-159 56-219 60-62 147-80 222-55z m412-124l-149-147 246-255c20-21 46-31 73-31 26 0 53 10 73 31 40 42 40 109 0 151l-242 251z m325 427l-157 162-462-477 56-58-276-286-63-34-89-146 23-24 141 92 33 65 276 286 56-58 462 477z" horiz-adv-x="1024" />
178 <glyph glyph-name="triangle-down" unicode="&#xf05b;" d="M0 448l384-384 384 384h-768z" horiz-adv-x="767.5" />
179 <glyph glyph-name="triangle-left" unicode="&#xf044;" d="M0 320l384-384v768l-384-384z" horiz-adv-x="383.75" />
180 <glyph glyph-name="triangle-right" unicode="&#xf05a;" d="M0 704l384-384-384-384v768z" horiz-adv-x="383.875" />
181 <glyph glyph-name="triangle-up" unicode="&#xf0aa;" d="M384 576l-384-384h768l-384 384z" horiz-adv-x="767.5" />
182 <glyph glyph-name="unfold" unicode="&#xf039;" d="M384 512h128v128h128l-192 192-192-192h128v-128z m192 64v-64h224l-128-128h-448l-128 128h224v64h-320v-64l160-160-160-160v-64h320v64h-224l128 128h448l128-128h-224v-64h320v64l-160 160 160 160v64h-320z m-64-320h-128v-192h-128l192-192 192 192h-128v192z" horiz-adv-x="896" />
183 <glyph glyph-name="versions" unicode="&#xf064;" d="M0 128h128v64h-64v256h64v64h-128v-384z m384 512v-640h512v640h-512z m384-512h-256v384h256v-384z m-576-64h128v64h-64v384h64v64h-128v-512z" horiz-adv-x="896" />
184 <glyph glyph-name="x" unicode="&#xf081;" d="M640 512l-128 128-192-192-192 192-128-128 192-192-192-192 128-128 192 192 192-192 128 128-192 192 192 192z" horiz-adv-x="640" />
185 <glyph glyph-name="zap" unicode="&#x26a1;" d="M640 384h-256l192 448-576-576h256l-192-448 576 576z" horiz-adv-x="640" />
186 </font>
187 </defs>
188 </svg>
forum/static/octicons/octicons-d3d0b82bf791ac147d72bbf0287cdde8ee5c97b8.eot
No preview for this file type
forum/static/pages/nav/index.html
forum/static/pages/nav/style.css
File was created 1 h2{
2 font-size:18px;
3 }
4
5 h3{
6 font-size:16px;
7 }
8
9 .tooltip{
10 font-family: 'Hiragino Sans GB', Helvetica, Arial, sans-serif;
11 font-size: 12px;
12 }
13
14 .navbar-inner {
15 -webkit-border-radius: 0px;
16 -moz-border-radius: 0px;
17 border-radius: 0px
18 }
19
20 .navbar{
21 margin-bottom:0;
22 }
23
24 .ribbon{
25 position:absolute;
26 top:-1px;
27 right:0px;
28 }
29
30 .container{
31 width:auto;
32 }
33
34 .footer{
35 text-align: center;
36 padding: 20px 0;
37 background-color: whiteSmoke;
38 }
39
40 .tag{
41 overflow:hidden;
42 }
43
44 .tag td {
45 padding: 0;
46 }
47
48 table{
49 width:100%;
50 }
51
52 .header {
53 border-right: 1px solid #E1E1E8;
54 border-bottom: 1px solid #E1E1E8;
55 width:208px;
56 background-color: #F7F7F9;
57 }
58
59 .content {
60 border-bottom: 1px solid #E1E1E8;
61 }
62
63 .header h2{
64 padding:10px;
65 text-align:center;
66 }
67
68 .tag ul{
69 margin:0;
70 }
71
72 .tag li{
73 width:180px;
74 float:left;
75 list-style:none;
76 border-right: 1px solid #E5E5E5;
77 border-bottom: 1px solid #e5e5e5;
78 margin-bottom: -1px;
79 }
80
81 .tag li a{
82 display:block;
83 padding:5px;
84 height:92px;
85 font-family: 'Hiragino Sans GB', Helvetica, Arial, sans-serif;
86 }
87
88 .tag li a p{
89 margin:0;
90 font-size: 10px;
91 }
92
93 .tag li a:hover{
94 color:#FFF;
95 background-color: #08C;
96 text-decoration:none;
97 }
98
99 .tag li h3 {
100 line-height: 20px;
101 margin-bottom: 7px;
102 font-size: 14px;
103 }
104
105 .footer .container p {
106 margin: 0;
107 }
108
109
110 @media screen and (min-width:1440px) {
111
112 }
113
114 @media screen and (max-width:1200px) {
115
116 }
117
118 @media screen and (min-width:951px) and (max-width:1200px) {
119 }
120
121 @media screen and (max-width:950px) {
122 }
123
124 @media screen and (min-width:801px) and (max-width:950px) {
125 }
126
127 @media screen and (min-width:800px) {
128 }
129
130 @media screen and (max-width:640px) {
131 }
132
133 @media screen and (max-width:320px) {
134 .ribbon{
135 display:none;
136 }
137
138 .navbar .brand{
139 text-align:center;
140 display:block;
141 width:100%;
142 padding: 3px 0;
143 margin-left: 0px;
144 float:none;
145 color:#FFF;
146 }
147
148 .nav-collapse.collapse{
149 overflow:visible;
150 }
151
152 .navbar .nav{
153 margin:0 auto;
154 float:none;
155 }
156
157 .header{
158 background-color: #F7F7F9;
159 border: 1px solid #E1E1E8;
160 }
161
162 .header h2{
163 border: none;
164 width: 46px;
165 font-size: 20px;
166 }
167
168 .tag p{
169 display:none;
170 }
171
172 .tag li {
173 width:auto;
174 }
175
176 .tag li a {
177 height:24px;
178 }
179
180 .container{
181 width:auto;
182 }
183 }
184
forum/static/pages/timeline/css/history.css
File was created 1 body, p, form, input, textarea, ul, li, h1, h2, h3, h4, dl, dt, dd, table, td, th { margin:0; padding:0; }
2 table, td, th { border-collapse:collapse; }
3 ul, li { list-style:none; }
4 h1, h2, h3, h4 { font-size:100%; }
5 img, input, textarea { vertical-align: middle; border:0; }
6 a { text-decoration:none; color:#787878; outline:none; }
7 a:hover { text-decoration:underline; }
8 body { font:12px/1.5 "微软雅黑","tahoma", Verdana, Geneva, sans-serif; color:#666; position:relative;}
9 .clearfix:after{content:" "; display:block; height:0; clear:both; visibility:hidden;}
10 .clearfix{zoom:1;}
11 .fl { float:left;}
12 .fr { float:right;}
13 /*.public*/
14 .main {margin:0 auto; width:980px;}
15 a { blr:expression(this.onFocus=this.blur()) } /*针对 IE*/
16 a { outline:none; } /*针对firefox等*/
17
18 .main { padding:45px 0; min-height:720px; }
19 /*history*/
20 .history { background:url(../images/line04.gif) repeat-y 187px 0; overflow:hidden; position:relative;}
21 .history-date { overflow:hidden;}
22 .history-date h2 { background:url(../images/icon06.gif) #fff no-repeat 158px 0; height:59px; font-size:25px; font-family:微软雅黑; font-weight:normal; padding-left:45px; margin-bottom:74px; }
23 .history-date h2.first { position:absolute; left:0; top:0; width:935px; z-index:99;}
24 .history-date h2 a { color:#00bbff; display:inline-block; *display:inline; zoom:1; background:url(../images/icon08.gif) no-repeat right 50%; padding-right:17px; margin:21px 97px 0 0;}
25 .history-date h2 a:hover { text-decoration:none;}
26 .history-date h2 img { vertical-align:-5px;}
27 .history-date h2.date02 { background:none;}
28 .history-date ul {}
29 .history-date ul li { background:url(../images/icon07.gif) no-repeat 180px 0; padding-bottom:50px; zoom:1; }
30 .history-date ul li.last { padding-bottom:0;}
31 .history-date ul li:after{content:" "; display:block; height:0; clear:both; visibility:hidden;}
32 .history-date ul li h3 { float:left; width:168px; text-align:right; padding-right:19px;color:#c3c3c3; font:normal 18px/16px Arial;}
33 .history-date ul li h3 span { display:block; color:#d0d0d0; font-size:12px;}
34 .history-date ul li dl { float:left; padding-left:41px; margin-top:-5px; font-family:微软雅黑;}
35 .history-date ul li dl dt { font:20px/22px 微软雅黑; color:#737373; }
36 .history-date ul li dl dt span { display:block; color:#787878; font-size:12px;}
37 .history-date ul li.green h3 { color:#1db702;}
38 .history-date ul li.green h3 span { color:#a8dda3; }
39 .history-date ul li.green dl { margin-top:-8px;}
40 .history-date ul li.green dl dt { font-size:30px; line-height:28px;}
41 .history-date ul li.green dl dt a { /*background:url(../images/icon09.gif) no-repeat 0 0; width:19px; height:16px;*/ display:inline-block; *display:inline; zoom:1; overflow:hidden; vertical-align: middle; margin-left:12px;}
42 .history-date ul li.green dl dd { padding-top:20px; display:none;}
43 .history-date ul li.green dl dd img { float:left;}
44 .history-date ul li.green dl dd p { overflow:hidden; zoom:1; line-height:21px; color:#787878;}
45
46 .history-date h2.first .more-history {font-size: 16px; background: transparent; margin-left: 30px;}
47 .history-date h2.first .more-history:hover {text-decoration: underline;}
48
49 *body .history-date ul li dl dt {_font-size:12px !important; _font-weight:bold;}
50 *body .history-date ul li dl dt span {_font-weight:normal !important;}
51 *body .history-date ul li.green dl dt a {_background:transparent !important; *background:transparent !important;*font-size:12px !important; _font-weight:normal !important;}
52
53 body {
54 font-family: Tahoma, Arial, "Hiragino Sans GB W3", STHeiti, "Microsoft YaHei";
55 }
56
57 .nav-box .cur {
58 text-align:center;
59 font-size:42px;
60 font-family:'微软雅黑', '宋体';
61 }
62
63 body .history-date ul li.green dl dt {
64 font-size: 25px;
65 }
66
forum/static/pages/timeline/images/arrow.png

780 Bytes

forum/static/pages/timeline/images/icon06.gif

1.65 KB

forum/static/pages/timeline/images/icon07.gif

366 Bytes

forum/static/pages/timeline/images/icon08.gif

49 Bytes

forum/static/pages/timeline/images/icon09.gif

190 Bytes

forum/static/pages/timeline/images/line04.gif

43 Bytes

forum/static/pages/timeline/index.html
forum/static/pages/timeline/js/jquery.js
File was created 1 /*!
2 * jQuery JavaScript Library v1.4.2
3 * http://jquery.com/
4 *
5 * Copyright 2010, John Resig
6 * Dual licensed under the MIT or GPL Version 2 licenses.
7 * http://jquery.org/license
8 *
9 * Includes Sizzle.js
10 * http://sizzlejs.com/
11 * Copyright 2010, The Dojo Foundation
12 * Released under the MIT, BSD, and GPL Licenses.
13 *
14 * Date: Sat Feb 13 22:33:48 2010 -0500
15 */
16 (function(A,w){function ma(){if(!c.isReady){try{s.documentElement.doScroll("left")}catch(a){setTimeout(ma,1);return}c.ready()}}function Qa(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function X(a,b,d,f,e,j){var i=a.length;if(typeof b==="object"){for(var o in b)X(a,o,b[o],f,e,d);return a}if(d!==w){f=!j&&f&&c.isFunction(d);for(o=0;o<i;o++)e(a[o],b,f?d.call(a[o],o,e(a[o],b)):d,j);return a}return i?
17 e(a[0],b):w}function J(){return(new Date).getTime()}function Y(){return false}function Z(){return true}function na(a,b,d){d[0].type=a;return c.event.handle.apply(b,d)}function oa(a){var b,d=[],f=[],e=arguments,j,i,o,k,n,r;i=c.data(this,"events");if(!(a.liveFired===this||!i||!i.live||a.button&&a.type==="click")){a.liveFired=this;var u=i.live.slice(0);for(k=0;k<u.length;k++){i=u[k];i.origType.replace(O,"")===a.type?f.push(i.selector):u.splice(k--,1)}j=c(a.target).closest(f,a.currentTarget);n=0;for(r=
18 j.length;n<r;n++)for(k=0;k<u.length;k++){i=u[k];if(j[n].selector===i.selector){o=j[n].elem;f=null;if(i.preType==="mouseenter"||i.preType==="mouseleave")f=c(a.relatedTarget).closest(i.selector)[0];if(!f||f!==o)d.push({elem:o,handleObj:i})}}n=0;for(r=d.length;n<r;n++){j=d[n];a.currentTarget=j.elem;a.data=j.handleObj.data;a.handleObj=j.handleObj;if(j.handleObj.origHandler.apply(j.elem,e)===false){b=false;break}}return b}}function pa(a,b){return"live."+(a&&a!=="*"?a+".":"")+b.replace(/\./g,"`").replace(/ /g,
19 "&")}function qa(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function ra(a,b){var d=0;b.each(function(){if(this.nodeName===(a[d]&&a[d].nodeName)){var f=c.data(a[d++]),e=c.data(this,f);if(f=f&&f.events){delete e.handle;e.events={};for(var j in f)for(var i in f[j])c.event.add(this,j,f[j][i],f[j][i].data)}}})}function sa(a,b,d){var f,e,j;b=b&&b[0]?b[0].ownerDocument||b[0]:s;if(a.length===1&&typeof a[0]==="string"&&a[0].length<512&&b===s&&!ta.test(a[0])&&(c.support.checkClone||!ua.test(a[0]))){e=
20 true;if(j=c.fragments[a[0]])if(j!==1)f=j}if(!f){f=b.createDocumentFragment();c.clean(a,b,f,d)}if(e)c.fragments[a[0]]=j?f:1;return{fragment:f,cacheable:e}}function K(a,b){var d={};c.each(va.concat.apply([],va.slice(0,b)),function(){d[this]=a});return d}function wa(a){return"scrollTo"in a&&a.document?a:a.nodeType===9?a.defaultView||a.parentWindow:false}var c=function(a,b){return new c.fn.init(a,b)},Ra=A.jQuery,Sa=A.$,s=A.document,T,Ta=/^[^<]*(<[\w\W]+>)[^>]*$|^#([\w-]+)$/,Ua=/^.[^:#\[\.,]*$/,Va=/\S/,
21 Wa=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,Xa=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,P=navigator.userAgent,xa=false,Q=[],L,$=Object.prototype.toString,aa=Object.prototype.hasOwnProperty,ba=Array.prototype.push,R=Array.prototype.slice,ya=Array.prototype.indexOf;c.fn=c.prototype={init:function(a,b){var d,f;if(!a)return this;if(a.nodeType){this.context=this[0]=a;this.length=1;return this}if(a==="body"&&!b){this.context=s;this[0]=s.body;this.selector="body";this.length=1;return this}if(typeof a==="string")if((d=Ta.exec(a))&&
22 (d[1]||!b))if(d[1]){f=b?b.ownerDocument||b:s;if(a=Xa.exec(a))if(c.isPlainObject(b)){a=[s.createElement(a[1])];c.fn.attr.call(a,b,true)}else a=[f.createElement(a[1])];else{a=sa([d[1]],[f]);a=(a.cacheable?a.fragment.cloneNode(true):a.fragment).childNodes}return c.merge(this,a)}else{if(b=s.getElementById(d[2])){if(b.id!==d[2])return T.find(a);this.length=1;this[0]=b}this.context=s;this.selector=a;return this}else if(!b&&/^\w+$/.test(a)){this.selector=a;this.context=s;a=s.getElementsByTagName(a);return c.merge(this,
23 a)}else return!b||b.jquery?(b||T).find(a):c(b).find(a);else if(c.isFunction(a))return T.ready(a);if(a.selector!==w){this.selector=a.selector;this.context=a.context}return c.makeArray(a,this)},selector:"",jquery:"1.4.2",length:0,size:function(){return this.length},toArray:function(){return R.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this.slice(a)[0]:this[a]},pushStack:function(a,b,d){var f=c();c.isArray(a)?ba.apply(f,a):c.merge(f,a);f.prevObject=this;f.context=this.context;if(b===
24 "find")f.selector=this.selector+(this.selector?" ":"")+d;else if(b)f.selector=this.selector+"."+b+"("+d+")";return f},each:function(a,b){return c.each(this,a,b)},ready:function(a){c.bindReady();if(c.isReady)a.call(s,c);else Q&&Q.push(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(R.apply(this,arguments),"slice",R.call(arguments).join(","))},map:function(a){return this.pushStack(c.map(this,
25 function(b,d){return a.call(b,d,b)}))},end:function(){return this.prevObject||c(null)},push:ba,sort:[].sort,splice:[].splice};c.fn.init.prototype=c.fn;c.extend=c.fn.extend=function(){var a=arguments[0]||{},b=1,d=arguments.length,f=false,e,j,i,o;if(typeof a==="boolean"){f=a;a=arguments[1]||{};b=2}if(typeof a!=="object"&&!c.isFunction(a))a={};if(d===b){a=this;--b}for(;b<d;b++)if((e=arguments[b])!=null)for(j in e){i=a[j];o=e[j];if(a!==o)if(f&&o&&(c.isPlainObject(o)||c.isArray(o))){i=i&&(c.isPlainObject(i)||
26 c.isArray(i))?i:c.isArray(o)?[]:{};a[j]=c.extend(f,i,o)}else if(o!==w)a[j]=o}return a};c.extend({noConflict:function(a){A.$=Sa;if(a)A.jQuery=Ra;return c},isReady:false,ready:function(){if(!c.isReady){if(!s.body)return setTimeout(c.ready,13);c.isReady=true;if(Q){for(var a,b=0;a=Q[b++];)a.call(s,c);Q=null}c.fn.triggerHandler&&c(s).triggerHandler("ready")}},bindReady:function(){if(!xa){xa=true;if(s.readyState==="complete")return c.ready();if(s.addEventListener){s.addEventListener("DOMContentLoaded",
27 L,false);A.addEventListener("load",c.ready,false)}else if(s.attachEvent){s.attachEvent("onreadystatechange",L);A.attachEvent("onload",c.ready);var a=false;try{a=A.frameElement==null}catch(b){}s.documentElement.doScroll&&a&&ma()}}},isFunction:function(a){return $.call(a)==="[object Function]"},isArray:function(a){return $.call(a)==="[object Array]"},isPlainObject:function(a){if(!a||$.call(a)!=="[object Object]"||a.nodeType||a.setInterval)return false;if(a.constructor&&!aa.call(a,"constructor")&&!aa.call(a.constructor.prototype,
28 "isPrototypeOf"))return false;var b;for(b in a);return b===w||aa.call(a,b)},isEmptyObject:function(a){for(var b in a)return false;return true},error:function(a){throw a;},parseJSON:function(a){if(typeof a!=="string"||!a)return null;a=c.trim(a);if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return A.JSON&&A.JSON.parse?A.JSON.parse(a):(new Function("return "+
29 a))();else c.error("Invalid JSON: "+a)},noop:function(){},globalEval:function(a){if(a&&Va.test(a)){var b=s.getElementsByTagName("head")[0]||s.documentElement,d=s.createElement("script");d.type="text/javascript";if(c.support.scriptEval)d.appendChild(s.createTextNode(a));else d.text=a;b.insertBefore(d,b.firstChild);b.removeChild(d)}},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,b,d){var f,e=0,j=a.length,i=j===w||c.isFunction(a);if(d)if(i)for(f in a){if(b.apply(a[f],
30 d)===false)break}else for(;e<j;){if(b.apply(a[e++],d)===false)break}else if(i)for(f in a){if(b.call(a[f],f,a[f])===false)break}else for(d=a[0];e<j&&b.call(d,e,d)!==false;d=a[++e]);return a},trim:function(a){return(a||"").replace(Wa,"")},makeArray:function(a,b){b=b||[];if(a!=null)a.length==null||typeof a==="string"||c.isFunction(a)||typeof a!=="function"&&a.setInterval?ba.call(b,a):c.merge(b,a);return b},inArray:function(a,b){if(b.indexOf)return b.indexOf(a);for(var d=0,f=b.length;d<f;d++)if(b[d]===
31 a)return d;return-1},merge:function(a,b){var d=a.length,f=0;if(typeof b.length==="number")for(var e=b.length;f<e;f++)a[d++]=b[f];else for(;b[f]!==w;)a[d++]=b[f++];a.length=d;return a},grep:function(a,b,d){for(var f=[],e=0,j=a.length;e<j;e++)!d!==!b(a[e],e)&&f.push(a[e]);return f},map:function(a,b,d){for(var f=[],e,j=0,i=a.length;j<i;j++){e=b(a[j],j,d);if(e!=null)f[f.length]=e}return f.concat.apply([],f)},guid:1,proxy:function(a,b,d){if(arguments.length===2)if(typeof b==="string"){d=a;a=d[b];b=w}else if(b&&
32 !c.isFunction(b)){d=b;b=w}if(!b&&a)b=function(){return a.apply(d||this,arguments)};if(a)b.guid=a.guid=a.guid||b.guid||c.guid++;return b},uaMatch:function(a){a=a.toLowerCase();a=/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version)?[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||!/compatible/.test(a)&&/(mozilla)(?:.*? rv:([\w.]+))?/.exec(a)||[];return{browser:a[1]||"",version:a[2]||"0"}},browser:{}});P=c.uaMatch(P);if(P.browser){c.browser[P.browser]=true;c.browser.version=P.version}if(c.browser.webkit)c.browser.safari=
33 true;if(ya)c.inArray=function(a,b){return ya.call(b,a)};T=c(s);if(s.addEventListener)L=function(){s.removeEventListener("DOMContentLoaded",L,false);c.ready()};else if(s.attachEvent)L=function(){if(s.readyState==="complete"){s.detachEvent("onreadystatechange",L);c.ready()}};(function(){c.support={};var a=s.documentElement,b=s.createElement("script"),d=s.createElement("div"),f="script"+J();d.style.display="none";d.innerHTML=" <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";
34 var e=d.getElementsByTagName("*"),j=d.getElementsByTagName("a")[0];if(!(!e||!e.length||!j)){c.support={leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(j.getAttribute("style")),hrefNormalized:j.getAttribute("href")==="/a",opacity:/^0.55$/.test(j.style.opacity),cssFloat:!!j.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:s.createElement("select").appendChild(s.createElement("option")).selected,
35 parentNode:d.removeChild(d.appendChild(s.createElement("div"))).parentNode===null,deleteExpando:true,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null};b.type="text/javascript";try{b.appendChild(s.createTextNode("window."+f+"=1;"))}catch(i){}a.insertBefore(b,a.firstChild);if(A[f]){c.support.scriptEval=true;delete A[f]}try{delete b.test}catch(o){c.support.deleteExpando=false}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function k(){c.support.noCloneEvent=
36 false;d.detachEvent("onclick",k)});d.cloneNode(true).fireEvent("onclick")}d=s.createElement("div");d.innerHTML="<input type='radio' name='radiotest' checked='checked'/>";a=s.createDocumentFragment();a.appendChild(d.firstChild);c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var k=s.createElement("div");k.style.width=k.style.paddingLeft="1px";s.body.appendChild(k);c.boxModel=c.support.boxModel=k.offsetWidth===2;s.body.removeChild(k).style.display="none"});a=function(k){var n=
37 s.createElement("div");k="on"+k;var r=k in n;if(!r){n.setAttribute(k,"return;");r=typeof n[k]==="function"}return r};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=e=j=null}})();c.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var G="jQuery"+J(),Ya=0,za={};c.extend({cache:{},expando:G,noData:{embed:true,object:true,
38 applet:true},data:function(a,b,d){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var f=a[G],e=c.cache;if(!f&&typeof b==="string"&&d===w)return null;f||(f=++Ya);if(typeof b==="object"){a[G]=f;e[f]=c.extend(true,{},b)}else if(!e[f]){a[G]=f;e[f]={}}a=e[f];if(d!==w)a[b]=d;return typeof b==="string"?a[b]:a}},removeData:function(a,b){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var d=a[G],f=c.cache,e=f[d];if(b){if(e){delete e[b];c.isEmptyObject(e)&&c.removeData(a)}}else{if(c.support.deleteExpando)delete a[c.expando];
39 else a.removeAttribute&&a.removeAttribute(c.expando);delete f[d]}}}});c.fn.extend({data:function(a,b){if(typeof a==="undefined"&&this.length)return c.data(this[0]);else if(typeof a==="object")return this.each(function(){c.data(this,a)});var d=a.split(".");d[1]=d[1]?"."+d[1]:"";if(b===w){var f=this.triggerHandler("getData"+d[1]+"!",[d[0]]);if(f===w&&this.length)f=c.data(this[0],a);return f===w&&d[1]?this.data(d[0]):f}else return this.trigger("setData"+d[1]+"!",[d[0],b]).each(function(){c.data(this,
40 a,b)})},removeData:function(a){return this.each(function(){c.removeData(this,a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var f=c.data(a,b);if(!d)return f||[];if(!f||c.isArray(d))f=c.data(a,b,c.makeArray(d));else f.push(d);return f}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),f=d.shift();if(f==="inprogress")f=d.shift();if(f){b==="fx"&&d.unshift("inprogress");f.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b===
41 w)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var Aa=/[\n\t]/g,ca=/\s+/,Za=/\r/g,$a=/href|src|style/,ab=/(button|input)/i,bb=/(button|input|object|select|textarea)/i,
42 cb=/^(a|area)$/i,Ba=/radio|checkbox/;c.fn.extend({attr:function(a,b){return X(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(n){var r=c(this);r.addClass(a.call(this,n,r.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(ca),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1)if(e.className){for(var j=" "+e.className+" ",
43 i=e.className,o=0,k=b.length;o<k;o++)if(j.indexOf(" "+b[o]+" ")<0)i+=" "+b[o];e.className=c.trim(i)}else e.className=a}return this},removeClass:function(a){if(c.isFunction(a))return this.each(function(k){var n=c(this);n.removeClass(a.call(this,k,n.attr("class")))});if(a&&typeof a==="string"||a===w)for(var b=(a||"").split(ca),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1&&e.className)if(a){for(var j=(" "+e.className+" ").replace(Aa," "),i=0,o=b.length;i<o;i++)j=j.replace(" "+b[i]+" ",
44 " ");e.className=c.trim(j)}else e.className=""}return this},toggleClass:function(a,b){var d=typeof a,f=typeof b==="boolean";if(c.isFunction(a))return this.each(function(e){var j=c(this);j.toggleClass(a.call(this,e,j.attr("class"),b),b)});return this.each(function(){if(d==="string")for(var e,j=0,i=c(this),o=b,k=a.split(ca);e=k[j++];){o=f?o:!i.hasClass(e);i[o?"addClass":"removeClass"](e)}else if(d==="undefined"||d==="boolean"){this.className&&c.data(this,"__className__",this.className);this.className=
45 this.className||a===false?"":c.data(this,"__className__")||""}})},hasClass:function(a){a=" "+a+" ";for(var b=0,d=this.length;b<d;b++)if((" "+this[b].className+" ").replace(Aa," ").indexOf(a)>-1)return true;return false},val:function(a){if(a===w){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value||{}).specified?b.value:b.text;if(c.nodeName(b,"select")){var d=b.selectedIndex,f=[],e=b.options;b=b.type==="select-one";if(d<0)return null;var j=b?d:0;for(d=b?d+1:e.length;j<d;j++){var i=
46 e[j];if(i.selected){a=c(i).val();if(b)return a;f.push(a)}}return f}if(Ba.test(b.type)&&!c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Za,"")}return w}var o=c.isFunction(a);return this.each(function(k){var n=c(this),r=a;if(this.nodeType===1){if(o)r=a.call(this,k,n.val());if(typeof r==="number")r+="";if(c.isArray(r)&&Ba.test(this.type))this.checked=c.inArray(n.val(),r)>=0;else if(c.nodeName(this,"select")){var u=c.makeArray(r);c("option",this).each(function(){this.selected=
47 c.inArray(c(this).val(),u)>=0});if(!u.length)this.selectedIndex=-1}else this.value=r}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return w;if(f&&b in c.attrFn)return c(a)[b](d);f=a.nodeType!==1||!c.isXMLDoc(a);var e=d!==w;b=f&&c.props[b]||b;if(a.nodeType===1){var j=$a.test(b);if(b in a&&f&&!j){if(e){b==="type"&&ab.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed");
48 a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&b.specified?b.value:bb.test(a.nodeName)||cb.test(a.nodeName)&&a.href?0:w;return a[b]}if(!c.support.style&&f&&b==="style"){if(e)a.style.cssText=""+d;return a.style.cssText}e&&a.setAttribute(b,""+d);a=!c.support.hrefNormalized&&f&&j?a.getAttribute(b,2):a.getAttribute(b);return a===null?w:a}return c.style(a,b,d)}});var O=/\.(.*)$/,db=function(a){return a.replace(/[^\w\s\.\|`]/g,
49 function(b){return"\\"+b})};c.event={add:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){if(a.setInterval&&a!==A&&!a.frameElement)a=A;var e,j;if(d.handler){e=d;d=e.handler}if(!d.guid)d.guid=c.guid++;if(j=c.data(a)){var i=j.events=j.events||{},o=j.handle;if(!o)j.handle=o=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(o.elem,arguments):w};o.elem=a;b=b.split(" ");for(var k,n=0,r;k=b[n++];){j=e?c.extend({},e):{handler:d,data:f};if(k.indexOf(".")>-1){r=k.split(".");
50 k=r.shift();j.namespace=r.slice(0).sort().join(".")}else{r=[];j.namespace=""}j.type=k;j.guid=d.guid;var u=i[k],z=c.event.special[k]||{};if(!u){u=i[k]=[];if(!z.setup||z.setup.call(a,f,r,o)===false)if(a.addEventListener)a.addEventListener(k,o,false);else a.attachEvent&&a.attachEvent("on"+k,o)}if(z.add){z.add.call(a,j);if(!j.handler.guid)j.handler.guid=d.guid}u.push(j);c.event.global[k]=true}a=null}}},global:{},remove:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){var e,j=0,i,o,k,n,r,u,z=c.data(a),
51 C=z&&z.events;if(z&&C){if(b&&b.type){d=b.handler;b=b.type}if(!b||typeof b==="string"&&b.charAt(0)==="."){b=b||"";for(e in C)c.event.remove(a,e+b)}else{for(b=b.split(" ");e=b[j++];){n=e;i=e.indexOf(".")<0;o=[];if(!i){o=e.split(".");e=o.shift();k=new RegExp("(^|\\.)"+c.map(o.slice(0).sort(),db).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(r=C[e])if(d){n=c.event.special[e]||{};for(B=f||0;B<r.length;B++){u=r[B];if(d.guid===u.guid){if(i||k.test(u.namespace)){f==null&&r.splice(B--,1);n.remove&&n.remove.call(a,u)}if(f!=
52 null)break}}if(r.length===0||f!=null&&r.length===1){if(!n.teardown||n.teardown.call(a,o)===false)Ca(a,e,z.handle);delete C[e]}}else for(var B=0;B<r.length;B++){u=r[B];if(i||k.test(u.namespace)){c.event.remove(a,n,u.handler,B);r.splice(B--,1)}}}if(c.isEmptyObject(C)){if(b=z.handle)b.elem=null;delete z.events;delete z.handle;c.isEmptyObject(z)&&c.removeData(a)}}}}},trigger:function(a,b,d,f){var e=a.type||a;if(!f){a=typeof a==="object"?a[G]?a:c.extend(c.Event(e),a):c.Event(e);if(e.indexOf("!")>=0){a.type=
53 e=e.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();c.event.global[e]&&c.each(c.cache,function(){this.events&&this.events[e]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===8)return w;a.result=w;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(f=c.data(d,"handle"))&&f.apply(d,b);f=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()]))if(d["on"+e]&&d["on"+e].apply(d,b)===false)a.result=false}catch(j){}if(!a.isPropagationStopped()&&
54 f)c.event.trigger(a,b,f,true);else if(!a.isDefaultPrevented()){f=a.target;var i,o=c.nodeName(f,"a")&&e==="click",k=c.event.special[e]||{};if((!k._default||k._default.call(d,a)===false)&&!o&&!(f&&f.nodeName&&c.noData[f.nodeName.toLowerCase()])){try{if(f[e]){if(i=f["on"+e])f["on"+e]=null;c.event.triggered=true;f[e]()}}catch(n){}if(i)f["on"+e]=i;c.event.triggered=false}}},handle:function(a){var b,d,f,e;a=arguments[0]=c.event.fix(a||A.event);a.currentTarget=this;b=a.type.indexOf(".")<0&&!a.exclusive;
55 if(!b){d=a.type.split(".");a.type=d.shift();f=new RegExp("(^|\\.)"+d.slice(0).sort().join("\\.(?:.*\\.)?")+"(\\.|$)")}e=c.data(this,"events");d=e[a.type];if(e&&d){d=d.slice(0);e=0;for(var j=d.length;e<j;e++){var i=d[e];if(b||f.test(i.namespace)){a.handler=i.handler;a.data=i.data;a.handleObj=i;i=i.handler.apply(this,arguments);if(i!==w){a.result=i;if(i===false){a.preventDefault();a.stopPropagation()}}if(a.isImmediatePropagationStopped())break}}}return a.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),
56 fix:function(a){if(a[G])return a;var b=a;a=c.Event(b);for(var d=this.props.length,f;d;){f=this.props[--d];a[f]=b[f]}if(!a.target)a.target=a.srcElement||s;if(a.target.nodeType===3)a.target=a.target.parentNode;if(!a.relatedTarget&&a.fromElement)a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement;if(a.pageX==null&&a.clientX!=null){b=s.documentElement;d=s.body;a.pageX=a.clientX+(b&&b.scrollLeft||d&&d.scrollLeft||0)-(b&&b.clientLeft||d&&d.clientLeft||0);a.pageY=a.clientY+(b&&b.scrollTop||
57 d&&d.scrollTop||0)-(b&&b.clientTop||d&&d.clientTop||0)}if(!a.which&&(a.charCode||a.charCode===0?a.charCode:a.keyCode))a.which=a.charCode||a.keyCode;if(!a.metaKey&&a.ctrlKey)a.metaKey=a.ctrlKey;if(!a.which&&a.button!==w)a.which=a.button&1?1:a.button&2?3:a.button&4?2:0;return a},guid:1E8,proxy:c.proxy,special:{ready:{setup:c.bindReady,teardown:c.noop},live:{add:function(a){c.event.add(this,a.origType,c.extend({},a,{handler:oa}))},remove:function(a){var b=true,d=a.origType.replace(O,"");c.each(c.data(this,
58 "events").live||[],function(){if(d===this.origType.replace(O,""))return b=false});b&&c.event.remove(this,a.origType,oa)}},beforeunload:{setup:function(a,b,d){if(this.setInterval)this.onbeforeunload=d;return false},teardown:function(a,b){if(this.onbeforeunload===b)this.onbeforeunload=null}}}};var Ca=s.removeEventListener?function(a,b,d){a.removeEventListener(b,d,false)}:function(a,b,d){a.detachEvent("on"+b,d)};c.Event=function(a){if(!this.preventDefault)return new c.Event(a);if(a&&a.type){this.originalEvent=
59 a;this.type=a.type}else this.type=a;this.timeStamp=J();this[G]=true};c.Event.prototype={preventDefault:function(){this.isDefaultPrevented=Z;var a=this.originalEvent;if(a){a.preventDefault&&a.preventDefault();a.returnValue=false}},stopPropagation:function(){this.isPropagationStopped=Z;var a=this.originalEvent;if(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=true}},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=Z;this.stopPropagation()},isDefaultPrevented:Y,isPropagationStopped:Y,
60 isImmediatePropagationStopped:Y};var Da=function(a){var b=a.relatedTarget;try{for(;b&&b!==this;)b=b.parentNode;if(b!==this){a.type=a.data;c.event.handle.apply(this,arguments)}}catch(d){}},Ea=function(a){a.type=a.data;c.event.handle.apply(this,arguments)};c.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){c.event.special[a]={setup:function(d){c.event.add(this,b,d&&d.selector?Ea:Da,a)},teardown:function(d){c.event.remove(this,b,d&&d.selector?Ea:Da)}}});if(!c.support.submitBubbles)c.event.special.submit=
61 {setup:function(){if(this.nodeName.toLowerCase()!=="form"){c.event.add(this,"click.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="submit"||d==="image")&&c(b).closest("form").length)return na("submit",this,arguments)});c.event.add(this,"keypress.specialSubmit",function(a){var b=a.target,d=b.type;if((d==="text"||d==="password")&&c(b).closest("form").length&&a.keyCode===13)return na("submit",this,arguments)})}else return false},teardown:function(){c.event.remove(this,".specialSubmit")}};
62 if(!c.support.changeBubbles){var da=/textarea|input|select/i,ea,Fa=function(a){var b=a.type,d=a.value;if(b==="radio"||b==="checkbox")d=a.checked;else if(b==="select-multiple")d=a.selectedIndex>-1?c.map(a.options,function(f){return f.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d},fa=function(a,b){var d=a.target,f,e;if(!(!da.test(d.nodeName)||d.readOnly)){f=c.data(d,"_change_data");e=Fa(d);if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data",
63 e);if(!(f===w||e===f))if(f!=null||e){a.type="change";return c.event.trigger(a,b,d)}}};c.event.special.change={filters:{focusout:fa,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return fa.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple")return fa.call(this,a)},beforeactivate:function(a){a=a.target;c.data(a,
64 "_change_data",Fa(a))}},setup:function(){if(this.type==="file")return false;for(var a in ea)c.event.add(this,a+".specialChange",ea[a]);return da.test(this.nodeName)},teardown:function(){c.event.remove(this,".specialChange");return da.test(this.nodeName)}};ea=c.event.special.change.filters}s.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(f){f=c.event.fix(f);f.type=b;return c.event.handle.call(this,f)}c.event.special[b]={setup:function(){this.addEventListener(a,
65 d,true)},teardown:function(){this.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,f,e){if(typeof d==="object"){for(var j in d)this[b](j,f,d[j],e);return this}if(c.isFunction(f)){e=f;f=w}var i=b==="one"?c.proxy(e,function(k){c(this).unbind(k,i);return e.apply(this,arguments)}):e;if(d==="unload"&&b!=="one")this.one(d,f,e);else{j=0;for(var o=this.length;j<o;j++)c.event.add(this[j],d,i,f)}return this}});c.fn.extend({unbind:function(a,b){if(typeof a==="object"&&
66 !a.preventDefault)for(var d in a)this.unbind(d,a[d]);else{d=0;for(var f=this.length;d<f;d++)c.event.remove(this[d],a,b)}return this},delegate:function(a,b,d,f){return this.live(b,d,f,a)},undelegate:function(a,b,d){return arguments.length===0?this.unbind("live"):this.die(b,null,d,a)},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){a=c.Event(a);a.preventDefault();a.stopPropagation();c.event.trigger(a,b,this[0]);return a.result}},
67 toggle:function(a){for(var b=arguments,d=1;d<b.length;)c.proxy(a,b[d++]);return this.click(c.proxy(a,function(f){var e=(c.data(this,"lastToggle"+a.guid)||0)%d;c.data(this,"lastToggle"+a.guid,e+1);f.preventDefault();return b[e].apply(this,arguments)||false}))},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var Ga={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};c.each(["live","die"],function(a,b){c.fn[b]=function(d,f,e,j){var i,o=0,k,n,r=j||this.selector,
68 u=j?this:c(this.context);if(c.isFunction(f)){e=f;f=w}for(d=(d||"").split(" ");(i=d[o++])!=null;){j=O.exec(i);k="";if(j){k=j[0];i=i.replace(O,"")}if(i==="hover")d.push("mouseenter"+k,"mouseleave"+k);else{n=i;if(i==="focus"||i==="blur"){d.push(Ga[i]+k);i+=k}else i=(Ga[i]||i)+k;b==="live"?u.each(function(){c.event.add(this,pa(i,r),{data:f,selector:r,handler:e,origType:i,origHandler:e,preType:n})}):u.unbind(pa(i,r),e)}}return this}});c.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "),
69 function(a,b){c.fn[b]=function(d){return d?this.bind(b,d):this.trigger(b)};if(c.attrFn)c.attrFn[b]=true});A.attachEvent&&!A.addEventListener&&A.attachEvent("onunload",function(){for(var a in c.cache)if(c.cache[a].handle)try{c.event.remove(c.cache[a].handle.elem)}catch(b){}});(function(){function a(g){for(var h="",l,m=0;g[m];m++){l=g[m];if(l.nodeType===3||l.nodeType===4)h+=l.nodeValue;else if(l.nodeType!==8)h+=a(l.childNodes)}return h}function b(g,h,l,m,q,p){q=0;for(var v=m.length;q<v;q++){var t=m[q];
70 if(t){t=t[g];for(var y=false;t;){if(t.sizcache===l){y=m[t.sizset];break}if(t.nodeType===1&&!p){t.sizcache=l;t.sizset=q}if(t.nodeName.toLowerCase()===h){y=t;break}t=t[g]}m[q]=y}}}function d(g,h,l,m,q,p){q=0;for(var v=m.length;q<v;q++){var t=m[q];if(t){t=t[g];for(var y=false;t;){if(t.sizcache===l){y=m[t.sizset];break}if(t.nodeType===1){if(!p){t.sizcache=l;t.sizset=q}if(typeof h!=="string"){if(t===h){y=true;break}}else if(k.filter(h,[t]).length>0){y=t;break}}t=t[g]}m[q]=y}}}var f=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
71 e=0,j=Object.prototype.toString,i=false,o=true;[0,0].sort(function(){o=false;return 0});var k=function(g,h,l,m){l=l||[];var q=h=h||s;if(h.nodeType!==1&&h.nodeType!==9)return[];if(!g||typeof g!=="string")return l;for(var p=[],v,t,y,S,H=true,M=x(h),I=g;(f.exec(""),v=f.exec(I))!==null;){I=v[3];p.push(v[1]);if(v[2]){S=v[3];break}}if(p.length>1&&r.exec(g))if(p.length===2&&n.relative[p[0]])t=ga(p[0]+p[1],h);else for(t=n.relative[p[0]]?[h]:k(p.shift(),h);p.length;){g=p.shift();if(n.relative[g])g+=p.shift();
72 t=ga(g,t)}else{if(!m&&p.length>1&&h.nodeType===9&&!M&&n.match.ID.test(p[0])&&!n.match.ID.test(p[p.length-1])){v=k.find(p.shift(),h,M);h=v.expr?k.filter(v.expr,v.set)[0]:v.set[0]}if(h){v=m?{expr:p.pop(),set:z(m)}:k.find(p.pop(),p.length===1&&(p[0]==="~"||p[0]==="+")&&h.parentNode?h.parentNode:h,M);t=v.expr?k.filter(v.expr,v.set):v.set;if(p.length>0)y=z(t);else H=false;for(;p.length;){var D=p.pop();v=D;if(n.relative[D])v=p.pop();else D="";if(v==null)v=h;n.relative[D](y,v,M)}}else y=[]}y||(y=t);y||k.error(D||
73 g);if(j.call(y)==="[object Array]")if(H)if(h&&h.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&E(h,y[g])))l.push(t[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&l.push(t[g]);else l.push.apply(l,y);else z(y,l);if(S){k(S,q,l,m);k.uniqueSort(l)}return l};k.uniqueSort=function(g){if(B){i=o;g.sort(B);if(i)for(var h=1;h<g.length;h++)g[h]===g[h-1]&&g.splice(h--,1)}return g};k.matches=function(g,h){return k(g,null,null,h)};k.find=function(g,h,l){var m,q;if(!g)return[];
74 for(var p=0,v=n.order.length;p<v;p++){var t=n.order[p];if(q=n.leftMatch[t].exec(g)){var y=q[1];q.splice(1,1);if(y.substr(y.length-1)!=="\\"){q[1]=(q[1]||"").replace(/\\/g,"");m=n.find[t](q,h,l);if(m!=null){g=g.replace(n.match[t],"");break}}}}m||(m=h.getElementsByTagName("*"));return{set:m,expr:g}};k.filter=function(g,h,l,m){for(var q=g,p=[],v=h,t,y,S=h&&h[0]&&x(h[0]);g&&h.length;){for(var H in n.filter)if((t=n.leftMatch[H].exec(g))!=null&&t[2]){var M=n.filter[H],I,D;D=t[1];y=false;t.splice(1,1);if(D.substr(D.length-
75 1)!=="\\"){if(v===p)p=[];if(n.preFilter[H])if(t=n.preFilter[H](t,v,l,p,m,S)){if(t===true)continue}else y=I=true;if(t)for(var U=0;(D=v[U])!=null;U++)if(D){I=M(D,t,U,v);var Ha=m^!!I;if(l&&I!=null)if(Ha)y=true;else v[U]=false;else if(Ha){p.push(D);y=true}}if(I!==w){l||(v=p);g=g.replace(n.match[H],"");if(!y)return[];break}}}if(g===q)if(y==null)k.error(g);else break;q=g}return v};k.error=function(g){throw"Syntax error, unrecognized expression: "+g;};var n=k.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF-]|\\.)+)/,
76 CLASS:/\.((?:[\w\u00c0-\uFFFF-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(g){return g.getAttribute("href")}},
77 relative:{"+":function(g,h){var l=typeof h==="string",m=l&&!/\W/.test(h);l=l&&!m;if(m)h=h.toLowerCase();m=0;for(var q=g.length,p;m<q;m++)if(p=g[m]){for(;(p=p.previousSibling)&&p.nodeType!==1;);g[m]=l||p&&p.nodeName.toLowerCase()===h?p||false:p===h}l&&k.filter(h,g,true)},">":function(g,h){var l=typeof h==="string";if(l&&!/\W/.test(h)){h=h.toLowerCase();for(var m=0,q=g.length;m<q;m++){var p=g[m];if(p){l=p.parentNode;g[m]=l.nodeName.toLowerCase()===h?l:false}}}else{m=0;for(q=g.length;m<q;m++)if(p=g[m])g[m]=
78 l?p.parentNode:p.parentNode===h;l&&k.filter(h,g,true)}},"":function(g,h,l){var m=e++,q=d;if(typeof h==="string"&&!/\W/.test(h)){var p=h=h.toLowerCase();q=b}q("parentNode",h,m,g,p,l)},"~":function(g,h,l){var m=e++,q=d;if(typeof h==="string"&&!/\W/.test(h)){var p=h=h.toLowerCase();q=b}q("previousSibling",h,m,g,p,l)}},find:{ID:function(g,h,l){if(typeof h.getElementById!=="undefined"&&!l)return(g=h.getElementById(g[1]))?[g]:[]},NAME:function(g,h){if(typeof h.getElementsByName!=="undefined"){var l=[];
79 h=h.getElementsByName(g[1]);for(var m=0,q=h.length;m<q;m++)h[m].getAttribute("name")===g[1]&&l.push(h[m]);return l.length===0?null:l}},TAG:function(g,h){return h.getElementsByTagName(g[1])}},preFilter:{CLASS:function(g,h,l,m,q,p){g=" "+g[1].replace(/\\/g,"")+" ";if(p)return g;p=0;for(var v;(v=h[p])!=null;p++)if(v)if(q^(v.className&&(" "+v.className+" ").replace(/[\t\n]/g," ").indexOf(g)>=0))l||m.push(v);else if(l)h[p]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()},
80 CHILD:function(g){if(g[1]==="nth"){var h=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=h[1]+(h[2]||1)-0;g[3]=h[3]-0}g[0]=e++;return g},ATTR:function(g,h,l,m,q,p){h=g[1].replace(/\\/g,"");if(!p&&n.attrMap[h])g[1]=n.attrMap[h];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,h,l,m,q){if(g[1]==="not")if((f.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=k(g[3],null,null,h);else{g=k.filter(g[3],h,l,true^q);l||m.push.apply(m,
81 g);return false}else if(n.match.POS.test(g[0])||n.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,h,l){return!!k(l[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)},
82 text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"===g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}},
83 setFilters:{first:function(g,h){return h===0},last:function(g,h,l,m){return h===m.length-1},even:function(g,h){return h%2===0},odd:function(g,h){return h%2===1},lt:function(g,h,l){return h<l[3]-0},gt:function(g,h,l){return h>l[3]-0},nth:function(g,h,l){return l[3]-0===h},eq:function(g,h,l){return l[3]-0===h}},filter:{PSEUDO:function(g,h,l,m){var q=h[1],p=n.filters[q];if(p)return p(g,l,h,m);else if(q==="contains")return(g.textContent||g.innerText||a([g])||"").indexOf(h[3])>=0;else if(q==="not"){h=
84 h[3];l=0;for(m=h.length;l<m;l++)if(h[l]===g)return false;return true}else k.error("Syntax error, unrecognized expression: "+q)},CHILD:function(g,h){var l=h[1],m=g;switch(l){case "only":case "first":for(;m=m.previousSibling;)if(m.nodeType===1)return false;if(l==="first")return true;m=g;case "last":for(;m=m.nextSibling;)if(m.nodeType===1)return false;return true;case "nth":l=h[2];var q=h[3];if(l===1&&q===0)return true;h=h[0];var p=g.parentNode;if(p&&(p.sizcache!==h||!g.nodeIndex)){var v=0;for(m=p.firstChild;m;m=
85 m.nextSibling)if(m.nodeType===1)m.nodeIndex=++v;p.sizcache=h}g=g.nodeIndex-q;return l===0?g===0:g%l===0&&g/l>=0}},ID:function(g,h){return g.nodeType===1&&g.getAttribute("id")===h},TAG:function(g,h){return h==="*"&&g.nodeType===1||g.nodeName.toLowerCase()===h},CLASS:function(g,h){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(h)>-1},ATTR:function(g,h){var l=h[1];g=n.attrHandle[l]?n.attrHandle[l](g):g[l]!=null?g[l]:g.getAttribute(l);l=g+"";var m=h[2];h=h[4];return g==null?m==="!=":m===
86 "="?l===h:m==="*="?l.indexOf(h)>=0:m==="~="?(" "+l+" ").indexOf(h)>=0:!h?l&&g!==false:m==="!="?l!==h:m==="^="?l.indexOf(h)===0:m==="$="?l.substr(l.length-h.length)===h:m==="|="?l===h||l.substr(0,h.length+1)===h+"-":false},POS:function(g,h,l,m){var q=n.setFilters[h[2]];if(q)return q(g,l,h,m)}}},r=n.match.POS;for(var u in n.match){n.match[u]=new RegExp(n.match[u].source+/(?![^\[]*\])(?![^\(]*\))/.source);n.leftMatch[u]=new RegExp(/(^(?:.|\r|\n)*?)/.source+n.match[u].source.replace(/\\(\d+)/g,function(g,
87 h){return"\\"+(h-0+1)}))}var z=function(g,h){g=Array.prototype.slice.call(g,0);if(h){h.push.apply(h,g);return h}return g};try{Array.prototype.slice.call(s.documentElement.childNodes,0)}catch(C){z=function(g,h){h=h||[];if(j.call(g)==="[object Array]")Array.prototype.push.apply(h,g);else if(typeof g.length==="number")for(var l=0,m=g.length;l<m;l++)h.push(g[l]);else for(l=0;g[l];l++)h.push(g[l]);return h}}var B;if(s.documentElement.compareDocumentPosition)B=function(g,h){if(!g.compareDocumentPosition||
88 !h.compareDocumentPosition){if(g==h)i=true;return g.compareDocumentPosition?-1:1}g=g.compareDocumentPosition(h)&4?-1:g===h?0:1;if(g===0)i=true;return g};else if("sourceIndex"in s.documentElement)B=function(g,h){if(!g.sourceIndex||!h.sourceIndex){if(g==h)i=true;return g.sourceIndex?-1:1}g=g.sourceIndex-h.sourceIndex;if(g===0)i=true;return g};else if(s.createRange)B=function(g,h){if(!g.ownerDocument||!h.ownerDocument){if(g==h)i=true;return g.ownerDocument?-1:1}var l=g.ownerDocument.createRange(),m=
89 h.ownerDocument.createRange();l.setStart(g,0);l.setEnd(g,0);m.setStart(h,0);m.setEnd(h,0);g=l.compareBoundaryPoints(Range.START_TO_END,m);if(g===0)i=true;return g};(function(){var g=s.createElement("div"),h="script"+(new Date).getTime();g.innerHTML="<a name='"+h+"'/>";var l=s.documentElement;l.insertBefore(g,l.firstChild);if(s.getElementById(h)){n.find.ID=function(m,q,p){if(typeof q.getElementById!=="undefined"&&!p)return(q=q.getElementById(m[1]))?q.id===m[1]||typeof q.getAttributeNode!=="undefined"&&
90 q.getAttributeNode("id").nodeValue===m[1]?[q]:w:[]};n.filter.ID=function(m,q){var p=typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id");return m.nodeType===1&&p&&p.nodeValue===q}}l.removeChild(g);l=g=null})();(function(){var g=s.createElement("div");g.appendChild(s.createComment(""));if(g.getElementsByTagName("*").length>0)n.find.TAG=function(h,l){l=l.getElementsByTagName(h[1]);if(h[1]==="*"){h=[];for(var m=0;l[m];m++)l[m].nodeType===1&&h.push(l[m]);l=h}return l};g.innerHTML="<a href='#'></a>";
91 if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")n.attrHandle.href=function(h){return h.getAttribute("href",2)};g=null})();s.querySelectorAll&&function(){var g=k,h=s.createElement("div");h.innerHTML="<p class='TEST'></p>";if(!(h.querySelectorAll&&h.querySelectorAll(".TEST").length===0)){k=function(m,q,p,v){q=q||s;if(!v&&q.nodeType===9&&!x(q))try{return z(q.querySelectorAll(m),p)}catch(t){}return g(m,q,p,v)};for(var l in g)k[l]=g[l];h=null}}();
92 (function(){var g=s.createElement("div");g.innerHTML="<div class='test e'></div><div class='test'></div>";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length===0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){n.order.splice(1,0,"CLASS");n.find.CLASS=function(h,l,m){if(typeof l.getElementsByClassName!=="undefined"&&!m)return l.getElementsByClassName(h[1])};g=null}}})();var E=s.compareDocumentPosition?function(g,h){return!!(g.compareDocumentPosition(h)&16)}:
93 function(g,h){return g!==h&&(g.contains?g.contains(h):true)},x=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false},ga=function(g,h){var l=[],m="",q;for(h=h.nodeType?[h]:h;q=n.match.PSEUDO.exec(g);){m+=q[0];g=g.replace(n.match.PSEUDO,"")}g=n.relative[g]?g+"*":g;q=0;for(var p=h.length;q<p;q++)k(g,h[q],l);return k.filter(m,l)};c.find=k;c.expr=k.selectors;c.expr[":"]=c.expr.filters;c.unique=k.uniqueSort;c.text=a;c.isXMLDoc=x;c.contains=E})();var eb=/Until$/,fb=/^(?:parents|prevUntil|prevAll)/,
94 gb=/,/;R=Array.prototype.slice;var Ia=function(a,b,d){if(c.isFunction(b))return c.grep(a,function(e,j){return!!b.call(e,j,e)===d});else if(b.nodeType)return c.grep(a,function(e){return e===b===d});else if(typeof b==="string"){var f=c.grep(a,function(e){return e.nodeType===1});if(Ua.test(b))return c.filter(b,f,!d);else b=c.filter(b,f)}return c.grep(a,function(e){return c.inArray(e,b)>=0===d})};c.fn.extend({find:function(a){for(var b=this.pushStack("","find",a),d=0,f=0,e=this.length;f<e;f++){d=b.length;
95 c.find(a,this[f],b);if(f>0)for(var j=d;j<b.length;j++)for(var i=0;i<d;i++)if(b[i]===b[j]){b.splice(j--,1);break}}return b},has:function(a){var b=c(a);return this.filter(function(){for(var d=0,f=b.length;d<f;d++)if(c.contains(this,b[d]))return true})},not:function(a){return this.pushStack(Ia(this,a,false),"not",a)},filter:function(a){return this.pushStack(Ia(this,a,true),"filter",a)},is:function(a){return!!a&&c.filter(a,this).length>0},closest:function(a,b){if(c.isArray(a)){var d=[],f=this[0],e,j=
96 {},i;if(f&&a.length){e=0;for(var o=a.length;e<o;e++){i=a[e];j[i]||(j[i]=c.expr.match.POS.test(i)?c(i,b||this.context):i)}for(;f&&f.ownerDocument&&f!==b;){for(i in j){e=j[i];if(e.jquery?e.index(f)>-1:c(f).is(e)){d.push({selector:i,elem:f});delete j[i]}}f=f.parentNode}}return d}var k=c.expr.match.POS.test(a)?c(a,b||this.context):null;return this.map(function(n,r){for(;r&&r.ownerDocument&&r!==b;){if(k?k.index(r)>-1:c(r).is(a))return r;r=r.parentNode}return null})},index:function(a){if(!a||typeof a===
97 "string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){a=typeof a==="string"?c(a,b||this.context):c.makeArray(a);b=c.merge(this.get(),a);return this.pushStack(qa(a[0])||qa(b[0])?b:c.unique(b))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode",
98 d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")?
99 a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,b){c.fn[a]=function(d,f){var e=c.map(this,b,d);eb.test(a)||(f=d);if(f&&typeof f==="string")e=c.filter(f,e);e=this.length>1?c.unique(e):e;if((this.length>1||gb.test(f))&&fb.test(a))e=e.reverse();return this.pushStack(e,a,R.call(arguments).join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return c.find.matches(a,b)},dir:function(a,b,d){var f=[];for(a=a[b];a&&a.nodeType!==9&&(d===w||a.nodeType!==1||!c(a).is(d));){a.nodeType===
100 1&&f.push(a);a=a[b]}return f},nth:function(a,b,d){b=b||1;for(var f=0;a;a=a[d])if(a.nodeType===1&&++f===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!==b&&d.push(a);return d}});var Ja=/ jQuery\d+="(?:\d+|null)"/g,V=/^\s+/,Ka=/(<([\w:]+)[^>]*?)\/>/g,hb=/^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,La=/<([\w:]+)/,ib=/<tbody/i,jb=/<|&#?\w+;/,ta=/<script|<object|<embed|<option|<style/i,ua=/checked\s*(?:[^=]|=\s*.checked.)/i,Ma=function(a,b,d){return hb.test(d)?
101 a:b+"></"+d+">"},F={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};F.optgroup=F.option;F.tbody=F.tfoot=F.colgroup=F.caption=F.thead;F.th=F.td;if(!c.support.htmlSerialize)F._default=[1,"div<div>","</div>"];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d=
102 c(this);d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==w)return this.empty().append((this[0]&&this[0].ownerDocument||s).createTextNode(a));return c.text(this)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this},
103 wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})},
104 prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,
105 this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},remove:function(a,b){for(var d=0,f;(f=this[d])!=null;d++)if(!a||c.filter(a,[f]).length){if(!b&&f.nodeType===1){c.cleanData(f.getElementsByTagName("*"));c.cleanData([f])}f.parentNode&&f.parentNode.removeChild(f)}return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++)for(b.nodeType===1&&c.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild);
106 return this},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var d=this.outerHTML,f=this.ownerDocument;if(!d){d=f.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(Ja,"").replace(/=([^="'>\s]+\/)>/g,'="$1">').replace(V,"")],f)[0]}else return this.cloneNode(true)});if(a===true){ra(this,b);ra(this.find("*"),b.find("*"))}return b},html:function(a){if(a===w)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Ja,
107 ""):null;else if(typeof a==="string"&&!ta.test(a)&&(c.support.leadingWhitespace||!V.test(a))&&!F[(La.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Ka,Ma);try{for(var b=0,d=this.length;b<d;b++)if(this[b].nodeType===1){c.cleanData(this[b].getElementsByTagName("*"));this[b].innerHTML=a}}catch(f){this.empty().append(a)}}else c.isFunction(a)?this.each(function(e){var j=c(this),i=j.html();j.empty().append(function(){return a.call(this,e,i)})}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&
108 this[0].parentNode){if(c.isFunction(a))return this.each(function(b){var d=c(this),f=d.html();d.replaceWith(a.call(this,b,f))});if(typeof a!=="string")a=c(a).detach();return this.each(function(){var b=this.nextSibling,d=this.parentNode;c(this).remove();b?c(b).before(a):c(d).append(a)})}else return this.pushStack(c(c.isFunction(a)?a():a),"replaceWith",a)},detach:function(a){return this.remove(a,true)},domManip:function(a,b,d){function f(u){return c.nodeName(u,"table")?u.getElementsByTagName("tbody")[0]||
109 u.appendChild(u.ownerDocument.createElement("tbody")):u}var e,j,i=a[0],o=[],k;if(!c.support.checkClone&&arguments.length===3&&typeof i==="string"&&ua.test(i))return this.each(function(){c(this).domManip(a,b,d,true)});if(c.isFunction(i))return this.each(function(u){var z=c(this);a[0]=i.call(this,u,b?z.html():w);z.domManip(a,b,d)});if(this[0]){e=i&&i.parentNode;e=c.support.parentNode&&e&&e.nodeType===11&&e.childNodes.length===this.length?{fragment:e}:sa(a,this,o);k=e.fragment;if(j=k.childNodes.length===
110 1?(k=k.firstChild):k.firstChild){b=b&&c.nodeName(j,"tr");for(var n=0,r=this.length;n<r;n++)d.call(b?f(this[n],j):this[n],n>0||e.cacheable||this.length>1?k.cloneNode(true):k)}o.length&&c.each(o,Qa)}return this}});c.fragments={};c.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){c.fn[a]=function(d){var f=[];d=c(d);var e=this.length===1&&this[0].parentNode;if(e&&e.nodeType===11&&e.childNodes.length===1&&d.length===1){d[b](this[0]);
111 return this}else{e=0;for(var j=d.length;e<j;e++){var i=(e>0?this.clone(true):this).get();c.fn[b].apply(c(d[e]),i);f=f.concat(i)}return this.pushStack(f,a,d.selector)}}});c.extend({clean:function(a,b,d,f){b=b||s;if(typeof b.createElement==="undefined")b=b.ownerDocument||b[0]&&b[0].ownerDocument||s;for(var e=[],j=0,i;(i=a[j])!=null;j++){if(typeof i==="number")i+="";if(i){if(typeof i==="string"&&!jb.test(i))i=b.createTextNode(i);else if(typeof i==="string"){i=i.replace(Ka,Ma);var o=(La.exec(i)||["",
112 ""])[1].toLowerCase(),k=F[o]||F._default,n=k[0],r=b.createElement("div");for(r.innerHTML=k[1]+i+k[2];n--;)r=r.lastChild;if(!c.support.tbody){n=ib.test(i);o=o==="table"&&!n?r.firstChild&&r.firstChild.childNodes:k[1]==="<table>"&&!n?r.childNodes:[];for(k=o.length-1;k>=0;--k)c.nodeName(o[k],"tbody")&&!o[k].childNodes.length&&o[k].parentNode.removeChild(o[k])}!c.support.leadingWhitespace&&V.test(i)&&r.insertBefore(b.createTextNode(V.exec(i)[0]),r.firstChild);i=r.childNodes}if(i.nodeType)e.push(i);else e=
113 c.merge(e,i)}}if(d)for(j=0;e[j];j++)if(f&&c.nodeName(e[j],"script")&&(!e[j].type||e[j].type.toLowerCase()==="text/javascript"))f.push(e[j].parentNode?e[j].parentNode.removeChild(e[j]):e[j]);else{e[j].nodeType===1&&e.splice.apply(e,[j+1,0].concat(c.makeArray(e[j].getElementsByTagName("script"))));d.appendChild(e[j])}return e},cleanData:function(a){for(var b,d,f=c.cache,e=c.event.special,j=c.support.deleteExpando,i=0,o;(o=a[i])!=null;i++)if(d=o[c.expando]){b=f[d];if(b.events)for(var k in b.events)e[k]?
114 c.event.remove(o,k):Ca(o,k,b.handle);if(j)delete o[c.expando];else o.removeAttribute&&o.removeAttribute(c.expando);delete f[d]}}});var kb=/z-?index|font-?weight|opacity|zoom|line-?height/i,Na=/alpha\([^)]*\)/,Oa=/opacity=([^)]*)/,ha=/float/i,ia=/-([a-z])/ig,lb=/([A-Z])/g,mb=/^-?\d+(?:px)?$/i,nb=/^-?\d/,ob={position:"absolute",visibility:"hidden",display:"block"},pb=["Left","Right"],qb=["Top","Bottom"],rb=s.defaultView&&s.defaultView.getComputedStyle,Pa=c.support.cssFloat?"cssFloat":"styleFloat",ja=
115 function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){return X(this,a,b,true,function(d,f,e){if(e===w)return c.curCSS(d,f);if(typeof e==="number"&&!kb.test(f))e+="px";c.style(d,f,e)})};c.extend({style:function(a,b,d){if(!a||a.nodeType===3||a.nodeType===8)return w;if((b==="width"||b==="height")&&parseFloat(d)<0)d=w;var f=a.style||a,e=d!==w;if(!c.support.opacity&&b==="opacity"){if(e){f.zoom=1;b=parseInt(d,10)+""==="NaN"?"":"alpha(opacity="+d*100+")";a=f.filter||c.curCSS(a,"filter")||"";f.filter=
116 Na.test(a)?a.replace(Na,b):b}return f.filter&&f.filter.indexOf("opacity=")>=0?parseFloat(Oa.exec(f.filter)[1])/100+"":""}if(ha.test(b))b=Pa;b=b.replace(ia,ja);if(e)f[b]=d;return f[b]},css:function(a,b,d,f){if(b==="width"||b==="height"){var e,j=b==="width"?pb:qb;function i(){e=b==="width"?a.offsetWidth:a.offsetHeight;f!=="border"&&c.each(j,function(){f||(e-=parseFloat(c.curCSS(a,"padding"+this,true))||0);if(f==="margin")e+=parseFloat(c.curCSS(a,"margin"+this,true))||0;else e-=parseFloat(c.curCSS(a,
117 "border"+this+"Width",true))||0})}a.offsetWidth!==0?i():c.swap(a,ob,i);return Math.max(0,Math.round(e))}return c.curCSS(a,b,d)},curCSS:function(a,b,d){var f,e=a.style;if(!c.support.opacity&&b==="opacity"&&a.currentStyle){f=Oa.test(a.currentStyle.filter||"")?parseFloat(RegExp.$1)/100+"":"";return f===""?"1":f}if(ha.test(b))b=Pa;if(!d&&e&&e[b])f=e[b];else if(rb){if(ha.test(b))b="float";b=b.replace(lb,"-$1").toLowerCase();e=a.ownerDocument.defaultView;if(!e)return null;if(a=e.getComputedStyle(a,null))f=
118 a.getPropertyValue(b);if(b==="opacity"&&f==="")f="1"}else if(a.currentStyle){d=b.replace(ia,ja);f=a.currentStyle[b]||a.currentStyle[d];if(!mb.test(f)&&nb.test(f)){b=e.left;var j=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;e.left=d==="fontSize"?"1em":f||0;f=e.pixelLeft+"px";e.left=b;a.runtimeStyle.left=j}}return f},swap:function(a,b,d){var f={};for(var e in b){f[e]=a.style[e];a.style[e]=b[e]}d.call(a);for(e in b)a.style[e]=f[e]}});if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b=
119 a.offsetWidth,d=a.offsetHeight,f=a.nodeName.toLowerCase()==="tr";return b===0&&d===0&&!f?true:b>0&&d>0&&!f?false:c.curCSS(a,"display")==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var sb=J(),tb=/<script(.|\s)*?\/script>/gi,ub=/select|textarea/i,vb=/color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,N=/=\?(&|$)/,ka=/\?/,wb=/(\?|&)_=.*?(&|$)/,xb=/^(\w+:)?\/\/([^\/?#]+)/,yb=/%20/g,zb=c.fn.load;c.fn.extend({load:function(a,b,d){if(typeof a!==
120 "string")return zb.call(this,a);else if(!this.length)return this;var f=a.indexOf(" ");if(f>=0){var e=a.slice(f,a.length);a=a.slice(0,f)}f="GET";if(b)if(c.isFunction(b)){d=b;b=null}else if(typeof b==="object"){b=c.param(b,c.ajaxSettings.traditional);f="POST"}var j=this;c.ajax({url:a,type:f,dataType:"html",data:b,complete:function(i,o){if(o==="success"||o==="notmodified")j.html(e?c("<div />").append(i.responseText.replace(tb,"")).find(e):i.responseText);d&&j.each(d,[i.responseText,o,i])}});return this},
121 serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||ub.test(this.nodeName)||vb.test(this.type))}).map(function(a,b){a=c(this).val();return a==null?null:c.isArray(a)?c.map(a,function(d){return{name:b.name,value:d}}):{name:b.name,value:a}}).get()}});c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),
122 function(a,b){c.fn[b]=function(d){return this.bind(b,d)}});c.extend({get:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b=null}return c.ajax({type:"GET",url:a,data:b,success:d,dataType:f})},getScript:function(a,b){return c.get(a,null,b,"script")},getJSON:function(a,b,d){return c.get(a,b,d,"json")},post:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b={}}return c.ajax({type:"POST",url:a,data:b,success:d,dataType:f})},ajaxSetup:function(a){c.extend(c.ajaxSettings,a)},ajaxSettings:{url:location.href,
123 global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:A.XMLHttpRequest&&(A.location.protocol!=="file:"||!A.ActiveXObject)?function(){return new A.XMLHttpRequest}:function(){try{return new A.ActiveXObject("Microsoft.XMLHTTP")}catch(a){}},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},etag:{},ajax:function(a){function b(){e.success&&
124 e.success.call(k,o,i,x);e.global&&f("ajaxSuccess",[x,e])}function d(){e.complete&&e.complete.call(k,x,i);e.global&&f("ajaxComplete",[x,e]);e.global&&!--c.active&&c.event.trigger("ajaxStop")}function f(q,p){(e.context?c(e.context):c.event).trigger(q,p)}var e=c.extend(true,{},c.ajaxSettings,a),j,i,o,k=a&&a.context||e,n=e.type.toUpperCase();if(e.data&&e.processData&&typeof e.data!=="string")e.data=c.param(e.data,e.traditional);if(e.dataType==="jsonp"){if(n==="GET")N.test(e.url)||(e.url+=(ka.test(e.url)?
125 "&":"?")+(e.jsonp||"callback")+"=?");else if(!e.data||!N.test(e.data))e.data=(e.data?e.data+"&":"")+(e.jsonp||"callback")+"=?";e.dataType="json"}if(e.dataType==="json"&&(e.data&&N.test(e.data)||N.test(e.url))){j=e.jsonpCallback||"jsonp"+sb++;if(e.data)e.data=(e.data+"").replace(N,"="+j+"$1");e.url=e.url.replace(N,"="+j+"$1");e.dataType="script";A[j]=A[j]||function(q){o=q;b();d();A[j]=w;try{delete A[j]}catch(p){}z&&z.removeChild(C)}}if(e.dataType==="script"&&e.cache===null)e.cache=false;if(e.cache===
126 false&&n==="GET"){var r=J(),u=e.url.replace(wb,"$1_="+r+"$2");e.url=u+(u===e.url?(ka.test(e.url)?"&":"?")+"_="+r:"")}if(e.data&&n==="GET")e.url+=(ka.test(e.url)?"&":"?")+e.data;e.global&&!c.active++&&c.event.trigger("ajaxStart");r=(r=xb.exec(e.url))&&(r[1]&&r[1]!==location.protocol||r[2]!==location.host);if(e.dataType==="script"&&n==="GET"&&r){var z=s.getElementsByTagName("head")[0]||s.documentElement,C=s.createElement("script");C.src=e.url;if(e.scriptCharset)C.charset=e.scriptCharset;if(!j){var B=
127 false;C.onload=C.onreadystatechange=function(){if(!B&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){B=true;b();d();C.onload=C.onreadystatechange=null;z&&C.parentNode&&z.removeChild(C)}}}z.insertBefore(C,z.firstChild);return w}var E=false,x=e.xhr();if(x){e.username?x.open(n,e.url,e.async,e.username,e.password):x.open(n,e.url,e.async);try{if(e.data||a&&a.contentType)x.setRequestHeader("Content-Type",e.contentType);if(e.ifModified){c.lastModified[e.url]&&x.setRequestHeader("If-Modified-Since",
128 c.lastModified[e.url]);c.etag[e.url]&&x.setRequestHeader("If-None-Match",c.etag[e.url])}r||x.setRequestHeader("X-Requested-With","XMLHttpRequest");x.setRequestHeader("Accept",e.dataType&&e.accepts[e.dataType]?e.accepts[e.dataType]+", */*":e.accepts._default)}catch(ga){}if(e.beforeSend&&e.beforeSend.call(k,x,e)===false){e.global&&!--c.active&&c.event.trigger("ajaxStop");x.abort();return false}e.global&&f("ajaxSend",[x,e]);var g=x.onreadystatechange=function(q){if(!x||x.readyState===0||q==="abort"){E||
129 d();E=true;if(x)x.onreadystatechange=c.noop}else if(!E&&x&&(x.readyState===4||q==="timeout")){E=true;x.onreadystatechange=c.noop;i=q==="timeout"?"timeout":!c.httpSuccess(x)?"error":e.ifModified&&c.httpNotModified(x,e.url)?"notmodified":"success";var p;if(i==="success")try{o=c.httpData(x,e.dataType,e)}catch(v){i="parsererror";p=v}if(i==="success"||i==="notmodified")j||b();else c.handleError(e,x,i,p);d();q==="timeout"&&x.abort();if(e.async)x=null}};try{var h=x.abort;x.abort=function(){x&&h.call(x);
130 g("abort")}}catch(l){}e.async&&e.timeout>0&&setTimeout(function(){x&&!E&&g("timeout")},e.timeout);try{x.send(n==="POST"||n==="PUT"||n==="DELETE"?e.data:null)}catch(m){c.handleError(e,x,null,m);d()}e.async||g();return x}},handleError:function(a,b,d,f){if(a.error)a.error.call(a.context||a,b,d,f);if(a.global)(a.context?c(a.context):c.event).trigger("ajaxError",[b,a,f])},active:0,httpSuccess:function(a){try{return!a.status&&location.protocol==="file:"||a.status>=200&&a.status<300||a.status===304||a.status===
131 1223||a.status===0}catch(b){}return false},httpNotModified:function(a,b){var d=a.getResponseHeader("Last-Modified"),f=a.getResponseHeader("Etag");if(d)c.lastModified[b]=d;if(f)c.etag[b]=f;return a.status===304||a.status===0},httpData:function(a,b,d){var f=a.getResponseHeader("content-type")||"",e=b==="xml"||!b&&f.indexOf("xml")>=0;a=e?a.responseXML:a.responseText;e&&a.documentElement.nodeName==="parsererror"&&c.error("parsererror");if(d&&d.dataFilter)a=d.dataFilter(a,b);if(typeof a==="string")if(b===
132 "json"||!b&&f.indexOf("json")>=0)a=c.parseJSON(a);else if(b==="script"||!b&&f.indexOf("javascript")>=0)c.globalEval(a);return a},param:function(a,b){function d(i,o){if(c.isArray(o))c.each(o,function(k,n){b||/\[\]$/.test(i)?f(i,n):d(i+"["+(typeof n==="object"||c.isArray(n)?k:"")+"]",n)});else!b&&o!=null&&typeof o==="object"?c.each(o,function(k,n){d(i+"["+k+"]",n)}):f(i,o)}function f(i,o){o=c.isFunction(o)?o():o;e[e.length]=encodeURIComponent(i)+"="+encodeURIComponent(o)}var e=[];if(b===w)b=c.ajaxSettings.traditional;
133 if(c.isArray(a)||a.jquery)c.each(a,function(){f(this.name,this.value)});else for(var j in a)d(j,a[j]);return e.join("&").replace(yb,"+")}});var la={},Ab=/toggle|show|hide/,Bb=/^([+-]=)?([\d+-.]+)(.*)$/,W,va=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];c.fn.extend({show:function(a,b){if(a||a===0)return this.animate(K("show",3),a,b);else{a=0;for(b=this.length;a<b;a++){var d=c.data(this[a],"olddisplay");
134 this[a].style.display=d||"";if(c.css(this[a],"display")==="none"){d=this[a].nodeName;var f;if(la[d])f=la[d];else{var e=c("<"+d+" />").appendTo("body");f=e.css("display");if(f==="none")f="block";e.remove();la[d]=f}c.data(this[a],"olddisplay",f)}}a=0;for(b=this.length;a<b;a++)this[a].style.display=c.data(this[a],"olddisplay")||"";return this}},hide:function(a,b){if(a||a===0)return this.animate(K("hide",3),a,b);else{a=0;for(b=this.length;a<b;a++){var d=c.data(this[a],"olddisplay");!d&&d!=="none"&&c.data(this[a],
135 "olddisplay",c.css(this[a],"display"))}a=0;for(b=this.length;a<b;a++)this[a].style.display="none";return this}},_toggle:c.fn.toggle,toggle:function(a,b){var d=typeof a==="boolean";if(c.isFunction(a)&&c.isFunction(b))this._toggle.apply(this,arguments);else a==null||d?this.each(function(){var f=d?a:c(this).is(":hidden");c(this)[f?"show":"hide"]()}):this.animate(K("toggle",3),a,b);return this},fadeTo:function(a,b,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,d)},
136 animate:function(a,b,d,f){var e=c.speed(b,d,f);if(c.isEmptyObject(a))return this.each(e.complete);return this[e.queue===false?"each":"queue"](function(){var j=c.extend({},e),i,o=this.nodeType===1&&c(this).is(":hidden"),k=this;for(i in a){var n=i.replace(ia,ja);if(i!==n){a[n]=a[i];delete a[i];i=n}if(a[i]==="hide"&&o||a[i]==="show"&&!o)return j.complete.call(this);if((i==="height"||i==="width")&&this.style){j.display=c.css(this,"display");j.overflow=this.style.overflow}if(c.isArray(a[i])){(j.specialEasing=
137 j.specialEasing||{})[i]=a[i][1];a[i]=a[i][0]}}if(j.overflow!=null)this.style.overflow="hidden";j.curAnim=c.extend({},a);c.each(a,function(r,u){var z=new c.fx(k,j,r);if(Ab.test(u))z[u==="toggle"?o?"show":"hide":u](a);else{var C=Bb.exec(u),B=z.cur(true)||0;if(C){u=parseFloat(C[2]);var E=C[3]||"px";if(E!=="px"){k.style[r]=(u||1)+E;B=(u||1)/z.cur(true)*B;k.style[r]=B+E}if(C[1])u=(C[1]==="-="?-1:1)*u+B;z.custom(B,u,E)}else z.custom(B,u,"")}});return true})},stop:function(a,b){var d=c.timers;a&&this.queue([]);
138 this.each(function(){for(var f=d.length-1;f>=0;f--)if(d[f].elem===this){b&&d[f](true);d.splice(f,1)}});b||this.dequeue();return this}});c.each({slideDown:K("show",1),slideUp:K("hide",1),slideToggle:K("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(a,b){c.fn[a]=function(d,f){return this.animate(b,d,f)}});c.extend({speed:function(a,b,d){var f=a&&typeof a==="object"?a:{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};f.duration=c.fx.off?0:typeof f.duration===
139 "number"?f.duration:c.fx.speeds[f.duration]||c.fx.speeds._default;f.old=f.complete;f.complete=function(){f.queue!==false&&c(this).dequeue();c.isFunction(f.old)&&f.old.call(this)};return f},easing:{linear:function(a,b,d,f){return d+f*a},swing:function(a,b,d,f){return(-Math.cos(a*Math.PI)/2+0.5)*f+d}},timers:[],fx:function(a,b,d){this.options=b;this.elem=a;this.prop=d;if(!b.orig)b.orig={}}});c.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(c.fx.step[this.prop]||
140 c.fx.step._default)(this);if((this.prop==="height"||this.prop==="width")&&this.elem.style)this.elem.style.display="block"},cur:function(a){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];return(a=parseFloat(c.css(this.elem,this.prop,a)))&&a>-10000?a:parseFloat(c.curCSS(this.elem,this.prop))||0},custom:function(a,b,d){function f(j){return e.step(j)}this.startTime=J();this.start=a;this.end=b;this.unit=d||this.unit||"px";this.now=this.start;
141 this.pos=this.state=0;var e=this;f.elem=this.elem;if(f()&&c.timers.push(f)&&!W)W=setInterval(c.fx.tick,13)},show:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());c(this.elem).show()},hide:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(a){var b=J(),d=true;if(a||b>=this.options.duration+this.startTime){this.now=
142 this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var f in this.options.curAnim)if(this.options.curAnim[f]!==true)d=false;if(d){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;a=c.data(this.elem,"olddisplay");this.elem.style.display=a?a:this.options.display;if(c.css(this.elem,"display")==="none")this.elem.style.display="block"}this.options.hide&&c(this.elem).hide();if(this.options.hide||this.options.show)for(var e in this.options.curAnim)c.style(this.elem,
143 e,this.options.orig[e]);this.options.complete.call(this.elem)}return false}else{e=b-this.startTime;this.state=e/this.options.duration;a=this.options.easing||(c.easing.swing?"swing":"linear");this.pos=c.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||a](this.state,e,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};c.extend(c.fx,{tick:function(){for(var a=c.timers,b=0;b<a.length;b++)a[b]()||a.splice(b--,1);a.length||
144 c.fx.stop()},stop:function(){clearInterval(W);W=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){c.style(a.elem,"opacity",a.now)},_default:function(a){if(a.elem.style&&a.elem.style[a.prop]!=null)a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit;else a.elem[a.prop]=a.now}}});if(c.expr&&c.expr.filters)c.expr.filters.animated=function(a){return c.grep(c.timers,function(b){return a===b.elem}).length};c.fn.offset="getBoundingClientRect"in s.documentElement?
145 function(a){var b=this[0];if(a)return this.each(function(e){c.offset.setOffset(this,a,e)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);var d=b.getBoundingClientRect(),f=b.ownerDocument;b=f.body;f=f.documentElement;return{top:d.top+(self.pageYOffset||c.support.boxModel&&f.scrollTop||b.scrollTop)-(f.clientTop||b.clientTop||0),left:d.left+(self.pageXOffset||c.support.boxModel&&f.scrollLeft||b.scrollLeft)-(f.clientLeft||b.clientLeft||0)}}:function(a){var b=
146 this[0];if(a)return this.each(function(r){c.offset.setOffset(this,a,r)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);c.offset.initialize();var d=b.offsetParent,f=b,e=b.ownerDocument,j,i=e.documentElement,o=e.body;f=(e=e.defaultView)?e.getComputedStyle(b,null):b.currentStyle;for(var k=b.offsetTop,n=b.offsetLeft;(b=b.parentNode)&&b!==o&&b!==i;){if(c.offset.supportsFixedPosition&&f.position==="fixed")break;j=e?e.getComputedStyle(b,null):b.currentStyle;
147 k-=b.scrollTop;n-=b.scrollLeft;if(b===d){k+=b.offsetTop;n+=b.offsetLeft;if(c.offset.doesNotAddBorder&&!(c.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(b.nodeName))){k+=parseFloat(j.borderTopWidth)||0;n+=parseFloat(j.borderLeftWidth)||0}f=d;d=b.offsetParent}if(c.offset.subtractsBorderForOverflowNotVisible&&j.overflow!=="visible"){k+=parseFloat(j.borderTopWidth)||0;n+=parseFloat(j.borderLeftWidth)||0}f=j}if(f.position==="relative"||f.position==="static"){k+=o.offsetTop;n+=o.offsetLeft}if(c.offset.supportsFixedPosition&&
148 f.position==="fixed"){k+=Math.max(i.scrollTop,o.scrollTop);n+=Math.max(i.scrollLeft,o.scrollLeft)}return{top:k,left:n}};c.offset={initialize:function(){var a=s.body,b=s.createElement("div"),d,f,e,j=parseFloat(c.curCSS(a,"marginTop",true))||0;c.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"});b.innerHTML="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";
149 a.insertBefore(b,a.firstChild);d=b.firstChild;f=d.firstChild;e=d.nextSibling.firstChild.firstChild;this.doesNotAddBorder=f.offsetTop!==5;this.doesAddBorderForTableAndCells=e.offsetTop===5;f.style.position="fixed";f.style.top="20px";this.supportsFixedPosition=f.offsetTop===20||f.offsetTop===15;f.style.position=f.style.top="";d.style.overflow="hidden";d.style.position="relative";this.subtractsBorderForOverflowNotVisible=f.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==j;a.removeChild(b);
150 c.offset.initialize=c.noop},bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(c.curCSS(a,"marginTop",true))||0;d+=parseFloat(c.curCSS(a,"marginLeft",true))||0}return{top:b,left:d}},setOffset:function(a,b,d){if(/static/.test(c.curCSS(a,"position")))a.style.position="relative";var f=c(a),e=f.offset(),j=parseInt(c.curCSS(a,"top",true),10)||0,i=parseInt(c.curCSS(a,"left",true),10)||0;if(c.isFunction(b))b=b.call(a,
151 d,e);d={top:b.top-e.top+j,left:b.left-e.left+i};"using"in b?b.using.call(a,d):f.css(d)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),f=/^body|html$/i.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.curCSS(a,"marginTop",true))||0;d.left-=parseFloat(c.curCSS(a,"marginLeft",true))||0;f.top+=parseFloat(c.curCSS(b[0],"borderTopWidth",true))||0;f.left+=parseFloat(c.curCSS(b[0],"borderLeftWidth",true))||0;return{top:d.top-
152 f.top,left:d.left-f.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||s.body;a&&!/^body|html$/i.test(a.nodeName)&&c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(f){var e=this[0],j;if(!e)return null;if(f!==w)return this.each(function(){if(j=wa(this))j.scrollTo(!a?f:c(j).scrollLeft(),a?f:c(j).scrollTop());else this[d]=f});else return(j=wa(e))?"pageXOffset"in j?j[a?"pageYOffset":
153 "pageXOffset"]:c.support.boxModel&&j.document.documentElement[d]||j.document.body[d]:e[d]}});c.each(["Height","Width"],function(a,b){var d=b.toLowerCase();c.fn["inner"+b]=function(){return this[0]?c.css(this[0],d,false,"padding"):null};c.fn["outer"+b]=function(f){return this[0]?c.css(this[0],d,false,f?"margin":"border"):null};c.fn[d]=function(f){var e=this[0];if(!e)return f==null?null:this;if(c.isFunction(f))return this.each(function(j){var i=c(this);i[d](f.call(this,j,i[d]()))});return"scrollTo"in
154 e&&e.document?e.document.compatMode==="CSS1Compat"&&e.document.documentElement["client"+b]||e.document.body["client"+b]:e.nodeType===9?Math.max(e.documentElement["client"+b],e.body["scroll"+b],e.documentElement["scroll"+b],e.body["offset"+b],e.documentElement["offset"+b]):f===w?c.css(e,d):this.css(d,typeof f==="string"?f:f+"px")}});A.jQuery=A.$=c})(window);
155
forum/static/pages/timeline/js/main.js
File was created 1 (function ($) {
2 if (!!window.ActiveXObject && !window.XMLHttpRequest && (location.href=='http://www.lanrentuku.com' || location.href=='http://www.lanrentuku.com/')) return;
3 $(function () {
4 nav();
5 bnrSilder();
6 sideSlider();
7 helpToggle();
8 systole();
9 slideImg();
10 downM();
11 ExtMutual();
12 slides("#slides", ".slides");
13 skinMutual();
14 srollList("#dialog01", "11");
15 srollList("#dialog02", "6");
16 anchorLink();
17
18 var img = document.createElement("img");
19 img.onload = function() {
20 window.onload = function () {
21 skinShow();
22 };
23 };
24 });
25
26 //滚动
27 function nav() {
28 var $liCur = $(".nav-box ul li.cur"),
29 curP = $liCur.position().left,
30 curW = $liCur.outerWidth(true),
31 $slider = $(".nav-line"),
32 $targetEle = $(".nav-box ul li:not('.last') a"),
33 $navBox = $(".nav-box");
34 $slider.stop(true, true).animate({
35 "left":curP,
36 "width":curW
37 });
38 $targetEle.mouseenter(function () {
39 var $_parent = $(this).parent(),
40 _width = $_parent.outerWidth(true),
41 posL = $_parent.position().left;
42 $slider.stop(true, true).animate({
43 "left":posL,
44 "width":_width
45 }, "fast");
46 });
47 $navBox.mouseleave(function (cur, wid) {
48 cur = curP;
49 wid = curW;
50 $slider.stop(true, true).animate({
51 "left":cur,
52 "width":wid
53 }, "fast");
54 });
55 }
56
57 ;
58 //滚动
59 function bnrSilder() {
60 if (!$("#head").length && !$("#bnr").length) {
61 return;
62 }
63 (function () {
64 if (navigator.userAgent.toLocaleLowerCase().indexOf('opera') >= 0) return;
65 var sstag = document.createElement('script');
66 sstag.type = 'text/javascript';
67 sstag.async = true;
68 sstag.src = 'script/SmoothScroll.js';
69 var s = document.getElementsByTagName('script')[0];
70 s.parentNode.insertBefore(sstag, s);
71 })();
72 $(window).scroll(function () {
73 var bTop = $(this).scrollTop();
74 $('.bnr-box').css({
75 'margin-top':-bTop * 0.48
76 });
77 $('.bnr-txt').css({
78 'margin-top':-bTop * 0.68
79 });
80 $('.bnr-btn').css({
81 'margin-top':-bTop * 0.68
82 });
83 $('.warper').css({
84 "background-position":"50% " + bTop * 0.2 + "px"
85 });
86 if (bTop < 200) {
87 $(".txt-warp").css({
88 'margin-top':-bTop * 1.5
89 });
90 $(".txt-nav-warp").removeAttr("style");
91 } else {
92 $(".txt-warp").css({
93 'margin-top':-240
94 });
95 $(".txt-nav-warp").css({
96 "position":"fixed",
97 "top":0,
98 "left":0,
99 "box-shadow":"0 2px 6px #eee"
100 });
101
102 }
103 var idxs = 0;
104 if (bTop >= 200 && bTop < 577) {
105 idxs;
106 } else if (bTop >= 577 && bTop < 1072) {
107 idxs = 1;
108 } else if (bTop >= 1072 && bTop < 1165) {
109 idxs = 2;
110 } else if (bTop >= 1165) {
111 idxs = 3;
112 }
113 $('.txt-nav li a').eq(idxs).addClass('on').parent().siblings().children().removeClass
114
115 ('on');
116 if (bTop < 200) {
117 $('.txt-nav li a').removeClass('on');
118 }
119 });
120 };
121
122
123 function sideSlider() {
124 if (!$(".help-side dl").length) {
125 return false;
126 }
127 var $aCur = $(".help-side dl").find(".cur a"),
128 $targetA = $(".help-side dl dd a"),
129 $sideSilder = $(".side-slider"),
130 curT = $aCur.position().top - 3;
131 $sideSilder.stop(true, true).animate({
132 "top":curT
133 });
134 $targetA.mouseenter(function () {
135 var posT = $(this).position().top - 3;
136 $sideSilder.stop(true, true).animate({
137 "top":posT
138 }, 240);
139 }).parents(".help-side").mouseleave(function (_curT) {
140 _curT = curT
141 $sideSilder.stop(true, true).animate({
142 "top":_curT
143 });
144 });
145 }
146
147 ;
148
149 function helpToggle() {
150 if (!$(".help-cont dl dt a").length) {
151 return;
152 }
153 var $targetEle = $(".help-cont dl dt a");
154 $targetEle.toggle(function () {
155 $(this).parent().css({
156 "background-position":"0 -20px"
157 }).siblings().slideDown();
158 return false;
159 }, function () {
160 $(this).parent().removeAttr("style").siblings().slideUp();
161 return false;
162 });
163 }
164
165 ;
166
167 function systole() {
168 if (!$(".history").length) {
169 return;
170 }
171 var $warpEle = $(".history-date"),
172 $targetA = $warpEle.find("h2 a,ul li dl dt a"),
173 parentH,
174 eleTop = [];
175 parentH = $warpEle.parent().height();
176 $warpEle.parent().css({
177 "height":59
178 });
179 setTimeout(function () {
180
181 $warpEle.find("ul").children(":not('h2:first')").each(function (idx) {
182 eleTop.push($(this).position().top);
183 $(this).css({
184 "margin-top":-eleTop[idx]
185 }).children().hide();
186 }).animate({
187 "margin-top":0
188 }, 160).children().fadeIn();
189 $warpEle.parent().animate({
190 "height":parentH
191 }, 260);
192
193 $warpEle.find("ul").children(":not('h2:first')").addClass("bounceInDown").css({
194 "-webkit-animation-duration":"2s",
195 "-webkit-animation-delay":"0",
196 "-webkit-animation-timing-function":"ease",
197 "-webkit-animation-fill-mode":"both"
198 }).end().children("h2").css({
199 "position":"relative"
200 });
201 }, 60);
202
203 $targetA.click(function () {
204 $(this).parent().css({
205 "position":"relative"
206 });
207 $(this).parent().siblings().slideToggle();
208 $warpEle.parent().removeAttr("style");
209 return false;
210 });
211
212 }
213
214 ;
215
216
217 })(jQuery);
218
forum/templates/404.html
File was created 1 <!DOCTYPE HTML>
2 <html lang="en">
3 <head>
4 <meta charset="UTF-8">
5 <title>小程序开发社区 - 404</title>
6 </head>
7 <body>
8 <div id="page-404">
9 Sorry, 404 not found.
10 </div>
11 </body>
12 </html>
13
forum/templates/notification/notifications.html
File was created 1 {% extends 'snippet/layout.html' %}
2 {% load forum_extras %}
3
4 {% block stylesheet %}
5 <link rel="stylesheet" href="/static/css/codehilite.css" />
6 {% endblock %}
7
8 {% block javascript %}
9 <script type="text/x-mathjax-config">
10 MathJax.Hub.Config({
11 tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}
12 });
13 </script>
14 <script type="text/javascript" src="https://c328740.ssl.cf1.rackcdn.com/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
15 {% endblock %}
16
17 {% block main %}
18 <div class="notifications container-box">
19 <div class="ui-header">
20 <span class="bread-nav">小程序开发社区 › 提醒消息</span>
21 </div>
22
23 <div class="ui-content">
24 {% for notification in notifications %}
25 <div class="notification-item">
26 <a href="/u/{{ notification.trigger_user.username }}/">
27 <img src="/static/avatar/m_{% if notification.trigger_user.avatar %}{{ notification.trigger_user.avatar }}{% else %}default.png{% endif %}" alt="" class="avatar" />
28 </a>
29 <div class="main">
30 {% ifequal notification.involved_type 0 %}
31 <span class="title"><a href="/u/{{ notification.trigger_user.username }}/">{{ notification.trigger_user.username }}</a> 在 <a href="/t/{{ notification.involved_topic.id }}/">{{ notification.involved_topic.title }}</a> 中提到了你</span>
32 {% endifequal %}
33 {% ifequal notification.involved_type 1 %}
34 <span class="title"><a href="/u/{{ notification.trigger_user.username }}/">{{ notification.trigger_user.username }}</a> 回复了你的主题 <a href="/t/{{ notification.involved_topic.id }}/">{{ notification.involved_topic.title }}</a></span>
35 {% endifequal %}
36 <div class="content">{{ notification.content|markdown|content_process|safe }}</div>
37 </div>
38 </div>
39 {% endfor %}
40
41 {% ifequal page.total 0 %}
42 <div class="pl10 pr10">
43 <div class="alert mt20">
44 您暂时还没有收到消息提醒。
45 </div>
46 </div>
47 {% endifequal %}
48 </div>
49
50 <div class="ui-footer">
51 <div class="pagination">
52 {% pagination page request.get_full_path %}
53 </div>
54 </div>
55 </div>
56 {% endblock %}
57
58 {% block sidebar %}
59 {% if user.is_authenticated %}
60 <div class="usercard container-box">
61 <div class="ui-header">
62 <a href="/u/{{ user.username }}/">
63 <img src="/static/avatar/m_{% if user.avatar %}{{ user.avatar }}{% else %}default.png{% endif %}?t={% gen_random %}" alt="" class="avatar" />
64 </a>
65 <div class="username">{{ user.username }}</div>
66 <div class="website"><a href="{% if user.website %}{{ user.website }}{% endif %}">{% if user.website %}{{ user.website }}{% endif %}</a></div>
67 </div>
68 <div class="ui-content">
69 <div class="status status-topic">
70 <strong><a href="/u/{{ user.username }}/topics/">{{ counter.topics }}</a></strong> 主题
71 </div>
72 <div class="status status-reply">
73 <strong><a href="/u/{{ user.username }}/replies/">{{ counter.replies }}</a></strong> 回复
74 </div>
75 <div class="status status-favorite">
76 <strong><a href="/u/{{ user.username }}/favorites/">{{ counter.favorites }}</a></strong> 收藏
77 </div>
78 <div class="status status-reputation">
79 <strong>{% if user.reputation %}{{ user.reputation }}{% else %}0{% endif %}</strong> 威望
80 </div>
81 </div>
82 </div>
83 {% else %}
84 <div class="login-box container-box">
85 <div class="ui-content tc">
86 <a class="btn btn-small" type="button" href="/login/">登录</a>
87 <a class="btn btn-small" type="button" href="/register/">注册</a>
88 <a class="btn btn-small" type="button" href="/forgot/">找回密码</a>
89 </div>
90 </div>
91 {% endif %}
92 </div>
93 {% endblock %}
94
forum/templates/page/about.html
File was created 1 {% extends 'snippet/layout.html' %}
2
3 {% block main %}
4 {% endblock %}
5
6 {% block sidebar %}
7 {% endblock %}
8
forum/templates/snippet/footer.html
File was created 1 <div class="footer mt15">
2 <div class="container">
3 <div class="footer-bg">
4 <p class="links">
5 <span>©2016-2018 xiuyetang.com</span>
6 <span>Powered by Django</span>
7 <span>, All rights reserved.</span>
8 </p>
9 <p>
10 <a href="/about/" target="_self">关于我们</a> -
11 <a href="/plan/" target="_self">计划</a>
12 </p>
13 <p class="fade-color">
14 ❤ lovely created by anonymous.
15 </p>
16 </div>
17 </div>
18 </div>
19
forum/templates/snippet/layout.html
File was created 1 <!DOCTYPE HTML>
2 <html lang="zh-CN">
3 <head>
4 <meta charset="UTF-8">
5 <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport" />
6 <meta content="yes" name="apple-mobile-web-app-capable" />
7 <meta content="black" name="apple-mobile-web-app-status-bar-style" />
8 <meta name="format-detection" content="telephone=no" />
9 {% load forum_extras %}
10 <title>{% block title %}小程序开发社区{% endblock %}</title>
11 <script type="text/javascript" src="/static/js/base/jquery-1.8.3.min.js"></script>
12 <script type="text/javascript" src="/static/js/base/bootstrap.min.js"></script>
13 <script type="text/javascript" src="/static/js/base/in-min.js"></script>
14 <link rel="stylesheet" href="/static/css/bootstrap/bootstrap.min.css" />
15 <link rel="stylesheet" href="/static/css/main.css?t=20130807001.css" />
16 <link rel="apple-touch-icon" href="/static/images/f2e.im.icon.png">
17 {% block stylesheet %}{% endblock %}
18 {% block javascript %}{% endblock %}
19 <style type="text/css">
20 .totop a {
21 display: block;
22 width: 40px;
23 height: 35px;
24 background: url('/static/images/totop.gif') no-repeat;
25 text-indent: -9999px;
26 text-decoration: none;
27 }
28
29 .totop a:hover {
30 background-position: 0 -35px;
31 }
32 </style>
33 </head>
34 <body>
35
36 <div class="navbar navbar-inverse navbar-fixed-top top-navbar">
37 <div class="navbar-inner">
38 <div class="container">
39 <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
40 <span class="icon-bar"></span>
41 <span class="icon-bar"></span>
42 <span class="icon-bar"></span>
43 </a>
44 <a class="brand" href="/">微信小程序</a>
45 <div class="divider-vertical"></div>
46 <div class="nav-collapse collapse">
47 {% if active_page %}
48 <ul class="nav">
49 {% for href, id, caption in navigation_bar %}
50 <li{% ifequal id active_page %} class="active"{% endifequal %}>
51 <a href="{{ href|escape }}">{{ caption|escape }}</a>
52 </li>
53 {% endfor %}
54 </ul>
55 {% else %}
56 <ul class="nav">
57 {% for href, id, caption in navigation_bar %}
58 <li{% ifequal id 'index' %} class="active"{% endifequal %}>
59 <a href="{{ href|escape }}">{{ caption|escape }}</a>
60 </li>
61 {% endfor %}
62 </ul>
63 {% endif %}
64 </div>
65 <!--/.nav-collapse -->
66 <form class="navbar-search pull-left J_search">
67 <input type="text" class="search-query" placeholder="{#Search#}" x-webkit-speech>
68 </form>
69 <div class="nav-collapse collapse pull-right">
70 <ul class="nav account-menu">
71 {% if user.is_authenticated %}
72 <li>
73 <a href="/u/{% if user.username %}{{ user.username }}{% else %}{{ user.id }}{% endif %}/">{{ user.username }}</a>
74 </li>
75 <li>
76 <a href="/setting">
77 <span class="">设置</span>
78 </a>
79 </li>
80 <li>
81 <a href="/logout/">
82 <span class="">登出</span>
83 </a>
84 </li>
85 {% else %}
86 <li><a href="/">首页</a></li>
87 <li>
88 <a href="/login/">
89 <span class="">登录</span>
90 </a>
91 </li>
92 <li><a href="/register/" class="">注册</a></li>
93 {% endif %}
94 </ul>
95 </div>
96 </div>
97 </div>
98 </div>
99
100 <div class="container-fluid container mt15">
101 <div class="row-fluid">
102 <div class="span9 left">
103 {% block main %}{% endblock %}
104 </div>
105
106 <div class="span3 right">
107 {% block sidebar %}{% endblock %}
108 </div>
109 </div>
110 </div>
111
112 {% include "snippet/footer.html" %}
113
114 </body>
115 </html>
116
forum/templates/topic/create.html
File was created 1 {% extends 'snippet/layout.html' %}
2 {% load forum_extras %}
3
4 {% block javascript %}
5 <script type="text/x-mathjax-config">
6 MathJax.Hub.Config({
7 tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}
8 });
9 </script>
10 <script type="text/javascript" src="https://c328740.ssl.cf1.rackcdn.com/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
11 <script type="text/javascript" src="/static/js/widget/emmet.min.js"></script>
12 <script type="text/javascript" src="/static/js/widget/jquery.textarea.min.js"></script>
13 <script type="text/javascript">
14 jQuery(document).ready(function() {
15 $('textarea.smart-code-support').tabby();
16 emmet.require('textarea').setup({
17 pretty_break: false, // enable formatted line breaks (when inserting // between opening and closing tag)
18 use_tab: false // expand abbreviations by Tab key
19 });
20 });
21 </script>
22 {% endblock %}
23
24 {% block main %}
25 <div class="topic-create container-box">
26 <div class="ui-header">
27 <span class="title">创建新主题</span>
28 </div>
29
30 <div class="ui-content">
31 <form class="mt10" action="/t/create/{{ node_slug }}/" method="post">
32 {{ errors|dump_errors }}
33 <div class="input-prepend mt10">
34 <span class="add-on">#</span>
35 <input class="span11" id="prependedInput" type="text" placeholder="主题" name="title">
36 </div>
37 <textarea rows="3" class="content mt5 smart-code-support" placeholder="正文" name="content"></textarea>
38 <input type="submit" id="checkall" class="btn btn-small" value="立即创建">
39 {% csrf_token %}
40 </form>
41 </div>
42 </div>
43 {% endblock %}
44
45 {% block sidebar %}
46 <div class="usercard container-box">
47 <div class="ui-header">
48 <a href="/u/{{ user.username }}/">
49 <img src="/static/avatar/m_{% if user.avatar %}{{ user.avatar }}{% else %}default.png{% endif %}?t={% gen_random %}" alt="" class="avatar" />
50 </a>
51 <div class="username">{{ user.username }}</div>
52 <div class="website"><a href="{% if user.website %}{{ user.website }}{% endif %}">{% if user.website %}{{ user.website }}{% endif %}</a></div>
53 </div>
54 <div class="ui-content">
55 <div class="status status-topic">
56 <strong><a href="/u/{{ user.username }}/topics/">{{ counter.topics }}</a></strong> 主题
57 </div>
58 <div class="status status-reply">
59 <strong><a href="/u/{{ user.username }}/replies/">{{ counter.replies }}</a></strong> 回复
60 </div>
61 <div class="status status-favorite">
62 <strong><a href="/u/{{ user.username }}/favorites/">{{ counter.favorites }}</a></strong> 收藏
63 </div>
64 <div class="status status-reputation">
65 <strong>{% if user.reputation %}{{ user.reputation }}{% else %}0{% endif %}</strong> 威望
66 </div>
67 </div>
68 </div>
69 {% endblock %}
70
forum/templates/topic/edit.html
File was created 1 {% extends 'snippet/layout.html' %}
2 {% load forum_extras %}
3
4 {% block javascript %}
5 <script type="text/x-mathjax-config">
6 MathJax.Hub.Config({
7 tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}
8 });
9 </script>
10 <script type="text/javascript" src="https://c328740.ssl.cf1.rackcdn.com/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
11 <script type="text/javascript" src="/static/js/widget/emmet.min.js"></script>
12 <script type="text/javascript" src="/static/js/widget/jquery.textarea.min.js"></script>
13 <script type="text/javascript">
14 jQuery(document).ready(function() {
15 $('textarea.smart-code-support').tabby();
16 emmet.require('textarea').setup({
17 pretty_break: false, // enable formatted line breaks (when inserting // between opening and closing tag)
18 use_tab: false // expand abbreviations by Tab key
19 });
20 });
21 </script>
22 {% endblock %}
23
24 {% block main %}
25 <div class="topic-create container-box">
26 <div class="ui-header">
27 <span class="title">编辑主题</span>
28 </div>
29
30 <div class="ui-content">
31 <form class="mt10" action="" method="post">
32 {{ errors|dump_errors }}
33 <div class="input-prepend mt10">
34 <span class="add-on">#</span>
35 <input class="span11" id="prependedInput" type="text" placeholder="主题" name="title" value="{{ topic.title }}">
36 </div>
37 <textarea rows="3" class="content mt5 smart-code-support" placeholder="正文" name="content">{{ topic.content }}</textarea>
38 <input name="tid" type="hidden" value="{{ topic.id }}" />
39 <input type="submit" id="checkall" class="btn btn-small" value="立即修改">
40 {% csrf_token %}
41 </form>
42 </div>
43 </div>
44 {% endblock %}
45
46 {% block sidebar %}
47 <div class="usercard container-box">
48 <div class="ui-header">
49 <a href="/u/{{ user.username }}/">
50 <img src="/static/avatar/m_{% if user.avatar %}{{ user.avatar }}{% else %}default.png{% endif %}?t={% gen_random %}" alt="" class="avatar" />
51 </a>
52 <div class="username">{{ user.username }}</div>
53 <div class="website"><a href="{% if user.website %}{{ user.website }}{% endif %}">{% if user.website %}{{ user.website }}{% endif %}</a></div>
54 </div>
55 <div class="ui-content">
56 <div class="status status-topic">
57 <strong><a href="/u/{{ user.username }}/topics/">{{ counter.topics }}</a></strong> 主题
58 </div>
59 <div class="status status-reply">
60 <strong><a href="/u/{{ user.username }}/replies/">{{ counter.replies }}</a></strong> 回复
61 </div>
62 <div class="status status-favorite">
63 <strong><a href="/u/{{ user.username }}/favorites/">{{ counter.favorites }}</a></strong> 收藏
64 </div>
65 <div class="status status-reputation">
66 <strong>{% if user.reputation %}{{ user.reputation }}{% else %}0{% endif %}</strong> 威望
67 </div>
68 </div>
69 </div>
70 {% endblock %}
71
forum/templates/topic/members.html
File was created 1 {% extends 'snippet/layout.html' %}
2 {% load forum_extras %}
3
4 {% block title %}
5 社区成员 - 小程序开发社区
6 {% endblock %}
7
8 {% block main %}
9 <div class="member-lists container-box">
10 <div class="ui-header">
11 <span class="title">社区活跃成员</span>
12 </div>
13 <div class="ui-content">
14 {% for member in active_members %}
15 <div class="member">
16 <a href="/u/{{ member.username }}/">
17 <img src="/static/avatar/m_{% if member.avatar %}{{ member.avatar }}{% else %}default.png{% endif %}" alt="" class="avatar" />
18 </a>
19 <span class="username">
20 <a href="/u/{{ member.username }}/">{{ member.username }}</a>
21 </span>
22 </div>
23 {% endfor %}
24 </div>
25 </div>
26
27 <div class="member-lists container-box mt10">
28 <div class="ui-header">
29 <span class="title">最新加入成员</span>
30 </div>
31 <div class="ui-content">
32 {% for member in members %}
33 <div class="member">
34 <a href="/u/{{ member.username }}/">
35 <img src="/static/avatar/m_{% if member.avatar %}{{ member.avatar }}{% else %}default.png{% endif %}" alt="" class="avatar" />
36 </a>
37 <span class="username">
38 <a href="/u/{{ member.username }}/">{{ member.username }}</a>
39 </span>
40 </div>
41 {% endfor %}
42 </div>
43 </div>
44 {% endblock %}
45
46 {% block sidebar %}
47 {% if user.is_authenticated %}
48 <div class="usercard container-box">
49 <div class="ui-header">
50 <a href="/u/{{ user.username }}/">
51 <img src="/static/avatar/m_{% if user.avatar %}{{ user.avatar }}{% else %}default.png{% endif %}?t={% gen_random %}" alt="" class="avatar" />
52 </a>
53 <div class="username">{{ user.username }}</div>
54 <div class="website"><a href="{% if user.website %}{{ user.website }}{% endif %}">{% if user.website %}{{ user.website }}{% endif %}</a></div>
55 </div>
56 <div class="ui-content">
57 <div class="status status-topic">
58 <strong><a href="/u/{{ user.username }}/topics/">{{ counter.topics }}</a></strong> 主题
59 </div>
60 <div class="status status-reply">
61 <strong><a href="/u/{{ user.username }}/replies/">{{ counter.replies }}</a></strong> 回复
62 </div>
63 <div class="status status-favorite">
64 <strong><a href="/u/{{ user.username }}/favorites/">{{ counter.favorites }}</a></strong> 收藏
65 </div>
66 <div class="status status-reputation">
67 <strong>{% if user.reputation %}{{ user.reputation }}{% else %}0{% endif %}</strong> 威望
68 </div>
69 </div>
70 </div>
71 {% else %}
72 <div class="login-box container-box">
73 <div class="ui-content tc">
74 <a class="btn btn-small mr10" type="button" href="/login/?next={{ request.get_full_path }}">登录</a>
75 <a class="btn btn-small mr10" type="button" href="/register/">注册</a>
76 <a class="btn btn-small" type="button" href="/forgot/">找回密码</a>
77 </div>
78 </div>
79 {% endif %}
80 {% endblock %}
81
forum/templates/topic/node_topics.html
File was created 1 {% extends 'snippet/layout.html' %}
2 {% load forum_extras %}
3
4 {% block main %}
5 <div class="topics container-box node-topics">
6 <div class="ui-header">
7 <a class="btn btn-small fr" type="button" href="/t/create/{{ node.slug }}/">创建新主题</a>
8 <span class="bread-nav">小程序开发社区 › {{ node.name }}</span>
9 </div>
10
11 <div class="ui-content">
12 {% for topic in topics %}
13 <div class="topic-item">
14 <a href="/u/{{ topic.author.username }}/">
15 <img src="/static/avatar/m_{% if topic.author.avatar %}{{ topic.author.avatar }}{% else %}default.png{% endif %}" alt="" class="avatar" />
16 </a>
17 <div class="main">
18 <h3 class="title">
19 <a href="/t/{{ topic.id }}/">{{ topic.title }}</a>
20 </h3>
21 <div class="meta">
22 <span class="node"><a href="/node/{{ topic.node.slug }}/">{{ topic.node.name }}</a></span> •
23 <span class="username">
24 <a href="/u/{% if topic.author.username %}{{ topic.author.username }}{% else %}{{ topic.author.id }}{% endif %}/">{{ topic.author.username }}</a>
25 </span> •
26 {% if topic.last_replied_time %}
27 <span class="last-touched">{{ topic.last_touched|pretty_date }}</span> •
28 <span class="last-reply-username">最后回复来自
29 <a href="/u/{% if topic.last_replied_by.username %}{{ topic.last_replied_by.username }}{% else %}{{ topic.last_replied_by.id }}{% endif %}/">
30 <strong>{{ topic.last_replied_by.username }}</strong>
31 </a>
32 </span>
33 {% else %}
34 <span class="last-touched">{{ topic.last_touched|pretty_date }}</span>
35 {% endif %}
36 </div>
37 </div>
38 {% if topic.reply_count %}
39 <div class="count">
40 <a href="/t/{{ topic.id }}/#reply{% if topic.reply_count %}{{ topic.reply_count }}{% else %}0{% endif %}">{% if topic.reply_count %}{{ topic.reply_count }}{% else %}0{% endif %}</a>
41 </div>
42 {% endif %}
43 </div>
44 {% endfor %}
45
46 {% ifequal topic_page.total 0 %}
47 <div class="pl10 pr10">
48 <div class="alert mt20 no-topics">
49 该结点下暂时还没有主题,发出你的讨论吧。
50 </div>
51 </div>
52 {% endifequal %}
53 </div>
54
55 <div class="ui-footer">
56 {% if topic_page.pages > 1 %}
57 <div class="pagination">
58 {% pagination topic_page request.get_full_path %}
59 </div>
60 {% endif %}
61 </div>
62 </div>
63 {% endblock %}
64
65 {% block sidebar %}
66 {% if user.is_authenticated %}
67 <div class="usercard container-box">
68 <div class="ui-header">
69 <a href="/u/{{ user.username }}/">
70 <img src="/static/avatar/m_{% if user.avatar %}{{ user.avatar }}{% else %}default.png{% endif %}?t={% gen_random %}" alt="" class="avatar" />
71 </a>
72 <div class="username">{{ user.username }}</div>
73 <div class="website"><a href="{% if user.website %}{{ user.website }}{% endif %}">{% if user.website %}{{ user.website }}{% endif %}</a></div>
74 </div>
75 <div class="ui-content">
76 <div class="status status-topic">
77 <strong><a href="/u/{{ user.username }}/topics/">{{ counter.topics }}</a></strong> 主题
78 </div>
79 <div class="status status-reply">
80 <strong><a href="/u/{{ user.username }}/replies/">{{ counter.replies }}</a></strong> 回复
81 </div>
82 <div class="status status-favorite">
83 <strong><a href="/u/{{ user.username }}/favorites/">{{ counter.favorites }}</a></strong> 收藏
84 </div>
85 <div class="status status-reputation">
86 <strong>{% if user.reputation %}{{ user.reputation }}{% else %}0{% endif %}</strong> 威望
87 </div>
88 </div>
89 </div>
90 {% else %}
91 <div class="login-box container-box">
92 <div class="ui-content tc">
93 <a class="btn btn-small" type="button" href="/login/?next={{ request.get_full_path }}">登录</a>
94 <a class="btn btn-small" type="button" href="/register/">注册</a>
95 <a class="btn btn-small" type="button" href="/forgot/">找回密码</a>
96 </div>
97 </div>
98 {% endif %}
99 </div>
100 {% endblock %}
101
forum/templates/topic/profile.html
File was created 1 {% extends 'snippet/layout.html' %}
2 {% load forum_extras %}
3
4 {% block stylesheet %}
5 <link rel="stylesheet" href="/static/css/codehilite.css" />
6 {% endblock %}
7
8 {% block javascript %}
9 <script type="text/x-mathjax-config">
10 MathJax.Hub.Config({
11 tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}
12 });
13 </script>
14 <script type="text/javascript" src="https://c328740.ssl.cf1.rackcdn.com/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
15 <script type="text/javascript" src="/static/js/base/juicer-min.js"></script>
16 <script type="text/juicer" id="J_githubTpl">
17 <ul>
18 {@each github_repos as repo}
19 {@if !repo.fork}
20 <li>
21 <div class="title">
22 <a href="${repo.svn_url}" rel="nofollow" target="_blank">${repo.name}</a>
23 <span class="watchers" title="${repo.watchers} Watchers">${repo.watchers}</span>
24 </div>
25 <p class="desc">
26 ${repo.description}
27 </p>
28 </li>
29 {@/if}
30 {@/each}
31 </ul>
32 </script>
33 {% if user_info.github %}
34 <script type="text/javascript">
35 jQuery(document).ready(function() {
36 $.ajax({
37 type: 'GET',
38 dataType: 'jsonp',
39 url: 'https://api.github.com/users/{{ user_info.github }}/repos',
40 data: {},
41 success: function(data) {
42 $('.J_githubContainer').html(juicer('#J_githubTpl', {github_repos: data.data}));
43 }
44 });
45 });
46 </script>
47 {% endif %}
48 {% endblock %}
49
50 {% block main %}
51 <div class="user-page">
52 <div class="profile container-box">
53 <div class="ui-header">
54 <a href="/u/{{ user_info.username }}/">
55 <img src="/static/avatar/m_{% if user_info.avatar %}{{ user_info.avatar }}{% else %}default.png{% endif %}?t={% gen_random %}" alt="" class="avatar" />
56 </a>
57 <div class="username">{{ user_info.username }}</div>
58 {% if user_info.website %}
59 <div class="website"><a href="{% if user_info.website %}{{ user_info.website }}{% endif %}">{% if user_info.website %}{{ user_info.website }}{% endif %}</a></div>
60 {% endif %}
61 <div class="user-number">
62 <div class="number">小程序开发社区第{{ user_info.id }}号成员</div>
63 <div class="since">入住于{{ user_info.date_joined.date }}</div>
64 </div>
65 </div>
66 <div class="ui-content">
67 <dl>
68 <dt>ID</dt>
69 <dd>{{ user_info.username }}</dd>
70 </dl>
71 {% if user_info.nickname %}
72 <dl>
73 <dt>名号</dt>
74 <dd>{{ user_info.nickname }}</dd>
75 </dl>
76 {% endif %}
77 {% if user_info.location %}
78 <dl>
79 <dt>城市</dt>
80 <dd>{{ user_info.location }}</dd>
81 </dl>
82 {% endif %}
83 {% if user_info.company %}
84 <dl>
85 <dt>公司</dt>
86 <dd>{{ user_info.company }}</dd>
87 </dl>
88 {% endif %}
89 <dl>
90 <dt>Email</dt>
91 <dd>{{ user_info.email|email_mosaic }}</dd>
92 </dl>
93 {% if user_info.twitter %}
94 <dl>
95 <dt>Twitter</dt>
96 <dd><a href="http://twitter.com/{{ user_info.twitter }}">http://twitter.com/{{ user_info.twitter }}</a></dd>
97 </dl>
98 {% endif %}
99 {% if user_info.github %}
100 <dl>
101 <dt>Github</dt>
102 <dd><a href="http://github.com/{{ user_info.github }}">http://github.com/{{ user_info.github }}</a></dd>
103 </dl>
104 {% endif %}
105 {% if user_info.website %}
106 <dl>
107 <dt>Blog</dt>
108 <dd><a href="{{ user_info.website }}">{{ user_info.website }}</a></dd>
109 </dl>
110 {% endif %}
111 {% if user_info.signature %}
112 <dl>
113 <dt>签名</dt>
114 <dd>{{ user_info.signature }}</dd>
115 </dl>
116 {% endif %}
117 </div>
118 </div>
119
120 {% if user_info.github %}
121 <div class="project-lists container-box mt10">
122 <div class="ui-header">
123 <span class="title">开源项目</span>
124 </div>
125 <div class="ui-content J_githubContainer">
126 {% comment %}
127 <ul>
128 {% for repo in github_repos if not repo.fork %}
129 <li>
130 <div class="title">
131 <a href="{{ repo.svn_url }}" rel="nofollow" target="_blank">{{ repo.name }}</a>
132 <span class="watchers" title="{{ repo.watchers }} Watchers">{{ repo.watchers }}</span>
133 </div>
134 <p class="desc">
135 {{ repo.description }}
136 </p>
137 </li>
138 {% endfor %}
139 </ul>
140 {% endcomment %}
141 <img src="/static/images/ajax-loader.gif" alt="" class="mt5" />
142 </div>
143 </div>
144 {% endif %}
145
146 {% ifnotequal topic_page.total 0 %}
147 <div class="topic-lists container-box mt10">
148 <div class="ui-header">
149 <span class="title">主题列表</span>
150 </div>
151 <div class="ui-content topics">
152 {% for topic in topics %}
153 <div class="topic-item">
154 <img src="/static/avatar/m_{% if topic.author.avatar %}{{ topic.author.avatar }}{% else %}default.png{% endif %}?t={% gen_random %}" alt="" class="avatar" />
155 <div class="main">
156 <h3 class="title">
157 <a href="/t/{{ topic.id }}/">{{ topic.title }}</a>
158 </h3>
159 <div class="meta">
160 <span class="node"><a href="/node/{{ topic.node.slug }}/">{{ topic.node.name }}</a></span> •
161 <span class="username">
162 <a href="/u/{% if topic.author.username %}{{ topic.author.username }}{% else %}{{ topic.author.id }}{% endif %}/">{{ topic.author.username }}</a>
163 </span> •
164 {% if topic.last_replied_time %}
165 <span class="last-touched">{{ topic.last_touched|pretty_date }}</span> •
166 <span class="last-reply-username">最后回复来自
167 <a href="/u/{% if topic.last_replied_by.username %}{{ topic.last_replied_by.username }}{% else %}{{ topic.last_replied_by.id }}{% endif %}/">
168 <strong>{{ topic.last_replied_by.username }}</strong>
169 </a>
170 </span>
171 {% else %}
172 <span class="last-touched">{{ topic.last_touched|pretty_date }}</span>
173 {% endif %}
174 </div>
175 </div>
176 {% if topic.reply_count %}
177 <div class="count">
178 <a href="/t/{{ topic.id }}/#reply{% if topic.reply_count %}{{ topic.reply_count }}{% else %}0{% endif %}">{% if topic.reply_count %}{{ topic.reply_count }}{% else %}0{% endif %}</a>
179 </div>
180 {% endif %}
181 </div>
182 {% endfor %}
183
184 {% comment %}
185 <div class="pagination">
186 {% pagination topic_page request.get_full_path %}
187 </div>
188 {% endcomment %}
189 </div>
190 <div class="ui-footer">
191 <a href="/u/{{ user_info.username }}/topics/">›› 查看更多主题</a>
192 </div>
193 </div>
194 {% endifnotequal %}
195
196 {% ifnotequal reply_page.total 0 %}
197 <div class="replies-lists container-box mt10">
198 <div class="ui-header">
199 <span class="title">回复列表</span>
200 </div>
201 <div class="ui-content topics">
202 {% for reply in replies %}
203 <div class="reply-item">
204 <div class="main">
205 <span class="title">
206 回复了 {{ reply.topic.author.username }} 创建的主题 <a href="/t/{{ reply.topic.id }}/">{{ reply.topic.title }}</a>
207 </span>
208 <div class="content">
209 {{ reply.content|markdown|content_process|safe }}
210 </div>
211 </div>
212 </div>
213 {% endfor %}
214 </div>
215 <div class="ui-footer">
216 <a href="/u/{{ user_info.username }}/replies/">›› 查看更多回复</a>
217 </div>
218 </div>
219 {% endifnotequal %}
220 </div>
221 {% endblock %}
222
223 {% block sidebar %}
224 <div class="user-page">
225 <div class="usercard container-box">
226 <div class="ui-content">
227 <div class="status status-topic">
228 <strong><a href="/u/{{ user_info.username }}/topics/">{{ counter.topics }}</a></strong> 主题
229 </div>
230 <div class="status status-reply">
231 <strong><a href="/u/{{ user_info.username }}/replies/">{{ counter.replies }}</a></strong> 回复
232 </div>
233 <div class="status status-favorite">
234 <strong><a href="/u/{{ user_info.username }}/favorites/">{{ counter.favorites }}</a></strong> 收藏
235 </div>
236 <div class="status status-reputation">
237 <strong>{% if user_info.reputation %}{{ user_info.reputation }}{% else %}0{% endif %}</strong> 威望
238 </div>
239 </div>
240 </div>
241
242 {% if user_info.self_intro %}
243 <div class="self-introduction container-box mt10">
244 <div class="ui-header">
245 <span class="title">自我介绍</span>
246 </div>
247 <div class="ui-content">
248 {{ user_info.self_intro|linebreaks }}
249 </div>
250 </div>
251 {% endif %}
252
253 {% if user_info.douban %}
254 <div class="book-lists container-box mt10">
255 <div class="ui-header">
256 <span class="title">正在读的书籍列表</span>
257 </div>
258 <div class="ui-content">
259 <script type="text/javascript" src="http://www.douban.com/service/badge/{{ user_info.douban }}/?show=dolist&amp;n=12&amp;columns=3&amp;picsize=medium&amp;hidelogo=yes&amp;hideself=yes&amp;cat=book" ></script>
260 </div>
261 </div>
262
263 <div class="book-lists container-box mt10">
264 <div class="ui-header">
265 <span class="title">已读过的书籍列表</span>
266 </div>
267 <div class="ui-content">
268 <script type="text/javascript" src="http://www.douban.com/service/badge/{{ user_info.douban }}/?show=collection&amp;n=12&amp;columns=3&amp;picsize=medium&amp;hidelogo=yes&amp;hideself=yes&amp;cat=book" ></script>
269 </div>
270 </div>
271 {% endif %}
272 </div>
273 {% endblock %}
274
forum/templates/topic/reply_edit.html
File was created 1 {% extends 'snippet/layout.html' %}
2 {% load forum_extras %}
3
4 {% block javascript %}
5 <script type="text/x-mathjax-config">
6 MathJax.Hub.Config({
7 tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}
8 });
9 </script>
10 <script type="text/javascript" src="https://c328740.ssl.cf1.rackcdn.com/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
11 <script type="text/javascript" src="/static/js/widget/emmet.min.js"></script>
12 <script type="text/javascript" src="/static/js/widget/jquery.textarea.min.js"></script>
13 <script type="text/javascript">
14 jQuery(document).ready(function() {
15 $('textarea.smart-code-support').tabby();
16 emmet.require('textarea').setup({
17 pretty_break: false, // enable formatted line breaks (when inserting // between opening and closing tag)
18 use_tab: false // expand abbreviations by Tab key
19 });
20 });
21 </script>
22 {% endblock %}
23
24 {% block main %}
25 <div class="topic-create container-box">
26 <div class="ui-header">
27 <span class="title">编辑回复</span>
28 </div>
29
30 <div class="ui-content">
31 <form class="mt10" action="" method="post">
32 {{ errors|dump_errors }}
33 <textarea rows="3" class="content mt5 smart-code-support" placeholder="正文" name="content">{{ reply.content }}</textarea>
34 <input name="rid" type="hidden" value="{{ reply.id }}" />
35 <input type="submit" id="checkall" class="btn btn-small" value="立即修改">
36 {% csrf_token %}
37 </form>
38 </div>
39 </div>
40 {% endblock %}
41
42 {% block sidebar %}
43 <div class="usercard container-box">
44 <div class="ui-header">
45 <a href="/u/{{ user.username }}/">
46 <img src="/static/avatar/m_{% if user.avatar %}{{ user.avatar }}{% else %}default.png{% endif %}?t={% gen_random %}" alt="" class="avatar" />
47 </a>
48 <div class="username">{{ user.username }}</div>
49 <div class="website"><a href="{% if user.website %}{{ user.website }}{% endif %}">{% if user.website %}{{ user.website }}{% endif %}</a></div>
50 </div>
51 <div class="ui-content">
52 <div class="status status-topic">
53 <strong><a href="/u/{{ user.username }}/topics/">{{ counter.topics }}</a></strong> 主题
54 </div>
55 <div class="status status-reply">
56 <strong><a href="/u/{{ user.username }}/replies/">{{ counter.replies }}</a></strong> 回复
57 </div>
58 <div class="status status-favorite">
59 <strong><a href="/u/{{ user.username }}/favorites/">{{ counter.favorites }}</a></strong> 收藏
60 </div>
61 <div class="status status-reputation">
62 <strong>{% if user.reputation %}{{ user.reputation }}{% else %}0{% endif %}</strong> 威望
63 </div>
64 </div>
65 </div>
66 {% endblock %}
67
forum/templates/topic/topics.html
File was created 1 {% extends 'snippet/layout.html' %}
2 {% load forum_extras %}
3
4 {% block main %}
5
6 <div class="topics container-box deprecated-mt10">
7 <div class="ui-header">
8 <div class="dropdown fr">
9 <a class="btn btn-small" type="button" href="###" data-toggle="dropdown">创建新主题</a>
10 <ul class="dropdown-menu" role="menu">
11 <li role="presentation">
12 {% for node in hot_nodes %}
13 <a role="menuitem" href="/t/create/{{ node.slug }}/">{{ node.name }}</a>
14 {% endfor %}
15 </li>
16 </ul>
17 </div>
18 <span class="bread-nav">
19 <a class="node-link" href="/node/weapp/">微信小程序</a>
20 <a class="node-link" href="/node/w3c/">W3C</a>
21 <a class="node-link" href="/node/dev/">社区开发</a>
22 </span>
23 </div>
24 {% for topic in topics %}
25 <div class="topic-item">
26 <a href="/u/{{ topic.author.username }}/">
27 <img src="/static/avatar/m_{% if topic.author.avatar %}{{ topic.author.avatar }}{% else %}default.png{% endif %}" alt="" class="avatar" />
28 </a>
29 <div class="main">
30 <h3 class="title">
31 <a href="/t/{{ topic.id }}/">{{ topic.title }}</a>
32 </h3>
33 <div class="meta">
34 <span class="node"><a href="/node/{{ topic.node.slug }}/">{{ topic.node.name }}</a></span> •
35 <span class="username">
36 <a href="/u/{% if topic.author.username %}{{ topic.author.username }}{% else %}{{ topic.author.id }}{% endif %}/">{{ topic.author.username }}</a>
37 </span> •
38 {% if topic.last_replied_time %}
39 <span class="last-touched">{{ topic.last_touched|pretty_date }}</span> •
40 <span class="last-reply-username">最后回复来自
41 <a href="/u/{% if topic.last_replied_by.username %}{{ topic.last_replied_by.username }}{% else %}{{ topic.last_replied_by.id }}{% endif %}/">
42 <strong>{{ topic.last_replied_by.username }}</strong>
43 </a>
44 </span>
45 {% else %}
46 <span class="last-touched">{{ topic.last_touched|pretty_date }}</span>
47 {% endif %}
48 </div>
49 </div>
50 {% if topic.reply_count %}
51 <div class="count">
52 <a href="/t/{{ topic.id }}/#reply{% if topic.reply_count %}{{ topic.reply_count }}{% else %}0{% endif %}">{% if topic.reply_count %}{{ topic.reply_count }}{% else %}0{% endif %}</a>
53 </div>
54 {% endif %}
55 </div>
56 {% endfor %}
57
58 {% if topic_page.pages > 1 %}
59 <div class="pagination">
60 {% pagination topic_page request.get_full_path %}
61 </div>
62 {% endif %}
63 </div>
64
65 <div class="nodes-cloud container-box mt10">
66 <h4 class="title">
67 <span class="octicon octicon-globe"></span>
68 常见节点导航
69 </h4>
70 <ul>
71 {% for plane in planes %}
72 <li>
73 <label for="">{{ plane.name }}</label>
74 <span class="nodes">
75 {% for node in plane.node_set.all %}
76 <a href="/node/{{ node.slug }}/">{{ node.name }}</a>
77 {% endfor %}
78 </span>
79 </li>
80 {% endfor %}
81 </ul>
82 </div>
83 {% endblock %}
84
85 {% block sidebar %}
86 {% if user.is_authenticated %}
87 <div class="usercard container-box">
88 <div class="ui-header">
89 <a href="/u/{{ user.username }}/">
90 <img src="/static/avatar/m_{% if user.avatar %}{{ user.avatar }}{% else %}default.png{% endif %}?t={% gen_random %}" alt="" class="avatar" />
91 </a>
92 <div class="username">{{ user.username }}</div>
93 <div class="website"><a href="{% if user.website %}{{ user.website }}{% endif %}">{% if user.website %}{{ user.website }}{% endif %}</a></div>
94 </div>
95 <div class="ui-content">
96 <div class="status status-topic">
97 <strong><a href="/u/{{ user.username }}/topics/">{{ counter.topics }}</a></strong> 主题
98 </div>
99 <div class="status status-reply">
100 <strong><a href="/u/{{ user.username }}/replies/">{{ counter.replies }}</a></strong> 回复
101 </div>
102 <div class="status status-favorite">
103 <strong><a href="/u/{{ user.username }}/favorites/">{{ counter.favorites }}</a></strong> 收藏
104 </div>
105 <div class="status status-reputation">
106 <strong>{% if user.reputation %}{{ user.reputation }}{% else %}0{% endif %}</strong> 威望
107 </div>
108 </div>
109 </div>
110 {% else %}
111 <div class="login-box container-box">
112 <div class="ui-content tc">
113 <a class="btn btn-small mr10" type="button" href="/login/">登录</a>
114 <a class="btn btn-small mr10" type="button" href="/register/">注册</a>
115 <a class="btn btn-small" type="button" href="/forgot/">找回密码</a>
116 </div>
117 </div>
118 {% endif %}
119
120 <div class="sidebox container-box mt10 weixin">
121 <div class="ui-header">
122 <span class="title">微信公共帐号</span>
123 </div>
124 <div class="ui-content">
125 <img src="/static/images/qrcode_for_gh_81ac76ebf8e3_258.jpg" alt="" />
126 </div>
127 </div>
128
129 <div class="sidebox container-box mt10 hot-nodes">
130 <div class="ui-header">
131 <span class="title">最热节点</span>
132 </div>
133 <div class="ui-content">
134 {% for node in hot_nodes %}
135 <a href="/node/{{ node.slug }}/">{{ node.name }}</a>
136 {% endfor %}
137 </div>
138 </div>
139
140 <div class="sidebox container-box mt10 friends">
141 <div class="ui-header">
142 <span class="title">友情社区</span>
143 </div>
144 <div class="ui-content">
145 <p><a href="http://python-china.org"><img src="/static/images/python_china_logo.jpg" alt="" /></a></p>
146 <p><a href="http://ruby-china.org"><img src="/static/images/ruby_china_logo.png" alt="" /></a></p>
147 <p><a href="http://trans4fun.org"><img src="/static/images/trans4fun.png" alt="" /></a></p>
148 <p><a href="http://www.ubuntusoft.com"><img src="/static/images/ubuntusoft.png" alt="" style="width:190px;" /></a></p>
149 </div>
150 </div>
151
152 {% comment %}
153 <div class="sidebox container-box mt10 friends">
154 <div class="ui-header">
155 <span class="title">我们的标志</span>
156 </div>
157 <div class="ui-content">
158 <p><a href="http://f2e.im"><img src="/static/images/f2e.im.logo.png" alt="" /></a></p>
159 </div>
160 </div>
161 {% endcomment %}
162
163 <div class="sidebox container-box mt10 community-status">
164 <div class="ui-header">
165 <span class="title">运行状态</span>
166 </div>
167 <div class="ui-content">
168 <dl>
169 <dt>注册成员</dt>
170 <dd>{{ status_counter.users }}</dd>
171 </dl>
172 <dl>
173 <dt>节点</dt>
174 <dd>{{ status_counter.nodes }}</dd>
175 </dl>
176 <dl>
177 <dt>主题</dt>
178 <dd>{{ status_counter.topics }}</dd>
179 </dl>
180 <dl>
181 <dt>回复</dt>
182 <dd>{{ status_counter.replies }}</dd>
183 </dl>
184 </div>
185 </div>
186 </div>
187 {% endblock %}
188
forum/templates/topic/user_favorites.html
File was created 1 {% extends 'snippet/layout.html' %}
2 {% load forum_extras %}
3
4 {% block main %}
5 <div class="topics container-box user-topics">
6 <div class="ui-header">
7 <span class="bread-nav">小程序开发社区 › {{ user_info.username }} › 收藏的主题列表</span>
8 </div>
9
10 <div class="ui-content">
11 {% for favorite in favorites %}
12 <div class="topic-item">
13 <a href="/u/{{ favorite.involved_topic.author.username }}/">
14 <img src="/static/avatar/m_{% if favorite.involved_topic.author.avatar %}{{ favorite.involved_topic.author.avatar }}{% else %}default.png{% endif %}" alt="" class="avatar" />
15 </a>
16 <div class="main">
17 <h3 class="title">
18 <a href="/t/{{ favorite.involved_topic.id }}/">{{ favorite.involved_topic.title }}</a>
19 </h3>
20 <div class="meta">
21 <span class="node"><a href="/node/{{ favorite.involved_topic.node.slug }}/">{{ favorite.involved_topic.node.name }}</a></span> •
22 <span class="username">
23 <a href="/u/{% if favorite.involved_topic.author.username %}{{ favorite.involved_topic.author.username }}{% else %}{{ favorite.involved_topic.author.id }}{% endif %}/">{{ favorite.involved_topic.author.username }}</a>
24 </span> •
25 {% if favorite.involved_topic.last_replied_time %}
26 <span class="last-touched">{{ favorite.involved_topic.last_touched|pretty_date }}</span> •
27 <span class="last-reply-username">最后回复来自
28 <a href="/u/{% if favorite.involved_topic.last_replied_by.username %}{{ favorite.involved_topic.last_replied_by.username }}{% else %}{{ favorite.involved_topic.last_replied_by.id }}{% endif %}/">
29 <strong>{{ favorite.involved_topic.last_replied_by.username }}</strong>
30 </a>
31 </span>
32 {% else %}
33 <span class="last-touched">{{ favorite.involved_topic.last_touched|pretty_date }}</span>
34 {% endif %}
35 </div>
36 </div>
37 {% if favorite.involved_topic.reply_count %}
38 <div class="count">
39 <a href="/t/{{ favorite.involved_topic.id }}/#reply{% if favorite.involved_topic.reply_count %}{{ favorite.involved_topic.reply_count }}{% else %}0{% endif %}">{% if favorite.involved_topic.reply_count %}{{ favorite.involved_topic.reply_count }}{% else %}0{% endif %}</a>
40 </div>
41 {% endif %}
42 </div>
43 {% endfor %}
44
45 {% ifequal favorite_page.total 0 %}
46 <div class="pl10 pr10">
47 <div class="alert mt20 no-favorites">
48 该用户暂时还没有收藏过主题。
49 </div>
50 </div>
51 {% endifequal %}
52 </div>
53
54 <div class="ui-footer">
55 {% if favorite_page.pages > 1 %}
56 <div class="pagination">
57 {% pagination favorite_page request.get_full_path %}
58 </div>
59 {% endif %}
60 </div>
61 </div>
62 {% endblock %}
63
64 {% block sidebar %}
65 <div class="usercard container-box">
66 <div class="ui-header">
67 <a href="/u/{{ user_info.username }}/">
68 <img src="/static/avatar/m_{% if user_info.avatar %}{{ user_info.avatar }}{% else %}default.png{% endif %}?t={% gen_random %}" alt="" class="avatar" />
69 </a>
70 <div class="username">{{ user_info.username }}</div>
71 <div class="website">{% if user_info.website %}{{ user_info.website }}{% endif %}</div>
72 </div>
73 <div class="ui-content">
74 <div class="status status-topic">
75 <strong><a href="/u/{{ user_info.username }}/topics/">{{ counter.topics }}</a></strong> 主题
76 </div>
77 <div class="status status-reply">
78 <strong><a href="/u/{{ user_info.username }}/replies/">{{ counter.replies }}</a></strong> 回复
79 </div>
80 <div class="status status-favorite">
81 <strong><a href="/u/{{ user_info.username }}/favorites/">{{ counter.favorites }}</a></strong> 收藏
82 </div>
83 <div class="status status-reputation">
84 <strong>{% if user_info.reputation %}{{ user_info.reputation }}{% else %}0{% endif %}</strong> 威望
85 </div>
86 </div>
87 </div>
88 </div>
89 {% endblock %}
90
forum/templates/topic/user_replies.html
File was created 1 {% extends 'snippet/layout.html' %}
2 {% load forum_extras %}
3
4 {% block stylesheet %}
5 <link rel="stylesheet" href="/static/css/codehilite.css" />
6 {% endblock %}
7
8 {% block main %}
9 <div class="replies-lists container-box user-replies">
10 <div class="ui-header">
11 <span class="bread-nav">小程序开发社区 › {{ user_info.username }} › 回复列表</span>
12 </div>
13
14 <div class="ui-content">
15 {% for reply in replies %}
16 <div class="reply-item">
17 <div class="main">
18 <span class="title">
19 回复了 {{ reply.topic.author.username }} 创建的主题 <a href="/t/{{ reply.topic.id }}/">{{ reply.topic.title }}</a>
20 </span>
21 <div class="content">
22 {{ reply.content|markdown|content_process|safe }}
23 </div>
24 </div>
25 </div>
26 {% endfor %}
27
28 {% ifequal reply_page.total 0 %}
29 <div class="pl10 pr10">
30 <div class="alert mt20 no-replies">
31 该用户暂时还没有回复过主题。
32 </div>
33 </div>
34 {% endifequal %}
35 </div>
36
37 <div class="ui-footer">
38 {% if reply_page.pages > 1 %}
39 <div class="pagination">
40 {% pagination reply_page request.get_full_path %}
41 </div>
42 {% endif %}
43 </div>
44 </div>
45 {% endblock %}
46
47 {% block sidebar %}
48 <div class="usercard container-box">
49 <div class="ui-header">
50 <a href="/u/{{ user_info.username }}/">
51 <img src="/static/avatar/m_{% if user_info.avatar %}{{ user_info.avatar }}{% else %}default.png{% endif %}?t={% gen_random %}" alt="" class="avatar" />
52 </a>
53 <div class="username">{{ user_info.username }}</div>
54 <div class="website"><a href="{% if user_info.website %}{{ user_info.website }}{% endif %}">{% if user_info.website %}{{ user_info.website }}{% endif %}</a></div>
55 </div>
56 <div class="ui-content">
57 <div class="status status-topic">
58 <strong><a href="/u/{{ user_info.username }}/topics/">{{ counter.topics }}</a></strong> 主题
59 </div>
60 <div class="status status-reply">
61 <strong><a href="/u/{{ user_info.username }}/replies/">{{ counter.replies }}</a></strong> 回复
62 </div>
63 <div class="status status-favorite">
64 <strong><a href="/u/{{ user_info.username }}/favorites/">{{ counter.favorites }}</a></strong> 收藏
65 </div>
66 <div class="status status-reputation">
67 <strong>{% if user_info.reputation %}{{ user_info.reputation }}{% else %}0{% endif %}</strong> 威望
68 </div>
69 </div>
70 </div>
71 </div>
72 {% endblock %}
73
forum/templates/topic/user_topics.html
File was created 1 {% extends 'snippet/layout.html' %}
2 {% load forum_extras %}
3
4 {% block main %}
5 <div class="topics container-box user-topics">
6 <div class="ui-header">
7 <span class="bread-nav">小程序开发社区 › {{ user_info.username }} › 主题列表</span>
8 </div>
9
10 <div class="ui-content">
11 {% for topic in topics %}
12 <div class="topic-item">
13 <a href="/u/{{ topic.author.username }}/">
14 <img src="/static/avatar/m_{% if topic.author.avatar %}{{ topic.author.avatar }}{% else %}default.png{% endif %}" alt="" class="avatar" />
15 </a>
16 <div class="main">
17 <h3 class="title">
18 <a href="/t/{{ topic.id }}/">{{ topic.title }}</a>
19 </h3>
20 <div class="meta">
21 <span class="node"><a href="/node/{{ topic.node.slug }}/">{{ topic.node.name }}</a></span> •
22 <span class="username">
23 <a href="/u/{% if topic.author.username %}{{ topic.author.username }}{% else %}{{ topic.author.id }}{% endif %}/">{{ topic.author.username }}</a>
24 </span> •
25 {% if topic.last_replied_time %}
26 <span class="last-touched">{{ topic.last_touched|pretty_date }}</span> •
27 <span class="last-reply-username">最后回复来自
28 <a href="/u/{% if topic.last_replied_by.username %}{{ topic.last_replied_by.username }}{% else %}{{ topic.last_replied_by.id }}{% endif %}/">
29 <strong>{{ topic.last_replied_by.username }}</strong>
30 </a>
31 </span>
32 {% else %}
33 <span class="last-touched">{{ topic.last_touched|pretty_date }}</span>
34 {% endif %}
35 </div>
36 </div>
37 {% if topic.reply_count %}
38 <div class="count">
39 <a href="/t/{{ topic.id }}/#reply{% if topic.reply_count %}{{ topic.reply_count }}{% else %}0{% endif %}">{% if topic.reply_count %}{{ topic.reply_count }}{% else %}0{% endif %}</a>
40 </div>
41 {% endif %}
42 </div>
43 {% endfor %}
44
45 {% ifequal topic_page.total 0 %}
46 <div class="pl10 pr10">
47 <div class="alert mt20 no-topics">
48 该用户暂时还没有发表过主题。
49 </div>
50 </div>
51 {% endifequal %}
52 </div>
53
54 <div class="ui-footer">
55 {% if topic_page.pages > 1 %}
56 <div class="pagination">
57 {% pagination topic_page request.get_full_path %}
58 </div>
59 {% endif %}
60 </div>
61 </div>
62 {% endblock %}
63
64 {% block sidebar %}
65 <div class="usercard container-box">
66 <div class="ui-header">
67 <a href="/u/{{ user_info.username }}/">
68 <img src="/static/avatar/m_{% if user_info.avatar %}{{ user_info.avatar }}{% else %}default.png{% endif %}?t={% gen_random %}" alt="" class="avatar" />
69 </a>
70 <div class="username">{{ user_info.username }}</div>
71 <div class="website"><a href="{% if user_info.website %}{{ user_info.website }}{% endif %}">{% if user_info.website %}{{ user_info.website }}{% endif %}</a></div>
72 </div>
73 <div class="ui-content">
74 <div class="status status-topic">
75 <strong><a href="/u/{{ user_info.username }}/topics/">{{ counter.topics }}</a></strong> 主题
76 </div>
77 <div class="status status-reply">
78 <strong><a href="/u/{{ user_info.username }}/replies/">{{ counter.replies }}</a></strong> 回复
79 </div>
80 <div class="status status-favorite">
81 <strong><a href="/u/{{ user_info.username }}/favorites/">{{ counter.favorites }}</a></strong> 收藏
82 </div>
83 <div class="status status-reputation">
84 <strong>{% if user_info.reputation %}{{ user_info.reputation }}{% else %}0{% endif %}</strong> 威望
85 </div>
86 </div>
87 </div>
88 </div>
89 {% endblock %}
90
forum/templates/topic/view.html
File was created 1 {% extends 'snippet/layout.html' %}
2 {% load forum_extras %}
3
4 {% block title %}
5 {{ topic.title }} - 小程序开发社区
6 {% endblock %}
7
8 {% block stylesheet %}
9 <link rel="stylesheet" href="/static/css/codehilite.css" />
10 {% endblock %}
11
12 {% block javascript %}
13 <script type="text/x-mathjax-config">
14 MathJax.Hub.Config({
15 tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}
16 });
17 </script>
18 <script type="text/javascript" src="https://c328740.ssl.cf1.rackcdn.com/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
19 <script type="text/javascript" src="/static/js/widget/emmet.min.js"></script>
20 <script type="text/javascript" src="/static/js/widget/jquery.textarea.min.js"></script>
21 <script type="text/javascript">
22 jQuery(document).ready(function() {
23 $('textarea.smart-code-support').tabby();
24 emmet.require('textarea').setup({
25 pretty_break: false, // enable formatted line breaks (when inserting // between opening and closing tag)
26 use_tab: false // expand abbreviations by Tab key
27 });
28 });
29 </script>
30 <script type="text/javascript">
31 jQuery(document).ready(function() {
32 $('.J_topicVote').click(function(e) {
33 var _node = $(this);
34 var _errorMap = {
35 topic_not_exist: '主题不存在',
36 can_not_vote_your_topic: '不能喜欢自己的主题',
37 already_voted: '感谢已经表示过',
38 };
39 e.preventDefault();
40 $.getJSON(_node.attr('href'), function(data) {
41 if(data.success) {
42 _node.html('<span class="f11 gray" style="text-shadow: 0px 1px 0px #fff;">感谢已表示</span>');
43 } else {
44 _node.html('<span>' + _errorMap[data.message] + '</span>');
45 }
46 });
47 });
48
49 $('.J_topicFavorite').click(function(e) {
50 var _node = $(this);
51 var _type = _node.attr('data-type');
52 var _href = _node.attr('href').replace(/\/[^\?]+/igm, '/' + _type);
53 var _errorMap = {
54 topic_not_exist: '主题不存在',
55 can_not_favorite_your_topic: '不能收藏自己的主题',
56 already_favorited: '之前已经收藏过了',
57 user_not_login: '收藏失败',
58 not_been_favorited: '之前还没有收藏过',
59 };
60 e.preventDefault();
61 _node.attr('href', _href);
62 $.getJSON(_node.attr('href'), function(data) {
63 if(data.success) {
64 //_node.html('<span class="f11 gray" style="text-shadow: 0px 1px 0px #fff;">收藏成功</span>');
65 if(_type === 'favorite') {
66 _node.html('取消收藏');
67 _node.attr('data-type', 'unfavorite');
68 }
69
70 if(_type === 'unfavorite') {
71 _node.html('加入收藏');
72 _node.attr('data-type', 'favorite');
73 }
74 } else {
75 _node.html('<span>' + _errorMap[data.message] + '</span>');
76 }
77 });
78 });
79
80 $('.J_replyTo').click(function(e) {
81 username = $(this).attr('data-username');
82 replyContent = $('.J_replyContent');
83 oldContent = replyContent.val();
84 prefix = "@" + username + " ";
85 newContent = '';
86 if(oldContent.length > 0){
87 if (oldContent != prefix) {
88 newContent = oldContent + "\n" + prefix;
89 }
90 } else {
91 newContent = prefix;
92 }
93 replyContent.focus();
94 replyContent.val(newContent);
95 });
96
97 $('.J_replyContent').keydown(function(e) {
98 if((e.ctrlKey || e.metaKey) && e.which === 13) {
99 e.preventDefault();
100 $(e.currentTarget).parent('form').submit();
101 }
102 });
103 });
104 </script>
105 {% endblock %}
106
107 {% block main %}
108 <div class="topic-detail container-box">
109 <div class="ui-header">
110 <a href="/u/{% if topic.author.username %}{{ topic.author.username }}{% else %}{{ topic.author.id }}{% endif %}/">
111 <img src="/static/avatar/m_{% if topic.author.avatar %}{{ topic.author.avatar }}{% else %}default.png{% endif %}?t={% gen_random %}" alt="" class="avatar" />
112 </a>
113 <div class="main">
114 <h3 class="title">{{ topic.title }}</h3>
115 <div class="meta">
116 <span class="node"><a href="/node/{{ topic.node.slug }}/">{{ topic.node.name }}</a></span> •
117 <span class="username">
118 <a href="/u/{% if topic.author.username %}{{ topic.author.username }}{% else %}{{ topic.author.id }}{% endif %}/">{{ topic.author.username }}</a>
119 </span> •
120 {% if topic.last_replied_time %}
121 <span class="created-time">发表于 {{ topic.created|pretty_date }}</span> •
122 <span class="last-reply-username">最后回复来自
123 <a href="/u/{% if topic.last_replied_by.username %}{{ topic.last_replied_by.username }}{% else %}{{ topic.last_replied_by.id }}{% endif %}/">
124 <strong>{{ topic.last_replied_by.username }}</strong>
125 </a>
126 </span> •
127 <span class="last-reply-time">{{ topic.last_replied_time|pretty_date }}</span>
128 {% else %}
129 <span class="created-time">发表于 {{ topic.created|pretty_date }}</span>
130 {% endif %}
131 </div>
132 </div>
133 </div>
134 <div class="ui-content">
135 {{ topic.content|markdown|content_process|safe }}
136 </div>
137 <div class="ui-footer">
138 {% if not topic_favorited %}
139 <a href="/favorite/?topic_id={{ topic.id }}" class="J_topicFavorite" data-type="favorite">加入收藏</a>
140 {% else %}
141 <a href="/unfavorite/?topic_id={{ topic.id }}" class="J_topicFavorite" data-type="unfavorite">取消收藏</a>
142 {% endif %}
143 <a href="#" onclick="window.open('https://twitter.com/intent/tweet?hashtags={{ topic.node.slug }}&text={{ topic.title }}&url=http://{{ request.get_host }}{{ request.get_full_path }}');">Tweet</a>
144 <a href="#" onclick="window.open('http://service.weibo.com/share/share.php?url=http://{{ request.get_host }}{{ request.get_full_path }}&title=F2E%20-%20{{ topic.title }}', '_blank', 'width=550, height=370');">新浪微博</a>
145 <a href="/vote/?topic_id={{ topic.id }}" class="J_topicVote">喜欢</a>
146 {% if user.is_authenticated and user.id == topic.author.id %}
147 <a href="/t/edit/{{ topic.id }}/" class="fr">编辑主题</a>
148 {% endif %}
149 <span class="hits fr mr10">{% if topic.hits %}{{ topic.hits }}{% else %}0{% endif %} 次点击</span>
150 </div>
151 </div>
152
153 {% ifnotequal reply_page.total 0 %}
154 <div class="topic-reply container-box mt10">
155 <div class="ui-header">
156 <span>共收到{{ reply_page.total }}条回复</span>
157 </div>
158 <div class="ui-content">
159 {% for reply in replies %}
160 <div id="reply{{ floor|add:forloop.counter }}" class="reply-item">
161 <a href="/u/{{ reply.author.username }}/">
162 <img src="/static/avatar/m_{% if reply.author.avatar %}{{ reply.author.avatar }}{% else %}default.png{% endif %}?t={% gen_random %}" alt="" class="avatar" />
163 </a>
164 <div class="main">
165 <div class="meta">
166 <a href="/u/{{ reply.author.username }}/" class="reply-username">
167 <span class="username">{{ reply.author.username }}</span>
168 </a>
169 <span class="time">{{ reply.created|pretty_date }}</span>
170 {% if user.is_authenticated %}
171 {% ifequal user.id reply.author.id %}
172 <a href="/reply/edit/{{ reply.id }}/">编辑回复</a>
173 {% endifequal %}
174 {% endif %}
175 <span class="floor fr">#{{ floor|add:forloop.counter }}</span>
176 <span class="reply-to fr J_replyTo" data-username="{{ reply.author.username }}">
177 <img src="/static/images/reply.png" alt="" />
178 </span>
179 </div>
180 <span class="content">{{ reply.content|markdown|content_process|safe }}</span>
181 </div>
182 </div>
183 {% endfor %}
184 </div>
185 <div class="ui-footer">
186 {% if reply_page.pages > 1 %}
187 <div class="pagination pagination-mini">
188 {% pagination reply_page request.get_full_path %}
189 </div>
190 {% endif %}
191 </div>
192 </div>
193 {% else %}
194 <div class="alert mt20 no-replies">
195 暂无回复,说出你的观点吧
196 </div>
197 {% endifnotequal %}
198
199 <div class="topic-reply-create container-box mt10">
200 {% if user.is_authenticated %}
201 <div class="ui-header">
202 <span class="title">创建新的回复</span>
203 </div>
204 <div class="ui-content">
205 <form class="mt10" action="" method="post">
206 {{ errors|dump_errors }}
207 <textarea rows="3" class="content mt5 smart-code-support J_replyContent" placeholder="回复内容" name="content"></textarea>
208 <input type="submit" id="checkall" class="btn btn-small" value="立即回复">
209 {% csrf_token %}
210 </form>
211 </div>
212 {% else %}
213 <div class="ui-header">
214 <span class="title">登录后即可参与回复</span>
215 </div>
216 <div class="ui-content">
217 <a class="btn btn-small mt5 mr10" type="button" href="/login/?next={{ request.get_full_path }}">登录</a>
218 <a class="btn btn-small mt5" type="button" href="/register/">注册</a>
219 </div>
220 {% endif %}
221 </div>
222 {% endblock %}
223
224 {% block sidebar %}
225 {% if user.is_authenticated %}
226 <div class="usercard container-box">
227 <div class="ui-header">
228 <a href="/u/{{ user.username }}/">
229 <img src="/static/avatar/m_{% if user.avatar %}{{ user.avatar }}{% else %}default.png{% endif %}?t={% gen_random %}" alt="" class="avatar" />
230 </a>
231 <div class="username">{{ user.username }}</div>
232 <div class="website"><a href="{% if user.website %}{{ user.website }}{% endif %}">{% if user.website %}{{ user.website }}{% endif %}</a></div>
233 </div>
234 <div class="ui-content">
235 <div class="status status-topic">
236 <strong><a href="/u/{{ user.username }}/topics/">{{ counter.topics }}</a></strong> 主题
237 </div>
238 <div class="status status-reply">
239 <strong><a href="/u/{{ user.username }}/replies/">{{ counter.replies }}</a></strong> 回复
240 </div>
241 <div class="status status-favorite">
242 <strong><a href="/u/{{ user.username }}/favorites/">{{ counter.favorites }}</a></strong> 收藏
243 </div>
244 <div class="status status-reputation">
245 <strong>{% if user.reputation %}{{ user.reputation }}{% else %}0{% endif %}</strong> 威望
246 </div>
247 </div>
248 </div>
249 {% else %}
250 <div class="login-box container-box">
251 <div class="ui-content tc">
252 <a class="btn btn-small mr10" type="button" href="/login/?next={{ request.get_full_path }}">登录</a>
253 <a class="btn btn-small mr10" type="button" href="/register/">注册</a>
254 <a class="btn btn-small" type="button" href="/forgot/">找回密码</a>
255 </div>
256 </div>
257 {% endif %}
258 {% endblock %}
259
forum/templates/user/forgot_password.html
File was created 1 {% extends 'snippet/layout.html' %}
2 {% load forum_extras %}
3
4
5 {% block main %}
6 <div class="container-box">
7 <form class="form-horizontal" action='' method="POST">
8 <fieldset>
9 <div id="legend" class="mb50">
10 <legend class="">找回密码</legend>
11 </div>
12 {% if success_message %}
13 <ul class="alert alert-success">
14 <li>{{ success_message }}</li>
15 </ul>
16 {% endif %}
17 {{ errors|dump_errors }}
18 <div class="control-group">
19 <!-- Username -->
20 <label class="control-label" for="username">用户名</label>
21 <div class="controls">
22 <input type="text" id="username" name="username" placeholder="" class="input-xlarge">
23 <p class="help-block">用户名由字母开头,只能含有字母、数字或者下划线</p>
24 </div>
25 </div>
26
27 <div class="control-group">
28 <!-- E-mail -->
29 <label class="control-label" for="email">E-mail</label>
30 <div class="controls">
31 <input type="text" id="email" name="email" placeholder="" class="input-xlarge">
32 <p class="help-block">请输入你的E-mail,新密码将发送到这里</p>
33 </div>
34 </div>
35
36 <div class="control-group">
37 <!-- Button -->
38 <div class="controls">
39 <button class="btn btn-success">找回密码</button>
40 </div>
41 </div>
42 </fieldset>
43 {% csrf_token %}
44 </form>
45 </div>
46 {% endblock %}
47
48 {% block sidebar %}
49 <div class="sidenav container-box">
50 <ul>
51 <li class="current"><a href="/setting/">用户中心</a></li>
52 <li><a href="/setting/avatar/">设置头像</a></li>
53 <li><a href="/setting/password/">设置密码</a></li>
54 <li><a href="/">返回首页</a></li>
55 </ul>
56 </div>
57 {% endblock %}
58
forum/templates/user/forgot_password_mail.html
File was created 1 <!DOCTYPE HTML>
2 <html lang="en">
3 <head>
4 <meta charset="UTF-8">
5 <title></title>
6 </head>
7 <body>
8 <div class="description">Welcome to 小程序开发社区.</div>
9 <div class="title">您成功重置了您在小程序开发社区的会员密码</div>
10
11 <div class="body">
12 <br />
13 # 您的注册邮箱:{{ email }}<br />
14 # 您的随机密码:{{ new_password }}<br />
15 # 请您尽快登陆小程序开发社区修改当前随机密码
16 </div>
17 </body>
18 </html>
19
forum/templates/user/login.html
File was created 1 {% extends 'snippet/layout.html' %}
2 {% load forum_extras %}
3
4 {% block main %}
5 <div class="container-box">
6 <form class="form-horizontal" action='' method="POST">
7 <fieldset>
8 <div id="legend" class="mb50">
9 <legend class="">登录</legend>
10 </div>
11 {{ errors|dump_errors }}
12 <div class="control-group">
13 <!-- E-mail -->
14 <label class="control-label" for="username">用户名</label>
15 <div class="controls">
16 <input type="text" id="username" name="username" placeholder="" class="input-xlarge">
17 <p class="help-block">请输入您注册时所填的用户名</p>
18 </div>
19 </div>
20
21 <div class="control-group">
22 <!-- Password-->
23 <label class="control-label" for="password">密码</label>
24 <div class="controls">
25 <input type="password" id="password" name="password" placeholder="" class="input-xlarge">
26 <p class="help-block">请输入您的密码(不少于4个字符)</p>
27 </div>
28 </div>
29
30 <div class="control-group">
31 <!-- Button -->
32 <div class="controls">
33 <button class="btn btn-success">登录</button>
34 <a href="/register/" class="ml10 mr10 btn">注册账号</a>
35 <a href="/forgot/" class="btn">忘记密码了</a>
36 </div>
37 </div>
38 </fieldset>
39 {% csrf_token %}
40 </form>
41 </div>
42 {% endblock %}
43
44 {% block sidebar %}
45 <div class="sidenav container-box">
46 <ul>
47 <li class="current"><a href="/setting/">用户中心</a></li>
48 <li><a href="/setting/avatar/">设置头像</a></li>
49 <li><a href="/setting/password/">设置密码</a></li>
50 <li><a href="/">返回首页</a></li>
51 </ul>
52 </div>
53 {% endblock %}
54
forum/templates/user/register.html
File was created 1 {% extends 'snippet/layout.html' %}
2 {% load forum_extras %}
3
4 {% block main %}
5 <div class="container-box">
6 <form class="form-horizontal" action='' method="POST">
7 <fieldset>
8 <div id="legend" class="mb50">
9 <legend class="">注册</legend>
10 </div>
11 {{ errors|dump_errors }}
12 <div class="control-group">
13 <!-- Username -->
14 <label class="control-label" for="username">用户名</label>
15 <div class="controls">
16 <input type="text" id="username" name="username" placeholder="" class="input-xlarge">
17 <p class="help-block">用户名由字母开头,只能含有字母、数字或者下划线</p>
18 </div>
19 </div>
20
21 <div class="control-group">
22 <!-- E-mail -->
23 <label class="control-label" for="email">E-mail</label>
24 <div class="controls">
25 <input type="text" id="email" name="email" placeholder="" class="input-xlarge">
26 <p class="help-block">请输入你的E-mail,便于登录和找回密码</p>
27 </div>
28 </div>
29
30 <div class="control-group">
31 <!-- Password-->
32 <label class="control-label" for="password">密码</label>
33 <div class="controls">
34 <input type="password" id="password" name="password" placeholder="" class="input-xlarge">
35 <p class="help-block">密码不少于4个字符</p>
36 </div>
37 </div>
38
39 <div class="control-group">
40 <!-- Password -->
41 <label class="control-label" for="password_confirm">密码(确认)</label>
42 <div class="controls">
43 <input type="password" id="password_confirm" name="password_confirm" placeholder="" class="input-xlarge">
44 <p class="help-block">请再次输入密码</p>
45 </div>
46 </div>
47
48 <div class="control-group">
49 <!-- Button -->
50 <div class="controls">
51 <button class="btn btn-success">注册</button>
52 </div>
53 </div>
54 </fieldset>
55 {% csrf_token %}
56 </form>
57 </div>
58 {% endblock %}
59
60 {% block sidebar %}
61 <div class="intro container-box sidebox">
62 <div class="ui-header">
63 <span class="title">关于</span>
64 </div>
65 <div class="ui-content">
66 <p>
67 小程序开发社区是一个分享开发微信小程序的平台。
68 </p>
69 </div>
70 </div>
71 {% endblock %}
72
forum/templates/user/register_mail.html
File was created 1 <!DOCTYPE HTML>
2 <html lang="en">
3 <head>
4 <meta charset="UTF-8">
5 <title></title>
6 </head>
7 <body>
8 <div class="description">Welcome to 小程序开发社区.</div>
9 <div class="title">欢迎您,成功注册成为小程序开发社区会员</div>
10
11 <div class="body">
12 <br />
13 </div>
14 </body>
15 </html>
16
forum/templates/user/setting.html
File was created 1 {% extends 'snippet/layout.html' %}
2 {% load forum_extras %}
3
4 {% block main %}
5 <div class="container-box">
6 <form class="form-horizontal setting" action='' method="POST">
7 <fieldset>
8 <div id="legend">
9 <legend class="">用户信息设置</legend>
10 </div>
11 {% if success_message %}
12 <ul class="alert alert-success">
13 <li>{{ success_message }}</li>
14 </ul>
15 {% endif %}
16 {{ errors|dump_errors }}
17 <div class="control-group">
18 <!-- Avatar -->
19 <label class="control-label" for="username">头像</label>
20 <div class="controls">
21 <img src="/static/avatar/b_{% if user.avatar %}{{ user.avatar }}{% else %}default.png{% endif %}?t={% gen_random %}" alt="" class="avatar" />
22 <img src="/static/avatar/m_{% if user.avatar %}{{ user.avatar }}{% else %}default.png{% endif %}?t={% gen_random %}" alt="" class="avatar" />
23 <img src="/static/avatar/s_{% if user.avatar %}{{ user.avatar }}{% else %}default.png{% endif %}?t={% gen_random %}" alt="" class="avatar" />
24 <a href="/setting/avatar/" class="btn btn-block set-avatar-btn">设置头像</a>
25 </div>
26 </div>
27
28 <div class="control-group">
29 <!-- Username -->
30 <label class="control-label" for="username">用户名</label>
31 <div class="controls">
32 <input type="text" id="username" name="username" placeholder="" class="input-xlarge" value="{% if user.username %}{{ user.username }}{% endif %}" readonly>
33 <p class="help-block">用户名由字母开头,只能含有字母、数字或者下划线</p>
34 </div>
35 </div>
36
37 <div class="control-group">
38 <!-- E-mail -->
39 <label class="control-label" for="email">E-mail</label>
40 <div class="controls">
41 <input type="text" id="email" name="email" placeholder="" class="input-xlarge" value="{% if user.email %}{{ user.email }}{% endif %}" readonly>
42 <p class="help-block">你的E-mail,便于登录和找回密码</p>
43 </div>
44 </div>
45
46 <div class="control-group">
47 <!-- Nickname -->
48 <label class="control-label" for="nickname">昵称</label>
49 <div class="controls">
50 <input type="text" id="nickname" name="nickname" placeholder="" class="input-xlarge" value="{% if user.nickname %}{{ user.nickname }}{% endif %}">
51 <p class="help-block">你的昵称,便于其他人更好的认识你</p>
52 </div>
53 </div>
54
55 <div class="control-group">
56 <!-- E-mail -->
57 <label class="control-label" for="signature">个性签名</label>
58 <div class="controls">
59 <input type="text" id="signature" name="signature" placeholder="" class="input-xlarge" value="{% if user.signature %}{{ user.signature }}{% endif %}">
60 <p class="help-block">你的签名,将展示在你的个人资料页面</p>
61 </div>
62 </div>
63
64 <div class="control-group">
65 <!-- Location -->
66 <label class="control-label" for="location">城市</label>
67 <div class="controls">
68 <input type="text" id="location" name="location" placeholder="" class="input-xlarge" value="{% if user.location %}{{ user.location }}{% endif %}">
69 <p class="help-block">你的城市,有助于后续你在社区的交友</p>
70 </div>
71 </div>
72
73 <div class="control-group">
74 <!-- E-mail -->
75 <label class="control-label" for="website">个人网站</label>
76 <div class="controls">
77 <input type="text" id="website" name="website" placeholder="" class="input-xlarge" value="{% if user.website %}{{ user.website }}{% endif %}">
78 <p class="help-block">你的个人网站,让你的朋友了解你更多一点</p>
79 </div>
80 </div>
81
82 <div class="control-group">
83 <!-- E-mail -->
84 <label class="control-label" for="company">所在公司</label>
85 <div class="controls">
86 <input type="text" id="company" name="company" placeholder="" class="input-xlarge" value="{% if user.company %}{{ user.company }}{% endif %}">
87 <p class="help-block">你所在的公司,让你的朋友了解你更多一点</p>
88 </div>
89 </div>
90
91 <div class="control-group">
92 <!-- E-mail -->
93 <label class="control-label" for="github">Github用户名:</label>
94 <div class="controls">
95 <input type="text" id="github" name="github" placeholder="" class="input-xlarge" value="{% if user.github %}{{ user.github }}{% endif %}">
96 <p class="help-block">你的Github用户名,用以在你的个人页面展示你的开源项目。</p>
97 </div>
98 </div>
99
100 <div class="control-group">
101 <!-- E-mail -->
102 <label class="control-label" for="twitter">Twitter用户名:</label>
103 <div class="controls">
104 <input type="text" id="twitter" name="twitter" placeholder="" class="input-xlarge" value="{% if user.twitter %}{{ user.twitter }}{% endif %}">
105 <p class="help-block">你的Twitter用户名,用以在你的个人页面展示你的Twitter地址。</p>
106 </div>
107 </div>
108
109 <div class="control-group">
110 <!-- E-mail -->
111 <label class="control-label" for="douban">豆瓣用户名:</label>
112 <div class="controls">
113 <input type="text" id="douban" name="douban" placeholder="" class="input-xlarge" value="{% if user.douban %}{{ user.douban }}{% endif %}">
114 <p class="help-block">你的豆瓣用户名,用以在你的个人页面展示你正在读的书。</p>
115 </div>
116 </div>
117
118 <div class="control-group">
119 <!-- E-mail -->
120 <label class="control-label" for="self_intro">个人简介:</label>
121 <div class="controls">
122 <textarea type="text" id="self_intro" name="self_intro" placeholder="" class="input-xlarge">{% if user.self_intro %}{{ user.self_intro }}{% endif %}</textarea>
123 <p class="help-block">可以稍微详细的介绍自己。</p>
124 </div>
125 </div>
126
127 <div class="control-group">
128 <!-- Button -->
129 <div class="controls">
130 <button class="btn btn-success">保存改动</button>
131 <a href="/setting/password/" class="ml10 btn">设置密码</a>
132 </div>
133 </div>
134 </fieldset>
135 {% csrf_token %}
136 </form>
137 </div>
138 {% endblock %}
139
140 {% block sidebar %}
141 <div class="sidenav container-box">
142 <ul>
143 <li class="current"><a href="/setting/">用户中心</a></li>
144 <li><a href="/setting/avatar/">设置头像</a></li>
145 <li><a href="/setting/password/">设置密码</a></li>
146 <li><a href="/">返回首页</a></li>
147 </ul>
148 </div>
149 {% endblock %}
150
forum/templates/user/setting_avatar.html
File was created 1 {% extends 'snippet/layout.html' %}
2 {% load forum_extras %}
3
4 {% block main %}
5 <div class="container-box">
6 <form class="form-horizontal" action='' method="POST" enctype="multipart/form-data">
7 <fieldset>
8 <div id="legend">
9 <legend class="">用户头像设置</legend>
10 </div>
11 {{ errors|dump_errors }}
12 <div class="control-group">
13 <!-- Avatar -->
14 <label class="control-label" for="username">头像</label>
15 <div class="controls">
16 <img src="/static/avatar/b_{% if user.avatar %}{{ user.avatar }}{% else %}default.png{% endif %}?t={% gen_random %}" alt="" class="avatar" />
17 <img src="/static/avatar/m_{% if user.avatar %}{{ user.avatar }}{% else %}default.png{% endif %}?t={% gen_random %}" alt="" class="avatar" />
18 <img src="/static/avatar/s_{% if user.avatar %}{{ user.avatar }}{% else %}default.png{% endif %}?t={% gen_random %}" alt="" class="avatar" />
19 <a href="/setting/avatar/">设置头像</a>
20 </div>
21 </div>
22
23 <div class="control-group">
24 <!-- Avatar-->
25 <label class="control-label" for="avatar">上传</label>
26 <div class="controls">
27 <input type="file" id="avatar" name="avatar" placeholder="" class="input-xlarge">
28 <p class="help-block">请选择要上传的头像文件</p>
29 </div>
30 </div>
31
32 <div class="control-group">
33 <!-- Button -->
34 <div class="controls">
35 <button class="btn btn-success">保存改动</button>
36 <a href="/setting/" class="ml10 btn">返回设置页</a>
37 </div>
38 </div>
39 </fieldset>
40 {% csrf_token %}
41 </form>
42 </div>
43 {% endblock %}
44
45 {% block sidebar %}
46 <div class="sidenav container-box">
47 <ul>
48 <li><a href="/setting/">用户中心</a></li>
49 <li class="current"><a href="/setting/avatar/">设置头像</a></li>
50 <li><a href="/setting/password/">设置密码</a></li>
51 <li><a href="/">返回首页</a></li>
52 </ul>
53 </div>
54 {% endblock %}
55
forum/templates/user/setting_password.html
File was created 1 {% extends 'snippet/layout.html' %}
2 {% load forum_extras %}
3
4 {% block main %}
5 <div class="container-box">
6 <form class="form-horizontal" action='' method="POST">
7 <fieldset>
8 <div id="legend">
9 <legend class="">用户密码设置</legend>
10 </div>
11 {% if success_message %}
12 <ul class="alert alert-success">
13 <li>{{ success_message }}</li>
14 </ul>
15 {% endif %}
16 {{ errors|dump_errors }}
17 <div class="control-group">
18 <!-- Password-->
19 <label class="control-label" for="password_old">当前密码</label>
20 <div class="controls">
21 <input type="password" id="password_old" name="password_old" placeholder="" class="input-xlarge">
22 <p class="help-block">密码不少于4个字符</p>
23 </div>
24 </div>
25
26 <div class="control-group">
27 <!-- Password-->
28 <label class="control-label" for="password">新密码</label>
29 <div class="controls">
30 <input type="password" id="password" name="password" placeholder="" class="input-xlarge">
31 <p class="help-block">密码不少于4个字符</p>
32 </div>
33 </div>
34
35 <div class="control-group">
36 <!-- Password -->
37 <label class="control-label" for="password_confirm">新密码(确认)</label>
38 <div class="controls">
39 <input type="password" id="password_confirm" name="password_confirm" placeholder="" class="input-xlarge">
40 <p class="help-block">请再次输入新密码</p>
41 </div>
42 </div>
43
44 <div class="control-group">
45 <!-- Button -->
46 <div class="controls">
47 <button class="btn btn-success">保存改动</button>
48 <a href="/setting/" class="ml10 btn">返回设置页</a>
49 </div>
50 </div>
51 </fieldset>
52 {% csrf_token %}
53 </form>
54 </div>
55 {% endblock %}
56
57 {% block sidebar %}
58 <div class="sidenav container-box">
59 <ul>
60 <li><a href="/setting/">用户中心</a></li>
61 <li><a href="/setting/avatar/">设置头像</a></li>
62 <li class="current"><a href="/setting/password/">设置密码</a></li>
63 <li><a href="/">返回首页</a></li>
64 </ul>
65 </div>
66 {% endblock %}
67
forum/templatetags/__init__.py
forum/templatetags/forum_extras.py
File was created 1 # coding: utf-8
2
3 '''
4 Django模板引擎的自定义过滤器,需要在模板中引用
5 {% load forum_extras %}
6 '''
7
8
9 import json, re, random
10 from datetime import date, datetime
11 from django import template
12 from django.utils import timezone
13 from markdown import markdown
14
15
16
17 register = template.Library()
18
19
20 @register.filter(name='dump_errors')
21 def dump_errors(errors): # 显示错误信息
22 t = template.Template('''
23 {% if errors %}
24 <ul class="errors alert alert-error">
25 {% for v in errors.itervalues %}
26 <li>{{ v | join:',' }}</li>
27 {% endfor %}
28 </ul>
29 {% endif %}
30 ''')
31 c = template.Context(dict(errors = errors))
32
33 return t.render(c)
34
35
36 @register.simple_tag
37 def build_uri(uri, param, value): # 给uri添加参数或者修改参数的值
38 regx = re.compile('[\?&](%s=[^\?&]*)' % param)
39 find = regx.search(uri)
40 split = '&' if re.search(r'\?', uri) else '?'
41 if not find: return '%s%s%s=%s' % (uri, split, param, value)
42 return re.sub(find.group(1), '%s=%s' % (param, value), uri)
43
44
45 @register.simple_tag
46 def pagination(page, uri, list_rows = 10): # 显示分页
47 def gen_page_list(current_page = 1, total_page = 1, list_rows = 10):
48 if total_page <= list_rows:
49 return range(1, total_page + 1)
50 elif current_page <= (list_rows // 2):
51 return range(1, list_rows + 1)
52 elif current_page >= (total_page - list_rows // 2):
53 return range(total_page - list_rows + 1, total_page + 1)
54 else:
55 return range(current_page - list_rows // 2, current_page - list_rows // 2 + list_rows)
56
57 t = template.Template('''
58 {% load forum_extras %} {# 如果要使用自定义tag filter这里也需要加载 #}
59 {% if page and page.pages > 1 %}
60 <ul>
61 <li {% ifequal page.index page.prev %}class="disabled"{% endifequal %}><a href="{% build_uri uri 'p' page.prev %}">«</a></li>
62 {% for p in gen_page_list %}
63 <li {% ifequal page.index p %}class="active"{% endifequal %}>
64 {% ifnotequal page.index p %}
65 <a href="{% build_uri uri 'p' p %}">{{ p }}</a>
66 {% else %}
67 <a href="javascript:;">{{ p }}</a>
68 {% endifnotequal %}
69 </li>
70 {% endfor %}
71 <li {% ifequal page.index page.next %}class="disabled"{% endifequal %}><a href="{% build_uri uri 'p' page.next %}">»</a></li>
72 </ul>
73 {% endif %}
74 ''')
75 c = template.Context(dict(page = page, uri = uri, gen_page_list = gen_page_list(page.index, page.pages, list_rows)))
76
77 return t.render(c)
78
79
80 @register.filter(name='pretty_date')
81 def pretty_date(time = None): # 输出时间,格式化的时间
82 '''
83 Get a datetime object or a int() Epoch timestamp and return a
84 pretty string like 'an hour ago', 'Yesterday', '3 months ago',
85 'just now', etc
86 '''
87 if time == None:
88 return time
89
90 now = timezone.now()
91 if isinstance(time, basestring):
92 time = datetime.strptime(time, '%Y-%m-%d %H:%M:%S')
93 elif isinstance(time, int):
94 diff = now - datetime.fromtimestamp(time)
95 elif isinstance(time, datetime):
96 diff = now - time
97 elif not time:
98 diff = now - now
99 second_diff = diff.seconds
100 day_diff = diff.days
101
102 if day_diff < 0:
103 return ''
104
105 if day_diff == 0:
106 if second_diff < 10:
107 return '刚刚'
108 if second_diff < 60:
109 return str(second_diff) + ' 秒前'
110 if second_diff < 120:
111 return '1 分钟前'
112 if second_diff < 3600:
113 return str(second_diff / 60) + ' 分钟前'
114 if second_diff < 7200:
115 return '1 小时前'
116 if second_diff < 86400:
117 return str(second_diff / 3600) + ' 小时前'
118 if day_diff == 1:
119 return '昨天'
120 if day_diff < 7:
121 return str(day_diff) + ' 天前'
122 if day_diff < 31:
123 return str(day_diff / 7) + ' 周前'
124 if day_diff < 365:
125 return str(day_diff / 30) + ' 月前'
126 return str(day_diff / 365) + ' 天前'
127
128
129 @register.filter(name='content_process')
130 def content_process(content): #内容处理,把gist,微博图片什么的替换为引用框架什么的
131 # render content included gist
132 content = re.sub(r'http(s)?:\/\/gist.github.com\/(\d+)(.js)?', r'<script src="http://gist.github.com/\2.js"></script>', content)
133 # render sinaimg pictures
134 content = re.sub(r'(http:\/\/\w+.sinaimg.cn\/.*?\.(jpg|gif|png))', r'<img src="\1" />', content)
135 # render @ mention links
136 content = re.sub(r'@(\w+)(\s|)', r'<a href="/u/\1/">@\1</a> ', content)
137 # render youku videos
138 content = re.sub(r'http://v.youku.com/v_show/id_(\w+).html', r'<iframe height=498 width=510 src="http://player.youku.com/embed/\1" frameborder=0 allowfullscreen style="width:100%;max-width:510px;"></iframe>', content)
139 return content
140
141
142 @register.filter(name='markdown')
143 def markdown_up(content): # 转为markdown
144 if not content:
145 return ''
146 return markdown(content, extensions = ['codehilite', 'fenced_code'], safe_mode = 'escape')
147
148
149 @register.filter(name='email_mosaic')
150 def email_mosaic(email): # 隐藏email
151 if not email:
152 return ''
153
154 email_name = re.findall(r'^([^@]+)@', email)[0]
155
156 if len(email_name) < 5:
157 email_name = email_name + '***'
158 email = re.sub(r'^([^@]+)@', '%s@' % email_name, email)
159 else:
160 email = re.sub(r'[^@]{3}@', '***@', email)
161
162 return email
163
164
165 @register.simple_tag
166 def gen_random(): # 生成随机数用语静态文件,避免静态文件被浏览器缓存
167 return random.random()
168
File was created 1 """
2 This file demonstrates writing tests using the unittest module. These will pass
3 when you run "manage.py test".
4
5 Replace this with more appropriate tests for your application.
6 """
7
8 from django.test import TestCase
9
10
11 class SimpleTest(TestCase):
12 def test_basic_addition(self):
13 """
14 Tests that 1 + 1 always equals 2.
15 """
16 self.assertEqual(1 + 1, 2)
17
File was created 1 from django.conf.urls import patterns, include, url
2 from forum.forms.user import LoginForm
3
4 from views import common, user, topic, notification
5 from forum.sitemap import TopicSitemap
6
7 # Uncomment the next two lines to enable the admin:
8 # from django.contrib import admin
9 # admin.autodiscover()
10
11 urlpatterns = patterns('',
12 # Examples:
13 # url(r'^$', 'xp.views.home', name='home'),
14 # url(r'^xp/', include('xp.foo.urls')),
15
16 # Uncomment the admin/doc line below to enable admin documentation:
17 # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
18
19 # Uncomment the next line to enable the admin:
20 # url(r'^admin/', include(admin.site.urls)),
21 url(r'^$', common.method_splitter, {'GET': topic.get_index}),
22 url(r'^t/(\d+)/$', common.method_splitter, {'GET': topic.get_view, 'POST': topic.post_view}),
23 url(r'^t/create/(.*)/$', common.method_splitter, {'GET': topic.get_create, 'POST': topic.post_create}),
24 url(r'^t/edit/(.*)/$', common.method_splitter, {'GET': topic.get_edit, 'POST': topic.post_edit}),
25 url(r'^reply/edit/(.*)/$', common.method_splitter, {'GET': topic.get_reply_edit, 'POST': topic.post_reply_edit}),
26 url(r'^node/(.*)/$', common.method_splitter, {'GET': topic.get_node_topics}),
27 url(r'^u/(.*)/topics/$', common.method_splitter, {'GET': topic.get_user_topics}),
28 url(r'^u/(.*)/replies/$', common.method_splitter, {'GET': topic.get_user_replies}),
29 url(r'^u/(.*)/favorites/$', common.method_splitter, {'GET': topic.get_user_favorites}),
30 url(r'^u/(.*)/$', common.method_splitter, {'GET': topic.get_profile}),
31 url(r'^vote/$', common.method_splitter, {'GET': topic.get_vote}),
32 url(r'^favorite/$', common.method_splitter, {'GET': topic.get_favorite}),
33 url(r'^unfavorite/$', common.method_splitter, {'GET': topic.get_cancel_favorite}),
34 url(r'^notifications/$', common.method_splitter, {'GET': notification.get_list}),
35 url(r'^members/$', common.method_splitter, {'GET': topic.get_members}),
36 url(r'^setting/$', common.method_splitter, {'GET': user.get_setting, 'POST': user.post_setting}),
37 url(r'^setting/avatar/$', common.method_splitter, {'GET': user.get_setting_avatar, 'POST': user.post_setting_avatar}),
38 url(r'^setting/password/$', common.method_splitter, {'GET': user.get_settingpwd, 'POST': user.post_settingpwd}),
39 url(r'^forgot/$', common.method_splitter, {'GET': user.get_forgotpwd, 'POST': user.post_forgotpwd}),
40 url(r'^login/$', common.method_splitter, {'GET': user.get_login, 'POST': user.post_login}),
41 url(r'^logout/$', common.method_splitter, {'GET': user.get_logout}),
42 url(r'^register/$', common.method_splitter, {'GET': user.get_register, 'POST': user.post_register}),
43
44 url(r'^sitemap\.xml$', 'django.contrib.sitemaps.views.sitemap', {'sitemaps': {'topics': TopicSitemap}}),
45 )
46
forum/views/__init__.py
forum/views/common.py
File was created 1 # coding: utf-8
2
3 import re
4 from django.core.mail import EmailMultiAlternatives
5 from django.http import Http404
6 from django.conf import settings
7
8
9 def method_splitter(request, *args, **kwargs):
10 get_view = kwargs.pop('GET', None)
11 post_view = kwargs.pop('POST', None)
12 if request.method == 'GET' and get_view is not None:
13 return get_view(request, *args, **kwargs)
14 elif request.method == 'POST' and post_view is not None:
15 return post_view(request, *args, **kwargs)
16 raise Http404
17
18 def sendmail(title, content, to):
19 msg = EmailMultiAlternatives(title, content, settings.DEFAULT_FROM_EMAIL, [to])
20 msg.attach_alternative(content, 'text/html')
21 msg.send()
22
23
24 def find_mentions(content):
25 regex = re.compile(ur'@(?P<username>\w+)(\s|$)', re.I)
26 return set([m.group('username') for m in regex.finditer(content)])
27
forum/views/notification.py
File was created 1 # coding: utf-8
2
3 from django.shortcuts import render_to_response
4 from django.contrib.auth.decorators import login_required
5 from django.template import RequestContext
6 from forum.models import Notification
7
8
9 @login_required
10 def get_list(request):
11 current_page = int(request.GET.get('p', '1'))
12 user = request.user
13 counter = {
14 'topics': user.topic_author.all().count(),
15 'replies': user.reply_author.all().count(),
16 'favorites': user.fav_user.all().count()
17 }
18
19 notifications_count = user.notify_user.filter(status=0).count()
20 notifications, page = Notification.objects.get_user_all_notifications(user.id, current_page=current_page)
21 active_page = 'topic'
22
23 user.notify_user.filter(status=0).update(status=1) # 未读消息设置为已读
24
25 return render_to_response('notification/notifications.html', locals(),
26 context_instance=RequestContext(request))
27
forum/views/topic.py
File was created 1 # coding: utf-8
2
3 import json, math, hashlib
4 from django.http import HttpResponse, Http404
5 from django.shortcuts import render_to_response, redirect, get_object_or_404
6 from django.contrib import auth
7 from django.contrib.auth.decorators import login_required
8 from django.template import RequestContext
9 from django.utils import timezone
10 from django.conf import settings
11 from forum.models import ForumUser, Topic, Favorite, Vote, Reply, Node, Notification, Plane
12 from forum.forms.topic import ReplyForm, CreateForm
13 from common import find_mentions
14
15
16 def get_index(request):
17 user = request.user
18 if user.is_authenticated():
19 counter = {
20 'topics': user.topic_author.all().count(),
21 'replies': user.reply_author.all().count(),
22 'favorites': user.fav_user.all().count()
23 }
24 notifications_count = user.notify_user.filter(status=0).count()
25
26 status_counter = {
27 'users': ForumUser.objects.all().count(),
28 'nodes': Node.objects.all().count(),
29 'topics': Topic.objects.all().count(),
30 'replies': Reply.objects.all().count(),
31 }
32
33 try:
34 current_page = int(request.GET.get('p', '1'))
35 except ValueError:
36 current_page = 1
37
38 topics, topic_page = Topic.objects.get_all_topic(current_page=current_page)
39 planes = Plane.objects.all().prefetch_related('node_set')
40 # hot_nodes = Node.objects.get_all_hot_nodes()
41 hot_nodes = Node.objects.all()
42 active_page = 'topic'
43 return render_to_response('topic/topics.html', locals(),
44 context_instance=RequestContext(request))
45
46
47 def get_view(request, topic_id, errors=None):
48 try:
49 topic = Topic.objects.get_topic_by_topic_id(topic_id)
50 except Topic.DoesNotExist:
51 raise Http404
52 user = request.user
53 if user.is_authenticated():
54 counter = {
55 'topics': user.topic_author.all().count(),
56 'replies': user.reply_author.all().count(),
57 'favorites': user.fav_user.all().count()
58 }
59 notifications_count = user.notify_user.filter(status=0).count()
60 topic_favorited = Favorite.objects.filter(involved_topic=topic, owner_user=user).exists()
61
62 reply_num = 106
63 reply_count = topic.reply_count
64 reply_last_page = (reply_count // reply_num + (reply_count % reply_num and 1)) or 1
65 try:
66 current_page = int(request.GET.get('p', reply_last_page))
67 except ValueError:
68 current_page = reply_last_page
69
70 replies, reply_page = Reply.objects.get_all_replies_by_topic_id(topic.id, current_page=current_page, num = reply_num)
71 active_page = 'topic'
72 floor = reply_num * (current_page - 1)
73
74 topic.reply_count = reply_page.total
75 topic.hits = (topic.hits or 0) + 1
76 topic.save()
77 return render_to_response('topic/view.html', locals(),
78 context_instance=RequestContext(request))
79
80
81 @login_required
82 def post_view(request, topic_id):
83 try:
84 topic = Topic.objects.select_related('author').get(pk=topic_id)
85 except Topic.DoesNotExist:
86 raise Http404
87 form = ReplyForm(request.POST)
88 if not form.is_valid():
89 return get_view(request, topic_id, errors=form.errors)
90
91 user = request.user
92 try:
93 last_reply = topic.reply_set.all().order_by('-created')[0]
94 except IndexError:
95 last_reply = None
96 if last_reply:
97 last_replied_fingerprint = hashlib.sha1(str(topic.id) + str(last_reply.author_id) + last_reply.content).hexdigest()
98 new_replied_fingerprint = hashlib.sha1(str(topic.id) + str(user.id) + form.cleaned_data.get('content')).hexdigest()
99 if last_replied_fingerprint == new_replied_fingerprint:
100 errors = {'duplicated_reply': [u'回复重复提交']}
101 return get_view(request, topic.id, errors=errors)
102
103 now = timezone.now()
104 reply = Reply(
105 topic = topic,
106 author = user,
107 content = form.cleaned_data.get('content'),
108 created = now,
109 )
110 reply.save()
111 Topic.objects.filter(pk=topic.id).update(last_replied_by=user, last_replied_time=now, last_touched=now)
112
113 notifications = []
114 if user.id != topic.author.id:
115 notification = Notification(
116 content = form.cleaned_data.get('content'),
117 status = 0,
118 involved_type = 1, # 0: mention, 1: reply
119 involved_user = topic.author,
120 involved_topic = topic,
121 trigger_user = user,
122 occurrence_time = now,
123 )
124 notifications.append(notification)
125
126 mentions = find_mentions(form.cleaned_data.get('content'))
127 if user.username in mentions:
128 mentions.remove(user.username)
129 if topic.author.username in mentions:
130 mentions.remove(topic.author.username)
131 if mentions:
132 mention_users = ForumUser.objects.filter(username__in=mentions)
133 if mention_users:
134 for mention_user in mention_users:
135 notification = Notification(
136 content = form.cleaned_data.get('content'),
137 status = 0,
138 involved_type = 0, # 0: mention, 1: reply
139 involved_user = mention_user,
140 involved_topic = topic,
141 trigger_user = user,
142 occurrence_time = now,
143 )
144 notifications.append(notification)
145 if notifications:
146 Notification.objects.bulk_create(notifications)
147
148 if user.id != topic.author.id:
149 topic_time_diff = timezone.now() - topic.created
150 reputation = topic.author.reputation or 0
151 reputation = reputation + 2 * math.log(user.reputation or 0 + topic_time_diff.days + 10, 10)
152 ForumUser.objects.filter(pk=topic.author.id).update(reputation=reputation)
153
154 return redirect('/t/%s/#reply%s' % (topic.id, topic.reply_count + 1))
155
156
157 @login_required
158 def get_create(request, slug=None, errors=None):
159 node = get_object_or_404(Node, slug=slug)
160 user = request.user
161 counter = {
162 'topics': user.topic_author.all().count(),
163 'replies': user.reply_author.all().count(),
164 'favorites': user.fav_user.all().count()
165 }
166 notifications_count = user.notify_user.filter(status=0).count()
167 node_slug = node.slug
168 active_page = 'topic'
169 return render_to_response('topic/create.html', locals(),
170 context_instance=RequestContext(request))
171
172
173 @login_required
174 def post_create(request, slug=None):
175 node = get_object_or_404(Node, slug=slug)
176
177 form = CreateForm(request.POST)
178 if not form.is_valid():
179 return get_create(request, slug=slug, errors=form.errors)
180
181 user = request.user
182 try:
183 last_created = user.topic_author.all().order_by('-created')[0]
184 except IndexError:
185 last_created = None
186
187 if last_created: # 如果用户最后一篇的标题内容与提交的相同
188 last_created_fingerprint = hashlib.sha1(last_created.title + \
189 last_created.content + str(last_created.node_id)).hexdigest()
190 new_created_fingerprint = hashlib.sha1(form.cleaned_data.get('title') + \
191 form.cleaned_data.get('content') + str(node.id)).hexdigest()
192
193 if last_created_fingerprint == new_created_fingerprint:
194 errors = {'duplicated_topic': [u'帖子重复提交']}
195 return get_create(request, slug=slug, errors=errors)
196
197 now = timezone.now()
198 topic = Topic(
199 title = form.cleaned_data.get('title'),
200 content = form.cleaned_data.get('content'),
201 created = now,
202 node = node,
203 author = user,
204 reply_count = 0,
205 last_touched = now,
206 )
207 topic.save()
208
209 reputation = user.reputation or 0
210 reputation = reputation - 5 # 每次发布话题扣除用户威望5点
211 reputation = 0 if reputation < 0 else reputation
212 ForumUser.objects.filter(pk=user.id).update(reputation=reputation)
213
214 return redirect('/')
215
216
217 @login_required
218 def get_edit(request, topic_id, errors=None):
219 topic = get_object_or_404(Topic, pk=topic_id)
220
221 user = request.user
222 counter = {
223 'topics': user.topic_author.all().count(),
224 'replies': user.reply_author.all().count(),
225 'favorites': user.fav_user.all().count()
226 }
227 notifications_count = user.notify_user.filter(status=0).count()
228
229 active_page = 'topic'
230 return render_to_response('topic/edit.html', locals(),
231 context_instance=RequestContext(request))
232
233
234 @login_required
235 def post_edit(request, topic_id):
236 topic = get_object_or_404(Topic, pk=topic_id)
237
238 form = CreateForm(request.POST)
239 if not form.is_valid():
240 return get_edit(request, topic_id, errors=form.errors)
241
242 user = request.user
243 if topic.author_id != user.id:
244 errors = {'invalid_permission': [u'没有权限修改该主题']}
245 return get_edit(request, topic_id, errors=errors)
246
247 now = timezone.now()
248 Topic.objects.filter(pk=topic.id).update(updated=now, last_touched=now, **form.cleaned_data)
249
250 reputation = user.reputation or 0
251 reputation = reputation - 2 # 每次修改回复扣除用户威望2点
252 reputation = 0 if reputation < 0 else reputation
253 ForumUser.objects.filter(pk=user.id).update(reputation=reputation)
254
255 return redirect('/t/%s/' % topic.id)
256
257
258 @login_required
259 def get_reply_edit(request, reply_id, errors=None):
260 reply = get_object_or_404(Reply, pk=reply_id)
261 user = request.user
262 counter = {
263 'topics': user.topic_author.all().count(),
264 'replies': user.reply_author.all().count(),
265 'favorites': user.fav_user.all().count()
266 }
267 notifications_count = user.notify_user.filter(status=0).count()
268 active_page = 'topic'
269 return render_to_response('topic/reply_edit.html', locals(),
270 context_instance=RequestContext(request))
271
272
273 @login_required
274 def post_reply_edit(request, reply_id):
275 reply = get_object_or_404(Reply, pk=reply_id)
276
277 form = ReplyForm(request.POST)
278 if not form.is_valid():
279 return get_reply_edit(request, reply_id, errors=form.errors)
280
281 user = request.user
282 if reply.author_id != user.id:
283 errors = {'invalid_permission': [u'没有权限修改该回复']}
284 return get_reply_edit(request, reply_id, errors=errors)
285
286 Reply.objects.filter(pk=reply.id).update(updated=timezone.now(), **form.cleaned_data)
287
288 reputation = user.reputation or 0
289 reputation = reputation - 2 # 每次修改回复扣除用户威望2点
290 reputation = 0 if reputation < 0 else reputation
291 ForumUser.objects.filter(pk=user.id).update(reputation=reputation)
292
293 return redirect('/t/%s/' % reply.topic_id)
294
295
296 def get_node_topics(request, slug):
297 node = get_object_or_404(Node, slug=slug)
298
299 user = request.user
300 if user.is_authenticated():
301 counter = {
302 'topics': user.topic_author.all().count(),
303 'replies': user.reply_author.all().count(),
304 'favorites': user.fav_user.all().count()
305 }
306 notifications_count = user.notify_user.filter(status=0).count()
307
308 try:
309 current_page = int(request.GET.get('p', '1'))
310 except ValueError:
311 current_page = 1
312
313 topics, topic_page = Topic.objects.get_all_topics_by_node_slug(node_slug=slug, current_page=current_page)
314 active_page = 'topic'
315 return render_to_response('topic/node_topics.html', locals(),
316 context_instance=RequestContext(request))
317
318
319 def get_user_topics(request, uid):
320 try:
321 if uid.isdigit():
322 user_info = ForumUser.objects.get(pk=uid)
323 else:
324 user_info = ForumUser.objects.get(username=uid)
325 except ForumUser.DoesNotExist:
326 raise Http404
327
328 try:
329 current_page = int(request.GET.get('p', '1'))
330 except ValueError:
331 current_page = 1
332
333 counter = {
334 'topics': user_info.topic_author.all().count(),
335 'replies': user_info.reply_author.all().count(),
336 'favorites': user_info.fav_user.all().count()
337 }
338
339 user = request.user
340 if user.is_authenticated():
341 notifications_count = user.notify_user.filter(status=0).count()
342
343 topics, topic_page = Topic.objects.get_user_all_topics(user_info.id, current_page=current_page)
344 active_page = 'topic'
345 return render_to_response('topic/user_topics.html', locals(),
346 context_instance=RequestContext(request))
347
348
349 def get_user_replies(request, uid):
350 try:
351 if uid.isdigit():
352 user_info = ForumUser.objects.get(pk=uid)
353 else:
354 user_info = ForumUser.objects.get(username=uid)
355 except ForumUser.DoesNotExist:
356 raise Http404
357
358 try:
359 current_page = int(request.GET.get('p', '1'))
360 except ValueError:
361 current_page = 1
362
363 counter = {
364 'topics': user_info.topic_author.all().count(),
365 'replies': user_info.reply_author.all().count(),
366 'favorites': user_info.fav_user.all().count()
367 }
368
369 user = request.user
370 if user.is_authenticated():
371 notifications_count = user.notify_user.filter(status=0).count()
372
373 replies, reply_page = Reply.objects.get_user_all_replies(user_info.id, current_page=current_page)
374 active_page = 'topic'
375 return render_to_response('topic/user_replies.html', locals(),
376 context_instance=RequestContext(request))
377
378
379 def get_user_favorites(request, uid):
380 try:
381 if uid.isdigit():
382 user_info = ForumUser.objects.get(pk=uid)
383 else:
384 user_info = ForumUser.objects.get(username=uid)
385 except ForumUser.DoesNotExist:
386 raise Http404
387
388 try:
389 current_page = int(request.GET.get('p', '1'))
390 except ValueError:
391 current_page = 1
392
393 counter = {
394 'topics': user_info.topic_author.all().count(),
395 'replies': user_info.reply_author.all().count(),
396 'favorites': user_info.fav_user.all().count()
397 }
398
399 user = request.user
400 if user.is_authenticated():
401 notifications_count = user.notify_user.filter(status=0).count()
402
403 favorites, favorite_page = Favorite.objects.get_user_all_favorites(user_info.id, current_page=current_page)
404 active_page = 'topic'
405 return render_to_response('topic/user_favorites.html', locals(),
406 context_instance=RequestContext(request))
407
408
409 def get_profile(request, uid):
410 try:
411 if uid.isdigit():
412 user_info = ForumUser.objects.get(pk=uid)
413 else:
414 user_info = ForumUser.objects.get(username=uid)
415 except ForumUser.DoesNotExist:
416 raise Http404
417
418 try:
419 current_page = int(request.GET.get('p', '1'))
420 except ValueError:
421 current_page = 1
422
423 counter = {
424 'topics': user_info.topic_author.all().count(),
425 'replies': user_info.reply_author.all().count(),
426 'favorites': user_info.fav_user.all().count()
427 }
428
429 user = request.user
430 if user.is_authenticated():
431 notifications_count = user.notify_user.filter(status=0).count()
432
433 topics, topic_page = Topic.objects.get_user_all_topics(user_info.id, current_page=current_page)
434 replies, reply_page = Reply.objects.get_user_all_replies(user_info.id, current_page=current_page)
435 active_page = '_blank'
436 return render_to_response('topic/profile.html', locals(),
437 context_instance=RequestContext(request))
438
439
440 def get_vote(request):
441 user = request.user
442 if not user.is_authenticated():
443 return HttpResponse(json.dumps({
444 'success': 0,
445 'message': 'user_not_login'
446 }), content_type='application/json')
447
448 try:
449 topic_id = int(request.GET.get('topic_id'))
450 except (TypeError, ValueError):
451 topic_id = None
452 topic = None
453 if topic_id:
454 try:
455 topic = Topic.objects.select_related('author').get(pk=topic_id)
456 except Topic.DoesNotExist:
457 pass
458
459 if not (topic_id and topic):
460 return HttpResponse(json.dumps({
461 'success': 0,
462 'message': 'topic_not_exist'
463 }), content_type='application/json')
464
465 if user.id == topic.author.id:
466 return HttpResponse(json.dumps({
467 'success': 0,
468 'message': 'can_not_vote_your_topic'
469 }), content_type='application/json')
470
471 if Vote.objects.filter(trigger_user=user, involved_topic=topic).exists():
472 return HttpResponse(json.dumps({
473 'success': 0,
474 'message': 'already_voted'
475 }), content_type='application/json')
476
477 vote = Vote(trigger_user=user, involved_type=0, involved_topic=topic, \
478 involved_user=topic.author, status=0, occurrence_time=timezone.now())
479 vote.save()
480
481 # 更新话题作者声誉
482 topic_time_diff = timezone.now() - topic.created
483 reputation = topic.author.reputation or 0
484 reputation = reputation + 2 * math.log((user.reputation or 0) + topic_time_diff.days + 10, 10)
485 ForumUser.objects.filter(pk=topic.author.id).update(reputation=reputation)
486
487 return HttpResponse(json.dumps({
488 'success': 1,
489 'message': 'thanks_for_your_vote'
490 }), content_type='application/json')
491
492
493 def get_favorite(request):
494 user = request.user
495 if not user.is_authenticated():
496 return HttpResponse(json.dumps({
497 'success': 0,
498 'message': 'user_not_login'
499 }), content_type='application/json')
500
501 try:
502 topic_id = int(request.GET.get('topic_id'))
503 except (TypeError, ValueError):
504 topic_id = None
505 topic = None
506 if topic_id:
507 try:
508 topic = Topic.objects.select_related('author').get(pk=topic_id)
509 except Topic.DoesNotExist:
510 pass
511
512 if not (topic_id and topic):
513 return HttpResponse(json.dumps({
514 'success': 0,
515 'message': 'topic_not_exist'
516 }), content_type='application/json')
517
518 if user.id == topic.author.id:
519 return HttpResponse(json.dumps({
520 'success': 0,
521 'message': 'can_not_favorite_your_topic'
522 }), content_type='application/json')
523
524 if Favorite.objects.filter(owner_user=user, involved_topic=topic).exists():
525 return HttpResponse(json.dumps({
526 'success': 0,
527 'message': 'already_favorited'
528 }), content_type='application/json')
529
530 favorite = Favorite(owner_user=user, involved_type=0, involved_topic=topic, created=timezone.now())
531 favorite.save()
532
533 # 更新话题作者声誉
534 topic_time_diff = timezone.now() - topic.created
535 reputation = topic.author.reputation or 0
536 reputation = reputation + 2 * math.log((user.reputation or 0) + topic_time_diff.days + 10, 10)
537 ForumUser.objects.filter(pk=topic.author.id).update(reputation=reputation)
538
539 return HttpResponse(json.dumps({
540 'success': 1,
541 'message': 'cancel_favorite_success'
542 }), content_type='application/json')
543
544
545 def get_cancel_favorite(request):
546 user = request.user
547 if not user.is_authenticated():
548 return HttpResponse(json.dumps({
549 'success': 0,
550 'message': 'user_not_login'
551 }), content_type='application/json')
552
553 try:
554 topic_id = int(request.GET.get('topic_id'))
555 except (TypeError, ValueError):
556 topic_id = None
557 topic = None
558 if topic_id:
559 try:
560 topic = Topic.objects.select_related('author').get(pk=topic_id)
561 except Topic.DoesNotExist:
562 pass
563
564 if not (topic_id and topic):
565 return HttpResponse(json.dumps({
566 'success': 0,
567 'message': 'topic_not_exist'
568 }), content_type='application/json')
569
570 try:
571 favorite = Favorite.objects.get(owner_user=user, involved_topic=topic)
572 except Favorite.DoesNotExist:
573 favorite = None
574
575 if not favorite:
576 return HttpResponse(json.dumps({
577 'success': 0,
578 'message': 'not_been_favorited'
579 }), content_type='application/json')
580
581 favorite.delete()
582
583 # 更新话题作者声誉
584 topic_time_diff = timezone.now() - topic.created
585 reputation = topic.author.reputation or 0
586 reputation = reputation - math.log(user.reputation or 0 + topic_time_diff.days + 10, 15)
587 ForumUser.objects.filter(pk=topic.author.id).update(reputation=reputation)
588
589 return HttpResponse(json.dumps({
590 'success': 1,
591 'message': 'cancel_favorite_success'
592 }), content_type='application/json')
593
594
595 def get_members(request):
596 user = request.user
597 if user.is_authenticated():
598 counter = {
599 'topics': user.topic_author.all().count(),
600 'replies': user.reply_author.all().count(),
601 'favorites': user.fav_user.all().count()
602 }
603 notifications_count = user.notify_user.filter(status=0).count()
604
605 members = ForumUser.objects.all().order_by('-id')[:49]
606 active_members = ForumUser.objects.all().order_by('-last_login')[:49]
607 active_page = 'members'
608 return render_to_response('topic/members.html', locals(),
609 context_instance=RequestContext(request))
610
forum/views/user.py
File was created 1 # coding: utf-8
2
3 import os, uuid, copy, urllib
4 from PIL import Image
5 from django.shortcuts import render_to_response, redirect
6 from django.contrib import auth
7 from django.contrib.auth.decorators import login_required
8 from django.template import RequestContext, Context, loader
9 from django.utils import timezone
10 from django.conf import settings
11 from forum.models import ForumUser
12 from forum.forms.user import RegisterForm, LoginForm, ForgotPasswordForm, SettingPasswordForm, SettingForm
13 from common import sendmail
14
15
16 @login_required
17 def get_setting(request, **kwargs):
18 return render_to_response('user/setting.html', kwargs,
19 context_instance=RequestContext(request))
20
21
22 @login_required
23 def post_setting(request):
24 form = SettingForm(request.POST)
25 if not form.is_valid():
26 return get_setting(request, errors=form.errors)
27
28 user = request.user
29 cd = copy.copy(form.cleaned_data)
30 cd.pop('username')
31 cd.pop('email')
32 for k, v in cd.iteritems():
33 setattr(user, k, v)
34 user.updated = timezone.now()
35 user.save()
36 return get_setting(request, success_message=u'用户基本资料更新成功')
37
38
39 @login_required
40 def get_setting_avatar(request, **kwargs):
41 return render_to_response('user/setting_avatar.html', kwargs,
42 context_instance=RequestContext(request))
43
44
45 @login_required
46 def post_setting_avatar(request):
47 if not 'avatar' in request.FILES:
48 errors = {'invalid_avatar': [u'请先选择要上传的头像'],}
49 return get_setting_avatar(request, errors=errors)
50
51 user = request.user
52 avatar_name = '%s' % uuid.uuid5(uuid.NAMESPACE_DNS, str(user.id))
53 avatar = Image.open(request.FILES['avatar'])
54
55 # crop avatar if it's not square
56 avatar_w, avatar_h = avatar.size
57 avatar_border = avatar_w if avatar_w < avatar_h else avatar_h
58 avatar_crop_region = (0, 0, avatar_border, avatar_border)
59 avatar = avatar.crop(avatar_crop_region)
60
61 avatar_96x96 = avatar.resize((96, 96), Image.ANTIALIAS)
62 avatar_48x48 = avatar.resize((48, 48), Image.ANTIALIAS)
63 avatar_32x32 = avatar.resize((32, 32), Image.ANTIALIAS)
64 path = os.path.dirname(__file__)
65 avatar_96x96.save(os.path.join(path, '../static/avatar/b_%s.png' % avatar_name), 'PNG')
66 avatar_48x48.save(os.path.join(path, '../static/avatar/m_%s.png' % avatar_name), 'PNG')
67 avatar_32x32.save(os.path.join(path, '../static/avatar/s_%s.png' % avatar_name), 'PNG')
68 user.avatar = '%s.png' % avatar_name
69 user.updated = timezone.now()
70 user.save()
71 return get_setting_avatar(request)
72
73
74 @login_required
75 def get_settingpwd(request, **kwargs):
76 return render_to_response('user/setting_password.html', kwargs,
77 context_instance=RequestContext(request))
78
79
80 @login_required
81 def post_settingpwd(request):
82 form = SettingPasswordForm(request)
83 if not form.is_valid():
84 return get_settingpwd(request, errors=form.errors)
85
86 user = request.user
87 password = form.cleaned_data.get('password')
88 user.set_password(password)
89 user.updated = timezone.now()
90 user.save()
91 return get_settingpwd(request, success_message=u'您的用户密码已更新')
92
93
94 def get_forgotpwd(request, **kwargs):
95 auth.logout(request)
96 return render_to_response('user/forgot_password.html', kwargs,
97 context_instance=RequestContext(request))
98
99
100 def post_forgotpwd(request):
101 form = ForgotPasswordForm(request.POST)
102 if not form.is_valid():
103 return get_login(request, errors=form.errors)
104
105 user = form.get_user()
106
107 new_password = uuid.uuid1().hex
108 user.set_password(new_password)
109 user.updated = timezone.now()
110 user.save()
111
112 # 给用户发送新密码
113 mail_title = u'前端社区(F2E.im)找回密码'
114 var = {'email': user.email, 'new_password': new_password}
115 mail_content = loader.get_template('user/forgot_password_mail.html').render(Context(var))
116 sendmail(mail_title, mail_content, user.email)
117
118 return get_forgotpwd(request, success_message=u'新密码已发送至您的注册邮箱')
119
120
121 def get_login(request, **kwargs):
122 auth.logout(request)
123 return render_to_response('user/login.html', kwargs,
124 context_instance=RequestContext(request))
125
126 def post_login(request):
127 form = LoginForm(request.POST)
128 if not form.is_valid():
129 return get_login(request, errors=form.errors)
130
131 user = form.get_user()
132 auth.login(request, user)
133
134 if user.is_staff:
135 return redirect(request.REQUEST.get('next', '/manage/admin/'))
136
137 return redirect(request.REQUEST.get('next', '/'))
138
139
140 def get_logout(request):
141 auth.logout(request)
142 return redirect(request.REQUEST.get('next', '/'))
143
144
145 def get_register(request, **kwargs):
146 auth.logout(request)
147 return render_to_response('user/register.html', kwargs,
148 context_instance=RequestContext(request))
149
150
151 def post_register(request):
152 form = RegisterForm(request.POST)
153
154 if not form.is_valid():
155 return get_register(request, errors=form.errors)
156
157 user = form.save()
158 if user:
159 # 注册成功,发送邮件到用户邮箱
160 # mail_title = u'微信小程序开发社区注册成功通知'
161 # mail_content = loader.get_template('user/register_mail.html').render(Context({}))
162 # sendmail(mail_title, mail_content, user.email)
163 pass
164
165 return redirect(settings.LOGIN_URL)
166
File was created 1 #!/usr/bin/env python
2 import os
3 import sys
4 reload(sys)
5 sys.setdefaultencoding("utf8")
6
7 if __name__ == "__main__":
8 os.environ.setdefault("DJANGO_SETTINGS_MODULE", "xp.settings")
9
10 from django.core.management import execute_from_command_line
11
12 execute_from_command_line(sys.argv)
13
File was created 1 Django==1.5.2
2 Markdown==2.5.2
3 MySQL-python==1.2.3
4
File was created 1 # coding: utf-8
2 # Django settings for xp project.
3
4 DEBUG = True
5 TEMPLATE_DEBUG = DEBUG
6
7 ADMINS = (
8 # ('Your Name', 'your_email@example.com'),
9 )
10
11 MANAGERS = ADMINS
12
13 DATABASES = {
14 'default': {
15 'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
16 'NAME': 'forum', # Or path to database file if using sqlite3.
17 # The following settings are not used with sqlite3:
18 'USER': 'root',
19 'PASSWORD': 'nineteen',
20 'HOST': '127.0.0.1', # Empty for localhost through domain sockets or '127.0.0.1' for localhost through TCP.
21 'PORT': '3306', # Set to empty string for default.
22 }
23 }
24
25 # Hosts/domain names that are valid for this site; required if DEBUG is False
26 # See https://docs.djangoproject.com/en/1.5/ref/settings/#allowed-hosts
27 ALLOWED_HOSTS = ['*']
28
29 # Local time zone for this installation. Choices can be found here:
30 # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
31 # although not all choices may be available on all operating systems.
32 # In a Windows environment this must be set to your system time zone.
33 TIME_ZONE = 'Asia/Shanghai'
34
35 # Language code for this installation. All choices can be found here:
36 # http://www.i18nguy.com/unicode/language-identifiers.html
37 LANGUAGE_CODE = 'zh-CN'
38
39 SITE_ID = 1
40
41 # If you set this to False, Django will make some optimizations so as not
42 # to load the internationalization machinery.
43 USE_I18N = True # 只有用admin的时候需要开启
44
45 # If you set this to False, Django will not format dates, numbers and
46 # calendars according to the current locale.
47 USE_L10N = False
48
49 # If you set this to False, Django will not use timezone-aware datetimes.
50 USE_TZ = False
51
52 # Absolute filesystem path to the directory that will hold user-uploaded files.
53 # Example: "/var/www/example.com/media/"
54 MEDIA_ROOT = ''
55
56 # URL that handles the media served from MEDIA_ROOT. Make sure to use a
57 # trailing slash.
58 # Examples: "http://example.com/media/", "http://media.example.com/"
59 MEDIA_URL = ''
60
61 # Absolute path to the directory static files should be collected to.
62 # Don't put anything in this directory yourself; store your static files
63 # in apps' "static/" subdirectories and in STATICFILES_DIRS.
64 # Example: "/var/www/example.com/static/"
65 STATIC_ROOT = ''
66
67 # URL prefix for static files.
68 # Example: "http://example.com/static/", "http://static.example.com/"
69 STATIC_URL = '/static/'
70
71 # Additional locations of static files
72 STATICFILES_DIRS = (
73 # Put strings here, like "/home/html/static" or "C:/www/django/static".
74 # Always use forward slashes, even on Windows.
75 # Don't forget to use absolute paths, not relative paths.
76 )
77
78 # List of finder classes that know how to find static files in
79 # various locations.
80 STATICFILES_FINDERS = (
81 'django.contrib.staticfiles.finders.FileSystemFinder',
82 'django.contrib.staticfiles.finders.AppDirectoriesFinder',
83 # 'django.contrib.staticfiles.finders.DefaultStorageFinder',
84 )
85
86 # Make this unique, and don't share it with anybody.
87 SECRET_KEY = 'h6=yzee&jze#4p1@twhksg1wg6hv%pzwomw(!o($qsly%lzlhe'
88
89 # List of callables that know how to import templates from various sources.
90 TEMPLATE_LOADERS = (
91 'django.template.loaders.filesystem.Loader',
92 'django.template.loaders.app_directories.Loader',
93 # 'django.template.loaders.eggs.Loader',
94 )
95
96 MIDDLEWARE_CLASSES = (
97 'django.middleware.cache.UpdateCacheMiddleware', # 缓存中间件,必须放在开头
98 'django.middleware.common.CommonMiddleware',
99 'django.contrib.sessions.middleware.SessionMiddleware',
100 'django.middleware.csrf.CsrfViewMiddleware', # 开启了CSRF,记得在POST表单中加{% csrf_token %},使用RequestContext
101 'django.contrib.auth.middleware.AuthenticationMiddleware',
102 'django.contrib.messages.middleware.MessageMiddleware',
103 # Uncomment the next line for simple clickjacking protection:
104 # 'django.middleware.clickjacking.XFrameOptionsMiddleware',
105 'django.middleware.cache.FetchFromCacheMiddleware', # 缓存中间件,必须放在最后
106 )
107
108 ROOT_URLCONF = 'xp.urls'
109
110 # Python dotted path to the WSGI application used by Django's runserver.
111 WSGI_APPLICATION = 'xp.wsgi.application'
112
113 TEMPLATE_DIRS = (
114 # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
115 # Always use forward slashes, even on Windows.
116 # Don't forget to use absolute paths, not relative paths.
117 )
118
119 TEMPLATE_CONTEXT_PROCESSORS = ( # F2E中有current_user对象和request对象,这里设置可在模板中使用RquestContext
120 'django.contrib.auth.context_processors.auth', # user对象等等
121 'django.core.context_processors.request', # request对象等等
122 'django.core.context_processors.static', # 在模板中使用{{ STATIC_URL }}获取静态文件路径
123 'forum.context_processors.custom_proc', # 自定义模板上下文处理器
124 )
125
126 INSTALLED_APPS = (
127 'django.contrib.auth',
128 'django.contrib.contenttypes',
129 'django.contrib.sessions',
130 'django.contrib.sites',
131 'django.contrib.messages',
132 'django.contrib.staticfiles',
133 # Uncomment the next line to enable the admin:
134 'django.contrib.admin',
135 # Uncomment the next line to enable admin documentation:
136 # 'django.contrib.admindocs',
137 'django.contrib.sitemaps', # Django sitemap framework
138 'forum',
139 )
140
141 # A sample logging configuration. The only tangible logging
142 # performed by this configuration is to send an email to
143 # the site admins on every HTTP 500 error when DEBUG=False.
144 # See http://docs.djangoproject.com/en/dev/topics/logging for
145 # more details on how to customize your logging configuration.
146 LOGGING = {
147 'version': 1,
148 'disable_existing_loggers': False,
149 'filters': {
150 'require_debug_false': {
151 '()': 'django.utils.log.RequireDebugFalse'
152 }
153 },
154 'handlers': {
155 'mail_admins': {
156 'level': 'ERROR',
157 'filters': ['require_debug_false'],
158 'class': 'django.utils.log.AdminEmailHandler'
159 },
160 'console': {
161 'level': 'DEBUG',
162 'class': 'logging.StreamHandler',
163 },
164 },
165 'loggers': {
166 'django.request': {
167 'handlers': ['mail_admins'],
168 'level': 'ERROR',
169 'propagate': True,
170 },
171 'django.db.backends': {
172 'level': 'DEBUG',
173 'handlers': ['console'],
174 },
175 }
176 }
177 #
178 # CACHES = { # memcached缓存设置
179 # 'default': {
180 # 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
181 # 'LOCATION': '127.0.0.1:11211',
182 # }
183 # }
184
185 # SESSION_ENGINE = 'django.contrib.sessions.backends.cache' # 使用memcached存储session
186
187 # 自定义User类
188 AUTH_USER_MODEL = 'forum.ForumUser'
189
190 # 用户认证BackEnds
191 # AUTHENTICATION_BACKENDS = ('forum.backends.EmailAuthBackend',)
192
193 # 默认登陆uri
194 LOGIN_URL = '/login/'
195
196 # 发送邮件设置
197 EMAIL_HOST = 'smtp.qq.com'
198 EMAIL_PORT = 25
199 EMAIL_HOST_USER= '*********'
200 EMAIL_HOST_PASSWORD= '******'
201 DEFAULT_FROM_EMAIL = '*********@qq.com'
202
203 # 注册用户保留关键字,非Django设置
204 RESERVED = ["user", "topic", "home", "setting", "forgot", "login", "logout", "register", "admin"]
205
File was created 1 # coding: utf-8
2
3 from django.conf.urls import patterns, include, url
4 from django.conf import settings
5
6 # Uncomment the next two lines to enable the admin:
7 from django.contrib.auth.decorators import login_required
8 from django.contrib import admin
9 admin.autodiscover()
10 admin.site.login = login_required(admin.site.login) # 设置admin登录的页面,settings.LOGIN_URL
11
12 import forum.urls
13
14 urlpatterns = patterns('',
15 # Examples:
16 # url(r'^$', 'xp.views.home', name='home'),
17 # url(r'^xp/', include('xp.foo.urls')),
18
19 # Uncomment the admin/doc line below to enable admin documentation:
20 # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
21
22 # Uncomment the next line to enable the admin:
23 # url(r'^admin/', include(admin.site.urls)),
24 url(r'^', include(forum.urls)),
25 url(r'^manage/admin/', include(admin.site.urls)),
26 )
27
File was created 1 """
2 WSGI config for xp project.
3
4 This module contains the WSGI application used by Django's development server
5 and any production WSGI deployments. It should expose a module-level variable
6 named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover
7 this application via the ``WSGI_APPLICATION`` setting.
8
9 Usually you will have the standard Django WSGI application here, but it also
10 might make sense to replace the whole Django WSGI application with a custom one
11 that later delegates to the Django one. For example, you could introduce WSGI
12 middleware here, or combine a Django application with an application of another
13 framework.
14
15 """
16 import os
17
18 # We defer to a DJANGO_SETTINGS_MODULE already in the environment. This breaks
19 # if running multiple sites in the same mod_wsgi process. To fix this, use
20 # mod_wsgi daemon mode with each site in its own daemon process, or use
21 # os.environ["DJANGO_SETTINGS_MODULE"] = "xp.settings"
22 os.environ.setdefault("DJANGO_SETTINGS_MODULE", "xp.settings")
23
24 # This application object is used by any WSGI server configured to use this
25 # file. This includes Django's development server, if the WSGI_APPLICATION
26 # setting points here.
27 from django.core.wsgi import get_wsgi_application
28 application = get_wsgi_application()
29
30 # Apply WSGI middleware here.
31 # from helloworld.wsgi import HelloWorldApplication
32 # application = HelloWorldApplication(application)
33