From 444ac17143cafe46ae20f44021845c7447d592be Mon Sep 17 00:00:00 2001 From: Max Bradbury Date: Tue, 28 Jul 2020 19:12:01 +0100 Subject: [PATCH] wip --- .gitignore | 4 +- GREETZ.nfo | 22 + build.sh | 3 + helsinki.eot => includes/helsinki.eot | Bin helsinki.svg => includes/helsinki.svg | 0 helsinki.ttf => includes/helsinki.ttf | Bin helsinki.woff => includes/helsinki.woff | Bin helsinki.woff2 => includes/helsinki.woff2 | Bin {images => includes/images}/flag.png | Bin {images => includes/images}/graphics.psd | Bin {images => includes/images}/skull.png | Bin includes/jquery-3.5.1.min.js | 2 + includes/script.js | 631 +++++++++ includes/style.css | 342 +++++ includes/tutorial.pug | 297 ++++ index.html | 1509 --------------------- index.pug | 67 + jquery-2.1.3.min.js | 4 - 18 files changed, 1367 insertions(+), 1514 deletions(-) create mode 100644 GREETZ.nfo create mode 100644 build.sh rename helsinki.eot => includes/helsinki.eot (100%) rename helsinki.svg => includes/helsinki.svg (100%) rename helsinki.ttf => includes/helsinki.ttf (100%) rename helsinki.woff => includes/helsinki.woff (100%) rename helsinki.woff2 => includes/helsinki.woff2 (100%) rename {images => includes/images}/flag.png (100%) rename {images => includes/images}/graphics.psd (100%) rename {images => includes/images}/skull.png (100%) create mode 100644 includes/jquery-3.5.1.min.js create mode 100644 includes/script.js create mode 100644 includes/style.css create mode 100644 includes/tutorial.pug delete mode 100644 index.html create mode 100644 index.pug delete mode 100644 jquery-2.1.3.min.js diff --git a/.gitignore b/.gitignore index 0a9c0a7..abbb849 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ -images/Thumbs.db \ No newline at end of file +includes/images/Thumbs.db +/index.html +/.idea/ diff --git a/GREETZ.nfo b/GREETZ.nfo new file mode 100644 index 0000000..ce83d4b --- /dev/null +++ b/GREETZ.nfo @@ -0,0 +1,22 @@ +...................................................................... +a game by max bradbury +...................................................................... +inspired by minesweeper, tetris and 2048 +...................................................................... +gratz 'n' greetz go out to mum and dad, guy, titas, dan, nick, enrico, +ahona, robin, arielle, isy, thom, tom, olu, lovely dave, jen, ed, +david, andy, rachel, isaac, rory, 'partay' pat, al, ant, zoe, john, +charlie, wilkie, george +...................................................................... +HELLO's fly out to some cool game devs: porpentine, merritt kopas, +zoe quinn, aniwey, orteil +...................................................................... +i listened to a lot of keygenjukebox while coding this +...................................................................... +more games coming soon... keep your eyes peeled... peace! +...................................................................... +...................................................................... +...................................................................... +this story is dedicated to all those cyberpunks who fight against +injustice and corruption every day of their lives +...................................................................... diff --git a/build.sh b/build.sh new file mode 100644 index 0000000..3b9f7e6 --- /dev/null +++ b/build.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +pug index.pug diff --git a/helsinki.eot b/includes/helsinki.eot similarity index 100% rename from helsinki.eot rename to includes/helsinki.eot diff --git a/helsinki.svg b/includes/helsinki.svg similarity index 100% rename from helsinki.svg rename to includes/helsinki.svg diff --git a/helsinki.ttf b/includes/helsinki.ttf similarity index 100% rename from helsinki.ttf rename to includes/helsinki.ttf diff --git a/helsinki.woff b/includes/helsinki.woff similarity index 100% rename from helsinki.woff rename to includes/helsinki.woff diff --git a/helsinki.woff2 b/includes/helsinki.woff2 similarity index 100% rename from helsinki.woff2 rename to includes/helsinki.woff2 diff --git a/images/flag.png b/includes/images/flag.png similarity index 100% rename from images/flag.png rename to includes/images/flag.png diff --git a/images/graphics.psd b/includes/images/graphics.psd similarity index 100% rename from images/graphics.psd rename to includes/images/graphics.psd diff --git a/images/skull.png b/includes/images/skull.png similarity index 100% rename from images/skull.png rename to includes/images/skull.png diff --git a/includes/jquery-3.5.1.min.js b/includes/jquery-3.5.1.min.js new file mode 100644 index 0000000..b061403 --- /dev/null +++ b/includes/jquery-3.5.1.min.js @@ -0,0 +1,2 @@ +/*! jQuery v3.5.1 | (c) JS Foundation and other contributors | jquery.org/license */ +!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.5.1",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function D(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||j,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,j=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",y.option=!!ce.lastChild;var ge={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function qe(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function Le(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function He(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Oe(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Ut,Xt=[],Vt=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Xt.pop()||S.expando+"_"+Ct.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Vt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Vt,"$1"+r):!1!==e.jsonp&&(e.url+=(Et.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Xt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((Ut=E.implementation.createHTMLDocument("").body).innerHTML="
",2===Ut.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):("number"==typeof f.top&&(f.top+="px"),"number"==typeof f.left&&(f.left+="px"),c.css(f))}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=$e(y.pixelPosition,function(e,t){if(t)return t=Be(e,n),Me.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0'; + } else { + return '
  • '; + } +} + +function newRow() { + let row = '
      '; + + for (let i = 0; i < gameBoardWidth; i++) { + row += newTile(); + } + + row += '
    '; + + return row; +} + +function saveGame() { + if (typeof(Storage) === "undefined") { + return; + } + + // variables + localStorage.setItem("score", score); + localStorage.setItem("mineChance", mineChance); + + // game board + localStorage.setItem("gameBoard", $game.html()); +} + +function loadGame() { + // check if storage available and if saved game exists + if (typeof(Storage) === "undefined" || localStorage.getItem("gameBoard") === null) { + drawGameBoard(); + return; + } + + // variables + score = parseInt(localStorage.getItem("score")); + mineChance = parseFloat(localStorage.getItem("mineChance")); + firstClick = false; + + // game board + $game.html(localStorage.getItem("gameBoard")); + + gameBoardHeight = determineGameBoardHeight(); + + // add rows if there is empty space + while ($ul.length < gameBoardHeight) { + $game.append(newRow()); + } + + // remove any rows the screen cannot display + $('#game ul:gt(' + (gameBoardHeight - 1) + ')').remove(); + + refreshMineCounts(); + updateScore(); + updateMinesLeft(); + + // click blank tiles + $('li.revealed:not(.mine):empty').mouseup(); + + $('#setup').hide(); +} + +$.fn.check = function() { + // unclicked tiles + if ($(this).filter('li:not(.revealed):not(.flagged)').length > 0) { + return false; + } + + // incorrectly flagged tiles + if ($(this).filter('li.flagged:not(.mine)').length > 0) { + return false; + } + + // clicked mines + if ($(this).filter('li.revealed.mine').length > 0) { + return false; + } + + return true; +} + +$.fn.checkRow = function() { + return $(this).children().check(); +} + +$.fn.checkColumn = function() { + return $(this).column().check(); +} + +window.removeClearedRows = function() { + let rowsToRemove = $('ul:not(.removing)').filter(function() { + return $(this).checkRow(); + }); + + if (rowsToRemove.length > 0) { + suddenDeath(); + } + + rowsToRemove.each(function() { + score += $(this).children('.mine').length; + + $(this).addClass("removing"); + + $(this).slideUp("slow", function() { + // add new row on bottom + $(this).closest("div").append(newRow()); + + $(this).remove(); + + refreshMineCounts(); + + // click blank tiles + $('li.revealed:not(.mine):empty').mouseup(); + }); + }); +} + +window.removeClearedColumns = function() { + let columnsToRemove = $('ul:not(.removing):eq(0) li:not(.removing)').filter(function() { + return $(this).checkColumn(); + }); + + if (columnsToRemove.length > 0) { + suddenDeath(); + } + + columnsToRemove.each(function() { + score += $(this).column().filter('.mine').length; + + $(this).column().addClass("removing"); + + // animation for top row + deletion of column + $(this).animate({width: 0, borderRadius: 0, padding: 0}, "slow", function() { + $(this).column().remove(); + + $ul.each(function() { + $(this).append(newTile()); + }); + + refreshMineCounts(); + + // click blank tiles + $('li.revealed:not(.mine, .removing):empty').mouseup(); + }); + + // then just animation for others + $(this).column().animate({width: 0, borderRadius: 0, padding: 0}, "slow"); + }); +} + +function refreshMineCounts() { + $('ul:not(.removing) li.revealed:not(.mine, .removing)').each(function() { + let mineCount = $(this).countMinesText(); + + $(this).text(mineCount); + + // remove "mines1" etc + $(this).attr( + 'class', + $(this).attr('class').replace( + /mines[0-9]/, "mines" + mineCount + ) + ); + + $(this).removeClass("mines mines0"); + }); +} + +function updateScore() { + $('#score').text("Score: " + score); +} + +function isGameOver() { + return $ul.has('.mine.revealed').length === gameBoardHeight + && $ul.first().children().filter(function() { + return $(this).column().filter('.mine.revealed').length > 0; + }).length === gameBoardWidth; +} + +function checkGameOver() { + if (isGameOver()) { + $gameOver.show(); + + let currentHiScore = 0; + + if ($.isNumeric(localStorage.getItem("hiscore"))) { + currentHiScore = parseInt(localStorage.getItem("hiscore")); + } + + if (score > currentHiScore) { + currentHiScore = score; + } + + $('#gameOver .score').text(score); + $('#gameOver .hiscore').text(currentHiScore); + + // clear saved game + localStorage.clear(); + localStorage.setItem("hiscore", currentHiScore); + } +} + +function checkTutorial() { + if ($tutorial.is(':hidden')) { + return; + } + + let currentPage = $('#tutorial div:visible'); + + if ( + currentPage.find('.toFlag' ).length === currentPage.find('.toFlag.flagged' ).length + && currentPage.find('.toClick').length === currentPage.find('.toClick.revealed' ).length + && (currentPage.find('.flagAny' ).length === 0 || currentPage.find('.flagAny.flagged' ).length > 0) + && (currentPage.find('.clickAny').length === 0 || currentPage.find('.clickAny.revealed').length > 0) + ) { + currentPage.nextPage(); + } +} + +$.fn.nextPage = function() { + $('.gameBoard').html(""); + $(this).hide(); + + if ($(this).is(':last-child')) { + // end of tutorial! + $tutorial.hide(); + $('#setup, #game, #stats').show(); + $('#setup button.cancel').hide(); + + gameBoardWidth = 10; + gameBoardHeight = determineGameBoardHeight(); + } else { + $(this).next().show(); + $(this).next().children().show(); + + let nextPage = parseInt($(this).attr('id').replace("page", "")); + + $(this).next().children('.gameBoard').html(tutorialPages[nextPage]); + + if ($(this).next().children('.gameBoard').hasClass("clearRowsColumns")) { + removeClearedRows(); + removeClearedColumns(); + } + } +} + +function updateMinesLeft() { + // un-flagged mines - revealed mines - flagged not-mines + let count = $('.mine:not(.flagged)').length - $('.mine.revealed').length - $('li:not(.mine).flagged').length; + $('#mines').text("Mines left: " + count); +} + +function getAspectRatio() { + return $(window).width() / $(window).height(); +} + +function resizeToWindow() { + if (!viewportSizingAvailable) { + $('html').css('font-size', Math.min($(window).width(), $(window).height()) / 10); + } +} + +$.fn.updateMineCount = function() { + $(this).text( + $(this).countMinesText + ); +} + +$.fn.rowScore = function() { + return $(this).children('.mine').length; +} + +$.fn.rowAbove = function() { + return $(this).parent('ul').prev(); +} + +$.fn.rowBelow = function() { + return $(this).parent('ul').next(); +} + +$.fn.column = function() { + let x = $(this).getX(); + + let column = $(''); + + $ul.each(function() { + column = column.add($(this).children().eq(x)); + }); + + return column; +} + +window.oneColumnLeft = function() { + return $ul.first().children().filter(function() { + return $(this).column().filter('.mine:not(.revealed, .flagged)').length === 0; + }).length >= (gameBoardWidth - 1) +} + +window.oneRowLeft = function() { + return $ul.filter(function() { + return $(this).children('.mine:not(.revealed, .flagged)').length === 0; + }).length >= (gameBoardHeight - 1); +} + +window.isSuddenDeath = function() { + return oneRowLeft() && oneColumnLeft(); +} + +window.suddenDeath = function() { + if (isSuddenDeath()) { + mineChance += 0.03; + + // don't want the chance to get to 100% because that's completely predictable + // â…” chance is the most likely to create an unsolvable repeating pattern (xxoxxoxxo, etc.) + if (mineChance > 0.666) { + mineChance = 0.666; + } + } +} + +$.fn.getX = function() { + return $(this).index(); +} + +$.fn.getY = function() { + return $(this).parent('ul').index(); +} + +$.fn.isMine = function() { + return $(this).hasClass("mine"); +} + +$.fn.countMinesAdjacent = function() { + return $(this).getAdjacentTiles().filter('.mine').length; +} + +$.fn.getAdjacentTiles = function() { + let adjacentTiles = $(''); + let x = $(this).getX(); + let y = $(this).getY(); + + if (y > 0) { + let tileAbove = $(this).rowAbove().children().eq(x); + + adjacentTiles = adjacentTiles.add(tileAbove.prev()); + adjacentTiles = adjacentTiles.add(tileAbove ); + adjacentTiles = adjacentTiles.add(tileAbove.next()); + } + + adjacentTiles = adjacentTiles.add($(this).prev()); + adjacentTiles = adjacentTiles.add($(this).next()); + + if (y < (gameBoardHeight - 1)) { + let tileBelow = $(this).rowBelow().children().eq(x); + + adjacentTiles = adjacentTiles.add(tileBelow.prev()); + adjacentTiles = adjacentTiles.add(tileBelow ); + adjacentTiles = adjacentTiles.add(tileBelow.next()); + } + + return adjacentTiles; +} + +$.fn.countMinesText = function() { + return $(this).countMinesAdjacent().toString().replace("0", ""); +} + +function detachTutorials() { + // can't have several game boards in play at the same time + // because it messes with mine counts, row counts, etc. + tutorialPages = []; + + $('#tutorial .gameBoard').each(function() { + tutorialPages.push($(this).html()); + + $(this).html(""); + }); +} + +$.fn.cracktro = function() { + // trim long whitespaces to 1 space, remove line breaks, split to individual chars + let text = $(this).html().replace(/ +/g, " ").replace(/(\r\n|\n|\r)/gm, "").replace("&", "&").split(""); + let cracktro = ""; + + for (let i = 0; i < text.length; i++) { + cracktro += "" + text[i].replace(" ", " ") + ""; + } + + $(this).html(cracktro); +} + +$('#gameOver button').on("click", function() { + drawGameBoard(); + + $gameOver.hide(); + $buttonCancel.hide(); + $('button.start').removeAttr('style'); + $('#setup').show(); +}); + +$('button.reset').on("click", function() { + // prompt user with setup screen + $('#setup').show(); + $buttonCancel.show(); + $('button.start').css('left', '20vmin'); +}); + +$buttonCancel.on("click", function() { + // prompt user with setup screen + $('#setup').hide(); + $buttonCancel.hide(); + $('button.start').removeAttr('style'); +}); + +$('button.start').on("click", function() { + drawGameBoard(); + + // reset stats + firstClick = true; + + // set difficulty + if ($(this).hasClass("easy")) { + mineChance = 0.13; + } else if ($(this).hasClass("normal")) { + mineChance = 0.2; + } else if ($(this).hasClass("hard")) { + mineChance = 0.285; + } + + score = 0; + + updateScore(); + updateMinesLeft(); + + $('#setup').hide(); +}); + +$('button.tutorial').on("click", function() { + $tutorial.show(); + $tutorial.siblings().hide(); + + const $page1 = $('#page1'); + + $page1.show(); + $('#page1 *').show(); + $page1.siblings('div').hide(); + + $('#page1 .gameBoard').html(tutorialPages[0]); + + $game.html(""); + + gameBoardWidth = 5; + gameBoardHeight = 5; +}); + +$.fn.leftClick = function(automated) { + if (!automated) automated = false; + + // don't want first click to be a mine + if (firstClick) { + let x = $(this).getX(); + x = (x >= 1) ? x : 1; + x = (x <= gameBoardWidth - 2) ? x : gameBoardWidth - 2; + + let y = $(this).getY(); + y = (y >= 1) ? y : 1; + y = (y <= gameBoardHeight - 2) ? y : gameBoardHeight - 2; + + $ul.eq(y - 1).children().slice(x - 1).filter(':lt(3)').removeClass("mine"); + $ul.eq(y ).children().slice(x - 1).filter(':lt(3)').removeClass("mine"); + $ul.eq(y + 1).children().slice(x - 1).filter(':lt(3)').removeClass("mine"); + + firstClick = false; + } + + if ($(this).hasClass("flagged")) { + return; + } + + if ($(this).isMine()) { + $(this).addClass("revealed"); + } else if (!automated && parseInt($(this).text()) === $(this).getAdjacentTiles().filter('.flagged, .revealed.mine').length) { + // already clicked; use middle click reveal functionality + + // number of flags matches number of adjacent mines + $(this).getAdjacentTiles().filter(':not(.flagged, .revealed)').mouseup(); + } else { + $(this).addClass("revealed"); + $(this).updateMineCount(); + $(this).addClass("mines" + $(this).countMinesAdjacent()); + + // if no mines adjacent, cascade! + if (parseInt($(this).countMinesAdjacent()) === 0) { + $(this).getAdjacentTiles().filter(':not(.revealed)').mouseup(); + } + } + + firstClick = false; +} + +$.fn.middleClick = function() { + // number of flags matches number of adjacent mines + if (parseInt($(this).text()) === $(this).getAdjacentTiles().filter('.flagged, .revealed.mine').length) { + $(this).getAdjacentTiles().filter(':not(.flagged, .revealed)').mouseup(); + } +} + +$.fn.rightClick = function() { + if (!$(this).hasClass("revealed")) { + $(this).toggleClass("flagged"); + } + + clearTimeout(timeout); +} + +$(document).on("contextmenu", "body", function(event) { + event.preventDefault(); +}); + +$(document).on("mousedown touchstart", "li", function() { + let x = $(this).getX(); + let y = $(this).getY(); + + timeout = setTimeout(function() { + $('ul:eq(' + y + ') li:eq(' + x + ')').rightClick(); + + mouseHeld = true; + }, clickHoldMs); +}); + +$(document).on("mouseleave", "li", function() { + clearTimeout(timeout); +}); + +$(document).on("mouseup touchend", "li", function(event) { + event.preventDefault(); + + clearTimeout(timeout); + + if (mouseHeld) { + mouseHeld = false; + + // rightClick has already been called in a callback, so nothing to do here + } else { + switch (event.which) { + case 3: + $(this).rightClick(); + break; + case 2: + $(this).middleClick(); + break; + case 1: + $(this).leftClick(); + break; + default: + $(this).leftClick(true); // automated + break; + } + } + + checkTutorial(); + + if ($tutorial.is(':hidden')) { + removeClearedRows(); + removeClearedColumns(); + + saveGame(); + checkGameOver(); + + updateScore(); + updateMinesLeft(); + } +}); + +$(window).resize(resizeToWindow); + +resizeToWindow(); +detachTutorials(); + +// instantiate the game +loadGame(); // loadGame will draw the game board if no saved game is found + +$gameOver.hide(); +$tutorial.hide(); +$buttonCancel.hide(); + +$('#cracktro').cracktro(); diff --git a/includes/style.css b/includes/style.css new file mode 100644 index 0000000..f509862 --- /dev/null +++ b/includes/style.css @@ -0,0 +1,342 @@ +@font-face { + font-family: Helsinki; + src: url('helsinki.eot'); + src: url('helsinki.eot?#iefix') format('embedded-opentype'), + url('helsinki.woff2') format('woff2'), + url('helsinki.woff') format('woff'), + url('helsinki.ttf') format('truetype'), + url('helsinki.svg#helsinkiregular') format('svg'); + font-weight: normal; + font-style: normal; +} + +* { + box-sizing: border-box; + font-family: "Helsinki", sans-serif; +} + +html { + background-color: #272822; + margin: 0; + height: 100vh; + width: 100vw; + overflow: hidden; + -moz-user-select: none; + -webkit-user-select: none; + -ms-user-select: none; + user-select: none; +} + +body { + height: 100vh; + margin: 0 auto; + width: 100vmin; +} + +@keyframes scrollLeft { + from {left: 0;} + to {left: -7200vmin;} +} + +@keyframes bounce { + 0% {top: 0; left: 0;} + 50% {top: 12vmin; left: 2vmin;} + 100% {top: 0; left: 0;} +} + +@keyframes rainbow { + 0% {color: #c6fe7a;} + 33% {color: #7ac5fe;} + 67% {color: #fe7ac6;} + 100% {color: #c6fe7a;} /* back to start */ +} + +#cracktro { + color: #c6fe7a; + font-size: 6vmin; + height: 20vmin; + margin: 4vmin 0; + overflow: hidden; + white-space: nowrap; + width: 7200vmin; + + position: relative; + animation: scrollLeft 420s linear infinite; +} + +#cracktro span { + margin-right: 1vmin; + position: relative; + animation: bounce 4s infinite ease-in-out,rainbow 5s infinite; + text-shadow: 0.5vmin 0.5vmin black; +} + +#cracktro span:nth-child(10n+1) { + animation-delay: 0.4s; +} +#cracktro span:nth-child(10n+2) { + animation-delay: 0.8s; +} +#cracktro span:nth-child(10n+3) { + animation-delay: 1.2s; +} +#cracktro span:nth-child(10n+4) { + animation-delay: 1.6s; +} +#cracktro span:nth-child(10n+5) { + animation-delay: 2s; +} +#cracktro span:nth-child(10n+6) { + animation-delay: 2.4s; +} +#cracktro span:nth-child(10n+7) { + animation-delay: 2.8s; +} +#cracktro span:nth-child(10n+8) { + animation-delay: 3.2s; +} +#cracktro span:nth-child(10n+9) { + animation-delay: 3.6s; +} + +#game { + background-color: #1b1c17; + float: left; + margin: 0 auto; + height: 100%; + overflow: hidden; +} + +#stats { + height: 10vmin; + width: 100vmin; + float: left; + + background: #768087; + background: linear-gradient(to bottom, #768087 0%,#53595e 100%); +} + +#stats button { + margin: 1vmin; + float: right; + font-size: 3vmin; + border-radius: 2vmin; + padding: 1.75vmin; + box-shadow: 0.5vmin 0.5vmin 0 #000; + border: 0.4vmin solid #454e52; + position: relative; + top: auto; + left: auto; +} + +#stats div { + float: left; + font-size: 5.4vmin; + margin: 2vmin; + width: auto; +} + +#gameOver, #setup, #tutorial { + background-color: rgba(0, 0, 0, 0.6); + width: 100vmin; + height: 100vh; + overflow: hidden; + position: absolute; +} + +#gameOver .score { + margin-right: 12vmin; +} + +#setup h2 { + margin-top: 0; +} + +#setup h2, +#setup label { + margin: 4vmin 3.5vmin; + font-size: 6vmin; + color: #fe7ac6; + text-shadow: 0.5vmin 0.5vmin 0 #a4f4b4; /* x y blur-radius colour */ +} + +#tutorial .gameBoard { + float: left; + padding: 5vmin; + padding-top: 0; +} + +#tutorial p { + padding: 0 5vmin; +} + +.centre { + clear: both; + margin-top: 2vmin; + text-align: center; +} + +.subtitle { + text-align: center; +} + +button { + font-size: 6vmin; + border-radius: 2vmin; + padding: 2vmin; + margin: 0 auto; + box-shadow: 1vmin 1vmin 0 #000; + border: none; + + background: #768087; + background: linear-gradient(to bottom, #768087 0%,#53595e 100%); +} + +button.cancel { + right: 20vmin; + left: auto; +} + +button.donate { + background: #ffefa7; + background: linear-gradient(to bottom, #ffefa7 0%, #feae27 100%); +} + +button.twitter { + background: #51aaea; + background: linear-gradient(to bottom, #51aaea 0%,#3375a6 100%); +} + +form { + display: inline; +} + +h1, h2 { + text-align: center; +} + +h1 { + color: #a4f4b4; + font-size: 12vmin; + margin-top: 6vmin; + margin-bottom: 6vmin; + text-shadow: 1vmin 1vmin 0 #fe7ac6; /* x y blur-radius colour */ +} + +h2 { + color: #7ac5fe; + font-size: 6vmin; +} + +ul { + float: left; + clear: both; + height: 10vmin; + list-style-type: none; + padding: 0; + margin: 0; + overflow: hidden; +} + +li { + color: white; + font-size: 8vmin; + padding: 1vmin; + padding-top: 0.5vmin; + padding-bottom: 1.5vmin; + text-align: center; + vertical-align: middle; + float: left; + height: 10vmin; + width: 10vmin; + background-color: #454e52; + border-radius: 2vmin; + cursor: default; +} + +li.revealed { + background-color: #1b1c17; +} + +li:not(.revealed):hover { + background-color: #a0a9af; +} + +li.flagged { + background-color: #b5fe52; + background-image: url("includes/images/flag.png"); + background-size: 100% 100%; +} + +li.flagged:hover { + background-color: #c6fe7a; +} + +li.highlighted { + border: 1vmin solid #fe7ac6; + padding: 0; +} + +li.mine.revealed { + background-color: #d23000; + background-image: url("includes/images/skull.png"); + background-size: 100% 100%; +} + +li.mines1 { + color: #c6fe7a; +} + +li.mines2 { + color: #7ac5fe; +} + +li.mines3 { + color: #fe7ac6; +} + +li.mines4 { + color: #b17afe; +} + +li.mines5 { + color: #feb27a; +} + +li.mines6 { + color: #7afeb2; +} + +li.mines7 { + color: #d74600; +} + +li.mines8 { + color: #8c4600; +} + +p { + color: #fff; + font-size: 4.3vmin; + padding: 0 10vmin; +} + +strong { + color: #fe7ac6; +} + +table { + color: #fe7ac6; + font-size: 4vmin; + margin: 0 auto; + text-align: center; +} + +th, td { + width: 50%; +} + +td { + color: #fff; + font-size: 8vmin; +} diff --git a/includes/tutorial.pug b/includes/tutorial.pug new file mode 100644 index 0000000..4a85180 --- /dev/null +++ b/includes/tutorial.pug @@ -0,0 +1,297 @@ +

    tutorial

    + +
    +
    +
      +
    • +
    +
      +
    • 1
    • 1
    • +
    +
      +
    • 1
    • 2
    • 2
    • +
    +
      +
    • 1
    • 1
    • +
    +
      +
    • +
    +
    + +

    take a look at the highlighted tile.

    +

    the 2 means there are 2 mines next to it.

    +

    there are only 2 tiles next to it, so we know they are both mines.

    +

    right-click or press and hold to flag these mines.

    +
    + +
    +
    +
      +
    • +
    +
      +
    • 1
    • 1
    • +
    +
      +
    • 1
    • 2
    • 2
    • +
    +
      +
    • 1
    • 1
    • +
    +
      +
    • +
    +
    + +

    take a look at the next highlighted tile.

    +

    this also has 2 mines next to it- but we already know which ones are mines.

    +

    click or tap the other adjacent tiles to clear them.

    +
    + +
    +
    +
      +
    • +
    +
      +
    • 1
    • 1
    • 1
    • +
    +
      +
    • 1
    • 2
    • 2
    • 2
    • +
    +
      +
    • 1
    • 1
    • 1
    • +
    +
      +
    • +
    +
    + +

    there are some more tiles that are definitely not mines. clear these too.

    +

    if you click or tap a number, any unflagged adjacent tiles will be clicked.

    +

    this can save you a lot of time!

    +
    + +
    +
    +
      +
    • 1
    • 1
    • 1
    • 1
    • +
    +
      +
    • 1
    • 1
    • 1
    • +
    +
      +
    • 1
    • 2
    • 2
    • 2
    • +
    +
      +
    • 1
    • 1
    • 1
    • +
    +
      +
    • 1
    • 1
    • 1
    • 1
    • +
    +
    + +

    look at these 2 highlighted tiles.

    +

    the first has 1 mine next to it.

    +

    the second also has 1 mine next to it.

    +

    however, the second spans the same tiles as the first, plus one extra.

    +

    the extra tile the second tile spans cannot be a mine. clear it!

    +
    + +
    +
    +
      +
    • 1
    • 1
    • 1
    • 1
    • +
    +
      +
    • 1
    • 1
    • 1
    • 1
    • +
    +
      +
    • 1
    • 2
    • 2
    • 2
    • +
    +
      +
    • 1
    • 1
    • 1
    • 1
    • +
    +
      +
    • 1
    • 1
    • 1
    • 1
    • +
    +
    + +

    when you clear a tile with no adjacent mines, the surrounding tiles will all clear as well.

    +

    flag the remaining mines.

    +
    + +
    +
    +
      +
    • +
    • +
    • +
    • 2
    • +
    • +
    +
      +
    • +
    • +
    • +
    • 3
    • +
    • +
    +
      +
    • +
    • +
    • +
    • 3
    • +
    • +
    +
      +
    • 2
    • +
    • 3
    • +
    • 3
    • +
    • 4
    • +
    • +
    +
      +
    • +
    • +
    • +
    • +
    • 2
    • +
    +
    + +

    in this tutorial so far, the game board has been static.

    +

    but in endless mines, rows and columns slide away when cleared!

    +

    flag the highlighted tile to continue.

    +
    + +
    +
    +
      +
    • +
    • +
    • +
    • 2
    • +
    • +
    +
      +
    • +
    • +
    • +
    • 3
    • +
    • +
    +
      +
    • +
    • +
    • +
    • 3
    • +
    • +
    +
      +
    • 2
    • +
    • 3
    • +
    • 3
    • +
    • 4
    • +
    • +
    +
      +
    • +
    • +
    • +
    • +
    • 2
    • +
    +
    + +

    in this tutorial so far, the game board has been static.

    +

    but in endless mines, rows and columns slide away when cleared!

    +

    flag the highlighted tile to continue.

    +
    + +
    +
    +
      +
    • +
    • +
    • +
    • 2
    • +
    • +
    +
      +
    • +
    • +
    • +
    • 3
    • +
    • +
    +
      +
    • 2
    • +
    • 3
    • +
    • 3
    • +
    • 4
    • +
    • +
    +
      +
    • +
    • +
    • +
    • +
    • 2
    • +
    +
      +
    • +
    +
    + +

    a new row has appeared at the bottom.

    +

    notice how you can't clear any columns now!

    +
    +

    flag the remaining mines to continue.

    +
    + +
    +
    +
    +
    +
    • 2
    • 4
    • 4
    • 7
    +
    +
    +
    + +

    look at the highlighted tile.

    +

    it has 7 adjacent mines and 7 adjacent tiles.

    +

    flag the 7 adjacent mines.

    +
    + +
    +
    +
    +
    +
    • 2
    • 4
    • 4
    • 7
    +
    +
    +
    + +

    oh no! we've lost all our hints!

    +

    sometimes it's best to wait before clearing a row.

    +
    +

    the best we can do is guess now.

    +

    click any tile to continue.

    +
    + +
    +
    +
    +
    • 1
    • 1
    +
    +
    • 3
    • 3
    • 3
    +
    • 3
    +
    + +

    sorry! I feel bad leading you into a trap like that!

    +

    but I think mistakes are a good way to learn.

    +

    this is the end of the tutorial for now. I hope it has helped in some way.

    +

    have fun!

    +
    \ No newline at end of file diff --git a/index.html b/index.html deleted file mode 100644 index 2381e99..0000000 --- a/index.html +++ /dev/null @@ -1,1509 +0,0 @@ - - - - endless mines - - - - - - -
    -
    Score: 0
    -
    Mines left: 0
    - -
    -
    -
    -

    game over

    - - - - - - - - - - - - -
    scorepersonal best
    - -
    - ...................................................................... - a game by max bradbury - ...................................................................... - inspired by minesweeper, tetris and 2048 - ...................................................................... - gratz 'n' greetz go out to mum and dad, guy, titas, dan, nick, enrico, - ahona, robin, arielle, isy, thom, tom, olu, lovely dave, jen, ed, - david, andy, rachel, isaac, rory, 'partay' pat, al, ant, zoe, john, - charlie, wilkie, george - ...................................................................... - HELLO's fly out to some cool game devs: porpentine, merritt kopas, - zoe quinn, aniwey, orteil - ...................................................................... - i listened to a lot of keygenjukebox while coding this - ...................................................................... - more games coming soon... keep your eyes peeled... peace! - ...................................................................... - ...................................................................... - ...................................................................... - this story is dedicated to all those cyberpunks who fight against - injustice and corruption every day of their lives - ...................................................................... -
    - -
    -
    - - - - - -
    -
    - -
    -
    - -
    - -
    -
    -
    -

    endless mines

    - -

    ruin 2015

    - -

    - left click or tap to clear a tile.
    - right click or hold to flag a mine.
    - rows and columns with exploded mines cannot be cleared. -

    - -

    Start game

    - -
    - - - -
    - -
    - - -
    -
    -
    -

    tutorial

    - -
    -
    -
      -
    • -
    -
      -
    • 1
    • 1
    • -
    -
      -
    • 1
    • 2
    • 2
    • -
    -
      -
    • 1
    • 1
    • -
    -
      -
    • -
    -
    - -

    take a look at the highlighted tile.

    -

    the 2 means there are 2 mines next to it.

    -

    there are only 2 tiles next to it, so we know they are both mines.

    -

    right-click or press and hold to flag these mines.

    -
    - -
    -
    -
      -
    • -
    -
      -
    • 1
    • 1
    • -
    -
      -
    • 1
    • 2
    • 2
    • -
    -
      -
    • 1
    • 1
    • -
    -
      -
    • -
    -
    - -

    take a look at the next highlighted tile.

    -

    this also has 2 mines next to it- but we already know which ones are mines.

    -

    click or tap the other adjacent tiles to clear them.

    -
    - -
    -
    -
      -
    • -
    -
      -
    • 1
    • 1
    • 1
    • -
    -
      -
    • 1
    • 2
    • 2
    • 2
    • -
    -
      -
    • 1
    • 1
    • 1
    • -
    -
      -
    • -
    -
    - -

    there are some more tiles that are definitely not mines. clear these too.

    -

    if you click or tap a number, any unflagged adjacent tiles will be clicked.

    -

    this can save you a lot of time!

    -
    - -
    -
    -
      -
    • 1
    • 1
    • 1
    • 1
    • -
    -
      -
    • 1
    • 1
    • 1
    • -
    -
      -
    • 1
    • 2
    • 2
    • 2
    • -
    -
      -
    • 1
    • 1
    • 1
    • -
    -
      -
    • 1
    • 1
    • 1
    • 1
    • -
    -
    - -

    look at these 2 highlighted tiles.

    -

    the first has 1 mine next to it.

    -

    the second also has 1 mine next to it.

    -

    however, the second spans the same tiles as the first, plus one extra.

    -

    the extra tile the second tile spans cannot be a mine. clear it!

    -
    - -
    -
    -
      -
    • 1
    • 1
    • 1
    • 1
    • -
    -
      -
    • 1
    • 1
    • 1
    • 1
    • -
    -
      -
    • 1
    • 2
    • 2
    • 2
    • -
    -
      -
    • 1
    • 1
    • 1
    • 1
    • -
    -
      -
    • 1
    • 1
    • 1
    • 1
    • -
    -
    - -

    when you clear a tile with no adjacent mines, the surrounding tiles will all clear as well.

    -

    flag the remaining mines.

    -
    - -
    -
    -
      -
    • -
    • -
    • -
    • 2
    • -
    • -
    -
      -
    • -
    • -
    • -
    • 3
    • -
    • -
    -
      -
    • -
    • -
    • -
    • 3
    • -
    • -
    -
      -
    • 2
    • -
    • 3
    • -
    • 3
    • -
    • 4
    • -
    • -
    -
      -
    • -
    • -
    • -
    • -
    • 2
    • -
    -
    - -

    in this tutorial so far, the game board has been static.

    -

    but in endless mines, rows and columns slide away when cleared!

    -

    flag the highlighted tile to continue.

    -
    - -
    -
    -
      -
    • -
    • -
    • -
    • 2
    • -
    • -
    -
      -
    • -
    • -
    • -
    • 3
    • -
    • -
    -
      -
    • -
    • -
    • -
    • 3
    • -
    • -
    -
      -
    • 2
    • -
    • 3
    • -
    • 3
    • -
    • 4
    • -
    • -
    -
      -
    • -
    • -
    • -
    • -
    • 2
    • -
    -
    - -

    in this tutorial so far, the game board has been static.

    -

    but in endless mines, rows and columns slide away when cleared!

    -

    flag the highlighted tile to continue.

    -
    - -
    -
    -
      -
    • -
    • -
    • -
    • 2
    • -
    • -
    -
      -
    • -
    • -
    • -
    • 3
    • -
    • -
    -
      -
    • 2
    • -
    • 3
    • -
    • 3
    • -
    • 4
    • -
    • -
    -
      -
    • -
    • -
    • -
    • -
    • 2
    • -
    -
      -
    • -
    -
    - -

    a new row has appeared at the bottom.

    -

    notice how you can't clear any columns now!

    -
    -

    flag the remaining mines to continue.

    -
    - -
    -
    -
    -
    -
    • 2
    • 4
    • 4
    • 7
    -
    -
    -
    - -

    look at the highlighted tile.

    -

    it has 7 adjacent mines and 7 adjacent tiles.

    -

    flag the 7 adjacent mines.

    -
    - -
    -
    -
    -
    -
    • 2
    • 4
    • 4
    • 7
    -
    -
    -
    - -

    oh no! we've lost all our hints!

    -

    sometimes it's best to wait before clearing a row.

    -
    -

    the best we can do is guess now.

    -

    click any tile to continue.

    -
    - -
    -
    -
    -
    • 1
    • 1
    -
    -
    • 3
    • 3
    • 3
    -
    • 3
    -
    - -

    sorry! I feel bad leading you into a trap like that!

    -

    but I think mistakes are a good way to learn.

    -

    this is the end of the tutorial for now. I hope it has helped in some way.

    -

    have fun!

    -
    -
    - - \ No newline at end of file diff --git a/index.pug b/index.pug new file mode 100644 index 0000000..305f698 --- /dev/null +++ b/index.pug @@ -0,0 +1,67 @@ +doctype html + +html(lang="en-gb") + head + meta(charset="utf-8") + title endless mines + style + include includes/style.css + body + #stats + #score Score: 0 + #mines Mines left: 0 + button.reset reset + + #game + + #gameOver + h1 game over + + table + thead + tr + th score + th personal best + tbody + tr + td.score + td.hiscore + + #cracktro + include GREETZ.nfo + + .centre + form(action="https:// twitter.com/synth_ruiner" target="_blank") + button.twitter say hi + + .centre + button play again + + #setup + h1 endless mines + + p.subtitle ruin, 2015 + + p. + left click or tap to clear a tile.
    + right click or hold to flag a mine.
    + rows and columns with exploded mines cannot be cleared. + + h2 Start game + + .centre + button.start.easy easy + button.start.normal normal + button.start.hard hard + + .centre + button.tutorial tutorial + button.cancel cancel + + #tutorial + include includes/tutorial + + script + include includes/jquery-3.5.1.min.js + script + include includes/script.js diff --git a/jquery-2.1.3.min.js b/jquery-2.1.3.min.js deleted file mode 100644 index 25714ed..0000000 --- a/jquery-2.1.3.min.js +++ /dev/null @@ -1,4 +0,0 @@ -/*! jQuery v2.1.3 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */ -!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l=a.document,m="2.1.3",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(n.isPlainObject(d)||(e=n.isArray(d)))?(e?(e=!1,f=c&&n.isArray(c)?c:[]):f=c&&n.isPlainObject(c)?c:{},g[b]=n.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){return!n.isArray(a)&&a-parseFloat(a)+1>=0},isPlainObject:function(a){return"object"!==n.type(a)||a.nodeType||n.isWindow(a)?!1:a.constructor&&!j.call(a.constructor.prototype,"isPrototypeOf")?!1:!0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=n.trim(a),a&&(1===a.indexOf("use strict")?(b=l.createElement("script"),b.text=a,l.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:g.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(c=a[b],b=a,a=c),n.isFunction(a)?(e=d.call(arguments,2),f=function(){return a.apply(b||this,e.concat(d.call(arguments)))},f.guid=a.guid=a.guid||n.guid++,f):void 0},now:Date.now,support:k}),n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=hb(),z=hb(),A=hb(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N=M.replace("w","w#"),O="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+N+"))|)"+L+"*\\]",P=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+O+")*)|.*)\\)|)",Q=new RegExp(L+"+","g"),R=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),S=new RegExp("^"+L+"*,"+L+"*"),T=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),U=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),V=new RegExp(P),W=new RegExp("^"+N+"$"),X={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+O),PSEUDO:new RegExp("^"+P),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ab=/[+~]/,bb=/'|\\/g,cb=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),db=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},eb=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(fb){H={apply:E.length?function(a,b){G.apply(a,I.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function gb(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],k=b.nodeType,"string"!=typeof a||!a||1!==k&&9!==k&&11!==k)return d;if(!e&&p){if(11!==k&&(f=_.exec(a)))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return H.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName)return H.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=1!==k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(bb,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+rb(o[l]);w=ab.test(a)&&pb(b.parentNode)||b,x=o.join(",")}if(x)try{return H.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function hb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ib(a){return a[u]=!0,a}function jb(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function kb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function lb(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||C)-(~a.sourceIndex||C);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function mb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function nb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function ob(a){return ib(function(b){return b=+b,ib(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function pb(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=gb.support={},f=gb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=gb.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=g.documentElement,e=g.defaultView,e&&e!==e.top&&(e.addEventListener?e.addEventListener("unload",eb,!1):e.attachEvent&&e.attachEvent("onunload",eb)),p=!f(g),c.attributes=jb(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=jb(function(a){return a.appendChild(g.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(g.getElementsByClassName),c.getById=jb(function(a){return o.appendChild(a).id=u,!g.getElementsByName||!g.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(g.querySelectorAll))&&(jb(function(a){o.appendChild(a).innerHTML="",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+L+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+L+"*(?:value|"+K+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),jb(function(a){var b=g.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+L+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&jb(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",P)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===g||a.ownerDocument===v&&t(v,a)?-1:b===g||b.ownerDocument===v&&t(v,b)?1:k?J(k,a)-J(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,h=[a],i=[b];if(!e||!f)return a===g?-1:b===g?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return lb(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?lb(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},g):n},gb.matches=function(a,b){return gb(a,null,null,b)},gb.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return gb(b,n,null,[a]).length>0},gb.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},gb.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&D.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},gb.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},gb.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=gb.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=gb.selectors={cacheLength:50,createPseudo:ib,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(cb,db),a[3]=(a[3]||a[4]||a[5]||"").replace(cb,db),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||gb.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&gb.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(cb,db).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+L+")"+a+"("+L+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=gb.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(Q," ")+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||gb.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ib(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=J(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ib(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?ib(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ib(function(a){return function(b){return gb(a,b).length>0}}),contains:ib(function(a){return a=a.replace(cb,db),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ib(function(a){return W.test(a||"")||gb.error("unsupported lang: "+a),a=a.replace(cb,db).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:ob(function(){return[0]}),last:ob(function(a,b){return[b-1]}),eq:ob(function(a,b,c){return[0>c?c+b:c]}),even:ob(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:ob(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:ob(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:ob(function(a,b,c){for(var d=0>c?c+b:c;++db;b++)d+=a[b].value;return d}function sb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function tb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function ub(a,b,c){for(var d=0,e=b.length;e>d;d++)gb(a,b[d],c);return c}function vb(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function wb(a,b,c,d,e,f){return d&&!d[u]&&(d=wb(d)),e&&!e[u]&&(e=wb(e,f)),ib(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ub(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:vb(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=vb(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?J(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=vb(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function xb(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=sb(function(a){return a===b},h,!0),l=sb(function(a){return J(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[sb(tb(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return wb(i>1&&tb(m),i>1&&rb(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&xb(a.slice(i,e)),f>e&&xb(a=a.slice(e)),f>e&&rb(a))}m.push(c)}return tb(m)}function yb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=F.call(i));s=vb(s)}H.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&gb.uniqueSort(i)}return k&&(w=v,j=t),r};return c?ib(f):f}return h=gb.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=xb(b[c]),f[u]?d.push(f):e.push(f);f=A(a,yb(e,d)),f.selector=a}return f},i=gb.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(cb,db),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(cb,db),ab.test(j[0].type)&&pb(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&rb(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,ab.test(a)&&pb(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=jb(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),jb(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||kb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&jb(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||kb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),jb(function(a){return null==a.getAttribute("disabled")})||kb(K,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),gb}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=n.expr.match.needsContext,v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;function x(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(w.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return g.call(b,a)>=0!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;c>b;b++)if(n.contains(e[b],this))return!0}));for(b=0;c>b;b++)n.find(a,e[b],d);return d=this.pushStack(c>1?n.unique(d):d),d.selector=this.selector?this.selector+" "+a:a,d},filter:function(a){return this.pushStack(x(this,a||[],!1))},not:function(a){return this.pushStack(x(this,a||[],!0))},is:function(a){return!!x(this,"string"==typeof a&&u.test(a)?n(a):a||[],!1).length}});var y,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=n.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||y).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:l,!0)),v.test(c[1])&&n.isPlainObject(b))for(c in b)n.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}return d=l.getElementById(c[2]),d&&d.parentNode&&(this.length=1,this[0]=d),this.context=l,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?"undefined"!=typeof y.ready?y.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};A.prototype=n.fn,y=n(l);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};n.extend({dir:function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&n(a).is(c))break;d.push(a)}return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),n.fn.extend({has:function(a){var b=n(a,this),c=b.length;return this.filter(function(){for(var a=0;c>a;a++)if(n.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=u.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.unique(f):f)},index:function(a){return a?"string"==typeof a?g.call(n(a),this[0]):g.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){while((a=a[b])&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(a.firstChild)},contents:function(a){return a.contentDocument||n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(C[a]||n.unique(e),B.test(a)&&e.reverse()),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return n.each(a.match(E)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):n.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(b=a.memory&&l,c=!0,g=e||0,e=0,f=h.length,d=!0;h&&f>g;g++)if(h[g].apply(l[0],l[1])===!1&&a.stopOnFalse){b=!1;break}d=!1,h&&(i?i.length&&j(i.shift()):b?h=[]:k.disable())},k={add:function(){if(h){var c=h.length;!function g(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&g(c)})}(arguments),d?f=h.length:b&&(e=c,j(b))}return this},remove:function(){return h&&n.each(arguments,function(a,b){var c;while((c=n.inArray(b,h,c))>-1)h.splice(c,1),d&&(f>=c&&f--,g>=c&&g--)}),this},has:function(a){return a?n.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],f=0,this},disable:function(){return h=i=b=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,b||k.disable(),this},locked:function(){return!i},fireWith:function(a,b){return!h||c&&!i||(b=b||[],b=[a,b.slice?b.slice():b],d?i.push(b):j(b)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!c}};return k},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&n.isFunction(a.promise)?e:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){(a===!0?--n.readyWait:n.isReady)||(n.isReady=!0,a!==!0&&--n.readyWait>0||(H.resolveWith(l,[n]),n.fn.triggerHandler&&(n(l).triggerHandler("ready"),n(l).off("ready"))))}});function I(){l.removeEventListener("DOMContentLoaded",I,!1),a.removeEventListener("load",I,!1),n.ready()}n.ready.promise=function(b){return H||(H=n.Deferred(),"complete"===l.readyState?setTimeout(n.ready):(l.addEventListener("DOMContentLoaded",I,!1),a.addEventListener("load",I,!1))),H.promise(b)},n.ready.promise();var J=n.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)n.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f};n.acceptData=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function K(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=n.expando+K.uid++}K.uid=1,K.accepts=n.acceptData,K.prototype={key:function(a){if(!K.accepts(a))return 0;var b={},c=a[this.expando];if(!c){c=K.uid++;try{b[this.expando]={value:c},Object.defineProperties(a,b)}catch(d){b[this.expando]=c,n.extend(a,b)}}return this.cache[c]||(this.cache[c]={}),c},set:function(a,b,c){var d,e=this.key(a),f=this.cache[e];if("string"==typeof b)f[b]=c;else if(n.isEmptyObject(f))n.extend(this.cache[e],b);else for(d in b)f[d]=b[d];return f},get:function(a,b){var c=this.cache[this.key(a)];return void 0===b?c:c[b]},access:function(a,b,c){var d;return void 0===b||b&&"string"==typeof b&&void 0===c?(d=this.get(a,b),void 0!==d?d:this.get(a,n.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d,e,f=this.key(a),g=this.cache[f];if(void 0===b)this.cache[f]={};else{n.isArray(b)?d=b.concat(b.map(n.camelCase)):(e=n.camelCase(b),b in g?d=[b,e]:(d=e,d=d in g?[d]:d.match(E)||[])),c=d.length;while(c--)delete g[d[c]]}},hasData:function(a){return!n.isEmptyObject(this.cache[a[this.expando]]||{})},discard:function(a){a[this.expando]&&delete this.cache[a[this.expando]]}};var L=new K,M=new K,N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(O,"-$1").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}M.set(a,b,c)}else c=void 0;return c}n.extend({hasData:function(a){return M.hasData(a)||L.hasData(a)},data:function(a,b,c){return M.access(a,b,c) -},removeData:function(a,b){M.remove(a,b)},_data:function(a,b,c){return L.access(a,b,c)},_removeData:function(a,b){L.remove(a,b)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=M.get(f),1===f.nodeType&&!L.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),P(f,d,e[d])));L.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){M.set(this,a)}):J(this,function(b){var c,d=n.camelCase(a);if(f&&void 0===b){if(c=M.get(f,a),void 0!==c)return c;if(c=M.get(f,d),void 0!==c)return c;if(c=P(f,d,void 0),void 0!==c)return c}else this.each(function(){var c=M.get(this,d);M.set(this,d,b),-1!==a.indexOf("-")&&void 0!==c&&M.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){M.remove(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=L.get(a,b),c&&(!d||n.isArray(c)?d=L.access(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return L.get(a,c)||L.access(a,c,{empty:n.Callbacks("once memory").add(function(){L.remove(a,[b+"queue",c])})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.lengthx",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var U="undefined";k.focusinBubbles="onfocusin"in a;var V=/^key/,W=/^(?:mouse|pointer|contextmenu)|click/,X=/^(?:focusinfocus|focusoutblur)$/,Y=/^([^.]*)(?:\.(.+)|)$/;function Z(){return!0}function $(){return!1}function _(){try{return l.activeElement}catch(a){}}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.get(a);if(r){c.handler&&(f=c,c=f.handler,e=f.selector),c.guid||(c.guid=n.guid++),(i=r.events)||(i=r.events={}),(g=r.handle)||(g=r.handle=function(b){return typeof n!==U&&n.event.triggered!==b.type?n.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(E)||[""],j=b.length;while(j--)h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o&&(l=n.event.special[o]||{},o=(e?l.delegateType:l.bindType)||o,l=n.event.special[o]||{},k=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},f),(m=i[o])||(m=i[o]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,p,g)!==!1||a.addEventListener&&a.addEventListener(o,g,!1)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),n.event.global[o]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.hasData(a)&&L.get(a);if(r&&(i=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=Y.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=i[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&q!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete i[o])}else for(o in i)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(i)&&(delete r.handle,L.remove(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,m,o,p=[d||l],q=j.call(b,"type")?b.type:b,r=j.call(b,"namespace")?b.namespace.split("."):[];if(g=h=d=d||l,3!==d.nodeType&&8!==d.nodeType&&!X.test(q+n.event.triggered)&&(q.indexOf(".")>=0&&(r=q.split("."),q=r.shift(),r.sort()),k=q.indexOf(":")<0&&"on"+q,b=b[n.expando]?b:new n.Event(q,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=r.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+r.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:n.makeArray(c,[b]),o=n.event.special[q]||{},e||!o.trigger||o.trigger.apply(d,c)!==!1)){if(!e&&!o.noBubble&&!n.isWindow(d)){for(i=o.delegateType||q,X.test(i+q)||(g=g.parentNode);g;g=g.parentNode)p.push(g),h=g;h===(d.ownerDocument||l)&&p.push(h.defaultView||h.parentWindow||a)}f=0;while((g=p[f++])&&!b.isPropagationStopped())b.type=f>1?i:o.bindType||q,m=(L.get(g,"events")||{})[b.type]&&L.get(g,"handle"),m&&m.apply(g,c),m=k&&g[k],m&&m.apply&&n.acceptData(g)&&(b.result=m.apply(g,c),b.result===!1&&b.preventDefault());return b.type=q,e||b.isDefaultPrevented()||o._default&&o._default.apply(p.pop(),c)!==!1||!n.acceptData(d)||k&&n.isFunction(d[q])&&!n.isWindow(d)&&(h=d[k],h&&(d[k]=null),n.event.triggered=q,d[q](),n.event.triggered=void 0,h&&(d[k]=h)),b.result}},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(L.get(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(g.namespace))&&(a.handleObj=g,a.data=g.data,e=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==e&&(a.result=e)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!==this;i=i.parentNode||this)if(i.disabled!==!0||"click"!==a.type){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?n(e,this).index(i)>=0:n.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h]*)\/>/gi,bb=/<([\w:]+)/,cb=/<|&#?\w+;/,db=/<(?:script|style|link)/i,eb=/checked\s*(?:[^=]|=\s*.checked.)/i,fb=/^$|\/(?:java|ecma)script/i,gb=/^true\/(.*)/,hb=/^\s*\s*$/g,ib={option:[1,""],thead:[1,"","
    "],col:[2,"","
    "],tr:[2,"","
    "],td:[3,"","
    "],_default:[0,"",""]};ib.optgroup=ib.option,ib.tbody=ib.tfoot=ib.colgroup=ib.caption=ib.thead,ib.th=ib.td;function jb(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function kb(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function lb(a){var b=gb.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function mb(a,b){for(var c=0,d=a.length;d>c;c++)L.set(a[c],"globalEval",!b||L.get(b[c],"globalEval"))}function nb(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(L.hasData(a)&&(f=L.access(a),g=L.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)n.event.add(b,e,j[e][c])}M.hasData(a)&&(h=M.access(a),i=n.extend({},h),M.set(b,i))}}function ob(a,b){var c=a.getElementsByTagName?a.getElementsByTagName(b||"*"):a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&n.nodeName(a,b)?n.merge([a],c):c}function pb(a,b){var c=b.nodeName.toLowerCase();"input"===c&&T.test(a.type)?b.checked=a.checked:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}n.extend({clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=n.contains(a.ownerDocument,a);if(!(k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(g=ob(h),f=ob(a),d=0,e=f.length;e>d;d++)pb(f[d],g[d]);if(b)if(c)for(f=f||ob(a),g=g||ob(h),d=0,e=f.length;e>d;d++)nb(f[d],g[d]);else nb(a,h);return g=ob(h,"script"),g.length>0&&mb(g,!i&&ob(a,"script")),h},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,k=b.createDocumentFragment(),l=[],m=0,o=a.length;o>m;m++)if(e=a[m],e||0===e)if("object"===n.type(e))n.merge(l,e.nodeType?[e]:e);else if(cb.test(e)){f=f||k.appendChild(b.createElement("div")),g=(bb.exec(e)||["",""])[1].toLowerCase(),h=ib[g]||ib._default,f.innerHTML=h[1]+e.replace(ab,"<$1>")+h[2],j=h[0];while(j--)f=f.lastChild;n.merge(l,f.childNodes),f=k.firstChild,f.textContent=""}else l.push(b.createTextNode(e));k.textContent="",m=0;while(e=l[m++])if((!d||-1===n.inArray(e,d))&&(i=n.contains(e.ownerDocument,e),f=ob(k.appendChild(e),"script"),i&&mb(f),c)){j=0;while(e=f[j++])fb.test(e.type||"")&&c.push(e)}return k},cleanData:function(a){for(var b,c,d,e,f=n.event.special,g=0;void 0!==(c=a[g]);g++){if(n.acceptData(c)&&(e=c[L.expando],e&&(b=L.cache[e]))){if(b.events)for(d in b.events)f[d]?n.event.remove(c,d):n.removeEvent(c,d,b.handle);L.cache[e]&&delete L.cache[e]}delete M.cache[c[M.expando]]}}}),n.fn.extend({text:function(a){return J(this,function(a){return void 0===a?n.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=a)})},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=jb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?n.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||n.cleanData(ob(c)),c.parentNode&&(b&&n.contains(c.ownerDocument,c)&&mb(ob(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(n.cleanData(ob(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return J(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!db.test(a)&&!ib[(bb.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(ab,"<$1>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(ob(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,n.cleanData(ob(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,m=this,o=l-1,p=a[0],q=n.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&eb.test(p))return this.each(function(c){var d=m.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(c=n.buildFragment(a,this[0].ownerDocument,!1,this),d=c.firstChild,1===c.childNodes.length&&(c=d),d)){for(f=n.map(ob(c,"script"),kb),g=f.length;l>j;j++)h=c,j!==o&&(h=n.clone(h,!0,!0),g&&n.merge(f,ob(h,"script"))),b.call(this[j],h,j);if(g)for(i=f[f.length-1].ownerDocument,n.map(f,lb),j=0;g>j;j++)h=f[j],fb.test(h.type||"")&&!L.access(h,"globalEval")&&n.contains(i,h)&&(h.src?n._evalUrl&&n._evalUrl(h.src):n.globalEval(h.textContent.replace(hb,"")))}return this}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=[],e=n(a),g=e.length-1,h=0;g>=h;h++)c=h===g?this:this.clone(!0),n(e[h])[b](c),f.apply(d,c.get());return this.pushStack(d)}});var qb,rb={};function sb(b,c){var d,e=n(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:n.css(e[0],"display");return e.detach(),f}function tb(a){var b=l,c=rb[a];return c||(c=sb(a,b),"none"!==c&&c||(qb=(qb||n("