@lazycatcloud/lzc-cli 1.2.59 → 1.2.61

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/changelog.md +8 -0
  2. package/lib/app/lpk_build.js +5 -0
  3. package/lib/app/lpk_create_generator.js +0 -152
  4. package/lib/appstore/login.js +13 -1
  5. package/package.json +1 -1
  6. package/template/blank/lzc-build.yml +15 -16
  7. package/template/blank/lzc-manifest.yml +4 -4
  8. package/template/_lpk/golang.manifest.yml.in +0 -16
  9. package/template/_lpk/lite.manifest.yml.in +0 -19
  10. package/template/golang/.godir +0 -1
  11. package/template/golang/README.md +0 -10
  12. package/template/golang/_gitignore +0 -2
  13. package/template/golang/assets/css/bootstrap-responsive.css +0 -1091
  14. package/template/golang/assets/css/bootstrap-responsive.min.css +0 -1073
  15. package/template/golang/assets/css/bootstrap.css +0 -6264
  16. package/template/golang/assets/css/bootstrap.min.css +0 -5307
  17. package/template/golang/assets/css/rego.css +0 -45
  18. package/template/golang/assets/img/glyphicons-halflings-white.png +0 -0
  19. package/template/golang/assets/img/glyphicons-halflings.png +0 -0
  20. package/template/golang/assets/js/bootstrap.js +0 -2054
  21. package/template/golang/assets/js/bootstrap.min.js +0 -1241
  22. package/template/golang/assets/js/rego.js +0 -132
  23. package/template/golang/build.sh +0 -12
  24. package/template/golang/go.mod +0 -3
  25. package/template/golang/index.html +0 -269
  26. package/template/golang/lazycat.png +0 -0
  27. package/template/golang/lzc-build.yml +0 -60
  28. package/template/golang/rego.go +0 -82
  29. package/template/golang/rego_test.go +0 -13
  30. package/template/ionic_vue3/README.md +0 -46
  31. package/template/ionic_vue3/_eslintrc.cjs +0 -24
  32. package/template/ionic_vue3/_gitignore +0 -29
  33. package/template/ionic_vue3/_vscode/extensions.json +0 -6
  34. package/template/ionic_vue3/capacitor.config.ts +0 -10
  35. package/template/ionic_vue3/env.d.ts +0 -1
  36. package/template/ionic_vue3/index.html +0 -13
  37. package/template/ionic_vue3/ionic.config.json +0 -7
  38. package/template/ionic_vue3/lazycat.png +0 -0
  39. package/template/ionic_vue3/lzc-build.yml +0 -61
  40. package/template/ionic_vue3/package-lock.json +0 -8100
  41. package/template/ionic_vue3/package.json +0 -52
  42. package/template/ionic_vue3/postcss.config.js +0 -6
  43. package/template/ionic_vue3/public/favicon.ico +0 -0
  44. package/template/ionic_vue3/src/App.vue +0 -11
  45. package/template/ionic_vue3/src/assets/logo.svg +0 -1
  46. package/template/ionic_vue3/src/index.css +0 -3
  47. package/template/ionic_vue3/src/main.ts +0 -35
  48. package/template/ionic_vue3/src/router/index.ts +0 -15
  49. package/template/ionic_vue3/src/theme/variables.css +0 -231
  50. package/template/ionic_vue3/src/views/Home.vue +0 -38
  51. package/template/ionic_vue3/tailwind.config.js +0 -7
  52. package/template/ionic_vue3/tsconfig.json +0 -16
  53. package/template/ionic_vue3/tsconfig.vite-config.json +0 -8
  54. package/template/ionic_vue3/vite.config.ts +0 -28
  55. package/template/lite/_gitignore +0 -4
  56. package/template/lite/error_pages/502.html.tpl +0 -13
  57. package/template/lite/lazycat.png +0 -0
  58. package/template/lite/lzc-build.yml +0 -59
@@ -1,2054 +0,0 @@
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
- !(function ($) {
21
- "use strict"; // jshint ;_;
22
-
23
- /* CSS TRANSITION SUPPORT (http://www.modernizr.com/)
24
- * ======================================================= */
25
-
26
- $(function () {
27
- $.support.transition = (function () {
28
- var transitionEnd = (function () {
29
- var el = document.createElement("bootstrap"),
30
- transEndEventNames = {
31
- WebkitTransition: "webkitTransitionEnd",
32
- MozTransition: "transitionend",
33
- OTransition: "oTransitionEnd otransitionend",
34
- transition: "transitionend",
35
- },
36
- name;
37
-
38
- for (name in transEndEventNames) {
39
- if (el.style[name] !== undefined) {
40
- return transEndEventNames[name];
41
- }
42
- }
43
- })();
44
-
45
- return (
46
- transitionEnd && {
47
- end: transitionEnd,
48
- }
49
- );
50
- })();
51
- });
52
- })(window.jQuery);
53
- /* ==========================================================
54
- * bootstrap-alert.js v2.2.1
55
- * http://twitter.github.com/bootstrap/javascript.html#alerts
56
- * ==========================================================
57
- * Copyright 2012 Twitter, Inc.
58
- *
59
- * Licensed under the Apache License, Version 2.0 (the "License");
60
- * you may not use this file except in compliance with the License.
61
- * You may obtain a copy of the License at
62
- *
63
- * http://www.apache.org/licenses/LICENSE-2.0
64
- *
65
- * Unless required by applicable law or agreed to in writing, software
66
- * distributed under the License is distributed on an "AS IS" BASIS,
67
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
68
- * See the License for the specific language governing permissions and
69
- * limitations under the License.
70
- * ========================================================== */
71
-
72
- !(function ($) {
73
- "use strict"; // jshint ;_;
74
-
75
- /* ALERT CLASS DEFINITION
76
- * ====================== */
77
-
78
- var dismiss = '[data-dismiss="alert"]',
79
- Alert = function (el) {
80
- $(el).on("click", dismiss, this.close);
81
- };
82
-
83
- Alert.prototype.close = function (e) {
84
- var $this = $(this),
85
- selector = $this.attr("data-target"),
86
- $parent;
87
-
88
- if (!selector) {
89
- selector = $this.attr("href");
90
- selector = selector && selector.replace(/.*(?=#[^\s]*$)/, ""); //strip for ie7
91
- }
92
-
93
- $parent = $(selector);
94
-
95
- e && e.preventDefault();
96
-
97
- $parent.length ||
98
- ($parent = $this.hasClass("alert") ? $this : $this.parent());
99
-
100
- $parent.trigger((e = $.Event("close")));
101
-
102
- if (e.isDefaultPrevented()) return;
103
-
104
- $parent.removeClass("in");
105
-
106
- function removeElement() {
107
- $parent.trigger("closed").remove();
108
- }
109
-
110
- $.support.transition && $parent.hasClass("fade")
111
- ? $parent.on($.support.transition.end, removeElement)
112
- : removeElement();
113
- };
114
-
115
- /* ALERT PLUGIN DEFINITION
116
- * ======================= */
117
-
118
- $.fn.alert = function (option) {
119
- return this.each(function () {
120
- var $this = $(this),
121
- data = $this.data("alert");
122
- if (!data) $this.data("alert", (data = new Alert(this)));
123
- if (typeof option == "string") data[option].call($this);
124
- });
125
- };
126
-
127
- $.fn.alert.Constructor = Alert;
128
-
129
- /* ALERT DATA-API
130
- * ============== */
131
-
132
- $(document).on("click.alert.data-api", dismiss, Alert.prototype.close);
133
- })(window.jQuery);
134
- /* ============================================================
135
- * bootstrap-button.js v2.2.1
136
- * http://twitter.github.com/bootstrap/javascript.html#buttons
137
- * ============================================================
138
- * Copyright 2012 Twitter, Inc.
139
- *
140
- * Licensed under the Apache License, Version 2.0 (the "License");
141
- * you may not use this file except in compliance with the License.
142
- * You may obtain a copy of the License at
143
- *
144
- * http://www.apache.org/licenses/LICENSE-2.0
145
- *
146
- * Unless required by applicable law or agreed to in writing, software
147
- * distributed under the License is distributed on an "AS IS" BASIS,
148
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
149
- * See the License for the specific language governing permissions and
150
- * limitations under the License.
151
- * ============================================================ */
152
-
153
- !(function ($) {
154
- "use strict"; // jshint ;_;
155
-
156
- /* BUTTON PUBLIC CLASS DEFINITION
157
- * ============================== */
158
-
159
- var Button = function (element, options) {
160
- this.$element = $(element);
161
- this.options = $.extend({}, $.fn.button.defaults, options);
162
- };
163
-
164
- Button.prototype.setState = function (state) {
165
- var d = "disabled",
166
- $el = this.$element,
167
- data = $el.data(),
168
- val = $el.is("input") ? "val" : "html";
169
-
170
- state = state + "Text";
171
- data.resetText || $el.data("resetText", $el[val]());
172
-
173
- $el[val](data[state] || this.options[state]);
174
-
175
- // push to event loop to allow forms to submit
176
- setTimeout(function () {
177
- state == "loadingText"
178
- ? $el.addClass(d).attr(d, d)
179
- : $el.removeClass(d).removeAttr(d);
180
- }, 0);
181
- };
182
-
183
- Button.prototype.toggle = function () {
184
- var $parent = this.$element.closest('[data-toggle="buttons-radio"]');
185
-
186
- $parent && $parent.find(".active").removeClass("active");
187
-
188
- this.$element.toggleClass("active");
189
- };
190
-
191
- /* BUTTON PLUGIN DEFINITION
192
- * ======================== */
193
-
194
- $.fn.button = function (option) {
195
- return this.each(function () {
196
- var $this = $(this),
197
- data = $this.data("button"),
198
- options = typeof option == "object" && option;
199
- if (!data) $this.data("button", (data = new Button(this, options)));
200
- if (option == "toggle") data.toggle();
201
- else if (option) data.setState(option);
202
- });
203
- };
204
-
205
- $.fn.button.defaults = {
206
- loadingText: "loading...",
207
- };
208
-
209
- $.fn.button.Constructor = Button;
210
-
211
- /* BUTTON DATA-API
212
- * =============== */
213
-
214
- $(document).on(
215
- "click.button.data-api",
216
- "[data-toggle^=button]",
217
- function (e) {
218
- var $btn = $(e.target);
219
- if (!$btn.hasClass("btn")) $btn = $btn.closest(".btn");
220
- $btn.button("toggle");
221
- }
222
- );
223
- })(window.jQuery);
224
- /* ==========================================================
225
- * bootstrap-carousel.js v2.2.1
226
- * http://twitter.github.com/bootstrap/javascript.html#carousel
227
- * ==========================================================
228
- * Copyright 2012 Twitter, Inc.
229
- *
230
- * Licensed under the Apache License, Version 2.0 (the "License");
231
- * you may not use this file except in compliance with the License.
232
- * You may obtain a copy of the License at
233
- *
234
- * http://www.apache.org/licenses/LICENSE-2.0
235
- *
236
- * Unless required by applicable law or agreed to in writing, software
237
- * distributed under the License is distributed on an "AS IS" BASIS,
238
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
239
- * See the License for the specific language governing permissions and
240
- * limitations under the License.
241
- * ========================================================== */
242
-
243
- !(function ($) {
244
- "use strict"; // jshint ;_;
245
-
246
- /* CAROUSEL CLASS DEFINITION
247
- * ========================= */
248
-
249
- var Carousel = function (element, options) {
250
- this.$element = $(element);
251
- this.options = options;
252
- this.options.slide && this.slide(this.options.slide);
253
- this.options.pause == "hover" &&
254
- this.$element
255
- .on("mouseenter", $.proxy(this.pause, this))
256
- .on("mouseleave", $.proxy(this.cycle, this));
257
- };
258
-
259
- Carousel.prototype = {
260
- cycle: function (e) {
261
- if (!e) this.paused = false;
262
- this.options.interval &&
263
- !this.paused &&
264
- (this.interval = setInterval(
265
- $.proxy(this.next, this),
266
- this.options.interval
267
- ));
268
- return this;
269
- },
270
-
271
- to: function (pos) {
272
- var $active = this.$element.find(".item.active"),
273
- children = $active.parent().children(),
274
- activePos = children.index($active),
275
- that = this;
276
-
277
- if (pos > children.length - 1 || pos < 0) return;
278
-
279
- if (this.sliding) {
280
- return this.$element.one("slid", function () {
281
- that.to(pos);
282
- });
283
- }
284
-
285
- if (activePos == pos) {
286
- return this.pause().cycle();
287
- }
288
-
289
- return this.slide(pos > activePos ? "next" : "prev", $(children[pos]));
290
- },
291
-
292
- pause: function (e) {
293
- if (!e) this.paused = true;
294
- if (
295
- this.$element.find(".next, .prev").length &&
296
- $.support.transition.end
297
- ) {
298
- this.$element.trigger($.support.transition.end);
299
- this.cycle();
300
- }
301
- clearInterval(this.interval);
302
- this.interval = null;
303
- return this;
304
- },
305
-
306
- next: function () {
307
- if (this.sliding) return;
308
- return this.slide("next");
309
- },
310
-
311
- prev: function () {
312
- if (this.sliding) return;
313
- return this.slide("prev");
314
- },
315
-
316
- slide: function (type, next) {
317
- var $active = this.$element.find(".item.active"),
318
- $next = next || $active[type](),
319
- isCycling = this.interval,
320
- direction = type == "next" ? "left" : "right",
321
- fallback = type == "next" ? "first" : "last",
322
- that = this,
323
- e;
324
-
325
- this.sliding = true;
326
-
327
- isCycling && this.pause();
328
-
329
- $next = $next.length ? $next : this.$element.find(".item")[fallback]();
330
-
331
- e = $.Event("slide", {
332
- relatedTarget: $next[0],
333
- });
334
-
335
- if ($next.hasClass("active")) return;
336
-
337
- if ($.support.transition && this.$element.hasClass("slide")) {
338
- this.$element.trigger(e);
339
- if (e.isDefaultPrevented()) return;
340
- $next.addClass(type);
341
- $next[0].offsetWidth; // force reflow
342
- $active.addClass(direction);
343
- $next.addClass(direction);
344
- this.$element.one($.support.transition.end, function () {
345
- $next.removeClass([type, direction].join(" ")).addClass("active");
346
- $active.removeClass(["active", direction].join(" "));
347
- that.sliding = false;
348
- setTimeout(function () {
349
- that.$element.trigger("slid");
350
- }, 0);
351
- });
352
- } else {
353
- this.$element.trigger(e);
354
- if (e.isDefaultPrevented()) return;
355
- $active.removeClass("active");
356
- $next.addClass("active");
357
- this.sliding = false;
358
- this.$element.trigger("slid");
359
- }
360
-
361
- isCycling && this.cycle();
362
-
363
- return this;
364
- },
365
- };
366
-
367
- /* CAROUSEL PLUGIN DEFINITION
368
- * ========================== */
369
-
370
- $.fn.carousel = function (option) {
371
- return this.each(function () {
372
- var $this = $(this),
373
- data = $this.data("carousel"),
374
- options = $.extend(
375
- {},
376
- $.fn.carousel.defaults,
377
- typeof option == "object" && option
378
- ),
379
- action = typeof option == "string" ? option : options.slide;
380
- if (!data) $this.data("carousel", (data = new Carousel(this, options)));
381
- if (typeof option == "number") data.to(option);
382
- else if (action) data[action]();
383
- else if (options.interval) data.cycle();
384
- });
385
- };
386
-
387
- $.fn.carousel.defaults = {
388
- interval: 5000,
389
- pause: "hover",
390
- };
391
-
392
- $.fn.carousel.Constructor = Carousel;
393
-
394
- /* CAROUSEL DATA-API
395
- * ================= */
396
-
397
- $(document).on("click.carousel.data-api", "[data-slide]", function (e) {
398
- var $this = $(this),
399
- href,
400
- $target = $(
401
- $this.attr("data-target") ||
402
- ((href = $this.attr("href")) && href.replace(/.*(?=#[^\s]+$)/, ""))
403
- ), //strip for ie7
404
- options = $.extend({}, $target.data(), $this.data());
405
- $target.carousel(options);
406
- e.preventDefault();
407
- });
408
- })(window.jQuery);
409
- /* =============================================================
410
- * bootstrap-collapse.js v2.2.1
411
- * http://twitter.github.com/bootstrap/javascript.html#collapse
412
- * =============================================================
413
- * Copyright 2012 Twitter, Inc.
414
- *
415
- * Licensed under the Apache License, Version 2.0 (the "License");
416
- * you may not use this file except in compliance with the License.
417
- * You may obtain a copy of the License at
418
- *
419
- * http://www.apache.org/licenses/LICENSE-2.0
420
- *
421
- * Unless required by applicable law or agreed to in writing, software
422
- * distributed under the License is distributed on an "AS IS" BASIS,
423
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
424
- * See the License for the specific language governing permissions and
425
- * limitations under the License.
426
- * ============================================================ */
427
-
428
- !(function ($) {
429
- "use strict"; // jshint ;_;
430
-
431
- /* COLLAPSE PUBLIC CLASS DEFINITION
432
- * ================================ */
433
-
434
- var Collapse = function (element, options) {
435
- this.$element = $(element);
436
- this.options = $.extend({}, $.fn.collapse.defaults, options);
437
-
438
- if (this.options.parent) {
439
- this.$parent = $(this.options.parent);
440
- }
441
-
442
- this.options.toggle && this.toggle();
443
- };
444
-
445
- Collapse.prototype = {
446
- constructor: Collapse,
447
-
448
- dimension: function () {
449
- var hasWidth = this.$element.hasClass("width");
450
- return hasWidth ? "width" : "height";
451
- },
452
-
453
- show: function () {
454
- var dimension, scroll, actives, hasData;
455
-
456
- if (this.transitioning) return;
457
-
458
- dimension = this.dimension();
459
- scroll = $.camelCase(["scroll", dimension].join("-"));
460
- actives = this.$parent && this.$parent.find("> .accordion-group > .in");
461
-
462
- if (actives && actives.length) {
463
- hasData = actives.data("collapse");
464
- if (hasData && hasData.transitioning) return;
465
- actives.collapse("hide");
466
- hasData || actives.data("collapse", null);
467
- }
468
-
469
- this.$element[dimension](0);
470
- this.transition("addClass", $.Event("show"), "shown");
471
- $.support.transition &&
472
- this.$element[dimension](this.$element[0][scroll]);
473
- },
474
-
475
- hide: function () {
476
- var dimension;
477
- if (this.transitioning) return;
478
- dimension = this.dimension();
479
- this.reset(this.$element[dimension]());
480
- this.transition("removeClass", $.Event("hide"), "hidden");
481
- this.$element[dimension](0);
482
- },
483
-
484
- reset: function (size) {
485
- var dimension = this.dimension();
486
-
487
- this.$element.removeClass("collapse")[dimension](size || "auto")[0]
488
- .offsetWidth;
489
-
490
- this.$element[size !== null ? "addClass" : "removeClass"]("collapse");
491
-
492
- return this;
493
- },
494
-
495
- transition: function (method, startEvent, completeEvent) {
496
- var that = this,
497
- complete = function () {
498
- if (startEvent.type == "show") that.reset();
499
- that.transitioning = 0;
500
- that.$element.trigger(completeEvent);
501
- };
502
-
503
- this.$element.trigger(startEvent);
504
-
505
- if (startEvent.isDefaultPrevented()) return;
506
-
507
- this.transitioning = 1;
508
-
509
- this.$element[method]("in");
510
-
511
- $.support.transition && this.$element.hasClass("collapse")
512
- ? this.$element.one($.support.transition.end, complete)
513
- : complete();
514
- },
515
-
516
- toggle: function () {
517
- this[this.$element.hasClass("in") ? "hide" : "show"]();
518
- },
519
- };
520
-
521
- /* COLLAPSIBLE PLUGIN DEFINITION
522
- * ============================== */
523
-
524
- $.fn.collapse = function (option) {
525
- return this.each(function () {
526
- var $this = $(this),
527
- data = $this.data("collapse"),
528
- options = typeof option == "object" && option;
529
- if (!data) $this.data("collapse", (data = new Collapse(this, options)));
530
- if (typeof option == "string") data[option]();
531
- });
532
- };
533
-
534
- $.fn.collapse.defaults = {
535
- toggle: true,
536
- };
537
-
538
- $.fn.collapse.Constructor = Collapse;
539
-
540
- /* COLLAPSIBLE DATA-API
541
- * ==================== */
542
-
543
- $(document).on(
544
- "click.collapse.data-api",
545
- "[data-toggle=collapse]",
546
- function (e) {
547
- var $this = $(this),
548
- href,
549
- target =
550
- $this.attr("data-target") ||
551
- e.preventDefault() ||
552
- ((href = $this.attr("href")) && href.replace(/.*(?=#[^\s]+$)/, "")), //strip for ie7
553
- option = $(target).data("collapse") ? "toggle" : $this.data();
554
- $this[$(target).hasClass("in") ? "addClass" : "removeClass"]("collapsed");
555
- $(target).collapse(option);
556
- }
557
- );
558
- })(window.jQuery);
559
- /* ============================================================
560
- * bootstrap-dropdown.js v2.2.1
561
- * http://twitter.github.com/bootstrap/javascript.html#dropdowns
562
- * ============================================================
563
- * Copyright 2012 Twitter, Inc.
564
- *
565
- * Licensed under the Apache License, Version 2.0 (the "License");
566
- * you may not use this file except in compliance with the License.
567
- * You may obtain a copy of the License at
568
- *
569
- * http://www.apache.org/licenses/LICENSE-2.0
570
- *
571
- * Unless required by applicable law or agreed to in writing, software
572
- * distributed under the License is distributed on an "AS IS" BASIS,
573
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
574
- * See the License for the specific language governing permissions and
575
- * limitations under the License.
576
- * ============================================================ */
577
-
578
- !(function ($) {
579
- "use strict"; // jshint ;_;
580
-
581
- /* DROPDOWN CLASS DEFINITION
582
- * ========================= */
583
-
584
- var toggle = "[data-toggle=dropdown]",
585
- Dropdown = function (element) {
586
- var $el = $(element).on("click.dropdown.data-api", this.toggle);
587
- $("html").on("click.dropdown.data-api", function () {
588
- $el.parent().removeClass("open");
589
- });
590
- };
591
-
592
- Dropdown.prototype = {
593
- constructor: Dropdown,
594
-
595
- toggle: function (e) {
596
- var $this = $(this),
597
- $parent,
598
- isActive;
599
-
600
- if ($this.is(".disabled, :disabled")) return;
601
-
602
- $parent = getParent($this);
603
-
604
- isActive = $parent.hasClass("open");
605
-
606
- clearMenus();
607
-
608
- if (!isActive) {
609
- $parent.toggleClass("open");
610
- $this.focus();
611
- }
612
-
613
- return false;
614
- },
615
-
616
- keydown: function (e) {
617
- var $this, $items, $active, $parent, isActive, index;
618
-
619
- if (!/(38|40|27)/.test(e.keyCode)) return;
620
-
621
- $this = $(this);
622
-
623
- e.preventDefault();
624
- e.stopPropagation();
625
-
626
- if ($this.is(".disabled, :disabled")) return;
627
-
628
- $parent = getParent($this);
629
-
630
- isActive = $parent.hasClass("open");
631
-
632
- if (!isActive || (isActive && e.keyCode == 27)) return $this.click();
633
-
634
- $items = $("[role=menu] li:not(.divider) a", $parent);
635
-
636
- if (!$items.length) return;
637
-
638
- index = $items.index($items.filter(":focus"));
639
-
640
- if (e.keyCode == 38 && index > 0) index--; // up
641
- if (e.keyCode == 40 && index < $items.length - 1) index++; // down
642
- if (!~index) index = 0;
643
-
644
- $items.eq(index).focus();
645
- },
646
- };
647
-
648
- function clearMenus() {
649
- $(toggle).each(function () {
650
- getParent($(this)).removeClass("open");
651
- });
652
- }
653
-
654
- function getParent($this) {
655
- var selector = $this.attr("data-target"),
656
- $parent;
657
-
658
- if (!selector) {
659
- selector = $this.attr("href");
660
- selector =
661
- selector &&
662
- /#/.test(selector) &&
663
- selector.replace(/.*(?=#[^\s]*$)/, ""); //strip for ie7
664
- }
665
-
666
- $parent = $(selector);
667
- $parent.length || ($parent = $this.parent());
668
-
669
- return $parent;
670
- }
671
-
672
- /* DROPDOWN PLUGIN DEFINITION
673
- * ========================== */
674
-
675
- $.fn.dropdown = function (option) {
676
- return this.each(function () {
677
- var $this = $(this),
678
- data = $this.data("dropdown");
679
- if (!data) $this.data("dropdown", (data = new Dropdown(this)));
680
- if (typeof option == "string") data[option].call($this);
681
- });
682
- };
683
-
684
- $.fn.dropdown.Constructor = Dropdown;
685
-
686
- /* APPLY TO STANDARD DROPDOWN ELEMENTS
687
- * =================================== */
688
-
689
- $(document)
690
- .on("click.dropdown.data-api touchstart.dropdown.data-api", clearMenus)
691
- .on(
692
- "click.dropdown touchstart.dropdown.data-api",
693
- ".dropdown form",
694
- function (e) {
695
- e.stopPropagation();
696
- }
697
- )
698
- .on(
699
- "click.dropdown.data-api touchstart.dropdown.data-api",
700
- toggle,
701
- Dropdown.prototype.toggle
702
- )
703
- .on(
704
- "keydown.dropdown.data-api touchstart.dropdown.data-api",
705
- toggle + ", [role=menu]",
706
- Dropdown.prototype.keydown
707
- );
708
- })(window.jQuery);
709
- /* =========================================================
710
- * bootstrap-modal.js v2.2.1
711
- * http://twitter.github.com/bootstrap/javascript.html#modals
712
- * =========================================================
713
- * Copyright 2012 Twitter, Inc.
714
- *
715
- * Licensed under the Apache License, Version 2.0 (the "License");
716
- * you may not use this file except in compliance with the License.
717
- * You may obtain a copy of the License at
718
- *
719
- * http://www.apache.org/licenses/LICENSE-2.0
720
- *
721
- * Unless required by applicable law or agreed to in writing, software
722
- * distributed under the License is distributed on an "AS IS" BASIS,
723
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
724
- * See the License for the specific language governing permissions and
725
- * limitations under the License.
726
- * ========================================================= */
727
-
728
- !(function ($) {
729
- "use strict"; // jshint ;_;
730
-
731
- /* MODAL CLASS DEFINITION
732
- * ====================== */
733
-
734
- var Modal = function (element, options) {
735
- this.options = options;
736
- this.$element = $(element).delegate(
737
- '[data-dismiss="modal"]',
738
- "click.dismiss.modal",
739
- $.proxy(this.hide, this)
740
- );
741
- this.options.remote &&
742
- this.$element.find(".modal-body").load(this.options.remote);
743
- };
744
-
745
- Modal.prototype = {
746
- constructor: Modal,
747
-
748
- toggle: function () {
749
- return this[!this.isShown ? "show" : "hide"]();
750
- },
751
-
752
- show: function () {
753
- var that = this,
754
- e = $.Event("show");
755
-
756
- this.$element.trigger(e);
757
-
758
- if (this.isShown || e.isDefaultPrevented()) return;
759
-
760
- this.isShown = true;
761
-
762
- this.escape();
763
-
764
- this.backdrop(function () {
765
- var transition = $.support.transition && that.$element.hasClass("fade");
766
-
767
- if (!that.$element.parent().length) {
768
- that.$element.appendTo(document.body); //don't move modals dom position
769
- }
770
-
771
- that.$element.show();
772
-
773
- if (transition) {
774
- that.$element[0].offsetWidth; // force reflow
775
- }
776
-
777
- that.$element.addClass("in").attr("aria-hidden", false);
778
-
779
- that.enforceFocus();
780
-
781
- transition
782
- ? that.$element.one($.support.transition.end, function () {
783
- that.$element.focus().trigger("shown");
784
- })
785
- : that.$element.focus().trigger("shown");
786
- });
787
- },
788
-
789
- hide: function (e) {
790
- e && e.preventDefault();
791
-
792
- var that = this;
793
-
794
- e = $.Event("hide");
795
-
796
- this.$element.trigger(e);
797
-
798
- if (!this.isShown || e.isDefaultPrevented()) return;
799
-
800
- this.isShown = false;
801
-
802
- this.escape();
803
-
804
- $(document).off("focusin.modal");
805
-
806
- this.$element.removeClass("in").attr("aria-hidden", true);
807
-
808
- $.support.transition && this.$element.hasClass("fade")
809
- ? this.hideWithTransition()
810
- : this.hideModal();
811
- },
812
-
813
- enforceFocus: function () {
814
- var that = this;
815
- $(document).on("focusin.modal", function (e) {
816
- if (
817
- that.$element[0] !== e.target &&
818
- !that.$element.has(e.target).length
819
- ) {
820
- that.$element.focus();
821
- }
822
- });
823
- },
824
-
825
- escape: function () {
826
- var that = this;
827
- if (this.isShown && this.options.keyboard) {
828
- this.$element.on("keyup.dismiss.modal", function (e) {
829
- e.which == 27 && that.hide();
830
- });
831
- } else if (!this.isShown) {
832
- this.$element.off("keyup.dismiss.modal");
833
- }
834
- },
835
-
836
- hideWithTransition: function () {
837
- var that = this,
838
- timeout = setTimeout(function () {
839
- that.$element.off($.support.transition.end);
840
- that.hideModal();
841
- }, 500);
842
-
843
- this.$element.one($.support.transition.end, function () {
844
- clearTimeout(timeout);
845
- that.hideModal();
846
- });
847
- },
848
-
849
- hideModal: function (that) {
850
- this.$element.hide().trigger("hidden");
851
-
852
- this.backdrop();
853
- },
854
-
855
- removeBackdrop: function () {
856
- this.$backdrop.remove();
857
- this.$backdrop = null;
858
- },
859
-
860
- backdrop: function (callback) {
861
- var that = this,
862
- animate = this.$element.hasClass("fade") ? "fade" : "";
863
-
864
- if (this.isShown && this.options.backdrop) {
865
- var doAnimate = $.support.transition && animate;
866
-
867
- this.$backdrop = $(
868
- '<div class="modal-backdrop ' + animate + '" />'
869
- ).appendTo(document.body);
870
-
871
- this.$backdrop.click(
872
- this.options.backdrop == "static"
873
- ? $.proxy(this.$element[0].focus, this.$element[0])
874
- : $.proxy(this.hide, this)
875
- );
876
-
877
- if (doAnimate) this.$backdrop[0].offsetWidth; // force reflow
878
-
879
- this.$backdrop.addClass("in");
880
-
881
- doAnimate
882
- ? this.$backdrop.one($.support.transition.end, callback)
883
- : callback();
884
- } else if (!this.isShown && this.$backdrop) {
885
- this.$backdrop.removeClass("in");
886
-
887
- $.support.transition && this.$element.hasClass("fade")
888
- ? this.$backdrop.one(
889
- $.support.transition.end,
890
- $.proxy(this.removeBackdrop, this)
891
- )
892
- : this.removeBackdrop();
893
- } else if (callback) {
894
- callback();
895
- }
896
- },
897
- };
898
-
899
- /* MODAL PLUGIN DEFINITION
900
- * ======================= */
901
-
902
- $.fn.modal = function (option) {
903
- return this.each(function () {
904
- var $this = $(this),
905
- data = $this.data("modal"),
906
- options = $.extend(
907
- {},
908
- $.fn.modal.defaults,
909
- $this.data(),
910
- typeof option == "object" && option
911
- );
912
- if (!data) $this.data("modal", (data = new Modal(this, options)));
913
- if (typeof option == "string") data[option]();
914
- else if (options.show) data.show();
915
- });
916
- };
917
-
918
- $.fn.modal.defaults = {
919
- backdrop: true,
920
- keyboard: true,
921
- show: true,
922
- };
923
-
924
- $.fn.modal.Constructor = Modal;
925
-
926
- /* MODAL DATA-API
927
- * ============== */
928
-
929
- $(document).on("click.modal.data-api", '[data-toggle="modal"]', function (e) {
930
- var $this = $(this),
931
- href = $this.attr("href"),
932
- $target = $(
933
- $this.attr("data-target") ||
934
- (href && href.replace(/.*(?=#[^\s]+$)/, ""))
935
- ), //strip for ie7
936
- option = $target.data("modal")
937
- ? "toggle"
938
- : $.extend(
939
- { remote: !/#/.test(href) && href },
940
- $target.data(),
941
- $this.data()
942
- );
943
-
944
- e.preventDefault();
945
-
946
- $target.modal(option).one("hide", function () {
947
- $this.focus();
948
- });
949
- });
950
- })(window.jQuery);
951
- /* ===========================================================
952
- * bootstrap-tooltip.js v2.2.1
953
- * http://twitter.github.com/bootstrap/javascript.html#tooltips
954
- * Inspired by the original jQuery.tipsy by Jason Frame
955
- * ===========================================================
956
- * Copyright 2012 Twitter, Inc.
957
- *
958
- * Licensed under the Apache License, Version 2.0 (the "License");
959
- * you may not use this file except in compliance with the License.
960
- * You may obtain a copy of the License at
961
- *
962
- * http://www.apache.org/licenses/LICENSE-2.0
963
- *
964
- * Unless required by applicable law or agreed to in writing, software
965
- * distributed under the License is distributed on an "AS IS" BASIS,
966
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
967
- * See the License for the specific language governing permissions and
968
- * limitations under the License.
969
- * ========================================================== */
970
-
971
- !(function ($) {
972
- "use strict"; // jshint ;_;
973
-
974
- /* TOOLTIP PUBLIC CLASS DEFINITION
975
- * =============================== */
976
-
977
- var Tooltip = function (element, options) {
978
- this.init("tooltip", element, options);
979
- };
980
-
981
- Tooltip.prototype = {
982
- constructor: Tooltip,
983
-
984
- init: function (type, element, options) {
985
- var eventIn, eventOut;
986
-
987
- this.type = type;
988
- this.$element = $(element);
989
- this.options = this.getOptions(options);
990
- this.enabled = true;
991
-
992
- if (this.options.trigger == "click") {
993
- this.$element.on(
994
- "click." + this.type,
995
- this.options.selector,
996
- $.proxy(this.toggle, this)
997
- );
998
- } else if (this.options.trigger != "manual") {
999
- eventIn = this.options.trigger == "hover" ? "mouseenter" : "focus";
1000
- eventOut = this.options.trigger == "hover" ? "mouseleave" : "blur";
1001
- this.$element.on(
1002
- eventIn + "." + this.type,
1003
- this.options.selector,
1004
- $.proxy(this.enter, this)
1005
- );
1006
- this.$element.on(
1007
- eventOut + "." + this.type,
1008
- this.options.selector,
1009
- $.proxy(this.leave, this)
1010
- );
1011
- }
1012
-
1013
- this.options.selector
1014
- ? (this._options = $.extend({}, this.options, {
1015
- trigger: "manual",
1016
- selector: "",
1017
- }))
1018
- : this.fixTitle();
1019
- },
1020
-
1021
- getOptions: function (options) {
1022
- options = $.extend(
1023
- {},
1024
- $.fn[this.type].defaults,
1025
- options,
1026
- this.$element.data()
1027
- );
1028
-
1029
- if (options.delay && typeof options.delay == "number") {
1030
- options.delay = {
1031
- show: options.delay,
1032
- hide: options.delay,
1033
- };
1034
- }
1035
-
1036
- return options;
1037
- },
1038
-
1039
- enter: function (e) {
1040
- var self = $(e.currentTarget)[this.type](this._options).data(this.type);
1041
-
1042
- if (!self.options.delay || !self.options.delay.show) return self.show();
1043
-
1044
- clearTimeout(this.timeout);
1045
- self.hoverState = "in";
1046
- this.timeout = setTimeout(function () {
1047
- if (self.hoverState == "in") self.show();
1048
- }, self.options.delay.show);
1049
- },
1050
-
1051
- leave: function (e) {
1052
- var self = $(e.currentTarget)[this.type](this._options).data(this.type);
1053
-
1054
- if (this.timeout) clearTimeout(this.timeout);
1055
- if (!self.options.delay || !self.options.delay.hide) return self.hide();
1056
-
1057
- self.hoverState = "out";
1058
- this.timeout = setTimeout(function () {
1059
- if (self.hoverState == "out") self.hide();
1060
- }, self.options.delay.hide);
1061
- },
1062
-
1063
- show: function () {
1064
- var $tip, inside, pos, actualWidth, actualHeight, placement, tp;
1065
-
1066
- if (this.hasContent() && this.enabled) {
1067
- $tip = this.tip();
1068
- this.setContent();
1069
-
1070
- if (this.options.animation) {
1071
- $tip.addClass("fade");
1072
- }
1073
-
1074
- placement =
1075
- typeof this.options.placement == "function"
1076
- ? this.options.placement.call(this, $tip[0], this.$element[0])
1077
- : this.options.placement;
1078
-
1079
- inside = /in/.test(placement);
1080
-
1081
- $tip
1082
- .detach()
1083
- .css({ top: 0, left: 0, display: "block" })
1084
- .insertAfter(this.$element);
1085
-
1086
- pos = this.getPosition(inside);
1087
-
1088
- actualWidth = $tip[0].offsetWidth;
1089
- actualHeight = $tip[0].offsetHeight;
1090
-
1091
- switch (inside ? placement.split(" ")[1] : placement) {
1092
- case "bottom":
1093
- tp = {
1094
- top: pos.top + pos.height,
1095
- left: pos.left + pos.width / 2 - actualWidth / 2,
1096
- };
1097
- break;
1098
- case "top":
1099
- tp = {
1100
- top: pos.top - actualHeight,
1101
- left: pos.left + pos.width / 2 - actualWidth / 2,
1102
- };
1103
- break;
1104
- case "left":
1105
- tp = {
1106
- top: pos.top + pos.height / 2 - actualHeight / 2,
1107
- left: pos.left - actualWidth,
1108
- };
1109
- break;
1110
- case "right":
1111
- tp = {
1112
- top: pos.top + pos.height / 2 - actualHeight / 2,
1113
- left: pos.left + pos.width,
1114
- };
1115
- break;
1116
- }
1117
-
1118
- $tip.offset(tp).addClass(placement).addClass("in");
1119
- }
1120
- },
1121
-
1122
- setContent: function () {
1123
- var $tip = this.tip(),
1124
- title = this.getTitle();
1125
-
1126
- $tip.find(".tooltip-inner")[this.options.html ? "html" : "text"](title);
1127
- $tip.removeClass("fade in top bottom left right");
1128
- },
1129
-
1130
- hide: function () {
1131
- var that = this,
1132
- $tip = this.tip();
1133
-
1134
- $tip.removeClass("in");
1135
-
1136
- function removeWithAnimation() {
1137
- var timeout = setTimeout(function () {
1138
- $tip.off($.support.transition.end).detach();
1139
- }, 500);
1140
-
1141
- $tip.one($.support.transition.end, function () {
1142
- clearTimeout(timeout);
1143
- $tip.detach();
1144
- });
1145
- }
1146
-
1147
- $.support.transition && this.$tip.hasClass("fade")
1148
- ? removeWithAnimation()
1149
- : $tip.detach();
1150
-
1151
- return this;
1152
- },
1153
-
1154
- fixTitle: function () {
1155
- var $e = this.$element;
1156
- if (
1157
- $e.attr("title") ||
1158
- typeof $e.attr("data-original-title") != "string"
1159
- ) {
1160
- $e.attr("data-original-title", $e.attr("title") || "").removeAttr(
1161
- "title"
1162
- );
1163
- }
1164
- },
1165
-
1166
- hasContent: function () {
1167
- return this.getTitle();
1168
- },
1169
-
1170
- getPosition: function (inside) {
1171
- return $.extend(
1172
- {},
1173
- inside ? { top: 0, left: 0 } : this.$element.offset(),
1174
- {
1175
- width: this.$element[0].offsetWidth,
1176
- height: this.$element[0].offsetHeight,
1177
- }
1178
- );
1179
- },
1180
-
1181
- getTitle: function () {
1182
- var title,
1183
- $e = this.$element,
1184
- o = this.options;
1185
-
1186
- title =
1187
- $e.attr("data-original-title") ||
1188
- (typeof o.title == "function" ? o.title.call($e[0]) : o.title);
1189
-
1190
- return title;
1191
- },
1192
-
1193
- tip: function () {
1194
- return (this.$tip = this.$tip || $(this.options.template));
1195
- },
1196
-
1197
- validate: function () {
1198
- if (!this.$element[0].parentNode) {
1199
- this.hide();
1200
- this.$element = null;
1201
- this.options = null;
1202
- }
1203
- },
1204
-
1205
- enable: function () {
1206
- this.enabled = true;
1207
- },
1208
-
1209
- disable: function () {
1210
- this.enabled = false;
1211
- },
1212
-
1213
- toggleEnabled: function () {
1214
- this.enabled = !this.enabled;
1215
- },
1216
-
1217
- toggle: function (e) {
1218
- var self = $(e.currentTarget)[this.type](this._options).data(this.type);
1219
- self[self.tip().hasClass("in") ? "hide" : "show"]();
1220
- },
1221
-
1222
- destroy: function () {
1223
- this.hide()
1224
- .$element.off("." + this.type)
1225
- .removeData(this.type);
1226
- },
1227
- };
1228
-
1229
- /* TOOLTIP PLUGIN DEFINITION
1230
- * ========================= */
1231
-
1232
- $.fn.tooltip = function (option) {
1233
- return this.each(function () {
1234
- var $this = $(this),
1235
- data = $this.data("tooltip"),
1236
- options = typeof option == "object" && option;
1237
- if (!data) $this.data("tooltip", (data = new Tooltip(this, options)));
1238
- if (typeof option == "string") data[option]();
1239
- });
1240
- };
1241
-
1242
- $.fn.tooltip.Constructor = Tooltip;
1243
-
1244
- $.fn.tooltip.defaults = {
1245
- animation: true,
1246
- placement: "top",
1247
- selector: false,
1248
- template:
1249
- '<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',
1250
- trigger: "hover",
1251
- title: "",
1252
- delay: 0,
1253
- html: false,
1254
- };
1255
- })(window.jQuery);
1256
- /* ===========================================================
1257
- * bootstrap-popover.js v2.2.1
1258
- * http://twitter.github.com/bootstrap/javascript.html#popovers
1259
- * ===========================================================
1260
- * Copyright 2012 Twitter, Inc.
1261
- *
1262
- * Licensed under the Apache License, Version 2.0 (the "License");
1263
- * you may not use this file except in compliance with the License.
1264
- * You may obtain a copy of the License at
1265
- *
1266
- * http://www.apache.org/licenses/LICENSE-2.0
1267
- *
1268
- * Unless required by applicable law or agreed to in writing, software
1269
- * distributed under the License is distributed on an "AS IS" BASIS,
1270
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1271
- * See the License for the specific language governing permissions and
1272
- * limitations under the License.
1273
- * =========================================================== */
1274
-
1275
- !(function ($) {
1276
- "use strict"; // jshint ;_;
1277
-
1278
- /* POPOVER PUBLIC CLASS DEFINITION
1279
- * =============================== */
1280
-
1281
- var Popover = function (element, options) {
1282
- this.init("popover", element, options);
1283
- };
1284
-
1285
- /* NOTE: POPOVER EXTENDS BOOTSTRAP-TOOLTIP.js
1286
- ========================================== */
1287
-
1288
- Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype, {
1289
- constructor: Popover,
1290
-
1291
- setContent: function () {
1292
- var $tip = this.tip(),
1293
- title = this.getTitle(),
1294
- content = this.getContent();
1295
-
1296
- $tip.find(".popover-title")[this.options.html ? "html" : "text"](title);
1297
- $tip
1298
- .find(".popover-content > *")
1299
- [this.options.html ? "html" : "text"](content);
1300
-
1301
- $tip.removeClass("fade top bottom left right in");
1302
- },
1303
-
1304
- hasContent: function () {
1305
- return this.getTitle() || this.getContent();
1306
- },
1307
-
1308
- getContent: function () {
1309
- var content,
1310
- $e = this.$element,
1311
- o = this.options;
1312
-
1313
- content =
1314
- $e.attr("data-content") ||
1315
- (typeof o.content == "function" ? o.content.call($e[0]) : o.content);
1316
-
1317
- return content;
1318
- },
1319
-
1320
- tip: function () {
1321
- if (!this.$tip) {
1322
- this.$tip = $(this.options.template);
1323
- }
1324
- return this.$tip;
1325
- },
1326
-
1327
- destroy: function () {
1328
- this.hide()
1329
- .$element.off("." + this.type)
1330
- .removeData(this.type);
1331
- },
1332
- });
1333
-
1334
- /* POPOVER PLUGIN DEFINITION
1335
- * ======================= */
1336
-
1337
- $.fn.popover = function (option) {
1338
- return this.each(function () {
1339
- var $this = $(this),
1340
- data = $this.data("popover"),
1341
- options = typeof option == "object" && option;
1342
- if (!data) $this.data("popover", (data = new Popover(this, options)));
1343
- if (typeof option == "string") data[option]();
1344
- });
1345
- };
1346
-
1347
- $.fn.popover.Constructor = Popover;
1348
-
1349
- $.fn.popover.defaults = $.extend({}, $.fn.tooltip.defaults, {
1350
- placement: "right",
1351
- trigger: "click",
1352
- content: "",
1353
- template:
1354
- '<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>',
1355
- });
1356
- })(window.jQuery);
1357
- /* =============================================================
1358
- * bootstrap-scrollspy.js v2.2.1
1359
- * http://twitter.github.com/bootstrap/javascript.html#scrollspy
1360
- * =============================================================
1361
- * Copyright 2012 Twitter, Inc.
1362
- *
1363
- * Licensed under the Apache License, Version 2.0 (the "License");
1364
- * you may not use this file except in compliance with the License.
1365
- * You may obtain a copy of the License at
1366
- *
1367
- * http://www.apache.org/licenses/LICENSE-2.0
1368
- *
1369
- * Unless required by applicable law or agreed to in writing, software
1370
- * distributed under the License is distributed on an "AS IS" BASIS,
1371
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1372
- * See the License for the specific language governing permissions and
1373
- * limitations under the License.
1374
- * ============================================================== */
1375
-
1376
- !(function ($) {
1377
- "use strict"; // jshint ;_;
1378
-
1379
- /* SCROLLSPY CLASS DEFINITION
1380
- * ========================== */
1381
-
1382
- function ScrollSpy(element, options) {
1383
- var process = $.proxy(this.process, this),
1384
- $element = $(element).is("body") ? $(window) : $(element),
1385
- href;
1386
- this.options = $.extend({}, $.fn.scrollspy.defaults, options);
1387
- this.$scrollElement = $element.on("scroll.scroll-spy.data-api", process);
1388
- this.selector =
1389
- (this.options.target ||
1390
- ((href = $(element).attr("href")) &&
1391
- href.replace(/.*(?=#[^\s]+$)/, "")) || //strip for ie7
1392
- "") + " .nav li > a";
1393
- this.$body = $("body");
1394
- this.refresh();
1395
- this.process();
1396
- }
1397
-
1398
- ScrollSpy.prototype = {
1399
- constructor: ScrollSpy,
1400
-
1401
- refresh: function () {
1402
- var self = this,
1403
- $targets;
1404
-
1405
- this.offsets = $([]);
1406
- this.targets = $([]);
1407
-
1408
- $targets = this.$body
1409
- .find(this.selector)
1410
- .map(function () {
1411
- var $el = $(this),
1412
- href = $el.data("target") || $el.attr("href"),
1413
- $href = /^#\w/.test(href) && $(href);
1414
- return (
1415
- ($href && $href.length && [[$href.position().top, href]]) || null
1416
- );
1417
- })
1418
- .sort(function (a, b) {
1419
- return a[0] - b[0];
1420
- })
1421
- .each(function () {
1422
- self.offsets.push(this[0]);
1423
- self.targets.push(this[1]);
1424
- });
1425
- },
1426
-
1427
- process: function () {
1428
- var scrollTop = this.$scrollElement.scrollTop() + this.options.offset,
1429
- scrollHeight =
1430
- this.$scrollElement[0].scrollHeight || this.$body[0].scrollHeight,
1431
- maxScroll = scrollHeight - this.$scrollElement.height(),
1432
- offsets = this.offsets,
1433
- targets = this.targets,
1434
- activeTarget = this.activeTarget,
1435
- i;
1436
-
1437
- if (scrollTop >= maxScroll) {
1438
- return activeTarget != (i = targets.last()[0]) && this.activate(i);
1439
- }
1440
-
1441
- for (i = offsets.length; i--; ) {
1442
- activeTarget != targets[i] &&
1443
- scrollTop >= offsets[i] &&
1444
- (!offsets[i + 1] || scrollTop <= offsets[i + 1]) &&
1445
- this.activate(targets[i]);
1446
- }
1447
- },
1448
-
1449
- activate: function (target) {
1450
- var active, selector;
1451
-
1452
- this.activeTarget = target;
1453
-
1454
- $(this.selector).parent(".active").removeClass("active");
1455
-
1456
- selector =
1457
- this.selector +
1458
- '[data-target="' +
1459
- target +
1460
- '"],' +
1461
- this.selector +
1462
- '[href="' +
1463
- target +
1464
- '"]';
1465
-
1466
- active = $(selector).parent("li").addClass("active");
1467
-
1468
- if (active.parent(".dropdown-menu").length) {
1469
- active = active.closest("li.dropdown").addClass("active");
1470
- }
1471
-
1472
- active.trigger("activate");
1473
- },
1474
- };
1475
-
1476
- /* SCROLLSPY PLUGIN DEFINITION
1477
- * =========================== */
1478
-
1479
- $.fn.scrollspy = function (option) {
1480
- return this.each(function () {
1481
- var $this = $(this),
1482
- data = $this.data("scrollspy"),
1483
- options = typeof option == "object" && option;
1484
- if (!data) $this.data("scrollspy", (data = new ScrollSpy(this, options)));
1485
- if (typeof option == "string") data[option]();
1486
- });
1487
- };
1488
-
1489
- $.fn.scrollspy.Constructor = ScrollSpy;
1490
-
1491
- $.fn.scrollspy.defaults = {
1492
- offset: 10,
1493
- };
1494
-
1495
- /* SCROLLSPY DATA-API
1496
- * ================== */
1497
-
1498
- $(window).on("load", function () {
1499
- $('[data-spy="scroll"]').each(function () {
1500
- var $spy = $(this);
1501
- $spy.scrollspy($spy.data());
1502
- });
1503
- });
1504
- })(window.jQuery);
1505
- /* ========================================================
1506
- * bootstrap-tab.js v2.2.1
1507
- * http://twitter.github.com/bootstrap/javascript.html#tabs
1508
- * ========================================================
1509
- * Copyright 2012 Twitter, Inc.
1510
- *
1511
- * Licensed under the Apache License, Version 2.0 (the "License");
1512
- * you may not use this file except in compliance with the License.
1513
- * You may obtain a copy of the License at
1514
- *
1515
- * http://www.apache.org/licenses/LICENSE-2.0
1516
- *
1517
- * Unless required by applicable law or agreed to in writing, software
1518
- * distributed under the License is distributed on an "AS IS" BASIS,
1519
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1520
- * See the License for the specific language governing permissions and
1521
- * limitations under the License.
1522
- * ======================================================== */
1523
-
1524
- !(function ($) {
1525
- "use strict"; // jshint ;_;
1526
-
1527
- /* TAB CLASS DEFINITION
1528
- * ==================== */
1529
-
1530
- var Tab = function (element) {
1531
- this.element = $(element);
1532
- };
1533
-
1534
- Tab.prototype = {
1535
- constructor: Tab,
1536
-
1537
- show: function () {
1538
- var $this = this.element,
1539
- $ul = $this.closest("ul:not(.dropdown-menu)"),
1540
- selector = $this.attr("data-target"),
1541
- previous,
1542
- $target,
1543
- e;
1544
-
1545
- if (!selector) {
1546
- selector = $this.attr("href");
1547
- selector = selector && selector.replace(/.*(?=#[^\s]*$)/, ""); //strip for ie7
1548
- }
1549
-
1550
- if ($this.parent("li").hasClass("active")) return;
1551
-
1552
- previous = $ul.find(".active:last a")[0];
1553
-
1554
- e = $.Event("show", {
1555
- relatedTarget: previous,
1556
- });
1557
-
1558
- $this.trigger(e);
1559
-
1560
- if (e.isDefaultPrevented()) return;
1561
-
1562
- $target = $(selector);
1563
-
1564
- this.activate($this.parent("li"), $ul);
1565
- this.activate($target, $target.parent(), function () {
1566
- $this.trigger({
1567
- type: "shown",
1568
- relatedTarget: previous,
1569
- });
1570
- });
1571
- },
1572
-
1573
- activate: function (element, container, callback) {
1574
- var $active = container.find("> .active"),
1575
- transition =
1576
- callback && $.support.transition && $active.hasClass("fade");
1577
-
1578
- function next() {
1579
- $active
1580
- .removeClass("active")
1581
- .find("> .dropdown-menu > .active")
1582
- .removeClass("active");
1583
-
1584
- element.addClass("active");
1585
-
1586
- if (transition) {
1587
- element[0].offsetWidth; // reflow for transition
1588
- element.addClass("in");
1589
- } else {
1590
- element.removeClass("fade");
1591
- }
1592
-
1593
- if (element.parent(".dropdown-menu")) {
1594
- element.closest("li.dropdown").addClass("active");
1595
- }
1596
-
1597
- callback && callback();
1598
- }
1599
-
1600
- transition ? $active.one($.support.transition.end, next) : next();
1601
-
1602
- $active.removeClass("in");
1603
- },
1604
- };
1605
-
1606
- /* TAB PLUGIN DEFINITION
1607
- * ===================== */
1608
-
1609
- $.fn.tab = function (option) {
1610
- return this.each(function () {
1611
- var $this = $(this),
1612
- data = $this.data("tab");
1613
- if (!data) $this.data("tab", (data = new Tab(this)));
1614
- if (typeof option == "string") data[option]();
1615
- });
1616
- };
1617
-
1618
- $.fn.tab.Constructor = Tab;
1619
-
1620
- /* TAB DATA-API
1621
- * ============ */
1622
-
1623
- $(document).on(
1624
- "click.tab.data-api",
1625
- '[data-toggle="tab"], [data-toggle="pill"]',
1626
- function (e) {
1627
- e.preventDefault();
1628
- $(this).tab("show");
1629
- }
1630
- );
1631
- })(window.jQuery);
1632
- /* =============================================================
1633
- * bootstrap-typeahead.js v2.2.1
1634
- * http://twitter.github.com/bootstrap/javascript.html#typeahead
1635
- * =============================================================
1636
- * Copyright 2012 Twitter, Inc.
1637
- *
1638
- * Licensed under the Apache License, Version 2.0 (the "License");
1639
- * you may not use this file except in compliance with the License.
1640
- * You may obtain a copy of the License at
1641
- *
1642
- * http://www.apache.org/licenses/LICENSE-2.0
1643
- *
1644
- * Unless required by applicable law or agreed to in writing, software
1645
- * distributed under the License is distributed on an "AS IS" BASIS,
1646
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1647
- * See the License for the specific language governing permissions and
1648
- * limitations under the License.
1649
- * ============================================================ */
1650
-
1651
- !(function ($) {
1652
- "use strict"; // jshint ;_;
1653
-
1654
- /* TYPEAHEAD PUBLIC CLASS DEFINITION
1655
- * ================================= */
1656
-
1657
- var Typeahead = function (element, options) {
1658
- this.$element = $(element);
1659
- this.options = $.extend({}, $.fn.typeahead.defaults, options);
1660
- this.matcher = this.options.matcher || this.matcher;
1661
- this.sorter = this.options.sorter || this.sorter;
1662
- this.highlighter = this.options.highlighter || this.highlighter;
1663
- this.updater = this.options.updater || this.updater;
1664
- this.$menu = $(this.options.menu).appendTo("body");
1665
- this.source = this.options.source;
1666
- this.shown = false;
1667
- this.listen();
1668
- };
1669
-
1670
- Typeahead.prototype = {
1671
- constructor: Typeahead,
1672
-
1673
- select: function () {
1674
- var val = this.$menu.find(".active").attr("data-value");
1675
- this.$element.val(this.updater(val)).change();
1676
- return this.hide();
1677
- },
1678
-
1679
- updater: function (item) {
1680
- return item;
1681
- },
1682
-
1683
- show: function () {
1684
- var pos = $.extend({}, this.$element.offset(), {
1685
- height: this.$element[0].offsetHeight,
1686
- });
1687
-
1688
- this.$menu.css({
1689
- top: pos.top + pos.height,
1690
- left: pos.left,
1691
- });
1692
-
1693
- this.$menu.show();
1694
- this.shown = true;
1695
- return this;
1696
- },
1697
-
1698
- hide: function () {
1699
- this.$menu.hide();
1700
- this.shown = false;
1701
- return this;
1702
- },
1703
-
1704
- lookup: function (event) {
1705
- var items;
1706
-
1707
- this.query = this.$element.val();
1708
-
1709
- if (!this.query || this.query.length < this.options.minLength) {
1710
- return this.shown ? this.hide() : this;
1711
- }
1712
-
1713
- items = $.isFunction(this.source)
1714
- ? this.source(this.query, $.proxy(this.process, this))
1715
- : this.source;
1716
-
1717
- return items ? this.process(items) : this;
1718
- },
1719
-
1720
- process: function (items) {
1721
- var that = this;
1722
-
1723
- items = $.grep(items, function (item) {
1724
- return that.matcher(item);
1725
- });
1726
-
1727
- items = this.sorter(items);
1728
-
1729
- if (!items.length) {
1730
- return this.shown ? this.hide() : this;
1731
- }
1732
-
1733
- return this.render(items.slice(0, this.options.items)).show();
1734
- },
1735
-
1736
- matcher: function (item) {
1737
- return ~item.toLowerCase().indexOf(this.query.toLowerCase());
1738
- },
1739
-
1740
- sorter: function (items) {
1741
- var beginswith = [],
1742
- caseSensitive = [],
1743
- caseInsensitive = [],
1744
- item;
1745
-
1746
- while ((item = items.shift())) {
1747
- if (!item.toLowerCase().indexOf(this.query.toLowerCase()))
1748
- beginswith.push(item);
1749
- else if (~item.indexOf(this.query)) caseSensitive.push(item);
1750
- else caseInsensitive.push(item);
1751
- }
1752
-
1753
- return beginswith.concat(caseSensitive, caseInsensitive);
1754
- },
1755
-
1756
- highlighter: function (item) {
1757
- var query = this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&");
1758
- return item.replace(
1759
- new RegExp("(" + query + ")", "ig"),
1760
- function ($1, match) {
1761
- return "<strong>" + match + "</strong>";
1762
- }
1763
- );
1764
- },
1765
-
1766
- render: function (items) {
1767
- var that = this;
1768
-
1769
- items = $(items).map(function (i, item) {
1770
- i = $(that.options.item).attr("data-value", item);
1771
- i.find("a").html(that.highlighter(item));
1772
- return i[0];
1773
- });
1774
-
1775
- items.first().addClass("active");
1776
- this.$menu.html(items);
1777
- return this;
1778
- },
1779
-
1780
- next: function (event) {
1781
- var active = this.$menu.find(".active").removeClass("active"),
1782
- next = active.next();
1783
-
1784
- if (!next.length) {
1785
- next = $(this.$menu.find("li")[0]);
1786
- }
1787
-
1788
- next.addClass("active");
1789
- },
1790
-
1791
- prev: function (event) {
1792
- var active = this.$menu.find(".active").removeClass("active"),
1793
- prev = active.prev();
1794
-
1795
- if (!prev.length) {
1796
- prev = this.$menu.find("li").last();
1797
- }
1798
-
1799
- prev.addClass("active");
1800
- },
1801
-
1802
- listen: function () {
1803
- this.$element
1804
- .on("blur", $.proxy(this.blur, this))
1805
- .on("keypress", $.proxy(this.keypress, this))
1806
- .on("keyup", $.proxy(this.keyup, this));
1807
-
1808
- if (this.eventSupported("keydown")) {
1809
- this.$element.on("keydown", $.proxy(this.keydown, this));
1810
- }
1811
-
1812
- this.$menu
1813
- .on("click", $.proxy(this.click, this))
1814
- .on("mouseenter", "li", $.proxy(this.mouseenter, this));
1815
- },
1816
-
1817
- eventSupported: function (eventName) {
1818
- var isSupported = eventName in this.$element;
1819
- if (!isSupported) {
1820
- this.$element.setAttribute(eventName, "return;");
1821
- isSupported = typeof this.$element[eventName] === "function";
1822
- }
1823
- return isSupported;
1824
- },
1825
-
1826
- move: function (e) {
1827
- if (!this.shown) return;
1828
-
1829
- switch (e.keyCode) {
1830
- case 9: // tab
1831
- case 13: // enter
1832
- case 27: // escape
1833
- e.preventDefault();
1834
- break;
1835
-
1836
- case 38: // up arrow
1837
- e.preventDefault();
1838
- this.prev();
1839
- break;
1840
-
1841
- case 40: // down arrow
1842
- e.preventDefault();
1843
- this.next();
1844
- break;
1845
- }
1846
-
1847
- e.stopPropagation();
1848
- },
1849
-
1850
- keydown: function (e) {
1851
- this.suppressKeyPressRepeat = !~$.inArray(e.keyCode, [40, 38, 9, 13, 27]);
1852
- this.move(e);
1853
- },
1854
-
1855
- keypress: function (e) {
1856
- if (this.suppressKeyPressRepeat) return;
1857
- this.move(e);
1858
- },
1859
-
1860
- keyup: function (e) {
1861
- switch (e.keyCode) {
1862
- case 40: // down arrow
1863
- case 38: // up arrow
1864
- case 16: // shift
1865
- case 17: // ctrl
1866
- case 18: // alt
1867
- break;
1868
-
1869
- case 9: // tab
1870
- case 13: // enter
1871
- if (!this.shown) return;
1872
- this.select();
1873
- break;
1874
-
1875
- case 27: // escape
1876
- if (!this.shown) return;
1877
- this.hide();
1878
- break;
1879
-
1880
- default:
1881
- this.lookup();
1882
- }
1883
-
1884
- e.stopPropagation();
1885
- e.preventDefault();
1886
- },
1887
-
1888
- blur: function (e) {
1889
- var that = this;
1890
- setTimeout(function () {
1891
- that.hide();
1892
- }, 150);
1893
- },
1894
-
1895
- click: function (e) {
1896
- e.stopPropagation();
1897
- e.preventDefault();
1898
- this.select();
1899
- },
1900
-
1901
- mouseenter: function (e) {
1902
- this.$menu.find(".active").removeClass("active");
1903
- $(e.currentTarget).addClass("active");
1904
- },
1905
- };
1906
-
1907
- /* TYPEAHEAD PLUGIN DEFINITION
1908
- * =========================== */
1909
-
1910
- $.fn.typeahead = function (option) {
1911
- return this.each(function () {
1912
- var $this = $(this),
1913
- data = $this.data("typeahead"),
1914
- options = typeof option == "object" && option;
1915
- if (!data) $this.data("typeahead", (data = new Typeahead(this, options)));
1916
- if (typeof option == "string") data[option]();
1917
- });
1918
- };
1919
-
1920
- $.fn.typeahead.defaults = {
1921
- source: [],
1922
- items: 8,
1923
- menu: '<ul class="typeahead dropdown-menu"></ul>',
1924
- item: '<li><a href="#"></a></li>',
1925
- minLength: 1,
1926
- };
1927
-
1928
- $.fn.typeahead.Constructor = Typeahead;
1929
-
1930
- /* TYPEAHEAD DATA-API
1931
- * ================== */
1932
-
1933
- $(document).on(
1934
- "focus.typeahead.data-api",
1935
- '[data-provide="typeahead"]',
1936
- function (e) {
1937
- var $this = $(this);
1938
- if ($this.data("typeahead")) return;
1939
- e.preventDefault();
1940
- $this.typeahead($this.data());
1941
- }
1942
- );
1943
- })(window.jQuery);
1944
- /* ==========================================================
1945
- * bootstrap-affix.js v2.2.1
1946
- * http://twitter.github.com/bootstrap/javascript.html#affix
1947
- * ==========================================================
1948
- * Copyright 2012 Twitter, Inc.
1949
- *
1950
- * Licensed under the Apache License, Version 2.0 (the "License");
1951
- * you may not use this file except in compliance with the License.
1952
- * You may obtain a copy of the License at
1953
- *
1954
- * http://www.apache.org/licenses/LICENSE-2.0
1955
- *
1956
- * Unless required by applicable law or agreed to in writing, software
1957
- * distributed under the License is distributed on an "AS IS" BASIS,
1958
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1959
- * See the License for the specific language governing permissions and
1960
- * limitations under the License.
1961
- * ========================================================== */
1962
-
1963
- !(function ($) {
1964
- "use strict"; // jshint ;_;
1965
-
1966
- /* AFFIX CLASS DEFINITION
1967
- * ====================== */
1968
-
1969
- var Affix = function (element, options) {
1970
- this.options = $.extend({}, $.fn.affix.defaults, options);
1971
- this.$window = $(window)
1972
- .on("scroll.affix.data-api", $.proxy(this.checkPosition, this))
1973
- .on(
1974
- "click.affix.data-api",
1975
- $.proxy(function () {
1976
- setTimeout($.proxy(this.checkPosition, this), 1);
1977
- }, this)
1978
- );
1979
- this.$element = $(element);
1980
- this.checkPosition();
1981
- };
1982
-
1983
- Affix.prototype.checkPosition = function () {
1984
- if (!this.$element.is(":visible")) return;
1985
-
1986
- var scrollHeight = $(document).height(),
1987
- scrollTop = this.$window.scrollTop(),
1988
- position = this.$element.offset(),
1989
- offset = this.options.offset,
1990
- offsetBottom = offset.bottom,
1991
- offsetTop = offset.top,
1992
- reset = "affix affix-top affix-bottom",
1993
- affix;
1994
-
1995
- if (typeof offset != "object") offsetBottom = offsetTop = offset;
1996
- if (typeof offsetTop == "function") offsetTop = offset.top();
1997
- if (typeof offsetBottom == "function") offsetBottom = offset.bottom();
1998
-
1999
- affix =
2000
- this.unpin != null && scrollTop + this.unpin <= position.top
2001
- ? false
2002
- : offsetBottom != null &&
2003
- position.top + this.$element.height() >= scrollHeight - offsetBottom
2004
- ? "bottom"
2005
- : offsetTop != null && scrollTop <= offsetTop
2006
- ? "top"
2007
- : false;
2008
-
2009
- if (this.affixed === affix) return;
2010
-
2011
- this.affixed = affix;
2012
- this.unpin = affix == "bottom" ? position.top - scrollTop : null;
2013
-
2014
- this.$element
2015
- .removeClass(reset)
2016
- .addClass("affix" + (affix ? "-" + affix : ""));
2017
- };
2018
-
2019
- /* AFFIX PLUGIN DEFINITION
2020
- * ======================= */
2021
-
2022
- $.fn.affix = function (option) {
2023
- return this.each(function () {
2024
- var $this = $(this),
2025
- data = $this.data("affix"),
2026
- options = typeof option == "object" && option;
2027
- if (!data) $this.data("affix", (data = new Affix(this, options)));
2028
- if (typeof option == "string") data[option]();
2029
- });
2030
- };
2031
-
2032
- $.fn.affix.Constructor = Affix;
2033
-
2034
- $.fn.affix.defaults = {
2035
- offset: 0,
2036
- };
2037
-
2038
- /* AFFIX DATA-API
2039
- * ============== */
2040
-
2041
- $(window).on("load", function () {
2042
- $('[data-spy="affix"]').each(function () {
2043
- var $spy = $(this),
2044
- data = $spy.data();
2045
-
2046
- data.offset = data.offset || {};
2047
-
2048
- data.offsetBottom && (data.offset.bottom = data.offsetBottom);
2049
- data.offsetTop && (data.offset.top = data.offsetTop);
2050
-
2051
- $spy.affix(data);
2052
- });
2053
- });
2054
- })(window.jQuery);