├── etc ├── ssh │ └── sshd_config ├── lighttpd │ ├── lighttpd-password │ └── lighttpd.conf └── tor │ └── torrc ├── .gitignore ├── service ├── tor │ └── run ├── openssh │ └── run ├── lighttpd │ └── run └── hostname │ └── run ├── .dockerignore ├── screenshot.png ├── www ├── bower_components │ └── jquery │ │ ├── src │ │ ├── var │ │ │ ├── arr.js │ │ │ ├── document.js │ │ │ ├── getProto.js │ │ │ ├── push.js │ │ │ ├── slice.js │ │ │ ├── class2type.js │ │ │ ├── concat.js │ │ │ ├── indexOf.js │ │ │ ├── pnum.js │ │ │ ├── fnToString.js │ │ │ ├── hasOwn.js │ │ │ ├── toString.js │ │ │ ├── documentElement.js │ │ │ ├── support.js │ │ │ ├── ObjectFunctionString.js │ │ │ ├── rcssNum.js │ │ │ └── rnothtmlwhite.js │ │ ├── selector.js │ │ ├── ajax │ │ │ ├── var │ │ │ │ ├── rquery.js │ │ │ │ ├── location.js │ │ │ │ └── nonce.js │ │ │ ├── parseXML.js │ │ │ ├── script.js │ │ │ ├── load.js │ │ │ ├── jsonp.js │ │ │ └── xhr.js │ │ ├── css │ │ │ ├── var │ │ │ │ ├── rmargin.js │ │ │ │ ├── cssExpand.js │ │ │ │ ├── rnumnonpx.js │ │ │ │ ├── getStyles.js │ │ │ │ ├── swap.js │ │ │ │ └── isHiddenWithinTree.js │ │ │ ├── hiddenVisibleSelectors.js │ │ │ ├── addGetHookIf.js │ │ │ ├── curCSS.js │ │ │ ├── adjustCSS.js │ │ │ ├── support.js │ │ │ └── showHide.js │ │ ├── data │ │ │ ├── var │ │ │ │ ├── dataPriv.js │ │ │ │ ├── dataUser.js │ │ │ │ └── acceptData.js │ │ │ └── Data.js │ │ ├── manipulation │ │ │ ├── var │ │ │ │ ├── rcheckableType.js │ │ │ │ ├── rscriptType.js │ │ │ │ └── rtagName.js │ │ │ ├── _evalUrl.js │ │ │ ├── setGlobalEval.js │ │ │ ├── getAll.js │ │ │ ├── wrapMap.js │ │ │ ├── support.js │ │ │ └── buildFragment.js │ │ ├── traversing │ │ │ ├── var │ │ │ │ ├── rneedsContext.js │ │ │ │ ├── siblings.js │ │ │ │ └── dir.js │ │ │ └── findFilter.js │ │ ├── core │ │ │ ├── var │ │ │ │ └── rsingleTag.js │ │ │ ├── readyException.js │ │ │ ├── DOMEval.js │ │ │ ├── stripAndCollapse.js │ │ │ ├── support.js │ │ │ ├── access.js │ │ │ ├── parseHTML.js │ │ │ ├── ready.js │ │ │ ├── ready-no-deferred.js │ │ │ └── init.js │ │ ├── event │ │ │ ├── support.js │ │ │ ├── ajax.js │ │ │ ├── alias.js │ │ │ ├── focusin.js │ │ │ └── trigger.js │ │ ├── attributes.js │ │ ├── effects │ │ │ ├── animatedSelector.js │ │ │ └── Tween.js │ │ ├── .eslintrc.json │ │ ├── selector-sizzle.js │ │ ├── deprecated.js │ │ ├── deferred │ │ │ └── exceptionHook.js │ │ ├── queue │ │ │ └── delay.js │ │ ├── exports │ │ │ ├── global.js │ │ │ └── amd.js │ │ ├── jquery.js │ │ ├── attributes │ │ │ ├── support.js │ │ │ ├── prop.js │ │ │ ├── attr.js │ │ │ ├── val.js │ │ │ └── classes.js │ │ ├── wrap.js │ │ ├── dimensions.js │ │ ├── serialize.js │ │ ├── queue.js │ │ ├── traversing.js │ │ ├── data.js │ │ ├── callbacks.js │ │ ├── offset.js │ │ ├── selector-native.js │ │ ├── deferred.js │ │ └── css.js │ │ ├── bower.json │ │ ├── .bower.json │ │ ├── LICENSE.txt │ │ ├── external │ │ └── sizzle │ │ │ └── LICENSE.txt │ │ ├── README.md │ │ └── AUTHORS.txt ├── css │ └── main.css ├── bower.json └── index.html ├── .gitmodules ├── Dockerfile └── README.md /etc/ssh/sshd_config: -------------------------------------------------------------------------------- 1 | Port 22 -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | *.iml 3 | 4 | -------------------------------------------------------------------------------- /service/tor/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | tor 3 | -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | *~ 2 | *.swp 3 | .git* 4 | -------------------------------------------------------------------------------- /service/openssh/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | /usr/sbin/sshd -D 3 | -------------------------------------------------------------------------------- /etc/lighttpd/lighttpd-password: -------------------------------------------------------------------------------- 1 | anonymous-tux:password 2 | anonymous-tux2:password2 -------------------------------------------------------------------------------- /screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/remipassmoilesel/tor-share/HEAD/screenshot.png -------------------------------------------------------------------------------- /service/lighttpd/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | /usr/sbin/lighttpd -Df /etc/lighttpd/lighttpd.conf 3 | -------------------------------------------------------------------------------- /www/bower_components/jquery/src/var/arr.js: -------------------------------------------------------------------------------- 1 | define( function() { 2 | "use strict"; 3 | 4 | return []; 5 | } ); 6 | -------------------------------------------------------------------------------- /www/bower_components/jquery/src/selector.js: -------------------------------------------------------------------------------- 1 | define( [ "./selector-sizzle" ], function() { 2 | "use strict"; 3 | } ); 4 | -------------------------------------------------------------------------------- /www/bower_components/jquery/src/ajax/var/rquery.js: -------------------------------------------------------------------------------- 1 | define( function() { 2 | "use strict"; 3 | 4 | return ( /\?/ ); 5 | } ); 6 | -------------------------------------------------------------------------------- /www/bower_components/jquery/src/css/var/rmargin.js: -------------------------------------------------------------------------------- 1 | define( function() { 2 | "use strict"; 3 | 4 | return ( /^margin/ ); 5 | } ); 6 | -------------------------------------------------------------------------------- /www/bower_components/jquery/src/var/document.js: -------------------------------------------------------------------------------- 1 | define( function() { 2 | "use strict"; 3 | 4 | return window.document; 5 | } ); 6 | -------------------------------------------------------------------------------- /www/bower_components/jquery/src/ajax/var/location.js: -------------------------------------------------------------------------------- 1 | define( function() { 2 | "use strict"; 3 | 4 | return window.location; 5 | } ); 6 | -------------------------------------------------------------------------------- /www/bower_components/jquery/src/var/getProto.js: -------------------------------------------------------------------------------- 1 | define( function() { 2 | "use strict"; 3 | 4 | return Object.getPrototypeOf; 5 | } ); 6 | -------------------------------------------------------------------------------- /www/bower_components/jquery/src/var/push.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "./arr" 3 | ], function( arr ) { 4 | "use strict"; 5 | 6 | return arr.push; 7 | } ); 8 | -------------------------------------------------------------------------------- /www/bower_components/jquery/src/var/slice.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "./arr" 3 | ], function( arr ) { 4 | "use strict"; 5 | 6 | return arr.slice; 7 | } ); 8 | -------------------------------------------------------------------------------- /www/bower_components/jquery/src/var/class2type.js: -------------------------------------------------------------------------------- 1 | define( function() { 2 | "use strict"; 3 | 4 | // [[Class]] -> type pairs 5 | return {}; 6 | } ); 7 | -------------------------------------------------------------------------------- /www/bower_components/jquery/src/var/concat.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "./arr" 3 | ], function( arr ) { 4 | "use strict"; 5 | 6 | return arr.concat; 7 | } ); 8 | -------------------------------------------------------------------------------- /www/bower_components/jquery/src/var/indexOf.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "./arr" 3 | ], function( arr ) { 4 | "use strict"; 5 | 6 | return arr.indexOf; 7 | } ); 8 | -------------------------------------------------------------------------------- /www/bower_components/jquery/src/css/var/cssExpand.js: -------------------------------------------------------------------------------- 1 | define( function() { 2 | "use strict"; 3 | 4 | return [ "Top", "Right", "Bottom", "Left" ]; 5 | } ); 6 | -------------------------------------------------------------------------------- /www/bower_components/jquery/src/var/pnum.js: -------------------------------------------------------------------------------- 1 | define( function() { 2 | "use strict"; 3 | 4 | return ( /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/ ).source; 5 | } ); 6 | -------------------------------------------------------------------------------- /www/bower_components/jquery/src/ajax/var/nonce.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../../core" 3 | ], function( jQuery ) { 4 | "use strict"; 5 | 6 | return jQuery.now(); 7 | } ); 8 | -------------------------------------------------------------------------------- /www/bower_components/jquery/src/data/var/dataPriv.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../Data" 3 | ], function( Data ) { 4 | "use strict"; 5 | 6 | return new Data(); 7 | } ); 8 | -------------------------------------------------------------------------------- /www/bower_components/jquery/src/data/var/dataUser.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../Data" 3 | ], function( Data ) { 4 | "use strict"; 5 | 6 | return new Data(); 7 | } ); 8 | -------------------------------------------------------------------------------- /www/bower_components/jquery/src/manipulation/var/rcheckableType.js: -------------------------------------------------------------------------------- 1 | define( function() { 2 | "use strict"; 3 | 4 | return ( /^(?:checkbox|radio)$/i ); 5 | } ); 6 | -------------------------------------------------------------------------------- /www/bower_components/jquery/src/manipulation/var/rscriptType.js: -------------------------------------------------------------------------------- 1 | define( function() { 2 | "use strict"; 3 | 4 | return ( /^$|\/(?:java|ecma)script/i ); 5 | } ); 6 | -------------------------------------------------------------------------------- /www/bower_components/jquery/src/manipulation/var/rtagName.js: -------------------------------------------------------------------------------- 1 | define( function() { 2 | "use strict"; 3 | 4 | return ( /<([a-z][^\/\0>\x20\t\r\n\f]+)/i ); 5 | } ); 6 | -------------------------------------------------------------------------------- /www/bower_components/jquery/src/var/fnToString.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "./hasOwn" 3 | ], function( hasOwn ) { 4 | "use strict"; 5 | 6 | return hasOwn.toString; 7 | } ); 8 | -------------------------------------------------------------------------------- /www/bower_components/jquery/src/var/hasOwn.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "./class2type" 3 | ], function( class2type ) { 4 | "use strict"; 5 | 6 | return class2type.hasOwnProperty; 7 | } ); 8 | -------------------------------------------------------------------------------- /www/bower_components/jquery/src/var/toString.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "./class2type" 3 | ], function( class2type ) { 4 | "use strict"; 5 | 6 | return class2type.toString; 7 | } ); 8 | -------------------------------------------------------------------------------- /www/bower_components/jquery/src/var/documentElement.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "./document" 3 | ], function( document ) { 4 | "use strict"; 5 | 6 | return document.documentElement; 7 | } ); 8 | -------------------------------------------------------------------------------- /www/bower_components/jquery/src/var/support.js: -------------------------------------------------------------------------------- 1 | define( function() { 2 | "use strict"; 3 | 4 | // All support tests are defined in their respective modules. 5 | return {}; 6 | } ); 7 | -------------------------------------------------------------------------------- /www/bower_components/jquery/src/var/ObjectFunctionString.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "./fnToString" 3 | ], function( fnToString ) { 4 | "use strict"; 5 | 6 | return fnToString.call( Object ); 7 | } ); 8 | -------------------------------------------------------------------------------- /www/bower_components/jquery/src/css/var/rnumnonpx.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../../var/pnum" 3 | ], function( pnum ) { 4 | "use strict"; 5 | 6 | return new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" ); 7 | } ); 8 | -------------------------------------------------------------------------------- /www/bower_components/jquery/src/traversing/var/rneedsContext.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../../core", 3 | "../../selector" 4 | ], function( jQuery ) { 5 | "use strict"; 6 | 7 | return jQuery.expr.match.needsContext; 8 | } ); 9 | -------------------------------------------------------------------------------- /www/bower_components/jquery/src/core/var/rsingleTag.js: -------------------------------------------------------------------------------- 1 | define( function() { 2 | "use strict"; 3 | 4 | // Match a standalone tag 5 | return ( /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i ); 6 | } ); 7 | -------------------------------------------------------------------------------- /www/bower_components/jquery/src/var/rcssNum.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../var/pnum" 3 | ], function( pnum ) { 4 | 5 | "use strict"; 6 | 7 | return new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" ); 8 | 9 | } ); 10 | -------------------------------------------------------------------------------- /www/bower_components/jquery/src/event/support.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../var/support" 3 | ], function( support ) { 4 | 5 | "use strict"; 6 | 7 | support.focusin = "onfocusin" in window; 8 | 9 | return support; 10 | 11 | } ); 12 | -------------------------------------------------------------------------------- /www/bower_components/jquery/src/core/readyException.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../core" 3 | ], function( jQuery ) { 4 | 5 | "use strict"; 6 | 7 | jQuery.readyException = function( error ) { 8 | window.setTimeout( function() { 9 | throw error; 10 | } ); 11 | }; 12 | 13 | } ); 14 | -------------------------------------------------------------------------------- /www/bower_components/jquery/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jquery", 3 | "main": "dist/jquery.js", 4 | "license": "MIT", 5 | "ignore": [ 6 | "package.json" 7 | ], 8 | "keywords": [ 9 | "jquery", 10 | "javascript", 11 | "browser", 12 | "library" 13 | ] 14 | } -------------------------------------------------------------------------------- /www/bower_components/jquery/src/var/rnothtmlwhite.js: -------------------------------------------------------------------------------- 1 | define( function() { 2 | "use strict"; 3 | 4 | // Only count HTML whitespace 5 | // Other whitespace should count in values 6 | // https://html.spec.whatwg.org/multipage/infrastructure.html#space-character 7 | return ( /[^\x20\t\r\n\f]+/g ); 8 | } ); 9 | -------------------------------------------------------------------------------- /www/bower_components/jquery/src/attributes.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "./core", 3 | "./attributes/attr", 4 | "./attributes/prop", 5 | "./attributes/classes", 6 | "./attributes/val" 7 | ], function( jQuery ) { 8 | 9 | "use strict"; 10 | 11 | // Return jQuery for attributes-only inclusion 12 | return jQuery; 13 | } ); 14 | -------------------------------------------------------------------------------- /www/bower_components/jquery/src/traversing/var/siblings.js: -------------------------------------------------------------------------------- 1 | define( function() { 2 | 3 | "use strict"; 4 | 5 | return function( n, elem ) { 6 | var matched = []; 7 | 8 | for ( ; n; n = n.nextSibling ) { 9 | if ( n.nodeType === 1 && n !== elem ) { 10 | matched.push( n ); 11 | } 12 | } 13 | 14 | return matched; 15 | }; 16 | 17 | } ); 18 | -------------------------------------------------------------------------------- /www/bower_components/jquery/src/effects/animatedSelector.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../core", 3 | "../selector", 4 | "../effects" 5 | ], function( jQuery ) { 6 | 7 | "use strict"; 8 | 9 | jQuery.expr.pseudos.animated = function( elem ) { 10 | return jQuery.grep( jQuery.timers, function( fn ) { 11 | return elem === fn.elem; 12 | } ).length; 13 | }; 14 | 15 | } ); 16 | -------------------------------------------------------------------------------- /service/hostname/run: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # This script try to find tor service hostname and copy it in www 4 | 5 | file="/var/lib/tor/hidden_service/hostname" 6 | dest="/www/hostname" 7 | 8 | if [ -f "$file" ] 9 | then 10 | cp "$file" "$dest" 11 | chmod +r "$dest" 12 | echo "'$dest' updated: `cat $file`" 13 | else 14 | echo "'$file' not found." 15 | fi 16 | 17 | sleep 3 -------------------------------------------------------------------------------- /www/css/main.css: -------------------------------------------------------------------------------- 1 | body{ 2 | background: black; 3 | font-size: 13px; 4 | font-family: monospace; 5 | color: white; 6 | } 7 | 8 | h2{ 9 | margin-top: 2em; 10 | } 11 | 12 | .mainContent{ 13 | width: 80%; 14 | margin: auto; 15 | margin-bottom: 150px; 16 | } 17 | 18 | .warningJavascript{ 19 | padding: 20px; 20 | border: solid 2px red; 21 | } 22 | 23 | -------------------------------------------------------------------------------- /www/bower_components/jquery/src/core/DOMEval.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../var/document" 3 | ], function( document ) { 4 | "use strict"; 5 | 6 | function DOMEval( code, doc ) { 7 | doc = doc || document; 8 | 9 | var script = doc.createElement( "script" ); 10 | 11 | script.text = code; 12 | doc.head.appendChild( script ).parentNode.removeChild( script ); 13 | } 14 | 15 | return DOMEval; 16 | } ); 17 | -------------------------------------------------------------------------------- /www/bower_components/jquery/src/css/hiddenVisibleSelectors.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../core", 3 | "../selector" 4 | ], function( jQuery ) { 5 | 6 | "use strict"; 7 | 8 | jQuery.expr.pseudos.hidden = function( elem ) { 9 | return !jQuery.expr.pseudos.visible( elem ); 10 | }; 11 | jQuery.expr.pseudos.visible = function( elem ) { 12 | return !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length ); 13 | }; 14 | 15 | } ); 16 | -------------------------------------------------------------------------------- /www/bower_components/jquery/src/data/var/acceptData.js: -------------------------------------------------------------------------------- 1 | define( function() { 2 | 3 | "use strict"; 4 | 5 | /** 6 | * Determines whether an object can have data 7 | */ 8 | return function( owner ) { 9 | 10 | // Accepts only: 11 | // - Node 12 | // - Node.ELEMENT_NODE 13 | // - Node.DOCUMENT_NODE 14 | // - Object 15 | // - Any 16 | return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType ); 17 | }; 18 | 19 | } ); 20 | -------------------------------------------------------------------------------- /www/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "www", 3 | "homepage": "https://github.com/remipassmoilesel/tor-share", 4 | "authors": [ 5 | "remi.passmoilesel " 6 | ], 7 | "description": "", 8 | "main": "", 9 | "license": "GPLv3", 10 | "ignore": [ 11 | "**/.*", 12 | "node_modules", 13 | "bower_components", 14 | "test", 15 | "tests" 16 | ], 17 | "dependencies": { 18 | "jquery": "^3.1.1" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /www/bower_components/jquery/src/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | // Support: IE <=9 only, Android <=4.0 only 3 | // The above browsers are failing a lot of tests in the ES5 4 | // test suite at http://test262.ecmascript.org. 5 | "parserOptions": { 6 | "ecmaVersion": 3 7 | }, 8 | "globals": { 9 | "window": true, 10 | "jQuery": true, 11 | "define": true, 12 | "module": true, 13 | "noGlobal": true 14 | }, 15 | "rules": { 16 | "strict": ["error", "function"] 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /www/bower_components/jquery/src/event/ajax.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../core", 3 | "../event" 4 | ], function( jQuery ) { 5 | 6 | "use strict"; 7 | 8 | // Attach a bunch of functions for handling common AJAX events 9 | jQuery.each( [ 10 | "ajaxStart", 11 | "ajaxStop", 12 | "ajaxComplete", 13 | "ajaxError", 14 | "ajaxSuccess", 15 | "ajaxSend" 16 | ], function( i, type ) { 17 | jQuery.fn[ type ] = function( fn ) { 18 | return this.on( type, fn ); 19 | }; 20 | } ); 21 | 22 | } ); 23 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "www/uploa"] 2 | path = www/upload 3 | url = https://github.com/remipassmoilesel/chipbox-simplephpupload 4 | [submodule "www/cha"] 5 | path = www/chat 6 | url = https://github.com/remipassmoilesel/chipbox-minimalchatextreme 7 | [submodule "www/chat"] 8 | path = www/chat 9 | url = https://github.com/remipassmoilesel/chipbox-minimalchatextreme 10 | [submodule "www/upload"] 11 | path = www/upload 12 | url = https://github.com/remipassmoilesel/chipbox-simplephpupload 13 | -------------------------------------------------------------------------------- /www/bower_components/jquery/src/core/stripAndCollapse.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../var/rnothtmlwhite" 3 | ], function( rnothtmlwhite ) { 4 | "use strict"; 5 | 6 | // Strip and collapse whitespace according to HTML spec 7 | // https://html.spec.whatwg.org/multipage/infrastructure.html#strip-and-collapse-whitespace 8 | function stripAndCollapse( value ) { 9 | var tokens = value.match( rnothtmlwhite ) || []; 10 | return tokens.join( " " ); 11 | } 12 | 13 | return stripAndCollapse; 14 | } ); 15 | -------------------------------------------------------------------------------- /www/bower_components/jquery/src/manipulation/_evalUrl.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../ajax" 3 | ], function( jQuery ) { 4 | 5 | "use strict"; 6 | 7 | jQuery._evalUrl = function( url ) { 8 | return jQuery.ajax( { 9 | url: url, 10 | 11 | // Make this explicit, since user can override this through ajaxSetup (#11264) 12 | type: "GET", 13 | dataType: "script", 14 | cache: true, 15 | async: false, 16 | global: false, 17 | "throws": true 18 | } ); 19 | }; 20 | 21 | return jQuery._evalUrl; 22 | 23 | } ); 24 | -------------------------------------------------------------------------------- /www/bower_components/jquery/src/traversing/var/dir.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../../core" 3 | ], function( jQuery ) { 4 | 5 | "use strict"; 6 | 7 | return function( elem, dir, until ) { 8 | var matched = [], 9 | truncate = until !== undefined; 10 | 11 | while ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) { 12 | if ( elem.nodeType === 1 ) { 13 | if ( truncate && jQuery( elem ).is( until ) ) { 14 | break; 15 | } 16 | matched.push( elem ); 17 | } 18 | } 19 | return matched; 20 | }; 21 | 22 | } ); 23 | -------------------------------------------------------------------------------- /www/bower_components/jquery/src/css/var/getStyles.js: -------------------------------------------------------------------------------- 1 | define( function() { 2 | "use strict"; 3 | 4 | return function( elem ) { 5 | 6 | // Support: IE <=11 only, Firefox <=30 (#15098, #14150) 7 | // IE throws on elements created in popups 8 | // FF meanwhile throws on frame elements through "defaultView.getComputedStyle" 9 | var view = elem.ownerDocument.defaultView; 10 | 11 | if ( !view || !view.opener ) { 12 | view = window; 13 | } 14 | 15 | return view.getComputedStyle( elem ); 16 | }; 17 | } ); 18 | -------------------------------------------------------------------------------- /www/bower_components/jquery/src/manipulation/setGlobalEval.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../data/var/dataPriv" 3 | ], function( dataPriv ) { 4 | 5 | "use strict"; 6 | 7 | // Mark scripts as having already been evaluated 8 | function setGlobalEval( elems, refElements ) { 9 | var i = 0, 10 | l = elems.length; 11 | 12 | for ( ; i < l; i++ ) { 13 | dataPriv.set( 14 | elems[ i ], 15 | "globalEval", 16 | !refElements || dataPriv.get( refElements[ i ], "globalEval" ) 17 | ); 18 | } 19 | } 20 | 21 | return setGlobalEval; 22 | } ); 23 | -------------------------------------------------------------------------------- /www/bower_components/jquery/src/selector-sizzle.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "./core", 3 | "../external/sizzle/dist/sizzle" 4 | ], function( jQuery, Sizzle ) { 5 | 6 | "use strict"; 7 | 8 | jQuery.find = Sizzle; 9 | jQuery.expr = Sizzle.selectors; 10 | 11 | // Deprecated 12 | jQuery.expr[ ":" ] = jQuery.expr.pseudos; 13 | jQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort; 14 | jQuery.text = Sizzle.getText; 15 | jQuery.isXMLDoc = Sizzle.isXML; 16 | jQuery.contains = Sizzle.contains; 17 | jQuery.escapeSelector = Sizzle.escape; 18 | 19 | } ); 20 | -------------------------------------------------------------------------------- /www/bower_components/jquery/src/css/var/swap.js: -------------------------------------------------------------------------------- 1 | define( function() { 2 | 3 | "use strict"; 4 | 5 | // A method for quickly swapping in/out CSS properties to get correct calculations. 6 | return function( elem, options, callback, args ) { 7 | var ret, name, 8 | old = {}; 9 | 10 | // Remember the old values, and insert the new ones 11 | for ( name in options ) { 12 | old[ name ] = elem.style[ name ]; 13 | elem.style[ name ] = options[ name ]; 14 | } 15 | 16 | ret = callback.apply( elem, args || [] ); 17 | 18 | // Revert the old values 19 | for ( name in options ) { 20 | elem.style[ name ] = old[ name ]; 21 | } 22 | 23 | return ret; 24 | }; 25 | 26 | } ); 27 | -------------------------------------------------------------------------------- /www/bower_components/jquery/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jquery", 3 | "main": "dist/jquery.js", 4 | "license": "MIT", 5 | "ignore": [ 6 | "package.json" 7 | ], 8 | "keywords": [ 9 | "jquery", 10 | "javascript", 11 | "browser", 12 | "library" 13 | ], 14 | "homepage": "https://github.com/jquery/jquery-dist", 15 | "version": "3.1.1", 16 | "_release": "3.1.1", 17 | "_resolution": { 18 | "type": "version", 19 | "tag": "3.1.1", 20 | "commit": "1b30f3ad466ebf2714d47eda34dbd7fdf6849fe3" 21 | }, 22 | "_source": "https://github.com/jquery/jquery-dist.git", 23 | "_target": "^3.1.1", 24 | "_originalSource": "jquery", 25 | "_direct": true 26 | } -------------------------------------------------------------------------------- /www/bower_components/jquery/src/css/addGetHookIf.js: -------------------------------------------------------------------------------- 1 | define( function() { 2 | 3 | "use strict"; 4 | 5 | function addGetHookIf( conditionFn, hookFn ) { 6 | 7 | // Define the hook, we'll check on the first run if it's really needed. 8 | return { 9 | get: function() { 10 | if ( conditionFn() ) { 11 | 12 | // Hook not needed (or it's not possible to use it due 13 | // to missing dependency), remove it. 14 | delete this.get; 15 | return; 16 | } 17 | 18 | // Hook needed; redefine it so that the support test is not executed again. 19 | return ( this.get = hookFn ).apply( this, arguments ); 20 | } 21 | }; 22 | } 23 | 24 | return addGetHookIf; 25 | 26 | } ); 27 | -------------------------------------------------------------------------------- /www/bower_components/jquery/src/ajax/parseXML.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../core" 3 | ], function( jQuery ) { 4 | 5 | "use strict"; 6 | 7 | // Cross-browser xml parsing 8 | jQuery.parseXML = function( data ) { 9 | var xml; 10 | if ( !data || typeof data !== "string" ) { 11 | return null; 12 | } 13 | 14 | // Support: IE 9 - 11 only 15 | // IE throws on parseFromString with invalid input. 16 | try { 17 | xml = ( new window.DOMParser() ).parseFromString( data, "text/xml" ); 18 | } catch ( e ) { 19 | xml = undefined; 20 | } 21 | 22 | if ( !xml || xml.getElementsByTagName( "parsererror" ).length ) { 23 | jQuery.error( "Invalid XML: " + data ); 24 | } 25 | return xml; 26 | }; 27 | 28 | return jQuery.parseXML; 29 | 30 | } ); 31 | -------------------------------------------------------------------------------- /www/bower_components/jquery/src/core/support.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../var/document", 3 | "../var/support" 4 | ], function( document, support ) { 5 | 6 | "use strict"; 7 | 8 | // Support: Safari 8 only 9 | // In Safari 8 documents created via document.implementation.createHTMLDocument 10 | // collapse sibling forms: the second one becomes a child of the first one. 11 | // Because of that, this security measure has to be disabled in Safari 8. 12 | // https://bugs.webkit.org/show_bug.cgi?id=137337 13 | support.createHTMLDocument = ( function() { 14 | var body = document.implementation.createHTMLDocument( "" ).body; 15 | body.innerHTML = "
"; 16 | return body.childNodes.length === 2; 17 | } )(); 18 | 19 | return support; 20 | } ); 21 | -------------------------------------------------------------------------------- /www/bower_components/jquery/src/deprecated.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "./core" 3 | ], function( jQuery ) { 4 | 5 | "use strict"; 6 | 7 | jQuery.fn.extend( { 8 | 9 | bind: function( types, data, fn ) { 10 | return this.on( types, null, data, fn ); 11 | }, 12 | unbind: function( types, fn ) { 13 | return this.off( types, null, fn ); 14 | }, 15 | 16 | delegate: function( selector, types, data, fn ) { 17 | return this.on( types, selector, data, fn ); 18 | }, 19 | undelegate: function( selector, types, fn ) { 20 | 21 | // ( namespace ) or ( selector, types [, fn] ) 22 | return arguments.length === 1 ? 23 | this.off( selector, "**" ) : 24 | this.off( types, selector || "**", fn ); 25 | } 26 | } ); 27 | 28 | jQuery.parseJSON = JSON.parse; 29 | 30 | } ); 31 | -------------------------------------------------------------------------------- /www/bower_components/jquery/src/deferred/exceptionHook.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../core", 3 | "../deferred" 4 | ], function( jQuery ) { 5 | 6 | "use strict"; 7 | 8 | // These usually indicate a programmer mistake during development, 9 | // warn about them ASAP rather than swallowing them by default. 10 | var rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/; 11 | 12 | jQuery.Deferred.exceptionHook = function( error, stack ) { 13 | 14 | // Support: IE 8 - 9 only 15 | // Console exists when dev tools are open, which can happen at any time 16 | if ( window.console && window.console.warn && error && rerrorNames.test( error.name ) ) { 17 | window.console.warn( "jQuery.Deferred exception: " + error.message, error.stack, stack ); 18 | } 19 | }; 20 | 21 | } ); 22 | -------------------------------------------------------------------------------- /www/bower_components/jquery/src/queue/delay.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../core", 3 | "../queue", 4 | "../effects" // Delay is optional because of this dependency 5 | ], function( jQuery ) { 6 | 7 | "use strict"; 8 | 9 | // Based off of the plugin by Clint Helfers, with permission. 10 | // https://web.archive.org/web/20100324014747/http://blindsignals.com/index.php/2009/07/jquery-delay/ 11 | jQuery.fn.delay = function( time, type ) { 12 | time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; 13 | type = type || "fx"; 14 | 15 | return this.queue( type, function( next, hooks ) { 16 | var timeout = window.setTimeout( next, time ); 17 | hooks.stop = function() { 18 | window.clearTimeout( timeout ); 19 | }; 20 | } ); 21 | }; 22 | 23 | return jQuery.fn.delay; 24 | } ); 25 | -------------------------------------------------------------------------------- /www/bower_components/jquery/src/exports/global.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../core" 3 | ], function( jQuery, noGlobal ) { 4 | 5 | "use strict"; 6 | 7 | var 8 | 9 | // Map over jQuery in case of overwrite 10 | _jQuery = window.jQuery, 11 | 12 | // Map over the $ in case of overwrite 13 | _$ = window.$; 14 | 15 | jQuery.noConflict = function( deep ) { 16 | if ( window.$ === jQuery ) { 17 | window.$ = _$; 18 | } 19 | 20 | if ( deep && window.jQuery === jQuery ) { 21 | window.jQuery = _jQuery; 22 | } 23 | 24 | return jQuery; 25 | }; 26 | 27 | // Expose jQuery and $ identifiers, even in AMD 28 | // (#7102#comment:10, https://github.com/jquery/jquery/pull/557) 29 | // and CommonJS for browser emulators (#13566) 30 | if ( !noGlobal ) { 31 | window.jQuery = window.$ = jQuery; 32 | } 33 | 34 | } ); 35 | -------------------------------------------------------------------------------- /www/bower_components/jquery/src/manipulation/getAll.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../core" 3 | ], function( jQuery ) { 4 | 5 | "use strict"; 6 | 7 | function getAll( context, tag ) { 8 | 9 | // Support: IE <=9 - 11 only 10 | // Use typeof to avoid zero-argument method invocation on host objects (#15151) 11 | var ret; 12 | 13 | if ( typeof context.getElementsByTagName !== "undefined" ) { 14 | ret = context.getElementsByTagName( tag || "*" ); 15 | 16 | } else if ( typeof context.querySelectorAll !== "undefined" ) { 17 | ret = context.querySelectorAll( tag || "*" ); 18 | 19 | } else { 20 | ret = []; 21 | } 22 | 23 | if ( tag === undefined || tag && jQuery.nodeName( context, tag ) ) { 24 | return jQuery.merge( [ context ], ret ); 25 | } 26 | 27 | return ret; 28 | } 29 | 30 | return getAll; 31 | } ); 32 | -------------------------------------------------------------------------------- /www/bower_components/jquery/src/event/alias.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../core", 3 | 4 | "../event", 5 | "./trigger" 6 | ], function( jQuery ) { 7 | 8 | "use strict"; 9 | 10 | jQuery.each( ( "blur focus focusin focusout resize scroll click dblclick " + 11 | "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + 12 | "change select submit keydown keypress keyup contextmenu" ).split( " " ), 13 | function( i, name ) { 14 | 15 | // Handle event binding 16 | jQuery.fn[ name ] = function( data, fn ) { 17 | return arguments.length > 0 ? 18 | this.on( name, null, data, fn ) : 19 | this.trigger( name ); 20 | }; 21 | } ); 22 | 23 | jQuery.fn.extend( { 24 | hover: function( fnOver, fnOut ) { 25 | return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver ); 26 | } 27 | } ); 28 | 29 | } ); 30 | -------------------------------------------------------------------------------- /www/bower_components/jquery/src/jquery.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "./core", 3 | "./selector", 4 | "./traversing", 5 | "./callbacks", 6 | "./deferred", 7 | "./deferred/exceptionHook", 8 | "./core/ready", 9 | "./data", 10 | "./queue", 11 | "./queue/delay", 12 | "./attributes", 13 | "./event", 14 | "./event/alias", 15 | "./event/focusin", 16 | "./manipulation", 17 | "./manipulation/_evalUrl", 18 | "./wrap", 19 | "./css", 20 | "./css/hiddenVisibleSelectors", 21 | "./serialize", 22 | "./ajax", 23 | "./ajax/xhr", 24 | "./ajax/script", 25 | "./ajax/jsonp", 26 | "./ajax/load", 27 | "./event/ajax", 28 | "./effects", 29 | "./effects/animatedSelector", 30 | "./offset", 31 | "./dimensions", 32 | "./deprecated", 33 | "./exports/amd", 34 | "./exports/global" 35 | ], function( jQuery ) { 36 | 37 | "use strict"; 38 | 39 | return jQuery; 40 | 41 | } ); 42 | -------------------------------------------------------------------------------- /www/bower_components/jquery/src/manipulation/wrapMap.js: -------------------------------------------------------------------------------- 1 | define( function() { 2 | 3 | "use strict"; 4 | 5 | // We have to close these tags to support XHTML (#13200) 6 | var wrapMap = { 7 | 8 | // Support: IE <=9 only 9 | option: [ 1, "" ], 10 | 11 | // XHTML parsers do not magically insert elements in the 12 | // same way that tag soup parsers do. So we cannot shorten 13 | // this by omitting or other required elements. 14 | thead: [ 1, "", "
" ], 15 | col: [ 2, "", "
" ], 16 | tr: [ 2, "", "
" ], 17 | td: [ 3, "", "
" ], 18 | 19 | _default: [ 0, "", "" ] 20 | }; 21 | 22 | // Support: IE <=9 only 23 | wrapMap.optgroup = wrapMap.option; 24 | 25 | wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; 26 | wrapMap.th = wrapMap.td; 27 | 28 | return wrapMap; 29 | } ); 30 | -------------------------------------------------------------------------------- /www/bower_components/jquery/src/attributes/support.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../var/document", 3 | "../var/support" 4 | ], function( document, support ) { 5 | 6 | "use strict"; 7 | 8 | ( function() { 9 | var input = document.createElement( "input" ), 10 | select = document.createElement( "select" ), 11 | opt = select.appendChild( document.createElement( "option" ) ); 12 | 13 | input.type = "checkbox"; 14 | 15 | // Support: Android <=4.3 only 16 | // Default value for a checkbox should be "on" 17 | support.checkOn = input.value !== ""; 18 | 19 | // Support: IE <=11 only 20 | // Must access selectedIndex to make default options select 21 | support.optSelected = opt.selected; 22 | 23 | // Support: IE <=11 only 24 | // An input loses its value after becoming a radio 25 | input = document.createElement( "input" ); 26 | input.value = "t"; 27 | input.type = "radio"; 28 | support.radioValue = input.value === "t"; 29 | } )(); 30 | 31 | return support; 32 | 33 | } ); 34 | -------------------------------------------------------------------------------- /etc/lighttpd/lighttpd.conf: -------------------------------------------------------------------------------- 1 | 2 | # General configuration 3 | 4 | include "/etc/lighttpd/mime-types.conf" 5 | 6 | server.username = "lighttpd" 7 | server.groupname = "lighttpd" 8 | 9 | server.document-root = "/www" 10 | 11 | ssl.engine = "enable" 12 | ssl.pemfile = "/etc/lighttpd/rsa.pem" 13 | server.port = "443" 14 | 15 | # Php configuration 16 | 17 | server.modules += ( "mod_cgi" ) 18 | cgi.assign = ( ".php" => "/usr/bin/php-cgi" ) 19 | index-file.names += ( "index.html", "index.php", "default.php" ) 20 | 21 | debug.log-request-handling = "enable" 22 | dir-listing.encoding = "utf-8" 23 | server.dir-listing = "enable" 24 | 25 | # Authentication configuration 26 | 27 | server.modules += ( "mod_auth" ) 28 | auth.backend = "plain" 29 | auth.backend.plain.userfile = "/etc/lighttpd/lighttpd-password" 30 | 31 | auth.require = ( "/" => ( 32 | "method" => "basic", 33 | "realm" => "Password protected area", 34 | "require" => "valid-user" 35 | ) 36 | ) 37 | -------------------------------------------------------------------------------- /www/bower_components/jquery/src/exports/amd.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../core" 3 | ], function( jQuery ) { 4 | 5 | "use strict"; 6 | 7 | // Register as a named AMD module, since jQuery can be concatenated with other 8 | // files that may use define, but not via a proper concatenation script that 9 | // understands anonymous AMD modules. A named AMD is safest and most robust 10 | // way to register. Lowercase jquery is used because AMD module names are 11 | // derived from file names, and jQuery is normally delivered in a lowercase 12 | // file name. Do this after creating the global so that if an AMD module wants 13 | // to call noConflict to hide this version of jQuery, it will work. 14 | 15 | // Note that for maximum portability, libraries that are not jQuery should 16 | // declare themselves as anonymous modules, and avoid setting a global if an 17 | // AMD loader is present. jQuery is a special case. For more information, see 18 | // https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon 19 | 20 | if ( typeof define === "function" && define.amd ) { 21 | define( "jquery", [], function() { 22 | return jQuery; 23 | } ); 24 | } 25 | 26 | } ); 27 | -------------------------------------------------------------------------------- /www/bower_components/jquery/src/manipulation/support.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../var/document", 3 | "../var/support" 4 | ], function( document, support ) { 5 | 6 | "use strict"; 7 | 8 | ( function() { 9 | var fragment = document.createDocumentFragment(), 10 | div = fragment.appendChild( document.createElement( "div" ) ), 11 | input = document.createElement( "input" ); 12 | 13 | // Support: Android 4.0 - 4.3 only 14 | // Check state lost if the name is set (#11217) 15 | // Support: Windows Web Apps (WWA) 16 | // `name` and `type` must use .setAttribute for WWA (#14901) 17 | input.setAttribute( "type", "radio" ); 18 | input.setAttribute( "checked", "checked" ); 19 | input.setAttribute( "name", "t" ); 20 | 21 | div.appendChild( input ); 22 | 23 | // Support: Android <=4.1 only 24 | // Older WebKit doesn't clone checked state correctly in fragments 25 | support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked; 26 | 27 | // Support: IE <=11 only 28 | // Make sure textarea (and checkbox) defaultValue is properly cloned 29 | div.innerHTML = ""; 30 | support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue; 31 | } )(); 32 | 33 | return support; 34 | 35 | } ); 36 | -------------------------------------------------------------------------------- /www/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Tor-share 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 |

Tor-share

13 | 14 |

Javascript

15 |

Warning: Please note that you must activate Javascript to use this service. This 16 | can cause a privacy problem. If you trust the person who publishes this service, please activate Javascript.

17 | 18 |

What is this place ?

19 |

Here you can chat and share files anonymously.

20 |

Chat | Upload

21 | 22 |

Tor location

23 |

24 | 25 |
26 | 27 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /www/bower_components/jquery/src/css/var/isHiddenWithinTree.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../../core", 3 | "../../selector" 4 | 5 | // css is assumed 6 | ], function( jQuery ) { 7 | "use strict"; 8 | 9 | // isHiddenWithinTree reports if an element has a non-"none" display style (inline and/or 10 | // through the CSS cascade), which is useful in deciding whether or not to make it visible. 11 | // It differs from the :hidden selector (jQuery.expr.pseudos.hidden) in two important ways: 12 | // * A hidden ancestor does not force an element to be classified as hidden. 13 | // * Being disconnected from the document does not force an element to be classified as hidden. 14 | // These differences improve the behavior of .toggle() et al. when applied to elements that are 15 | // detached or contained within hidden ancestors (gh-2404, gh-2863). 16 | return function( elem, el ) { 17 | 18 | // isHiddenWithinTree might be called from jQuery#filter function; 19 | // in that case, element will be second argument 20 | elem = el || elem; 21 | 22 | // Inline style trumps all 23 | return elem.style.display === "none" || 24 | elem.style.display === "" && 25 | 26 | // Otherwise, check computed style 27 | // Support: Firefox <=43 - 45 28 | // Disconnected elements can have computed display: none, so first confirm that elem is 29 | // in the document. 30 | jQuery.contains( elem.ownerDocument, elem ) && 31 | 32 | jQuery.css( elem, "display" ) === "none"; 33 | }; 34 | } ); 35 | -------------------------------------------------------------------------------- /www/bower_components/jquery/src/core/access.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../core" 3 | ], function( jQuery ) { 4 | 5 | "use strict"; 6 | 7 | // Multifunctional method to get and set values of a collection 8 | // The value/s can optionally be executed if it's a function 9 | var access = function( elems, fn, key, value, chainable, emptyGet, raw ) { 10 | var i = 0, 11 | len = elems.length, 12 | bulk = key == null; 13 | 14 | // Sets many values 15 | if ( jQuery.type( key ) === "object" ) { 16 | chainable = true; 17 | for ( i in key ) { 18 | access( elems, fn, i, key[ i ], true, emptyGet, raw ); 19 | } 20 | 21 | // Sets one value 22 | } else if ( value !== undefined ) { 23 | chainable = true; 24 | 25 | if ( !jQuery.isFunction( value ) ) { 26 | raw = true; 27 | } 28 | 29 | if ( bulk ) { 30 | 31 | // Bulk operations run against the entire set 32 | if ( raw ) { 33 | fn.call( elems, value ); 34 | fn = null; 35 | 36 | // ...except when executing function values 37 | } else { 38 | bulk = fn; 39 | fn = function( elem, key, value ) { 40 | return bulk.call( jQuery( elem ), value ); 41 | }; 42 | } 43 | } 44 | 45 | if ( fn ) { 46 | for ( ; i < len; i++ ) { 47 | fn( 48 | elems[ i ], key, raw ? 49 | value : 50 | value.call( elems[ i ], i, fn( elems[ i ], key ) ) 51 | ); 52 | } 53 | } 54 | } 55 | 56 | if ( chainable ) { 57 | return elems; 58 | } 59 | 60 | // Gets 61 | if ( bulk ) { 62 | return fn.call( elems ); 63 | } 64 | 65 | return len ? fn( elems[ 0 ], key ) : emptyGet; 66 | }; 67 | 68 | return access; 69 | 70 | } ); 71 | -------------------------------------------------------------------------------- /www/bower_components/jquery/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright jQuery Foundation and other contributors, https://jquery.org/ 2 | 3 | This software consists of voluntary contributions made by many 4 | individuals. For exact contribution history, see the revision history 5 | available at https://github.com/jquery/jquery 6 | 7 | The following license applies to all parts of this software except as 8 | documented below: 9 | 10 | ==== 11 | 12 | Permission is hereby granted, free of charge, to any person obtaining 13 | a copy of this software and associated documentation files (the 14 | "Software"), to deal in the Software without restriction, including 15 | without limitation the rights to use, copy, modify, merge, publish, 16 | distribute, sublicense, and/or sell copies of the Software, and to 17 | permit persons to whom the Software is furnished to do so, subject to 18 | the following conditions: 19 | 20 | The above copyright notice and this permission notice shall be 21 | included in all copies or substantial portions of the Software. 22 | 23 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 24 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 25 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 26 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 27 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 28 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 29 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 30 | 31 | ==== 32 | 33 | All files located in the node_modules and external directories are 34 | externally maintained libraries used by this software which have their 35 | own licenses; we recommend you read them, as their terms may differ from 36 | the terms above. 37 | -------------------------------------------------------------------------------- /www/bower_components/jquery/src/event/focusin.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../core", 3 | "../data/var/dataPriv", 4 | "./support", 5 | 6 | "../event", 7 | "./trigger" 8 | ], function( jQuery, dataPriv, support ) { 9 | 10 | "use strict"; 11 | 12 | // Support: Firefox <=44 13 | // Firefox doesn't have focus(in | out) events 14 | // Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787 15 | // 16 | // Support: Chrome <=48 - 49, Safari <=9.0 - 9.1 17 | // focus(in | out) events fire after focus & blur events, 18 | // which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order 19 | // Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857 20 | if ( !support.focusin ) { 21 | jQuery.each( { focus: "focusin", blur: "focusout" }, function( orig, fix ) { 22 | 23 | // Attach a single capturing handler on the document while someone wants focusin/focusout 24 | var handler = function( event ) { 25 | jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ) ); 26 | }; 27 | 28 | jQuery.event.special[ fix ] = { 29 | setup: function() { 30 | var doc = this.ownerDocument || this, 31 | attaches = dataPriv.access( doc, fix ); 32 | 33 | if ( !attaches ) { 34 | doc.addEventListener( orig, handler, true ); 35 | } 36 | dataPriv.access( doc, fix, ( attaches || 0 ) + 1 ); 37 | }, 38 | teardown: function() { 39 | var doc = this.ownerDocument || this, 40 | attaches = dataPriv.access( doc, fix ) - 1; 41 | 42 | if ( !attaches ) { 43 | doc.removeEventListener( orig, handler, true ); 44 | dataPriv.remove( doc, fix ); 45 | 46 | } else { 47 | dataPriv.access( doc, fix, attaches ); 48 | } 49 | } 50 | }; 51 | } ); 52 | } 53 | 54 | return jQuery; 55 | } ); 56 | -------------------------------------------------------------------------------- /www/bower_components/jquery/external/sizzle/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright jQuery Foundation and other contributors, https://jquery.org/ 2 | 3 | This software consists of voluntary contributions made by many 4 | individuals. For exact contribution history, see the revision history 5 | available at https://github.com/jquery/sizzle 6 | 7 | The following license applies to all parts of this software except as 8 | documented below: 9 | 10 | ==== 11 | 12 | Permission is hereby granted, free of charge, to any person obtaining 13 | a copy of this software and associated documentation files (the 14 | "Software"), to deal in the Software without restriction, including 15 | without limitation the rights to use, copy, modify, merge, publish, 16 | distribute, sublicense, and/or sell copies of the Software, and to 17 | permit persons to whom the Software is furnished to do so, subject to 18 | the following conditions: 19 | 20 | The above copyright notice and this permission notice shall be 21 | included in all copies or substantial portions of the Software. 22 | 23 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 24 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 25 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 26 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 27 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 28 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 29 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 30 | 31 | ==== 32 | 33 | All files located in the node_modules and external directories are 34 | externally maintained libraries used by this software which have their 35 | own licenses; we recommend you read them, as their terms may differ from 36 | the terms above. 37 | -------------------------------------------------------------------------------- /www/bower_components/jquery/src/css/curCSS.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../core", 3 | "./var/rnumnonpx", 4 | "./var/rmargin", 5 | "./var/getStyles", 6 | "./support", 7 | "../selector" // Get jQuery.contains 8 | ], function( jQuery, rnumnonpx, rmargin, getStyles, support ) { 9 | 10 | "use strict"; 11 | 12 | function curCSS( elem, name, computed ) { 13 | var width, minWidth, maxWidth, ret, 14 | style = elem.style; 15 | 16 | computed = computed || getStyles( elem ); 17 | 18 | // Support: IE <=9 only 19 | // getPropertyValue is only needed for .css('filter') (#12537) 20 | if ( computed ) { 21 | ret = computed.getPropertyValue( name ) || computed[ name ]; 22 | 23 | if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) { 24 | ret = jQuery.style( elem, name ); 25 | } 26 | 27 | // A tribute to the "awesome hack by Dean Edwards" 28 | // Android Browser returns percentage for some values, 29 | // but width seems to be reliably pixels. 30 | // This is against the CSSOM draft spec: 31 | // https://drafts.csswg.org/cssom/#resolved-values 32 | if ( !support.pixelMarginRight() && rnumnonpx.test( ret ) && rmargin.test( name ) ) { 33 | 34 | // Remember the original values 35 | width = style.width; 36 | minWidth = style.minWidth; 37 | maxWidth = style.maxWidth; 38 | 39 | // Put in the new values to get a computed value out 40 | style.minWidth = style.maxWidth = style.width = ret; 41 | ret = computed.width; 42 | 43 | // Revert the changed values 44 | style.width = width; 45 | style.minWidth = minWidth; 46 | style.maxWidth = maxWidth; 47 | } 48 | } 49 | 50 | return ret !== undefined ? 51 | 52 | // Support: IE <=9 - 11 only 53 | // IE returns zIndex value as an integer. 54 | ret + "" : 55 | ret; 56 | } 57 | 58 | return curCSS; 59 | } ); 60 | -------------------------------------------------------------------------------- /www/bower_components/jquery/src/wrap.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "./core", 3 | "./core/init", 4 | "./manipulation", // clone 5 | "./traversing" // parent, contents 6 | ], function( jQuery ) { 7 | 8 | "use strict"; 9 | 10 | jQuery.fn.extend( { 11 | wrapAll: function( html ) { 12 | var wrap; 13 | 14 | if ( this[ 0 ] ) { 15 | if ( jQuery.isFunction( html ) ) { 16 | html = html.call( this[ 0 ] ); 17 | } 18 | 19 | // The elements to wrap the target around 20 | wrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true ); 21 | 22 | if ( this[ 0 ].parentNode ) { 23 | wrap.insertBefore( this[ 0 ] ); 24 | } 25 | 26 | wrap.map( function() { 27 | var elem = this; 28 | 29 | while ( elem.firstElementChild ) { 30 | elem = elem.firstElementChild; 31 | } 32 | 33 | return elem; 34 | } ).append( this ); 35 | } 36 | 37 | return this; 38 | }, 39 | 40 | wrapInner: function( html ) { 41 | if ( jQuery.isFunction( html ) ) { 42 | return this.each( function( i ) { 43 | jQuery( this ).wrapInner( html.call( this, i ) ); 44 | } ); 45 | } 46 | 47 | return this.each( function() { 48 | var self = jQuery( this ), 49 | contents = self.contents(); 50 | 51 | if ( contents.length ) { 52 | contents.wrapAll( html ); 53 | 54 | } else { 55 | self.append( html ); 56 | } 57 | } ); 58 | }, 59 | 60 | wrap: function( html ) { 61 | var isFunction = jQuery.isFunction( html ); 62 | 63 | return this.each( function( i ) { 64 | jQuery( this ).wrapAll( isFunction ? html.call( this, i ) : html ); 65 | } ); 66 | }, 67 | 68 | unwrap: function( selector ) { 69 | this.parent( selector ).not( "body" ).each( function() { 70 | jQuery( this ).replaceWith( this.childNodes ); 71 | } ); 72 | return this; 73 | } 74 | } ); 75 | 76 | return jQuery; 77 | } ); 78 | -------------------------------------------------------------------------------- /www/bower_components/jquery/src/core/parseHTML.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../core", 3 | "../var/document", 4 | "./var/rsingleTag", 5 | "../manipulation/buildFragment", 6 | 7 | // This is the only module that needs core/support 8 | "./support" 9 | ], function( jQuery, document, rsingleTag, buildFragment, support ) { 10 | 11 | "use strict"; 12 | 13 | // Argument "data" should be string of html 14 | // context (optional): If specified, the fragment will be created in this context, 15 | // defaults to document 16 | // keepScripts (optional): If true, will include scripts passed in the html string 17 | jQuery.parseHTML = function( data, context, keepScripts ) { 18 | if ( typeof data !== "string" ) { 19 | return []; 20 | } 21 | if ( typeof context === "boolean" ) { 22 | keepScripts = context; 23 | context = false; 24 | } 25 | 26 | var base, parsed, scripts; 27 | 28 | if ( !context ) { 29 | 30 | // Stop scripts or inline event handlers from being executed immediately 31 | // by using document.implementation 32 | if ( support.createHTMLDocument ) { 33 | context = document.implementation.createHTMLDocument( "" ); 34 | 35 | // Set the base href for the created document 36 | // so any parsed elements with URLs 37 | // are based on the document's URL (gh-2965) 38 | base = context.createElement( "base" ); 39 | base.href = document.location.href; 40 | context.head.appendChild( base ); 41 | } else { 42 | context = document; 43 | } 44 | } 45 | 46 | parsed = rsingleTag.exec( data ); 47 | scripts = !keepScripts && []; 48 | 49 | // Single tag 50 | if ( parsed ) { 51 | return [ context.createElement( parsed[ 1 ] ) ]; 52 | } 53 | 54 | parsed = buildFragment( [ data ], context, scripts ); 55 | 56 | if ( scripts && scripts.length ) { 57 | jQuery( scripts ).remove(); 58 | } 59 | 60 | return jQuery.merge( [], parsed.childNodes ); 61 | }; 62 | 63 | return jQuery.parseHTML; 64 | 65 | } ); 66 | -------------------------------------------------------------------------------- /www/bower_components/jquery/src/ajax/script.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../core", 3 | "../var/document", 4 | "../ajax" 5 | ], function( jQuery, document ) { 6 | 7 | "use strict"; 8 | 9 | // Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432) 10 | jQuery.ajaxPrefilter( function( s ) { 11 | if ( s.crossDomain ) { 12 | s.contents.script = false; 13 | } 14 | } ); 15 | 16 | // Install script dataType 17 | jQuery.ajaxSetup( { 18 | accepts: { 19 | script: "text/javascript, application/javascript, " + 20 | "application/ecmascript, application/x-ecmascript" 21 | }, 22 | contents: { 23 | script: /\b(?:java|ecma)script\b/ 24 | }, 25 | converters: { 26 | "text script": function( text ) { 27 | jQuery.globalEval( text ); 28 | return text; 29 | } 30 | } 31 | } ); 32 | 33 | // Handle cache's special case and crossDomain 34 | jQuery.ajaxPrefilter( "script", function( s ) { 35 | if ( s.cache === undefined ) { 36 | s.cache = false; 37 | } 38 | if ( s.crossDomain ) { 39 | s.type = "GET"; 40 | } 41 | } ); 42 | 43 | // Bind script tag hack transport 44 | jQuery.ajaxTransport( "script", function( s ) { 45 | 46 | // This transport only deals with cross domain requests 47 | if ( s.crossDomain ) { 48 | var script, callback; 49 | return { 50 | send: function( _, complete ) { 51 | script = jQuery( " 18 | ``` 19 | 20 | #### Babel 21 | 22 | [Babel](http://babeljs.io/) is a next generation JavaScript compiler. One of the features is the ability to use ES6/ES2015 modules now, even though browsers do not yet support this feature natively. 23 | 24 | ```js 25 | import $ from "jquery"; 26 | ``` 27 | 28 | #### Browserify/Webpack 29 | 30 | There are several ways to use [Browserify](http://browserify.org/) and [Webpack](https://webpack.github.io/). For more information on using these tools, please refer to the corresponding project's documention. In the script, including jQuery will usually look like this... 31 | 32 | ```js 33 | var $ = require("jquery"); 34 | ``` 35 | 36 | #### AMD (Asynchronous Module Definition) 37 | 38 | AMD is a module format built for the browser. For more information, we recommend [require.js' documentation](http://requirejs.org/docs/whyamd.html). 39 | 40 | ```js 41 | define(["jquery"], function($) { 42 | 43 | }); 44 | ``` 45 | 46 | ### Node 47 | 48 | To include jQuery in [Node](nodejs.org), first install with npm. 49 | 50 | ```sh 51 | npm install jquery 52 | ``` 53 | 54 | For jQuery to work in Node, a window with a document is required. Since no such window exists natively in Node, one can be mocked by tools such as [jsdom](https://github.com/tmpvar/jsdom). This can be useful for testing purposes. 55 | 56 | ```js 57 | require("jsdom").env("", function(err, window) { 58 | if (err) { 59 | console.error(err); 60 | return; 61 | } 62 | 63 | var $ = require("jquery")(window); 64 | }); 65 | ``` 66 | -------------------------------------------------------------------------------- /www/bower_components/jquery/src/ajax/load.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../core", 3 | "../core/stripAndCollapse", 4 | "../core/parseHTML", 5 | "../ajax", 6 | "../traversing", 7 | "../manipulation", 8 | "../selector" 9 | ], function( jQuery, stripAndCollapse ) { 10 | 11 | "use strict"; 12 | 13 | /** 14 | * Load a url into a page 15 | */ 16 | jQuery.fn.load = function( url, params, callback ) { 17 | var selector, type, response, 18 | self = this, 19 | off = url.indexOf( " " ); 20 | 21 | if ( off > -1 ) { 22 | selector = stripAndCollapse( url.slice( off ) ); 23 | url = url.slice( 0, off ); 24 | } 25 | 26 | // If it's a function 27 | if ( jQuery.isFunction( params ) ) { 28 | 29 | // We assume that it's the callback 30 | callback = params; 31 | params = undefined; 32 | 33 | // Otherwise, build a param string 34 | } else if ( params && typeof params === "object" ) { 35 | type = "POST"; 36 | } 37 | 38 | // If we have elements to modify, make the request 39 | if ( self.length > 0 ) { 40 | jQuery.ajax( { 41 | url: url, 42 | 43 | // If "type" variable is undefined, then "GET" method will be used. 44 | // Make value of this field explicit since 45 | // user can override it through ajaxSetup method 46 | type: type || "GET", 47 | dataType: "html", 48 | data: params 49 | } ).done( function( responseText ) { 50 | 51 | // Save response for use in complete callback 52 | response = arguments; 53 | 54 | self.html( selector ? 55 | 56 | // If a selector was specified, locate the right elements in a dummy div 57 | // Exclude scripts to avoid IE 'Permission Denied' errors 58 | jQuery( "
" ).append( jQuery.parseHTML( responseText ) ).find( selector ) : 59 | 60 | // Otherwise use the full result 61 | responseText ); 62 | 63 | // If the request succeeds, this function gets "data", "status", "jqXHR" 64 | // but they are ignored because response was set above. 65 | // If it fails, this function gets "jqXHR", "status", "error" 66 | } ).always( callback && function( jqXHR, status ) { 67 | self.each( function() { 68 | callback.apply( this, response || [ jqXHR.responseText, status, jqXHR ] ); 69 | } ); 70 | } ); 71 | } 72 | 73 | return this; 74 | }; 75 | 76 | } ); 77 | -------------------------------------------------------------------------------- /www/bower_components/jquery/src/css/adjustCSS.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../core", 3 | "../var/rcssNum" 4 | ], function( jQuery, rcssNum ) { 5 | 6 | "use strict"; 7 | 8 | function adjustCSS( elem, prop, valueParts, tween ) { 9 | var adjusted, 10 | scale = 1, 11 | maxIterations = 20, 12 | currentValue = tween ? 13 | function() { 14 | return tween.cur(); 15 | } : 16 | function() { 17 | return jQuery.css( elem, prop, "" ); 18 | }, 19 | initial = currentValue(), 20 | unit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ), 21 | 22 | // Starting value computation is required for potential unit mismatches 23 | initialInUnit = ( jQuery.cssNumber[ prop ] || unit !== "px" && +initial ) && 24 | rcssNum.exec( jQuery.css( elem, prop ) ); 25 | 26 | if ( initialInUnit && initialInUnit[ 3 ] !== unit ) { 27 | 28 | // Trust units reported by jQuery.css 29 | unit = unit || initialInUnit[ 3 ]; 30 | 31 | // Make sure we update the tween properties later on 32 | valueParts = valueParts || []; 33 | 34 | // Iteratively approximate from a nonzero starting point 35 | initialInUnit = +initial || 1; 36 | 37 | do { 38 | 39 | // If previous iteration zeroed out, double until we get *something*. 40 | // Use string for doubling so we don't accidentally see scale as unchanged below 41 | scale = scale || ".5"; 42 | 43 | // Adjust and apply 44 | initialInUnit = initialInUnit / scale; 45 | jQuery.style( elem, prop, initialInUnit + unit ); 46 | 47 | // Update scale, tolerating zero or NaN from tween.cur() 48 | // Break the loop if scale is unchanged or perfect, or if we've just had enough. 49 | } while ( 50 | scale !== ( scale = currentValue() / initial ) && scale !== 1 && --maxIterations 51 | ); 52 | } 53 | 54 | if ( valueParts ) { 55 | initialInUnit = +initialInUnit || +initial || 0; 56 | 57 | // Apply relative offset (+=/-=) if specified 58 | adjusted = valueParts[ 1 ] ? 59 | initialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] : 60 | +valueParts[ 2 ]; 61 | if ( tween ) { 62 | tween.unit = unit; 63 | tween.start = initialInUnit; 64 | tween.end = adjusted; 65 | } 66 | } 67 | return adjusted; 68 | } 69 | 70 | return adjustCSS; 71 | } ); 72 | -------------------------------------------------------------------------------- /www/bower_components/jquery/src/core/ready.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../core", 3 | "../var/document", 4 | "../core/readyException", 5 | "../deferred" 6 | ], function( jQuery, document ) { 7 | 8 | "use strict"; 9 | 10 | // The deferred used on DOM ready 11 | var readyList = jQuery.Deferred(); 12 | 13 | jQuery.fn.ready = function( fn ) { 14 | 15 | readyList 16 | .then( fn ) 17 | 18 | // Wrap jQuery.readyException in a function so that the lookup 19 | // happens at the time of error handling instead of callback 20 | // registration. 21 | .catch( function( error ) { 22 | jQuery.readyException( error ); 23 | } ); 24 | 25 | return this; 26 | }; 27 | 28 | jQuery.extend( { 29 | 30 | // Is the DOM ready to be used? Set to true once it occurs. 31 | isReady: false, 32 | 33 | // A counter to track how many items to wait for before 34 | // the ready event fires. See #6781 35 | readyWait: 1, 36 | 37 | // Hold (or release) the ready event 38 | holdReady: function( hold ) { 39 | if ( hold ) { 40 | jQuery.readyWait++; 41 | } else { 42 | jQuery.ready( true ); 43 | } 44 | }, 45 | 46 | // Handle when the DOM is ready 47 | ready: function( wait ) { 48 | 49 | // Abort if there are pending holds or we're already ready 50 | if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { 51 | return; 52 | } 53 | 54 | // Remember that the DOM is ready 55 | jQuery.isReady = true; 56 | 57 | // If a normal DOM Ready event fired, decrement, and wait if need be 58 | if ( wait !== true && --jQuery.readyWait > 0 ) { 59 | return; 60 | } 61 | 62 | // If there are functions bound, to execute 63 | readyList.resolveWith( document, [ jQuery ] ); 64 | } 65 | } ); 66 | 67 | jQuery.ready.then = readyList.then; 68 | 69 | // The ready event handler and self cleanup method 70 | function completed() { 71 | document.removeEventListener( "DOMContentLoaded", completed ); 72 | window.removeEventListener( "load", completed ); 73 | jQuery.ready(); 74 | } 75 | 76 | // Catch cases where $(document).ready() is called 77 | // after the browser event has already occurred. 78 | // Support: IE <=9 - 10 only 79 | // Older IE sometimes signals "interactive" too soon 80 | if ( document.readyState === "complete" || 81 | ( document.readyState !== "loading" && !document.documentElement.doScroll ) ) { 82 | 83 | // Handle it asynchronously to allow scripts the opportunity to delay ready 84 | window.setTimeout( jQuery.ready ); 85 | 86 | } else { 87 | 88 | // Use the handy event callback 89 | document.addEventListener( "DOMContentLoaded", completed ); 90 | 91 | // A fallback to window.onload, that will always work 92 | window.addEventListener( "load", completed ); 93 | } 94 | 95 | } ); 96 | -------------------------------------------------------------------------------- /www/bower_components/jquery/src/css/support.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../core", 3 | "../var/document", 4 | "../var/documentElement", 5 | "../var/support" 6 | ], function( jQuery, document, documentElement, support ) { 7 | 8 | "use strict"; 9 | 10 | ( function() { 11 | 12 | // Executing both pixelPosition & boxSizingReliable tests require only one layout 13 | // so they're executed at the same time to save the second computation. 14 | function computeStyleTests() { 15 | 16 | // This is a singleton, we need to execute it only once 17 | if ( !div ) { 18 | return; 19 | } 20 | 21 | div.style.cssText = 22 | "box-sizing:border-box;" + 23 | "position:relative;display:block;" + 24 | "margin:auto;border:1px;padding:1px;" + 25 | "top:1%;width:50%"; 26 | div.innerHTML = ""; 27 | documentElement.appendChild( container ); 28 | 29 | var divStyle = window.getComputedStyle( div ); 30 | pixelPositionVal = divStyle.top !== "1%"; 31 | 32 | // Support: Android 4.0 - 4.3 only, Firefox <=3 - 44 33 | reliableMarginLeftVal = divStyle.marginLeft === "2px"; 34 | boxSizingReliableVal = divStyle.width === "4px"; 35 | 36 | // Support: Android 4.0 - 4.3 only 37 | // Some styles come back with percentage values, even though they shouldn't 38 | div.style.marginRight = "50%"; 39 | pixelMarginRightVal = divStyle.marginRight === "4px"; 40 | 41 | documentElement.removeChild( container ); 42 | 43 | // Nullify the div so it wouldn't be stored in the memory and 44 | // it will also be a sign that checks already performed 45 | div = null; 46 | } 47 | 48 | var pixelPositionVal, boxSizingReliableVal, pixelMarginRightVal, reliableMarginLeftVal, 49 | container = document.createElement( "div" ), 50 | div = document.createElement( "div" ); 51 | 52 | // Finish early in limited (non-browser) environments 53 | if ( !div.style ) { 54 | return; 55 | } 56 | 57 | // Support: IE <=9 - 11 only 58 | // Style of cloned element affects source element cloned (#8908) 59 | div.style.backgroundClip = "content-box"; 60 | div.cloneNode( true ).style.backgroundClip = ""; 61 | support.clearCloneStyle = div.style.backgroundClip === "content-box"; 62 | 63 | container.style.cssText = "border:0;width:8px;height:0;top:0;left:-9999px;" + 64 | "padding:0;margin-top:1px;position:absolute"; 65 | container.appendChild( div ); 66 | 67 | jQuery.extend( support, { 68 | pixelPosition: function() { 69 | computeStyleTests(); 70 | return pixelPositionVal; 71 | }, 72 | boxSizingReliable: function() { 73 | computeStyleTests(); 74 | return boxSizingReliableVal; 75 | }, 76 | pixelMarginRight: function() { 77 | computeStyleTests(); 78 | return pixelMarginRightVal; 79 | }, 80 | reliableMarginLeft: function() { 81 | computeStyleTests(); 82 | return reliableMarginLeftVal; 83 | } 84 | } ); 85 | } )(); 86 | 87 | return support; 88 | 89 | } ); 90 | -------------------------------------------------------------------------------- /www/bower_components/jquery/src/css/showHide.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../core", 3 | "../data/var/dataPriv", 4 | "../css/var/isHiddenWithinTree" 5 | ], function( jQuery, dataPriv, isHiddenWithinTree ) { 6 | 7 | "use strict"; 8 | 9 | var defaultDisplayMap = {}; 10 | 11 | function getDefaultDisplay( elem ) { 12 | var temp, 13 | doc = elem.ownerDocument, 14 | nodeName = elem.nodeName, 15 | display = defaultDisplayMap[ nodeName ]; 16 | 17 | if ( display ) { 18 | return display; 19 | } 20 | 21 | temp = doc.body.appendChild( doc.createElement( nodeName ) ); 22 | display = jQuery.css( temp, "display" ); 23 | 24 | temp.parentNode.removeChild( temp ); 25 | 26 | if ( display === "none" ) { 27 | display = "block"; 28 | } 29 | defaultDisplayMap[ nodeName ] = display; 30 | 31 | return display; 32 | } 33 | 34 | function showHide( elements, show ) { 35 | var display, elem, 36 | values = [], 37 | index = 0, 38 | length = elements.length; 39 | 40 | // Determine new display value for elements that need to change 41 | for ( ; index < length; index++ ) { 42 | elem = elements[ index ]; 43 | if ( !elem.style ) { 44 | continue; 45 | } 46 | 47 | display = elem.style.display; 48 | if ( show ) { 49 | 50 | // Since we force visibility upon cascade-hidden elements, an immediate (and slow) 51 | // check is required in this first loop unless we have a nonempty display value (either 52 | // inline or about-to-be-restored) 53 | if ( display === "none" ) { 54 | values[ index ] = dataPriv.get( elem, "display" ) || null; 55 | if ( !values[ index ] ) { 56 | elem.style.display = ""; 57 | } 58 | } 59 | if ( elem.style.display === "" && isHiddenWithinTree( elem ) ) { 60 | values[ index ] = getDefaultDisplay( elem ); 61 | } 62 | } else { 63 | if ( display !== "none" ) { 64 | values[ index ] = "none"; 65 | 66 | // Remember what we're overwriting 67 | dataPriv.set( elem, "display", display ); 68 | } 69 | } 70 | } 71 | 72 | // Set the display of the elements in a second loop to avoid constant reflow 73 | for ( index = 0; index < length; index++ ) { 74 | if ( values[ index ] != null ) { 75 | elements[ index ].style.display = values[ index ]; 76 | } 77 | } 78 | 79 | return elements; 80 | } 81 | 82 | jQuery.fn.extend( { 83 | show: function() { 84 | return showHide( this, true ); 85 | }, 86 | hide: function() { 87 | return showHide( this ); 88 | }, 89 | toggle: function( state ) { 90 | if ( typeof state === "boolean" ) { 91 | return state ? this.show() : this.hide(); 92 | } 93 | 94 | return this.each( function() { 95 | if ( isHiddenWithinTree( this ) ) { 96 | jQuery( this ).show(); 97 | } else { 98 | jQuery( this ).hide(); 99 | } 100 | } ); 101 | } 102 | } ); 103 | 104 | return showHide; 105 | } ); 106 | -------------------------------------------------------------------------------- /www/bower_components/jquery/src/core/ready-no-deferred.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../core", 3 | "../var/document" 4 | ], function( jQuery, document ) { 5 | 6 | "use strict"; 7 | 8 | var readyCallbacks = [], 9 | whenReady = function( fn ) { 10 | readyCallbacks.push( fn ); 11 | }, 12 | executeReady = function( fn ) { 13 | 14 | // Prevent errors from freezing future callback execution (gh-1823) 15 | // Not backwards-compatible as this does not execute sync 16 | window.setTimeout( function() { 17 | fn.call( document, jQuery ); 18 | } ); 19 | }; 20 | 21 | jQuery.fn.ready = function( fn ) { 22 | whenReady( fn ); 23 | return this; 24 | }; 25 | 26 | jQuery.extend( { 27 | 28 | // Is the DOM ready to be used? Set to true once it occurs. 29 | isReady: false, 30 | 31 | // A counter to track how many items to wait for before 32 | // the ready event fires. See #6781 33 | readyWait: 1, 34 | 35 | // Hold (or release) the ready event 36 | holdReady: function( hold ) { 37 | if ( hold ) { 38 | jQuery.readyWait++; 39 | } else { 40 | jQuery.ready( true ); 41 | } 42 | }, 43 | 44 | ready: function( wait ) { 45 | 46 | // Abort if there are pending holds or we're already ready 47 | if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { 48 | return; 49 | } 50 | 51 | // Remember that the DOM is ready 52 | jQuery.isReady = true; 53 | 54 | // If a normal DOM Ready event fired, decrement, and wait if need be 55 | if ( wait !== true && --jQuery.readyWait > 0 ) { 56 | return; 57 | } 58 | 59 | whenReady = function( fn ) { 60 | readyCallbacks.push( fn ); 61 | 62 | while ( readyCallbacks.length ) { 63 | fn = readyCallbacks.shift(); 64 | if ( jQuery.isFunction( fn ) ) { 65 | executeReady( fn ); 66 | } 67 | } 68 | }; 69 | 70 | whenReady(); 71 | } 72 | } ); 73 | 74 | // Make jQuery.ready Promise consumable (gh-1778) 75 | jQuery.ready.then = jQuery.fn.ready; 76 | 77 | /** 78 | * The ready event handler and self cleanup method 79 | */ 80 | function completed() { 81 | document.removeEventListener( "DOMContentLoaded", completed ); 82 | window.removeEventListener( "load", completed ); 83 | jQuery.ready(); 84 | } 85 | 86 | // Catch cases where $(document).ready() is called 87 | // after the browser event has already occurred. 88 | // Support: IE9-10 only 89 | // Older IE sometimes signals "interactive" too soon 90 | if ( document.readyState === "complete" || 91 | ( document.readyState !== "loading" && !document.documentElement.doScroll ) ) { 92 | 93 | // Handle it asynchronously to allow scripts the opportunity to delay ready 94 | window.setTimeout( jQuery.ready ); 95 | 96 | } else { 97 | 98 | // Use the handy event callback 99 | document.addEventListener( "DOMContentLoaded", completed ); 100 | 101 | // A fallback to window.onload, that will always work 102 | window.addEventListener( "load", completed ); 103 | } 104 | 105 | } ); 106 | -------------------------------------------------------------------------------- /www/bower_components/jquery/src/manipulation/buildFragment.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../core", 3 | "./var/rtagName", 4 | "./var/rscriptType", 5 | "./wrapMap", 6 | "./getAll", 7 | "./setGlobalEval" 8 | ], function( jQuery, rtagName, rscriptType, wrapMap, getAll, setGlobalEval ) { 9 | 10 | "use strict"; 11 | 12 | var rhtml = /<|&#?\w+;/; 13 | 14 | function buildFragment( elems, context, scripts, selection, ignored ) { 15 | var elem, tmp, tag, wrap, contains, j, 16 | fragment = context.createDocumentFragment(), 17 | nodes = [], 18 | i = 0, 19 | l = elems.length; 20 | 21 | for ( ; i < l; i++ ) { 22 | elem = elems[ i ]; 23 | 24 | if ( elem || elem === 0 ) { 25 | 26 | // Add nodes directly 27 | if ( jQuery.type( elem ) === "object" ) { 28 | 29 | // Support: Android <=4.0 only, PhantomJS 1 only 30 | // push.apply(_, arraylike) throws on ancient WebKit 31 | jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem ); 32 | 33 | // Convert non-html into a text node 34 | } else if ( !rhtml.test( elem ) ) { 35 | nodes.push( context.createTextNode( elem ) ); 36 | 37 | // Convert html into DOM nodes 38 | } else { 39 | tmp = tmp || fragment.appendChild( context.createElement( "div" ) ); 40 | 41 | // Deserialize a standard representation 42 | tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase(); 43 | wrap = wrapMap[ tag ] || wrapMap._default; 44 | tmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ]; 45 | 46 | // Descend through wrappers to the right content 47 | j = wrap[ 0 ]; 48 | while ( j-- ) { 49 | tmp = tmp.lastChild; 50 | } 51 | 52 | // Support: Android <=4.0 only, PhantomJS 1 only 53 | // push.apply(_, arraylike) throws on ancient WebKit 54 | jQuery.merge( nodes, tmp.childNodes ); 55 | 56 | // Remember the top-level container 57 | tmp = fragment.firstChild; 58 | 59 | // Ensure the created nodes are orphaned (#12392) 60 | tmp.textContent = ""; 61 | } 62 | } 63 | } 64 | 65 | // Remove wrapper from fragment 66 | fragment.textContent = ""; 67 | 68 | i = 0; 69 | while ( ( elem = nodes[ i++ ] ) ) { 70 | 71 | // Skip elements already in the context collection (trac-4087) 72 | if ( selection && jQuery.inArray( elem, selection ) > -1 ) { 73 | if ( ignored ) { 74 | ignored.push( elem ); 75 | } 76 | continue; 77 | } 78 | 79 | contains = jQuery.contains( elem.ownerDocument, elem ); 80 | 81 | // Append to fragment 82 | tmp = getAll( fragment.appendChild( elem ), "script" ); 83 | 84 | // Preserve script evaluation history 85 | if ( contains ) { 86 | setGlobalEval( tmp ); 87 | } 88 | 89 | // Capture executables 90 | if ( scripts ) { 91 | j = 0; 92 | while ( ( elem = tmp[ j++ ] ) ) { 93 | if ( rscriptType.test( elem.type || "" ) ) { 94 | scripts.push( elem ); 95 | } 96 | } 97 | } 98 | } 99 | 100 | return fragment; 101 | } 102 | 103 | return buildFragment; 104 | } ); 105 | -------------------------------------------------------------------------------- /www/bower_components/jquery/src/traversing/findFilter.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../core", 3 | "../var/indexOf", 4 | "./var/rneedsContext", 5 | "../selector" 6 | ], function( jQuery, indexOf, rneedsContext ) { 7 | 8 | "use strict"; 9 | 10 | var risSimple = /^.[^:#\[\.,]*$/; 11 | 12 | // Implement the identical functionality for filter and not 13 | function winnow( elements, qualifier, not ) { 14 | if ( jQuery.isFunction( qualifier ) ) { 15 | return jQuery.grep( elements, function( elem, i ) { 16 | return !!qualifier.call( elem, i, elem ) !== not; 17 | } ); 18 | } 19 | 20 | // Single element 21 | if ( qualifier.nodeType ) { 22 | return jQuery.grep( elements, function( elem ) { 23 | return ( elem === qualifier ) !== not; 24 | } ); 25 | } 26 | 27 | // Arraylike of elements (jQuery, arguments, Array) 28 | if ( typeof qualifier !== "string" ) { 29 | return jQuery.grep( elements, function( elem ) { 30 | return ( indexOf.call( qualifier, elem ) > -1 ) !== not; 31 | } ); 32 | } 33 | 34 | // Simple selector that can be filtered directly, removing non-Elements 35 | if ( risSimple.test( qualifier ) ) { 36 | return jQuery.filter( qualifier, elements, not ); 37 | } 38 | 39 | // Complex selector, compare the two sets, removing non-Elements 40 | qualifier = jQuery.filter( qualifier, elements ); 41 | return jQuery.grep( elements, function( elem ) { 42 | return ( indexOf.call( qualifier, elem ) > -1 ) !== not && elem.nodeType === 1; 43 | } ); 44 | } 45 | 46 | jQuery.filter = function( expr, elems, not ) { 47 | var elem = elems[ 0 ]; 48 | 49 | if ( not ) { 50 | expr = ":not(" + expr + ")"; 51 | } 52 | 53 | if ( elems.length === 1 && elem.nodeType === 1 ) { 54 | return jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : []; 55 | } 56 | 57 | return jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) { 58 | return elem.nodeType === 1; 59 | } ) ); 60 | }; 61 | 62 | jQuery.fn.extend( { 63 | find: function( selector ) { 64 | var i, ret, 65 | len = this.length, 66 | self = this; 67 | 68 | if ( typeof selector !== "string" ) { 69 | return this.pushStack( jQuery( selector ).filter( function() { 70 | for ( i = 0; i < len; i++ ) { 71 | if ( jQuery.contains( self[ i ], this ) ) { 72 | return true; 73 | } 74 | } 75 | } ) ); 76 | } 77 | 78 | ret = this.pushStack( [] ); 79 | 80 | for ( i = 0; i < len; i++ ) { 81 | jQuery.find( selector, self[ i ], ret ); 82 | } 83 | 84 | return len > 1 ? jQuery.uniqueSort( ret ) : ret; 85 | }, 86 | filter: function( selector ) { 87 | return this.pushStack( winnow( this, selector || [], false ) ); 88 | }, 89 | not: function( selector ) { 90 | return this.pushStack( winnow( this, selector || [], true ) ); 91 | }, 92 | is: function( selector ) { 93 | return !!winnow( 94 | this, 95 | 96 | // If this is a positional/relative selector, check membership in the returned set 97 | // so $("p:first").is("p:last") won't return true for a doc with two "p". 98 | typeof selector === "string" && rneedsContext.test( selector ) ? 99 | jQuery( selector ) : 100 | selector || [], 101 | false 102 | ).length; 103 | } 104 | } ); 105 | 106 | } ); 107 | -------------------------------------------------------------------------------- /www/bower_components/jquery/src/ajax/jsonp.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../core", 3 | "./var/nonce", 4 | "./var/rquery", 5 | "../ajax" 6 | ], function( jQuery, nonce, rquery ) { 7 | 8 | "use strict"; 9 | 10 | var oldCallbacks = [], 11 | rjsonp = /(=)\?(?=&|$)|\?\?/; 12 | 13 | // Default jsonp settings 14 | jQuery.ajaxSetup( { 15 | jsonp: "callback", 16 | jsonpCallback: function() { 17 | var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( nonce++ ) ); 18 | this[ callback ] = true; 19 | return callback; 20 | } 21 | } ); 22 | 23 | // Detect, normalize options and install callbacks for jsonp requests 24 | jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) { 25 | 26 | var callbackName, overwritten, responseContainer, 27 | jsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ? 28 | "url" : 29 | typeof s.data === "string" && 30 | ( s.contentType || "" ) 31 | .indexOf( "application/x-www-form-urlencoded" ) === 0 && 32 | rjsonp.test( s.data ) && "data" 33 | ); 34 | 35 | // Handle iff the expected data type is "jsonp" or we have a parameter to set 36 | if ( jsonProp || s.dataTypes[ 0 ] === "jsonp" ) { 37 | 38 | // Get callback name, remembering preexisting value associated with it 39 | callbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ? 40 | s.jsonpCallback() : 41 | s.jsonpCallback; 42 | 43 | // Insert callback into url or form data 44 | if ( jsonProp ) { 45 | s[ jsonProp ] = s[ jsonProp ].replace( rjsonp, "$1" + callbackName ); 46 | } else if ( s.jsonp !== false ) { 47 | s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName; 48 | } 49 | 50 | // Use data converter to retrieve json after script execution 51 | s.converters[ "script json" ] = function() { 52 | if ( !responseContainer ) { 53 | jQuery.error( callbackName + " was not called" ); 54 | } 55 | return responseContainer[ 0 ]; 56 | }; 57 | 58 | // Force json dataType 59 | s.dataTypes[ 0 ] = "json"; 60 | 61 | // Install callback 62 | overwritten = window[ callbackName ]; 63 | window[ callbackName ] = function() { 64 | responseContainer = arguments; 65 | }; 66 | 67 | // Clean-up function (fires after converters) 68 | jqXHR.always( function() { 69 | 70 | // If previous value didn't exist - remove it 71 | if ( overwritten === undefined ) { 72 | jQuery( window ).removeProp( callbackName ); 73 | 74 | // Otherwise restore preexisting value 75 | } else { 76 | window[ callbackName ] = overwritten; 77 | } 78 | 79 | // Save back as free 80 | if ( s[ callbackName ] ) { 81 | 82 | // Make sure that re-using the options doesn't screw things around 83 | s.jsonpCallback = originalSettings.jsonpCallback; 84 | 85 | // Save the callback name for future use 86 | oldCallbacks.push( callbackName ); 87 | } 88 | 89 | // Call if it was a function and we have a response 90 | if ( responseContainer && jQuery.isFunction( overwritten ) ) { 91 | overwritten( responseContainer[ 0 ] ); 92 | } 93 | 94 | responseContainer = overwritten = undefined; 95 | } ); 96 | 97 | // Delegate to script 98 | return "script"; 99 | } 100 | } ); 101 | 102 | } ); 103 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Tor-share 2 | 3 | ## Purpose 4 | 5 | With Tor-share you can chat, share files or publish a simple PHP website anonymously on Tor network, The Onion 6 | Router. Tor-share is a light Alpine Linux Docker image. 7 | 8 | More about Tor network: https://en.wikipedia.org/wiki/Tor_(anonymity_network) 9 | 10 | Features: 11 | * Chat 12 | * Share files 13 | * Publish a simple PHP website 14 | 15 | ![Screenshot](screenshot.png) 16 | 17 | ## Launch your hidden service in 2 minutes 18 | 19 | Launch Tor-share on Ubuntu 16.04: 20 | 21 | # First you need to install Docker 22 | $ curl -sSL https://get.docker.com/ | sh 23 | 24 | # Then download image and launch container: 25 | $ docker run -d -p 9050:9050 remipassmoilesel/tor-share 26 | 27 | /!\ Warning /!\ 28 | - This is a test image, for maximum safety you have to build your own. 29 | See below, this is just about few minutes. 30 | - Never, never, never expose other ports to outside. 31 | No one should be able to access your container without using Tor. 32 | 33 | 34 | ## Get URL (location) of hidden service 35 | 36 | # First get container IP address 37 | $ docker ps 38 | 39 | CONTAINER ID IMAGE ... 40 | 2e23d01384ac ... 41 | 42 | $ docker inspect --format '{{ .NetworkSettings.IPAddress }}' 2e23d 43 | 44 | 172.17.0.2 45 | 46 | # Then visit https://172.17.0.2 address with a normal browser or: 47 | $ curl -k -u anonymous-tux:password https://172.17.0.2/hostname 48 | 49 | 7b436d6e7ipz4kbo.onion 50 | 51 | # Then you can visit https://7b436d6e7ipz4kbo.onion with Tor browser. 52 | /!\ Visitors have to specify https:// and to add a security exception. 53 | 54 | 55 | ## Authentication 56 | 57 | Visits are restricted with Lighttpd basic authentication. Default credentials are: 58 | 59 | anonymous-tux:password 60 | anonymous-tux2:password2 61 | 62 | Before building you can add users or change passwords: 63 | 64 | $ vim etc/lighttpd/lighttpd-password 65 | 66 | 67 | ## Before use Tor-share 68 | 69 | - Build your own image ! 70 | 71 | - Change all passwords ! 72 | 73 | ## SSH connection for file management 74 | 75 | # When your container is set up, you can connect it in SSH with default credentials (anonymous-tux:password) 76 | $ ssh -v anonymous-tux@172.17.0.2 77 | 78 | # You can change account credentials in Dockerfile: 79 | $ vim Dockerfile 80 | 81 | # Change default credentials here 82 | RUN echo "anonymous-tux:password" | chpasswd 83 | 84 | # All files are in 'www' directory 85 | $ cd /www 86 | $ ls . 87 | $ ls upload/ 88 | $ ls chat/ 89 | 90 | 91 | ## Publish a web site 92 | 93 | All files in 'www/' directory are accessible via Lighttpd server in Tor browser. 94 | 95 | 96 | ## Build your own image 97 | 98 | On Ubuntu 16.04: 99 | 100 | # First you need to install Docker 101 | $ curl -sSL https://get.docker.com/ | sh 102 | 103 | # After clone this repository and create your image 104 | $ git clone https://github.com/remipassmoilesel/tor-share 105 | $ cd tor-share 106 | $ git submodule init 107 | $ git submodule update 108 | $ docker build . -t tor-share 109 | 110 | # Then launch a container and expose Tor port 111 | $ docker run -d -p 9050:9050 tor-share 112 | 113 | /!\ Warning /!\ 114 | - Never, never, never expose other ports to outside. 115 | No one should be able to access your container without using Tor. 116 | 117 | -------------------------------------------------------------------------------- /www/bower_components/jquery/src/attributes/prop.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../core", 3 | "../core/access", 4 | "./support", 5 | "../selector" 6 | ], function( jQuery, access, support ) { 7 | 8 | "use strict"; 9 | 10 | var rfocusable = /^(?:input|select|textarea|button)$/i, 11 | rclickable = /^(?:a|area)$/i; 12 | 13 | jQuery.fn.extend( { 14 | prop: function( name, value ) { 15 | return access( this, jQuery.prop, name, value, arguments.length > 1 ); 16 | }, 17 | 18 | removeProp: function( name ) { 19 | return this.each( function() { 20 | delete this[ jQuery.propFix[ name ] || name ]; 21 | } ); 22 | } 23 | } ); 24 | 25 | jQuery.extend( { 26 | prop: function( elem, name, value ) { 27 | var ret, hooks, 28 | nType = elem.nodeType; 29 | 30 | // Don't get/set properties on text, comment and attribute nodes 31 | if ( nType === 3 || nType === 8 || nType === 2 ) { 32 | return; 33 | } 34 | 35 | if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { 36 | 37 | // Fix name and attach hooks 38 | name = jQuery.propFix[ name ] || name; 39 | hooks = jQuery.propHooks[ name ]; 40 | } 41 | 42 | if ( value !== undefined ) { 43 | if ( hooks && "set" in hooks && 44 | ( ret = hooks.set( elem, value, name ) ) !== undefined ) { 45 | return ret; 46 | } 47 | 48 | return ( elem[ name ] = value ); 49 | } 50 | 51 | if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) { 52 | return ret; 53 | } 54 | 55 | return elem[ name ]; 56 | }, 57 | 58 | propHooks: { 59 | tabIndex: { 60 | get: function( elem ) { 61 | 62 | // Support: IE <=9 - 11 only 63 | // elem.tabIndex doesn't always return the 64 | // correct value when it hasn't been explicitly set 65 | // https://web.archive.org/web/20141116233347/http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ 66 | // Use proper attribute retrieval(#12072) 67 | var tabindex = jQuery.find.attr( elem, "tabindex" ); 68 | 69 | if ( tabindex ) { 70 | return parseInt( tabindex, 10 ); 71 | } 72 | 73 | if ( 74 | rfocusable.test( elem.nodeName ) || 75 | rclickable.test( elem.nodeName ) && 76 | elem.href 77 | ) { 78 | return 0; 79 | } 80 | 81 | return -1; 82 | } 83 | } 84 | }, 85 | 86 | propFix: { 87 | "for": "htmlFor", 88 | "class": "className" 89 | } 90 | } ); 91 | 92 | // Support: IE <=11 only 93 | // Accessing the selectedIndex property 94 | // forces the browser to respect setting selected 95 | // on the option 96 | // The getter ensures a default option is selected 97 | // when in an optgroup 98 | // eslint rule "no-unused-expressions" is disabled for this code 99 | // since it considers such accessions noop 100 | if ( !support.optSelected ) { 101 | jQuery.propHooks.selected = { 102 | get: function( elem ) { 103 | 104 | /* eslint no-unused-expressions: "off" */ 105 | 106 | var parent = elem.parentNode; 107 | if ( parent && parent.parentNode ) { 108 | parent.parentNode.selectedIndex; 109 | } 110 | return null; 111 | }, 112 | set: function( elem ) { 113 | 114 | /* eslint no-unused-expressions: "off" */ 115 | 116 | var parent = elem.parentNode; 117 | if ( parent ) { 118 | parent.selectedIndex; 119 | 120 | if ( parent.parentNode ) { 121 | parent.parentNode.selectedIndex; 122 | } 123 | } 124 | } 125 | }; 126 | } 127 | 128 | jQuery.each( [ 129 | "tabIndex", 130 | "readOnly", 131 | "maxLength", 132 | "cellSpacing", 133 | "cellPadding", 134 | "rowSpan", 135 | "colSpan", 136 | "useMap", 137 | "frameBorder", 138 | "contentEditable" 139 | ], function() { 140 | jQuery.propFix[ this.toLowerCase() ] = this; 141 | } ); 142 | 143 | } ); 144 | -------------------------------------------------------------------------------- /www/bower_components/jquery/src/serialize.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "./core", 3 | "./manipulation/var/rcheckableType", 4 | "./core/init", 5 | "./traversing", // filter 6 | "./attributes/prop" 7 | ], function( jQuery, rcheckableType ) { 8 | 9 | "use strict"; 10 | 11 | var 12 | rbracket = /\[\]$/, 13 | rCRLF = /\r?\n/g, 14 | rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i, 15 | rsubmittable = /^(?:input|select|textarea|keygen)/i; 16 | 17 | function buildParams( prefix, obj, traditional, add ) { 18 | var name; 19 | 20 | if ( jQuery.isArray( obj ) ) { 21 | 22 | // Serialize array item. 23 | jQuery.each( obj, function( i, v ) { 24 | if ( traditional || rbracket.test( prefix ) ) { 25 | 26 | // Treat each array item as a scalar. 27 | add( prefix, v ); 28 | 29 | } else { 30 | 31 | // Item is non-scalar (array or object), encode its numeric index. 32 | buildParams( 33 | prefix + "[" + ( typeof v === "object" && v != null ? i : "" ) + "]", 34 | v, 35 | traditional, 36 | add 37 | ); 38 | } 39 | } ); 40 | 41 | } else if ( !traditional && jQuery.type( obj ) === "object" ) { 42 | 43 | // Serialize object item. 44 | for ( name in obj ) { 45 | buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add ); 46 | } 47 | 48 | } else { 49 | 50 | // Serialize scalar item. 51 | add( prefix, obj ); 52 | } 53 | } 54 | 55 | // Serialize an array of form elements or a set of 56 | // key/values into a query string 57 | jQuery.param = function( a, traditional ) { 58 | var prefix, 59 | s = [], 60 | add = function( key, valueOrFunction ) { 61 | 62 | // If value is a function, invoke it and use its return value 63 | var value = jQuery.isFunction( valueOrFunction ) ? 64 | valueOrFunction() : 65 | valueOrFunction; 66 | 67 | s[ s.length ] = encodeURIComponent( key ) + "=" + 68 | encodeURIComponent( value == null ? "" : value ); 69 | }; 70 | 71 | // If an array was passed in, assume that it is an array of form elements. 72 | if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) { 73 | 74 | // Serialize the form elements 75 | jQuery.each( a, function() { 76 | add( this.name, this.value ); 77 | } ); 78 | 79 | } else { 80 | 81 | // If traditional, encode the "old" way (the way 1.3.2 or older 82 | // did it), otherwise encode params recursively. 83 | for ( prefix in a ) { 84 | buildParams( prefix, a[ prefix ], traditional, add ); 85 | } 86 | } 87 | 88 | // Return the resulting serialization 89 | return s.join( "&" ); 90 | }; 91 | 92 | jQuery.fn.extend( { 93 | serialize: function() { 94 | return jQuery.param( this.serializeArray() ); 95 | }, 96 | serializeArray: function() { 97 | return this.map( function() { 98 | 99 | // Can add propHook for "elements" to filter or add form elements 100 | var elements = jQuery.prop( this, "elements" ); 101 | return elements ? jQuery.makeArray( elements ) : this; 102 | } ) 103 | .filter( function() { 104 | var type = this.type; 105 | 106 | // Use .is( ":disabled" ) so that fieldset[disabled] works 107 | return this.name && !jQuery( this ).is( ":disabled" ) && 108 | rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) && 109 | ( this.checked || !rcheckableType.test( type ) ); 110 | } ) 111 | .map( function( i, elem ) { 112 | var val = jQuery( this ).val(); 113 | 114 | if ( val == null ) { 115 | return null; 116 | } 117 | 118 | if ( jQuery.isArray( val ) ) { 119 | return jQuery.map( val, function( val ) { 120 | return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; 121 | } ); 122 | } 123 | 124 | return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; 125 | } ).get(); 126 | } 127 | } ); 128 | 129 | return jQuery; 130 | } ); 131 | -------------------------------------------------------------------------------- /www/bower_components/jquery/src/queue.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "./core", 3 | "./data/var/dataPriv", 4 | "./deferred", 5 | "./callbacks" 6 | ], function( jQuery, dataPriv ) { 7 | 8 | "use strict"; 9 | 10 | jQuery.extend( { 11 | queue: function( elem, type, data ) { 12 | var queue; 13 | 14 | if ( elem ) { 15 | type = ( type || "fx" ) + "queue"; 16 | queue = dataPriv.get( elem, type ); 17 | 18 | // Speed up dequeue by getting out quickly if this is just a lookup 19 | if ( data ) { 20 | if ( !queue || jQuery.isArray( data ) ) { 21 | queue = dataPriv.access( elem, type, jQuery.makeArray( data ) ); 22 | } else { 23 | queue.push( data ); 24 | } 25 | } 26 | return queue || []; 27 | } 28 | }, 29 | 30 | dequeue: function( elem, type ) { 31 | type = type || "fx"; 32 | 33 | var queue = jQuery.queue( elem, type ), 34 | startLength = queue.length, 35 | fn = queue.shift(), 36 | hooks = jQuery._queueHooks( elem, type ), 37 | next = function() { 38 | jQuery.dequeue( elem, type ); 39 | }; 40 | 41 | // If the fx queue is dequeued, always remove the progress sentinel 42 | if ( fn === "inprogress" ) { 43 | fn = queue.shift(); 44 | startLength--; 45 | } 46 | 47 | if ( fn ) { 48 | 49 | // Add a progress sentinel to prevent the fx queue from being 50 | // automatically dequeued 51 | if ( type === "fx" ) { 52 | queue.unshift( "inprogress" ); 53 | } 54 | 55 | // Clear up the last queue stop function 56 | delete hooks.stop; 57 | fn.call( elem, next, hooks ); 58 | } 59 | 60 | if ( !startLength && hooks ) { 61 | hooks.empty.fire(); 62 | } 63 | }, 64 | 65 | // Not public - generate a queueHooks object, or return the current one 66 | _queueHooks: function( elem, type ) { 67 | var key = type + "queueHooks"; 68 | return dataPriv.get( elem, key ) || dataPriv.access( elem, key, { 69 | empty: jQuery.Callbacks( "once memory" ).add( function() { 70 | dataPriv.remove( elem, [ type + "queue", key ] ); 71 | } ) 72 | } ); 73 | } 74 | } ); 75 | 76 | jQuery.fn.extend( { 77 | queue: function( type, data ) { 78 | var setter = 2; 79 | 80 | if ( typeof type !== "string" ) { 81 | data = type; 82 | type = "fx"; 83 | setter--; 84 | } 85 | 86 | if ( arguments.length < setter ) { 87 | return jQuery.queue( this[ 0 ], type ); 88 | } 89 | 90 | return data === undefined ? 91 | this : 92 | this.each( function() { 93 | var queue = jQuery.queue( this, type, data ); 94 | 95 | // Ensure a hooks for this queue 96 | jQuery._queueHooks( this, type ); 97 | 98 | if ( type === "fx" && queue[ 0 ] !== "inprogress" ) { 99 | jQuery.dequeue( this, type ); 100 | } 101 | } ); 102 | }, 103 | dequeue: function( type ) { 104 | return this.each( function() { 105 | jQuery.dequeue( this, type ); 106 | } ); 107 | }, 108 | clearQueue: function( type ) { 109 | return this.queue( type || "fx", [] ); 110 | }, 111 | 112 | // Get a promise resolved when queues of a certain type 113 | // are emptied (fx is the type by default) 114 | promise: function( type, obj ) { 115 | var tmp, 116 | count = 1, 117 | defer = jQuery.Deferred(), 118 | elements = this, 119 | i = this.length, 120 | resolve = function() { 121 | if ( !( --count ) ) { 122 | defer.resolveWith( elements, [ elements ] ); 123 | } 124 | }; 125 | 126 | if ( typeof type !== "string" ) { 127 | obj = type; 128 | type = undefined; 129 | } 130 | type = type || "fx"; 131 | 132 | while ( i-- ) { 133 | tmp = dataPriv.get( elements[ i ], type + "queueHooks" ); 134 | if ( tmp && tmp.empty ) { 135 | count++; 136 | tmp.empty.add( resolve ); 137 | } 138 | } 139 | resolve(); 140 | return defer.promise( obj ); 141 | } 142 | } ); 143 | 144 | return jQuery; 145 | } ); 146 | -------------------------------------------------------------------------------- /www/bower_components/jquery/src/effects/Tween.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../core", 3 | "../css" 4 | ], function( jQuery ) { 5 | 6 | "use strict"; 7 | 8 | function Tween( elem, options, prop, end, easing ) { 9 | return new Tween.prototype.init( elem, options, prop, end, easing ); 10 | } 11 | jQuery.Tween = Tween; 12 | 13 | Tween.prototype = { 14 | constructor: Tween, 15 | init: function( elem, options, prop, end, easing, unit ) { 16 | this.elem = elem; 17 | this.prop = prop; 18 | this.easing = easing || jQuery.easing._default; 19 | this.options = options; 20 | this.start = this.now = this.cur(); 21 | this.end = end; 22 | this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" ); 23 | }, 24 | cur: function() { 25 | var hooks = Tween.propHooks[ this.prop ]; 26 | 27 | return hooks && hooks.get ? 28 | hooks.get( this ) : 29 | Tween.propHooks._default.get( this ); 30 | }, 31 | run: function( percent ) { 32 | var eased, 33 | hooks = Tween.propHooks[ this.prop ]; 34 | 35 | if ( this.options.duration ) { 36 | this.pos = eased = jQuery.easing[ this.easing ]( 37 | percent, this.options.duration * percent, 0, 1, this.options.duration 38 | ); 39 | } else { 40 | this.pos = eased = percent; 41 | } 42 | this.now = ( this.end - this.start ) * eased + this.start; 43 | 44 | if ( this.options.step ) { 45 | this.options.step.call( this.elem, this.now, this ); 46 | } 47 | 48 | if ( hooks && hooks.set ) { 49 | hooks.set( this ); 50 | } else { 51 | Tween.propHooks._default.set( this ); 52 | } 53 | return this; 54 | } 55 | }; 56 | 57 | Tween.prototype.init.prototype = Tween.prototype; 58 | 59 | Tween.propHooks = { 60 | _default: { 61 | get: function( tween ) { 62 | var result; 63 | 64 | // Use a property on the element directly when it is not a DOM element, 65 | // or when there is no matching style property that exists. 66 | if ( tween.elem.nodeType !== 1 || 67 | tween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) { 68 | return tween.elem[ tween.prop ]; 69 | } 70 | 71 | // Passing an empty string as a 3rd parameter to .css will automatically 72 | // attempt a parseFloat and fallback to a string if the parse fails. 73 | // Simple values such as "10px" are parsed to Float; 74 | // complex values such as "rotate(1rad)" are returned as-is. 75 | result = jQuery.css( tween.elem, tween.prop, "" ); 76 | 77 | // Empty strings, null, undefined and "auto" are converted to 0. 78 | return !result || result === "auto" ? 0 : result; 79 | }, 80 | set: function( tween ) { 81 | 82 | // Use step hook for back compat. 83 | // Use cssHook if its there. 84 | // Use .style if available and use plain properties where available. 85 | if ( jQuery.fx.step[ tween.prop ] ) { 86 | jQuery.fx.step[ tween.prop ]( tween ); 87 | } else if ( tween.elem.nodeType === 1 && 88 | ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || 89 | jQuery.cssHooks[ tween.prop ] ) ) { 90 | jQuery.style( tween.elem, tween.prop, tween.now + tween.unit ); 91 | } else { 92 | tween.elem[ tween.prop ] = tween.now; 93 | } 94 | } 95 | } 96 | }; 97 | 98 | // Support: IE <=9 only 99 | // Panic based approach to setting things on disconnected nodes 100 | Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = { 101 | set: function( tween ) { 102 | if ( tween.elem.nodeType && tween.elem.parentNode ) { 103 | tween.elem[ tween.prop ] = tween.now; 104 | } 105 | } 106 | }; 107 | 108 | jQuery.easing = { 109 | linear: function( p ) { 110 | return p; 111 | }, 112 | swing: function( p ) { 113 | return 0.5 - Math.cos( p * Math.PI ) / 2; 114 | }, 115 | _default: "swing" 116 | }; 117 | 118 | jQuery.fx = Tween.prototype.init; 119 | 120 | // Back compat <1.8 extension point 121 | jQuery.fx.step = {}; 122 | 123 | } ); 124 | -------------------------------------------------------------------------------- /www/bower_components/jquery/src/core/init.js: -------------------------------------------------------------------------------- 1 | // Initialize a jQuery object 2 | define( [ 3 | "../core", 4 | "../var/document", 5 | "./var/rsingleTag", 6 | "../traversing/findFilter" 7 | ], function( jQuery, document, rsingleTag ) { 8 | 9 | "use strict"; 10 | 11 | // A central reference to the root jQuery(document) 12 | var rootjQuery, 13 | 14 | // A simple way to check for HTML strings 15 | // Prioritize #id over to avoid XSS via location.hash (#9521) 16 | // Strict HTML recognition (#11290: must start with <) 17 | // Shortcut simple #id case for speed 18 | rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/, 19 | 20 | init = jQuery.fn.init = function( selector, context, root ) { 21 | var match, elem; 22 | 23 | // HANDLE: $(""), $(null), $(undefined), $(false) 24 | if ( !selector ) { 25 | return this; 26 | } 27 | 28 | // Method init() accepts an alternate rootjQuery 29 | // so migrate can support jQuery.sub (gh-2101) 30 | root = root || rootjQuery; 31 | 32 | // Handle HTML strings 33 | if ( typeof selector === "string" ) { 34 | if ( selector[ 0 ] === "<" && 35 | selector[ selector.length - 1 ] === ">" && 36 | selector.length >= 3 ) { 37 | 38 | // Assume that strings that start and end with <> are HTML and skip the regex check 39 | match = [ null, selector, null ]; 40 | 41 | } else { 42 | match = rquickExpr.exec( selector ); 43 | } 44 | 45 | // Match html or make sure no context is specified for #id 46 | if ( match && ( match[ 1 ] || !context ) ) { 47 | 48 | // HANDLE: $(html) -> $(array) 49 | if ( match[ 1 ] ) { 50 | context = context instanceof jQuery ? context[ 0 ] : context; 51 | 52 | // Option to run scripts is true for back-compat 53 | // Intentionally let the error be thrown if parseHTML is not present 54 | jQuery.merge( this, jQuery.parseHTML( 55 | match[ 1 ], 56 | context && context.nodeType ? context.ownerDocument || context : document, 57 | true 58 | ) ); 59 | 60 | // HANDLE: $(html, props) 61 | if ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) { 62 | for ( match in context ) { 63 | 64 | // Properties of context are called as methods if possible 65 | if ( jQuery.isFunction( this[ match ] ) ) { 66 | this[ match ]( context[ match ] ); 67 | 68 | // ...and otherwise set as attributes 69 | } else { 70 | this.attr( match, context[ match ] ); 71 | } 72 | } 73 | } 74 | 75 | return this; 76 | 77 | // HANDLE: $(#id) 78 | } else { 79 | elem = document.getElementById( match[ 2 ] ); 80 | 81 | if ( elem ) { 82 | 83 | // Inject the element directly into the jQuery object 84 | this[ 0 ] = elem; 85 | this.length = 1; 86 | } 87 | return this; 88 | } 89 | 90 | // HANDLE: $(expr, $(...)) 91 | } else if ( !context || context.jquery ) { 92 | return ( context || root ).find( selector ); 93 | 94 | // HANDLE: $(expr, context) 95 | // (which is just equivalent to: $(context).find(expr) 96 | } else { 97 | return this.constructor( context ).find( selector ); 98 | } 99 | 100 | // HANDLE: $(DOMElement) 101 | } else if ( selector.nodeType ) { 102 | this[ 0 ] = selector; 103 | this.length = 1; 104 | return this; 105 | 106 | // HANDLE: $(function) 107 | // Shortcut for document ready 108 | } else if ( jQuery.isFunction( selector ) ) { 109 | return root.ready !== undefined ? 110 | root.ready( selector ) : 111 | 112 | // Execute immediately if ready is not present 113 | selector( jQuery ); 114 | } 115 | 116 | return jQuery.makeArray( selector, this ); 117 | }; 118 | 119 | // Give the init function the jQuery prototype for later instantiation 120 | init.prototype = jQuery.fn; 121 | 122 | // Initialize central reference 123 | rootjQuery = jQuery( document ); 124 | 125 | return init; 126 | 127 | } ); 128 | -------------------------------------------------------------------------------- /www/bower_components/jquery/src/attributes/attr.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../core", 3 | "../core/access", 4 | "./support", 5 | "../var/rnothtmlwhite", 6 | "../selector" 7 | ], function( jQuery, access, support, rnothtmlwhite ) { 8 | 9 | "use strict"; 10 | 11 | var boolHook, 12 | attrHandle = jQuery.expr.attrHandle; 13 | 14 | jQuery.fn.extend( { 15 | attr: function( name, value ) { 16 | return access( this, jQuery.attr, name, value, arguments.length > 1 ); 17 | }, 18 | 19 | removeAttr: function( name ) { 20 | return this.each( function() { 21 | jQuery.removeAttr( this, name ); 22 | } ); 23 | } 24 | } ); 25 | 26 | jQuery.extend( { 27 | attr: function( elem, name, value ) { 28 | var ret, hooks, 29 | nType = elem.nodeType; 30 | 31 | // Don't get/set attributes on text, comment and attribute nodes 32 | if ( nType === 3 || nType === 8 || nType === 2 ) { 33 | return; 34 | } 35 | 36 | // Fallback to prop when attributes are not supported 37 | if ( typeof elem.getAttribute === "undefined" ) { 38 | return jQuery.prop( elem, name, value ); 39 | } 40 | 41 | // Attribute hooks are determined by the lowercase version 42 | // Grab necessary hook if one is defined 43 | if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { 44 | hooks = jQuery.attrHooks[ name.toLowerCase() ] || 45 | ( jQuery.expr.match.bool.test( name ) ? boolHook : undefined ); 46 | } 47 | 48 | if ( value !== undefined ) { 49 | if ( value === null ) { 50 | jQuery.removeAttr( elem, name ); 51 | return; 52 | } 53 | 54 | if ( hooks && "set" in hooks && 55 | ( ret = hooks.set( elem, value, name ) ) !== undefined ) { 56 | return ret; 57 | } 58 | 59 | elem.setAttribute( name, value + "" ); 60 | return value; 61 | } 62 | 63 | if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) { 64 | return ret; 65 | } 66 | 67 | ret = jQuery.find.attr( elem, name ); 68 | 69 | // Non-existent attributes return null, we normalize to undefined 70 | return ret == null ? undefined : ret; 71 | }, 72 | 73 | attrHooks: { 74 | type: { 75 | set: function( elem, value ) { 76 | if ( !support.radioValue && value === "radio" && 77 | jQuery.nodeName( elem, "input" ) ) { 78 | var val = elem.value; 79 | elem.setAttribute( "type", value ); 80 | if ( val ) { 81 | elem.value = val; 82 | } 83 | return value; 84 | } 85 | } 86 | } 87 | }, 88 | 89 | removeAttr: function( elem, value ) { 90 | var name, 91 | i = 0, 92 | 93 | // Attribute names can contain non-HTML whitespace characters 94 | // https://html.spec.whatwg.org/multipage/syntax.html#attributes-2 95 | attrNames = value && value.match( rnothtmlwhite ); 96 | 97 | if ( attrNames && elem.nodeType === 1 ) { 98 | while ( ( name = attrNames[ i++ ] ) ) { 99 | elem.removeAttribute( name ); 100 | } 101 | } 102 | } 103 | } ); 104 | 105 | // Hooks for boolean attributes 106 | boolHook = { 107 | set: function( elem, value, name ) { 108 | if ( value === false ) { 109 | 110 | // Remove boolean attributes when set to false 111 | jQuery.removeAttr( elem, name ); 112 | } else { 113 | elem.setAttribute( name, name ); 114 | } 115 | return name; 116 | } 117 | }; 118 | 119 | jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name ) { 120 | var getter = attrHandle[ name ] || jQuery.find.attr; 121 | 122 | attrHandle[ name ] = function( elem, name, isXML ) { 123 | var ret, handle, 124 | lowercaseName = name.toLowerCase(); 125 | 126 | if ( !isXML ) { 127 | 128 | // Avoid an infinite loop by temporarily removing this function from the getter 129 | handle = attrHandle[ lowercaseName ]; 130 | attrHandle[ lowercaseName ] = ret; 131 | ret = getter( elem, name, isXML ) != null ? 132 | lowercaseName : 133 | null; 134 | attrHandle[ lowercaseName ] = handle; 135 | } 136 | return ret; 137 | }; 138 | } ); 139 | 140 | } ); 141 | -------------------------------------------------------------------------------- /www/bower_components/jquery/src/data/Data.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../core", 3 | "../var/rnothtmlwhite", 4 | "./var/acceptData" 5 | ], function( jQuery, rnothtmlwhite, acceptData ) { 6 | 7 | "use strict"; 8 | 9 | function Data() { 10 | this.expando = jQuery.expando + Data.uid++; 11 | } 12 | 13 | Data.uid = 1; 14 | 15 | Data.prototype = { 16 | 17 | cache: function( owner ) { 18 | 19 | // Check if the owner object already has a cache 20 | var value = owner[ this.expando ]; 21 | 22 | // If not, create one 23 | if ( !value ) { 24 | value = {}; 25 | 26 | // We can accept data for non-element nodes in modern browsers, 27 | // but we should not, see #8335. 28 | // Always return an empty object. 29 | if ( acceptData( owner ) ) { 30 | 31 | // If it is a node unlikely to be stringify-ed or looped over 32 | // use plain assignment 33 | if ( owner.nodeType ) { 34 | owner[ this.expando ] = value; 35 | 36 | // Otherwise secure it in a non-enumerable property 37 | // configurable must be true to allow the property to be 38 | // deleted when data is removed 39 | } else { 40 | Object.defineProperty( owner, this.expando, { 41 | value: value, 42 | configurable: true 43 | } ); 44 | } 45 | } 46 | } 47 | 48 | return value; 49 | }, 50 | set: function( owner, data, value ) { 51 | var prop, 52 | cache = this.cache( owner ); 53 | 54 | // Handle: [ owner, key, value ] args 55 | // Always use camelCase key (gh-2257) 56 | if ( typeof data === "string" ) { 57 | cache[ jQuery.camelCase( data ) ] = value; 58 | 59 | // Handle: [ owner, { properties } ] args 60 | } else { 61 | 62 | // Copy the properties one-by-one to the cache object 63 | for ( prop in data ) { 64 | cache[ jQuery.camelCase( prop ) ] = data[ prop ]; 65 | } 66 | } 67 | return cache; 68 | }, 69 | get: function( owner, key ) { 70 | return key === undefined ? 71 | this.cache( owner ) : 72 | 73 | // Always use camelCase key (gh-2257) 74 | owner[ this.expando ] && owner[ this.expando ][ jQuery.camelCase( key ) ]; 75 | }, 76 | access: function( owner, key, value ) { 77 | 78 | // In cases where either: 79 | // 80 | // 1. No key was specified 81 | // 2. A string key was specified, but no value provided 82 | // 83 | // Take the "read" path and allow the get method to determine 84 | // which value to return, respectively either: 85 | // 86 | // 1. The entire cache object 87 | // 2. The data stored at the key 88 | // 89 | if ( key === undefined || 90 | ( ( key && typeof key === "string" ) && value === undefined ) ) { 91 | 92 | return this.get( owner, key ); 93 | } 94 | 95 | // When the key is not a string, or both a key and value 96 | // are specified, set or extend (existing objects) with either: 97 | // 98 | // 1. An object of properties 99 | // 2. A key and value 100 | // 101 | this.set( owner, key, value ); 102 | 103 | // Since the "set" path can have two possible entry points 104 | // return the expected data based on which path was taken[*] 105 | return value !== undefined ? value : key; 106 | }, 107 | remove: function( owner, key ) { 108 | var i, 109 | cache = owner[ this.expando ]; 110 | 111 | if ( cache === undefined ) { 112 | return; 113 | } 114 | 115 | if ( key !== undefined ) { 116 | 117 | // Support array or space separated string of keys 118 | if ( jQuery.isArray( key ) ) { 119 | 120 | // If key is an array of keys... 121 | // We always set camelCase keys, so remove that. 122 | key = key.map( jQuery.camelCase ); 123 | } else { 124 | key = jQuery.camelCase( key ); 125 | 126 | // If a key with the spaces exists, use it. 127 | // Otherwise, create an array by matching non-whitespace 128 | key = key in cache ? 129 | [ key ] : 130 | ( key.match( rnothtmlwhite ) || [] ); 131 | } 132 | 133 | i = key.length; 134 | 135 | while ( i-- ) { 136 | delete cache[ key[ i ] ]; 137 | } 138 | } 139 | 140 | // Remove the expando if there's no more data 141 | if ( key === undefined || jQuery.isEmptyObject( cache ) ) { 142 | 143 | // Support: Chrome <=35 - 45 144 | // Webkit & Blink performance suffers when deleting properties 145 | // from DOM nodes, so set to undefined instead 146 | // https://bugs.chromium.org/p/chromium/issues/detail?id=378607 (bug restricted) 147 | if ( owner.nodeType ) { 148 | owner[ this.expando ] = undefined; 149 | } else { 150 | delete owner[ this.expando ]; 151 | } 152 | } 153 | }, 154 | hasData: function( owner ) { 155 | var cache = owner[ this.expando ]; 156 | return cache !== undefined && !jQuery.isEmptyObject( cache ); 157 | } 158 | }; 159 | 160 | return Data; 161 | } ); 162 | -------------------------------------------------------------------------------- /www/bower_components/jquery/src/traversing.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "./core", 3 | "./var/indexOf", 4 | "./traversing/var/dir", 5 | "./traversing/var/siblings", 6 | "./traversing/var/rneedsContext", 7 | "./core/init", 8 | "./traversing/findFilter", 9 | "./selector" 10 | ], function( jQuery, indexOf, dir, siblings, rneedsContext ) { 11 | 12 | "use strict"; 13 | 14 | var rparentsprev = /^(?:parents|prev(?:Until|All))/, 15 | 16 | // Methods guaranteed to produce a unique set when starting from a unique set 17 | guaranteedUnique = { 18 | children: true, 19 | contents: true, 20 | next: true, 21 | prev: true 22 | }; 23 | 24 | jQuery.fn.extend( { 25 | has: function( target ) { 26 | var targets = jQuery( target, this ), 27 | l = targets.length; 28 | 29 | return this.filter( function() { 30 | var i = 0; 31 | for ( ; i < l; i++ ) { 32 | if ( jQuery.contains( this, targets[ i ] ) ) { 33 | return true; 34 | } 35 | } 36 | } ); 37 | }, 38 | 39 | closest: function( selectors, context ) { 40 | var cur, 41 | i = 0, 42 | l = this.length, 43 | matched = [], 44 | targets = typeof selectors !== "string" && jQuery( selectors ); 45 | 46 | // Positional selectors never match, since there's no _selection_ context 47 | if ( !rneedsContext.test( selectors ) ) { 48 | for ( ; i < l; i++ ) { 49 | for ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) { 50 | 51 | // Always skip document fragments 52 | if ( cur.nodeType < 11 && ( targets ? 53 | targets.index( cur ) > -1 : 54 | 55 | // Don't pass non-elements to Sizzle 56 | cur.nodeType === 1 && 57 | jQuery.find.matchesSelector( cur, selectors ) ) ) { 58 | 59 | matched.push( cur ); 60 | break; 61 | } 62 | } 63 | } 64 | } 65 | 66 | return this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched ); 67 | }, 68 | 69 | // Determine the position of an element within the set 70 | index: function( elem ) { 71 | 72 | // No argument, return index in parent 73 | if ( !elem ) { 74 | return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1; 75 | } 76 | 77 | // Index in selector 78 | if ( typeof elem === "string" ) { 79 | return indexOf.call( jQuery( elem ), this[ 0 ] ); 80 | } 81 | 82 | // Locate the position of the desired element 83 | return indexOf.call( this, 84 | 85 | // If it receives a jQuery object, the first element is used 86 | elem.jquery ? elem[ 0 ] : elem 87 | ); 88 | }, 89 | 90 | add: function( selector, context ) { 91 | return this.pushStack( 92 | jQuery.uniqueSort( 93 | jQuery.merge( this.get(), jQuery( selector, context ) ) 94 | ) 95 | ); 96 | }, 97 | 98 | addBack: function( selector ) { 99 | return this.add( selector == null ? 100 | this.prevObject : this.prevObject.filter( selector ) 101 | ); 102 | } 103 | } ); 104 | 105 | function sibling( cur, dir ) { 106 | while ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {} 107 | return cur; 108 | } 109 | 110 | jQuery.each( { 111 | parent: function( elem ) { 112 | var parent = elem.parentNode; 113 | return parent && parent.nodeType !== 11 ? parent : null; 114 | }, 115 | parents: function( elem ) { 116 | return dir( elem, "parentNode" ); 117 | }, 118 | parentsUntil: function( elem, i, until ) { 119 | return dir( elem, "parentNode", until ); 120 | }, 121 | next: function( elem ) { 122 | return sibling( elem, "nextSibling" ); 123 | }, 124 | prev: function( elem ) { 125 | return sibling( elem, "previousSibling" ); 126 | }, 127 | nextAll: function( elem ) { 128 | return dir( elem, "nextSibling" ); 129 | }, 130 | prevAll: function( elem ) { 131 | return dir( elem, "previousSibling" ); 132 | }, 133 | nextUntil: function( elem, i, until ) { 134 | return dir( elem, "nextSibling", until ); 135 | }, 136 | prevUntil: function( elem, i, until ) { 137 | return dir( elem, "previousSibling", until ); 138 | }, 139 | siblings: function( elem ) { 140 | return siblings( ( elem.parentNode || {} ).firstChild, elem ); 141 | }, 142 | children: function( elem ) { 143 | return siblings( elem.firstChild ); 144 | }, 145 | contents: function( elem ) { 146 | return elem.contentDocument || jQuery.merge( [], elem.childNodes ); 147 | } 148 | }, function( name, fn ) { 149 | jQuery.fn[ name ] = function( until, selector ) { 150 | var matched = jQuery.map( this, fn, until ); 151 | 152 | if ( name.slice( -5 ) !== "Until" ) { 153 | selector = until; 154 | } 155 | 156 | if ( selector && typeof selector === "string" ) { 157 | matched = jQuery.filter( selector, matched ); 158 | } 159 | 160 | if ( this.length > 1 ) { 161 | 162 | // Remove duplicates 163 | if ( !guaranteedUnique[ name ] ) { 164 | jQuery.uniqueSort( matched ); 165 | } 166 | 167 | // Reverse order for parents* and prev-derivatives 168 | if ( rparentsprev.test( name ) ) { 169 | matched.reverse(); 170 | } 171 | } 172 | 173 | return this.pushStack( matched ); 174 | }; 175 | } ); 176 | 177 | return jQuery; 178 | } ); 179 | -------------------------------------------------------------------------------- /www/bower_components/jquery/src/ajax/xhr.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../core", 3 | "../var/support", 4 | "../ajax" 5 | ], function( jQuery, support ) { 6 | 7 | "use strict"; 8 | 9 | jQuery.ajaxSettings.xhr = function() { 10 | try { 11 | return new window.XMLHttpRequest(); 12 | } catch ( e ) {} 13 | }; 14 | 15 | var xhrSuccessStatus = { 16 | 17 | // File protocol always yields status code 0, assume 200 18 | 0: 200, 19 | 20 | // Support: IE <=9 only 21 | // #1450: sometimes IE returns 1223 when it should be 204 22 | 1223: 204 23 | }, 24 | xhrSupported = jQuery.ajaxSettings.xhr(); 25 | 26 | support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported ); 27 | support.ajax = xhrSupported = !!xhrSupported; 28 | 29 | jQuery.ajaxTransport( function( options ) { 30 | var callback, errorCallback; 31 | 32 | // Cross domain only allowed if supported through XMLHttpRequest 33 | if ( support.cors || xhrSupported && !options.crossDomain ) { 34 | return { 35 | send: function( headers, complete ) { 36 | var i, 37 | xhr = options.xhr(); 38 | 39 | xhr.open( 40 | options.type, 41 | options.url, 42 | options.async, 43 | options.username, 44 | options.password 45 | ); 46 | 47 | // Apply custom fields if provided 48 | if ( options.xhrFields ) { 49 | for ( i in options.xhrFields ) { 50 | xhr[ i ] = options.xhrFields[ i ]; 51 | } 52 | } 53 | 54 | // Override mime type if needed 55 | if ( options.mimeType && xhr.overrideMimeType ) { 56 | xhr.overrideMimeType( options.mimeType ); 57 | } 58 | 59 | // X-Requested-With header 60 | // For cross-domain requests, seeing as conditions for a preflight are 61 | // akin to a jigsaw puzzle, we simply never set it to be sure. 62 | // (it can always be set on a per-request basis or even using ajaxSetup) 63 | // For same-domain requests, won't change header if already provided. 64 | if ( !options.crossDomain && !headers[ "X-Requested-With" ] ) { 65 | headers[ "X-Requested-With" ] = "XMLHttpRequest"; 66 | } 67 | 68 | // Set headers 69 | for ( i in headers ) { 70 | xhr.setRequestHeader( i, headers[ i ] ); 71 | } 72 | 73 | // Callback 74 | callback = function( type ) { 75 | return function() { 76 | if ( callback ) { 77 | callback = errorCallback = xhr.onload = 78 | xhr.onerror = xhr.onabort = xhr.onreadystatechange = null; 79 | 80 | if ( type === "abort" ) { 81 | xhr.abort(); 82 | } else if ( type === "error" ) { 83 | 84 | // Support: IE <=9 only 85 | // On a manual native abort, IE9 throws 86 | // errors on any property access that is not readyState 87 | if ( typeof xhr.status !== "number" ) { 88 | complete( 0, "error" ); 89 | } else { 90 | complete( 91 | 92 | // File: protocol always yields status 0; see #8605, #14207 93 | xhr.status, 94 | xhr.statusText 95 | ); 96 | } 97 | } else { 98 | complete( 99 | xhrSuccessStatus[ xhr.status ] || xhr.status, 100 | xhr.statusText, 101 | 102 | // Support: IE <=9 only 103 | // IE9 has no XHR2 but throws on binary (trac-11426) 104 | // For XHR2 non-text, let the caller handle it (gh-2498) 105 | ( xhr.responseType || "text" ) !== "text" || 106 | typeof xhr.responseText !== "string" ? 107 | { binary: xhr.response } : 108 | { text: xhr.responseText }, 109 | xhr.getAllResponseHeaders() 110 | ); 111 | } 112 | } 113 | }; 114 | }; 115 | 116 | // Listen to events 117 | xhr.onload = callback(); 118 | errorCallback = xhr.onerror = callback( "error" ); 119 | 120 | // Support: IE 9 only 121 | // Use onreadystatechange to replace onabort 122 | // to handle uncaught aborts 123 | if ( xhr.onabort !== undefined ) { 124 | xhr.onabort = errorCallback; 125 | } else { 126 | xhr.onreadystatechange = function() { 127 | 128 | // Check readyState before timeout as it changes 129 | if ( xhr.readyState === 4 ) { 130 | 131 | // Allow onerror to be called first, 132 | // but that will not handle a native abort 133 | // Also, save errorCallback to a variable 134 | // as xhr.onerror cannot be accessed 135 | window.setTimeout( function() { 136 | if ( callback ) { 137 | errorCallback(); 138 | } 139 | } ); 140 | } 141 | }; 142 | } 143 | 144 | // Create the abort callback 145 | callback = callback( "abort" ); 146 | 147 | try { 148 | 149 | // Do send the request (this may raise an exception) 150 | xhr.send( options.hasContent && options.data || null ); 151 | } catch ( e ) { 152 | 153 | // #14683: Only rethrow if this hasn't been notified as an error yet 154 | if ( callback ) { 155 | throw e; 156 | } 157 | } 158 | }, 159 | 160 | abort: function() { 161 | if ( callback ) { 162 | callback(); 163 | } 164 | } 165 | }; 166 | } 167 | } ); 168 | 169 | } ); 170 | -------------------------------------------------------------------------------- /www/bower_components/jquery/src/attributes/val.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../core", 3 | "../core/stripAndCollapse", 4 | "./support", 5 | "../core/init" 6 | ], function( jQuery, stripAndCollapse, support ) { 7 | 8 | "use strict"; 9 | 10 | var rreturn = /\r/g; 11 | 12 | jQuery.fn.extend( { 13 | val: function( value ) { 14 | var hooks, ret, isFunction, 15 | elem = this[ 0 ]; 16 | 17 | if ( !arguments.length ) { 18 | if ( elem ) { 19 | hooks = jQuery.valHooks[ elem.type ] || 20 | jQuery.valHooks[ elem.nodeName.toLowerCase() ]; 21 | 22 | if ( hooks && 23 | "get" in hooks && 24 | ( ret = hooks.get( elem, "value" ) ) !== undefined 25 | ) { 26 | return ret; 27 | } 28 | 29 | ret = elem.value; 30 | 31 | // Handle most common string cases 32 | if ( typeof ret === "string" ) { 33 | return ret.replace( rreturn, "" ); 34 | } 35 | 36 | // Handle cases where value is null/undef or number 37 | return ret == null ? "" : ret; 38 | } 39 | 40 | return; 41 | } 42 | 43 | isFunction = jQuery.isFunction( value ); 44 | 45 | return this.each( function( i ) { 46 | var val; 47 | 48 | if ( this.nodeType !== 1 ) { 49 | return; 50 | } 51 | 52 | if ( isFunction ) { 53 | val = value.call( this, i, jQuery( this ).val() ); 54 | } else { 55 | val = value; 56 | } 57 | 58 | // Treat null/undefined as ""; convert numbers to string 59 | if ( val == null ) { 60 | val = ""; 61 | 62 | } else if ( typeof val === "number" ) { 63 | val += ""; 64 | 65 | } else if ( jQuery.isArray( val ) ) { 66 | val = jQuery.map( val, function( value ) { 67 | return value == null ? "" : value + ""; 68 | } ); 69 | } 70 | 71 | hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ]; 72 | 73 | // If set returns undefined, fall back to normal setting 74 | if ( !hooks || !( "set" in hooks ) || hooks.set( this, val, "value" ) === undefined ) { 75 | this.value = val; 76 | } 77 | } ); 78 | } 79 | } ); 80 | 81 | jQuery.extend( { 82 | valHooks: { 83 | option: { 84 | get: function( elem ) { 85 | 86 | var val = jQuery.find.attr( elem, "value" ); 87 | return val != null ? 88 | val : 89 | 90 | // Support: IE <=10 - 11 only 91 | // option.text throws exceptions (#14686, #14858) 92 | // Strip and collapse whitespace 93 | // https://html.spec.whatwg.org/#strip-and-collapse-whitespace 94 | stripAndCollapse( jQuery.text( elem ) ); 95 | } 96 | }, 97 | select: { 98 | get: function( elem ) { 99 | var value, option, i, 100 | options = elem.options, 101 | index = elem.selectedIndex, 102 | one = elem.type === "select-one", 103 | values = one ? null : [], 104 | max = one ? index + 1 : options.length; 105 | 106 | if ( index < 0 ) { 107 | i = max; 108 | 109 | } else { 110 | i = one ? index : 0; 111 | } 112 | 113 | // Loop through all the selected options 114 | for ( ; i < max; i++ ) { 115 | option = options[ i ]; 116 | 117 | // Support: IE <=9 only 118 | // IE8-9 doesn't update selected after form reset (#2551) 119 | if ( ( option.selected || i === index ) && 120 | 121 | // Don't return options that are disabled or in a disabled optgroup 122 | !option.disabled && 123 | ( !option.parentNode.disabled || 124 | !jQuery.nodeName( option.parentNode, "optgroup" ) ) ) { 125 | 126 | // Get the specific value for the option 127 | value = jQuery( option ).val(); 128 | 129 | // We don't need an array for one selects 130 | if ( one ) { 131 | return value; 132 | } 133 | 134 | // Multi-Selects return an array 135 | values.push( value ); 136 | } 137 | } 138 | 139 | return values; 140 | }, 141 | 142 | set: function( elem, value ) { 143 | var optionSet, option, 144 | options = elem.options, 145 | values = jQuery.makeArray( value ), 146 | i = options.length; 147 | 148 | while ( i-- ) { 149 | option = options[ i ]; 150 | 151 | /* eslint-disable no-cond-assign */ 152 | 153 | if ( option.selected = 154 | jQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1 155 | ) { 156 | optionSet = true; 157 | } 158 | 159 | /* eslint-enable no-cond-assign */ 160 | } 161 | 162 | // Force browsers to behave consistently when non-matching value is set 163 | if ( !optionSet ) { 164 | elem.selectedIndex = -1; 165 | } 166 | return values; 167 | } 168 | } 169 | } 170 | } ); 171 | 172 | // Radios and checkboxes getter/setter 173 | jQuery.each( [ "radio", "checkbox" ], function() { 174 | jQuery.valHooks[ this ] = { 175 | set: function( elem, value ) { 176 | if ( jQuery.isArray( value ) ) { 177 | return ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 ); 178 | } 179 | } 180 | }; 181 | if ( !support.checkOn ) { 182 | jQuery.valHooks[ this ].get = function( elem ) { 183 | return elem.getAttribute( "value" ) === null ? "on" : elem.value; 184 | }; 185 | } 186 | } ); 187 | 188 | } ); 189 | -------------------------------------------------------------------------------- /www/bower_components/jquery/src/attributes/classes.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../core", 3 | "../core/stripAndCollapse", 4 | "../var/rnothtmlwhite", 5 | "../data/var/dataPriv", 6 | "../core/init" 7 | ], function( jQuery, stripAndCollapse, rnothtmlwhite, dataPriv ) { 8 | 9 | "use strict"; 10 | 11 | function getClass( elem ) { 12 | return elem.getAttribute && elem.getAttribute( "class" ) || ""; 13 | } 14 | 15 | jQuery.fn.extend( { 16 | addClass: function( value ) { 17 | var classes, elem, cur, curValue, clazz, j, finalValue, 18 | i = 0; 19 | 20 | if ( jQuery.isFunction( value ) ) { 21 | return this.each( function( j ) { 22 | jQuery( this ).addClass( value.call( this, j, getClass( this ) ) ); 23 | } ); 24 | } 25 | 26 | if ( typeof value === "string" && value ) { 27 | classes = value.match( rnothtmlwhite ) || []; 28 | 29 | while ( ( elem = this[ i++ ] ) ) { 30 | curValue = getClass( elem ); 31 | cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " ); 32 | 33 | if ( cur ) { 34 | j = 0; 35 | while ( ( clazz = classes[ j++ ] ) ) { 36 | if ( cur.indexOf( " " + clazz + " " ) < 0 ) { 37 | cur += clazz + " "; 38 | } 39 | } 40 | 41 | // Only assign if different to avoid unneeded rendering. 42 | finalValue = stripAndCollapse( cur ); 43 | if ( curValue !== finalValue ) { 44 | elem.setAttribute( "class", finalValue ); 45 | } 46 | } 47 | } 48 | } 49 | 50 | return this; 51 | }, 52 | 53 | removeClass: function( value ) { 54 | var classes, elem, cur, curValue, clazz, j, finalValue, 55 | i = 0; 56 | 57 | if ( jQuery.isFunction( value ) ) { 58 | return this.each( function( j ) { 59 | jQuery( this ).removeClass( value.call( this, j, getClass( this ) ) ); 60 | } ); 61 | } 62 | 63 | if ( !arguments.length ) { 64 | return this.attr( "class", "" ); 65 | } 66 | 67 | if ( typeof value === "string" && value ) { 68 | classes = value.match( rnothtmlwhite ) || []; 69 | 70 | while ( ( elem = this[ i++ ] ) ) { 71 | curValue = getClass( elem ); 72 | 73 | // This expression is here for better compressibility (see addClass) 74 | cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " ); 75 | 76 | if ( cur ) { 77 | j = 0; 78 | while ( ( clazz = classes[ j++ ] ) ) { 79 | 80 | // Remove *all* instances 81 | while ( cur.indexOf( " " + clazz + " " ) > -1 ) { 82 | cur = cur.replace( " " + clazz + " ", " " ); 83 | } 84 | } 85 | 86 | // Only assign if different to avoid unneeded rendering. 87 | finalValue = stripAndCollapse( cur ); 88 | if ( curValue !== finalValue ) { 89 | elem.setAttribute( "class", finalValue ); 90 | } 91 | } 92 | } 93 | } 94 | 95 | return this; 96 | }, 97 | 98 | toggleClass: function( value, stateVal ) { 99 | var type = typeof value; 100 | 101 | if ( typeof stateVal === "boolean" && type === "string" ) { 102 | return stateVal ? this.addClass( value ) : this.removeClass( value ); 103 | } 104 | 105 | if ( jQuery.isFunction( value ) ) { 106 | return this.each( function( i ) { 107 | jQuery( this ).toggleClass( 108 | value.call( this, i, getClass( this ), stateVal ), 109 | stateVal 110 | ); 111 | } ); 112 | } 113 | 114 | return this.each( function() { 115 | var className, i, self, classNames; 116 | 117 | if ( type === "string" ) { 118 | 119 | // Toggle individual class names 120 | i = 0; 121 | self = jQuery( this ); 122 | classNames = value.match( rnothtmlwhite ) || []; 123 | 124 | while ( ( className = classNames[ i++ ] ) ) { 125 | 126 | // Check each className given, space separated list 127 | if ( self.hasClass( className ) ) { 128 | self.removeClass( className ); 129 | } else { 130 | self.addClass( className ); 131 | } 132 | } 133 | 134 | // Toggle whole class name 135 | } else if ( value === undefined || type === "boolean" ) { 136 | className = getClass( this ); 137 | if ( className ) { 138 | 139 | // Store className if set 140 | dataPriv.set( this, "__className__", className ); 141 | } 142 | 143 | // If the element has a class name or if we're passed `false`, 144 | // then remove the whole classname (if there was one, the above saved it). 145 | // Otherwise bring back whatever was previously saved (if anything), 146 | // falling back to the empty string if nothing was stored. 147 | if ( this.setAttribute ) { 148 | this.setAttribute( "class", 149 | className || value === false ? 150 | "" : 151 | dataPriv.get( this, "__className__" ) || "" 152 | ); 153 | } 154 | } 155 | } ); 156 | }, 157 | 158 | hasClass: function( selector ) { 159 | var className, elem, 160 | i = 0; 161 | 162 | className = " " + selector + " "; 163 | while ( ( elem = this[ i++ ] ) ) { 164 | if ( elem.nodeType === 1 && 165 | ( " " + stripAndCollapse( getClass( elem ) ) + " " ).indexOf( className ) > -1 ) { 166 | return true; 167 | } 168 | } 169 | 170 | return false; 171 | } 172 | } ); 173 | 174 | } ); 175 | -------------------------------------------------------------------------------- /www/bower_components/jquery/src/data.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "./core", 3 | "./core/access", 4 | "./data/var/dataPriv", 5 | "./data/var/dataUser" 6 | ], function( jQuery, access, dataPriv, dataUser ) { 7 | 8 | "use strict"; 9 | 10 | // Implementation Summary 11 | // 12 | // 1. Enforce API surface and semantic compatibility with 1.9.x branch 13 | // 2. Improve the module's maintainability by reducing the storage 14 | // paths to a single mechanism. 15 | // 3. Use the same single mechanism to support "private" and "user" data. 16 | // 4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData) 17 | // 5. Avoid exposing implementation details on user objects (eg. expando properties) 18 | // 6. Provide a clear path for implementation upgrade to WeakMap in 2014 19 | 20 | var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, 21 | rmultiDash = /[A-Z]/g; 22 | 23 | function getData( data ) { 24 | if ( data === "true" ) { 25 | return true; 26 | } 27 | 28 | if ( data === "false" ) { 29 | return false; 30 | } 31 | 32 | if ( data === "null" ) { 33 | return null; 34 | } 35 | 36 | // Only convert to a number if it doesn't change the string 37 | if ( data === +data + "" ) { 38 | return +data; 39 | } 40 | 41 | if ( rbrace.test( data ) ) { 42 | return JSON.parse( data ); 43 | } 44 | 45 | return data; 46 | } 47 | 48 | function dataAttr( elem, key, data ) { 49 | var name; 50 | 51 | // If nothing was found internally, try to fetch any 52 | // data from the HTML5 data-* attribute 53 | if ( data === undefined && elem.nodeType === 1 ) { 54 | name = "data-" + key.replace( rmultiDash, "-$&" ).toLowerCase(); 55 | data = elem.getAttribute( name ); 56 | 57 | if ( typeof data === "string" ) { 58 | try { 59 | data = getData( data ); 60 | } catch ( e ) {} 61 | 62 | // Make sure we set the data so it isn't changed later 63 | dataUser.set( elem, key, data ); 64 | } else { 65 | data = undefined; 66 | } 67 | } 68 | return data; 69 | } 70 | 71 | jQuery.extend( { 72 | hasData: function( elem ) { 73 | return dataUser.hasData( elem ) || dataPriv.hasData( elem ); 74 | }, 75 | 76 | data: function( elem, name, data ) { 77 | return dataUser.access( elem, name, data ); 78 | }, 79 | 80 | removeData: function( elem, name ) { 81 | dataUser.remove( elem, name ); 82 | }, 83 | 84 | // TODO: Now that all calls to _data and _removeData have been replaced 85 | // with direct calls to dataPriv methods, these can be deprecated. 86 | _data: function( elem, name, data ) { 87 | return dataPriv.access( elem, name, data ); 88 | }, 89 | 90 | _removeData: function( elem, name ) { 91 | dataPriv.remove( elem, name ); 92 | } 93 | } ); 94 | 95 | jQuery.fn.extend( { 96 | data: function( key, value ) { 97 | var i, name, data, 98 | elem = this[ 0 ], 99 | attrs = elem && elem.attributes; 100 | 101 | // Gets all values 102 | if ( key === undefined ) { 103 | if ( this.length ) { 104 | data = dataUser.get( elem ); 105 | 106 | if ( elem.nodeType === 1 && !dataPriv.get( elem, "hasDataAttrs" ) ) { 107 | i = attrs.length; 108 | while ( i-- ) { 109 | 110 | // Support: IE 11 only 111 | // The attrs elements can be null (#14894) 112 | if ( attrs[ i ] ) { 113 | name = attrs[ i ].name; 114 | if ( name.indexOf( "data-" ) === 0 ) { 115 | name = jQuery.camelCase( name.slice( 5 ) ); 116 | dataAttr( elem, name, data[ name ] ); 117 | } 118 | } 119 | } 120 | dataPriv.set( elem, "hasDataAttrs", true ); 121 | } 122 | } 123 | 124 | return data; 125 | } 126 | 127 | // Sets multiple values 128 | if ( typeof key === "object" ) { 129 | return this.each( function() { 130 | dataUser.set( this, key ); 131 | } ); 132 | } 133 | 134 | return access( this, function( value ) { 135 | var data; 136 | 137 | // The calling jQuery object (element matches) is not empty 138 | // (and therefore has an element appears at this[ 0 ]) and the 139 | // `value` parameter was not undefined. An empty jQuery object 140 | // will result in `undefined` for elem = this[ 0 ] which will 141 | // throw an exception if an attempt to read a data cache is made. 142 | if ( elem && value === undefined ) { 143 | 144 | // Attempt to get data from the cache 145 | // The key will always be camelCased in Data 146 | data = dataUser.get( elem, key ); 147 | if ( data !== undefined ) { 148 | return data; 149 | } 150 | 151 | // Attempt to "discover" the data in 152 | // HTML5 custom data-* attrs 153 | data = dataAttr( elem, key ); 154 | if ( data !== undefined ) { 155 | return data; 156 | } 157 | 158 | // We tried really hard, but the data doesn't exist. 159 | return; 160 | } 161 | 162 | // Set the data... 163 | this.each( function() { 164 | 165 | // We always store the camelCased key 166 | dataUser.set( this, key, value ); 167 | } ); 168 | }, null, value, arguments.length > 1, null, true ); 169 | }, 170 | 171 | removeData: function( key ) { 172 | return this.each( function() { 173 | dataUser.remove( this, key ); 174 | } ); 175 | } 176 | } ); 177 | 178 | return jQuery; 179 | } ); 180 | -------------------------------------------------------------------------------- /www/bower_components/jquery/src/event/trigger.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../core", 3 | "../var/document", 4 | "../data/var/dataPriv", 5 | "../data/var/acceptData", 6 | "../var/hasOwn", 7 | 8 | "../event" 9 | ], function( jQuery, document, dataPriv, acceptData, hasOwn ) { 10 | 11 | "use strict"; 12 | 13 | var rfocusMorph = /^(?:focusinfocus|focusoutblur)$/; 14 | 15 | jQuery.extend( jQuery.event, { 16 | 17 | trigger: function( event, data, elem, onlyHandlers ) { 18 | 19 | var i, cur, tmp, bubbleType, ontype, handle, special, 20 | eventPath = [ elem || document ], 21 | type = hasOwn.call( event, "type" ) ? event.type : event, 22 | namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split( "." ) : []; 23 | 24 | cur = tmp = elem = elem || document; 25 | 26 | // Don't do events on text and comment nodes 27 | if ( elem.nodeType === 3 || elem.nodeType === 8 ) { 28 | return; 29 | } 30 | 31 | // focus/blur morphs to focusin/out; ensure we're not firing them right now 32 | if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { 33 | return; 34 | } 35 | 36 | if ( type.indexOf( "." ) > -1 ) { 37 | 38 | // Namespaced trigger; create a regexp to match event type in handle() 39 | namespaces = type.split( "." ); 40 | type = namespaces.shift(); 41 | namespaces.sort(); 42 | } 43 | ontype = type.indexOf( ":" ) < 0 && "on" + type; 44 | 45 | // Caller can pass in a jQuery.Event object, Object, or just an event type string 46 | event = event[ jQuery.expando ] ? 47 | event : 48 | new jQuery.Event( type, typeof event === "object" && event ); 49 | 50 | // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true) 51 | event.isTrigger = onlyHandlers ? 2 : 3; 52 | event.namespace = namespaces.join( "." ); 53 | event.rnamespace = event.namespace ? 54 | new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ) : 55 | null; 56 | 57 | // Clean up the event in case it is being reused 58 | event.result = undefined; 59 | if ( !event.target ) { 60 | event.target = elem; 61 | } 62 | 63 | // Clone any incoming data and prepend the event, creating the handler arg list 64 | data = data == null ? 65 | [ event ] : 66 | jQuery.makeArray( data, [ event ] ); 67 | 68 | // Allow special events to draw outside the lines 69 | special = jQuery.event.special[ type ] || {}; 70 | if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) { 71 | return; 72 | } 73 | 74 | // Determine event propagation path in advance, per W3C events spec (#9951) 75 | // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) 76 | if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) { 77 | 78 | bubbleType = special.delegateType || type; 79 | if ( !rfocusMorph.test( bubbleType + type ) ) { 80 | cur = cur.parentNode; 81 | } 82 | for ( ; cur; cur = cur.parentNode ) { 83 | eventPath.push( cur ); 84 | tmp = cur; 85 | } 86 | 87 | // Only add window if we got to document (e.g., not plain obj or detached DOM) 88 | if ( tmp === ( elem.ownerDocument || document ) ) { 89 | eventPath.push( tmp.defaultView || tmp.parentWindow || window ); 90 | } 91 | } 92 | 93 | // Fire handlers on the event path 94 | i = 0; 95 | while ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) { 96 | 97 | event.type = i > 1 ? 98 | bubbleType : 99 | special.bindType || type; 100 | 101 | // jQuery handler 102 | handle = ( dataPriv.get( cur, "events" ) || {} )[ event.type ] && 103 | dataPriv.get( cur, "handle" ); 104 | if ( handle ) { 105 | handle.apply( cur, data ); 106 | } 107 | 108 | // Native handler 109 | handle = ontype && cur[ ontype ]; 110 | if ( handle && handle.apply && acceptData( cur ) ) { 111 | event.result = handle.apply( cur, data ); 112 | if ( event.result === false ) { 113 | event.preventDefault(); 114 | } 115 | } 116 | } 117 | event.type = type; 118 | 119 | // If nobody prevented the default action, do it now 120 | if ( !onlyHandlers && !event.isDefaultPrevented() ) { 121 | 122 | if ( ( !special._default || 123 | special._default.apply( eventPath.pop(), data ) === false ) && 124 | acceptData( elem ) ) { 125 | 126 | // Call a native DOM method on the target with the same name as the event. 127 | // Don't do default actions on window, that's where global variables be (#6170) 128 | if ( ontype && jQuery.isFunction( elem[ type ] ) && !jQuery.isWindow( elem ) ) { 129 | 130 | // Don't re-trigger an onFOO event when we call its FOO() method 131 | tmp = elem[ ontype ]; 132 | 133 | if ( tmp ) { 134 | elem[ ontype ] = null; 135 | } 136 | 137 | // Prevent re-triggering of the same event, since we already bubbled it above 138 | jQuery.event.triggered = type; 139 | elem[ type ](); 140 | jQuery.event.triggered = undefined; 141 | 142 | if ( tmp ) { 143 | elem[ ontype ] = tmp; 144 | } 145 | } 146 | } 147 | } 148 | 149 | return event.result; 150 | }, 151 | 152 | // Piggyback on a donor event to simulate a different one 153 | // Used only for `focus(in | out)` events 154 | simulate: function( type, elem, event ) { 155 | var e = jQuery.extend( 156 | new jQuery.Event(), 157 | event, 158 | { 159 | type: type, 160 | isSimulated: true 161 | } 162 | ); 163 | 164 | jQuery.event.trigger( e, null, elem ); 165 | } 166 | 167 | } ); 168 | 169 | jQuery.fn.extend( { 170 | 171 | trigger: function( type, data ) { 172 | return this.each( function() { 173 | jQuery.event.trigger( type, data, this ); 174 | } ); 175 | }, 176 | triggerHandler: function( type, data ) { 177 | var elem = this[ 0 ]; 178 | if ( elem ) { 179 | return jQuery.event.trigger( type, data, elem, true ); 180 | } 181 | } 182 | } ); 183 | 184 | return jQuery; 185 | } ); 186 | -------------------------------------------------------------------------------- /www/bower_components/jquery/src/callbacks.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "./core", 3 | "./var/rnothtmlwhite" 4 | ], function( jQuery, rnothtmlwhite ) { 5 | 6 | "use strict"; 7 | 8 | // Convert String-formatted options into Object-formatted ones 9 | function createOptions( options ) { 10 | var object = {}; 11 | jQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) { 12 | object[ flag ] = true; 13 | } ); 14 | return object; 15 | } 16 | 17 | /* 18 | * Create a callback list using the following parameters: 19 | * 20 | * options: an optional list of space-separated options that will change how 21 | * the callback list behaves or a more traditional option object 22 | * 23 | * By default a callback list will act like an event callback list and can be 24 | * "fired" multiple times. 25 | * 26 | * Possible options: 27 | * 28 | * once: will ensure the callback list can only be fired once (like a Deferred) 29 | * 30 | * memory: will keep track of previous values and will call any callback added 31 | * after the list has been fired right away with the latest "memorized" 32 | * values (like a Deferred) 33 | * 34 | * unique: will ensure a callback can only be added once (no duplicate in the list) 35 | * 36 | * stopOnFalse: interrupt callings when a callback returns false 37 | * 38 | */ 39 | jQuery.Callbacks = function( options ) { 40 | 41 | // Convert options from String-formatted to Object-formatted if needed 42 | // (we check in cache first) 43 | options = typeof options === "string" ? 44 | createOptions( options ) : 45 | jQuery.extend( {}, options ); 46 | 47 | var // Flag to know if list is currently firing 48 | firing, 49 | 50 | // Last fire value for non-forgettable lists 51 | memory, 52 | 53 | // Flag to know if list was already fired 54 | fired, 55 | 56 | // Flag to prevent firing 57 | locked, 58 | 59 | // Actual callback list 60 | list = [], 61 | 62 | // Queue of execution data for repeatable lists 63 | queue = [], 64 | 65 | // Index of currently firing callback (modified by add/remove as needed) 66 | firingIndex = -1, 67 | 68 | // Fire callbacks 69 | fire = function() { 70 | 71 | // Enforce single-firing 72 | locked = options.once; 73 | 74 | // Execute callbacks for all pending executions, 75 | // respecting firingIndex overrides and runtime changes 76 | fired = firing = true; 77 | for ( ; queue.length; firingIndex = -1 ) { 78 | memory = queue.shift(); 79 | while ( ++firingIndex < list.length ) { 80 | 81 | // Run callback and check for early termination 82 | if ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false && 83 | options.stopOnFalse ) { 84 | 85 | // Jump to end and forget the data so .add doesn't re-fire 86 | firingIndex = list.length; 87 | memory = false; 88 | } 89 | } 90 | } 91 | 92 | // Forget the data if we're done with it 93 | if ( !options.memory ) { 94 | memory = false; 95 | } 96 | 97 | firing = false; 98 | 99 | // Clean up if we're done firing for good 100 | if ( locked ) { 101 | 102 | // Keep an empty list if we have data for future add calls 103 | if ( memory ) { 104 | list = []; 105 | 106 | // Otherwise, this object is spent 107 | } else { 108 | list = ""; 109 | } 110 | } 111 | }, 112 | 113 | // Actual Callbacks object 114 | self = { 115 | 116 | // Add a callback or a collection of callbacks to the list 117 | add: function() { 118 | if ( list ) { 119 | 120 | // If we have memory from a past run, we should fire after adding 121 | if ( memory && !firing ) { 122 | firingIndex = list.length - 1; 123 | queue.push( memory ); 124 | } 125 | 126 | ( function add( args ) { 127 | jQuery.each( args, function( _, arg ) { 128 | if ( jQuery.isFunction( arg ) ) { 129 | if ( !options.unique || !self.has( arg ) ) { 130 | list.push( arg ); 131 | } 132 | } else if ( arg && arg.length && jQuery.type( arg ) !== "string" ) { 133 | 134 | // Inspect recursively 135 | add( arg ); 136 | } 137 | } ); 138 | } )( arguments ); 139 | 140 | if ( memory && !firing ) { 141 | fire(); 142 | } 143 | } 144 | return this; 145 | }, 146 | 147 | // Remove a callback from the list 148 | remove: function() { 149 | jQuery.each( arguments, function( _, arg ) { 150 | var index; 151 | while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { 152 | list.splice( index, 1 ); 153 | 154 | // Handle firing indexes 155 | if ( index <= firingIndex ) { 156 | firingIndex--; 157 | } 158 | } 159 | } ); 160 | return this; 161 | }, 162 | 163 | // Check if a given callback is in the list. 164 | // If no argument is given, return whether or not list has callbacks attached. 165 | has: function( fn ) { 166 | return fn ? 167 | jQuery.inArray( fn, list ) > -1 : 168 | list.length > 0; 169 | }, 170 | 171 | // Remove all callbacks from the list 172 | empty: function() { 173 | if ( list ) { 174 | list = []; 175 | } 176 | return this; 177 | }, 178 | 179 | // Disable .fire and .add 180 | // Abort any current/pending executions 181 | // Clear all callbacks and values 182 | disable: function() { 183 | locked = queue = []; 184 | list = memory = ""; 185 | return this; 186 | }, 187 | disabled: function() { 188 | return !list; 189 | }, 190 | 191 | // Disable .fire 192 | // Also disable .add unless we have memory (since it would have no effect) 193 | // Abort any pending executions 194 | lock: function() { 195 | locked = queue = []; 196 | if ( !memory && !firing ) { 197 | list = memory = ""; 198 | } 199 | return this; 200 | }, 201 | locked: function() { 202 | return !!locked; 203 | }, 204 | 205 | // Call all callbacks with the given context and arguments 206 | fireWith: function( context, args ) { 207 | if ( !locked ) { 208 | args = args || []; 209 | args = [ context, args.slice ? args.slice() : args ]; 210 | queue.push( args ); 211 | if ( !firing ) { 212 | fire(); 213 | } 214 | } 215 | return this; 216 | }, 217 | 218 | // Call all the callbacks with the given arguments 219 | fire: function() { 220 | self.fireWith( this, arguments ); 221 | return this; 222 | }, 223 | 224 | // To know if the callbacks have already been called at least once 225 | fired: function() { 226 | return !!fired; 227 | } 228 | }; 229 | 230 | return self; 231 | }; 232 | 233 | return jQuery; 234 | } ); 235 | -------------------------------------------------------------------------------- /www/bower_components/jquery/src/offset.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "./core", 3 | "./core/access", 4 | "./var/document", 5 | "./var/documentElement", 6 | "./css/var/rnumnonpx", 7 | "./css/curCSS", 8 | "./css/addGetHookIf", 9 | "./css/support", 10 | 11 | "./core/init", 12 | "./css", 13 | "./selector" // contains 14 | ], function( jQuery, access, document, documentElement, rnumnonpx, curCSS, addGetHookIf, support ) { 15 | 16 | "use strict"; 17 | 18 | /** 19 | * Gets a window from an element 20 | */ 21 | function getWindow( elem ) { 22 | return jQuery.isWindow( elem ) ? elem : elem.nodeType === 9 && elem.defaultView; 23 | } 24 | 25 | jQuery.offset = { 26 | setOffset: function( elem, options, i ) { 27 | var curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition, 28 | position = jQuery.css( elem, "position" ), 29 | curElem = jQuery( elem ), 30 | props = {}; 31 | 32 | // Set position first, in-case top/left are set even on static elem 33 | if ( position === "static" ) { 34 | elem.style.position = "relative"; 35 | } 36 | 37 | curOffset = curElem.offset(); 38 | curCSSTop = jQuery.css( elem, "top" ); 39 | curCSSLeft = jQuery.css( elem, "left" ); 40 | calculatePosition = ( position === "absolute" || position === "fixed" ) && 41 | ( curCSSTop + curCSSLeft ).indexOf( "auto" ) > -1; 42 | 43 | // Need to be able to calculate position if either 44 | // top or left is auto and position is either absolute or fixed 45 | if ( calculatePosition ) { 46 | curPosition = curElem.position(); 47 | curTop = curPosition.top; 48 | curLeft = curPosition.left; 49 | 50 | } else { 51 | curTop = parseFloat( curCSSTop ) || 0; 52 | curLeft = parseFloat( curCSSLeft ) || 0; 53 | } 54 | 55 | if ( jQuery.isFunction( options ) ) { 56 | 57 | // Use jQuery.extend here to allow modification of coordinates argument (gh-1848) 58 | options = options.call( elem, i, jQuery.extend( {}, curOffset ) ); 59 | } 60 | 61 | if ( options.top != null ) { 62 | props.top = ( options.top - curOffset.top ) + curTop; 63 | } 64 | if ( options.left != null ) { 65 | props.left = ( options.left - curOffset.left ) + curLeft; 66 | } 67 | 68 | if ( "using" in options ) { 69 | options.using.call( elem, props ); 70 | 71 | } else { 72 | curElem.css( props ); 73 | } 74 | } 75 | }; 76 | 77 | jQuery.fn.extend( { 78 | offset: function( options ) { 79 | 80 | // Preserve chaining for setter 81 | if ( arguments.length ) { 82 | return options === undefined ? 83 | this : 84 | this.each( function( i ) { 85 | jQuery.offset.setOffset( this, options, i ); 86 | } ); 87 | } 88 | 89 | var docElem, win, rect, doc, 90 | elem = this[ 0 ]; 91 | 92 | if ( !elem ) { 93 | return; 94 | } 95 | 96 | // Support: IE <=11 only 97 | // Running getBoundingClientRect on a 98 | // disconnected node in IE throws an error 99 | if ( !elem.getClientRects().length ) { 100 | return { top: 0, left: 0 }; 101 | } 102 | 103 | rect = elem.getBoundingClientRect(); 104 | 105 | // Make sure element is not hidden (display: none) 106 | if ( rect.width || rect.height ) { 107 | doc = elem.ownerDocument; 108 | win = getWindow( doc ); 109 | docElem = doc.documentElement; 110 | 111 | return { 112 | top: rect.top + win.pageYOffset - docElem.clientTop, 113 | left: rect.left + win.pageXOffset - docElem.clientLeft 114 | }; 115 | } 116 | 117 | // Return zeros for disconnected and hidden elements (gh-2310) 118 | return rect; 119 | }, 120 | 121 | position: function() { 122 | if ( !this[ 0 ] ) { 123 | return; 124 | } 125 | 126 | var offsetParent, offset, 127 | elem = this[ 0 ], 128 | parentOffset = { top: 0, left: 0 }; 129 | 130 | // Fixed elements are offset from window (parentOffset = {top:0, left: 0}, 131 | // because it is its only offset parent 132 | if ( jQuery.css( elem, "position" ) === "fixed" ) { 133 | 134 | // Assume getBoundingClientRect is there when computed position is fixed 135 | offset = elem.getBoundingClientRect(); 136 | 137 | } else { 138 | 139 | // Get *real* offsetParent 140 | offsetParent = this.offsetParent(); 141 | 142 | // Get correct offsets 143 | offset = this.offset(); 144 | if ( !jQuery.nodeName( offsetParent[ 0 ], "html" ) ) { 145 | parentOffset = offsetParent.offset(); 146 | } 147 | 148 | // Add offsetParent borders 149 | parentOffset = { 150 | top: parentOffset.top + jQuery.css( offsetParent[ 0 ], "borderTopWidth", true ), 151 | left: parentOffset.left + jQuery.css( offsetParent[ 0 ], "borderLeftWidth", true ) 152 | }; 153 | } 154 | 155 | // Subtract parent offsets and element margins 156 | return { 157 | top: offset.top - parentOffset.top - jQuery.css( elem, "marginTop", true ), 158 | left: offset.left - parentOffset.left - jQuery.css( elem, "marginLeft", true ) 159 | }; 160 | }, 161 | 162 | // This method will return documentElement in the following cases: 163 | // 1) For the element inside the iframe without offsetParent, this method will return 164 | // documentElement of the parent window 165 | // 2) For the hidden or detached element 166 | // 3) For body or html element, i.e. in case of the html node - it will return itself 167 | // 168 | // but those exceptions were never presented as a real life use-cases 169 | // and might be considered as more preferable results. 170 | // 171 | // This logic, however, is not guaranteed and can change at any point in the future 172 | offsetParent: function() { 173 | return this.map( function() { 174 | var offsetParent = this.offsetParent; 175 | 176 | while ( offsetParent && jQuery.css( offsetParent, "position" ) === "static" ) { 177 | offsetParent = offsetParent.offsetParent; 178 | } 179 | 180 | return offsetParent || documentElement; 181 | } ); 182 | } 183 | } ); 184 | 185 | // Create scrollLeft and scrollTop methods 186 | jQuery.each( { scrollLeft: "pageXOffset", scrollTop: "pageYOffset" }, function( method, prop ) { 187 | var top = "pageYOffset" === prop; 188 | 189 | jQuery.fn[ method ] = function( val ) { 190 | return access( this, function( elem, method, val ) { 191 | var win = getWindow( elem ); 192 | 193 | if ( val === undefined ) { 194 | return win ? win[ prop ] : elem[ method ]; 195 | } 196 | 197 | if ( win ) { 198 | win.scrollTo( 199 | !top ? val : win.pageXOffset, 200 | top ? val : win.pageYOffset 201 | ); 202 | 203 | } else { 204 | elem[ method ] = val; 205 | } 206 | }, method, val, arguments.length ); 207 | }; 208 | } ); 209 | 210 | // Support: Safari <=7 - 9.1, Chrome <=37 - 49 211 | // Add the top/left cssHooks using jQuery.fn.position 212 | // Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084 213 | // Blink bug: https://bugs.chromium.org/p/chromium/issues/detail?id=589347 214 | // getComputedStyle returns percent when specified for top/left/bottom/right; 215 | // rather than make the css module depend on the offset module, just check for it here 216 | jQuery.each( [ "top", "left" ], function( i, prop ) { 217 | jQuery.cssHooks[ prop ] = addGetHookIf( support.pixelPosition, 218 | function( elem, computed ) { 219 | if ( computed ) { 220 | computed = curCSS( elem, prop ); 221 | 222 | // If curCSS returns percentage, fallback to offset 223 | return rnumnonpx.test( computed ) ? 224 | jQuery( elem ).position()[ prop ] + "px" : 225 | computed; 226 | } 227 | } 228 | ); 229 | } ); 230 | 231 | return jQuery; 232 | } ); 233 | -------------------------------------------------------------------------------- /www/bower_components/jquery/src/selector-native.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "./core", 3 | "./var/document", 4 | "./var/documentElement", 5 | "./var/hasOwn", 6 | "./var/indexOf" 7 | ], function( jQuery, document, documentElement, hasOwn, indexOf ) { 8 | 9 | "use strict"; 10 | 11 | /* 12 | * Optional (non-Sizzle) selector module for custom builds. 13 | * 14 | * Note that this DOES NOT SUPPORT many documented jQuery 15 | * features in exchange for its smaller size: 16 | * 17 | * Attribute not equal selector 18 | * Positional selectors (:first; :eq(n); :odd; etc.) 19 | * Type selectors (:input; :checkbox; :button; etc.) 20 | * State-based selectors (:animated; :visible; :hidden; etc.) 21 | * :has(selector) 22 | * :not(complex selector) 23 | * custom selectors via Sizzle extensions 24 | * Leading combinators (e.g., $collection.find("> *")) 25 | * Reliable functionality on XML fragments 26 | * Requiring all parts of a selector to match elements under context 27 | * (e.g., $div.find("div > *") now matches children of $div) 28 | * Matching against non-elements 29 | * Reliable sorting of disconnected nodes 30 | * querySelectorAll bug fixes (e.g., unreliable :focus on WebKit) 31 | * 32 | * If any of these are unacceptable tradeoffs, either use Sizzle or 33 | * customize this stub for the project's specific needs. 34 | */ 35 | 36 | var hasDuplicate, sortInput, 37 | sortStable = jQuery.expando.split( "" ).sort( sortOrder ).join( "" ) === jQuery.expando, 38 | matches = documentElement.matches || 39 | documentElement.webkitMatchesSelector || 40 | documentElement.mozMatchesSelector || 41 | documentElement.oMatchesSelector || 42 | documentElement.msMatchesSelector, 43 | 44 | // CSS string/identifier serialization 45 | // https://drafts.csswg.org/cssom/#common-serializing-idioms 46 | rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g, 47 | fcssescape = function( ch, asCodePoint ) { 48 | if ( asCodePoint ) { 49 | 50 | // U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER 51 | if ( ch === "\0" ) { 52 | return "\uFFFD"; 53 | } 54 | 55 | // Control characters and (dependent upon position) numbers get escaped as code points 56 | return ch.slice( 0, -1 ) + "\\" + ch.charCodeAt( ch.length - 1 ).toString( 16 ) + " "; 57 | } 58 | 59 | // Other potentially-special ASCII characters get backslash-escaped 60 | return "\\" + ch; 61 | }; 62 | 63 | function sortOrder( a, b ) { 64 | 65 | // Flag for duplicate removal 66 | if ( a === b ) { 67 | hasDuplicate = true; 68 | return 0; 69 | } 70 | 71 | // Sort on method existence if only one input has compareDocumentPosition 72 | var compare = !a.compareDocumentPosition - !b.compareDocumentPosition; 73 | if ( compare ) { 74 | return compare; 75 | } 76 | 77 | // Calculate position if both inputs belong to the same document 78 | compare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ? 79 | a.compareDocumentPosition( b ) : 80 | 81 | // Otherwise we know they are disconnected 82 | 1; 83 | 84 | // Disconnected nodes 85 | if ( compare & 1 ) { 86 | 87 | // Choose the first element that is related to our preferred document 88 | if ( a === document || a.ownerDocument === document && 89 | jQuery.contains( document, a ) ) { 90 | return -1; 91 | } 92 | if ( b === document || b.ownerDocument === document && 93 | jQuery.contains( document, b ) ) { 94 | return 1; 95 | } 96 | 97 | // Maintain original order 98 | return sortInput ? 99 | ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) : 100 | 0; 101 | } 102 | 103 | return compare & 4 ? -1 : 1; 104 | } 105 | 106 | function uniqueSort( results ) { 107 | var elem, 108 | duplicates = [], 109 | j = 0, 110 | i = 0; 111 | 112 | hasDuplicate = false; 113 | sortInput = !sortStable && results.slice( 0 ); 114 | results.sort( sortOrder ); 115 | 116 | if ( hasDuplicate ) { 117 | while ( ( elem = results[ i++ ] ) ) { 118 | if ( elem === results[ i ] ) { 119 | j = duplicates.push( i ); 120 | } 121 | } 122 | while ( j-- ) { 123 | results.splice( duplicates[ j ], 1 ); 124 | } 125 | } 126 | 127 | // Clear input after sorting to release objects 128 | // See https://github.com/jquery/sizzle/pull/225 129 | sortInput = null; 130 | 131 | return results; 132 | } 133 | 134 | function escape( sel ) { 135 | return ( sel + "" ).replace( rcssescape, fcssescape ); 136 | } 137 | 138 | jQuery.extend( { 139 | uniqueSort: uniqueSort, 140 | unique: uniqueSort, 141 | escapeSelector: escape, 142 | find: function( selector, context, results, seed ) { 143 | var elem, nodeType, 144 | i = 0; 145 | 146 | results = results || []; 147 | context = context || document; 148 | 149 | // Same basic safeguard as Sizzle 150 | if ( !selector || typeof selector !== "string" ) { 151 | return results; 152 | } 153 | 154 | // Early return if context is not an element or document 155 | if ( ( nodeType = context.nodeType ) !== 1 && nodeType !== 9 ) { 156 | return []; 157 | } 158 | 159 | if ( seed ) { 160 | while ( ( elem = seed[ i++ ] ) ) { 161 | if ( jQuery.find.matchesSelector( elem, selector ) ) { 162 | results.push( elem ); 163 | } 164 | } 165 | } else { 166 | jQuery.merge( results, context.querySelectorAll( selector ) ); 167 | } 168 | 169 | return results; 170 | }, 171 | text: function( elem ) { 172 | var node, 173 | ret = "", 174 | i = 0, 175 | nodeType = elem.nodeType; 176 | 177 | if ( !nodeType ) { 178 | 179 | // If no nodeType, this is expected to be an array 180 | while ( ( node = elem[ i++ ] ) ) { 181 | 182 | // Do not traverse comment nodes 183 | ret += jQuery.text( node ); 184 | } 185 | } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { 186 | 187 | // Use textContent for elements 188 | return elem.textContent; 189 | } else if ( nodeType === 3 || nodeType === 4 ) { 190 | return elem.nodeValue; 191 | } 192 | 193 | // Do not include comment or processing instruction nodes 194 | 195 | return ret; 196 | }, 197 | contains: function( a, b ) { 198 | var adown = a.nodeType === 9 ? a.documentElement : a, 199 | bup = b && b.parentNode; 200 | return a === bup || !!( bup && bup.nodeType === 1 && adown.contains( bup ) ); 201 | }, 202 | isXMLDoc: function( elem ) { 203 | 204 | // documentElement is verified for cases where it doesn't yet exist 205 | // (such as loading iframes in IE - #4833) 206 | var documentElement = elem && ( elem.ownerDocument || elem ).documentElement; 207 | return documentElement ? documentElement.nodeName !== "HTML" : false; 208 | }, 209 | expr: { 210 | attrHandle: {}, 211 | match: { 212 | bool: new RegExp( "^(?:checked|selected|async|autofocus|autoplay|controls|defer" + 213 | "|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped)$", "i" ), 214 | needsContext: /^[\x20\t\r\n\f]*[>+~]/ 215 | } 216 | } 217 | } ); 218 | 219 | jQuery.extend( jQuery.find, { 220 | matches: function( expr, elements ) { 221 | return jQuery.find( expr, null, null, elements ); 222 | }, 223 | matchesSelector: function( elem, expr ) { 224 | return matches.call( elem, expr ); 225 | }, 226 | attr: function( elem, name ) { 227 | var fn = jQuery.expr.attrHandle[ name.toLowerCase() ], 228 | 229 | // Don't get fooled by Object.prototype properties (jQuery #13807) 230 | value = fn && hasOwn.call( jQuery.expr.attrHandle, name.toLowerCase() ) ? 231 | fn( elem, name, jQuery.isXMLDoc( elem ) ) : 232 | undefined; 233 | return value !== undefined ? value : elem.getAttribute( name ); 234 | } 235 | } ); 236 | 237 | } ); 238 | -------------------------------------------------------------------------------- /etc/tor/torrc: -------------------------------------------------------------------------------- 1 | ## Configuration file for a typical Tor user 2 | ## Last updated 22 September 2015 for Tor 0.2.7.3-alpha. 3 | ## (may or may not work for much older or much newer versions of Tor.) 4 | ## 5 | ## Lines that begin with "## " try to explain what's going on. Lines 6 | ## that begin with just "#" are disabled commands: you can enable them 7 | ## by removing the "#" symbol. 8 | ## 9 | ## See 'man tor', or https://www.torproject.org/docs/tor-manual.html, 10 | ## for more options you can use in this file. 11 | ## 12 | ## Tor will look for this file in various places based on your platform: 13 | ## https://www.torproject.org/docs/faq#torrc 14 | 15 | ## Tor opens a SOCKS proxy on port 9050 by default -- even if you don't 16 | ## configure one below. Set "SOCKSPort 0" if you plan to run Tor only 17 | ## as a relay, and not make any local application connections yourself. 18 | #SOCKSPort 9050 # Default: Bind to localhost:9050 for local connections. 19 | #SOCKSPort 192.168.0.1:9100 # Bind to this address:port too. 20 | 21 | ## Entry policies to allow/deny SOCKS requests based on IP address. 22 | ## First entry that matches wins. If no SOCKSPolicy is set, we accept 23 | ## all (and only) requests that reach a SOCKSPort. Untrusted users who 24 | ## can access your SOCKSPort may be able to learn about the connections 25 | ## you make. 26 | #SOCKSPolicy accept 192.168.0.0/16 27 | #SOCKSPolicy accept6 FC00::/7 28 | #SOCKSPolicy reject * 29 | 30 | ## Logs go to stdout at level "notice" unless redirected by something 31 | ## else, like one of the below lines. You can have as many Log lines as 32 | ## you want. 33 | ## 34 | ## We advise using "notice" in most cases, since anything more verbose 35 | ## may provide sensitive information to an attacker who obtains the logs. 36 | ## 37 | ## Send all messages of level 'notice' or higher to /var/log/tor/notices.log 38 | #Log notice file /var/log/tor/notices.log 39 | ## Send every possible message to /var/log/tor/debug.log 40 | #Log debug file /var/log/tor/debug.log 41 | ## Use the system log instead of Tor's logfiles 42 | #Log notice syslog 43 | ## To send all messages to stderr: 44 | #Log debug stderr 45 | 46 | ## Uncomment this to start the process in the background... or use 47 | ## --runasdaemon 1 on the command line. This is ignored on Windows; 48 | ## see the FAQ entry if you want Tor to run as an NT service. 49 | #RunAsDaemon 1 50 | 51 | ## The directory for keeping all the keys/etc. By default, we store 52 | ## things in $HOME/.tor on Unix, and in Application Data\tor on Windows. 53 | #DataDirectory /var/lib/tor 54 | 55 | ## The port on which Tor will listen for local connections from Tor 56 | ## controller applications, as documented in control-spec.txt. 57 | #ControlPort 9051 58 | ## If you enable the controlport, be sure to enable one of these 59 | ## authentication methods, to prevent attackers from accessing it. 60 | #HashedControlPassword 16:872860B76453A77D60CA2BB8C1A7042072093276A3D701AD684053EC4C 61 | #CookieAuthentication 1 62 | 63 | ############### This section is just for location-hidden services ### 64 | 65 | ## Once you have configured a hidden service, you can look at the 66 | ## contents of the file ".../hidden_service/hostname" for the address 67 | ## to tell people. 68 | ## 69 | ## HiddenServicePort x y:z says to redirect requests on port x to the 70 | ## address y:z. 71 | 72 | HiddenServiceDir /var/lib/tor/hidden_service/ 73 | HiddenServicePort 443 127.0.0.1:443 74 | 75 | #HiddenServiceDir /var/lib/tor/other_hidden_service/ 76 | #HiddenServicePort 80 127.0.0.1:80 77 | #HiddenServicePort 22 127.0.0.1:22 78 | 79 | ################ This section is just for relays ##################### 80 | # 81 | ## See https://www.torproject.org/docs/tor-doc-relay for details. 82 | 83 | ## Required: what port to advertise for incoming Tor connections. 84 | #ORPort 9001 85 | ## If you want to listen on a port other than the one advertised in 86 | ## ORPort (e.g. to advertise 443 but bind to 9090), you can do it as 87 | ## follows. You'll need to do ipchains or other port forwarding 88 | ## yourself to make this work. 89 | #ORPort 443 NoListen 90 | #ORPort 127.0.0.1:9090 NoAdvertise 91 | 92 | ## The IP address or full DNS name for incoming connections to your 93 | ## relay. Leave commented out and Tor will guess. 94 | #Address noname.example.com 95 | 96 | ## If you have multiple network interfaces, you can specify one for 97 | ## outgoing traffic to use. 98 | # OutboundBindAddress 10.0.0.5 99 | 100 | ## A handle for your relay, so people don't have to refer to it by key. 101 | #Nickname ididnteditheconfig 102 | 103 | ## Define these to limit how much relayed traffic you will allow. Your 104 | ## own traffic is still unthrottled. Note that RelayBandwidthRate must 105 | ## be at least 20 kilobytes per second. 106 | ## Note that units for these config options are bytes (per second), not 107 | ## bits (per second), and that prefixes are binary prefixes, i.e. 2^10, 108 | ## 2^20, etc. 109 | #RelayBandwidthRate 100 KBytes # Throttle traffic to 100KB/s (800Kbps) 110 | #RelayBandwidthBurst 200 KBytes # But allow bursts up to 200KB (1600Kb) 111 | 112 | ## Use these to restrict the maximum traffic per day, week, or month. 113 | ## Note that this threshold applies separately to sent and received bytes, 114 | ## not to their sum: setting "40 GB" may allow up to 80 GB total before 115 | ## hibernating. 116 | ## 117 | ## Set a maximum of 40 gigabytes each way per period. 118 | #AccountingMax 40 GBytes 119 | ## Each period starts daily at midnight (AccountingMax is per day) 120 | #AccountingStart day 00:00 121 | ## Each period starts on the 3rd of the month at 15:00 (AccountingMax 122 | ## is per month) 123 | #AccountingStart month 3 15:00 124 | 125 | ## Administrative contact information for this relay or bridge. This line 126 | ## can be used to contact you if your relay or bridge is misconfigured or 127 | ## something else goes wrong. Note that we archive and publish all 128 | ## descriptors containing these lines and that Google indexes them, so 129 | ## spammers might also collect them. You may want to obscure the fact that 130 | ## it's an email address and/or generate a new address for this purpose. 131 | #ContactInfo Random Person 132 | ## You might also include your PGP or GPG fingerprint if you have one: 133 | #ContactInfo 0xFFFFFFFF Random Person 134 | 135 | ## Uncomment this to mirror directory information for others. Please do 136 | ## if you have enough bandwidth. 137 | #DirPort 9030 # what port to advertise for directory connections 138 | ## If you want to listen on a port other than the one advertised in 139 | ## DirPort (e.g. to advertise 80 but bind to 9091), you can do it as 140 | ## follows. below too. You'll need to do ipchains or other port 141 | ## forwarding yourself to make this work. 142 | #DirPort 80 NoListen 143 | #DirPort 127.0.0.1:9091 NoAdvertise 144 | ## Uncomment to return an arbitrary blob of html on your DirPort. Now you 145 | ## can explain what Tor is if anybody wonders why your IP address is 146 | ## contacting them. See contrib/tor-exit-notice.html in Tor's source 147 | ## distribution for a sample. 148 | #DirPortFrontPage /etc/tor/tor-exit-notice.html 149 | 150 | ## Uncomment this if you run more than one Tor relay, and add the identity 151 | ## key fingerprint of each Tor relay you control, even if they're on 152 | ## different networks. You declare it here so Tor clients can avoid 153 | ## using more than one of your relays in a single circuit. See 154 | ## https://www.torproject.org/docs/faq#MultipleRelays 155 | ## However, you should never include a bridge's fingerprint here, as it would 156 | ## break its concealability and potentially reveal its IP/TCP address. 157 | #MyFamily $keyid,$keyid,... 158 | 159 | ## A comma-separated list of exit policies. They're considered first 160 | ## to last, and the first match wins. 161 | ## 162 | ## If you want to allow the same ports on IPv4 and IPv6, write your rules 163 | ## using accept/reject *. If you want to allow different ports on IPv4 and 164 | ## IPv6, write your IPv6 rules using accept6/reject6 *6, and your IPv4 rules 165 | ## using accept/reject *4. 166 | ## 167 | ## If you want to _replace_ the default exit policy, end this with either a 168 | ## reject *:* or an accept *:*. Otherwise, you're _augmenting_ (prepending to) 169 | ## the default exit policy. Leave commented to just use the default, which is 170 | ## described in the man page or at 171 | ## https://www.torproject.org/documentation.html 172 | ## 173 | ## Look at https://www.torproject.org/faq-abuse.html#TypicalAbuses 174 | ## for issues you might encounter if you use the default exit policy. 175 | ## 176 | ## If certain IPs and ports are blocked externally, e.g. by your firewall, 177 | ## you should update your exit policy to reflect this -- otherwise Tor 178 | ## users will be told that those destinations are down. 179 | ## 180 | ## For security, by default Tor rejects connections to private (local) 181 | ## networks, including to the configured primary public IPv4 and IPv6 addresses, 182 | ## and any public IPv4 and IPv6 addresses on any interface on the relay. 183 | ## See the man page entry for ExitPolicyRejectPrivate if you want to allow 184 | ## "exit enclaving". 185 | ## 186 | #ExitPolicy accept *:6660-6667,reject *:* # allow irc ports on IPv4 and IPv6 but no more 187 | #ExitPolicy accept *:119 # accept nntp ports on IPv4 and IPv6 as well as default exit policy 188 | #ExitPolicy accept *4:119 # accept nntp ports on IPv4 only as well as default exit policy 189 | #ExitPolicy accept6 *6:119 # accept nntp ports on IPv6 only as well as default exit policy 190 | #ExitPolicy reject *:* # no exits allowed 191 | 192 | ## Bridge relays (or "bridges") are Tor relays that aren't listed in the 193 | ## main directory. Since there is no complete public list of them, even an 194 | ## ISP that filters connections to all the known Tor relays probably 195 | ## won't be able to block all the bridges. Also, websites won't treat you 196 | ## differently because they won't know you're running Tor. If you can 197 | ## be a real relay, please do; but if not, be a bridge! 198 | #BridgeRelay 1 199 | ## By default, Tor will advertise your bridge to users through various 200 | ## mechanisms like https://bridges.torproject.org/. If you want to run 201 | ## a private bridge, for example because you'll give out your bridge 202 | ## address manually to your friends, uncomment this line: 203 | #PublishServerDescriptor 0 204 | 205 | -------------------------------------------------------------------------------- /www/bower_components/jquery/AUTHORS.txt: -------------------------------------------------------------------------------- 1 | Authors ordered by first contribution. 2 | 3 | John Resig 4 | Gilles van den Hoven 5 | Michael Geary 6 | Stefan Petre 7 | Yehuda Katz 8 | Corey Jewett 9 | Klaus Hartl 10 | Franck Marcia 11 | Jörn Zaefferer 12 | Paul Bakaus 13 | Brandon Aaron 14 | Mike Alsup 15 | Dave Methvin 16 | Ed Engelhardt 17 | Sean Catchpole 18 | Paul Mclanahan 19 | David Serduke 20 | Richard D. Worth 21 | Scott González 22 | Ariel Flesler 23 | Jon Evans 24 | TJ Holowaychuk 25 | Michael Bensoussan 26 | Robert Katić 27 | Louis-Rémi Babé 28 | Earle Castledine 29 | Damian Janowski 30 | Rich Dougherty 31 | Kim Dalsgaard 32 | Andrea Giammarchi 33 | Mark Gibson 34 | Karl Swedberg 35 | Justin Meyer 36 | Ben Alman 37 | James Padolsey 38 | David Petersen 39 | Batiste Bieler 40 | Alexander Farkas 41 | Rick Waldron 42 | Filipe Fortes 43 | Neeraj Singh 44 | Paul Irish 45 | Iraê Carvalho 46 | Matt Curry 47 | Michael Monteleone 48 | Noah Sloan 49 | Tom Viner 50 | Douglas Neiner 51 | Adam J. Sontag 52 | Dave Reed 53 | Ralph Whitbeck 54 | Carl Fürstenberg 55 | Jacob Wright 56 | J. Ryan Stinnett 57 | unknown 58 | temp01 59 | Heungsub Lee 60 | Colin Snover 61 | Ryan W Tenney 62 | Pinhook 63 | Ron Otten 64 | Jephte Clain 65 | Anton Matzneller 66 | Alex Sexton 67 | Dan Heberden 68 | Henri Wiechers 69 | Russell Holbrook 70 | Julian Aubourg 71 | Gianni Alessandro Chiappetta 72 | Scott Jehl 73 | James Burke 74 | Jonas Pfenniger 75 | Xavi Ramirez 76 | Jared Grippe 77 | Sylvester Keil 78 | Brandon Sterne 79 | Mathias Bynens 80 | Timmy Willison <4timmywil@gmail.com> 81 | Corey Frang 82 | Digitalxero 83 | Anton Kovalyov 84 | David Murdoch 85 | Josh Varner 86 | Charles McNulty 87 | Jordan Boesch 88 | Jess Thrysoee 89 | Michael Murray 90 | Lee Carpenter 91 | Alexis Abril 92 | Rob Morgan 93 | John Firebaugh 94 | Sam Bisbee 95 | Gilmore Davidson 96 | Brian Brennan 97 | Xavier Montillet 98 | Daniel Pihlstrom 99 | Sahab Yazdani 100 | avaly 101 | Scott Hughes 102 | Mike Sherov 103 | Greg Hazel 104 | Schalk Neethling 105 | Denis Knauf 106 | Timo Tijhof 107 | Steen Nielsen 108 | Anton Ryzhov 109 | Shi Chuan 110 | Berker Peksag 111 | Toby Brain 112 | Matt Mueller 113 | Justin 114 | Daniel Herman 115 | Oleg Gaidarenko 116 | Richard Gibson 117 | Rafaël Blais Masson 118 | cmc3cn <59194618@qq.com> 119 | Joe Presbrey 120 | Sindre Sorhus 121 | Arne de Bree 122 | Vladislav Zarakovsky 123 | Andrew E Monat 124 | Oskari 125 | Joao Henrique de Andrade Bruni 126 | tsinha 127 | Matt Farmer 128 | Trey Hunner 129 | Jason Moon 130 | Jeffery To 131 | Kris Borchers 132 | Vladimir Zhuravlev 133 | Jacob Thornton 134 | Chad Killingsworth 135 | Nowres Rafid 136 | David Benjamin 137 | Uri Gilad 138 | Chris Faulkner 139 | Elijah Manor 140 | Daniel Chatfield 141 | Nikita Govorov 142 | Wesley Walser 143 | Mike Pennisi 144 | Markus Staab 145 | Dave Riddle 146 | Callum Macrae 147 | Benjamin Truyman 148 | James Huston 149 | Erick Ruiz de Chávez 150 | David Bonner 151 | Akintayo Akinwunmi 152 | MORGAN 153 | Ismail Khair 154 | Carl Danley 155 | Mike Petrovich 156 | Greg Lavallee 157 | Daniel Gálvez 158 | Sai Lung Wong 159 | Tom H Fuertes 160 | Roland Eckl 161 | Jay Merrifield 162 | Allen J Schmidt Jr 163 | Jonathan Sampson 164 | Marcel Greter 165 | Matthias Jäggli 166 | David Fox 167 | Yiming He 168 | Devin Cooper 169 | Paul Ramos 170 | Rod Vagg 171 | Bennett Sorbo 172 | Sebastian Burkhard 173 | Zachary Adam Kaplan 174 | nanto_vi 175 | nanto 176 | Danil Somsikov 177 | Ryunosuke SATO 178 | Jean Boussier 179 | Adam Coulombe 180 | Andrew Plummer 181 | Mark Raddatz 182 | Isaac Z. Schlueter 183 | Karl Sieburg 184 | Pascal Borreli 185 | Nguyen Phuc Lam 186 | Dmitry Gusev 187 | Michał Gołębiowski 188 | Li Xudong 189 | Steven Benner 190 | Tom H Fuertes 191 | Renato Oliveira dos Santos 192 | ros3cin 193 | Jason Bedard 194 | Kyle Robinson Young 195 | Chris Talkington 196 | Eddie Monge 197 | Terry Jones 198 | Jason Merino 199 | Jeremy Dunck 200 | Chris Price 201 | Guy Bedford 202 | Amey Sakhadeo 203 | Mike Sidorov 204 | Anthony Ryan 205 | Dominik D. Geyer 206 | George Kats 207 | Lihan Li 208 | Ronny Springer 209 | Chris Antaki 210 | Marian Sollmann 211 | njhamann 212 | Ilya Kantor 213 | David Hong 214 | John Paul 215 | Jakob Stoeck 216 | Christopher Jones 217 | Forbes Lindesay 218 | S. Andrew Sheppard 219 | Leonardo Balter 220 | Roman Reiß 221 | Benjy Cui 222 | Rodrigo Rosenfeld Rosas 223 | John Hoven 224 | Philip Jägenstedt 225 | Christian Kosmowski 226 | Liang Peng 227 | TJ VanToll 228 | Senya Pugach 229 | Aurelio De Rosa 230 | Nazar Mokrynskyi 231 | Amit Merchant 232 | Jason Bedard 233 | Arthur Verschaeve 234 | Dan Hart 235 | Bin Xin 236 | David Corbacho 237 | Veaceslav Grimalschi 238 | Daniel Husar 239 | Frederic Hemberger 240 | Ben Toews 241 | Aditya Raghavan 242 | Victor Homyakov 243 | Shivaji Varma 244 | Nicolas HENRY 245 | Anne-Gaelle Colom 246 | George Mauer 247 | Leonardo Braga 248 | Stephen Edgar 249 | Thomas Tortorini 250 | Winston Howes 251 | Jon Hester 252 | Alexander O'Mara 253 | Bastian Buchholz 254 | Arthur Stolyar 255 | Calvin Metcalf 256 | Mu Haibao 257 | Richard McDaniel 258 | Chris Rebert 259 | Gabriel Schulhof 260 | Gilad Peleg 261 | Martin Naumann 262 | Marek Lewandowski 263 | Bruno Pérel 264 | Reed Loden 265 | Daniel Nill 266 | Yongwoo Jeon 267 | Sean Henderson 268 | Richard Kraaijenhagen 269 | Connor Atherton 270 | Gary Ye 271 | Christian Grete 272 | Liza Ramo 273 | Julian Alexander Murillo 274 | Joelle Fleurantin 275 | Jae Sung Park 276 | Jun Sun 277 | Josh Soref 278 | Henry Wong 279 | Jon Dufresne 280 | Martijn W. van der Lee 281 | Devin Wilson 282 | Steve Mao 283 | Zack Hall 284 | Bernhard M. Wiedemann 285 | Todor Prikumov 286 | Jha Naman 287 | William Robinet 288 | Alexander Lisianoi 289 | Vitaliy Terziev 290 | Joe Trumbull 291 | Alexander K 292 | Damian Senn 293 | Ralin Chimev 294 | Felipe Sateler 295 | Christophe Tafani-Dereeper 296 | -------------------------------------------------------------------------------- /www/bower_components/jquery/src/deferred.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "./core", 3 | "./var/slice", 4 | "./callbacks" 5 | ], function( jQuery, slice ) { 6 | 7 | "use strict"; 8 | 9 | function Identity( v ) { 10 | return v; 11 | } 12 | function Thrower( ex ) { 13 | throw ex; 14 | } 15 | 16 | function adoptValue( value, resolve, reject ) { 17 | var method; 18 | 19 | try { 20 | 21 | // Check for promise aspect first to privilege synchronous behavior 22 | if ( value && jQuery.isFunction( ( method = value.promise ) ) ) { 23 | method.call( value ).done( resolve ).fail( reject ); 24 | 25 | // Other thenables 26 | } else if ( value && jQuery.isFunction( ( method = value.then ) ) ) { 27 | method.call( value, resolve, reject ); 28 | 29 | // Other non-thenables 30 | } else { 31 | 32 | // Support: Android 4.0 only 33 | // Strict mode functions invoked without .call/.apply get global-object context 34 | resolve.call( undefined, value ); 35 | } 36 | 37 | // For Promises/A+, convert exceptions into rejections 38 | // Since jQuery.when doesn't unwrap thenables, we can skip the extra checks appearing in 39 | // Deferred#then to conditionally suppress rejection. 40 | } catch ( value ) { 41 | 42 | // Support: Android 4.0 only 43 | // Strict mode functions invoked without .call/.apply get global-object context 44 | reject.call( undefined, value ); 45 | } 46 | } 47 | 48 | jQuery.extend( { 49 | 50 | Deferred: function( func ) { 51 | var tuples = [ 52 | 53 | // action, add listener, callbacks, 54 | // ... .then handlers, argument index, [final state] 55 | [ "notify", "progress", jQuery.Callbacks( "memory" ), 56 | jQuery.Callbacks( "memory" ), 2 ], 57 | [ "resolve", "done", jQuery.Callbacks( "once memory" ), 58 | jQuery.Callbacks( "once memory" ), 0, "resolved" ], 59 | [ "reject", "fail", jQuery.Callbacks( "once memory" ), 60 | jQuery.Callbacks( "once memory" ), 1, "rejected" ] 61 | ], 62 | state = "pending", 63 | promise = { 64 | state: function() { 65 | return state; 66 | }, 67 | always: function() { 68 | deferred.done( arguments ).fail( arguments ); 69 | return this; 70 | }, 71 | "catch": function( fn ) { 72 | return promise.then( null, fn ); 73 | }, 74 | 75 | // Keep pipe for back-compat 76 | pipe: function( /* fnDone, fnFail, fnProgress */ ) { 77 | var fns = arguments; 78 | 79 | return jQuery.Deferred( function( newDefer ) { 80 | jQuery.each( tuples, function( i, tuple ) { 81 | 82 | // Map tuples (progress, done, fail) to arguments (done, fail, progress) 83 | var fn = jQuery.isFunction( fns[ tuple[ 4 ] ] ) && fns[ tuple[ 4 ] ]; 84 | 85 | // deferred.progress(function() { bind to newDefer or newDefer.notify }) 86 | // deferred.done(function() { bind to newDefer or newDefer.resolve }) 87 | // deferred.fail(function() { bind to newDefer or newDefer.reject }) 88 | deferred[ tuple[ 1 ] ]( function() { 89 | var returned = fn && fn.apply( this, arguments ); 90 | if ( returned && jQuery.isFunction( returned.promise ) ) { 91 | returned.promise() 92 | .progress( newDefer.notify ) 93 | .done( newDefer.resolve ) 94 | .fail( newDefer.reject ); 95 | } else { 96 | newDefer[ tuple[ 0 ] + "With" ]( 97 | this, 98 | fn ? [ returned ] : arguments 99 | ); 100 | } 101 | } ); 102 | } ); 103 | fns = null; 104 | } ).promise(); 105 | }, 106 | then: function( onFulfilled, onRejected, onProgress ) { 107 | var maxDepth = 0; 108 | function resolve( depth, deferred, handler, special ) { 109 | return function() { 110 | var that = this, 111 | args = arguments, 112 | mightThrow = function() { 113 | var returned, then; 114 | 115 | // Support: Promises/A+ section 2.3.3.3.3 116 | // https://promisesaplus.com/#point-59 117 | // Ignore double-resolution attempts 118 | if ( depth < maxDepth ) { 119 | return; 120 | } 121 | 122 | returned = handler.apply( that, args ); 123 | 124 | // Support: Promises/A+ section 2.3.1 125 | // https://promisesaplus.com/#point-48 126 | if ( returned === deferred.promise() ) { 127 | throw new TypeError( "Thenable self-resolution" ); 128 | } 129 | 130 | // Support: Promises/A+ sections 2.3.3.1, 3.5 131 | // https://promisesaplus.com/#point-54 132 | // https://promisesaplus.com/#point-75 133 | // Retrieve `then` only once 134 | then = returned && 135 | 136 | // Support: Promises/A+ section 2.3.4 137 | // https://promisesaplus.com/#point-64 138 | // Only check objects and functions for thenability 139 | ( typeof returned === "object" || 140 | typeof returned === "function" ) && 141 | returned.then; 142 | 143 | // Handle a returned thenable 144 | if ( jQuery.isFunction( then ) ) { 145 | 146 | // Special processors (notify) just wait for resolution 147 | if ( special ) { 148 | then.call( 149 | returned, 150 | resolve( maxDepth, deferred, Identity, special ), 151 | resolve( maxDepth, deferred, Thrower, special ) 152 | ); 153 | 154 | // Normal processors (resolve) also hook into progress 155 | } else { 156 | 157 | // ...and disregard older resolution values 158 | maxDepth++; 159 | 160 | then.call( 161 | returned, 162 | resolve( maxDepth, deferred, Identity, special ), 163 | resolve( maxDepth, deferred, Thrower, special ), 164 | resolve( maxDepth, deferred, Identity, 165 | deferred.notifyWith ) 166 | ); 167 | } 168 | 169 | // Handle all other returned values 170 | } else { 171 | 172 | // Only substitute handlers pass on context 173 | // and multiple values (non-spec behavior) 174 | if ( handler !== Identity ) { 175 | that = undefined; 176 | args = [ returned ]; 177 | } 178 | 179 | // Process the value(s) 180 | // Default process is resolve 181 | ( special || deferred.resolveWith )( that, args ); 182 | } 183 | }, 184 | 185 | // Only normal processors (resolve) catch and reject exceptions 186 | process = special ? 187 | mightThrow : 188 | function() { 189 | try { 190 | mightThrow(); 191 | } catch ( e ) { 192 | 193 | if ( jQuery.Deferred.exceptionHook ) { 194 | jQuery.Deferred.exceptionHook( e, 195 | process.stackTrace ); 196 | } 197 | 198 | // Support: Promises/A+ section 2.3.3.3.4.1 199 | // https://promisesaplus.com/#point-61 200 | // Ignore post-resolution exceptions 201 | if ( depth + 1 >= maxDepth ) { 202 | 203 | // Only substitute handlers pass on context 204 | // and multiple values (non-spec behavior) 205 | if ( handler !== Thrower ) { 206 | that = undefined; 207 | args = [ e ]; 208 | } 209 | 210 | deferred.rejectWith( that, args ); 211 | } 212 | } 213 | }; 214 | 215 | // Support: Promises/A+ section 2.3.3.3.1 216 | // https://promisesaplus.com/#point-57 217 | // Re-resolve promises immediately to dodge false rejection from 218 | // subsequent errors 219 | if ( depth ) { 220 | process(); 221 | } else { 222 | 223 | // Call an optional hook to record the stack, in case of exception 224 | // since it's otherwise lost when execution goes async 225 | if ( jQuery.Deferred.getStackHook ) { 226 | process.stackTrace = jQuery.Deferred.getStackHook(); 227 | } 228 | window.setTimeout( process ); 229 | } 230 | }; 231 | } 232 | 233 | return jQuery.Deferred( function( newDefer ) { 234 | 235 | // progress_handlers.add( ... ) 236 | tuples[ 0 ][ 3 ].add( 237 | resolve( 238 | 0, 239 | newDefer, 240 | jQuery.isFunction( onProgress ) ? 241 | onProgress : 242 | Identity, 243 | newDefer.notifyWith 244 | ) 245 | ); 246 | 247 | // fulfilled_handlers.add( ... ) 248 | tuples[ 1 ][ 3 ].add( 249 | resolve( 250 | 0, 251 | newDefer, 252 | jQuery.isFunction( onFulfilled ) ? 253 | onFulfilled : 254 | Identity 255 | ) 256 | ); 257 | 258 | // rejected_handlers.add( ... ) 259 | tuples[ 2 ][ 3 ].add( 260 | resolve( 261 | 0, 262 | newDefer, 263 | jQuery.isFunction( onRejected ) ? 264 | onRejected : 265 | Thrower 266 | ) 267 | ); 268 | } ).promise(); 269 | }, 270 | 271 | // Get a promise for this deferred 272 | // If obj is provided, the promise aspect is added to the object 273 | promise: function( obj ) { 274 | return obj != null ? jQuery.extend( obj, promise ) : promise; 275 | } 276 | }, 277 | deferred = {}; 278 | 279 | // Add list-specific methods 280 | jQuery.each( tuples, function( i, tuple ) { 281 | var list = tuple[ 2 ], 282 | stateString = tuple[ 5 ]; 283 | 284 | // promise.progress = list.add 285 | // promise.done = list.add 286 | // promise.fail = list.add 287 | promise[ tuple[ 1 ] ] = list.add; 288 | 289 | // Handle state 290 | if ( stateString ) { 291 | list.add( 292 | function() { 293 | 294 | // state = "resolved" (i.e., fulfilled) 295 | // state = "rejected" 296 | state = stateString; 297 | }, 298 | 299 | // rejected_callbacks.disable 300 | // fulfilled_callbacks.disable 301 | tuples[ 3 - i ][ 2 ].disable, 302 | 303 | // progress_callbacks.lock 304 | tuples[ 0 ][ 2 ].lock 305 | ); 306 | } 307 | 308 | // progress_handlers.fire 309 | // fulfilled_handlers.fire 310 | // rejected_handlers.fire 311 | list.add( tuple[ 3 ].fire ); 312 | 313 | // deferred.notify = function() { deferred.notifyWith(...) } 314 | // deferred.resolve = function() { deferred.resolveWith(...) } 315 | // deferred.reject = function() { deferred.rejectWith(...) } 316 | deferred[ tuple[ 0 ] ] = function() { 317 | deferred[ tuple[ 0 ] + "With" ]( this === deferred ? undefined : this, arguments ); 318 | return this; 319 | }; 320 | 321 | // deferred.notifyWith = list.fireWith 322 | // deferred.resolveWith = list.fireWith 323 | // deferred.rejectWith = list.fireWith 324 | deferred[ tuple[ 0 ] + "With" ] = list.fireWith; 325 | } ); 326 | 327 | // Make the deferred a promise 328 | promise.promise( deferred ); 329 | 330 | // Call given func if any 331 | if ( func ) { 332 | func.call( deferred, deferred ); 333 | } 334 | 335 | // All done! 336 | return deferred; 337 | }, 338 | 339 | // Deferred helper 340 | when: function( singleValue ) { 341 | var 342 | 343 | // count of uncompleted subordinates 344 | remaining = arguments.length, 345 | 346 | // count of unprocessed arguments 347 | i = remaining, 348 | 349 | // subordinate fulfillment data 350 | resolveContexts = Array( i ), 351 | resolveValues = slice.call( arguments ), 352 | 353 | // the master Deferred 354 | master = jQuery.Deferred(), 355 | 356 | // subordinate callback factory 357 | updateFunc = function( i ) { 358 | return function( value ) { 359 | resolveContexts[ i ] = this; 360 | resolveValues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value; 361 | if ( !( --remaining ) ) { 362 | master.resolveWith( resolveContexts, resolveValues ); 363 | } 364 | }; 365 | }; 366 | 367 | // Single- and empty arguments are adopted like Promise.resolve 368 | if ( remaining <= 1 ) { 369 | adoptValue( singleValue, master.done( updateFunc( i ) ).resolve, master.reject ); 370 | 371 | // Use .then() to unwrap secondary thenables (cf. gh-3000) 372 | if ( master.state() === "pending" || 373 | jQuery.isFunction( resolveValues[ i ] && resolveValues[ i ].then ) ) { 374 | 375 | return master.then(); 376 | } 377 | } 378 | 379 | // Multiple arguments are aggregated like Promise.all array elements 380 | while ( i-- ) { 381 | adoptValue( resolveValues[ i ], updateFunc( i ), master.reject ); 382 | } 383 | 384 | return master.promise(); 385 | } 386 | } ); 387 | 388 | return jQuery; 389 | } ); 390 | -------------------------------------------------------------------------------- /www/bower_components/jquery/src/css.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "./core", 3 | "./var/pnum", 4 | "./core/access", 5 | "./css/var/rmargin", 6 | "./var/document", 7 | "./var/rcssNum", 8 | "./css/var/rnumnonpx", 9 | "./css/var/cssExpand", 10 | "./css/var/getStyles", 11 | "./css/var/swap", 12 | "./css/curCSS", 13 | "./css/adjustCSS", 14 | "./css/addGetHookIf", 15 | "./css/support", 16 | 17 | "./core/init", 18 | "./core/ready", 19 | "./selector" // contains 20 | ], function( jQuery, pnum, access, rmargin, document, rcssNum, rnumnonpx, cssExpand, 21 | getStyles, swap, curCSS, adjustCSS, addGetHookIf, support ) { 22 | 23 | "use strict"; 24 | 25 | var 26 | 27 | // Swappable if display is none or starts with table 28 | // except "table", "table-cell", or "table-caption" 29 | // See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display 30 | rdisplayswap = /^(none|table(?!-c[ea]).+)/, 31 | cssShow = { position: "absolute", visibility: "hidden", display: "block" }, 32 | cssNormalTransform = { 33 | letterSpacing: "0", 34 | fontWeight: "400" 35 | }, 36 | 37 | cssPrefixes = [ "Webkit", "Moz", "ms" ], 38 | emptyStyle = document.createElement( "div" ).style; 39 | 40 | // Return a css property mapped to a potentially vendor prefixed property 41 | function vendorPropName( name ) { 42 | 43 | // Shortcut for names that are not vendor prefixed 44 | if ( name in emptyStyle ) { 45 | return name; 46 | } 47 | 48 | // Check for vendor prefixed names 49 | var capName = name[ 0 ].toUpperCase() + name.slice( 1 ), 50 | i = cssPrefixes.length; 51 | 52 | while ( i-- ) { 53 | name = cssPrefixes[ i ] + capName; 54 | if ( name in emptyStyle ) { 55 | return name; 56 | } 57 | } 58 | } 59 | 60 | function setPositiveNumber( elem, value, subtract ) { 61 | 62 | // Any relative (+/-) values have already been 63 | // normalized at this point 64 | var matches = rcssNum.exec( value ); 65 | return matches ? 66 | 67 | // Guard against undefined "subtract", e.g., when used as in cssHooks 68 | Math.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || "px" ) : 69 | value; 70 | } 71 | 72 | function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) { 73 | var i, 74 | val = 0; 75 | 76 | // If we already have the right measurement, avoid augmentation 77 | if ( extra === ( isBorderBox ? "border" : "content" ) ) { 78 | i = 4; 79 | 80 | // Otherwise initialize for horizontal or vertical properties 81 | } else { 82 | i = name === "width" ? 1 : 0; 83 | } 84 | 85 | for ( ; i < 4; i += 2 ) { 86 | 87 | // Both box models exclude margin, so add it if we want it 88 | if ( extra === "margin" ) { 89 | val += jQuery.css( elem, extra + cssExpand[ i ], true, styles ); 90 | } 91 | 92 | if ( isBorderBox ) { 93 | 94 | // border-box includes padding, so remove it if we want content 95 | if ( extra === "content" ) { 96 | val -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); 97 | } 98 | 99 | // At this point, extra isn't border nor margin, so remove border 100 | if ( extra !== "margin" ) { 101 | val -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); 102 | } 103 | } else { 104 | 105 | // At this point, extra isn't content, so add padding 106 | val += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); 107 | 108 | // At this point, extra isn't content nor padding, so add border 109 | if ( extra !== "padding" ) { 110 | val += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); 111 | } 112 | } 113 | } 114 | 115 | return val; 116 | } 117 | 118 | function getWidthOrHeight( elem, name, extra ) { 119 | 120 | // Start with offset property, which is equivalent to the border-box value 121 | var val, 122 | valueIsBorderBox = true, 123 | styles = getStyles( elem ), 124 | isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box"; 125 | 126 | // Support: IE <=11 only 127 | // Running getBoundingClientRect on a disconnected node 128 | // in IE throws an error. 129 | if ( elem.getClientRects().length ) { 130 | val = elem.getBoundingClientRect()[ name ]; 131 | } 132 | 133 | // Some non-html elements return undefined for offsetWidth, so check for null/undefined 134 | // svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285 135 | // MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668 136 | if ( val <= 0 || val == null ) { 137 | 138 | // Fall back to computed then uncomputed css if necessary 139 | val = curCSS( elem, name, styles ); 140 | if ( val < 0 || val == null ) { 141 | val = elem.style[ name ]; 142 | } 143 | 144 | // Computed unit is not pixels. Stop here and return. 145 | if ( rnumnonpx.test( val ) ) { 146 | return val; 147 | } 148 | 149 | // Check for style in case a browser which returns unreliable values 150 | // for getComputedStyle silently falls back to the reliable elem.style 151 | valueIsBorderBox = isBorderBox && 152 | ( support.boxSizingReliable() || val === elem.style[ name ] ); 153 | 154 | // Normalize "", auto, and prepare for extra 155 | val = parseFloat( val ) || 0; 156 | } 157 | 158 | // Use the active box-sizing model to add/subtract irrelevant styles 159 | return ( val + 160 | augmentWidthOrHeight( 161 | elem, 162 | name, 163 | extra || ( isBorderBox ? "border" : "content" ), 164 | valueIsBorderBox, 165 | styles 166 | ) 167 | ) + "px"; 168 | } 169 | 170 | jQuery.extend( { 171 | 172 | // Add in style property hooks for overriding the default 173 | // behavior of getting and setting a style property 174 | cssHooks: { 175 | opacity: { 176 | get: function( elem, computed ) { 177 | if ( computed ) { 178 | 179 | // We should always get a number back from opacity 180 | var ret = curCSS( elem, "opacity" ); 181 | return ret === "" ? "1" : ret; 182 | } 183 | } 184 | } 185 | }, 186 | 187 | // Don't automatically add "px" to these possibly-unitless properties 188 | cssNumber: { 189 | "animationIterationCount": true, 190 | "columnCount": true, 191 | "fillOpacity": true, 192 | "flexGrow": true, 193 | "flexShrink": true, 194 | "fontWeight": true, 195 | "lineHeight": true, 196 | "opacity": true, 197 | "order": true, 198 | "orphans": true, 199 | "widows": true, 200 | "zIndex": true, 201 | "zoom": true 202 | }, 203 | 204 | // Add in properties whose names you wish to fix before 205 | // setting or getting the value 206 | cssProps: { 207 | "float": "cssFloat" 208 | }, 209 | 210 | // Get and set the style property on a DOM Node 211 | style: function( elem, name, value, extra ) { 212 | 213 | // Don't set styles on text and comment nodes 214 | if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) { 215 | return; 216 | } 217 | 218 | // Make sure that we're working with the right name 219 | var ret, type, hooks, 220 | origName = jQuery.camelCase( name ), 221 | style = elem.style; 222 | 223 | name = jQuery.cssProps[ origName ] || 224 | ( jQuery.cssProps[ origName ] = vendorPropName( origName ) || origName ); 225 | 226 | // Gets hook for the prefixed version, then unprefixed version 227 | hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; 228 | 229 | // Check if we're setting a value 230 | if ( value !== undefined ) { 231 | type = typeof value; 232 | 233 | // Convert "+=" or "-=" to relative numbers (#7345) 234 | if ( type === "string" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) { 235 | value = adjustCSS( elem, name, ret ); 236 | 237 | // Fixes bug #9237 238 | type = "number"; 239 | } 240 | 241 | // Make sure that null and NaN values aren't set (#7116) 242 | if ( value == null || value !== value ) { 243 | return; 244 | } 245 | 246 | // If a number was passed in, add the unit (except for certain CSS properties) 247 | if ( type === "number" ) { 248 | value += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? "" : "px" ); 249 | } 250 | 251 | // background-* props affect original clone's values 252 | if ( !support.clearCloneStyle && value === "" && name.indexOf( "background" ) === 0 ) { 253 | style[ name ] = "inherit"; 254 | } 255 | 256 | // If a hook was provided, use that value, otherwise just set the specified value 257 | if ( !hooks || !( "set" in hooks ) || 258 | ( value = hooks.set( elem, value, extra ) ) !== undefined ) { 259 | 260 | style[ name ] = value; 261 | } 262 | 263 | } else { 264 | 265 | // If a hook was provided get the non-computed value from there 266 | if ( hooks && "get" in hooks && 267 | ( ret = hooks.get( elem, false, extra ) ) !== undefined ) { 268 | 269 | return ret; 270 | } 271 | 272 | // Otherwise just get the value from the style object 273 | return style[ name ]; 274 | } 275 | }, 276 | 277 | css: function( elem, name, extra, styles ) { 278 | var val, num, hooks, 279 | origName = jQuery.camelCase( name ); 280 | 281 | // Make sure that we're working with the right name 282 | name = jQuery.cssProps[ origName ] || 283 | ( jQuery.cssProps[ origName ] = vendorPropName( origName ) || origName ); 284 | 285 | // Try prefixed name followed by the unprefixed name 286 | hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; 287 | 288 | // If a hook was provided get the computed value from there 289 | if ( hooks && "get" in hooks ) { 290 | val = hooks.get( elem, true, extra ); 291 | } 292 | 293 | // Otherwise, if a way to get the computed value exists, use that 294 | if ( val === undefined ) { 295 | val = curCSS( elem, name, styles ); 296 | } 297 | 298 | // Convert "normal" to computed value 299 | if ( val === "normal" && name in cssNormalTransform ) { 300 | val = cssNormalTransform[ name ]; 301 | } 302 | 303 | // Make numeric if forced or a qualifier was provided and val looks numeric 304 | if ( extra === "" || extra ) { 305 | num = parseFloat( val ); 306 | return extra === true || isFinite( num ) ? num || 0 : val; 307 | } 308 | return val; 309 | } 310 | } ); 311 | 312 | jQuery.each( [ "height", "width" ], function( i, name ) { 313 | jQuery.cssHooks[ name ] = { 314 | get: function( elem, computed, extra ) { 315 | if ( computed ) { 316 | 317 | // Certain elements can have dimension info if we invisibly show them 318 | // but it must have a current display style that would benefit 319 | return rdisplayswap.test( jQuery.css( elem, "display" ) ) && 320 | 321 | // Support: Safari 8+ 322 | // Table columns in Safari have non-zero offsetWidth & zero 323 | // getBoundingClientRect().width unless display is changed. 324 | // Support: IE <=11 only 325 | // Running getBoundingClientRect on a disconnected node 326 | // in IE throws an error. 327 | ( !elem.getClientRects().length || !elem.getBoundingClientRect().width ) ? 328 | swap( elem, cssShow, function() { 329 | return getWidthOrHeight( elem, name, extra ); 330 | } ) : 331 | getWidthOrHeight( elem, name, extra ); 332 | } 333 | }, 334 | 335 | set: function( elem, value, extra ) { 336 | var matches, 337 | styles = extra && getStyles( elem ), 338 | subtract = extra && augmentWidthOrHeight( 339 | elem, 340 | name, 341 | extra, 342 | jQuery.css( elem, "boxSizing", false, styles ) === "border-box", 343 | styles 344 | ); 345 | 346 | // Convert to pixels if value adjustment is needed 347 | if ( subtract && ( matches = rcssNum.exec( value ) ) && 348 | ( matches[ 3 ] || "px" ) !== "px" ) { 349 | 350 | elem.style[ name ] = value; 351 | value = jQuery.css( elem, name ); 352 | } 353 | 354 | return setPositiveNumber( elem, value, subtract ); 355 | } 356 | }; 357 | } ); 358 | 359 | jQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft, 360 | function( elem, computed ) { 361 | if ( computed ) { 362 | return ( parseFloat( curCSS( elem, "marginLeft" ) ) || 363 | elem.getBoundingClientRect().left - 364 | swap( elem, { marginLeft: 0 }, function() { 365 | return elem.getBoundingClientRect().left; 366 | } ) 367 | ) + "px"; 368 | } 369 | } 370 | ); 371 | 372 | // These hooks are used by animate to expand properties 373 | jQuery.each( { 374 | margin: "", 375 | padding: "", 376 | border: "Width" 377 | }, function( prefix, suffix ) { 378 | jQuery.cssHooks[ prefix + suffix ] = { 379 | expand: function( value ) { 380 | var i = 0, 381 | expanded = {}, 382 | 383 | // Assumes a single number if not a string 384 | parts = typeof value === "string" ? value.split( " " ) : [ value ]; 385 | 386 | for ( ; i < 4; i++ ) { 387 | expanded[ prefix + cssExpand[ i ] + suffix ] = 388 | parts[ i ] || parts[ i - 2 ] || parts[ 0 ]; 389 | } 390 | 391 | return expanded; 392 | } 393 | }; 394 | 395 | if ( !rmargin.test( prefix ) ) { 396 | jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber; 397 | } 398 | } ); 399 | 400 | jQuery.fn.extend( { 401 | css: function( name, value ) { 402 | return access( this, function( elem, name, value ) { 403 | var styles, len, 404 | map = {}, 405 | i = 0; 406 | 407 | if ( jQuery.isArray( name ) ) { 408 | styles = getStyles( elem ); 409 | len = name.length; 410 | 411 | for ( ; i < len; i++ ) { 412 | map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles ); 413 | } 414 | 415 | return map; 416 | } 417 | 418 | return value !== undefined ? 419 | jQuery.style( elem, name, value ) : 420 | jQuery.css( elem, name ); 421 | }, name, value, arguments.length > 1 ); 422 | } 423 | } ); 424 | 425 | return jQuery; 426 | } ); 427 | --------------------------------------------------------------------------------