update new js files

This commit is contained in:
Maxwell Salzberg 2012-03-27 18:26:46 -07:00
parent 76bbe7be3f
commit e1bf6441fe
36 changed files with 16 additions and 3524 deletions

View file

@ -34,8 +34,6 @@ GIT
rack-fiber_pool
sinatra
<<<<<<< HEAD
=======
GIT
remote: git://github.com/pivotal/jasmine-gem.git
revision: 34c1529c3f7b78ebd81ac16006f141fc6b7cf013
@ -46,15 +44,6 @@ GIT
rspec (>= 1.3.1)
selenium-webdriver (>= 0.1.3)
GIT
remote: git://github.com/socialcast/resque-ensure-connected.git
revision: 8ac0f9e4658495097fb333a93db81d54ba9a5311
specs:
resque-ensure-connected (0.2.0)
activerecord (>= 2.3.5)
resque (>= 1.10.0)
>>>>>>> Fix Jasmine tests - first pass
GEM
remote: http://rubygems.org/
specs:
@ -161,13 +150,13 @@ GEM
eventmachine (>= 1.0.0.beta.1)
erubis (2.7.0)
eventmachine (1.0.0.beta.4)
excon (0.12.0)
excon (0.13.2)
execjs (1.3.0)
multi_json (~> 1.0)
factory_girl (2.6.4)
activesupport (>= 2.3.9)
factory_girl_rails (1.7.0)
factory_girl (~> 2.6.0)
factory_girl (3.0.0)
activesupport (>= 3.0.0)
factory_girl_rails (3.0.0)
factory_girl (~> 3.0.0)
railties (>= 3.0.0)
faraday (0.7.6)
addressable (~> 2.2)
@ -181,9 +170,9 @@ GEM
fixture_builder (0.3.1)
activerecord (>= 2)
activesupport (>= 2)
fog (1.3.0)
fog (1.3.1)
builder
excon (~> 0.12.0)
excon (~> 0.13.0)
formatador (~> 0.2.0)
mime-types
multi_json (~> 1.0)
@ -202,7 +191,7 @@ GEM
rspec-instafail (~> 0.1.8)
ruby-progressbar (~> 0.0.10)
gem_plugin (0.2.3)
gherkin (2.9.1)
gherkin (2.9.3)
json (>= 1.4.6)
haml (3.1.4)
handlebars_assets (0.4.1)
@ -230,29 +219,16 @@ GEM
actionpack (~> 3.0)
i18n-inflector (~> 2.6)
railties (~> 3.0)
<<<<<<< HEAD
jasmine (1.1.2)
jasmine-core (>= 1.1.0)
rack (>= 1.1)
rspec (>= 1.3.1)
selenium-webdriver (>= 0.1.3)
jasmine-core (1.1.0)
<<<<<<< HEAD
json (1.6.6)
=======
=======
jasmine-core (1.2.0.rc1)
>>>>>>> Fix Jasmine tests - first pass
jquery-rails (1.0.19)
railties (~> 3.0)
thor (~> 0.14)
json (1.6.5)
>>>>>>> stylesheets are basically now being served from sprockets
json (1.6.6)
jsonpath (0.5.0)
multi_json
jwt (0.1.4)
json (>= 1.2.4)
kgio (2.7.3)
kgio (2.7.4)
launchy (2.0.3)
linecache (0.46)
rbx-require-relative (> 0.0.4)
@ -269,7 +245,7 @@ GEM
mobile-fu (1.0.0)
rack-mobile-detect
rails
mock_redis (0.4.0)
mock_redis (0.4.1)
mongrel (1.1.5)
cgi_multipart_eof_fix (>= 2.4)
daemons (>= 1.0.3)
@ -313,7 +289,7 @@ GEM
omniauth-oauth (~> 1.0)
omniauth-twitter (0.0.8)
omniauth-oauth (~> 1.0)
orm_adapter (0.0.6)
orm_adapter (0.0.7)
parallel (0.5.16)
parallel_tests (0.7.2)
parallel
@ -454,10 +430,10 @@ GEM
typhoeus (0.3.3)
mime-types
tzinfo (0.3.32)
uglifier (1.2.3)
uglifier (1.2.4)
execjs (>= 0.3.0)
multi_json (>= 1.0.2)
unicorn (4.2.0)
unicorn (4.2.1)
kgio (~> 2.6)
rack
raindrops (~> 0.7)

View file

@ -6,6 +6,7 @@
//= require backbone
//= require rails.validations
//= require jquery.hotkeys
//= require jquery.remotipart
//= require jquery.autoresize
//= require jquery-ui-1.8.9.custom.min
//= require jquery.charcount
@ -29,6 +30,7 @@
//= require_tree ./helpers
//= require_tree ./pages
//= require_tree ./widgets
//= require_tree ./forms
//= require view
//= require aspects-dropdown
//= require contact-edit

View file

@ -1,54 +0,0 @@
var ApiConsole = {
prettyPrint: function(obj, indent)
{
var result = "";
if (indent === null) { indent = ""; }
for (var property in obj)
{
var value = obj[property];
if (typeof value == 'string')
{ value = "'" + value + "'"; }
else if (typeof value == 'object')
{
if (value instanceof Array)
{
// Just let JS convert the Array to a string!
value = "[ " + value + " ]";
}
else
{
// Recursive dump
// (replace " " by "\t" or something else if you prefer)
var od = ApiConsole.prettyPrint(value, indent + " ");
// If you like { on the same line as the key
//value = "{\n" + od + "\n" + indent + "}";
// If you prefer { and } to be aligned
value = "\n" + indent + "{\n" + od + "\n" + indent + "}";
}
}
result += indent + "'" + property + "' : " + value + ",\n";
}
return result.replace(/,\n$/, "");
},
init: function(field, query_box, button){
this.field = $(field);
this.query = $(query_box);
this.button = $(button);
this.button.click(function(){
$.getJSON(ApiConsole.query.val(), function(data){
var json = ApiConsole.prettyPrint(data, '');
console.dir(json);
ApiConsole.field.html(json);
});
});
}
};
$(document).ready(function(){
ApiConsole.init('#resp', 'input[name=api]', '#api_submit:input');
});

View file

@ -1,604 +0,0 @@
/*
/*
Copyright 2006 Adobe Systems Incorporated
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
/*
* The Bridge class, responsible for navigating AS instances
*/
function FABridge(target,bridgeName)
{
this.target = target;
this.remoteTypeCache = {};
this.remoteInstanceCache = {};
this.remoteFunctionCache = {};
this.localFunctionCache = {};
this.bridgeID = FABridge.nextBridgeID++;
this.name = bridgeName;
this.nextLocalFuncID = 0;
FABridge.instances[this.name] = this;
FABridge.idMap[this.bridgeID] = this;
return this;
}
// type codes for packed values
FABridge.TYPE_ASINSTANCE = 1;
FABridge.TYPE_ASFUNCTION = 2;
FABridge.TYPE_JSFUNCTION = 3;
FABridge.TYPE_ANONYMOUS = 4;
FABridge.initCallbacks = {};
FABridge.userTypes = {};
FABridge.addToUserTypes = function()
{
for (var i = 0; i < arguments.length; i++)
{
FABridge.userTypes[arguments[i]] = {
'typeName': arguments[i],
'enriched': false
};
}
}
FABridge.argsToArray = function(args)
{
var result = [];
for (var i = 0; i < args.length; i++)
{
result[i] = args[i];
}
return result;
}
function instanceFactory(objID)
{
this.fb_instance_id = objID;
return this;
}
function FABridge__invokeJSFunction(args)
{
var funcID = args[0];
var throughArgs = args.concat();//FABridge.argsToArray(arguments);
throughArgs.shift();
var bridge = FABridge.extractBridgeFromID(funcID);
return bridge.invokeLocalFunction(funcID, throughArgs);
}
FABridge.addInitializationCallback = function(bridgeName, callback)
{
var inst = FABridge.instances[bridgeName];
if (inst != undefined)
{
callback.call(inst);
return;
}
var callbackList = FABridge.initCallbacks[bridgeName];
if(callbackList == null)
{
FABridge.initCallbacks[bridgeName] = callbackList = [];
}
callbackList.push(callback);
}
// updated for changes to SWFObject2
function FABridge__bridgeInitialized(bridgeName) {
var objects = document.getElementsByTagName("object");
var ol = objects.length;
var activeObjects = [];
if (ol > 0) {
for (var i = 0; i < ol; i++) {
if (typeof objects[i].SetVariable != "undefined") {
activeObjects[activeObjects.length] = objects[i];
}
}
}
var embeds = document.getElementsByTagName("embed");
var el = embeds.length;
var activeEmbeds = [];
if (el > 0) {
for (var j = 0; j < el; j++) {
if (typeof embeds[j].SetVariable != "undefined") {
activeEmbeds[activeEmbeds.length] = embeds[j];
}
}
}
var aol = activeObjects.length;
var ael = activeEmbeds.length;
var searchStr = "bridgeName="+ bridgeName;
if ((aol == 1 && !ael) || (aol == 1 && ael == 1)) {
FABridge.attachBridge(activeObjects[0], bridgeName);
}
else if (ael == 1 && !aol) {
FABridge.attachBridge(activeEmbeds[0], bridgeName);
}
else {
var flash_found = false;
if (aol > 1) {
for (var k = 0; k < aol; k++) {
var params = activeObjects[k].childNodes;
for (var l = 0; l < params.length; l++) {
var param = params[l];
if (param.nodeType == 1 && param.tagName.toLowerCase() == "param" && param["name"].toLowerCase() == "flashvars" && param["value"].indexOf(searchStr) >= 0) {
FABridge.attachBridge(activeObjects[k], bridgeName);
flash_found = true;
break;
}
}
if (flash_found) {
break;
}
}
}
if (!flash_found && ael > 1) {
for (var m = 0; m < ael; m++) {
var flashVars = activeEmbeds[m].attributes.getNamedItem("flashVars").nodeValue;
if (flashVars.indexOf(searchStr) >= 0) {
FABridge.attachBridge(activeEmbeds[m], bridgeName);
break;
}
}
}
}
return true;
}
// used to track multiple bridge instances, since callbacks from AS are global across the page.
FABridge.nextBridgeID = 0;
FABridge.instances = {};
FABridge.idMap = {};
FABridge.refCount = 0;
FABridge.extractBridgeFromID = function(id)
{
var bridgeID = (id >> 16);
return FABridge.idMap[bridgeID];
}
FABridge.attachBridge = function(instance, bridgeName)
{
var newBridgeInstance = new FABridge(instance, bridgeName);
FABridge[bridgeName] = newBridgeInstance;
/* FABridge[bridgeName] = function() {
return newBridgeInstance.root();
}
*/
var callbacks = FABridge.initCallbacks[bridgeName];
if (callbacks == null)
{
return;
}
for (var i = 0; i < callbacks.length; i++)
{
callbacks[i].call(newBridgeInstance);
}
delete FABridge.initCallbacks[bridgeName]
}
// some methods can't be proxied. You can use the explicit get,set, and call methods if necessary.
FABridge.blockedMethods =
{
toString: true,
get: true,
set: true,
call: true
};
FABridge.prototype =
{
// bootstrapping
root: function()
{
return this.deserialize(this.target.getRoot());
},
//clears all of the AS objects in the cache maps
releaseASObjects: function()
{
return this.target.releaseASObjects();
},
//clears a specific object in AS from the type maps
releaseNamedASObject: function(value)
{
if(typeof(value) != "object")
{
return false;
}
else
{
var ret = this.target.releaseNamedASObject(value.fb_instance_id);
return ret;
}
},
//create a new AS Object
create: function(className)
{
return this.deserialize(this.target.create(className));
},
// utilities
makeID: function(token)
{
return (this.bridgeID << 16) + token;
},
// low level access to the flash object
//get a named property from an AS object
getPropertyFromAS: function(objRef, propName)
{
if (FABridge.refCount > 0)
{
throw new Error("You are trying to call recursively into the Flash Player which is not allowed. In most cases the JavaScript setTimeout function, can be used as a workaround.");
}
else
{
FABridge.refCount++;
retVal = this.target.getPropFromAS(objRef, propName);
retVal = this.handleError(retVal);
FABridge.refCount--;
return retVal;
}
},
//set a named property on an AS object
setPropertyInAS: function(objRef,propName, value)
{
if (FABridge.refCount > 0)
{
throw new Error("You are trying to call recursively into the Flash Player which is not allowed. In most cases the JavaScript setTimeout function, can be used as a workaround.");
}
else
{
FABridge.refCount++;
retVal = this.target.setPropInAS(objRef,propName, this.serialize(value));
retVal = this.handleError(retVal);
FABridge.refCount--;
return retVal;
}
},
//call an AS function
callASFunction: function(funcID, args)
{
if (FABridge.refCount > 0)
{
throw new Error("You are trying to call recursively into the Flash Player which is not allowed. In most cases the JavaScript setTimeout function, can be used as a workaround.");
}
else
{
FABridge.refCount++;
retVal = this.target.invokeASFunction(funcID, this.serialize(args));
retVal = this.handleError(retVal);
FABridge.refCount--;
return retVal;
}
},
//call a method on an AS object
callASMethod: function(objID, funcName, args)
{
if (FABridge.refCount > 0)
{
throw new Error("You are trying to call recursively into the Flash Player which is not allowed. In most cases the JavaScript setTimeout function, can be used as a workaround.");
}
else
{
FABridge.refCount++;
args = this.serialize(args);
retVal = this.target.invokeASMethod(objID, funcName, args);
retVal = this.handleError(retVal);
FABridge.refCount--;
return retVal;
}
},
// responders to remote calls from flash
//callback from flash that executes a local JS function
//used mostly when setting js functions as callbacks on events
invokeLocalFunction: function(funcID, args)
{
var result;
var func = this.localFunctionCache[funcID];
if(func != undefined)
{
result = this.serialize(func.apply(null, this.deserialize(args)));
}
return result;
},
// Object Types and Proxies
// accepts an object reference, returns a type object matching the obj reference.
getTypeFromName: function(objTypeName)
{
return this.remoteTypeCache[objTypeName];
},
//create an AS proxy for the given object ID and type
createProxy: function(objID, typeName)
{
var objType = this.getTypeFromName(typeName);
instanceFactory.prototype = objType;
var instance = new instanceFactory(objID);
this.remoteInstanceCache[objID] = instance;
return instance;
},
//return the proxy associated with the given object ID
getProxy: function(objID)
{
return this.remoteInstanceCache[objID];
},
// accepts a type structure, returns a constructed type
addTypeDataToCache: function(typeData)
{
var newType = new ASProxy(this, typeData.name);
var accessors = typeData.accessors;
for (var i = 0; i < accessors.length; i++)
{
this.addPropertyToType(newType, accessors[i]);
}
var methods = typeData.methods;
for (var i = 0; i < methods.length; i++)
{
if (FABridge.blockedMethods[methods[i]] == undefined)
{
this.addMethodToType(newType, methods[i]);
}
}
this.remoteTypeCache[newType.typeName] = newType;
return newType;
},
//add a property to a typename; used to define the properties that can be called on an AS proxied object
addPropertyToType: function(ty, propName)
{
var c = propName.charAt(0);
var setterName;
var getterName;
if(c >= "a" && c <= "z")
{
getterName = "get" + c.toUpperCase() + propName.substr(1);
setterName = "set" + c.toUpperCase() + propName.substr(1);
}
else
{
getterName = "get" + propName;
setterName = "set" + propName;
}
ty[setterName] = function(val)
{
this.bridge.setPropertyInAS(this.fb_instance_id, propName, val);
}
ty[getterName] = function()
{
return this.bridge.deserialize(this.bridge.getPropertyFromAS(this.fb_instance_id, propName));
}
},
//add a method to a typename; used to define the methods that can be callefd on an AS proxied object
addMethodToType: function(ty, methodName)
{
ty[methodName] = function()
{
return this.bridge.deserialize(this.bridge.callASMethod(this.fb_instance_id, methodName, FABridge.argsToArray(arguments)));
}
},
// Function Proxies
//returns the AS proxy for the specified function ID
getFunctionProxy: function(funcID)
{
var bridge = this;
if (this.remoteFunctionCache[funcID] == null)
{
this.remoteFunctionCache[funcID] = function()
{
bridge.callASFunction(funcID, FABridge.argsToArray(arguments));
}
}
return this.remoteFunctionCache[funcID];
},
//reutrns the ID of the given function; if it doesnt exist it is created and added to the local cache
getFunctionID: function(func)
{
if (func.__bridge_id__ == undefined)
{
func.__bridge_id__ = this.makeID(this.nextLocalFuncID++);
this.localFunctionCache[func.__bridge_id__] = func;
}
return func.__bridge_id__;
},
// serialization / deserialization
serialize: function(value)
{
var result = {};
var t = typeof(value);
//primitives are kept as such
if (t == "number" || t == "string" || t == "boolean" || t == null || t == undefined)
{
result = value;
}
else if (value instanceof Array)
{
//arrays are serializesd recursively
result = [];
for (var i = 0; i < value.length; i++)
{
result[i] = this.serialize(value[i]);
}
}
else if (t == "function")
{
//js functions are assigned an ID and stored in the local cache
result.type = FABridge.TYPE_JSFUNCTION;
result.value = this.getFunctionID(value);
}
else if (value instanceof ASProxy)
{
result.type = FABridge.TYPE_ASINSTANCE;
result.value = value.fb_instance_id;
}
else
{
result.type = FABridge.TYPE_ANONYMOUS;
result.value = value;
}
return result;
},
//on deserialization we always check the return for the specific error code that is used to marshall NPE's into JS errors
// the unpacking is done by returning the value on each pachet for objects/arrays
deserialize: function(packedValue)
{
var result;
var t = typeof(packedValue);
if (t == "number" || t == "string" || t == "boolean" || packedValue == null || packedValue == undefined)
{
result = this.handleError(packedValue);
}
else if (packedValue instanceof Array)
{
result = [];
for (var i = 0; i < packedValue.length; i++)
{
result[i] = this.deserialize(packedValue[i]);
}
}
else if (t == "object")
{
for(var i = 0; i < packedValue.newTypes.length; i++)
{
this.addTypeDataToCache(packedValue.newTypes[i]);
}
for (var aRefID in packedValue.newRefs)
{
this.createProxy(aRefID, packedValue.newRefs[aRefID]);
}
if (packedValue.type == FABridge.TYPE_PRIMITIVE)
{
result = packedValue.value;
}
else if (packedValue.type == FABridge.TYPE_ASFUNCTION)
{
result = this.getFunctionProxy(packedValue.value);
}
else if (packedValue.type == FABridge.TYPE_ASINSTANCE)
{
result = this.getProxy(packedValue.value);
}
else if (packedValue.type == FABridge.TYPE_ANONYMOUS)
{
result = packedValue.value;
}
}
return result;
},
//increases the reference count for the given object
addRef: function(obj)
{
this.target.incRef(obj.fb_instance_id);
},
//decrease the reference count for the given object and release it if needed
release:function(obj)
{
this.target.releaseRef(obj.fb_instance_id);
},
// check the given value for the components of the hard-coded error code : __FLASHERROR
// used to marshall NPE's into flash
handleError: function(value)
{
if (typeof(value)=="string" && value.indexOf("__FLASHERROR")==0)
{
var myErrorMessage = value.split("||");
if(FABridge.refCount > 0 )
{
FABridge.refCount--;
}
throw new Error(myErrorMessage[1]);
return value;
}
else
{
return value;
}
}
};
// The root ASProxy class that facades a flash object
ASProxy = function(bridge, typeName)
{
this.bridge = bridge;
this.typeName = typeName;
return this;
};
//methods available on each ASProxy object
ASProxy.prototype =
{
get: function(propName)
{
return this.bridge.deserialize(this.bridge.getPropertyFromAS(this.fb_instance_id, propName));
},
set: function(propName, value)
{
this.bridge.setPropertyInAS(this.fb_instance_id, propName, value);
},
call: function(funcName, args)
{
this.bridge.callASMethod(this.fb_instance_id, funcName, args);
},
addRef: function() {
this.bridge.addRef(this);
},
release: function() {
this.bridge.release(this);
}
};

View file

@ -1,92 +0,0 @@
/* ============================================================
* bootstrap-dropdown.js v2.0.1
* http://twitter.github.com/bootstrap/javascript.html#dropdowns
* ============================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ============================================================ */
!function( $ ){
"use strict"
/* DROPDOWN CLASS DEFINITION
* ========================= */
var toggle = '[data-toggle="dropdown"]'
, Dropdown = function ( element ) {
var $el = $(element).on('click.dropdown.data-api', this.toggle)
$('html').on('click.dropdown.data-api', function () {
$el.parent().removeClass('open')
})
}
Dropdown.prototype = {
constructor: Dropdown
, toggle: function ( e ) {
var $this = $(this)
, selector = $this.attr('data-target')
, $parent
, isActive
if (!selector) {
selector = $this.attr('href')
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
}
$parent = $(selector)
$parent.length || ($parent = $this.parent())
isActive = $parent.hasClass('open')
clearMenus()
!isActive && $parent.toggleClass('open')
return false
}
}
function clearMenus() {
$(toggle).parent().removeClass('open')
}
/* DROPDOWN PLUGIN DEFINITION
* ========================== */
$.fn.dropdown = function ( option ) {
return this.each(function () {
var $this = $(this)
, data = $this.data('dropdown')
if (!data) $this.data('dropdown', (data = new Dropdown(this)))
if (typeof option == 'string') data[option].call($this)
})
}
$.fn.dropdown.Constructor = Dropdown
/* APPLY TO STANDARD DROPDOWN ELEMENTS
* =================================== */
$(function () {
$('html').on('click.dropdown.data-api', clearMenus)
$('body').on('click.dropdown.data-api', toggle, Dropdown.prototype.toggle)
})
}( window.jQuery );

View file

@ -1,68 +0,0 @@
(function( $ ){
var methods = {
init : function( options ) {
return this.each( function () {
var $this = $(this);
$.each(options, function( label, setting ) {
$this.data(label, setting);
});
$this.bind('dragenter.dndUploader', methods.dragEnter);
$this.bind('dragover.dndUploader', methods.dragOver);
$this.bind('drop.dndUploader', methods.drop);
});
},
dragEnter : function ( event ) {
event.stopPropagation();
event.preventDefault();
return false;
},
dragOver : function ( event ) {
event.stopPropagation();
event.preventDefault();
return false;
},
drop : function( event ) {
event.stopPropagation();
event.preventDefault();
var $this = $(this);
var dataTransfer = event.originalEvent.dataTransfer;
if (dataTransfer.files.length > 0) {
$.each(dataTransfer.files, function ( i, file ) {
var xhr = new XMLHttpRequest();
var upload = xhr.upload;
xhr.open($this.data('method') || 'POST', $this.data('url'), true);
xhr.setRequestHeader('X-Filename', file.fileName);
xhr.send(file);
});
};
return false;
}
};
$.fn.dndUploader = function( method ) {
if ( methods[method] ) {
return methods[method].apply( this, Array.prototype.slice.call( arguments, 1 ));
} else if ( typeof method === 'object' || ! method ) {
return methods.init.apply( this, arguments );
} else {
$.error( 'Method ' + method + ' does not exist on jQuery.dndUploader' );
}
};
})( jQuery );

View file

@ -1,233 +0,0 @@
// This [jQuery](http://jquery.com/) plugin implements an `<iframe>`
// [transport](http://api.jquery.com/extending-ajax/#Transports) so that
// `$.ajax()` calls support the uploading of files using standard HTML file
// input fields. This is done by switching the exchange from `XMLHttpRequest` to
// a hidden `iframe` element containing a form that is submitted.
// The [source for the plugin](http://github.com/cmlenz/jquery-iframe-transport)
// is available on [Github](http://github.com/) and dual licensed under the MIT
// or GPL Version 2 licenses.
// ## Usage
// To use this plugin, you simply add a `iframe` option with the value `true`
// to the Ajax settings an `$.ajax()` call, and specify the file fields to
// include in the submssion using the `files` option, which can be a selector,
// jQuery object, or a list of DOM elements containing one or more
// `<input type="file">` elements:
// $("#myform").submit(function() {
// $.ajax(this.action, {
// files: $(":file", this),
// iframe: true
// }).complete(function(data) {
// console.log(data);
// });
// });
// The plugin will construct a hidden `<iframe>` element containing a copy of
// the form the file field belongs to, will disable any form fields not
// explicitly included, submit that form, and process the response.
// If you want to include other form fields in the form submission, include them
// in the `data` option, and set the `processData` option to `false`:
// $("#myform").submit(function() {
// $.ajax(this.action, {
// data: $(":text", this).serializeArray(),
// files: $(":file", this),
// iframe: true,
// processData: false
// }).complete(function(data) {
// console.log(data);
// });
// });
// ### The Server Side
// If the response is not HTML or XML, you (unfortunately) need to apply some
// trickery on the server side. To send back a JSON payload, send back an HTML
// `<textarea>` element with a `data-type` attribute that contains the MIME
// type, and put the actual payload in the textarea:
// <textarea data-type="application/json">
// {"ok": true, "message": "Thanks so much"}
// </textarea>
// The iframe transport plugin will detect this and attempt to apply the same
// conversions that jQuery applies to regular responses. That means for the
// example above you should get a Javascript object as the `data` parameter of
// the `complete` callback, with the properties `ok: true` and
// `message: "Thanks so much"`.
// ### Compatibility
// This plugin has primarily been tested on Safari 5, Firefox 4, and Internet
// Explorer all the way back to version 6. While I haven't found any issues with
// it so far, I'm fairly sure it still doesn't work around all the quirks in all
// different browsers. But the code is still pretty simple overall, so you
// should be able to fix it and contribute a patch :)
// ## Annotated Source
(function($, undefined) {
// Register a prefilter that checks whether the `iframe` option is set, and
// switches to the iframe transport if it is `true`.
$.ajaxPrefilter(function(options, origOptions, jqXHR) {
if (options.iframe) {
return "iframe";
}
});
// Register an iframe transport, independent of requested data type. It will
// only activate when the "files" option has been set to a non-empty list of
// enabled file inputs.
$.ajaxTransport("iframe", function(options, origOptions, jqXHR) {
var form = null,
iframe = null,
origAction = null,
origTarget = null,
origEnctype = null,
addedFields = [],
disabledFields = [],
files = $(options.files).filter(":file:enabled");
// This function gets called after a successful submission or an abortion
// and should revert all changes made to the page to enable the
// submission via this transport.
function cleanUp() {
$(addedFields).each(function() {
this.remove();
});
$(disabledFields).each(function() {
this.disabled = false;
});
form.attr("action", origAction || "")
.attr("target", origTarget || "")
.attr("enctype", origEnctype || "");
iframe.attr("src", "javascript:false;").remove();
}
// Remove "iframe" from the data types list so that further processing is
// based on the content type returned by the server, without attempting an
// (unsupported) conversion from "iframe" to the actual type.
options.dataTypes.shift();
if (files.length) {
// Determine the form the file fields belong to, and make sure they all
// actually belong to the same form.
files.each(function() {
if (form !== null && this.form !== form) {
jQuery.error("All file fields must belong to the same form");
}
form = this.form;
});
form = $(form);
// Store the original form attributes that we'll be replacing temporarily.
origAction = form.attr("action");
origTarget = form.attr("target");
origEnctype = form.attr("enctype");
// We need to disable all other inputs in the form so that they don't get
// included in the submitted data unexpectedly.
form.find(":input:not(:submit)").each(function() {
if (!this.disabled && (this.type != "file" || files.index(this) < 0)) {
this.disabled = true;
disabledFields.push(this);
}
});
// If there is any additional data specified via the `data` option,
// we add it as hidden fields to the form. This (currently) requires
// the `processData` option to be set to false so that the data doesn't
// get serialized to a string.
if (typeof(options.data) === "string" && options.data.length > 0) {
jQuery.error("data must not be serialized");
}
$.each(options.data || {}, function(name, value) {
if ($.isPlainObject(value)) {
name = value.name;
value = value.value;
}
addedFields.push($("<input type='hidden'>").attr("name", name)
.attr("value", value).appendTo(form));
});
// Add a hidden `X-Requested-With` field with the value `IFrame` to the
// field, to help server-side code to determine that the upload happened
// through this transport.
addedFields.push($("<input type='hidden' name='X-Requested-With'>")
.attr("value", "IFrame").appendTo(form));
// Borrowed straight from the JQuery source
// Provides a way of specifying the accepted data type similar to HTTP_ACCEPTS
accepts = options.dataTypes[ 0 ] && options.accepts[ options.dataTypes[0] ] ?
options.accepts[ options.dataTypes[0] ] + ( options.dataTypes[ 0 ] !== "*" ? ", */*; q=0.01" : "" ) :
options.accepts[ "*" ]
addedFields.push($("<input type='hidden' name='X-Http-Accept'>")
.attr("value", accepts).appendTo(form));
return {
// The `send` function is called by jQuery when the request should be
// sent.
send: function(headers, completeCallback) {
iframe = $("<iframe src='javascript:false;' name='iframe-" + $.now()
+ "' style='display:none'></iframe>");
// The first load event gets fired after the iframe has been injected
// into the DOM, and is used to prepare the actual submission.
iframe.bind("load", function() {
// The second load event gets fired when the response to the form
// submission is received. The implementation detects whether the
// actual payload is embedded in a `<textarea>` element, and
// prepares the required conversions to be made in that case.
iframe.unbind("load").bind("load", function() {
var doc = this.contentWindow ? this.contentWindow.document :
(this.contentDocument ? this.contentDocument : this.document),
root = doc.documentElement ? doc.documentElement : doc.body,
textarea = root.getElementsByTagName("textarea")[0],
type = textarea ? textarea.getAttribute("data-type") : null;
var status = textarea ? parseInt(textarea.getAttribute("response-code")) : 200,
statusText = "OK",
responses = { text: type ? textarea.value : root ? root.innerHTML : null },
headers = "Content-Type: " + (type || "text/html")
completeCallback(status, statusText, responses, headers);
setTimeout(cleanUp, 50);
});
// Now that the load handler has been set up, reconfigure and
// submit the form.
form.attr("action", options.url)
.attr("target", iframe.attr("name"))
.attr("enctype", "multipart/form-data")
.get(0).submit();
});
// After everything has been set up correctly, the iframe gets
// injected into the DOM so that the submission can be initiated.
iframe.insertAfter(form);
},
// The `abort` function is called by jQuery when the request should be
// aborted.
abort: function() {
if (iframe !== null) {
iframe.unbind("load").attr("src", "javascript:false;");
cleanUp();
}
}
};
}
});
})(jQuery);

File diff suppressed because one or more lines are too long

View file

@ -1,155 +0,0 @@
/*!
* jQuery Mobile v1.0b2
* http://jquerymobile.com/
*
* Copyright 2010, jQuery Project
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*/
(function(a,d){if(a.cleanData){var c=a.cleanData;a.cleanData=function(f){for(var b=0,d;(d=f[b])!=null;b++)a(d).triggerHandler("remove");c(f)}}else{var b=a.fn.remove;a.fn.remove=function(f,c){return this.each(function(){c||(!f||a.filter(f,[this]).length)&&a("*",this).add([this]).each(function(){a(this).triggerHandler("remove")});return b.call(a(this),f,c)})}}a.widget=function(b,c,d){var h=b.split(".")[0],i,b=b.split(".")[1];i=h+"-"+b;if(!d)d=c,c=a.Widget;a.expr[":"][i]=function(c){return!!a.data(c,
b)};a[h]=a[h]||{};a[h][b]=function(a,b){arguments.length&&this._createWidget(a,b)};c=new c;c.options=a.extend(!0,{},c.options);a[h][b].prototype=a.extend(!0,c,{namespace:h,widgetName:b,widgetEventPrefix:a[h][b].prototype.widgetEventPrefix||b,widgetBaseClass:i},d);a.widget.bridge(b,a[h][b])};a.widget.bridge=function(b,c){a.fn[b]=function(g){var h=typeof g==="string",i=Array.prototype.slice.call(arguments,1),k=this,g=!h&&i.length?a.extend.apply(null,[!0,g].concat(i)):g;if(h&&g.charAt(0)==="_")return k;
h?this.each(function(){var c=a.data(this,b);if(!c)throw"cannot call methods on "+b+" prior to initialization; attempted to call method '"+g+"'";if(!a.isFunction(c[g]))throw"no such method '"+g+"' for "+b+" widget instance";var e=c[g].apply(c,i);if(e!==c&&e!==d)return k=e,!1}):this.each(function(){var d=a.data(this,b);d?d.option(g||{})._init():a.data(this,b,new c(g,this))});return k}};a.Widget=function(a,b){arguments.length&&this._createWidget(a,b)};a.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",
options:{disabled:!1},_createWidget:function(b,c){a.data(c,this.widgetName,this);this.element=a(c);this.options=a.extend(!0,{},this.options,this._getCreateOptions(),b);var d=this;this.element.bind("remove."+this.widgetName,function(){d.destroy()});this._create();this._trigger("create");this._init()},_getCreateOptions:function(){var b={};a.metadata&&(b=a.metadata.get(element)[this.widgetName]);return b},_create:function(){},_init:function(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName);
this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled ui-state-disabled")},widget:function(){return this.element},option:function(b,c){var g=b;if(arguments.length===0)return a.extend({},this.options);if(typeof b==="string"){if(c===d)return this.options[b];g={};g[b]=c}this._setOptions(g);return this},_setOptions:function(b){var c=this;a.each(b,function(a,b){c._setOption(a,b)});return this},_setOption:function(a,b){this.options[a]=b;a==="disabled"&&
this.widget()[b?"addClass":"removeClass"](this.widgetBaseClass+"-disabled ui-state-disabled").attr("aria-disabled",b);return this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_trigger:function(b,c,d){var h=this.options[b],c=a.Event(c);c.type=(b===this.widgetEventPrefix?b:this.widgetEventPrefix+b).toLowerCase();d=d||{};if(c.originalEvent)for(var b=a.event.props.length,i;b;)i=a.event.props[--b],c[i]=c.originalEvent[i];this.element.trigger(c,
d);return!(a.isFunction(h)&&h.call(this.element[0],c,d)===!1||c.isDefaultPrevented())}}})(jQuery);(function(a,d){a.widget("mobile.widget",{_getCreateOptions:function(){var c=this.element,b={};a.each(this.options,function(a){var e=c.jqmData(a.replace(/[A-Z]/g,function(a){return"-"+a.toLowerCase()}));e!==d&&(b[a]=e)});return b}})})(jQuery);
(function(a){a(window);var d=a("html");a.mobile.media=function(){var c={},b=a("<div id='jquery-mediatest'>"),f=a("<body>").append(b);return function(a){if(!(a in c)){var g=document.createElement("style"),h="@media "+a+" { #jquery-mediatest { position:absolute; } }";g.type="text/css";g.styleSheet?g.styleSheet.cssText=h:g.appendChild(document.createTextNode(h));d.prepend(f).prepend(g);c[a]=b.css("position")==="absolute";f.add(g).remove()}return c[a]}}()})(jQuery);
(function(a,d){function c(a){var b=a.charAt(0).toUpperCase()+a.substr(1),a=(a+" "+e.join(b+" ")+b).split(" "),c;for(c in a)if(f[c]!==d)return!0}var b=a("<body>").prependTo("html"),f=b[0].style,e=["webkit","moz","o"],g="palmGetResource"in window,h=window.blackberry;a.mobile.browser={};a.mobile.browser.ie=function(){for(var a=3,b=document.createElement("div"),c=b.all||[];b.innerHTML="<\!--[if gt IE "+ ++a+"]><br><![endif]--\>",c[0];);return a>4?a:!a}();a.extend(a.support,{orientation:"orientation"in
window,touch:"ontouchend"in document,cssTransitions:"WebKitTransitionEvent"in window,pushState:!!history.pushState,mediaquery:a.mobile.media("only all"),cssPseudoElement:!!c("content"),boxShadow:!!c("boxShadow")&&!h,scrollTop:("pageXOffset"in window||"scrollTop"in document.documentElement||"scrollTop"in b[0])&&!g,dynamicBaseTag:function(){var c=location.protocol+"//"+location.host+location.pathname+"ui-dir/",f=a("head base"),d=null,e="",g;f.length?e=f.attr("href"):f=d=a("<base>",{href:c}).appendTo("head");
g=a("<a href='testurl'></a>").prependTo(b)[0].href;f[0].href=e?e:location.pathname;d&&d.remove();return g.indexOf(c)===0}(),eventCapture:"addEventListener"in document});b.remove();g=function(){var a=window.navigator.userAgent;return a.indexOf("Nokia")>-1&&(a.indexOf("Symbian/3")>-1||a.indexOf("Series60/5")>-1)&&a.indexOf("AppleWebKit")>-1&&a.match(/(BrowserNG|NokiaBrowser)\/7\.[0-3]/)}();a.mobile.ajaxBlacklist=window.blackberry&&!window.WebKitPoint||window.operamini&&Object.prototype.toString.call(window.operamini)===
"[object OperaMini]"||g;g&&a(function(){a("head link[rel=stylesheet]").attr("rel","alternate stylesheet").attr("rel","stylesheet")});a.support.boxShadow||a("html").addClass("ui-mobile-nosupport-boxshadow")})(jQuery);
(function(a,d,c,b){function f(a){for(;a&&typeof a.originalEvent!=="undefined";)a=a.originalEvent;return a}function e(b){for(var c={},f,d;b;){f=a.data(b,n);for(d in f)if(f[d])c[d]=c.hasVirtualBinding=!0;b=b.parentNode}return c}function g(){v&&(clearTimeout(v),v=0);v=setTimeout(function(){B=v=0;A.length=0;w=!1;r=!0},a.vmouse.resetTimerDuration)}function h(c,d,r){var e=!1,g;if(!(g=r&&r[c])){if(r=!r)a:{for(r=d.target;r;){if((g=a.data(r,n))&&(!c||g[c]))break a;r=r.parentNode}r=null}g=r}if(g){var e=d,r=
e.type,j,h,e=a.Event(e);e.type=c;g=e.originalEvent;j=a.event.props;if(g)for(h=j.length;h;)c=j[--h],e[c]=g[c];if(r.search(/^touch/)!==-1&&(c=f(g),r=c.touches,c=c.changedTouches,r=r&&r.length?r[0]:c&&c.length?c[0]:b)){g=0;for(len=z.length;g<len;g++)c=z[g],e[c]=r[c]}a(d.target).trigger(e);e=e.isDefaultPrevented()}return e}function i(b){var c=a.data(b.target,x);!w&&(!B||B!==c)&&h("v"+b.type,b)}function k(b){var c=f(b).touches,d;if(c&&c.length===1&&(d=b.target,c=e(d),c.hasVirtualBinding))B=F++,a.data(d,
x,B),v&&(clearTimeout(v),v=0),s=r=!1,d=f(b).touches[0],y=d.pageX,u=d.pageY,h("vmouseover",b,c),h("vmousedown",b,c)}function l(a){r||(s||h("vmousecancel",a,e(a.target)),s=!0,g())}function m(b){if(!r){var c=f(b).touches[0],d=s,j=a.vmouse.moveDistanceThreshold;s=s||Math.abs(c.pageX-y)>j||Math.abs(c.pageY-u)>j;flags=e(b.target);s&&!d&&h("vmousecancel",b,flags);h("vmousemove",b,flags);g()}}function p(a){if(!r){r=!0;var b=e(a.target),c;h("vmouseup",a,b);!s&&h("vclick",a,b)&&(c=f(a).changedTouches[0],A.push({touchID:B,
x:c.clientX,y:c.clientY}),w=!0);h("vmouseout",a,b);s=!1;g()}}function o(b){var b=a.data(b,n),c;if(b)for(c in b)if(b[c])return!0;return!1}function j(){}function q(b){var c=b.substr(1);return{setup:function(){o(this)||a.data(this,n,{});a.data(this,n)[b]=!0;t[b]=(t[b]||0)+1;t[b]===1&&C.bind(c,i);a(this).bind(c,j);if(E)t.touchstart=(t.touchstart||0)+1,t.touchstart===1&&C.bind("touchstart",k).bind("touchend",p).bind("touchmove",m).bind("scroll",l)},teardown:function(){--t[b];t[b]||C.unbind(c,i);E&&(--t.touchstart,
t.touchstart||C.unbind("touchstart",k).unbind("touchmove",m).unbind("touchend",p).unbind("scroll",l));var f=a(this),d=a.data(this,n);d&&(d[b]=!1);f.unbind(c,j);o(this)||f.removeData(n)}}}var n="virtualMouseBindings",x="virtualTouchID",d="vmouseover vmousedown vmousemove vmouseup vclick vmouseout vmousecancel".split(" "),z="clientX clientY pageX pageY screenX screenY".split(" "),t={},v=0,y=0,u=0,s=!1,A=[],w=!1,r=!1,E=a.support.eventCapture,C=a(c),F=1,B=0;a.vmouse={moveDistanceThreshold:10,clickDistanceThreshold:10,
resetTimerDuration:1500};for(var D=0;D<d.length;D++)a.event.special[d[D]]=q(d[D]);E&&c.addEventListener("click",function(b){var c=A.length,f=b.target,d,r,e,g,j;if(c){d=b.clientX;r=b.clientY;threshold=a.vmouse.clickDistanceThreshold;for(e=f;e;){for(g=0;g<c;g++)if(j=A[g],e===f&&Math.abs(j.x-d)<threshold&&Math.abs(j.y-r)<threshold||a.data(e,x)===j.touchID){b.preventDefault();b.stopPropagation();return}e=e.parentNode}}},!0)})(jQuery,window,document);
(function(a,d,c){function b(b,c,f){var d=f.type;f.type=c;a.event.handle.call(b,f);f.type=d}a.each("touchstart touchmove touchend orientationchange throttledresize tap taphold swipe swipeleft swiperight scrollstart scrollstop".split(" "),function(b,c){a.fn[c]=function(a){return a?this.bind(c,a):this.trigger(c)};a.attrFn[c]=!0});var f=a.support.touch,e=f?"touchstart":"mousedown",g=f?"touchend":"mouseup",h=f?"touchmove":"mousemove";a.event.special.scrollstart={enabled:!0,setup:function(){function c(a,
e){d=e;b(f,d?"scrollstart":"scrollstop",a)}var f=this,d,e;a(f).bind("touchmove scroll",function(b){a.event.special.scrollstart.enabled&&(d||c(b,!0),clearTimeout(e),e=setTimeout(function(){c(b,!1)},50))})}};a.event.special.tap={setup:function(){var c=this,f=a(c);f.bind("vmousedown",function(a){function d(){g=!1;clearTimeout(h);f.unbind("vclick",e).unbind("vmousecancel",d)}function e(a){d();j==a.target&&b(c,"tap",a)}if(a.which&&a.which!==1)return!1;var g=!0,j=a.target,h;f.bind("vmousecancel",d).bind("vclick",
e);h=setTimeout(function(){g&&b(c,"taphold",a)},750)})}};a.event.special.swipe={scrollSupressionThreshold:10,durationThreshold:1E3,horizontalDistanceThreshold:30,verticalDistanceThreshold:75,setup:function(){var b=a(this);b.bind(e,function(f){function d(b){if(p){var c=b.originalEvent.touches?b.originalEvent.touches[0]:b;o={time:(new Date).getTime(),coords:[c.pageX,c.pageY]};Math.abs(p.coords[0]-o.coords[0])>a.event.special.swipe.scrollSupressionThreshold&&b.preventDefault()}}var e=f.originalEvent.touches?
f.originalEvent.touches[0]:f,p={time:(new Date).getTime(),coords:[e.pageX,e.pageY],origin:a(f.target)},o;b.bind(h,d).one(g,function(){b.unbind(h,d);p&&o&&o.time-p.time<a.event.special.swipe.durationThreshold&&Math.abs(p.coords[0]-o.coords[0])>a.event.special.swipe.horizontalDistanceThreshold&&Math.abs(p.coords[1]-o.coords[1])<a.event.special.swipe.verticalDistanceThreshold&&p.origin.trigger("swipe").trigger(p.coords[0]>o.coords[0]?"swipeleft":"swiperight");p=o=c})})}};(function(a,b){function c(){var a=
d();a!==e&&(e=a,f.trigger("orientationchange"))}var f=a(b),d,e;a.event.special.orientationchange={setup:function(){if(a.support.orientation)return!1;e=d();f.bind("throttledresize",c)},teardown:function(){if(a.support.orientation)return!1;f.unbind("throttledresize",c)},add:function(a){var b=a.handler;a.handler=function(a){a.orientation=d();return b.apply(this,arguments)}}};a.event.special.orientationchange.orientation=d=function(){var a=document.documentElement;return a&&a.clientWidth/a.clientHeight<
1.1?"portrait":"landscape"}})(jQuery,d);(function(){a.event.special.throttledresize={setup:function(){a(this).bind("resize",b)},teardown:function(){a(this).unbind("resize",b)}};var b=function(){d=(new Date).getTime();e=d-c;e>=250?(c=d,a(this).trigger("throttledresize")):(f&&clearTimeout(f),f=setTimeout(b,250-e))},c=0,f,d,e})();a.each({scrollstop:"scrollstart",taphold:"tap",swipeleft:"swipe",swiperight:"swipe"},function(b,c){a.event.special[b]={setup:function(){a(this).bind(c,a.noop)}}})})(jQuery,
this);
(function(a,d,c){function b(a){a=a||location.href;return"#"+a.replace(/^[^#]*#?(.*)$/,"$1")}var f="hashchange",e=document,g,h=a.event.special,i=e.documentMode,k="on"+f in d&&(i===c||i>7);a.fn[f]=function(a){return a?this.bind(f,a):this.trigger(f)};a.fn[f].delay=50;h[f]=a.extend(h[f],{setup:function(){if(k)return!1;a(g.start)},teardown:function(){if(k)return!1;a(g.stop)}});g=function(){function g(){var c=b(),e=n(o);if(c!==o)q(o=c,e),a(d).trigger(f);else if(e!==o)location.href=location.href.replace(/#.*/,"")+
e;i=setTimeout(g,a.fn[f].delay)}var h={},i,o=b(),j=function(a){return a},q=j,n=j;h.start=function(){i||g()};h.stop=function(){i&&clearTimeout(i);i=c};a.browser.msie&&!k&&function(){var c,d;h.start=function(){if(!c)d=(d=a.fn[f].src)&&d+b(),c=a('<iframe tabindex="-1" title="empty"/>').hide().one("load",function(){d||q(b());g()}).attr("src",d||"javascript:0").insertAfter("body")[0].contentWindow,e.onpropertychange=function(){try{if(event.propertyName==="title")c.document.title=e.title}catch(a){}}};h.stop=
j;n=function(){return b(c.location.href)};q=function(b,d){var g=c.document,h=a.fn[f].domain;if(b!==d)g.title=e.title,g.open(),h&&g.write('<script>document.domain="'+h+'"<\/script>'),g.close(),c.location.hash=b}}();return h}()})(jQuery,this);(function(a){a.widget("mobile.page",a.mobile.widget,{options:{theme:"c",domCache:!1},_create:function(){var a=this.element,c=this.options;this._trigger("beforeCreate")!==!1&&a.addClass("ui-page ui-body-"+c.theme)}})})(jQuery);
(function(a,d){a.extend(a.mobile,{ns:"",subPageUrlKey:"ui-page",activePageClass:"ui-page-active",activeBtnClass:"ui-btn-active",ajaxEnabled:!0,hashListeningEnabled:!0,defaultPageTransition:"slide",minScrollBack:screen.height/2,defaultDialogTransition:"pop",loadingMessage:"loading",pageLoadErrorMessage:"Error Loading Page",autoInitializePage:!0,gradeA:function(){return a.support.mediaquery||a.mobile.browser.ie&&a.mobile.browser.ie>=7},keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,
COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91},silentScroll:function(b){if(a.type(b)!=="number")b=a.mobile.defaultHomeScroll;a.event.special.scrollstart.enabled=!1;setTimeout(function(){d.scrollTo(0,b);a(document).trigger("silentscroll",{x:0,y:b})},
20);setTimeout(function(){a.event.special.scrollstart.enabled=!0},150)},nsNormalize:function(b){if(b)return a.camelCase(a.mobile.ns+b)}});a.fn.jqmData=function(b,c){return this.data(b?a.mobile.nsNormalize(b):b,c)};a.jqmData=function(b,c,d){return a.data(b,a.mobile.nsNormalize(c),d)};a.fn.jqmRemoveData=function(b){return this.removeData(a.mobile.nsNormalize(b))};a.jqmRemoveData=function(b,c){return a.removeData(b,a.mobile.nsNormalize(c))};a.jqmHasData=function(b,c){return a.hasData(b,a.mobile.nsNormalize(c))};
var c=a.find;a.find=function(b,d,e,g){b=b.replace(/:jqmData\(([^)]*)\)/g,"[data-"+(a.mobile.ns||"")+"$1]");return c.call(this,b,d,e,g)};a.extend(a.find,c);a.find.matches=function(b,c){return a.find(b,null,null,c)};a.find.matchesSelector=function(b,c){return a.find(c,null,null,[b]).length>0}})(jQuery,this);
(function(a,d){function c(a){var b=a.jqmData("lastClicked");b&&b.length?b.focus():(b=a.find(".ui-title:eq(0)"),b.length?b.focus():a.find(x).eq(0).focus())}function b(b){q&&(!q.closest(".ui-page-active").length||b)&&q.removeClass(a.mobile.activeBtnClass);q=null}function f(){t=!1;z.length>0&&a.mobile.changePage.apply(null,z.pop())}function e(b,d,f,e){var h=a.support.scrollTop?m.scrollTop():!0,j=b.data("lastScroll")||a.mobile.defaultHomeScroll,i=g();h&&window.scrollTo(0,a.mobile.defaultHomeScroll);j<
a.mobile.minScrollBack&&(j=0);d&&(d.height(i+h).jqmData("lastScroll",h).jqmData("lastClicked",q),d.data("page")._trigger("beforehide",null,{nextPage:b}));b.height(i+j).data("page")._trigger("beforeshow",null,{prevPage:d||a("")});a.mobile.hidePageLoadingMsg();f=(a.mobile.transitionHandlers[f||"none"]||a.mobile.defaultTransitionHandler)(f,e,b,d);f.done(function(){b.height("");j?(a.mobile.silentScroll(j),a(document).one("silentscroll",function(){c(b)})):c(b);d&&d.height("").data("page")._trigger("hide",
null,{nextPage:b});b.data("page")._trigger("show",null,{prevPage:d||a("")})});return f}function g(){var b=jQuery.event.special.orientationchange.orientation()==="portrait",c=b?screen.availHeight:screen.availWidth,b=Math.max(b?480:320,a(window).height());return Math.min(c,b)}function h(){a("."+a.mobile.activePageClass).css("min-height",g())}function i(b,c){c&&b.attr("data-"+a.mobile.ns+"role",c);b.page()}function k(a){for(;a;){if(a.nodeName.toLowerCase()=="a")break;a=a.parentNode}return a}function l(b){var b=
a(b).closest(".ui-page").jqmData("url"),c=s.hrefNoHash;if(!b||!j.isPath(b))b=c;return j.makeUrlAbsolute(b,c)}var m=a(window),p=a("html"),o=a("head"),j={urlParseRE:/^(((([^:\/#\?]+:)?(?:\/\/((?:(([^:@\/#\?]+)(?:\:([^:@\/#\?]+))?)@)?(([^:\/#\?]+)(?:\:([0-9]+))?))?)?)?((\/?(?:[^\/\?#]+\/+)*)([^\?#]*)))?(\?[^#]+)?)(#.*)?/,parseUrl:function(b){if(a.type(b)==="object")return b;var b=j.urlParseRE.exec(b),c;b&&(c={href:b[0]||"",hrefNoHash:b[1]||"",hrefNoSearch:b[2]||"",domain:b[3]||"",protocol:b[4]||"",authority:b[5]||
"",username:b[7]||"",password:b[8]||"",host:b[9]||"",hostname:b[10]||"",port:b[11]||"",pathname:b[12]||"",directory:b[13]||"",filename:b[14]||"",search:b[15]||"",hash:b[16]||""});return c||{}},makePathAbsolute:function(a,b){if(a&&a.charAt(0)==="/")return a;for(var a=a||"",c=(b=b?b.replace(/^\/|(\/[^\/]*|[^\/]+)$/g,""):"")?b.split("/"):[],d=a.split("/"),f=0;f<d.length;f++){var e=d[f];switch(e){case ".":break;case "..":c.length&&c.pop();break;default:c.push(e)}}return"/"+c.join("/")},isSameDomain:function(a,
b){return j.parseUrl(a).domain===j.parseUrl(b).domain},isRelativeUrl:function(a){return j.parseUrl(a).protocol===""},isAbsoluteUrl:function(a){return j.parseUrl(a).protocol!==""},makeUrlAbsolute:function(a,b){if(!j.isRelativeUrl(a))return a;var c=j.parseUrl(a),d=j.parseUrl(b),f=c.protocol||d.protocol,e=c.authority||d.authority,g=c.pathname!=="",h=j.makePathAbsolute(c.pathname||d.filename,d.pathname);return f+"//"+e+h+(c.search||!g&&d.search||"")+c.hash},addSearchParams:function(b,c){var d=j.parseUrl(b),
f=typeof c==="object"?a.param(c):c,e=d.search||"?";return d.hrefNoSearch+e+(e.charAt(e.length-1)!=="?"?"&":"")+f+(d.hash||"")},convertUrlToDataUrl:function(a){var b=j.parseUrl(a);if(j.isEmbeddedPage(b))return b.hash.split(v)[0].replace(/^#/,"");else if(j.isSameDomain(b,s))return b.hrefNoHash.replace(s.domain,"");return a},get:function(a){if(a===d)a=location.hash;return j.stripHash(a).replace(/[^\/]*\.[^\/*]+$/,"")},getFilePath:function(b){var c="&"+a.mobile.subPageUrlKey;return b&&b.split(c)[0].split(v)[0]},
set:function(a){location.hash=a},isPath:function(a){return/\//.test(a)},clean:function(a){return a.replace(s.domain,"")},stripHash:function(a){return a.replace(/^#/,"")},cleanHash:function(a){return j.stripHash(a.replace(/\?.*$/,"").replace(v,""))},isExternal:function(a){a=j.parseUrl(a);return a.protocol&&a.domain!==u.domain?!0:!1},hasProtocol:function(a){return/^(:?\w+:)/.test(a)},isEmbeddedPage:function(a){a=j.parseUrl(a);if(a.protocol!=="")return a.hash&&(a.hrefNoHash===u.hrefNoHash||A&&a.hrefNoHash===
s.hrefNoHash);return/^#/.test(a.href)}},q=null,n={stack:[],activeIndex:0,getActive:function(){return n.stack[n.activeIndex]},getPrev:function(){return n.stack[n.activeIndex-1]},getNext:function(){return n.stack[n.activeIndex+1]},addNew:function(a,b,c,d){n.getNext()&&n.clearForward();n.stack.push({url:a,transition:b,title:c,pageUrl:d});n.activeIndex=n.stack.length-1},clearForward:function(){n.stack=n.stack.slice(0,n.activeIndex+1)},directHashChange:function(b){var c,f,e;a.each(n.stack,function(a,d){b.currentUrl===
d.url&&(c=a<n.activeIndex,f=!c,e=a)});this.activeIndex=e!==d?e:this.activeIndex;c?b.isBack():f&&b.isForward()},ignoreNextHashChange:!1},x="[tabindex],a,button:visible,select:visible,input",z=[],t=!1,v="&ui-state=dialog",y=o.children("base"),u=j.parseUrl(location.href),s=y.length?j.parseUrl(j.makeUrlAbsolute(y.attr("href"),u.href)):u,A=u.hrefNoHash!==s.hrefNoHash,w=a.support.dynamicBaseTag?{element:y.length?y:a("<base>",{href:s.hrefNoHash}).prependTo(o),set:function(a){w.element.attr("href",j.makeUrlAbsolute(a,
s))},reset:function(){w.element.attr("href",s.hrefNoHash)}}:d;a.fn.animationComplete=function(b){return a.support.cssTransitions?a(this).one("webkitAnimationEnd",b):(setTimeout(b,0),a(this))};a.mobile.updateHash=j.set;a.mobile.path=j;a.mobile.base=w;a.mobile.urlstack=n.stack;a.mobile.urlHistory=n;a.mobile.noneTransitionHandler=function(b,c,d,f){f&&f.removeClass(a.mobile.activePageClass);d.addClass(a.mobile.activePageClass);return a.Deferred().resolve(b,c,d,f).promise()};a.mobile.defaultTransitionHandler=
a.mobile.noneTransitionHandler;a.mobile.transitionHandlers={none:a.mobile.defaultTransitionHandler};a.mobile.allowCrossDomainPages=!1;a.mobile.getDocumentUrl=function(b){return b?a.extend({},u):u.href};a.mobile.getDocumentBase=function(b){return b?a.extend({},s):s.href};a.mobile.loadPage=function(b,c){var f=a.Deferred(),e=a.extend({},a.mobile.loadPage.defaults,c),g=null,h=null,p=j.makeUrlAbsolute(b,a.mobile.activePage&&l(a.mobile.activePage)||s.hrefNoHash);if(e.data&&e.type==="get")p=j.addSearchParams(p,
e.data),e.data=d;var n=j.getFilePath(p),o=j.convertUrlToDataUrl(p);e.pageContainer=e.pageContainer||a.mobile.pageContainer;g=e.pageContainer.children(":jqmData(url='"+o+"')");w&&w.reset();if(g.length){if(!e.reloadPage)return i(g,e.role),f.resolve(p,c,g),f.promise();h=g}if(e.showLoadMsg)var k=setTimeout(function(){a.mobile.showPageLoadingMsg()},e.loadMsgDelay);!a.mobile.allowCrossDomainPages&&!j.isSameDomain(u,p)?f.reject(p,c):a.ajax({url:n,type:e.type,data:e.data,dataType:"html",success:function(d){var l=
a("<div></div>"),q=d.match(/<title[^>]*>([^<]*)/)&&RegExp.$1,m=RegExp("\\bdata-"+a.mobile.ns+"url=[\"']?([^\"'>]*)[\"']?");RegExp(".*(<[^>]+\\bdata-"+a.mobile.ns+"role=[\"']?page[\"']?[^>]*>).*").test(d)&&RegExp.$1&&m.test(RegExp.$1)&&RegExp.$1&&(b=n=j.getFilePath(RegExp.$1));w&&w.set(n);l.get(0).innerHTML=d;g=l.find(":jqmData(role='page'), :jqmData(role='dialog')").first();g.length||(g=a("<div data-"+a.mobile.ns+"role='page'>"+d.split(/<\/?body[^>]*>/gmi)[1]+"</div>"));q&&!g.jqmData("title")&&g.jqmData("title",
q);if(!a.support.dynamicBaseTag){var s=j.get(n);g.find("[src], link[href], a[rel='external'], :jqmData(ajax='false'), a[target]").each(function(){var b=a(this).is("[href]")?"href":a(this).is("[src]")?"src":"action",c=a(this).attr(b),c=c.replace(location.protocol+"//"+location.host+location.pathname,"");/^(\w+:|#|\/)/.test(c)||a(this).attr(b,s+c)})}g.attr("data-"+a.mobile.ns+"url",j.convertUrlToDataUrl(n)).appendTo(e.pageContainer);g.one("pagecreate",function(){g.data("page").options.domCache||g.bind("pagehide.remove",
function(){a(this).remove()})});i(g,e.role);p.indexOf("&"+a.mobile.subPageUrlKey)>-1&&(g=e.pageContainer.children(":jqmData(url='"+o+"')"));e.showLoadMsg&&(clearTimeout(k),a.mobile.hidePageLoadingMsg());f.resolve(p,c,g,h)},error:function(){w&&w.set(j.get());e.showLoadMsg&&(clearTimeout(k),a.mobile.hidePageLoadingMsg(),a("<div class='ui-loader ui-overlay-shadow ui-body-e ui-corner-all'><h1>"+a.mobile.pageLoadErrorMessage+"</h1></div>").css({display:"block",opacity:0.96,top:m.scrollTop()+100}).appendTo(e.pageContainer).delay(800).fadeOut(400,
function(){a(this).remove()}));f.reject(p,c)}});return f.promise()};a.mobile.loadPage.defaults={type:"get",data:d,reloadPage:!1,role:d,showLoadMsg:!1,pageContainer:d,loadMsgDelay:50};a.mobile.changePage=function(c,g){if(typeof g!=="object"){var h=null;if(typeof c==="object"&&c.url&&c.type)h={type:c.type,data:c.data,forcePageLoad:!0},c=c.url;var o=arguments.length;if(o>1){var k=["transition","reverse","changeHash","fromHashChange"],l;for(l=1;l<o;l++){var q=arguments[l];typeof q!=="undefined"&&(h=h||
{},h[k[l-1]]=q)}}if(h)return a.mobile.changePage(c,h)}if(t)z.unshift(arguments);else{t=!0;var m=a.extend({},a.mobile.changePage.defaults,g);m.pageContainer=m.pageContainer||a.mobile.pageContainer;if(typeof c=="string")a.mobile.loadPage(c,m).done(function(b,c,d,f){t=!1;c.duplicateCachedPage=f;a.mobile.changePage(d,c)}).fail(function(){t=!1;b(!0);f();m.pageContainer.trigger("changepagefailed")});else{var s=m.pageContainer,h=a.mobile.activePage,k=o=c.jqmData("url");j.getFilePath(o);l=n.getActive();var q=
n.activeIndex===0,y=0,u=document.title,x=m.role==="dialog"||c.jqmData("role")==="dialog";s.trigger("beforechangepage");if(h&&h[0]===c[0])t=!1,s.trigger("changepage");else{i(c,m.role);m.fromHashChange&&n.directHashChange({currentUrl:o,isBack:function(){y=-1},isForward:function(){y=1}});try{a(document.activeElement||"").add("input:focus, textarea:focus, select:focus").blur()}catch(w){}x&&l&&(o=l.url+v);if(m.changeHash!==!1&&o)n.ignoreNextHashChange=!0,j.set(o);var A=c.jqmData("title")||c.children(":jqmData(role='header')").find(".ui-title").text();
A&&u==document.title&&(u=A);y||n.addNew(o,m.transition,u,k);document.title=n.getActive().title;a.mobile.activePage=c;m.transition=m.transition||(y&&!q?l.transition:d)||(x?a.mobile.defaultDialogTransition:a.mobile.defaultPageTransition);m.reverse=m.reverse||y<0;e(c,h,m.transition,m.reverse).done(function(){b();m.duplicateCachedPage&&m.duplicateCachedPage.remove();p.removeClass("ui-mobile-rendering");f();s.trigger("changepage")})}}}};a.mobile.changePage.defaults={transition:d,reverse:!1,changeHash:!0,
fromHashChange:!1,role:d,duplicateCachedPage:d,pageContainer:d,showLoadMsg:!0};a.mobile._registerInternalEvents=function(){a("form").live("submit",function(b){var c=a(this);if(a.mobile.ajaxEnabled&&!c.is(":jqmData(ajax='false')")){var d=c.attr("method"),f=c.attr("target"),e=c.attr("action");if(!e&&(e=l(c),e===s.hrefNoHash))e=u.hrefNoSearch;e=j.makeUrlAbsolute(e,l(c));!j.isExternal(e)&&!f&&(a.mobile.changePage(e,{type:d&&d.length&&d.toLowerCase()||"get",data:c.serialize(),transition:c.jqmData("transition"),
direction:c.jqmData("direction"),reloadPage:!0}),b.preventDefault())}});a(document).bind("vclick",function(b){if((b=k(b.target))&&j.parseUrl(b.getAttribute("href")||"#").hash!=="#")a(b).closest(".ui-btn").not(".ui-disabled").addClass(a.mobile.activeBtnClass),a("."+a.mobile.activePageClass+" .ui-btn").not(b).blur()});a(document).bind("click",function(c){var f=k(c.target);if(f){var e=a(f),g=function(){window.setTimeout(function(){b(!0)},200)};if(e.is(":jqmData(rel='back')"))return window.history.back(),
!1;if(a.mobile.ajaxEnabled){var h=l(e),f=j.makeUrlAbsolute(e.attr("href")||"#",h);if(f.search("#")!=-1)if(f=f.replace(/[^#]*#/,""))f=j.isPath(f)?j.makeUrlAbsolute(f,h):j.makeUrlAbsolute("#"+f,u.hrefNoHash);else{c.preventDefault();return}var h=e.is("[rel='external']")||e.is(":jqmData(ajax='false')")||e.is("[target]"),i=a.mobile.allowCrossDomainPages&&u.protocol==="file:"&&f.search(/^https?:/)!=-1,h=h||j.isExternal(f)&&!i;q=e.closest(".ui-btn");h?g():(g=e.jqmData("transition"),h=(h=e.jqmData("direction"))&&
h==="reverse"||e.jqmData("back"),e=e.attr("data-"+a.mobile.ns+"rel")||d,a.mobile.changePage(f,{transition:g,reverse:h,role:e}),c.preventDefault())}else g()}});a(".ui-page").live("pageshow.prefetch",function(){var b=[];a(this).find("a:jqmData(prefetch)").each(function(){var c=a(this).attr("href");c&&a.inArray(c,b)===-1&&(b.push(c),a.mobile.loadPage(c))})});m.bind("hashchange",function(){var b=j.stripHash(location.hash),c=a.mobile.urlHistory.stack.length===0?"none":d;if(!a.mobile.hashListeningEnabled||
n.ignoreNextHashChange)n.ignoreNextHashChange=!1;else{if(n.stack.length>1&&b.indexOf(v)>-1)if(a.mobile.activePage.is(".ui-dialog")){var f=function(){b=a.mobile.urlHistory.getActive().pageUrl};n.directHashChange({currentUrl:b,isBack:f,isForward:f})}else{n.directHashChange({currentUrl:b,isBack:function(){window.history.back()},isForward:function(){window.history.forward()}});return}b?(b=typeof b==="string"&&!j.isPath(b)?"#"+b:b,a.mobile.changePage(b,{transition:c,changeHash:!1,fromHashChange:!0})):
a.mobile.changePage(a.mobile.firstPage,{transition:c,changeHash:!1,fromHashChange:!0})}});a(document).bind("pageshow",h);a(window).bind("throttledresize",h)}})(jQuery);
(function(a){function d(c,b,d,e){var g=new a.Deferred,h=b?" reverse":"",i="ui-mobile-viewport-transitioning viewport-"+c;d.animationComplete(function(){d.add(e).removeClass("out in reverse "+c);e&&e.removeClass(a.mobile.activePageClass);d.parent().removeClass(i);g.resolve(c,b,d,e)});d.parent().addClass(i);e&&e.addClass(c+" out"+h);d.addClass(a.mobile.activePageClass+" "+c+" in"+h);return g.promise()}a.mobile.css3TransitionHandler=d;if(a.mobile.defaultTransitionHandler===a.mobile.noneTransitionHandler)a.mobile.defaultTransitionHandler=
d})(jQuery,this);
(function(a){a.mobile.page.prototype.options.degradeInputs={color:!1,date:!1,datetime:!1,"datetime-local":!1,email:!1,month:!1,number:!1,range:"number",search:!0,tel:!1,time:!1,url:!1,week:!1};a.mobile.page.prototype.options.keepNative=":jqmData(role='none'), :jqmData(role='nojs')";a(document).bind("pagecreate enhance",function(d){var c=a(d.target).data("page").options;a(d.target).find("input").not(c.keepNative).each(function(){var b=a(this),d=this.getAttribute("type"),e=c.degradeInputs[d]||"text";
c.degradeInputs[d]&&b.replaceWith(a("<div>").html(b.clone()).html().replace(/\s+type=["']?\w+['"]?/,' type="'+e+'" data-'+a.mobile.ns+'type="'+d+'" '))})})})(jQuery);
(function(a,d){a.widget("mobile.dialog",a.mobile.widget,{options:{closeBtnText:"Close",theme:"a",initSelector:":jqmData(role='dialog')"},_create:function(){var c=this.element,b=c.attr("class").match(/ui-body-[a-z]/);b.length&&c.removeClass(b[0]);c.addClass("ui-body-"+this.options.theme);c.attr("role","dialog").addClass("ui-dialog").find(":jqmData(role='header')").addClass("ui-corner-top ui-overlay-shadow").prepend("<a href='#' data-"+a.mobile.ns+"icon='delete' data-"+a.mobile.ns+"rel='back' data-"+
a.mobile.ns+"iconpos='notext'>"+this.options.closeBtnText+"</a>").end().find(":jqmData(role='content'),:jqmData(role='footer')").last().addClass("ui-corner-bottom ui-overlay-shadow");c.bind("vclick submit",function(b){var b=a(b.target).closest(b.type==="vclick"?"a":"form"),c;b.length&&!b.jqmData("transition")&&(c=a.mobile.urlHistory.getActive()||{},b.attr("data-"+a.mobile.ns+"transition",c.transition||a.mobile.defaultDialogTransition).attr("data-"+a.mobile.ns+"direction","reverse"))}).bind("pagehide",
function(){a(this).find("."+a.mobile.activeBtnClass).removeClass(a.mobile.activeBtnClass)})},close:function(){d.history.back()}});a(a.mobile.dialog.prototype.options.initSelector).live("pagecreate",function(){a(this).dialog()})})(jQuery,this);
(function(a){a.mobile.page.prototype.options.backBtnText="Back";a.mobile.page.prototype.options.addBackBtn=!1;a.mobile.page.prototype.options.backBtnTheme=null;a.mobile.page.prototype.options.headerTheme="a";a.mobile.page.prototype.options.footerTheme="a";a.mobile.page.prototype.options.contentTheme=null;a(":jqmData(role='page'), :jqmData(role='dialog')").live("pagecreate",function(){var d=a(this).data("page").options,c=d.theme;a(":jqmData(role='header'), :jqmData(role='footer'), :jqmData(role='content')",
this).each(function(){var b=a(this),f=b.jqmData("role"),e=b.jqmData("theme"),g,h,i;b.addClass("ui-"+f);if(f==="header"||f==="footer"){e=e||(f==="header"?d.headerTheme:d.footerTheme)||c;b.addClass("ui-bar-"+e);b.attr("role",f==="header"?"banner":"contentinfo");g=b.children("a");h=g.hasClass("ui-btn-left");i=g.hasClass("ui-btn-right");if(!h)h=g.eq(0).not(".ui-btn-right").addClass("ui-btn-left").length;i||g.eq(1).addClass("ui-btn-right");d.addBackBtn&&f==="header"&&a(".ui-page").length>1&&b.jqmData("url")!==
a.mobile.path.stripHash(location.hash)&&!h&&(f=a("<a href='#' class='ui-btn-left' data-"+a.mobile.ns+"rel='back' data-"+a.mobile.ns+"icon='arrow-l'>"+d.backBtnText+"</a>").prependTo(b),f.attr("data-"+a.mobile.ns+"theme",d.backBtnTheme||e));b.children("h1, h2, h3, h4, h5, h6").addClass("ui-title").attr({tabindex:"0",role:"heading","aria-level":"1"})}else f==="content"&&(b.addClass("ui-body-"+(e||c||d.contentTheme)),b.attr("role","main"))})})})(jQuery);
(function(a){a.widget("mobile.collapsible",a.mobile.widget,{options:{expandCueText:" click to expand contents",collapseCueText:" click to collapse contents",collapsed:!1,heading:">:header,>legend",theme:null,iconTheme:"d",initSelector:":jqmData(role='collapsible')"},_create:function(){var d=this.element,c=this.options,b=d.addClass("ui-collapsible-contain"),f=d.find(c.heading).eq(0),e=b.wrapInner("<div class='ui-collapsible-content'></div>").find(".ui-collapsible-content"),d=d.closest(":jqmData(role='collapsible-set')").addClass("ui-collapsible-set");
f.is("legend")&&(f=a("<div role='heading'>"+f.html()+"</div>").insertBefore(f),f.next().remove());f.insertBefore(e).addClass("ui-collapsible-heading").append("<span class='ui-collapsible-heading-status'></span>").wrapInner("<a href='#' class='ui-collapsible-heading-toggle'></a>").find("a:eq(0)").buttonMarkup({shadow:!d.length,corners:!1,iconPos:"left",icon:"plus",theme:c.theme}).find(".ui-icon").removeAttr("class").buttonMarkup({shadow:!0,corners:!0,iconPos:"notext",icon:"plus",theme:c.iconTheme});
d.length?b.jqmData("collapsible-last")&&f.find("a:eq(0), .ui-btn-inner").addClass("ui-corner-bottom"):f.find("a:eq(0)").addClass("ui-corner-all").find(".ui-btn-inner").addClass("ui-corner-all");b.bind("collapse",function(d){!d.isDefaultPrevented()&&a(d.target).closest(".ui-collapsible-contain").is(b)&&(d.preventDefault(),f.addClass("ui-collapsible-heading-collapsed").find(".ui-collapsible-heading-status").text(c.expandCueText).end().find(".ui-icon").removeClass("ui-icon-minus").addClass("ui-icon-plus"),
e.addClass("ui-collapsible-content-collapsed").attr("aria-hidden",!0),b.jqmData("collapsible-last")&&f.find("a:eq(0), .ui-btn-inner").addClass("ui-corner-bottom"))}).bind("expand",function(a){a.isDefaultPrevented()||(a.preventDefault(),f.removeClass("ui-collapsible-heading-collapsed").find(".ui-collapsible-heading-status").text(c.collapseCueText),f.find(".ui-icon").removeClass("ui-icon-plus").addClass("ui-icon-minus"),e.removeClass("ui-collapsible-content-collapsed").attr("aria-hidden",!1),b.jqmData("collapsible-last")&&
f.find("a:eq(0), .ui-btn-inner").removeClass("ui-corner-bottom"))}).trigger(c.collapsed?"collapse":"expand");d.length&&!d.jqmData("collapsiblebound")&&(d.jqmData("collapsiblebound",!0).bind("expand",function(b){a(b.target).closest(".ui-collapsible-contain").siblings(".ui-collapsible-contain").trigger("collapse")}),d=d.children(":jqmData(role='collapsible')"),d.first().find("a:eq(0)").addClass("ui-corner-top").find(".ui-btn-inner").addClass("ui-corner-top"),d.last().jqmData("collapsible-last",!0));
f.bind("vclick",function(a){var c=f.is(".ui-collapsible-heading-collapsed")?"expand":"collapse";b.trigger(c);a.preventDefault()})}});a(document).bind("pagecreate create",function(d){a(a.mobile.collapsible.prototype.options.initSelector,d.target).collapsible()})})(jQuery);(function(a){a.fn.fieldcontain=function(){return this.addClass("ui-field-contain ui-body ui-br")};a(document).bind("pagecreate create",function(d){a(":jqmData(role='fieldcontain')",d.target).fieldcontain()})})(jQuery);
(function(a){a.fn.grid=function(d){return this.each(function(){var c=a(this),b=a.extend({grid:null},d),f=c.children(),e={solo:1,a:2,b:3,c:4,d:5},b=b.grid;if(!b)if(f.length<=5)for(var g in e)e[g]===f.length&&(b=g);else b="a";e=e[b];c.addClass("ui-grid-"+b);f.filter(":nth-child("+e+"n+1)").addClass("ui-block-a");e>1&&f.filter(":nth-child("+e+"n+2)").addClass("ui-block-b");e>2&&f.filter(":nth-child(3n+3)").addClass("ui-block-c");e>3&&f.filter(":nth-child(4n+4)").addClass("ui-block-d");e>4&&f.filter(":nth-child(5n+5)").addClass("ui-block-e")})}})(jQuery);
(function(a,d){a.widget("mobile.navbar",a.mobile.widget,{options:{iconpos:"top",grid:null,initSelector:":jqmData(role='navbar')"},_create:function(){var c=this.element,b=c.find("a"),f=b.filter(":jqmData(icon)").length?this.options.iconpos:d;c.addClass("ui-navbar").attr("role","navigation").find("ul").grid({grid:this.options.grid});f||c.addClass("ui-navbar-noicons");b.buttonMarkup({corners:!1,shadow:!1,iconpos:f});c.delegate("a","vclick",function(){b.not(".ui-state-persist").removeClass(a.mobile.activeBtnClass);
a(this).addClass(a.mobile.activeBtnClass)})}});a(document).bind("pagecreate create",function(c){a(a.mobile.navbar.prototype.options.initSelector,c.target).navbar()})})(jQuery);
(function(a){var d={};a.widget("mobile.listview",a.mobile.widget,{options:{theme:"c",countTheme:"c",headerTheme:"b",dividerTheme:"b",splitIcon:"arrow-r",splitTheme:"b",inset:!1,initSelector:":jqmData(role='listview')"},_create:function(){var a=this;a.element.addClass(function(b,d){return d+" ui-listview "+(a.options.inset?" ui-listview-inset ui-corner-all ui-shadow ":"")});a.refresh()},_itemApply:function(c,b){b.find(".ui-li-count").addClass("ui-btn-up-"+(c.jqmData("counttheme")||this.options.countTheme)+
" ui-btn-corner-all").end().find("h1, h2, h3, h4, h5, h6").addClass("ui-li-heading").end().find("p, dl").addClass("ui-li-desc").end().find(">img:eq(0), .ui-link-inherit>img:eq(0)").addClass("ui-li-thumb").each(function(){b.addClass(a(this).is(".ui-li-icon")?"ui-li-has-icon":"ui-li-has-thumb")}).end().find(".ui-li-aside").each(function(){var b=a(this);b.prependTo(b.parent())})},_removeCorners:function(a,b){a=a.add(a.find(".ui-btn-inner, .ui-li-link-alt, .ui-li-thumb"));b==="top"?a.removeClass("ui-corner-top ui-corner-tr ui-corner-tl"):
b==="bottom"?a.removeClass("ui-corner-bottom ui-corner-br ui-corner-bl"):a.removeClass("ui-corner-top ui-corner-tr ui-corner-tl ui-corner-bottom ui-corner-br ui-corner-bl")},refresh:function(c){this.parentPage=this.element.closest(".ui-page");this._createSubPages();var b=this.options,d=this.element,e=d.jqmData("dividertheme")||b.dividerTheme,g=d.jqmData("splittheme"),h=d.jqmData("spliticon"),i=d.children("li"),k=a.support.cssPseudoElement||!a.nodeName(d[0],"ol")?0:1,l,m,p,o,j;k&&d.find(".ui-li-dec").remove();
for(var q=0,n=i.length;q<n;q++){l=i.eq(q);m="ui-li";if(c||!l.hasClass("ui-li"))p=l.jqmData("theme")||b.theme,o=l.children("a"),o.length?(j=l.jqmData("icon"),l.buttonMarkup({wrapperEls:"div",shadow:!1,corners:!1,iconpos:"right",icon:o.length>1||j===!1?!1:j||"arrow-r",theme:p}),o.first().addClass("ui-link-inherit"),o.length>1&&(m+=" ui-li-has-alt",o=o.last(),j=g||o.jqmData("theme")||b.splitTheme,o.appendTo(l).attr("title",o.text()).addClass("ui-li-link-alt").empty().buttonMarkup({shadow:!1,corners:!1,
theme:p,icon:!1,iconpos:!1}).find(".ui-btn-inner").append(a("<span />").buttonMarkup({shadow:!0,corners:!0,theme:j,iconpos:"notext",icon:h||o.jqmData("icon")||b.splitIcon})))):l.jqmData("role")==="list-divider"?(m+=" ui-li-divider ui-btn ui-bar-"+e,l.attr("role","heading"),k&&(k=1)):m+=" ui-li-static ui-body-"+p;b.inset&&(q===0&&(m+=" ui-corner-top",l.add(l.find(".ui-btn-inner")).find(".ui-li-link-alt").addClass("ui-corner-tr").end().find(".ui-li-thumb").addClass("ui-corner-tl"),l.next().next().length&&
this._removeCorners(l.next())),q===i.length-1&&(m+=" ui-corner-bottom",l.add(l.find(".ui-btn-inner")).find(".ui-li-link-alt").addClass("ui-corner-br").end().find(".ui-li-thumb").addClass("ui-corner-bl"),l.prev().prev().length?this._removeCorners(l.prev()):l.prev().length&&this._removeCorners(l.prev(),"bottom")));k&&m.indexOf("ui-li-divider")<0&&(p=l.is(".ui-li-static:first")?l:l.find(".ui-link-inherit"),p.addClass("ui-li-jsnumbering").prepend("<span class='ui-li-dec'>"+k++ +". </span>"));l.add(l.children(".ui-btn-inner")).addClass(m);
c||this._itemApply(d,l)}},_idStringEscape:function(a){return a.replace(/[^a-zA-Z0-9]/g,"-")},_createSubPages:function(){var c=this.element,b=c.closest(".ui-page"),f=b.jqmData("url"),e=f||b[0][a.expando],g=c.attr("id"),h=this.options,i="data-"+a.mobile.ns,k=this,l=b.find(":jqmData(role='footer')").jqmData("id"),m;typeof d[e]==="undefined"&&(d[e]=-1);g=g||++d[e];a(c.find("li>ul, li>ol").toArray().reverse()).each(function(b){var d=a(this),e=d.attr("id")||g+"-"+b,b=d.parent(),k=a(d.prevAll().toArray().reverse()),
k=k.length?k:a("<span>"+a.trim(b.contents()[0].nodeValue)+"</span>"),n=k.first().text(),e=(f||"")+"&"+a.mobile.subPageUrlKey+"="+e,x=d.jqmData("theme")||h.theme,z=d.jqmData("counttheme")||c.jqmData("counttheme")||h.countTheme;m=!0;d.detach().wrap("<div "+i+"role='page' "+i+"url='"+e+"' "+i+"theme='"+x+"' "+i+"count-theme='"+z+"'><div "+i+"role='content'></div></div>").parent().before("<div "+i+"role='header' "+i+"theme='"+h.headerTheme+"'><div class='ui-title'>"+n+"</div></div>").after(l?a("<div "+
i+"role='footer' "+i+"id='"+l+"'>"):"").parent().appendTo(a.mobile.pageContainer).page();d=b.find("a:first");d.length||(d=a("<a/>").html(k||n).prependTo(b.empty()));d.attr("href","#"+e)}).listview();m&&b.data("page").options.domCache===!1&&b.unbind("pagehide.remove").bind("pagehide.remove",function(c,d){var e=d.nextPage;d.nextPage&&(e=e.jqmData("url"),e.indexOf(f+"&"+a.mobile.subPageUrlKey)!==0&&(k.childPages().remove(),b.remove()))})},childPages:function(){var c=this.parentPage.jqmData("url");return a(":jqmData(url^='"+
c+"&"+a.mobile.subPageUrlKey+"')")}});a(document).bind("pagecreate create",function(c){a(a.mobile.listview.prototype.options.initSelector,c.target).listview()})})(jQuery);
(function(a){a.mobile.listview.prototype.options.filter=!1;a.mobile.listview.prototype.options.filterPlaceholder="Filter items...";a.mobile.listview.prototype.options.filterTheme="c";a(":jqmData(role='listview')").live("listviewcreate",function(){var d=a(this),c=d.data("listview");if(c.options.filter){var b=a("<form>",{"class":"ui-listview-filter ui-bar-"+c.options.filterTheme,role:"search"});a("<input>",{placeholder:c.options.filterPlaceholder}).attr("data-"+a.mobile.ns+"type","search").jqmData("lastval",
"").bind("keyup change",function(){var b=a(this),c=this.value.toLowerCase(),g=null,g=b.jqmData("lastval")+"",h=!1,i="";b.jqmData("lastval",c);change=c.replace(RegExp("^"+g),"");g=c.length<g.length||change.length!=c.length-g.length?d.children():d.children(":not(.ui-screen-hidden)");if(c){for(var k=g.length-1;k>=0;k--)b=a(g[k]),i=b.jqmData("filtertext")||b.text(),b.is("li:jqmData(role=list-divider)")?(b.toggleClass("ui-filter-hidequeue",!h),h=!1):i.toLowerCase().indexOf(c)===-1?b.toggleClass("ui-filter-hidequeue",
!0):h=!0;g.filter(":not(.ui-filter-hidequeue)").toggleClass("ui-screen-hidden",!1);g.filter(".ui-filter-hidequeue").toggleClass("ui-screen-hidden",!0).toggleClass("ui-filter-hidequeue",!1)}else g.toggleClass("ui-screen-hidden",!1)}).appendTo(b).textinput();a(this).jqmData("inset")&&b.addClass("ui-listview-filter-inset");b.bind("submit",function(){return!1}).insertBefore(d)}})})(jQuery);(function(a){a(document).bind("pagecreate create",function(d){a(":jqmData(role='nojs')",d.target).addClass("ui-nojs")})})(jQuery);
(function(a,d){a.widget("mobile.checkboxradio",a.mobile.widget,{options:{theme:null,initSelector:"input[type='checkbox'],input[type='radio']"},_create:function(){var c=this,b=this.element,f=b.closest("form,fieldset,:jqmData(role='page')").find("label").filter("[for='"+b[0].id+"']"),e=b.attr("type"),g=e+"-on",h=e+"-off",i=b.parents(":jqmData(type='horizontal')").length?d:h;if(!(e!=="checkbox"&&e!=="radio")){a.extend(this,{label:f,inputtype:e,checkedClass:"ui-"+g+(i?"":" "+a.mobile.activeBtnClass),
uncheckedClass:"ui-"+h,checkedicon:"ui-icon-"+g,uncheckedicon:"ui-icon-"+h});if(!this.options.theme)this.options.theme=this.element.jqmData("theme");f.buttonMarkup({theme:this.options.theme,icon:i,shadow:!1});b.add(f).wrapAll("<div class='ui-"+e+"'></div>");f.bind({vmouseover:function(){if(a(this).parent().is(".ui-disabled"))return!1},vclick:function(a){if(b.is(":disabled"))a.preventDefault();else return c._cacheVals(),b.prop("checked",e==="radio"&&!0||!b.prop("checked")),c._getInputSet().not(b).prop("checked",
!1),c._updateAll(),!1}});b.bind({vmousedown:function(){this._cacheVals()},vclick:function(){var b=a(this);b.is(":checked")?(b.prop("checked",!0),c._getInputSet().not(b).prop("checked",!1)):b.prop("checked",!1);c._updateAll()},focus:function(){f.addClass("ui-focus")},blur:function(){f.removeClass("ui-focus")}});this.refresh()}},_cacheVals:function(){this._getInputSet().each(function(){var c=a(this);c.jqmData("cacheVal",c.is(":checked"))})},_getInputSet:function(){if(this.inputtype=="checkbox")return this.element;
return this.element.closest("form,fieldset,:jqmData(role='page')").find("input[name='"+this.element.attr("name")+"'][type='"+this.inputtype+"']")},_updateAll:function(){var c=this;this._getInputSet().each(function(){var b=a(this);(b.is(":checked")||c.inputtype==="checkbox")&&b.trigger("change")}).checkboxradio("refresh")},refresh:function(){var c=this.element,b=this.label,d=b.find(".ui-icon");a(c[0]).prop("checked")?(b.addClass(this.checkedClass).removeClass(this.uncheckedClass),d.addClass(this.checkedicon).removeClass(this.uncheckedicon)):
(b.removeClass(this.checkedClass).addClass(this.uncheckedClass),d.removeClass(this.checkedicon).addClass(this.uncheckedicon));c.is(":disabled")?this.disable():this.enable()},disable:function(){this.element.prop("disabled",!0).parent().addClass("ui-disabled")},enable:function(){this.element.prop("disabled",!1).parent().removeClass("ui-disabled")}});a(document).bind("pagecreate create",function(c){a(a.mobile.checkboxradio.prototype.options.initSelector,c.target).not(":jqmData(role='none'), :jqmData(role='nojs')").checkboxradio()})})(jQuery);
(function(a){a.widget("mobile.button",a.mobile.widget,{options:{theme:null,icon:null,iconpos:null,inline:null,corners:!0,shadow:!0,iconshadow:!0,initSelector:"button, [type='button'], [type='submit'], [type='reset'], [type='image']"},_create:function(){var d=this.element,c=this.options;this.button=a("<div></div>").text(d.text()||d.val()).buttonMarkup({theme:c.theme,icon:c.icon,iconpos:c.iconpos,inline:c.inline,corners:c.corners,shadow:c.shadow,iconshadow:c.iconshadow}).insertBefore(d).append(d.addClass("ui-btn-hidden"));
c=d.attr("type");c!=="button"&&c!=="reset"&&d.bind("vclick",function(){var b=a("<input>",{type:"hidden",name:d.attr("name"),value:d.attr("value")}).insertBefore(d);a(document).submit(function(){b.remove()})});this.refresh()},enable:function(){this.element.attr("disabled",!1);this.button.removeClass("ui-disabled").attr("aria-disabled",!1);return this._setOption("disabled",!1)},disable:function(){this.element.attr("disabled",!0);this.button.addClass("ui-disabled").attr("aria-disabled",!0);return this._setOption("disabled",
!0)},refresh:function(){this.element.attr("disabled")?this.disable():this.enable()}});a(document).bind("pagecreate create",function(d){a(a.mobile.button.prototype.options.initSelector,d.target).not(":jqmData(role='none'), :jqmData(role='nojs')").button()})})(jQuery);
(function(a,d){a.widget("mobile.slider",a.mobile.widget,{options:{theme:null,trackTheme:null,disabled:!1,initSelector:"input[type='range'], :jqmData(type='range'), :jqmData(role='slider')"},_create:function(){var c=this,b=this.element,f=b.parents("[class*='ui-bar-'],[class*='ui-body-']").eq(0),f=f.length?f.attr("class").match(/ui-(bar|body)-([a-z])/)[2]:"c",e=this.options.theme?this.options.theme:f,g=this.options.trackTheme?this.options.trackTheme:f,h=b[0].nodeName.toLowerCase(),f=h=="select"?"ui-slider-switch":
"",i=b.attr("id"),k=i+"-label",i=a("[for='"+i+"']").attr("id",k),l=function(){return h=="input"?parseFloat(b.val()):b[0].selectedIndex},m=h=="input"?parseFloat(b.attr("min")):0,p=h=="input"?parseFloat(b.attr("max")):b.find("option").length-1,o=window.parseFloat(b.attr("step")||1),j=a("<div class='ui-slider "+f+" ui-btn-down-"+g+" ui-btn-corner-all' role='application'></div>"),q=a("<a href='#' class='ui-slider-handle'></a>").appendTo(j).buttonMarkup({corners:!0,theme:e,shadow:!0}).attr({role:"slider",
"aria-valuemin":m,"aria-valuemax":p,"aria-valuenow":l(),"aria-valuetext":l(),title:l(),"aria-labelledby":k});a.extend(this,{slider:j,handle:q,dragging:!1,beforeStart:null});h=="select"&&(j.wrapInner("<div class='ui-slider-inneroffset'></div>"),b.find("option"),b.find("option").each(function(b){var c=!b?"b":"a",d=!b?"right":"left",b=!b?" ui-btn-down-"+g:" ui-btn-active";a("<div class='ui-slider-labelbg ui-slider-labelbg-"+c+b+" ui-btn-corner-"+d+"'></div>").prependTo(j);a("<span class='ui-slider-label ui-slider-label-"+
c+b+" ui-btn-corner-"+d+"' role='img'>"+a(this).text()+"</span>").prependTo(q)}));i.addClass("ui-slider");b.addClass(h==="input"?"ui-slider-input":"ui-slider-switch").change(function(){c.refresh(l(),!0)}).keyup(function(){c.refresh(l(),!0,!0)}).blur(function(){c.refresh(l(),!0)});a(document).bind("vmousemove",function(a){if(c.dragging)return c.refresh(a),!1});j.bind("vmousedown",function(a){c.dragging=!0;if(h==="select")c.beforeStart=b[0].selectedIndex;c.refresh(a);return!1});j.add(document).bind("vmouseup",
function(){if(c.dragging){c.dragging=!1;if(h==="select"){c.beforeStart===b[0].selectedIndex&&c.refresh(!c.beforeStart?1:0);var a=l(),a=Math.round(a/(p-m)*100);q.addClass("ui-slider-handle-snapping").css("left",a+"%").animationComplete(function(){q.removeClass("ui-slider-handle-snapping")})}return!1}});j.insertAfter(b);this.handle.bind("vmousedown",function(){a(this).focus()}).bind("vclick",!1);this.handle.bind("keydown",function(b){var d=l();if(!c.options.disabled){switch(b.keyCode){case a.mobile.keyCode.HOME:case a.mobile.keyCode.END:case a.mobile.keyCode.PAGE_UP:case a.mobile.keyCode.PAGE_DOWN:case a.mobile.keyCode.UP:case a.mobile.keyCode.RIGHT:case a.mobile.keyCode.DOWN:case a.mobile.keyCode.LEFT:if(b.preventDefault(),
!c._keySliding)c._keySliding=!0,a(this).addClass("ui-state-active")}switch(b.keyCode){case a.mobile.keyCode.HOME:c.refresh(m);break;case a.mobile.keyCode.END:c.refresh(p);break;case a.mobile.keyCode.PAGE_UP:case a.mobile.keyCode.UP:case a.mobile.keyCode.RIGHT:c.refresh(d+o);break;case a.mobile.keyCode.PAGE_DOWN:case a.mobile.keyCode.DOWN:case a.mobile.keyCode.LEFT:c.refresh(d-o)}}}).keyup(function(){if(c._keySliding)c._keySliding=!1,a(this).removeClass("ui-state-active")});this.refresh(d,d,!0)},refresh:function(a,
b,d){if(!this.options.disabled){var e=this.element,g=e[0].nodeName.toLowerCase(),h=g==="input"?parseFloat(e.attr("min")):0,i=g==="input"?parseFloat(e.attr("max")):e.find("option").length-1;if(typeof a==="object"){if(!this.dragging||a.pageX<this.slider.offset().left-8||a.pageX>this.slider.offset().left+this.slider.width()+8)return;a=Math.round((a.pageX-this.slider.offset().left)/this.slider.width()*100)}else a==null&&(a=g==="input"?parseFloat(e.val()):e[0].selectedIndex),a=(parseFloat(a)-h)/(i-h)*
100;if(!isNaN(a)){a<0&&(a=0);a>100&&(a=100);var k=Math.round(a/100*(i-h))+h;k<h&&(k=h);k>i&&(k=i);this.handle.css("left",a+"%");this.handle.attr({"aria-valuenow":g==="input"?k:e.find("option").eq(k).attr("value"),"aria-valuetext":g==="input"?k:e.find("option").eq(k).text(),title:k});g==="select"&&(k===0?this.slider.addClass("ui-slider-switch-a").removeClass("ui-slider-switch-b"):this.slider.addClass("ui-slider-switch-b").removeClass("ui-slider-switch-a"));if(!d)g==="input"?e.val(k):e[0].selectedIndex=
k,b||e.trigger("change")}}},enable:function(){this.element.attr("disabled",!1);this.slider.removeClass("ui-disabled").attr("aria-disabled",!1);return this._setOption("disabled",!1)},disable:function(){this.element.attr("disabled",!0);this.slider.addClass("ui-disabled").attr("aria-disabled",!0);return this._setOption("disabled",!0)}});a(document).bind("pagecreate create",function(c){a(a.mobile.slider.prototype.options.initSelector,c.target).not(":jqmData(role='none'), :jqmData(role='nojs')").slider()})})(jQuery);
(function(a){a.widget("mobile.textinput",a.mobile.widget,{options:{theme:null,initSelector:"input[type='text'], input[type='search'], :jqmData(type='search'), input[type='number'], :jqmData(type='number'), input[type='password'], input[type='email'], input[type='url'], input[type='tel'], textarea"},_create:function(){var i;var d=this.element,c=this.options,b=c.theme,f,e;b||(b=this.element.closest("[class*='ui-bar-'],[class*='ui-body-']"),i=(b=b.length&&/ui-(bar|body)-([a-z])/.exec(b.attr("class")))&&
b[2]||"c",b=i);b=" ui-body-"+b;a("label[for='"+d.attr("id")+"']").addClass("ui-input-text");d.addClass("ui-input-text ui-body-"+c.theme);f=d;typeof d[0].autocorrect!=="undefined"&&(d[0].setAttribute("autocorrect","off"),d[0].setAttribute("autocomplete","off"));d.is("[type='search'],:jqmData(type='search')")?(f=d.wrap("<div class='ui-input-search ui-shadow-inset ui-btn-corner-all ui-btn-shadow ui-icon-searchfield"+b+"'></div>").parent(),e=a("<a href='#' class='ui-input-clear' title='clear text'>clear text</a>").tap(function(a){d.val("").focus();
d.trigger("change");e.addClass("ui-input-clear-hidden");a.preventDefault()}).appendTo(f).buttonMarkup({icon:"delete",iconpos:"notext",corners:!0,shadow:!0}),c=function(){d.val()?e.removeClass("ui-input-clear-hidden"):e.addClass("ui-input-clear-hidden")},c(),d.keyup(c).focus(c)):d.addClass("ui-corner-all ui-shadow-inset"+b);d.focus(function(){f.addClass("ui-focus")}).blur(function(){f.removeClass("ui-focus")});if(d.is("textarea")){var g=function(){var a=d[0].scrollHeight;d[0].clientHeight<a&&d.css({height:a+
15})},h;d.keyup(function(){clearTimeout(h);h=setTimeout(g,100)})}},disable:function(){(this.element.attr("disabled",!0).is("[type='search'],:jqmData(type='search')")?this.element.parent():this.element).addClass("ui-disabled")},enable:function(){(this.element.attr("disabled",!1).is("[type='search'],:jqmData(type='search')")?this.element.parent():this.element).removeClass("ui-disabled")}});a(document).bind("pagecreate create",function(d){a(a.mobile.textinput.prototype.options.initSelector,d.target).not(":jqmData(role='none'), :jqmData(role='nojs')").textinput()})})(jQuery);
(function(a){a.widget("mobile.selectmenu",a.mobile.widget,{options:{theme:null,disabled:!1,icon:"arrow-d",iconpos:"right",inline:null,corners:!0,shadow:!0,iconshadow:!0,menuPageTheme:"b",overlayTheme:"a",hidePlaceholderMenuItems:!0,closeText:"Close",nativeMenu:!0,initSelector:"select:not(:jqmData(role='slider'))"},_create:function(){var d=this,c=this.options,b=this.element.wrap("<div class='ui-select'>"),f=b.attr("id"),e=a("label[for='"+f+"']").addClass("ui-select"),g=b[0].selectedIndex==-1?0:b[0].selectedIndex,
h=(d.options.nativeMenu?a("<div/>"):a("<a>",{href:"#",role:"button",id:l,"aria-haspopup":"true","aria-owns":m})).text(a(b[0].options.item(g)).text()).insertBefore(b).buttonMarkup({theme:c.theme,icon:c.icon,iconpos:c.iconpos,inline:c.inline,corners:c.corners,shadow:c.shadow,iconshadow:c.iconshadow}),i=d.isMultiple=b[0].multiple;c.nativeMenu&&window.opera&&window.opera.version&&b.addClass("ui-select-nativeonly");if(!c.nativeMenu){var k=b.find("option"),l=f+"-button",m=f+"-menu",p=b.closest(".ui-page"),
g=/ui-btn-up-([a-z])/.exec(h.attr("class"))[1],o=a("<div data-"+a.mobile.ns+"role='dialog' data-"+a.mobile.ns+"theme='"+c.menuPageTheme+"'><div data-"+a.mobile.ns+"role='header'><div class='ui-title'>"+e.text()+"</div></div><div data-"+a.mobile.ns+"role='content'></div></div>").appendTo(a.mobile.pageContainer).page(),j=o.find(".ui-content");o.find(".ui-header a");var q=a("<div>",{"class":"ui-selectmenu-screen ui-screen-hidden"}).appendTo(p),n=a("<div>",{"class":"ui-selectmenu ui-selectmenu-hidden ui-overlay-shadow ui-corner-all ui-body-"+
c.overlayTheme+" "+a.mobile.defaultDialogTransition}).insertAfter(q),x=a("<ul>",{"class":"ui-selectmenu-list",id:m,role:"listbox","aria-labelledby":l}).attr("data-"+a.mobile.ns+"theme",g).appendTo(n),z=a("<div>",{"class":"ui-header ui-bar-"+g}).prependTo(n),t=a("<h1>",{"class":"ui-title"}).appendTo(z),v=a("<a>",{text:c.closeText,href:"#","class":"ui-btn-left"}).attr("data-"+a.mobile.ns+"iconpos","notext").attr("data-"+a.mobile.ns+"icon","delete").appendTo(z).buttonMarkup()}if(i)d.buttonCount=a("<span>").addClass("ui-li-count ui-btn-up-c ui-btn-corner-all").hide().appendTo(h);
c.disabled&&this.disable();b.change(function(){d.refresh()});a.extend(d,{select:b,optionElems:k,selectID:f,label:e,buttonId:l,menuId:m,thisPage:p,button:h,menuPage:o,menuPageContent:j,screen:q,listbox:n,list:x,menuType:void 0,header:z,headerClose:v,headerTitle:t,placeholder:""});c.nativeMenu?b.appendTo(h).bind("vmousedown",function(){h.addClass(a.mobile.activeBtnClass)}).bind("focus vmouseover",function(){h.trigger("vmouseover")}).bind("vmousemove",function(){h.removeClass(a.mobile.activeBtnClass)}).bind("change blur vmouseout",
function(){h.trigger("vmouseout").removeClass(a.mobile.activeBtnClass)}):(d.refresh(),b.attr("tabindex","-1").focus(function(){a(this).blur();h.focus()}),h.bind("vclick keydown",function(b){if(b.type=="vclick"||b.keyCode&&(b.keyCode===a.mobile.keyCode.ENTER||b.keyCode===a.mobile.keyCode.SPACE))d.open(),b.preventDefault()}),x.attr("role","listbox").delegate(".ui-li>a","focusin",function(){a(this).attr("tabindex","0")}).delegate(".ui-li>a","focusout",function(){a(this).attr("tabindex","-1")}).delegate("li:not(.ui-disabled, .ui-li-divider)",
"vclick",function(c){var e=a(this),f=b[0].selectedIndex,g=e.jqmData("option-index"),h=d.optionElems[g];h.selected=i?!h.selected:!0;i&&e.find(".ui-icon").toggleClass("ui-icon-checkbox-on",h.selected).toggleClass("ui-icon-checkbox-off",!h.selected);(i||f!==g)&&b.trigger("change");i||d.close();c.preventDefault()}).keydown(function(b){var c=a(b.target),d=c.closest("li");switch(b.keyCode){case 38:return b=d.prev(),b.length&&(c.blur().attr("tabindex","-1"),b.find("a").first().focus()),!1;case 40:return b=
d.next(),b.length&&(c.blur().attr("tabindex","-1"),b.find("a").first().focus()),!1;case 13:case 32:return c.trigger("vclick"),!1}}),d.menuPage.bind("pagehide",function(){d.list.appendTo(d.listbox);d._focusButton()}),q.bind("vclick",function(){d.close()}),d.headerClose.click(function(){if(d.menuType=="overlay")return d.close(),!1}))},_buildList:function(){var d=this,c=this.options,b=this.placeholder,f=[],e=[],g=d.isMultiple?"checkbox-off":"false";d.list.empty().filter(".ui-listview").listview("destroy");
d.select.find("option").each(function(h){var i=a(this),k=i.parent(),l=i.text(),m="<a href='#'>"+l+"</a>",p=[],o=[];k.is("optgroup")&&(k=k.attr("label"),a.inArray(k,f)===-1&&(e.push("<li data-"+a.mobile.ns+"role='list-divider'>"+k+"</li>"),f.push(k)));if(!this.getAttribute("value")||l.length==0||i.jqmData("placeholder"))c.hidePlaceholderMenuItems&&p.push("ui-selectmenu-placeholder"),b=d.placeholder=l;this.disabled&&(p.push("ui-disabled"),o.push("aria-disabled='true'"));e.push("<li data-"+a.mobile.ns+
"option-index='"+h+"' data-"+a.mobile.ns+"icon='"+g+"' class='"+p.join(" ")+"' "+o.join(" ")+">"+m+"</li>")});d.list.html(e.join(" "));d.list.find("li").attr({role:"option",tabindex:"-1"}).first().attr("tabindex","0");this.isMultiple||this.headerClose.hide();!this.isMultiple&&!b.length?this.header.hide():this.headerTitle.text(this.placeholder);d.list.listview()},refresh:function(d){var c=this,b=this.element,f=this.isMultiple,e=this.optionElems=b.find("option"),g=e.filter(":selected"),h=g.map(function(){return e.index(this)}).get();
!c.options.nativeMenu&&(d||b[0].options.length!=c.list.find("li").length)&&c._buildList();c.button.find(".ui-btn-text").text(function(){if(!f)return g.text();return g.length?g.map(function(){return a(this).text()}).get().join(", "):c.placeholder});f&&c.buttonCount[g.length>1?"show":"hide"]().text(g.length);c.options.nativeMenu||c.list.find("li:not(.ui-li-divider)").removeClass(a.mobile.activeBtnClass).attr("aria-selected",!1).each(function(b){a.inArray(b,h)>-1&&(b=a(this).addClass(a.mobile.activeBtnClass),
b.find("a").attr("aria-selected",!0),f&&b.find(".ui-icon").removeClass("ui-icon-checkbox-off").addClass("ui-icon-checkbox-on"))})},open:function(){function d(){c.list.find(".ui-btn-active").focus()}if(!this.options.disabled&&!this.options.nativeMenu){var c=this,b=c.list.parent().outerHeight(),f=c.list.parent().outerWidth(),e=a(window).scrollTop(),g=c.button.offset().top,h=window.innerHeight,i=window.innerWidth;c.button.addClass(a.mobile.activeBtnClass);setTimeout(function(){c.button.removeClass(a.mobile.activeBtnClass)},
300);if(b>h-80||!a.support.scrollTop){c.thisPage.unbind("pagehide.remove");if(e==0&&g>h)c.thisPage.one("pagehide",function(){a(this).jqmData("lastScroll",g)});c.menuPage.one("pageshow",function(){a(window).one("silentscroll",function(){d()});c.isOpen=!0});c.menuType="page";c.menuPageContent.append(c.list);a.mobile.changePage(c.menuPage,{transition:a.mobile.defaultDialogTransition})}else{c.menuType="overlay";c.screen.height(a(document).height()).removeClass("ui-screen-hidden");var k=g-e,l=e+h-g,m=
b/2,p=parseFloat(c.list.parent().css("max-width")),b=k>b/2&&l>b/2?g+c.button.outerHeight()/2-m:k>l?e+h-b-30:e+30;f<p?p=(i-f)/2:(p=c.button.offset().left+c.button.outerWidth()/2-f/2,p<30?p=30:p+f>i&&(p=i-f-30));c.listbox.append(c.list).removeClass("ui-selectmenu-hidden").css({top:b,left:p}).addClass("in");d();c.isOpen=!0}}},_focusButton:function(){var a=this;setTimeout(function(){a.button.focus()},40)},close:function(){if(!this.options.disabled&&this.isOpen&&!this.options.nativeMenu)this.menuType==
"page"?(this.thisPage.bind("pagehide.remove",function(){a(this).remove()}),window.history.back()):(this.screen.addClass("ui-screen-hidden"),this.listbox.addClass("ui-selectmenu-hidden").removeAttr("style").removeClass("in"),this.list.appendTo(this.listbox),this._focusButton()),this.isOpen=!1},disable:function(){this.element.attr("disabled",!0);this.button.addClass("ui-disabled").attr("aria-disabled",!0);return this._setOption("disabled",!0)},enable:function(){this.element.attr("disabled",!1);this.button.removeClass("ui-disabled").attr("aria-disabled",
!1);return this._setOption("disabled",!1)}});a(document).bind("pagecreate create",function(d){a(a.mobile.selectmenu.prototype.options.initSelector,d.target).not(":jqmData(role='none'), :jqmData(role='nojs')").selectmenu()})})(jQuery);
(function(a){function d(b){for(;b;){var c=a(b);if(c.hasClass("ui-btn")&&!c.hasClass("ui-disabled"))break;b=b.parentNode}return b}a.fn.buttonMarkup=function(b){return this.each(function(){var d=a(this),e=a.extend({},a.fn.buttonMarkup.defaults,d.jqmData(),b),g="ui-btn-inner",h,i;c&&c();if(!e.theme)h=d.closest("[class*='ui-bar-'],[class*='ui-body-']"),e.theme=h.length?/ui-(bar|body)-([a-z])/.exec(h.attr("class"))[2]:"c";h="ui-btn ui-btn-up-"+e.theme;e.inline&&(h+=" ui-btn-inline");if(e.icon)e.icon="ui-icon-"+
e.icon,e.iconpos=e.iconpos||"left",i="ui-icon "+e.icon,e.iconshadow&&(i+=" ui-icon-shadow");e.iconpos&&(h+=" ui-btn-icon-"+e.iconpos,e.iconpos=="notext"&&!d.attr("title")&&d.attr("title",d.text()));e.corners&&(h+=" ui-btn-corner-all",g+=" ui-btn-corner-all");e.shadow&&(h+=" ui-shadow");d.attr("data-"+a.mobile.ns+"theme",e.theme).addClass(h);e=("<D class='"+g+"'><D class='ui-btn-text'></D>"+(e.icon?"<span class='"+i+"'></span>":"")+"</D>").replace(/D/g,e.wrapperEls);d.wrapInner(e)})};a.fn.buttonMarkup.defaults=
{corners:!0,shadow:!0,iconshadow:!0,wrapperEls:"span"};var c=function(){a(document).bind({vmousedown:function(b){var b=d(b.target),c;b&&(b=a(b),c=b.attr("data-"+a.mobile.ns+"theme"),b.removeClass("ui-btn-up-"+c).addClass("ui-btn-down-"+c))},"vmousecancel vmouseup":function(b){var b=d(b.target),c;b&&(b=a(b),c=b.attr("data-"+a.mobile.ns+"theme"),b.removeClass("ui-btn-down-"+c).addClass("ui-btn-up-"+c))},"vmouseover focus":function(b){var b=d(b.target),c;b&&(b=a(b),c=b.attr("data-"+a.mobile.ns+"theme"),
b.removeClass("ui-btn-up-"+c).addClass("ui-btn-hover-"+c))},"vmouseout blur":function(b){var b=d(b.target),c;b&&(b=a(b),c=b.attr("data-"+a.mobile.ns+"theme"),b.removeClass("ui-btn-hover-"+c).addClass("ui-btn-up-"+c))}});c=null};a(document).bind("pagecreate create",function(b){a(":jqmData(role='button'), .ui-bar > a, .ui-header > a, .ui-footer > a, .ui-bar > :jqmData(role='controlgroup') > a",b.target).not(".ui-btn, :jqmData(role='none'), :jqmData(role='nojs')").buttonMarkup()})})(jQuery);
(function(a){a.fn.controlgroup=function(d){return this.each(function(){function c(a){a.removeClass("ui-btn-corner-all ui-shadow").eq(0).addClass(g[0]).end().filter(":last").addClass(g[1]).addClass("ui-controlgroup-last")}var b=a(this),f=a.extend({direction:b.jqmData("type")||"vertical",shadow:!1,excludeInvisible:!0},d),e=b.find(">legend"),g=f.direction=="horizontal"?["ui-corner-left","ui-corner-right"]:["ui-corner-top","ui-corner-bottom"];b.find("input:eq(0)").attr("type");e.length&&(b.wrapInner("<div class='ui-controlgroup-controls'></div>"),
a("<div role='heading' class='ui-controlgroup-label'>"+e.html()+"</div>").insertBefore(b.children(0)),e.remove());b.addClass("ui-corner-all ui-controlgroup ui-controlgroup-"+f.direction);c(b.find(".ui-btn"+(f.excludeInvisible?":visible":"")));c(b.find(".ui-btn-inner"));f.shadow&&b.addClass("ui-shadow")})};a(document).bind("pagecreate create",function(d){a(":jqmData(role='controlgroup')",d.target).controlgroup({excludeInvisible:!1})})})(jQuery);(function(a){a(document).bind("pagecreate create",function(d){a(d.target).find("a").not(".ui-btn, .ui-link-inherit, :jqmData(role='none'), :jqmData(role='nojs')").addClass("ui-link")})})(jQuery);
(function(a,d){a.fn.fixHeaderFooter=function(){if(!a.support.scrollTop)return this;return this.each(function(){var c=a(this);c.jqmData("fullscreen")&&c.addClass("ui-page-fullscreen");c.find(".ui-header:jqmData(position='fixed')").addClass("ui-header-fixed ui-fixed-inline fade");c.find(".ui-footer:jqmData(position='fixed')").addClass("ui-footer-fixed ui-fixed-inline fade")})};a.mobile.fixedToolbars=function(){function c(){!i&&h==="overlay"&&(g||a.mobile.fixedToolbars.hide(!0),a.mobile.fixedToolbars.startShowTimer())}
function b(a){var b=0,c,d;if(a){d=document.body;c=a.offsetParent;for(b=a.offsetTop;a&&a!=d;){b+=a.scrollTop||0;if(a==c)b+=c.offsetTop,c=a.offsetParent;a=a.parentNode}}return b}function f(c){var d=a(window).scrollTop(),e=b(c[0]),f=c.css("top")=="auto"?0:parseFloat(c.css("top")),g=window.innerHeight,h=c.outerHeight(),i=c.parents(".ui-page:not(.ui-page-fullscreen)").length;return c.is(".ui-header-fixed")?(f=d-e+f,f<e&&(f=0),c.css("top",i?f:d)):c.css("top",i?d+g-h-(e-f):d+g-h)}if(a.support.scrollTop){var e,
g,h="inline",i=!1,k=null,l=!1,m=!0;a(function(){var b=a(document),d=a(window);b.bind("vmousedown",function(){m&&(k=h)}).bind("vclick",function(b){m&&!a(b.target).closest("a,input,textarea,select,button,label,.ui-header-fixed,.ui-footer-fixed").length&&!l&&(a.mobile.fixedToolbars.toggle(k),k=null)}).bind("silentscroll",c);(b.scrollTop()===0?d:b).bind("scrollstart",function(){l=!0;k===null&&(k=h);var b=k=="overlay";if(i=b||!!g)a.mobile.fixedToolbars.clearShowTimer(),b&&a.mobile.fixedToolbars.hide(!0)}).bind("scrollstop",
function(b){a(b.target).closest("a,input,textarea,select,button,label,.ui-header-fixed,.ui-footer-fixed").length||(l=!1,i&&(a.mobile.fixedToolbars.startShowTimer(),i=!1),k=null)});d.bind("resize",c)});a(".ui-page").live("pagebeforeshow",function(b,c){var d=a(b.target).find(":jqmData(role='footer')"),g=d.data("id"),h=c.prevPage,h=h&&h.find(":jqmData(role='footer')"),h=h.length&&h.jqmData("id")===g;g&&h&&(e=d,f(e.removeClass("fade in out").appendTo(a.mobile.pageContainer)))}).live("pageshow",function(){var b=
a(this);e&&e.length&&setTimeout(function(){f(e.appendTo(b).addClass("fade"));e=null},500);a.mobile.fixedToolbars.show(!0,this)});a(".ui-collapsible-contain").live("collapse expand",c);return{show:function(c,d){a.mobile.fixedToolbars.clearShowTimer();h="overlay";return(d?a(d):a.mobile.activePage?a.mobile.activePage:a(".ui-page-active")).children(".ui-header-fixed:first, .ui-footer-fixed:not(.ui-footer-duplicate):last").each(function(){var d=a(this),e=a(window).scrollTop(),g=b(d[0]),h=window.innerHeight,
i=d.outerHeight(),e=d.is(".ui-header-fixed")&&e<=g+i||d.is(".ui-footer-fixed")&&g<=e+h;d.addClass("ui-fixed-overlay").removeClass("ui-fixed-inline");!e&&!c&&d.animationComplete(function(){d.removeClass("in")}).addClass("in");f(d)})},hide:function(b){h="inline";return(a.mobile.activePage?a.mobile.activePage:a(".ui-page-active")).children(".ui-header-fixed:first, .ui-footer-fixed:not(.ui-footer-duplicate):last").each(function(){var c=a(this),d=c.css("top"),d=d=="auto"?0:parseFloat(d);c.addClass("ui-fixed-inline").removeClass("ui-fixed-overlay");
if(d<0||c.is(".ui-header-fixed")&&d!==0)b?c.css("top",0):c.css("top")!=="auto"&&parseFloat(c.css("top"))!==0&&c.animationComplete(function(){c.removeClass("out reverse").css("top",0)}).addClass("out reverse")})},startShowTimer:function(){a.mobile.fixedToolbars.clearShowTimer();var b=[].slice.call(arguments);g=setTimeout(function(){g=d;a.mobile.fixedToolbars.show.apply(null,b)},100)},clearShowTimer:function(){g&&clearTimeout(g);g=d},toggle:function(b){b&&(h=b);return h==="overlay"?a.mobile.fixedToolbars.hide():
a.mobile.fixedToolbars.show()},setTouchToggleEnabled:function(a){m=a}}}}();a.fixedToolbars=a.mobile.fixedToolbars;a(document).bind("pagecreate create",function(c){a(":jqmData(position='fixed')",c.target).length&&a(c.target).each(function(){if(!a.support.scrollTop)return this;var b=a(this);b.jqmData("fullscreen")&&b.addClass("ui-page-fullscreen");b.find(".ui-header:jqmData(position='fixed')").addClass("ui-header-fixed ui-fixed-inline fade");b.find(".ui-footer:jqmData(position='fixed')").addClass("ui-footer-fixed ui-fixed-inline fade")})})})(jQuery);
(function(a){function d(){var d=c.width(),g=[],h=[],i;b.removeClass("min-width-"+f.join("px min-width-")+"px max-width-"+f.join("px max-width-")+"px");a.each(f,function(a,b){d>=b&&g.push("min-width-"+b+"px");d<=b&&h.push("max-width-"+b+"px")});g.length&&(i=g.join(" "));h.length&&(i+=" "+h.join(" "));b.addClass(i)}var c=a(window),b=a("html"),f=[320,480,768,1024];a.mobile.addResolutionBreakpoints=function(b){a.type(b)==="array"?f=f.concat(b):f.push(b);f.sort(function(a,b){return a-b});d()};a(document).bind("mobileinit.htmlclass",
function(){c.bind("orientationchange.htmlclass throttledResize.htmlclass",function(a){a.orientation&&b.removeClass("portrait landscape").addClass(a.orientation);d()})});a(function(){c.trigger("orientationchange.htmlclass")})})(jQuery);
(function(a,d){var c=a("html");a("head");var b=a(d);a(d.document).trigger("mobileinit");if(a.mobile.gradeA()){if(a.mobile.ajaxBlacklist)a.mobile.ajaxEnabled=!1;c.addClass("ui-mobile ui-mobile-rendering");var f=a("<div class='ui-loader ui-body-a ui-corner-all'><span class='ui-icon ui-icon-loading spin'></span><h1></h1></div>");a.extend(a.mobile,{showPageLoadingMsg:function(){if(a.mobile.loadingMessage){var b=a("."+a.mobile.activeBtnClass).first();f.find("h1").text(a.mobile.loadingMessage).end().appendTo(a.mobile.pageContainer).css({top:a.support.scrollTop&&
a(d).scrollTop()+a(d).height()/2||b.length&&b.offset().top||100})}c.addClass("ui-loading")},hidePageLoadingMsg:function(){c.removeClass("ui-loading")},pageLoading:function(b){b?a.mobile.hidePageLoadingMsg():a.mobile.showPageLoadingMsg()},initializePage:function(){var c=a(":jqmData(role='page')");c.length||(c=a("body").wrapInner("<div data-"+a.mobile.ns+"role='page'></div>").children(0));c.add(":jqmData(role='dialog')").each(function(){var b=a(this);b.jqmData("url")||b.attr("data-"+a.mobile.ns+"url",
b.attr("id"))});a.mobile.firstPage=c.first();a.mobile.pageContainer=c.first().parent().addClass("ui-mobile-viewport");a.mobile.showPageLoadingMsg();!a.mobile.hashListeningEnabled||!a.mobile.path.stripHash(location.hash)?a.mobile.changePage(a.mobile.firstPage,{transition:"none",reverse:!0,changeHash:!1,fromHashChange:!0}):b.trigger("hashchange",[!0])}});a.mobile._registerInternalEvents();a(function(){d.scrollTo(0,1);a.mobile.defaultHomeScroll=!a.support.scrollTop||a(d).scrollTop()===1?0:1;a.mobile.autoInitializePage&&
a(a.mobile.initializePage);b.load(a.mobile.silentScroll)})}})(jQuery,this);

View file

@ -1,69 +0,0 @@
//= require jquery.iframe-transport.js
//= require_self
(function($) {
var remotipart;
$.remotipart = remotipart = {
setup: function(form) {
form
// Allow setup part of $.rails.handleRemote to setup remote settings before canceling default remote handler
// This is required in order to change the remote settings using the form details
.one('ajax:beforeSend.remotipart', function(e, xhr, settings){
// Delete the beforeSend bindings, since we're about to re-submit via ajaxSubmit with the beforeSubmit
// hook that was just setup and triggered via the default `$.rails.handleRemote`
// delete settings.beforeSend;
delete settings.beforeSend;
settings.iframe = true;
settings.files = $($.rails.fileInputSelector, form);
settings.data = form.serializeArray();
settings.processData = false;
// Modify some settings to integrate JS request with rails helpers and middleware
if (settings.dataType === undefined) { settings.dataType = 'script *'; }
settings.data.push({name: 'remotipart_submitted', value: true});
// Allow remotipartSubmit to be cancelled if needed
if ($.rails.fire(form, 'ajax:remotipartSubmit', [xhr, settings])) {
// Second verse, same as the first
$.rails.ajax(settings);
}
//Run cleanup
remotipart.teardown(form);
// Cancel the jQuery UJS request
return false;
})
// Keep track that we just set this particular form with Remotipart bindings
// Note: The `true` value will get over-written with the `settings.dataType` from the `ajax:beforeSend` handler
.data('remotipartSubmitted', true);
},
teardown: function(form) {
form
.unbind('ajax:beforeSend.remotipart')
.removeData('remotipartSubmitted')
}
};
$('form').live('ajax:aborted:file', function(){
var form = $(this);
remotipart.setup(form);
// If browser does not support submit bubbling, then this live-binding will be called before direct
// bindings. Therefore, we should directly call any direct bindings before remotely submitting form.
if (!$.support.submitBubbles && $().jquery < '1.7' && $.rails.callFormSubmitBindings(form) === false) return $.rails.stopEverything(e);
// Manually call jquery-ujs remote call so that it can setup form and settings as usual,
// and trigger the `ajax:beforeSend` callback to which remotipart binds functionality.
$.rails.handleRemote(form);
return false;
});
})(jQuery);

View file

@ -1,202 +0,0 @@
// tipsy, facebook style tooltips for jquery
// version 1.0.0a
// (c) 2008-2010 jason frame [jason@onehackoranother.com]
// released under the MIT license
(function($) {
function Tipsy(element, options) {
this.$element = $(element);
this.options = options;
this.enabled = true;
this.fixTitle();
}
Tipsy.prototype = {
show: function() {
var title = this.getTitle();
if (title && this.enabled) {
var $tip = this.tip();
$tip.find('.tipsy-inner')[this.options.html ? 'html' : 'text'](title);
$tip[0].className = 'tipsy'; // reset classname in case of dynamic gravity
$tip.remove().css({top: 0, left: 0, visibility: 'hidden', display: 'block'}).appendTo(document.body);
var pos = $.extend({}, this.$element.offset(), {
width: this.$element[0].offsetWidth,
height: this.$element[0].offsetHeight
});
var actualWidth = $tip[0].offsetWidth, actualHeight = $tip[0].offsetHeight;
var gravity = (typeof this.options.gravity == 'function')
? this.options.gravity.call(this.$element[0])
: this.options.gravity;
var tp;
switch (gravity.charAt(0)) {
case 'n':
tp = {top: pos.top + pos.height + this.options.offset, left: pos.left + pos.width / 2 - actualWidth / 2};
break;
case 's':
tp = {top: pos.top - actualHeight - this.options.offset, left: pos.left + pos.width / 2 - actualWidth / 2};
break;
case 'e':
tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth - this.options.offset};
break;
case 'w':
tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width + this.options.offset};
break;
}
if (gravity.length == 2) {
if (gravity.charAt(1) == 'w') {
tp.left = pos.left + pos.width / 2 - 15;
} else {
tp.left = pos.left + pos.width / 2 - actualWidth + 15;
}
}
$tip.css(tp).addClass('tipsy-' + gravity);
if (this.options.fade) {
$tip.stop().css({opacity: 0, display: 'block', visibility: 'visible'}).animate({opacity: this.options.opacity});
} else {
$tip.css({visibility: 'visible', opacity: this.options.opacity});
}
}
},
hide: function() {
if (this.options.fade) {
this.tip().stop().fadeOut(function() { $(this).remove(); });
} else {
this.tip().remove();
}
},
fixTitle: function() {
var $e = this.$element;
if ($e.attr('title') || typeof($e.attr('original-title')) != 'string') {
$e.attr('original-title', $e.attr('title') || '').removeAttr('title');
}
},
getTitle: function() {
var title, $e = this.$element, o = this.options;
this.fixTitle();
var title, o = this.options;
if (typeof o.title == 'string') {
title = $e.attr(o.title == 'title' ? 'original-title' : o.title);
} else if (typeof o.title == 'function') {
title = o.title.call($e[0]);
}
title = ('' + title).replace(/(^\s*|\s*$)/, "");
return title || o.fallback;
},
tip: function() {
if (!this.$tip) {
this.$tip = $('<div class="tipsy"></div>').html('<div class="tipsy-arrow"></div><div class="tipsy-inner"></div>');
}
return this.$tip;
},
validate: function() {
if (!this.$element[0].parentNode) {
this.hide();
this.$element = null;
this.options = null;
}
},
enable: function() { this.enabled = true; },
disable: function() { this.enabled = false; },
toggleEnabled: function() { this.enabled = !this.enabled; }
};
$.fn.tipsy = function(options) {
if (options === true) {
return this.data('tipsy');
} else if (typeof options == 'string') {
var tipsy = this.data('tipsy');
if (tipsy) tipsy[options]();
return this;
}
options = $.extend({}, $.fn.tipsy.defaults, options);
function get(ele) {
var tipsy = $.data(ele, 'tipsy');
if (!tipsy) {
tipsy = new Tipsy(ele, $.fn.tipsy.elementOptions(ele, options));
$.data(ele, 'tipsy', tipsy);
}
return tipsy;
}
function enter() {
var tipsy = get(this);
tipsy.hoverState = 'in';
if (options.delayIn == 0) {
tipsy.show();
} else {
tipsy.fixTitle();
setTimeout(function() { if (tipsy.hoverState == 'in') tipsy.show(); }, options.delayIn);
}
};
function leave() {
var tipsy = get(this);
tipsy.hoverState = 'out';
if (options.delayOut == 0) {
tipsy.hide();
} else {
setTimeout(function() { if (tipsy.hoverState == 'out') tipsy.hide(); }, options.delayOut);
}
};
if (!options.live) this.each(function() { get(this); });
if (options.trigger != 'manual') {
var binder = options.live ? 'live' : 'bind',
eventIn = options.trigger == 'hover' ? 'mouseenter' : 'focus',
eventOut = options.trigger == 'hover' ? 'mouseleave' : 'blur';
this[binder](eventIn, enter)[binder](eventOut, leave);
}
return this;
};
$.fn.tipsy.defaults = {
delayIn: 0,
delayOut: 0,
fade: false,
fallback: '',
gravity: 'n',
html: false,
live: false,
offset: 0,
opacity: 0.8,
title: 'title',
trigger: 'hover'
};
// Overwrite this method to provide options on a per-element basis.
// For example, you could store the gravity in a 'tipsy-gravity' attribute:
// return $.extend({}, options, {gravity: $(ele).attr('tipsy-gravity') || 'n' });
// (remember - do not modify 'options' in place!)
$.fn.tipsy.elementOptions = function(ele, options) {
return $.metadata ? $.extend({}, options, $(ele).metadata()) : options;
};
$.fn.tipsy.autoNS = function() {
return $(this).offset().top > ($(document).scrollTop() + $(window).height() / 2) ? 's' : 'n';
};
$.fn.tipsy.autoWE = function() {
return $(this).offset().left > ($(document).scrollLeft() + $(window).width() / 2) ? 'e' : 'w';
};
})(jQuery);

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

View file

@ -1,7 +0,0 @@
/*
* respond.js - A small and fast polyfill for min/max-width CSS3 Media Queries
* Copyright 2011, Scott Jehl, scottjehl.com
* Dual licensed under the MIT or GPL Version 2 licenses.
* Usage: Check out the readme file or github.com/scottjehl/respond
*/
(function(e,h){e.respond={};respond.update=function(){};respond.mediaQueriesSupported=h;if(h){return}var u=e.document,r=u.documentElement,i=[],k=[],p=[],o={},g=30,f=u.getElementsByTagName("head")[0]||r,b=f.getElementsByTagName("link"),d=[],a=function(){var B=b,w=B.length;for(var z=0;z<w;z++){var y=B[z],x=y.href,A=y.media,v=y.rel&&y.rel.toLowerCase()==="stylesheet";if(!!x&&v&&!o[x]){if(!/^([a-zA-Z]+?:(\/\/)?(www\.)?)/.test(x)||x.replace(RegExp.$1,"").split("/")[0]===e.location.host){d.push({href:x,media:A})}else{o[x]=true}}}t()},t=function(){if(d.length){var v=d.shift();n(v.href,function(w){m(w,v.href,v.media);o[v.href]=true;t()})}},m=function(G,v,x){var E=G.match(/@media ([^\{]+)\{([\S\s]+?)(?=\}[\s]*\/\*\/mediaquery\*\/)/gmi),H=E&&E.length||0,v=v.substring(0,v.lastIndexOf("/")),w=function(I){return I.replace(/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,"$1"+v+"$2$3")},y=!H&&x;if(v.length){v+="/"}if(y){H=1}for(var B=0;B<H;B++){var C;if(y){C=x;k.push(w(G))}else{C=E[B].match(/@media ([^\{]+)\{([\S\s]+?)$/)&&RegExp.$1;k.push(RegExp.$2&&w(RegExp.$2))}var z=C.split(","),F=z.length;for(var A=0;A<F;A++){var D=z[A];i.push({media:D.match(/(only\s+)?([a-zA-Z]+)(\sand)?/)&&RegExp.$2,rules:k.length-1,minw:D.match(/\(min\-width:[\s]*([\s]*[0-9]+)px[\s]*\)/)&&parseFloat(RegExp.$1),maxw:D.match(/\(max\-width:[\s]*([\s]*[0-9]+)px[\s]*\)/)&&parseFloat(RegExp.$1)})}}j()},l,q,j=function(E){var v="clientWidth",x=r[v],D=u.compatMode==="CSS1Compat"&&x||u.body[v]||x,z={},C=u.createDocumentFragment(),B=b[b.length-1],w=(new Date()).getTime();if(E&&l&&w-l<g){clearTimeout(q);q=setTimeout(j,g);return}else{l=w}for(var y in i){var F=i[y];if(!F.minw&&!F.maxw||(!F.minw||F.minw&&D>=F.minw)&&(!F.maxw||F.maxw&&D<=F.maxw)){if(!z[F.media]){z[F.media]=[]}z[F.media].push(k[F.rules])}}for(var y in p){if(p[y]&&p[y].parentNode===f){f.removeChild(p[y])}}for(var y in z){var G=u.createElement("style"),A=z[y].join("\n");G.type="text/css";G.media=y;if(G.styleSheet){G.styleSheet.cssText=A}else{G.appendChild(u.createTextNode(A))}C.appendChild(G);p.push(G)}f.insertBefore(C,B.nextSibling)},n=function(v,x){var w=c();if(!w){return}w.open("GET",v,true);w.onreadystatechange=function(){if(w.readyState!=4||w.status!=200&&w.status!=304){return}x(w.responseText)};if(w.readyState==4){return}w.send()},c=(function(){var v=false,w=[function(){return new ActiveXObject("Microsoft.XMLHTTP")},function(){return new ActiveXObject("Msxml3.XMLHTTP")},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new XMLHttpRequest()}],y=w.length;while(y--){try{v=w[y]()}catch(x){continue}break}return function(){return v}})();a();respond.update=a;function s(){j(true)}if(e.addEventListener){e.addEventListener("resize",s,false)}else{if(e.attachEvent){e.attachEvent("onresize",s)}}})(this,(function(f){if(f.matchMedia){return true}var e,i=document,c=i.documentElement,g=c.firstElementChild||c.firstChild,h=!i.body,d=i.body||i.createElement("body"),b=i.createElement("div"),a="only all";b.id="mq-test-1";b.style.cssText="position:absolute;top:-99em";d.appendChild(b);b.innerHTML='_<style media="'+a+'"> #mq-test-1 { width: 9px; }</style>';if(h){c.insertBefore(d,g)}b.removeChild(b.firstChild);e=b.offsetWidth==9;if(h){c.removeChild(d)}else{d.removeChild(b)}return e})(this));

View file

@ -1,512 +0,0 @@
/*! http://mths.be/punycode by @mathias */
;(function(root) {
/**
* The `punycode` object.
* @name punycode
* @type Object
*/
var punycode,
/** Detect free variables `define`, `exports`, `module` and `require` */
freeDefine = typeof define == 'function' && typeof define.amd == 'object' &&
define.amd && define,
freeExports = typeof exports == 'object' && exports,
freeModule = typeof module == 'object' && module,
freeRequire = typeof require == 'function' && require,
/** Highest positive signed 32-bit float value */
maxInt = 2147483647, // aka. 0x7FFFFFFF or 2^31-1
/** Bootstring parameters */
base = 36,
tMin = 1,
tMax = 26,
skew = 38,
damp = 700,
initialBias = 72,
initialN = 128, // 0x80
delimiter = '-', // '\x2D'
/** Regular expressions */
regexNonASCII = /[^ -~]/, // unprintable ASCII chars + non-ASCII chars
regexPunycode = /^xn--/,
/** Error messages */
errors = {
'overflow': 'Overflow: input needs wider integers to process.',
'ucs2decode': 'UCS-2(decode): illegal sequence',
'ucs2encode': 'UCS-2(encode): illegal value',
'not-basic': 'Illegal input >= 0x80 (not a basic code point)',
'invalid-input': 'Invalid input'
},
/** Convenience shortcuts */
baseMinusTMin = base - tMin,
floor = Math.floor,
stringFromCharCode = String.fromCharCode,
/** Temporary variable */
key;
/*--------------------------------------------------------------------------*/
/**
* A generic error utility function.
* @private
* @param {String} type The error type.
* @returns {Error} Throws a `RangeError` with the applicable error message.
*/
function error(type) {
throw RangeError(errors[type]);
}
/**
* A generic `Array#map` utility function.
* @private
* @param {Array} array The array to iterate over.
* @param {Function} callback The function that gets called for every array
* item.
* @returns {Array} A new array of values returned by the callback function.
*/
function map(array, fn) {
var length = array.length;
while (length--) {
array[length] = fn(array[length]);
}
return array;
}
/**
* A simple `Array#map`-like wrapper to work with domain name strings.
* @private
* @param {String} domain The domain name.
* @param {Function} callback The function that gets called for every
* character.
* @returns {Array} A new string of characters returned by the callback
* function.
*/
function mapDomain(string, fn) {
var glue = '.';
return map(string.split(glue), fn).join(glue);
}
/**
* Creates an array containing the decimal code points of each Unicode
* character in the string. While JavaScript uses UCS-2 internally,
* this function will convert a pair of surrogate halves (each of which
* UCS-2 exposes as separate characters) into a single code point,
* matching UTF-16.
* @see `punycode.ucs2.encode`
* @see <http://mathiasbynens.be/notes/javascript-encoding>
* @memberOf punycode.ucs2
* @name decode
* @param {String} string The Unicode input string (UCS-2).
* @returns {Array} The new array of code points.
*/
function ucs2decode(string) {
var output = [],
counter = 0,
length = string.length,
value,
extra;
while (counter < length) {
value = string.charCodeAt(counter++);
if ((value & 0xF800) == 0xD800) {
extra = string.charCodeAt(counter++);
if ((value & 0xFC00) != 0xD800 || (extra & 0xFC00) != 0xDC00) {
error('ucs2decode');
}
value = ((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000;
}
output.push(value);
}
return output;
}
/**
* Creates a string based on an array of decimal code points.
* @see `punycode.ucs2.decode`
* @memberOf punycode.ucs2
* @name encode
* @param {Array} codePoints The array of decimal code points.
* @returns {String} The new Unicode string (UCS-2).
*/
function ucs2encode(array) {
return map(array, function(value) {
var output = '';
if ((value & 0xF800) == 0xD800) {
error('ucs2encode');
}
if (value > 0xFFFF) {
value -= 0x10000;
output += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800);
value = 0xDC00 | value & 0x3FF;
}
output += stringFromCharCode(value);
return output;
}).join('');
}
/**
* Converts a basic code point into a digit/integer.
* @see `digitToBasic()`
* @private
* @param {Number} codePoint The basic (decimal) code point.
* @returns {Number} The numeric value of a basic code point (for use in
* representing integers) in the range `0` to `base - 1`, or `base` if
* the code point does not represent a value.
*/
function basicToDigit(codePoint) {
return codePoint - 48 < 10
? codePoint - 22
: codePoint - 65 < 26
? codePoint - 65
: codePoint - 97 < 26
? codePoint - 97
: base;
}
/**
* Converts a digit/integer into a basic code point.
* @see `basicToDigit()`
* @private
* @param {Number} digit The numeric value of a basic code point.
* @returns {Number} The basic code point whose value (when used for
* representing integers) is `digit`, which needs to be in the range
* `0` to `base - 1`. If `flag` is non-zero, the uppercase form is
* used; else, the lowercase form is used. The behavior is undefined
* if flag is non-zero and `digit` has no uppercase form.
*/
function digitToBasic(digit, flag) {
// 0..25 map to ASCII a..z or A..Z
// 26..35 map to ASCII 0..9
return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);
}
/**
* Bias adaptation function as per section 3.4 of RFC 3492.
* http://tools.ietf.org/html/rfc3492#section-3.4
* @private
*/
function adapt(delta, numPoints, firstTime) {
var k = 0;
delta = firstTime ? floor(delta / damp) : delta >> 1;
delta += floor(delta / numPoints);
for (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {
delta = floor(delta / baseMinusTMin);
}
return floor(k + (baseMinusTMin + 1) * delta / (delta + skew));
}
/**
* Converts a basic code point to lowercase is `flag` is falsy, or to
* uppercase if `flag` is truthy. The code point is unchanged if it's
* caseless. The behavior is undefined if `codePoint` is not a basic code
* point.
* @private
* @param {Number} codePoint The numeric value of a basic code point.
* @returns {Number} The resulting basic code point.
*/
function encodeBasic(codePoint, flag) {
codePoint -= (codePoint - 97 < 26) << 5;
return codePoint + (!flag && codePoint - 65 < 26) << 5;
}
/**
* Converts a Punycode string of ASCII code points to a string of Unicode
* code points.
* @memberOf punycode
* @param {String} input The Punycode string of ASCII code points.
* @returns {String} The resulting string of Unicode code points.
*/
function decode(input) {
// Don't use UCS-2
var output = [],
inputLength = input.length,
out,
i = 0,
n = initialN,
bias = initialBias,
basic,
j,
index,
oldi,
w,
k,
digit,
t,
length,
/** Cached calculation results */
baseMinusT;
// Handle the basic code points: let `basic` be the number of input code
// points before the last delimiter, or `0` if there is none, then copy
// the first basic code points to the output.
basic = input.lastIndexOf(delimiter);
if (basic < 0) {
basic = 0;
}
for (j = 0; j < basic; ++j) {
// if it's not a basic code point
if (input.charCodeAt(j) >= 0x80) {
error('not-basic');
}
output.push(input.charCodeAt(j));
}
// Main decoding loop: start just after the last delimiter if any basic code
// points were copied; start at the beginning otherwise.
for (index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {
// `index` is the index of the next character to be consumed.
// Decode a generalized variable-length integer into `delta`,
// which gets added to `i`. The overflow checking is easier
// if we increase `i` as we go, then subtract off its starting
// value at the end to obtain `delta`.
for (oldi = i, w = 1, k = base; /* no condition */; k += base) {
if (index >= inputLength) {
error('invalid-input');
}
digit = basicToDigit(input.charCodeAt(index++));
if (digit >= base || digit > floor((maxInt - i) / w)) {
error('overflow');
}
i += digit * w;
t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);
if (digit < t) {
break;
}
baseMinusT = base - t;
if (w > floor(maxInt / baseMinusT)) {
error('overflow');
}
w *= baseMinusT;
}
out = output.length + 1;
bias = adapt(i - oldi, out, oldi == 0);
// `i` was supposed to wrap around from `out` to `0`,
// incrementing `n` each time, so we'll fix that now:
if (floor(i / out) > maxInt - n) {
error('overflow');
}
n += floor(i / out);
i %= out;
// Insert `n` at position `i` of the output
output.splice(i++, 0, n);
}
return ucs2encode(output);
}
/**
* Converts a string of Unicode code points to a Punycode string of ASCII
* code points.
* @memberOf punycode
* @param {String} input The string of Unicode code points.
* @returns {String} The resulting Punycode string of ASCII code points.
*/
function encode(input) {
var n,
delta,
handledCPCount,
basicLength,
bias,
j,
m,
q,
k,
t,
currentValue,
output = [],
/** `inputLength` will hold the number of code points in `input`. */
inputLength,
/** Cached calculation results */
handledCPCountPlusOne,
baseMinusT,
qMinusT;
// Convert the input in UCS-2 to Unicode
input = ucs2decode(input);
// Cache the length
inputLength = input.length;
// Initialize the state
n = initialN;
delta = 0;
bias = initialBias;
// Handle the basic code points
for (j = 0; j < inputLength; ++j) {
currentValue = input[j];
if (currentValue < 0x80) {
output.push(stringFromCharCode(currentValue));
}
}
handledCPCount = basicLength = output.length;
// `handledCPCount` is the number of code points that have been handled;
// `basicLength` is the number of basic code points.
// Finish the basic string - if it is not empty - with a delimiter
if (basicLength) {
output.push(delimiter);
}
// Main encoding loop:
while (handledCPCount < inputLength) {
// All non-basic code points < n have been handled already. Find the next
// larger one:
for (m = maxInt, j = 0; j < inputLength; ++j) {
currentValue = input[j];
if (currentValue >= n && currentValue < m) {
m = currentValue;
}
}
// Increase `delta` enough to advance the decoder's <n,i> state to <m,0>,
// but guard against overflow
handledCPCountPlusOne = handledCPCount + 1;
if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {
error('overflow');
}
delta += (m - n) * handledCPCountPlusOne;
n = m;
for (j = 0; j < inputLength; ++j) {
currentValue = input[j];
if (currentValue < n && ++delta > maxInt) {
error('overflow');
}
if (currentValue == n) {
// Represent delta as a generalized variable-length integer
for (q = delta, k = base; /* no condition */; k += base) {
t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);
if (q < t) {
break;
}
qMinusT = q - t;
baseMinusT = base - t;
output.push(
stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))
);
q = floor(qMinusT / baseMinusT);
}
output.push(stringFromCharCode(digitToBasic(q, 0)));
bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);
delta = 0;
++handledCPCount;
}
}
++delta;
++n;
}
return output.join('');
}
/**
* Converts a Punycode string representing a domain name to Unicode. Only the
* Punycoded parts of the domain name will be converted, i.e. it doesn't
* matter if you call it on a string that has already been converted to
* Unicode.
* @memberOf punycode
* @param {String} domain The Punycode domain name to convert to Unicode.
* @returns {String} The Unicode representation of the given Punycode
* string.
*/
function toUnicode(domain) {
return mapDomain(domain, function(string) {
return regexPunycode.test(string)
? decode(string.slice(4).toLowerCase())
: string;
});
}
/**
* Converts a Unicode string representing a domain name to Punycode. Only the
* non-ASCII parts of the domain name will be converted, i.e. it doesn't
* matter if you call it with a domain that's already in ASCII.
* @memberOf punycode
* @param {String} domain The domain name to convert, as a Unicode string.
* @returns {String} The Punycode representation of the given domain name.
*/
function toASCII(domain) {
return mapDomain(domain, function(string) {
return regexNonASCII.test(string)
? 'xn--' + encode(string)
: string;
});
}
/*--------------------------------------------------------------------------*/
/** Define the public API */
punycode = {
/**
* A string representing the current Punycode.js version number.
* @memberOf punycode
* @type String
*/
'version': '1.0.0',
/**
* An object of methods to convert from JavaScript's internal character
* representation (UCS-2) to decimal Unicode code points, and back.
* @see <http://mathiasbynens.be/notes/javascript-encoding>
* @memberOf punycode
* @type Object
*/
'ucs2': {
'decode': ucs2decode,
'encode': ucs2encode
},
'decode': decode,
'encode': encode,
'toASCII': toASCII,
'toUnicode': toUnicode
};
/** Expose `punycode` */
if (freeExports) {
if (freeModule && freeModule.exports == freeExports) {
// in Node.js or Ringo 0.8+
freeModule.exports = punycode;
} else {
// in Narwhal or Ringo 0.7-
for (key in punycode) {
punycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]);
}
}
} else if (freeDefine) {
// via curl.js or RequireJS
define('punycode', punycode);
} else {
// in a browser or Rhino
root.punycode = punycode;
}
}(this));

View file

@ -3,7 +3,6 @@
# Return an array of filepaths relative to src_dir to include before jasmine specs.
# Default: []
#
# EXAMPLE:
#
# src_files:
# - lib/source1.js