(function(){"use strict";window.SwaggerUi=Backbone.Router.extend({dom_id:"swagger_ui",options:null,api:null,headerView:null,mainView:null,initialize:function(options){options=options||{};if(!options.highlightSizeThreshold){options.highlightSizeThreshold=1e5}if(options.dom_id){this.dom_id=options.dom_id;delete options.dom_id}if(!options.supportedSubmitMethods){options.supportedSubmitMethods=["get","put","post","delete","head","options","patch"]}if(typeof options.oauth2RedirectUrl==="string"){window.oAuthRedirectUrl=options.redirectUrl}if(!$("#"+this.dom_id).length){$("body").append('
')}this.options=options;marked.setOptions({gfm:true});var that=this;this.options.success=function(){return that.render()};this.options.progress=function(d){return that.showMessage(d)};this.options.failure=function(d){return that.onLoadFailure(d)};this.headerView=new SwaggerUi.Views.HeaderView({el:$("#header")});this.headerView.on("update-swagger-ui",function(data){return that.updateSwaggerUi(data)})},setOption:function(option,value){this.options[option]=value},getOption:function(option){return this.options[option]},updateSwaggerUi:function(data){this.options.url=data.url;this.load()},load:function(){if(this.mainView){this.mainView.clear()}var url=this.options.url;if(url&&url.indexOf("http")!==0){url=this.buildUrl(window.location.href.toString(),url)}if(this.api){this.options.authorizations=this.api.clientAuthorizations.authz}this.options.url=url;this.headerView.update(url);this.api=new SwaggerClient(this.options)},collapseAll:function(){Docs.collapseEndpointListForResource("")},listAll:function(){Docs.collapseOperationsForResource("")},expandAll:function(){Docs.expandOperationsForResource("")},render:function(){this.showMessage("Finished Loading Resource Information. Rendering Swagger UI...");this.mainView=new SwaggerUi.Views.MainView({model:this.api,el:$("#"+this.dom_id),swaggerOptions:this.options,router:this}).render();this.showMessage();switch(this.options.docExpansion){case"full":this.expandAll();break;case"list":this.listAll();break;default:break}this.renderGFM();if(this.options.onComplete){this.options.onComplete(this.api,this)}setTimeout(Docs.shebang.bind(this),100)},buildUrl:function(base,url){if(url.indexOf("/")===0){var parts=base.split("/");base=parts[0]+"//"+parts[2];return base+url}else{var endOfPath=base.length;if(base.indexOf("?")>-1){endOfPath=Math.min(endOfPath,base.indexOf("?"))}if(base.indexOf("#")>-1){endOfPath=Math.min(endOfPath,base.indexOf("#"))}base=base.substring(0,endOfPath);if(base.indexOf("/",base.length-1)!==-1){return base+url}return base+"/"+url}},showMessage:function(data){if(data===undefined){data=""}var $msgbar=$("#message-bar");$msgbar.removeClass("message-fail");$msgbar.addClass("message-success");$msgbar.html(data);if(window.SwaggerTranslator){window.SwaggerTranslator.translate($msgbar)}},onLoadFailure:function(data){if(data===undefined){data=""}$("#message-bar").removeClass("message-success");$("#message-bar").addClass("message-fail");var val=$("#message-bar").text(data);if(this.options.onFailure){this.options.onFailure(data)}return val},renderGFM:function(){$(".markdown").each(function(){$(this).html(marked($(this).html()))});$(".propDesc",".model-signature .description").each(function(){$(this).html(marked($(this).html())).addClass("markdown")})}});window.SwaggerUi.Views={};(function(){window.authorizations={add:function(){warn("Using window.authorizations is deprecated. Please use SwaggerUi.api.clientAuthorizations.add().");if(typeof window.swaggerUi==="undefined"){throw new TypeError("window.swaggerUi is not defined")}if(window.swaggerUi instanceof SwaggerUi){window.swaggerUi.api.clientAuthorizations.add.apply(window.swaggerUi.api.clientAuthorizations,arguments)}}};window.ApiKeyAuthorization=function(){warn("window.ApiKeyAuthorization is deprecated. Please use SwaggerClient.ApiKeyAuthorization.");SwaggerClient.ApiKeyAuthorization.apply(window,arguments)};window.PasswordAuthorization=function(){warn("window.PasswordAuthorization is deprecated. Please use SwaggerClient.PasswordAuthorization.");SwaggerClient.PasswordAuthorization.apply(window,arguments)};function warn(message){if("console"in window&&typeof window.console.warn==="function"){console.warn(message)}}})();(function(root,factory){if(typeof define==="function"&&define.amd){define(["b"],function(b){return root.SwaggerUi=factory(b)})}else if(typeof exports==="object"){module.exports=factory(require("b"))}else{root.SwaggerUi=factory(root.b)}})(this,function(){return SwaggerUi});this["Handlebars"]=this["Handlebars"]||{};this["Handlebars"]["templates"]=this["Handlebars"]["templates"]||{};this["Handlebars"]["templates"]["apikey_button_view"]=Handlebars.template({compiler:[6,">= 2.0.0-beta.1"],main:function(depth0,helpers,partials,data){var helper,functionType="function",helperMissing=helpers.helperMissing,escapeExpression=this.escapeExpression;return"\n
\n
\n
\n \n \n
\n
\n"},useData:true});this["Handlebars"]["templates"]["basic_auth_button_view"]=Handlebars.template({compiler:[6,">= 2.0.0-beta.1"],main:function(depth0,helpers,partials,data){return'
\n
\n
\n
\n \n
\n \n \n
\n
\n\n'},useData:true});this["Handlebars"]["templates"]["content_type"]=Handlebars.template({1:function(depth0,helpers,partials,data){var stack1,buffer="";stack1=helpers.each.call(depth0,depth0!=null?depth0.produces:depth0,{name:"each",hash:{},fn:this.program(2,data),inverse:this.noop,data:data});if(stack1!=null){buffer+=stack1}return buffer},2:function(depth0,helpers,partials,data){var stack1,lambda=this.lambda,buffer=' \n"},4:function(depth0,helpers,partials,data){return' \n'},compiler:[6,">= 2.0.0-beta.1"],main:function(depth0,helpers,partials,data){var stack1,helper,functionType="function",helperMissing=helpers.helperMissing,escapeExpression=this.escapeExpression,buffer='\n\n"},useData:true});"use strict";$(function(){$.fn.vAlign=function(){return this.each(function(){var ah=$(this).height();var ph=$(this).parent().height();var mh=(ph-ah)/2;$(this).css("margin-top",mh)})};$.fn.stretchFormtasticInputWidthToParent=function(){return this.each(function(){var p_width=$(this).closest("form").innerWidth();var p_padding=parseInt($(this).closest("form").css("padding-left"),10)+parseInt($(this).closest("form").css("padding-right"),10);var this_padding=parseInt($(this).css("padding-left"),10)+parseInt($(this).css("padding-right"),10);$(this).css("width",p_width-p_padding-this_padding)})};$("form.formtastic li.string input, form.formtastic textarea").stretchFormtasticInputWidthToParent();$("ul.downplayed li div.content p").vAlign();$("form.sandbox").submit(function(){var error_free=true;$(this).find("input.required").each(function(){$(this).removeClass("error");if($(this).val()===""){$(this).addClass("error");$(this).wiggle();error_free=false}});return error_free})});function clippyCopiedCallback(){$("#api_key_copied").fadeIn().delay(1e3).fadeOut()}function log(){log.history=log.history||[];log.history.push(arguments);if(this.console){console.log(Array.prototype.slice.call(arguments)[0])}}if(Function.prototype.bind&&console&&typeof console.log==="object"){["log","info","warn","error","assert","dir","clear","profile","profileEnd"].forEach(function(method){console[method]=this.bind(console[method],console)},Function.prototype.call)}window.Docs={shebang:function(){var fragments=location.hash.substring(1).split("/");fragments.shift();switch(fragments.length){case 1:if(fragments[0].length>0){var dom_id="resource_"+fragments[0];Docs.expandEndpointListForResource(fragments[0])}break;case 2:Docs.expandEndpointListForResource(fragments[0]);var li_dom_id=fragments.join("_");var li_content_dom_id=li_dom_id+"_content";Docs.expandOperation($("#"+li_content_dom_id));break}},toggleEndpointListForResource:function(resource){var elem=$("li#resource_"+Docs.escapeResourceName(resource)+" ul.endpoints");if(elem.is(":visible")){Docs.collapseEndpointListForResource(resource)}else{Docs.expandEndpointListForResource(resource)}},expandEndpointListForResource:function(resource){var resource=Docs.escapeResourceName(resource);if(resource==""){$(".resource ul.endpoints").slideDown();return}$("li#resource_"+resource).addClass("active");var elem=$("li#resource_"+resource+" ul.endpoints");elem.slideDown()},collapseEndpointListForResource:function(resource){var resource=Docs.escapeResourceName(resource);if(resource==""){$(".resource ul.endpoints").slideUp();return}$("li#resource_"+resource).removeClass("active");var elem=$("li#resource_"+resource+" ul.endpoints");elem.slideUp()},expandOperationsForResource:function(resource){Docs.expandEndpointListForResource(resource);if(resource==""){$(".resource ul.endpoints li.operation div.content").slideDown();return}$("li#resource_"+Docs.escapeResourceName(resource)+" li.operation div.content").each(function(){Docs.expandOperation($(this))})},collapseOperationsForResource:function(resource){Docs.expandEndpointListForResource(resource);if(resource==""){$(".resource ul.endpoints li.operation div.content").slideUp();return}$("li#resource_"+Docs.escapeResourceName(resource)+" li.operation div.content").each(function(){Docs.collapseOperation($(this))})},escapeResourceName:function(resource){return resource.replace(/[!"#$%&'()*+,.\/:;<=>?@\[\\\]\^`{|}~]/g,"\\$&")},expandOperation:function(elem){elem.slideDown()},collapseOperation:function(elem){elem.slideUp()}};"use strict";Handlebars.registerHelper("sanitize",function(html){html=html.replace(/)<[^<]*)*<\/script>/gi,"");return new Handlebars.SafeString(html)});Handlebars.registerHelper("renderTextParam",function(param){var result,type="text",idAtt="";var isArray=param.type.toLowerCase()==="array"||param.allowMultiple;var defaultValue=isArray&&Array.isArray(param.default)?param.default.join("\n"):param.default;var dataVendorExtensions=Object.keys(param).filter(function(property){return property.match(/^X-data-/i)!==null}).reduce(function(result,property){return result+=" "+property.substring(2,property.length)+"='"+param[property]+"'"},"");if(typeof defaultValue==="undefined"){defaultValue=""}if(param.format&¶m.format==="password"){type="password"}if(param.valueId){idAtt=" id='"+param.valueId+"'"}if(isArray){result=""}else{var parameterClass="parameter";if(param.required){parameterClass+=" required"}result=""}return new Handlebars.SafeString(result)});this["Handlebars"]["templates"]["main"]=Handlebars.template({1:function(depth0,helpers,partials,data){var stack1,lambda=this.lambda,escapeExpression=this.escapeExpression,buffer='
'+escapeExpression(lambda((stack1=depth0!=null?depth0.info:depth0)!=null?stack1.title:stack1,depth0))+'
\n
';stack1=lambda((stack1=depth0!=null?depth0.info:depth0)!=null?stack1.description:stack1,depth0);if(stack1!=null){buffer+=stack1}buffer+="
\n";stack1=helpers["if"].call(depth0,depth0!=null?depth0.externalDocs:depth0,{name:"if",hash:{},fn:this.program(2,data),inverse:this.noop,data:data});if(stack1!=null){buffer+=stack1}buffer+=" ";stack1=helpers["if"].call(depth0,(stack1=depth0!=null?depth0.info:depth0)!=null?stack1.termsOfServiceUrl:stack1,{name:"if",hash:{},fn:this.program(4,data),inverse:this.noop,data:data});if(stack1!=null){buffer+=stack1}buffer+="\n ";stack1=helpers["if"].call(depth0,(stack1=(stack1=depth0!=null?depth0.info:depth0)!=null?stack1.contact:stack1)!=null?stack1.name:stack1,{name:"if",hash:{},fn:this.program(6,data),inverse:this.noop,data:data});if(stack1!=null){buffer+=stack1}buffer+="\n ";stack1=helpers["if"].call(depth0,(stack1=(stack1=depth0!=null?depth0.info:depth0)!=null?stack1.contact:stack1)!=null?stack1.url:stack1,{name:"if",hash:{},fn:this.program(8,data),inverse:this.noop,data:data});if(stack1!=null){buffer+=stack1}buffer+="\n ";stack1=helpers["if"].call(depth0,(stack1=(stack1=depth0!=null?depth0.info:depth0)!=null?stack1.contact:stack1)!=null?stack1.email:stack1,{name:"if",hash:{},fn:this.program(10,data),inverse:this.noop,data:data});if(stack1!=null){buffer+=stack1}buffer+="\n ";stack1=helpers["if"].call(depth0,(stack1=depth0!=null?depth0.info:depth0)!=null?stack1.license:stack1,{name:"if",hash:{},fn:this.program(12,data),inverse:this.noop,data:data});if(stack1!=null){buffer+=stack1}return buffer+"\n"},2:function(depth0,helpers,partials,data){var stack1,lambda=this.lambda,escapeExpression=this.escapeExpression;return"

"+escapeExpression(lambda((stack1=depth0!=null?depth0.externalDocs:depth0)!=null?stack1.description:stack1,depth0))+'

\n '+escapeExpression(lambda((stack1=depth0!=null?depth0.externalDocs:depth0)!=null?stack1.url:stack1,depth0))+"\n"},4:function(depth0,helpers,partials,data){var stack1,lambda=this.lambda,escapeExpression=this.escapeExpression;return'
Terms of service
'},6:function(depth0,helpers,partials,data){var stack1,lambda=this.lambda,escapeExpression=this.escapeExpression;return"
Created by "+escapeExpression(lambda((stack1=(stack1=depth0!=null?depth0.info:depth0)!=null?stack1.contact:stack1)!=null?stack1.name:stack1,depth0))+"
"},8:function(depth0,helpers,partials,data){var stack1,lambda=this.lambda,escapeExpression=this.escapeExpression;return"
See more at '+escapeExpression(lambda((stack1=(stack1=depth0!=null?depth0.info:depth0)!=null?stack1.contact:stack1)!=null?stack1.url:stack1,depth0))+"
"},10:function(depth0,helpers,partials,data){var stack1,lambda=this.lambda,escapeExpression=this.escapeExpression;return"
Contact the developer
'},12:function(depth0,helpers,partials,data){var stack1,lambda=this.lambda,escapeExpression=this.escapeExpression;return"
"+escapeExpression(lambda((stack1=(stack1=depth0!=null?depth0.info:depth0)!=null?stack1.license:stack1)!=null?stack1.name:stack1,depth0))+"
"},14:function(depth0,helpers,partials,data){var stack1,lambda=this.lambda,escapeExpression=this.escapeExpression;return' , api version: '+escapeExpression(lambda((stack1=depth0!=null?depth0.info:depth0)!=null?stack1.version:stack1,depth0))+"\n "},16:function(depth0,helpers,partials,data){var helper,functionType="function",helperMissing=helpers.helperMissing,escapeExpression=this.escapeExpression;return' \n \n'},compiler:[6,">= 2.0.0-beta.1"],main:function(depth0,helpers,partials,data){var stack1,helper,functionType="function",helperMissing=helpers.helperMissing,escapeExpression=this.escapeExpression,buffer="
\n";stack1=helpers["if"].call(depth0,depth0!=null?depth0.info:depth0,{name:"if",hash:{},fn:this.program(1,data),inverse:this.noop,data:data});if(stack1!=null){buffer+=stack1}buffer+="
\n
\n \n\n
\n

[ base url: "+escapeExpression((helper=(helper=helpers.basePath||(depth0!=null?depth0.basePath:depth0))!=null?helper:helperMissing,typeof helper===functionType?helper.call(depth0,{name:"basePath",hash:{},data:data}):helper))+"\n";stack1=helpers["if"].call(depth0,(stack1=depth0!=null?depth0.info:depth0)!=null?stack1.version:stack1,{name:"if",hash:{},fn:this.program(14,data),inverse:this.noop,data:data});if(stack1!=null){buffer+=stack1}buffer+="]\n";stack1=helpers["if"].call(depth0,depth0!=null?depth0.validatorUrl:depth0,{name:"if",hash:{},fn:this.program(16,data),inverse:this.noop,data:data});if(stack1!=null){buffer+=stack1}return buffer+"

\n
\n
\n"},useData:true});this["Handlebars"]["templates"]["operation"]=Handlebars.template({1:function(depth0,helpers,partials,data){return"deprecated"},3:function(depth0,helpers,partials,data){return"

Warning: Deprecated

\n"},5:function(depth0,helpers,partials,data){var stack1,helper,functionType="function",helperMissing=helpers.helperMissing,buffer='

Implementation Notes

\n
';stack1=(helper=(helper=helpers.description||(depth0!=null?depth0.description:depth0))!=null?helper:helperMissing,typeof helper===functionType?helper.call(depth0,{name:"description",hash:{},data:data}):helper);if(stack1!=null){buffer+=stack1}return buffer+"
\n"},7:function(depth0,helpers,partials,data){return'
\n '},9:function(depth0,helpers,partials,data){var stack1,buffer='
\n';stack1=helpers.each.call(depth0,depth0,{name:"each",hash:{},fn:this.program(10,data),inverse:this.noop,data:data});if(stack1!=null){buffer+=stack1}return buffer+"
\n"},10:function(depth0,helpers,partials,data){var stack1,lambda=this.lambda,escapeExpression=this.escapeExpression,buffer="
"+escapeExpression(lambda(depth0!=null?depth0.scope:depth0,depth0))+"
\n"},12:function(depth0,helpers,partials,data){return"
"},14:function(depth0,helpers,partials,data){return'
\n \n
\n'},16:function(depth0,helpers,partials,data){var helper,functionType="function",helperMissing=helpers.helperMissing,escapeExpression=this.escapeExpression;return"

Response Class (Status "+escapeExpression((helper=(helper=helpers.successCode||(depth0!=null?depth0.successCode:depth0))!=null?helper:helperMissing,typeof helper===functionType?helper.call(depth0,{name:"successCode",hash:{},data:data}):helper))+')

\n

\n
\n
\n'},18:function(depth0,helpers,partials,data){return'

Parameters

\n \n \n \n \n \n \n \n \n \n \n \n\n \n
ParameterValueDescriptionParameter TypeData Type
\n'},20:function(depth0,helpers,partials,data){return"
\n

Response Messages

\n \n \n \n \n \n \n \n \n \n \n\n \n
HTTP Status CodeReasonResponse ModelHeaders
\n"},22:function(depth0,helpers,partials,data){return""},24:function(depth0,helpers,partials,data){return"
\n \n \n \n
\n"},26:function(depth0,helpers,partials,data){return"

Request Headers

\n
\n"},compiler:[6,">= 2.0.0-beta.1"],main:function(depth0,helpers,partials,data){var stack1,helper,options,functionType="function",helperMissing=helpers.helperMissing,escapeExpression=this.escapeExpression,blockHelperMissing=helpers.blockHelperMissing,buffer="\n \n"; },useData:true});this["Handlebars"]["templates"]["param"]=Handlebars.template({1:function(depth0,helpers,partials,data){var stack1,buffer="";stack1=helpers["if"].call(depth0,depth0!=null?depth0.isFile:depth0,{name:"if",hash:{},fn:this.program(2,data),inverse:this.program(4,data),data:data});if(stack1!=null){buffer+=stack1}return buffer},2:function(depth0,helpers,partials,data){var helper,functionType="function",helperMissing=helpers.helperMissing,escapeExpression=this.escapeExpression;return' \n
\n'},4:function(depth0,helpers,partials,data){var stack1,buffer="";stack1=helpers["if"].call(depth0,depth0!=null?depth0["default"]:depth0,{name:"if",hash:{},fn:this.program(5,data),inverse:this.program(7,data),data:data});if(stack1!=null){buffer+=stack1}return buffer},5:function(depth0,helpers,partials,data){var helper,functionType="function",helperMissing=helpers.helperMissing,escapeExpression=this.escapeExpression;return" \n
\n
\n'},7:function(depth0,helpers,partials,data){var helper,functionType="function",helperMissing=helpers.helperMissing,escapeExpression=this.escapeExpression;return" \n
\n
\n'},9:function(depth0,helpers,partials,data){var stack1,buffer="";stack1=helpers["if"].call(depth0,depth0!=null?depth0.isFile:depth0,{name:"if",hash:{},fn:this.program(2,data),inverse:this.program(10,data),data:data});if(stack1!=null){buffer+=stack1}return buffer},10:function(depth0,helpers,partials,data){var stack1,helperMissing=helpers.helperMissing,buffer="";stack1=(helpers.renderTextParam||depth0&&depth0.renderTextParam||helperMissing).call(depth0,depth0,{name:"renderTextParam",hash:{},fn:this.program(11,data),inverse:this.noop,data:data});if(stack1!=null){buffer+=stack1}return buffer},11:function(depth0,helpers,partials,data){return""},compiler:[6,">= 2.0.0-beta.1"],main:function(depth0,helpers,partials,data){var stack1,helper,functionType="function",helperMissing=helpers.helperMissing,escapeExpression=this.escapeExpression,buffer="\n\n\n";stack1=helpers["if"].call(depth0,depth0!=null?depth0.isBody:depth0,{name:"if",hash:{},fn:this.program(1,data),inverse:this.program(9,data),data:data});if(stack1!=null){buffer+=stack1}buffer+='\n\n';stack1=(helper=(helper=helpers.description||(depth0!=null?depth0.description:depth0))!=null?helper:helperMissing,typeof helper===functionType?helper.call(depth0,{name:"description",hash:{},data:data}):helper);if(stack1!=null){buffer+=stack1}buffer+="\n";stack1=(helper=(helper=helpers.paramType||(depth0!=null?depth0.paramType:depth0))!=null?helper:helperMissing,typeof helper===functionType?helper.call(depth0,{name:"paramType",hash:{},data:data}):helper);if(stack1!=null){buffer+=stack1}return buffer+'\n\n \n\n'},useData:true});this["Handlebars"]["templates"]["param_list"]=Handlebars.template({1:function(depth0,helpers,partials,data){return" required"},3:function(depth0,helpers,partials,data){return' multiple="multiple"'},5:function(depth0,helpers,partials,data){return" required "},7:function(depth0,helpers,partials,data){var stack1,buffer=" \n"},8:function(depth0,helpers,partials,data){return' selected="" '},10:function(depth0,helpers,partials,data){var stack1,helper,functionType="function",helperMissing=helpers.helperMissing,escapeExpression=this.escapeExpression,buffer="\n \n\n"},11:function(depth0,helpers,partials,data){return' selected="" '},13:function(depth0,helpers,partials,data){return" (default) "},15:function(depth0,helpers,partials,data){return""},17:function(depth0,helpers,partials,data){return""},compiler:[6,">= 2.0.0-beta.1"],main:function(depth0,helpers,partials,data){var stack1,helper,functionType="function",helperMissing=helpers.helperMissing,escapeExpression=this.escapeExpression,buffer="\n\n \n\n';stack1=helpers["if"].call(depth0,depth0!=null?depth0.required:depth0,{name:"if",hash:{},fn:this.program(15,data),inverse:this.noop,data:data});if(stack1!=null){buffer+=stack1}stack1=(helper=(helper=helpers.description||(depth0!=null?depth0.description:depth0))!=null?helper:helperMissing,typeof helper===functionType?helper.call(depth0,{name:"description",hash:{},data:data}):helper);if(stack1!=null){buffer+=stack1}stack1=helpers["if"].call(depth0,depth0!=null?depth0.required:depth0,{name:"if",hash:{},fn:this.program(17,data),inverse:this.noop,data:data});if(stack1!=null){buffer+=stack1}buffer+="\n";stack1=(helper=(helper=helpers.paramType||(depth0!=null?depth0.paramType:depth0))!=null?helper:helperMissing,typeof helper===functionType?helper.call(depth0,{name:"paramType",hash:{},data:data}):helper);if(stack1!=null){buffer+=stack1}return buffer+'\n\n'},useData:true});this["Handlebars"]["templates"]["param_readonly"]=Handlebars.template({1:function(depth0,helpers,partials,data){var helper,functionType="function",helperMissing=helpers.helperMissing,escapeExpression=this.escapeExpression;return" \n"},3:function(depth0,helpers,partials,data){var stack1,buffer="";stack1=helpers["if"].call(depth0,depth0!=null?depth0["default"]:depth0,{name:"if",hash:{},fn:this.program(4,data),inverse:this.program(6,data),data:data});if(stack1!=null){buffer+=stack1}return buffer},4:function(depth0,helpers,partials,data){var helper,functionType="function",helperMissing=helpers.helperMissing,escapeExpression=this.escapeExpression;return" "+escapeExpression((helper=(helper=helpers["default"]||(depth0!=null?depth0["default"]:depth0))!=null?helper:helperMissing,typeof helper===functionType?helper.call(depth0,{name:"default",hash:{},data:data}):helper))+"\n"},6:function(depth0,helpers,partials,data){return" (empty)\n"},compiler:[6,">= 2.0.0-beta.1"],main:function(depth0,helpers,partials,data){var stack1,helper,functionType="function",helperMissing=helpers.helperMissing,escapeExpression=this.escapeExpression,buffer="\n\n";stack1=helpers["if"].call(depth0,depth0!=null?depth0.isBody:depth0,{name:"if",hash:{},fn:this.program(1,data),inverse:this.program(3,data),data:data});if(stack1!=null){buffer+=stack1}buffer+='\n';stack1=(helper=(helper=helpers.description||(depth0!=null?depth0.description:depth0))!=null?helper:helperMissing,typeof helper===functionType?helper.call(depth0,{name:"description",hash:{},data:data}):helper);if(stack1!=null){buffer+=stack1}buffer+="\n";stack1=(helper=(helper=helpers.paramType||(depth0!=null?depth0.paramType:depth0))!=null?helper:helperMissing,typeof helper===functionType?helper.call(depth0,{name:"paramType",hash:{},data:data}):helper);if(stack1!=null){buffer+=stack1}return buffer+'\n\n'},useData:true});this["Handlebars"]["templates"]["param_readonly_required"]=Handlebars.template({1:function(depth0,helpers,partials,data){var helper,functionType="function",helperMissing=helpers.helperMissing,escapeExpression=this.escapeExpression;return" \n"},3:function(depth0,helpers,partials,data){var stack1,buffer="";stack1=helpers["if"].call(depth0,depth0!=null?depth0["default"]:depth0,{name:"if",hash:{},fn:this.program(4,data),inverse:this.program(6,data),data:data});if(stack1!=null){buffer+=stack1}return buffer},4:function(depth0,helpers,partials,data){var helper,functionType="function",helperMissing=helpers.helperMissing,escapeExpression=this.escapeExpression;return" "+escapeExpression((helper=(helper=helpers["default"]||(depth0!=null?depth0["default"]:depth0))!=null?helper:helperMissing,typeof helper===functionType?helper.call(depth0,{name:"default",hash:{},data:data}):helper))+"\n"},6:function(depth0,helpers,partials,data){return" (empty)\n"},compiler:[6,">= 2.0.0-beta.1"],main:function(depth0,helpers,partials,data){var stack1,helper,functionType="function",helperMissing=helpers.helperMissing,escapeExpression=this.escapeExpression,buffer="\n\n";stack1=helpers["if"].call(depth0,depth0!=null?depth0.isBody:depth0,{name:"if",hash:{},fn:this.program(1,data),inverse:this.program(3,data),data:data});if(stack1!=null){buffer+=stack1}buffer+='\n';stack1=(helper=(helper=helpers.description||(depth0!=null?depth0.description:depth0))!=null?helper:helperMissing,typeof helper===functionType?helper.call(depth0,{name:"description",hash:{},data:data}):helper);if(stack1!=null){buffer+=stack1}buffer+="\n";stack1=(helper=(helper=helpers.paramType||(depth0!=null?depth0.paramType:depth0))!=null?helper:helperMissing,typeof helper===functionType?helper.call(depth0,{name:"paramType",hash:{},data:data}):helper);if(stack1!=null){buffer+=stack1}return buffer+'\n\n'},useData:true});this["Handlebars"]["templates"]["param_required"]=Handlebars.template({1:function(depth0,helpers,partials,data){var stack1,buffer="";stack1=helpers["if"].call(depth0,depth0!=null?depth0.isFile:depth0,{name:"if",hash:{},fn:this.program(2,data),inverse:this.program(4,data),data:data});if(stack1!=null){buffer+=stack1}return buffer},2:function(depth0,helpers,partials,data){var helper,functionType="function",helperMissing=helpers.helperMissing,escapeExpression=this.escapeExpression;return' \n"},4:function(depth0,helpers,partials,data){var stack1,buffer="";stack1=helpers["if"].call(depth0,depth0!=null?depth0["default"]:depth0,{name:"if",hash:{},fn:this.program(5,data),inverse:this.program(7,data),data:data});if(stack1!=null){buffer+=stack1}return buffer},5:function(depth0,helpers,partials,data){var helper,functionType="function",helperMissing=helpers.helperMissing,escapeExpression=this.escapeExpression;return" \n
\n
\n'},7:function(depth0,helpers,partials,data){var helper,functionType="function",helperMissing=helpers.helperMissing,escapeExpression=this.escapeExpression;return" \n
\n
\n'},9:function(depth0,helpers,partials,data){var stack1,buffer="";stack1=helpers["if"].call(depth0,depth0!=null?depth0.isFile:depth0,{name:"if",hash:{},fn:this.program(10,data),inverse:this.program(12,data),data:data});if(stack1!=null){buffer+=stack1}return buffer},10:function(depth0,helpers,partials,data){var helper,functionType="function",helperMissing=helpers.helperMissing,escapeExpression=this.escapeExpression;return" \n"},12:function(depth0,helpers,partials,data){var stack1,helperMissing=helpers.helperMissing,buffer="";stack1=(helpers.renderTextParam||depth0&&depth0.renderTextParam||helperMissing).call(depth0,depth0,{name:"renderTextParam",hash:{},fn:this.program(13,data),inverse:this.noop,data:data});if(stack1!=null){buffer+=stack1}return buffer},13:function(depth0,helpers,partials,data){return""},compiler:[6,">= 2.0.0-beta.1"],main:function(depth0,helpers,partials,data){var stack1,helper,functionType="function",helperMissing=helpers.helperMissing,escapeExpression=this.escapeExpression,buffer="\n\n";stack1=helpers["if"].call(depth0,depth0!=null?depth0.isBody:depth0,{name:"if",hash:{},fn:this.program(1,data),inverse:this.program(9,data),data:data});if(stack1!=null){buffer+=stack1}buffer+='\n\n ';stack1=(helper=(helper=helpers.description||(depth0!=null?depth0.description:depth0))!=null?helper:helperMissing,typeof helper===functionType?helper.call(depth0,{name:"description",hash:{},data:data}):helper);if(stack1!=null){buffer+=stack1}buffer+="\n\n";stack1=(helper=(helper=helpers.paramType||(depth0!=null?depth0.paramType:depth0))!=null?helper:helperMissing,typeof helper===functionType?helper.call(depth0,{name:"paramType",hash:{},data:data}):helper);if(stack1!=null){buffer+=stack1}return buffer+'\n\n'},useData:true});this["Handlebars"]["templates"]["parameter_content_type"]=Handlebars.template({1:function(depth0,helpers,partials,data){var stack1,buffer="";stack1=helpers.each.call(depth0,depth0!=null?depth0.consumes:depth0,{name:"each",hash:{},fn:this.program(2,data),inverse:this.noop,data:data});if(stack1!=null){buffer+=stack1}return buffer},2:function(depth0,helpers,partials,data){var stack1,lambda=this.lambda,buffer=' \n"},4:function(depth0,helpers,partials,data){return' \n'},compiler:[6,">= 2.0.0-beta.1"],main:function(depth0,helpers,partials,data){var stack1,helper,functionType="function",helperMissing=helpers.helperMissing,escapeExpression=this.escapeExpression,buffer='\n\n"},useData:true});this["Handlebars"]["templates"]["resource"]=Handlebars.template({1:function(depth0,helpers,partials,data){return" : "},3:function(depth0,helpers,partials,data){var helper,functionType="function",helperMissing=helpers.helperMissing,escapeExpression=this.escapeExpression;return"
  • \n Raw\n
  • \n"},compiler:[6,">= 2.0.0-beta.1"],main:function(depth0,helpers,partials,data){var stack1,helper,options,functionType="function",helperMissing=helpers.helperMissing,escapeExpression=this.escapeExpression,blockHelperMissing=helpers.blockHelperMissing,buffer="
    \n

    \n '+escapeExpression((helper=(helper=helpers.name||(depth0!=null?depth0.name:depth0))!=null?helper:helperMissing,typeof helper===functionType?helper.call(depth0,{name:"name",hash:{},data:data}):helper))+" ";stack1=(helper=(helper=helpers.summary||(depth0!=null?depth0.summary:depth0))!=null?helper:helperMissing,options={name:"summary",hash:{},fn:this.program(1,data),inverse:this.noop,data:data},typeof helper===functionType?helper.call(depth0,options):helper);if(!helpers.summary){stack1=blockHelperMissing.call(depth0,stack1,options)}if(stack1!=null){buffer+=stack1}stack1=(helper=(helper=helpers.summary||(depth0!=null?depth0.summary:depth0))!=null?helper:helperMissing,typeof helper===functionType?helper.call(depth0,{name:"summary",hash:{},data:data}):helper);if(stack1!=null){buffer+=stack1}buffer+="\n

    \n
      \n
    • \n Show/Hide\n
    • \n
    • \n \n List Operations\n \n
    • \n
    • \n \n Expand Operations\n \n
    • \n';stack1=helpers["if"].call(depth0,depth0!=null?depth0.url:depth0,{name:"if",hash:{},fn:this.program(3,data),inverse:this.noop,data:data});if(stack1!=null){buffer+=stack1}return buffer+"
    \n
    \n\n"},useData:true});this["Handlebars"]["templates"]["response_content_type"]=Handlebars.template({1:function(depth0,helpers,partials,data){var stack1,buffer="";stack1=helpers.each.call(depth0,depth0!=null?depth0.produces:depth0,{name:"each",hash:{},fn:this.program(2,data),inverse:this.noop,data:data});if(stack1!=null){buffer+=stack1}return buffer},2:function(depth0,helpers,partials,data){var stack1,lambda=this.lambda,buffer=' \n"},4:function(depth0,helpers,partials,data){return' \n'},compiler:[6,">= 2.0.0-beta.1"],main:function(depth0,helpers,partials,data){var stack1,helper,functionType="function",helperMissing=helpers.helperMissing,escapeExpression=this.escapeExpression,buffer='\n\n"},useData:true});this["Handlebars"]["templates"]["signature"]=Handlebars.template({compiler:[6,">= 2.0.0-beta.1"],main:function(depth0,helpers,partials,data){var stack1,helper,functionType="function",helperMissing=helpers.helperMissing,escapeExpression=this.escapeExpression,buffer='
    \n\n
    \n\n
    \n
    \n ';stack1=(helper=(helper=helpers.signature||(depth0!=null?depth0.signature:depth0))!=null?helper:helperMissing,typeof helper===functionType?helper.call(depth0,{name:"signature",hash:{},data:data}):helper);if(stack1!=null){buffer+=stack1}return buffer+'\n
    \n\n
    \n
    '+escapeExpression((helper=(helper=helpers.sampleJSON||(depth0!=null?depth0.sampleJSON:depth0))!=null?helper:helperMissing,typeof helper===functionType?helper.call(depth0,{name:"sampleJSON",hash:{},data:data}):helper))+'
    \n \n
    \n
    \n\n'},useData:true});this["Handlebars"]["templates"]["status_code"]=Handlebars.template({1:function(depth0,helpers,partials,data){var lambda=this.lambda,escapeExpression=this.escapeExpression;return" \n "+escapeExpression(lambda(data&&data.key,depth0))+"\n "+escapeExpression(lambda(depth0!=null?depth0.description:depth0,depth0))+"\n "+escapeExpression(lambda(depth0!=null?depth0.type:depth0,depth0))+"\n \n"},compiler:[6,">= 2.0.0-beta.1"],main:function(depth0,helpers,partials,data){var stack1,helper,functionType="function",helperMissing=helpers.helperMissing,escapeExpression=this.escapeExpression,buffer=""+escapeExpression((helper=(helper=helpers.code||(depth0!=null?depth0.code:depth0))!=null?helper:helperMissing,typeof helper===functionType?helper.call(depth0,{name:"code",hash:{},data:data}):helper))+'\n';stack1=(helper=(helper=helpers.message||(depth0!=null?depth0.message:depth0))!=null?helper:helperMissing,typeof helper===functionType?helper.call(depth0,{name:"message",hash:{},data:data}):helper);if(stack1!=null){buffer+=stack1}buffer+='\n\n\n \n \n';stack1=helpers.each.call(depth0,depth0!=null?depth0.headers:depth0,{ name:"each",hash:{},fn:this.program(1,data),inverse:this.noop,data:data});if(stack1!=null){buffer+=stack1}return buffer+" \n
    \n"},useData:true});(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.SwaggerClient=f()}})(function(){var define,module,exports;return function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o0){obj.url=obj.url+"&"+this.name+"="+this.value}else{obj.url=obj.url+"?"+this.name+"="+this.value}return true}else if(this.type==="header"){if(typeof obj.headers[this.name]==="undefined"){obj.headers[this.name]=this.value}return true}};var CookieAuthorization=module.exports.CookieAuthorization=function(cookie){this.cookie=cookie};CookieAuthorization.prototype.apply=function(obj){obj.cookieJar=obj.cookieJar||new CookieJar;obj.cookieJar.setCookie(this.cookie);return true};var PasswordAuthorization=module.exports.PasswordAuthorization=function(username,password){if(arguments.length===3){helpers.log("PasswordAuthorization: the 'name' argument has been removed, pass only username and password");username=arguments[1];password=arguments[2]}this.username=username;this.password=password};PasswordAuthorization.prototype.apply=function(obj){if(typeof obj.headers.Authorization==="undefined"){obj.headers.Authorization="Basic "+btoa(this.username+":"+this.password)}return true}},{"./helpers":4,btoa:18,cookiejar:19,"lodash-compat/collection/each":55,"lodash-compat/collection/includes":58,"lodash-compat/lang/isArray":143,"lodash-compat/lang/isObject":147}],3:[function(require,module,exports){"use strict";var _={bind:require("lodash-compat/function/bind"),cloneDeep:require("lodash-compat/lang/cloneDeep"),find:require("lodash-compat/collection/find"),forEach:require("lodash-compat/collection/forEach"),indexOf:require("lodash-compat/array/indexOf"),isArray:require("lodash-compat/lang/isArray"),isObject:require("lodash-compat/lang/isObject"),isFunction:require("lodash-compat/lang/isFunction"),isPlainObject:require("lodash-compat/lang/isPlainObject"),isUndefined:require("lodash-compat/lang/isUndefined")};var auth=require("./auth");var helpers=require("./helpers");var Model=require("./types/model");var Operation=require("./types/operation");var OperationGroup=require("./types/operationGroup");var Resolver=require("./resolver");var SwaggerHttp=require("./http");var SwaggerSpecConverter=require("./spec-converter");var reservedClientTags=["apis","authorizationScheme","authorizations","basePath","build","buildFrom1_1Spec","buildFrom1_2Spec","buildFromSpec","clientAuthorizations","convertInfo","debug","defaultErrorCallback","defaultSuccessCallback","fail","failure","finish","help","idFromOp","info","initialize","isBuilt","isValid","modelPropertyMacro","models","modelsArray","options","parameterMacro","parseUri","progress","resourceCount","sampleModels","selfReflect","setConsolidatedModels","spec","supportedSubmitMethods","swaggerRequestHeaders","tagFromLabel","url","useJQuery"];var reservedApiTags=["apis","asCurl","description","externalDocs","help","label","name","operation","operations","operationsArray","path","tag"];var supportedOperationMethods=["delete","get","head","options","patch","post","put"];var SwaggerClient=module.exports=function(url,options){this.authorizations=null;this.authorizationScheme=null;this.basePath=null;this.debug=false;this.info=null;this.isBuilt=false;this.isValid=false;this.modelsArray=[];this.resourceCount=0;this.url=null;this.useJQuery=false;this.swaggerObject={};this.clientAuthorizations=new auth.SwaggerAuthorizations;if(typeof url!=="undefined"){return this.initialize(url,options)}else{return this}};SwaggerClient.prototype.initialize=function(url,options){this.models={};this.sampleModels={};if(typeof url==="string"){this.url=url}else if(_.isObject(url)){options=url;this.url=options.url}options=options||{};this.clientAuthorizations.add(options.authorizations);this.swaggerRequestHeaders=options.swaggerRequestHeaders||"application/json;charset=utf-8,*/*";this.defaultSuccessCallback=options.defaultSuccessCallback||null;this.defaultErrorCallback=options.defaultErrorCallback||null;this.modelPropertyMacro=options.modelPropertyMacro||null;this.parameterMacro=options.parameterMacro||null;if(typeof options.success==="function"){this.success=options.success}if(options.useJQuery){this.useJQuery=options.useJQuery}this.options=options||{};this.supportedSubmitMethods=options.supportedSubmitMethods||[];this.failure=options.failure||function(){};this.progress=options.progress||function(){};this.spec=_.cloneDeep(options.spec);if(options.scheme){this.scheme=options.scheme}if(typeof options.success==="function"){this.ready=true;this.build()}};SwaggerClient.prototype.build=function(mock){if(this.isBuilt){return this}var self=this;this.progress("fetching resource list: "+this.url);var obj={useJQuery:this.useJQuery,url:this.url,method:"get",headers:{accept:this.swaggerRequestHeaders},on:{error:function(response){if(self.url.substring(0,4)!=="http"){return self.fail("Please specify the protocol for "+self.url)}else if(response.status===0){return self.fail("Can't read from server. It may not have the appropriate access-control-origin settings.")}else if(response.status===404){return self.fail("Can't read swagger JSON from "+self.url)}else{return self.fail(response.status+" : "+response.statusText+" "+self.url)}},response:function(resp){var responseObj=resp.obj;if(!responseObj){return self.fail("failed to parse JSON/YAML response")}self.swaggerVersion=responseObj.swaggerVersion;self.swaggerObject=responseObj;if(responseObj.swagger&&parseInt(responseObj.swagger)===2){self.swaggerVersion=responseObj.swagger;(new Resolver).resolve(responseObj,self.url,self.buildFromSpec,self);self.isValid=true}else{var converter=new SwaggerSpecConverter;self.oldSwaggerObject=self.swaggerObject;converter.setDocumentationLocation(self.url);converter.convert(responseObj,self.clientAuthorizations,function(spec){self.swaggerObject=spec;(new Resolver).resolve(spec,self.url,self.buildFromSpec,self);self.isValid=true})}}}};if(this.spec){self.swaggerObject=this.spec;setTimeout(function(){(new Resolver).resolve(self.spec,self.buildFromSpec,self)},10)}else{this.clientAuthorizations.apply(obj);if(mock){return obj}(new SwaggerHttp).execute(obj,this.options)}return this};SwaggerClient.prototype.buildFromSpec=function(response){if(this.isBuilt){return this}this.apis={};this.apisArray=[];this.basePath=response.basePath||"";this.consumes=response.consumes;this.host=response.host||"";this.info=response.info||{};this.produces=response.produces;this.schemes=response.schemes||[];this.securityDefinitions=response.securityDefinitions;this.title=response.title||"";if(response.externalDocs){this.externalDocs=response.externalDocs}this.authSchemes=response.securityDefinitions;var definedTags={};var k;if(Array.isArray(response.tags)){definedTags={};for(k=0;k-1?"_"+tag:tag;var apiProperty=_.indexOf(reservedApiTags,tag)>-1?"_"+tag:tag;var operationGroup=self[clientProperty];if(clientProperty!==tag){helpers.log("The '"+tag+"' tag conflicts with a SwaggerClient function/property name. Use 'client."+clientProperty+"' or 'client.apis."+tag+"' instead of 'client."+tag+"'.")}if(apiProperty!==tag){helpers.log("The '"+tag+"' tag conflicts with a SwaggerClient operation function/property name. Use "+"'client.apis."+apiProperty+"' instead of 'client.apis."+tag+"'.")}if(_.indexOf(reservedApiTags,operationId)>-1){helpers.log("The '"+operationId+"' operationId conflicts with a SwaggerClient operation "+"function/property name. Use 'client.apis."+apiProperty+"._"+operationId+"' instead of 'client.apis."+apiProperty+"."+operationId+"'.");operationId="_"+operationId;operationObject.nickname=operationId}if(_.isUndefined(operationGroup)){operationGroup=self[clientProperty]=self.apis[apiProperty]={};operationGroup.operations={};operationGroup.label=apiProperty;operationGroup.apis={};var tagDef=definedTags[tag];if(!_.isUndefined(tagDef)){operationGroup.description=tagDef.description;operationGroup.externalDocs=tagDef.externalDocs}self[clientProperty].help=_.bind(self.help,operationGroup);self.apisArray.push(new OperationGroup(tag,operationGroup.description,operationGroup.externalDocs,operationObject))}if(!_.isFunction(operationGroup.help)){operationGroup.help=_.bind(self.help,operationGroup)}self.apis[apiProperty][operationId]=operationGroup[operationId]=_.bind(operationObject.execute,operationObject);self.apis[apiProperty][operationId].help=operationGroup[operationId].help=_.bind(operationObject.help,operationObject);self.apis[apiProperty][operationId].asCurl=operationGroup[operationId].asCurl=_.bind(operationObject.asCurl,operationObject);operationGroup.apis[operationId]=operationGroup.operations[operationId]=operationObject;var api=_.find(self.apisArray,function(api){return api.tag===tag});if(api){api.operationsArray.push(operationObject)}})})});this.isBuilt=true;if(this.success){this.isValid=true;this.isBuilt=true;this.success()}return this};SwaggerClient.prototype.parseUri=function(uri){var urlParseRE=/^(((([^:\/#\?]+:)?(?:(\/\/)((?:(([^:@\/#\?]+)(?:\:([^:@\/#\?]+))?)@)?(([^:\/#\?\]\[]+|\[[^\/\]@#?]+\])(?:\:([0-9]+))?))?)?)?((\/?(?:[^\/\?#]+\/+)*)([^\?#]*)))?(\?[^#]+)?)(#.*)?/;var parts=urlParseRE.exec(uri);return{scheme:parts[4].replace(":",""),host:parts[11],port:parts[12],path:parts[15]}};SwaggerClient.prototype.help=function(dontPrint){var output="";if(this instanceof SwaggerClient){_.forEach(this.apis,function(api,name){if(_.isPlainObject(api)){output+="operations for the '"+name+"' tag\n";_.forEach(api.operations,function(operation,name){output+=" * "+name+": "+operation.summary+"\n"})}})}else if(this instanceof OperationGroup||_.isPlainObject(this)){output+="operations for the '"+this.label+"' tag\n";_.forEach(this.apis,function(operation,name){output+=" * "+name+": "+operation.summary+"\n"})}if(dontPrint){return output}else{helpers.log(output);return output}};SwaggerClient.prototype.tagFromLabel=function(label){return label};SwaggerClient.prototype.idFromOp=function(path,httpMethod,op){if(!op||!op.operationId){op=op||{};op.operationId=httpMethod+"_"+path}var opId=op.operationId.replace(/[\s!@#$%^&*()_+=\[{\]};:<>|.\/?,\\'""-]/g,"_")||path.substring(1)+"_"+httpMethod;opId=opId.replace(/((_){2,})/g,"_");opId=opId.replace(/^(_)*/g,"");opId=opId.replace(/([_])*$/g,"");return opId};SwaggerClient.prototype.setHost=function(host){this.host=host;if(this.apis){_.forEach(this.apis,function(api){if(api.operations){_.forEach(api.operations,function(operation){operation.host=host})}})}};SwaggerClient.prototype.setBasePath=function(basePath){this.basePath=basePath;if(this.apis){_.forEach(this.apis,function(api){if(api.operations){_.forEach(api.operations,function(operation){operation.basePath=basePath})}})}};SwaggerClient.prototype.fail=function(message){this.failure(message);throw message}},{"./auth":2,"./helpers":4,"./http":5,"./resolver":6,"./spec-converter":8,"./types/model":9,"./types/operation":10,"./types/operationGroup":11,"lodash-compat/array/indexOf":52,"lodash-compat/collection/find":56,"lodash-compat/collection/forEach":57,"lodash-compat/function/bind":61,"lodash-compat/lang/cloneDeep":141,"lodash-compat/lang/isArray":143,"lodash-compat/lang/isFunction":145,"lodash-compat/lang/isObject":147,"lodash-compat/lang/isPlainObject":148,"lodash-compat/lang/isUndefined":151}],4:[function(require,module,exports){(function(process){"use strict";var _={isPlainObject:require("lodash-compat/lang/isPlainObject"),indexOf:require("lodash-compat/array/indexOf")};module.exports.__bind=function(fn,me){return function(){return fn.apply(me,arguments)}};var log=module.exports.log=function(){if(console&&process.env.NODE_ENV!=="test"){console.log(Array.prototype.slice.call(arguments)[0])}};module.exports.fail=function(message){log(message)};var optionHtml=module.exports.optionHtml=function(label,value){return''+label+":"+value+""};var resolveSchema=module.exports.resolveSchema=function(schema){if(_.isPlainObject(schema.schema)){schema=resolveSchema(schema.schema)}return schema};var simpleRef=module.exports.simpleRef=function(name){if(typeof name==="undefined"){return null}if(name.indexOf("#/definitions/")===0){return name.substring("#/definitions/".length)}else{return name}}}).call(this,require("_process"))},{_process:17,"lodash-compat/array/indexOf":52,"lodash-compat/lang/isPlainObject":148}],5:[function(require,module,exports){"use strict";var helpers=require("./helpers");var jQuery=require("jquery");var request=require("superagent");var jsyaml=require("js-yaml");var _={isObject:require("lodash-compat/lang/isObject")};var JQueryHttpClient=function(){};var SuperagentHttpClient=function(){};var SwaggerHttp=module.exports=function(){};SwaggerHttp.prototype.execute=function(obj,opts){var client;if(opts&&opts.client){client=opts.client}else{client=new SuperagentHttpClient(opts)}if(obj&&obj.useJQuery===true||this.isInternetExplorer()){client=new JQueryHttpClient(opts)}var success=obj.on.response;var responseInterceptor=function(data){if(opts&&opts.responseInterceptor){data=opts.responseInterceptor.apply(data)}success(data)};obj.on.response=function(data){responseInterceptor(data)};if(_.isObject(obj)&&_.isObject(obj.body)){if(obj.body.type&&obj.body.type==="formData"){obj.contentType=false;obj.processData=false;delete obj.headers["Content-Type"]}else{obj.body=JSON.stringify(obj.body)}}client.execute(obj)};SwaggerHttp.prototype.isInternetExplorer=function(){var detectedIE=false;if(typeof navigator!=="undefined"&&navigator.userAgent){var nav=navigator.userAgent.toLowerCase();if(nav.indexOf("msie")!==-1){var version=parseInt(nav.split("msie")[1]);if(version<=8){detectedIE=true}}}return detectedIE};JQueryHttpClient.prototype.execute=function(obj){var cb=obj.on;var request=obj;obj.type=obj.method;obj.cache=false;delete obj.useJQuery;obj.data=obj.body;delete obj.body;obj.complete=function(response){var headers={};var headerArray=response.getAllResponseHeaders().split("\n");for(var i=0;i=200&&response.status<300){cb.response(out)}else if(response.status===0||response.status>=400&&response.status<599){cb.error(out)}else{return cb.response(out)}};jQuery.support.cors=true;return jQuery.ajax(obj)};SuperagentHttpClient.prototype.execute=function(obj){var method=obj.method.toLowerCase();if(method==="delete"){method="del"}var headers=obj.headers||{};var r=request[method](obj.url);var name;for(name in headers){r.set(name,headers[name])}if(obj.body){r.send(obj.body)}if(typeof r.buffer==="function"){r.buffer()}r.end(function(err,res){res=res||{status:0,headers:{error:"no response from server"}};var response={url:obj.url,method:obj.method,headers:res.headers};var cb;if(!err&&res.error){err=res.error}if(err&&obj.on&&obj.on.error){response.obj=err;response.status=res?res.status:500;response.statusText=res?res.text:err.message;cb=obj.on.error}else if(res&&obj.on&&obj.on.response){var possibleObj;if(res.body&&Object.keys(res.body).length>0){possibleObj=res.body}else{try{possibleObj=jsyaml.safeLoad(res.text);possibleObj=typeof possibleObj==="string"?null:possibleObj}catch(e){helpers.log("cannot parse JSON/YAML content")}}response.obj=possibleObj||null;response.status=res.status;response.statusText=res.text;cb=obj.on.response}response.data=response.statusText;if(cb){cb(response)}})}},{"./helpers":4,jquery:20,"js-yaml":21,"lodash-compat/lang/isObject":147,superagent:160}],6:[function(require,module,exports){"use strict";var SwaggerHttp=require("./http");var _={isObject:require("lodash-compat/lang/isObject"),isArray:require("lodash-compat/lang/isArray")};var Resolver=module.exports=function(){};Resolver.prototype.processAllOf=function(name,definition,resolutionTable,unresolvedRefs,spec){var i,location,property;definition["x-resolved-from"]=["#/definitions/"+name];var allOf=definition.allOf;allOf.sort(function(a,b){if(a.$ref&&b.$ref){return 0}else if(a.$ref){return-1}else{return 1}});for(i=0;i=0){for(var j=0;j0){url+="/"}url+=normalized[k]}a.root=url;toResolve.push(a)}else{parts=a.key.split("#");if(parts.length===2){if(parts[0].indexOf("http://")===0||parts[0].indexOf("https://")===0){a.root=parts[0]}location=parts[1].split("/");var r;var s=spec;for(k=0;k1){location=null;break}if(segment.length>0){location=location[segment]}}}var resolved=item.key;parts=item.key.split("/");var resolvedName=parts[parts.length-1];if(resolvedName.indexOf("#")>=0){resolvedName=resolvedName.split("#")[1]}if(location!==null&&typeof location!=="undefined"){resolvedRefs[resolved]={name:resolvedName,obj:location,key:item.key,root:item.root}}else{unresolvedRefs[resolved]={root:item.root,location:item.location}}};Resolver.prototype.finish=function(spec,root,resolutionTable,resolvedRefs,unresolvedRefs,callback){var ref;for(ref in resolutionTable){var item=resolutionTable[ref];var key=item.key;var resolvedTo=resolvedRefs[key];if(resolvedTo){spec.definitions=spec.definitions||{};if(item.resolveAs==="ref"){for(key in resolvedTo.obj){var abs=this.retainRoot(resolvedTo.obj[key],item.root)}spec.definitions[resolvedTo.name]=resolvedTo.obj;item.obj.$ref="#/definitions/"+resolvedTo.name}else if(item.resolveAs==="inline"){var targetObj=item.obj;targetObj["x-resolved-from"]=[item.key];delete targetObj.$ref;for(key in resolvedTo.obj){var abs=this.retainRoot(resolvedTo.obj[key],item.root);targetObj[key]=abs}}}}var existingUnresolved=this.countUnresolvedRefs(spec);if(existingUnresolved.length===0||this.iteration>5){this.resolveAllOf(spec.definitions);callback.call(this.scope,spec,unresolvedRefs)}else{this.iteration+=1;this.resolve(spec,root,callback,this.scope)}};Resolver.prototype.countUnresolvedRefs=function(spec){var i;var refs=this.getRefs(spec);var keys=[];var unresolvedKeys=[];for(i in refs){if(i.indexOf("#")===0){keys.push(i.substring(1))}else{unresolvedKeys.push(i)}}for(i=0;i0){root+="/"}root+=p2[i]}rootTrimmed=true}if(ref.indexOf("#")>=0){if(ref.indexOf("/")===0){rs=ref.split("#");p=root.split("//");p2=p[1].split("/");root=p[0]+"//"+p2[0]+rs[0];location=rs[1]}else{rs=ref.split("#");if(rs[0]!==""){p2=root.split("/");p2=p2.slice(0,p2.length-1);if(!rootTrimmed){root="";for(var k=0;k0){root+="/"}root+=p2[k]}}root+="/"+ref.split("#")[0]}location=rs[1]}}if(ref.indexOf("http")===0){if(ref.indexOf("#")>=0){root=ref.split("#")[0];location=ref.split("#")[1]}else{root=ref;location=""}resolutionTable.push({obj:property,resolveAs:"inline",root:root,key:key,location:location})}else if(ref.indexOf("#")===0){location=ref.split("#")[1];resolutionTable.push({obj:property,resolveAs:"inline",root:root,key:key,location:location})}else{resolutionTable.push({obj:property,resolveAs:"inline",root:root,key:key,location:location})}}else if(property.type==="array"){this.resolveTo(root,property.items,resolutionTable,location)}};Resolver.prototype.resolveTo=function(root,property,resolutionTable,location){var sp,i;var ref=property.$ref;var lroot=root;if(typeof ref!=="undefined"){if(ref.indexOf("#")>=0){var parts=ref.split("#");if(parts[0]&&ref.indexOf("/")===0){}else if(parts[0]&&ref.indexOf("http")===0){}else if(parts[0]&&parts[0].length>0){sp=root.split("/");lroot="";for(i=0;i'+label+":"+value+""}function typeFromJsonSchema(type,format){var str;if(type==="integer"&&format==="int32"){str="integer"}else if(type==="integer"&&format==="int64"){str="long"}else if(type==="integer"&&typeof format==="undefined"){str="long"}else if(type==="string"&&format==="date-time"){str="date-time"}else if(type==="string"&&format==="date"){str="date"}else if(type==="number"&&format==="float"){str="float"}else if(type==="number"&&format==="double"){str="double"}else if(type==="number"&&typeof format==="undefined"){str="double"}else if(type==="boolean"){str="boolean"}else if(type==="string"){str="string"}return str}function getStringSignature(obj,baseComponent){var str="";if(typeof obj.$ref!=="undefined"){str+=Helpers.simpleRef(obj.$ref)}else if(typeof obj.type==="undefined"){str+="object"}else if(obj.type==="array"){if(baseComponent){str+=getStringSignature(obj.items||obj.$ref||{})}else{str+="Array[";str+=getStringSignature(obj.items||obj.$ref||{});str+="]"}}else if(obj.type==="integer"&&obj.format==="int32"){str+="integer"}else if(obj.type==="integer"&&obj.format==="int64"){str+="long"}else if(obj.type==="integer"&&typeof obj.format==="undefined"){str+="long"}else if(obj.type==="string"&&obj.format==="date-time"){str+="date-time"}else if(obj.type==="string"&&obj.format==="date"){str+="date"}else if(obj.type==="string"&&typeof obj.format==="undefined"){str+="string"}else if(obj.type==="number"&&obj.format==="float"){str+="float"}else if(obj.type==="number"&&obj.format==="double"){str+="double"}else if(obj.type==="number"&&typeof obj.format==="undefined"){str+="double"}else if(obj.type==="boolean"){str+="boolean"}else if(obj.$ref){str+=Helpers.simpleRef(obj.$ref)}else{str+=obj.type}return str}function schemaToJSON(schema,models,modelsToIgnore,modelPropertyMacro){schema=Helpers.resolveSchema(schema);if(typeof modelPropertyMacro!=="function"){modelPropertyMacro=function(prop){return(prop||{}).default}}modelsToIgnore=modelsToIgnore||{};var type=schema.type||"object";var format=schema.format;var model;var output;if(schema.example){output=schema.example}else if(_.isUndefined(schema.items)&&_.isArray(schema.enum)){output=schema.enum[0]}if(_.isUndefined(output)){if(schema.$ref){model=models[Helpers.simpleRef(schema.$ref)];if(!_.isUndefined(model)){if(_.isUndefined(modelsToIgnore[model.name])){modelsToIgnore[model.name]=model;output=schemaToJSON(model.definition,models,modelsToIgnore,modelPropertyMacro);delete modelsToIgnore[model.name]}else{if(model.type==="array"){output=[]}else{output={}}}}}else if(!_.isUndefined(schema.default)){output=schema.default}else if(type==="string"){if(format==="date-time"){output=(new Date).toISOString()}else if(format==="date"){output=(new Date).toISOString().split("T")[0]}else{output="string"}}else if(type==="integer"){output=0}else if(type==="number"){output=0}else if(type==="boolean"){output=true}else if(type==="object"){output={};_.forEach(schema.properties,function(property,name){var cProperty=_.cloneDeep(property);cProperty.default=modelPropertyMacro(property);output[name]=schemaToJSON(cProperty,models,modelsToIgnore,modelPropertyMacro)})}else if(type==="array"){output=[];if(_.isArray(schema.items)){_.forEach(schema.items,function(item){output.push(schemaToJSON(item,models,modelsToIgnore,modelPropertyMacro))})}else if(_.isPlainObject(schema.items)){output.push(schemaToJSON(schema.items,models,modelsToIgnore,modelPropertyMacro))}else if(_.isUndefined(schema.items)){output.push({})}else{Helpers.log("Array type's 'items' property is not an array or an object, cannot process")}}}return output}function schemaToHTML(name,schema,models,modelPropertyMacro){var strongOpen='';var strongClose="";if(_.isObject(arguments[0])){name=void 0;schema=arguments[0];models=arguments[1];modelPropertyMacro=arguments[2]}models=models||{};schema=Helpers.resolveSchema(schema);if(_.isEmpty(schema)){return strongOpen+"Empty"+strongClose}if(typeof schema.$ref==="string"){name=Helpers.simpleRef(schema.$ref);schema=models[name];if(typeof schema==="undefined"){return strongOpen+name+" is not defined!"+strongClose}}if(typeof name!=="string"){name=schema.title||"Inline Model"}if(schema.definition){schema=schema.definition}if(typeof modelPropertyMacro!=="function"){modelPropertyMacro=function(prop){return(prop||{}).default}}var references={};var seenModels=[];var inlineModels=0;var html=processModel(schema,name);while(_.keys(references).length>0){_.forEach(references,function(schema,name){var seenModel=_.indexOf(seenModels,name)>-1;delete references[name];if(!seenModel){seenModels.push(name);html+="
    "+processModel(schema,name)}})}return html;function addReference(schema,name,skipRef){var modelName=name;var model;if(schema.$ref){modelName=schema.title||Helpers.simpleRef(schema.$ref);model=models[modelName]}else if(_.isUndefined(name)){modelName=schema.title||"Inline Model "+ ++inlineModels;model={definition:schema}}if(skipRef!==true){references[modelName]=_.isUndefined(model)?{}:model.definition}return modelName}function primitiveToHTML(schema){var html='';var type=schema.type||"object";if(schema.$ref){html+=addReference(schema,Helpers.simpleRef(schema.$ref))}else if(type==="object"){if(!_.isUndefined(schema.properties)){html+=addReference(schema)}else{html+="object"}}else if(type==="array"){html+="Array[";if(_.isArray(schema.items)){html+=_.map(schema.items,addReference).join(",")}else if(_.isPlainObject(schema.items)){if(_.isUndefined(schema.items.$ref)){if(!_.isUndefined(schema.items.type)&&_.indexOf(["array","object"],schema.items.type)===-1){html+=schema.items.type}else{html+=addReference(schema.items)}}else{html+=addReference(schema.items,Helpers.simpleRef(schema.items.$ref))}}else{Helpers.log("Array type's 'items' schema is not an array or an object, cannot process");html+="object"}html+="]"}else{html+=schema.type}html+="";return html}function primitiveToOptionsHTML(schema,html){var options="";var type=schema.type||"object";var isArray=type==="array";if(isArray){if(_.isPlainObject(schema.items)&&!_.isUndefined(schema.items.type)){type=schema.items.type}else{type="object"}}if(!_.isUndefined(schema.default)){options+=optionHtml("Default",schema.default)}switch(type){case"string":if(schema.minLength){options+=optionHtml("Min. Length",schema.minLength)}if(schema.maxLength){options+=optionHtml("Max. Length",schema.maxLength)}if(schema.pattern){options+=optionHtml("Reg. Exp.",schema.pattern)}break;case"integer":case"number":if(schema.minimum){options+=optionHtml("Min. Value",schema.minimum)}if(schema.exclusiveMinimum){options+=optionHtml("Exclusive Min.","true")}if(schema.maximum){options+=optionHtml("Max. Value",schema.maximum)}if(schema.exclusiveMaximum){options+=optionHtml("Exclusive Max.","true")}if(schema.multipleOf){options+=optionHtml("Multiple Of",schema.multipleOf)}break}if(isArray){if(schema.minItems){options+=optionHtml("Min. Items",schema.minItems)}if(schema.maxItems){options+=optionHtml("Max. Items",schema.maxItems)}if(schema.uniqueItems){options+=optionHtml("Unique Items","true")}if(schema.collectionFormat){options+=optionHtml("Coll. Format",schema.collectionFormat)}}if(_.isUndefined(schema.items)){if(_.isArray(schema.enum)){var enumString;if(type==="number"||type==="integer"){enumString=schema.enum.join(", ")}else{enumString='"'+schema.enum.join('", "')+'"'}options+=optionHtml("Enum",enumString)}}if(options.length>0){html=''+html+'"+options+"
    '+type+"
    "}return html}function processModel(schema,name){var type=schema.type||"object";var isArray=schema.type==="array";var html=strongOpen+name+" "+(isArray?"[":"{")+strongClose;if(name){seenModels.push(name)}if(isArray){if(_.isArray(schema.items)){html+="
    "+_.map(schema.items,function(item){var type=item.type||"object";if(_.isUndefined(item.$ref)){if(_.indexOf(["array","object"],type)>-1){if(type==="object"&&_.isUndefined(item.properties)){return"object"}else{return addReference(item)}}else{return primitiveToOptionsHTML(item,type)}}else{return addReference(item,Helpers.simpleRef(item.$ref))}}).join(",
    ")}else if(_.isPlainObject(schema.items)){if(_.isUndefined(schema.items.$ref)){if(_.indexOf(["array","object"],schema.items.type||"object")>-1){if((_.isUndefined(schema.items.type)||schema.items.type==="object")&&_.isUndefined(schema.items.properties)){html+="
    object
    "}else{html+="
    "+addReference(schema.items)+"
    "}}else{html+="
    "+primitiveToOptionsHTML(schema.items,schema.items.type)+"
    "}}else{html+="
    "+addReference(schema.items,Helpers.simpleRef(schema.items.$ref))+"
    "}}else{Helpers.log("Array type's 'items' property is not an array or an object, cannot process");html+="
    object
    "}}else{if(schema.$ref){html+="
    "+addReference(schema,name)+"
    "}else if(type==="object"){html+="
    ";if(_.isPlainObject(schema.properties)){html+=_.map(schema.properties,function(property,name){var propertyIsRequired=_.indexOf(schema.required,name)>=0;var cProperty=_.cloneDeep(property);var requiredClass=propertyIsRequired?"required":"";var html=''+name+" (";var model;cProperty.default=modelPropertyMacro(cProperty);cProperty=Helpers.resolveSchema(cProperty);if(!_.isUndefined(cProperty.$ref)){model=models[Helpers.simpleRef(cProperty.$ref)];if(!_.isUndefined(model)&&_.indexOf([undefined,"array","object"],model.definition.type)===-1){cProperty=Helpers.resolveSchema(model.definition)}}html+=primitiveToHTML(cProperty);if(!propertyIsRequired){html+=', optional'}html+=")";if(!_.isUndefined(cProperty.description)){html+=": "+''+cProperty.description+""}if(cProperty.enum){html+=' = [\''+cProperty.enum.join("', '")+"']"}return primitiveToOptionsHTML(cProperty,html)}).join(",
    ")}html+="
    "}else{html+="
    "+primitiveToOptionsHTML(schema,type)+"
    "}}return html+strongOpen+(isArray?"]":"}")+strongClose}}},{"./helpers":4,"lodash-compat/array/indexOf":52,"lodash-compat/collection/forEach":57,"lodash-compat/collection/map":59,"lodash-compat/lang/cloneDeep":141,"lodash-compat/lang/isArray":143,"lodash-compat/lang/isEmpty":144,"lodash-compat/lang/isObject":147,"lodash-compat/lang/isPlainObject":148,"lodash-compat/lang/isUndefined":151,"lodash-compat/object/keys":152}],8:[function(require,module,exports){"use strict";var SwaggerHttp=require("./http");var _={isObject:require("lodash-compat/lang/isObject")};var SwaggerSpecConverter=module.exports=function(){this.errors=[];this.warnings=[];this.modelMap={}};SwaggerSpecConverter.prototype.setDocumentationLocation=function(location){this.docLocation=location};SwaggerSpecConverter.prototype.convert=function(obj,clientAuthorizations,callback){if(!obj||!Array.isArray(obj.apis)){return this.finish(callback,null)}this.clientAuthorizations=clientAuthorizations;var swagger={swagger:"2.0"};swagger.originalVersion=obj.swaggerVersion;this.apiInfo(obj,swagger);this.securityDefinitions(obj,swagger);if(obj.basePath){this.setDocumentationLocation(obj.basePath)}var isSingleFileSwagger=false;var i;for(i=0;i0){swagger.host=p.substring(0,pos);swagger.basePath=p.substring(pos)}else{swagger.host=p;swagger.basePath="/"}}else if(obj.basePath.indexOf("https://")===0){p=obj.basePath.substring("https://".length);pos=p.indexOf("/");if(pos>0){swagger.host=p.substring(0,pos);swagger.basePath=p.substring(pos)}else{swagger.host=p;swagger.basePath="/"}}else{swagger.basePath=obj.basePath}var resourceLevelAuth;if(obj.authorizations){resourceLevelAuth=obj.authorizations}if(obj.consumes){swagger.consumes=obj.consumes}if(obj.produces){swagger.produces=obj.produces}if(_.isObject(obj)){for(name in obj.models){var existingModel=obj.models[name];var key=existingModel.id||name;this.modelMap[key]=name}}for(i=0;i0){schema["enum"]=_enum}schema.required=existingModel.required;swagger.definitions[name]=schema}};SwaggerSpecConverter.prototype.extractTag=function(resourcePath){var pathString=resourcePath||"default";if(pathString.indexOf("http:")===0||pathString.indexOf("https:")===0){pathString=pathString.split(["/"]);pathString=pathString[pathString.length-1].substring()}if(pathString.endsWith(".json")){pathString=pathString.substring(0,pathString.length-".json".length)}return pathString.replace("/","")};SwaggerSpecConverter.prototype.operations=function(path,resourcePath,obj,resourceLevelAuth,swagger){if(!Array.isArray(obj)){return}var i;if(!swagger.paths){swagger.paths={}}var pathObj=swagger.paths[path]||{};var tag=this.extractTag(resourcePath);swagger.tags=swagger.tags||[];var matched=false;for(i=0;i0){docLocation=docLocation.substring(0,pos)}}}var location=docLocation;if(path.indexOf("http://")===0||path.indexOf("https://")===0){location=path}else{if(docLocation.endsWith("/")){location=docLocation.substring(0,docLocation.length-1)}location+=path}location=location.replace("{format}","json");return location};SwaggerSpecConverter.prototype.securityDefinitions=function(obj,swagger){if(obj.authorizations){var name;for(name in obj.authorizations){var isValid=false;var securityDefinition={};var definition=obj.authorizations[name];if(definition.type==="apiKey"){securityDefinition.type="apiKey";securityDefinition.in=definition.passAs;securityDefinition.name=definition.keyname||name;isValid=true}else if(definition.type==="oauth2"){var existingScopes=definition.scopes||[];var scopes={};var i;for(i in existingScopes){var scope=existingScopes[i];scopes[scope.scope]=scope.description}securityDefinition.type="oauth2";if(i>0){securityDefinition.scopes=scopes}if(definition.grantTypes){if(definition.grantTypes.implicit){var implicit=definition.grantTypes.implicit;securityDefinition.flow="implicit";securityDefinition.authorizationUrl=implicit.loginEndpoint;isValid=true}if(definition.grantTypes["authorization_code"]){if(!securityDefinition.flow){var authCode=definition.grantTypes["authorization_code"];securityDefinition.flow="accessCode";securityDefinition.authorizationUrl=authCode.tokenRequestEndpoint.url;securityDefinition.tokenUrl=authCode.tokenEndpoint.url;isValid=true}}}}if(isValid){swagger.securityDefinitions=swagger.securityDefinitions||{};swagger.securityDefinitions[name]=securityDefinition}}}};SwaggerSpecConverter.prototype.apiInfo=function(obj,swagger){if(obj.info){var info=obj.info;swagger.info={};if(info.contact){swagger.info.contact={};swagger.info.contact.email=info.contact}if(info.description){swagger.info.description=info.description}if(info.title){swagger.info.title=info.title}if(info.termsOfServiceUrl){swagger.info.termsOfService=info.termsOfServiceUrl}if(info.license||info.licenseUrl){swagger.license={};if(info.license){swagger.license.name=info.license}if(info.licenseUrl){swagger.license.url=info.licenseUrl}}}else{this.warnings.push("missing info section")}};SwaggerSpecConverter.prototype.finish=function(callback,obj){callback(obj)}},{"./http":5,"lodash-compat/lang/isObject":147}],9:[function(require,module,exports){"use strict";var _={isPlainObject:require("lodash-compat/lang/isPlainObject"),isString:require("lodash-compat/lang/isString")};var SchemaMarkup=require("../schema-markup.js");var jsyaml=require("js-yaml");var Model=module.exports=function(name,definition,models,modelPropertyMacro){this.definition=definition||{};this.isArray=definition.type==="array";this.models=models||{};this.name=definition.title||name||"Inline Model";this.modelPropertyMacro=modelPropertyMacro||function(property){return property.default};return this};Model.prototype.createJSONSample=Model.prototype.getSampleValue=function(modelsToIgnore){modelsToIgnore=modelsToIgnore||{};modelsToIgnore[this.name]=this;if(this.examples&&_.isPlainObject(this.examples)&&this.examples["application/json"]){this.definition.example=this.examples["application/json"];if(_.isString(this.definition.example)){this.definition.example=jsyaml.safeLoad(this.definition.example)}}else if(!this.definition.example){this.definition.example=this.examples}return SchemaMarkup.schemaToJSON(this.definition,this.models,modelsToIgnore,this.modelPropertyMacro)};Model.prototype.getMockSignature=function(){return SchemaMarkup.schemaToHTML(this.name,this.definition,this.models,this.modelPropertyMacro)}},{"../schema-markup.js":7,"js-yaml":21,"lodash-compat/lang/isPlainObject":148,"lodash-compat/lang/isString":149}],10:[function(require,module,exports){"use strict";var _={cloneDeep:require("lodash-compat/lang/cloneDeep"),isUndefined:require("lodash-compat/lang/isUndefined"),isEmpty:require("lodash-compat/lang/isEmpty"),isObject:require("lodash-compat/lang/isObject")};var helpers=require("../helpers");var Model=require("./model");var SwaggerHttp=require("../http");var Operation=module.exports=function(parent,scheme,operationId,httpMethod,path,args,definitions,models,clientAuthorizations){var errors=[];parent=parent||{};args=args||{};if(parent&&parent.options){this.client=parent.options.client||null;this.responseInterceptor=parent.options.responseInterceptor||null}this.authorizations=args.security;this.basePath=parent.basePath||"/";this.clientAuthorizations=clientAuthorizations;this.consumes=args.consumes||parent.consumes||["application/json"];this.produces=args.produces||parent.produces||["application/json"];this.deprecated=args.deprecated;this.description=args.description;this.host=parent.host||"localhost";this.method=httpMethod||errors.push("Operation "+operationId+" is missing method.");this.models=models||{};this.nickname=operationId||errors.push("Operations must have a nickname.");this.operation=args;this.operations={};this.parameters=args!==null?args.parameters||[]:{};this.parent=parent;this.path=path||errors.push("Operation "+this.nickname+" is missing path.");this.responses=args.responses||{};this.scheme=scheme||parent.scheme||"http";this.schemes=args.schemes||parent.schemes;this.security=args.security;this.summary=args.summary||"";this.type=null;this.useJQuery=parent.useJQuery;this.parameterMacro=parent.parameterMacro||function(operation,parameter){return parameter.default};this.inlineModels=[];if(typeof this.deprecated==="string"){switch(this.deprecated.toLowerCase()){case"true":case"yes":case"1":{this.deprecated=true;break}case"false":case"no":case"0":case null:{this.deprecated=false;break}default:this.deprecated=Boolean(this.deprecated)}}var i,model;if(definitions){var key;for(key in definitions){model=new Model(key,definitions[key],this.models,parent.modelPropertyMacro);if(model){this.models[key]=model}}}else{definitions={}}for(i=0;i0){if(this.resource&&this.resource.api&&this.resource.api.fail){this.resource.api.fail(errors)}}return this};Operation.prototype.isDefaultArrayItemValue=function(value,param){if(param.default&&Array.isArray(param.default)){return param.default.indexOf(value)!==-1}return value===param.default};Operation.prototype.getType=function(param){var type=param.type;var format=param.format;var isArray=false;var str;if(type==="integer"&&format==="int32"){str="integer"}else if(type==="integer"&&format==="int64"){str="long"}else if(type==="integer"){str="integer"}else if(type==="string"){if(format==="date-time"){str="date-time"}else if(format==="date"){str="date"}else{str="string"; }}else if(type==="number"&&format==="float"){str="float"}else if(type==="number"&&format==="double"){str="double"}else if(type==="number"){str="double"}else if(type==="boolean"){str="boolean"}else if(type==="array"){isArray=true;if(param.items){str=this.getType(param.items)}}if(param.$ref){str=helpers.simpleRef(param.$ref)}var schema=param.schema;if(schema){var ref=schema.$ref;if(ref){ref=helpers.simpleRef(ref);if(isArray){return[ref]}else{return ref}}else{if(schema.type==="object"){return this.addInlineModel(schema)}return this.getType(schema)}}if(isArray){return[str]}else{return str}};Operation.prototype.addInlineModel=function(schema){var len=this.inlineModels.length;var model=this.resolveModel(schema,{});if(model){this.inlineModels.push(model);return"Inline Model "+len}return null};Operation.prototype.getInlineModel=function(inlineStr){if(/^Inline Model \d+$/.test(inlineStr)){var id=parseInt(inlineStr.substr("Inline Model".length).trim(),10);var model=this.inlineModels[id];return model}return null};Operation.prototype.resolveModel=function(schema,definitions){if(typeof schema.$ref!=="undefined"){var ref=schema.$ref;if(ref.indexOf("#/definitions/")===0){ref=ref.substring("#/definitions/".length)}if(definitions[ref]){return new Model(ref,definitions[ref],this.models,this.parent.modelPropertyMacro)}}else if(schema&&typeof schema==="object"&&(schema.type==="object"||_.isUndefined(schema.type))){return new Model(undefined,schema,this.models,this.parent.modelPropertyMacro)}return null};Operation.prototype.help=function(dontPrint){var out=this.nickname+": "+this.summary+"\n";for(var i=0;i=0){if(opts.useJQuery){var bodyParam=new FormData;bodyParam.type="formData";for(key in formParams){value=args[key];if(typeof value!=="undefined"){if(value.type==="file"&&value.value){delete headers["Content-Type"];bodyParam.append(key,value.value)}else{bodyParam.append(key,value)}}}body=bodyParam}}return body};Operation.prototype.getModelSampleJSON=function(type,models){var listType,sampleJson,innerType;models=models||{};listType=type instanceof Array;innerType=listType?type[0]:type;if(models[innerType]){sampleJson=models[innerType].createJSONSample()}else if(this.getInlineModel(innerType)){sampleJson=this.getInlineModel(innerType).createJSONSample()}if(sampleJson){sampleJson=listType?[sampleJson]:sampleJson;if(typeof sampleJson==="string"){return sampleJson}else if(_.isObject(sampleJson)){var t=sampleJson;if(sampleJson instanceof Array&&sampleJson.length>0){t=sampleJson[0]}if(t.nodeName){var xmlString=(new XMLSerializer).serializeToString(t);return this.formatXml(xmlString)}else{return JSON.stringify(sampleJson,null,2)}}else{return sampleJson}}};Operation.prototype.do=function(args,opts,callback,error,parent){return this.execute(args,opts,callback,error,parent)};Operation.prototype.execute=function(arg1,arg2,arg3,arg4,parent){var args=arg1||{};var opts={},success,error;if(_.isObject(arg2)){opts=arg2;success=arg3;error=arg4}if(this.client){opts.client=this.client}if(this.responseInterceptor){opts.responseInterceptor=this.responseInterceptor}if(typeof arg2==="function"){success=arg2;error=arg3}success=success||this.parent.defaultSuccessCallback||helpers.log;error=error||this.parent.defaultErrorCallback||helpers.log;if(typeof opts.useJQuery==="undefined"){opts.useJQuery=this.useJQuery}var missingParams=this.getMissingParams(args);if(missingParams.length>0){var message="missing required params: "+missingParams;helpers.fail(message);error(message);return}var allHeaders=this.getHeaderParams(args);var contentTypeHeaders=this.setContentTypes(args,opts);var headers={},attrname;for(attrname in allHeaders){headers[attrname]=allHeaders[attrname]}for(attrname in contentTypeHeaders){headers[attrname]=contentTypeHeaders[attrname]}var body=this.getBody(contentTypeHeaders,args,opts);var url=this.urlify(args);if(url.indexOf(".{format}")>0){if(headers){var format=headers.Accept||headers.accept;if(format&&format.indexOf("json")>0){url=url.replace(".{format}",".json")}else if(format&&format.indexOf("xml")>0){url=url.replace(".{format}",".xml")}}}var obj={url:url,method:this.method.toUpperCase(),body:body,useJQuery:opts.useJQuery,headers:headers,on:{response:function(response){return success(response,parent)},error:function(response){return error(response,parent)}}};this.clientAuthorizations.apply(obj,this.operation.security);if(opts.mock===true){return obj}else{(new SwaggerHttp).execute(obj,opts)}};function itemByPriority(col,itemPriority){if(_.isEmpty(itemPriority)){return col[0]}for(var i=0,len=itemPriority.length;i-1){return itemPriority[i]}}return col[0]}Operation.prototype.setContentTypes=function(args,opts){var allDefinedParams=this.parameters;var body;var consumes=args.parameterContentType||itemByPriority(this.consumes,["application/json","application/yaml"]);var accepts=opts.responseContentType||itemByPriority(this.produces,["application/json","application/yaml"]);var definedFileParams=[];var definedFormParams=[];var headers={};var i;for(i=0;i0){if(opts.requestContentType){consumes=opts.requestContentType}else if(definedFileParams.length>0){consumes="multipart/form-data"}else{consumes="application/x-www-form-urlencoded"}}}else{consumes=null}if(consumes&&this.consumes){if(this.consumes.indexOf(consumes)===-1){helpers.log("server doesn't consume "+consumes+", try "+JSON.stringify(this.consumes))}}if(!this.matchesAccept(accepts)){helpers.log("server can't produce "+accepts)}if(consumes&&body!==""||consumes==="application/x-www-form-urlencoded"){headers["Content-Type"]=consumes}if(accepts){headers.Accept=accepts}return headers};Operation.prototype.matchesAccept=function(accepts){if(!accepts||!this.produces){return true}return this.produces.indexOf(accepts)!==-1||this.produces.indexOf("*/*")!==-1};Operation.prototype.asCurl=function(args1,args2){var opts={mock:true};if(typeof args2==="object"){for(var argKey in args2){opts[argKey]=args2[argKey]}}var obj=this.execute(args1,opts);this.clientAuthorizations.apply(obj);var results=[];results.push("-X "+this.method.toUpperCase());if(obj.headers){var key;for(key in obj.headers){results.push('--header "'+key+": "+obj.headers[key]+'"')}}if(obj.body){var body;if(_.isObject(obj.body)){body=JSON.stringify(obj.body)}else{body=obj.body}results.push('-d "'+body.replace(/"/g,'\\"')+'"')}return"curl "+results.join(" ")+' "'+obj.url+'"'};Operation.prototype.encodePathCollection=function(type,name,value){var encoded="";var i;var separator="";if(type==="ssv"){separator="%20"}else if(type==="tsv"){separator="\\t"}else if(type==="pipes"){separator="|"}else{separator=","}for(i=0;i0){encoded+="&"}encoded+=this.encodeQueryParam(name)+"="+this.encodeQueryParam(value[i])}}else{var separator="";if(type==="csv"){separator=","}else if(type==="ssv"){separator="%20"}else if(type==="tsv"){separator="\\t"}else if(type==="pipes"){separator="|"}else if(type==="brackets"){for(i=0;i1)return new Buffer(arg,arguments[1]);return new Buffer(arg)}this.length=0;this.parent=undefined;if(typeof arg==="number"){return fromNumber(this,arg)}if(typeof arg==="string"){return fromString(this,arg,arguments.length>1?arguments[1]:"utf8")}return fromObject(this,arg)}function fromNumber(that,length){that=allocate(that,length<0?0:checked(length)|0);if(!Buffer.TYPED_ARRAY_SUPPORT){for(var i=0;i>>1;if(fromPool)that.parent=rootParent;return that}function checked(length){if(length>=kMaxLength()){throw new RangeError("Attempt to allocate Buffer larger than maximum "+"size: 0x"+kMaxLength().toString(16)+" bytes")}return length|0}function SlowBuffer(subject,encoding){if(!(this instanceof SlowBuffer))return new SlowBuffer(subject,encoding);var buf=new Buffer(subject,encoding);delete buf.parent;return buf}Buffer.isBuffer=function isBuffer(b){return!!(b!=null&&b._isBuffer)};Buffer.compare=function compare(a,b){if(!Buffer.isBuffer(a)||!Buffer.isBuffer(b)){throw new TypeError("Arguments must be Buffers")}if(a===b)return 0;var x=a.length;var y=b.length;var i=0;var len=Math.min(x,y);while(i>>1;case"base64":return base64ToBytes(string).length;default:if(loweredCase)return utf8ToBytes(string).length;encoding=(""+encoding).toLowerCase();loweredCase=true}}}Buffer.byteLength=byteLength;Buffer.prototype.length=undefined;Buffer.prototype.parent=undefined;function slowToString(encoding,start,end){var loweredCase=false;start=start|0;end=end===undefined||end===Infinity?this.length:end|0;if(!encoding)encoding="utf8";if(start<0)start=0;if(end>this.length)end=this.length;if(end<=start)return"";while(true){switch(encoding){case"hex":return hexSlice(this,start,end);case"utf8":case"utf-8":return utf8Slice(this,start,end);case"ascii":return asciiSlice(this,start,end);case"binary":return binarySlice(this,start,end);case"base64":return base64Slice(this,start,end);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return utf16leSlice(this,start,end);default:if(loweredCase)throw new TypeError("Unknown encoding: "+encoding);encoding=(encoding+"").toLowerCase();loweredCase=true}}}Buffer.prototype.toString=function toString(){var length=this.length|0;if(length===0)return"";if(arguments.length===0)return utf8Slice(this,0,length);return slowToString.apply(this,arguments)};Buffer.prototype.equals=function equals(b){if(!Buffer.isBuffer(b))throw new TypeError("Argument must be a Buffer");if(this===b)return true;return Buffer.compare(this,b)===0};Buffer.prototype.inspect=function inspect(){var str="";var max=exports.INSPECT_MAX_BYTES;if(this.length>0){str=this.toString("hex",0,max).match(/.{2}/g).join(" ");if(this.length>max)str+=" ... "}return""};Buffer.prototype.compare=function compare(b){if(!Buffer.isBuffer(b))throw new TypeError("Argument must be a Buffer");if(this===b)return 0;return Buffer.compare(this,b)};Buffer.prototype.indexOf=function indexOf(val,byteOffset){if(byteOffset>2147483647)byteOffset=2147483647;else if(byteOffset<-2147483648)byteOffset=-2147483648;byteOffset>>=0;if(this.length===0)return-1;if(byteOffset>=this.length)return-1;if(byteOffset<0)byteOffset=Math.max(this.length+byteOffset,0);if(typeof val==="string"){if(val.length===0)return-1;return String.prototype.indexOf.call(this,val,byteOffset)}if(Buffer.isBuffer(val)){return arrayIndexOf(this,val,byteOffset)}if(typeof val==="number"){if(Buffer.TYPED_ARRAY_SUPPORT&&Uint8Array.prototype.indexOf==="function"){return Uint8Array.prototype.indexOf.call(this,val,byteOffset)}return arrayIndexOf(this,[val],byteOffset)}function arrayIndexOf(arr,val,byteOffset){var foundIndex=-1;for(var i=0;byteOffset+iremaining){length=remaining}}var strLen=string.length;if(strLen%2!==0)throw new Error("Invalid hex string");if(length>strLen/2){length=strLen/2}for(var i=0;iremaining)length=remaining;if(string.length>0&&(length<0||offset<0)||offset>this.length){throw new RangeError("attempt to write outside buffer bounds")}if(!encoding)encoding="utf8";var loweredCase=false;for(;;){switch(encoding){case"hex":return hexWrite(this,string,offset,length);case"utf8":case"utf-8":return utf8Write(this,string,offset,length);case"ascii":return asciiWrite(this,string,offset,length);case"binary":return binaryWrite(this,string,offset,length);case"base64":return base64Write(this,string,offset,length);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ucs2Write(this,string,offset,length);default:if(loweredCase)throw new TypeError("Unknown encoding: "+encoding);encoding=(""+encoding).toLowerCase();loweredCase=true}}};Buffer.prototype.toJSON=function toJSON(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function base64Slice(buf,start,end){if(start===0&&end===buf.length){return base64.fromByteArray(buf)}else{return base64.fromByteArray(buf.slice(start,end))}}function utf8Slice(buf,start,end){var res="";var tmp="";end=Math.min(buf.length,end);for(var i=start;ilen)end=len;var out="";for(var i=start;ilen){start=len}if(end<0){end+=len;if(end<0)end=0}else if(end>len){end=len}if(endlength)throw new RangeError("Trying to access beyond buffer length")}Buffer.prototype.readUIntLE=function readUIntLE(offset,byteLength,noAssert){offset=offset|0;byteLength=byteLength|0;if(!noAssert)checkOffset(offset,byteLength,this.length);var val=this[offset];var mul=1;var i=0;while(++i0&&(mul*=256)){val+=this[offset+--byteLength]*mul}return val};Buffer.prototype.readUInt8=function readUInt8(offset,noAssert){if(!noAssert)checkOffset(offset,1,this.length);return this[offset]};Buffer.prototype.readUInt16LE=function readUInt16LE(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);return this[offset]|this[offset+1]<<8};Buffer.prototype.readUInt16BE=function readUInt16BE(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);return this[offset]<<8|this[offset+1]};Buffer.prototype.readUInt32LE=function readUInt32LE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return(this[offset]|this[offset+1]<<8|this[offset+2]<<16)+this[offset+3]*16777216};Buffer.prototype.readUInt32BE=function readUInt32BE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return this[offset]*16777216+(this[offset+1]<<16|this[offset+2]<<8|this[offset+3])};Buffer.prototype.readIntLE=function readIntLE(offset,byteLength,noAssert){offset=offset|0;byteLength=byteLength|0;if(!noAssert)checkOffset(offset,byteLength,this.length);var val=this[offset];var mul=1;var i=0;while(++i=mul)val-=Math.pow(2,8*byteLength);return val};Buffer.prototype.readIntBE=function readIntBE(offset,byteLength,noAssert){offset=offset|0;byteLength=byteLength|0;if(!noAssert)checkOffset(offset,byteLength,this.length);var i=byteLength;var mul=1;var val=this[offset+--i];while(i>0&&(mul*=256)){val+=this[offset+--i]*mul}mul*=128;if(val>=mul)val-=Math.pow(2,8*byteLength);return val};Buffer.prototype.readInt8=function readInt8(offset,noAssert){if(!noAssert)checkOffset(offset,1,this.length);if(!(this[offset]&128))return this[offset];return(255-this[offset]+1)*-1};Buffer.prototype.readInt16LE=function readInt16LE(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);var val=this[offset]|this[offset+1]<<8;return val&32768?val|4294901760:val};Buffer.prototype.readInt16BE=function readInt16BE(offset,noAssert){if(!noAssert)checkOffset(offset,2,this.length);var val=this[offset+1]|this[offset]<<8;return val&32768?val|4294901760:val};Buffer.prototype.readInt32LE=function readInt32LE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return this[offset]|this[offset+1]<<8|this[offset+2]<<16|this[offset+3]<<24};Buffer.prototype.readInt32BE=function readInt32BE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return this[offset]<<24|this[offset+1]<<16|this[offset+2]<<8|this[offset+3]};Buffer.prototype.readFloatLE=function readFloatLE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return ieee754.read(this,offset,true,23,4)};Buffer.prototype.readFloatBE=function readFloatBE(offset,noAssert){if(!noAssert)checkOffset(offset,4,this.length);return ieee754.read(this,offset,false,23,4)};Buffer.prototype.readDoubleLE=function readDoubleLE(offset,noAssert){if(!noAssert)checkOffset(offset,8,this.length);return ieee754.read(this,offset,true,52,8)};Buffer.prototype.readDoubleBE=function readDoubleBE(offset,noAssert){if(!noAssert)checkOffset(offset,8,this.length);return ieee754.read(this,offset,false,52,8)};function checkInt(buf,value,offset,ext,max,min){if(!Buffer.isBuffer(buf))throw new TypeError("buffer must be a Buffer instance");if(value>max||valuebuf.length)throw new RangeError("index out of range")}Buffer.prototype.writeUIntLE=function writeUIntLE(value,offset,byteLength,noAssert){value=+value;offset=offset|0;byteLength=byteLength|0;if(!noAssert)checkInt(this,value,offset,byteLength,Math.pow(2,8*byteLength),0);var mul=1;var i=0;this[offset]=value&255;while(++i=0&&(mul*=256)){this[offset+i]=value/mul&255}return offset+byteLength};Buffer.prototype.writeUInt8=function writeUInt8(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,1,255,0);if(!Buffer.TYPED_ARRAY_SUPPORT)value=Math.floor(value);this[offset]=value;return offset+1};function objectWriteUInt16(buf,value,offset,littleEndian){if(value<0)value=65535+value+1;for(var i=0,j=Math.min(buf.length-offset,2);i>>(littleEndian?i:1-i)*8}}Buffer.prototype.writeUInt16LE=function writeUInt16LE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,2,65535,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value;this[offset+1]=value>>>8}else{objectWriteUInt16(this,value,offset,true)}return offset+2};Buffer.prototype.writeUInt16BE=function writeUInt16BE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,2,65535,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>8;this[offset+1]=value}else{objectWriteUInt16(this,value,offset,false)}return offset+2};function objectWriteUInt32(buf,value,offset,littleEndian){if(value<0)value=4294967295+value+1;for(var i=0,j=Math.min(buf.length-offset,4);i>>(littleEndian?i:3-i)*8&255}}Buffer.prototype.writeUInt32LE=function writeUInt32LE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,4,4294967295,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset+3]=value>>>24;this[offset+2]=value>>>16;this[offset+1]=value>>>8;this[offset]=value}else{objectWriteUInt32(this,value,offset,true)}return offset+4};Buffer.prototype.writeUInt32BE=function writeUInt32BE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,4,4294967295,0);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>24;this[offset+1]=value>>>16;this[offset+2]=value>>>8;this[offset+3]=value}else{objectWriteUInt32(this,value,offset,false)}return offset+4};Buffer.prototype.writeIntLE=function writeIntLE(value,offset,byteLength,noAssert){value=+value;offset=offset|0;if(!noAssert){var limit=Math.pow(2,8*byteLength-1);checkInt(this,value,offset,byteLength,limit-1,-limit)}var i=0;var mul=1;var sub=value<0?1:0;this[offset]=value&255;while(++i>0)-sub&255}return offset+byteLength};Buffer.prototype.writeIntBE=function writeIntBE(value,offset,byteLength,noAssert){value=+value;offset=offset|0;if(!noAssert){var limit=Math.pow(2,8*byteLength-1);checkInt(this,value,offset,byteLength,limit-1,-limit)}var i=byteLength-1;var mul=1;var sub=value<0?1:0;this[offset+i]=value&255;while(--i>=0&&(mul*=256)){this[offset+i]=(value/mul>>0)-sub&255}return offset+byteLength};Buffer.prototype.writeInt8=function writeInt8(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,1,127,-128);if(!Buffer.TYPED_ARRAY_SUPPORT)value=Math.floor(value);if(value<0)value=255+value+1; this[offset]=value;return offset+1};Buffer.prototype.writeInt16LE=function writeInt16LE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,2,32767,-32768);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value;this[offset+1]=value>>>8}else{objectWriteUInt16(this,value,offset,true)}return offset+2};Buffer.prototype.writeInt16BE=function writeInt16BE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,2,32767,-32768);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>8;this[offset+1]=value}else{objectWriteUInt16(this,value,offset,false)}return offset+2};Buffer.prototype.writeInt32LE=function writeInt32LE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,4,2147483647,-2147483648);if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value;this[offset+1]=value>>>8;this[offset+2]=value>>>16;this[offset+3]=value>>>24}else{objectWriteUInt32(this,value,offset,true)}return offset+4};Buffer.prototype.writeInt32BE=function writeInt32BE(value,offset,noAssert){value=+value;offset=offset|0;if(!noAssert)checkInt(this,value,offset,4,2147483647,-2147483648);if(value<0)value=4294967295+value+1;if(Buffer.TYPED_ARRAY_SUPPORT){this[offset]=value>>>24;this[offset+1]=value>>>16;this[offset+2]=value>>>8;this[offset+3]=value}else{objectWriteUInt32(this,value,offset,false)}return offset+4};function checkIEEE754(buf,value,offset,ext,max,min){if(value>max||valuebuf.length)throw new RangeError("index out of range");if(offset<0)throw new RangeError("index out of range")}function writeFloat(buf,value,offset,littleEndian,noAssert){if(!noAssert){checkIEEE754(buf,value,offset,4,3.4028234663852886e38,-3.4028234663852886e38)}ieee754.write(buf,value,offset,littleEndian,23,4);return offset+4}Buffer.prototype.writeFloatLE=function writeFloatLE(value,offset,noAssert){return writeFloat(this,value,offset,true,noAssert)};Buffer.prototype.writeFloatBE=function writeFloatBE(value,offset,noAssert){return writeFloat(this,value,offset,false,noAssert)};function writeDouble(buf,value,offset,littleEndian,noAssert){if(!noAssert){checkIEEE754(buf,value,offset,8,1.7976931348623157e308,-1.7976931348623157e308)}ieee754.write(buf,value,offset,littleEndian,52,8);return offset+8}Buffer.prototype.writeDoubleLE=function writeDoubleLE(value,offset,noAssert){return writeDouble(this,value,offset,true,noAssert)};Buffer.prototype.writeDoubleBE=function writeDoubleBE(value,offset,noAssert){return writeDouble(this,value,offset,false,noAssert)};Buffer.prototype.copy=function copy(target,targetStart,start,end){if(!start)start=0;if(!end&&end!==0)end=this.length;if(targetStart>=target.length)targetStart=target.length;if(!targetStart)targetStart=0;if(end>0&&end=this.length)throw new RangeError("sourceStart out of bounds");if(end<0)throw new RangeError("sourceEnd out of bounds");if(end>this.length)end=this.length;if(target.length-targetStart=this.length)throw new RangeError("start out of bounds");if(end<0||end>this.length)throw new RangeError("end out of bounds");var i;if(typeof value==="number"){for(i=start;i55295&&codePoint<57344){if(leadSurrogate){if(codePoint<56320){if((units-=3)>-1)bytes.push(239,191,189);leadSurrogate=codePoint;continue}else{codePoint=leadSurrogate-55296<<10|codePoint-56320|65536;leadSurrogate=null}}else{if(codePoint>56319){if((units-=3)>-1)bytes.push(239,191,189);continue}else if(i+1===length){if((units-=3)>-1)bytes.push(239,191,189);continue}else{leadSurrogate=codePoint;continue}}}else if(leadSurrogate){if((units-=3)>-1)bytes.push(239,191,189);leadSurrogate=null}if(codePoint<128){if((units-=1)<0)break;bytes.push(codePoint)}else if(codePoint<2048){if((units-=2)<0)break;bytes.push(codePoint>>6|192,codePoint&63|128)}else if(codePoint<65536){if((units-=3)<0)break;bytes.push(codePoint>>12|224,codePoint>>6&63|128,codePoint&63|128)}else if(codePoint<2097152){if((units-=4)<0)break;bytes.push(codePoint>>18|240,codePoint>>12&63|128,codePoint>>6&63|128,codePoint&63|128)}else{throw new Error("Invalid code point")}}return bytes}function asciiToBytes(str){var byteArray=[];for(var i=0;i>8;lo=c%256;byteArray.push(lo);byteArray.push(hi)}return byteArray}function base64ToBytes(str){return base64.toByteArray(base64clean(str))}function blitBuffer(src,dst,offset,length){for(var i=0;i=dst.length||i>=src.length)break;dst[i+offset]=src[i]}return i}function decodeUtf8Char(str){try{return decodeURIComponent(str)}catch(err){return String.fromCharCode(65533)}}},{"base64-js":14,ieee754:15,"is-array":16}],14:[function(require,module,exports){var lookup="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";(function(exports){"use strict";var Arr=typeof Uint8Array!=="undefined"?Uint8Array:Array;var PLUS="+".charCodeAt(0);var SLASH="/".charCodeAt(0);var NUMBER="0".charCodeAt(0);var LOWER="a".charCodeAt(0);var UPPER="A".charCodeAt(0);var PLUS_URL_SAFE="-".charCodeAt(0);var SLASH_URL_SAFE="_".charCodeAt(0);function decode(elt){var code=elt.charCodeAt(0);if(code===PLUS||code===PLUS_URL_SAFE)return 62;if(code===SLASH||code===SLASH_URL_SAFE)return 63;if(code0){throw new Error("Invalid string. Length must be a multiple of 4")}var len=b64.length;placeHolders="="===b64.charAt(len-2)?2:"="===b64.charAt(len-1)?1:0;arr=new Arr(b64.length*3/4-placeHolders);l=placeHolders>0?b64.length-4:b64.length;var L=0;function push(v){arr[L++]=v}for(i=0,j=0;i>16);push((tmp&65280)>>8);push(tmp&255)}if(placeHolders===2){tmp=decode(b64.charAt(i))<<2|decode(b64.charAt(i+1))>>4;push(tmp&255)}else if(placeHolders===1){tmp=decode(b64.charAt(i))<<10|decode(b64.charAt(i+1))<<4|decode(b64.charAt(i+2))>>2;push(tmp>>8&255);push(tmp&255)}return arr}function uint8ToBase64(uint8){var i,extraBytes=uint8.length%3,output="",temp,length;function encode(num){return lookup.charAt(num)}function tripletToBase64(num){return encode(num>>18&63)+encode(num>>12&63)+encode(num>>6&63)+encode(num&63)}for(i=0,length=uint8.length-extraBytes;i>2);output+=encode(temp<<4&63);output+="==";break;case 2:temp=(uint8[uint8.length-2]<<8)+uint8[uint8.length-1];output+=encode(temp>>10);output+=encode(temp>>4&63);output+=encode(temp<<2&63);output+="=";break}return output}exports.toByteArray=b64ToByteArray;exports.fromByteArray=uint8ToBase64})(typeof exports==="undefined"?this.base64js={}:exports)},{}],15:[function(require,module,exports){exports.read=function(buffer,offset,isLE,mLen,nBytes){var e,m;var eLen=nBytes*8-mLen-1;var eMax=(1<>1;var nBits=-7;var i=isLE?nBytes-1:0;var d=isLE?-1:1;var s=buffer[offset+i];i+=d;e=s&(1<<-nBits)-1;s>>=-nBits;nBits+=eLen;for(;nBits>0;e=e*256+buffer[offset+i],i+=d,nBits-=8){}m=e&(1<<-nBits)-1;e>>=-nBits;nBits+=mLen;for(;nBits>0;m=m*256+buffer[offset+i],i+=d,nBits-=8){}if(e===0){e=1-eBias}else if(e===eMax){return m?NaN:(s?-1:1)*Infinity}else{m=m+Math.pow(2,mLen);e=e-eBias}return(s?-1:1)*m*Math.pow(2,e-mLen)};exports.write=function(buffer,value,offset,isLE,mLen,nBytes){var e,m,c;var eLen=nBytes*8-mLen-1;var eMax=(1<>1;var rt=mLen===23?Math.pow(2,-24)-Math.pow(2,-77):0;var i=isLE?0:nBytes-1;var d=isLE?1:-1;var s=value<0||value===0&&1/value<0?1:0;value=Math.abs(value);if(isNaN(value)||value===Infinity){m=isNaN(value)?1:0;e=eMax}else{e=Math.floor(Math.log(value)/Math.LN2);if(value*(c=Math.pow(2,-e))<1){e--;c*=2}if(e+eBias>=1){value+=rt/c}else{value+=rt*Math.pow(2,1-eBias)}if(value*c>=2){e++;c/=2}if(e+eBias>=eMax){m=0;e=eMax}else if(e+eBias>=1){m=(value*c-1)*Math.pow(2,mLen);e=e+eBias}else{m=value*Math.pow(2,eBias-1)*Math.pow(2,mLen);e=0}}for(;mLen>=8;buffer[offset+i]=m&255,i+=d,m/=256,mLen-=8){}e=e<0;buffer[offset+i]=e&255,i+=d,e/=256,eLen-=8){}buffer[offset+i-d]|=s*128}},{}],16:[function(require,module,exports){var isArray=Array.isArray;var str=Object.prototype.toString;module.exports=isArray||function(val){return!!val&&"[object Array]"==str.call(val)}},{}],17:[function(require,module,exports){var process=module.exports={};var queue=[];var draining=false;function drainQueue(){if(draining){return}draining=true;var currentQueue;var len=queue.length;while(len){currentQueue=queue;queue=[];var i=-1;while(++i=0&&j=0},isPlainObject:function(obj){if(jQuery.type(obj)!=="object"||obj.nodeType||jQuery.isWindow(obj)){return false}if(obj.constructor&&!hasOwn.call(obj.constructor.prototype,"isPrototypeOf")){return false}return true},isEmptyObject:function(obj){var name;for(name in obj){return false}return true},type:function(obj){if(obj==null){return obj+""}return typeof obj==="object"||typeof obj==="function"?class2type[toString.call(obj)]||"object":typeof obj},globalEval:function(code){var script,indirect=eval;code=jQuery.trim(code);if(code){if(code.indexOf("use strict")===1){script=document.createElement("script");script.text=code;document.head.appendChild(script).parentNode.removeChild(script)}else{indirect(code)}}},camelCase:function(string){return string.replace(rmsPrefix,"ms-").replace(rdashAlpha,fcamelCase)},nodeName:function(elem,name){return elem.nodeName&&elem.nodeName.toLowerCase()===name.toLowerCase()},each:function(obj,callback,args){var value,i=0,length=obj.length,isArray=isArraylike(obj);if(args){if(isArray){for(;i0&&length-1 in obj}var Sizzle=function(window){var i,support,Expr,getText,isXML,tokenize,compile,select,outermostContext,sortInput,hasDuplicate,setDocument,document,docElem,documentIsHTML,rbuggyQSA,rbuggyMatches,matches,contains,expando="sizzle"+1*new Date,preferredDoc=window.document,dirruns=0,done=0,classCache=createCache(),tokenCache=createCache(),compilerCache=createCache(),sortOrder=function(a,b){if(a===b){hasDuplicate=true}return 0},MAX_NEGATIVE=1<<31,hasOwn={}.hasOwnProperty,arr=[],pop=arr.pop,push_native=arr.push,push=arr.push,slice=arr.slice,indexOf=function(list,elem){var i=0,len=list.length;for(;i+~]|"+whitespace+")"+whitespace+"*"),rattributeQuotes=new RegExp("="+whitespace+"*([^\\]'\"]*?)"+whitespace+"*\\]","g"),rpseudo=new RegExp(pseudos),ridentifier=new RegExp("^"+identifier+"$"),matchExpr={ID:new RegExp("^#("+characterEncoding+")"),CLASS:new RegExp("^\\.("+characterEncoding+")"),TAG:new RegExp("^("+characterEncoding.replace("w","w*")+")"),ATTR:new RegExp("^"+attributes),PSEUDO:new RegExp("^"+pseudos),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+whitespace+"*(even|odd|(([+-]|)(\\d*)n|)"+whitespace+"*(?:([+-]|)"+whitespace+"*(\\d+)|))"+whitespace+"*\\)|)","i"),bool:new RegExp("^(?:"+booleans+")$","i"),needsContext:new RegExp("^"+whitespace+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+whitespace+"*((?:-\\d)?\\d*)"+whitespace+"*\\)|)(?=[^-]|$)","i")},rinputs=/^(?:input|select|textarea|button)$/i,rheader=/^h\d$/i,rnative=/^[^{]+\{\s*\[native \w/,rquickExpr=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,rsibling=/[+~]/,rescape=/'|\\/g,runescape=new RegExp("\\\\([\\da-f]{1,6}"+whitespace+"?|("+whitespace+")|.)","ig"),funescape=function(_,escaped,escapedWhitespace){var high="0x"+escaped-65536;return high!==high||escapedWhitespace?escaped:high<0?String.fromCharCode(high+65536):String.fromCharCode(high>>10|55296,high&1023|56320)},unloadHandler=function(){setDocument()};try{push.apply(arr=slice.call(preferredDoc.childNodes),preferredDoc.childNodes);arr[preferredDoc.childNodes.length].nodeType}catch(e){push={apply:arr.length?function(target,els){push_native.apply(target,slice.call(els))}:function(target,els){var j=target.length,i=0;while(target[j++]=els[i++]){}target.length=j-1}}}function Sizzle(selector,context,results,seed){var match,elem,m,nodeType,i,groups,old,nid,newContext,newSelector;if((context?context.ownerDocument||context:preferredDoc)!==document){setDocument(context)}context=context||document;results=results||[];nodeType=context.nodeType;if(typeof selector!=="string"||!selector||nodeType!==1&&nodeType!==9&&nodeType!==11){return results}if(!seed&&documentIsHTML){if(nodeType!==11&&(match=rquickExpr.exec(selector))){if(m=match[1]){if(nodeType===9){elem=context.getElementById(m);if(elem&&elem.parentNode){if(elem.id===m){results.push(elem);return results}}else{return results}}else{if(context.ownerDocument&&(elem=context.ownerDocument.getElementById(m))&&contains(context,elem)&&elem.id===m){results.push(elem);return results}}}else if(match[2]){push.apply(results,context.getElementsByTagName(selector));return results}else if((m=match[3])&&support.getElementsByClassName){push.apply(results,context.getElementsByClassName(m));return results}}if(support.qsa&&(!rbuggyQSA||!rbuggyQSA.test(selector))){nid=old=expando;newContext=context;newSelector=nodeType!==1&&selector;if(nodeType===1&&context.nodeName.toLowerCase()!=="object"){groups=tokenize(selector);if(old=context.getAttribute("id")){nid=old.replace(rescape,"\\$&")}else{context.setAttribute("id",nid)}nid="[id='"+nid+"'] ";i=groups.length;while(i--){groups[i]=nid+toSelector(groups[i])}newContext=rsibling.test(selector)&&testContext(context.parentNode)||context;newSelector=groups.join(",")}if(newSelector){try{push.apply(results,newContext.querySelectorAll(newSelector));return results}catch(qsaError){}finally{if(!old){context.removeAttribute("id")}}}}}return select(selector.replace(rtrim,"$1"),context,results,seed)}function createCache(){var keys=[];function cache(key,value){if(keys.push(key+" ")>Expr.cacheLength){delete cache[keys.shift()]}return cache[key+" "]=value}return cache}function markFunction(fn){fn[expando]=true;return fn}function assert(fn){var div=document.createElement("div");try{return!!fn(div)}catch(e){return false}finally{if(div.parentNode){div.parentNode.removeChild(div)}div=null}}function addHandle(attrs,handler){var arr=attrs.split("|"),i=attrs.length;while(i--){Expr.attrHandle[arr[i]]=handler}}function siblingCheck(a,b){var cur=b&&a,diff=cur&&a.nodeType===1&&b.nodeType===1&&(~b.sourceIndex||MAX_NEGATIVE)-(~a.sourceIndex||MAX_NEGATIVE);if(diff){return diff}if(cur){while(cur=cur.nextSibling){if(cur===b){return-1}}}return a?1:-1}function createInputPseudo(type){return function(elem){var name=elem.nodeName.toLowerCase();return name==="input"&&elem.type===type}}function createButtonPseudo(type){return function(elem){var name=elem.nodeName.toLowerCase();return(name==="input"||name==="button")&&elem.type===type}}function createPositionalPseudo(fn){return markFunction(function(argument){argument=+argument;return markFunction(function(seed,matches){var j,matchIndexes=fn([],seed.length,argument),i=matchIndexes.length;while(i--){if(seed[j=matchIndexes[i]]){seed[j]=!(matches[j]=seed[j])}}})})}function testContext(context){return context&&typeof context.getElementsByTagName!=="undefined"&&context}support=Sizzle.support={};isXML=Sizzle.isXML=function(elem){var documentElement=elem&&(elem.ownerDocument||elem).documentElement;return documentElement?documentElement.nodeName!=="HTML":false};setDocument=Sizzle.setDocument=function(node){var hasCompare,parent,doc=node?node.ownerDocument||node:preferredDoc;if(doc===document||doc.nodeType!==9||!doc.documentElement){return document}document=doc;docElem=doc.documentElement;parent=doc.defaultView;if(parent&&parent!==parent.top){if(parent.addEventListener){parent.addEventListener("unload",unloadHandler,false)}else if(parent.attachEvent){parent.attachEvent("onunload",unloadHandler)}}documentIsHTML=!isXML(doc);support.attributes=assert(function(div){div.className="i";return!div.getAttribute("className")});support.getElementsByTagName=assert(function(div){div.appendChild(doc.createComment(""));return!div.getElementsByTagName("*").length});support.getElementsByClassName=rnative.test(doc.getElementsByClassName);support.getById=assert(function(div){docElem.appendChild(div).id=expando;return!doc.getElementsByName||!doc.getElementsByName(expando).length});if(support.getById){Expr.find["ID"]=function(id,context){if(typeof context.getElementById!=="undefined"&&documentIsHTML){var m=context.getElementById(id);return m&&m.parentNode?[m]:[]}};Expr.filter["ID"]=function(id){var attrId=id.replace(runescape,funescape);return function(elem){return elem.getAttribute("id")===attrId}}}else{delete Expr.find["ID"];Expr.filter["ID"]=function(id){ var attrId=id.replace(runescape,funescape);return function(elem){var node=typeof elem.getAttributeNode!=="undefined"&&elem.getAttributeNode("id");return node&&node.value===attrId}}}Expr.find["TAG"]=support.getElementsByTagName?function(tag,context){if(typeof context.getElementsByTagName!=="undefined"){return context.getElementsByTagName(tag)}else if(support.qsa){return context.querySelectorAll(tag)}}:function(tag,context){var elem,tmp=[],i=0,results=context.getElementsByTagName(tag);if(tag==="*"){while(elem=results[i++]){if(elem.nodeType===1){tmp.push(elem)}}return tmp}return results};Expr.find["CLASS"]=support.getElementsByClassName&&function(className,context){if(documentIsHTML){return context.getElementsByClassName(className)}};rbuggyMatches=[];rbuggyQSA=[];if(support.qsa=rnative.test(doc.querySelectorAll)){assert(function(div){docElem.appendChild(div).innerHTML=""+"";if(div.querySelectorAll("[msallowcapture^='']").length){rbuggyQSA.push("[*^$]="+whitespace+"*(?:''|\"\")")}if(!div.querySelectorAll("[selected]").length){rbuggyQSA.push("\\["+whitespace+"*(?:value|"+booleans+")")}if(!div.querySelectorAll("[id~="+expando+"-]").length){rbuggyQSA.push("~=")}if(!div.querySelectorAll(":checked").length){rbuggyQSA.push(":checked")}if(!div.querySelectorAll("a#"+expando+"+*").length){rbuggyQSA.push(".#.+[+~]")}});assert(function(div){var input=doc.createElement("input");input.setAttribute("type","hidden");div.appendChild(input).setAttribute("name","D");if(div.querySelectorAll("[name=d]").length){rbuggyQSA.push("name"+whitespace+"*[*^$|!~]?=")}if(!div.querySelectorAll(":enabled").length){rbuggyQSA.push(":enabled",":disabled")}div.querySelectorAll("*,:x");rbuggyQSA.push(",.*:")})}if(support.matchesSelector=rnative.test(matches=docElem.matches||docElem.webkitMatchesSelector||docElem.mozMatchesSelector||docElem.oMatchesSelector||docElem.msMatchesSelector)){assert(function(div){support.disconnectedMatch=matches.call(div,"div");matches.call(div,"[s!='']:x");rbuggyMatches.push("!=",pseudos)})}rbuggyQSA=rbuggyQSA.length&&new RegExp(rbuggyQSA.join("|"));rbuggyMatches=rbuggyMatches.length&&new RegExp(rbuggyMatches.join("|"));hasCompare=rnative.test(docElem.compareDocumentPosition);contains=hasCompare||rnative.test(docElem.contains)?function(a,b){var adown=a.nodeType===9?a.documentElement:a,bup=b&&b.parentNode;return a===bup||!!(bup&&bup.nodeType===1&&(adown.contains?adown.contains(bup):a.compareDocumentPosition&&a.compareDocumentPosition(bup)&16))}:function(a,b){if(b){while(b=b.parentNode){if(b===a){return true}}}return false};sortOrder=hasCompare?function(a,b){if(a===b){hasDuplicate=true;return 0}var compare=!a.compareDocumentPosition-!b.compareDocumentPosition;if(compare){return compare}compare=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1;if(compare&1||!support.sortDetached&&b.compareDocumentPosition(a)===compare){if(a===doc||a.ownerDocument===preferredDoc&&contains(preferredDoc,a)){return-1}if(b===doc||b.ownerDocument===preferredDoc&&contains(preferredDoc,b)){return 1}return sortInput?indexOf(sortInput,a)-indexOf(sortInput,b):0}return compare&4?-1:1}:function(a,b){if(a===b){hasDuplicate=true;return 0}var cur,i=0,aup=a.parentNode,bup=b.parentNode,ap=[a],bp=[b];if(!aup||!bup){return a===doc?-1:b===doc?1:aup?-1:bup?1:sortInput?indexOf(sortInput,a)-indexOf(sortInput,b):0}else if(aup===bup){return siblingCheck(a,b)}cur=a;while(cur=cur.parentNode){ap.unshift(cur)}cur=b;while(cur=cur.parentNode){bp.unshift(cur)}while(ap[i]===bp[i]){i++}return i?siblingCheck(ap[i],bp[i]):ap[i]===preferredDoc?-1:bp[i]===preferredDoc?1:0};return doc};Sizzle.matches=function(expr,elements){return Sizzle(expr,null,null,elements)};Sizzle.matchesSelector=function(elem,expr){if((elem.ownerDocument||elem)!==document){setDocument(elem)}expr=expr.replace(rattributeQuotes,"='$1']");if(support.matchesSelector&&documentIsHTML&&(!rbuggyMatches||!rbuggyMatches.test(expr))&&(!rbuggyQSA||!rbuggyQSA.test(expr))){try{var ret=matches.call(elem,expr);if(ret||support.disconnectedMatch||elem.document&&elem.document.nodeType!==11){return ret}}catch(e){}}return Sizzle(expr,document,null,[elem]).length>0};Sizzle.contains=function(context,elem){if((context.ownerDocument||context)!==document){setDocument(context)}return contains(context,elem)};Sizzle.attr=function(elem,name){if((elem.ownerDocument||elem)!==document){setDocument(elem)}var fn=Expr.attrHandle[name.toLowerCase()],val=fn&&hasOwn.call(Expr.attrHandle,name.toLowerCase())?fn(elem,name,!documentIsHTML):undefined;return val!==undefined?val:support.attributes||!documentIsHTML?elem.getAttribute(name):(val=elem.getAttributeNode(name))&&val.specified?val.value:null};Sizzle.error=function(msg){throw new Error("Syntax error, unrecognized expression: "+msg)};Sizzle.uniqueSort=function(results){var elem,duplicates=[],j=0,i=0;hasDuplicate=!support.detectDuplicates;sortInput=!support.sortStable&&results.slice(0);results.sort(sortOrder);if(hasDuplicate){while(elem=results[i++]){if(elem===results[i]){j=duplicates.push(i)}}while(j--){results.splice(duplicates[j],1)}}sortInput=null;return results};getText=Sizzle.getText=function(elem){var node,ret="",i=0,nodeType=elem.nodeType;if(!nodeType){while(node=elem[i++]){ret+=getText(node)}}else if(nodeType===1||nodeType===9||nodeType===11){if(typeof elem.textContent==="string"){return elem.textContent}else{for(elem=elem.firstChild;elem;elem=elem.nextSibling){ret+=getText(elem)}}}else if(nodeType===3||nodeType===4){return elem.nodeValue}return ret};Expr=Sizzle.selectors={cacheLength:50,createPseudo:markFunction,match:matchExpr,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:true}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:true},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(match){match[1]=match[1].replace(runescape,funescape);match[3]=(match[3]||match[4]||match[5]||"").replace(runescape,funescape);if(match[2]==="~="){match[3]=" "+match[3]+" "}return match.slice(0,4)},CHILD:function(match){match[1]=match[1].toLowerCase();if(match[1].slice(0,3)==="nth"){if(!match[3]){Sizzle.error(match[0])}match[4]=+(match[4]?match[5]+(match[6]||1):2*(match[3]==="even"||match[3]==="odd"));match[5]=+(match[7]+match[8]||match[3]==="odd")}else if(match[3]){Sizzle.error(match[0])}return match},PSEUDO:function(match){var excess,unquoted=!match[6]&&match[2];if(matchExpr["CHILD"].test(match[0])){return null}if(match[3]){match[2]=match[4]||match[5]||""}else if(unquoted&&rpseudo.test(unquoted)&&(excess=tokenize(unquoted,true))&&(excess=unquoted.indexOf(")",unquoted.length-excess)-unquoted.length)){match[0]=match[0].slice(0,excess);match[2]=unquoted.slice(0,excess)}return match.slice(0,3)}},filter:{TAG:function(nodeNameSelector){var nodeName=nodeNameSelector.replace(runescape,funescape).toLowerCase();return nodeNameSelector==="*"?function(){return true}:function(elem){return elem.nodeName&&elem.nodeName.toLowerCase()===nodeName}},CLASS:function(className){var pattern=classCache[className+" "];return pattern||(pattern=new RegExp("(^|"+whitespace+")"+className+"("+whitespace+"|$)"))&&classCache(className,function(elem){return pattern.test(typeof elem.className==="string"&&elem.className||typeof elem.getAttribute!=="undefined"&&elem.getAttribute("class")||"")})},ATTR:function(name,operator,check){return function(elem){var result=Sizzle.attr(elem,name);if(result==null){return operator==="!="}if(!operator){return true}result+="";return operator==="="?result===check:operator==="!="?result!==check:operator==="^="?check&&result.indexOf(check)===0:operator==="*="?check&&result.indexOf(check)>-1:operator==="$="?check&&result.slice(-check.length)===check:operator==="~="?(" "+result.replace(rwhitespace," ")+" ").indexOf(check)>-1:operator==="|="?result===check||result.slice(0,check.length+1)===check+"-":false}},CHILD:function(type,what,argument,first,last){var simple=type.slice(0,3)!=="nth",forward=type.slice(-4)!=="last",ofType=what==="of-type";return first===1&&last===0?function(elem){return!!elem.parentNode}:function(elem,context,xml){var cache,outerCache,node,diff,nodeIndex,start,dir=simple!==forward?"nextSibling":"previousSibling",parent=elem.parentNode,name=ofType&&elem.nodeName.toLowerCase(),useCache=!xml&&!ofType;if(parent){if(simple){while(dir){node=elem;while(node=node[dir]){if(ofType?node.nodeName.toLowerCase()===name:node.nodeType===1){return false}}start=dir=type==="only"&&!start&&"nextSibling"}return true}start=[forward?parent.firstChild:parent.lastChild];if(forward&&useCache){outerCache=parent[expando]||(parent[expando]={});cache=outerCache[type]||[];nodeIndex=cache[0]===dirruns&&cache[1];diff=cache[0]===dirruns&&cache[2];node=nodeIndex&&parent.childNodes[nodeIndex];while(node=++nodeIndex&&node&&node[dir]||(diff=nodeIndex=0)||start.pop()){if(node.nodeType===1&&++diff&&node===elem){outerCache[type]=[dirruns,nodeIndex,diff];break}}}else if(useCache&&(cache=(elem[expando]||(elem[expando]={}))[type])&&cache[0]===dirruns){diff=cache[1]}else{while(node=++nodeIndex&&node&&node[dir]||(diff=nodeIndex=0)||start.pop()){if((ofType?node.nodeName.toLowerCase()===name:node.nodeType===1)&&++diff){if(useCache){(node[expando]||(node[expando]={}))[type]=[dirruns,diff]}if(node===elem){break}}}}diff-=last;return diff===first||diff%first===0&&diff/first>=0}}},PSEUDO:function(pseudo,argument){var args,fn=Expr.pseudos[pseudo]||Expr.setFilters[pseudo.toLowerCase()]||Sizzle.error("unsupported pseudo: "+pseudo);if(fn[expando]){return fn(argument)}if(fn.length>1){args=[pseudo,pseudo,"",argument];return Expr.setFilters.hasOwnProperty(pseudo.toLowerCase())?markFunction(function(seed,matches){var idx,matched=fn(seed,argument),i=matched.length;while(i--){idx=indexOf(seed,matched[i]);seed[idx]=!(matches[idx]=matched[i])}}):function(elem){return fn(elem,0,args)}}return fn}},pseudos:{not:markFunction(function(selector){var input=[],results=[],matcher=compile(selector.replace(rtrim,"$1"));return matcher[expando]?markFunction(function(seed,matches,context,xml){var elem,unmatched=matcher(seed,null,xml,[]),i=seed.length;while(i--){if(elem=unmatched[i]){seed[i]=!(matches[i]=elem)}}}):function(elem,context,xml){input[0]=elem;matcher(input,null,xml,results);input[0]=null;return!results.pop()}}),has:markFunction(function(selector){return function(elem){return Sizzle(selector,elem).length>0}}),contains:markFunction(function(text){text=text.replace(runescape,funescape);return function(elem){return(elem.textContent||elem.innerText||getText(elem)).indexOf(text)>-1}}),lang:markFunction(function(lang){if(!ridentifier.test(lang||"")){Sizzle.error("unsupported lang: "+lang)}lang=lang.replace(runescape,funescape).toLowerCase();return function(elem){var elemLang;do{if(elemLang=documentIsHTML?elem.lang:elem.getAttribute("xml:lang")||elem.getAttribute("lang")){elemLang=elemLang.toLowerCase();return elemLang===lang||elemLang.indexOf(lang+"-")===0}}while((elem=elem.parentNode)&&elem.nodeType===1);return false}}),target:function(elem){var hash=window.location&&window.location.hash;return hash&&hash.slice(1)===elem.id},root:function(elem){return elem===docElem},focus:function(elem){return elem===document.activeElement&&(!document.hasFocus||document.hasFocus())&&!!(elem.type||elem.href||~elem.tabIndex)},enabled:function(elem){return elem.disabled===false},disabled:function(elem){return elem.disabled===true},checked:function(elem){var nodeName=elem.nodeName.toLowerCase();return nodeName==="input"&&!!elem.checked||nodeName==="option"&&!!elem.selected},selected:function(elem){if(elem.parentNode){elem.parentNode.selectedIndex}return elem.selected===true},empty:function(elem){for(elem=elem.firstChild;elem;elem=elem.nextSibling){if(elem.nodeType<6){return false}}return true},parent:function(elem){return!Expr.pseudos["empty"](elem)},header:function(elem){return rheader.test(elem.nodeName)},input:function(elem){return rinputs.test(elem.nodeName)},button:function(elem){var name=elem.nodeName.toLowerCase();return name==="input"&&elem.type==="button"||name==="button"},text:function(elem){var attr;return elem.nodeName.toLowerCase()==="input"&&elem.type==="text"&&((attr=elem.getAttribute("type"))==null||attr.toLowerCase()==="text")},first:createPositionalPseudo(function(){return[0]}),last:createPositionalPseudo(function(matchIndexes,length){return[length-1]}),eq:createPositionalPseudo(function(matchIndexes,length,argument){return[argument<0?argument+length:argument]}),even:createPositionalPseudo(function(matchIndexes,length){var i=0;for(;i=0;){matchIndexes.push(i)}return matchIndexes}),gt:createPositionalPseudo(function(matchIndexes,length,argument){var i=argument<0?argument+length:argument;for(;++i1?function(elem,context,xml){var i=matchers.length;while(i--){if(!matchers[i](elem,context,xml)){return false}}return true}:matchers[0]}function multipleContexts(selector,contexts,results){var i=0,len=contexts.length;for(;i-1){seed[temp]=!(results[temp]=elem)}}}}else{matcherOut=condense(matcherOut===results?matcherOut.splice(preexisting,matcherOut.length):matcherOut);if(postFinder){postFinder(null,results,matcherOut,xml)}else{push.apply(results,matcherOut)}}})}function matcherFromTokens(tokens){var checkContext,matcher,j,len=tokens.length,leadingRelative=Expr.relative[tokens[0].type],implicitRelative=leadingRelative||Expr.relative[" "],i=leadingRelative?1:0,matchContext=addCombinator(function(elem){return elem===checkContext},implicitRelative,true),matchAnyContext=addCombinator(function(elem){return indexOf(checkContext,elem)>-1},implicitRelative,true),matchers=[function(elem,context,xml){var ret=!leadingRelative&&(xml||context!==outermostContext)||((checkContext=context).nodeType?matchContext(elem,context,xml):matchAnyContext(elem,context,xml));checkContext=null;return ret}];for(;i1&&elementMatcher(matchers),i>1&&toSelector(tokens.slice(0,i-1).concat({value:tokens[i-2].type===" "?"*":""})).replace(rtrim,"$1"),matcher,i0,byElement=elementMatchers.length>0,superMatcher=function(seed,context,xml,results,outermost){var elem,j,matcher,matchedCount=0,i="0",unmatched=seed&&[],setMatched=[],contextBackup=outermostContext,elems=seed||byElement&&Expr.find["TAG"]("*",outermost),dirrunsUnique=dirruns+=contextBackup==null?1:Math.random()||.1,len=elems.length;if(outermost){outermostContext=context!==document&&context}for(;i!==len&&(elem=elems[i])!=null;i++){if(byElement&&elem){j=0;while(matcher=elementMatchers[j++]){if(matcher(elem,context,xml)){results.push(elem);break}}if(outermost){dirruns=dirrunsUnique}}if(bySet){if(elem=!matcher&&elem){matchedCount--}if(seed){unmatched.push(elem)}}}matchedCount+=i;if(bySet&&i!==matchedCount){j=0;while(matcher=setMatchers[j++]){matcher(unmatched,setMatched,context,xml)}if(seed){if(matchedCount>0){while(i--){if(!(unmatched[i]||setMatched[i])){setMatched[i]=pop.call(results)}}}setMatched=condense(setMatched)}push.apply(results,setMatched);if(outermost&&!seed&&setMatched.length>0&&matchedCount+setMatchers.length>1){Sizzle.uniqueSort(results)}}if(outermost){dirruns=dirrunsUnique;outermostContext=contextBackup}return unmatched};return bySet?markFunction(superMatcher):superMatcher}compile=Sizzle.compile=function(selector,match){var i,setMatchers=[],elementMatchers=[],cached=compilerCache[selector+" "];if(!cached){if(!match){match=tokenize(selector)}i=match.length;while(i--){cached=matcherFromTokens(match[i]);if(cached[expando]){setMatchers.push(cached)}else{elementMatchers.push(cached)}}cached=compilerCache(selector,matcherFromGroupMatchers(elementMatchers,setMatchers));cached.selector=selector}return cached};select=Sizzle.select=function(selector,context,results,seed){var i,tokens,token,type,find,compiled=typeof selector==="function"&&selector,match=!seed&&tokenize(selector=compiled.selector||selector);results=results||[];if(match.length===1){tokens=match[0]=match[0].slice(0);if(tokens.length>2&&(token=tokens[0]).type==="ID"&&support.getById&&context.nodeType===9&&documentIsHTML&&Expr.relative[tokens[1].type]){context=(Expr.find["ID"](token.matches[0].replace(runescape,funescape),context)||[])[0];if(!context){return results}else if(compiled){context=context.parentNode}selector=selector.slice(tokens.shift().value.length)}i=matchExpr["needsContext"].test(selector)?0:tokens.length;while(i--){token=tokens[i];if(Expr.relative[type=token.type]){break}if(find=Expr.find[type]){if(seed=find(token.matches[0].replace(runescape,funescape),rsibling.test(tokens[0].type)&&testContext(context.parentNode)||context)){tokens.splice(i,1);selector=seed.length&&toSelector(tokens);if(!selector){push.apply(results,seed);return results}break}}}}(compiled||compile(selector,match))(seed,context,!documentIsHTML,results,rsibling.test(selector)&&testContext(context.parentNode)||context);return results};support.sortStable=expando.split("").sort(sortOrder).join("")===expando;support.detectDuplicates=!!hasDuplicate;setDocument();support.sortDetached=assert(function(div1){return div1.compareDocumentPosition(document.createElement("div"))&1});if(!assert(function(div){div.innerHTML="";return div.firstChild.getAttribute("href")==="#"})){addHandle("type|href|height|width",function(elem,name,isXML){if(!isXML){return elem.getAttribute(name,name.toLowerCase()==="type"?1:2)}})}if(!support.attributes||!assert(function(div){div.innerHTML="";div.firstChild.setAttribute("value","");return div.firstChild.getAttribute("value")===""})){addHandle("value",function(elem,name,isXML){if(!isXML&&elem.nodeName.toLowerCase()==="input"){return elem.defaultValue}})}if(!assert(function(div){return div.getAttribute("disabled")==null})){addHandle(booleans,function(elem,name,isXML){var val;if(!isXML){return elem[name]===true?name.toLowerCase():(val=elem.getAttributeNode(name))&&val.specified?val.value:null}})}return Sizzle}(window);jQuery.find=Sizzle;jQuery.expr=Sizzle.selectors;jQuery.expr[":"]=jQuery.expr.pseudos;jQuery.unique=Sizzle.uniqueSort;jQuery.text=Sizzle.getText;jQuery.isXMLDoc=Sizzle.isXML;jQuery.contains=Sizzle.contains;var rneedsContext=jQuery.expr.match.needsContext;var rsingleTag=/^<(\w+)\s*\/?>(?:<\/\1>|)$/;var risSimple=/^.[^:#\[\.,]*$/;function winnow(elements,qualifier,not){if(jQuery.isFunction(qualifier)){return jQuery.grep(elements,function(elem,i){return!!qualifier.call(elem,i,elem)!==not})}if(qualifier.nodeType){return jQuery.grep(elements,function(elem){return elem===qualifier!==not})}if(typeof qualifier==="string"){if(risSimple.test(qualifier)){return jQuery.filter(qualifier,elements,not)}qualifier=jQuery.filter(qualifier,elements)}return jQuery.grep(elements,function(elem){return indexOf.call(qualifier,elem)>=0!==not})}jQuery.filter=function(expr,elems,not){var elem=elems[0];if(not){expr=":not("+expr+")"}return elems.length===1&&elem.nodeType===1?jQuery.find.matchesSelector(elem,expr)?[elem]:[]:jQuery.find.matches(expr,jQuery.grep(elems,function(elem){return elem.nodeType===1}))};jQuery.fn.extend({find:function(selector){var i,len=this.length,ret=[],self=this;if(typeof selector!=="string"){return this.pushStack(jQuery(selector).filter(function(){for(i=0;i1?jQuery.unique(ret):ret);ret.selector=this.selector?this.selector+" "+selector:selector;return ret},filter:function(selector){return this.pushStack(winnow(this,selector||[],false))},not:function(selector){return this.pushStack(winnow(this,selector||[],true))},is:function(selector){return!!winnow(this,typeof selector==="string"&&rneedsContext.test(selector)?jQuery(selector):selector||[],false).length}});var rootjQuery,rquickExpr=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,init=jQuery.fn.init=function(selector,context){var match,elem;if(!selector){return this}if(typeof selector==="string"){if(selector[0]==="<"&&selector[selector.length-1]===">"&&selector.length>=3){match=[null,selector,null]}else{match=rquickExpr.exec(selector)}if(match&&(match[1]||!context)){if(match[1]){context=context instanceof jQuery?context[0]:context;jQuery.merge(this,jQuery.parseHTML(match[1],context&&context.nodeType?context.ownerDocument||context:document,true));if(rsingleTag.test(match[1])&&jQuery.isPlainObject(context)){for(match in context){if(jQuery.isFunction(this[match])){this[match](context[match])}else{this.attr(match,context[match])}}}return this}else{elem=document.getElementById(match[2]);if(elem&&elem.parentNode){this.length=1;this[0]=elem}this.context=document;this.selector=selector;return this}}else if(!context||context.jquery){return(context||rootjQuery).find(selector)}else{return this.constructor(context).find(selector)}}else if(selector.nodeType){this.context=this[0]=selector;this.length=1;return this}else if(jQuery.isFunction(selector)){return typeof rootjQuery.ready!=="undefined"?rootjQuery.ready(selector):selector(jQuery)}if(selector.selector!==undefined){this.selector=selector.selector;this.context=selector.context}return jQuery.makeArray(selector,this)};init.prototype=jQuery.fn;rootjQuery=jQuery(document);var rparentsprev=/^(?:parents|prev(?:Until|All))/,guaranteedUnique={children:true,contents:true,next:true,prev:true};jQuery.extend({dir:function(elem,dir,until){var matched=[],truncate=until!==undefined;while((elem=elem[dir])&&elem.nodeType!==9){if(elem.nodeType===1){if(truncate&&jQuery(elem).is(until)){break}matched.push(elem)}}return matched},sibling:function(n,elem){var matched=[];for(;n;n=n.nextSibling){if(n.nodeType===1&&n!==elem){matched.push(n)}}return matched}});jQuery.fn.extend({has:function(target){var targets=jQuery(target,this),l=targets.length;return this.filter(function(){var i=0;for(;i-1:cur.nodeType===1&&jQuery.find.matchesSelector(cur,selectors))){matched.push(cur);break}}}return this.pushStack(matched.length>1?jQuery.unique(matched):matched)},index:function(elem){if(!elem){return this[0]&&this[0].parentNode?this.first().prevAll().length:-1}if(typeof elem==="string"){return indexOf.call(jQuery(elem),this[0])}return indexOf.call(this,elem.jquery?elem[0]:elem)},add:function(selector,context){return this.pushStack(jQuery.unique(jQuery.merge(this.get(),jQuery(selector,context))))},addBack:function(selector){return this.add(selector==null?this.prevObject:this.prevObject.filter(selector))}});function sibling(cur,dir){while((cur=cur[dir])&&cur.nodeType!==1){}return cur}jQuery.each({parent:function(elem){var parent=elem.parentNode;return parent&&parent.nodeType!==11?parent:null},parents:function(elem){return jQuery.dir(elem,"parentNode")},parentsUntil:function(elem,i,until){return jQuery.dir(elem,"parentNode",until)},next:function(elem){return sibling(elem,"nextSibling")},prev:function(elem){return sibling(elem,"previousSibling")},nextAll:function(elem){return jQuery.dir(elem,"nextSibling")},prevAll:function(elem){return jQuery.dir(elem,"previousSibling")},nextUntil:function(elem,i,until){return jQuery.dir(elem,"nextSibling",until)},prevUntil:function(elem,i,until){return jQuery.dir(elem,"previousSibling",until)},siblings:function(elem){return jQuery.sibling((elem.parentNode||{}).firstChild,elem)},children:function(elem){return jQuery.sibling(elem.firstChild)},contents:function(elem){return elem.contentDocument||jQuery.merge([],elem.childNodes)}},function(name,fn){jQuery.fn[name]=function(until,selector){var matched=jQuery.map(this,fn,until);if(name.slice(-5)!=="Until"){selector=until}if(selector&&typeof selector==="string"){matched=jQuery.filter(selector,matched)}if(this.length>1){if(!guaranteedUnique[name]){jQuery.unique(matched)}if(rparentsprev.test(name)){matched.reverse()}}return this.pushStack(matched)}});var rnotwhite=/\S+/g;var optionsCache={};function createOptions(options){var object=optionsCache[options]={};jQuery.each(options.match(rnotwhite)||[],function(_,flag){object[flag]=true});return object}jQuery.Callbacks=function(options){options=typeof options==="string"?optionsCache[options]||createOptions(options):jQuery.extend({},options);var memory,fired,firing,firingStart,firingLength,firingIndex,list=[],stack=!options.once&&[],fire=function(data){memory=options.memory&&data;fired=true;firingIndex=firingStart||0;firingStart=0;firingLength=list.length;firing=true;for(;list&&firingIndex-1){list.splice(index,1);if(firing){if(index<=firingLength){firingLength--}if(index<=firingIndex){firingIndex--}}}})}return this},has:function(fn){return fn?jQuery.inArray(fn,list)>-1:!!(list&&list.length)},empty:function(){list=[];firingLength=0;return this},disable:function(){list=stack=memory=undefined;return this},disabled:function(){return!list},lock:function(){stack=undefined;if(!memory){self.disable()}return this},locked:function(){return!stack},fireWith:function(context,args){if(list&&(!fired||stack)){args=args||[];args=[context,args.slice?args.slice():args];if(firing){stack.push(args)}else{fire(args)}}return this},fire:function(){self.fireWith(this,arguments);return this},fired:function(){return!!fired}};return self};jQuery.extend({Deferred:function(func){var tuples=[["resolve","done",jQuery.Callbacks("once memory"),"resolved"],["reject","fail",jQuery.Callbacks("once memory"),"rejected"],["notify","progress",jQuery.Callbacks("memory")]],state="pending",promise={state:function(){return state},always:function(){deferred.done(arguments).fail(arguments);return this},then:function(){var fns=arguments;return jQuery.Deferred(function(newDefer){jQuery.each(tuples,function(i,tuple){var fn=jQuery.isFunction(fns[i])&&fns[i];deferred[tuple[1]](function(){var returned=fn&&fn.apply(this,arguments);if(returned&&jQuery.isFunction(returned.promise)){returned.promise().done(newDefer.resolve).fail(newDefer.reject).progress(newDefer.notify)}else{newDefer[tuple[0]+"With"](this===promise?newDefer.promise():this,fn?[returned]:arguments)}})});fns=null}).promise()},promise:function(obj){return obj!=null?jQuery.extend(obj,promise):promise}},deferred={};promise.pipe=promise.then;jQuery.each(tuples,function(i,tuple){var list=tuple[2],stateString=tuple[3];promise[tuple[1]]=list.add;if(stateString){list.add(function(){state=stateString},tuples[i^1][2].disable,tuples[2][2].lock)}deferred[tuple[0]]=function(){deferred[tuple[0]+"With"](this===deferred?promise:this,arguments);return this};deferred[tuple[0]+"With"]=list.fireWith});promise.promise(deferred);if(func){func.call(deferred,deferred)}return deferred},when:function(subordinate){ var i=0,resolveValues=slice.call(arguments),length=resolveValues.length,remaining=length!==1||subordinate&&jQuery.isFunction(subordinate.promise)?length:0,deferred=remaining===1?subordinate:jQuery.Deferred(),updateFunc=function(i,contexts,values){return function(value){contexts[i]=this;values[i]=arguments.length>1?slice.call(arguments):value;if(values===progressValues){deferred.notifyWith(contexts,values)}else if(!--remaining){deferred.resolveWith(contexts,values)}}},progressValues,progressContexts,resolveContexts;if(length>1){progressValues=new Array(length);progressContexts=new Array(length);resolveContexts=new Array(length);for(;i0){return}readyList.resolveWith(document,[jQuery]);if(jQuery.fn.triggerHandler){jQuery(document).triggerHandler("ready");jQuery(document).off("ready")}}});function completed(){document.removeEventListener("DOMContentLoaded",completed,false);window.removeEventListener("load",completed,false);jQuery.ready()}jQuery.ready.promise=function(obj){if(!readyList){readyList=jQuery.Deferred();if(document.readyState==="complete"){setTimeout(jQuery.ready)}else{document.addEventListener("DOMContentLoaded",completed,false);window.addEventListener("load",completed,false)}}return readyList.promise(obj)};jQuery.ready.promise();var access=jQuery.access=function(elems,fn,key,value,chainable,emptyGet,raw){var i=0,len=elems.length,bulk=key==null;if(jQuery.type(key)==="object"){chainable=true;for(i in key){jQuery.access(elems,fn,i,key[i],true,emptyGet,raw)}}else if(value!==undefined){chainable=true;if(!jQuery.isFunction(value)){raw=true}if(bulk){if(raw){fn.call(elems,value);fn=null}else{bulk=fn;fn=function(elem,key,value){return bulk.call(jQuery(elem),value)}}}if(fn){for(;i1,null,true)},removeData:function(key){return this.each(function(){data_user.remove(this,key)})}});jQuery.extend({queue:function(elem,type,data){var queue;if(elem){type=(type||"fx")+"queue";queue=data_priv.get(elem,type);if(data){if(!queue||jQuery.isArray(data)){queue=data_priv.access(elem,type,jQuery.makeArray(data))}else{queue.push(data)}}return queue||[]}},dequeue:function(elem,type){type=type||"fx";var queue=jQuery.queue(elem,type),startLength=queue.length,fn=queue.shift(),hooks=jQuery._queueHooks(elem,type),next=function(){jQuery.dequeue(elem,type)};if(fn==="inprogress"){fn=queue.shift();startLength--}if(fn){if(type==="fx"){queue.unshift("inprogress")}delete hooks.stop;fn.call(elem,next,hooks)}if(!startLength&&hooks){hooks.empty.fire()}},_queueHooks:function(elem,type){var key=type+"queueHooks";return data_priv.get(elem,key)||data_priv.access(elem,key,{empty:jQuery.Callbacks("once memory").add(function(){data_priv.remove(elem,[type+"queue",key])})})}});jQuery.fn.extend({queue:function(type,data){var setter=2;if(typeof type!=="string"){data=type;type="fx";setter--}if(arguments.lengthx";support.noCloneChecked=!!div.cloneNode(true).lastChild.defaultValue})();var strundefined=typeof undefined;support.focusinBubbles="onfocusin"in window;var rkeyEvent=/^key/,rmouseEvent=/^(?:mouse|pointer|contextmenu)|click/,rfocusMorph=/^(?:focusinfocus|focusoutblur)$/,rtypenamespace=/^([^.]*)(?:\.(.+)|)$/;function returnTrue(){return true}function returnFalse(){return false}function safeActiveElement(){try{return document.activeElement}catch(err){}}jQuery.event={global:{},add:function(elem,types,handler,data,selector){var handleObjIn,eventHandle,tmp,events,t,handleObj,special,handlers,type,namespaces,origType,elemData=data_priv.get(elem);if(!elemData){return}if(handler.handler){handleObjIn=handler;handler=handleObjIn.handler;selector=handleObjIn.selector}if(!handler.guid){handler.guid=jQuery.guid++}if(!(events=elemData.events)){events=elemData.events={}}if(!(eventHandle=elemData.handle)){eventHandle=elemData.handle=function(e){return typeof jQuery!==strundefined&&jQuery.event.triggered!==e.type?jQuery.event.dispatch.apply(elem,arguments):undefined}}types=(types||"").match(rnotwhite)||[""];t=types.length;while(t--){tmp=rtypenamespace.exec(types[t])||[];type=origType=tmp[1];namespaces=(tmp[2]||"").split(".").sort();if(!type){continue}special=jQuery.event.special[type]||{};type=(selector?special.delegateType:special.bindType)||type;special=jQuery.event.special[type]||{};handleObj=jQuery.extend({type:type,origType:origType,data:data,handler:handler,guid:handler.guid,selector:selector,needsContext:selector&&jQuery.expr.match.needsContext.test(selector),namespace:namespaces.join(".")},handleObjIn);if(!(handlers=events[type])){handlers=events[type]=[];handlers.delegateCount=0;if(!special.setup||special.setup.call(elem,data,namespaces,eventHandle)===false){if(elem.addEventListener){elem.addEventListener(type,eventHandle,false)}}}if(special.add){special.add.call(elem,handleObj);if(!handleObj.handler.guid){handleObj.handler.guid=handler.guid}}if(selector){handlers.splice(handlers.delegateCount++,0,handleObj)}else{handlers.push(handleObj)}jQuery.event.global[type]=true}},remove:function(elem,types,handler,selector,mappedTypes){var j,origCount,tmp,events,t,handleObj,special,handlers,type,namespaces,origType,elemData=data_priv.hasData(elem)&&data_priv.get(elem);if(!elemData||!(events=elemData.events)){return}types=(types||"").match(rnotwhite)||[""];t=types.length;while(t--){tmp=rtypenamespace.exec(types[t])||[];type=origType=tmp[1];namespaces=(tmp[2]||"").split(".").sort();if(!type){for(type in events){jQuery.event.remove(elem,type+types[t],handler,selector,true)}continue}special=jQuery.event.special[type]||{};type=(selector?special.delegateType:special.bindType)||type;handlers=events[type]||[];tmp=tmp[2]&&new RegExp("(^|\\.)"+namespaces.join("\\.(?:.*\\.|)")+"(\\.|$)");origCount=j=handlers.length;while(j--){handleObj=handlers[j];if((mappedTypes||origType===handleObj.origType)&&(!handler||handler.guid===handleObj.guid)&&(!tmp||tmp.test(handleObj.namespace))&&(!selector||selector===handleObj.selector||selector==="**"&&handleObj.selector)){handlers.splice(j,1);if(handleObj.selector){handlers.delegateCount--}if(special.remove){special.remove.call(elem,handleObj)}}}if(origCount&&!handlers.length){if(!special.teardown||special.teardown.call(elem,namespaces,elemData.handle)===false){jQuery.removeEvent(elem,type,elemData.handle)}delete events[type]}}if(jQuery.isEmptyObject(events)){delete elemData.handle;data_priv.remove(elem,"events")}},trigger:function(event,data,elem,onlyHandlers){var i,cur,tmp,bubbleType,ontype,handle,special,eventPath=[elem||document],type=hasOwn.call(event,"type")?event.type:event,namespaces=hasOwn.call(event,"namespace")?event.namespace.split("."):[];cur=tmp=elem=elem||document;if(elem.nodeType===3||elem.nodeType===8){return}if(rfocusMorph.test(type+jQuery.event.triggered)){return}if(type.indexOf(".")>=0){namespaces=type.split(".");type=namespaces.shift();namespaces.sort()}ontype=type.indexOf(":")<0&&"on"+type;event=event[jQuery.expando]?event:new jQuery.Event(type,typeof event==="object"&&event);event.isTrigger=onlyHandlers?2:3;event.namespace=namespaces.join(".");event.namespace_re=event.namespace?new RegExp("(^|\\.)"+namespaces.join("\\.(?:.*\\.|)")+"(\\.|$)"):null;event.result=undefined;if(!event.target){event.target=elem}data=data==null?[event]:jQuery.makeArray(data,[event]);special=jQuery.event.special[type]||{};if(!onlyHandlers&&special.trigger&&special.trigger.apply(elem,data)===false){return}if(!onlyHandlers&&!special.noBubble&&!jQuery.isWindow(elem)){bubbleType=special.delegateType||type;if(!rfocusMorph.test(bubbleType+type)){cur=cur.parentNode}for(;cur;cur=cur.parentNode){eventPath.push(cur);tmp=cur}if(tmp===(elem.ownerDocument||document)){eventPath.push(tmp.defaultView||tmp.parentWindow||window)}}i=0;while((cur=eventPath[i++])&&!event.isPropagationStopped()){event.type=i>1?bubbleType:special.bindType||type;handle=(data_priv.get(cur,"events")||{})[event.type]&&data_priv.get(cur,"handle");if(handle){handle.apply(cur,data)}handle=ontype&&cur[ontype];if(handle&&handle.apply&&jQuery.acceptData(cur)){event.result=handle.apply(cur,data);if(event.result===false){event.preventDefault()}}}event.type=type;if(!onlyHandlers&&!event.isDefaultPrevented()){if((!special._default||special._default.apply(eventPath.pop(),data)===false)&&jQuery.acceptData(elem)){if(ontype&&jQuery.isFunction(elem[type])&&!jQuery.isWindow(elem)){tmp=elem[ontype];if(tmp){elem[ontype]=null}jQuery.event.triggered=type;elem[type]();jQuery.event.triggered=undefined;if(tmp){elem[ontype]=tmp}}}}return event.result},dispatch:function(event){event=jQuery.event.fix(event);var i,j,ret,matched,handleObj,handlerQueue=[],args=slice.call(arguments),handlers=(data_priv.get(this,"events")||{})[event.type]||[],special=jQuery.event.special[event.type]||{};args[0]=event;event.delegateTarget=this;if(special.preDispatch&&special.preDispatch.call(this,event)===false){return}handlerQueue=jQuery.event.handlers.call(this,event,handlers);i=0;while((matched=handlerQueue[i++])&&!event.isPropagationStopped()){event.currentTarget=matched.elem;j=0;while((handleObj=matched.handlers[j++])&&!event.isImmediatePropagationStopped()){if(!event.namespace_re||event.namespace_re.test(handleObj.namespace)){event.handleObj=handleObj;event.data=handleObj.data;ret=((jQuery.event.special[handleObj.origType]||{}).handle||handleObj.handler).apply(matched.elem,args);if(ret!==undefined){if((event.result=ret)===false){event.preventDefault();event.stopPropagation()}}}}}if(special.postDispatch){special.postDispatch.call(this,event)}return event.result},handlers:function(event,handlers){var i,matches,sel,handleObj,handlerQueue=[],delegateCount=handlers.delegateCount,cur=event.target;if(delegateCount&&cur.nodeType&&(!event.button||event.type!=="click")){for(;cur!==this;cur=cur.parentNode||this){if(cur.disabled!==true||event.type!=="click"){matches=[];for(i=0;i=0:jQuery.find(sel,this,null,[cur]).length}if(matches[sel]){matches.push(handleObj)}}if(matches.length){handlerQueue.push({elem:cur,handlers:matches})}}}}if(delegateCount]*)\/>/gi,rtagName=/<([\w:]+)/,rhtml=/<|&#?\w+;/,rnoInnerhtml=/<(?:script|style|link)/i,rchecked=/checked\s*(?:[^=]|=\s*.checked.)/i,rscriptType=/^$|\/(?:java|ecma)script/i,rscriptTypeMasked=/^true\/(.*)/,rcleanScript=/^\s*\s*$/g,wrapMap={option:[1,""],thead:[1,"","
    "],col:[2,"","
    "],tr:[2,"","
    "],td:[3,"","
    "],_default:[0,"",""]};wrapMap.optgroup=wrapMap.option;wrapMap.tbody=wrapMap.tfoot=wrapMap.colgroup=wrapMap.caption=wrapMap.thead;wrapMap.th=wrapMap.td;function manipulationTarget(elem,content){return jQuery.nodeName(elem,"table")&&jQuery.nodeName(content.nodeType!==11?content:content.firstChild,"tr")?elem.getElementsByTagName("tbody")[0]||elem.appendChild(elem.ownerDocument.createElement("tbody")):elem}function disableScript(elem){elem.type=(elem.getAttribute("type")!==null)+"/"+elem.type;return elem}function restoreScript(elem){var match=rscriptTypeMasked.exec(elem.type);if(match){elem.type=match[1]}else{elem.removeAttribute("type")}return elem}function setGlobalEval(elems,refElements){var i=0,l=elems.length;for(;i0){setGlobalEval(destElements,!inPage&&getAll(elem,"script"))}return clone},buildFragment:function(elems,context,scripts,selection){var elem,tmp,tag,wrap,contains,j,fragment=context.createDocumentFragment(),nodes=[],i=0,l=elems.length;for(;i")+wrap[2];j=wrap[0];while(j--){tmp=tmp.lastChild}jQuery.merge(nodes,tmp.childNodes);tmp=fragment.firstChild;tmp.textContent=""}}}fragment.textContent="";i=0;while(elem=nodes[i++]){if(selection&&jQuery.inArray(elem,selection)!==-1){continue}contains=jQuery.contains(elem.ownerDocument,elem);tmp=getAll(fragment.appendChild(elem),"script");if(contains){setGlobalEval(tmp)}if(scripts){j=0;while(elem=tmp[j++]){if(rscriptType.test(elem.type||"")){scripts.push(elem)}}}}return fragment},cleanData:function(elems){var data,elem,type,key,special=jQuery.event.special,i=0;for(;(elem=elems[i])!==undefined;i++){if(jQuery.acceptData(elem)){key=elem[data_priv.expando];if(key&&(data=data_priv.cache[key])){if(data.events){for(type in data.events){if(special[type]){jQuery.event.remove(elem,type)}else{jQuery.removeEvent(elem,type,data.handle)}}}if(data_priv.cache[key]){delete data_priv.cache[key]}}}delete data_user.cache[elem[data_user.expando]]}}});jQuery.fn.extend({text:function(value){return access(this,function(value){return value===undefined?jQuery.text(this):this.empty().each(function(){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){this.textContent=value}})},null,value,arguments.length)},append:function(){return this.domManip(arguments,function(elem){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var target=manipulationTarget(this,elem);target.appendChild(elem)}})},prepend:function(){return this.domManip(arguments,function(elem){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var target=manipulationTarget(this,elem);target.insertBefore(elem,target.firstChild)}})},before:function(){return this.domManip(arguments,function(elem){if(this.parentNode){this.parentNode.insertBefore(elem,this)}})},after:function(){return this.domManip(arguments,function(elem){if(this.parentNode){this.parentNode.insertBefore(elem,this.nextSibling)}})},remove:function(selector,keepData){var elem,elems=selector?jQuery.filter(selector,this):this,i=0;for(;(elem=elems[i])!=null;i++){if(!keepData&&elem.nodeType===1){jQuery.cleanData(getAll(elem))}if(elem.parentNode){if(keepData&&jQuery.contains(elem.ownerDocument,elem)){setGlobalEval(getAll(elem,"script"))}elem.parentNode.removeChild(elem)}}return this},empty:function(){var elem,i=0;for(;(elem=this[i])!=null;i++){if(elem.nodeType===1){jQuery.cleanData(getAll(elem,false));elem.textContent=""}}return this},clone:function(dataAndEvents,deepDataAndEvents){dataAndEvents=dataAndEvents==null?false:dataAndEvents;deepDataAndEvents=deepDataAndEvents==null?dataAndEvents:deepDataAndEvents;return this.map(function(){return jQuery.clone(this,dataAndEvents,deepDataAndEvents)})},html:function(value){return access(this,function(value){var elem=this[0]||{},i=0,l=this.length;if(value===undefined&&elem.nodeType===1){return elem.innerHTML}if(typeof value==="string"&&!rnoInnerhtml.test(value)&&!wrapMap[(rtagName.exec(value)||["",""])[1].toLowerCase()]){value=value.replace(rxhtmlTag,"<$1>");try{for(;i1&&typeof value==="string"&&!support.checkClone&&rchecked.test(value)){return this.each(function(index){var self=set.eq(index);if(isFunction){args[0]=value.call(this,index,self.html())}self.domManip(args,callback)})}if(l){fragment=jQuery.buildFragment(args,this[0].ownerDocument,false,this);first=fragment.firstChild;if(fragment.childNodes.length===1){fragment=first}if(first){scripts=jQuery.map(getAll(fragment,"script"),disableScript);hasScripts=scripts.length;for(;i")).appendTo(doc.documentElement);doc=iframe[0].contentDocument;doc.write();doc.close();display=actualDisplay(nodeName,doc);iframe.detach()}elemdisplay[nodeName]=display}return display}var rmargin=/^margin/; var rnumnonpx=new RegExp("^("+pnum+")(?!px)[a-z%]+$","i");var getStyles=function(elem){if(elem.ownerDocument.defaultView.opener){return elem.ownerDocument.defaultView.getComputedStyle(elem,null)}return window.getComputedStyle(elem,null)};function curCSS(elem,name,computed){var width,minWidth,maxWidth,ret,style=elem.style;computed=computed||getStyles(elem);if(computed){ret=computed.getPropertyValue(name)||computed[name]}if(computed){if(ret===""&&!jQuery.contains(elem.ownerDocument,elem)){ret=jQuery.style(elem,name)}if(rnumnonpx.test(ret)&&rmargin.test(name)){width=style.width;minWidth=style.minWidth;maxWidth=style.maxWidth;style.minWidth=style.maxWidth=style.width=ret;ret=computed.width;style.width=width;style.minWidth=minWidth;style.maxWidth=maxWidth}}return ret!==undefined?ret+"":ret}function addGetHookIf(conditionFn,hookFn){return{get:function(){if(conditionFn()){delete this.get;return}return(this.get=hookFn).apply(this,arguments)}}}(function(){var pixelPositionVal,boxSizingReliableVal,docElem=document.documentElement,container=document.createElement("div"),div=document.createElement("div");if(!div.style){return}div.style.backgroundClip="content-box";div.cloneNode(true).style.backgroundClip="";support.clearCloneStyle=div.style.backgroundClip==="content-box";container.style.cssText="border:0;width:0;height:0;top:0;left:-9999px;margin-top:1px;"+"position:absolute";container.appendChild(div);function computePixelPositionAndBoxSizingReliable(){div.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;"+"box-sizing:border-box;display:block;margin-top:1%;top:1%;"+"border:1px;padding:1px;width:4px;position:absolute";div.innerHTML="";docElem.appendChild(container);var divStyle=window.getComputedStyle(div,null);pixelPositionVal=divStyle.top!=="1%";boxSizingReliableVal=divStyle.width==="4px";docElem.removeChild(container)}if(window.getComputedStyle){jQuery.extend(support,{pixelPosition:function(){computePixelPositionAndBoxSizingReliable();return pixelPositionVal},boxSizingReliable:function(){if(boxSizingReliableVal==null){computePixelPositionAndBoxSizingReliable()}return boxSizingReliableVal},reliableMarginRight:function(){var ret,marginDiv=div.appendChild(document.createElement("div"));marginDiv.style.cssText=div.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;"+"box-sizing:content-box;display:block;margin:0;border:0;padding:0";marginDiv.style.marginRight=marginDiv.style.width="0";div.style.width="1px";docElem.appendChild(container);ret=!parseFloat(window.getComputedStyle(marginDiv,null).marginRight);docElem.removeChild(container);div.removeChild(marginDiv);return ret}})}})();jQuery.swap=function(elem,options,callback,args){var ret,name,old={};for(name in options){old[name]=elem.style[name];elem.style[name]=options[name]}ret=callback.apply(elem,args||[]);for(name in options){elem.style[name]=old[name]}return ret};var rdisplayswap=/^(none|table(?!-c[ea]).+)/,rnumsplit=new RegExp("^("+pnum+")(.*)$","i"),rrelNum=new RegExp("^([+-])=("+pnum+")","i"),cssShow={position:"absolute",visibility:"hidden",display:"block"},cssNormalTransform={letterSpacing:"0",fontWeight:"400"},cssPrefixes=["Webkit","O","Moz","ms"];function vendorPropName(style,name){if(name in style){return name}var capName=name[0].toUpperCase()+name.slice(1),origName=name,i=cssPrefixes.length;while(i--){name=cssPrefixes[i]+capName;if(name in style){return name}}return origName}function setPositiveNumber(elem,value,subtract){var matches=rnumsplit.exec(value);return matches?Math.max(0,matches[1]-(subtract||0))+(matches[2]||"px"):value}function augmentWidthOrHeight(elem,name,extra,isBorderBox,styles){var i=extra===(isBorderBox?"border":"content")?4:name==="width"?1:0,val=0;for(;i<4;i+=2){if(extra==="margin"){val+=jQuery.css(elem,extra+cssExpand[i],true,styles)}if(isBorderBox){if(extra==="content"){val-=jQuery.css(elem,"padding"+cssExpand[i],true,styles)}if(extra!=="margin"){val-=jQuery.css(elem,"border"+cssExpand[i]+"Width",true,styles)}}else{val+=jQuery.css(elem,"padding"+cssExpand[i],true,styles);if(extra!=="padding"){val+=jQuery.css(elem,"border"+cssExpand[i]+"Width",true,styles)}}}return val}function getWidthOrHeight(elem,name,extra){var valueIsBorderBox=true,val=name==="width"?elem.offsetWidth:elem.offsetHeight,styles=getStyles(elem),isBorderBox=jQuery.css(elem,"boxSizing",false,styles)==="border-box";if(val<=0||val==null){val=curCSS(elem,name,styles);if(val<0||val==null){val=elem.style[name]}if(rnumnonpx.test(val)){return val}valueIsBorderBox=isBorderBox&&(support.boxSizingReliable()||val===elem.style[name]);val=parseFloat(val)||0}return val+augmentWidthOrHeight(elem,name,extra||(isBorderBox?"border":"content"),valueIsBorderBox,styles)+"px"}function showHide(elements,show){var display,elem,hidden,values=[],index=0,length=elements.length;for(;index1)},show:function(){return showHide(this,true)},hide:function(){return showHide(this)},toggle:function(state){if(typeof state==="boolean"){return state?this.show():this.hide()}return this.each(function(){if(isHidden(this)){jQuery(this).show()}else{jQuery(this).hide()}})}});function Tween(elem,options,prop,end,easing){return new Tween.prototype.init(elem,options,prop,end,easing)}jQuery.Tween=Tween;Tween.prototype={constructor:Tween,init:function(elem,options,prop,end,easing,unit){this.elem=elem;this.prop=prop;this.easing=easing||"swing";this.options=options;this.start=this.now=this.cur();this.end=end;this.unit=unit||(jQuery.cssNumber[prop]?"":"px")},cur:function(){var hooks=Tween.propHooks[this.prop];return hooks&&hooks.get?hooks.get(this):Tween.propHooks._default.get(this)},run:function(percent){var eased,hooks=Tween.propHooks[this.prop];if(this.options.duration){this.pos=eased=jQuery.easing[this.easing](percent,this.options.duration*percent,0,1,this.options.duration)}else{this.pos=eased=percent}this.now=(this.end-this.start)*eased+this.start;if(this.options.step){this.options.step.call(this.elem,this.now,this)}if(hooks&&hooks.set){hooks.set(this)}else{Tween.propHooks._default.set(this)}return this}};Tween.prototype.init.prototype=Tween.prototype;Tween.propHooks={_default:{get:function(tween){var result;if(tween.elem[tween.prop]!=null&&(!tween.elem.style||tween.elem.style[tween.prop]==null)){return tween.elem[tween.prop]}result=jQuery.css(tween.elem,tween.prop,"");return!result||result==="auto"?0:result},set:function(tween){if(jQuery.fx.step[tween.prop]){jQuery.fx.step[tween.prop](tween)}else if(tween.elem.style&&(tween.elem.style[jQuery.cssProps[tween.prop]]!=null||jQuery.cssHooks[tween.prop])){jQuery.style(tween.elem,tween.prop,tween.now+tween.unit)}else{tween.elem[tween.prop]=tween.now}}}};Tween.propHooks.scrollTop=Tween.propHooks.scrollLeft={set:function(tween){if(tween.elem.nodeType&&tween.elem.parentNode){tween.elem[tween.prop]=tween.now}}};jQuery.easing={linear:function(p){return p},swing:function(p){return.5-Math.cos(p*Math.PI)/2}};jQuery.fx=Tween.prototype.init;jQuery.fx.step={};var fxNow,timerId,rfxtypes=/^(?:toggle|show|hide)$/,rfxnum=new RegExp("^(?:([+-])=|)("+pnum+")([a-z%]*)$","i"),rrun=/queueHooks$/,animationPrefilters=[defaultPrefilter],tweeners={"*":[function(prop,value){var tween=this.createTween(prop,value),target=tween.cur(),parts=rfxnum.exec(value),unit=parts&&parts[3]||(jQuery.cssNumber[prop]?"":"px"),start=(jQuery.cssNumber[prop]||unit!=="px"&&+target)&&rfxnum.exec(jQuery.css(tween.elem,prop)),scale=1,maxIterations=20;if(start&&start[3]!==unit){unit=unit||start[3];parts=parts||[];start=+target||1;do{scale=scale||".5";start=start/scale;jQuery.style(tween.elem,prop,start+unit)}while(scale!==(scale=tween.cur()/target)&&scale!==1&&--maxIterations)}if(parts){start=tween.start=+start||+target||0;tween.unit=unit;tween.end=parts[1]?start+(parts[1]+1)*parts[2]:+parts[2]}return tween}]};function createFxNow(){setTimeout(function(){fxNow=undefined});return fxNow=jQuery.now()}function genFx(type,includeWidth){var which,i=0,attrs={height:type};includeWidth=includeWidth?1:0;for(;i<4;i+=2-includeWidth){which=cssExpand[i];attrs["margin"+which]=attrs["padding"+which]=type}if(includeWidth){attrs.opacity=attrs.width=type}return attrs}function createTween(value,prop,animation){var tween,collection=(tweeners[prop]||[]).concat(tweeners["*"]),index=0,length=collection.length;for(;index1)},removeAttr:function(name){return this.each(function(){jQuery.removeAttr(this,name)})}});jQuery.extend({attr:function(elem,name,value){var hooks,ret,nType=elem.nodeType;if(!elem||nType===3||nType===8||nType===2){return}if(typeof elem.getAttribute===strundefined){return jQuery.prop(elem,name,value)}if(nType!==1||!jQuery.isXMLDoc(elem)){name=name.toLowerCase();hooks=jQuery.attrHooks[name]||(jQuery.expr.match.bool.test(name)?boolHook:nodeHook)}if(value!==undefined){if(value===null){jQuery.removeAttr(elem,name)}else if(hooks&&"set"in hooks&&(ret=hooks.set(elem,value,name))!==undefined){return ret}else{elem.setAttribute(name,value+"");return value}}else if(hooks&&"get"in hooks&&(ret=hooks.get(elem,name))!==null){return ret}else{ret=jQuery.find.attr(elem,name);return ret==null?undefined:ret}},removeAttr:function(elem,value){var name,propName,i=0,attrNames=value&&value.match(rnotwhite);if(attrNames&&elem.nodeType===1){while(name=attrNames[i++]){propName=jQuery.propFix[name]||name;if(jQuery.expr.match.bool.test(name)){elem[propName]=false}elem.removeAttribute(name)}}},attrHooks:{type:{set:function(elem,value){if(!support.radioValue&&value==="radio"&&jQuery.nodeName(elem,"input")){var val=elem.value;elem.setAttribute("type",value);if(val){elem.value=val}return value}}}}});boolHook={set:function(elem,value,name){if(value===false){jQuery.removeAttr(elem,name)}else{elem.setAttribute(name,name)}return name}};jQuery.each(jQuery.expr.match.bool.source.match(/\w+/g),function(i,name){var getter=attrHandle[name]||jQuery.find.attr;attrHandle[name]=function(elem,name,isXML){var ret,handle;if(!isXML){handle=attrHandle[name];attrHandle[name]=ret;ret=getter(elem,name,isXML)!=null?name.toLowerCase():null;attrHandle[name]=handle}return ret}});var rfocusable=/^(?:input|select|textarea|button)$/i;jQuery.fn.extend({prop:function(name,value){return access(this,jQuery.prop,name,value,arguments.length>1)},removeProp:function(name){return this.each(function(){delete this[jQuery.propFix[name]||name]})}});jQuery.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(elem,name,value){var ret,hooks,notxml,nType=elem.nodeType;if(!elem||nType===3||nType===8||nType===2){return}notxml=nType!==1||!jQuery.isXMLDoc(elem);if(notxml){name=jQuery.propFix[name]||name;hooks=jQuery.propHooks[name]}if(value!==undefined){return hooks&&"set"in hooks&&(ret=hooks.set(elem,value,name))!==undefined?ret:elem[name]=value}else{return hooks&&"get"in hooks&&(ret=hooks.get(elem,name))!==null?ret:elem[name]}},propHooks:{tabIndex:{get:function(elem){return elem.hasAttribute("tabindex")||rfocusable.test(elem.nodeName)||elem.href?elem.tabIndex:-1}}}});if(!support.optSelected){jQuery.propHooks.selected={get:function(elem){var parent=elem.parentNode;if(parent&&parent.parentNode){parent.parentNode.selectedIndex}return null}}}jQuery.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){jQuery.propFix[this.toLowerCase()]=this});var rclass=/[\t\r\n\f]/g;jQuery.fn.extend({addClass:function(value){var classes,elem,cur,clazz,j,finalValue,proceed=typeof value==="string"&&value,i=0,len=this.length;if(jQuery.isFunction(value)){return this.each(function(j){jQuery(this).addClass(value.call(this,j,this.className))})}if(proceed){classes=(value||"").match(rnotwhite)||[];for(;i=0){cur=cur.replace(" "+clazz+" "," ")}}finalValue=value?jQuery.trim(cur):"";if(elem.className!==finalValue){elem.className=finalValue}}}}return this},toggleClass:function(value,stateVal){var type=typeof value;if(typeof stateVal==="boolean"&&type==="string"){return stateVal?this.addClass(value):this.removeClass(value)}if(jQuery.isFunction(value)){return this.each(function(i){jQuery(this).toggleClass(value.call(this,i,this.className,stateVal),stateVal)})}return this.each(function(){if(type==="string"){var className,i=0,self=jQuery(this),classNames=value.match(rnotwhite)||[];while(className=classNames[i++]){if(self.hasClass(className)){self.removeClass(className)}else{self.addClass(className)}}}else if(type===strundefined||type==="boolean"){if(this.className){data_priv.set(this,"__className__",this.className)}this.className=this.className||value===false?"":data_priv.get(this,"__className__")||""}})},hasClass:function(selector){var className=" "+selector+" ",i=0,l=this.length;for(;i=0){return true}}return false}});var rreturn=/\r/g;jQuery.fn.extend({val:function(value){var hooks,ret,isFunction,elem=this[0];if(!arguments.length){if(elem){hooks=jQuery.valHooks[elem.type]||jQuery.valHooks[elem.nodeName.toLowerCase()];if(hooks&&"get"in hooks&&(ret=hooks.get(elem,"value"))!==undefined){return ret}ret=elem.value;return typeof ret==="string"?ret.replace(rreturn,""):ret==null?"":ret}return}isFunction=jQuery.isFunction(value);return this.each(function(i){var val;if(this.nodeType!==1){return}if(isFunction){val=value.call(this,i,jQuery(this).val())}else{val=value}if(val==null){val=""}else if(typeof val==="number"){val+=""}else if(jQuery.isArray(val)){val=jQuery.map(val,function(value){return value==null?"":value+""})}hooks=jQuery.valHooks[this.type]||jQuery.valHooks[this.nodeName.toLowerCase()];if(!hooks||!("set"in hooks)||hooks.set(this,val,"value")===undefined){this.value=val}})}});jQuery.extend({valHooks:{option:{get:function(elem){var val=jQuery.find.attr(elem,"value");return val!=null?val:jQuery.trim(jQuery.text(elem))}},select:{get:function(elem){var value,option,options=elem.options,index=elem.selectedIndex,one=elem.type==="select-one"||index<0,values=one?null:[],max=one?index+1:options.length,i=index<0?max:one?index:0;for(;i=0){optionSet=true}}if(!optionSet){elem.selectedIndex=-1}return values}}}});jQuery.each(["radio","checkbox"],function(){jQuery.valHooks[this]={set:function(elem,value){if(jQuery.isArray(value)){return elem.checked=jQuery.inArray(jQuery(elem).val(),value)>=0}}};if(!support.checkOn){jQuery.valHooks[this].get=function(elem){return elem.getAttribute("value")===null?"on":elem.value}}});jQuery.each(("blur focus focusin focusout load resize scroll unload click dblclick "+"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave "+"change select submit keydown keypress keyup error contextmenu").split(" "),function(i,name){jQuery.fn[name]=function(data,fn){return arguments.length>0?this.on(name,null,data,fn):this.trigger(name)}});jQuery.fn.extend({hover:function(fnOver,fnOut){return this.mouseenter(fnOver).mouseleave(fnOut||fnOver)},bind:function(types,data,fn){return this.on(types,null,data,fn)},unbind:function(types,fn){return this.off(types,null,fn)},delegate:function(selector,types,data,fn){return this.on(types,selector,data,fn)},undelegate:function(selector,types,fn){return arguments.length===1?this.off(selector,"**"):this.off(types,selector||"**",fn)}});var nonce=jQuery.now();var rquery=/\?/;jQuery.parseJSON=function(data){return JSON.parse(data+"")};jQuery.parseXML=function(data){var xml,tmp;if(!data||typeof data!=="string"){return null}try{tmp=new DOMParser;xml=tmp.parseFromString(data,"text/xml")}catch(e){xml=undefined}if(!xml||xml.getElementsByTagName("parsererror").length){jQuery.error("Invalid XML: "+data)}return xml};var rhash=/#.*$/,rts=/([?&])_=[^&]*/,rheaders=/^(.*?):[ \t]*([^\r\n]*)$/gm,rlocalProtocol=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,rnoContent=/^(?:GET|HEAD)$/,rprotocol=/^\/\//,rurl=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,prefilters={},transports={},allTypes="*/".concat("*"),ajaxLocation=window.location.href,ajaxLocParts=rurl.exec(ajaxLocation.toLowerCase())||[];function addToPrefiltersOrTransports(structure){return function(dataTypeExpression,func){if(typeof dataTypeExpression!=="string"){func=dataTypeExpression;dataTypeExpression="*"}var dataType,i=0,dataTypes=dataTypeExpression.toLowerCase().match(rnotwhite)||[];if(jQuery.isFunction(func)){while(dataType=dataTypes[i++]){if(dataType[0]==="+"){dataType=dataType.slice(1)||"*";(structure[dataType]=structure[dataType]||[]).unshift(func)}else{(structure[dataType]=structure[dataType]||[]).push(func)}}}}}function inspectPrefiltersOrTransports(structure,options,originalOptions,jqXHR){var inspected={},seekingTransport=structure===transports;function inspect(dataType){var selected;inspected[dataType]=true;jQuery.each(structure[dataType]||[],function(_,prefilterOrFactory){var dataTypeOrTransport=prefilterOrFactory(options,originalOptions,jqXHR);if(typeof dataTypeOrTransport==="string"&&!seekingTransport&&!inspected[dataTypeOrTransport]){options.dataTypes.unshift(dataTypeOrTransport);inspect(dataTypeOrTransport);return false}else if(seekingTransport){return!(selected=dataTypeOrTransport)}});return selected}return inspect(options.dataTypes[0])||!inspected["*"]&&inspect("*")}function ajaxExtend(target,src){var key,deep,flatOptions=jQuery.ajaxSettings.flatOptions||{};for(key in src){if(src[key]!==undefined){(flatOptions[key]?target:deep||(deep={}))[key]=src[key]; }}if(deep){jQuery.extend(true,target,deep)}return target}function ajaxHandleResponses(s,jqXHR,responses){var ct,type,finalDataType,firstDataType,contents=s.contents,dataTypes=s.dataTypes;while(dataTypes[0]==="*"){dataTypes.shift();if(ct===undefined){ct=s.mimeType||jqXHR.getResponseHeader("Content-Type")}}if(ct){for(type in contents){if(contents[type]&&contents[type].test(ct)){dataTypes.unshift(type);break}}}if(dataTypes[0]in responses){finalDataType=dataTypes[0]}else{for(type in responses){if(!dataTypes[0]||s.converters[type+" "+dataTypes[0]]){finalDataType=type;break}if(!firstDataType){firstDataType=type}}finalDataType=finalDataType||firstDataType}if(finalDataType){if(finalDataType!==dataTypes[0]){dataTypes.unshift(finalDataType)}return responses[finalDataType]}}function ajaxConvert(s,response,jqXHR,isSuccess){var conv2,current,conv,tmp,prev,converters={},dataTypes=s.dataTypes.slice();if(dataTypes[1]){for(conv in s.converters){converters[conv.toLowerCase()]=s.converters[conv]}}current=dataTypes.shift();while(current){if(s.responseFields[current]){jqXHR[s.responseFields[current]]=response}if(!prev&&isSuccess&&s.dataFilter){response=s.dataFilter(response,s.dataType)}prev=current;current=dataTypes.shift();if(current){if(current==="*"){current=prev}else if(prev!=="*"&&prev!==current){conv=converters[prev+" "+current]||converters["* "+current];if(!conv){for(conv2 in converters){tmp=conv2.split(" ");if(tmp[1]===current){conv=converters[prev+" "+tmp[0]]||converters["* "+tmp[0]];if(conv){if(conv===true){conv=converters[conv2]}else if(converters[conv2]!==true){current=tmp[0];dataTypes.unshift(tmp[1])}break}}}}if(conv!==true){if(conv&&s["throws"]){response=conv(response)}else{try{response=conv(response)}catch(e){return{state:"parsererror",error:conv?e:"No conversion from "+prev+" to "+current}}}}}}}return{state:"success",data:response}}jQuery.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:ajaxLocation,type:"GET",isLocal:rlocalProtocol.test(ajaxLocParts[1]),global:true,processData:true,async:true,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":allTypes,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":true,"text json":jQuery.parseJSON,"text xml":jQuery.parseXML},flatOptions:{url:true,context:true}},ajaxSetup:function(target,settings){return settings?ajaxExtend(ajaxExtend(target,jQuery.ajaxSettings),settings):ajaxExtend(jQuery.ajaxSettings,target)},ajaxPrefilter:addToPrefiltersOrTransports(prefilters),ajaxTransport:addToPrefiltersOrTransports(transports),ajax:function(url,options){if(typeof url==="object"){options=url;url=undefined}options=options||{};var transport,cacheURL,responseHeadersString,responseHeaders,timeoutTimer,parts,fireGlobals,i,s=jQuery.ajaxSetup({},options),callbackContext=s.context||s,globalEventContext=s.context&&(callbackContext.nodeType||callbackContext.jquery)?jQuery(callbackContext):jQuery.event,deferred=jQuery.Deferred(),completeDeferred=jQuery.Callbacks("once memory"),statusCode=s.statusCode||{},requestHeaders={},requestHeadersNames={},state=0,strAbort="canceled",jqXHR={readyState:0,getResponseHeader:function(key){var match;if(state===2){if(!responseHeaders){responseHeaders={};while(match=rheaders.exec(responseHeadersString)){responseHeaders[match[1].toLowerCase()]=match[2]}}match=responseHeaders[key.toLowerCase()]}return match==null?null:match},getAllResponseHeaders:function(){return state===2?responseHeadersString:null},setRequestHeader:function(name,value){var lname=name.toLowerCase();if(!state){name=requestHeadersNames[lname]=requestHeadersNames[lname]||name;requestHeaders[name]=value}return this},overrideMimeType:function(type){if(!state){s.mimeType=type}return this},statusCode:function(map){var code;if(map){if(state<2){for(code in map){statusCode[code]=[statusCode[code],map[code]]}}else{jqXHR.always(map[jqXHR.status])}}return this},abort:function(statusText){var finalText=statusText||strAbort;if(transport){transport.abort(finalText)}done(0,finalText);return this}};deferred.promise(jqXHR).complete=completeDeferred.add;jqXHR.success=jqXHR.done;jqXHR.error=jqXHR.fail;s.url=((url||s.url||ajaxLocation)+"").replace(rhash,"").replace(rprotocol,ajaxLocParts[1]+"//");s.type=options.method||options.type||s.method||s.type;s.dataTypes=jQuery.trim(s.dataType||"*").toLowerCase().match(rnotwhite)||[""];if(s.crossDomain==null){parts=rurl.exec(s.url.toLowerCase());s.crossDomain=!!(parts&&(parts[1]!==ajaxLocParts[1]||parts[2]!==ajaxLocParts[2]||(parts[3]||(parts[1]==="http:"?"80":"443"))!==(ajaxLocParts[3]||(ajaxLocParts[1]==="http:"?"80":"443"))))}if(s.data&&s.processData&&typeof s.data!=="string"){s.data=jQuery.param(s.data,s.traditional)}inspectPrefiltersOrTransports(prefilters,s,options,jqXHR);if(state===2){return jqXHR}fireGlobals=jQuery.event&&s.global;if(fireGlobals&&jQuery.active++===0){jQuery.event.trigger("ajaxStart")}s.type=s.type.toUpperCase();s.hasContent=!rnoContent.test(s.type);cacheURL=s.url;if(!s.hasContent){if(s.data){cacheURL=s.url+=(rquery.test(cacheURL)?"&":"?")+s.data;delete s.data}if(s.cache===false){s.url=rts.test(cacheURL)?cacheURL.replace(rts,"$1_="+nonce++):cacheURL+(rquery.test(cacheURL)?"&":"?")+"_="+nonce++}}if(s.ifModified){if(jQuery.lastModified[cacheURL]){jqXHR.setRequestHeader("If-Modified-Since",jQuery.lastModified[cacheURL])}if(jQuery.etag[cacheURL]){jqXHR.setRequestHeader("If-None-Match",jQuery.etag[cacheURL])}}if(s.data&&s.hasContent&&s.contentType!==false||options.contentType){jqXHR.setRequestHeader("Content-Type",s.contentType)}jqXHR.setRequestHeader("Accept",s.dataTypes[0]&&s.accepts[s.dataTypes[0]]?s.accepts[s.dataTypes[0]]+(s.dataTypes[0]!=="*"?", "+allTypes+"; q=0.01":""):s.accepts["*"]);for(i in s.headers){jqXHR.setRequestHeader(i,s.headers[i])}if(s.beforeSend&&(s.beforeSend.call(callbackContext,jqXHR,s)===false||state===2)){return jqXHR.abort()}strAbort="abort";for(i in{success:1,error:1,complete:1}){jqXHR[i](s[i])}transport=inspectPrefiltersOrTransports(transports,s,options,jqXHR);if(!transport){done(-1,"No Transport")}else{jqXHR.readyState=1;if(fireGlobals){globalEventContext.trigger("ajaxSend",[jqXHR,s])}if(s.async&&s.timeout>0){timeoutTimer=setTimeout(function(){jqXHR.abort("timeout")},s.timeout)}try{state=1;transport.send(requestHeaders,done)}catch(e){if(state<2){done(-1,e)}else{throw e}}}function done(status,nativeStatusText,responses,headers){var isSuccess,success,error,response,modified,statusText=nativeStatusText;if(state===2){return}state=2;if(timeoutTimer){clearTimeout(timeoutTimer)}transport=undefined;responseHeadersString=headers||"";jqXHR.readyState=status>0?4:0;isSuccess=status>=200&&status<300||status===304;if(responses){response=ajaxHandleResponses(s,jqXHR,responses)}response=ajaxConvert(s,response,jqXHR,isSuccess);if(isSuccess){if(s.ifModified){modified=jqXHR.getResponseHeader("Last-Modified");if(modified){jQuery.lastModified[cacheURL]=modified}modified=jqXHR.getResponseHeader("etag");if(modified){jQuery.etag[cacheURL]=modified}}if(status===204||s.type==="HEAD"){statusText="nocontent"}else if(status===304){statusText="notmodified"}else{statusText=response.state;success=response.data;error=response.error;isSuccess=!error}}else{error=statusText;if(status||!statusText){statusText="error";if(status<0){status=0}}}jqXHR.status=status;jqXHR.statusText=(nativeStatusText||statusText)+"";if(isSuccess){deferred.resolveWith(callbackContext,[success,statusText,jqXHR])}else{deferred.rejectWith(callbackContext,[jqXHR,statusText,error])}jqXHR.statusCode(statusCode);statusCode=undefined;if(fireGlobals){globalEventContext.trigger(isSuccess?"ajaxSuccess":"ajaxError",[jqXHR,s,isSuccess?success:error])}completeDeferred.fireWith(callbackContext,[jqXHR,statusText]);if(fireGlobals){globalEventContext.trigger("ajaxComplete",[jqXHR,s]);if(!--jQuery.active){jQuery.event.trigger("ajaxStop")}}}return jqXHR},getJSON:function(url,data,callback){return jQuery.get(url,data,callback,"json")},getScript:function(url,callback){return jQuery.get(url,undefined,callback,"script")}});jQuery.each(["get","post"],function(i,method){jQuery[method]=function(url,data,callback,type){if(jQuery.isFunction(data)){type=type||callback;callback=data;data=undefined}return jQuery.ajax({url:url,type:method,dataType:type,data:data,success:callback})}});jQuery._evalUrl=function(url){return jQuery.ajax({url:url,type:"GET",dataType:"script",async:false,global:false,"throws":true})};jQuery.fn.extend({wrapAll:function(html){var wrap;if(jQuery.isFunction(html)){return this.each(function(i){jQuery(this).wrapAll(html.call(this,i))})}if(this[0]){wrap=jQuery(html,this[0].ownerDocument).eq(0).clone(true);if(this[0].parentNode){wrap.insertBefore(this[0])}wrap.map(function(){var elem=this;while(elem.firstElementChild){elem=elem.firstElementChild}return elem}).append(this)}return this},wrapInner:function(html){if(jQuery.isFunction(html)){return this.each(function(i){jQuery(this).wrapInner(html.call(this,i))})}return this.each(function(){var self=jQuery(this),contents=self.contents();if(contents.length){contents.wrapAll(html)}else{self.append(html)}})},wrap:function(html){var isFunction=jQuery.isFunction(html);return this.each(function(i){jQuery(this).wrapAll(isFunction?html.call(this,i):html)})},unwrap:function(){return this.parent().each(function(){if(!jQuery.nodeName(this,"body")){jQuery(this).replaceWith(this.childNodes)}}).end()}});jQuery.expr.filters.hidden=function(elem){return elem.offsetWidth<=0&&elem.offsetHeight<=0};jQuery.expr.filters.visible=function(elem){return!jQuery.expr.filters.hidden(elem)};var r20=/%20/g,rbracket=/\[\]$/,rCRLF=/\r?\n/g,rsubmitterTypes=/^(?:submit|button|image|reset|file)$/i,rsubmittable=/^(?:input|select|textarea|keygen)/i;function buildParams(prefix,obj,traditional,add){var name;if(jQuery.isArray(obj)){jQuery.each(obj,function(i,v){if(traditional||rbracket.test(prefix)){add(prefix,v)}else{buildParams(prefix+"["+(typeof v==="object"?i:"")+"]",v,traditional,add)}})}else if(!traditional&&jQuery.type(obj)==="object"){for(name in obj){buildParams(prefix+"["+name+"]",obj[name],traditional,add)}}else{add(prefix,obj)}}jQuery.param=function(a,traditional){var prefix,s=[],add=function(key,value){value=jQuery.isFunction(value)?value():value==null?"":value;s[s.length]=encodeURIComponent(key)+"="+encodeURIComponent(value)};if(traditional===undefined){traditional=jQuery.ajaxSettings&&jQuery.ajaxSettings.traditional}if(jQuery.isArray(a)||a.jquery&&!jQuery.isPlainObject(a)){jQuery.each(a,function(){add(this.name,this.value)})}else{for(prefix in a){buildParams(prefix,a[prefix],traditional,add)}}return s.join("&").replace(r20,"+")};jQuery.fn.extend({serialize:function(){return jQuery.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var elements=jQuery.prop(this,"elements");return elements?jQuery.makeArray(elements):this}).filter(function(){var type=this.type;return this.name&&!jQuery(this).is(":disabled")&&rsubmittable.test(this.nodeName)&&!rsubmitterTypes.test(type)&&(this.checked||!rcheckableType.test(type))}).map(function(i,elem){var val=jQuery(this).val();return val==null?null:jQuery.isArray(val)?jQuery.map(val,function(val){return{name:elem.name,value:val.replace(rCRLF,"\r\n")}}):{name:elem.name,value:val.replace(rCRLF,"\r\n")}}).get()}});jQuery.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(e){}};var xhrId=0,xhrCallbacks={},xhrSuccessStatus={0:200,1223:204},xhrSupported=jQuery.ajaxSettings.xhr();if(window.attachEvent){window.attachEvent("onunload",function(){for(var key in xhrCallbacks){xhrCallbacks[key]()}})}support.cors=!!xhrSupported&&"withCredentials"in xhrSupported;support.ajax=xhrSupported=!!xhrSupported;jQuery.ajaxTransport(function(options){var callback;if(support.cors||xhrSupported&&!options.crossDomain){return{send:function(headers,complete){var i,xhr=options.xhr(),id=++xhrId;xhr.open(options.type,options.url,options.async,options.username,options.password);if(options.xhrFields){for(i in options.xhrFields){xhr[i]=options.xhrFields[i]}}if(options.mimeType&&xhr.overrideMimeType){xhr.overrideMimeType(options.mimeType)}if(!options.crossDomain&&!headers["X-Requested-With"]){headers["X-Requested-With"]="XMLHttpRequest"}for(i in headers){xhr.setRequestHeader(i,headers[i])}callback=function(type){return function(){if(callback){delete xhrCallbacks[id];callback=xhr.onload=xhr.onerror=null;if(type==="abort"){xhr.abort()}else if(type==="error"){complete(xhr.status,xhr.statusText)}else{complete(xhrSuccessStatus[xhr.status]||xhr.status,xhr.statusText,typeof xhr.responseText==="string"?{text:xhr.responseText}:undefined,xhr.getAllResponseHeaders())}}}};xhr.onload=callback();xhr.onerror=callback("error");callback=xhrCallbacks[id]=callback("abort");try{xhr.send(options.hasContent&&options.data||null)}catch(e){if(callback){throw e}}},abort:function(){if(callback){callback()}}}}});jQuery.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(text){jQuery.globalEval(text);return text}}});jQuery.ajaxPrefilter("script",function(s){if(s.cache===undefined){s.cache=false}if(s.crossDomain){s.type="GET"}});jQuery.ajaxTransport("script",function(s){if(s.crossDomain){var script,callback;return{send:function(_,complete){script=jQuery("