Validform.js 88 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160
  1. if (function (n) {
  2. function i(n, t) {
  3. for (var i = window,
  4. r = (n || "").split(".") ; i && r.length;) i = i[r.shift()];
  5. return typeof i == "function" ? i : (t.push(n), Function.constructor.apply(null, t))
  6. }
  7. function r(n) {
  8. return n === "GET" || n === "POST"
  9. }
  10. function e(n, t) {
  11. r(t) || n.setRequestHeader("X-HTTP-Method-Override", t)
  12. }
  13. function o(t, i, r) {
  14. var u;
  15. r.indexOf("application/x-javascript") === -1 && (u = (t.getAttribute("data-ajax-mode") || "").toUpperCase(), n(t.getAttribute("data-ajax-update")).each(function (t, r) {
  16. var f;
  17. switch (u) {
  18. case "BEFORE":
  19. f = r.firstChild;
  20. n("<div />").html(i).contents().each(function () {
  21. r.insertBefore(this, f)
  22. });
  23. break;
  24. case "AFTER":
  25. n("<div />").html(i).contents().each(function () {
  26. r.appendChild(this)
  27. });
  28. break;
  29. default:
  30. n(r).html(i)
  31. }
  32. }))
  33. }
  34. function u(t, u) {
  35. var s, h, f, c; (s = t.getAttribute("data-ajax-confirm"), !s || window.confirm(s)) && (h = n(t.getAttribute("data-ajax-loading")), c = t.getAttribute("data-ajax-loading-duration") || 0, n.extend(u, {
  36. type: t.getAttribute("data-ajax-method") || undefined,
  37. url: t.getAttribute("data-ajax-url") || undefined,
  38. beforeSend: function (n) {
  39. var r;
  40. return e(n, f),
  41. r = i(t.getAttribute("data-ajax-begin"), ["xhr"]).apply(this, arguments),
  42. r !== !1 && h.show(c),
  43. r
  44. },
  45. complete: function () {
  46. h.hide(c);
  47. i(t.getAttribute("data-ajax-complete"), ["xhr", "status"]).apply(this, arguments)
  48. },
  49. success: function (n, r, u) {
  50. o(t, n, u.getResponseHeader("Content-Type") || "text/html");
  51. i(t.getAttribute("data-ajax-success"), ["data", "status", "xhr"]).apply(this, arguments)
  52. },
  53. error: i(t.getAttribute("data-ajax-failure"), ["xhr", "status", "error"])
  54. }), u.data.push({
  55. name: "X-Requested-With",
  56. value: "XMLHttpRequest"
  57. }), f = u.type.toUpperCase(), r(f) || (u.type = "POST", u.data.push({
  58. name: "X-HTTP-Method-Override",
  59. value: f
  60. })), n.ajax(u))
  61. }
  62. function s(t) {
  63. var i = n(t).data(f);
  64. return !i || !i.validate || i.validate()
  65. }
  66. var t = "unobtrusiveAjaxClick",
  67. f = "unobtrusiveValidation";
  68. n(document).on("click", "a[data-ajax=true]",
  69. function (n) {
  70. n.preventDefault();
  71. u(this, {
  72. url: this.href,
  73. type: "GET",
  74. data: []
  75. })
  76. });
  77. n(document).on("click", "form[data-ajax=true] input[type=image]",
  78. function (i) {
  79. var r = i.target.name,
  80. u = n(i.target),
  81. f = u.parents("form")[0],
  82. e = u.offset();
  83. n(f).data(t, [{
  84. name: r + ".x",
  85. value: Math.round(i.pageX - e.left)
  86. },
  87. {
  88. name: r + ".y",
  89. value: Math.round(i.pageY - e.top)
  90. }]);
  91. setTimeout(function () {
  92. n(f).removeData(t)
  93. },
  94. 0)
  95. });
  96. n(document).on("click", "form[data-ajax=true] :submit",
  97. function (i) {
  98. var r = i.target.name,
  99. u = n(i.target).parents("form")[0];
  100. n(u).data(t, r ? [{
  101. name: r,
  102. value: i.target.value
  103. }] : []);
  104. setTimeout(function () {
  105. n(u).removeData(t)
  106. },
  107. 0)
  108. });
  109. n(document).on("submit", "form[data-ajax=true]",
  110. function (i) {
  111. var r = n(this).data(t) || []; (i.preventDefault(), s(this)) && u(this, {
  112. url: this.action,
  113. type: this.method || "GET",
  114. data: r.concat(n(this).serializeArray())
  115. })
  116. })
  117. }(jQuery), "undefined" == typeof jQuery) throw new Error("Bootstrap's JavaScript requires jQuery");+
  118. function (n, t, i) {
  119. function h(t, i) {
  120. var u = (n(window).width() - t.outerWidth()) / 2,
  121. r = (n(window).height() - t.outerHeight()) / 2,
  122. r = (document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop) + (r > 0 ? r : 0);
  123. t.css({
  124. left: u
  125. }).animate({
  126. top: r
  127. },
  128. {
  129. duration: i,
  130. queue: !1
  131. })
  132. }
  133. function s() {
  134. if (n("#Validform_msg").length !== 0) return !1;
  135. f = n('<div id="Validform_msg"><div class="Validform_title">' + u.tit + '<a class="Validform_close" href="javascript:void(0);">&chi;<\/a><\/div><div class="Validform_info"><\/div><div class="iframe"><iframe frameborder="0" scrolling="no" height="100%" width="100%"><\/iframe><\/div><\/div>').appendTo("body");
  136. f.find("a.Validform_close").click(function () {
  137. return f.hide(),
  138. o = !0,
  139. e && e.focus().addClass("Validform_error"),
  140. !1
  141. }).focus(function () {
  142. this.blur()
  143. });
  144. n(window).bind("scroll resize",
  145. function () {
  146. o || h(f, 400)
  147. })
  148. }
  149. var e = null,
  150. f = null,
  151. o = !0,
  152. u = {
  153. tit: "提示信息",
  154. w: {
  155. "*": "不能为空!",
  156. "*6-16": "请填写6到16位任意字符!",
  157. n: "请填写数字!",
  158. "n6-16": "请填写6到16位数字!",
  159. s: "不能输入特殊字符!",
  160. "s6-18": "请填写6到18位字符!",
  161. p: "请填写邮政编码!",
  162. m: "请填写手机号码!",
  163. e: "邮箱地址格式不对!",
  164. url: "请填写网址!",
  165. am: "请输入正确的金额"
  166. },
  167. def: "请填写正确信息!",
  168. undef: "datatype未定义!",
  169. reck: "两次输入的内容不一致!",
  170. r: "通过信息验证!",
  171. c: "正在检测信息…",
  172. s: "请{填写|选择}{0|信息}!",
  173. v: "所填信息没有经过验证,请稍后…",
  174. p: "正在提交数据…"
  175. },
  176. r;
  177. n.Tipmsg = u;
  178. r = function (t, u, f) {
  179. var u = n.extend({},
  180. r.defaults, u),
  181. e;
  182. if (u.datatype && n.extend(r.util.dataType, u.datatype), e = this, e.tipmsg = {
  183. w: {}
  184. },
  185. e.forms = t, e.objects = [], f === !0) return !1;
  186. t.each(function () {
  187. var f, t;
  188. if (this.validform_inited == "inited") return !0;
  189. this.validform_inited = "inited";
  190. f = this;
  191. f.settings = n.extend({},
  192. u);
  193. t = n(f);
  194. f.validform_status = "normal";
  195. t.data("tipmsg", e.tipmsg);
  196. t.delegate("[datatype]", "blur",
  197. function () {
  198. var n = arguments[1];
  199. r.util.check.call(this, t, n)
  200. });
  201. t.delegate(":text", "keypress",
  202. function (n) {
  203. n.keyCode == 13 && t.find(":submit").length == 0 && t.submit()
  204. });
  205. r.util.enhance.call(t, f.settings.tiptype, f.settings.usePlugin, f.settings.tipSweep);
  206. f.settings.btnSubmit && t.find(f.settings.btnSubmit).bind("click",
  207. function () {
  208. return t.trigger("submit"),
  209. !1
  210. });
  211. t.submit(function () {
  212. var n = r.util.submitForm.call(t, f.settings);
  213. return n === i && (n = !0),
  214. n
  215. });
  216. t.find("[type='reset']").add(t.find(f.settings.btnReset)).bind("click",
  217. function () {
  218. r.util.resetForm.call(t)
  219. })
  220. }); (u.tiptype == 1 || (u.tiptype == 2 || u.tiptype == 3) && u.ajaxPost) && s()
  221. };
  222. r.defaults = {
  223. tiptype: 1,
  224. tipSweep: !1,
  225. showAllError: !1,
  226. postonce: !1,
  227. ajaxPost: !1
  228. };
  229. r.util = {
  230. dataType: {
  231. "*": /[\w\W]+/,
  232. "*6-16": /^[\w\W]{6,16}$/,
  233. n: /^\d+$/,
  234. "n6-16": /^\d{6,16}$/,
  235. s: /^[\u4E00-\u9FA5\uf900-\ufa2d\w\.\s]+$/,
  236. "s6-18": /^[\u4E00-\u9FA5\uf900-\ufa2d\w\.\s]{6,18}$/,
  237. p: /^[0-9]{6}$/,
  238. m: /^13[0-9]{9}$|14[0-9]{9}|15[0-9]{9}$|18[0-9]{9}$/,
  239. e: /^\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/,
  240. url: /^(\w+:\/\/)?\w+(\.\w+)+.*$/,
  241. am: /^(([0-9]|([1-9][0-9]{0,9}))((\.[0-9]{1,2})?))$/
  242. },
  243. toString: Object.prototype.toString,
  244. isEmpty: function (t) {
  245. return t === "" || t === n.trim(this.attr("tip"))
  246. },
  247. getValue: function (t) {
  248. var u, f = this;
  249. return t.is(":radio") ? (u = f.find(":radio[name='" + t.attr("name") + "']:checked").val(), u = u === i ? "" : u) : t.is(":checkbox") ? (u = "", f.find(":checkbox[name='" + t.attr("name") + "']:checked").each(function () {
  250. u += n(this).val() + ","
  251. }), u = u === i ? "" : u) : u = t.val(),
  252. u = n.trim(u),
  253. r.util.isEmpty.call(t, u) ? "" : u
  254. },
  255. enhance: function (t, i, u, f) {
  256. var e = this;
  257. e.find("[datatype]").each(function () {
  258. t == 2 ? n(this).parent().next().find(".Validform_checktip").length == 0 && (n(this).parent().next().append("<span class='Validform_checktip' />"), n(this).siblings(".Validform_checktip").remove()) : (t == 3 || t == 4) && n(this).siblings(".Validform_checktip").length == 0 && (n(this).parent().append("<span class='Validform_checktip' />"), n(this).parent().next().find(".Validform_checktip").remove())
  259. });
  260. e.find("input[recheck]").each(function () {
  261. if (this.validform_inited == "inited") return !0;
  262. this.validform_inited = "inited";
  263. var t = n(this),
  264. i = e.find("input[name='" + n(this).attr("recheck") + "']");
  265. i.bind("keyup",
  266. function () {
  267. if (i.val() == t.val() && i.val() != "") {
  268. if (i.attr("tip") && i.attr("tip") == i.val()) return !1;
  269. t.trigger("blur")
  270. }
  271. }).bind("blur",
  272. function () {
  273. if (i.val() != t.val() && t.val() != "") {
  274. if (t.attr("tip") && t.attr("tip") == t.val()) return !1;
  275. t.trigger("blur")
  276. }
  277. })
  278. });
  279. e.find("[tip]").each(function () {
  280. if (this.validform_inited == "inited") return !0;
  281. this.validform_inited = "inited";
  282. var i = n(this).attr("tip"),
  283. t = n(this).attr("altercss");
  284. n(this).focus(function () {
  285. n(this).val() == i && (n(this).val(""), t && n(this).removeClass(t))
  286. }).blur(function () {
  287. n.trim(n(this).val()) === "" && (n(this).val(i), t && n(this).addClass(t))
  288. })
  289. });
  290. e.find(":checkbox[datatype],:radio[datatype]").each(function () {
  291. if (this.validform_inited == "inited") return !0;
  292. this.validform_inited = "inited";
  293. var t = n(this),
  294. i = t.attr("name");
  295. e.find("[name='" + i + "']").filter(":checkbox,:radio").bind("click",
  296. function () {
  297. setTimeout(function () {
  298. t.trigger("blur")
  299. },
  300. 0)
  301. })
  302. });
  303. e.find("select[datatype][multiple]").bind("click",
  304. function () {
  305. var t = n(this);
  306. setTimeout(function () {
  307. t.trigger("blur")
  308. },
  309. 0)
  310. });
  311. r.util.usePlugin.call(e, i, t, u, f)
  312. },
  313. usePlugin: function (t, i, u, f) {
  314. var e = this,
  315. t = t || {},
  316. o;
  317. if (e.find("input[plugin='swfupload']").length && typeof swfuploadhandler != "undefined" && (o = {
  318. custom_settings: {
  319. form: e,
  320. showmsg: function (n, t) {
  321. r.util.showmsg.call(e, n, i, {
  322. obj: e.find("input[plugin='swfupload']"),
  323. type: t,
  324. sweep: u
  325. })
  326. }
  327. }
  328. },
  329. o = n.extend(!0, {},
  330. t.swfupload, o), e.find("input[plugin='swfupload']").each(function (t) {
  331. if (this.validform_inited == "inited") return !0;
  332. this.validform_inited = "inited";
  333. n(this).val("");
  334. swfuploadhandler.init(o, t)
  335. })), e.find("input[plugin='datepicker']").length && n.fn.datePicker && (t.datepicker = t.datepicker || {},
  336. t.datepicker.format && (Date.format = t.datepicker.format, delete t.datepicker.format), t.datepicker.firstDayOfWeek && (Date.firstDayOfWeek = t.datepicker.firstDayOfWeek, delete t.datepicker.firstDayOfWeek), e.find("input[plugin='datepicker']").each(function () {
  337. if (this.validform_inited == "inited") return !0;
  338. this.validform_inited = "inited";
  339. t.datepicker.callback && n(this).bind("dateSelected",
  340. function () {
  341. var i = new Date(n.event._dpCache[this._dpId].getSelected()[0]).asString(Date.format);
  342. t.datepicker.callback(i, this)
  343. });
  344. n(this).datePicker(t.datepicker)
  345. })), e.find("input[plugin*='passwordStrength']").length && n.fn.passwordStrength && (t.passwordstrength = t.passwordstrength || {},
  346. t.passwordstrength.showmsg = function (n, t, f) {
  347. r.util.showmsg.call(e, t, i, {
  348. obj: n,
  349. type: f,
  350. sweep: u
  351. })
  352. },
  353. e.find("input[plugin='passwordStrength']").each(function () {
  354. if (this.validform_inited == "inited") return !0;
  355. this.validform_inited = "inited";
  356. n(this).passwordStrength(t.passwordstrength)
  357. })), f != "addRule" && t.jqtransform && n.fn.jqTransSelect) {
  358. if (e[0].jqTransSelected == "true") return;
  359. e[0].jqTransSelected = "true";
  360. var s = function (t) {
  361. var i = n(".jqTransformSelectWrapper ul:visible");
  362. i.each(function () {
  363. var i = n(this).parents(".jqTransformSelectWrapper:first").find("select").get(0);
  364. t && i.oLabel && i.oLabel.get(0) == t.get(0) || n(this).hide()
  365. })
  366. },
  367. h = function (t) {
  368. n(t.target).parents(".jqTransformSelectWrapper").length === 0 && s(n(t.target))
  369. },
  370. c = function () {
  371. n(document).mousedown(h)
  372. };
  373. t.jqtransform.selector ? (e.find(t.jqtransform.selector).filter('input:submit, input:reset, input[type="button"]').jqTransInputButton(), e.find(t.jqtransform.selector).filter("input:text, input:password").jqTransInputText(), e.find(t.jqtransform.selector).filter("input:checkbox").jqTransCheckBox(), e.find(t.jqtransform.selector).filter("input:radio").jqTransRadio(), e.find(t.jqtransform.selector).filter("textarea").jqTransTextarea(), e.find(t.jqtransform.selector).filter("select").length > 0 && (e.find(t.jqtransform.selector).filter("select").jqTransSelect(), c())) : e.jqTransform();
  374. e.find(".jqTransformSelectWrapper").find("li a").click(function () {
  375. n(this).parents(".jqTransformSelectWrapper").find("select").trigger("blur")
  376. })
  377. }
  378. },
  379. getNullmsg: function (n) {
  380. var r = this,
  381. f = /[\u4E00-\u9FA5\uf900-\ufa2da-zA-Z\s]+/g,
  382. t, i = n[0].settings.label || ".Validform_label";
  383. if (i = r.siblings(i).eq(0).text() || r.siblings().find(i).eq(0).text() || r.parent().siblings(i).eq(0).text() || r.parent().siblings().find(i).eq(0).text(), i = i.replace(/\s(?![a-zA-Z])/g, "").match(f), i = i ? i.join("") : [""], f = /\{(.+)\|(.+)\}/, t = n.data("tipmsg").s || u.s, i != "") {
  384. if (t = t.replace(/\{0\|(.+)\}/, i), r.attr("recheck")) return t = t.replace(/\{(.+)\}/, ""),
  385. r.attr("nullmsg", t),
  386. t
  387. } else t = r.is(":checkbox,:radio,select") ? t.replace(/\{0\|(.+)\}/, "") : t.replace(/\{0\|(.+)\}/, "$1");
  388. return t = r.is(":checkbox,:radio,select") ? t.replace(f, "$2") : t.replace(f, "$1"),
  389. r.attr("nullmsg", t),
  390. t
  391. },
  392. getErrormsg: function (t, i, r) {
  393. var f = i.match(/^(.+?)((\d+)-(\d+))?$/),
  394. o,
  395. s,
  396. e;
  397. if (r == "recheck") return t.data("tipmsg").reck || u.reck;
  398. if (s = n.extend({},
  399. u.w, t.data("tipmsg").w), f[0] in s) return t.data("tipmsg").w[f[0]] || u.w[f[0]];
  400. for (e in s) if (e.indexOf(f[1]) != -1 && /^(.+?)(\d+)-(\d+)$/.test(e)) return o = (t.data("tipmsg").w[e] || u.w[e]).replace(/(.*?)\d+(.+?)\d+(.*)/, "$1" + f[3] + "$2" + f[4] + "$3"),
  401. t.data("tipmsg").w[f[0]] = o,
  402. o;
  403. return t.data("tipmsg").def || u.def
  404. },
  405. _regcheck: function (n, t, f, e) {
  406. var e = e,
  407. s = null,
  408. o = !1,
  409. a = /\/.+\//g,
  410. w = /^(.+?)(\d+)-(\d+)$/,
  411. v = 3,
  412. h, c, p, b;
  413. if (a.test(n)) {
  414. var k = n.match(a)[0].slice(1, -1),
  415. y = n.replace(a, ""),
  416. d = RegExp(k, y);
  417. o = d.test(t)
  418. } else if (r.util.toString.call(r.util.dataType[n]) == "[object Function]") o = r.util.dataType[n](t, f, e, r.util.dataType),
  419. o === !0 || o === i ? o = !0 : (s = o, o = !1);
  420. else {
  421. if (!(n in r.util.dataType)) if (h = n.match(w), h) {
  422. for (p in r.util.dataType) if ((c = p.match(w), c) && h[1] === c[1]) {
  423. var l = r.util.dataType[p].toString(),
  424. y = l.match(/\/[mgi]*/g)[1].replace("/", ""),
  425. g = new RegExp("\\{" + c[2] + "," + c[3] + "\\}", "g");
  426. l = l.replace(/\/[mgi]*/g, "/").replace(g, "{" + h[2] + "," + h[3] + "}").replace(/^\//, "").replace(/\/$/, "");
  427. r.util.dataType[n] = new RegExp(l, y);
  428. break
  429. }
  430. } else o = !1,
  431. s = e.data("tipmsg").undef || u.undef;
  432. r.util.toString.call(r.util.dataType[n]) == "[object RegExp]" && (o = r.util.dataType[n].test(t))
  433. }
  434. return o ? (v = 2, s = f.attr("sucmsg") || e.data("tipmsg").r || u.r, f.attr("recheck") && (b = e.find("input[name='" + f.attr("recheck") + "']:first"), t != b.val() && (o = !1, v = 3, s = f.attr("errormsg") || r.util.getErrormsg.call(f, e, n, "recheck")))) : (s = s || f.attr("errormsg") || r.util.getErrormsg.call(f, e, n), r.util.isEmpty.call(f, t) && (s = f.attr("nullmsg") || r.util.getNullmsg.call(f, e))),
  435. {
  436. passed: o,
  437. type: v,
  438. info: s
  439. }
  440. },
  441. regcheck: function (n, t, i) {
  442. var h = this,
  443. s = null,
  444. f, e, u, o;
  445. if (i.attr("ignore") === "ignore" && r.util.isEmpty.call(i, t)) return i.data("cked") && (s = ""),
  446. {
  447. passed: !0,
  448. type: 4,
  449. info: s
  450. };
  451. for (i.data("cked", "cked"), f = r.util.parseDatatype(n), u = 0; u < f.length; u++) {
  452. for (o = 0; o < f[u].length; o++) if (e = r.util._regcheck(f[u][o], t, i, h), !e.passed) break;
  453. if (e.passed) break
  454. }
  455. return e
  456. },
  457. parseDatatype: function (n) {
  458. var u = /\/.+?\/[mgi]*(?=(,|$|\||\s))|[\w\*-]+/g,
  459. f = n.match(u),
  460. e = n.replace(u, "").replace(/\s*/g, "").split(""),
  461. t = [],
  462. r = 0,
  463. i;
  464. for (t[0] = [], t[0].push(f[0]), i = 0; i < e.length; i++) e[i] == "|" && (r++, t[r] = []),
  465. t[r].push(f[i + 1]);
  466. return t
  467. },
  468. showmsg: function (t, u, e, s) {
  469. if (t != i && (s != "bycheck" || !e.sweep || (!e.obj || e.obj.is(".Validform_error")) && typeof u != "function")) {
  470. if (n.extend(e, {
  471. curform: this
  472. }), typeof u == "function") {
  473. u(t, e, r.util.cssctl);
  474. return
  475. } (u == 1 || s == "byajax" && u != 4) && f.find(".Validform_info").html(t); (u == 1 && s != "bycheck" && e.type != 2 || s == "byajax" && u != 4) && (o = !1, f.find(".iframe").css("height", f.outerHeight()), f.show(), h(f, 100));
  476. u == 2 && e.obj && (e.obj.parent().next().find(".Validform_checktip").html(t), r.util.cssctl(e.obj.parent().next().find(".Validform_checktip"), e.type)); (u == 3 || u == 4) && e.obj && (e.obj.siblings(".Validform_checktip").html(t), r.util.cssctl(e.obj.siblings(".Validform_checktip"), e.type))
  477. }
  478. },
  479. cssctl: function (n, t) {
  480. switch (t) {
  481. case 1:
  482. n.removeClass("Validform_right Validform_wrong").addClass("Validform_checktip Validform_loading");
  483. break;
  484. case 2:
  485. n.removeClass("Validform_wrong Validform_loading").addClass("Validform_checktip Validform_right");
  486. break;
  487. case 4:
  488. n.removeClass("Validform_right Validform_wrong Validform_loading").addClass("Validform_checktip");
  489. break;
  490. default:
  491. n.removeClass("Validform_right Validform_loading").addClass("Validform_checktip Validform_wrong")
  492. }
  493. },
  494. check: function (t, i, f) {
  495. var s = t[0].settings,
  496. i = i || "",
  497. l = r.util.getValue.call(t, n(this)),
  498. a,
  499. h,
  500. v,
  501. o,
  502. c,
  503. y,
  504. p,
  505. w;
  506. if (s.ignoreHidden && n(this).is(":hidden") || n(this).data("dataIgnore") === "dataIgnore") return !0;
  507. if (s.dragonfly && !n(this).data("cked") && r.util.isEmpty.call(n(this), l) && n(this).attr("ignore") != "ignore") return !1;
  508. if (a = r.util.regcheck.call(t, n(this).attr("datatype"), l, n(this)), l == this.validform_lastval && !n(this).attr("recheck") && i == "") return a.passed ? !0 : !1;
  509. if (this.validform_lastval = l, e = h = n(this), !a.passed) return r.util.abort.call(h[0]),
  510. f || (r.util.showmsg.call(t, a.info, s.tiptype, {
  511. obj: n(this),
  512. type: a.type,
  513. sweep: s.tipSweep
  514. },
  515. "bycheck"), s.tipSweep || h.addClass("Validform_error")),
  516. !1;
  517. if (v = n(this).attr("ajaxurl"), !v || r.util.isEmpty.call(n(this), l) || f) v && r.util.isEmpty.call(n(this), l) && (r.util.abort.call(h[0]), h[0].validform_valid = "true");
  518. else return (o = n(this), o[0].validform_subpost = i == "postform" ? "postform" : "", o[0].validform_valid === "posting" && l == o[0].validform_ckvalue) ? "ajax" : (o[0].validform_valid = "posting", o[0].validform_ckvalue = l, r.util.showmsg.call(t, t.data("tipmsg").c || u.c, s.tiptype, {
  519. obj: o,
  520. type: 1,
  521. sweep: s.tipSweep
  522. },
  523. "bycheck"), r.util.abort.call(h[0]), c = n.extend(!0, {},
  524. s.ajaxurl || {}), y = {
  525. type: "POST",
  526. cache: !1,
  527. url: v,
  528. data: "param=" + encodeURIComponent(l) + "&name=" + encodeURIComponent(n(this).attr("name")),
  529. success: function (i) {
  530. n.trim(i.status) === "y" ? (o[0].validform_valid = "true", i.info && o.attr("sucmsg", i.info), r.util.showmsg.call(t, o.attr("sucmsg") || t.data("tipmsg").r || u.r, s.tiptype, {
  531. obj: o,
  532. type: 2,
  533. sweep: s.tipSweep
  534. },
  535. "bycheck"), h.removeClass("Validform_error"), e = null, o[0].validform_subpost == "postform" && t.trigger("submit")) : (o[0].validform_valid = i.info, r.util.showmsg.call(t, i.info, s.tiptype, {
  536. obj: o,
  537. type: 3,
  538. sweep: s.tipSweep
  539. }), h.addClass("Validform_error"));
  540. h[0].validform_ajax = null
  541. },
  542. error: function (n) {
  543. if (n.status == "200") return n.responseText == "y" ? c.success({
  544. status: "y"
  545. }) : c.success({
  546. status: "n",
  547. info: n.responseText
  548. }),
  549. !1;
  550. if (n.statusText !== "abort") {
  551. var i = "status: " + n.status + "; statusText: " + n.statusText;
  552. r.util.showmsg.call(t, i, s.tiptype, {
  553. obj: o,
  554. type: 3,
  555. sweep: s.tipSweep
  556. });
  557. h.addClass("Validform_error")
  558. }
  559. return o[0].validform_valid = n.statusText,
  560. h[0].validform_ajax = null,
  561. !0
  562. }
  563. },
  564. c.success && (p = c.success, c.success = function (n) {
  565. y.success(n);
  566. p(n, o)
  567. }), c.error && (w = c.error, c.error = function (n) {
  568. y.error(n) && w(n, o)
  569. }), c = n.extend({},
  570. y, c, {
  571. dataType: "json"
  572. }), h[0].validform_ajax = n.ajax(c), "ajax");
  573. return f || (r.util.showmsg.call(t, a.info, s.tiptype, {
  574. obj: n(this),
  575. type: a.type,
  576. sweep: s.tipSweep
  577. },
  578. "bycheck"), h.removeClass("Validform_error")),
  579. e = null,
  580. !0
  581. },
  582. submitForm: function (t, i, f, o, s) {
  583. var h = this,
  584. v, l, a, y, c, p, w, b, f;
  585. if (h[0].validform_status === "posting" || t.postonce && h[0].validform_status === "posted" || (v = t.beforeCheck && t.beforeCheck(h), v === !1)) return !1;
  586. if (l = !0, h.find("[datatype]").each(function () {
  587. var o, f, s;
  588. if (i) return !1;
  589. if (t.ignoreHidden && n(this).is(":hidden") || n(this).data("dataIgnore") === "dataIgnore") return !0;
  590. if (o = r.util.getValue.call(h, n(this)), e = f = n(this), a = r.util.regcheck.call(h, n(this).attr("datatype"), o, n(this)), !a.passed) return (r.util.showmsg.call(h, a.info, t.tiptype, {
  591. obj: n(this),
  592. type: a.type,
  593. sweep: t.tipSweep
  594. }), f.addClass("Validform_error"), !t.showAllError) ? (f.focus(), l = !1, !1) : (l && (l = !1), !0);
  595. if (n(this).attr("ajaxurl") && !r.util.isEmpty.call(n(this), o)) {
  596. if (this.validform_valid !== "true") return (s = n(this), r.util.showmsg.call(h, h.data("tipmsg").v || u.v, t.tiptype, {
  597. obj: s,
  598. type: 3,
  599. sweep: t.tipSweep
  600. }), f.addClass("Validform_error"), s.trigger("blur", ["postform"]), !t.showAllError) ? (l = !1, !1) : (l && (l = !1), !0)
  601. } else n(this).attr("ajaxurl") && r.util.isEmpty.call(n(this), o) && (r.util.abort.call(this), this.validform_valid = "true");
  602. r.util.showmsg.call(h, a.info, t.tiptype, {
  603. obj: n(this),
  604. type: a.type,
  605. sweep: t.tipSweep
  606. });
  607. f.removeClass("Validform_error");
  608. e = null
  609. }), t.showAllError && h.find(".Validform_error:first").focus(), l) {
  610. if (y = t.beforeSubmit && t.beforeSubmit(h), y === !1) return !1;
  611. if (h[0].validform_status = "posting", t.ajaxPost || o === "ajaxPost") c = n.extend(!0, {},
  612. t.ajaxpost || {}),
  613. c.url = f || c.url || t.url || h.attr("action"),
  614. r.util.showmsg.call(h, h.data("tipmsg").p || u.p, t.tiptype, {
  615. obj: h,
  616. type: 1,
  617. sweep: t.tipSweep
  618. },
  619. "byajax"),
  620. s ? c.async = !1 : s === !1 && (c.async = !0),
  621. c.success && (p = c.success, c.success = function (i) {
  622. t.callback && t.callback(i);
  623. h[0].validform_ajax = null;
  624. h[0].validform_status = n.trim(i.status) === "y" ? "posted" : "normal";
  625. p(i, h)
  626. }),
  627. c.error && (w = c.error, c.error = function (n) {
  628. t.callback && t.callback(n);
  629. h[0].validform_status = "normal";
  630. h[0].validform_ajax = null;
  631. w(n, h)
  632. }),
  633. b = {
  634. type: "POST",
  635. async: !0,
  636. data: h.serializeArray(),
  637. success: function (i) {
  638. n.trim(i.status) === "y" ? (h[0].validform_status = "posted", r.util.showmsg.call(h, i.info, t.tiptype, {
  639. obj: h,
  640. type: 2,
  641. sweep: t.tipSweep
  642. },
  643. "byajax")) : (h[0].validform_status = "normal", r.util.showmsg.call(h, i.info, t.tiptype, {
  644. obj: h,
  645. type: 3,
  646. sweep: t.tipSweep
  647. },
  648. "byajax"));
  649. t.callback && t.callback(i);
  650. h[0].validform_ajax = null
  651. },
  652. error: function (n) {
  653. var i = "status: " + n.status + "; statusText: " + n.statusText;
  654. r.util.showmsg.call(h, i, t.tiptype, {
  655. obj: h,
  656. type: 3,
  657. sweep: t.tipSweep
  658. },
  659. "byajax");
  660. t.callback && t.callback(n);
  661. h[0].validform_status = "normal";
  662. h[0].validform_ajax = null
  663. }
  664. },
  665. c = n.extend({},
  666. b, c, {
  667. dataType: "json"
  668. }),
  669. h[0].validform_ajax = n.ajax(c);
  670. else return t.postonce || (h[0].validform_status = "normal"),
  671. f = f || t.url,
  672. f && h.attr("action", f),
  673. t.callback && t.callback(h)
  674. }
  675. return !1
  676. },
  677. resetForm: function () {
  678. var n = this;
  679. n.each(function () {
  680. this.reset && this.reset();
  681. this.validform_status = "normal"
  682. });
  683. n.find(".Validform_right").text("");
  684. n.find(".passwordStrength").children().removeClass("bgStrength");
  685. n.find(".Validform_checktip").removeClass("Validform_wrong Validform_right Validform_loading");
  686. n.find(".Validform_error").removeClass("Validform_error");
  687. n.find("[datatype]").removeData("cked").removeData("dataIgnore").each(function () {
  688. this.validform_lastval = null
  689. });
  690. n.eq(0).find("input:first").focus()
  691. },
  692. abort: function () {
  693. this.validform_ajax && this.validform_ajax.abort()
  694. }
  695. };
  696. n.Datatype = r.util.dataType;
  697. r.prototype = {
  698. dataType: r.util.dataType,
  699. eq: function (t) {
  700. var i = this;
  701. return t >= i.forms.length ? null : (t in i.objects || (i.objects[t] = new r(n(i.forms[t]).get(), {},
  702. !0)), i.objects[t])
  703. },
  704. resetStatus: function () {
  705. var t = this;
  706. return n(t.forms).each(function () {
  707. this.validform_status = "normal"
  708. }),
  709. this
  710. },
  711. setStatus: function (t) {
  712. var i = this;
  713. return n(i.forms).each(function () {
  714. this.validform_status = t || "posting"
  715. }),
  716. this
  717. },
  718. getStatus: function () {
  719. var t = this;
  720. return n(t.forms)[0].validform_status
  721. },
  722. ignore: function (t) {
  723. var i = this,
  724. t = t || "[datatype]";
  725. return n(i.forms).find(t).each(function () {
  726. n(this).data("dataIgnore", "dataIgnore").removeClass("Validform_error")
  727. }),
  728. this
  729. },
  730. unignore: function (t) {
  731. var i = this,
  732. t = t || "[datatype]";
  733. return n(i.forms).find(t).each(function () {
  734. n(this).removeData("dataIgnore")
  735. }),
  736. this
  737. },
  738. addRule: function (t) {
  739. for (var f = this,
  740. t = t || [], e, u, i = 0; i < t.length; i++) {
  741. e = n(f.forms).find(t[i].ele);
  742. for (u in t[i]) u !== "ele" && e.attr(u, t[i][u])
  743. }
  744. return n(f.forms).each(function () {
  745. var t = n(this);
  746. r.util.enhance.call(t, this.settings.tiptype, this.settings.usePlugin, this.settings.tipSweep, "addRule")
  747. }),
  748. this
  749. },
  750. ajaxPost: function (t, i, u) {
  751. var f = this;
  752. return n(f.forms).each(function () {
  753. (this.settings.tiptype == 1 || this.settings.tiptype == 2 || this.settings.tiptype == 3) && s();
  754. r.util.submitForm.call(n(f.forms[0]), this.settings, t, u, "ajaxPost", i)
  755. }),
  756. this
  757. },
  758. submitForm: function (t, u) {
  759. var f = this;
  760. return n(f.forms).each(function () {
  761. var f = r.util.submitForm.call(n(this), this.settings, t, u);
  762. f === i && (f = !0);
  763. f === !0 && this.submit()
  764. }),
  765. this
  766. },
  767. resetForm: function () {
  768. var t = this;
  769. return r.util.resetForm.call(n(t.forms)),
  770. this
  771. },
  772. abort: function () {
  773. var t = this;
  774. return n(t.forms).each(function () {
  775. r.util.abort.call(this)
  776. }),
  777. this
  778. },
  779. check: function (t, i) {
  780. var i = i || "[datatype]",
  781. e = this,
  782. u = n(e.forms),
  783. f = !0;
  784. return u.find(i).each(function () {
  785. r.util.check.call(this, u, "", t) || (f = !1)
  786. }),
  787. f
  788. },
  789. config: function (t) {
  790. var i = this;
  791. return t = t || {},
  792. n(i.forms).each(function () {
  793. var i = n(this);
  794. this.settings = n.extend(!0, this.settings, t);
  795. r.util.enhance.call(i, this.settings.tiptype, this.settings.usePlugin, this.settings.tipSweep)
  796. }),
  797. this
  798. }
  799. };
  800. n.fn.Validform = function (n) {
  801. return new r(this, n)
  802. };
  803. n.Showmsg = function (n) {
  804. s();
  805. r.util.showmsg.call(t, n, 1, {})
  806. };
  807. n.Hidemsg = function () {
  808. f.hide();
  809. o = !0
  810. }
  811. }(jQuery, window); +
  812. //function (n) {
  813. // "use strict";
  814. // var t = n.fn.jquery.split(" ")[0].split(".");
  815. // if (t[0] < 2 && t[1] < 9 || 1 == t[0] && 9 == t[1] && t[2] < 1) throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher");
  816. //}(jQuery); +
  817. function (n) {
  818. "use strict";
  819. function t() {
  820. var i = document.createElement("bootstrap"),
  821. t = {
  822. WebkitTransition: "webkitTransitionEnd",
  823. MozTransition: "transitionend",
  824. OTransition: "oTransitionEnd otransitionend",
  825. transition: "transitionend"
  826. },
  827. n;
  828. for (n in t) if (void 0 !== i.style[n]) return {
  829. end: t[n]
  830. };
  831. return !1
  832. }
  833. n.fn.emulateTransitionEnd = function (t) {
  834. var i = !1,
  835. u = this,
  836. r;
  837. n(this).one("bsTransitionEnd",
  838. function () {
  839. i = !0
  840. });
  841. return r = function () {
  842. i || n(u).trigger(n.support.transition.end)
  843. },
  844. setTimeout(r, t),
  845. this
  846. };
  847. n(function () {
  848. n.support.transition = t();
  849. n.support.transition && (n.event.special.bsTransitionEnd = {
  850. bindType: n.support.transition.end,
  851. delegateType: n.support.transition.end,
  852. handle: function (t) {
  853. if (n(t.target).is(this)) return t.handleObj.handler.apply(this, arguments)
  854. }
  855. })
  856. })
  857. }(jQuery); +
  858. function (n) {
  859. "use strict";
  860. function u(i) {
  861. return this.each(function () {
  862. var r = n(this),
  863. u = r.data("bs.alert");
  864. u || r.data("bs.alert", u = new t(this));
  865. "string" == typeof i && u[i].call(r)
  866. })
  867. }
  868. var i = '[data-dismiss="alert"]',
  869. t = function (t) {
  870. n(t).on("click", i, this.close)
  871. },
  872. r;
  873. t.VERSION = "3.3.4";
  874. t.TRANSITION_DURATION = 150;
  875. t.prototype.close = function (i) {
  876. function e() {
  877. r.detach().trigger("closed.bs.alert").remove()
  878. }
  879. var f = n(this),
  880. u = f.attr("data-target"),
  881. r;
  882. u || (u = f.attr("href"), u = u && u.replace(/.*(?=#[^\s]*$)/, ""));
  883. r = n(u);
  884. i && i.preventDefault();
  885. r.length || (r = f.closest(".alert"));
  886. r.trigger(i = n.Event("close.bs.alert"));
  887. i.isDefaultPrevented() || (r.removeClass("in"), n.support.transition && r.hasClass("fade") ? r.one("bsTransitionEnd", e).emulateTransitionEnd(t.TRANSITION_DURATION) : e())
  888. };
  889. r = n.fn.alert;
  890. n.fn.alert = u;
  891. n.fn.alert.Constructor = t;
  892. n.fn.alert.noConflict = function () {
  893. return n.fn.alert = r,
  894. this
  895. };
  896. n(document).on("click.bs.alert.data-api", i, t.prototype.close)
  897. }(jQuery); +
  898. function (n) {
  899. "use strict";
  900. function i(i) {
  901. return this.each(function () {
  902. var u = n(this),
  903. r = u.data("bs.button"),
  904. f = "object" == typeof i && i;
  905. r || u.data("bs.button", r = new t(this, f));
  906. "toggle" == i ? r.toggle() : i && r.setState(i)
  907. })
  908. }
  909. var t = function (i, r) {
  910. this.$element = n(i);
  911. this.options = n.extend({},
  912. t.DEFAULTS, r);
  913. this.isLoading = !1
  914. },
  915. r;
  916. t.VERSION = "3.3.4";
  917. t.DEFAULTS = {
  918. loadingText: "loading..."
  919. };
  920. t.prototype.setState = function (t) {
  921. var r = "disabled",
  922. i = this.$element,
  923. f = i.is("input") ? "val" : "html",
  924. u = i.data();
  925. t += "Text";
  926. null == u.resetText && i.data("resetText", i[f]());
  927. setTimeout(n.proxy(function () {
  928. i[f](null == u[t] ? this.options[t] : u[t]);
  929. "loadingText" == t ? (this.isLoading = !0, i.addClass(r).attr(r, r)) : this.isLoading && (this.isLoading = !1, i.removeClass(r).removeAttr(r))
  930. },
  931. this), 0)
  932. };
  933. t.prototype.toggle = function () {
  934. var t = !0,
  935. i = this.$element.closest('[data-toggle="buttons"]'),
  936. n;
  937. i.length ? (n = this.$element.find("input"), "radio" == n.prop("type") && (n.prop("checked") && this.$element.hasClass("active") ? t = !1 : i.find(".active").removeClass("active")), t && n.prop("checked", !this.$element.hasClass("active")).trigger("change")) : this.$element.attr("aria-pressed", !this.$element.hasClass("active"));
  938. t && this.$element.toggleClass("active")
  939. };
  940. r = n.fn.button;
  941. n.fn.button = i;
  942. n.fn.button.Constructor = t;
  943. n.fn.button.noConflict = function () {
  944. return n.fn.button = r,
  945. this
  946. };
  947. n(document).on("click.bs.button.data-api", '[data-toggle^="button"]',
  948. function (t) {
  949. var r = n(t.target);
  950. r.hasClass("btn") || (r = r.closest(".btn"));
  951. i.call(r, "toggle");
  952. t.preventDefault()
  953. }).on("focus.bs.button.data-api blur.bs.button.data-api", '[data-toggle^="button"]',
  954. function (t) {
  955. n(t.target).closest(".btn").toggleClass("focus", /^focus(in)?$/.test(t.type))
  956. })
  957. }(jQuery); +
  958. function (n) {
  959. "use strict";
  960. function i(i) {
  961. return this.each(function () {
  962. var u = n(this),
  963. r = u.data("bs.carousel"),
  964. f = n.extend({},
  965. t.DEFAULTS, u.data(), "object" == typeof i && i),
  966. e = "string" == typeof i ? i : f.slide;
  967. r || u.data("bs.carousel", r = new t(this, f));
  968. "number" == typeof i ? r.to(i) : e ? r[e]() : f.interval && r.pause().cycle()
  969. })
  970. }
  971. var t = function (t, i) {
  972. this.$element = n(t);
  973. this.$indicators = this.$element.find(".carousel-indicators");
  974. this.options = i;
  975. this.paused = null;
  976. this.sliding = null;
  977. this.interval = null;
  978. this.$active = null;
  979. this.$items = null;
  980. this.options.keyboard && this.$element.on("keydown.bs.carousel", n.proxy(this.keydown, this));
  981. "hover" == this.options.pause && !("ontouchstart" in document.documentElement) && this.$element.on("mouseenter.bs.carousel", n.proxy(this.pause, this)).on("mouseleave.bs.carousel", n.proxy(this.cycle, this))
  982. },
  983. u,
  984. r;
  985. t.VERSION = "3.3.4";
  986. t.TRANSITION_DURATION = 600;
  987. t.DEFAULTS = {
  988. interval: 5e3,
  989. pause: "hover",
  990. wrap: !0,
  991. keyboard: !0
  992. };
  993. t.prototype.keydown = function (n) {
  994. if (!/input|textarea/i.test(n.target.tagName)) {
  995. switch (n.which) {
  996. case 37:
  997. this.prev();
  998. break;
  999. case 39:
  1000. this.next();
  1001. break;
  1002. default:
  1003. return
  1004. }
  1005. n.preventDefault()
  1006. }
  1007. };
  1008. t.prototype.cycle = function (t) {
  1009. return t || (this.paused = !1),
  1010. this.interval && clearInterval(this.interval),
  1011. this.options.interval && !this.paused && (this.interval = setInterval(n.proxy(this.next, this), this.options.interval)),
  1012. this
  1013. };
  1014. t.prototype.getItemIndex = function (n) {
  1015. return this.$items = n.parent().children(".item"),
  1016. this.$items.index(n || this.$active)
  1017. };
  1018. t.prototype.getItemForDirection = function (n, t) {
  1019. var i = this.getItemIndex(t),
  1020. f = "prev" == n && 0 === i || "next" == n && i == this.$items.length - 1,
  1021. r,
  1022. u;
  1023. return f && !this.options.wrap ? t : (r = "prev" == n ? -1 : 1, u = (i + r) % this.$items.length, this.$items.eq(u))
  1024. };
  1025. t.prototype.to = function (n) {
  1026. var i = this,
  1027. t = this.getItemIndex(this.$active = this.$element.find(".item.active"));
  1028. if (!(n > this.$items.length - 1) && !(0 > n)) return this.sliding ? this.$element.one("slid.bs.carousel",
  1029. function () {
  1030. i.to(n)
  1031. }) : t == n ? this.pause().cycle() : this.slide(n > t ? "next" : "prev", this.$items.eq(n))
  1032. };
  1033. t.prototype.pause = function (t) {
  1034. return t || (this.paused = !0),
  1035. this.$element.find(".next, .prev").length && n.support.transition && (this.$element.trigger(n.support.transition.end), this.cycle(!0)),
  1036. this.interval = clearInterval(this.interval),
  1037. this
  1038. };
  1039. t.prototype.next = function () {
  1040. if (!this.sliding) return this.slide("next")
  1041. };
  1042. t.prototype.prev = function () {
  1043. if (!this.sliding) return this.slide("prev")
  1044. };
  1045. t.prototype.slide = function (i, r) {
  1046. var e = this.$element.find(".item.active"),
  1047. u = r || this.getItemForDirection(i, e),
  1048. l = this.interval,
  1049. f = "next" == i ? "left" : "right",
  1050. a = this,
  1051. o,
  1052. s,
  1053. h,
  1054. c;
  1055. return u.hasClass("active") ? this.sliding = !1 : (o = u[0], s = n.Event("slide.bs.carousel", {
  1056. relatedTarget: o,
  1057. direction: f
  1058. }), (this.$element.trigger(s), !s.isDefaultPrevented()) ? ((this.sliding = !0, l && this.pause(), this.$indicators.length) && (this.$indicators.find(".active").removeClass("active"), h = n(this.$indicators.children()[this.getItemIndex(u)]), h && h.addClass("active")), c = n.Event("slid.bs.carousel", {
  1059. relatedTarget: o,
  1060. direction: f
  1061. }), n.support.transition && this.$element.hasClass("slide") ? (u.addClass(i), u[0].offsetWidth, e.addClass(f), u.addClass(f), e.one("bsTransitionEnd",
  1062. function () {
  1063. u.removeClass([i, f].join(" ")).addClass("active");
  1064. e.removeClass(["active", f].join(" "));
  1065. a.sliding = !1;
  1066. setTimeout(function () {
  1067. a.$element.trigger(c)
  1068. },
  1069. 0)
  1070. }).emulateTransitionEnd(t.TRANSITION_DURATION)) : (e.removeClass("active"), u.addClass("active"), this.sliding = !1, this.$element.trigger(c)), l && this.cycle(), this) : void 0)
  1071. };
  1072. u = n.fn.carousel;
  1073. n.fn.carousel = i;
  1074. n.fn.carousel.Constructor = t;
  1075. n.fn.carousel.noConflict = function () {
  1076. return n.fn.carousel = u,
  1077. this
  1078. };
  1079. r = function (t) {
  1080. var o, r = n(this),
  1081. u = n(r.attr("data-target") || (o = r.attr("href")) && o.replace(/.*(?=#[^\s]+$)/, "")),
  1082. e,
  1083. f;
  1084. u.hasClass("carousel") && (e = n.extend({},
  1085. u.data(), r.data()), f = r.attr("data-slide-to"), f && (e.interval = !1), i.call(u, e), f && u.data("bs.carousel").to(f), t.preventDefault())
  1086. };
  1087. n(document).on("click.bs.carousel.data-api", "[data-slide]", r).on("click.bs.carousel.data-api", "[data-slide-to]", r);
  1088. n(window).on("load",
  1089. function () {
  1090. n('[data-ride="carousel"]').each(function () {
  1091. var t = n(this);
  1092. i.call(t, t.data())
  1093. })
  1094. })
  1095. }(jQuery); +
  1096. function (n) {
  1097. "use strict";
  1098. function r(t) {
  1099. var i, r = t.attr("data-target") || (i = t.attr("href")) && i.replace(/.*(?=#[^\s]+$)/, "");
  1100. return n(r)
  1101. }
  1102. function i(i) {
  1103. return this.each(function () {
  1104. var u = n(this),
  1105. r = u.data("bs.collapse"),
  1106. f = n.extend({},
  1107. t.DEFAULTS, u.data(), "object" == typeof i && i); !r && f.toggle && /show|hide/.test(i) && (f.toggle = !1);
  1108. r || u.data("bs.collapse", r = new t(this, f));
  1109. "string" == typeof i && r[i]()
  1110. })
  1111. }
  1112. var t = function (i, r) {
  1113. this.$element = n(i);
  1114. this.options = n.extend({},
  1115. t.DEFAULTS, r);
  1116. this.$trigger = n('[data-toggle="collapse"][href="#' + i.id + '"],[data-toggle="collapse"][data-target="#' + i.id + '"]');
  1117. this.transitioning = null;
  1118. this.options.parent ? this.$parent = this.getParent() : this.addAriaAndCollapsedClass(this.$element, this.$trigger);
  1119. this.options.toggle && this.toggle()
  1120. },
  1121. u;
  1122. t.VERSION = "3.3.4";
  1123. t.TRANSITION_DURATION = 350;
  1124. t.DEFAULTS = {
  1125. toggle: !0
  1126. };
  1127. t.prototype.dimension = function () {
  1128. var n = this.$element.hasClass("width");
  1129. return n ? "width" : "height"
  1130. };
  1131. t.prototype.show = function () {
  1132. var f, r, e, u, o, s;
  1133. if (!this.transitioning && !this.$element.hasClass("in") && (r = this.$parent && this.$parent.children(".panel").children(".in, .collapsing"), !(r && r.length && (f = r.data("bs.collapse"), f && f.transitioning)) && (e = n.Event("show.bs.collapse"), this.$element.trigger(e), !e.isDefaultPrevented()))) {
  1134. if (r && r.length && (i.call(r, "hide"), f || r.data("bs.collapse", null)), u = this.dimension(), this.$element.removeClass("collapse").addClass("collapsing")[u](0).attr("aria-expanded", !0), this.$trigger.removeClass("collapsed").attr("aria-expanded", !0), this.transitioning = 1, o = function () {
  1135. this.$element.removeClass("collapsing").addClass("collapse in")[u]("");
  1136. this.transitioning = 0;
  1137. this.$element.trigger("shown.bs.collapse")
  1138. },
  1139. !n.support.transition) return o.call(this);
  1140. s = n.camelCase(["scroll", u].join("-"));
  1141. this.$element.one("bsTransitionEnd", n.proxy(o, this)).emulateTransitionEnd(t.TRANSITION_DURATION)[u](this.$element[0][s])
  1142. }
  1143. };
  1144. t.prototype.hide = function () {
  1145. var r, i, u;
  1146. if (!this.transitioning && this.$element.hasClass("in") && (r = n.Event("hide.bs.collapse"), this.$element.trigger(r), !r.isDefaultPrevented())) return i = this.dimension(),
  1147. this.$element[i](this.$element[i]())[0].offsetHeight,
  1148. this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded", !1),
  1149. this.$trigger.addClass("collapsed").attr("aria-expanded", !1),
  1150. this.transitioning = 1,
  1151. u = function () {
  1152. this.transitioning = 0;
  1153. this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")
  1154. },
  1155. n.support.transition ? void this.$element[i](0).one("bsTransitionEnd", n.proxy(u, this)).emulateTransitionEnd(t.TRANSITION_DURATION) : u.call(this)
  1156. };
  1157. t.prototype.toggle = function () {
  1158. this[this.$element.hasClass("in") ? "hide" : "show"]()
  1159. };
  1160. t.prototype.getParent = function () {
  1161. return n(this.options.parent).find('[data-toggle="collapse"][data-parent="' + this.options.parent + '"]').each(n.proxy(function (t, i) {
  1162. var u = n(i);
  1163. this.addAriaAndCollapsedClass(r(u), u)
  1164. },
  1165. this)).end()
  1166. };
  1167. t.prototype.addAriaAndCollapsedClass = function (n, t) {
  1168. var i = n.hasClass("in");
  1169. n.attr("aria-expanded", i);
  1170. t.toggleClass("collapsed", !i).attr("aria-expanded", i)
  1171. };
  1172. u = n.fn.collapse;
  1173. n.fn.collapse = i;
  1174. n.fn.collapse.Constructor = t;
  1175. n.fn.collapse.noConflict = function () {
  1176. return n.fn.collapse = u,
  1177. this
  1178. };
  1179. n(document).on("click.bs.collapse.data-api", '[data-toggle="collapse"]',
  1180. function (t) {
  1181. var u = n(this);
  1182. u.attr("data-target") || t.preventDefault();
  1183. var f = r(u),
  1184. e = f.data("bs.collapse"),
  1185. o = e ? "toggle" : u.data();
  1186. i.call(f, o)
  1187. })
  1188. }(jQuery); +
  1189. function (n) {
  1190. "use strict";
  1191. function r(t) {
  1192. t && 3 === t.which || (n(o).remove(), n(i).each(function () {
  1193. var r = n(this),
  1194. i = u(r),
  1195. f = {
  1196. relatedTarget: this
  1197. };
  1198. i.hasClass("open") && (i.trigger(t = n.Event("hide.bs.dropdown", f)), t.isDefaultPrevented() || (r.attr("aria-expanded", "false"), i.removeClass("open").trigger("hidden.bs.dropdown", f)))
  1199. }))
  1200. }
  1201. function u(t) {
  1202. var i = t.attr("data-target"),
  1203. r;
  1204. return i || (i = t.attr("href"), i = i && /#[A-Za-z]/.test(i) && i.replace(/.*(?=#[^\s]*$)/, "")),
  1205. r = i && n(i),
  1206. r && r.length ? r : t.parent()
  1207. }
  1208. function e(i) {
  1209. return this.each(function () {
  1210. var r = n(this),
  1211. u = r.data("bs.dropdown");
  1212. u || r.data("bs.dropdown", u = new t(this));
  1213. "string" == typeof i && u[i].call(r)
  1214. })
  1215. }
  1216. var o = ".dropdown-backdrop",
  1217. i = '[data-toggle="dropdown"]',
  1218. t = function (t) {
  1219. n(t).on("click.bs.dropdown", this.toggle)
  1220. },
  1221. f;
  1222. t.VERSION = "3.3.4";
  1223. t.prototype.toggle = function (t) {
  1224. var f = n(this),
  1225. i,
  1226. o,
  1227. e;
  1228. if (!f.is(".disabled, :disabled")) {
  1229. if (i = u(f), o = i.hasClass("open"), r(), !o) {
  1230. if ("ontouchstart" in document.documentElement && !i.closest(".navbar-nav").length && n('<div class="dropdown-backdrop"/>').insertAfter(n(this)).on("click", r), e = {
  1231. relatedTarget: this
  1232. },
  1233. i.trigger(t = n.Event("show.bs.dropdown", e)), t.isDefaultPrevented()) return;
  1234. f.trigger("focus").attr("aria-expanded", "true");
  1235. i.toggleClass("open").trigger("shown.bs.dropdown", e)
  1236. }
  1237. return !1
  1238. }
  1239. };
  1240. t.prototype.keydown = function (t) {
  1241. var e, o, s, h, f, r;
  1242. if (/(38|40|27|32)/.test(t.which) && !/input|textarea/i.test(t.target.tagName) && (e = n(this), t.preventDefault(), t.stopPropagation(), !e.is(".disabled, :disabled"))) {
  1243. if (o = u(e), s = o.hasClass("open"), !s && 27 != t.which || s && 27 == t.which) return 27 == t.which && o.find(i).trigger("focus"),
  1244. e.trigger("click");
  1245. h = " li:not(.disabled):visible a";
  1246. f = o.find('[role="menu"]' + h + ', [role="listbox"]' + h);
  1247. f.length && (r = f.index(t.target), 38 == t.which && r > 0 && r--, 40 == t.which && r < f.length - 1 && r++, ~r || (r = 0), f.eq(r).trigger("focus"))
  1248. }
  1249. };
  1250. f = n.fn.dropdown;
  1251. n.fn.dropdown = e;
  1252. n.fn.dropdown.Constructor = t;
  1253. n.fn.dropdown.noConflict = function () {
  1254. return n.fn.dropdown = f,
  1255. this
  1256. };
  1257. n(document).on("click.bs.dropdown.data-api", r).on("click.bs.dropdown.data-api", ".dropdown form",
  1258. function (n) {
  1259. n.stopPropagation()
  1260. }).on("click.bs.dropdown.data-api", i, t.prototype.toggle).on("keydown.bs.dropdown.data-api", i, t.prototype.keydown).on("keydown.bs.dropdown.data-api", '[role="menu"]', t.prototype.keydown).on("keydown.bs.dropdown.data-api", '[role="listbox"]', t.prototype.keydown)
  1261. }(jQuery); +
  1262. function (n) {
  1263. "use strict";
  1264. function i(i, r) {
  1265. return this.each(function () {
  1266. var f = n(this),
  1267. u = f.data("bs.modal"),
  1268. e = n.extend({},
  1269. t.DEFAULTS, f.data(), "object" == typeof i && i);
  1270. u || f.data("bs.modal", u = new t(this, e));
  1271. "string" == typeof i ? u[i](r) : e.show && u.show(r)
  1272. })
  1273. }
  1274. var t = function (t, i) {
  1275. this.options = i;
  1276. this.$body = n(document.body);
  1277. this.$element = n(t);
  1278. this.$dialog = this.$element.find(".modal-dialog");
  1279. this.$backdrop = null;
  1280. this.isShown = null;
  1281. this.originalBodyPad = null;
  1282. this.scrollbarWidth = 0;
  1283. this.ignoreBackdropClick = !1;
  1284. this.options.remote && this.$element.find(".modal-content").load(this.options.remote, n.proxy(function () {
  1285. this.$element.trigger("loaded.bs.modal")
  1286. },
  1287. this))
  1288. },
  1289. r;
  1290. t.VERSION = "3.3.4";
  1291. t.TRANSITION_DURATION = 300;
  1292. t.BACKDROP_TRANSITION_DURATION = 150;
  1293. t.DEFAULTS = {
  1294. backdrop: !0,
  1295. keyboard: !0,
  1296. show: !0
  1297. };
  1298. t.prototype.toggle = function (n) {
  1299. return this.isShown ? this.hide() : this.show(n)
  1300. };
  1301. t.prototype.show = function (i) {
  1302. var r = this,
  1303. u = n.Event("show.bs.modal", {
  1304. relatedTarget: i
  1305. });
  1306. this.$element.trigger(u);
  1307. this.isShown || u.isDefaultPrevented() || (this.isShown = !0, this.checkScrollbar(), this.setScrollbar(), this.$body.addClass("modal-open"), this.escape(), this.resize(), this.$element.on("click.dismiss.bs.modal", '[data-dismiss="modal"]', n.proxy(this.hide, this)), this.$dialog.on("mousedown.dismiss.bs.modal",
  1308. function () {
  1309. r.$element.one("mouseup.dismiss.bs.modal",
  1310. function (t) {
  1311. n(t.target).is(r.$element) && (r.ignoreBackdropClick = !0)
  1312. })
  1313. }), this.backdrop(function () {
  1314. var f = n.support.transition && r.$element.hasClass("fade"),
  1315. u;
  1316. r.$element.parent().length || r.$element.appendTo(r.$body);
  1317. r.$element.show().scrollTop(0);
  1318. r.adjustDialog();
  1319. f && r.$element[0].offsetWidth;
  1320. r.$element.addClass("in").attr("aria-hidden", !1);
  1321. r.enforceFocus();
  1322. u = n.Event("shown.bs.modal", {
  1323. relatedTarget: i
  1324. });
  1325. f ? r.$dialog.one("bsTransitionEnd",
  1326. function () {
  1327. r.$element.trigger("focus").trigger(u)
  1328. }).emulateTransitionEnd(t.TRANSITION_DURATION) : r.$element.trigger("focus").trigger(u)
  1329. }))
  1330. };
  1331. t.prototype.hide = function (i) {
  1332. i && i.preventDefault();
  1333. i = n.Event("hide.bs.modal");
  1334. this.$element.trigger(i);
  1335. this.isShown && !i.isDefaultPrevented() && (this.isShown = !1, this.escape(), this.resize(), n(document).off("focusin.bs.modal"), this.$element.removeClass("in").attr("aria-hidden", !0).off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"), this.$dialog.off("mousedown.dismiss.bs.modal"), n.support.transition && this.$element.hasClass("fade") ? this.$element.one("bsTransitionEnd", n.proxy(this.hideModal, this)).emulateTransitionEnd(t.TRANSITION_DURATION) : this.hideModal())
  1336. };
  1337. t.prototype.enforceFocus = function () {
  1338. n(document).off("focusin.bs.modal").on("focusin.bs.modal", n.proxy(function (n) {
  1339. this.$element[0] === n.target || this.$element.has(n.target).length || this.$element.trigger("focus")
  1340. },
  1341. this))
  1342. };
  1343. t.prototype.escape = function () {
  1344. this.isShown && this.options.keyboard ? this.$element.on("keydown.dismiss.bs.modal", n.proxy(function (n) {
  1345. 27 == n.which && this.hide()
  1346. },
  1347. this)) : this.isShown || this.$element.off("keydown.dismiss.bs.modal")
  1348. };
  1349. t.prototype.resize = function () {
  1350. this.isShown ? n(window).on("resize.bs.modal", n.proxy(this.handleUpdate, this)) : n(window).off("resize.bs.modal")
  1351. };
  1352. t.prototype.hideModal = function () {
  1353. var n = this;
  1354. this.$element.hide();
  1355. this.backdrop(function () {
  1356. n.$body.removeClass("modal-open");
  1357. n.resetAdjustments();
  1358. n.resetScrollbar();
  1359. n.$element.trigger("hidden.bs.modal")
  1360. })
  1361. };
  1362. t.prototype.removeBackdrop = function () {
  1363. this.$backdrop && this.$backdrop.remove();
  1364. this.$backdrop = null
  1365. };
  1366. t.prototype.backdrop = function (i) {
  1367. var e = this,
  1368. f = this.$element.hasClass("fade") ? "fade" : "",
  1369. r,
  1370. u;
  1371. if (this.isShown && this.options.backdrop) {
  1372. if (r = n.support.transition && f, this.$backdrop = n('<div class="modal-backdrop ' + f + '" />').appendTo(this.$body), this.$element.on("click.dismiss.bs.modal", n.proxy(function (n) {
  1373. return this.ignoreBackdropClick ? void (this.ignoreBackdropClick = !1) : void (n.target === n.currentTarget && ("static" == this.options.backdrop ? this.$element[0].focus() : this.hide()))
  1374. },
  1375. this)), r && this.$backdrop[0].offsetWidth, this.$backdrop.addClass("in"), !i) return;
  1376. r ? this.$backdrop.one("bsTransitionEnd", i).emulateTransitionEnd(t.BACKDROP_TRANSITION_DURATION) : i()
  1377. } else !this.isShown && this.$backdrop ? (this.$backdrop.removeClass("in"), u = function () {
  1378. e.removeBackdrop();
  1379. i && i()
  1380. },
  1381. n.support.transition && this.$element.hasClass("fade") ? this.$backdrop.one("bsTransitionEnd", u).emulateTransitionEnd(t.BACKDROP_TRANSITION_DURATION) : u()) : i && i()
  1382. };
  1383. t.prototype.handleUpdate = function () {
  1384. this.adjustDialog()
  1385. };
  1386. t.prototype.adjustDialog = function () {
  1387. var n = this.$element[0].scrollHeight > document.documentElement.clientHeight;
  1388. this.$element.css({
  1389. paddingLeft: !this.bodyIsOverflowing && n ? this.scrollbarWidth : "",
  1390. paddingRight: this.bodyIsOverflowing && !n ? this.scrollbarWidth : ""
  1391. })
  1392. };
  1393. t.prototype.resetAdjustments = function () {
  1394. this.$element.css({
  1395. paddingLeft: "",
  1396. paddingRight: ""
  1397. })
  1398. };
  1399. t.prototype.checkScrollbar = function () {
  1400. var n = window.innerWidth,
  1401. t;
  1402. n || (t = document.documentElement.getBoundingClientRect(), n = t.right - Math.abs(t.left));
  1403. this.bodyIsOverflowing = document.body.clientWidth < n;
  1404. this.scrollbarWidth = this.measureScrollbar()
  1405. };
  1406. t.prototype.setScrollbar = function () {
  1407. var n = parseInt(this.$body.css("padding-right") || 0, 10);
  1408. this.originalBodyPad = document.body.style.paddingRight || "";
  1409. this.bodyIsOverflowing && this.$body.css("padding-right", n + this.scrollbarWidth)
  1410. };
  1411. t.prototype.resetScrollbar = function () {
  1412. this.$body.css("padding-right", this.originalBodyPad)
  1413. };
  1414. t.prototype.measureScrollbar = function () {
  1415. var n = document.createElement("div"),
  1416. t;
  1417. return n.className = "modal-scrollbar-measure",
  1418. this.$body.append(n),
  1419. t = n.offsetWidth - n.clientWidth,
  1420. this.$body[0].removeChild(n),
  1421. t
  1422. };
  1423. r = n.fn.modal;
  1424. n.fn.modal = i;
  1425. n.fn.modal.Constructor = t;
  1426. n.fn.modal.noConflict = function () {
  1427. return n.fn.modal = r,
  1428. this
  1429. };
  1430. n(document).on("click.bs.modal.data-api", '[data-toggle="modal"]',
  1431. function (t) {
  1432. var r = n(this),
  1433. f = r.attr("href"),
  1434. u = n(r.attr("data-target") || f && f.replace(/.*(?=#[^\s]+$)/, "")),
  1435. e = u.data("bs.modal") ? "toggle" : n.extend({
  1436. remote: !/#/.test(f) && f
  1437. },
  1438. u.data(), r.data());
  1439. r.is("a") && t.preventDefault();
  1440. u.one("show.bs.modal",
  1441. function (n) {
  1442. n.isDefaultPrevented() || u.one("hidden.bs.modal",
  1443. function () {
  1444. r.is(":visible") && r.trigger("focus")
  1445. })
  1446. });
  1447. i.call(u, e, this)
  1448. })
  1449. }(jQuery); +
  1450. function (n) {
  1451. "use strict";
  1452. function r(i) {
  1453. return this.each(function () {
  1454. var u = n(this),
  1455. r = u.data("bs.tooltip"),
  1456. f = "object" == typeof i && i; (r || !/destroy|hide/.test(i)) && (r || u.data("bs.tooltip", r = new t(this, f)), "string" == typeof i && r[i]())
  1457. })
  1458. }
  1459. var t = function (n, t) {
  1460. this.type = null;
  1461. this.options = null;
  1462. this.enabled = null;
  1463. this.timeout = null;
  1464. this.hoverState = null;
  1465. this.$element = null;
  1466. this.init("tooltip", n, t)
  1467. },
  1468. i;
  1469. t.VERSION = "3.3.4";
  1470. t.TRANSITION_DURATION = 150;
  1471. t.DEFAULTS = {
  1472. animation: !0,
  1473. placement: "top",
  1474. selector: !1,
  1475. template: '<div class="tooltip" role="tooltip"><div class="tooltip-arrow"><\/div><div class="tooltip-inner"><\/div><\/div>',
  1476. trigger: "hover focus",
  1477. title: "",
  1478. delay: 0,
  1479. html: !1,
  1480. container: !1,
  1481. viewport: {
  1482. selector: "body",
  1483. padding: 0
  1484. }
  1485. };
  1486. t.prototype.init = function (t, i, r) {
  1487. var f, e, u, o, s;
  1488. if (this.enabled = !0, this.type = t, this.$element = n(i), this.options = this.getOptions(r), this.$viewport = this.options.viewport && n(this.options.viewport.selector || this.options.viewport), this.$element[0] instanceof document.constructor && !this.options.selector) throw new Error("`selector` option must be specified when initializing " + this.type + " on the window.document object!");
  1489. for (f = this.options.trigger.split(" "), e = f.length; e--;) if (u = f[e], "click" == u) this.$element.on("click." + this.type, this.options.selector, n.proxy(this.toggle, this));
  1490. else "manual" != u && (o = "hover" == u ? "mouseenter" : "focusin", s = "hover" == u ? "mouseleave" : "focusout", this.$element.on(o + "." + this.type, this.options.selector, n.proxy(this.enter, this)), this.$element.on(s + "." + this.type, this.options.selector, n.proxy(this.leave, this)));
  1491. this.options.selector ? this._options = n.extend({},
  1492. this.options, {
  1493. trigger: "manual",
  1494. selector: ""
  1495. }) : this.fixTitle()
  1496. };
  1497. t.prototype.getDefaults = function () {
  1498. return t.DEFAULTS
  1499. };
  1500. t.prototype.getOptions = function (t) {
  1501. return t = n.extend({},
  1502. this.getDefaults(), this.$element.data(), t),
  1503. t.delay && "number" == typeof t.delay && (t.delay = {
  1504. show: t.delay,
  1505. hide: t.delay
  1506. }),
  1507. t
  1508. };
  1509. t.prototype.getDelegateOptions = function () {
  1510. var t = {},
  1511. i = this.getDefaults();
  1512. return this._options && n.each(this._options,
  1513. function (n, r) {
  1514. i[n] != r && (t[n] = r)
  1515. }),
  1516. t
  1517. };
  1518. t.prototype.enter = function (t) {
  1519. var i = t instanceof this.constructor ? t : n(t.currentTarget).data("bs." + this.type);
  1520. return i && i.$tip && i.$tip.is(":visible") ? void (i.hoverState = "in") : (i || (i = new this.constructor(t.currentTarget, this.getDelegateOptions()), n(t.currentTarget).data("bs." + this.type, i)), clearTimeout(i.timeout), i.hoverState = "in", i.options.delay && i.options.delay.show ? void (i.timeout = setTimeout(function () {
  1521. "in" == i.hoverState && i.show()
  1522. },
  1523. i.options.delay.show)) : i.show())
  1524. };
  1525. t.prototype.leave = function (t) {
  1526. var i = t instanceof this.constructor ? t : n(t.currentTarget).data("bs." + this.type);
  1527. return i || (i = new this.constructor(t.currentTarget, this.getDelegateOptions()), n(t.currentTarget).data("bs." + this.type, i)),
  1528. clearTimeout(i.timeout),
  1529. i.hoverState = "out",
  1530. i.options.delay && i.options.delay.hide ? void (i.timeout = setTimeout(function () {
  1531. "out" == i.hoverState && i.hide()
  1532. },
  1533. i.options.delay.hide)) : i.hide()
  1534. };
  1535. t.prototype.show = function () {
  1536. var c = n.Event("show.bs." + this.type),
  1537. l,
  1538. p,
  1539. h;
  1540. if (this.hasContent() && this.enabled) {
  1541. if (this.$element.trigger(c), l = n.contains(this.$element[0].ownerDocument.documentElement, this.$element[0]), c.isDefaultPrevented() || !l) return;
  1542. var u = this,
  1543. r = this.tip(),
  1544. a = this.getUID(this.type);
  1545. this.setContent();
  1546. r.attr("id", a);
  1547. this.$element.attr("aria-describedby", a);
  1548. this.options.animation && r.addClass("fade");
  1549. var i = "function" == typeof this.options.placement ? this.options.placement.call(this, r[0], this.$element[0]) : this.options.placement,
  1550. v = /\s?auto?\s?/i,
  1551. y = v.test(i);
  1552. y && (i = i.replace(v, "") || "top");
  1553. r.detach().css({
  1554. top: 0,
  1555. left: 0,
  1556. display: "block"
  1557. }).addClass(i).data("bs." + this.type, this);
  1558. this.options.container ? r.appendTo(this.options.container) : r.insertAfter(this.$element);
  1559. var f = this.getPosition(),
  1560. o = r[0].offsetWidth,
  1561. s = r[0].offsetHeight;
  1562. if (y) {
  1563. var w = i,
  1564. b = this.options.container ? n(this.options.container) : this.$element.parent(),
  1565. e = this.getPosition(b);
  1566. i = "bottom" == i && f.bottom + s > e.bottom ? "top" : "top" == i && f.top - s < e.top ? "bottom" : "right" == i && f.right + o > e.width ? "left" : "left" == i && f.left - o < e.left ? "right" : i;
  1567. r.removeClass(w).addClass(i)
  1568. }
  1569. p = this.getCalculatedOffset(i, f, o, s);
  1570. this.applyPlacement(p, i);
  1571. h = function () {
  1572. var n = u.hoverState;
  1573. u.$element.trigger("shown.bs." + u.type);
  1574. u.hoverState = null;
  1575. "out" == n && u.leave(u)
  1576. };
  1577. n.support.transition && this.$tip.hasClass("fade") ? r.one("bsTransitionEnd", h).emulateTransitionEnd(t.TRANSITION_DURATION) : h()
  1578. }
  1579. };
  1580. t.prototype.applyPlacement = function (t, i) {
  1581. var r = this.tip(),
  1582. l = r[0].offsetWidth,
  1583. e = r[0].offsetHeight,
  1584. o = parseInt(r.css("margin-top"), 10),
  1585. s = parseInt(r.css("margin-left"), 10),
  1586. h,
  1587. f,
  1588. u;
  1589. isNaN(o) && (o = 0);
  1590. isNaN(s) && (s = 0);
  1591. t.top = t.top + o;
  1592. t.left = t.left + s;
  1593. n.offset.setOffset(r[0], n.extend({
  1594. using: function (n) {
  1595. r.css({
  1596. top: Math.round(n.top),
  1597. left: Math.round(n.left)
  1598. })
  1599. }
  1600. },
  1601. t), 0);
  1602. r.addClass("in");
  1603. h = r[0].offsetWidth;
  1604. f = r[0].offsetHeight;
  1605. "top" == i && f != e && (t.top = t.top + e - f);
  1606. u = this.getViewportAdjustedDelta(i, t, h, f);
  1607. u.left ? t.left += u.left : t.top += u.top;
  1608. var c = /top|bottom/.test(i),
  1609. a = c ? 2 * u.left - l + h : 2 * u.top - e + f,
  1610. v = c ? "offsetWidth" : "offsetHeight";
  1611. r.offset(t);
  1612. this.replaceArrow(a, r[0][v], c)
  1613. };
  1614. t.prototype.replaceArrow = function (n, t, i) {
  1615. this.arrow().css(i ? "left" : "top", 50 * (1 - n / t) + "%").css(i ? "top" : "left", "")
  1616. };
  1617. t.prototype.setContent = function () {
  1618. var n = this.tip(),
  1619. t = this.getTitle();
  1620. n.find(".tooltip-inner")[this.options.html ? "html" : "text"](t);
  1621. n.removeClass("fade in top bottom left right")
  1622. };
  1623. t.prototype.hide = function (i) {
  1624. function f() {
  1625. "in" != u.hoverState && r.detach();
  1626. u.$element.removeAttr("aria-describedby").trigger("hidden.bs." + u.type);
  1627. i && i()
  1628. }
  1629. var u = this,
  1630. r = n(this.$tip),
  1631. e = n.Event("hide.bs." + this.type);
  1632. return this.$element.trigger(e),
  1633. e.isDefaultPrevented() ? void 0 : (r.removeClass("in"), n.support.transition && r.hasClass("fade") ? r.one("bsTransitionEnd", f).emulateTransitionEnd(t.TRANSITION_DURATION) : f(), this.hoverState = null, this)
  1634. };
  1635. t.prototype.fixTitle = function () {
  1636. var n = this.$element; (n.attr("title") || "string" != typeof n.attr("data-original-title")) && n.attr("data-original-title", n.attr("title") || "").attr("title", "")
  1637. };
  1638. t.prototype.hasContent = function () {
  1639. return this.getTitle()
  1640. };
  1641. t.prototype.getPosition = function (t) {
  1642. t = t || this.$element;
  1643. var u = t[0],
  1644. r = "BODY" == u.tagName,
  1645. i = u.getBoundingClientRect();
  1646. null == i.width && (i = n.extend({},
  1647. i, {
  1648. width: i.right - i.left,
  1649. height: i.bottom - i.top
  1650. }));
  1651. var f = r ? {
  1652. top: 0,
  1653. left: 0
  1654. } : t.offset(),
  1655. e = {
  1656. scroll: r ? document.documentElement.scrollTop || document.body.scrollTop : t.scrollTop()
  1657. },
  1658. o = r ? {
  1659. width: n(window).width(),
  1660. height: n(window).height()
  1661. } : null;
  1662. return n.extend({},
  1663. i, e, o, f)
  1664. };
  1665. t.prototype.getCalculatedOffset = function (n, t, i, r) {
  1666. return "bottom" == n ? {
  1667. top: t.top + t.height,
  1668. left: t.left + t.width / 2 - i / 2
  1669. } : "top" == n ? {
  1670. top: t.top - r,
  1671. left: t.left + t.width / 2 - i / 2
  1672. } : "left" == n ? {
  1673. top: t.top + t.height / 2 - r / 2,
  1674. left: t.left - i
  1675. } : {
  1676. top: t.top + t.height / 2 - r / 2,
  1677. left: t.left + t.width
  1678. }
  1679. };
  1680. t.prototype.getViewportAdjustedDelta = function (n, t, i, r) {
  1681. var f = {
  1682. top: 0,
  1683. left: 0
  1684. },
  1685. e,
  1686. u,
  1687. o,
  1688. s,
  1689. h,
  1690. c;
  1691. return this.$viewport ? (e = this.options.viewport && this.options.viewport.padding || 0, u = this.getPosition(this.$viewport), /right|left/.test(n) ? (o = t.top - e - u.scroll, s = t.top + e - u.scroll + r, o < u.top ? f.top = u.top - o : s > u.top + u.height && (f.top = u.top + u.height - s)) : (h = t.left - e, c = t.left + e + i, h < u.left ? f.left = u.left - h : c > u.width && (f.left = u.left + u.width - c)), f) : f
  1692. };
  1693. t.prototype.getTitle = function () {
  1694. var t = this.$element,
  1695. n = this.options;
  1696. return t.attr("data-original-title") || ("function" == typeof n.title ? n.title.call(t[0]) : n.title)
  1697. };
  1698. t.prototype.getUID = function (n) {
  1699. do n += ~~(1e6 * Math.random());
  1700. while (document.getElementById(n));
  1701. return n
  1702. };
  1703. t.prototype.tip = function () {
  1704. return this.$tip = this.$tip || n(this.options.template)
  1705. };
  1706. t.prototype.arrow = function () {
  1707. return this.$arrow = this.$arrow || this.tip().find(".tooltip-arrow")
  1708. };
  1709. t.prototype.enable = function () {
  1710. this.enabled = !0
  1711. };
  1712. t.prototype.disable = function () {
  1713. this.enabled = !1
  1714. };
  1715. t.prototype.toggleEnabled = function () {
  1716. this.enabled = !this.enabled
  1717. };
  1718. t.prototype.toggle = function (t) {
  1719. var i = this;
  1720. t && (i = n(t.currentTarget).data("bs." + this.type), i || (i = new this.constructor(t.currentTarget, this.getDelegateOptions()), n(t.currentTarget).data("bs." + this.type, i)));
  1721. i.tip().hasClass("in") ? i.leave(i) : i.enter(i)
  1722. };
  1723. t.prototype.destroy = function () {
  1724. var n = this;
  1725. clearTimeout(this.timeout);
  1726. this.hide(function () {
  1727. n.$element.off("." + n.type).removeData("bs." + n.type)
  1728. })
  1729. };
  1730. i = n.fn.tooltip;
  1731. n.fn.tooltip = r;
  1732. n.fn.tooltip.Constructor = t;
  1733. n.fn.tooltip.noConflict = function () {
  1734. return n.fn.tooltip = i,
  1735. this
  1736. }
  1737. }(jQuery); +
  1738. function (n) {
  1739. "use strict";
  1740. function r(i) {
  1741. return this.each(function () {
  1742. var u = n(this),
  1743. r = u.data("bs.popover"),
  1744. f = "object" == typeof i && i; (r || !/destroy|hide/.test(i)) && (r || u.data("bs.popover", r = new t(this, f)), "string" == typeof i && r[i]())
  1745. })
  1746. }
  1747. var t = function (n, t) {
  1748. this.init("popover", n, t)
  1749. },
  1750. i;
  1751. if (!n.fn.tooltip) throw new Error("Popover requires tooltip.js");
  1752. t.VERSION = "3.3.4";
  1753. t.DEFAULTS = n.extend({},
  1754. n.fn.tooltip.Constructor.DEFAULTS, {
  1755. placement: "right",
  1756. trigger: "click",
  1757. content: "",
  1758. template: '<div class="popover" role="tooltip"><div class="arrow"><\/div><h3 class="popover-title"><\/h3><div class="popover-content"><\/div><\/div>'
  1759. });
  1760. t.prototype = n.extend({},
  1761. n.fn.tooltip.Constructor.prototype);
  1762. t.prototype.constructor = t;
  1763. t.prototype.getDefaults = function () {
  1764. return t.DEFAULTS
  1765. };
  1766. t.prototype.setContent = function () {
  1767. var n = this.tip(),
  1768. i = this.getTitle(),
  1769. t = this.getContent();
  1770. n.find(".popover-title")[this.options.html ? "html" : "text"](i);
  1771. n.find(".popover-content").children().detach().end()[this.options.html ? "string" == typeof t ? "html" : "append" : "text"](t);
  1772. n.removeClass("fade top bottom left right in");
  1773. n.find(".popover-title").html() || n.find(".popover-title").hide()
  1774. };
  1775. t.prototype.hasContent = function () {
  1776. return this.getTitle() || this.getContent()
  1777. };
  1778. t.prototype.getContent = function () {
  1779. var t = this.$element,
  1780. n = this.options;
  1781. return t.attr("data-content") || ("function" == typeof n.content ? n.content.call(t[0]) : n.content)
  1782. };
  1783. t.prototype.arrow = function () {
  1784. return this.$arrow = this.$arrow || this.tip().find(".arrow")
  1785. };
  1786. i = n.fn.popover;
  1787. n.fn.popover = r;
  1788. n.fn.popover.Constructor = t;
  1789. n.fn.popover.noConflict = function () {
  1790. return n.fn.popover = i,
  1791. this
  1792. }
  1793. }(jQuery); +
  1794. function (n) {
  1795. "use strict";
  1796. function t(i, r) {
  1797. this.$body = n(document.body);
  1798. this.$scrollElement = n(n(i).is(document.body) ? window : i);
  1799. this.options = n.extend({},
  1800. t.DEFAULTS, r);
  1801. this.selector = (this.options.target || "") + " .nav li > a";
  1802. this.offsets = [];
  1803. this.targets = [];
  1804. this.activeTarget = null;
  1805. this.scrollHeight = 0;
  1806. this.$scrollElement.on("scroll.bs.scrollspy", n.proxy(this.process, this));
  1807. this.refresh();
  1808. this.process()
  1809. }
  1810. function i(i) {
  1811. return this.each(function () {
  1812. var u = n(this),
  1813. r = u.data("bs.scrollspy"),
  1814. f = "object" == typeof i && i;
  1815. r || u.data("bs.scrollspy", r = new t(this, f));
  1816. "string" == typeof i && r[i]()
  1817. })
  1818. }
  1819. t.VERSION = "3.3.4";
  1820. t.DEFAULTS = {
  1821. offset: 10
  1822. };
  1823. t.prototype.getScrollHeight = function () {
  1824. return this.$scrollElement[0].scrollHeight || Math.max(this.$body[0].scrollHeight, document.documentElement.scrollHeight)
  1825. };
  1826. t.prototype.refresh = function () {
  1827. var t = this,
  1828. i = "offset",
  1829. r = 0;
  1830. this.offsets = [];
  1831. this.targets = [];
  1832. this.scrollHeight = this.getScrollHeight();
  1833. n.isWindow(this.$scrollElement[0]) || (i = "position", r = this.$scrollElement.scrollTop());
  1834. this.$body.find(this.selector).map(function () {
  1835. var f = n(this),
  1836. u = f.data("target") || f.attr("href"),
  1837. t = /^#./.test(u) && n(u);
  1838. return t && t.length && t.is(":visible") && [[t[i]().top + r, u]] || null
  1839. }).sort(function (n, t) {
  1840. return n[0] - t[0]
  1841. }).each(function () {
  1842. t.offsets.push(this[0]);
  1843. t.targets.push(this[1])
  1844. })
  1845. };
  1846. t.prototype.process = function () {
  1847. var n, i = this.$scrollElement.scrollTop() + this.options.offset,
  1848. f = this.getScrollHeight(),
  1849. e = this.options.offset + f - this.$scrollElement.height(),
  1850. t = this.offsets,
  1851. r = this.targets,
  1852. u = this.activeTarget;
  1853. if (this.scrollHeight != f && this.refresh(), i >= e) return u != (n = r[r.length - 1]) && this.activate(n);
  1854. if (u && i < t[0]) return this.activeTarget = null,
  1855. this.clear();
  1856. for (n = t.length; n--;) u != r[n] && i >= t[n] && (void 0 === t[n + 1] || i < t[n + 1]) && this.activate(r[n])
  1857. };
  1858. t.prototype.activate = function (t) {
  1859. this.activeTarget = t;
  1860. this.clear();
  1861. var r = this.selector + '[data-target="' + t + '"],' + this.selector + '[href="' + t + '"]',
  1862. i = n(r).parents("li").addClass("active");
  1863. i.parent(".dropdown-menu").length && (i = i.closest("li.dropdown").addClass("active"));
  1864. i.trigger("activate.bs.scrollspy")
  1865. };
  1866. t.prototype.clear = function () {
  1867. n(this.selector).parentsUntil(this.options.target, ".active").removeClass("active")
  1868. };
  1869. var r = n.fn.scrollspy;
  1870. n.fn.scrollspy = i;
  1871. n.fn.scrollspy.Constructor = t;
  1872. n.fn.scrollspy.noConflict = function () {
  1873. return n.fn.scrollspy = r,
  1874. this
  1875. };
  1876. n(window).on("load.bs.scrollspy.data-api",
  1877. function () {
  1878. n('[data-spy="scroll"]').each(function () {
  1879. var t = n(this);
  1880. i.call(t, t.data())
  1881. })
  1882. })
  1883. }(jQuery); +
  1884. function (n) {
  1885. "use strict";
  1886. function r(i) {
  1887. return this.each(function () {
  1888. var u = n(this),
  1889. r = u.data("bs.tab");
  1890. r || u.data("bs.tab", r = new t(this));
  1891. "string" == typeof i && r[i]()
  1892. })
  1893. }
  1894. var t = function (t) {
  1895. this.element = n(t)
  1896. },
  1897. u,
  1898. i;
  1899. t.VERSION = "3.3.4";
  1900. t.TRANSITION_DURATION = 150;
  1901. t.prototype.show = function () {
  1902. var t = this.element,
  1903. f = t.closest("ul:not(.dropdown-menu)"),
  1904. i = t.data("target"),
  1905. u;
  1906. if (i || (i = t.attr("href"), i = i && i.replace(/.*(?=#[^\s]*$)/, "")), !t.parent("li").hasClass("active")) {
  1907. var r = f.find(".active:last a"),
  1908. e = n.Event("hide.bs.tab", {
  1909. relatedTarget: t[0]
  1910. }),
  1911. o = n.Event("show.bs.tab", {
  1912. relatedTarget: r[0]
  1913. }); (r.trigger(e), t.trigger(o), o.isDefaultPrevented() || e.isDefaultPrevented()) || (u = n(i), this.activate(t.closest("li"), f), this.activate(u, u.parent(),
  1914. function () {
  1915. r.trigger({
  1916. type: "hidden.bs.tab",
  1917. relatedTarget: t[0]
  1918. });
  1919. t.trigger({
  1920. type: "shown.bs.tab",
  1921. relatedTarget: r[0]
  1922. })
  1923. }))
  1924. }
  1925. };
  1926. t.prototype.activate = function (i, r, u) {
  1927. function e() {
  1928. f.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded", !1);
  1929. i.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded", !0);
  1930. o ? (i[0].offsetWidth, i.addClass("in")) : i.removeClass("fade");
  1931. i.parent(".dropdown-menu").length && i.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded", !0);
  1932. u && u()
  1933. }
  1934. var f = r.find("> .active"),
  1935. o = u && n.support.transition && (f.length && f.hasClass("fade") || !!r.find("> .fade").length);
  1936. f.length && o ? f.one("bsTransitionEnd", e).emulateTransitionEnd(t.TRANSITION_DURATION) : e();
  1937. f.removeClass("in")
  1938. };
  1939. u = n.fn.tab;
  1940. n.fn.tab = r;
  1941. n.fn.tab.Constructor = t;
  1942. n.fn.tab.noConflict = function () {
  1943. return n.fn.tab = u,
  1944. this
  1945. };
  1946. i = function (t) {
  1947. t.preventDefault();
  1948. r.call(n(this), "show")
  1949. };
  1950. n(document).on("click.bs.tab.data-api", '[data-toggle="tab"]', i).on("click.bs.tab.data-api", '[data-toggle="pill"]', i)
  1951. }(jQuery); +
  1952. function (n) {
  1953. "use strict";
  1954. function i(i) {
  1955. return this.each(function () {
  1956. var u = n(this),
  1957. r = u.data("bs.affix"),
  1958. f = "object" == typeof i && i;
  1959. r || u.data("bs.affix", r = new t(this, f));
  1960. "string" == typeof i && r[i]()
  1961. })
  1962. }
  1963. var t = function (i, r) {
  1964. this.options = n.extend({},
  1965. t.DEFAULTS, r);
  1966. this.$target = n(this.options.target).on("scroll.bs.affix.data-api", n.proxy(this.checkPosition, this)).on("click.bs.affix.data-api", n.proxy(this.checkPositionWithEventLoop, this));
  1967. this.$element = n(i);
  1968. this.affixed = null;
  1969. this.unpin = null;
  1970. this.pinnedOffset = null;
  1971. this.checkPosition()
  1972. },
  1973. r;
  1974. t.VERSION = "3.3.4";
  1975. t.RESET = "affix affix-top affix-bottom";
  1976. t.DEFAULTS = {
  1977. offset: 0,
  1978. target: window
  1979. };
  1980. t.prototype.getState = function (n, t, i, r) {
  1981. var u = this.$target.scrollTop(),
  1982. f = this.$element.offset(),
  1983. e = this.$target.height();
  1984. if (null != i && "top" == this.affixed) return i > u ? "top" : !1;
  1985. if ("bottom" == this.affixed) return null != i ? u + this.unpin <= f.top ? !1 : "bottom" : n - r >= u + e ? !1 : "bottom";
  1986. var o = null == this.affixed,
  1987. s = o ? u : f.top,
  1988. h = o ? e : t;
  1989. return null != i && i >= u ? "top" : null != r && s + h >= n - r ? "bottom" : !1
  1990. };
  1991. t.prototype.getPinnedOffset = function () {
  1992. if (this.pinnedOffset) return this.pinnedOffset;
  1993. this.$element.removeClass(t.RESET).addClass("affix");
  1994. var n = this.$target.scrollTop(),
  1995. i = this.$element.offset();
  1996. return this.pinnedOffset = i.top - n
  1997. };
  1998. t.prototype.checkPositionWithEventLoop = function () {
  1999. setTimeout(n.proxy(this.checkPosition, this), 1)
  2000. };
  2001. t.prototype.checkPosition = function () {
  2002. var i, e, o;
  2003. if (this.$element.is(":visible")) {
  2004. var s = this.$element.height(),
  2005. r = this.options.offset,
  2006. f = r.top,
  2007. u = r.bottom,
  2008. h = n(document.body).height();
  2009. if ("object" != typeof r && (u = f = r), "function" == typeof f && (f = r.top(this.$element)), "function" == typeof u && (u = r.bottom(this.$element)), i = this.getState(h, s, f, u), this.affixed != i) {
  2010. if (null != this.unpin && this.$element.css("top", ""), e = "affix" + (i ? "-" + i : ""), o = n.Event(e + ".bs.affix"), this.$element.trigger(o), o.isDefaultPrevented()) return;
  2011. this.affixed = i;
  2012. this.unpin = "bottom" == i ? this.getPinnedOffset() : null;
  2013. this.$element.removeClass(t.RESET).addClass(e).trigger(e.replace("affix", "affixed") + ".bs.affix")
  2014. }
  2015. "bottom" == i && this.$element.offset({
  2016. top: h - s - u
  2017. })
  2018. }
  2019. };
  2020. r = n.fn.affix;
  2021. n.fn.affix = i;
  2022. n.fn.affix.Constructor = t;
  2023. n.fn.affix.noConflict = function () {
  2024. return n.fn.affix = r,
  2025. this
  2026. };
  2027. n(window).on("load",
  2028. function () {
  2029. n('[data-spy="affix"]').each(function () {
  2030. var r = n(this),
  2031. t = r.data();
  2032. t.offset = t.offset || {};
  2033. null != t.offsetBottom && (t.offset.bottom = t.offsetBottom);
  2034. null != t.offsetTop && (t.offset.top = t.offsetTop);
  2035. i.call(r, t)
  2036. })
  2037. })
  2038. }(jQuery),
  2039. function (n) {
  2040. "use strict";
  2041. var t = function (i, r) {
  2042. this.$element = n(i);
  2043. this.options = n.extend({},
  2044. t.defaults, r)
  2045. },
  2046. i;
  2047. t.defaults = {
  2048. transition_delay: 300,
  2049. refresh_speed: 50,
  2050. display_text: "none",
  2051. use_percentage: !0,
  2052. percent_format: function (n) {
  2053. return n + "%"
  2054. },
  2055. amount_format: function (n, t) {
  2056. return n + " / " + t
  2057. },
  2058. update: n.noop,
  2059. done: n.noop,
  2060. fail: n.noop
  2061. };
  2062. t.prototype.transition = function () {
  2063. var u = this.$element,
  2064. f = u.parent(),
  2065. o = this.$back_text,
  2066. e = this.$front_text,
  2067. i = this.options,
  2068. h = u.attr("aria-valuetransitiongoal"),
  2069. c = u.attr("aria-valuemin") || 0,
  2070. l = u.attr("aria-valuemax") || 100,
  2071. a = f.hasClass("vertical"),
  2072. v = i.update && typeof i.update == "function" ? i.update : t.defaults.update,
  2073. y = i.done && typeof i.done == "function" ? i.done : t.defaults.done,
  2074. p = i.fail && typeof i.fail == "function" ? i.fail : t.defaults.fail,
  2075. s,
  2076. r;
  2077. if (!h) {
  2078. p("aria-valuetransitiongoal not set");
  2079. return
  2080. }
  2081. s = Math.round(100 * (h - c) / (l - c));
  2082. i.display_text !== "center" || o || e || (this.$back_text = o = n("<span>", {
  2083. "class": "progressbar-back-text"
  2084. }).prependTo(f), this.$front_text = e = n("<span>", {
  2085. "class": "progressbar-front-text"
  2086. }).prependTo(u), a ? (r = f.css("height"), o.css({
  2087. height: r,
  2088. "line-height": r
  2089. }), e.css({
  2090. height: r,
  2091. "line-height": r
  2092. }), n(window).resize(function () {
  2093. r = f.css("height");
  2094. o.css({
  2095. height: r,
  2096. "line-height": r
  2097. });
  2098. e.css({
  2099. height: r,
  2100. "line-height": r
  2101. })
  2102. })) : (r = f.css("width"), e.css({
  2103. width: r
  2104. }), n(window).resize(function () {
  2105. r = f.css("width");
  2106. e.css({
  2107. width: r
  2108. })
  2109. })));
  2110. setTimeout(function () {
  2111. var n, t, r, p, w, b;
  2112. a ? u.css("height", s + "%") : u.css("width", s + "%");
  2113. b = setInterval(function () {
  2114. a ? (r = u.height(), p = f.height()) : (r = u.width(), p = f.width());
  2115. n = Math.round(100 * r / p);
  2116. t = Math.round(r / p * (l - c));
  2117. n >= s && (n = s, t = h, y(), clearInterval(b));
  2118. i.display_text !== "none" && (w = i.use_percentage ? i.percent_format(n) : i.amount_format(t, l), i.display_text === "fill" ? u.text(w) : i.display_text === "center" && (o.text(w), e.text(w)));
  2119. u.attr("aria-valuenow", t);
  2120. v(n)
  2121. },
  2122. i.refresh_speed)
  2123. },
  2124. i.transition_delay)
  2125. };
  2126. i = n.fn.progressbar;
  2127. n.fn.progressbar = function (i) {
  2128. return this.each(function () {
  2129. var u = n(this),
  2130. r = u.data("bs.progressbar"),
  2131. f = typeof i == "object" && i;
  2132. r || u.data("bs.progressbar", r = new t(this, f));
  2133. r.transition()
  2134. })
  2135. };
  2136. n.fn.progressbar.Constructor = t;
  2137. n.fn.progressbar.noConflict = function () {
  2138. return n.fn.progressbar = i,
  2139. this
  2140. }
  2141. }(window.jQuery);
  2142. $.fn.initValidform = function () {
  2143. var n = function (n) {
  2144. $(n).Validform({
  2145. tiptype: function (n, t, i) {
  2146. if (!t.obj.is("form")) {
  2147. t.obj.parent("div").find(".Validform_checktip").length == 0 && (t.obj.parent("div").append("<label class='Validform_checktip' />"), t.obj.parent("div").next().find(".Validform_checktip").remove());
  2148. var r = t.obj.parent("div").find(".Validform_checktip");
  2149. i(r, t.type);
  2150. r.text(n)
  2151. }
  2152. },
  2153. showAllError: !0
  2154. })
  2155. };
  2156. return $(this).each(function () {
  2157. n($(this))
  2158. })
  2159. }