From dc87542dd3456fc846fabbe5dc0e2ac1a21ef840 Mon Sep 17 00:00:00 2001 From: jensolegraulund Date: Sat, 14 May 2016 22:08:05 +0200 Subject: [PATCH] Style json editor buttons --- dist/css/index.css | 7 +- dist/css/print.css | 2 +- dist/index.html | 2 +- dist/lib/jsoneditor.js | 2 +- dist/swagger-ui.js | 191 +++++++++++++++++++++++++++++------- dist/swagger-ui.min.js | 18 ++-- lib/jsoneditor.js | 2 +- src/main/html/css/index.css | 7 +- src/main/html/css/print.css | 2 +- src/main/html/index.html | 2 +- 10 files changed, 177 insertions(+), 58 deletions(-) diff --git a/dist/css/index.css b/dist/css/index.css index 96e7585f1b1..b013939dd4e 100644 --- a/dist/css/index.css +++ b/dist/css/index.css @@ -3243,7 +3243,7 @@ fieldset[disabled] .btn-success.active { .btn-info { color: #fff; background-color: #5bc0de; - border-color: #46b8da; + border-color: transparent; } .btn-info:hover, .btn-info:focus, @@ -3253,7 +3253,7 @@ fieldset[disabled] .btn-success.active { .open > .dropdown-toggle.btn-info { color: #fff; background-color: #31b0d5; - border-color: #269abc; + border-color: transparent; } .btn-info:active, .btn-info.active, @@ -3279,7 +3279,7 @@ fieldset[disabled] .btn-info:active, .btn-info[disabled].active, fieldset[disabled] .btn-info.active { background-color: #5bc0de; - border-color: #46b8da; + border-color: transparent; } .btn-info .badge { color: #5bc0de; @@ -3428,6 +3428,7 @@ fieldset[disabled] .btn-link:focus { font-size: 12px; line-height: 1.5; border-radius: 3px; + margin: 1px; } .btn-block { display: block; diff --git a/dist/css/print.css b/dist/css/print.css index 32764df8378..77073f1f70d 100644 --- a/dist/css/print.css +++ b/dist/css/print.css @@ -82,7 +82,7 @@ .swagger-section pre .vhdl .attribute, .swagger-section pre .clojure .attribute, .swagger-section pre .coffeescript .property { - color: #88F; + color: #8888ff; } .swagger-section pre .keyword, .swagger-section pre .id, diff --git a/dist/index.html b/dist/index.html index 6eb256e8b3b..8b72854883a 100644 --- a/dist/index.html +++ b/dist/index.html @@ -83,7 +83,7 @@ log("Unable to Load SwaggerUI"); }, docExpansion: "none", - sorter: "alpha", + sorter: "alpha" }); function addApiKeyAuthorization() { diff --git a/dist/lib/jsoneditor.js b/dist/lib/jsoneditor.js index feea6f75b04..ba48b06e98c 100644 --- a/dist/lib/jsoneditor.js +++ b/dist/lib/jsoneditor.js @@ -1469,7 +1469,7 @@ JSONEditor.AbstractEditor = Class.extend({ getButton: function(text, icon, title) { - var btnClass = 'json-editor-btn-'+icon; + var btnClass = 'btn-xs btn-info json-editor-btn-'+icon; if(!this.iconlib) icon = null; else icon = this.iconlib.getIcon(icon); diff --git a/dist/swagger-ui.js b/dist/swagger-ui.js index f05022cacbe..1e11cb1d4f7 100644 --- a/dist/swagger-ui.js +++ b/dist/swagger-ui.js @@ -176,7 +176,7 @@ this["Handlebars"]["templates"]["main"] = Handlebars.template({"1":function(dept + escapeExpression(lambda(((stack1 = (depth0 != null ? depth0.info : depth0)) != null ? stack1.version : stack1), depth0)) + "\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
\n
\n API Reference: \n
\n\n
\n \n \n \n\n
\n \n\n
\n \n
\n\n
\n
\n
\n
\n
\n\n
\n
\n
\n
Swagger resource
\n
\n
\n
\n
\n\n

\n \n"; + var stack1, helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression, buffer = "

\n
\n
\n
\n API Reference: \n
\n\n
\n \n \n \n\n
\n \n\n
\n \n
\n\n
\n
\n
\n
\n
\n\n
\n
\n
\n
Swagger resource
\n
\n
\n
\n
\n\n

\n \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"; @@ -348,7 +348,7 @@ this["Handlebars"]["templates"]["param_list"] = Handlebars.template({"1":functio + "'>\n

\n \n"; },"12":function(depth0,helpers,partials,data) { @@ -494,7 +494,7 @@ this["Handlebars"]["templates"]["param_required"] = Handlebars.template({"1":fun return buffer; },"13":function(depth0,helpers,partials,data) { var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression; - return " \n"; },"15":function(depth0,helpers,partials,data) { var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression; - return " \n
\n"; + + "'>\n
\n
\n"; },"9":function(depth0,helpers,partials,data) { var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression; return " " @@ -595,7 +595,7 @@ this["Handlebars"]["templates"]["param"] = Handlebars.template({"1":function(dep return buffer; },"15":function(depth0,helpers,partials,data) { var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression; - return " \n"; },"17":function(depth0,helpers,partials,data) { var helper, functionType="function", helperMissing=helpers.helperMissing, escapeExpression=this.escapeExpression; - return " \n
\n"; @@ -666,7 +666,7 @@ this["Handlebars"]["templates"]["response_content_type"] = Handlebars.template({ },"4":function(depth0,helpers,partials,data) { return " \n"; },"compiler":[6,">= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) { - var stack1, buffer = "
\n
Response Type
\n
\n
\n \n"; stack1 = helpers['if'].call(depth0, (depth0 != null ? depth0.produces : depth0), {"name":"if","hash":{},"fn":this.program(1, data),"inverse":this.program(4, data),"data":data}); if (stack1 != null) { buffer += stack1; } return buffer + " \n
\n
\n
\n\n"; @@ -20817,6 +20817,14 @@ window.SwaggerUi = Backbone.Router.extend({ return that.updateSwaggerUi(data); }); */ + //JSon Editor custom theming + JSONEditor.defaults.iconlibs.swagger = JSONEditor.AbstractIconLib.extend({ + mapping: { + collapse: 'collapse', + expand: 'expand' + }, + icon_prefix: 'swagger-' + }); }, // Set an option after initializing @@ -21283,6 +21291,14 @@ SwaggerUi.Views.MainView = Backbone.View.extend({ this.model.validatorUrl = window.location.protocol + '//online.swagger.io/validator'; } } + // JSonEditor requires type='object' to be present on defined types, we add it if it's missing + // is there any valid case were it should not be added ? + var def; + for(def in this.model.definitions){ + if (!this.model.definitions[def].type){ + this.model.definitions[def].type = 'object'; + } + } }, render: function () { @@ -21343,6 +21359,10 @@ SwaggerUi.Views.MainView = Backbone.View.extend({ addResource: function (resource, auths) { // Render a resource and add it to resources li resource.id = resource.id.replace(/\s/g, '_'); + + // Make all definitions available at the root of the resource so that they can + // be loaded by the JSonEditor + resource.definitions = this.model.definitions; var resourceView = new SwaggerUi.Views.ResourceView({ model: resource, router: this.router, @@ -21615,7 +21635,23 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({ id: this.parentId + '_' + this.nickname }; } + + contentTypeModel = { + isParam: false + }; + contentTypeModel.consumes = this.model.consumes; + contentTypeModel.produces = this.model.produces; + $(this.el).html(Handlebars.templates.operation(this.model)); + + ref4 = this.model.parameters; + for (p = 0, len3 = ref4.length; p < len3; p++) { + param = ref4[p]; + this.addParameter(param, contentTypeModel.consumes); + if (param.paramType === 'body' || param.in === 'body') { + this.addBodyModel(param) + } + } if (signatureModel) { responseSignatureView = new SwaggerUi.Views.SignatureView({ model: signatureModel, @@ -21627,14 +21663,9 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({ $('.model-signature', $(this.el)).append(responseSignatureView.render().el); } else { this.model.responseClassSignature = 'string'; - $('.model-signature', $(this.el)).html(this.model.type); + $('.model-signature', $(this.el)).append(this.model.type); } - contentTypeModel = { - isParam: false - }; - contentTypeModel.consumes = this.model.consumes; - contentTypeModel.produces = this.model.produces; ref3 = this.model.parameters; for (n = 0, len2 = ref3.length; n < len2; n++) { param = ref3[n]; @@ -21664,16 +21695,6 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({ $('.response-content-type', $(this.el)).append(responseContentTypeView.render().el); - ref4 = this.model.parameters; - for (p = 0, len3 = ref4.length; p < len3; p++) { - param = ref4[p]; - this.addParameter(param, contentTypeModel.consumes); - if (param.paramType === 'body' || param.in === 'body') { - this.addBodyModel(param) - } - } - - ref5 = this.model.responseMessages; for (q = 0, len4 = ref5.length; q < len4; q++) { statusCode = ref5[q]; @@ -21701,12 +21722,29 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({ addParameter: function (param, consumes) { // Render a parameter param.consumes = consumes; + // Copy this param JSON spec so that it will be available for JsonEditor + if(param.schema){ + $.extend(true, param.schema, this.model.definitions[param.type]); + param.schema.definitions = this.model.definitions; + // This is required for JsonEditor to display the root properly + if(!param.schema.type){ + param.schema.type = 'object'; + } + // This is the title that will be used by JsonEditor for the root + // Since we already display the parameter's name in the Parameter column + // We set this to space, we can't set it to null or space otherwise JsonEditor + // will replace it with the text "root" which won't look good on screen + if(!param.schema.title){ + param.schema.title = ' '; + } + } var paramView = new SwaggerUi.Views.ParameterView({ model: param, tagName: 'div', className: 'parameter-item', - readOnly: this.model.isReadOnly - }); + readOnly: this.model.isReadOnly, + swaggerOptions: this.options.swaggerOptions + }); $('.operation-params', $(this.el)).append(paramView.render().el); }, @@ -21729,7 +21767,7 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({ } form = $('.sandbox', $(this.el)); error_free = true; - form.find('input.required').each(function () { + form.find('input.required:visible').each(function () { $(this).removeClass('error'); if (jQuery.trim($(this).val()) === '') { $(this).addClass('error'); @@ -21789,6 +21827,14 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({ map[o.name] = val; } } + var pi; + for(pi = 0; pi < this.model.parameters.length; pi++){ + var p = this.model.parameters[pi]; + if( p.jsonEditor && p.jsonEditor.isEnabled()){ + var json = p.jsonEditor.getValue(); + map[p.name] = JSON.stringify(json); + } + } opts.responseContentType = $('div select[name=responseContentType]', $(this.el)).val(); opts.requestContentType = $('div select[name=parameterContentType]', $(this.el)).val(); $(".submit", $(this.el)).button("loading"); @@ -21845,7 +21891,7 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({ this.invocationUrl = this.model.supportHeaderParams() ? (headerParams = this.model.getHeaderParams(map), delete headerParams['Content-Type'], this.model.urlify(map, false)) : this.model.urlify(map, true); $('.request_url', $(this.el)).html('
');
     $('.request_url pre', $(this.el)).text(this.invocationUrl);
-    
+
     var clientAuths = window.swaggerUi.api.clientAuthorizations;
     if (typeof clientAuths !== 'undefined' && typeof(clientAuths.authz) !== 'undefined') {
       _.forEach(clientAuths.authz, function(auth, key) {
@@ -22188,6 +22234,31 @@ SwaggerUi.Views.ParameterContentTypeView = Backbone.View.extend({
 
 });
 'use strict';
+/*
+ * [TODO] defaultProperties is not take in the required properties into consideration, this implementation respects the specs of JSON Editor v0.7.22
+  {
+   {
+     "type": "object",
+     "properties": {
+     "name": {"type": "string"},
+     "age": {"type": "integer"}
+   },
+   defaultProperties": ["name"]
+  }
+ */
+function setDefaultProperties(obj) {
+  if (obj instanceof Object) {
+    for (var k in obj){
+      if(obj.hasOwnProperty("type") && obj.type == "object") {
+        obj.defaultProperties = obj.required ? obj.required : [];
+      }
+      // recursive call to setDefaultProperties
+      setDefaultProperties( obj[k] );
+    }
+  } else {
+    // not an Object, break the recursion.
+  };
+}
 
 SwaggerUi.Views.ParameterView = Backbone.View.extend({
   initialize: function(){
@@ -22234,8 +22305,48 @@ SwaggerUi.Views.ParameterView = Backbone.View.extend({
     var template = this.template();
     $(this.el).html(template(this.model));
 
+    var signatureModel = {
+      sampleJSON: this.model.sampleJSON,
+      isParam: true,
+      signature: this.model.signature,
+      defaultRendering: this.model.defaultRendering
+    };
+
     var isParam = false;
 
+    if( this.options.swaggerOptions.jsonEditor && this.model.isBody && this.model.schema){
+      var jsonEditorOptions = this.options.swaggerOptions.jsonEditorOptions;
+      var $self = $(this.el);
+      if (jsonEditorOptions && jsonEditorOptions.noDefaultProperties) setDefaultProperties(this.model.schema);
+      this.model.jsonEditor =
+        /* global JSONEditor */
+          new JSONEditor($('.editor_holder', $self)[0],
+              {schema: this.model.schema, startval : this.model.default,
+                ajax:true,
+                disable_properties:jsonEditorOptions && jsonEditorOptions.disableProperties,
+                disable_edit_json:jsonEditorOptions && jsonEditorOptions.disableEditJson,
+                remove_empty_properties:jsonEditorOptions && jsonEditorOptions.removeEmptyProperties,
+                iconlib: 'swagger' });
+      // This is so that the signature can send back the sample to the json editor
+      // TODO: SignatureView should expose an event "onSampleClicked" instead
+      signatureModel.jsonEditor = this.model.jsonEditor;
+      $('.body-textarea', $self).hide();
+      $('.editor_holder', $self).show();
+      $('.parameter-content-type', $self)
+        .change(function(e){
+          if(e.target.value === 'application/xml'){
+            $('.body-textarea', $self).show();
+            $('.editor_holder', $self).hide();
+            this.model.jsonEditor.disable();
+          }
+          else {
+            $('.body-textarea', $self).hide();
+            $('.editor_holder', $self).show();
+            this.model.jsonEditor.enable();
+          }
+        });
+    }
+
     if (this.model.isBody) {
       isParam = true;
     }
@@ -22315,6 +22426,8 @@ SwaggerUi.Views.ResourceView = Backbone.View.extend({
 
       operation.nickname = id;
       operation.parentId = this.model.id;
+      operation.definitions = this.model.definitions; // make Json Schema available for JSonEditor in this operation
+
       this.addOperation(operation);
     }
 
@@ -22494,6 +22607,10 @@ SwaggerUi.Views.SignatureView = Backbone.View.extend({
       var textArea = $('textarea', $(this.el.parentNode.parentNode.parentNode));
       if ($.trim(textArea.val()) === '') {
         textArea.val(this.model.sampleJSON);
+         // TODO move this code outside of the view and expose an event instead
+         if( this.model.jsonEditor && this.model.jsonEditor.isEnabled()){
+            this.model.jsonEditor.setValue(JSON.parse(this.model.sampleJSON));
+         }
       }
     }
   }
diff --git a/dist/swagger-ui.min.js b/dist/swagger-ui.min.js
index 7f60d314c23..0ec399eccc3 100644
--- a/dist/swagger-ui.min.js
+++ b/dist/swagger-ui.min.js
@@ -1,12 +1,12 @@
-(function(){function e(){e.history=e.history||[],e.history.push(arguments),this.console&&console.log(Array.prototype.slice.call(arguments)[0])}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(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return"
\n \n
\n
\n
\n
"+s((i=null!=(i=t.keyName||(null!=e?e.keyName:e))?i:o,typeof i===a?i.call(e,{name:"keyName",hash:{},data:r}):i))+'
\n \n \n
\n
\n\n'},useData:!0}),this.Handlebars.templates.basic_auth_button_view=Handlebars.template({compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){return'
\n
\n
\n
Username
\n \n
Password
\n \n \n
\n
\n\n'},useData:!0}),this.Handlebars.templates.content_type=Handlebars.template({1:function(e,t,n,r){var i,a="";return i=t.each.call(e,null!=e?e.produces:e,{name:"each",hash:{},fn:this.program(2,r),inverse:this.noop,data:r}),null!=i&&(a+=i),a},2:function(e,t,n,r){var i,a=this.lambda,o=' \n"},4:function(e,t,n,r){return' \n'},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){var i,a='\n\n"},useData:!0}),$(function(){$.fn.vAlign=function(){return this.each(function(){var e=$(this).height(),t=$(this).parent().height(),n=(t-e)/2;$(this).css("margin-top",n)})},$.fn.stretchFormtasticInputWidthToParent=function(){return this.each(function(){var e=$(this).closest("form").innerWidth(),t=parseInt($(this).closest("form").css("padding-left"),10)+parseInt($(this).closest("form").css("padding-right"),10),n=parseInt($(this).css("padding-left"),10)+parseInt($(this).css("padding-right"),10);$(this).css("width",e-t-n)})},$("form.formtastic li.string input, form.formtastic textarea").stretchFormtasticInputWidthToParent(),$("ul.downplayed li div.content p").vAlign(),$("form.sandbox").submit(function(){var e=!0;return $(this).find("input.required").each(function(){$(this).removeClass("error"),""===$(this).val()&&($(this).addClass("error"),$(this).wiggle(),e=!1)}),e})}),Function.prototype.bind&&console&&"object"==typeof console.log&&["log","info","warn","error","assert","dir","clear","profile","profileEnd"].forEach(function(e){console[e]=this.bind(console[e],console)},Function.prototype.call),window.Docs={shebang:function(){var e=$.param.fragment().split("/");switch(e.shift(),e.length){case 1:break;case 2:var t="#resources_nav [data-resource] [data-endpoint="+e[0]+"_"+e[1]+"]",n=$("#swagger_sidebar").find(t),r=n.attr("data-selected");"undefined"==typeof r&&n.trigger("click")}}},Handlebars.registerHelper("sanitize",function(e){return e=e.replace(/)<[^<]*)*<\/script>/gi,""),new Handlebars.SafeString(e)}),this.Handlebars.templates.main=Handlebars.template({1:function(e,t,n,r){var i,a=this.lambda,o=this.escapeExpression,s=' '+o(a(null!=(i=null!=e?e.info:e)?i.title:i,e))+'\n ';return i=a(null!=(i=null!=e?e.info:e)?i.description:i,e),null!=i&&(s+=i),s+"\n"},3:function(e,t,n,r){var i,a=this.lambda,o=this.escapeExpression;return" \n Contact: '+o(a(null!=(i=null!=(i=null!=e?e.info:e)?i.contact:i)?i.email:i,e))+"\n

\n"},5:function(e,t,n,r){var i,a=this.lambda,o=this.escapeExpression;return' api version: '+o(a(null!=(i=null!=e?e.info:e)?i.version:i,e))+"\n"},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){var i,a,o="function",s=t.helperMissing,l=this.escapeExpression,u='
\n \n
\n\n
\n
    \n
    \n"},useData:!0}),this.Handlebars.templates.operation=Handlebars.template({1:function(e,t,n,r){return"deprecated"},3:function(e,t,n,r){return"

    Warning: Deprecated

    \n"},5:function(e,t,n,r){var i,a,o="function",s=t.helperMissing,l='
    ';return a=null!=(a=t.description||(null!=e?e.description:e))?a:s,i=typeof a===o?a.call(e,{name:"description",hash:{},data:r}):a,null!=i&&(l+=i),l+"
    \n"},7:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return'

    \n Parameters\n

    \n\n
    \n
    \n\n'},9:function(e,t,n,r){return'
    \n'},11:function(e,t,n,r){var i,a=' \n"},12:function(e,t,n,r){var i,a=this.lambda,o=this.escapeExpression,s="
    "+o(a(null!=e?e.scope:e,e))+"
    \n"},14:function(e,t,n,r){return' \n
    \n'},16:function(e,t,n,r){return'
    \n'},18:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return'
    \n

    \n Response Messages\n

    \n\n
    \n \n \n \n
    \n
    \n'},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){var i,a,o,s="function",l=t.helperMissing,u=this.escapeExpression,c=t.blockHelperMissing,p="
      \n
    • \n
      \n
      \n

      "+u((a=null!=(a=t.summary||(null!=e?e.summary:e))?a:l,typeof a===s?a.call(e,{name:"summary",hash:{},data:r}):a))+"

      \n\n

      \n \n "+u((a=null!=(a=t.method||(null!=e?e.method:e))?a:l,typeof a===s?a.call(e,{name:"method",hash:{},data:r}):a))+"\n \n \n '+u((a=null!=(a=t.path||(null!=e?e.path:e))?a:l,typeof a===s?a.call(e,{name:"path",hash:{},data:r}):a))+'\n \n

      \n
      \n\n \n Show samples\n \n\n',i=t["if"].call(e,null!=e?e.deprecated:e,{name:"if",hash:{},fn:this.program(3,r),inverse:this.noop,data:r}),null!=i&&(p+=i),i=t["if"].call(e,null!=e?e.description:e,{name:"if",hash:{},fn:this.program(5,r),inverse:this.noop,data:r}),null!=i&&(p+=i),p+='\n\n
      \n\n',i=t["if"].call(e,null!=e?e.parameters:e,{name:"if",hash:{},fn:this.program(7,r),inverse:this.noop,data:r}),null!=i&&(p+=i),p+='\n

      \n Test this endpoint\n

      \n\n
      \n
      \n \n Hide Response\n \n \n\n',a=null!=(a=t.oauth||(null!=e?e.oauth:e))?a:l,o={name:"oauth",hash:{},fn:this.program(9,r),inverse:this.noop,data:r},i=typeof a===s?a.call(e,o):a,t.oauth||(i=c.call(e,i,o)),null!=i&&(p+=i),p+="\n",i=t.each.call(e,null!=e?e.oauth:e,{name:"each",hash:{},fn:this.program(11,r),inverse:this.noop,data:r}),null!=i&&(p+=i),p+="\n",a=null!=(a=t.oauth||(null!=e?e.oauth:e))?a:l,o={name:"oauth",hash:{},fn:this.program(14,r),inverse:this.noop,data:r},i=typeof a===s?a.call(e,o):a,t.oauth||(i=c.call(e,i,o)),null!=i&&(p+=i),p+="\n
      \n\n",i=t["if"].call(e,null!=e?e.type:e,{name:"if",hash:{},fn:this.program(16,r),inverse:this.noop,data:r}),null!=i&&(p+=i),p+="\n
      \n\n",i=t["if"].call(e,null!=e?e.responseMessages:e,{name:"if",hash:{},fn:this.program(18,r),inverse:this.noop,data:r}),null!=i&&(p+=i),p+'
      \n\n
      \n\n
      \n \n \n
      \n\n \n
    • \n
    "},useData:!0}),this.Handlebars.templates.param_list=Handlebars.template({1:function(e,t,n,r){return" multiple='multiple'"},3:function(e,t,n,r){return""},5:function(e,t,n,r){var i,a="";return i=t["if"].call(e,null!=e?e["default"]:e,{name:"if",hash:{},fn:this.program(3,r),inverse:this.program(6,r),data:r}),null!=i&&(a+=i),a},6:function(e,t,n,r){return" \n"},8:function(e,t,n,r){var i,a="";return i=t["if"].call(e,null!=e?e.isDefault:e,{name:"if",hash:{},fn:this.program(9,r),inverse:this.program(11,r),data:r}),null!=i&&(a+=i),a},9:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return' \n"},11:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return" \n"},13:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return' '+s((i=null!=(i=t.type||(null!=e?e.type:e))?i:o,typeof i===a?i.call(e,{name:"type",hash:{},data:r}):i))+"\n"},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){var i,a,o="function",s=t.helperMissing,l=this.escapeExpression,u='
    '+l((a=null!=(a=t.name||(null!=e?e.name:e))?a:s,typeof a===o?a.call(e,{name:"name",hash:{},data:r}):a))+'
    \n
    \n
    \n \n
    \n',i=t["if"].call(e,null!=e?e.type:e,{name:"if",hash:{},fn:this.program(13,r),inverse:this.noop,data:r}),null!=i&&(u+=i),u+'
    '+l((a=null!=(a=t.description||(null!=e?e.description:e))?a:s,typeof a===o?a.call(e,{name:"description",hash:{},data:r}):a))+"
    \n
    \n
    \n
    \n\n"},useData:!0}),this.Handlebars.templates.param_readonly_required=Handlebars.template({1:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return" \n
    \n'},3:function(e,t,n,r){var i,a="";return i=t["if"].call(e,null!=e?e["default"]:e,{name:"if",hash:{},fn:this.program(4,r),inverse:this.program(6,r),data:r}),null!=i&&(a+=i),a},4:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return" "+s((i=null!=(i=t["default"]||(null!=e?e["default"]:e))?i:o,typeof i===a?i.call(e,{name:"default",hash:{},data:r}):i))+"\n"},6:function(e,t,n,r){return" (empty)\n"},8:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return' '+s((i=null!=(i=t.type||(null!=e?e.type:e))?i:o,typeof i===a?i.call(e,{name:"type",hash:{},data:r}):i))+"\n"},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){var i,a,o="function",s=t.helperMissing,l=this.escapeExpression,u='
    '+l((a=null!=(a=t.name||(null!=e?e.name:e))?a:s,typeof a===o?a.call(e,{name:"name",hash:{},data:r}):a))+'
    \n
    \n
    \n";return i=t["if"].call(e,null!=e?e.isBody:e,{name:"if",hash:{},fn:this.program(1,r),inverse:this.program(3,r),data:r}),null!=i&&(u+=i),u+='
    \n',i=t["if"].call(e,null!=e?e.type:e,{name:"if",hash:{},fn:this.program(8,r),inverse:this.noop,data:r}),null!=i&&(u+=i),u+'
    '+l((a=null!=(a=t.description||(null!=e?e.description:e))?a:s,typeof a===o?a.call(e,{name:"description",hash:{},data:r}):a))+"
    \n
    \n
    \n
    \n"},useData:!0}),this.Handlebars.templates.param_readonly=Handlebars.template({1:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return" \n
    \n'},3:function(e,t,n,r){var i,a="";return i=t["if"].call(e,null!=e?e["default"]:e,{name:"if",hash:{},fn:this.program(4,r),inverse:this.program(6,r),data:r}),null!=i&&(a+=i),a},4:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return" "+s((i=null!=(i=t["default"]||(null!=e?e["default"]:e))?i:o,typeof i===a?i.call(e,{name:"default",hash:{},data:r}):i))+"\n"},6:function(e,t,n,r){return" (empty)\n"},8:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return' '+s((i=null!=(i=t.type||(null!=e?e.type:e))?i:o,typeof i===a?i.call(e,{name:"type",hash:{},data:r}):i))+"\n"},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){var i,a,o="function",s=t.helperMissing,l=this.escapeExpression,u='
    '+l((a=null!=(a=t.name||(null!=e?e.name:e))?a:s,typeof a===o?a.call(e,{name:"name",hash:{},data:r}):a))+'
    \n
    \n
    \n";return i=t["if"].call(e,null!=e?e.isBody:e,{name:"if",hash:{},fn:this.program(1,r),inverse:this.program(3,r),data:r}),null!=i&&(u+=i),u+='
    \n',i=t["if"].call(e,null!=e?e.type:e,{name:"if",hash:{},fn:this.program(8,r),inverse:this.noop,data:r}),null!=i&&(u+=i),u+'
    '+l((a=null!=(a=t.description||(null!=e?e.description:e))?a:s,typeof a===o?a.call(e,{name:"description",hash:{},data:r}):a))+"
    \n
    \n
    \n
    \n"},useData:!0}),this.Handlebars.templates.param_required=Handlebars.template({1:function(e,t,n,r){var i,a="";return i=t["if"].call(e,null!=e?e.isFile:e,{name:"if",hash:{},fn:this.program(2,r),inverse:this.program(4,r),data:r}),null!=i&&(a+=i),a},2:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return' \n"},4:function(e,t,n,r){var i,a="";return i=t["if"].call(e,null!=e?e["default"]:e,{name:"if",hash:{},fn:this.program(5,r),inverse:this.program(7,r),data:r}),null!=i&&(a+=i),a},5:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return" \n
    \n'},7:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return" \n
    \n'},9:function(e,t,n,r){var i,a="";return i=t["if"].call(e,null!=e?e.isFile:e,{name:"if",hash:{},fn:this.program(10,r),inverse:this.program(12,r),data:r}),null!=i&&(a+=i),a},10:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return" \n"},12:function(e,t,n,r){var i,a="";return i=t["if"].call(e,null!=e?e["default"]:e,{name:"if",hash:{},fn:this.program(13,r),inverse:this.program(15,r),data:r}),null!=i&&(a+=i),a},13:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return" \n"},15:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return" \n"},17:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return' '+s((i=null!=(i=t.type||(null!=e?e.type:e))?i:o,typeof i===a?i.call(e,{name:"type",hash:{},data:r}):i))+"\n"},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){var i,a,o="function",s=t.helperMissing,l=this.escapeExpression,u='
    '+l((a=null!=(a=t.name||(null!=e?e.name:e))?a:s,typeof a===o?a.call(e,{name:"name",hash:{},data:r}):a))+'
    \n
    \n";return i=t["if"].call(e,null!=e?e.isBody:e,{name:"if",hash:{},fn:this.program(1,r),inverse:this.program(9,r),data:r}),null!=i&&(u+=i),u+='
    \n',i=t["if"].call(e,null!=e?e.type:e,{name:"if",hash:{},fn:this.program(17,r),inverse:this.noop,data:r}),null!=i&&(u+=i),u+'
    '+l((a=null!=(a=t.description||(null!=e?e.description:e))?a:s,typeof a===o?a.call(e,{name:"description",hash:{},data:r}):a))+"
    \n
    \n
    \n\n"},useData:!0}),this.Handlebars.templates.param=Handlebars.template({1:function(e,t,n,r){var i,a,o="function",s=t.helperMissing,l=this.escapeExpression,u="";return i=t["if"].call(e,null!=e?e.isFile:e,{name:"if",hash:{},fn:this.program(2,r),inverse:this.program(4,r),data:r}),null!=i&&(u+=i),u+='
    \n',i=t["if"].call(e,null!=e?e.type:e,{name:"if",hash:{},fn:this.program(9,r),inverse:this.noop,data:r}),null!=i&&(u+=i),u+'
    '+l((a=null!=(a=t.description||(null!=e?e.description:e))?a:s,typeof a===o?a.call(e,{name:"description",hash:{},data:r}):a))+"
    \n
    \n"},2:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return' \n\n
    \n'},4:function(e,t,n,r){var i,a="";return i=t["if"].call(e,null!=e?e["default"]:e,{name:"if",hash:{},fn:this.program(5,r),inverse:this.program(7,r),data:r}), -null!=i&&(a+=i),a},5:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return" \n
    \n'},7:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return" \n
    \n'},9:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return' '+s((i=null!=(i=t.type||(null!=e?e.type:e))?i:o,typeof i===a?i.call(e,{name:"type",hash:{},data:r}):i))+"\n"},11:function(e,t,n,r){var i,a,o="function",s=t.helperMissing,l=this.escapeExpression,u="";return i=t["if"].call(e,null!=e?e.isFile:e,{name:"if",hash:{},fn:this.program(12,r),inverse:this.program(14,r),data:r}),null!=i&&(u+=i),u+='
    \n',i=t["if"].call(e,null!=e?e.type:e,{name:"if",hash:{},fn:this.program(9,r),inverse:this.noop,data:r}),null!=i&&(u+=i),u+'
    '+l((a=null!=(a=t.description||(null!=e?e.description:e))?a:s,typeof a===o?a.call(e,{name:"description",hash:{},data:r}):a))+"
    \n
    \n"},12:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return'\n \n
    \n'},14:function(e,t,n,r){var i,a="";return i=t["if"].call(e,null!=e?e["default"]:e,{name:"if",hash:{},fn:this.program(15,r),inverse:this.program(17,r),data:r}),null!=i&&(a+=i),a},15:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return" \n"},17:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return" \n"},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){var i,a,o="function",s=t.helperMissing,l=this.escapeExpression,u='
    '+l((a=null!=(a=t.name||(null!=e?e.name:e))?a:s,typeof a===o?a.call(e,{name:"name",hash:{},data:r}):a))+'
    \n
    \n";return i=t["if"].call(e,null!=e?e.isBody:e,{name:"if",hash:{},fn:this.program(1,r),inverse:this.program(11,r),data:r}),null!=i&&(u+=i),u+"
    "},useData:!0}),this.Handlebars.templates.parameter_content_type=Handlebars.template({1:function(e,t,n,r){var i,a="";return i=t.each.call(e,null!=e?e.consumes:e,{name:"each",hash:{},fn:this.program(2,r),inverse:this.noop,data:r}),null!=i&&(a+=i),a},2:function(e,t,n,r){var i,a=this.lambda,o=' \n"},4:function(e,t,n,r){return' \n'},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){var i,a='
    \n \n \n
    \n"},useData:!0}),this.Handlebars.templates.resource=Handlebars.template({compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return"
      \n
    "},useData:!0}),this.Handlebars.templates.response_content_type=Handlebars.template({1:function(e,t,n,r){var i,a="";return i=t.each.call(e,null!=e?e.produces:e,{name:"each",hash:{},fn:this.program(2,r),inverse:this.noop,data:r}),null!=i&&(a+=i),a},2:function(e,t,n,r){var i,a=this.lambda,o=' \n"},4:function(e,t,n,r){return' \n'},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){var i,a='
    \n
    Response Type
    \n
    \n
    \n \n
    \n
    \n
    \n\n"},useData:!0}),this.Handlebars.templates.sidebar_header=Handlebars.template({compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){return""},useData:!0}),this.Handlebars.templates.sidebar_item=Handlebars.template({compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return s((i=null!=(i=t.summary||(null!=e?e.summary:e))?i:o,typeof i===a?i.call(e,{name:"summary",hash:{},data:r}):i))+"\n"},useData:!0}),this.Handlebars.templates.signature=Handlebars.template({1:function(e,t,n,r){var i,a,o="function",s=t.helperMissing,l=this.escapeExpression,u=' \n
    \n
    \n ';return a=null!=(a=t.signature||(null!=e?e.signature:e))?a:s,i=typeof a===o?a.call(e,{name:"signature",hash:{},data:r}):a,null!=i&&(u+=i),u+"\n
    \n
    \n"},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){var i,a,o="function",s=t.helperMissing,l=this.escapeExpression,u='

    '+l((a=null!=(a=t.type||(null!=e?e.type:e))?a:s,typeof a===o?a.call(e,{name:"type",hash:{},data:r}):a))+' Sample

    \n
    \n
    \n
    '+l((a=null!=(a=t.sampleJSON||(null!=e?e.sampleJSON:e))?a:s,typeof a===o?a.call(e,{name:"sampleJSON",hash:{},data:r}):a))+"
    \n
    \n
    \n\n";return i=t["if"].call(e,null!=e?e.signature:e,{name:"if",hash:{},fn:this.program(1,r),inverse:this.noop,data:r}),null!=i&&(u+=i),u},useData:!0}),this.Handlebars.templates.status_code=Handlebars.template({compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){var i,a,o="function",s=t.helperMissing,l=this.escapeExpression,u=''+l((a=null!=(a=t.code||(null!=e?e.code:e))?a:s,typeof a===o?a.call(e,{name:"code",hash:{},data:r}):a))+"\n";return a=null!=(a=t.message||(null!=e?e.message:e))?a:s,i=typeof a===o?a.call(e,{name:"message",hash:{},data:r}):a,null!=i&&(u+=i),u+"\n"},useData:!0}),function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.SwaggerClient=e()}}(function(){var e;return function t(e,n,r){function i(o,s){if(!n[o]){if(!e[o]){var l="function"==typeof require&&require;if(!s&&l)return l(o,!0);if(a)return a(o,!0);var u=new Error("Cannot find module '"+o+"'");throw u.code="MODULE_NOT_FOUND",u}var c=n[o]={exports:{}};e[o][0].call(c.exports,function(t){var n=e[o][1][t];return i(n?n:t)},c,c.exports,t,e,n,r)}return n[o].exports}for(var a="function"==typeof require&&require,o=0;on;n++)if(this[n]===e)return n;return-1}),String.prototype.trim||(String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")}),String.prototype.endsWith||(String.prototype.endsWith=function(e){return-1!==this.indexOf(e,this.length-e.length)}),t.exports=a,a.ApiKeyAuthorization=r.ApiKeyAuthorization,a.PasswordAuthorization=r.PasswordAuthorization,a.CookieAuthorization=r.CookieAuthorization,a.SwaggerApi=o,a.SwaggerClient=o},{"./lib/auth":2,"./lib/client":3,"./lib/helpers":4}],2:[function(e,t,n){"use strict";var r=e("btoa"),i=e("cookiejar"),a=t.exports.SwaggerAuthorizations=function(){this.authz={}};a.prototype.add=function(e,t){return this.authz[e]=t,t},a.prototype.remove=function(e){return delete this.authz[e]},a.prototype.apply=function(e,t){var n,r,i,a,o=null;if("undefined"==typeof t)for(n in this.authz)i=this.authz[n],a=i.apply(e,t),a===!0&&(o=!0);else if(Array.isArray(t))for(var s=0;s0?e.url+"&"+this.name+"="+this.value:e.url+"?"+this.name+"="+this.value,!0):"header"===this.type?(e.headers[this.name]=this.value,!0):void 0};var s=t.exports.CookieAuthorization=function(e){this.cookie=e};s.prototype.apply=function(e){return e.cookieJar=e.cookieJar||new i,e.cookieJar.setCookie(this.cookie),!0};var l=t.exports.PasswordAuthorization=function(e,t,n){this.name=e,this.username=t,this.password=n};l.prototype.apply=function(e){return e.headers.Authorization="Basic "+r(this.username+":"+this.password),!0}},{btoa:16,cookiejar:17}],3:[function(e,t,n){"use strict";var r={bind:e("lodash-compat/function/bind"),cloneDeep:e("lodash-compat/lang/cloneDeep"),find:e("lodash-compat/collection/find"),forEach:e("lodash-compat/collection/forEach"),indexOf:e("lodash-compat/array/indexOf"),isArray:e("lodash-compat/lang/isArray"),isFunction:e("lodash-compat/lang/isFunction"),isPlainObject:e("lodash-compat/lang/isPlainObject"),isUndefined:e("lodash-compat/lang/isUndefined")},i=e("./auth"),a=e("./helpers"),o=e("./types/model"),s=e("./types/operation"),l=e("./types/operationGroup"),u=e("./resolver"),c=e("./http"),p=e("./spec-converter"),h=["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"],f=["apis","asCurl","description","externalDocs","help","label","name","operation","operations","operationsArray","path","tag"],d=["delete","get","head","options","patch","post","put"],m=t.exports=function(e,t){return this.authorizationScheme=null,this.authorizations=null,this.basePath=null,this.debug=!1,this.info=null,this.isBuilt=!1,this.isValid=!1,this.modelsArray=[],this.resourceCount=0,this.url=null,this.useJQuery=!1,"undefined"!=typeof e?this.initialize(e,t):this};m.prototype.initialize=function(e,t){this.models={},this.sampleModels={},t=t||{},"string"==typeof e?this.url=e:"object"==typeof e&&(t=e,this.url=t.url),this.swaggerRequestHeaders=t.swaggerRequestHeaders||"application/json;charset=utf-8,*/*",this.defaultSuccessCallback=t.defaultSuccessCallback||null,this.defaultErrorCallback=t.defaultErrorCallback||null,this.modelPropertyMacro=t.modelPropertyMacro||null,this.parameterMacro=t.modelPropertyMacro||null,"function"==typeof t.success&&(this.success=t.success),t.useJQuery&&(this.useJQuery=t.useJQuery),this.clientAuthorizations=t.authorizations?t.authorizations:new i.SwaggerAuthorizations,this.options=t||{},this.supportedSubmitMethods=t.supportedSubmitMethods||[],this.failure=t.failure||function(){},this.progress=t.progress||function(){},this.spec=r.cloneDeep(t.spec),"function"==typeof t.success&&(this.ready=!0,this.build())},m.prototype.build=function(e){if(this.isBuilt)return this;var t=this;this.progress("fetching resource list: "+this.url);var n={useJQuery:this.useJQuery,url:this.url,method:"get",headers:{accept:this.swaggerRequestHeaders},on:{error:function(e){return t.fail("http"!==t.url.substring(0,4)?"Please specify the protocol for "+t.url:0===e.status?"Can't read from server. It may not have the appropriate access-control-origin settings.":404===e.status?"Can't read swagger JSON from "+t.url:e.status+" : "+e.statusText+" "+t.url)},response:function(e){var n=e.obj||JSON.parse(e.data);if(t.swaggerVersion=n.swaggerVersion,n.swagger&&2===parseInt(n.swagger))t.swaggerVersion=n.swagger,(new u).resolve(n,t.buildFromSpec,t),t.isValid=!0;else{var r=new p;r.setDocumentationLocation(t.url),r.convert(n,t.clientAuthorizations,function(e){(new u).resolve(e,t.buildFromSpec,t),t.isValid=!0})}}}};if(this.spec)setTimeout(function(){(new u).resolve(t.spec,t.buildFromSpec,t)},10);else{if(this.clientAuthorizations.apply(n),e)return n;(new c).execute(n,this.options)}return this},m.prototype.buildFromSpec=function(e){if(this.isBuilt)return this;this.apis={},this.apisArray=[],this.basePath=e.basePath||"",this.consumes=e.consumes,this.host=e.host||"",this.info=e.info||{},this.produces=e.produces,this.schemes=e.schemes||[],this.securityDefinitions=e.securityDefinitions,this.title=e.title||"",e.externalDocs&&(this.externalDocs=e.externalDocs),this.authSchemes=e.securityDefinitions;var t,n={};if(Array.isArray(e.tags))for(n={},t=0;t-1?"_"+e:e,i=r.indexOf(f,e)>-1?"_"+e:e,o=m[t];if(t!==e&&a.log("The '"+e+"' tag conflicts with a SwaggerClient function/property name. Use 'client."+t+"' or 'client.apis."+e+"' instead of 'client."+e+"'."),i!==e&&a.log("The '"+e+"' tag conflicts with a SwaggerClient operation function/property name. Use 'client.apis."+i+"' instead of 'client.apis."+e+"'."),r.indexOf(f,c)>-1&&(a.log("The '"+c+"' operationId conflicts with a SwaggerClient operation function/property name. Use 'client.apis."+i+"._"+c+"' instead of 'client.apis."+i+"."+c+"'."),c="_"+c,p.nickname=c),r.isUndefined(o)){o=m[t]=m.apis[i]={},o.operations={},o.label=i,o.apis={};var s=n[e];r.isUndefined(s)||(o.description=s.description,o.externalDocs=s.externalDocs),m[t].help=r.bind(m.help,o),m.apisArray.push(new l(e,o.description,o.externalDocs,p))}r.isFunction(o.help)||(o.help=r.bind(m.help,o)),m.apis[i][c]=o[c]=r.bind(p.execute,p),m.apis[i][c].help=o[c].help=r.bind(p.help,p),m.apis[i][c].asCurl=o[c].asCurl=r.bind(p.asCurl,p),o.apis[c]=o.operations[c]=p;var u=r.find(m.apisArray,function(t){return t.tag===e});u&&u.operationsArray.push(p)})}})}),this.isBuilt=!0,this.success&&(this.isValid=!0,this.isBuilt=!0,this.success()),this},m.prototype.parseUri=function(e){var t=/^(((([^:\/#\?]+:)?(?:(\/\/)((?:(([^:@\/#\?]+)(?:\:([^:@\/#\?]+))?)@)?(([^:\/#\?\]\[]+|\[[^\/\]@#?]+\])(?:\:([0-9]+))?))?)?)?((\/?(?:[^\/\?#]+\/+)*)([^\?#]*)))?(\?[^#]+)?)(#.*)?/,n=t.exec(e);return{scheme:n[4].replace(":",""),host:n[11],port:n[12],path:n[15]}},m.prototype.help=function(e){var t="";return this instanceof m?r.forEach(this.apis,function(e,n){r.isPlainObject(e)&&(t+="operations for the '"+n+"' tag\n",r.forEach(e.operations,function(e,n){t+=" * "+n+": "+e.summary+"\n"}))}):(this instanceof l||r.isPlainObject(this))&&(t+="operations for the '"+this.label+"' tag\n",r.forEach(this.apis,function(e,n){t+=" * "+n+": "+e.summary+"\n"})),e?t:(a.log(t),t)},m.prototype.tagFromLabel=function(e){return e},m.prototype.idFromOp=function(e,t,n){n&&n.operationId||(n=n||{},n.operationId=t+"_"+e);var r=n.operationId.replace(/[\s!@#$%^&*()_+=\[{\]};:<>|.\/?,\\'""-]/g,"_")||e.substring(1)+"_"+t;return r=r.replace(/((_){2,})/g,"_"),r=r.replace(/^(_)*/g,""),r=r.replace(/([_])*$/g,"")},m.prototype.fail=function(e){throw this.failure(e),e}},{"./auth":2,"./helpers":4,"./http":5,"./resolver":6,"./spec-converter":7,"./types/model":8,"./types/operation":9,"./types/operationGroup":10,"lodash-compat/array/indexOf":19,"lodash-compat/collection/find":22,"lodash-compat/collection/forEach":23,"lodash-compat/function/bind":26,"lodash-compat/lang/cloneDeep":106,"lodash-compat/lang/isArray":108,"lodash-compat/lang/isFunction":109,"lodash-compat/lang/isPlainObject":112,"lodash-compat/lang/isUndefined":115}],4:[function(e,t,n){(function(n){"use strict";var r={isPlainObject:e("lodash-compat/lang/isPlainObject")};t.exports.__bind=function(e,t){return function(){return e.apply(t,arguments)}};var i=t.exports.log=function(){console&&"test"!==n.env.NODE_ENV&&console.log(Array.prototype.slice.call(arguments)[0])};t.exports.fail=function(e){i(e)},t.exports.optionHtml=function(e,t){return''+e+":"+t+""};var a=t.exports.resolveSchema=function(e){return r.isPlainObject(e.schema)&&(e=a(e.schema)),e};t.exports.typeFromJsonSchema=function(e,t){var n;return"integer"===e&&"int32"===t?n="integer":"integer"===e&&"int64"===t?n="long":"integer"===e&&"undefined"==typeof t?n="long":"string"===e&&"date-time"===t?n="date-time":"string"===e&&"date"===t?n="date":"number"===e&&"float"===t?n="float":"number"===e&&"double"===t?n="double":"number"===e&&"undefined"==typeof t?n="double":"boolean"===e?n="boolean":"string"===e&&(n="string"),n};var o=t.exports.simpleRef=function(e){return"undefined"==typeof e?null:0===e.indexOf("#/definitions/")?e.substring("#/definitions/".length):e},s=t.exports.getStringSignature=function(e,t){var n="";return"undefined"!=typeof e.$ref?n+=o(e.$ref):"undefined"==typeof e.type?n+="object":"array"===e.type?t?n+=s(e.items||e.$ref||{}):(n+="Array[",n+=s(e.items||e.$ref||{}),n+="]"):n+="integer"===e.type&&"int32"===e.format?"integer":"integer"===e.type&&"int64"===e.format?"long":"integer"===e.type&&"undefined"==typeof e.format?"long":"string"===e.type&&"date-time"===e.format?"date-time":"string"===e.type&&"date"===e.format?"date":"string"===e.type&&"undefined"==typeof e.format?"string":"number"===e.type&&"float"===e.format?"float":"number"===e.type&&"double"===e.format?"double":"number"===e.type&&"undefined"==typeof e.format?"double":"boolean"===e.type?"boolean":e.$ref?o(e.$ref):e.type,n}}).call(this,e("_process"))},{_process:15,"lodash-compat/lang/isPlainObject":112}],5:[function(e,t,n){"use strict";var r=e("./helpers"),i=e("jquery"),a=e("superagent"),o=function(){},s=function(){},l=t.exports=function(){};l.prototype.execute=function(e,t){var n;n=t&&t.client?t.client:new s(t),(e&&e.useJQuery===!0||this.isInternetExplorer())&&(n=new o(t));var r=e.on.response,i=function(e){t&&t.responseInterceptor&&(e=t.responseInterceptor.apply(e)),r(e)};e.on.response=function(e){i(e)},e&&"object"==typeof e.body&&(e.body.type&&"formData"===e.body.type?(e.contentType=!1,e.processData=!1,delete e.headers["Content-Type"]):e.body=JSON.stringify(e.body)),n.execute(e)},l.prototype.isInternetExplorer=function(){var e=!1;if("undefined"!=typeof navigator&&navigator.userAgent){var t=navigator.userAgent.toLowerCase();if(-1!==t.indexOf("msie")){var n=parseInt(t.split("msie")[1]);8>=n&&(e=!0)}}return e},o.prototype.execute=function(e){var t=e.on,n=e;return e.type=e.method,e.cache=!1,delete e.useJQuery,e.data=e.body,delete e.body,e.complete=function(e){for(var i={},a=e.getAllResponseHeaders().split("\n"),o=0;o0))try{p.obj=e.responseJSON||JSON.parse(p.data)||{}}catch(f){r.log("unable to parse JSON content")}if(e.status>=200&&e.status<300)t.response(p);else{if(!(0===e.status||e.status>=400&&e.status<599))return t.response(p);t.error(p)}},i.support.cors=!0,i.ajax(e)},s.prototype.execute=function(e){var t=e.method.toLowerCase();"delete"===t&&(t="del");var n,r=e.headers||{},i=a[t](e.url);for(n in r)i.set(n,r[n]);e.body&&i.send(e.body),i.end(function(t,n){n=n||{status:0,headers:{error:"no response from server"}};var r,i={url:e.url,method:e.method,headers:n.headers};!t&&n.error&&(t=n.error),t&&e.on&&e.on.error?(i.obj=t,i.status=n?n.status:500,i.statusText=n?n.text:t.message,r=e.on.error):n&&e.on&&e.on.response&&(i.obj="undefined"!=typeof n.body?n.body:n.text,i.status=n.status,i.statusText=n.text,r=e.on.response),i.data=i.statusText,r&&r(i)})}},{"./helpers":4,jquery:18,superagent:125}],6:[function(e,t,n){"use strict";var r=e("./http"),i=t.exports=function(){};i.prototype.resolve=function(e,t,n){this.scope=n||this,this.iteration=this.iteration||0;var i,a,o,s,l,u=0,c={},p={},h={};for(a in e.definitions){var f=e.definitions[a];for(l in f.properties)s=f.properties[l],this.resolveTo(s,h)}for(a in e.paths){var d,m,g;o=e.paths[a];for(d in o)if("$ref"===d)this.resolveInline(e,o,h,p);else{m=o[d];var y,v=m.parameters;for(y in v){var b=v[y];"body"===b["in"]&&b.schema&&this.resolveTo(b.schema,h),b.$ref&&this.resolveInline(e,b,h,p)}for(g in m.responses){var w=m.responses[g];"object"==typeof w&&w.$ref&&this.resolveInline(e,w,h,p),w.schema&&w.schema.$ref&&this.resolveTo(w.schema,h)}}}var x={},A=0;for(a in h){var j=a.split("#");2===j.length?(i=j[0],o=j[1],Array.isArray(x[i])||(x[i]=[],A+=1),x[i].push(o)):(Array.isArray(x[a])||(x[a]=[],A+=1),x[a].push(null))}for(a in x){var S=this,C=x[a];i=a;var E={useJQuery:!1,url:i,method:"get",headers:{accept:this.scope.swaggerRequestHeaders||"application/json"},on:{error:function(){u+=1;var n;for(n=0;n0&&(d=d[g])}var y=i+"#"+f,v=m[o-1];"undefined"!=typeof d?c[y]={name:v,obj:d}:p[y]=null}}u===A&&S.finish(e,h,c,p,t)}}};n&&n.clientAuthorizations&&n.clientAuthorizations.apply(E),(new r).execute(E)}0===Object.keys(x).length&&t.call(this.scope,e,p)},i.prototype.finish=function(e,t,n,r,i){var a;for(a in t){var o,s=t[a];for(o=0;o0&&(l=l[u])}if(l){delete t.$ref;var c;for(c in l)t[c]=l[c]}else r[i]=null}}else"array"===t.type&&this.resolveTo(t.items,n)},i.prototype.resolveTo=function(e,t){var n=e.$ref;if(n)0===n.indexOf("http")&&(Array.isArray(t[n])?t[n].push({obj:e,resolveAs:"$ref"}):t[n]=[{obj:e,resolveAs:"$ref"}]);else if("array"===e.type){var r=e.items;this.resolveTo(r,t)}}},{"./http":5}],7:[function(e,t,n){"use strict";var r=e("./http"),i=t.exports=function(){this.errors=[],this.warnings=[],this.modelMap={}};i.prototype.setDocumentationLocation=function(e){this.docLocation=e},i.prototype.convert=function(e,t,n){if(!e||!Array.isArray(e.apis))return this.finish(n,null);this.clientAuthorizations=t;var r={swagger:"2.0"};r.originalVersion=e.swaggerVersion,this.apiInfo(e,r),this.securityDefinitions(e,r),e.basePath&&this.setDocumentationLocation(e.basePath),e.basePath&&this.setDocumentationLocation(e.basePath);var i,a=!1;for(i=0;i0?(t.host=i.substring(0,a),t.basePath=i.substring(a)):(t.host=i,t.basePath="/")):0===e.basePath.indexOf("https://")?(i=e.basePath.substring("https://".length),a=i.indexOf("/"),a>0?(t.host=i.substring(0,a),t.basePath=i.substring(a)):(t.host=i,t.basePath="/")):t.basePath=e.basePath;var o;if(e.authorizations&&(o=e.authorizations),e.consumes&&(t.consumes=e.consumes),e.produces&&(t.produces=e.produces),"object"==typeof e)for(n in e.models){var s=e.models[n],l=s.id||n;this.modelMap[l]=n}for(r=0;r0&&(o["enum"]=a),i.required instanceof Array)for(var u=0,c=i.required.length;c>u;u++){var p=i.required[u];o.properties[p]&&(o.properties[p].required=!0)}t.definitions[n]=o}}},i.prototype.extractTag=function(e){var t=e||"default";return(0===t.indexOf("http:")||0===t.indexOf("https:"))&&(t=t.split(["/"]),t=t[t.length-1].substring()),t.endsWith(".json")&&(t=t.substring(0,t.length-".json".length)),t.replace("/","")},i.prototype.operations=function(e,t,n,r,i){if(Array.isArray(n)){var a;i.paths||(i.paths={});var o=i.paths[e]||{},s=this.extractTag(t);i.tags=i.tags||[];var l=!1;for(a=0;a= 2.0.0-beta.1"],main:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return"
    \n \n
    \n
    \n
    \n
    "+s((i=null!=(i=t.keyName||(null!=e?e.keyName:e))?i:o,typeof i===a?i.call(e,{name:"keyName",hash:{},data:r}):i))+'
    \n \n \n
    \n
    \n\n'},useData:!0}),this.Handlebars.templates.basic_auth_button_view=Handlebars.template({compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){return'
    \n
    \n
    \n
    Username
    \n \n
    Password
    \n \n \n
    \n
    \n\n'},useData:!0}),this.Handlebars.templates.content_type=Handlebars.template({1:function(e,t,n,r){var i,a="";return i=t.each.call(e,null!=e?e.produces:e,{name:"each",hash:{},fn:this.program(2,r),inverse:this.noop,data:r}),null!=i&&(a+=i),a},2:function(e,t,n,r){var i,a=this.lambda,o=' \n"},4:function(e,t,n,r){return' \n'},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){var i,a='\n\n"},useData:!0}),$(function(){$.fn.vAlign=function(){return this.each(function(){var e=$(this).height(),t=$(this).parent().height(),n=(t-e)/2;$(this).css("margin-top",n)})},$.fn.stretchFormtasticInputWidthToParent=function(){return this.each(function(){var e=$(this).closest("form").innerWidth(),t=parseInt($(this).closest("form").css("padding-left"),10)+parseInt($(this).closest("form").css("padding-right"),10),n=parseInt($(this).css("padding-left"),10)+parseInt($(this).css("padding-right"),10);$(this).css("width",e-t-n)})},$("form.formtastic li.string input, form.formtastic textarea").stretchFormtasticInputWidthToParent(),$("ul.downplayed li div.content p").vAlign(),$("form.sandbox").submit(function(){var e=!0;return $(this).find("input.required").each(function(){$(this).removeClass("error"),""===$(this).val()&&($(this).addClass("error"),$(this).wiggle(),e=!1)}),e})}),Function.prototype.bind&&console&&"object"==typeof console.log&&["log","info","warn","error","assert","dir","clear","profile","profileEnd"].forEach(function(e){console[e]=this.bind(console[e],console)},Function.prototype.call),window.Docs={shebang:function(){var e=$.param.fragment().split("/");switch(e.shift(),e.length){case 1:break;case 2:var t="#resources_nav [data-resource] [data-endpoint="+e[0]+"_"+e[1]+"]",n=$("#swagger_sidebar").find(t),r=n.attr("data-selected");"undefined"==typeof r&&n.trigger("click")}}},Handlebars.registerHelper("sanitize",function(e){return e=e.replace(/)<[^<]*)*<\/script>/gi,""),new Handlebars.SafeString(e)}),this.Handlebars.templates.main=Handlebars.template({1:function(e,t,n,r){var i,a=this.lambda,o=this.escapeExpression,s=' '+o(a(null!=(i=null!=e?e.info:e)?i.title:i,e))+'\n ';return i=a(null!=(i=null!=e?e.info:e)?i.description:i,e),null!=i&&(s+=i),s+"\n"},3:function(e,t,n,r){var i,a=this.lambda,o=this.escapeExpression;return" \n Contact: '+o(a(null!=(i=null!=(i=null!=e?e.info:e)?i.contact:i)?i.email:i,e))+"\n

    \n"},5:function(e,t,n,r){var i,a=this.lambda,o=this.escapeExpression;return' api version: '+o(a(null!=(i=null!=e?e.info:e)?i.version:i,e))+"\n"},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){var i,a,o="function",s=t.helperMissing,l=this.escapeExpression,u='
    \n \n
    \n\n
    \n
      \n
      \n"},useData:!0}),this.Handlebars.templates.operation=Handlebars.template({1:function(e,t,n,r){return"deprecated"},3:function(e,t,n,r){return"

      Warning: Deprecated

      \n"},5:function(e,t,n,r){var i,a,o="function",s=t.helperMissing,l='
      ';return a=null!=(a=t.description||(null!=e?e.description:e))?a:s,i=typeof a===o?a.call(e,{name:"description",hash:{},data:r}):a,null!=i&&(l+=i),l+"
      \n"},7:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return'

      \n Parameters\n

      \n\n
      \n
      \n\n'},9:function(e,t,n,r){return'
      \n'},11:function(e,t,n,r){var i,a=' \n"},12:function(e,t,n,r){var i,a=this.lambda,o=this.escapeExpression,s="
      "+o(a(null!=e?e.scope:e,e))+"
      \n"},14:function(e,t,n,r){return' \n
      \n'},16:function(e,t,n,r){return'
      \n'},18:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return'
      \n

      \n Response Messages\n

      \n\n
      \n \n \n \n
      \n
      \n'},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){var i,a,o,s="function",l=t.helperMissing,u=this.escapeExpression,c=t.blockHelperMissing,p="
        \n
      • \n
        \n
        \n

        "+u((a=null!=(a=t.summary||(null!=e?e.summary:e))?a:l,typeof a===s?a.call(e,{name:"summary",hash:{},data:r}):a))+"

        \n\n

        \n \n "+u((a=null!=(a=t.method||(null!=e?e.method:e))?a:l,typeof a===s?a.call(e,{name:"method",hash:{},data:r}):a))+"\n \n \n '+u((a=null!=(a=t.path||(null!=e?e.path:e))?a:l,typeof a===s?a.call(e,{name:"path",hash:{},data:r}):a))+'\n \n

        \n
        \n\n \n Show samples\n \n\n',i=t["if"].call(e,null!=e?e.deprecated:e,{name:"if",hash:{},fn:this.program(3,r),inverse:this.noop,data:r}),null!=i&&(p+=i),i=t["if"].call(e,null!=e?e.description:e,{name:"if",hash:{},fn:this.program(5,r),inverse:this.noop,data:r}),null!=i&&(p+=i),p+='\n\n
        \n\n',i=t["if"].call(e,null!=e?e.parameters:e,{name:"if",hash:{},fn:this.program(7,r),inverse:this.noop,data:r}),null!=i&&(p+=i),p+='\n

        \n Test this endpoint\n

        \n\n
        \n
        \n \n Hide Response\n \n \n\n',a=null!=(a=t.oauth||(null!=e?e.oauth:e))?a:l,o={name:"oauth",hash:{},fn:this.program(9,r),inverse:this.noop,data:r},i=typeof a===s?a.call(e,o):a,t.oauth||(i=c.call(e,i,o)),null!=i&&(p+=i),p+="\n",i=t.each.call(e,null!=e?e.oauth:e,{name:"each",hash:{},fn:this.program(11,r),inverse:this.noop,data:r}),null!=i&&(p+=i),p+="\n",a=null!=(a=t.oauth||(null!=e?e.oauth:e))?a:l,o={name:"oauth",hash:{},fn:this.program(14,r),inverse:this.noop,data:r},i=typeof a===s?a.call(e,o):a,t.oauth||(i=c.call(e,i,o)),null!=i&&(p+=i),p+="\n
        \n\n",i=t["if"].call(e,null!=e?e.type:e,{name:"if",hash:{},fn:this.program(16,r),inverse:this.noop,data:r}),null!=i&&(p+=i),p+="\n
        \n\n",i=t["if"].call(e,null!=e?e.responseMessages:e,{name:"if",hash:{},fn:this.program(18,r),inverse:this.noop,data:r}),null!=i&&(p+=i),p+'
        \n\n
        \n\n
        \n \n \n
        \n\n \n
      • \n
      "},useData:!0}),this.Handlebars.templates.param_list=Handlebars.template({1:function(e,t,n,r){return" multiple='multiple'"},3:function(e,t,n,r){return""},5:function(e,t,n,r){var i,a="";return i=t["if"].call(e,null!=e?e["default"]:e,{name:"if",hash:{},fn:this.program(3,r),inverse:this.program(6,r),data:r}),null!=i&&(a+=i),a},6:function(e,t,n,r){return" \n"},8:function(e,t,n,r){var i,a="";return i=t["if"].call(e,null!=e?e.isDefault:e,{name:"if",hash:{},fn:this.program(9,r),inverse:this.program(11,r),data:r}),null!=i&&(a+=i),a},9:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return' \n"},11:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return" \n"},13:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return' '+s((i=null!=(i=t.type||(null!=e?e.type:e))?i:o,typeof i===a?i.call(e,{name:"type",hash:{},data:r}):i))+"\n"},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){var i,a,o="function",s=t.helperMissing,l=this.escapeExpression,u='
      '+l((a=null!=(a=t.name||(null!=e?e.name:e))?a:s,typeof a===o?a.call(e,{name:"name",hash:{},data:r}):a))+'
      \n
      \n
      \n \n
      \n',i=t["if"].call(e,null!=e?e.type:e,{name:"if",hash:{},fn:this.program(13,r),inverse:this.noop,data:r}),null!=i&&(u+=i),u+'
      '+l((a=null!=(a=t.description||(null!=e?e.description:e))?a:s,typeof a===o?a.call(e,{name:"description",hash:{},data:r}):a))+"
      \n
      \n
      \n
      \n\n"},useData:!0}),this.Handlebars.templates.param_readonly_required=Handlebars.template({1:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return" \n
      \n'},3:function(e,t,n,r){var i,a="";return i=t["if"].call(e,null!=e?e["default"]:e,{name:"if",hash:{},fn:this.program(4,r),inverse:this.program(6,r),data:r}),null!=i&&(a+=i),a},4:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return" "+s((i=null!=(i=t["default"]||(null!=e?e["default"]:e))?i:o,typeof i===a?i.call(e,{name:"default",hash:{},data:r}):i))+"\n"},6:function(e,t,n,r){return" (empty)\n"},8:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return' '+s((i=null!=(i=t.type||(null!=e?e.type:e))?i:o,typeof i===a?i.call(e,{name:"type",hash:{},data:r}):i))+"\n"},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){var i,a,o="function",s=t.helperMissing,l=this.escapeExpression,u='
      '+l((a=null!=(a=t.name||(null!=e?e.name:e))?a:s,typeof a===o?a.call(e,{name:"name",hash:{},data:r}):a))+'
      \n
      \n
      \n";return i=t["if"].call(e,null!=e?e.isBody:e,{name:"if",hash:{},fn:this.program(1,r),inverse:this.program(3,r),data:r}),null!=i&&(u+=i),u+='
      \n',i=t["if"].call(e,null!=e?e.type:e,{name:"if",hash:{},fn:this.program(8,r),inverse:this.noop,data:r}),null!=i&&(u+=i),u+'
      '+l((a=null!=(a=t.description||(null!=e?e.description:e))?a:s,typeof a===o?a.call(e,{name:"description",hash:{},data:r}):a))+"
      \n
      \n
      \n
      \n"},useData:!0}),this.Handlebars.templates.param_readonly=Handlebars.template({1:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return" \n
      \n'},3:function(e,t,n,r){var i,a="";return i=t["if"].call(e,null!=e?e["default"]:e,{name:"if",hash:{},fn:this.program(4,r),inverse:this.program(6,r),data:r}),null!=i&&(a+=i),a},4:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return" "+s((i=null!=(i=t["default"]||(null!=e?e["default"]:e))?i:o,typeof i===a?i.call(e,{name:"default",hash:{},data:r}):i))+"\n"},6:function(e,t,n,r){return" (empty)\n"},8:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return' '+s((i=null!=(i=t.type||(null!=e?e.type:e))?i:o,typeof i===a?i.call(e,{name:"type",hash:{},data:r}):i))+"\n"},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){var i,a,o="function",s=t.helperMissing,l=this.escapeExpression,u='
      '+l((a=null!=(a=t.name||(null!=e?e.name:e))?a:s,typeof a===o?a.call(e,{name:"name",hash:{},data:r}):a))+'
      \n
      \n
      \n";return i=t["if"].call(e,null!=e?e.isBody:e,{name:"if",hash:{},fn:this.program(1,r),inverse:this.program(3,r),data:r}),null!=i&&(u+=i),u+='
      \n',i=t["if"].call(e,null!=e?e.type:e,{name:"if",hash:{},fn:this.program(8,r),inverse:this.noop,data:r}),null!=i&&(u+=i),u+'
      '+l((a=null!=(a=t.description||(null!=e?e.description:e))?a:s,typeof a===o?a.call(e,{name:"description",hash:{},data:r}):a))+"
      \n
      \n
      \n
      \n"},useData:!0}),this.Handlebars.templates.param_required=Handlebars.template({1:function(e,t,n,r){var i,a="";return i=t["if"].call(e,null!=e?e.isFile:e,{name:"if",hash:{},fn:this.program(2,r),inverse:this.program(4,r),data:r}),null!=i&&(a+=i),a},2:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return' \n"},4:function(e,t,n,r){var i,a="";return i=t["if"].call(e,null!=e?e["default"]:e,{name:"if",hash:{},fn:this.program(5,r),inverse:this.program(7,r),data:r}),null!=i&&(a+=i),a},5:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return"
      \n \n
      \n'},7:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return" \n
      \n
      \n
      \n'},9:function(e,t,n,r){var i,a="";return i=t["if"].call(e,null!=e?e.isFile:e,{name:"if",hash:{},fn:this.program(10,r),inverse:this.program(12,r),data:r}),null!=i&&(a+=i),a},10:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return" \n"},12:function(e,t,n,r){var i,a="";return i=t["if"].call(e,null!=e?e["default"]:e,{name:"if",hash:{},fn:this.program(13,r),inverse:this.program(15,r),data:r}),null!=i&&(a+=i),a},13:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return" \n"},15:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return" \n"},17:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return' '+s((i=null!=(i=t.type||(null!=e?e.type:e))?i:o,typeof i===a?i.call(e,{name:"type",hash:{},data:r}):i))+"\n"},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){var i,a,o="function",s=t.helperMissing,l=this.escapeExpression,u='
      '+l((a=null!=(a=t.name||(null!=e?e.name:e))?a:s,typeof a===o?a.call(e,{name:"name",hash:{},data:r}):a))+'
      \n
      \n";return i=t["if"].call(e,null!=e?e.isBody:e,{name:"if",hash:{},fn:this.program(1,r),inverse:this.program(9,r),data:r}),null!=i&&(u+=i),u+='
      \n',i=t["if"].call(e,null!=e?e.type:e,{name:"if",hash:{},fn:this.program(17,r),inverse:this.noop,data:r}),null!=i&&(u+=i),u+'
      '+l((a=null!=(a=t.description||(null!=e?e.description:e))?a:s,typeof a===o?a.call(e,{name:"description",hash:{},data:r}):a))+"
      \n
      \n
      \n\n"},useData:!0}),this.Handlebars.templates.param=Handlebars.template({1:function(e,t,n,r){var i,a,o="function",s=t.helperMissing,l=this.escapeExpression,u="";return i=t["if"].call(e,null!=e?e.isFile:e,{name:"if",hash:{},fn:this.program(2,r),inverse:this.program(4,r),data:r}),null!=i&&(u+=i),u+='
      \n',i=t["if"].call(e,null!=e?e.type:e,{name:"if",hash:{},fn:this.program(9,r),inverse:this.noop,data:r}),null!=i&&(u+=i),u+'
      '+l((a=null!=(a=t.description||(null!=e?e.description:e))?a:s,typeof a===o?a.call(e,{name:"description",hash:{},data:r}):a))+"
      \n
      \n"},2:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return' \n\n
      \n'},4:function(e,t,n,r){var i,a="";return i=t["if"].call(e,null!=e?e["default"]:e,{name:"if",hash:{},fn:this.program(5,r),inverse:this.program(7,r),data:r}),null!=i&&(a+=i),a},5:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return"
      \n\n \n
      \n'},7:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return" \n
      \n
      \n'},9:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return' '+s((i=null!=(i=t.type||(null!=e?e.type:e))?i:o,typeof i===a?i.call(e,{name:"type",hash:{},data:r}):i))+"\n"},11:function(e,t,n,r){var i,a,o="function",s=t.helperMissing,l=this.escapeExpression,u="";return i=t["if"].call(e,null!=e?e.isFile:e,{name:"if",hash:{},fn:this.program(12,r),inverse:this.program(14,r),data:r}),null!=i&&(u+=i),u+='
      \n',i=t["if"].call(e,null!=e?e.type:e,{name:"if",hash:{},fn:this.program(9,r),inverse:this.noop,data:r}),null!=i&&(u+=i),u+'
      '+l((a=null!=(a=t.description||(null!=e?e.description:e))?a:s,typeof a===o?a.call(e,{name:"description",hash:{},data:r}):a))+"
      \n
      \n"},12:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return'\n \n
      \n'},14:function(e,t,n,r){var i,a="";return i=t["if"].call(e,null!=e?e["default"]:e,{name:"if",hash:{},fn:this.program(15,r),inverse:this.program(17,r),data:r}),null!=i&&(a+=i),a},15:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return" \n"},17:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return" \n"},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){var i,a,o="function",s=t.helperMissing,l=this.escapeExpression,u='
      '+l((a=null!=(a=t.name||(null!=e?e.name:e))?a:s,typeof a===o?a.call(e,{name:"name",hash:{},data:r}):a))+'
      \n
      \n";return i=t["if"].call(e,null!=e?e.isBody:e,{name:"if",hash:{},fn:this.program(1,r),inverse:this.program(11,r),data:r}),null!=i&&(u+=i),u+"
      "},useData:!0}),this.Handlebars.templates.parameter_content_type=Handlebars.template({1:function(e,t,n,r){var i,a="";return i=t.each.call(e,null!=e?e.consumes:e,{name:"each",hash:{},fn:this.program(2,r),inverse:this.noop,data:r}),null!=i&&(a+=i),a},2:function(e,t,n,r){var i,a=this.lambda,o=' \n"},4:function(e,t,n,r){return' \n'},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){var i,a='
      \n \n \n
      \n"},useData:!0}),this.Handlebars.templates.resource=Handlebars.template({compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return"
        \n
      "},useData:!0}),this.Handlebars.templates.response_content_type=Handlebars.template({1:function(e,t,n,r){var i,a="";return i=t.each.call(e,null!=e?e.produces:e,{name:"each",hash:{},fn:this.program(2,r),inverse:this.noop,data:r}),null!=i&&(a+=i),a},2:function(e,t,n,r){var i,a=this.lambda,o=' \n"},4:function(e,t,n,r){return' \n'},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){var i,a='
      \n
      Response Type
      \n
      \n
      \n \n
      \n
      \n
      \n\n"},useData:!0}),this.Handlebars.templates.sidebar_header=Handlebars.template({compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){return""},useData:!0}),this.Handlebars.templates.sidebar_item=Handlebars.template({compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){var i,a="function",o=t.helperMissing,s=this.escapeExpression;return s((i=null!=(i=t.summary||(null!=e?e.summary:e))?i:o,typeof i===a?i.call(e,{name:"summary",hash:{},data:r}):i))+"\n"},useData:!0}),this.Handlebars.templates.signature=Handlebars.template({1:function(e,t,n,r){var i,a,o="function",s=t.helperMissing,l=this.escapeExpression,u=' \n
      \n
      \n ';return a=null!=(a=t.signature||(null!=e?e.signature:e))?a:s,i=typeof a===o?a.call(e,{name:"signature",hash:{},data:r}):a,null!=i&&(u+=i),u+"\n
      \n
      \n"},compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){var i,a,o="function",s=t.helperMissing,l=this.escapeExpression,u='

      '+l((a=null!=(a=t.type||(null!=e?e.type:e))?a:s,typeof a===o?a.call(e,{name:"type",hash:{},data:r}):a))+' Sample

      \n
      \n
      \n
      '+l((a=null!=(a=t.sampleJSON||(null!=e?e.sampleJSON:e))?a:s,typeof a===o?a.call(e,{name:"sampleJSON",hash:{},data:r}):a))+"
      \n
      \n
      \n\n";return i=t["if"].call(e,null!=e?e.signature:e,{name:"if",hash:{},fn:this.program(1,r),inverse:this.noop,data:r}),null!=i&&(u+=i),u},useData:!0}),this.Handlebars.templates.status_code=Handlebars.template({compiler:[6,">= 2.0.0-beta.1"],main:function(e,t,n,r){var i,a,o="function",s=t.helperMissing,l=this.escapeExpression,u=''+l((a=null!=(a=t.code||(null!=e?e.code:e))?a:s,typeof a===o?a.call(e,{name:"code",hash:{},data:r}):a))+"\n";return a=null!=(a=t.message||(null!=e?e.message:e))?a:s,i=typeof a===o?a.call(e,{name:"message",hash:{},data:r}):a,null!=i&&(u+=i),u+"\n"},useData:!0}),function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.SwaggerClient=e()}}(function(){var e;return function t(e,n,r){function i(o,s){if(!n[o]){if(!e[o]){var l="function"==typeof require&&require;if(!s&&l)return l(o,!0);if(a)return a(o,!0);var u=new Error("Cannot find module '"+o+"'");throw u.code="MODULE_NOT_FOUND",u}var c=n[o]={exports:{}};e[o][0].call(c.exports,function(t){var n=e[o][1][t];return i(n?n:t)},c,c.exports,t,e,n,r)}return n[o].exports}for(var a="function"==typeof require&&require,o=0;on;n++)if(this[n]===e)return n;return-1}),String.prototype.trim||(String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")}),String.prototype.endsWith||(String.prototype.endsWith=function(e){return-1!==this.indexOf(e,this.length-e.length)}),t.exports=a,a.ApiKeyAuthorization=r.ApiKeyAuthorization,a.PasswordAuthorization=r.PasswordAuthorization,a.CookieAuthorization=r.CookieAuthorization,a.SwaggerApi=o,a.SwaggerClient=o},{"./lib/auth":2,"./lib/client":3,"./lib/helpers":4}],2:[function(e,t,n){"use strict";var r=e("btoa"),i=e("cookiejar"),a=t.exports.SwaggerAuthorizations=function(){this.authz={}};a.prototype.add=function(e,t){return this.authz[e]=t,t},a.prototype.remove=function(e){return delete this.authz[e]},a.prototype.apply=function(e,t){var n,r,i,a,o=null;if("undefined"==typeof t)for(n in this.authz)i=this.authz[n],a=i.apply(e,t),a===!0&&(o=!0);else if(Array.isArray(t))for(var s=0;s0?e.url+"&"+this.name+"="+this.value:e.url+"?"+this.name+"="+this.value,!0):"header"===this.type?(e.headers[this.name]=this.value,!0):void 0};var s=t.exports.CookieAuthorization=function(e){this.cookie=e};s.prototype.apply=function(e){return e.cookieJar=e.cookieJar||new i,e.cookieJar.setCookie(this.cookie),!0};var l=t.exports.PasswordAuthorization=function(e,t,n){this.name=e,this.username=t,this.password=n};l.prototype.apply=function(e){return e.headers.Authorization="Basic "+r(this.username+":"+this.password),!0}},{btoa:16,cookiejar:17}],3:[function(e,t,n){"use strict";var r={bind:e("lodash-compat/function/bind"),cloneDeep:e("lodash-compat/lang/cloneDeep"),find:e("lodash-compat/collection/find"),forEach:e("lodash-compat/collection/forEach"),indexOf:e("lodash-compat/array/indexOf"),isArray:e("lodash-compat/lang/isArray"),isFunction:e("lodash-compat/lang/isFunction"),isPlainObject:e("lodash-compat/lang/isPlainObject"),isUndefined:e("lodash-compat/lang/isUndefined")},i=e("./auth"),a=e("./helpers"),o=e("./types/model"),s=e("./types/operation"),l=e("./types/operationGroup"),u=e("./resolver"),c=e("./http"),p=e("./spec-converter"),h=["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"],d=["apis","asCurl","description","externalDocs","help","label","name","operation","operations","operationsArray","path","tag"],f=["delete","get","head","options","patch","post","put"],m=t.exports=function(e,t){return this.authorizationScheme=null,this.authorizations=null,this.basePath=null,this.debug=!1,this.info=null,this.isBuilt=!1,this.isValid=!1,this.modelsArray=[],this.resourceCount=0,this.url=null,this.useJQuery=!1,"undefined"!=typeof e?this.initialize(e,t):this};m.prototype.initialize=function(e,t){this.models={},this.sampleModels={},t=t||{},"string"==typeof e?this.url=e:"object"==typeof e&&(t=e,this.url=t.url),this.swaggerRequestHeaders=t.swaggerRequestHeaders||"application/json;charset=utf-8,*/*",this.defaultSuccessCallback=t.defaultSuccessCallback||null,this.defaultErrorCallback=t.defaultErrorCallback||null,this.modelPropertyMacro=t.modelPropertyMacro||null,this.parameterMacro=t.modelPropertyMacro||null,"function"==typeof t.success&&(this.success=t.success),t.useJQuery&&(this.useJQuery=t.useJQuery),this.clientAuthorizations=t.authorizations?t.authorizations:new i.SwaggerAuthorizations,this.options=t||{},this.supportedSubmitMethods=t.supportedSubmitMethods||[],this.failure=t.failure||function(){},this.progress=t.progress||function(){},this.spec=r.cloneDeep(t.spec),"function"==typeof t.success&&(this.ready=!0,this.build())},m.prototype.build=function(e){if(this.isBuilt)return this;var t=this;this.progress("fetching resource list: "+this.url);var n={useJQuery:this.useJQuery,url:this.url,method:"get",headers:{accept:this.swaggerRequestHeaders},on:{error:function(e){return t.fail("http"!==t.url.substring(0,4)?"Please specify the protocol for "+t.url:0===e.status?"Can't read from server. It may not have the appropriate access-control-origin settings.":404===e.status?"Can't read swagger JSON from "+t.url:e.status+" : "+e.statusText+" "+t.url)},response:function(e){var n=e.obj||JSON.parse(e.data);if(t.swaggerVersion=n.swaggerVersion,n.swagger&&2===parseInt(n.swagger))t.swaggerVersion=n.swagger,(new u).resolve(n,t.buildFromSpec,t),t.isValid=!0;else{var r=new p;r.setDocumentationLocation(t.url),r.convert(n,t.clientAuthorizations,function(e){(new u).resolve(e,t.buildFromSpec,t),t.isValid=!0})}}}};if(this.spec)setTimeout(function(){(new u).resolve(t.spec,t.buildFromSpec,t)},10);else{if(this.clientAuthorizations.apply(n),e)return n;(new c).execute(n,this.options)}return this},m.prototype.buildFromSpec=function(e){if(this.isBuilt)return this;this.apis={},this.apisArray=[],this.basePath=e.basePath||"",this.consumes=e.consumes,this.host=e.host||"",this.info=e.info||{},this.produces=e.produces,this.schemes=e.schemes||[],this.securityDefinitions=e.securityDefinitions,this.title=e.title||"",e.externalDocs&&(this.externalDocs=e.externalDocs),this.authSchemes=e.securityDefinitions;var t,n={};if(Array.isArray(e.tags))for(n={},t=0;t-1?"_"+e:e,i=r.indexOf(d,e)>-1?"_"+e:e,o=m[t];if(t!==e&&a.log("The '"+e+"' tag conflicts with a SwaggerClient function/property name. Use 'client."+t+"' or 'client.apis."+e+"' instead of 'client."+e+"'."),i!==e&&a.log("The '"+e+"' tag conflicts with a SwaggerClient operation function/property name. Use 'client.apis."+i+"' instead of 'client.apis."+e+"'."),r.indexOf(d,c)>-1&&(a.log("The '"+c+"' operationId conflicts with a SwaggerClient operation function/property name. Use 'client.apis."+i+"._"+c+"' instead of 'client.apis."+i+"."+c+"'."),c="_"+c,p.nickname=c),r.isUndefined(o)){o=m[t]=m.apis[i]={},o.operations={},o.label=i,o.apis={};var s=n[e];r.isUndefined(s)||(o.description=s.description,o.externalDocs=s.externalDocs),m[t].help=r.bind(m.help,o),m.apisArray.push(new l(e,o.description,o.externalDocs,p))}r.isFunction(o.help)||(o.help=r.bind(m.help,o)),m.apis[i][c]=o[c]=r.bind(p.execute,p),m.apis[i][c].help=o[c].help=r.bind(p.help,p),m.apis[i][c].asCurl=o[c].asCurl=r.bind(p.asCurl,p),o.apis[c]=o.operations[c]=p;var u=r.find(m.apisArray,function(t){return t.tag===e});u&&u.operationsArray.push(p)})}})}),this.isBuilt=!0,this.success&&(this.isValid=!0,this.isBuilt=!0,this.success()),this},m.prototype.parseUri=function(e){var t=/^(((([^:\/#\?]+:)?(?:(\/\/)((?:(([^:@\/#\?]+)(?:\:([^:@\/#\?]+))?)@)?(([^:\/#\?\]\[]+|\[[^\/\]@#?]+\])(?:\:([0-9]+))?))?)?)?((\/?(?:[^\/\?#]+\/+)*)([^\?#]*)))?(\?[^#]+)?)(#.*)?/,n=t.exec(e);return{scheme:n[4].replace(":",""),host:n[11],port:n[12],path:n[15]}},m.prototype.help=function(e){var t="";return this instanceof m?r.forEach(this.apis,function(e,n){r.isPlainObject(e)&&(t+="operations for the '"+n+"' tag\n",r.forEach(e.operations,function(e,n){t+=" * "+n+": "+e.summary+"\n"}))}):(this instanceof l||r.isPlainObject(this))&&(t+="operations for the '"+this.label+"' tag\n",r.forEach(this.apis,function(e,n){t+=" * "+n+": "+e.summary+"\n"})),e?t:(a.log(t),t)},m.prototype.tagFromLabel=function(e){return e},m.prototype.idFromOp=function(e,t,n){n&&n.operationId||(n=n||{},n.operationId=t+"_"+e);var r=n.operationId.replace(/[\s!@#$%^&*()_+=\[{\]};:<>|.\/?,\\'""-]/g,"_")||e.substring(1)+"_"+t;return r=r.replace(/((_){2,})/g,"_"),r=r.replace(/^(_)*/g,""),r=r.replace(/([_])*$/g,"")},m.prototype.fail=function(e){throw this.failure(e),e}},{"./auth":2,"./helpers":4,"./http":5,"./resolver":6,"./spec-converter":7,"./types/model":8,"./types/operation":9,"./types/operationGroup":10,"lodash-compat/array/indexOf":19,"lodash-compat/collection/find":22,"lodash-compat/collection/forEach":23,"lodash-compat/function/bind":26,"lodash-compat/lang/cloneDeep":106,"lodash-compat/lang/isArray":108,"lodash-compat/lang/isFunction":109,"lodash-compat/lang/isPlainObject":112,"lodash-compat/lang/isUndefined":115}],4:[function(e,t,n){(function(n){"use strict";var r={isPlainObject:e("lodash-compat/lang/isPlainObject")};t.exports.__bind=function(e,t){return function(){return e.apply(t,arguments)}};var i=t.exports.log=function(){console&&"test"!==n.env.NODE_ENV&&console.log(Array.prototype.slice.call(arguments)[0])};t.exports.fail=function(e){i(e)},t.exports.optionHtml=function(e,t){return''+e+":"+t+""};var a=t.exports.resolveSchema=function(e){return r.isPlainObject(e.schema)&&(e=a(e.schema)),e};t.exports.typeFromJsonSchema=function(e,t){var n;return"integer"===e&&"int32"===t?n="integer":"integer"===e&&"int64"===t?n="long":"integer"===e&&"undefined"==typeof t?n="long":"string"===e&&"date-time"===t?n="date-time":"string"===e&&"date"===t?n="date":"number"===e&&"float"===t?n="float":"number"===e&&"double"===t?n="double":"number"===e&&"undefined"==typeof t?n="double":"boolean"===e?n="boolean":"string"===e&&(n="string"),n};var o=t.exports.simpleRef=function(e){return"undefined"==typeof e?null:0===e.indexOf("#/definitions/")?e.substring("#/definitions/".length):e},s=t.exports.getStringSignature=function(e,t){var n="";return"undefined"!=typeof e.$ref?n+=o(e.$ref):"undefined"==typeof e.type?n+="object":"array"===e.type?t?n+=s(e.items||e.$ref||{}):(n+="Array[",n+=s(e.items||e.$ref||{}),n+="]"):n+="integer"===e.type&&"int32"===e.format?"integer":"integer"===e.type&&"int64"===e.format?"long":"integer"===e.type&&"undefined"==typeof e.format?"long":"string"===e.type&&"date-time"===e.format?"date-time":"string"===e.type&&"date"===e.format?"date":"string"===e.type&&"undefined"==typeof e.format?"string":"number"===e.type&&"float"===e.format?"float":"number"===e.type&&"double"===e.format?"double":"number"===e.type&&"undefined"==typeof e.format?"double":"boolean"===e.type?"boolean":e.$ref?o(e.$ref):e.type,n}}).call(this,e("_process"))},{_process:15,"lodash-compat/lang/isPlainObject":112}],5:[function(e,t,n){"use strict";var r=e("./helpers"),i=e("jquery"),a=e("superagent"),o=function(){},s=function(){},l=t.exports=function(){};l.prototype.execute=function(e,t){var n;n=t&&t.client?t.client:new s(t),(e&&e.useJQuery===!0||this.isInternetExplorer())&&(n=new o(t));var r=e.on.response,i=function(e){t&&t.responseInterceptor&&(e=t.responseInterceptor.apply(e)),r(e)};e.on.response=function(e){i(e)},e&&"object"==typeof e.body&&(e.body.type&&"formData"===e.body.type?(e.contentType=!1,e.processData=!1,delete e.headers["Content-Type"]):e.body=JSON.stringify(e.body)),n.execute(e)},l.prototype.isInternetExplorer=function(){var e=!1;if("undefined"!=typeof navigator&&navigator.userAgent){var t=navigator.userAgent.toLowerCase();if(-1!==t.indexOf("msie")){var n=parseInt(t.split("msie")[1]);8>=n&&(e=!0)}}return e},o.prototype.execute=function(e){var t=e.on,n=e;return e.type=e.method,e.cache=!1,delete e.useJQuery,e.data=e.body,delete e.body,e.complete=function(e){for(var i={},a=e.getAllResponseHeaders().split("\n"),o=0;o0))try{p.obj=e.responseJSON||JSON.parse(p.data)||{}}catch(d){r.log("unable to parse JSON content")}if(e.status>=200&&e.status<300)t.response(p);else{if(!(0===e.status||e.status>=400&&e.status<599))return t.response(p);t.error(p)}},i.support.cors=!0,i.ajax(e)},s.prototype.execute=function(e){var t=e.method.toLowerCase();"delete"===t&&(t="del");var n,r=e.headers||{},i=a[t](e.url);for(n in r)i.set(n,r[n]);e.body&&i.send(e.body),i.end(function(t,n){n=n||{status:0,headers:{error:"no response from server"}};var r,i={url:e.url,method:e.method,headers:n.headers};!t&&n.error&&(t=n.error),t&&e.on&&e.on.error?(i.obj=t,i.status=n?n.status:500,i.statusText=n?n.text:t.message,r=e.on.error):n&&e.on&&e.on.response&&(i.obj="undefined"!=typeof n.body?n.body:n.text,i.status=n.status,i.statusText=n.text,r=e.on.response),i.data=i.statusText,r&&r(i)})}},{"./helpers":4,jquery:18,superagent:125}],6:[function(e,t,n){"use strict";var r=e("./http"),i=t.exports=function(){};i.prototype.resolve=function(e,t,n){this.scope=n||this,this.iteration=this.iteration||0;var i,a,o,s,l,u=0,c={},p={},h={};for(a in e.definitions){var d=e.definitions[a];for(l in d.properties)s=d.properties[l],this.resolveTo(s,h)}for(a in e.paths){var f,m,g;o=e.paths[a];for(f in o)if("$ref"===f)this.resolveInline(e,o,h,p);else{m=o[f];var y,v=m.parameters;for(y in v){var b=v[y];"body"===b["in"]&&b.schema&&this.resolveTo(b.schema,h),b.$ref&&this.resolveInline(e,b,h,p)}for(g in m.responses){var w=m.responses[g];"object"==typeof w&&w.$ref&&this.resolveInline(e,w,h,p),w.schema&&w.schema.$ref&&this.resolveTo(w.schema,h)}}}var x={},A=0;for(a in h){var j=a.split("#");2===j.length?(i=j[0],o=j[1],Array.isArray(x[i])||(x[i]=[],A+=1),x[i].push(o)):(Array.isArray(x[a])||(x[a]=[],A+=1),x[a].push(null))}for(a in x){var S=this,E=x[a];i=a;var C={useJQuery:!1,url:i,method:"get",headers:{accept:this.scope.swaggerRequestHeaders||"application/json"},on:{error:function(){u+=1;var n;for(n=0;n0&&(f=f[g])}var y=i+"#"+d,v=m[o-1];"undefined"!=typeof f?c[y]={name:v,obj:f}:p[y]=null}}u===A&&S.finish(e,h,c,p,t)}}};n&&n.clientAuthorizations&&n.clientAuthorizations.apply(C),(new r).execute(C)}0===Object.keys(x).length&&t.call(this.scope,e,p)},i.prototype.finish=function(e,t,n,r,i){var a;for(a in t){var o,s=t[a];for(o=0;o0&&(l=l[u])}if(l){delete t.$ref;var c;for(c in l)t[c]=l[c]}else r[i]=null}}else"array"===t.type&&this.resolveTo(t.items,n)},i.prototype.resolveTo=function(e,t){var n=e.$ref;if(n)0===n.indexOf("http")&&(Array.isArray(t[n])?t[n].push({obj:e,resolveAs:"$ref"}):t[n]=[{obj:e,resolveAs:"$ref"}]);else if("array"===e.type){var r=e.items;this.resolveTo(r,t)}}},{"./http":5}],7:[function(e,t,n){"use strict";var r=e("./http"),i=t.exports=function(){this.errors=[],this.warnings=[],this.modelMap={}};i.prototype.setDocumentationLocation=function(e){this.docLocation=e},i.prototype.convert=function(e,t,n){if(!e||!Array.isArray(e.apis))return this.finish(n,null);this.clientAuthorizations=t;var r={swagger:"2.0"};r.originalVersion=e.swaggerVersion,this.apiInfo(e,r),this.securityDefinitions(e,r),e.basePath&&this.setDocumentationLocation(e.basePath),e.basePath&&this.setDocumentationLocation(e.basePath);var i,a=!1;for(i=0;i0?(t.host=i.substring(0,a),t.basePath=i.substring(a)):(t.host=i,t.basePath="/")):0===e.basePath.indexOf("https://")?(i=e.basePath.substring("https://".length),a=i.indexOf("/"),a>0?(t.host=i.substring(0,a),t.basePath=i.substring(a)):(t.host=i,t.basePath="/")):t.basePath=e.basePath;var o;if(e.authorizations&&(o=e.authorizations),e.consumes&&(t.consumes=e.consumes),e.produces&&(t.produces=e.produces),"object"==typeof e)for(n in e.models){var s=e.models[n],l=s.id||n;this.modelMap[l]=n}for(r=0;r0&&(o["enum"]=a),i.required instanceof Array)for(var u=0,c=i.required.length;c>u;u++){var p=i.required[u];o.properties[p]&&(o.properties[p].required=!0)}t.definitions[n]=o}}},i.prototype.extractTag=function(e){var t=e||"default";return(0===t.indexOf("http:")||0===t.indexOf("https:"))&&(t=t.split(["/"]),t=t[t.length-1].substring()),t.endsWith(".json")&&(t=t.substring(0,t.length-".json".length)),t.replace("/","")},i.prototype.operations=function(e,t,n,r,i){if(Array.isArray(n)){var a;i.paths||(i.paths={});var o=i.paths[e]||{},s=this.extractTag(t);i.tags=i.tags||[];var l=!1;for(a=0;ai;i++){var u=e.apis[i],c=u.path,p=this.getAbsolutePath(e.swaggerVersion,this.docLocation,c);u.description&&(t.tags=t.tags||[],t.tags.push({name:this.extractTag(u.path),description:u.description||""}));var h={url:p,headers:{accept:"application/json"},on:{},method:"get"};h.on.response=function(e){a+=1;var t=e.obj;if("undefined"==typeof t||null===t)try{t=JSON.parse(e.statusText)}catch(r){}t&&o.declaration(t,l),a===s&&o.finish(n,l)},h.on.error=function(e){console.error(e),a+=1,a===s&&o.finish(n,l)},this.clientAuthorizations&&"function"==typeof this.clientAuthorizations.apply&&this.clientAuthorizations.apply(h),(new r).execute(h)}},i.prototype.getAbsolutePath=function(e,t,n){if("1.0"===e&&t.endsWith(".json")){var r=t.lastIndexOf("/");r>0&&(t=t.substring(0,r))}var i=t;return 0===n.indexOf("http://")||0===n.indexOf("https://")?i=n:(t.endsWith("/")&&(i=t.substring(0,t.length-1)),i+=n),i=i.replace("{format}","json")},i.prototype.securityDefinitions=function(e,t){if(e.authorizations){var n;for(n in e.authorizations){var r=!1,i={},a=e.authorizations[n];if("apiKey"===a.type)i.type="apiKey",i["in"]=a.passAs,i.name=a.keyname||n,r=!0;else if("oauth2"===a.type){var o,s=a.scopes||[],l={};for(o in s){var u=s[o];l[u.scope]=u.description}if(i.type="oauth2",o>0&&(i.scopes=l),a.grantTypes){if(a.grantTypes.implicit){var c=a.grantTypes.implicit;i.flow="implicit",i.authorizationUrl=c.loginEndpoint,r=!0}if(a.grantTypes.authorization_code&&!i.flow){var p=a.grantTypes.authorization_code;i.flow="accessCode",i.authorizationUrl=p.tokenRequestEndpoint.url,i.tokenUrl=p.tokenEndpoint.url,r=!0}}}r&&(t.securityDefinitions=t.securityDefinitions||{},t.securityDefinitions[n]=i)}}},i.prototype.apiInfo=function(e,t){if(e.info){var n=e.info;t.info={},n.contact&&(t.info.contact={},t.info.contact.email=n.contact),n.description&&(t.info.description=n.description),n.title&&(t.info.title=n.title),n.termsOfServiceUrl&&(t.info.termsOfService=n.termsOfServiceUrl),(n.license||n.licenseUrl)&&(t.license={},n.license&&(t.license.name=n.license),n.licenseUrl&&(t.license.url=n.licenseUrl))}else this.warnings.push("missing info section")},i.prototype.finish=function(e,t){e(t)}},{"./http":5}],8:[function(e,t,n){"use strict";var r={cloneDeep:e("lodash-compat/lang/cloneDeep"),forEach:e("lodash-compat/collection/forEach"),indexOf:e("lodash-compat/array/indexOf"),isArray:e("lodash-compat/lang/isArray"),isPlainObject:e("lodash-compat/lang/isPlainObject"),isString:e("lodash-compat/lang/isString"),isUndefined:e("lodash-compat/lang/isUndefined"),keys:e("lodash-compat/object/keys"),map:e("lodash-compat/collection/map")},i=e("../helpers"),a=t.exports=function(e,t,n,r){return this.definition=t||{},this.isArray="array"===t.type,this.models=n||{},this.name=t.title||e||"Inline Model",this.modelPropertyMacro=r||function(e){return e["default"]},this},o=function(e,t,n,o){var s={},l=[],u=0,c=function(e,t,l){var c,p=t;return e.$ref?(p=e.title||i.simpleRef(e.$ref),c=n[p],null!==c&&null!==c.definition.title&&"undefined"!=typeof c.definition.title&&(p=c.definition.title)):r.isUndefined(t)&&(p=e.title||"Inline Model "+ ++u,c=new a(p,e,n,o)),l!==!0&&(s[p]=r.isUndefined(c)?{}:c.definition),p},p=function(e){var t,n='"+t):"object"===a?r.isUndefined(e.properties)?n+=' title="object">object':(t=c(e),n+=" title="+t+">"+t):"array"===a?(r.isArray(e.items)?t=r.map(e.items,c).join(","):r.isPlainObject(e.items)?t=r.isUndefined(e.items.$ref)?r.isUndefined(e.items.type)||-1!==r.indexOf(["array","object"],e.items.type)?c(e.items):e.items.type:c(e.items,i.simpleRef(e.items.$ref)):(i.log("Array type's 'items' schema is not an array or an object, cannot process"),t="object"),n+=" title=array["+t+"]>array["+t+"]"):n+=" title="+e.type+">"+e.type,n+=""},h=function(e,t){var n="",a=e.type||"object",o="array"===a;switch(o&&(a=r.isPlainObject(e.items)&&!r.isUndefined(e.items.type)?e.items.type:"object"),r.isUndefined(e["default"])||(n+=i.optionHtml("Default",e["default"])),a){case"string":e.minLength&&(n+=i.optionHtml("Min. Length",e.minLength)),e.maxLength&&(n+=i.optionHtml("Max. Length",e.maxLength)),e.pattern&&(n+=i.optionHtml("Reg. Exp.",e.pattern));break;case"integer":case"number":e.minimum&&(n+=i.optionHtml("Min. Value",e.minimum)),e.exclusiveMinimum&&(n+=i.optionHtml("Exclusive Min.","true")),e.maximum&&(n+=i.optionHtml("Max. Value",e.maximum)),e.exclusiveMaximum&&(n+=i.optionHtml("Exclusive Max.","true")),e.multipleOf&&(n+=i.optionHtml("Multiple Of",e.multipleOf))}if(o&&(e.minItems&&(n+=i.optionHtml("Min. Items",e.minItems)),e.maxItems&&(n+=i.optionHtml("Max. Items",e.maxItems)),e.uniqueItems&&(n+=i.optionHtml("Unique Items","true")),e.collectionFormat&&(n+=i.optionHtml("Coll. Format",e.collectionFormat))),r.isUndefined(e.items)&&r.isArray(e["enum"])){var s;s="number"===a||"integer"===a?e["enum"].join(", "):'"'+e["enum"].join('", "')+'"',n+=i.optionHtml("Enum",s)}return t},f=function(e,t){var a=e.type||"object",s="array"===e.type,u=''+(s?"[]":"{}")+' ',f="",d="";if("Inline Model"!==t&&(d=r.isUndefined(e.title)?u+t+f:u+e.title+f),t&&l.push(t),s)if(r.isArray(e.items))d+="
      "+r.map(e.items,function(e){var t=e.type||"object";return r.isUndefined(e.$ref)?r.indexOf(["array","object"],t)>-1?"object"===t&&r.isUndefined(e.properties)?"object":c(e):h(e,t):c(e,i.simpleRef(e.$ref))}).join("
      ");else if(r.isPlainObject(e.items)){var m="";m=r.isUndefined(e.items.$ref)?r.indexOf(["array","object"],e.items.type||"object")>-1?(r.isUndefined(e.items.type)||"object"===e.items.type)&&r.isUndefined(e.items.properties)?"object":c(e.items):h(e.items,e.items.type):c(e.items,i.simpleRef(e.items.$ref)),"Inline Model"!==t&&(d+="
      "+m+"
      ")}else i.log("Array type's 'items' property is not an array or an object, cannot process"),d+="
      object
      ";else e.$ref?d+="
      "+c(e,t)+"
      ":"object"===a?(d+="
      ",r.isPlainObject(e.properties)&&(d+=r.map(e.properties,function(t,a){var s,l=r.indexOf(e.required,a)>=0,u=r.cloneDeep(t),c='';return c+=''+a+"",u["default"]=o(u),u=i.resolveSchema(u),r.isUndefined(u.$ref)||(s=n[i.simpleRef(u.$ref)],r.isUndefined(s)||-1!==r.indexOf([void 0,"array","object"],s.definition.type)||(u=i.resolveSchema(s.definition))),c+=p(u),l||(c+='(optional)'),c+="",c+='',r.isUndefined(t.description)||(c+=t.description),u["enum"]&&(c+='
      Can be ',r.forEach(u["enum"],function(e,t){c+=""+e+"",t===u["enum"].length-2?c+=" or ":t
      ")),d+="
      "):d="
      "+h(e,a)+"
      ";return d};t=i.resolveSchema(t);for(var d=f(t,e);r.keys(s).length>0;)r.forEach(s,function(e,t){var n=r.indexOf(l,t)>-1;delete s[t],n||(l.push(t),d+=f(e,t))});return d},s=function(e,t,n,a){e=i.resolveSchema(e);var o,l,u=e.type||"object",c=e.format;return e.example?l=e.example:r.isUndefined(e.items)&&r.isArray(e["enum"])&&(l=e["enum"][0]),r.isUndefined(l)&&(e.$ref?(o=t[i.simpleRef(e.$ref)],r.isUndefined(o)||(r.isUndefined(n[o.name])?(n[o.name]=o,l=s(o.definition,t,n,a),delete n[o.name]):l="array"===o.type?[]:{})):r.isUndefined(e["default"])?"string"===u?l="date-time"===c?(new Date).toISOString():"date"===c?(new Date).toISOString().split("T")[0]:"string":"integer"===u?l=0:"number"===u?l=0:"boolean"===u?l=!0:"object"===u?(l={},r.forEach(e.properties,function(e,i){var o=r.cloneDeep(e);o["default"]=a(e),l[i]=s(o,t,n,a)})):"array"===u&&(l=[],r.isArray(e.items)?r.forEach(e.items,function(e){l.push(s(e,t,n,a))}):r.isPlainObject(e.items)?l.push(s(e.items,t,n,a)):r.isUndefined(e.items)?l.push({}):i.log("Array type's 'items' property is not an array or an object, cannot process")):l=e["default"]),l};a.prototype.createJSONSample=a.prototype.getSampleValue=function(e){return e=e||{},e[this.name]=this,this.examples&&r.isPlainObject(this.examples)&&this.examples["application/json"]?(this.definition.example=this.examples["application/json"],r.isString(this.definition.example)&&(this.definition.example=JSON.parse(this.definition.example))):this.definition.example||(this.definition.example=this.examples),s(this.definition,this.models,e,this.modelPropertyMacro)},a.prototype.getMockSignature=function(){return o(this.name,this.definition,this.models,this.modelPropertyMacro)}},{"../helpers":4,"lodash-compat/array/indexOf":19,"lodash-compat/collection/forEach":23,"lodash-compat/collection/map":24,"lodash-compat/lang/cloneDeep":106,"lodash-compat/lang/isArray":108,"lodash-compat/lang/isPlainObject":112,"lodash-compat/lang/isString":113,"lodash-compat/lang/isUndefined":115,"lodash-compat/object/keys":116}],9:[function(e,t,n){"use strict";var r={cloneDeep:e("lodash-compat/lang/cloneDeep"),isUndefined:e("lodash-compat/lang/isUndefined")},i=e("../helpers"),a=e("./model"),o=e("../http"),s=t.exports=function(e,t,n,r,o,s,l,u,c){var p=[];if(e=e||{},s=s||{},e&&e.options&&(this.client=e.options.client||null,this.responseInterceptor=e.options.responseInterceptor||null),this.authorizations=s.security,this.basePath=e.basePath||"/",this.clientAuthorizations=c,this.consumes=s.consumes||e.consumes||["application/json"],this.produces=s.produces||e.produces||["application/json"],this.deprecated=s.deprecated,this.description=s.description,this.host=e.host||"localhost",this.method=r||p.push("Operation "+n+" is missing method."),this.models=u||{},this.nickname=n||p.push("Operations must have a nickname."),this.operation=s,this.operations={},this.parameters=null!==s?s.parameters||[]:{},this.parent=e,this.path=o||p.push("Operation "+this.nickname+" is missing path."),this.responses=s.responses||{},this.scheme=t||e.scheme||"http",this.schemes=e.schemes,this.security=s.security,this.summary=s.summary||"",this.type=null,this.useJQuery=e.useJQuery,this.parameterMacro=e.parameterMacro||function(e){return e["default"]},this.inlineModels=[],"string"==typeof this.deprecated)switch(this.deprecated.toLowerCase()){case"true":case"yes":case"1":this.deprecated=!0;break;case"false":case"no":case"0":case null:this.deprecated=!1;break;default:this.deprecated=Boolean(this.deprecated)}var h,f;if(l){var d;for(d in l)f=new a(d,l[d],this.models,e.modelPropertyMacro),f&&(this.models[d]=f)}for(h=0;h0&&this.resource&&this.resource.api&&this.resource.api.fail&&this.resource.api.fail(p),this};s.prototype.isDefaultArrayItemValue=function(e,t){return t["default"]&&Array.isArray(t["default"])?-1!==t["default"].indexOf(e):e===t["default"]},s.prototype.getType=function(e){var t,n=e.type,r=e.format,a=!1;"integer"===n&&"int32"===r?t="integer":"integer"===n&&"int64"===r?t="long":"integer"===n?t="integer":"string"===n?t="date-time"===r?"date-time":"date"===r?"date":"string":"number"===n&&"float"===r?t="float":"number"===n&&"double"===r?t="double":"number"===n?t="double":"boolean"===n?t="boolean":"array"===n&&(a=!0,e.items&&(t=this.getType(e.items))),e.$ref&&(t=i.simpleRef(e.$ref));var o=e.schema;if(o){var s=o.$ref;return s?(s=i.simpleRef(s),a?[s]:s):"object"===o.type?this.addInlineModel(o):this.getType(o)}return a?[t]:t},s.prototype.addInlineModel=function(e){var t=this.inlineModels.length,n=this.resolveModel(e,{});return n?(this.inlineModels.push(n),"Inline Model "+t):null},s.prototype.getInlineModel=function(e){if(/^Inline Model \d+$/.test(e)){var t=parseInt(e.substr("Inline Model".length).trim(),10),n=this.inlineModels[t];return n}return null},s.prototype.resolveModel=function(e,t){if("undefined"!=typeof e.$ref){var n=e.$ref;if(0===n.indexOf("#/definitions/")&&(n=n.substring("#/definitions/".length)),t[n])return new a(n,t[n],this.models,this.parent.modelPropertyMacro)}else if(e&&"object"==typeof e&&("object"===e.type||r.isUndefined(e.type)))return new a(void 0,e,this.models,this.parent.modelPropertyMacro);return null},s.prototype.help=function(e){for(var t=this.nickname+": "+this.summary+"\n",n=0;n=0&&n.useJQuery){var h=new FormData;h.type="formData";for(i in o)a=t[i],"undefined"!=typeof a&&("file"===a.type&&a.value?(delete e["Content-Type"],h.append(i,a.value)):h.append(i,a));r=h}return r},s.prototype.getModelSampleJSON=function(e,t){var n,r,i;if(t=t||{},n=e instanceof Array,i=n?e[0]:e,t[i]?r=t[i].createJSONSample():this.getInlineModel(i)&&(r=this.getInlineModel(i).createJSONSample()),r){if(r=n?[r]:r,"string"==typeof r)return r;if("object"==typeof r){var a=r;if(r instanceof Array&&r.length>0&&(a=r[0]),a.nodeName){var o=(new XMLSerializer).serializeToString(a);return this.formatXml(o)}return JSON.stringify(r,null,2)}return r}},s.prototype["do"]=function(e,t,n,r,i){return this.execute(e,t,n,r,i)},s.prototype.execute=function(e,t,n,r,a){var s,l,u=e||{},c={};"object"==typeof t&&(c=t,s=n,l=r),this.client&&(c.client=this.client),this.responseInterceptor&&(c.responseInterceptor=this.responseInterceptor),"function"==typeof t&&(s=t,l=n),s=s||this.parent.defaultSuccessCallback||i.log,l=l||this.parent.defaultErrorCallback||i.log,"undefined"==typeof c.useJQuery&&(c.useJQuery=this.useJQuery);var p=this.getMissingParams(u);if(p.length>0){var h="missing required params: "+p;return i.fail(h),void l(h)}var f,d=this.getHeaderParams(u),m=this.setContentTypes(u,c),g={};for(f in d)g[f]=d[f];for(f in m)g[f]=m[f];var y=this.getBody(m,u,c),v=this.urlify(u);if(v.indexOf(".{format}")>0&&g){var b=g.Accept||g.accept;b&&b.indexOf("json")>0?v=v.replace(".{format}",".json"):b&&b.indexOf("xml")>0&&(v=v.replace(".{format}",".xml"))}var w={url:v,method:this.method.toUpperCase(),body:y,useJQuery:c.useJQuery,headers:g,on:{response:function(e){return s(e,a)},error:function(e){return l(e,a)}}};return this.clientAuthorizations.apply(w,this.operation.security),c.mock===!0?w:void(new o).execute(w,c)},s.prototype.setContentTypes=function(e,t){var n,r,a=this.parameters,o=e.parameterContentType||this.consumes[0],s=t.responseContentType||this.produces[0],l=[],u=[],c={};for(r=0;r0&&(o=t.requestContentType?t.requestContentType:l.length>0?"multipart/form-data":"application/x-www-form-urlencoded")):o=null,o&&this.consumes&&-1===this.consumes.indexOf(o)&&i.log("server doesn't consume "+o+", try "+JSON.stringify(this.consumes)),s&&this.produces&&-1===this.produces.indexOf(s)&&i.log("server can't produce "+s),(o&&""!==n||"application/x-www-form-urlencoded"===o)&&(c["Content-Type"]=o),s&&(c.Accept=s),c},s.prototype.asCurl=function(e){var t=this.execute(e,{mock:!0});this.clientAuthorizations.apply(t);var n=[];if(n.push("-X "+this.method.toUpperCase()),t.headers){var r;for(r in t.headers)n.push('--header "'+r+": "+t.headers[r]+'"')}if(t.body){var i;i="object"==typeof t.body?JSON.stringify(t.body):t.body,n.push('-d "'+i.replace(/"/g,'\\"')+'"')}return"curl "+n.join(" ")+' "'+t.url+'"'},s.prototype.encodePathCollection=function(e,t,n){var r,i="",a="";for(a="ssv"===e?"%20":"tsv"===e?"\\t":"pipes"===e?"|":",",r=0;r0&&(i+="&"),i+=this.encodeQueryParam(t)+"="+this.encodeQueryParam(n[r]);else{var a="";if("csv"===e)a=",";else if("ssv"===e)a="%20";else if("tsv"===e)a="\\t";else if("pipes"===e)a="|";else if("brackets"===e)for(r=0;rr;r++)t.push(encodeURIComponent(n[r]));return t.join("/")}},{"../helpers":4,"../http":5,"./model":8,"lodash-compat/lang/cloneDeep":106,"lodash-compat/lang/isUndefined":115}],10:[function(e,t,n){"use strict";var r=t.exports=function(e,t,n,r){this.description=t,this.externalDocs=n,this.name=e,this.operation=r,this.operationsArray=[],this.path=e,this.tag=e};r.prototype.sort=function(){}},{}],11:[function(e,t,n){function r(e){return this instanceof r?(this.length=0,this.parent=void 0,"number"==typeof e?i(this,e):"string"==typeof e?a(this,e,arguments.length>1?arguments[1]:"utf8"):o(this,e)):arguments.length>1?new r(e,arguments[1]):new r(e)}function i(e,t){if(e=h(e,0>t?0:0|f(t)),!r.TYPED_ARRAY_SUPPORT)for(var n=0;t>n;n++)e[n]=0;return e}function a(e,t,n){("string"!=typeof n||""===n)&&(n="utf8");var r=0|m(t,n);return e=h(e,r),e.write(t,n),e}function o(e,t){if(r.isBuffer(t))return s(e,t);if(W(t))return l(e,t);if(null==t)throw new TypeError("must start with number, buffer, array or string");return"undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer?u(e,t):t.length?c(e,t):p(e,t)}function s(e,t){var n=0|f(t.length);return e=h(e,n),t.copy(e,0,0,n),e}function l(e,t){var n=0|f(t.length);e=h(e,n);for(var r=0;n>r;r+=1)e[r]=255&t[r];return e}function u(e,t){var n=0|f(t.length);e=h(e,n);for(var r=0;n>r;r+=1)e[r]=255&t[r];return e}function c(e,t){var n=0|f(t.length);e=h(e,n);for(var r=0;n>r;r+=1)e[r]=255&t[r];return e}function p(e,t){var n,r=0;"Buffer"===t.type&&W(t.data)&&(n=t.data,r=0|f(n.length)),e=h(e,r);for(var i=0;r>i;i+=1)e[i]=255&n[i];return e}function h(e,t){r.TYPED_ARRAY_SUPPORT?e=r._augment(new Uint8Array(t)):(e.length=t,e._isBuffer=!0);var n=0!==t&&t<=r.poolSize>>>1;return n&&(e.parent=Y),e}function f(e){if(e>=J)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+J.toString(16)+" bytes");return 0|e}function d(e,t){if(!(this instanceof d))return new d(e,t);var n=new r(e,t);return delete n.parent,n}function m(e,t){if("string"!=typeof e&&(e=String(e)),0===e.length)return 0;switch(t||"utf8"){case"ascii":case"binary":case"raw":return e.length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*e.length;case"hex":return e.length>>>1;case"utf8":case"utf-8":return U(e).length;case"base64":return B(e).length;default:return e.length}}function g(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r),r>i&&(r=i)):r=i;var a=t.length;if(a%2!==0)throw new Error("Invalid hex string");r>a/2&&(r=a/2);for(var o=0;r>o;o++){var s=parseInt(t.substr(2*o,2),16);if(isNaN(s))throw new Error("Invalid hex string");e[n+o]=s}return o}function y(e,t,n,r){return q(U(t,e.length-n),e,n,r)}function v(e,t,n,r){return q(R(t),e,n,r)}function b(e,t,n,r){return v(e,t,n,r)}function w(e,t,n,r){return q(B(t),e,n,r)}function x(e,t,n,r){return q(H(t,e.length-n),e,n,r)}function A(e,t,n){return z.fromByteArray(0===t&&n===e.length?e:e.slice(t,n))}function j(e,t,n){var r="",i="";n=Math.min(e.length,n);for(var a=t;n>a;a++)e[a]<=127?(r+=F(i)+String.fromCharCode(e[a]),i=""):i+="%"+e[a].toString(16);return r+F(i)}function S(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;n>i;i++)r+=String.fromCharCode(127&e[i]);return r}function C(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;n>i;i++)r+=String.fromCharCode(e[i]);return r}function E(e,t,n){var r=e.length;(!t||0>t)&&(t=0),(!n||0>n||n>r)&&(n=r);for(var i="",a=t;n>a;a++)i+=N(e[a]);return i}function T(e,t,n){for(var r=e.slice(t,n),i="",a=0;ae)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function _(e,t,n,i,a,o){if(!r.isBuffer(e))throw new TypeError("buffer must be a Buffer instance");if(t>a||o>t)throw new RangeError("value is out of bounds");if(n+i>e.length)throw new RangeError("index out of range")}function O(e,t,n,r){0>t&&(t=65535+t+1);for(var i=0,a=Math.min(e.length-n,2);a>i;i++)e[n+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function $(e,t,n,r){0>t&&(t=4294967295+t+1);for(var i=0,a=Math.min(e.length-n,4);a>i;i++)e[n+i]=t>>>8*(r?i:3-i)&255}function I(e,t,n,r,i,a){if(t>i||a>t)throw new RangeError("value is out of bounds");if(n+r>e.length)throw new RangeError("index out of range");if(0>n)throw new RangeError("index out of range")}function D(e,t,n,r,i){return i||I(e,t,n,4,3.4028234663852886e38,-3.4028234663852886e38),V.write(e,t,n,r,23,4),n+4}function P(e,t,n,r,i){return i||I(e,t,n,8,1.7976931348623157e308,-1.7976931348623157e308),V.write(e,t,n,r,52,8),n+8}function M(e){if(e=L(e).replace(X,""),e.length<2)return"";for(;e.length%4!==0;)e+="=";return e}function L(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function N(e){return 16>e?"0"+e.toString(16):e.toString(16)}function U(e,t){t=t||1/0;for(var n,r=e.length,i=null,a=[],o=0;r>o;o++){if(n=e.charCodeAt(o),n>55295&&57344>n){if(!i){if(n>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===r){(t-=3)>-1&&a.push(239,191,189);continue}i=n;continue}if(56320>n){(t-=3)>-1&&a.push(239,191,189),i=n;continue}n=i-55296<<10|n-56320|65536,i=null}else i&&((t-=3)>-1&&a.push(239,191,189),i=null);if(128>n){if((t-=1)<0)break;a.push(n)}else if(2048>n){if((t-=2)<0)break;a.push(n>>6|192,63&n|128)}else if(65536>n){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(2097152>n))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return a}function R(e){for(var t=[],n=0;n>8,i=n%256,a.push(i),a.push(r);return a}function B(e){return z.toByteArray(M(e))}function q(e,t,n,r){for(var i=0;r>i&&!(i+n>=t.length||i>=e.length);i++)t[i+n]=e[i];return i}function F(e){try{return decodeURIComponent(e)}catch(t){return String.fromCharCode(65533)}}var z=e("base64-js"),V=e("ieee754"),W=e("is-array");n.Buffer=r,n.SlowBuffer=d,n.INSPECT_MAX_BYTES=50,r.poolSize=8192;var J=1073741823,Y={};r.TYPED_ARRAY_SUPPORT=function(){try{var e=new ArrayBuffer(0),t=new Uint8Array(e);return t.foo=function(){return 42},42===t.foo()&&"function"==typeof t.subarray&&0===new Uint8Array(1).subarray(1,1).byteLength}catch(n){return!1}}(),r.isBuffer=function(e){return!(null==e||!e._isBuffer)},r.compare=function(e,t){if(!r.isBuffer(e)||!r.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,i=t.length,a=0,o=Math.min(n,i);o>a&&e[a]===t[a];)++a;return a!==o&&(n=e[a],i=t[a]),i>n?-1:n>i?1:0},r.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},r.concat=function(e,t){if(!W(e))throw new TypeError("list argument must be an Array of Buffers.");if(0===e.length)return new r(0);if(1===e.length)return e[0];var n;if(void 0===t)for(t=0,n=0;nt&&(t=0),n>this.length&&(n=this.length),t>=n)return"";for(;;)switch(e){case"hex":return E(this,t,n);case"utf8":case"utf-8":return j(this,t,n);case"ascii":return S(this,t,n);case"binary":return C(this,t,n);case"base64":return A(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}},r.prototype.equals=function(e){if(!r.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?!0:0===r.compare(this,e)},r.prototype.inspect=function(){var e="",t=n.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,t).match(/.{2}/g).join(" "),this.length>t&&(e+=" ... ")),""},r.prototype.compare=function(e){if(!r.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e?0:r.compare(this,e)},r.prototype.indexOf=function(e,t){function n(e,t,n){for(var r=-1,i=0;n+i2147483647?t=2147483647:-2147483648>t&&(t=-2147483648),t>>=0,0===this.length)return-1;if(t>=this.length)return-1;if(0>t&&(t=Math.max(this.length+t,0)),"string"==typeof e)return 0===e.length?-1:String.prototype.indexOf.call(this,e,t);if(r.isBuffer(e))return n(this,e,t);if("number"==typeof e)return r.TYPED_ARRAY_SUPPORT&&"function"===Uint8Array.prototype.indexOf?Uint8Array.prototype.indexOf.call(this,e,t):n(this,[e],t);throw new TypeError("val must be string, number or Buffer")},r.prototype.get=function(e){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(e)},r.prototype.set=function(e,t){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(e,t)},r.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else if(isFinite(t))t=0|t,isFinite(n)?(n=0|n,void 0===r&&(r="utf8")):(r=n,n=void 0);else{var i=r;r=t,t=0|n,n=i}var a=this.length-t;if((void 0===n||n>a)&&(n=a),e.length>0&&(0>n||0>t)||t>this.length)throw new RangeError("attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return g(this,e,t,n);case"utf8":case"utf-8":return y(this,e,t,n);case"ascii":return v(this,e,t,n);case"binary":return b(this,e,t,n);case"base64":return w(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},r.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},r.prototype.slice=function(e,t){var n=this.length;e=~~e,t=void 0===t?n:~~t,0>e?(e+=n,0>e&&(e=0)):e>n&&(e=n),0>t?(t+=n,0>t&&(t=0)):t>n&&(t=n),e>t&&(t=e);var i;if(r.TYPED_ARRAY_SUPPORT)i=r._augment(this.subarray(e,t));else{var a=t-e;i=new r(a,void 0);for(var o=0;a>o;o++)i[o]=this[o+e]}return i.length&&(i.parent=this.parent||this),i},r.prototype.readUIntLE=function(e,t,n){ -e=0|e,t=0|t,n||k(e,t,this.length);for(var r=this[e],i=1,a=0;++a0&&(i*=256);)r+=this[e+--t]*i;return r},r.prototype.readUInt8=function(e,t){return t||k(e,1,this.length),this[e]},r.prototype.readUInt16LE=function(e,t){return t||k(e,2,this.length),this[e]|this[e+1]<<8},r.prototype.readUInt16BE=function(e,t){return t||k(e,2,this.length),this[e]<<8|this[e+1]},r.prototype.readUInt32LE=function(e,t){return t||k(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},r.prototype.readUInt32BE=function(e,t){return t||k(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},r.prototype.readIntLE=function(e,t,n){e=0|e,t=0|t,n||k(e,t,this.length);for(var r=this[e],i=1,a=0;++a=i&&(r-=Math.pow(2,8*t)),r},r.prototype.readIntBE=function(e,t,n){e=0|e,t=0|t,n||k(e,t,this.length);for(var r=t,i=1,a=this[e+--r];r>0&&(i*=256);)a+=this[e+--r]*i;return i*=128,a>=i&&(a-=Math.pow(2,8*t)),a},r.prototype.readInt8=function(e,t){return t||k(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},r.prototype.readInt16LE=function(e,t){t||k(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},r.prototype.readInt16BE=function(e,t){t||k(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},r.prototype.readInt32LE=function(e,t){return t||k(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},r.prototype.readInt32BE=function(e,t){return t||k(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},r.prototype.readFloatLE=function(e,t){return t||k(e,4,this.length),V.read(this,e,!0,23,4)},r.prototype.readFloatBE=function(e,t){return t||k(e,4,this.length),V.read(this,e,!1,23,4)},r.prototype.readDoubleLE=function(e,t){return t||k(e,8,this.length),V.read(this,e,!0,52,8)},r.prototype.readDoubleBE=function(e,t){return t||k(e,8,this.length),V.read(this,e,!1,52,8)},r.prototype.writeUIntLE=function(e,t,n,r){e=+e,t=0|t,n=0|n,r||_(this,e,t,n,Math.pow(2,8*n),0);var i=1,a=0;for(this[t]=255&e;++a=0&&(a*=256);)this[t+i]=e/a&255;return t+n},r.prototype.writeUInt8=function(e,t,n){return e=+e,t=0|t,n||_(this,e,t,1,255,0),r.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=e,t+1},r.prototype.writeUInt16LE=function(e,t,n){return e=+e,t=0|t,n||_(this,e,t,2,65535,0),r.TYPED_ARRAY_SUPPORT?(this[t]=e,this[t+1]=e>>>8):O(this,e,t,!0),t+2},r.prototype.writeUInt16BE=function(e,t,n){return e=+e,t=0|t,n||_(this,e,t,2,65535,0),r.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=e):O(this,e,t,!1),t+2},r.prototype.writeUInt32LE=function(e,t,n){return e=+e,t=0|t,n||_(this,e,t,4,4294967295,0),r.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=e):$(this,e,t,!0),t+4},r.prototype.writeUInt32BE=function(e,t,n){return e=+e,t=0|t,n||_(this,e,t,4,4294967295,0),r.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e):$(this,e,t,!1),t+4},r.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t=0|t,!r){var i=Math.pow(2,8*n-1);_(this,e,t,n,i-1,-i)}var a=0,o=1,s=0>e?1:0;for(this[t]=255&e;++a>0)-s&255;return t+n},r.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t=0|t,!r){var i=Math.pow(2,8*n-1);_(this,e,t,n,i-1,-i)}var a=n-1,o=1,s=0>e?1:0;for(this[t+a]=255&e;--a>=0&&(o*=256);)this[t+a]=(e/o>>0)-s&255;return t+n},r.prototype.writeInt8=function(e,t,n){return e=+e,t=0|t,n||_(this,e,t,1,127,-128),r.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),0>e&&(e=255+e+1),this[t]=e,t+1},r.prototype.writeInt16LE=function(e,t,n){return e=+e,t=0|t,n||_(this,e,t,2,32767,-32768),r.TYPED_ARRAY_SUPPORT?(this[t]=e,this[t+1]=e>>>8):O(this,e,t,!0),t+2},r.prototype.writeInt16BE=function(e,t,n){return e=+e,t=0|t,n||_(this,e,t,2,32767,-32768),r.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=e):O(this,e,t,!1),t+2},r.prototype.writeInt32LE=function(e,t,n){return e=+e,t=0|t,n||_(this,e,t,4,2147483647,-2147483648),r.TYPED_ARRAY_SUPPORT?(this[t]=e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):$(this,e,t,!0),t+4},r.prototype.writeInt32BE=function(e,t,n){return e=+e,t=0|t,n||_(this,e,t,4,2147483647,-2147483648),0>e&&(e=4294967295+e+1),r.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=e):$(this,e,t,!1),t+4},r.prototype.writeFloatLE=function(e,t,n){return D(this,e,t,!0,n)},r.prototype.writeFloatBE=function(e,t,n){return D(this,e,t,!1,n)},r.prototype.writeDoubleLE=function(e,t,n){return P(this,e,t,!0,n)},r.prototype.writeDoubleBE=function(e,t,n){return P(this,e,t,!1,n)},r.prototype.copy=function(e,t,n,i){if(n||(n=0),i||0===i||(i=this.length),t>=e.length&&(t=e.length),t||(t=0),i>0&&n>i&&(i=n),i===n)return 0;if(0===e.length||0===this.length)return 0;if(0>t)throw new RangeError("targetStart out of bounds");if(0>n||n>=this.length)throw new RangeError("sourceStart out of bounds");if(0>i)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-ta||!r.TYPED_ARRAY_SUPPORT)for(var o=0;a>o;o++)e[o+t]=this[o+n];else e._set(this.subarray(n,n+a),t);return a},r.prototype.fill=function(e,t,n){if(e||(e=0),t||(t=0),n||(n=this.length),t>n)throw new RangeError("end < start");if(n!==t&&0!==this.length){if(0>t||t>=this.length)throw new RangeError("start out of bounds");if(0>n||n>this.length)throw new RangeError("end out of bounds");var r;if("number"==typeof e)for(r=t;n>r;r++)this[r]=e;else{var i=U(e.toString()),a=i.length;for(r=t;n>r;r++)this[r]=i[r%a]}return this}},r.prototype.toArrayBuffer=function(){if("undefined"!=typeof Uint8Array){if(r.TYPED_ARRAY_SUPPORT)return new r(this).buffer;for(var e=new Uint8Array(this.length),t=0,n=e.length;n>t;t+=1)e[t]=this[t];return e.buffer}throw new TypeError("Buffer.toArrayBuffer not supported in this browser")};var Q=r.prototype;r._augment=function(e){return e.constructor=r,e._isBuffer=!0,e._set=e.set,e.get=Q.get,e.set=Q.set,e.write=Q.write,e.toString=Q.toString,e.toLocaleString=Q.toString,e.toJSON=Q.toJSON,e.equals=Q.equals,e.compare=Q.compare,e.indexOf=Q.indexOf,e.copy=Q.copy,e.slice=Q.slice,e.readUIntLE=Q.readUIntLE,e.readUIntBE=Q.readUIntBE,e.readUInt8=Q.readUInt8,e.readUInt16LE=Q.readUInt16LE,e.readUInt16BE=Q.readUInt16BE,e.readUInt32LE=Q.readUInt32LE,e.readUInt32BE=Q.readUInt32BE,e.readIntLE=Q.readIntLE,e.readIntBE=Q.readIntBE,e.readInt8=Q.readInt8,e.readInt16LE=Q.readInt16LE,e.readInt16BE=Q.readInt16BE,e.readInt32LE=Q.readInt32LE,e.readInt32BE=Q.readInt32BE,e.readFloatLE=Q.readFloatLE,e.readFloatBE=Q.readFloatBE,e.readDoubleLE=Q.readDoubleLE,e.readDoubleBE=Q.readDoubleBE,e.writeUInt8=Q.writeUInt8,e.writeUIntLE=Q.writeUIntLE,e.writeUIntBE=Q.writeUIntBE,e.writeUInt16LE=Q.writeUInt16LE,e.writeUInt16BE=Q.writeUInt16BE,e.writeUInt32LE=Q.writeUInt32LE,e.writeUInt32BE=Q.writeUInt32BE,e.writeIntLE=Q.writeIntLE,e.writeIntBE=Q.writeIntBE,e.writeInt8=Q.writeInt8,e.writeInt16LE=Q.writeInt16LE,e.writeInt16BE=Q.writeInt16BE,e.writeInt32LE=Q.writeInt32LE,e.writeInt32BE=Q.writeInt32BE,e.writeFloatLE=Q.writeFloatLE,e.writeFloatBE=Q.writeFloatBE,e.writeDoubleLE=Q.writeDoubleLE,e.writeDoubleBE=Q.writeDoubleBE,e.fill=Q.fill,e.inspect=Q.inspect,e.toArrayBuffer=Q.toArrayBuffer,e};var X=/[^+\/0-9A-z\-]/g},{"base64-js":12,ieee754:13,"is-array":14}],12:[function(e,t,n){var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";!function(e){"use strict";function t(e){var t=e.charCodeAt(0);return t===o||t===p?62:t===s||t===h?63:l>t?-1:l+10>t?t-l+26+26:c+26>t?t-c:u+26>t?t-u+26:void 0}function n(e){function n(e){u[p++]=e}var r,i,o,s,l,u;if(e.length%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var c=e.length;l="="===e.charAt(c-2)?2:"="===e.charAt(c-1)?1:0,u=new a(3*e.length/4-l),o=l>0?e.length-4:e.length;var p=0;for(r=0,i=0;o>r;r+=4,i+=3)s=t(e.charAt(r))<<18|t(e.charAt(r+1))<<12|t(e.charAt(r+2))<<6|t(e.charAt(r+3)),n((16711680&s)>>16),n((65280&s)>>8),n(255&s);return 2===l?(s=t(e.charAt(r))<<2|t(e.charAt(r+1))>>4,n(255&s)):1===l&&(s=t(e.charAt(r))<<10|t(e.charAt(r+1))<<4|t(e.charAt(r+2))>>2,n(s>>8&255),n(255&s)),u}function i(e){function t(e){return r.charAt(e)}function n(e){return t(e>>18&63)+t(e>>12&63)+t(e>>6&63)+t(63&e)}var i,a,o,s=e.length%3,l="";for(i=0,o=e.length-s;o>i;i+=3)a=(e[i]<<16)+(e[i+1]<<8)+e[i+2],l+=n(a);switch(s){case 1:a=e[e.length-1],l+=t(a>>2),l+=t(a<<4&63),l+="==";break;case 2:a=(e[e.length-2]<<8)+e[e.length-1],l+=t(a>>10),l+=t(a>>4&63),l+=t(a<<2&63),l+="="}return l}var a="undefined"!=typeof Uint8Array?Uint8Array:Array,o="+".charCodeAt(0),s="/".charCodeAt(0),l="0".charCodeAt(0),u="a".charCodeAt(0),c="A".charCodeAt(0),p="-".charCodeAt(0),h="_".charCodeAt(0);e.toByteArray=n,e.fromByteArray=i}("undefined"==typeof n?this.base64js={}:n)},{}],13:[function(e,t,n){n.read=function(e,t,n,r,i){var a,o,s=8*i-r-1,l=(1<>1,c=-7,p=n?i-1:0,h=n?-1:1,f=e[t+p];for(p+=h,a=f&(1<<-c)-1,f>>=-c,c+=s;c>0;a=256*a+e[t+p],p+=h,c-=8);for(o=a&(1<<-c)-1,a>>=-c,c+=r;c>0;o=256*o+e[t+p],p+=h,c-=8);if(0===a)a=1-u;else{if(a===l)return o?0/0:(f?-1:1)*(1/0);o+=Math.pow(2,r),a-=u}return(f?-1:1)*o*Math.pow(2,a-r)},n.write=function(e,t,n,r,i,a){var o,s,l,u=8*a-i-1,c=(1<>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=r?0:a-1,d=r?1:-1,m=0>t||0===t&&0>1/t?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=c):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),t+=o+p>=1?h/l:h*Math.pow(2,1-p),t*l>=2&&(o++,l/=2),o+p>=c?(s=0,o=c):o+p>=1?(s=(t*l-1)*Math.pow(2,i),o+=p):(s=t*Math.pow(2,p-1)*Math.pow(2,i),o=0));i>=8;e[n+f]=255&s,f+=d,s/=256,i-=8);for(o=o<0;e[n+f]=255&o,f+=d,o/=256,u-=8);e[n+f-d]|=128*m}},{}],14:[function(e,t,n){var r=Array.isArray,i=Object.prototype.toString;t.exports=r||function(e){return!!e&&"[object Array]"==i.call(e)}},{}],15:[function(e,t,n){function r(){if(!s){s=!0;for(var e,t=o.length;t;){e=o,o=[];for(var n=-1;++n0&&t-1 in e}function i(e,t,n){if(ee.isFunction(t))return ee.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return ee.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(le.test(t))return ee.filter(t,e,n);t=ee.filter(t,e)}return ee.grep(e,function(e){return J.call(t,e)>=0!==n})}function a(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function o(e){var t=me[e]={};return ee.each(e.match(de)||[],function(e,n){t[n]=!0}),t}function s(){G.removeEventListener("DOMContentLoaded",s,!1),t.removeEventListener("load",s,!1),ee.ready()}function l(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=ee.expando+l.uid++}function u(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(xe,"-$1").toLowerCase(),n=e.getAttribute(r),"string"==typeof n){try{n="true"===n?!0:"false"===n?!1:"null"===n?null:+n+""===n?+n:we.test(n)?ee.parseJSON(n):n}catch(i){}be.set(e,t,n)}else n=void 0;return n}function c(){return!0}function p(){return!1}function h(){try{return G.activeElement}catch(e){}}function f(e,t){return ee.nodeName(e,"table")&&ee.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function d(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function m(e){var t=Ne.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function g(e,t){for(var n=0,r=e.length;r>n;n++)ve.set(e[n],"globalEval",!t||ve.get(t[n],"globalEval"))}function y(e,t){var n,r,i,a,o,s,l,u;if(1===t.nodeType){if(ve.hasData(e)&&(a=ve.access(e),o=ve.set(t,a),u=a.events)){delete o.handle,o.events={};for(i in u)for(n=0,r=u[i].length;r>n;n++)ee.event.add(t,i,u[i][n])}be.hasData(e)&&(s=be.access(e),l=ee.extend({},s),be.set(t,l))}}function v(e,t){var n=e.getElementsByTagName?e.getElementsByTagName(t||"*"):e.querySelectorAll?e.querySelectorAll(t||"*"):[];return void 0===t||t&&ee.nodeName(e,t)?ee.merge([e],n):n}function b(e,t){var n=t.nodeName.toLowerCase();"input"===n&&Ce.test(e.type)?t.checked=e.checked:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}function w(e,n){var r,i=ee(n.createElement(e)).appendTo(n.body),a=t.getDefaultComputedStyle&&(r=t.getDefaultComputedStyle(i[0]))?r.display:ee.css(i[0],"display");return i.detach(),a}function x(e){var t=G,n=Be[e];return n||(n=w(e,t),"none"!==n&&n||(He=(He||ee("