diff --git a/dist/swagger-ui.js b/dist/swagger-ui.js index 27d77036..74a156d3 100644 --- a/dist/swagger-ui.js +++ b/dist/swagger-ui.js @@ -26882,9 +26882,9 @@ SwaggerUi.partials.signature = (function () { var items = definition.items; var xml = definition.xml || {}; - if (!items) { return ''; } + if (!items) { return getErrorMessage(); } - value = createXMLSample(name, items, models); + value = createSchemaXML(name, items, models); value += value; xml = xml || {}; @@ -26901,11 +26901,9 @@ SwaggerUi.partials.signature = (function () { var model = models[type] || {}; var name = model.name || modelType; - if (!model.definition) { - return ''; - } + if (!model.definition) { return getErrorMessage(); } - return createXMLSample(name, model.definition, models); + return createSchemaXML(name, model.definition, models); }; var createPrimitiveXML = function (name, definition) { @@ -26931,7 +26929,7 @@ SwaggerUi.partials.signature = (function () { var attributes = []; var value; - if (_.keys(primitivesMap).indexOf(type) < 0) { return ''; } + if (_.keys(primitivesMap).indexOf(type) < 0) { return getErrorMessage(); } if (namespace) { attributes.push(namespace); @@ -26947,7 +26945,7 @@ SwaggerUi.partials.signature = (function () { }; function createObjectXML (name, definition, models) { - var props; + var serializedProperties; var attrs = []; var properties = definition.properties; var additionalProperties = definition.additionalProperties; @@ -26958,31 +26956,24 @@ SwaggerUi.partials.signature = (function () { attrs.push(namespace); } - if (!properties && !additionalProperties) { return ''; } + if (!properties && !additionalProperties) { return getErrorMessage(); } properties = properties || {}; - props = _.map(properties, function (prop, key) { - return createXMLSample(key, prop, models); + serializedProperties = _.map(properties, function (prop, key) { + return createSchemaXML(key, prop, models); }).join(''); if (additionalProperties) { - props += ''; + serializedProperties += ''; } - return wrapTag(name, props, attrs); + return wrapTag(name, serializedProperties, attrs); } - function createXMLSample (name, definition, models) { + function createSchemaXML (name, definition, models) { var type, xml, $ref; - // allow ingnoring 'name' parameter - if (arguments.length === 2) { - models = arguments[1]; - definition = arguments[0]; - name = ''; - } - type = definition.type || 'object'; xml = definition.xml || {}; $ref = definition.$ref; @@ -27002,11 +26993,22 @@ SwaggerUi.partials.signature = (function () { } } + function getErrorMessage () { + return ''; + } + + function createXMLSample (definition, models) { + var prolog = ''; + + return prolog + createSchemaXML('', definition, models); + } + return { getModelSignature: getModelSignature, createJSONSample: createJSONSample, getParameterModelSignature: getParameterModelSignature, createParameterJSONSample: createParameterJSONSample, + createSchemaXML: createSchemaXML, createXMLSample: createXMLSample }; diff --git a/dist/swagger-ui.min.js b/dist/swagger-ui.min.js index c51ab17c..1c13550f 100644 --- a/dist/swagger-ui.min.js +++ b/dist/swagger-ui.min.js @@ -8,4 +8,4 @@ this.sourceType=t,this.finish(),this},finishProperty:function(e,t,n,r,i,a){retur 1!==a&&2!==a&&m(e,"unsupported YAML version of the document")},TAG:function(e,t,n){var r,i;2!==n.length&&d(e,"TAG directive accepts exactly two arguments"),r=n[0],i=n[1],ne.test(r)||d(e,"ill-formed tag handle (first argument) of the TAG directive"),z.call(e.tagMap,r)&&d(e,'there is a previously declared suffix for "'+r+'" tag handle'),re.test(i)||d(e,"ill-formed tag prefix (second argument) of the TAG directive"),e.tagMap[r]=i}};t.exports.loadAll=L,t.exports.load=$,t.exports.safeLoadAll=U,t.exports.safeLoad=M},{"./common":25,"./exception":27,"./mark":29,"./schema/default_full":32,"./schema/default_safe":33}],29:[function(e,t,n){"use strict";function r(e,t,n,r,i){this.name=e,this.buffer=t,this.position=n,this.line=r,this.column=i}var i=e("./common");r.prototype.getSnippet=function(e,t){var n,r,a,o,s;if(!this.buffer)return null;for(e=e||4,t=t||75,n="",r=this.position;r>0&&-1==="\x00\r\n…\u2028\u2029".indexOf(this.buffer.charAt(r-1));)if(r-=1,this.position-r>t/2-1){n=" ... ",r+=5;break}for(a="",o=this.position;ot/2-1){a=" ... ",o-=5;break}return s=this.buffer.slice(r,o),i.repeat(" ",e)+n+s+a+"\n"+i.repeat(" ",e+this.position-r+n.length)+"^"},r.prototype.toString=function(e){var t,n="";return this.name&&(n+='in "'+this.name+'" '),n+="at line "+(this.line+1)+", column "+(this.column+1),e||(t=this.getSnippet(),t&&(n+=":\n"+t)),n},t.exports=r},{"./common":25}],30:[function(e,t,n){"use strict";function r(e,t,n){var i=[];return e.include.forEach(function(e){n=r(e,t,n)}),e[t].forEach(function(e){n.forEach(function(t,n){t.tag===e.tag&&i.push(n)}),n.push(e)}),n.filter(function(e,t){return-1===i.indexOf(t)})}function i(){function e(e){r[e.tag]=e}var t,n,r={};for(t=0,n=arguments.length;n>t;t+=1)arguments[t].forEach(e);return r}function a(e){this.include=e.include||[],this.implicit=e.implicit||[],this.explicit=e.explicit||[],this.implicit.forEach(function(e){if(e.loadKind&&"scalar"!==e.loadKind)throw new s("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}),this.compiledImplicit=r(this,"implicit",[]),this.compiledExplicit=r(this,"explicit",[]),this.compiledTypeMap=i(this.compiledImplicit,this.compiledExplicit)}var o=e("./common"),s=e("./exception"),u=e("./type");a.DEFAULT=null,a.create=function(){var e,t;switch(arguments.length){case 1:e=a.DEFAULT,t=arguments[0];break;case 2:e=arguments[0],t=arguments[1];break;default:throw new s("Wrong number of arguments for Schema.create function")}if(e=o.toArray(e),t=o.toArray(t),!e.every(function(e){return e instanceof a}))throw new s("Specified list of super schemas (or a single Schema object) contains a non-Schema object.");if(!t.every(function(e){return e instanceof u}))throw new s("Specified list of YAML types (or a single Type object) contains a non-Type object.");return new a({include:e,explicit:t})},t.exports=a},{"./common":25,"./exception":27,"./type":36}],31:[function(e,t,n){"use strict";var r=e("../schema");t.exports=new r({include:[e("./json")]})},{"../schema":30,"./json":35}],32:[function(e,t,n){"use strict";var r=e("../schema");t.exports=r.DEFAULT=new r({include:[e("./default_safe")],explicit:[e("../type/js/undefined"),e("../type/js/regexp"),e("../type/js/function")]})},{"../schema":30,"../type/js/function":41,"../type/js/regexp":42,"../type/js/undefined":43,"./default_safe":33}],33:[function(e,t,n){"use strict";var r=e("../schema");t.exports=new r({include:[e("./core")],implicit:[e("../type/timestamp"),e("../type/merge")],explicit:[e("../type/binary"),e("../type/omap"),e("../type/pairs"),e("../type/set")]})},{"../schema":30,"../type/binary":37,"../type/merge":45,"../type/omap":47,"../type/pairs":48,"../type/set":50,"../type/timestamp":52,"./core":31}],34:[function(e,t,n){"use strict";var r=e("../schema");t.exports=new r({explicit:[e("../type/str"),e("../type/seq"),e("../type/map")]})},{"../schema":30,"../type/map":44,"../type/seq":49,"../type/str":51}],35:[function(e,t,n){"use strict";var r=e("../schema");t.exports=new r({include:[e("./failsafe")],implicit:[e("../type/null"),e("../type/bool"),e("../type/int"),e("../type/float")]})},{"../schema":30,"../type/bool":38,"../type/float":39,"../type/int":40,"../type/null":46,"./failsafe":34}],36:[function(e,t,n){"use strict";function r(e){var t={};return null!==e&&Object.keys(e).forEach(function(n){e[n].forEach(function(e){t[String(e)]=n})}),t}function i(e,t){if(t=t||{},Object.keys(t).forEach(function(t){if(-1===o.indexOf(t))throw new a('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')}),this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.defaultStyle=t.defaultStyle||null,this.styleAliases=r(t.styleAliases||null),-1===s.indexOf(this.kind))throw new a('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}var a=e("./exception"),o=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],s=["scalar","sequence","mapping"];t.exports=i},{"./exception":27}],37:[function(e,t,n){"use strict";function r(e){if(null===e)return!1;var t,n,r=0,i=e.length,a=l;for(n=0;i>n;n++)if(t=a.indexOf(e.charAt(n)),!(t>64)){if(0>t)return!1;r+=6}return r%8===0}function i(e){var t,n,r=e.replace(/[\r\n=]/g,""),i=r.length,a=l,o=0,u=[];for(t=0;i>t;t++)t%4===0&&t&&(u.push(o>>16&255),u.push(o>>8&255),u.push(255&o)),o=o<<6|a.indexOf(r.charAt(t));return n=i%4*6,0===n?(u.push(o>>16&255),u.push(o>>8&255),u.push(255&o)):18===n?(u.push(o>>10&255),u.push(o>>2&255)):12===n&&u.push(o>>4&255),s?new s(u):u}function a(e){var t,n,r="",i=0,a=e.length,o=l;for(t=0;a>t;t++)t%3===0&&t&&(r+=o[i>>18&63],r+=o[i>>12&63],r+=o[i>>6&63],r+=o[63&i]),i=(i<<8)+e[t];return n=a%3,0===n?(r+=o[i>>18&63],r+=o[i>>12&63],r+=o[i>>6&63],r+=o[63&i]):2===n?(r+=o[i>>10&63],r+=o[i>>4&63],r+=o[i<<2&63],r+=o[64]):1===n&&(r+=o[i>>2&63],r+=o[i<<4&63],r+=o[64],r+=o[64]),r}function o(e){return s&&s.isBuffer(e)}var s=e("buffer").Buffer,u=e("../type"),l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";t.exports=new u("tag:yaml.org,2002:binary",{kind:"scalar",resolve:r,construct:i,predicate:o,represent:a})},{"../type":36,buffer:13}],38:[function(e,t,n){"use strict";function r(e){if(null===e)return!1;var t=e.length;return 4===t&&("true"===e||"True"===e||"TRUE"===e)||5===t&&("false"===e||"False"===e||"FALSE"===e)}function i(e){return"true"===e||"True"===e||"TRUE"===e}function a(e){return"[object Boolean]"===Object.prototype.toString.call(e)}var o=e("../type");t.exports=new o("tag:yaml.org,2002:bool",{kind:"scalar",resolve:r,construct:i,predicate:a,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"})},{"../type":36}],39:[function(e,t,n){"use strict";function r(e){return null===e?!1:l.test(e)?!0:!1}function i(e){var t,n,r,i;return t=e.replace(/_/g,"").toLowerCase(),n="-"===t[0]?-1:1,i=[],0<="+-".indexOf(t[0])&&(t=t.slice(1)),".inf"===t?1===n?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===t?NaN:0<=t.indexOf(":")?(t.split(":").forEach(function(e){i.unshift(parseFloat(e,10))}),t=0,r=1,i.forEach(function(e){t+=e*r,r*=60}),n*t):n*parseFloat(t,10)}function a(e,t){var n;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(s.isNegativeZero(e))return"-0.0";return n=e.toString(10),c.test(n)?n.replace("e",".e"):n}function o(e){return"[object Number]"===Object.prototype.toString.call(e)&&(0!==e%1||s.isNegativeZero(e))}var s=e("../common"),u=e("../type"),l=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)\\.[0-9_]*(?:[eE][-+][0-9]+)?|\\.[0-9_]+(?:[eE][-+][0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),c=/^[-+]?[0-9]+e/;t.exports=new u("tag:yaml.org,2002:float",{kind:"scalar",resolve:r,construct:i,predicate:o,represent:a,defaultStyle:"lowercase"})},{"../common":25,"../type":36}],40:[function(e,t,n){"use strict";function r(e){return e>=48&&57>=e||e>=65&&70>=e||e>=97&&102>=e}function i(e){return e>=48&&55>=e}function a(e){return e>=48&&57>=e}function o(e){if(null===e)return!1;var t,n=e.length,o=0,s=!1;if(!n)return!1;if(t=e[o],("-"===t||"+"===t)&&(t=e[++o]),"0"===t){if(o+1===n)return!0;if(t=e[++o],"b"===t){for(o++;n>o;o++)if(t=e[o],"_"!==t){if("0"!==t&&"1"!==t)return!1;s=!0}return s}if("x"===t){for(o++;n>o;o++)if(t=e[o],"_"!==t){if(!r(e.charCodeAt(o)))return!1;s=!0}return s}for(;n>o;o++)if(t=e[o],"_"!==t){if(!i(e.charCodeAt(o)))return!1;s=!0}return s}for(;n>o;o++)if(t=e[o],"_"!==t){if(":"===t)break;if(!a(e.charCodeAt(o)))return!1;s=!0}return s?":"!==t?!0:/^(:[0-5]?[0-9])+$/.test(e.slice(o)):!1}function s(e){var t,n,r=e,i=1,a=[];return-1!==r.indexOf("_")&&(r=r.replace(/_/g,"")),t=r[0],("-"===t||"+"===t)&&("-"===t&&(i=-1),r=r.slice(1),t=r[0]),"0"===r?0:"0"===t?"b"===r[1]?i*parseInt(r.slice(2),2):"x"===r[1]?i*parseInt(r,16):i*parseInt(r,8):-1!==r.indexOf(":")?(r.split(":").forEach(function(e){a.unshift(parseInt(e,10))}),r=0,n=1,a.forEach(function(e){r+=e*n,n*=60}),i*r):i*parseInt(r,10)}function u(e){return"[object Number]"===Object.prototype.toString.call(e)&&0===e%1&&!l.isNegativeZero(e)}var l=e("../common"),c=e("../type");t.exports=new c("tag:yaml.org,2002:int",{kind:"scalar",resolve:o,construct:s,predicate:u,represent:{binary:function(e){return"0b"+e.toString(2)},octal:function(e){return"0"+e.toString(8)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return"0x"+e.toString(16).toUpperCase()}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})},{"../common":25,"../type":36}],41:[function(e,t,n){"use strict";function r(e){if(null===e)return!1;try{var t="("+e+")",n=s.parse(t,{range:!0});return"Program"!==n.type||1!==n.body.length||"ExpressionStatement"!==n.body[0].type||"FunctionExpression"!==n.body[0].expression.type?!1:!0}catch(r){return!1}}function i(e){var t,n="("+e+")",r=s.parse(n,{range:!0}),i=[];if("Program"!==r.type||1!==r.body.length||"ExpressionStatement"!==r.body[0].type||"FunctionExpression"!==r.body[0].expression.type)throw new Error("Failed to resolve function");return r.body[0].expression.params.forEach(function(e){i.push(e.name)}),t=r.body[0].expression.body.range,new Function(i,n.slice(t[0]+1,t[1]-1))}function a(e){return e.toString()}function o(e){return"[object Function]"===Object.prototype.toString.call(e)}var s;try{s=e("esprima")}catch(u){"undefined"!=typeof window&&(s=window.esprima)}var l=e("../../type");t.exports=new l("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:r,construct:i,predicate:o,represent:a})},{"../../type":36,esprima:18}],42:[function(e,t,n){"use strict";function r(e){if(null===e)return!1;if(0===e.length)return!1;var t=e,n=/\/([gim]*)$/.exec(e),r="";if("/"===t[0]){if(n&&(r=n[1]),r.length>3)return!1;if("/"!==t[t.length-r.length-1])return!1;t=t.slice(1,t.length-r.length-1)}try{return!0}catch(i){return!1}}function i(e){var t=e,n=/\/([gim]*)$/.exec(e),r="";return"/"===t[0]&&(n&&(r=n[1]),t=t.slice(1,t.length-r.length-1)),new RegExp(t,r)}function a(e){var t="/"+e.source+"/";return e.global&&(t+="g"),e.multiline&&(t+="m"),e.ignoreCase&&(t+="i"),t}function o(e){return"[object RegExp]"===Object.prototype.toString.call(e)}var s=e("../../type");t.exports=new s("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:r,construct:i,predicate:o,represent:a})},{"../../type":36}],43:[function(e,t,n){"use strict";function r(){return!0}function i(){}function a(){return""}function o(e){return"undefined"==typeof e}var s=e("../../type");t.exports=new s("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:r,construct:i,predicate:o,represent:a})},{"../../type":36}],44:[function(e,t,n){"use strict";var r=e("../type");t.exports=new r("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return null!==e?e:{}}})},{"../type":36}],45:[function(e,t,n){"use strict";function r(e){return"<<"===e||null===e}var i=e("../type");t.exports=new i("tag:yaml.org,2002:merge",{kind:"scalar",resolve:r})},{"../type":36}],46:[function(e,t,n){"use strict";function r(e){if(null===e)return!0;var t=e.length;return 1===t&&"~"===e||4===t&&("null"===e||"Null"===e||"NULL"===e)}function i(){return null}function a(e){return null===e}var o=e("../type");t.exports=new o("tag:yaml.org,2002:null",{kind:"scalar",resolve:r,construct:i,predicate:a,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})},{"../type":36}],47:[function(e,t,n){"use strict";function r(e){if(null===e)return!0;var t,n,r,i,a,u=[],l=e;for(t=0,n=l.length;n>t;t+=1){if(r=l[t],a=!1,"[object Object]"!==s.call(r))return!1;for(i in r)if(o.call(r,i)){if(a)return!1;a=!0}if(!a)return!1;if(-1!==u.indexOf(i))return!1;u.push(i)}return!0}function i(e){return null!==e?e:[]}var a=e("../type"),o=Object.prototype.hasOwnProperty,s=Object.prototype.toString;t.exports=new a("tag:yaml.org,2002:omap",{kind:"sequence",resolve:r,construct:i})},{"../type":36}],48:[function(e,t,n){"use strict";function r(e){if(null===e)return!0;var t,n,r,i,a,s=e;for(a=new Array(s.length),t=0,n=s.length;n>t;t+=1){if(r=s[t],"[object Object]"!==o.call(r))return!1;if(i=Object.keys(r),1!==i.length)return!1;a[t]=[i[0],r[i[0]]]}return!0}function i(e){if(null===e)return[];var t,n,r,i,a,o=e;for(a=new Array(o.length),t=0,n=o.length;n>t;t+=1)r=o[t],i=Object.keys(r),a[t]=[i[0],r[i[0]]];return a}var a=e("../type"),o=Object.prototype.toString;t.exports=new a("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:r,construct:i})},{"../type":36}],49:[function(e,t,n){"use strict";var r=e("../type");t.exports=new r("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return null!==e?e:[]}})},{"../type":36}],50:[function(e,t,n){"use strict";function r(e){if(null===e)return!0;var t,n=e;for(t in n)if(o.call(n,t)&&null!==n[t])return!1;return!0}function i(e){return null!==e?e:{}}var a=e("../type"),o=Object.prototype.hasOwnProperty;t.exports=new a("tag:yaml.org,2002:set",{kind:"mapping",resolve:r,construct:i})},{"../type":36}],51:[function(e,t,n){"use strict";var r=e("../type");t.exports=new r("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return null!==e?e:""}})},{"../type":36}],52:[function(e,t,n){"use strict";function r(e){return null===e?!1:null===s.exec(e)?!1:!0}function i(e){var t,n,r,i,a,o,u,l,c,p,f=0,h=null;if(t=s.exec(e),null===t)throw new Error("Date resolve error");if(n=+t[1],r=+t[2]-1,i=+t[3],!t[4])return new Date(Date.UTC(n,r,i));if(a=+t[4],o=+t[5],u=+t[6],t[7]){for(f=t[7].slice(0,3);f.length<3;)f+="0";f=+f}return t[9]&&(l=+t[10],c=+(t[11]||0),h=6e4*(60*l+c),"-"===t[9]&&(h=-h)),p=new Date(Date.UTC(n,r,i,a,o,u,f)),h&&p.setTime(p.getTime()-h),p}function a(e){return e.toISOString()}var o=e("../type"),s=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?)?$");t.exports=new o("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:r,construct:i,instanceOf:Date,represent:a})},{"../type":36}],53:[function(e,t,n){function r(e,t,n){var r=e?e.length:0;if(!r)return-1;if("number"==typeof n)n=0>n?o(r+n,0):n;else if(n){var s=a(e,t);return r>s&&(t===t?t===e[s]:e[s]!==e[s])?s:-1}return i(e,t,n||0)}var i=e("../internal/baseIndexOf"),a=e("../internal/binaryIndex"),o=Math.max;t.exports=r},{"../internal/baseIndexOf":82,"../internal/binaryIndex":96}],54:[function(e,t,n){function r(e){var t=e?e.length:0;return t?e[t-1]:void 0}t.exports=r},{}],55:[function(e,t,n){function r(e){if(u(e)&&!s(e)&&!(e instanceof i)){if(e instanceof a)return e;if(p.call(e,"__chain__")&&p.call(e,"__wrapped__"))return l(e)}return new a(e)}var i=e("../internal/LazyWrapper"),a=e("../internal/LodashWrapper"),o=e("../internal/baseLodash"),s=e("../lang/isArray"),u=e("../internal/isObjectLike"),l=e("../internal/wrapperClone"),c=Object.prototype,p=c.hasOwnProperty;r.prototype=o.prototype,t.exports=r},{"../internal/LazyWrapper":64,"../internal/LodashWrapper":65,"../internal/baseLodash":86,"../internal/isObjectLike":130,"../internal/wrapperClone":141,"../lang/isArray":144}],56:[function(e,t,n){t.exports=e("./forEach")},{"./forEach":58}],57:[function(e,t,n){var r=e("../internal/baseEach"),i=e("../internal/createFind"),a=i(r);t.exports=a},{"../internal/baseEach":75,"../internal/createFind":106}],58:[function(e,t,n){var r=e("../internal/arrayEach"),i=e("../internal/baseEach"),a=e("../internal/createForEach"),o=a(r,i);t.exports=o},{"../internal/arrayEach":67,"../internal/baseEach":75,"../internal/createForEach":107}],59:[function(e,t,n){function r(e,t,n,r){var f=e?a(e):0;return u(f)||(e=c(e),f=e.length),n="number"!=typeof n||r&&s(t,n,r)?0:0>n?p(f+n,0):n||0,"string"==typeof e||!o(e)&&l(e)?f>=n&&e.indexOf(t,n)>-1:!!f&&i(e,t,n)>-1}var i=e("../internal/baseIndexOf"),a=e("../internal/getLength"),o=e("../lang/isArray"),s=e("../internal/isIterateeCall"),u=e("../internal/isLength"),l=e("../lang/isString"),c=e("../object/values"),p=Math.max;t.exports=r},{"../internal/baseIndexOf":82,"../internal/getLength":116,"../internal/isIterateeCall":126,"../internal/isLength":129,"../lang/isArray":144,"../lang/isString":150,"../object/values":156}],60:[function(e,t,n){function r(e,t,n){var r=s(e)?i:o;return t=a(t,n,3),r(e,t)}var i=e("../internal/arrayMap"),a=e("../internal/baseCallback"),o=e("../internal/baseMap"),s=e("../lang/isArray");t.exports=r},{"../internal/arrayMap":68,"../internal/baseCallback":71,"../internal/baseMap":87,"../lang/isArray":144}],61:[function(e,t,n){var r=e("../internal/getNative"),i=r(Date,"now"),a=i||function(){return(new Date).getTime()};t.exports=a},{"../internal/getNative":118}],62:[function(e,t,n){var r=e("../internal/createWrapper"),i=e("../internal/replaceHolders"),a=e("./restParam"),o=1,s=32,u=a(function(e,t,n){var a=o;if(n.length){var l=i(n,u.placeholder);a|=s}return r(e,a,t,n,l)});u.placeholder={},t.exports=u},{"../internal/createWrapper":110,"../internal/replaceHolders":136,"./restParam":63}],63:[function(e,t,n){function r(e,t){if("function"!=typeof e)throw new TypeError(i);return t=a(void 0===t?e.length-1:+t||0,0),function(){for(var n=arguments,r=-1,i=a(n.length-t,0),o=Array(i);++rr;)e=i(e)[t[r++]];return r&&r==a?e:void 0}}var i=e("./toObject");t.exports=r},{"./toObject":139}],82:[function(e,t,n){function r(e,t,n){if(t!==t)return i(e,n);for(var r=n-1,a=e.length;++rt&&(t=-t>i?0:i+t),n=void 0===n||n>i?i:+n||0,0>n&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(i);++r=o){for(;o>r;){var u=r+o>>>1,l=e[u];(n?t>=l:t>l)&&null!==l?r=u+1:o=u}return o}return i(e,t,a,n)}var i=e("./binaryIndexBy"),a=e("../utility/identity"),o=4294967295,s=o>>>1;t.exports=r},{"../utility/identity":158,"./binaryIndexBy":97}],97:[function(e,t,n){function r(e,t,n,r){t=n(t);for(var o=0,u=e?e.length:0,l=t!==t,c=null===t,p=void 0===t;u>o;){var f=i((o+u)/2),h=n(e[f]),d=void 0!==h,m=h===h;if(l)var y=m||r;else y=c?m&&d&&(r||null!=h):p?m&&(r||d):null==h?!1:r?t>=h:t>h;y?o=f+1:u=f}return a(u,s)}var i=Math.floor,a=Math.min,o=4294967295,s=o-1;t.exports=r},{}],98:[function(e,t,n){function r(e,t,n){if("function"!=typeof e)return i;if(void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 3:return function(n,r,i){return e.call(t,n,r,i)};case 4:return function(n,r,i,a){return e.call(t,n,r,i,a)};case 5:return function(n,r,i,a,o){return e.call(t,n,r,i,a,o)}}return function(){return e.apply(t,arguments)}}var i=e("../utility/identity");t.exports=r},{"../utility/identity":158}],99:[function(e,t,n){(function(e){function n(e){var t=new r(e.byteLength),n=new i(t);return n.set(new i(e)),t}var r=e.ArrayBuffer,i=e.Uint8Array;t.exports=n}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],100:[function(e,t,n){function r(e,t,n){for(var r=n.length,a=-1,o=i(e.length-r,0),s=-1,u=t.length,l=Array(u+o);++s-1?n[l]:void 0}return a(n,r,e)}}var i=e("./baseCallback"),a=e("./baseFind"),o=e("./baseFindIndex"),s=e("../lang/isArray");t.exports=r},{"../lang/isArray":144,"./baseCallback":71,"./baseFind":76,"./baseFindIndex":77}],107:[function(e,t,n){function r(e,t){return function(n,r,o){return"function"==typeof r&&void 0===o&&a(n)?e(n,r):t(n,i(r,o,3))}}var i=e("./bindCallback"),a=e("../lang/isArray");t.exports=r},{"../lang/isArray":144,"./bindCallback":98}],108:[function(e,t,n){(function(n){function r(e,t,w,A,x,C,E,F,S,O){function k(){for(var d=arguments.length,m=d,y=Array(d);m--;)y[m]=arguments[m];if(A&&(y=a(y,A,x)),C&&(y=o(y,C,E)),_||P){var D=k.placeholder,$=c(y,D);if(d-=$.length,O>d){var U=F?i(F):void 0,M=b(O-d,0),R=_?$:void 0,N=_?void 0:$,q=_?y:void 0,H=_?void 0:y;t|=_?g:v,t&=~(_?v:g),T||(t&=~(f|h));var V=[e,t,w,q,R,H,N,U,S,M],z=r.apply(void 0,V);return u(e)&&p(z,V),z.placeholder=D,z}}var Y=B?w:this,J=I?Y[e]:e;return F&&(y=l(y,F)),j&&Sl))return!1;for(;++u-1&&e%1==0&&t>e}var i=/^\d+$/,a=9007199254740991;t.exports=r},{}],126:[function(e,t,n){function r(e,t,n){if(!o(n))return!1;var r=typeof t;if("number"==r?i(n)&&a(t,n.length):"string"==r&&t in n){var s=n[t];return e===e?e===s:s!==s}return!1}var i=e("./isArrayLike"),a=e("./isIndex"),o=e("../lang/isObject");t.exports=r},{"../lang/isObject":148,"./isArrayLike":123,"./isIndex":125}],127:[function(e,t,n){function r(e,t){var n=typeof e;if("string"==n&&s.test(e)||"number"==n)return!0;if(i(e))return!1;var r=!o.test(e);return r||null!=t&&e in a(t)}var i=e("../lang/isArray"),a=e("./toObject"),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,s=/^\w*$/;t.exports=r},{"../lang/isArray":144,"./toObject":139}],128:[function(e,t,n){function r(e){var t=o(e),n=s[t];if("function"!=typeof n||!(t in i.prototype))return!1;if(e===n)return!0;var r=a(n);return!!r&&e===r[0]}var i=e("./LazyWrapper"),a=e("./getData"),o=e("./getFuncName"),s=e("../chain/lodash");t.exports=r},{"../chain/lodash":55,"./LazyWrapper":64,"./getData":114,"./getFuncName":115}],129:[function(e,t,n){function r(e){return"number"==typeof e&&e>-1&&e%1==0&&i>=e}var i=9007199254740991;t.exports=r},{}],130:[function(e,t,n){function r(e){return!!e&&"object"==typeof e}t.exports=r},{}],131:[function(e,t,n){function r(e){return e===e&&!i(e)}var i=e("../lang/isObject");t.exports=r},{"../lang/isObject":148}],132:[function(e,t,n){function r(e,t){var n=e[1],r=t[1],m=n|r,y=p>m,g=r==p&&n==c||r==p&&n==f&&e[7].length<=t[8]||r==(p|f)&&n==c;if(!y&&!g)return e;r&u&&(e[2]=t[2],m|=n&u?0:l);var v=t[3];if(v){var D=e[3];e[3]=D?a(D,v,t[4]):i(v),e[4]=D?s(e[3],h):i(t[4])}return v=t[5],v&&(D=e[5],e[5]=D?o(D,v,t[6]):i(v),e[6]=D?s(e[5],h):i(t[6])),v=t[7],v&&(e[7]=i(v)),r&p&&(e[8]=null==e[8]?t[8]:d(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=m,e}var i=e("./arrayCopy"),a=e("./composeArgs"),o=e("./composeArgsRight"),s=e("./replaceHolders"),u=1,l=4,c=8,p=128,f=256,h="__lodash_placeholder__",d=Math.min;t.exports=r},{"./arrayCopy":66,"./composeArgs":100,"./composeArgsRight":101,"./replaceHolders":136}],133:[function(e,t,n){(function(n){var r=e("./getNative"),i=r(n,"WeakMap"),a=i&&new i;t.exports=a}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./getNative":118}],134:[function(e,t,n){var r={};t.exports=r},{}],135:[function(e,t,n){function r(e,t){for(var n=e.length,r=o(t.length,n),s=i(e);r--;){var u=t[r];e[r]=a(u,n)?s[u]:void 0}return e}var i=e("./arrayCopy"),a=e("./isIndex"),o=Math.min;t.exports=r},{"./arrayCopy":66,"./isIndex":125}],136:[function(e,t,n){function r(e,t){for(var n=-1,r=e.length,a=-1,o=[];++n0){if(++e>=a)return n}else e=0;return r(n,s)}}();t.exports=s},{"../date/now":61,"./baseSetData":92}],138:[function(e,t,n){function r(e){for(var t=l(e),n=t.length,r=n&&e.length,c=!!r&&s(r)&&(a(e)||i(e)||u(e)),f=-1,h=[];++f0,g=f.enumErrorProps&&(e===x||e instanceof Error),v=f.enumPrototypes&&s(e);++r=Y&&le>=r}function l(){if(q)try{throw new Error}catch(e){var t=e.stack.split("\n"),n=t[0].indexOf("@")>0?t[1]:t[2],r=s(n);if(!r)return;return V=r[0],r[1]}}function c(e,t,n){return function(){return"undefined"!=typeof console&&"function"==typeof console.warn&&console.warn(t+" is deprecated, use "+n+" instead.",new Error("").stack),e.apply(e,arguments)}}function p(e){return e instanceof m?e:D(e)?O(e):S(e)}function f(){function e(e){t=e,a.source=e,X(n,function(t,n){p.nextTick(function(){e.promiseDispatch.apply(e,n)})},void 0),n=void 0,r=void 0}var t,n=[],r=[],i=ee(f.prototype),a=ee(m.prototype);if(a.promiseDispatch=function(e,i,a){var o=Q(arguments);n?(n.push(o),"when"===i&&a[1]&&r.push(a[1])):p.nextTick(function(){t.promiseDispatch.apply(t,o)})},a.valueOf=function(){if(n)return a;var e=g(t);return v(e)&&(t=e),e},a.inspect=function(){return t?t.inspect():{state:"pending"}},p.longStackSupport&&q)try{throw new Error}catch(o){a.stack=o.stack.substring(o.stack.indexOf("\n")+1)}return i.promise=a,i.resolve=function(n){t||e(p(n))},i.fulfill=function(n){t||e(S(n))},i.reject=function(n){t||e(F(n))},i.notify=function(e){t||X(r,function(t,n){p.nextTick(function(){n(e)})},void 0)},i}function h(e){if("function"!=typeof e)throw new TypeError("resolver must be a function.");var t=f();try{e(t.resolve,t.reject,t.notify)}catch(n){t.reject(n)}return t.promise}function d(e){return h(function(t,n){for(var r=0,i=e.length;i>r;r++)p(e[r]).then(t,n)})}function m(e,t,n){void 0===t&&(t=function(e){return F(new Error("Promise does not support operation: "+e))}),void 0===n&&(n=function(){return{state:"unknown"}});var r=ee(m.prototype);if(r.promiseDispatch=function(n,i,a){var o;try{o=e[i]?e[i].apply(r,a):t.call(r,i,a)}catch(s){o=F(s)}n&&n(o)},r.inspect=n,n){var i=n();"rejected"===i.state&&(r.exception=i.reason),r.valueOf=function(){var e=n();return"pending"===e.state||"rejected"===e.state?r:e.value}}return r}function y(e,t,n,r){return p(e).then(t,n,r)}function g(e){if(v(e)){var t=e.inspect();if("fulfilled"===t.state)return t.value}return e}function v(e){return e instanceof m}function D(e){return n(e)&&"function"==typeof e.then}function b(e){return v(e)&&"pending"===e.inspect().state}function w(e){return!v(e)||"fulfilled"===e.inspect().state}function A(e){return v(e)&&"rejected"===e.inspect().state}function x(){ae.length=0,oe.length=0,ue||(ue=!0)}function C(e,n){ue&&("object"==typeof t&&"function"==typeof t.emit&&p.nextTick.runAfter(function(){-1!==G(oe,e)&&(t.emit("unhandledRejection",n,e),se.push(e))}),oe.push(e),n&&"undefined"!=typeof n.stack?ae.push(n.stack):ae.push("(no stack) "+n))}function E(e){if(ue){var n=G(oe,e);-1!==n&&("object"==typeof t&&"function"==typeof t.emit&&p.nextTick.runAfter(function(){var r=G(se,e);-1!==r&&(t.emit("rejectionHandled",ae[n],e),se.splice(r,1))}),oe.splice(n,1),ae.splice(n,1))}}function F(e){var t=m({when:function(t){return t&&E(this),t?t(e):this}},function(){return this},function(){return{state:"rejected",reason:e}});return C(t,e),t}function S(e){return m({when:function(){return e},get:function(t){return e[t]},set:function(t,n){e[t]=n},"delete":function(t){delete e[t]},post:function(t,n){return null===t||void 0===t?e.apply(void 0,n):e[t].apply(e,n)},apply:function(t,n){return e.apply(t,n)},keys:function(){return ne(e)}},void 0,function(){return{state:"fulfilled",value:e}})}function O(e){var t=f();return p.nextTick(function(){try{e.then(t.resolve,t.reject,t.notify)}catch(n){t.reject(n)}}),t.promise}function k(e){return m({isDef:function(){}},function(t,n){return P(e,t,n)},function(){return p(e).inspect()})}function j(e,t,n){return p(e).spread(t,n)}function B(e){return function(){function t(e,t){var o;if("undefined"==typeof StopIteration){try{o=n[e](t)}catch(s){return F(s)}return o.done?p(o.value):y(o.value,i,a)}try{o=n[e](t)}catch(s){return r(s)?p(s.value):F(s)}return y(o,i,a)}var n=e.apply(this,arguments),i=t.bind(t,"next"),a=t.bind(t,"throw");return i()}}function I(e){p.done(p.async(e)())}function _(e){throw new z(e)}function T(e){return function(){return j([this,L(arguments)],function(t,n){return e.apply(t,n)})}}function P(e,t,n){return p(e).dispatch(t,n)}function L(e){return y(e,function(e){var t=0,n=f();return X(e,function(r,i,a){var o;v(i)&&"fulfilled"===(o=i.inspect()).state?e[a]=o.value:(++t,y(i,function(r){e[a]=r,0===--t&&n.resolve(e)},n.reject,function(e){n.notify({index:a,value:e})}))},void 0),0===t&&n.resolve(e),n.promise})}function $(e){if(0===e.length)return p.resolve();var t=p.defer(),n=0;return X(e,function(r,i,a){function o(e){t.resolve(e)}function s(){n--,0===n&&t.reject(new Error("Can't get fulfillment value from any promise, all promises were rejected."))}function u(e){t.notify({index:a,value:e})}var l=e[a];n++,y(l,o,s,u)},void 0),t.promise}function U(e){return y(e,function(e){return e=Z(e,p),y(L(Z(e,function(e){return y(e,J,J)})),function(){return e})})}function M(e){return p(e).allSettled()}function R(e,t){return p(e).then(void 0,void 0,t)}function N(e,t){return p(e).nodeify(t)}var q=!1;try{throw new Error}catch(H){q=!!H.stack}var V,z,Y=l(),J=function(){},W=function(){function e(){for(var e,t;r.next;)r=r.next,e=r.task,r.task=void 0,t=r.domain,t&&(r.domain=void 0,t.enter()),n(e,t);for(;u.length;)e=u.pop(),n(e);a=!1}function n(t,n){try{t()}catch(r){if(s)throw n&&n.exit(),setTimeout(e,0),n&&n.enter(),r;setTimeout(function(){throw r},0)}n&&n.exit()}var r={task:void 0,next:null},i=r,a=!1,o=void 0,s=!1,u=[];if(W=function(e){i=i.next={task:e,domain:s&&t.domain,next:null},a||(a=!0,o())},"object"==typeof t&&"[object process]"===t.toString()&&t.nextTick)s=!0,o=function(){t.nextTick(e)};else if("function"==typeof setImmediate)o="undefined"!=typeof window?setImmediate.bind(window,e):function(){setImmediate(e)};else if("undefined"!=typeof MessageChannel){var l=new MessageChannel;l.port1.onmessage=function(){o=c,l.port1.onmessage=e,e()};var c=function(){l.port2.postMessage(0)};o=function(){setTimeout(e,0),c()}}else o=function(){setTimeout(e,0)};return W.runAfter=function(e){u.push(e),a||(a=!0,o())},W}(),K=Function.call,Q=e(Array.prototype.slice),X=e(Array.prototype.reduce||function(e,t){var n=0,r=this.length;if(1===arguments.length)for(;;){if(n in this){t=this[n++];break}if(++n>=r)throw new TypeError}for(;r>n;n++)n in this&&(t=e(t,this[n],n));return t}),G=e(Array.prototype.indexOf||function(e){for(var t=0;t2?e.resolve(Q(arguments,1)):e.resolve(n)}},p.Promise=h,p.promise=h,h.race=d,h.all=L,h.reject=F,h.resolve=p,p.passByCopy=function(e){return e},m.prototype.passByCopy=function(){return this},p.join=function(e,t){return p(e).join(t)},m.prototype.join=function(e){return p([this,e]).spread(function(e,t){if(e===t)return e;throw new Error("Can't join: not the same: "+e+" "+t)})},p.race=d,m.prototype.race=function(){return this.then(p.race)},p.makePromise=m,m.prototype.toString=function(){return"[object Promise]"},m.prototype.then=function(e,t,n){function r(t){try{return"function"==typeof e?e(t):t}catch(n){return F(n)}}function a(e){if("function"==typeof t){i(e,s);try{return t(e)}catch(n){return F(n)}}return F(e)}function o(e){return"function"==typeof n?n(e):e}var s=this,u=f(),l=!1;return p.nextTick(function(){s.promiseDispatch(function(e){l||(l=!0,u.resolve(r(e)))},"when",[function(e){l||(l=!0,u.resolve(a(e)))}])}),s.promiseDispatch(void 0,"when",[void 0,function(e){var t,n=!1;try{t=o(e)}catch(r){if(n=!0,!p.onerror)throw r;p.onerror(r)}n||u.notify(t)}]),u.promise},p.tap=function(e,t){return p(e).tap(t)},m.prototype.tap=function(e){return e=p(e),this.then(function(t){return e.fcall(t).thenResolve(t)})},p.when=y,m.prototype.thenResolve=function(e){return this.then(function(){return e})},p.thenResolve=function(e,t){return p(e).thenResolve(t)},m.prototype.thenReject=function(e){return this.then(function(){throw e})},p.thenReject=function(e,t){return p(e).thenReject(t)},p.nearer=g,p.isPromise=v,p.isPromiseAlike=D,p.isPending=b,m.prototype.isPending=function(){return"pending"===this.inspect().state},p.isFulfilled=w,m.prototype.isFulfilled=function(){return"fulfilled"===this.inspect().state},p.isRejected=A,m.prototype.isRejected=function(){return"rejected"===this.inspect().state};var ae=[],oe=[],se=[],ue=!0;p.resetUnhandledRejections=x,p.getUnhandledReasons=function(){return ae.slice()},p.stopUnhandledRejectionTracking=function(){x(),ue=!1},x(),p.reject=F,p.fulfill=S,p.master=k,p.spread=j,m.prototype.spread=function(e,t){return this.all().then(function(t){return e.apply(void 0,t)},t)},p.async=B,p.spawn=I,p["return"]=_,p.promised=T,p.dispatch=P,m.prototype.dispatch=function(e,t){var n=this,r=f();return p.nextTick(function(){n.promiseDispatch(r.resolve,e,t)}),r.promise},p.get=function(e,t){return p(e).dispatch("get",[t])},m.prototype.get=function(e){return this.dispatch("get",[e])},p.set=function(e,t,n){return p(e).dispatch("set",[t,n])},m.prototype.set=function(e,t){return this.dispatch("set",[e,t])},p.del=p["delete"]=function(e,t){return p(e).dispatch("delete",[t])},m.prototype.del=m.prototype["delete"]=function(e){return this.dispatch("delete",[e])},p.mapply=p.post=function(e,t,n){return p(e).dispatch("post",[t,n])},m.prototype.mapply=m.prototype.post=function(e,t){return this.dispatch("post",[e,t])},p.send=p.mcall=p.invoke=function(e,t){return p(e).dispatch("post",[t,Q(arguments,2)])},m.prototype.send=m.prototype.mcall=m.prototype.invoke=function(e){return this.dispatch("post",[e,Q(arguments,1)])},p.fapply=function(e,t){return p(e).dispatch("apply",[void 0,t])},m.prototype.fapply=function(e){return this.dispatch("apply",[void 0,e])},p["try"]=p.fcall=function(e){return p(e).dispatch("apply",[void 0,Q(arguments,1)])},m.prototype.fcall=function(){return this.dispatch("apply",[void 0,Q(arguments)])},p.fbind=function(e){var t=p(e),n=Q(arguments,1);return function(){return t.dispatch("apply",[this,n.concat(Q(arguments))])}},m.prototype.fbind=function(){var e=this,t=Q(arguments);return function(){return e.dispatch("apply",[this,t.concat(Q(arguments))])}},p.keys=function(e){return p(e).dispatch("keys",[])},m.prototype.keys=function(){return this.dispatch("keys",[])},p.all=L,m.prototype.all=function(){return L(this)},p.any=$,m.prototype.any=function(){return $(this)},p.allResolved=c(U,"allResolved","allSettled"),m.prototype.allResolved=function(){return U(this)},p.allSettled=M,m.prototype.allSettled=function(){return this.then(function(e){return L(Z(e,function(e){function t(){return e.inspect()}return e=p(e),e.then(t,t)}))})},p.fail=p["catch"]=function(e,t){return p(e).then(void 0,t)},m.prototype.fail=m.prototype["catch"]=function(e){return this.then(void 0,e)},p.progress=R,m.prototype.progress=function(e){return this.then(void 0,void 0,e)},p.fin=p["finally"]=function(e,t){return p(e)["finally"](t)},m.prototype.fin=m.prototype["finally"]=function(e){return e=p(e),this.then(function(t){return e.fcall().then(function(){return t})},function(t){return e.fcall().then(function(){throw t})})},p.done=function(e,t,n,r){return p(e).done(t,n,r)},m.prototype.done=function(e,n,r){var a=function(e){p.nextTick(function(){if(i(e,o),!p.onerror)throw e;p.onerror(e)})},o=e||n||r?this.then(e,n,r):this;"object"==typeof t&&t&&t.domain&&(a=t.domain.bind(a)),o.then(void 0,a)},p.timeout=function(e,t,n){return p(e).timeout(t,n)},m.prototype.timeout=function(e,t){var n=f(),r=setTimeout(function(){t&&"string"!=typeof t||(t=new Error(t||"Timed out after "+e+" ms"),t.code="ETIMEDOUT"),n.reject(t)},e);return this.then(function(e){clearTimeout(r),n.resolve(e)},function(e){clearTimeout(r),n.reject(e)},n.notify),n.promise},p.delay=function(e,t){return void 0===t&&(t=e,e=void 0),p(e).delay(t)},m.prototype.delay=function(e){return this.then(function(t){var n=f();return setTimeout(function(){n.resolve(t)},e),n.promise})},p.nfapply=function(e,t){return p(e).nfapply(t); },m.prototype.nfapply=function(e){var t=f(),n=Q(e);return n.push(t.makeNodeResolver()),this.fapply(n).fail(t.reject),t.promise},p.nfcall=function(e){var t=Q(arguments,1);return p(e).nfapply(t)},m.prototype.nfcall=function(){var e=Q(arguments),t=f();return e.push(t.makeNodeResolver()),this.fapply(e).fail(t.reject),t.promise},p.nfbind=p.denodeify=function(e){var t=Q(arguments,1);return function(){var n=t.concat(Q(arguments)),r=f();return n.push(r.makeNodeResolver()),p(e).fapply(n).fail(r.reject),r.promise}},m.prototype.nfbind=m.prototype.denodeify=function(){var e=Q(arguments);return e.unshift(this),p.denodeify.apply(void 0,e)},p.nbind=function(e,t){var n=Q(arguments,2);return function(){function r(){return e.apply(t,arguments)}var i=n.concat(Q(arguments)),a=f();return i.push(a.makeNodeResolver()),p(r).fapply(i).fail(a.reject),a.promise}},m.prototype.nbind=function(){var e=Q(arguments,0);return e.unshift(this),p.nbind.apply(void 0,e)},p.nmapply=p.npost=function(e,t,n){return p(e).npost(t,n)},m.prototype.nmapply=m.prototype.npost=function(e,t){var n=Q(t||[]),r=f();return n.push(r.makeNodeResolver()),this.dispatch("post",[e,n]).fail(r.reject),r.promise},p.nsend=p.nmcall=p.ninvoke=function(e,t){var n=Q(arguments,2),r=f();return n.push(r.makeNodeResolver()),p(e).dispatch("post",[t,n]).fail(r.reject),r.promise},m.prototype.nsend=m.prototype.nmcall=m.prototype.ninvoke=function(e){var t=Q(arguments,1),n=f();return t.push(n.makeNodeResolver()),this.dispatch("post",[e,t]).fail(n.reject),n.promise},p.nodeify=N,m.prototype.nodeify=function(e){return e?void this.then(function(t){p.nextTick(function(){e(null,t)})},function(t){p.nextTick(function(){e(t)})}):this},p.noConflict=function(){throw new Error("Q.noConflict only works when Q is used as a global")};var le=l();return p})}).call(this,t("_process"))},{_process:161}],163:[function(e,t,n){t.exports=function(e,t,n){for(var r=0,i=e.length,a=3==arguments.length?n:e[r++];i>r;)a=t.call(null,a,e[r],++r,e);return a}},{}],164:[function(e,t,n){function r(){}function i(e){var t={}.toString.call(e);switch(t){case"[object File]":case"[object Blob]":case"[object FormData]":return!0;default:return!1}}function a(e){return e===Object(e)}function o(e){if(!a(e))return e;var t=[];for(var n in e)null!=e[n]&&s(t,n,e[n]);return t.join("&")}function s(e,t,n){return Array.isArray(n)?n.forEach(function(n){s(e,t,n)}):void e.push(encodeURIComponent(t)+"="+encodeURIComponent(n))}function u(e){for(var t,n,r={},i=e.split("&"),a=0,o=i.length;o>a;++a)n=i[a],t=n.split("="),r[decodeURIComponent(t[0])]=decodeURIComponent(t[1]);return r}function l(e){var t,n,r,i,a=e.split(/\r?\n/),o={};a.pop();for(var s=0,u=a.length;u>s;++s)n=a[s],t=n.indexOf(":"),r=n.slice(0,t).toLowerCase(),i=b(n.slice(t+1)),o[r]=i;return o}function c(e){return/[\/+]json\b/.test(e)}function p(e){return e.split(/ *; */).shift()}function f(e){return D(e.split(/ *; */),function(e,t){var n=t.split(/ *= */),r=n.shift(),i=n.shift();return r&&i&&(e[r]=i),e},{})}function h(e,t){t=t||{},this.req=e,this.xhr=this.req.xhr,this.text="HEAD"!=this.req.method&&(""===this.xhr.responseType||"text"===this.xhr.responseType)||"undefined"==typeof this.xhr.responseType?this.xhr.responseText:null,this.statusText=this.req.xhr.statusText,this.setStatusProperties(this.xhr.status),this.header=this.headers=l(this.xhr.getAllResponseHeaders()),this.header["content-type"]=this.xhr.getResponseHeader("content-type"),this.setHeaderProperties(this.header),this.body="HEAD"!=this.req.method?this.parseBody(this.text?this.text:this.xhr.response):null}function d(e,t){var n=this;v.call(this),this._query=this._query||[],this.method=e,this.url=t,this.header={},this._header={},this.on("end",function(){var e=null,t=null;try{t=new h(n)}catch(r){return e=new Error("Parser is unable to parse the response"),e.parse=!0,e.original=r,e.rawResponse=n.xhr&&n.xhr.responseText?n.xhr.responseText:null,n.callback(e)}if(n.emit("response",t),e)return n.callback(e,t);if(t.status>=200&&t.status<300)return n.callback(e,t);var i=new Error(t.statusText||"Unsuccessful HTTP response");i.original=e,i.response=t,i.status=t.status,n.callback(i,t)})}function m(e,t){return"function"==typeof t?new d("GET",e).end(t):1==arguments.length?new d("GET",e):new d(e,t)}function y(e,t){var n=m("DELETE",e);return t&&n.end(t),n}var g,v=e("emitter"),D=e("reduce");g="undefined"!=typeof window?window:"undefined"!=typeof self?self:this,m.getXHR=function(){if(!(!g.XMLHttpRequest||g.location&&"file:"==g.location.protocol&&g.ActiveXObject))return new XMLHttpRequest;try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(e){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(e){}return!1};var b="".trim?function(e){return e.trim()}:function(e){return e.replace(/(^\s*|\s*$)/g,"")};m.serializeObject=o,m.parseString=u,m.types={html:"text/html",json:"application/json",xml:"application/xml",urlencoded:"application/x-www-form-urlencoded",form:"application/x-www-form-urlencoded","form-data":"application/x-www-form-urlencoded"},m.serialize={"application/x-www-form-urlencoded":o,"application/json":JSON.stringify},m.parse={"application/x-www-form-urlencoded":u,"application/json":JSON.parse},h.prototype.get=function(e){return this.header[e.toLowerCase()]},h.prototype.setHeaderProperties=function(e){var t=this.header["content-type"]||"";this.type=p(t);var n=f(t);for(var r in n)this[r]=n[r]},h.prototype.parseBody=function(e){var t=m.parse[this.type];return t&&e&&(e.length||e instanceof Object)?t(e):null},h.prototype.setStatusProperties=function(e){1223===e&&(e=204);var t=e/100|0;this.status=this.statusCode=e,this.statusType=t,this.info=1==t,this.ok=2==t,this.clientError=4==t,this.serverError=5==t,this.error=4==t||5==t?this.toError():!1,this.accepted=202==e,this.noContent=204==e,this.badRequest=400==e,this.unauthorized=401==e,this.notAcceptable=406==e,this.notFound=404==e,this.forbidden=403==e},h.prototype.toError=function(){var e=this.req,t=e.method,n=e.url,r="cannot "+t+" "+n+" ("+this.status+")",i=new Error(r);return i.status=this.status,i.method=t,i.url=n,i},m.Response=h,v(d.prototype),d.prototype.use=function(e){return e(this),this},d.prototype.timeout=function(e){return this._timeout=e,this},d.prototype.clearTimeout=function(){return this._timeout=0,clearTimeout(this._timer),this},d.prototype.abort=function(){return this.aborted?void 0:(this.aborted=!0,this.xhr.abort(),this.clearTimeout(),this.emit("abort"),this)},d.prototype.set=function(e,t){if(a(e)){for(var n in e)this.set(n,e[n]);return this}return this._header[e.toLowerCase()]=t,this.header[e]=t,this},d.prototype.unset=function(e){return delete this._header[e.toLowerCase()],delete this.header[e],this},d.prototype.getHeader=function(e){return this._header[e.toLowerCase()]},d.prototype.type=function(e){return this.set("Content-Type",m.types[e]||e),this},d.prototype.parse=function(e){return this._parser=e,this},d.prototype.accept=function(e){return this.set("Accept",m.types[e]||e),this},d.prototype.auth=function(e,t){var n=btoa(e+":"+t);return this.set("Authorization","Basic "+n),this},d.prototype.query=function(e){return"string"!=typeof e&&(e=o(e)),e&&this._query.push(e),this},d.prototype.field=function(e,t){return this._formData||(this._formData=new g.FormData),this._formData.append(e,t),this},d.prototype.attach=function(e,t,n){return this._formData||(this._formData=new g.FormData),this._formData.append(e,t,n),this},d.prototype.send=function(e){var t=a(e),n=this.getHeader("Content-Type");if(t&&a(this._data))for(var r in e)this._data[r]=e[r];else"string"==typeof e?(n||this.type("form"),n=this.getHeader("Content-Type"),"application/x-www-form-urlencoded"==n?this._data=this._data?this._data+"&"+e:e:this._data=(this._data||"")+e):this._data=e;return!t||i(e)?this:(n||this.type("json"),this)},d.prototype.callback=function(e,t){var n=this._callback;this.clearTimeout(),n(e,t)},d.prototype.crossDomainError=function(){var e=new Error("Request has been terminated\nPossible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.");e.crossDomain=!0,e.status=this.status,e.method=this.method,e.url=this.url,this.callback(e)},d.prototype.timeoutError=function(){var e=this._timeout,t=new Error("timeout of "+e+"ms exceeded");t.timeout=e,this.callback(t)},d.prototype.withCredentials=function(){return this._withCredentials=!0,this},d.prototype.end=function(e){var t=this,n=this.xhr=m.getXHR(),a=this._query.join("&"),o=this._timeout,s=this._formData||this._data;this._callback=e||r,n.onreadystatechange=function(){if(4==n.readyState){var e;try{e=n.status}catch(r){e=0}if(0==e){if(t.timedout)return t.timeoutError();if(t.aborted)return;return t.crossDomainError()}t.emit("end")}};var u=function(e){e.total>0&&(e.percent=e.loaded/e.total*100),t.emit("progress",e)};this.hasListeners("progress")&&(n.onprogress=u);try{n.upload&&this.hasListeners("progress")&&(n.upload.onprogress=u)}catch(l){}if(o&&!this._timer&&(this._timer=setTimeout(function(){t.timedout=!0,t.abort()},o)),a&&(a=m.serializeObject(a),this.url+=~this.url.indexOf("?")?"&"+a:"?"+a),n.open(this.method,this.url,!0),this._withCredentials&&(n.withCredentials=!0),"GET"!=this.method&&"HEAD"!=this.method&&"string"!=typeof s&&!i(s)){var p=this.getHeader("Content-Type"),f=this._parser||m.serialize[p?p.split(";")[0]:""];!f&&c(p)&&(f=m.serialize["application/json"]),f&&(s=f(s))}for(var h in this.header)null!=this.header[h]&&n.setRequestHeader(h,this.header[h]);return this.emit("request",this),n.send("undefined"!=typeof s?s:null),this},d.prototype.then=function(e,t){return this.end(function(n,r){n?t(n):e(r)})},m.Request=d,m.get=function(e,t,n){var r=m("GET",e);return"function"==typeof t&&(n=t,t=null),t&&r.query(t),n&&r.end(n),r},m.head=function(e,t,n){var r=m("HEAD",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},m.del=y,m["delete"]=y,m.patch=function(e,t,n){var r=m("PATCH",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},m.post=function(e,t,n){var r=m("POST",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},m.put=function(e,t,n){var r=m("PUT",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},t.exports=m},{emitter:16,reduce:163}]},{},[1])(1)}),window.SwaggerUi=Backbone.Router.extend({dom_id:"swagger_ui",options:null,api:null,headerView:null,mainView:null,initialize:function(e){e=e||{},"model"!==e.defaultModelRendering&&(e.defaultModelRendering="schema"),e.highlightSizeThreshold||(e.highlightSizeThreshold=1e5),e.dom_id&&(this.dom_id=e.dom_id,delete e.dom_id),e.supportedSubmitMethods||(e.supportedSubmitMethods=["get","put","post","delete","head","options","patch"]),"string"==typeof e.oauth2RedirectUrl&&(window.oAuthRedirectUrl=e.redirectUrl),$("#"+this.dom_id).length||$("body").append('
'),this.options=e,marked.setOptions({gfm:!0});var t=this;this.options.success=function(){return t.render()},this.options.progress=function(e){return t.showMessage(e)},this.options.failure=function(e){return t.onLoadFailure(e)},this.headerView=new SwaggerUi.Views.HeaderView({el:$("#header")}),this.headerView.on("update-swagger-ui",function(e){return t.updateSwaggerUi(e)}),JSONEditor.defaults.iconlibs.swagger=JSONEditor.AbstractIconLib.extend({mapping:{collapse:"collapse",expand:"expand"},icon_prefix:"swagger-"})},setOption:function(e,t){this.options[e]=t},getOption:function(e){return this.options[e]},updateSwaggerUi:function(e){this.options.url=e.url,this.load()},load:function(){this.mainView&&this.mainView.clear();var e=this.options.url;e&&0!==e.indexOf("http")&&(e=this.buildUrl(window.location.href.toString(),e)),this.api&&(this.options.authorizations=this.api.clientAuthorizations.authz),this.options.url=e,this.headerView.update(e),this.api=new SwaggerClient(this.options)},collapseAll:function(){Docs.collapseEndpointListForResource("")},listAll:function(){Docs.collapseOperationsForResource("")},expandAll:function(){Docs.expandOperationsForResource("")},render:function(){switch(this.showMessage("Finished Loading Resource Information. Rendering Swagger UI..."),this.mainView=new SwaggerUi.Views.MainView({model:this.api,el:$("#"+this.dom_id),swaggerOptions:this.options,router:this}).render(),this.showMessage(),this.options.docExpansion){case"full":this.expandAll();break;case"list":this.listAll()}this.renderGFM(),this.options.onComplete&&this.options.onComplete(this.api,this),setTimeout(Docs.shebang.bind(this),100)},buildUrl:function(e,t){if(0===t.indexOf("/")){var n=e.split("/");return e=n[0]+"//"+n[2],e+t}var r=e.length;return e.indexOf("?")>-1&&(r=Math.min(r,e.indexOf("?"))),e.indexOf("#")>-1&&(r=Math.min(r,e.indexOf("#"))),e=e.substring(0,r),-1!==e.indexOf("/",e.length-1)?e+t:e+"/"+t},showMessage:function(e){void 0===e&&(e="");var t=$("#message-bar");t.removeClass("message-fail"),t.addClass("message-success"),t.text(e),window.SwaggerTranslator&&window.SwaggerTranslator.translate(t)},onLoadFailure:function(e){void 0===e&&(e=""),$("#message-bar").removeClass("message-success"),$("#message-bar").addClass("message-fail");var t=$("#message-bar").text(e);return this.options.onFailure&&this.options.onFailure(e),t},renderGFM:function(){$(".markdown").each(function(){$(this).html(marked($(this).html()))}),$(".propDesc",".model-signature .description").each(function(){$(this).html(marked($(this).html())).addClass("markdown")})}}),window.SwaggerUi.Views={},window.SwaggerUi.partials={},function(){function e(e){"console"in window&&"function"==typeof window.console.warn&&console.warn(e)}window.authorizations={add:function(){if(e("Using window.authorizations is deprecated. Please use SwaggerUi.api.clientAuthorizations.add()."),"undefined"==typeof window.swaggerUi)throw new TypeError("window.swaggerUi is not defined");window.swaggerUi instanceof SwaggerUi&&window.swaggerUi.api.clientAuthorizations.add.apply(window.swaggerUi.api.clientAuthorizations,arguments)}},window.ApiKeyAuthorization=function(){e("window.ApiKeyAuthorization is deprecated. Please use SwaggerClient.ApiKeyAuthorization."),SwaggerClient.ApiKeyAuthorization.apply(window,arguments)},window.PasswordAuthorization=function(){e("window.PasswordAuthorization is deprecated. Please use SwaggerClient.PasswordAuthorization."),SwaggerClient.PasswordAuthorization.apply(window,arguments)}}(),function(e,t){"function"==typeof define&&define.amd?define(["b"],function(n){return e.SwaggerUi=t(n)}):"object"==typeof exports?module.exports=t(require("b")):e.SwaggerUi=t(e.b)}(this,function(){return SwaggerUi}),SwaggerUi.Views.ApiKeyButton=Backbone.View.extend({events:{"click #apikey_button":"toggleApiKeyContainer","click #apply_api_key":"applyApiKey"},initialize:function(e){this.options=e||{},this.router=this.options.router},render:function(){var e=this.template();return $(this.el).html(e(this.model)),this},applyApiKey:function(){var e=new SwaggerClient.ApiKeyAuthorization(this.model.name,$("#input_apiKey_entry").val(),this.model["in"]);this.router.api.clientAuthorizations.add(this.model.name,e),this.router.load(),$("#apikey_container").show()},toggleApiKeyContainer:function(){if($("#apikey_container").length){var e=$("#apikey_container").first();e.is(":visible")?e.hide():($(".auth_container").hide(),e.show())}},template:function(){return Handlebars.templates.apikey_button_view}}),SwaggerUi.Views.BasicAuthButton=Backbone.View.extend({initialize:function(e){this.options=e||{},this.router=this.options.router},render:function(){var e=this.template();return $(this.el).html(e(this.model)),this},events:{"click #basic_auth_button":"togglePasswordContainer","click #apply_basic_auth":"applyPassword"},applyPassword:function(e){e.preventDefault();var t=$("#input_username").val(),n=$("#input_password").val(),r=new SwaggerClient.PasswordAuthorization("basic",t,n);this.router.api.clientAuthorizations.add(this.model.type,r),this.router.load(),$("#basic_auth_container").hide()},togglePasswordContainer:function(){if($("#basic_auth_container").length){var e=$("#basic_auth_container").show();e.is(":visible")?e.slideUp():($(".auth_container").hide(),e.show())}},template:function(){return Handlebars.templates.basic_auth_button_view}}),SwaggerUi.Views.ContentTypeView=Backbone.View.extend({initialize:function(){},render:function(){return this.model.contentTypeId="ct"+Math.random(),$(this.el).html(Handlebars.templates.content_type(this.model)),this}}),SwaggerUi.Views.HeaderView=Backbone.View.extend({events:{"click #show-pet-store-icon":"showPetStore","click #explore":"showCustom","keyup #input_baseUrl":"showCustomOnKeyup","keyup #input_apiKey":"showCustomOnKeyup"},initialize:function(){},showPetStore:function(){this.trigger("update-swagger-ui",{url:"http://petstore.swagger.io/v2/swagger.json"})},showCustomOnKeyup:function(e){13===e.keyCode&&this.showCustom()},showCustom:function(e){e&&e.preventDefault(),this.trigger("update-swagger-ui",{url:$("#input_baseUrl").val(),apiKey:$("#input_apiKey").val()})},update:function(e,t,n){void 0===n&&(n=!1),$("#input_baseUrl").val(e),n&&this.trigger("update-swagger-ui",{url:e})}}),SwaggerUi.Views.MainView=Backbone.View.extend({apisSorter:{alpha:function(e,t){return e.name.localeCompare(t.name)}},operationsSorters:{alpha:function(e,t){return e.path.localeCompare(t.path)},method:function(e,t){return e.method.localeCompare(t.method)}},initialize:function(e){var t,n,r,i;if(e=e||{},this.router=e.router,e.swaggerOptions.apisSorter&&(t=e.swaggerOptions.apisSorter,n=_.isFunction(t)?t:this.apisSorter[t],_.isFunction(n)&&this.model.apisArray.sort(n)),e.swaggerOptions.operationsSorter&&(t=e.swaggerOptions.operationsSorter,n=_.isFunction(t)?t:this.operationsSorters[t],_.isFunction(n)))for(r in this.model.apisArray)this.model.apisArray[r].operationsArray.sort(n);this.model.auths=[];for(r in this.model.securityDefinitions)i=this.model.securityDefinitions[r],this.model.auths.push({name:r,type:i.type,value:i});"validatorUrl"in e.swaggerOptions?this.model.validatorUrl=e.swaggerOptions.validatorUrl:this.model.url.indexOf("localhost")>0?this.model.validatorUrl=null:"https:"===window.location.protocol?this.model.validatorUrl="https://online.swagger.io/validator":this.model.validatorUrl="http://online.swagger.io/validator";var a;for(a in this.model.definitions)this.model.definitions[a].type||(this.model.definitions[a].type="object")},render:function(){if(this.model.securityDefinitions)for(var e in this.model.securityDefinitions){var t,n=this.model.securityDefinitions[e];"apiKey"===n.type&&0===$("#apikey_button").length&&(t=new SwaggerUi.Views.ApiKeyButton({model:n,router:this.router}).render().el,$(".auth_main_container").append(t)),"basicAuth"===n.type&&0===$("#basic_auth_button").length&&(t=new SwaggerUi.Views.BasicAuthButton({model:n,router:this.router}).render().el,$(".auth_main_container").append(t))}$(this.el).html(Handlebars.templates.main(this.model));for(var r={},i=0,a=0;ao&&(n=o-u),i>n&&(n=i),r+l>s&&(r=s-l),a>r&&(r=a);var c={};c.top=r,c.left=n,t.css(c)},render:function(){var e,t,n,r,i,a,o,s,u,l,c,p,f,h,d,m,y,g,v,D,b,w,A,x,C,E,F,S,O,k,j,B,I,_,T,P,L,U;if(a=jQuery.inArray(this.model.method,this.model.supportedSubmitMethods())>=0,a||(this.model.isReadOnly=!0),this.model.description=this.model.description||this.model.notes,this.model.oauth=null,m=this.model.authorizations||this.model.security)if(Array.isArray(m))for(u=0,l=m.length;l>u;u++){n=m[u];for(s in n)for(e in this.auths)if(t=this.auths[e],s===t.name&&"oauth2"===t.type){this.model.oauth={},this.model.oauth.scopes=[],A=t.value.scopes;for(o in A)L=A[o],B=n[s].indexOf(o),B>=0&&(g={scope:o,description:L},this.model.oauth.scopes.push(g))}}else for(o in m)if(L=m[o],"oauth2"===o)for(null===this.model.oauth&&(this.model.oauth={}),void 0===this.model.oauth.scopes&&(this.model.oauth.scopes=[]),d=0,c=L.length;c>d;d++)g=L[d],this.model.oauth.scopes.push(g);if("undefined"!=typeof this.model.responses){this.model.responseMessages=[],x=this.model.responses;for(r in x)U=x[r],k=null,j=this.model.responses[r].schema,j&&j.$ref&&(k=j.$ref,-1!==k.indexOf("#/definitions/")&&(k=k.replace(/^.*#\/definitions\//,""))),this.model.responseMessages.push({code:r,message:U.description,responseModel:k,headers:U.headers})}if("undefined"==typeof this.model.responseMessages&&(this.model.responseMessages=[]),I=null,this.model.successResponse){T=this.model.successResponse;for(s in T)U=T[s],this.model.successCode=s,"object"==typeof U&&"function"==typeof U.createJSONSample&&(this.model.successDescription=U.description,this.model.headers=this.parseResponseHeaders(U.headers),I={sampleJSON:JSON.stringify(SwaggerUi.partials.signature.createJSONSample(U),void 0,2),isParam:!1,signature:SwaggerUi.partials.signature.getModelSignature(U.name,U.definition,U.models,U.modelPropertyMacro)})}else this.model.responseClassSignature&&"string"!==this.model.responseClassSignature&&(I={sampleJSON:this.model.responseSampleJSON,isParam:!1,signature:this.model.responseClassSignature});for($(this.el).html(Handlebars.templates.operation(this.model)),I?(I.defaultRendering=this.model.defaultRendering,O=new SwaggerUi.Views.SignatureView({model:I,router:this.router,tagName:"div"}),$(".model-signature",$(this.el)).append(O.render().el)):(this.model.responseClassSignature="string",$(".model-signature",$(this.el)).html(this.model.type)),i={isParam:!1},i.consumes=this.model.consumes,i.produces=this.model.produces,C=this.model.parameters,y=0,p=C.length;p>y;y++)D=C[y],P=D.type||D.dataType||"","undefined"==typeof P&&(k=D.schema,k&&k.$ref&&(w=k.$ref,P=0===w.indexOf("#/definitions/")?w.substring("#/definitions/".length):w)),P&&"file"===P.toLowerCase()&&(i.consumes||(i.consumes="multipart/form-data")),D.type=P;for(S=new SwaggerUi.Views.ResponseContentTypeView({model:i,router:this.router}),$(".response-content-type",$(this.el)).append(S.render().el),E=this.model.parameters,v=0,f=E.length;f>v;v++)D=E[v],this.addParameter(D,i.consumes);for(F=this.model.responseMessages,b=0,h=F.length;h>b;b++)_=F[b],this.addStatusCode(_);return this},parseResponseHeaders:function(e){var t="; ",n=_.clone(e);return _.forEach(n,function(e){var n=[];_.forEach(e,function(e,t){var r=["type","description"];-1===r.indexOf(t.toLowerCase())&&n.push(t+": "+e)}),n.join(t),e.other=n}),n},addParameter:function(e,t){e.consumes=t,e.defaultRendering=this.model.defaultRendering,e.schema&&($.extend(!0,e.schema,this.model.definitions[e.type]),e.schema.definitions=this.model.definitions,e.schema.type||(e.schema.type="object"),e.schema.title||(e.schema.title=" "));var n=new SwaggerUi.Views.ParameterView({model:e,tagName:"tr",readOnly:this.model.isReadOnly,swaggerOptions:this.options.swaggerOptions});$(".operation-params",$(this.el)).append(n.render().el)},addStatusCode:function(e){e.defaultRendering=this.model.defaultRendering;var t=new SwaggerUi.Views.StatusCodeView({model:e,tagName:"tr",router:this.router});$(".operation-status",$(this.el)).append(t.render().el)},submitOperation:function(e){var t,n,r,i,a;if(null!==e&&e.preventDefault(),n=$(".sandbox",$(this.el)),t=!0,n.find("input.required").each(function(){$(this).removeClass("error"),""===jQuery.trim($(this).val())&&($(this).addClass("error"),$(this).wiggle({callback:function(e){return function(){$(e).focus()}}(this)}),t=!1)}),n.find("textarea.required:visible").each(function(){$(this).removeClass("error"),""===jQuery.trim($(this).val())&&($(this).addClass("error"),$(this).wiggle({callback:function(e){return function(){return $(e).focus()}}(this)}),t=!1)}),n.find("select.required").each(function(){$(this).removeClass("error"),-1===this.selectedIndex&&($(this).addClass("error"),$(this).wiggle({callback:function(e){return function(){$(e).focus()}}(this)}),t=!1)}),t){if(i=this.getInputMap(n),r=this.isFileUpload(n),a={parent:this},this.options.swaggerOptions)for(var o in this.options.swaggerOptions)a[o]=this.options.swaggerOptions[o];var s;for(s=0;s"),$(".request_url pre",$(this.el)).text(this.invocationUrl),a.useJQuery=!0,i.parameterContentType="multipart/form-data",this.map=i,this.model.execute(i,a,this.showCompleteStatus,this.showErrorStatus,this)):(this.map=i,this.model.execute(i,a,this.showCompleteStatus,this.showErrorStatus,this))}},getInputMap:function(e){var t,n,r,i,a,o,s,u,l,c,p,f;for(t={},n=e.find("input"),r=0,i=n.length;i>r;r++)a=n[r],null!==a.value&&jQuery.trim(a.value).length>0&&(t[a.name]=a.value),"file"===a.type&&(t[a.name]=a.files[0]);for(o=e.find("textarea"),s=0,u=o.length;u>s;s++)a=o[s],l=this.getTextAreaValue(a),null!==l&&jQuery.trim(l).length>0&&(t[a.name]=l);for(c=e.find("select"),p=0,f=c.length;f>p;p++)a=c[p],l=this.getSelectedValue(a),null!==l&&jQuery.trim(l).length>0&&(t[a.name]=l);return t},isFileUpload:function(e){var t,n,r,i,a=!1;for(t=e.find("input"),n=0,r=t.length;r>n;n++)i=t[n],"file"===i.type&&(a=!0);return a},success:function(e,t){t.showCompleteStatus(e)},wrap:function(e){var t,n,r,i,a,o,s;for(r={},n=e.getAllResponseHeaders().split("\r"),a=0,o=n.length;o>a;a++)i=n[a],t=i.match(/^([^:]*?):(.*)$/),t||(t=[]),t.shift(),void 0!==t[0]&&void 0!==t[1]&&(r[t[0].trim()]=t[1].trim());return s={},s.content={},s.content.data=e.responseText,s.headers=r,s.request={},s.request.url=this.invocationUrl,s.status=e.status,s},getSelectedValue:function(e){if(e.multiple){for(var t=[],n=0,r=e.options.length;r>n;n++){var i=e.options[n];i.selected&&t.push(i.value)}return t.length>0?t:null}return e.value},hideResponse:function(e){e&&e.preventDefault(),$(".response",$(this.el)).slideUp(),$(".response_hider",$(this.el)).fadeOut()},showResponse:function(e){var t=JSON.stringify(e,null," ").replace(/\n/g,"
");$(".response_body",$(this.el)).html(_.escape(t))},showErrorStatus:function(e,t){t.showStatus(e)},showCompleteStatus:function(e,t){t.showStatus(e)},formatXml:function(e){var t,n,r,i,a,o,s,u,l,c,p,f,h;for(p=/(>)(<)(\/*)/g,h=/[ ]*(.*)[ ]+\n/g,t=/(<.+>)(.+\n)/g,e=e.replace(p,"$1\n$2$3").replace(h,"$1\n").replace(t,"$1\n$2"),c=0,r="",u=e.split("\n"),i=0,o="other",f={"single->single":0,"single->closing":-1,"single->opening":0,"single->other":0,"closing->single":0,"closing->closing":-1,"closing->opening":0,"closing->other":0,"opening->single":1,"opening->closing":0,"opening->opening":1,"opening->other":1,"other->single":0,"other->closing":-1,"other->opening":0,"other->other":0},n=function(e){var t,n,a,s,u,l,c;l={single:Boolean(e.match(/<.+\/>/)),closing:Boolean(e.match(/<\/.+>/)),opening:Boolean(e.match(/<[^!?].*>/))},u=function(){var e;e=[];for(a in l)c=l[a],c&&e.push(a);return e}()[0],u=void 0===u?"other":u,t=o+"->"+u,o=u,s="",i+=f[t],s=function(){var e,t,r;for(r=[],n=e=0,t=i;t>=0?t>e:e>t;n=t>=0?++e:--e)r.push(" ");return r}().join(""),"opening->closing"===t?r=r.substr(0,r.length-1)+e+"\n":r+=s+e+"\n"},a=0,s=u.length;s>a;a++)l=u[a],n(l);return r},showStatus:function(e){var t,n;void 0===e.content?(n=e.data,t=e.url):(n=e.content.data,t=e.request.url);var r=e.headers;n=jQuery.trim(n);var i=null;r&&(i=r["Content-Type"]||r["content-type"],i&&(i=i.split(";")[0].trim())),$(".response_body",$(this.el)).removeClass("json"),$(".response_body",$(this.el)).removeClass("xml");var a,o,s=function(e){var t=document.createElement("audio");return!(!t.canPlayType||!t.canPlayType(e).replace(/no/,""))};if(n)if("application/json"===i||/\+json$/.test(i)){var u=null;try{u=JSON.stringify(JSON.parse(n),null," ")}catch(l){u="can't parse JSON. Raw result:\n\n"+n}o=$("").text(u),a=$('
').append(o)}else if("application/xml"===i||/\+xml$/.test(i))o=$("").text(this.formatXml(n)),a=$('
').append(o);else if("text/html"===i)o=$("").html(_.escape(n)),a=$('
').append(o);else if(/text\/plain/.test(i))o=$("").text(n),a=$('
').append(o);else if(/^image\//.test(i))a=$("").attr("src",t);else if(/^audio\//.test(i)&&s(i))a=$("