All Downloads are FREE. Search and download functionalities are using the official Maven repository.

swagger-ui.webjars.js.chunk-0c58d94d.9b786ed9.js Maven / Gradle / Ivy

There is a newer version: 3.0.0
Show newest version
/*! For license information please see chunk-0c58d94d.9b786ed9.js.LICENSE.txt */
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-0c58d94d"],{1148:function(e,t,a){"use strict";var r=a("a691"),n=a("1d80");e.exports="".repeat||function(e){var t=String(n(this)),a="",i=r(e);if(i<0||i==1/0)throw RangeError("Wrong number of repetitions");for(;i>0;(i>>>=1)&&(t+=t))1&i&&(a+=t);return a}},"408a":function(e,t,a){var r=a("c6b6");e.exports=function(e){if("number"!=typeof e&&"Number"!=r(e))throw TypeError("Incorrect invocation");return+e}},4127:function(e,t,a){"use strict";var r=a("d233"),n=a("b313"),i=Object.prototype.hasOwnProperty,o={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},s=Array.isArray,l=Array.prototype.push,u=function(e,t){l.apply(e,s(t)?t:[t])},c=Date.prototype.toISOString,d=n.default,h={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:r.encode,encodeValuesOnly:!1,format:d,formatter:n.formatters[d],indices:!1,serializeDate:function(e){return c.call(e)},skipNulls:!1,strictNullHandling:!1},f=function e(t,a,n,i,o,l,c,d,f,p,m,g,w){var b=t;if("function"==typeof c?b=c(a,b):b instanceof Date?b=p(b):"comma"===n&&s(b)&&(b=r.maybeMap(b,(function(e){return e instanceof Date?p(e):e})).join(",")),null===b){if(i)return l&&!g?l(a,h.encoder,w,"key"):a;b=""}if(function(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e||"symbol"==typeof e||"bigint"==typeof e}(b)||r.isBuffer(b))return l?[m(g?a:l(a,h.encoder,w,"key"))+"="+m(l(b,h.encoder,w,"value"))]:[m(a)+"="+m(String(b))];var y,v=[];if(void 0===b)return v;if(s(c))y=c;else{var F=Object.keys(b);y=d?F.sort(d):F}for(var C=0;C0?g+m:""}},4328:function(e,t,a){"use strict";var r=a("4127"),n=a("9e6a"),i=a("b313");e.exports={formats:i,parse:n,stringify:r}},7444:function(e,t,a){"use strict";a.r(t);var r=(a("99af"),a("4de4"),a("4160"),a("caad"),a("c975"),a("a15b"),a("b0c0"),a("b680"),a("b64b"),a("d3b7"),a("4d63"),a("ac1f"),a("25f0"),a("3ca3"),a("5319"),a("1276"),a("159b"),a("ddb0"),a("2b3d"),a("5530")),n=(a("8237"),a("4328")),i=a.n(n),o=a("b1c7"),s=a("1469"),l=a("5609"),u=function(e){var t=this;this.groupid=e.groupid||"afterScriptGroup",this.allgroupids=e.allgroupids||[],this.response=e.response||{data:{},headers:{}},this.global={setHeader:function(e,a){t.global.setCommon(e,a,"header",!1)},setAllHeader:function(e,a){t.global.setCommon(e,a,"header",!0)},setParameter:function(e,a){t.global.setCommon(e,a,"query",!1)},setAllParameter:function(e,a){t.global.setCommon(e,a,"query",!0)},setCommon:function(e,a,r,n){var i=t.groupid,u=e+r;if(n){var c=t.allgroupids;s.a.getItem(l.a.globalParameter).then((function(t){if(o.a.checkUndefined(t)){var n={};c.forEach((function(i){var s=t[i];o.a.checkUndefined(s)||o.a.arrEmpty(s)?((s=[]).push({name:e,value:a,in:r,pkid:u}),n[i]=s):(0==s.filter((function(e){return e.pkid==u&&e.in==r})).length?s.push({name:e,value:a,in:r,pkid:u}):s.forEach((function(e){e.in==r&&e.pkid==u&&(e.value=a)})),n[i]=s)})),s.a.setItem(l.a.globalParameter,n)}else{var i=[];i.push({name:e,value:a,in:r,pkid:u});var d={};c.forEach((function(e){d[e]=i})),s.a.setItem(l.a.globalParameter,d)}}))}else s.a.getItem(l.a.globalParameter).then((function(t){var n=[],c={};if(o.a.checkUndefined(t)){for(var d in t)d==i?n=t[d]:c[d]=t[d];0==n.filter((function(e){return e.pkid==u&&e.in==r})).length?n.push({name:e,value:a,in:r,pkid:u}):n.forEach((function(e){e.in==r&&e.pkid==u&&(e.value=a)})),c[i]=n,s.a.setItem(l.a.globalParameter,c)}else n.push({name:e,value:a,in:r,pkid:u});c[i]=n,s.a.setItem(l.a.globalParameter,c)}))}}},c=a("bc3a"),d=a.n(c),h=(a("fb6a"),a("841c"),a("53ca"));function f(e){var t="    ";if(isNaN(parseInt(e)))t=e;else switch(e){case 1:t=" ";break;case 2:t="  ";break;case 3:t="   ";break;case 4:t="    ";break;case 5:t="     ";break;case 6:t="      ";break;case 7:t="       ";break;case 8:t="        ";break;case 9:t="         ";break;case 10:t="          ";break;case 11:t="           ";break;case 12:t="            "}for(var a=["\n"],r=0;r<100;r++)a.push(a[r]+t);return a}function p(){this.step="    ",this.shift=f(this.step)}function m(e,t){return t-(e.replace(/\(/g,"").length-e.replace(/\)/g,"").length)}function g(e,t){return e.replace(/\s{1,}/g," ").replace(/ AND /gi,"~::~"+t+t+"AND ").replace(/ BETWEEN /gi,"~::~"+t+"BETWEEN ").replace(/ CASE /gi,"~::~"+t+"CASE ").replace(/ ELSE /gi,"~::~"+t+"ELSE ").replace(/ END /gi,"~::~"+t+"END ").replace(/ FROM /gi,"~::~FROM ").replace(/ GROUP\s{1,}BY/gi,"~::~GROUP BY ").replace(/ HAVING /gi,"~::~HAVING ").replace(/ IN /gi," IN ").replace(/ JOIN /gi,"~::~JOIN ").replace(/ CROSS~::~{1,}JOIN /gi,"~::~CROSS JOIN ").replace(/ INNER~::~{1,}JOIN /gi,"~::~INNER JOIN ").replace(/ LEFT~::~{1,}JOIN /gi,"~::~LEFT JOIN ").replace(/ RIGHT~::~{1,}JOIN /gi,"~::~RIGHT JOIN ").replace(/ ON /gi,"~::~"+t+"ON ").replace(/ OR /gi,"~::~"+t+t+"OR ").replace(/ ORDER\s{1,}BY/gi,"~::~ORDER BY ").replace(/ OVER /gi,"~::~"+t+"OVER ").replace(/\(\s{0,}SELECT /gi,"~::~(SELECT ").replace(/\)\s{0,}SELECT /gi,")~::~SELECT ").replace(/ THEN /gi," THEN~::~"+t).replace(/ UNION /gi,"~::~UNION~::~").replace(/ USING /gi,"~::~USING ").replace(/ WHEN /gi,"~::~"+t+"WHEN ").replace(/ WHERE /gi,"~::~WHERE ").replace(/ WITH /gi,"~::~WITH ").replace(/ ALL /gi," ALL ").replace(/ AS /gi," AS ").replace(/ ASC /gi," ASC ").replace(/ DESC /gi," DESC ").replace(/ DISTINCT /gi," DISTINCT ").replace(/ EXISTS /gi," EXISTS ").replace(/ NOT /gi," NOT ").replace(/ NULL /gi," NULL ").replace(/ LIKE /gi," LIKE ").replace(/\s{0,}SELECT /gi,"SELECT ").replace(/\s{0,}UPDATE /gi,"UPDATE ").replace(/ SET /gi," SET ").replace(/~::~{1,}/g,"~::~").split("~::~")}p.prototype.xml=function(e,t){var a=e.replace(/>\s{0,}<").replace(/-1?(o+=l[i]+a[s],n=!0,(a[s].search(/-->/)>-1||a[s].search(/\]>/)>-1||a[s].search(/!DOCTYPE/)>-1)&&(n=!1)):a[s].search(/-->/)>-1||a[s].search(/\]>/)>-1?(o+=a[s],n=!1):/^<\w/.exec(a[s-1])&&/^<\/\w/.exec(a[s])&&/^<[\w:\-\.\,]+/.exec(a[s-1])==/^<\/[\w:\-\.\,]+/.exec(a[s])[0].replace("/","")?(o+=a[s],n||i--):a[s].search(/<\w/)>-1&&-1==a[s].search(/<\//)&&-1==a[s].search(/\/>/)?o=o+=n?a[s]:l[i++]+a[s]:a[s].search(/<\w/)>-1&&a[s].search(/<\//)>-1?o=o+=n?a[s]:l[i]+a[s]:a[s].search(/<\//)>-1?o=o+=n?a[s]:l[--i]+a[s]:a[s].search(/\/>/)>-1?o=o+=n?a[s]:l[i]+a[s]:a[s].search(/<\?/)>-1||a[s].search(/xmlns\:/)>-1||a[s].search(/xmlns\=/)>-1?o+=l[i]+a[s]:o+=a[s];return"\n"==o[0]?o.slice(1):o},p.prototype.json=function(e,t){return t=t||this.step,"undefined"==typeof JSON?e:"string"==typeof e?JSON.stringify(JSON.parse(e),null,t):"object"===Object(h.a)(e)?JSON.stringify(e,null,t):e},p.prototype.css=function(e,t){var a=e.replace(/\s{1,}/g," ").replace(/\{/g,"{~::~").replace(/\}/g,"~::~}~::~").replace(/\;/g,";~::~").replace(/\/\*/g,"~::~/*").replace(/\*\//g,"*/~::~").replace(/~::~\s{0,}~::~/g,"~::~").split("~::~"),r=a.length,n=0,i="",o=0,s=t?f(t):this.shift;for(o=0;o/g,"").replace(/[ \r\n\t]{1,}xmlns/g," xmlns")).replace(/>\s{0,}<")},p.prototype.jsonmin=function(e){return"undefined"==typeof JSON?e:JSON.stringify(JSON.parse(e),null,0)},p.prototype.cssmin=function(e,t){return(t?e:e.replace(/\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+\//g,"")).replace(/\s{1,}/g," ").replace(/\{\s{1,}/g,"{").replace(/\}\s{1,}/g,"}").replace(/\;\s{1,}/g,";").replace(/\/\*\s{1,}/g,"/*").replace(/\*\/\s{1,}/g,"*/")},p.prototype.sqlmin=function(e){return e.replace(/\s{1,}/g," ").replace(/\s{1,}\(/,"(").replace(/\s{1,}\)/,")")};var w=p,b={name:"Debug",components:{EditorScript:function(){return Promise.all([a.e("chunk-3b888a65"),a.e("chunk-0fd67716"),a.e("chunk-2d22269d")]).then(a.bind(null,"cf04"))},EditorDebugShow:function(){return Promise.all([a.e("chunk-3b888a65"),a.e("chunk-0fd67716"),a.e("chunk-214218f0"),a.e("chunk-735c675c")]).then(a.bind(null,"b3ee"))},DebugResponse:function(){return a.e("chunk-589faee0").then(a.bind(null,"3c60"))}},props:{api:{type:Object,required:!0},swaggerInstance:{type:Object,required:!0}},data:function(){var e=this;return{i18n:null,enableRequestCache:!1,enableDynamicParameter:!1,enableHost:!1,enableHostText:"",authorizeQueryParameters:[],headerColumn:[],formColumn:[],urlFormColumn:[],allowClear:!0,pagination:!1,headerAutoOptions:l.a.debugRequestHeaders,headerOptions:l.a.debugRequestHeaderOptions,headerCount:0,headerCountFlag:!1,headerSelectName:"",selectedRowKeys:[],requestParameterAllow:!0,rowSelection:{selectedRowKeys:[],onChange:function(t,a){e.rowSelection.selectedRowKeys=t}},rowFormSelection:{selectedRowKeys:[],onChange:function(t,a){e.rowFormSelection.selectedRowKeys=t}},rowRawFormSelection:{selectedRowKeys:[],onChange:function(t,a){e.rowRawFormSelection.selectedRowKeys=t}},rowUrlFormSelection:{selectedRowKeys:[],onChange:function(t,a){e.rowUrlFormSelection.selectedRowKeys=t}},headerData:[],headerTableFlag:!0,globalParameters:[],debugUrl:"",debugPathFlag:!1,debugPathParams:[],debugLoading:!1,oAuthApi:!1,debugSend:!1,formData:[],formFlag:!1,formTableFlag:!0,urlFormData:[],urlFormFlag:!1,urlFormTableFlag:!0,rawFormData:[],rawFormFlag:!1,rawFormTableFlag:!0,rawDefaultText:"Auto",rawFlag:!1,rawTypeFlag:!1,rawText:"",rawScript:"",rawScriptMode:"javascript",rawMode:"text",rawRequestType:"application/json",requestContentType:"x-www-form-urlencoded",responseHeaders:[],responseRawText:"",responseCurlText:"",responseStatus:null,responseContent:null,responseFieldDescriptionChecked:!0}},created:function(){this.initI18n(),this.initLocalGlobalParameters(),this.initDebugUrl()},computed:{language:function(){return this.$store.state.globals.language}},watch:{language:function(e,t){this.initI18n()}},methods:{getCurrentI18nInstance:function(){return this.$i18n.messages[this.language]},initI18n:function(){var e=this.getCurrentI18nInstance();this.i18n=e,this.headerColumn=e.table.debugRequestHeaderColumns,this.formColumn=e.table.debugFormDataRequestColumns,this.urlFormColumn=e.table.debugUrlFormRequestColumns},debugUrlChange:function(e){this.debugUrl=e.target.value},initDebugUrl:function(){if(this.debugUrl=this.api.url,new RegExp("{(.*?)}","ig").test(this.debugUrl)){this.debugPathFlag=!0;for(var e=null,t=new RegExp("{(.*?)}","ig");e=t.exec(this.debugUrl);)this.debugPathParams.push(e[1])}},initLocalGlobalParameters:function(){var e=this,t=this.api.instanceId;this.$localStore.getItem(l.a.globalSettingsKey).then((function(a){if(o.a.checkUndefined(a)&&(e.enableRequestCache=a.enableRequestCache,o.a.checkUndefined(a.enableDynamicParameter)&&(e.enableDynamicParameter=a.enableDynamicParameter),o.a.checkUndefined(a.enableHost))){e.enableHost=a.enableHost;var r=a.enableHostText;o.a.checkUndefined(r)?(r.startWith("http")||(r="http://"+r),e.enableHostText=r):e.enableHost=!1}e.$localStore.getItem(l.a.globalParameter).then((function(a){null!=a&&null!=a[t]&&null!=a[t]&&(e.globalParameters=a[t]);var r=l.a.debugCacheApiId+e.api.id;e.$localStore.getItem(r).then((function(t){e.initHeaderParameter(t);var a=l.a.globalSecurityParamPrefix+e.api.instanceId;e.$localStore.getItem(a).then((function(a){o.a.arrNotEmpty(a)&&a.forEach((function(t){if("query"==t.in){var a={id:o.a.randomMd5(),name:t.name,content:t.value,value:t.value,require:!0,description:"",enums:null,enumsMode:"default",new:!1};e.authorizeQueryParameters.push(a)}})),e.initBodyParameter(t)}))}))}))}))},initHeaderParameter:function(e){var t=this,a=this.syncFromOAuth2();if(o.a.checkUndefined(a)){this.oAuthApi=!0;var r={id:o.a.randomMd5(),name:a.name,content:a.accessToken,require:!0,description:"",enums:null,enumsMode:"default",new:!1};this.addDebugHeader(r)}this.globalParameters.forEach((function(e){if("header"==e.in){var a={id:o.a.randomMd5(),name:e.name,content:e.value,require:!1,description:"",enums:null,enumsMode:"default",new:!1};t.addDebugHeader(a)}}));var n=l.a.globalSecurityParamPrefix+this.api.instanceId;this.$localStore.getItem(n).then((function(a){o.a.arrNotEmpty(a)&&a.forEach((function(e){var a={id:o.a.randomMd5(),name:e.name,content:e.value,require:!0,description:"",enums:null,enumsMode:"default",new:!1};"header"==e.in&&t.addDebugHeader(a)})),t.updateHeaderFromCacheApi(e),t.addNewLineHeader(),t.initSelectionHeaders(),t.headerResetCalc()}))},updateHeaderFromCacheApi:function(e){var t=this;if(this.enableRequestCache&&o.a.checkUndefined(e)){var a=e.headerData;this.headerData.forEach((function(e){if(!o.a.strNotBlank(e.content)){var r=a.filter((function(t){return t.name==e.name}));r.length>0&&(t.oAuthApi?"Authorization"!=e.name&&(e.content=r[0].content):e.content=r[0].content)}}))}},updateUrlFormCacheApi:function(e){if(this.enableRequestCache&&o.a.checkUndefined(e)){var t=e.urlFormData;this.urlFormData.forEach((function(e){if(!o.a.strNotBlank(e.content)){var a=t.filter((function(t){return t.name==e.name}));a.length>0&&(e.content=a[0].content)}}))}},updateRawFormCacheApi:function(e){if(this.enableRequestCache&&o.a.checkUndefined(e)){var t=e.rawFormData;this.rawFormData.forEach((function(e){if(!o.a.strNotBlank(e.content)){var a=t.filter((function(t){return t.name==e.name}));a.length>0&&(e.content=a[0].content)}})),this.rawText=e.rawText}},syncFromOAuth2:function(){var e="SELFOAuth"+this.swaggerInstance.id;if(window.localStorage){var t=window.localStorage.getItem(e);if(o.a.strNotBlank(t))return o.a.json5parse(t)}return null},updateFormCacheApi:function(e){if(this.enableRequestCache&&o.a.checkUndefined(e)){var t=e.formData;this.formData.forEach((function(e){if(!o.a.strNotBlank(e.content)){var a=t.filter((function(t){return t.name==e.name}));a.length>0&&(e.content=a[0].content)}}))}},initBodyParameter:function(e){var t=this.globalParameters.filter((function(e){return"header"!=e.in})),a=this.api.parameters,r=[],n=[];if(t.length>0&&t.forEach((function(e){if(o.a.arrNotEmpty(a)){var t=!0;a.forEach((function(a){e.name==a.name&&e.in==a.in&&o.a.strNotBlank(a.txtValue)&&(t=!1)})),t&&r.push(e)}else r.push(e)})),o.a.arrNotEmpty(a)&&a.forEach((function(e){if(o.a.arrNotEmpty(t)){var a=!0;t.forEach((function(t){t.name==e.name&&t.in==e.in&&(o.a.strNotBlank(e.txtValue)||(a=!1))})),a&&n.push(e)}else n.push(e)})),o.a.arrNotEmpty(this.authorizeQueryParameters)&&this.authorizeQueryParameters.forEach((function(e){r.push(e)})),r.length,n.length,o.a.arrNotEmpty(n))if(1==n.filter((function(e){return"body"==e.in})).length){var i=n.filter((function(e){return"body"!=e.in&&"header"!=e.in}));this.addGlobalParameterToRawForm(r),i.length>0&&(this.rawFormFlag=!0,this.addApiParameterToRawForm(i)),o.a.arrNotEmpty(this.rawFormData)&&(this.rawFormFlag=!0),this.showTabRaw(),this.addApiParameterToRaw(n),this.updateRawFormCacheApi(e),this.rawFormFlag&&this.initFirstRawFormValue()}else{n.filter((function(e){return"MultipartFile"==e.schemaValue||"file"==e.schemaValue||"file"==e.type||"formData"==e.in||"formdata"==e.in})).length>0?(this.showTabForm(),this.addGlobalParameterToForm(r),this.addApiParameterToForm(n),this.updateFormCacheApi(e),this.initFirstFormValue()):(this.showTabUrlForm(),this.addGlobalParameterToUrlForm(r),this.addApiParameterToUrlForm(n),this.updateUrlFormCacheApi(e),this.initUrlFormValue())}else"raw"==this.api.contentValue?(this.showTabRaw(),this.initFirstRawFormValue()):(this.showTabUrlForm(),this.addGlobalParameterToUrlForm(r),this.addApiParameterToUrlForm(n),this.updateUrlFormCacheApi(e),this.initUrlFormValue());this.updateScriptFromCache(e)},updateScriptFromCache:function(e){o.a.checkUndefined(e)&&o.a.strNotBlank(e.rawScript)&&(this.rawScript=e.rawScript)},hideDynamicParameterTable:function(){this.enableDynamicParameter||(0==this.headerData.length?this.headerTableFlag=!1:this.headerTableFlag=!0,0==this.urlFormData.length?this.urlFormTableFlag=!1:this.urlFormTableFlag=!0,0==this.formData.length?this.formTableFlag=!1:this.formTableFlag=!0,0==this.rawFormData.length?this.rawFormTableFlag=!1:this.rawFormTableFlag=!0)},addNewLineHeader:function(){if(this.enableDynamicParameter){var e={id:o.a.randomMd5(),name:"",content:"",require:!1,description:"",enums:null,enumsMode:"default",new:!0};this.addDebugHeader(e)}this.hideDynamicParameterTable()},addDebugHeader:function(e){if(o.a.strNotBlank(e.name)){var t=this.headerData.filter((function(t){return t.name==e.name}));o.a.strBlank(e.content)?0==t.length&&this.headerData.push(e):this.headerData.push(e)}else this.headerData.push(e)},initFirstFormValue:function(){this.addNewLineFormValue(),this.initFormSelections()},initFormSelections:function(e){var t=this;o.a.strNotBlank(e)?0==this.rowFormSelection.selectedRowKeys.filter((function(t){return t==e})).length&&this.rowFormSelection.selectedRowKeys.push(e):this.formData.forEach((function(e){t.rowFormSelection.selectedRowKeys.push(e.id)}))},initRawFormSelections:function(e){var t=this;o.a.strNotBlank(e)?0==this.rowRawFormSelection.selectedRowKeys.filter((function(t){return t==e})).length&&this.rowRawFormSelection.selectedRowKeys.push(e):this.rawFormData.forEach((function(e){t.rowRawFormSelection.selectedRowKeys.push(e.id)}))},initUrlFormSelections:function(e){var t=this;o.a.strNotBlank(e)?0==this.rowUrlFormSelection.selectedRowKeys.filter((function(t){return t==e})).length&&this.rowUrlFormSelection.selectedRowKeys.push(e):this.urlFormData.forEach((function(e){t.rowUrlFormSelection.selectedRowKeys.push(e.id)}))},showTabForm:function(){this.formFlag=!0,this.rawFlag=!1,this.rawTypeFlag=!1,this.urlFormFlag=!1,this.requestContentType="form-data"},showTabUrlForm:function(){this.urlFormFlag=!0,this.rawFlag=!1,this.rawTypeFlag=!1,this.formFlag=!1,this.requestContentType="x-www-form-urlencoded"},showTabRaw:function(){this.rawFlag=!0,this.rawMode=this.api.contentMode,this.rawDefaultText=this.api.contentShowValue,this.rawTypeFlag=!0,this.formFlag=!1,this.urlFormFlag=!1,this.rawText=o.a.toString(this.api.requestValue,""),this.api.xmlRequest&&(this.rawRequestType="application/xml"),this.requestContentType="raw"},getEnumOptions:function(e){var t=o.a.propValue("enum",e,null),a=null;if(o.a.checkUndefined(t)){var r=[];t.forEach((function(e){r.push({value:e,label:e})})),a=r}return a},addNewLineFormValue:function(){if(this.enableDynamicParameter){var e={id:o.a.randomMd5(),name:"",type:"text",require:!1,target:null,multipart:!1,content:"",description:"",enums:null,enumsMode:"default",new:!0};this.formData.push(e)}else this.hideDynamicParameterTable()},addGlobalParameterToRawForm:function(e){var t=this;o.a.arrNotEmpty(e)&&e.forEach((function(e){var a={id:o.a.randomMd5(),name:e.name,type:"text",require:!1,target:null,multipart:!1,content:e.value,description:"",enums:null,enumsMode:"default",new:!1};t.rawFormData.push(a)}))},addGlobalParameterToForm:function(e){var t=this;o.a.arrNotEmpty(e)&&e.forEach((function(e){var a={id:o.a.randomMd5(),name:e.name,type:"text",require:!1,target:null,multipart:!1,content:e.value,description:"",enums:null,enumsMode:"default",new:!1};t.formData.push(a)}))},addApiParameterToRaw:function(e){var t=this;if(o.a.arrNotEmpty(e)){var a=e.filter((function(e){return"header"==e.in}));a.length>0&&a.forEach((function(e){var a={id:o.a.randomMd5(),name:e.name,require:e.require,content:e.txtValue,description:o.a.propValue("description",e,""),enums:t.getEnumOptions(e),enumsMode:"default",new:!1};null!=a.enums&&(o.a.strNotBlank(a.content)||(a.content=a.enums[0].value)),t.addDebugHeader(a)}))}},addApiParameterToForm:function(e){var t=this;o.a.arrNotEmpty(e)&&e.forEach((function(e){if("header"==e.in){var a={id:o.a.randomMd5(),name:e.name,require:e.require,content:e.txtValue,description:o.a.propValue("description",e,""),enums:t.getEnumOptions(e),enumsMode:"default",new:!1};null!=a.enums&&(o.a.strNotBlank(a.content)||(a.content=a.enums[0].value)),t.addDebugHeader(a)}else{var r="text",n=!1;"MultipartFile"!=e.schemaValue&&"file"!=e.schemaValue&&"file"!=e.type||(r="file","array"==e.type&&(n=!0));var i={id:o.a.randomMd5(),name:e.name,type:r,require:e.require,target:null,multipart:n,content:e.txtValue,description:o.a.propValue("description",e,""),enums:t.getEnumOptions(e),enumsMode:"default",new:!1};null!=i.enums&&(o.a.strNotBlank(i.content)||(i.content=i.enums[0].value)),t.formData.push(i)}}))},addGlobalParameterToUrlForm:function(e){var t=this;o.a.arrNotEmpty(e)&&e.forEach((function(e){var a={id:o.a.randomMd5(),name:e.name,type:"text",require:!1,target:null,content:e.value,description:"",enums:null,enumsMode:"default",new:!1};t.urlFormData.push(a)}))},addApiParameterToRawForm:function(e){var t=this;o.a.arrNotEmpty(e)&&e.forEach((function(e){if("header"==e.in){var a={id:o.a.randomMd5(),name:e.name,require:e.require,content:e.txtValue,description:o.a.propValue("description",e,""),enums:t.getEnumOptions(e),enumsMode:"default",new:!1};null!=a.enums&&(o.a.strNotBlank(a.content)||(a.content=a.enums[0].value)),t.addDebugHeader(a)}else{var r={id:o.a.randomMd5(),name:e.name,type:"text",require:e.require,target:null,content:e.txtValue,description:o.a.propValue("description",e,""),enums:t.getEnumOptions(e),enumsMode:"default",new:!1};null!=r.enums&&(o.a.strNotBlank(r.content)||(r.content=r.enums[0].value)),t.rawFormData.push(r)}}))},addApiParameterToUrlForm:function(e){var t=this;o.a.arrNotEmpty(e)&&e.forEach((function(e){if("header"==e.in){var a={id:o.a.randomMd5(),name:e.name,require:e.require,content:e.txtValue,description:o.a.propValue("description",e,""),enums:t.getEnumOptions(e),enumsMode:"default",new:!1};null!=a.enums&&(o.a.strNotBlank(a.content)||(a.content=a.enums[0].value)),t.addDebugHeader(a)}else{var r="default";o.a.arrNotEmpty(e.enum)&&"array"==e.type&&(r="multiple");var n={id:o.a.randomMd5(),name:e.name,type:"text",require:e.require,target:null,content:e.txtValue,description:o.a.propValue("description",e,""),enums:t.getEnumOptions(e),enumsMode:r,new:!1};null!=n.enums&&(o.a.strNotBlank(n.content)||(n.content=n.enums[0].value)),t.urlFormData.push(n)}}))},addNewLineUrlFormValue:function(){if(this.enableDynamicParameter){var e={id:o.a.randomMd5(),name:"",type:"text",require:!1,target:null,content:"",description:"",enums:null,enumsMode:"default",new:!0};this.urlFormData.push(e)}else this.hideDynamicParameterTable()},addNewLineRawFormValue:function(){if(this.enableDynamicParameter){var e={id:o.a.randomMd5(),name:"",type:"text",require:!1,target:null,content:"",description:"",enums:null,enumsMode:"default",new:!0};this.rawFormData.push(e)}else this.hideDynamicParameterTable()},initFirstRawFormValue:function(){this.addNewLineRawFormValue(),this.initRawFormSelections()},initUrlFormValue:function(){this.addNewLineUrlFormValue(),this.initUrlFormSelections()},initShowFormTable:function(){"x-www-form-urlencoded"==this.requestContentType?(this.urlFormFlag=!0,this.formFlag=!1,this.rawFlag=!1,this.rawTypeFlag=!1):"form-data"==this.requestContentType?(this.formFlag=!0,this.urlFormFlag=!1,this.rawFlag=!1,this.rawTypeFlag=!1):"raw"==this.requestContentType&&(this.rawFlag=!0,this.rawTypeFlag=!0,this.urlFormFlag=!1,this.formFlag=!1)},initSelectionHeaders:function(e){var t=this;o.a.strNotBlank(e)?0==this.rowSelection.selectedRowKeys.filter((function(t){return t==e})).length&&this.rowSelection.selectedRowKeys.push(e):this.headerData.forEach((function(e){t.rowSelection.selectedRowKeys.push(e.id)}))},headerContentEnumChnage:function(e,t){var a=t.context.$attrs["data-key"];this.headerContentChnageUpdate(e,a)},headerContentChnage:function(e){var t=e.target.value,a=e.target.getAttribute("data-key");this.headerContentChnageUpdate(t,a)},headerContentChnageUpdate:function(e,t){var a=this.headerData.filter((function(e){return e.id==t}))[0];a.new?(this.headerData.forEach((function(t){t.id==a.id&&(t.content=e,t.new=!1)})),this.addNewLineHeader()):this.headerData.forEach((function(t){t.id==a.id&&(t.content=e,t.new=!1)})),this.initSelectionHeaders(a.id),this.headerResetCalc()},headerNameFilterOption:function(e,t){return t.componentOptions.children[0].text.toUpperCase().indexOf(e.toUpperCase())>=0},headerSelect:function(e,t){this.headerSelectName=e},headerSearch:function(e){this.headerSelectName=e},headerNameChange:function(e){var t=this;e.new?(this.headerData.forEach((function(a){a.id==e.id&&(a.name=t.headerSelectName,a.new=!1)})),this.addNewLineHeader()):this.headerData.forEach((function(a){a.id==e.id&&(a.name=t.headerSelectName,a.new=!1)})),this.initSelectionHeaders(e.id),this.headerResetCalc()},headerDelete:function(e){var t=[];this.headerData.forEach((function(a){a.id!=e.id&&t.push(a)})),this.headerData=t,this.headerResetCalc()},headerResetCalc:function(){var e=this.headerData.filter((function(e){return 0==e.new}));e.length>0?(this.headerCountFlag=!0,this.headerCount=e.length):(this.headerCountFlag=!1,this.headerCount=0)},requestContentTypeChange:function(e){this.requestContentType=e.target.value,this.initShowFormTable()},formDelete:function(e){var t=[];this.formData.forEach((function(a){a.id!=e.id&&t.push(a)})),this.formData=t},formFileUploadClick:function(e){document.getElementById("file"+e.id).click()},formNameChange:function(e){var t=e.target.value,a=e.target.getAttribute("data-key"),r=this.formData.filter((function(e){return e.id==a}))[0];r.new?(this.formData.forEach((function(e){e.id==r.id&&(e.name=t,e.new=!1)})),this.addNewLineFormValue()):this.formData.forEach((function(e){e.id==r.id&&(e.name=t,e.new=!1)})),this.initFormSelections(r.id)},formTypeChange:function(e,t){var a=e.split("-"),r=a[0],n=a[1];this.formData.forEach((function(e){e.id==n&&(e.content="",e.type=r)}))},formFileChange:function(e){for(var t=e.target.files,a=[],r=0;r0){var r=a.produces[0];t.Accept=r}return this.headerData.forEach((function(a){a.new||e.rowSelection.selectedRowKeys.filter((function(e){return e==a.id})).length>0&&o.a.strNotBlank(a.name)&&(o.a.isChinese(a.content)?t[a.name]=encodeURIComponent(a.content):t[a.name]=o.a.toString(a.content,""))})),t["Request-Origion"]="Knife4j",o.a.checkUndefined(t["Content-Type"])||(this.rawFlag?t["Content-Type"]=this.rawRequestType:this.urlFormFlag?t["Content-Type"]="application/x-www-form-urlencoded":this.formFlag&&(this.validateFormDataContaintsFile()?t["Content-Type"]="multipart/form-data":t["Content-Type"]="application/x-www-form-urlencoded")),t},debugRawFormParams:function(){var e=this,t={};return this.rawFormData.forEach((function(a){a.new||e.rowRawFormSelection.selectedRowKeys.filter((function(e){return e==a.id})).length>0&&o.a.strNotBlank(a.name)&&(t[a.name]=a.content)})),t},debugUrlFormParams:function(){var e=this,t={};return this.urlFormData.forEach((function(a){a.new||e.rowUrlFormSelection.selectedRowKeys.filter((function(e){return e==a.id})).length>0&&o.a.strNotBlank(a.name)&&(t[a.name]=a.content)})),t},debugFormDataParams:function(e){var t=this,a={url:"",params:{}},r=this.debugUrl;if(e){var n=new FormData;this.formData.forEach((function(e){if(!e.new&&(t.rowFormSelection.selectedRowKeys.filter((function(t){return t==e.id})).length>0&&o.a.strNotBlank(e.name)))if("text"==e.type)if(t.debugPathFlag)if(-1==t.debugPathParams.indexOf(e.name))n.append(e.name,e.content);else{var a="{"+e.name+"}";r=r.replace(a,e.content)}else n.append(e.name,e.content);else if(o.a.checkUndefined(e.target)){var i=e.target.files;if(i.length>0)for(var s=0;s0&&o.a.strNotBlank(e.name)))if(t.debugPathFlag)if(-1==t.debugPathParams.indexOf(e.name))i[e.name]=e.content;else{var a="{"+e.name+"}";r=r.replace(a,e.content)}else i[e.name]=e.content})),a.params=i}return a.url=r,a},debugStreamFlag:function(){var e=!1,t=this.api;null!=t.produces&&null!=t.produces&&t.produces.length>0&&(t.produces[0],e=o.a.binaryContentType(t.produces,null).binary);return e},validateCommonHeaders:function(){for(var e=!0,t="",a=0;a0&&o.a.strNotBlank(r.name)&&r.require&&!o.a.strNotBlank(r.content)){e=!1,t=this.i18n.validate.header+r.name+this.i18n.validate.notEmpty;break}}return{validate:e,message:t}},validateFormData:function(){for(var e=!0,t="",a=0;a0&&o.a.strNotBlank(r.name)&&r.require)if("text"==r.type){if(!o.a.strNotBlank(r.content)){e=!1,t=r.name+this.i18n.validate.notEmpty;break}}else if(null==r.target){e=!1,t=r.name+this.i18n.validate.fileNotEmpty;break}}return{validate:e,message:t}},validateRawForm:function(){for(var e=!0,t="",a=0;a0&&o.a.strNotBlank(r.name)&&r.require&&!o.a.strNotBlank(r.content)){e=!1,t=r.name+this.i18n.validate.notEmpty;break}}return{validate:e,message:t}},validateUrlForm:function(){for(var e=!0,t="",a=0;a0&&o.a.strNotBlank(r.name)&&r.require&&!o.a.strNotBlank(r.content)){e=!1,t=r.name+this.i18n.validate.notEmpty;break}}return{validate:e,message:t}},validateFormDataContaintsFile:function(){var e=this,t=!1;return this.formData.forEach((function(a){a.new||e.rowFormSelection.selectedRowKeys.filter((function(e){return e==a.id})).length>0&&"file"==a.type&&(t=!0)})),t},checkUrlParams:function(e){var t=e.indexOf("?"),a={result:!1,params:{},url:e};if(t>-1){var r=e.substring(t+1);if(a.url=e.substring(0,t),a.result=!0,o.a.strNotBlank(r))r.split("&").forEach((function(e){if(o.a.strNotBlank(e)){var t=e.split("=");2==t.length&&(a.params[t[0]]=t[1])}}))}return a},debugSendHasCookie:function(e){var t=!1;if(o.a.checkUndefined(e)){var a=Object.keys(e);if(o.a.arrNotEmpty(a))if(a.filter((function(e){return"cookie"===e.toLocaleLowerCase()})).length>0){var r=e.Cookie;o.a.strNotBlank(r)&&(document.cookie=r,t=!0)}}return t},applyRequestParams:function(e,t){var a=null,r=null;return["post","put","patch"].includes(t.toLowerCase())?o.a.checkUndefined(e)&&(a=i.a.stringify(e)):r=e,{data:a,params:r}},debugSendUrlFormRequest:function(){var e=this,t=this.validateUrlForm();if(t.validate){this.debugLoading=!0,this.debugSend=!0;var a=this.debugHeaders(),n=this.debugUrl,i=this.api.methodType.toLowerCase(),s=this.debugUrlFormParams();if(this.debugPathFlag){var l={};for(var u in this.debugPathParams.forEach((function(e){var t="{"+e+"}",a=s[e];n=n.replace(t,a)})),s)-1==this.debugPathParams.indexOf(u)&&(l[u]=s[u]);s=l}var c=this.checkUrlParams(n);c.result&&(n=c.url,s=Object.assign(s,c.params));var h="";this.enableHost&&(h=this.enableHostText);var f=this.applyRequestParams(s,i),p={baseURL:h,url:n,method:i,headers:a,params:f.params,timeout:0,withCredentials:this.debugSendHasCookie(a),data:f.data};this.debugStreamFlag()&&(p=Object(r.a)(Object(r.a)({},p),{},{responseType:"blob"}));var m=d.a.create();m.interceptors.request.use((function(e){var t=e.url;if("get"===e.method&&e.params){t+="?";for(var a=0,r=Object.keys(e.params);a1e3)n=Math.floor(i/1e3).toFixed(1)+"s";else n=i+"ms";var l=0;"blob"==r.responseType?l=r.response.size:o.a.checkUndefined(r.responseText)&&(l=r.responseText.gblen()),this.responseStatus={code:s,cost:n,size:l}}}},setResponseCurl:function(e){var t=this,a=this,r=this.debugUrl,n=new Array,i="http",s=window.location.href;new RegExp("^https.*","ig").test(s)&&(i="https");var l="";l=new RegExp("^(http|https):.*","ig").test(this.api.host)?this.api.host:i+"://"+this.api.host,this.enableHost&&(l=this.enableHostText),r.startWith("/")||(l+="/"),l+=r,n.push("curl"),n.push("-X",this.api.methodType.toUpperCase());var u=this.debugHeaders();if(o.a.checkUndefined(u))for(var c in u)n.push("-H "),n.push('"'+c+":"+u[c]+'"');if(this.rawFlag){var d=this.debugRawFormParams(),h=[];if(o.a.checkUndefined(d))for(var f in d)if(a.debugPathFlag)if(-1==a.debugPathParams.indexOf(f))h.push(f+"="+o.a.toString(d[f],""));else{var p="{"+f+"}",m=o.a.toString(d[f],"");l=l.replace(p,m)}else h.push(f+"="+o.a.toString(d[f],""));var g=h.join("&");if(o.a.strNotBlank(g)&&(l=-1==l.indexOf("?")?l+"?"+g:l+"&"+g),o.a.strNotBlank(this.rawText))try{var w=JSON.parse(this.rawText),b=JSON.stringify(w).replace(/\\n/g,"").replace(/"/g,'\\"');n.push("-d"),n.push('"'+b+'"')}catch(e){b=this.rawText.replace(/\\n/g,"").replace(/"/g,'\\"'),n.push("-d"),n.push('"'+b+'"')}}else if(this.urlFormFlag){var y=this.debugUrlFormParams();if(o.a.checkUndefined(y)){for(var f in h=[],y)a.debugPathFlag?-1==a.debugPathParams.indexOf(f)?h.push(f+"="+o.a.toString(y[f],"")):(p="{"+f+"}",m=o.a.toString(y[f],""),l=l.replace(p,m)):h.push(f+"="+o.a.toString(y[f],""));g=h.join("&"),o.a.strNotBlank(g)&&("get"==this.api.methodType.toLowerCase()||"delete"==this.api.methodType.toLowerCase()?l=-1==l.indexOf("?")?l+"?"+g:l+"&"+g:(n.push("--data-urlencode "),n.push('"'+g+'"')))}}else if(this.formFlag){var v=this.debugFormCurlParams();if(o.a.checkUndefined(v))if(this.validateFormDataContaintsFile())this.formData.forEach((function(e){e.new||t.rowFormSelection.selectedRowKeys.filter((function(t){return t==e.id})).length>0&&o.a.strNotBlank(e.name)&&(n.push("-F "),"text"==e.type?n.push('"'+e.name+"="+o.a.toString(e.content,"")+'"'):n.push('"'+e.name+"=@"+e.content+'"'))}));else{for(var f in h=[],v)a.debugPathFlag?-1==a.debugPathParams.indexOf(f)?h.push(f+"="+o.a.toString(v[f],"")):(p="{"+f+"}",m=o.a.toString(v[f],""),l=l.replace(p,m)):h.push(f+"="+o.a.toString(v[f],""));g=h.join("&"),o.a.strNotBlank(g)&&("get"==this.api.methodType.toLowerCase()||"delete"==this.api.methodType.toLowerCase()?l=-1==l.indexOf("?")?l+"?"+g:l+"&"+g:(n.push("--data-urlencode "),n.push('"'+g+'"')))}}n.push('"'+encodeURI(l)+'"'),this.responseCurlText=n.join(" ")},debugFormCurlParams:function(){var e=this,t={};return this.formData.forEach((function(a){a.new||e.rowFormSelection.selectedRowKeys.filter((function(e){return e==a.id})).length>0&&o.a.strNotBlank(a.name)&&(t[a.name]=a.content)})),t},setResponseBody:function(e){if(o.a.checkUndefined(e)){var t=e.request,a=e.headers;if(o.a.checkUndefined(t))if("blob"==t.responseType){var r=o.a.propValue("content-type",a,""),n="Knife4j.txt",i=o.a.propValue("Content-Disposition",a,"");if(o.a.strNotBlank(i)||(i=o.a.propValue("content-disposition",a,"")),o.a.strNotBlank(i))for(var s=i.split(";"),l=0;l0){var d=c[0];null!=d&&null!=d&&""!=d&&"filename"==d.toLowerCase()&&(n=decodeURIComponent(c[1]))}}}var h=!1;if(-1!=r.indexOf("image"))h=!0;else{["bmp","jpg","png","tif","gif","pcx","tga","exif","fpx","svg","psd","cdr","pcd","dxf","ufo","eps","ai","raw","WMF","webp"].forEach((function(e){-1!=n.indexOf(e)&&(h=!0)}))}var f=this.api.produces,p=!1;o.a.arrNotEmpty(f)&&f.forEach((function(e){-1!=e.indexOf("image")&&(p=!0)})),h||(h=p);var m=window.URL.createObjectURL(e.data);this.responseContent={text:"",mode:"blob",blobFlag:!0,imageFlag:h,blobFileName:n,blobUrl:m}}else this.setResponseJsonBody(t,a)}},setResponseJsonBody:function(e,t){var a="",r=this.getContentTypeByHeaders(t);if("json"==r){if((e.responseText.gblen()/1024).toFixed(1)>500){var n=this.i18n.message.debug.contentToBig;this.$message.info(n),r="text"}else if(o.a.strNotBlank(e.responseText))try{a=o.a.json5stringify(o.a.json5parse(e.responseText))}catch(t){a=e.responseText,r="text"}}else if("xml"==r){var i=e.responseText;a=o.a.strNotBlank(i)?(new w).xml(i):i}else a=e.responseText;this.responseContent={text:a,mode:r,blobFlag:!1,imageFlag:!1,blobFileName:"",blobUrl:""}},debugEditorChange:function(e){o.a.checkUndefined(this.responseContent)&&(this.responseContent.text=e)},getContentTypeByHeaders:function(e){var t="json",a=o.a.propValue("Content-Type",e,"");return o.a.strNotBlank(a)||(a=o.a.propValue("content-type",e,"")),o.a.strNotBlank(a)&&(t=a.indexOf("json")>=0?"json":a.indexOf("xml")>=0?"xml":a.indexOf("text/html")>=0?"html":"text"),t},debugShowFieldDescriptionChange:function(e){this.responseFieldDescriptionChecked=e}}},y=a("2877"),v=Object(y.a)(b,(function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"knife4j-debug"},[a("a-row",[a("a-col",{class:"knife4j-debug-api-"+e.api.methodType.toLowerCase(),attrs:{span:24}},[a("a-input-group",{attrs:{compact:""}},[a("span",{staticClass:"knife4j-api-summary-method"},[e._v(e._s(e.api.methodType))]),a("a-input",{staticStyle:{width:"80%"},attrs:{value:e.debugUrl},on:{change:e.debugUrlChange}}),a("a-button",{staticClass:"knife4j-api-send",attrs:{loading:e.debugLoading,type:"primary"},domProps:{innerHTML:e._s(e.$t("debug.send"))},on:{click:e.sendRestfulApi}},[e._v("发 送")])],1)],1)],1),a("a-row",{staticClass:"knife4j-debug-tabs"},[a("a-tabs",{attrs:{defaultActiveKey:"2"}},[a("a-tab-pane",{key:"1"},[a("template",{slot:"tab"},[a("span",[e.headerCountFlag?a("a-tag",{staticClass:"knife4j-debug-param-count"},[e._v(e._s(e.headerCount))]):e._e(),a("span",{domProps:{innerHTML:e._s(e.$t("debug.headers"))}},[e._v("请求头部")])],1)]),e.headerTableFlag?a("a-table",{attrs:{bordered:"",size:"small",rowSelection:e.rowSelection,columns:e.headerColumn,pagination:e.pagination,dataSource:e.headerData,rowKey:"id"},scopedSlots:e._u([{key:"headerName",fn:function(t,r){return[a("a-auto-complete",{staticStyle:{width:"100%"},attrs:{value:t,filterOption:e.headerNameFilterOption,allowClear:e.allowClear,dataSource:e.headerAutoOptions,placeholder:e.$t("debug.tableHeader.holderName")},on:{select:e.headerSelect,search:e.headerSearch,change:function(t){return e.headerNameChange(r)}}})]}},{key:"headerValue",fn:function(t,r){return[null!=r.enums?a("a-row",[a("a-select",{staticStyle:{width:"100%"},attrs:{mode:r.enumsMode,defaultValue:t,"data-key":r.id,options:r.enums},on:{change:e.headerContentEnumChnage}})],1):a("a-row",[a("a-input",{class:"knife4j-debug-param-require"+r.require,attrs:{placeholder:e.$t("debug.tableHeader.holderValue"),"data-key":r.id,defaultValue:t},on:{change:e.headerContentChnage}})],1)]}},{key:"operation",fn:function(t,r){return a("a-row",{},[r.new?e._e():a("a-button",{attrs:{type:"link"},domProps:{innerHTML:e._s(e.$t("debug.tableHeader.holderDel"))},on:{click:function(t){return e.headerDelete(r)}}},[e._v("删除")])],1)}}],null,!1,1327304640)}):e._e()],2),a("a-tab-pane",{key:"2",attrs:{tab:e.$t("debug.params"),forceRender:""}},[a("a-row",{staticClass:"knife4j-debug-request-type"},[a("div",{staticClass:"knife4j-debug-request-content-type-float"},[a("a-radio-group",{staticClass:"knife4j-debug-request-content-type",on:{change:e.requestContentTypeChange},model:{value:e.requestContentType,callback:function(t){e.requestContentType=t},expression:"requestContentType"}},[a("a-radio",{attrs:{value:"x-www-form-urlencoded"}},[e._v("x-www-form-urlencoded")]),a("a-radio",{attrs:{value:"form-data"}},[e._v("form-data")]),a("a-radio",{attrs:{value:"raw"}},[e._v("raw")])],1)],1),a("div",{staticClass:"knife4j-debug-request-content-type-float"},[a("div",{staticClass:"knife4j-debug-request-content-type-raw"},[e.rawTypeFlag?a("a-dropdown",{attrs:{trigger:["click"]}},[a("span",{staticClass:"knife4j-debug-raw-span"},[a("span",[e._v(e._s(e.rawDefaultText))]),a("a-icon",{attrs:{type:"down"}})],1),a("a-menu",{attrs:{slot:"overlay"},on:{click:e.rawMenuClick},slot:"overlay"},[a("a-menu-item",{key:"Auto",attrs:{"data-mode-type":"application/json","data-mode":"text"}},[e._v("Auto")]),a("a-menu-item",{key:"Text(text/plain)",attrs:{"data-mode-type":"text/plain","data-mode":"text"}},[e._v("Text(text/plain)")]),a("a-menu-item",{key:"JSON(application/json)",attrs:{"data-mode-type":"application/json","data-mode":"json"}},[e._v("JSON(application/json)")]),a("a-menu-item",{key:"Javascript(application/Javascript)",attrs:{"data-mode-type":"application/javascript","data-mode":"javascript"}},[e._v("Javascript(application/Javascript)")]),a("a-menu-item",{key:"XML(application/xml)",attrs:{"data-mode-type":"application/xml","data-mode":"xml"}},[e._v("XML(application/xml)")]),a("a-menu-item",{key:"XML(text/xml)",attrs:{"data-mode-type":"text/xml","data-mode":"xml"}},[e._v("XML(text/xml)")]),a("a-menu-item",{key:"HTML(text/html)",attrs:{"data-mode-type":"text/html","data-mode":"html"}},[e._v("HTML(text/html)")])],1)],1):e._e()],1)])]),e.formFlag?a("a-row",[e.formTableFlag?a("a-table",{attrs:{bordered:"",size:"small",rowSelection:e.rowFormSelection,columns:e.formColumn,pagination:e.pagination,dataSource:e.formData,rowKey:"id"},scopedSlots:e._u([{key:"formName",fn:function(t,r){return[a("a-input",{attrs:{placeholder:r.description,"data-key":r.id,defaultValue:t},on:{change:e.formNameChange}})]}},{key:"formType",fn:function(t,r){return[a("a-select",{staticStyle:{width:"100%"},attrs:{defaultValue:t+"-"+r.id},on:{change:e.formTypeChange}},[a("a-select-option",{attrs:{value:"text-"+r.id}},[a("span",{domProps:{innerHTML:e._s(e.$t("debug.form.itemText"))}},[e._v("文本")])]),a("a-select-option",{attrs:{value:"file-"+r.id}},[a("span",{domProps:{innerHTML:e._s(e.$t("debug.form.itemFile"))}},[e._v("文件")])])],1)]}},{key:"formValue",fn:function(t,r){return["text"==r.type?a("div",[null!=r.enums?a("a-row",[a("a-select",{staticStyle:{width:"100%"},attrs:{mode:r.enumsMode,defaultValue:t,"data-key":r.id,options:r.enums},on:{change:e.formContentEnumChange}})],1):a("a-row",[a("a-input",{class:"knife4j-debug-param-require"+r.require,attrs:{placeholder:r.description,"data-key":r.id,defaultValue:t},on:{change:e.formContentChange}})],1)],1):a("div",[a("div",[r.multipart?a("div",{staticStyle:{display:"none"}},[a("input",{staticStyle:{display:"none"},attrs:{id:"file"+r.id,multiple:"",type:"file","data-key":r.id},on:{change:e.formFileChange}})]):a("div",{staticStyle:{display:"none"}},[a("input",{staticStyle:{display:"none"},attrs:{id:"file"+r.id,type:"file","data-key":r.id},on:{change:e.formFileChange}})]),a("a-input-group",{attrs:{compact:""}},[a("a-input",{class:"knife4j-debug-param-require"+r.require,staticStyle:{width:"80%"},attrs:{value:r.content,disabled:""}}),a("a-button",{staticClass:"knife4j-api-send",staticStyle:{width:"80px"},attrs:{type:"primary"},domProps:{innerHTML:e._s(e.$t("debug.form.upload"))},on:{click:function(t){return e.formFileUploadClick(r)}}},[e._v("选择文件")])],1)],1)])]}},{key:"operation",fn:function(t,r){return a("a-row",{},[r.new?e._e():a("a-button",{attrs:{type:"link"},domProps:{innerHTML:e._s(e.$t("debug.tableHeader.holderDel"))},on:{click:function(t){return e.formDelete(r)}}},[e._v("删除")])],1)}}],null,!1,2148726805)}):e._e()],1):e._e(),e.urlFormFlag?a("a-row",[e.urlFormTableFlag?a("a-table",{attrs:{bordered:"",size:"small",rowSelection:e.rowUrlFormSelection,columns:e.urlFormColumn,pagination:e.pagination,dataSource:e.urlFormData,rowKey:"id"},scopedSlots:e._u([{key:"urlFormName",fn:function(t,r){return[a("a-input",{attrs:{placeholder:r.description,"data-key":r.id,defaultValue:t},on:{change:e.urlFormNameChange}})]}},{key:"urlFormValue",fn:function(t,r){return[null!=r.enums?a("a-row",[a("a-select",{staticStyle:{width:"100%"},attrs:{mode:r.enumsMode,defaultValue:t,"data-key":r.id,options:r.enums},on:{change:e.urlFormContentEnumChange}})],1):a("a-row",[a("a-input",{class:"knife4j-debug-param-require"+r.require,attrs:{placeholder:r.description,"data-key":r.id,defaultValue:t},on:{change:e.urlFormContentChange}})],1)]}},{key:"operation",fn:function(t,r){return a("a-row",{},[r.new?e._e():a("a-button",{attrs:{type:"link"},domProps:{innerHTML:e._s(e.$t("debug.tableHeader.holderDel"))},on:{click:function(t){return e.urlFormDelete(r)}}},[e._v("删除")])],1)}}],null,!1,942578135)}):e._e()],1):e._e(),e.rawFlag?a("a-row",[e.rawFormFlag?a("a-row",[e.rawFormTableFlag?a("a-table",{attrs:{bordered:"",size:"small",rowSelection:e.rowRawFormSelection,columns:e.urlFormColumn,pagination:e.pagination,dataSource:e.rawFormData,rowKey:"id"},scopedSlots:e._u([{key:"urlFormName",fn:function(t,r){return[a("a-input",{attrs:{placeholder:r.description,"data-key":r.id,defaultValue:t},on:{change:e.rawFormNameChange}})]}},{key:"urlFormValue",fn:function(t,r){return[null!=r.enums?a("a-row",[a("a-select",{staticStyle:{width:"100%"},attrs:{mode:r.enumsMode,defaultValue:t,"data-key":r.id,options:r.enums},on:{change:e.rawFormContentEnumChange}})],1):a("a-row",[a("a-input",{class:"knife4j-debug-param-require"+r.require,attrs:{placeholder:r.description,"data-key":r.id,defaultValue:t},on:{change:e.rawFormContentChange}})],1)]}},{key:"operation",fn:function(t,r){return a("a-row",{},[r.new?e._e():a("a-button",{attrs:{type:"link"},domProps:{innerHTML:e._s(e.$t("debug.tableHeader.holderDel"))},on:{click:function(t){return e.rawFormDelete(r)}}},[e._v("删除")])],1)}}],null,!1,2757824471)}):e._e()],1):e._e(),a("editor-debug-show",{staticStyle:{"margin-top":"5px"},attrs:{value:e.rawText,mode:e.rawMode},on:{change:e.rawChange}})],1):e._e()],1),a("a-tab-pane",{key:"3",attrs:{tab:"AfterScript"}},[a("a-row",{staticStyle:{height:"25px","line-height":"25px"}},[e._v(" 关于AfterScript更详细的使用方法及介绍,请"),a("a",{attrs:{href:"https://gitee.com/xiaoym/knife4j/wikis/AfterScript",target:"_blank"}},[e._v("参考文档")])]),a("a-row",[a("editor-script",{staticStyle:{"margin-top":"5px"},attrs:{value:e.rawScript},on:{change:e.rawScriptChange}})],1)],1)],1)],1),a("a-row",[a("DebugResponse",{ref:"childDebugResponse",attrs:{responseFieldDescriptionChecked:e.responseFieldDescriptionChecked,swaggerInstance:e.swaggerInstance,api:e.api,debugSend:e.debugSend,responseContent:e.responseContent,responseCurlText:e.responseCurlText,responseStatus:e.responseStatus,responseRawText:e.responseRawText,responseHeaders:e.responseHeaders},on:{debugShowFieldDescriptionChange:e.debugShowFieldDescriptionChange,debugEditorChange:e.debugEditorChange}})],1)],1)}),[],!1,null,null,null);t.default=v.exports},"9e6a":function(e,t,a){"use strict";var r=a("d233"),n=Object.prototype.hasOwnProperty,i=Array.isArray,o={allowDots:!1,allowPrototypes:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:r.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},s=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},l=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},u=function(e,t){var a,u={},c=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,d=t.parameterLimit===1/0?void 0:t.parameterLimit,h=c.split(t.delimiter,d),f=-1,p=t.charset;if(t.charsetSentinel)for(a=0;a-1&&(g=i(g)?[g]:g),n.call(u,m)?u[m]=r.combine(u[m],g):u[m]=g}return u},c=function(e,t,a,r){for(var n=r?t:l(t,a),i=e.length-1;i>=0;--i){var o,s=e[i];if("[]"===s&&a.parseArrays)o=[].concat(n);else{o=a.plainObjects?Object.create(null):{};var u="["===s.charAt(0)&&"]"===s.charAt(s.length-1)?s.slice(1,-1):s,c=parseInt(u,10);a.parseArrays||""!==u?!isNaN(c)&&s!==u&&String(c)===u&&c>=0&&a.parseArrays&&c<=a.arrayLimit?(o=[])[c]=n:o[u]=n:o={0:n}}n=o}return n},d=function(e,t,a,r){if(e){var i=a.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,o=/(\[[^[\]]*])/g,s=a.depth>0&&/(\[[^[\]]*])/.exec(i),l=s?i.slice(0,s.index):i,u=[];if(l){if(!a.plainObjects&&n.call(Object.prototype,l)&&!a.allowPrototypes)return;u.push(l)}for(var d=0;a.depth>0&&null!==(s=o.exec(i))&&d=0;)a+=h[t],h[t]=u(a/e),a=a%e*1e7},w=function(){for(var e=6,t="";--e>=0;)if(""!==t||0===e||0!==h[e]){var a=String(h[e]);t=""===t?a:t+o.call("0",7-a.length)+a}return t};if(d<0||d>20)throw RangeError("Incorrect fraction digits");if(l!=l)return"NaN";if(l<=-1e21||l>=1e21)return String(l);if(l<0&&(f="-",l=-l),l>1e-21)if(t=function(e){for(var t=0,a=e;a>=4096;)t+=12,a/=4096;for(;a>=2;)t+=1,a/=2;return t}(l*c(2,69,1))-69,a=t<0?l*c(2,-t,1):l/c(2,t,1),a*=4503599627370496,(t=52-t)>0){for(m(0,a),r=d;r>=7;)m(1e7,0),r-=7;for(m(c(10,r,1),0),r=t-1;r>=23;)g(1<<23),r-=23;g(1<0?p=f+((s=p.length)<=d?"0."+o.call("0",d-s)+p:p.slice(0,s-d)+"."+p.slice(s-d)):p=f+p,p}})},d233:function(e,t,a){"use strict";var r=Object.prototype.hasOwnProperty,n=Array.isArray,i=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),o=function(e){for(;e.length>1;){var t=e.pop(),a=t.obj[t.prop];if(n(a)){for(var r=[],i=0;i=48&&s<=57||s>=65&&s<=90||s>=97&&s<=122?n+=r.charAt(o):s<128?n+=i[s]:s<2048?n+=i[192|s>>6]+i[128|63&s]:s<55296||s>=57344?n+=i[224|s>>12]+i[128|s>>6&63]+i[128|63&s]:(o+=1,s=65536+((1023&s)<<10|1023&r.charCodeAt(o)),n+=i[240|s>>18]+i[128|s>>12&63]+i[128|s>>6&63]+i[128|63&s])}return n},isBuffer:function(e){return!(!e||"object"!=typeof e||!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e)))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(n(e)){for(var a=[],r=0;r




© 2015 - 2024 Weber Informatics LLC | Privacy Policy