@egova/egova-api 1.3.11 → 1.3.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- (function(t,e){"object"===typeof exports&&"object"===typeof module?module.exports=e(require("vue-property-decorator"),require("brace/mode/json"),require("brace/mode/groovy"),require("brace/mode/xml"),require("vue-json-viewer"),require("brace/snippets/json"),require("lodash.debounce"),require("brace/ext/searchbox"),require("@egova/flagwind-core"),require("@egova/flagwind-web"),require("brace/theme/chrome"),require("brace/ext/language_tools"),require("vue2-ace-editor"),require("vue"),require("brace/snippets/javascript"),require("brace"),require("halo-math"),require("brace/snippets/groovy"),require("jsencrypt"),require("crypto-js"),require("mavon-editor"),require("js-cookie"),require("brace/mode/javascript"),require("@egova/flagwind-web/dist/flagwind-web.umd.js"),require("axios"),require("swiper")):"function"===typeof define&&define.amd?define(["vue-property-decorator","brace/mode/json","brace/mode/groovy","brace/mode/xml","vue-json-viewer","brace/snippets/json","lodash.debounce","brace/ext/searchbox","@egova/flagwind-core","@egova/flagwind-web","brace/theme/chrome","brace/ext/language_tools","vue2-ace-editor","vue","brace/snippets/javascript","brace","halo-math","brace/snippets/groovy","jsencrypt","crypto-js","mavon-editor","js-cookie","brace/mode/javascript","@egova/flagwind-web/dist/flagwind-web.umd.js","axios","swiper"],e):"object"===typeof exports?exports["index"]=e(require("vue-property-decorator"),require("brace/mode/json"),require("brace/mode/groovy"),require("brace/mode/xml"),require("vue-json-viewer"),require("brace/snippets/json"),require("lodash.debounce"),require("brace/ext/searchbox"),require("@egova/flagwind-core"),require("@egova/flagwind-web"),require("brace/theme/chrome"),require("brace/ext/language_tools"),require("vue2-ace-editor"),require("vue"),require("brace/snippets/javascript"),require("brace"),require("halo-math"),require("brace/snippets/groovy"),require("jsencrypt"),require("crypto-js"),require("mavon-editor"),require("js-cookie"),require("brace/mode/javascript"),require("@egova/flagwind-web/dist/flagwind-web.umd.js"),require("axios"),require("swiper")):t["index"]=e(t["vue-property-decorator"],t["brace/mode/json"],t["brace/mode/groovy"],t["brace/mode/xml"],t["vue-json-viewer"],t["brace/snippets/json"],t["lodash.debounce"],t["brace/ext/searchbox"],t["@egova/flagwind-core"],t["@egova/flagwind-web"],t["brace/theme/chrome"],t["brace/ext/language_tools"],t["vue2-ace-editor"],t["vue"],t["brace/snippets/javascript"],t["brace"],t["halo-math"],t["brace/snippets/groovy"],t["jsencrypt"],t["crypto-js"],t["mavon-editor"],t["js-cookie"],t["brace/mode/javascript"],t["@egova/flagwind-web/dist/flagwind-web.umd.js"],t["axios"],t["swiper"])})("undefined"!==typeof self?self:this,(function(t,e,n,i,r,o,a,s,c,l,p,u,d,h,f,m,y,v,g,b,w,x,S,I,k,C){return function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(i,r,function(e){return t[e]}.bind(null,r));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s="3061")}({"00fe":function(t,e,n){"use strict";var i=n("d631");t.exports=function(t,e,n){var r=0,o=arguments.length>2?n:i(e),a=new t(o);while(o>r)a[r]=e[r++];return a}},"01a6":function(e,n){e.exports=t},"04ca":function(t,e,n){"use strict";var i=n("10a7"),r=n("ec2f"),o=/#|\.prototype\./,a=function(t,e){var n=c[s(t)];return n===p||n!==l&&(r(e)?i(e):!!e)},s=a.normalize=function(t){return String(t).replace(o,".").toLowerCase()},c=a.data={},l=a.NATIVE="N",p=a.POLYFILL="P";t.exports=a},"06a8":function(t,e,n){},"07ab":function(t,e){t.exports='<div class="u-tree-node">\r\n\x3c!-- <i class="iconfont" :class="data.expand? \'icon-expand\': \'icon-unexpand\'"></i>--\x3e\r\n <i class="iconfont icon-mulushu" @click="onClickNode"></i>\r\n <div class="name" @click="onClickNode">{{data.name}}</div>\r\n <i-dropdown @on-click="onClick" transfer transfer-class-name="node-oprate" v-if="data.id !== \'virtual_root_directory\'">\r\n <i-icon type="ios-more" />\r\n <i-dropdown-menu slot="list">\r\n <i-dropdown-item v-for="item in actions" :key="item.name" :name="item.name">\r\n <template v-if="item.name === \'import\'">\r\n <i-upload\r\n class="action-item"\r\n :action="uploadAction"\r\n :data="uploadParams"\r\n accept=".json"\r\n :headers="headers"\r\n :show-upload-list="false"\r\n :format="[\'json\']"\r\n :on-success="onSuccess"\r\n :before-upload="onBeforeUpload"\r\n :on-format-error="onFormatError"\r\n >\r\n <i title="导入" class="iconfont icon-import"></i>{{item.text}}\r\n </i-upload>\r\n </template>\r\n <template v-else> <i class="iconfont" :class="\'icon-\' + (item.icon || item.name)"></i>{{item.text}} </template>\r\n </i-dropdown-item>\r\n </i-dropdown-menu>\r\n </i-dropdown>\r\n</div>\r\n'},"086a":function(t,e){t.exports='<i-modal draggable sticky transfer reset-drag-position :mask-closable="false" v-model="show" width="1000" class="u-test-run-modal diy-modal">\r\n <header slot="header">运行结果</header>\r\n <main>\r\n <section class="u-test-run-content">\r\n <section class="title-g">参数</section>\r\n <section class="card-panel context-editor">\r\n <u-base-editor :data.sync="context"></u-base-editor>\r\n </section>\r\n <i-row justify="end">\r\n <i-button class="diy-btn-default" @click="onReset">重置</i-button>\r\n <i-button class="diy-btn-primary" type="primary" @click="onProcess">执行</i-button>\r\n </i-row>\r\n <section class="title-g">结果</section>\r\n <section class="card-panel">\r\n <i-tabs>\r\n <i-tab-pane label="响应" name="response">\r\n <u-base-editor :class="[\'editor\', error ? \'editor-error\' : \'\']" :data.sync="result" :readOnly="true"></u-base-editor>\r\n </i-tab-pane>\r\n <i-tab-pane label="输出" name="output">\r\n <u-base-editor :data.sync="output" :readOnly="true"></u-base-editor>\r\n </i-tab-pane>\r\n </i-tabs>\r\n </section>\r\n </section>\r\n </main>\r\n <footer slot="footer">\r\n <i-button type="primary" class="diy-btn-primary" @click="onOk">关闭</i-button>\r\n </footer>\r\n</i-modal>\r\n'},"0888":function(t,e,n){"use strict";var i=n("bc85"),r=n("9afe"),o="__core-js_shared__",a=i[o]||r(o,{});t.exports=a},"0941":function(t,e){t.exports='<i-modal draggable sticky transfer reset-drag-position :mask-closable="false" v-model="show" width="1280" class="u-api-project-modal diy-modal">\r\n <header slot="header">添加API</header>\r\n <main>\r\n <i-split v-model="splitHorizontal">\r\n <section slot="left" class="card-panel card-panel-no-right-border">\r\n <div class="card-panel-header">\r\n <span>选择列表</span>\r\n </div>\r\n <div class="card-panel-main">\r\n <u-tree :commonTaskCategoryID="taskCategoryID" :initSelectItem="initNode" :prop-data="treeData" :isTreeList="true" @on-select="onSelect" />\r\n </div>\r\n </section>\r\n <section slot="right" class="right-content">\r\n <i-split v-model="splitVertical" mode="vertical" max="600">\r\n <section slot="top" class="card-panel card-panel-no-bottom-border">\r\n <div class="card-panel-header">\r\n <span>选择模型</span>\r\n </div>\r\n <div class="card-panel-main">\r\n <u-api-project-list\r\n :data="tableData"\r\n :paging.sync="paging"\r\n @on-search="onSearch"\r\n @on-page-index-change="onPageIndexChange"\r\n @on-page-size-change="onPageSizeChange"\r\n @on-selection-change="onSelectionChange"\r\n @on-delete-refresh="getTableData"\r\n @on-row-click="onRowClick"\r\n >\r\n </u-api-project-list>\r\n </div>\r\n </section>\r\n <section slot="bottom" :class="[\'card-panel\', collapse ? \'card-panel-no-bottom-border\' : \'\']">\r\n <div class="card-panel-header">\r\n <span>已选({{checkedLength}})</span>\r\n <span>\r\n <i-poptip confirm title="您确定要清空已选中的数据吗?" transfer placement="top-end" @on-ok="onBatchDelete">\r\n <span class="action-text">\r\n <i class="iconfont icon-delete"></i>\r\n <span>清空</span>\r\n </span>\r\n </i-poptip>\r\n <span class="action-text collapse-text" @click="onClickCollapse">\r\n <span>{{collapse ? "展开" : "收起"}}</span>\r\n <i class="ivu-icon ivu-icon-ios-arrow-forward" :class="{\'icon-arrow-collapse\':collapse}"></i>\r\n </span>\r\n </span>\r\n </div>\r\n <div class="card-panel-main">\r\n <template v-if="checkedData&&checkedData.length">\r\n <i-table class="diy-table" :columns="columns" :data="checkedData">\r\n <template #operates="{row,index}">\r\n <div class="row-actions">\r\n <i-poptip confirm transfer title="确认要删除这条数据吗?" @on-ok="onDelete(row)">\r\n <i title="删除" class="iconfont icon-delete"></i>\r\n </i-poptip>\r\n </div>\r\n </template>\r\n </i-table>\r\n </template>\r\n <template v-else>\r\n <div class="table-no-data">\r\n <div class="table-no-data-bg"></div>\r\n <div class="table-no-data-text">暂无数据</div>\r\n </div>\r\n </template>\r\n </div>\r\n </section>\r\n </i-split>\r\n </section>\r\n </i-split>\r\n <i-spin fix v-if="isLoading">\r\n <i class="spin-icon-load ivu-icon"></i>\r\n </i-spin>\r\n </main>\r\n <footer slot="footer">\r\n <i-button type="primary" class="diy-btn-primary" @click="onSave">确定</i-button>\r\n <i-button class="diy-btn-default" @click="onCancel">取消</i-button>\r\n </footer>\r\n</i-modal>\r\n'},"0a2e":function(t,e,n){},"0d9b":function(t,e,n){"use strict";var i=n("720f"),r=i({}.toString),o=i("".slice);t.exports=function(t){return o(r(t),8,-1)}},"0ddb":function(t,e,n){"use strict";var i=n("82ef"),r=n("bc85"),o=n("ff99"),a=n("6d6e"),s="WebAssembly",c=r[s],l=7!==new Error("e",{cause:7}).cause,p=function(t,e){var n={};n[t]=a(t,e,l),i({global:!0,constructor:!0,arity:1,forced:l},n)},u=function(t,e){if(c&&c[t]){var n={};n[t]=a(s+"."+t,e,l),i({target:s,stat:!0,constructor:!0,arity:1,forced:l},n)}};p("Error",(function(t){return function(e){return o(t,this,arguments)}})),p("EvalError",(function(t){return function(e){return o(t,this,arguments)}})),p("RangeError",(function(t){return function(e){return o(t,this,arguments)}})),p("ReferenceError",(function(t){return function(e){return o(t,this,arguments)}})),p("SyntaxError",(function(t){return function(e){return o(t,this,arguments)}})),p("TypeError",(function(t){return function(e){return o(t,this,arguments)}})),p("URIError",(function(t){return function(e){return o(t,this,arguments)}})),u("CompileError",(function(t){return function(e){return o(t,this,arguments)}})),u("LinkError",(function(t){return function(e){return o(t,this,arguments)}})),u("RuntimeError",(function(t){return function(e){return o(t,this,arguments)}}))},"0e0c":function(t,n){t.exports=e},"10a7":function(t,e,n){"use strict";t.exports=function(t){try{return!!t()}catch(e){return!0}}},"10cf":function(t,e){t.exports='<i-modal\r\n draggable\r\n sticky\r\n reset-drag-position\r\n v-model="value"\r\n class="diy-modal current-variable-modal"\r\n :mask-closable="false"\r\n footer-hide\r\n title="查看当前变量"\r\n>\r\n <i-form\r\n :label-width="95"\r\n class="diy-form"\r\n label-colon\r\n label-position="left"\r\n >\r\n <i-form-item label="环境名称">\r\n <i-input class="diy-input" placeholder="请输入环境名称"></i-input>\r\n </i-form-item>\r\n <i-form-item label="环境域名" class="realm-name">\r\n <i-input class="diy-input" placeholder="请输入环境域名">\r\n <i-select slot="prepend" class="diy-select"> </i-select>\r\n </i-input>\r\n </i-form-item>\r\n <i-form-item label="Header" class="name-value-item">\r\n <i-input class="diy-input"></i-input>\r\n <i-input class="diy-input"></i-input>\r\n </i-form-item>\r\n <i-form-item label="Cookie" class="name-value-item">\r\n <i-input class="diy-input"></i-input>\r\n <i-input class="diy-input"></i-input>\r\n </i-form-item>\r\n <i-form-item label="Global" class="name-value-item">\r\n <i-input class="diy-input"></i-input>\r\n <i-input class="diy-input"></i-input>\r\n </i-form-item>\r\n </i-form>\r\n</i-modal>\r\n'},1215:function(t,e,n){"use strict";e.f=Object.getOwnPropertySymbols},"12f2":function(t,e,n){"use strict";var i=n("10a7");t.exports=!i((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},"16bf":function(t,e,n){"use strict";var i=n("ead7"),r=RangeError;t.exports=function(t,e){var n=i(t);if(n%e)throw new r("Wrong offset");return n}},"17f8":function(t,e,n){"use strict";var i=n("9822"),r=n("dd76"),o=n("d5e3"),a=Error.captureStackTrace;t.exports=function(t,e,n,s){o&&(a?a(t,e):i(t,"stack",r(n,s)))}},"17fe":function(t,e,n){},"193e":function(t,e){t.exports='<article class="project-tree">\r\n <header>\r\n <div class="tree-api">\r\n <div class="title-g">API列表</div>\r\n <div class="add" @click="onAddGroup">\r\n <i class="iconfont icon-xinjianwenjianjia" title="新增分组"></i>\r\n </div>\r\n </div>\r\n <div class="tree-search">\r\n <i-select class="diy-select" transfer v-model="type" @on-change="onFilter">\r\n <i-option v-for="item in typeList" :key="item.value" :value="item.value">{{item.text}}</i-option>\r\n </i-select>\r\n <i-input class="diy-input" v-model="keyword" @on-change="onFilter" placeholder="输入关键字查询">\r\n <i class="iconfont icon-chaxun" slot="prefix"></i>\r\n </i-input>\r\n </div>\r\n </header>\r\n <i-tree :data="renderData" :render="renderContent"></i-tree>\r\n <i-modal\r\n draggable\r\n sticky\r\n reset-drag-position\r\n v-model="showGroupModal"\r\n class="diy-modal"\r\n :mask-closable="false"\r\n transfer\r\n :title="group.id ? \'修改分组\': \'新增分组\'"\r\n >\r\n <i-form :label-width="100" class="diy-form" label-colon>\r\n <i-form-item label="分组名称" required>\r\n <i-input class="diy-input" v-model="group.name"></i-input>\r\n </i-form-item>\r\n <i-form-item v-if="group.id" label="所属项目" required>\r\n <i-select class="diy-select" v-model="group.projectId" transfer filterable @on-change="onChangeProject(true,true)">\r\n <i-option v-for="item in projectList" :value="item.id" :key="item.id">{{item.name}}</i-option>\r\n </i-select>\r\n </i-form-item>\r\n <i-form-item label="分组位置">\r\n <u-group-select :data="groupTree" :current="parent" @on-select="onSelectParent"></u-group-select>\r\n </i-form-item>\r\n </i-form>\r\n <footer slot="footer">\r\n <i-button class="diy-btn-primary" type="primary" @click.stop="onSaveGroup">确定</i-button>\r\n <i-button class="diy-btn-default" @click.stop="onGourpCancel">取消</i-button>\r\n </footer>\r\n </i-modal>\r\n <i-modal draggable sticky reset-drag-position v-model="showInterfaceModal" class="diy-modal" :mask-closable="false" :title="interfaceModel.id ? \'修改接口\': \'新增接口\'">\r\n <i-form :label-width="100" class="diy-form" label-colon>\r\n <i-form-item label="接口名称" required>\r\n <i-input class="diy-input" v-model="interfaceModel.name"></i-input>\r\n </i-form-item>\r\n\r\n <i-form-item v-if="interfaceModel.id" label="所属项目" required>\r\n <i-select class="diy-select" v-model="interfaceModel.projectId" transfer filterable @on-change="onChangeProject(false,true)">\r\n <i-option v-for="item in projectList" :value="item.id" :key="item.id">{{item.name}}</i-option>\r\n </i-select>\r\n </i-form-item>\r\n\r\n <i-form-item label="接口位置" required>\r\n <u-group-select :data="groupTree" :current="parent" @on-select="onSelectParent"></u-group-select>\r\n </i-form-item>\r\n <i-form-item label="接口类型" required>\r\n <i-select v-model="interfaceModel.method" class="diy-select" transfer>\r\n <i-option v-for="item in typeList" v-if="item.value" :key="item.value" :value="item.value">{{item.text}}</i-option>\r\n </i-select>\r\n </i-form-item>\r\n <i-form-item label="需要认证" required>\r\n <i-select v-model="interfaceModel.authFlag" class="diy-select" transfer>\r\n <i-option :key="0" :value="0">否</i-option>\r\n <i-option :key="1" :value="1">是</i-option>\r\n </i-select>\r\n </i-form-item>\r\n </i-form>\r\n <footer slot="footer">\r\n <i-button class="diy-btn-primary" type="primary" @click="onSaveInterface">确定</i-button>\r\n <i-button class="diy-btn-default" @click="onInterfaceCancel">取消</i-button>\r\n </footer>\r\n </i-modal>\r\n <i-modal draggable sticky reset-drag-position v-model="showCopyModal" class="diy-modal" :mask-closable="false" title="复制接口">\r\n <i-form :label-width="100" class="diy-form" label-colon>\r\n <i-form-item label="接口名称" required>\r\n <i-input class="diy-input" v-model="copyName"></i-input>\r\n </i-form-item>\r\n <i-form-item label="选择分组" required>\r\n <u-group-select :isSelector="true" :data="groupTree" :current="parent" @on-select="onSelectParent"></u-group-select>\r\n </i-form-item>\r\n </i-form>\r\n <footer slot="footer">\r\n <i-button class="diy-btn-primary" type="primary" @click="onCopy">确定</i-button>\r\n <i-button class="diy-btn-default" @click="onCopyCancel">取消</i-button>\r\n </footer>\r\n </i-modal>\r\n\r\n <i-modal width="730" draggable sticky reset-drag-position v-model="showMoveModal" class="diy-modal" :mask-closable="false" :title="moveType===\'group\' ? \'分组移动提示\': \'接口移动提示\'">\r\n <div class="api-move-project-body">\r\n <span class="warn-title">\r\n <i-icon type="ios-help-circle" />\r\n 检测到被移动{{moveType===\'group\'?"分组":"接口"}}中存在已关联的授权/环境变量,是否在新项目中新建?\r\n </span>\r\n <span class="second-title">新建授权/环境变量:将在目标项目中新建{{moveType===\'group\'?"分组":"接口"}}绑定的授权/环境变量</span>\r\n <span class="second-title">不新建:将原有的授权/环境变量置为空,仅移动接口</span>\r\n <span class="second-title">取消:取消本次操作</span>\r\n </div>\r\n <footer slot="footer">\r\n <i-button class="diy-btn-primary api-move-ok-btn" type="primary" @click="onMoveOk(true)">新建授权/环境变量</i-button>\r\n <i-button class="diy-btn-default" @click="onMoveOk(false)">不新建</i-button>\r\n <i-button class="diy-btn-default api-move-cancel-btn" @click="onMoveCancel">取消</i-button>\r\n </footer>\r\n </i-modal>\r\n <u-batch-modal :visiable.sync="showBatchModal" :data="categoryApiList" :projectId="projectId" @on-success="onBatchSuccess"></u-batch-modal>\r\n</article>\r\n'},"1a93":function(t,e,n){},"1aea":function(t,e,n){},"1b9a":function(t,e,n){"use strict";var i=TypeError,r=9007199254740991;t.exports=function(t){if(t>r)throw i("Maximum allowed index exceeded");return t}},"1cdf":function(t,e){t.exports=n},"1d6e":function(t,e,n){"use strict";var i=String;t.exports=function(t){try{return i(t)}catch(e){return"Object"}}},"1e82":function(t,e){t.exports=i},"22e8":function(t,e){t.exports='<article class="headers-setting">\r\n <header>\r\n <i-button type="primary" ghost class="diy-btn-primary" @click="onAdd">\r\n <i class="api-icon icon-add"></i>新增\r\n </i-button>\r\n \x3c!-- <i-button type="primary" ghost class="diy-btn-primary">\r\n <i class="api-icon icon-import"></i>导入参数\r\n </i-button>\r\n <i-button type="primary" ghost class="diy-btn-primary">\r\n <i class="api-icon icon-export"></i>导出参数\r\n </i-button> --\x3e\r\n </header>\r\n <i-table\r\n class="diy-table"\r\n :columns="columns"\r\n :data="interfaceModel.requestHeaders"\r\n >\r\n <template slot-scope="{ row,index }" slot="selection">\r\n <i-checkbox\r\n :value="!interfaceModel.requestHeaders[index].disabled"\r\n @on-change="onChangeDisabled($event,interfaceModel.requestHeaders[index])"\r\n >\r\n </i-checkbox>\r\n </template>\r\n <template slot-scope="{ row,index }" slot="name">\r\n <i-input\r\n class="diy-input"\r\n placeholder="输入参数名称"\r\n v-model="interfaceModel.requestHeaders[index].name"\r\n >\r\n </i-input>\r\n </template>\r\n <template slot-scope="{ row,index }" slot="value">\r\n <i-input\r\n class="diy-input"\r\n placeholder="输入参数值"\r\n v-model="interfaceModel.requestHeaders[index].value"\r\n >\r\n </i-input>\r\n </template>\r\n <template slot-scope="{ row,index }" slot="text">\r\n <i-input\r\n class="diy-input"\r\n placeholder="备注"\r\n v-model="interfaceModel.requestHeaders[index].text"\r\n >\r\n </i-input>\r\n </template>\r\n <template slot-scope="{ row,index }" slot="action">\r\n <i-poptip title="确认删除这条数据吗?" confirm @on-ok="onDelete(index)" transfer>\r\n <i class="iconfont icon-delete" title="删除"></i>\r\n </i-poptip>\r\n </template>\r\n </i-table>\r\n</article>\r\n'},"234b":function(t,e,n){"use strict";var i=n("0d9b");t.exports=Array.isArray||function(t){return"Array"===i(t)}},2364:function(t,e){t.exports=r},"236b":function(t,e){t.exports='<article class="after-execution-transfer">\r\n <i-form :label-width="112" class="diy-form" label-colon v-if="interfaceModel.convertConfig">\r\n <i-form-item label="状态字段位置">\r\n <i-input class="diy-input" v-model="interfaceModel.convertConfig.successCodePath"></i-input>\r\n </i-form-item>\r\n <i-form-item label="成功标识">\r\n <i-input class="diy-input" v-model="interfaceModel.convertConfig.successCode"></i-input>\r\n </i-form-item>\r\n <i-form-item label="数据字段位置">\r\n <i-input class="diy-input" v-model="interfaceModel.convertConfig.convertRoot"></i-input>\r\n </i-form-item>\r\n </i-form>\r\n <i-row class="transfer-actions" justify="space-between">\r\n <div class="transfer-actions-title">\r\n <span>配置输出字段</span>\r\n <i-poptip class="action" trigger="hover" content="当前页面的勾选框仅对批量删除有效,实际输出字段为下方列表内的所有内容。" width="300" word-wrap transfer>\r\n <i class="iconfont icon-xinxi"> </i>\r\n </i-poptip>\r\n </div>\r\n <div class="actions-wrapper">\r\n <i-poptip class="action" confirm title="将自动解析转换前结果json至配置输出字段,是否继续?" width="300" @on-ok="onParse" transfer>\r\n <div class="action-item action-text">\r\n <i class="iconfont icon-jiexi-copy"></i>\r\n 解析\r\n </div>\r\n </i-poptip>\r\n <i-poptip class="action" confirm title="将重置当前所有输出字段为上次保存内容,是否确认一键重置?" width="300" @on-ok="onReset" transfer>\r\n <div class="action-item action-text">\r\n <i class="iconfont icon-refresh"></i>\r\n 重置\r\n </div>\r\n </i-poptip>\r\n <div class="action-item action-text action" @click="onAdd">\r\n <i class="iconfont icon-add"></i>\r\n 新增\r\n </div>\r\n <i-poptip class="action" confirm title="将批量删除勾选字段,是否确认?" @on-ok="batchDelete" transfer>\r\n <div class="action-item action-text action-text-delete" :class="selections.length > 0 ? \'\' : \'icon-button-disabled\'">\r\n <i class="iconfont icon-delete"></i>\r\n 批量删除\r\n </div>\r\n </i-poptip>\r\n </div>\r\n </i-row>\r\n <i-table :columns="columns" :data="dataList" class="diy-table" @on-selection-change="onChangeChecked">\r\n <template slot-scope="{ row,index }" slot="path">\r\n <i-input class="diy-input" v-model="dataList[index].paramPath" @on-change="debounceUpdateFieldMappings"> </i-input>\r\n </template>\r\n <template slot-scope="{ row,index }" slot="name">\r\n <i-input class="diy-input half" placeholder="输入字段命名" v-model="dataList[index].name" @on-change="debounceUpdateFieldMappings"> </i-input>\r\n <i-select transfer class="half diy-select" v-model="dataList[index].valueType" placeholder="选择字段类型" @on-change="debounceUpdateFieldMappings">\r\n <i-option v-for="item in valueTypeList" :key="item.name" :value="item.name">{{item.text}} </i-option>\r\n </i-select>\r\n </template>\r\n <template slot-scope="{ row,index }" slot="action">\r\n <span @click="onDelete(index)">\r\n <i title="删除" class="iconfont icon-delete"></i>\r\n </span>\r\n </template>\r\n </i-table>\r\n <i-spin fix v-show="loading">\r\n <i class="spin-icon-load ivu-icon"></i>\r\n </i-spin>\r\n</article>\r\n'},2380:function(t,e,n){},2385:function(t,e,n){"use strict";var i=n("7e75"),r=n("0888");(t.exports=function(t,e){return r[t]||(r[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.35.0",mode:i?"pure":"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.35.0/LICENSE",source:"https://github.com/zloirock/core-js"})},"23c0":function(t,e,n){"use strict";var i={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,o=r&&!i.call({1:2},1);e.f=o?function(t){var e=r(this,t);return!!e&&e.enumerable}:i},2597:function(t,e,n){"use strict";var i=n("6a10"),r=n("d631"),o=n("9b7f"),a=i.aTypedArray,s=i.exportTypedArrayMethod;s("at",(function(t){var e=a(this),n=r(e),i=o(t),s=i>=0?i:n+i;return s<0||s>=n?void 0:e[s]}))},2606:function(t,e,n){"use strict";var i=n("e900"),r=n("d803"),o=Function.prototype,a=i&&Object.getOwnPropertyDescriptor,s=r(o,"name"),c=s&&"something"===function(){}.name,l=s&&(!i||i&&a(o,"name").configurable);t.exports={EXISTS:s,PROPER:c,CONFIGURABLE:l}},"270f":function(t,e,n){},2720:function(t,e,n){"use strict";var i=n("0d9b"),r=n("720f");t.exports=function(t){if("Function"===i(t))return r(t)}},"2a79":function(t,e,n){},"2c48":function(t,e){t.exports='<article class="response" :class="{\'response-expand\':expand}">\r\n <header :class="{\'status-success\': response.code === 200, \'status-fail\': response.code && response.code!==200}">\r\n <span class="title">响应</span>\r\n <span class="collapse-text" @click="onClickCollapse">\r\n <i class="ivu-icon ivu-icon-ios-arrow-forward" :class="{\'icon-arrow-collapse\':expand}"></i>\r\n <span>{{expand ? "收起" : "展开"}}</span>\r\n </span>\r\n <div class="items-div">\r\n <span class="item-name">响应码:</span>\r\n <span class="item-value">{{response.code}}</span>\r\n <span class="item-name">时间:</span>\r\n <span class="item-value">{{response.time}}ms</span>\r\n <span class="item-name">大小:</span>\r\n <span class="item-value">{{response.size}}B</span>\r\n </div>\r\n </header>\r\n <main v-show="expand">\r\n <div class="response-bar">\r\n <div\r\n class="tag"\r\n @click="onClickResponseSettingTpye(item)"\r\n :class="{\'active\': item.name === active.name}"\r\n v-for="(item,index) in responseSettingTypeList"\r\n :key="item.name"\r\n >\r\n <span>{{item.title + (item.num > 0 ? \'(\' + item.num + \')\': "")}}</span>\r\n </div>\r\n </div>\r\n <div class="response-content">\r\n <template v-if="active.name === \'content\'">\r\n <header>\r\n <i-radio-group type="button" class="diy-radio-group-button response-content-radio-group" v-model="contentType">\r\n <i-radio label="originalContent">转换前</i-radio>\r\n <i-radio label="content">转换后</i-radio>\r\n </i-radio-group>\r\n <i-dropdown class="diy-dropdown response-content-dropdown" @on-click="onChangeLang">\r\n <i-button ghost type="primary" class="diy-btn-primary">\r\n <span class="lang">{{lang.toUpperCase()}}</span>\r\n <i class="api-icon icon-select"></i>\r\n </i-button>\r\n <i-dropdown-menu slot="list">\r\n <i-dropdown-item name="json">JSON</i-dropdown-item>\r\n <i-dropdown-item name="xml">XML</i-dropdown-item>\r\n </i-dropdown-menu>\r\n </i-dropdown>\r\n </header>\r\n <u-editor :value="content" :lang="lang" @inited="onEditorInited"></u-editor>\r\n </template>\r\n <div v-if="active.name === \'responseHeaders\'">\r\n <i-table :columns="headerColumns" :data="responseHeaders" class="diy-table"> </i-table>\r\n </div>\r\n <template v-if="active.name === \'requestHeaders\'">\r\n <i-table :columns="headerColumns" :data="requestHeaders" class="diy-table"> </i-table>\r\n </template>\r\n <template v-if="active.name === \'cookies\'">\r\n <i-table :columns="headerColumns" :data="cookies" class="diy-table"> </i-table>\r\n </template>\r\n <template v-if="active.name===\'output\'">\r\n <span class="output">{{output}}</span>\r\n </template>\r\n </div>\r\n </main>\r\n</article>\r\n'},"2e28":function(t,e,n){},"2ece":function(t,e,n){"use strict";var i=n("2720"),r=n("7801"),o=n("12f2"),a=i(i.bind);t.exports=function(t,e){return r(t),void 0===e?t:o?a(t,e):function(){return t.apply(e,arguments)}}},"2f53":function(t,e){t.exports='<span class="wrap">\r\n <i-poptip trigger="hover" :content="tips">\r\n\x3c!-- <div class="diy-info-icon">i</div>--\x3e\r\n <i-icon type="ios-information-circle-outline"></i-icon>\r\n </i-poptip>\r\n <span class="title">{{labelTitle}}</span>\r\n <span v-if="labelColon">:</span>\r\n</span>\r\n'},3061:function(t,e,n){"use strict";if(n.r(e),n.d(e,"ProjectCombineManage",(function(){return lt})),n.d(e,"ProjectCombineModel",(function(){return Kt})),n.d(e,"ProjectComment",(function(){return Le})),n.d(e,"ProjectDetail",(function(){return Fn})),n.d(e,"ProjectList",(function(){return Ie})),n.d(e,"injectEnableUserCenterCookie",(function(){return k})),"undefined"!==typeof window){var i=window.document.currentScript,r=i&&i.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);r&&(n.p=r[1])}var o=n("8bbf"),a=n.n(o),s=n("9839"),c=n.n(s),l=(n("92d1"),n("e02e"),function(t,e){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},l(t,e)});function p(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}l(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var u=function(){return u=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n],e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},u.apply(this,arguments)};function d(t,e,n,i){var r,o=arguments.length,a=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(t,e,n,i);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(o<3?r(a):o>3?r(e,n,a):r(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a}function h(t,e,n,i){function r(t){return t instanceof n?t:new n((function(e){e(t)}))}return new(n||(n=Promise))((function(n,o){function a(t){try{c(i.next(t))}catch(e){o(e)}}function s(t){try{c(i["throw"](t))}catch(e){o(e)}}function c(t){t.done?n(t.value):r(t.value).then(a,s)}c((i=i.apply(t,e||[])).next())}))}function f(t,e){var n,i,r,o,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(t){return function(e){return c([t,e])}}function c(s){if(n)throw new TypeError("Generator is already executing.");while(o&&(o=0,s[0]&&(a=0)),a)try{if(n=1,i&&(r=2&s[0]?i["return"]:s[0]?i["throw"]||((r=i["return"])&&r.call(i),0):i.next)&&!(r=r.call(i,s[1])).done)return r;switch(i=0,r&&(s=[2&s[0],r.value]),s[0]){case 0:case 1:r=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,i=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(r=a.trys,!(r=r.length>0&&r[r.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!r||s[1]>r[0]&&s[1]<r[3])){a.label=s[1];break}if(6===s[0]&&a.label<r[1]){a.label=r[1],r=s;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(s);break}r[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(c){s=[6,c],i=0}finally{n=r=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}}Object.create;function m(t,e,n){if(n||2===arguments.length)for(var i,r=0,o=e.length;r<o;r++)!i&&r in e||(i||(i=Array.prototype.slice.call(e,0,r)),i[r]=e[r]);return t.concat(i||Array.prototype.slice.call(e))}Object.create;"function"===typeof SuppressedError&&SuppressedError;var y=n("6397"),v=n("be65"),g=n.n(v),b=["dex-web:access_token","bigdata-web:access_token","access_token"],w=["admin_sso_token"];function x(t){return g.a.get(t)||localStorage.getItem(t)||void 0}function S(){var t,e=w.map(x).find(Boolean),n=I()&&!!e,i=n?e:null!==(t=b.map(x).find(Boolean))&&void 0!==t?t:"",r=n?{"X-Authorization":"Bearer ".concat(i)}:{Authorization:"Bearer ".concat(i)};return{token:i,isUserCenter:n,headers:r}}var I=function(){return!1};function k(t){I=t}(function(){function t(){}t.isLogin=function(){return void 0!==S()},t.getRemeberLoginName=function(){var t=g.a.get("remember_login_name");return t},t.setRemeberLoginName=function(t){t?g.a.set("remember_login_name",t):g.a.remove("remember_login_name")}})();var C=n("554d"),j=n.n(C),D=function(){function t(){}return t.get=function(t){return this.maps.get(t)},t.set=function(t,e){this.maps.set(t,e)},t.has=function(t){return this.maps.has(t)},t.match=function(t){var e=new Array;return this.maps.forEach((function(n,i){i.startsWith(t)&&e.push(n)})),e},t.create=function(t){for(var e,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];return(e=j.a.Activator).createInstance.apply(e,m([t],n,!1))},t.maps=new Map,t}();function O(t){return function(e,n){var i=t;i&&!D.has(i)&&D.set(i,D.create(t)),Object.defineProperty(e,n,{get:function(){return D.get(i)}})}}function T(t,e){return function(n,i){var r=n[i],o="query"===t?E.queryHandler:E.saveHandler,a=n.constructor,s=D.has(a)?D.get(a):D.create(n.constructor);Object.defineProperty(s,i,{get:function(){return o(s,r,e)}}),D.set(a,s)}}var E=function(){function t(){}return t.queryHandler=function(e,n,i){var r=this;return function(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];return h(r,void 0,void 0,(function(){var r,a,s,c,l,p,u,d,h,m,y,v,g,b,w;return f(this,(function(f){switch(f.label){case 0:r=i,a=r.title,s=void 0===a?"":a,c=r.dataName,l=void 0===c?"":c,p=r.showTip,u=void 0!==p&&p,d=r.showErrorMsg,h=void 0===d||d,f.label=1;case 1:return f.trys.push([1,3,,4]),[4,n.apply(e,o)];case 2:return m=f.sent(),g=void 0,m.hasError?(g=s?"".concat(s,"出错!"):"请求服务失败",g=h?m.message:g,(u||h)&&t.message.error(g),console.error(g),[2,m]):(y=(l?m[l]:m)||"",(!y||y.$isObject()&&y.$isEmpty()||y.$isArray()&&y.$isEmpty()||""===l&&(m.result||[]).$isEmpty())&&(g="".concat(s,"无结果!"),u&&t.message.warning(g),console.warn(g)),[2,y]);case 3:return v=f.sent(),g=s?"".concat(s,"出错!"):"请求服务失败",g=h&&(null===(w=null===(b=v.response)||void 0===b?void 0:b.data)||void 0===w?void 0:w.message)||g,(u||h)&&t.message.error(g),console.error(g,v),[3,4];case 4:return[2]}}))}))}},t.saveHandler=function(e,n,i){var r=this,o=i,a=o.title,s=void 0===a?"":a,c=o.dataName,l=void 0===c?"":c,p=o.showTip,u=void 0!==p&&p,d=o.showErrorMsg,m=void 0===d||d;return function(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];return h(r,void 0,void 0,(function(){var r,o,a,c,p,d;return f(this,(function(h){switch(h.label){case 0:return h.trys.push([0,2,,3]),[4,n.apply(this||e,i)];case 1:return r=h.sent(),c=void 0,r.hasError?(c=s?"".concat(s,"出错!"):"请求服务失败",c=m?r.message:c,(u||m)&&t.message.error(c),console.error(c),[2,r]):(c=s?"".concat(s,"成功!"):"请求服务成功",u&&t.message.success(c),o=l?r[l]:r,[2,o]);case 2:return a=h.sent(),c=s?"".concat(s,"出错!"):"请求服务失败",c=m&&(null===(d=null===(p=a.response)||void 0===p?void 0:p.data)||void 0===d?void 0:d.message)||c,(u||m)&&t.message.error(c),console.error(c,a),[3,3];case 3:return[2]}}))}))}},Object.defineProperty(t,"message",{get:function(){return a.a.prototype.$Message},enumerable:!1,configurable:!0}),t}(),P=(n("68b7"),n("a4d2"),n("d371"),n("cebe")),M=n.n(P),L=window,A=u({},L.commonSetting),N=function(){function t(){this.securityServer=A.securityServer||"",this.adminServer=A.adminServer||""}return t.prototype.url=function(t){return A.baseUrl+t},Object.defineProperty(t.prototype,"applicationContext",{get:function(){return j.a.Application.context},enumerable:!1,configurable:!0}),t.prototype._post=function(t,e){return M.a.post(this.url(t),e).then((function(t){return t.data}))},t.prototype._get=function(t){return M.a.get(this.url(t)).then((function(t){return t.data}))},t.prototype._put=function(t,e){return M.a.put(this.url(t),e).then((function(t){return t.data}))},t.prototype._delete=function(t){return M.a.delete(this.url(t)).then((function(t){return t.data}))},t.prototype._export=function(t,e){return M.a.post(this.url(t),e,{headers:{"X-Requested-With":"XMLHttpRequest","Content-Type":"application/json; charset=UTF-8","Access-Control-Allow-Origin":"*"},responseType:"arraybuffer"}).then((function(t){var e=new Blob([t.data],{type:"application/vnd.ms-excel"}),n=URL.createObjectURL(e);window.location.href=n}))},t}(),q=N,R=n("98f0"),$=n.n(R),_=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return p(e,t),e.prototype.getPublicKey=function(){return h(this,void 0,Promise,(function(){var t;return f(this,(function(e){switch(e.label){case 0:return[4,this._get("".concat(this.securityServer,"/oauth/extras/public-key"))];case 1:return t=e.sent(),g.a.set("public-key",t.result||"none"),[2,t]}}))}))},e.prototype.login=function(t,e){return h(this,void 0,Promise,(function(){return f(this,(function(n){return[2,this._post("".concat(this.securityServer,"/oauth/extras/token"),{client_id:"unity-client",client_secret:"unity",grant_type:"password",password:this.getEncryptPassword(e),username:t})]}))}))},e.prototype.getEncryptPassword=function(t){var e=g.a.get("public-key");if("none"===e||!e)return t;var n=new $.a;return n.setPublicKey(e),n.encrypt(t)},e.prototype.saveCategory=function(t){return t.id?this._put("/unity/api/category",t):this._post("/unity/api/category",t)},e.prototype.deleteCategory=function(t){return this._delete("/unity/api/category/".concat(t))},e.prototype.getCategoryTree=function(t){return this._get("/unity/category/tree?type=".concat(t))},e.prototype.getEnumByType=function(t){return this._get("/free/display/".concat(t))},e.prototype.getItemListByType=function(t){return this._get("/free/display/".concat(t))},d([T("query",{title:"获取加密需要的公钥"})],e.prototype,"getPublicKey",null),d([T("save",{title:"保存分组",showTip:!0,showErrorMsg:!0})],e.prototype,"saveCategory",null),d([T("save",{title:"删除分组",showTip:!0,showErrorMsg:!0})],e.prototype,"deleteCategory",null),d([T("query",{title:"查询分类树"})],e.prototype,"getCategoryTree",null),d([T("query",{title:"查询枚举数据",showTip:!0,showErrorMsg:!0})],e.prototype,"getEnumByType",null),d([T("query")],e.prototype,"getItemListByType",null),e}(q),F=_,B=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return p(e,t),e.prototype.page=function(t){return h(this,void 0,Promise,(function(){return f(this,(function(e){return[2,this._post("/unity/combine-info/page",t)]}))}))},e.prototype.getById=function(t){return h(this,void 0,Promise,(function(){return f(this,(function(e){return[2,this._get("/unity/combine-info/".concat(t))]}))}))},e.prototype.save=function(t){return h(this,void 0,Promise,(function(){return f(this,(function(e){return t.id?[2,this._put("/unity/combine-info",t)]:[2,this._post("/unity/combine-info",t)]}))}))},e.prototype.batchDelete=function(t){return h(this,void 0,Promise,(function(){return f(this,(function(e){return[2,this._post("/unity/combine-info/batch?@state=delete",t)]}))}))},e.prototype.dataModelParams=function(t){return h(this,void 0,Promise,(function(){return f(this,(function(e){return[2,this._post("/unity/data-model/list-request-params",t)]}))}))},e.prototype.apiProjectParams=function(t){return h(this,void 0,Promise,(function(){return f(this,(function(e){return[2,this._post("/unity/api/info/list-request-params",t)]}))}))},e.prototype.testRun=function(t){return h(this,void 0,Promise,(function(){return f(this,(function(e){return[2,this._post("/unity/combine-info/test",t)]}))}))},e.prototype.getDoc=function(t){return this._get("/unity/combine-info/".concat(t,"/doc"))},e.prototype.changeAuthFlag=function(t,e){return h(this,void 0,Promise,(function(){return f(this,(function(n){return[2,this._post("/unity/combine-info/requireauth/changestatus?id=".concat(t,"&authFlag=").concat(e))]}))}))},e.prototype.changeStatus=function(t,e){return h(this,void 0,Promise,(function(){return f(this,(function(n){return[2,this._put("/unity/combine-info/".concat(t,"/change-status?status=").concat(e))]}))}))},e.prototype.copyApi=function(t){return this._post("/unity/combine-info/copy",t)},e.prototype.geHelpDoc=function(){return this._get("/combine-api-help/help.md")},d([T("query",{title:"分页查询数据"})],e.prototype,"page",null),d([T("query",{title:"通过id获取数据详情"})],e.prototype,"getById",null),d([T("save",{title:"保存数据"})],e.prototype,"save",null),d([T("query",{title:"批量删除"})],e.prototype,"batchDelete",null),d([T("query",{title:"批量查询模型请求参数"})],e.prototype,"dataModelParams",null),d([T("query",{title:"批量查询API请求参数"})],e.prototype,"apiProjectParams",null),d([T("query",{title:"接口测试",showTip:!0})],e.prototype,"testRun",null),d([T("get",{title:"获取文档"})],e.prototype,"getDoc",null),d([T("save",{title:"保存数据"})],e.prototype,"changeAuthFlag",null),d([T("save",{title:"保存数据"})],e.prototype,"changeStatus",null),d([T("save",{title:"复制接口"})],e.prototype,"copyApi",null),e}(F),z=B,V=(n("98f4"),function(){function t(){}return t.handlerTreeData=function(e,n,i,r,o){void 0===e&&(e=[]),void 0===i&&(i=""),void 0===r&&(r=n),void 0===o&&(o=!1);var a=[];return e&&e.forEach((function(e){if(e.title=e[n],e.checked=!1,e.selected=!1,e.indeterminate=!1,e.expand=!1,e.children=t.handlerTreeData(e.children,n,i,r),i){var s=e[i];s&&(s=s.map((function(t){return t.title=t[r],t.checked=!1,t.selected=!1,t.indeterminate=!1,t.parentId=e.id,t.parentName=e.title,t})),e.children=(e.children||[]).concat(s))}o&&!e.children.length||a.push(e)})),a},t.handlerTreeData2=function(e,n,i,r,o,a,s){void 0===e&&(e=[]),void 0===i&&(i=""),void 0===r&&(r=n),void 0===o&&(o=!1),void 0===a&&(a=""),void 0===s&&(s="");var c=[];return e&&e.forEach((function(e){if(e.title=e[n],e.checked=!1,e.selected=!1,e.indeterminate=!1,e.expand=!1,e.parentId=e.parentId||a,e.parentName=e.parentName||s,e.children=t.handlerTreeData2(e.children,n,i,r,!1,e.id,e.title),i){var l=e[i];l&&(l=l.map((function(t){return t.title=t[r],t.checked=!1,t.selected=!1,t.indeterminate=!1,t.parentId=e.id,t.parentName=e.title,t})),e.children=(e.children||[]).concat(l))}o&&!e.children.length||c.push(e)})),c},t.treeNodeDirectory=function(e,n){void 0===e&&(e=[]);for(var i="",r=0,o=e;r<o.length;r++){var a=o[r];if(a.id===n)return i=a.name,i;if(a.children&&a.children.length&&(i=t.treeNodeDirectory(a.children,n),i))return a.name+"/"+i}return""},t.treeNodeFatherArray=function(e,n){void 0===e&&(e=[]);for(var i=[],r=0,o=e;r<o.length;r++){var a=o[r];if(a.id===n)return i.push(a),i;if(a.children&&a.children.length&&(i=t.treeNodeFatherArray(a.children,n),i.length>0))return i.unshift(a),i}return[]},t}()),U=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.data=[],e.className=[],e.placeholder="输入关键字查询",e.treeData=[],e.renderData=[],e.keyword="",e.selectItem={},e.expandNodeSet=new Set,e}return p(e,t),e.prototype.onFilter=function(){this.keyword?(this.renderData=this.filterData(this.treeData.$clone()),this.renderData=this.renderData.map((function(t){return t}))):this.renderData=this.treeData.map((function(t){return t}))},e.prototype.match=function(t){var e=this,n=-1!==(t.title||t.name).indexOf(this.keyword),i=!1;return!n&&t.children&&t.children.forEach((function(t){i=e.match(t).matched||e.match(t).childrenMatched||i})),{matched:n,childrenMatched:i}},e.prototype.filterData=function(t){var e=this;if(!t||!Array.isArray(t))return t;var n=t.filter((function(t){return e.match(t).childrenMatched}));return n=n.map((function(t){return t.children&&(t.children=e.filterData(t.children)),t})),n=n.concat(t.filter((function(t){return e.match(t).matched}))),n},e.prototype.clickLeafNode=function(t,e){this.selectItem=e,this.$emit("on-select",this.selectItem)},e.prototype.clickParentNode=function(t,e){this.$set(e,"expand",!e.expand),this.onToggleExpand(e),this.selectItem=e,this.$emit("on-select",this.selectItem)},e.prototype.onLocationSelect=function(t,e){void 0===e&&(e=!0),this.selectItem=t,this.$emit("on-select",this.selectItem,e)},e.prototype.initTreeData=function(t){t&&(this.treeData=t,this.treeData.length&&"virtual_root_directory"===this.treeData[0].id&&this.onToggleExpand(this.treeData[0]),this.renderData=this.treeData.map((function(t){return t})))},e.prototype.watchTaskID=function(t){if(t){var e=V.treeNodeFatherArray(this.treeData,t);if(e.length>0)for(var n=0;n<e.length;n++)n===e.length-1?this.onLocationSelect(e[n],!1):(e[n].expand=!0,this.onToggleExpand(e[n]));this.$nextTick((function(){for(var t=document.getElementsByClassName("ivu-tree-title-selected"),n=null,i=0;i<t.length;i++)if(e.length&&t[i].innerText===e[e.length-1].name){n=t[i];break}t.length&&setTimeout((function(){n.scrollIntoView({behavior:"smooth",block:"center"})}),200)}))}},e.prototype.renderContent=function(t,e){var n=this,i=(e.root,e.node,e.data),r=!!i.children;return this.$set(i,"selected",this.selectItem.id===i.id),t("div",{class:"common-tree-node"},[t("i",r?{class:this.isTreeList?"iconfont icon-mulushu":"iconfont icon-bumenkaohe",on:{click:function(t){r?n.clickParentNode(t,i):n.clickLeafNode(t,i)}}}:{class:"iconfont icon-file",on:{click:function(t){r?n.clickParentNode(t,i):n.clickLeafNode(t,i)}}}),t("p",{on:{click:function(t){r?n.clickParentNode(t,i):n.clickLeafNode(t,i)}}},i.title)])},e.prototype.onToggleExpand=function(t){t.expand?this.expandNodeSet.add(t.id):this.expandNodeSet.delete(t.id)},e.prototype.initSelectItemChange=function(){this.selectItem=this.initSelectItem,this.$forceUpdate()},d([Object(y["config"])({default:null})],e.prototype,"propData",void 0),d([Object(y["config"])({default:function(){return{}}})],e.prototype,"initSelectItem",void 0),d([Object(y["config"])({default:!1})],e.prototype,"isTreeList",void 0),d([Object(y["config"])({default:""})],e.prototype,"commonTaskCategoryID",void 0),d([Object(y["watch"])("data",{immediate:!0,deep:!1}),Object(y["watch"])("propData",{immediate:!0,deep:!1})],e.prototype,"initTreeData",null),d([Object(y["watch"])("commonTaskCategoryID",{immediate:!1})],e.prototype,"watchTaskID",null),d([Object(y["watch"])("initSelectItem")],e.prototype,"initSelectItemChange",null),e=d([Object(y["component"])({template:n("6d46"),components:{}})],e),e}(y["Component"]),H=U,G=(n("58d2"),n("b61c"),function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return p(e,t),e.prototype.onClickNode=function(t){this.data.children&&!this.canChooseFolder&&(this.$set(this.data,"expand",!this.data.expand),t.stopPropagation()),this.data.selected&&t.stopPropagation()},d([Object(y["config"])({default:function(){return{}}})],e.prototype,"data",void 0),d([Object(y["config"])({type:Boolean,default:!1})],e.prototype,"canChooseFolder",void 0),e=d([Object(y["component"])({template:n("d30a")})],e),e}(y["Component"])),K=G,Q=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.tree=[],e.inputValue="",e.visible=!1,e.current={},e}return p(e,t),e.prototype.onValueChange=function(t){if(!t)return this.inputValue="",void(this.current={});var e=this.getNodeById(this.value,this.tree)||{};this.current=e,this.inputValue=V.treeNodeDirectory(this.tree,this.value)||""},e.prototype.renderContent=function(t,e){e.root,e.node;var n=e.data;return this.$set(n,"selected",this.current.id===n.id),t(K,{props:{data:n,canChooseFolder:this.canChooseFolder}})},e.prototype.onTreeDataChange=function(){this.tree=V.handlerTreeData(this.treeData.$clone(),"name",this.leafName,void 0,this.filterEmpty),this.tree&&1===this.tree.length&&"virtual_root_directory"===this.tree[0].id&&(this.tree[0].expand=!0),this.onValueChange(this.value)},e.prototype.getNodeById=function(t,e){for(var n=void 0,i=0,r=e;i<r.length;i++){var o=r[i];if(o.id===t)return o;if(o.children&&o.children.length&&(n=this.getNodeById(t,o.children),n))return n}},e.prototype.onInputChange=function(){this.visible=!0},e.prototype.onSelectChange=function(t,e){this.$emit("input",e.id),this.$emit("on-select",e),this.visible=!1},e.prototype.onClear=function(){this.$emit("input",""),this.$emit("on-select",{})},d([Object(y["config"])({type:String,default:""})],e.prototype,"value",void 0),d([Object(y["config"])({type:Array,default:function(){return[]}})],e.prototype,"treeData",void 0),d([Object(y["config"])({default:"请输入"})],e.prototype,"placeholder",void 0),d([Object(y["config"])({default:"children"})],e.prototype,"leafName",void 0),d([Object(y["config"])({type:Boolean,default:!1})],e.prototype,"filterEmpty",void 0),d([Object(y["config"])({type:Boolean,default:!1})],e.prototype,"readonly",void 0),d([Object(y["config"])({type:Boolean,default:!1})],e.prototype,"canChooseFolder",void 0),d([Object(y["watch"])("value",{immediate:!0})],e.prototype,"onValueChange",null),d([Object(y["watch"])("treeData",{deep:!1,immediate:!0})],e.prototype,"onTreeDataChange",null),e=d([Object(y["component"])({template:n("a1f0"),components:{}})],e),e}(y["Component"]),J=Q,W=(n("9fb0"),function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return p(e,t),e.prototype.saveNode=function(t){return t.id?this._put("/unity/category",t):this._post("/unity/category",t)},e.prototype.deleteTreeNodeById=function(t){return this._delete("/unity/combine-info/category/".concat(t))},e.prototype.exportModel=function(t){return M.a.post(this.url("/unity/combine-info/export"),t,{headers:{"X-Requested-With":"XMLHttpRequest","Content-Type":"application/json; charset=UTF-8","Access-Control-Allow-Origin":"*"},responseType:"arraybuffer"}).then((function(t){var e=new Blob([t.data],{type:"application/json"}),n=URL.createObjectURL(e),i=document.createElement("a");i.href=n,i.download=decodeURI("data-model.json"),i.style.display="none",document.body.appendChild(i),i.target="_blank",i.click(),i.parentNode.removeChild(i),window.URL.revokeObjectURL(n)}))},e.prototype.isCanExportModel=function(t){return this._post("/unity/combine-info/export",t)},e.prototype.confirmImport=function(t){return this._post("/unity/combine-info/import/confirm?key=".concat(t))},e.prototype.cancelImport=function(t){return this._post("/unity/combine-info/import/cancel?key=".concat(t))},d([T("save",{title:"保存",showTip:!1})],e.prototype,"saveNode",null),d([T("delete",{title:"删除",showTip:!1})],e.prototype,"deleteTreeNodeById",null),d([T("save",{title:"导入接口数据",showTip:!0,showErrorMsg:!0})],e.prototype,"confirmImport",null),e}(F)),Y=W,X=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.categoryData={},e.rules={name:[{required:!0,message:"请输入分组名称",trigger:"blur,change"}]},e}return p(e,t),Object.defineProperty(e.prototype,"show",{get:function(){return this.value},set:function(t){this.$emit("input",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isEdit",{get:function(){return this.data.id},enumerable:!1,configurable:!0}),e.prototype.onValueChange=function(t){t||this.$refs.addForm.resetFields()},e.prototype.modalShow=function(t){!1===t?this.categoryData={}:this.categoryData.id=this.data.parentId},e.prototype.selectCategory=function(t){this.categoryData=t,this.data.parentId="virtual_root_directory"===this.categoryData.id?"":this.categoryData.id},e.prototype.onCancel=function(){this.show=!1},e.prototype.onSave=function(){var t=this;this.$refs.addForm.validate((function(e){e&&t.doSave()}))},e.prototype.doSave=function(){return h(this,void 0,void 0,(function(){var t;return f(this,(function(e){switch(e.label){case 0:return this.isEdit&&this.data.id===this.data.parentId?[2,this.$message.warning("所属分组不能选中自身")]:("virtual_root_directory"===this.data.parentId&&(this.data.parentId=""),[4,this.service.saveNode(this.data)]);case 1:return t=e.sent(),t&&!t.hasError&&(this.onCancel(),this.$emit("on-refresh")),[2]}}))}))},d([O(Y)],e.prototype,"service",void 0),d([Object(y["config"])({type:Boolean,default:!1})],e.prototype,"value",void 0),d([Object(y["config"])({type:Array,default:[]})],e.prototype,"categories",void 0),d([Object(y["config"])({default:function(){return{name:"",type:"api_combine",parentId:null}}})],e.prototype,"data",void 0),d([Object(y["watch"])("value")],e.prototype,"onValueChange",null),d([Object(y["watch"])("show")],e.prototype,"modalShow",null),e=d([Object(y["component"])({template:n("3b85"),components:{"u-tree-selector":J}})],e),e}(y["Component"]),Z=X,tt=(n("de03"),function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.actions=[{name:"add",text:"新增",icon:"add-folder"},{name:"edit",text:"编辑"},{name:"delete",text:"删除"},{name:"import",text:"导入",icon:"import"},{name:"export",text:"导出",icon:"export"}],e}return p(e,t),e.prototype.onClick=function(t){this.$emit("on-click",t,this.data)},e.prototype.onClickNode=function(t){this.$set(this.data,"expand",!this.data.expand),this.$emit("on-expand",this.data),this.$emit("on-select",this.data),this.data.selected&&t.stopPropagation()},Object.defineProperty(e.prototype,"uploadAction",{get:function(){return A.baseUrl+"/unity/combine-info/import"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"uploadParams",{get:function(){return{categoryId:this.data.id}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"headers",{get:function(){var t=S().headers;return t},enumerable:!1,configurable:!0}),e.prototype.onSuccess=function(t,e){this.$emit("on-import-success",t,e)},e.prototype.onBeforeUpload=function(t){return-1!==t.name.indexOf(" ")?(this.$Message.warning("文件名不能包含空格"),!1):-1===t.name.indexOf("%")||(this.$Message.warning("文件名不能包含符号%"),!1)},e.prototype.onFormatError=function(t){this.$Message.warning("文件".concat(t.name,"格式错误"))},d([Object(y["config"])({default:function(){return Object.create(null)}})],e.prototype,"data",void 0),d([Object(y["config"])({default:""})],e.prototype,"importUrl",void 0),e=d([Object(y["component"])({template:n("07ab")})],e),e}(y["Component"])),et=tt,nt=(n("44c1"),function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.childService=new z,e.showAddTreeNodeModal=!1,e.type="api_combine",e.tempNode={name:"",type:e.type,parentId:null},e.tempData=[],e.showImportModal=!1,e.importResult={},e.columns=[{type:"index",title:"序号",align:"left",width:80},{title:"名称",align:"left",key:"name",tooltip:!0},{title:"编码",align:"left",key:"code",tooltip:!0},{title:"说明",align:"left",key:"remark",tooltip:!0}],e}return p(e,t),Object.defineProperty(e.prototype,"uploadAction",{get:function(){return A.baseUrl+"/unity/combine-info/import"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"headers",{get:function(){var t=S().headers;return t},enumerable:!1,configurable:!0}),e.prototype.onImportConfirm=function(){return h(this,void 0,void 0,(function(){var t,e;return f(this,(function(n){switch(n.label){case 0:return this.importResult.total!==this.importResult.duplicateNum?[3,2]:[4,this.service.cancelImport(this.importResult.id)];case 1:return t=n.sent(),t&&!t.hasError?(this.$message.success("导入接口数据成功!"),this.showImportModal=!1,[2]):(this.$Message.error(t.message||"导入接口数据失败!"),[2]);case 2:return[4,this.service.confirmImport(this.importResult.id)];case 3:return e=n.sent(),e&&!e.hasError?(this.showImportModal=!1,this.queryTreeData(),[2]):[2]}}))}))},e.prototype.onImportCancel=function(){return h(this,void 0,void 0,(function(){var t;return f(this,(function(e){switch(e.label){case 0:return[4,this.service.cancelImport(this.importResult.id)];case 1:return t=e.sent(),t&&!t.hasError?(this.$message.success("取消成功"),this.showImportModal=!1,[2]):(this.$Message.error(t.message||"取消异常"),[2])}}))}))},e.prototype.onSuccess=function(t,e){if(t&&!t.hasError)return t.result?(this.showImportModal=!0,void(this.importResult=t.result)):(this.$Message.success("导入成功"),void this.queryTreeData());this.$Message.error(t.message||"导入出错,请稍后再试")},e.prototype.onBeforeUpload=function(t){return-1!==t.name.indexOf(" ")?(this.$Message.warning("文件名不能包含空格"),!1):-1===t.name.indexOf("%")||(this.$Message.warning("文件名不能包含符号%"),!1)},e.prototype.onFormatError=function(t){this.$Message.warning("文件".concat(t.name,"格式错误"))},e.prototype.onModelExport=function(t){return h(this,void 0,void 0,(function(){var e,n;return f(this,(function(i){switch(i.label){case 0:return 0===this.data.length?[2]:(e=Object.create(null),e={categoryId:t||null},[4,this.service.isCanExportModel(e)]);case 1:return n=i.sent(),!n||n.hasError?[3,3]:[4,this.service.exportModel(e)];case 2:return i.sent(),[3,4];case 3:n&&n.hasError&&this.$message.error(n.message),i.label=4;case 4:return[2]}}))}))},e.prototype.renderContent=function(t,e){var n=this,i=(e.root,e.node,e.data);return this.$set(i,"selected",this.selectItem.id===i.id),this.$set(i,"expand",this.expandNodeSet.has(i.id)),t(et,{props:{data:i},on:{"on-click":function(t,e){n.handleNodeOprate(t,e)},"on-select":function(t){n.onSelect(t)},"on-import-success":function(t,e){n.onSuccess(t,e)},"on-expand":function(t){n.onToggleExpand(t)}}})},e.prototype.handleNodeOprate=function(t,e){switch(t){case"add":this.onAddChildNode(e);break;case"edit":this.onEditNode(e);break;case"delete":this.onDeleteNode(e);break;case"export":this.onModelExport(e.id);break}},e.prototype.onSelect=function(t,e){void 0===e&&(e=!0),this.selectItem=t,this.$emit("on-select",this.selectItem,e)},e.prototype.initSelectItemChange=function(){this.selectItem=this.initSelectItem,this.selectItem.id&&this.onSelect(this.selectItem)},e.prototype.watchTaskID=function(t){if(t){var e=V.treeNodeFatherArray(this.data,t);if(e.length>0)for(var n=0;n<e.length;n++)n===e.length-1?this.onSelect(e[n],!1):(e[n].expand=!0,this.onToggleExpand(e[n]));this.$nextTick((function(){var t=document.getElementsByClassName("ivu-tree-title-selected");t.length&&setTimeout((function(){t[0].scrollIntoView({behavior:"smooth",block:"center"})}),200)}))}},e.prototype.onAddTreeNode=function(){this.tempNode={name:"",type:this.type},this.showAddTreeNodeModal=!0},e.prototype.onAddChildNode=function(t){this.tempNode={parentId:t.id,name:"",type:this.type},this.showAddTreeNodeModal=!0},e.prototype.onEditNode=function(t){this.tempNode=u({},t),this.showAddTreeNodeModal=!0},e.prototype.onDeleteNode=function(t){return h(this,void 0,void 0,(function(){var e,n=this;return f(this,(function(i){switch(i.label){case 0:return t.children&&t.children.length?[2,this.$message.warning("无法删除非空文件夹!")]:[4,this.getChildren(t)];case 1:return e=i.sent(),e?[2,this.$message.warning("无法删除非空文件夹!")]:(this.$Modal.confirm({title:"确定要删除【".concat(t.name,"】吗?"),onOk:function(){return h(n,void 0,void 0,(function(){return f(this,(function(e){switch(e.label){case 0:return[4,this.service.deleteTreeNodeById(t.id)];case 1:return e.sent(),this.queryTreeData(),[2]}}))}))}}),[2])}}))}))},e.prototype.getChildren=function(t){return h(this,void 0,void 0,(function(){var e,n;return f(this,(function(i){switch(i.label){case 0:return e={condition:{categoryId:t.id}},[4,this.childService.page(e)];case 1:return n=i.sent(),[2,Promise.resolve(n&&!n.hasError&&n.totalCount>0)]}}))}))},e.prototype.queryTreeData=function(){return h(this,void 0,void 0,(function(){var t;return f(this,(function(e){switch(e.label){case 0:return[4,this.service.getCategoryTree(this.type)];case 1:return t=e.sent(),t&&!t.hasError&&(this.tempData=t.result||[],this.tempData.length>0?(this.tempData.forEach((function(t){t.parentId||(t.parentId="virtual_root_directory")})),this.data=[u(u({},this.tempData[0]),{id:"virtual_root_directory",children:this.tempData,jobs:[],name:"全部",expand:!0,parentId:null,parentName:null})],this.onToggleExpand(this.data[0])):(this.data=[{id:"virtual_root_directory",children:this.tempData,jobs:[],name:"全部",expand:!0,parentId:null,parentName:null}],this.onToggleExpand(this.data[0])),this.$emit("on-tree-data",this.tempData)),!this.initSelectItem.id&&this.data.length&&(this.$set(this.data[0],"selected",!0),this.onSelect(this.data[0])),[2]}}))}))},e.prototype.mounted=function(){this.queryTreeData()},d([O(Y)],e.prototype,"service",void 0),d([Object(y["config"])({default:""})],e.prototype,"taskCategoryID",void 0),d([Object(y["watch"])("initSelectItem",{immediate:!0})],e.prototype,"initSelectItemChange",null),d([Object(y["watch"])("taskCategoryID",{immediate:!1})],e.prototype,"watchTaskID",null),e=d([Object(y["component"])({template:n("46d3"),components:{"u-add-node":Z}})],e),e}(H)),it=nt,rt=n("a93c"),ot=(n("3497"),n("9b65"),'<style>body { font-family: Arial, sans-serif; line-height: 1.6;margin: 20px;color: #333;background-color: #fff;} h1, h2, h3, h4,h5,h6 { font-weight: bold; margin-bottom: 20px; color: #333; border-bottom: 2px solid #ddd; padding-bottom: 10px;} h1 { font-size: 2.5em;} h2 { font-size: 2em; } h3 {font-size: 1.75em;} h4 {font-size: 1.5em;} h5 {font-size: 1.25em;} h6 {font-size: 1em;} p { margin-bottom: 1em;} ul, ol { margin-bottom: 1em; padding-left: 40px;} li {margin-bottom: 0.5em;} a { color: #0366d6; text-decoration: none;} a:hover {text-decoration: underline;} pre, code { background-color: #f0f0f0; padding: 5px; font-family: Consolas, "Courier New", monospace;} pre { padding: 10px; overflow-x: auto;} blockquote { border-left: 4px solid #dfe2e5; padding: 10px 20px; margin: 20px 0; background-color: #f9f9f9; color: #555;} table { width: 100%; border-collapse: collapse; margin-bottom: 20px;} th,td { border: 1px solid #ddd; padding: 8px; text-align: left;} th { background-color: #f3f3f3; font-weight: bold;} tr:nth-child(even) { background-color: #f9f9f9;} img { max-width: 100%; height: auto; display: block; margin: 20px 0;} @media print { body {font-size: 12pt;} table { border: 1px solid black;} th, td {border: 1px solid black; } pre,code { background-color: #f0f0f0;} a { color: black; text-decoration: none;} h1, h2, h3, h4, h5, h6 { color: black; border: none;} }</style>'),at=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.markdownOption={},e.render="",e.toolbars={},e}return p(e,t),Object.defineProperty(e.prototype,"show",{get:function(){return this.value},set:function(t){this.$emit("input",t)},enumerable:!1,configurable:!0}),e.prototype.onSave=function(t,e){var n=document.getElementById("printf");n.contentDocument.write(e),n.contentDocument.close(),n.contentWindow.print()},e.prototype.onChange=function(t,e){this.render=ot+e},e.prototype.onMenuClick=function(t){"pdf"===t?this.onSavePdf():this.onSaveHtml()},e.prototype.onSavePdf=function(){var t=document.getElementById("printf");t.contentDocument.write(this.render),t.contentDocument.close(),t.contentWindow.print()},e.prototype.onSaveHtml=function(){var t="接口文档";try{var e=this.doc.indexOf("#"),n=this.doc.indexOf("\n");t=this.doc.substring(e,n)}catch(o){}var i=document.createElement("a");i.download="".concat(t,".html"),i.style.display="none";var r=new Blob([this.render],{type:"text/html"});i.href=window.URL.createObjectURL(r),document.body.appendChild(i),i.click(),document.body.removeChild(i)},e.prototype.onOk=function(){this.show=!1},d([Object(y["config"])({type:Boolean,default:!1})],e.prototype,"value",void 0),d([Object(y["config"])({type:String})],e.prototype,"doc",void 0),e=d([Object(y["component"])({name:"data-model-doc",template:n("45bb"),components:{"mavon-editor":rt["mavonEditor"]}})],e),e}(y["View"]),st=at,ct=(n("da9a"),function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.split=.2,e.initNode={},e.currentNode=Object.create(null),e.treeData=[],e.showCopyModal=!1,e.copyData={},e.categoryData={},e.list=[],e.selection=[],e.isContainsPublished=!1,e.columns=[{type:"selection",align:"center",width:80*window.pageRatio},{title:"名称",key:"name",align:"left",class:"STRING",ellipsis:!0,tooltip:!0,width:225*window.pageRatio,resizable:!0},{title:"编码",key:"code",align:"left",class:"STRING",ellipsis:!0,tooltip:!0,width:225*window.pageRatio,resizable:!0},{title:"描述",key:"description",align:"left",class:"STRING",ellipsis:!0,tooltip:!0,width:225*window.pageRatio,resizable:!0},{title:"是否需要认证",align:"left",slot:"authFlag",width:160*window.pageRatio,resizable:!0},{title:"发布状态",align:"left",slot:"status",width:180*window.pageRatio,resizable:!0},{title:"接口文档",align:"left",slot:"doc",width:120*window.pageRatio,resizable:!0},{title:"操作",align:"left",slot:"operates",width:180*window.pageRatio}],e.paging={pageIndex:1,pageSize:10,totalCount:0},e.loading=!1,e.doc="",e.docShow=!1,e.formData={name:void 0,code:void 0},e.taskCategoryID="",e}return p(e,t),Object.defineProperty(e.prototype,"form",{get:function(){return this.$refs["searchForm"]},enumerable:!1,configurable:!0}),e.prototype.mounted=function(){var t=this.$route.query.categoryId;t&&(this.initNode={id:t})},e.prototype.onNodeSelect=function(t,e){e&&(this.taskCategoryID="",this.currentNode=t,this.onQuery())},e.prototype.onReset=function(){this.form.resetFields(),this.onQuery()},e.prototype.onQuery=function(){this.$set(this.paging,"pageIndex",1),this.doQuery()},e.prototype.doQuery=function(){var t,e,n,i;return h(this,void 0,void 0,(function(){var r,o;return f(this,(function(a){switch(a.label){case 0:if(!(null===(t=this.currentNode)||void 0===t?void 0:t.id))return[2];a.label=1;case 1:return a.trys.push([1,,3,4]),this.loading=!0,r=Object.create(null),r.condition=u(u({},this.formData),{categoryId:"virtual_root_directory"===(null===(e=this.currentNode)||void 0===e?void 0:e.id)?"":this.currentNode.id}),r.paging=this.paging,[4,this.service.page(r)];case 2:return o=a.sent(),((null===o||void 0===o?void 0:o.result)||[]).forEach((function(t){t._disabled="PUBLISHED"===t.status})),this.list=null!==(n=o&&o.result)&&void 0!==n?n:[],this.paging.totalCount=null!==(i=o&&o.totalCount)&&void 0!==i?i:0,[3,4];case 3:return this.loading=!1,[7];case 4:return[2]}}))}))},e.prototype.onPageIndexChange=function(t){this.$set(this.paging,"pageIndex",t),this.doQuery()},e.prototype.onPageSizeChange=function(t){this.$set(this.paging,"pageIndex",1),this.$set(this.paging,"pageSize",t),this.doQuery()},e.prototype.onDetail=function(t){var e=null!==t&&void 0!==t?t:{},n=e.id,i=e.categoryId;this.onAdd(n,i,!1)},e.prototype.onEdit=function(t){var e=null!==t&&void 0!==t?t:{},n=e.id,i=e.categoryId;this.onAdd(n,i,!0)},e.prototype.onAdd=function(t,e,n){var i;return void 0===n&&(n=!0),h(this,void 0,void 0,(function(){var r;return f(this,(function(o){return"virtual_root_directory"!==(null===(i=this.currentNode)||void 0===i?void 0:i.id)||t?(this.$router.push({replace:!0,name:"combine-add",query:(r={isEdit:n?"1":"0",id:null!==t&&void 0!==t?t:"",categoryId:e||this.currentNode.id},r["_".concat(t?"edit":"add")]=Date.now().toString(),r)}),[2]):[2]}))}))},e.prototype.onDelete=function(t){return h(this,void 0,void 0,(function(){var e,n;return f(this,(function(i){switch(i.label){case 0:return e=t.id,e?[4,this.service.batchDelete([e])]:[2];case 1:return n=i.sent(),n&&!n.hasError&&this.onQuery(),[2]}}))}))},e.prototype.onBatchDelete=function(){var t=this,e=this.selection.map((function(t){return t.id}));e.length&&!this.isContainsPublished&&this.$modal.confirm({title:"将批量删除所选内容,是否继续?",onOk:function(){return h(t,void 0,void 0,(function(){var t;return f(this,(function(n){switch(n.label){case 0:return[4,this.service.batchDelete(e)];case 1:return t=n.sent(),t&&!t.hasError&&(this.onQuery(),this.selection=[]),[2]}}))}))}})},e.prototype.onCopy=function(t){var e=t.$clone();this.copyData={id:e.id,code:e.code,name:e.name,categoryId:e.categoryId},this.categoryData.id=e.categoryId,this.copyData.name+="_copy",this.copyData.code+="_copy",this.showCopyModal=!0},e.prototype.onCopyConfirm=function(){return h(this,void 0,void 0,(function(){var t;return f(this,(function(e){switch(e.label){case 0:return this.copyData.name?this.copyData.code?this.copyData.categoryId?[4,this.service.copyApi(this.copyData)]:[2,this.$message.warning("请选择分组")]:[2,this.$message.warning("请填写接口编码")]:[2,this.$message.warning("请填写接口名称")];case 1:if(t=e.sent(),t&&!t.hasError)this.copyData={},this.categoryData={},this.showCopyModal=!1,this.doQuery();else if(t&&t.hasError&&t.message)return[2,this.$message.error(t.message)];return[2]}}))}))},e.prototype.onCopyCancel=function(){this.copyData={},this.categoryData={},this.showCopyModal=!1},e.prototype.onTreeData=function(t){this.treeData=t.$clone()},e.prototype.selectCategory=function(t){this.categoryData=t,this.copyData.categoryId=t.id},e.prototype.onAuthFlagChange=function(t,e,n){return h(this,void 0,void 0,(function(){var n,i;return f(this,(function(r){switch(r.label){case 0:return n=e.id,n?[4,this.service.changeAuthFlag(n,t?1:0)]:[2];case 1:return i=r.sent(),(null===i||void 0===i?void 0:i.hasError)||(e.authFlag=t?1:0),[2]}}))}))},e.prototype.onStatusChange=function(t,e,n){return h(this,void 0,void 0,(function(){var n,i;return f(this,(function(r){switch(r.label){case 0:return n=e.id,n?[4,this.service.changeStatus(n,t?1:0)]:[2];case 1:return i=r.sent(),(null===i||void 0===i?void 0:i.hasError)||(e.status=t?"PUBLISHED":"NOT_PUBLISHED"),[2]}}))}))},e.prototype.onSelectChange=function(t){this.selection=t,this.isContainsPublished=!!this.selection.find((function(t){return"PUBLISHED"===t.status}))},e.prototype.onOpenDoc=function(t){return h(this,void 0,void 0,(function(){var e;return f(this,(function(n){switch(n.label){case 0:return(null===t||void 0===t?void 0:t.id)?[4,this.service.getDoc(t.id)]:[3,2];case 1:e=n.sent(),(null===e||void 0===e?void 0:e.hasError)||(this.doc=e.result,this.docShow=!0),n.label=2;case 2:return[2]}}))}))},e.prototype.activated=function(){this.currentNode&&this.onQuery()},e.prototype.onRowClick=function(t,e){"virtual_root_directory"===this.currentNode.id&&(this.taskCategoryID=t.categoryId)},d([O(z)],e.prototype,"service",void 0),e=d([Object(y["component"])({name:"ProjectCombineManage",template:n("ccf6"),components:{"u-type-tree":it,"u-data-model-doc":st,"u-tree-selector":J}})],e),e}(y["View"])),lt=ct,pt=(n("2380"),n("ce8f")),ut=n("01a6"),dt=n("8380"),ht=n.n(dt),ft=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.option={showPrintMargin:!1,enableEmmet:!0,enableBasicAutocompletion:!0,enableSnippets:!0,enableLiveAutocompletion:!0,showFoldWidgets:!1,wrap:!0,fontSize:16,fixedWidthGutter:!0},e}return p(e,t),e.prototype.editorInit=function(t){n("1cdf"),n("9842"),n("5217"),n("8214"),n("64d5");var e=this,i=n("92ad"),r=i.acequire("ace/ext/language_tools");r.addCompleter({getCompletions:function(t,n,i,r,o){e.setCompletions(t,n,i,r,o)}}),this.$emit("inited",t)},e.prototype.setCompletions=function(t,e,n,i,r){return 0===i.length?r(null,[]):r(null,this.diyKeywordList)},d([Object(ut["PropSync"])("model",{default:""})],e.prototype,"code",void 0),d([Object(pt["config"])({default:"groovy"})],e.prototype,"lang",void 0),d([Object(pt["config"])({type:Array,default:function(){return[]}})],e.prototype,"diyKeywordList",void 0),e=d([Object(pt["component"])({template:n("9915"),components:{editor:ht.a}})],e),e}(pt["Component"]),mt=ft,yt=(n("ca1f"),function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.editor={},e}return p(e,t),e.prototype.onEditorInited=function(t){this.editor=t,this.editor.setReadOnly(this.readOnly)},e.prototype.onReadOnlyChange=function(){this.editor.setReadOnly(this.readOnly)},d([Object(y["propSync"])("data")],e.prototype,"script",void 0),d([Object(y["config"])({type:Boolean,default:!1})],e.prototype,"readOnly",void 0),d([Object(y["watch"])("readOnly")],e.prototype,"onReadOnlyChange",null),e=d([Object(y["component"])({template:n("e718"),components:{"u-editor":mt}})],e),e}(y["Component"])),vt=yt,gt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return p(e,t),e.prototype.dataModel=function(t){return this._post("/unity/data-model/page",t)},e.prototype.getMavonDoc=function(t){return this._get("/unity/data-model/".concat(t,"/render"))},e.prototype.getDataModelTree=function(){return this._get("/unity/data-model/tree")},d([T("post",{title:"分页查询数据模型"})],e.prototype,"dataModel",null),d([T("get",{title:"获取文档"})],e.prototype,"getMavonDoc",null),d([T("query",{title:"查询分类树"})],e.prototype,"getDataModelTree",null),e}(F),bt=gt,wt=(n("e6c9"),function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.condition={code:"",name:""},e.columns=[{type:"selection",title:"全选",align:"center",width:60},{title:"名称",align:"left",key:"name",tooltip:!0},{title:"编码",align:"left",key:"code",tooltip:!0},{title:"数据源",align:"left",key:"sourceName",tooltip:!0},{title:"是否开启缓存",align:"left",slot:"enableCache",width:135},{title:"过期时间(s)",align:"left",key:"expireSeconds",width:135},{title:"描述",align:"left",key:"description",tooltip:!0},{title:"接口文档",align:"left",slot:"doc",width:110}],e.doc="",e.docShow=!1,e}return p(e,t),e.prototype.mounted=function(){},e.prototype.init=function(){},e.prototype.onSearch=function(){this.$emit("on-search",this.condition)},e.prototype.onEmpty=function(){this.condition.code="",this.condition.name="",this.$emit("on-search",this.condition)},e.prototype.onSelected=function(t){this.$emit("on-selection-change",t)},e.prototype.onPageIndexChange=function(t){this.$emit("on-page-index-change",t)},e.prototype.onPageSizeChange=function(t){this.$emit("on-page-size-change",t)},e.prototype.onOpenDoc=function(t){return h(this,void 0,void 0,(function(){var e;return f(this,(function(n){switch(n.label){case 0:return(null===t||void 0===t?void 0:t.typeId)?[4,this.service.getMavonDoc(t.typeId)]:[3,2];case 1:e=n.sent(),(null===e||void 0===e?void 0:e.hasError)||(this.doc=e.result,this.docShow=!0),n.label=2;case 2:return[2]}}))}))},e.prototype.onRowClick=function(t,e){this.$emit("on-row-click",t.categoryId)},d([O(bt)],e.prototype,"service",void 0),d([Object(y["config"])({default:function(){return[]}})],e.prototype,"data",void 0),d([Object(ut["PropSync"])("paging",{default:function(){return null}})],e.prototype,"page",void 0),e=d([Object(y["component"])({template:n("82af"),components:{"u-data-model-doc":st}})],e),e}(y["View"])),xt=wt,St=(n("a121"),function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.splitHorizontal=.25,e.splitVertical=.6,e.isLoading=!1,e.taskCategoryID="",e.treeData=[],e.tempData=[],e.currentNode={},e.initNode={},e.condition={categoryId:"",code:"",name:""},e.paging={totalCount:0,pageIndex:1,pageSize:10},e.tableData=[],e.collapse=!1,e.checkedData=[],e.lastCheckedData=[],e.columns=[{title:"编码",align:"left",key:"code",class:"STRING",ellipsis:!0,tooltip:!0},{title:"名称",align:"left",key:"name",class:"STRING",ellipsis:!0,tooltip:!0},{title:"描述",align:"left",key:"description",class:"STRING",ellipsis:!0,tooltip:!0},{title:"操作",key:"operates",slot:"operates",align:"left",width:80}],e}return p(e,t),Object.defineProperty(e.prototype,"checkedLength",{get:function(){return this.checkedData.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"show",{get:function(){return this.value},set:function(t){this.$emit("input",t)},enumerable:!1,configurable:!0}),e.prototype.onShowChange=function(t){if(!this.show)return this.tableData=[],void(this.checkedData=[]);var e=this.data.$clone();this.checkedData=e.map((function(t){return u(u({},t),{code:t.typeCode,description:t.typeDescription})})),this.init()},e.prototype.init=function(){this.getTreeData()},e.prototype.getTreeData=function(){return h(this,void 0,void 0,(function(){var t;return f(this,(function(e){switch(e.label){case 0:return this.isLoading=!0,[4,this.service.getDataModelTree()];case 1:return t=e.sent(),this.isLoading=!1,t&&!t.hasError&&(this.tempData=V.handlerTreeData(t.result||[],"name"),this.tempData.length>0?(this.tempData.forEach((function(t){t.parentId||(t.parentId="virtual_root_directory")})),this.treeData=[u(u({},this.tempData[0]),{id:"virtual_root_directory",children:this.tempData,jobs:[],name:"全部",title:"全部",expand:!0,parentId:null,parentName:null})]):this.treeData=[{id:"virtual_root_directory",children:this.tempData,jobs:[],name:"全部",title:"全部",expand:!0,parentId:null,parentName:null}],this.treeData.length&&(this.initNode=this.treeData[0],this.onSelect(this.treeData[0]))),[2]}}))}))},e.prototype.onSelect=function(t,e){void 0===e&&(e=!0),e&&(this.taskCategoryID="",this.currentNode=t,this.condition.categoryId="virtual_root_directory"===this.currentNode.id?"":this.currentNode.id,this.getTableData())},e.prototype.onSearch=function(t){this.condition=t,this.condition.categoryId="virtual_root_directory"===this.currentNode.id?"":this.currentNode.id,this.paging.pageIndex=1,this.getTableData()},e.prototype.getTableData=function(){return h(this,void 0,void 0,(function(){var t,e,n=this;return f(this,(function(i){switch(i.label){case 0:return t=Object.create(null),t.condition=this.condition,t.paging=this.paging,[4,this.service.dataModel(t)];case 1:return e=i.sent(),e&&!e.hasError&&(this.tableData=(e.result||[]).map((function(t){return u(u({},t),{id:void 0,type:"MODEL",typeId:t.id,_checked:n.checkedData.findIndex((function(e){return e.typeId===t.id}))>-1})})),this.lastCheckedData=this.checkedData.filter((function(t){return-1===n.tableData.findIndex((function(e){return e.typeId===t.typeId}))})),this.paging.totalCount=e.totalCount),[2]}}))}))},e.prototype.onPageIndexChange=function(t){this.paging.pageIndex=t,this.getTableData()},e.prototype.onPageSizeChange=function(t){this.paging.pageSize=t,this.getTableData()},e.prototype.onSelectionChange=function(t){t.forEach((function(t){return t._checked=!0})),this.tableData.forEach((function(e){for(var n=0,i=t;n<i.length;n++){var r=i[n];if(e.typeId===r.typeId)return e._checked=!0}return e._checked=!1})),this.checkedData=m(m([],this.lastCheckedData,!0),t,!0)},e.prototype.onBatchDelete=function(){this.checkedData=[],this.lastCheckedData=[],this.tableData=this.tableData.map((function(t){return u(u({},t),{_checked:!1})}))},e.prototype.onDelete=function(t){this.checkedData=this.checkedData.filter((function(e){return e.typeId!==t.typeId})),this.lastCheckedData=this.lastCheckedData.filter((function(e){return e.typeId!==t.typeId})),this.tableData.forEach((function(e){e.typeId===t.typeId&&(e._checked=!1)}))},e.prototype.onClickCollapse=function(){this.collapse=!this.collapse,this.splitVertical=this.collapse?"".concat(.7*window.innerHeight-40*window.pageRatio-1,"px"):.6},e.prototype.onCancel=function(){this.show=!1},e.prototype.onSave=function(){var t=this,e=this.checkedData.filter((function(e){return-1===t.data.findIndex((function(t){return t.typeId===e.typeId}))})),n=this.data.filter((function(e){return-1===t.checkedData.findIndex((function(t){return t.typeId===e.typeId}))}));this.$emit("save","MODEL",e,n)},e.prototype.onRowClick=function(t){"virtual_root_directory"===this.currentNode.id&&(this.taskCategoryID=t)},d([O(bt)],e.prototype,"service",void 0),d([Object(y["config"])({type:Boolean,default:!1})],e.prototype,"value",void 0),d([Object(y["config"])({type:Array,default:[]})],e.prototype,"data",void 0),d([Object(y["watch"])("show")],e.prototype,"onShowChange",null),e=d([Object(y["component"])({template:n("4935"),components:{"u-tree":H,"u-data-model-list":xt}})],e),e}(y["View"])),It=St,kt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return p(e,t),e.prototype.getCategoryTree=function(t){return this._get("/unity/api/category/project/tree?type=".concat(t))},e.prototype.apiProject=function(t){return this._post("/unity/api/info/page",t)},e.prototype.getApiDetail=function(t){return this._get("/unity/api-market/".concat(t,"/detail"))},d([T("query",{title:"查询分类树"})],e.prototype,"getCategoryTree",null),d([T("post",{title:"分页查询数据模型"})],e.prototype,"apiProject",null),d([T("query",{title:"查询详情"})],e.prototype,"getApiDetail",null),e}(F),Ct=kt,jt=(n("7359"),n("2364")),Dt=n.n(jt),Ot=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.value=[],e.paramColumns=[{slot:"selection",width:60,align:"center",title:" "},{title:"参数名",key:"name",align:"left"},{title:"参数值",key:"valueContent",align:"left"},{title:"备注",key:"text",align:"left"}],e.queryDataList=[],e.typeMap={Form:"FormData",X_www_form_urlencoded:"FormUrlEncoded"},e}return p(e,t),e.prototype.getExpand=function(t){return this.value.includes(t)},e.prototype.init=function(){var t,e;(null===(e=null===(t=this.model)||void 0===t?void 0:t.info)||void 0===e?void 0:e.id)&&(this.queryDataList=this.model.queryParams)},Object.defineProperty(e.prototype,"bodyDataList",{get:function(){var t=this.typeMap[this.bodyType];return this.model.formParams.filter((function(e){return e.type===t}))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bodyType",{get:function(){var t,e;return(null===(e=null===(t=this.model)||void 0===t?void 0:t.info)||void 0===e?void 0:e.requestBodyType)||"Form"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isFormData",{get:function(){return"Form"===this.bodyType||"X_www_form_urlencoded"===this.bodyType},enumerable:!1,configurable:!0}),d([Object(y["config"])({default:function(){return{}}})],e.prototype,"model",void 0),d([O(z)],e.prototype,"service",void 0),d([Object(y["watch"])("model",{immediate:!0})],e.prototype,"init",null),e=d([Object(y["component"])({template:n("3a71"),components:{"json-viewer":Dt.a}})],e),e}(y["Component"]),Tt=Ot,Et=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.columns=[{title:"参数名称",key:"name"},{title:"参数类型",slot:"type"},{title:"是否必须",slot:"required"},{title:"参数说明",key:"description"}],e}return p(e,t),Object.defineProperty(e.prototype,"dataList",{get:function(){return this.model.items},enumerable:!1,configurable:!0}),d([Object(y["config"])({default:function(){return{}}})],e.prototype,"model",void 0),e=d([Object(y["component"])({template:n("37f5"),components:{}})],e),e}(y["Component"]),Pt=Et,Mt=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.columns=[{title:"参数名称",key:"name"},{title:"参数类型",slot:"type"},{title:"是否必须",slot:"required"},{title:"默认值",key:"defaultValue"},{title:"参数说明",key:"description"}],e}return p(e,t),Object.defineProperty(e.prototype,"dataList",{get:function(){return this.model.requestParams},enumerable:!1,configurable:!0}),d([Object(y["config"])({default:function(){return{}}})],e.prototype,"model",void 0),e=d([Object(y["component"])({template:n("a0f2"),components:{}})],e),e}(y["Component"]),Lt=Mt,At=(n("45e3"),function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return p(e,t),Object.defineProperty(e.prototype,"params",{get:function(){var t,e;return null===(e=null===(t=this.model)||void 0===t?void 0:t.type)||void 0===e?void 0:e.toLowerCase()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"action",{get:function(){return this.model.action||{}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"detail",{get:function(){return this.model.detail||{}},enumerable:!1,configurable:!0}),e.prototype.onClose=function(){this.show=!1},d([Object(ut["PropSync"])("visiable",{default:!1})],e.prototype,"show",void 0),d([Object(y["config"])({default:function(){return{}}})],e.prototype,"model",void 0),e=d([Object(y["component"])({template:n("ab68"),components:{api:Tt,catalog:Pt,ddcat:Lt}})],e),e}(y["Component"])),Nt=At,qt=(n("bcb8"),function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.condition={name:"",url:""},e.columns=[{type:"selection",title:"全选",align:"center",width:60},{title:"名称",align:"left",key:"name",class:"STRING",ellipsis:!0,tooltip:!0,width:300},{title:"地址",align:"left",key:"url",class:"STRING",ellipsis:!0,tooltip:!0},{title:"查看详情",align:"left",slot:"detail",width:105}],e.detail="",e.detailShow=!1,e}return p(e,t),e.prototype.mounted=function(){},e.prototype.init=function(){},e.prototype.onSearch=function(){this.$emit("on-search",this.condition)},e.prototype.onEmpty=function(){this.condition.name="",this.condition.url="",this.$emit("on-search",this.condition)},e.prototype.onSelected=function(t){this.$emit("on-selection-change",t)},e.prototype.onPageIndexChange=function(t){this.$emit("on-page-index-change",t)},e.prototype.onPageSizeChange=function(t){this.$emit("on-page-size-change",t)},e.prototype.onDetail=function(t){return h(this,void 0,void 0,(function(){var e;return f(this,(function(n){switch(n.label){case 0:return(null===t||void 0===t?void 0:t.typeId)?[4,this.service.getApiDetail(t.typeId)]:[3,2];case 1:e=n.sent(),(null===e||void 0===e?void 0:e.hasError)||(this.detail=e.result||{},this.detailShow=!0),n.label=2;case 2:return[2]}}))}))},e.prototype.onRowClick=function(t,e){this.$emit("on-row-click",t.categoryId)},d([O(Ct)],e.prototype,"service",void 0),d([Object(y["config"])({default:function(){return[]}})],e.prototype,"data",void 0),d([Object(ut["PropSync"])("paging",{default:function(){return null}})],e.prototype,"page",void 0),e=d([Object(y["component"])({template:n("981a"),components:{"u-api-project-detail":Nt}})],e),e}(y["View"])),Rt=qt,$t=(n("eb57"),function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.splitHorizontal=.25,e.splitVertical=.6,e.isLoading=!1,e.taskCategoryID="",e.treeData=[],e.tempData=[],e.currentNode={},e.initNode={},e.condition={categoryId:"",code:"",name:""},e.paging={totalCount:0,pageIndex:1,pageSize:10},e.tableData=[],e.collapse=!1,e.checkedData=[],e.lastCheckedData=[],e.columns=[{title:"名称",align:"left",key:"name",class:"STRING",ellipsis:!0,tooltip:!0,width:300},{title:"地址",align:"left",key:"url",class:"STRING",ellipsis:!0,tooltip:!0},{title:"操作",key:"operates",slot:"operates",align:"left",width:80}],e}return p(e,t),Object.defineProperty(e.prototype,"checkedLength",{get:function(){return this.checkedData.length},enumerable:!1,configurable:!0}),e.prototype.onDataChange=function(t){this.checkedData=t},Object.defineProperty(e.prototype,"show",{get:function(){return this.value},set:function(t){this.$emit("input",t)},enumerable:!1,configurable:!0}),e.prototype.onShowChange=function(t){if(!this.show)return this.tableData=[],void(this.checkedData=[]);var e=this.data.$clone();this.checkedData=e.map((function(t){return u(u({},t),{url:t.typeCode})})),this.init()},e.prototype.init=function(){this.getTreeData()},e.prototype.getTreeData=function(){return h(this,void 0,void 0,(function(){var t;return f(this,(function(e){switch(e.label){case 0:return this.isLoading=!0,[4,this.service.getCategoryTree("api")];case 1:return t=e.sent(),this.isLoading=!1,t&&!t.hasError&&(this.tempData=V.handlerTreeData(t.result||[],"name"),this.tempData.length>0?(this.tempData.forEach((function(t){t.parentId||(t.parentId="virtual_root_directory")})),this.treeData=[u(u({},this.tempData[0]),{id:"virtual_root_directory",children:this.tempData,jobs:[],name:"全部",title:"全部",expand:!0,parentId:null,parentName:null})]):this.treeData=[{id:"virtual_root_directory",children:this.tempData,jobs:[],name:"全部",title:"全部",expand:!0,parentId:null,parentName:null}],this.treeData.length&&(this.initNode=this.treeData[0],this.onSelect(this.treeData[0]))),[2]}}))}))},e.prototype.onSelect=function(t,e){void 0===e&&(e=!0),e&&(this.taskCategoryID="",this.currentNode=t,this.condition.categoryId="virtual_root_directory"===this.currentNode.id?"":this.currentNode.id,this.getTableData())},e.prototype.onSearch=function(t){this.condition=t,this.condition.categoryId="virtual_root_directory"===this.currentNode.id?"":this.currentNode.id,this.paging.pageIndex=1,this.getTableData()},e.prototype.getTableData=function(){return h(this,void 0,void 0,(function(){var t,e,n=this;return f(this,(function(i){switch(i.label){case 0:return t=Object.create(null),t.condition=this.condition,t.paging=this.paging,[4,this.service.apiProject(t)];case 1:return e=i.sent(),e&&!e.hasError&&(this.tableData=(e.result||[]).map((function(t){return u(u({},t),{id:void 0,type:"API",typeId:t.id,_checked:n.checkedData.findIndex((function(e){return e.typeId===t.id}))>-1})})),this.lastCheckedData=this.checkedData.filter((function(t){return-1===n.tableData.findIndex((function(e){return e.typeId===t.typeId}))})),this.paging.totalCount=e.totalCount),[2]}}))}))},e.prototype.onPageIndexChange=function(t){this.paging.pageIndex=t,this.getTableData()},e.prototype.onPageSizeChange=function(t){this.paging.pageSize=t,this.getTableData()},e.prototype.onSelectionChange=function(t){t.forEach((function(t){return t._checked=!0})),this.tableData.forEach((function(e){for(var n=0,i=t;n<i.length;n++){var r=i[n];if(e.typeId===r.typeId)return e._checked=!0}return e._checked=!1})),this.checkedData=m(m([],this.lastCheckedData,!0),t,!0)},e.prototype.onBatchDelete=function(){this.checkedData=[],this.lastCheckedData=[],this.tableData=this.tableData.map((function(t){return u(u({},t),{_checked:!1})}))},e.prototype.onDelete=function(t){this.checkedData=this.checkedData.filter((function(e){return e.typeId!==t.typeId})),this.lastCheckedData=this.lastCheckedData.filter((function(e){return e.typeId!==t.typeId})),this.tableData.forEach((function(e){e.typeId===t.typeId&&(e._checked=!1)}))},e.prototype.onClickCollapse=function(){this.collapse=!this.collapse,this.splitVertical=this.collapse?"".concat(.7*window.innerHeight-40*window.pageRatio-1,"px"):.6},e.prototype.onCancel=function(){this.show=!1},e.prototype.onSave=function(){var t=this,e=this.checkedData.filter((function(e){return-1===t.data.findIndex((function(t){return t.typeId===e.typeId}))})),n=this.data.filter((function(e){return-1===t.checkedData.findIndex((function(t){return t.typeId===e.typeId}))}));this.$emit("save","API",e,n)},e.prototype.onRowClick=function(t){"virtual_root_directory"===this.currentNode.id&&(this.taskCategoryID=t)},d([O(Ct)],e.prototype,"service",void 0),d([Object(y["config"])({type:Boolean,default:!1})],e.prototype,"value",void 0),d([Object(y["config"])({type:Array,default:[]})],e.prototype,"data",void 0),d([Object(y["watch"])("data")],e.prototype,"onDataChange",null),d([Object(y["watch"])("show")],e.prototype,"onShowChange",null),e=d([Object(y["component"])({template:n("0941"),components:{"u-tree":H,"u-api-project-list":Rt}})],e),e}(y["View"])),_t=$t,Ft=(n("9e10"),function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.columns=[{type:"selection",align:"center",width:60},{title:"参数名",align:"left",slot:"name",class:"STRING",ellipsis:!0,tooltip:!0},{title:"类型",align:"left",slot:"type",width:130,class:"STRING",ellipsis:!0,tooltip:!0},{title:"是否必传",align:"left",slot:"required",width:120},{title:"默认值",align:"left",slot:"defaultValue",class:"STRING",ellipsis:!0,tooltip:!0},{title:"描述",align:"left",slot:"description",class:"STRING",ellipsis:!0,tooltip:!0},{title:"操作",align:"left",slot:"actions"}],e.typeList=[],e.selections=[],e.booleanObj={false:0,true:1},e}return p(e,t),e.prototype.mounted=function(){this.getTypeList()},e.prototype.onEdit=function(t){this.$set(t,"isEdit",!0)},e.prototype.onCancel=function(t){this.data.splice(t,1)},e.prototype.onDelete=function(t,e){this.data.splice(e,1)},e.prototype.onBatchDelete=function(){var t=this;this.selections.length&&this.$modal.confirm({title:"将批量删除所选内容,是否继续?",onOk:function(){t.selections.forEach((function(e){var n=t.data.findIndex((function(t){return t.id===e.id}));n>-1&&t.data.splice(n,1)})),t.selections=[]}})},e.prototype.onAdd=function(){this.data.push({isEdit:!0,id:Math.random().toString(36).slice(-8).toString(),required:!1,type:"STRING"})},e.prototype.onConfirm=function(t,e){""===t.name&&this.$message.warning("请输入参数名"),""===t.type&&this.$message.warning("请选择类型"),""!==t.name&&""!==t.type&&(t.isEdit=!1,this.data.splice(e,1,t))},e.prototype.getTypeList=function(){return h(this,void 0,void 0,(function(){var t;return f(this,(function(e){switch(e.label){case 0:return[4,this.service.getItemListByType("param-type")];case 1:return t=e.sent(),this.typeList=t.result||[],[2]}}))}))},e.prototype.getTypeText=function(t){return(this.typeList.find((function(e){return e.name===t}))||{text:""}).text},e.prototype.onChangeRequired=function(t,e){e.required=!!t},e.prototype.onSelectionChange=function(t){this.selections=t},d([Object(y["config"])({default:function(){return[]}})],e.prototype,"data",void 0),d([Object(y["config"])({default:!0})],e.prototype,"isEdit",void 0),d([O(z)],e.prototype,"service",void 0),e=d([Object(y["component"])({template:n("d8b4")})],e),e}(y["View"])),Bt=Ft,zt=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.columns=[{type:"selection",align:"center",width:60},{title:"参数名",align:"left",slot:"name",class:"STRING",ellipsis:!0,tooltip:!0},{title:"类型",align:"left",slot:"type",class:"STRING",ellipsis:!0,tooltip:!0},{title:"操作",align:"left",slot:"actions"}],e}return p(e,t),e}(Bt),Vt=zt,Ut=(n("cfde"),function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.context="",e.error=!1,e.result="",e.output="",e}return p(e,t),e.prototype.onShowChange=function(){this.show||(this.context="",this.error=!1,this.result="",this.output=""),this.context=this.defalutContext},e.prototype.onDataChange=function(){var t,e,n,i;(null===(t=this.data)||void 0===t?void 0:t.error)?(this.error=!0,this.result=this.getJsonString(null===(e=this.data)||void 0===e?void 0:e.error)):this.result=this.getJsonString(null===(n=this.data)||void 0===n?void 0:n.result),this.output=this.getJsonString(null===(i=this.data)||void 0===i?void 0:i.output)},e.prototype.getJsonString=function(t){var e="";try{e="object"===typeof t?JSON.stringify(t,null,4):t.toString()}catch(n){}return e},Object.defineProperty(e.prototype,"defalutContext",{get:function(){var t={};return this.params.forEach((function(e){t[e.name]=""})),this.getJsonString(t)},enumerable:!1,configurable:!0}),e.prototype.onProcess=function(){try{var t=JSON.parse(this.context);this.$emit("on-run",t)}catch(e){this.$message.error("请输入正确的 Json 脚本")}},e.prototype.onReset=function(){this.context=this.defalutContext},e.prototype.onOk=function(){this.show=!1},e.prototype.onCancel=function(){this.show=!1},d([Object(y["config"])({default:function(){return[]}})],e.prototype,"params",void 0),d([Object(y["config"])({default:{}})],e.prototype,"data",void 0),d([Object(ut["PropSync"])("visible",{default:!1})],e.prototype,"show",void 0),d([Object(y["watch"])("show")],e.prototype,"onShowChange",null),d([Object(y["watch"])("data")],e.prototype,"onDataChange",null),e=d([Object(y["component"])({template:n("086a"),components:{"u-base-editor":vt}})],e),e}(y["View"])),Ht=Ut,Gt=(n("2e28"),function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.model={authFlag:1,type:"SCRIPT",status:"NOT_PUBLISHED",relations:[],reqParams:[],respParams:[]},e.title="合并模型",e.id="",e.categoryId="",e.saveing=!1,e.isEdit=!1,e.isAdd=!1,e.rules={name:[{required:!0,message:"请输入名称",trigger:"blur"}],code:[{required:!0,message:"请输入编码",trigger:"blur"}]},e.relationColumns=[{title:"类型",align:"left",key:"type",slot:"type",width:280},{title:"名称",align:"left",key:"name",class:"STRING",ellipsis:!0,tooltip:!0},{title:"编码或地址",align:"left",key:"typeCode",class:"STRING",ellipsis:!0,tooltip:!0},{title:"操作",key:"operates",slot:"operates",align:"left",width:100}],e.testShow=!1,e.testResult={},e.dataModelShow=!1,e.apiProjectShow=!1,e.dataModelDoc="",e.dataModelDocShow=!1,e.apiProjectDetail="",e.apiProjectDetailShow=!1,e.doc="",e.docShow=!1,e}return p(e,t),Object.defineProperty(e.prototype,"dataModelRelations",{get:function(){var t,e;return null!==(e=null===(t=this.model.relations)||void 0===t?void 0:t.filter((function(t){return"MODEL"===t.type})))&&void 0!==e?e:[]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"apiProjectRelations",{get:function(){var t,e;return null!==(e=null===(t=this.model.relations)||void 0===t?void 0:t.filter((function(t){return"API"===t.type})))&&void 0!==e?e:[]},enumerable:!1,configurable:!0}),e.prototype.onBack=function(){this.$router.push({name:"combine"}),this.$store.commit("tag/closeCurrent",this.$route)},e.prototype.mounted=function(){this.init()},e.prototype.activated=function(){this.init()},e.prototype.init=function(){var t=this.$route.query||{},e=t.isEdit,n=t.id,i=void 0===n?"":n,r=t.categoryId,o=void 0===r?"":r;this.isEdit=1===Number(e),this.isAdd=this.isEdit&&!i,this.categoryId=o,this.title=this.isEdit?this.isAdd?"新增合并模型":"编辑合并模型":"合并模型详情",i!==this.id&&(this.id=i,this.getById())},e.prototype.getById=function(){return h(this,void 0,void 0,(function(){var t;return f(this,(function(e){switch(e.label){case 0:return this.id?[4,this.service.getById(this.id)]:[3,2];case 1:t=e.sent(),(null===t||void 0===t?void 0:t.hasError)||(this.model=t.result,this.model.authFlag||(this.model.authFlag=0)),e.label=2;case 2:return[2,Promise.resolve()]}}))}))},e.prototype.onValidate=function(){var t=this;return new Promise((function(e,n){for(var i,r,o,a,s=new Set,c=0;c<(null===(i=t.model.reqParams)||void 0===i?void 0:i.length);c++){var l=t.model.reqParams[c];if(!(null===(r=l.name)||void 0===r?void 0:r.length))return t.$message.error("请求参数名称不能为空!"),n();if(s.has(l.name))return t.$message.error("请求参数有重名!"),n();s.add(l.name)}if(!(null===(o=t.model.relations)||void 0===o?void 0:o.length))return t.$message.error("合并列表不能为空!"),n();if(!(null===(a=t.model.content)||void 0===a?void 0:a.length))return t.$message.error("执行脚本不能为空!"),n();var p=t.$refs.form;null===p||void 0===p||p.validate((function(t){return e(t)}))}))},e.prototype.onSave=function(t){var e=this;return new Promise((function(n,i){return h(e,void 0,void 0,(function(){var e;return f(this,(function(r){switch(r.label){case 0:if(this.saveing)return[2,i()];this.saveing=!0,r.label=1;case 1:return r.trys.push([1,7,8,9]),[4,this.onValidate()];case 2:return r.sent(),this.$set(this.model,"categoryId",this.categoryId),[4,this.service.save(this.model)];case 3:return e=r.sent(),(null===e||void 0===e?void 0:e.hasError)?[3,6]:e.result?(this.id=e.result,[4,this.getById()]):[3,5];case 4:r.sent(),r.label=5;case 5:t&&(this.$message.success("保存数据成功!"),this.onBack()),r.label=6;case 6:return[2,n(!0)];case 7:return r.sent(),[3,9];case 8:return this.saveing=!1,[7];case 9:return[2]}}))}))}))},e.prototype.onAddDataModel=function(){this.dataModelShow=!0},e.prototype.onAddApiProject=function(){this.apiProjectShow=!0},e.prototype.onRelationsSave=function(t,e,n){return h(this,void 0,void 0,(function(){var i,r,o,a,s;return f(this,(function(c){switch(c.label){case 0:return"MODEL"===t?this.dataModelShow=!1:"API"===t&&(this.apiProjectShow=!1),i=n.map((function(t){return t.typeId})),i.length>0&&(this.model.relations=this.model.relations.filter((function(t){return!i.includes(t.typeId)})),this.model.reqParams=this.model.reqParams.filter((function(t){return!i.includes(t.relationTypeId)}))),r=e.map((function(t){return t.typeId})),r.length>0?(o=[],a=[],"MODEL"!==t?[3,2]:(o=e.map((function(e){return u(u({},e),{type:t,typeCode:e.code})})),[4,this.service.dataModelParams(r)])):[3,5];case 1:return s=c.sent(),a=((null===s||void 0===s?void 0:s.result)||[]).map((function(e){return u(u({},e),{relationType:t,relationTypeId:e.modelId})})),[3,4];case 2:return"API"!==t?[3,4]:(o=e.map((function(e){return u(u({},e),{type:t,typeCode:e.url})})),[4,this.service.apiProjectParams(r)]);case 3:s=c.sent(),a=((null===s||void 0===s?void 0:s.result)||[]).map((function(e){return u(u({},e),{relationType:t,relationTypeId:e.apiId,required:!1,type:"STRING"})})),c.label=4;case 4:this.model.relations=m(m([],this.model.relations,!0),o,!0),this.model.reqParams=m(m([],this.model.reqParams,!0),a,!0),c.label=5;case 5:return[2]}}))}))},e.prototype.onRelationDelete=function(t){this.model.relations=this.model.relations.filter((function(e){return e.typeId!==t.typeId})),this.model.reqParams=this.model.reqParams.filter((function(e){return e.relationTypeId!==t.typeId}))},e.prototype.onDetail=function(t){return h(this,void 0,void 0,(function(){var e;return f(this,(function(n){switch(n.label){case 0:return"MODEL"!==(null===t||void 0===t?void 0:t.type)?[3,3]:(null===t||void 0===t?void 0:t.typeId)?[4,this.dataModelService.getMavonDoc(t.typeId)]:[3,2];case 1:e=n.sent(),(null===e||void 0===e?void 0:e.hasError)||(this.dataModelDoc=e.result,this.dataModelDocShow=!0),n.label=2;case 2:return[3,5];case 3:return"API"!==(null===t||void 0===t?void 0:t.type)?[3,5]:(null===t||void 0===t?void 0:t.typeId)?[4,this.apiProjectService.getApiDetail(t.typeId)]:[3,5];case 4:e=n.sent(),(null===e||void 0===e?void 0:e.hasError)||(this.apiProjectDetail=e.result||{},this.apiProjectDetailShow=!0),n.label=5;case 5:return[2]}}))}))},e.prototype.onOpenTest=function(){return h(this,void 0,void 0,(function(){return f(this,(function(t){switch(t.label){case 0:return t.trys.push([0,3,,4]),this.isEdit?[4,this.onSave(!1)]:[3,2];case 1:t.sent(),t.label=2;case 2:return this.testShow=!0,[3,4];case 3:return t.sent(),[3,4];case 4:return[2]}}))}))},e.prototype.onTestRun=function(t){var e,n;return h(this,void 0,void 0,(function(){var i;return f(this,(function(r){switch(r.label){case 0:return[4,this.service.testRun(u(u({},this.model),{context:t}))];case 1:return i=r.sent(),(null===i||void 0===i?void 0:i.hasError)||(this.$message.success("运行成功"),this.testResult=null!==(e=i.result)&&void 0!==e?e:{},this.model.respParams=null!==(n=i.result.respParams)&&void 0!==n?n:[]),[2]}}))}))},e.prototype.onOpenDoc=function(){return h(this,void 0,void 0,(function(){var t;return f(this,(function(e){switch(e.label){case 0:return[4,this.service.geHelpDoc()];case 1:return t=e.sent(),t?(this.doc=t,this.docShow=!0):this.$message.error("获取帮助文档失败"),[2]}}))}))},d([O(z)],e.prototype,"service",void 0),d([O(bt)],e.prototype,"dataModelService",void 0),d([O(Ct)],e.prototype,"apiProjectService",void 0),e=d([Object(y["component"])({name:"ProjectCombineModel",template:n("d8e7"),components:{"u-base-editor":vt,"u-data-model-modal":It,"u-data-model-doc-modal":st,"u-api-project-modal":_t,"u-api-project-detail-modal":Nt,"u-request-parameter-list":Bt,"u-response-parameter-list":Vt,"u-test-run-modal":Ht,"u-data-model-doc":st}})],e),e}(y["View"])),Kt=Gt,Qt=(n("1aea"),function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return p(e,t),d([Object(ut["PropSync"])("visiable",{default:!1})],e.prototype,"value",void 0),d([Object(y["config"])({default:function(){return new Object}})],e.prototype,"data",void 0),e=d([Object(y["component"])({template:n("6255")})],e),e}(y["Component"])),Jt=Qt,Wt=(n("e9fa"),function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.value=!1,e}return p(e,t),e.prototype.onOpenConfirm=function(){this.value=!0},e.prototype.onCancel=function(){this.value=!1,this.$emit("on-cancel")},e.prototype.onOk=function(){this.value=!1,this.$emit("on-ok")},d([Object(y["config"])({default:"系统提示"})],e.prototype,"title",void 0),d([Object(y["config"])({default:""})],e.prototype,"message",void 0),e=d([Object(y["component"])({template:n("bc13")})],e),e}(y["Component"])),Yt=Wt,Xt=(n("270f"),function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return p(e,t),e.prototype.onDelete=function(){this.$emit("on-delete",this.data)},e.prototype.onDetail=function(){this.$emit("on-detail",this.data)},e.prototype.onEdit=function(){this.$emit("on-edit",this.data)},e.prototype.onClick=function(t){this.$emit("on-"+t,this.data)},d([Object(y["config"])({default:function(){return new Object}})],e.prototype,"data",void 0),e=d([Object(y["component"])({template:n("ef27"),components:{"u-confirm":Yt}})],e),e}(y["Component"])),Zt=Xt,te=(n("17fe"),function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return p(e,t),e.prototype.getProjectList=function(t){return void 0===t&&(t={}),this._post("/unity/api/project/list",t)},e.prototype.saveProject=function(t){return t.id?this._put("/unity/api/project",t):this._post("/unity/api/project",t)},e.prototype.deleteProject=function(t){return this._delete("/unity/api/project/".concat(t))},e.prototype.exportProject=function(t){return M.a.post(this.url("/unity/api/info/export"),t,{headers:{"X-Requested-With":"XMLHttpRequest","Content-Type":"application/json; charset=UTF-8","Access-Control-Allow-Origin":"*"},responseType:"arraybuffer"}).then((function(t){var e=new Blob([t.data],{type:"application/json"}),n=URL.createObjectURL(e),i=document.createElement("a");i.href=n,i.download=decodeURI("data-model.json"),i.style.display="none",document.body.appendChild(i),i.target="_blank",i.click(),i.parentNode.removeChild(i),window.URL.revokeObjectURL(n)}))},d([T("query",{title:"获取所有项目"})],e.prototype,"getProjectList",null),d([T("save",{title:"保存项目",showTip:!0,showErrorMsg:!0})],e.prototype,"saveProject",null),d([T("save",{title:"删除项目",showTip:!0,showErrorMsg:!0})],e.prototype,"deleteProject",null),e}(F)),ee=te,ne=n("a2c5"),ie=n.n(ne);function re(t){return t instanceof Element?"element":Object.prototype.toString.call(t).slice(8,-1).toLowerCase()}function oe(t){return t.replace(/([^:]|^)\/{2,}/g,"$1/")}n("2597"),n("e459"),n("eab2"),n("6bf0"),n("46df"),n("e40c"),n("39d5");var ae=function(){function t(){}return t.prototype.random=function(){return.001*window.crypto.getRandomValues(new Uint8Array(1))[0]},t.prototype.randomStr=function(t){var e=Math.ceil(t/2),n=new Uint8Array(e);window.crypto.getRandomValues(n);var i=Array.from(n).map((function(t){return t.toString(16).padStart(2,"0")})),r=i.join("").substr(0,t);return r},t.prototype.randomNumberStr=function(t){var e=Math.ceil(t/2),n=new Uint8Array(e);window.crypto.getRandomValues(n);for(var i="",r=0;r<e;r++)i+=n[r].toString().padStart(2,"0");return i.slice(0,t)},t}(),se=new ae,ce=se;function le(t){return null===t||void 0===t}function pe(t){for(var e,n,i=[],r=1;r<arguments.length;r++)i[r-1]=arguments[r];if(!i.length)return t;var o=i.shift();if(ue(t)&&ue(o))for(var a in o)ue(o[a])?(t[a]||Object.assign(t,(e={},e[a]={},e)),pe(t[a],o[a])):Object.assign(t,(n={},n[a]=o[a],n));return pe.apply(void 0,m([t],i,!1))}function ue(t){return t&&"object"===typeof t&&!Array.isArray(t)}function de(t){var e=new URLSearchParams;for(var n in t)t.hasOwnProperty(n)&&e.append(n,t[n]);return e.toString()}function he(t){var e=new URLSearchParams(t),n={};return e.forEach((function(t,e){n[e]=t})),n}var fe,me,ye,ve,ge,be=function(){function t(t){this._appIdCode=t,this.noncePrefix=this.generateRandomString()}return Object.defineProperty(t.prototype,"appIdCode",{get:function(){return this._appIdCode},enumerable:!1,configurable:!0}),t.prototype.generateRandomString=function(){return ce.randomStr(8)},t.prototype.generateSignatureOption=function(){return{nonce:"".concat(this.noncePrefix,"_").concat(this.generateRandomString()),timestamp:Date.now().toString().substring(0,10)}},t.prototype.stringToUTF8ByteSize=function(t){var e=(new TextEncoder).encode(t);return e.length},t.prototype.isStringOverKB=function(t,e){var n=this.stringToUTF8ByteSize(t);return n>1024*e},t.prototype.removeNilValue=function(t){if("object"===re(t))for(var e in t)if(Object.prototype.hasOwnProperty.call(t,e)){var n=t[e],i=re(n);"object"===i?this.removeNilValue(n):"null"!==i&&"undefined"!==i&&"function"!==i||delete t[e]}},t.prototype.formatEncodeValue=function(t){var e=re(t),n="null"===e||"undefined"===e||"function"===e,i=n?"":t;return encodeURIComponent(i).replace(/%2B/g,"+").replace(/%20/g,"+").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/'/g,"%27").replace(/!/g,"%21").replace(/~/g,"%7E")},t.prototype.formatEncodeParam=function(t,e,n){var i=this,r=re(n);if("object"===r){var o=Object.keys(n).sort();0===o.length?t.push("".concat(e,"={}")):o.forEach((function(r){i.formatEncodeParam(t,""===e?"".concat(r):"".concat(e,"[").concat(r,"]"),n[r])}))}else"array"===r?0===n.length?t.push("".concat(e,"=[]")):n.forEach((function(n){i.formatEncodeParam(t,"".concat(e,"[]"),n)})):t.push("".concat(e,"=").concat(this.formatEncodeValue(n)))},t.prototype.sortParamByKey=function(t){void 0===t&&(t={});var e=[];return this.formatEncodeParam(e,"",t),e.join("&")},t.prototype.cryptoHash=function(t){return"Base64"===window.commonSetting.signatureEncodeType?ie.a.HmacSHA1(t,this._appIdCode.code).toString(ie.a.enc.Base64):ie.a.HmacSHA1(t,this._appIdCode.code).toString(ie.a.enc.Hex).toUpperCase()},t.prototype.urlSearchParams=function(t){var e;return t&&t.indexOf("?")>-1?he(null!==(e=t.split("?").pop())&&void 0!==e?e:""):{}},t.prototype.signatureHref=function(t){try{var e=new URL(t,window.location.origin).pathname,n=this.urlSearchParams(t),i=this.generateSignatureOption();pe(n,i);var r=this.sortParamByKey(n),o=oe("/".concat(e)),a="".concat(o,"?").concat(r),s=this.cryptoHash(a);t="".concat(a,"&signature=").concat(s)}catch(c){console.error("签名失败,请使用有效的链接",t)}return t},t.prototype.signatureConfig=function(t){var e,n,i,r,a;try{var s=null===(e=t.method)||void 0===e?void 0:e.toUpperCase(),c="GET"===s,l=Object(o["toRaw"])(t.data),p=null!==l&&"object"===typeof l,u=(null===(i=null===(n=t.headers)||void 0===n?void 0:n["Content-Type"])||void 0===i?void 0:i.toString())||"",d=u.includes("multipart/form-data"),h=u.includes("application/json");c||u||!p||(h=!0),pe(t,{headers:{"App-Id":this._appIdCode.id}});var f={},m=this.urlSearchParams(t.url);if(pe(f,m),!le(t.params)){var y=Object(o["toRaw"])(t.params);this.removeNilValue(y),t.params=y,pe(f,he(de(y)))}!le(l)&&p&&(d||h||pe(f,l));var v=this.generateSignatureOption();pe(f,v);var g=this.sortParamByKey(f);if(h){var b=JSON.stringify(l),w=this.isStringOverKB(b,128);w||(g+=p?this.formatEncodeValue(b):this.formatEncodeValue(l))}var x="";x=(null===(r=t.url)||void 0===r?void 0:r.startsWith("http"))?t.url:(null===(a=t.url)||void 0===a?void 0:a.startsWith("/"))?"".concat(t.baseURL||"").concat(t.url||""):"".concat(t.baseURL||"","/").concat(t.url||"");var S=new URL(x,window.location.origin).pathname,I=oe("/".concat(S)),k="".concat(I,"?").concat(g);v.signature=this.cryptoHash(k),t.params=pe({},t.params,v)}catch(C){console.error("签名失败",C)}},t}(),we={id:"dex",code:"bb0a92a340ae4f5d936a9e6b010cb127"},xe=new be(we),Se=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="card",e.condition={},e.dataList=[],e.showAddModal=!1,e.loading=!1,e.columns=[{title:"项目名称",key:"name",align:"left",tooltip:!0},{title:"项目描述",key:"description",align:"left",tooltip:!0},{title:"创建时间",key:"createTime",align:"left",tooltip:!0},{title:"操作",slot:"action",align:"left"}],e.current={},e}return p(e,t),Object.defineProperty(e.prototype,"uploadAction",{get:function(){return xe.signatureHref(A.baseUrl+"/unity/api/info/import")},enumerable:!1,configurable:!0}),e.prototype.onCheckType=function(t){this.type=t},e.prototype.onAdd=function(){this.current={},this.showAddModal=!0},e.prototype.onDelete=function(t){return h(this,void 0,void 0,(function(){var e;return f(this,(function(n){switch(n.label){case 0:return[4,this.service.deleteProject(t.id)];case 1:return e=n.sent(),e&&!e.hasError&&this.onQuery(),[2]}}))}))},e.prototype.onDetail=function(t){this.$router.push({name:"project-detail",params:{id:t.id},query:{name:t.name}})},e.prototype.onEdit=function(t){this.current=t,this.showAddModal=!0},e.prototype.onExport=function(t){return h(this,void 0,void 0,(function(){var e;return f(this,(function(n){switch(n.label){case 0:return e=Object.create(null),e={projectId:t.id},this.loading=!0,[4,this.service.exportProject(e)];case 1:return n.sent(),this.loading=!1,[2]}}))}))},e.prototype.onComment=function(){this.$router.push({name:"project-comment"})},e.prototype.onQuery=function(){return h(this,void 0,void 0,(function(){var t;return f(this,(function(e){switch(e.label){case 0:return this.loading=!0,[4,this.service.getProjectList(this.condition)];case 1:return t=e.sent(),this.dataList=(null===t||void 0===t?void 0:t.result)||[],this.loading=!1,[2]}}))}))},e.prototype.mounted=function(){this.onQuery()},e.prototype.onSave=function(){return h(this,void 0,void 0,(function(){var t;return f(this,(function(e){switch(e.label){case 0:return[4,this.service.saveProject(this.current)];case 1:return t=e.sent(),t&&!t.hasError&&(this.showAddModal=!1,this.onQuery()),[2]}}))}))},Object.defineProperty(e.prototype,"headers",{get:function(){var t=S().headers;return u(u({},t),{"App-Id":xe.appIdCode.id})},enumerable:!1,configurable:!0}),e.prototype.onSuccess=function(t,e){if(t&&!t.hasError)return this.$Message.success("导入成功"),this.onQuery(),void(this.loading=!1);this.loading=!1,this.$Message.error(t.message||"导入出错,请稍后再试")},e.prototype.onBeforeUpload=function(t){return this.loading=!0,-1!==t.name.indexOf(" ")?(this.$Message.warning("文件名不能包含空格"),this.loading=!1,!1):-1===t.name.indexOf("%")||(this.$Message.warning("文件名不能包含符号%"),this.loading=!1,!1)},e.prototype.onFormatError=function(t){this.loading=!1,this.$Message.warning("文件".concat(t.name,"格式错误"))},d([O(ee)],e.prototype,"service",void 0),e=d([Object(y["component"])({name:"ApiProjectList",template:n("cfb3"),components:{"u-card":Zt,"u-add-modal":Jt,"u-confirm":Yt}})],e),e}(y["View"]),Ie=Se,ke=(n("65e5"),n("7af4")),Ce=n.n(ke),je=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return p(e,t),e.prototype.getApiTree=function(t){return this._get("/unity/api/info/tree/".concat(t))},e.prototype.deleteApi=function(t){return this._delete("/unity/api/info/".concat(t))},e.prototype.deleteCategory=function(t){return this._delete("/unity/api/category/".concat(t))},e.prototype.saveCategory=function(t){return t.id?this._put("/unity/api/category",t):this._post("/unity/api/category",t)},e.prototype.checkCategory=function(t){return this._post("/unity/api/category/update/check",t)},e.prototype.updateMoveCategory=function(t,e){return this._post("/unity/api/category/updateWithEnv?copyEnvFlag=".concat(e),t)},e.prototype.saveApi=function(t){return t.id?this._put("/unity/api/info",t):this._post("/unity/api/info",t)},e.prototype.checkApi=function(t){return this._post("/unity/api/info/update/check",t)},e.prototype.updateMoveApi=function(t,e){return this._post("/unity/api/info/updateWithEnv?copyEnvFlag=".concat(e),t)},e.prototype.copyApi=function(t,e,n,i){return this._post("/unity/api/info/copy?id=".concat(t,"&name=").concat(e,"&projectId=").concat(n,"&categoryId=").concat(i))},e.prototype.apiInfo=function(t){return this._get("/unity/api/info/".concat(t,"/whole"))},e.prototype.run=function(t,e){return this._post("/unity/api/run/".concat(t,"/web"),e)},e.prototype.runWithFile=function(t,e){return this._post("/unity/api/run/".concat(t,"/exec"),e)},e.prototype.saveApiInfo=function(t){return this._post("/unity/api/info/save/whole",t)},e.prototype.parseResponse2Fields=function(t,e,n){return void 0===e&&(e=""),void 0===n&&(n=!0),this._post("/unity/api/field-mapping/parse/model",{originalJson:t,convertRoot:e,collapse:n})},e.prototype.preScript=function(){return this._get("/api-help/preScript.json")},e.prototype.postScript=function(){return this._get("/api-help/postScript.json")},e.prototype.projectInfo=function(t){return this._get("/unity/api/project/".concat(t))},e.prototype.getSecurityList=function(t){return this._post("/unity/api/authentication/list",t)},e.prototype.deleteSecurityItem=function(t){return this._delete("/unity/api/authentication/".concat(t))},e.prototype.addSecurityItem=function(t){return this._post("/unity/api/authentication",t)},e.prototype.updateSecurityItem=function(t){return this._put("/unity/api/authentication",t)},e.prototype.getVariableList=function(t){return this._post("/unity/api/environment-param/list",t)},e.prototype.saveVariable=function(t){return(null===t||void 0===t?void 0:t.id)?this._put("/unity/api/environment-param",t):this._post("/unity/api/environment-param",t)},e.prototype.deleteVariable=function(t){return this._delete("/unity/api/environment-param/".concat(t))},e.prototype.onBatchEnv=function(t){return this._post("/unity/api/info/env",t)},e.prototype.onBatchAuth=function(t){return this._post("/unity/api/info/auth",t)},e.prototype.getScriptDoc1=function(){return this._get("/api-help/apiParam.md")},e.prototype.getScriptDoc=function(){return this._get("/api-help/authScript.md")},e.prototype.onImportAvr=function(t){return this._post("/unity/api/info/import-model",t)},e.prototype.onValidateImport=function(t){return this._post("/unity/api/info/check-name",t)},e.prototype.getEgovaApiTree=function(){return this._get("/unity/wizdom-api/tree")},e.prototype.getProjectList=function(t){return void 0===t&&(t={}),this._post("/unity/api/project/list",t)},e.prototype.getApiRequestParams=function(t){return this._get("/unity/api/request-param/apiId/".concat(t))},e.prototype.getCategoryList=function(){return this._get("/unity/proxy/tree")},e.prototype.getProxyNameList=function(t){return this._get("/unity/proxy/getbyapi?apiId=".concat(t))},e.prototype.save=function(t){return t.id?this._put("/unity/proxy",t):this._post("/unity/proxy",t)},d([T("query",{title:"获取接口树"})],e.prototype,"getApiTree",null),d([T("save",{title:"删除接口",showErrorMsg:!0,showTip:!0})],e.prototype,"deleteApi",null),d([T("save",{title:"删除分组",showTip:!0,showErrorMsg:!0})],e.prototype,"deleteCategory",null),d([T("save",{title:"保存分组",showTip:!0,showErrorMsg:!0})],e.prototype,"saveCategory",null),d([T("save",{title:"保存分组",showTip:!1,showErrorMsg:!0})],e.prototype,"checkCategory",null),d([T("save",{title:"保存分组",showTip:!0,showErrorMsg:!0})],e.prototype,"updateMoveCategory",null),d([T("save",{title:"保存接口",showErrorMsg:!0,showTip:!0})],e.prototype,"saveApi",null),d([T("save",{title:"保存接口",showErrorMsg:!0,showTip:!1})],e.prototype,"checkApi",null),d([T("save",{title:"保存接口",showTip:!0,showErrorMsg:!0})],e.prototype,"updateMoveApi",null),d([T("save",{title:"复制接口",showErrorMsg:!1,showTip:!1})],e.prototype,"copyApi",null),d([T("query",{title:"接口详情"})],e.prototype,"apiInfo",null),d([T("query",{title:"在线测试"})],e.prototype,"run",null),d([T("query",{title:"在线测试"})],e.prototype,"runWithFile",null),d([T("save",{title:"保存接口详情",showErrorMsg:!0,showTip:!0})],e.prototype,"saveApiInfo",null),d([T("query",{title:"提取json的节点数据"})],e.prototype,"parseResponse2Fields",null),d([T("query",{title:"前置脚本"})],e.prototype,"preScript",null),d([T("query",{title:"后置脚本"})],e.prototype,"postScript",null),d([T("query",{title:"项目详情"})],e.prototype,"projectInfo",null),d([T("query",{title:"授权认证列表查询"})],e.prototype,"getSecurityList",null),d([T("save",{title:"删除授权认证",showTip:!0,showErrorMsg:!0})],e.prototype,"deleteSecurityItem",null),d([T("save",{title:"新增授权认证",showTip:!0,showErrorMsg:!0})],e.prototype,"addSecurityItem",null),d([T("save",{title:"更新授权认证",showTip:!0,showErrorMsg:!0})],e.prototype,"updateSecurityItem",null),d([T("query",{title:"环境变量详情",showErrorMsg:!0})],e.prototype,"getVariableList",null),d([T("save",{title:"保存环境变量",showErrorMsg:!0})],e.prototype,"saveVariable",null),d([T("query",{title:"删除环境变量",showErrorMsg:!0})],e.prototype,"deleteVariable",null),d([T("query",{title:"批量修改环境变量",showErrorMsg:!0})],e.prototype,"onBatchEnv",null),d([T("query",{title:"批量修改授权设置",showErrorMsg:!0})],e.prototype,"onBatchAuth",null),d([T("query",{title:"单接口详情导入",showErrorMsg:!0})],e.prototype,"onImportAvr",null),d([T("query",{title:"单接口详情导入",showErrorMsg:!0})],e.prototype,"onValidateImport",null),d([T("query",{title:"获取egova接口树"})],e.prototype,"getEgovaApiTree",null),d([T("query",{title:"获取API项目列表"})],e.prototype,"getProjectList",null),d([T("query",{title:"获取API参数列表"})],e.prototype,"getApiRequestParams",null),d([T("query",{title:"查询分类树"})],e.prototype,"getCategoryList",null),d([T("query",{title:"查询代理详情"})],e.prototype,"getProxyNameList",null),d([T("save",{title:"保存接口配置",showTip:!0,showErrorMsg:!0})],e.prototype,"save",null),e}(F),De=je,Oe=(n("ca38"),function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return p(e,t),e.prototype.onMore=function(){this.source.func&&this.source.func()},e.prototype.onToApi=function(){return h(this,void 0,void 0,(function(){var t;return f(this,(function(e){switch(e.label){case 0:return[4,this.service.apiInfo(this.source.apiId)];case 1:return t=e.sent(),t.hasError?[2,this.$message.error("接口不存在")]:(this.$router.push({name:"project-detail",params:{id:this.source.projectId},query:{apiId:this.source.apiId,apiName:this.source.apiName}}),[2])}}))}))},d([Object(y["config"])({type:Object,default:function(){return Object.create(null)}})],e.prototype,"source",void 0),d([Object(y["config"])({type:Number,default:function(){return 0}})],e.prototype,"index",void 0),d([O(De)],e.prototype,"service",void 0),e=d([Object(y["component"])({template:n("9b44"),components:{}})],e),e}(y["Component"])),Te=Oe,Ee=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return p(e,t),e.prototype.page=function(t){return this._post("/unity/api/trends/page",t)},d([T("query",{title:"分页查询表单动态"})],e.prototype,"page",null),e}(F),Pe=Ee,Me=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.list=[],e.itemComponent=Te,e.condition={endCreateTime:new Date},e.paging={pageIndex:0,pageSize:10,totalCount:0},e}return p(e,t),e.prototype.mounted=function(){this.onQuery()},e.prototype.onMore=function(){return h(this,void 0,void 0,(function(){var t;return f(this,(function(e){switch(e.label){case 0:return this.paging.pageIndex++,this.list.length>0&&this.list.pop(),[4,this.query()];case 1:return t=e.sent(),this.list=this.list.concat(t),this.paging.pageIndex*this.paging.pageSize<this.paging.totalCount&&this.list.push({id:this.paging.pageIndex,type:"more",func:this.onMore}),[2]}}))}))},e.prototype.query=function(){return h(this,void 0,void 0,(function(){var t;return f(this,(function(e){switch(e.label){case 0:return[4,this.service.page({condition:this.condition,paging:this.paging})];case 1:return t=e.sent(),this.paging.totalCount=t.totalCount,[2,Promise.resolve(t.result||[])]}}))}))},e.prototype.onQuery=function(){this.paging.pageIndex=0,this.list=[],this.onMore()},d([O(Pe)],e.prototype,"service",void 0),e=d([Object(y["component"])({name:"ApiProjectComment",template:n("b769"),components:{VirtualList:Ce.a}})],e),e}(y["View"]),Le=Me,Ae=(n("8b9b"),function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return p(e,t),d([Object(ut["PropSync"])("visiable",{default:!1})],e.prototype,"value",void 0),e=d([Object(y["component"])({template:n("10cf")})],e),e}(y["Component"])),Ne=Ae,qe=(n("713b"),function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.typeList=[{title:"Body参数",name:"body"},{title:"Query参数",name:"query"},{title:"Header参数",name:"header"}],e.active=e.typeList[0],e.columns=[{title:"参数名",slot:"name",align:"left"},{title:"参数值",slot:"value",align:"left"},{title:"备注",slot:"remark",align:"left"},{title:"操作",slot:"action",align:"left",width:300}],e.dataList=new Array(20).fill({}),e}return p(e,t),e.prototype.onCheckTpye=function(t){this.active=t},e.prototype.onDelete=function(t,e){t.splice(e,1)},e.prototype.onUp=function(t,e){if(0!==e){var n=t.splice(e,1);t.splice(e-1,0,n[0])}},e.prototype.onDown=function(t,e){if(e!==t.length-1){var n=t.splice(e,1);t.splice(e+1,0,n[0])}},e.prototype.onTop=function(t,e){var n=t.splice(e,1);t.unshift(n[0])},e.prototype.onBottom=function(t,e){var n=t.splice(e,1);t.push(n[0])},d([Object(ut["PropSync"])("visiable",{default:!1})],e.prototype,"value",void 0),e=d([Object(y["component"])({template:n("470f")})],e),e}(y["Component"])),Re=qe,$e=(n("eaed"),n("4387")),_e=n.n($e),Fe=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.isAddOnce=!1,e.exitAddItem=!1,e.varList=[],e.keyword="",e.currentItem={},e.isEmpty=!0,e.formData={name:"",remark:"",type:"http",address:""},e.rules={name:[{required:!0,message:"请输入环境名称",trigger:"blur"}],address:[{required:!0,message:"请输入域名",trigger:"blur"}]},e.onFilter=_e()((function(){e.getVariableList()}),300),e}return p(e,t),e.prototype.onShowChange=function(t){return h(this,void 0,void 0,(function(){return f(this,(function(e){return t&&(this.isAddOnce=this.isAdd,this.getVariableList()),[2]}))}))},e.prototype.onEmpty=function(t){this.isEmpty=!!t},e.prototype.getVariableList=function(){return h(this,void 0,void 0,(function(){var t,e,n=this;return f(this,(function(i){switch(i.label){case 0:return[4,this.service.getVariableList({name:this.keyword,projectId:this.projectId})];case 1:return t=i.sent(),(null===t||void 0===t?void 0:t.hasError)||(this.varList=t.result||[],(this.isAddOnce||this.exitAddItem)&&(this.onAddItem(),this.isAddOnce=!1,this.exitAddItem=!1),this.currentItem&&this.currentItem.id?(e=this.varList.filter((function(t){return t.id===n.currentItem.id})),this.onSelectItem(e[0]||this.varList[0])):this.varList.length&&this.onSelectItem(this.varList[0])),[2]}}))}))},e.prototype.onSelectItem=function(t){this.currentItem=t.$clone(),this.formData.name=this.currentItem.name,this.currentItem.value.indexOf("https")>-1?(this.formData.type="https",this.formData.address=this.currentItem.value.replace("https://","")):(this.formData.type="http",this.formData.address=this.currentItem.value.replace("http://","")),this.formData.remark=this.currentItem.remark},e.prototype.onDelete=function(t){return h(this,void 0,void 0,(function(){var e;return f(this,(function(n){switch(n.label){case 0:return t.id?(this.varList.find((function(t){return!t.id}))&&(this.exitAddItem=!0),[4,this.service.deleteVariable(t.id)]):[3,2];case 1:return e=n.sent(),(null===e||void 0===e?void 0:e.hasError)||(this.getVariableList(),this.$emit("on-refresh")),[3,3];case 2:this.varList.shift(),this.varList.length&&this.onSelectItem(this.varList[0]),n.label=3;case 3:return[2]}}))}))},e.prototype.onAddItem=function(){if(!(this.varList.length>0)||this.varList[0].id){var t={name:"",value:"",remark:"",projectId:this.projectId};this.varList.unshift(t),this.onSelectItem(this.varList[0])}},e.prototype.onCancel=function(){this.value=!1,this.keyword="",this.currentItem={}},e.prototype.onSave=function(){var t,e;return h(this,void 0,void 0,(function(){var n,i,r;return f(this,(function(o){switch(o.label){case 0:return[4,this.$refs["variable-content-form"].validate()];case 1:return n=o.sent(),n?(i={name:this.formData.name,value:"".concat(this.formData.type,"://").concat(this.formData.address),remark:this.formData.remark,projectId:this.projectId},(null===(t=this.currentItem)||void 0===t?void 0:t.id)&&(i.id=null===(e=this.currentItem)||void 0===e?void 0:e.id,i.createTime=this.currentItem.createTime),[4,this.service.saveVariable(i)]):[2];case 2:return r=o.sent(),r&&!r.hasError&&(this.$message.success("保存成功!"),this.getVariableList(),this.$emit("on-refresh")),[2]}}))}))},d([O(De)],e.prototype,"service",void 0),d([Object(ut["PropSync"])("visiable",{default:!1})],e.prototype,"value",void 0),d([Object(y["config"])({type:String,default:""})],e.prototype,"projectId",void 0),d([Object(y["config"])({type:Boolean,default:!1})],e.prototype,"isAdd",void 0),d([Object(y["watch"])("value")],e.prototype,"onShowChange",null),d([Object(y["watch"])("varList.length",{immediate:!0})],e.prototype,"onEmpty",null),e=d([Object(y["component"])({template:n("8962"),components:{}})],e),e}(y["Component"]),Be=Fe,ze=(n("fe54"),n("0ddb"),function(){function t(){this.info={},this.json="",this.queryParams=[],this.formParams=[],this.requestHeaders=[],this.preScripts=[],this.postScripts=[],this.eventScripts=[],this.convertConfig=new Ue,this.fieldMappings=[],this.authentication=new Ve}return t}()),Ve=function(){function t(){this.type="OAuth2",this.content="",this.location="",this.locationKey="",this.id=""}return t}(),Ue=function(){function t(){this.convertRoot="",this.successCodePath="",this.successCode=""}return t}(),He=function(){function t(){this.id="",this.paramPath="",this.originalParamPath="",this.name="",this.valueType="",this.checked=!1}return t}(),Ge=function(){function t(){this.id="",this.projectId="",this.apiId="",this.eventType="Previous",this.type="Groovy",this.content=""}return t}(),Ke=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.eventType="Post",e}return p(e,t),e}(Ge),Qe=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.editor={},e}return p(e,t),e.prototype.onEditorInited=function(t){this.editor=t},e.prototype.resizeEditor=function(){this.editor.resize&&this.editor.resize()},d([Object(y["config"])({default:!0})],e.prototype,"lengthwise",void 0),d([Object(y["watch"])("lengthwise")],e.prototype,"resizeEditor",null),e=d([Object(y["component"])({})],e),e}(y["Component"]),Je=Qe,We=(n("d928"),function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.scriptData={},e.tempScriptData={},e.viewMax=!1,e.model=new Ge,e.key="preScripts",e.diyKeywordList=[],e.refreshEditor=!0,e.keyword="",e.errorMap=new Map,e.onFilter=_e()((function(){e.filterTypeList()}),300),e}return p(e,t),e.prototype.mounted=function(){var t=this;this.getScript(),this.$subscribe("api://project-detail-max",(function(){t.refreshEditor=!t.refreshEditor,t.refreshEditor&&setTimeout((function(){t.displayError(t.errorLine)}),5)}));var e=document.getElementsByClassName("ace_scrollbar")[0];e.addEventListener("scroll",(function(){t.displayError(t.errorLine)}))},e.prototype.handleError=function(t){var e=this;setTimeout((function(){e.displayError(t)}),5)},e.prototype.displayError=function(t){var e=this,n=document.getElementsByClassName("ace_gutter-cell");this.errorMap.forEach((function(t,e){var i,r=null===(i=n[t])||void 0===i?void 0:i.firstElementChild;r&&n[t].removeChild(r)})),this.errorMap.clear(),(null===t||void 0===t?void 0:t.length)&&t.forEach((function(t){null===n||void 0===n||n.forEach((function(n,i){if((null===n||void 0===n?void 0:n.innerHTML)===t+""){var r=n,o=document.createElement("i");o.className="iconfont icon-a-cuowutishi1",r.insertBefore(o,r.firstChild),e.errorMap.set(t,i)}}))}))},e.prototype.getScript=function(){var t,e;return h(this,void 0,void 0,(function(){var n,i;return f(this,(function(r){switch(r.label){case 0:return[4,this.service.preScript()];case 1:return n=r.sent(),this.scriptData=n||{},this.scriptData.group=null===(t=this.scriptData.group)||void 0===t?void 0:t.map((function(t){return u(u({},t),{expand:!0})})),this.tempScriptData=this.scriptData.$clone(),i=[],null===(e=this.scriptData)||void 0===e||e.group.forEach((function(t){"业务案例"!==t.name&&t.list.forEach((function(e){i.push({meta:t.name,caption:e.code,value:e.code,score:1})}))})),this.diyKeywordList=i,[2]}}))}))},e.prototype.onClickItem=function(t){this.editor.insert(t.code),this.editor.focus()},Object.defineProperty(e.prototype,"script",{get:function(){return this.interfaceModel[this.key][0]||this.interfaceModel[this.key].push(this.model),this.interfaceModel[this.key][0].content},set:function(t){this.interfaceModel[this.key][0].content=t},enumerable:!1,configurable:!0}),e.prototype.filterTypeList=function(){var t=this;if(this.keyword){var e=this.scriptData.group.map((function(e){return u(u({},e),{list:e.list.filter((function(e){return-1!==e.name.indexOf(t.keyword)}))})}));this.tempScriptData.group=e.filter((function(t){return t.list.length}))}else this.tempScriptData=this.scriptData.$clone()},e.prototype.onQuickGroupClick=function(t){var e,n;null===(e=this.scriptData.group)||void 0===e||e.forEach((function(e){t.name===e.name&&(e.expand=!e.expand)})),null===(n=this.tempScriptData.group)||void 0===n||n.forEach((function(e){t.name===e.name&&(e.expand=!e.expand)}))},e.prototype.onRun=function(){this.$emit("on-script-run")},e.prototype.onSearch=function(){this.editor&&this.editor.execCommand("find")},e.prototype.onSave=function(){this.$emit("on-script-save")},e.prototype.onViewMax=function(){this.viewMax=!this.viewMax,this.$emit("on-script-max",this.viewMax)},d([Object(y["config"])({default:function(){return new ze}})],e.prototype,"interfaceModel",void 0),d([O(De)],e.prototype,"service",void 0),d([Object(y["config"])({default:null})],e.prototype,"errorLine",void 0),d([Object(y["watch"])("errorLine",{immediate:!0})],e.prototype,"handleError",null),e=d([Object(y["component"])({template:n("8ab8"),components:{"u-editor":mt}})],e),e}(Je)),Ye=We,Xe=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.key="postScripts",e.model=new Ke,e}return p(e,t),e.prototype.getScript=function(){var t;return h(this,void 0,void 0,(function(){var e;return f(this,(function(n){switch(n.label){case 0:return[4,this.service.postScript()];case 1:return e=n.sent(),this.scriptData=e||{},this.scriptData.group=null===(t=this.scriptData.group)||void 0===t?void 0:t.map((function(t){return u(u({},t),{expand:!0})})),this.tempScriptData=this.scriptData.$clone(),[2]}}))}))},e=d([Object(y["component"])({})],e),e}(Ye),Ze=Xe,tn=(n("a6c3"),function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.option={showPrintMargin:!1,wrap:"free",fontSize:15},e}return p(e,t),e.prototype.editorInit=function(t){n("1cdf"),n("9842"),n("0e0c"),n("1e82"),n("c889"),n("64d5"),n("91e1"),n("3fb3"),n("8214"),this.$emit("inited",t)},d([Object(ut["PropSync"])("value")],e.prototype,"code",void 0),d([Object(pt["config"])({default:"json"})],e.prototype,"lang",void 0),e=d([Object(pt["component"])({template:n("35e3"),components:{editor:ht.a}})],e),e}(pt["Component"])),en=tn,nn=(n("aba0"),function(){function t(){this.content="",this.originalContent="",this.requestHeaders={},this.responseHeaders={},this.cookies={},this.errorMessage="",this.output=""}return t}()),rn=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.responseSettingTypeList=[{name:"content",title:"响应"},{name:"responseHeaders",title:"响应头",num:0},{name:"requestHeaders",title:"请求头",num:0},{name:"cookies",title:"Cookies",num:0},{name:"output",title:"输出",num:0}],e.lang="json",e.contentType="originalContent",e.expand=!0,e.headerColumns=[{title:"Key(键名)",key:"key"},{title:"Value(键值)",key:"value"}],e.active=e.responseSettingTypeList[0],e}return p(e,t),e.prototype.onClickResponseSettingTpye=function(t){this.active=t},Object.defineProperty(e.prototype,"content",{get:function(){if(this.response.errorMessage)return this.response.errorMessage;if(!this.response.originalContent)return"";var t="";try{t=JSON.stringify(JSON.parse(this.response[this.contentType]),null,4)}catch(e){return console.log(e),this.response[this.contentType]}return t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"output",{get:function(){return this.response.output||""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"responseHeaders",{get:function(){var t=this;return Object.keys(this.response.responseHeaders).map((function(e){return{key:e,value:t.response.responseHeaders[e]}}))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"requestHeaders",{get:function(){var t=this;return Object.keys(this.response.requestHeaders).map((function(e){return{key:e,value:t.response.requestHeaders[e]}}))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"cookies",{get:function(){var t=this.response.responseHeaders["Set-Cookie"]||"";return t.$isArray()?t.map((function(t,e){return{key:e,value:t}})):(null===t||void 0===t?void 0:t.length)>0?t.split(";").map((function(t){var e=t.split("="),n=e[0],i=e[1];return{key:n,value:i}})):void 0},enumerable:!1,configurable:!0}),e.prototype.onChangeLang=function(t){this.lang=t},e.prototype.init=function(){var t=this;this.expand=!0,this.responseSettingTypeList.forEach((function(e){var n;if("content"!==e.name){var i=t.response[e.name]||{};e.num=i.$isArray()?i.length:Object.keys(i).length,"cookies"===e.name&&(e.num=null===(n=t.cookies)||void 0===n?void 0:n.length)}})),this.response.code&&200!==this.response.code&&(this.active=this.responseSettingTypeList[4]),this.response.code&&200===this.response.code&&(this.active=this.responseSettingTypeList[0])},e.prototype.onClickCollapse=function(){var t=this;this.$publish("api://project-detail-max"),this.expand=!this.expand,setTimeout((function(){t.$publish("api://project-detail-max")}),5)},d([Object(y["config"])({default:function(){return new nn}})],e.prototype,"response",void 0),d([Object(y["watch"])("response",{immediate:!0,deep:!1})],e.prototype,"init",null),e=d([Object(y["component"])({template:n("2c48"),components:{"u-editor":en}})],e),e}(Je),on=rn,an=(n("8a77"),function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.loading=!1,e.selections=[],e.debounceUpdateFieldMappings=_e()(e.updateFieldMappings,500),e.columns=[{type:"selection",width:60,align:"center"},{title:"读取字段的JSON路径",maxWidth:350,minWidth:120,align:"left",slot:"path"},{title:"输出字段命名和类型",minWidth:300,align:"left",slot:"name"},{title:"操作",width:80,align:"left",slot:"action"}],e.valueTypeList=[],e.dataList=[],e.lastDataList=[],e}return p(e,t),e.prototype.mounted=function(){return h(this,void 0,void 0,(function(){return f(this,(function(t){return this.interfaceModel.convertConfig=this.interfaceModel.convertConfig||new Ue,this.getValueTypeList(),this.initDataList(),[2]}))}))},e.prototype.getValueTypeList=function(){return h(this,void 0,void 0,(function(){var t;return f(this,(function(e){switch(e.label){case 0:return[4,this.service.getEnumByType("dataType")];case 1:return t=e.sent(),this.valueTypeList=(null===t||void 0===t?void 0:t.result)||[],[2]}}))}))},e.prototype.initDataList=function(){var t,e=this;(null===(t=this.interfaceModel.fieldMappings)||void 0===t?void 0:t.length)&&(this.dataList=this.interfaceModel.fieldMappings.sort((function(t,e){var n;return null===(n=t.paramPath)||void 0===n?void 0:n.localeCompare(e.paramPath)})),this.lastDataList=this.dataList.$clone()),this.$subscribe("api://project-detail-save",(function(){e.lastDataList=e.dataList.$clone()}))},e.prototype.onParse=function(){var t,e;return h(this,void 0,void 0,(function(){var n,i,r,o;return f(this,(function(a){switch(a.label){case 0:return this.response.originalContent?(this.loading=!0,[4,this.service.parseResponse2Fields(this.response.originalContent,null===(t=this.interfaceModel.convertConfig)||void 0===t?void 0:t.convertRoot)]):(this.$Message.error("请先获取转换前参数!"),[2]);case 1:return n=a.sent(),(null===n||void 0===n?void 0:n.hasError)?[2]:(i=(null===(e=null===n||void 0===n?void 0:n.result)||void 0===e?void 0:e.fieldMappings)||[],r=this.interfaceModel.fieldMappings,o=new Set(r.map((function(t){return t.originalParamPath}))),i.forEach((function(t){if(o.has(t.originalParamPath)){var e=r.find((function(e){return e.originalParamPath===t.originalParamPath}));Object.assign(t,e)}})),this.dataList=i,this.debounceUpdateFieldMappings(),this.loading=!1,[2])}}))}))},e.prototype.onChangeChecked=function(t){this.selections=t,this.debounceUpdateFieldMappings()},e.prototype.batchDelete=function(){var t=this;this.selections.length&&(this.selections.map((function(e){var n=t.dataList.findIndex((function(t){return t.name===e.name}));n>-1&&t.dataList.splice(n,1)})),this.selections=[],this.debounceUpdateFieldMappings())},e.prototype.onAdd=function(){this.dataList.unshift(new He),this.debounceUpdateFieldMappings()},e.prototype.onDelete=function(t){this.dataList.splice(t,1),this.debounceUpdateFieldMappings()},e.prototype.onReset=function(){this.dataList=this.lastDataList.$clone(),this.debounceUpdateFieldMappings()},e.prototype.updateFieldMappings=function(){this.interfaceModel.fieldMappings=this.dataList},d([O(De)],e.prototype,"service",void 0),d([Object(y["config"])({default:function(){return new ze}})],e.prototype,"interfaceModel",void 0),d([Object(y["config"])({default:function(){return new nn}})],e.prototype,"response",void 0),e=d([Object(y["component"])({template:n("236b"),components:{}})],e),e}(y["Component"])),sn=an,cn=(n("bff7"),function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.columns=[{title:" ",slot:"selection",width:60,align:"center"},{title:"参数名",align:"left",slot:"name"},{title:"参数值",align:"left",slot:"value"},{title:"备注",align:"left",slot:"text"},{title:"操作",align:"left",slot:"action"}],e}return p(e,t),e.prototype.onDelete=function(t){this.interfaceModel.requestHeaders.splice(t,1)},e.prototype.onAdd=function(){this.interfaceModel.requestHeaders.push({name:"",value:"",text:"",disabled:!1})},e.prototype.onChangeDisabled=function(t,e){e.disabled=!t},d([Object(y["config"])({default:function(){return new ze}})],e.prototype,"interfaceModel",void 0),e=d([Object(y["component"])({template:n("22e8"),components:{}})],e),e}(y["Component"])),ln=cn,pn=(n("3ad3"),function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.showValue=0,e}return p(e,t),e.prototype.watchValue=function(){this.showValue=this.value||this.midState?1:0},e.prototype.onChange=function(){this.$emit("onChange")},d([Object(y["config"])({type:Boolean,default:!1})],e.prototype,"value",void 0),d([Object(y["config"])({type:Boolean,default:!1})],e.prototype,"midState",void 0),d([Object(y["watch"])("value",{immediate:!0}),Object(y["watch"])("midState",{immediate:!0})],e.prototype,"watchValue",null),e=d([Object(y["component"])({template:n("f9a4"),components:{}})],e),e}(y["Component"])),un=pn,dn=(n("8137"),function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.value=[],e.scriptDocShow=!1,e.scriptDoc="",e.commonColuns=[{title:"参数名",slot:"name",align:"left"},{title:"参数值",slot:"valueContent",align:"left"},{title:"必填",slot:"required",width:95,align:"left",renderHeader:function(t,e){return t("div",{class:"th-tip"},[t("i-poptip",{props:{trigger:"hover",content:"参数启用同时非必填时,若调用方未传具体参数值,将使用当前定义的参数值。",placement:"top",transfer:!0,"word-wrap":!0}},[t("i-icon",{props:{type:"ios-information-circle-outline"}})]),t("span","必填")])}},{title:"备注",slot:"text",align:"left"},{title:"操作",slot:"action",align:"left",width:300}],e.queryDataList=[],e.requestBodyTypeList=[],e.hasQueryChecked=!1,e.hasQueryMidChecked=!1,e.hasBodyChecked=!1,e.hasBodyMidChecked=!1,e.typeMap={Form:"FormData",X_www_form_urlencoded:"FormUrlEncoded"},e.formParamTypeList=[{name:"String",text:"Text"},{name:"FILE",text:"File"}],e.formParamsIndex=0,e.currentFormParamRow={},e}return p(e,t),Object.defineProperty(e.prototype,"paramColumns",{get:function(){var t=this;return m([{slot:"selection",width:100,align:"center",title:"启用",renderHeader:function(e,n){return e(un,{props:{value:t.hasQueryChecked,midState:t.hasQueryMidChecked},on:{onChange:t.onQueryChange}})}}],this.commonColuns,!0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bodyColumns",{get:function(){var t=this;return m([{slot:"selection",width:100,align:"center",title:"启用",renderHeader:function(e,n){return e(un,{props:{value:t.hasBodyChecked,midState:t.hasBodyMidChecked},on:{onChange:t.onBodyChange}})}}],this.commonColuns,!0)},enumerable:!1,configurable:!0}),e.prototype.getExpand=function(t){return this.value.includes(t)},e.prototype.onDelete=function(t,e){var n=t.findIndex((function(t){return t.indexFlag===e}));t.splice(n,1),this.buildQueryCheckedState()},e.prototype.buildQueryCheckedState=function(){for(var t=0,e=0,n=this.queryDataList;e<n.length;e++){var i=n[e];i.disabled||(t+=1)}t>0&&t!==this.queryDataList.length?(this.hasQueryChecked=!0,this.hasQueryMidChecked=!0):(this.hasQueryChecked=t>0,this.hasQueryMidChecked=!1)},e.prototype.buildBodyCheckedState=function(){for(var t=0,e=0,n=this.bodyDataList;e<n.length;e++){var i=n[e];i.disabled||(t+=1)}t>0&&t!==this.bodyDataList.length?(this.hasBodyChecked=!0,this.hasBodyMidChecked=!0):(this.hasBodyChecked=t>0,this.hasBodyMidChecked=!1)},e.prototype.onUp=function(t,e){if(0!==e){var n=t.splice(e,1);t.splice(e-1,0,n[0])}},e.prototype.onDown=function(t,e){if(e!==t.length-1){var n=t.splice(e,1);t.splice(e+1,0,n[0])}},e.prototype.onTop=function(t,e){var n=t.splice(e,1);t.unshift(n[0])},e.prototype.onBottom=function(t,e){var n=t.splice(e,1);t.push(n[0])},e.prototype.onDeleteBodyParam=function(t,e){var n=t.findIndex((function(t){return t.indexFlag===e}));t.splice(n,1),this.buildBodyCheckedState()},e.prototype.onUpBodyParam=function(t,e){var n=t.findIndex((function(t){return t.id===e}));if(0!==n){var i=t.splice(n,1);t.splice(n-1,0,i[0])}},e.prototype.onDownBodyParam=function(t,e){var n=t.findIndex((function(t){return t.id===e}));if(n!==t.length-1){var i=t.splice(n,1);t.splice(n+1,0,i[0])}},e.prototype.onTopBodyParam=function(t,e){var n=t.findIndex((function(t){return t.id===e})),i=t.splice(n,1);t.unshift(i[0])},e.prototype.onBottomBodyParam=function(t,e){var n=t.findIndex((function(t){return t.id===e})),i=t.splice(n,1);t.push(i[0])},e.prototype.onChangeDisabled=function(t,e,n){e.disabled=!t,"query"===n?this.buildQueryCheckedState():this.buildBodyCheckedState()},e.prototype.init=function(){var t,e,n=this;(null===(e=null===(t=this.interfaceModel)||void 0===t?void 0:t.info)||void 0===e?void 0:e.id)&&(this.interfaceModel.queryParams.forEach((function(t){t.indexFlag||(t.indexFlag=n.formParamsIndex+++"_"+n.interfaceModel.info.id),t._checked=!t.disabled})),this.queryDataList=this.interfaceModel.queryParams,this.interfaceModel.formParams.forEach((function(t){t.indexFlag||(t.indexFlag=n.formParamsIndex+++"_"+n.interfaceModel.info.id),t._checked=!t.disabled})),this.buildQueryCheckedState(),this.buildBodyCheckedState())},Object.defineProperty(e.prototype,"bodyDataList",{get:function(){var t=this.typeMap[this.bodyType];return this.interfaceModel.formParams.filter((function(e){return e.type===t}))},set:function(t){this.interfaceModel.formParams=t},enumerable:!1,configurable:!0}),e.prototype.onAddRequestParam=function(){this.queryDataList.push({indexFlag:this.formParamsIndex+++"_"+this.interfaceModel.info.id,name:"",text:"",type:"QueryString",valueContent:"",requireFlag:0,disabled:!1,_checked:!0}),this.buildQueryCheckedState()},e.prototype.onAddBodyParam=function(){this.interfaceModel.formParams.push({indexFlag:this.formParamsIndex+++"_"+this.interfaceModel.info.id,fileName:"",name:"",text:"",type:this.typeMap[this.bodyType],valueContent:"",requireFlag:0,_checked:!0,disabled:!1,valueType:"String"}),this.buildBodyCheckedState()},Object.defineProperty(e.prototype,"bodyType",{get:function(){var t,e;return(null===(e=null===(t=this.interfaceModel)||void 0===t?void 0:t.info)||void 0===e?void 0:e.requestBodyType)||"Form"},set:function(t){this.interfaceModel.info.requestBodyType=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isFormData",{get:function(){return"Form"===this.bodyType||"X_www_form_urlencoded"===this.bodyType},enumerable:!1,configurable:!0}),e.prototype.onBeautify=function(){this.interfaceModel.json&&(this.interfaceModel.json=JSON.stringify(JSON.parse(this.interfaceModel.json),null,4))},e.prototype.mounted=function(){return h(this,void 0,void 0,(function(){var t;return f(this,(function(e){switch(e.label){case 0:return[4,this.service.getEnumByType("requestBodyType")];case 1:return t=e.sent(),this.requestBodyTypeList=(null===t||void 0===t?void 0:t.result)||[],this.interfaceModel&&this.interfaceModel.info&&(this.interfaceModel.info.requestBodyType=this.interfaceModel.info.requestBodyType||(this.requestBodyTypeList.length?this.requestBodyTypeList[0].name:"Form")),[2]}}))}))},e.prototype.onChangeFormParamType=function(t,e){this.interfaceModel.formParams.forEach((function(t){if(t.indexFlag===e.indexFlag)return t.valueType=e.valueType}))},e.prototype.onClickRow=function(t){this.currentFormParamRow=t},e.prototype.onImport=function(t){return h(this,void 0,void 0,(function(){var e=this;return f(this,(function(n){return this.formData.append(this.currentFormParamRow.indexFlag,t),this.bodyDataList=this.interfaceModel.formParams.map((function(n){return n.indexFlag===e.currentFormParamRow.indexFlag&&(n.fileName=t.name,n.valueContent=null),u({},n)})),[2,Promise.reject(!1)]}))}))},e.prototype.onClearFile=function(t){this.formData.delete(t.indexFlag),this.bodyDataList=this.interfaceModel.formParams.map((function(e){return e.indexFlag===t.indexFlag&&(e.fileName=""),u({},e)}))},e.prototype.onQuerySelectionChange=function(t){var e=this;this.queryDataList.forEach((function(n){e.isInArray(t,n.indexFlag)?(e.$set(n,"disabled",!1),e.$set(n,"_checked",!0)):(e.$set(n,"disabled",!0),e.$set(n,"_checked",!1))}))},e.prototype.onQueryChange=function(){var t=this;this.hasQueryMidChecked||this.hasQueryChecked?this.queryDataList.forEach((function(e){t.$set(e,"disabled",!0),t.$set(e,"_checked",!1)})):this.queryDataList.forEach((function(e){t.$set(e,"disabled",!1),t.$set(e,"_checked",!0)})),this.buildQueryCheckedState()},e.prototype.onBodyChange=function(){var t=this;this.hasBodyMidChecked||this.hasBodyChecked?this.bodyDataList.forEach((function(e){t.$set(e,"disabled",!0),t.$set(e,"_checked",!1)})):this.bodyDataList.forEach((function(e){t.$set(e,"disabled",!1),t.$set(e,"_checked",!0)})),this.buildBodyCheckedState()},e.prototype.onBodySelectionChange=function(t){var e=this;this.bodyDataList.forEach((function(n){e.isInArray(t,n.indexFlag)?(e.$set(n,"disabled",!1),e.$set(n,"_checked",!0)):(e.$set(n,"disabled",!0),e.$set(n,"_checked",!1))}))},e.prototype.isInArray=function(t,e){for(var n=!1,i=0,r=t;i<r.length;i++){var o=r[i];if(o.indexFlag===e){n=!0;break}}return n},e.prototype.showScriptDoc=function(){return h(this,void 0,void 0,(function(){var t;return f(this,(function(e){switch(e.label){case 0:return[4,this.service.getScriptDoc1()];case 1:return t=e.sent(),t?(this.scriptDoc=t,this.scriptDocShow=!0):this.$message.error("获取说明文档失败"),[2]}}))}))},d([Object(y["config"])({default:function(){return new ze}})],e.prototype,"interfaceModel",void 0),d([Object(y["config"])({default:function(){return new FormData}})],e.prototype,"formData",void 0),d([O(De)],e.prototype,"service",void 0),d([Object(y["watch"])("interfaceModel",{immediate:!0})],e.prototype,"init",null),e=d([Object(y["component"])({template:n("7640"),components:{"u-editor":en,"u-doc-modal":st}})],e),e}(Je)),hn=dn,fn=(n("2a79"),n("b156"),n("61ef"),function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return p(e,t),d([Object(y["config"])({default:""})],e.prototype,"tips",void 0),d([Object(y["config"])({default:""})],e.prototype,"labelTitle",void 0),d([Object(y["config"])({type:Boolean,default:!1})],e.prototype,"labelColon",void 0),e=d([Object(y["component"])({template:n("2f53")})],e),e}(y["Component"])),mn=fn,yn=(n("1a93"),function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.securityList=[],e.keyword="",e.currentSecurityItem={},e.securityTypeList=[],e.grantTypeList=[],e.tokenLocationTypeList=[],e.isAddOnce=!1,e.exitAddItem=!1,e.scriptDocShow=!1,e.scriptDoc="",e.diyKeywordList=[],e.isEmpty=!0,e.onFilter=_e()((function(){e.getSecurityList()}),300),e}return p(e,t),Object.defineProperty(e.prototype,"show",{get:function(){return this.value},set:function(t){this.$emit("input",t)},enumerable:!1,configurable:!0}),e.prototype.onShowChange=function(t){return h(this,void 0,void 0,(function(){return f(this,(function(e){return t?(this.isAddOnce=this.isAdd,this.getSecurityTypeList(),this.getSecurityList(),this.getTokenLocationTypeList(),this.getGrantTypeList(),this.queryDiyKeyword()):(this.keyword="",this.currentSecurityItem={}),[2]}))}))},e.prototype.queryDiyKeyword=function(){return h(this,void 0,void 0,(function(){var t,e,n;return f(this,(function(i){switch(i.label){case 0:return[4,this.service.preScript()];case 1:return t=i.sent(),e=t||{},n=[],null===e||void 0===e||e.group.forEach((function(t){"业务案例"!==t.name&&t.list.forEach((function(e){n.push({meta:t.name,caption:e.code,value:e.code,score:1})}))})),this.diyKeywordList=n,[2]}}))}))},e.prototype.getSecurityTypeList=function(){return h(this,void 0,void 0,(function(){var t,e;return f(this,(function(n){switch(n.label){case 0:return[4,this.service.getEnumByType("authenticationType")];case 1:return t=n.sent(),e=(null===t||void 0===t?void 0:t.result)||[],this.securityTypeList=e.filter((function(t){return"None"!==t.name})),[2]}}))}))},e.prototype.getTokenLocationTypeList=function(){return h(this,void 0,void 0,(function(){var t;return f(this,(function(e){switch(e.label){case 0:return[4,this.service.getEnumByType("tokenLocationType")];case 1:return t=e.sent(),this.tokenLocationTypeList=(null===t||void 0===t?void 0:t.result)||[],[2]}}))}))},e.prototype.getGrantTypeList=function(){return h(this,void 0,void 0,(function(){var t;return f(this,(function(e){switch(e.label){case 0:return[4,this.service.getEnumByType("grantType")];case 1:return t=e.sent(),this.grantTypeList=(null===t||void 0===t?void 0:t.result)||[],[2]}}))}))},e.prototype.getSecurityList=function(){return h(this,void 0,void 0,(function(){var t,e,n,i=this;return f(this,(function(r){switch(r.label){case 0:return[4,this.service.getSecurityList({name:this.keyword,projectId:this.projectID})];case 1:return t=r.sent(),(null===t||void 0===t?void 0:t.hasError)||(e=t.result||[],this.securityList=e.map((function(t){return"GROOVY_SCRIPT"!==t.type?t.content=JSON.parse(t.content):(t.scriptContent=t.content,t.content={}),t})),(this.isAddOnce||this.exitAddItem)&&(this.onAddItem(),this.isAddOnce=!1,this.exitAddItem=!1),this.currentSecurityItem&&this.currentSecurityItem.id?(n=this.securityList.filter((function(t){return t.id===i.currentSecurityItem.id})),this.onSelectSecurityItem(n[0]||this.securityList[0])):this.securityList.length&&this.onSelectSecurityItem(this.securityList[0])),[2]}}))}))},e.prototype.onSelectSecurityItem=function(t){this.currentSecurityItem=t.$clone()},e.prototype.onEmpty=function(t){this.isEmpty=!!t},e.prototype.onDelete=function(t){return h(this,void 0,void 0,(function(){var e;return f(this,(function(n){switch(n.label){case 0:return t.id?(this.securityList.find((function(t){return!t.id}))&&(this.exitAddItem=!0),[4,this.service.deleteSecurityItem(t.id)]):[3,2];case 1:return e=n.sent(),(null===e||void 0===e?void 0:e.hasError)||this.getSecurityList(),[3,3];case 2:this.securityList.shift(),n.label=3;case 3:return this.securityList.length&&this.onSelectSecurityItem(this.securityList[0]),this.$publish("api://security-list-refresh"),[2]}}))}))},e.prototype.onAddItem=function(){if(!(this.securityList.length>0)||this.securityList[0].id){var t={name:"",type:"GROOVY_SCRIPT",content:{},scriptContent:""};this.securityList.unshift(t),this.currentSecurityItem=this.securityList[0].$clone()}},e.prototype.onCancel=function(){this.show=!1,this.keyword="",this.currentSecurityItem={}},e.prototype.onSave=function(){return h(this,void 0,void 0,(function(){var t,e;return f(this,(function(n){switch(n.label){case 0:return t={projectId:this.projectID,name:this.currentSecurityItem.name,type:this.currentSecurityItem.type},"GROOVY_SCRIPT"===this.currentSecurityItem.type?(t.location=null,t.locationKey=null,t.content=this.currentSecurityItem.scriptContent):(t.location=this.currentSecurityItem.location,t.locationKey=this.currentSecurityItem.locationKey,t.content={},"Api_Key"===this.currentSecurityItem.type?t.content.key=this.currentSecurityItem.content.key:"Base_Auth"===this.currentSecurityItem.type?(t.content.username=this.currentSecurityItem.content.username,t.content.password=this.currentSecurityItem.content.password):"OAuth2"===this.currentSecurityItem.type&&(t=u(u({},t),this.currentSecurityItem),"password"!==this.currentSecurityItem.content.grantType&&(delete t.content.password,delete t.content.username)),t.content=JSON.stringify(t.content)),t.name?t.type?(e=null,this.currentSecurityItem.id?(t.id=this.currentSecurityItem.id,t.createTime=this.currentSecurityItem.createTime,[4,this.service.updateSecurityItem(t)]):[3,2]):[2,this.$message.warning("请选择授权类型!")]:[2,this.$message.warning("请填写授权名称!")];case 1:return e=n.sent(),[3,4];case 2:return[4,this.service.addSecurityItem(t)];case 3:e=n.sent(),n.label=4;case 4:return(null===e||void 0===e?void 0:e.hasError)||(this.getSecurityList(),this.$publish("api://security-list-refresh")),[2]}}))}))},e.prototype.showScriptDoc=function(){return h(this,void 0,void 0,(function(){var t;return f(this,(function(e){switch(e.label){case 0:return[4,this.service.getScriptDoc()];case 1:return t=e.sent(),t?(this.scriptDoc=t,this.scriptDocShow=!0):this.$message.error("获取帮助文档失败"),[2]}}))}))},d([O(De)],e.prototype,"service",void 0),d([Object(y["config"])({type:Boolean,default:!0})],e.prototype,"value",void 0),d([Object(y["config"])({type:String,default:""})],e.prototype,"projectID",void 0),d([Object(y["config"])({type:Boolean,default:!1})],e.prototype,"isAdd",void 0),d([Object(y["watch"])("show")],e.prototype,"onShowChange",null),d([Object(y["watch"])("securityList.length",{immediate:!0})],e.prototype,"onEmpty",null),e=d([Object(y["component"])({template:n("3bf8"),components:{"u-tips-form-label":mn,"u-doc-modal":st,"u-editor":mt}})],e),e}(y["Component"])),vn=yn,gn=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.securityList=[],e.currentSecurityItem={},e.currentSecurityItemId="",e.showSecurity=!1,e.isAdd=!0,e.grantTypeList=[],e}return p(e,t),e.prototype.mounted=function(){var t;return h(this,void 0,void 0,(function(){var e=this;return f(this,(function(n){switch(n.label){case 0:return this.getGrantTypeList(),[4,this.getSecurityList()];case 1:return n.sent(),this.currentSecurityID?this.currentSecurityItemId=this.currentSecurityID:(null===(t=this.interfaceModel.authentication)||void 0===t?void 0:t.id)&&(this.currentSecurityItemId=this.interfaceModel.authentication.id),this.currentSecurityItem=this.securityList.find((function(t){return t.id===e.currentSecurityItemId}))||{},[2]}}))}))},e.prototype.getGrantTypeList=function(){return h(this,void 0,void 0,(function(){var t,e=this;return f(this,(function(n){switch(n.label){case 0:return[4,this.service.getEnumByType("grantType")];case 1:return t=n.sent(),this.grantTypeList=(null===t||void 0===t?void 0:t.result)||[],this.$subscribe("api://security-list-refresh",(function(t){return h(e,void 0,void 0,(function(){var e,n,i,r=this;return f(this,(function(o){switch(o.label){case 0:return e=t.get("isBatchRefresh")||!1,[4,this.getSecurityList()];case 1:return o.sent(),this.currentSecurityID?this.currentSecurityItemId=this.currentSecurityID:(null===(n=this.interfaceModel.authentication)||void 0===n?void 0:n.id)&&(this.currentSecurityItemId=this.interfaceModel.authentication.id),(null===(i=this.interfaceModel.authentication)||void 0===i?void 0:i.id)&&e&&(this.currentSecurityItemId=this.interfaceModel.authentication.id),this.currentSecurityItem=this.securityList.find((function(t){return t.id===r.currentSecurityItemId}))||{},this.onChangeSecurityItem(this.currentSecurityItemId),[2]}}))}))})),[2]}}))}))},e.prototype.findGrantTypeText=function(t){var e=this.grantTypeList.find((function(e){return e.name===t}));return e?e.text:""},e.prototype.getSecurityList=function(){return h(this,void 0,void 0,(function(){var t,e;return f(this,(function(n){switch(n.label){case 0:return[4,this.service.getSecurityList({projectId:this.projectID})];case 1:return t=n.sent(),(null===t||void 0===t?void 0:t.hasError)||(e=t.result||[],this.securityList=e.map((function(t){return"GROOVY_SCRIPT"!==t.type?t.content=JSON.parse(t.content):(t.scriptContent=t.content,t.content={}),t}))),[2]}}))}))},e.prototype.onChangeSecurityItem=function(t){this.$emit("on-current-id",t),t?(this.currentSecurityItem=this.securityList.find((function(e){return e.id===t})),this.interfaceModel.authentication=this.interfaceModel.authentication||new Ve,this.interfaceModel.authentication.type=this.currentSecurityItem.type,this.interfaceModel.authentication.location=this.currentSecurityItem.location,this.interfaceModel.authentication.locationKey=this.currentSecurityItem.locationKey,"GROOVY_SCRIPT"===this.currentSecurityItem.type?this.interfaceModel.authentication.content=this.currentSecurityItem.scriptContent:this.interfaceModel.authentication.content=JSON.stringify(this.currentSecurityItem.content)):this.interfaceModel.authentication={type:"",location:"",locationKey:"",content:"",id:""},this.interfaceModel.info.authId=this.currentSecurityItem.id},e.prototype.onAddSecurityItem=function(){this.$refs.addSecuritySelect.visible=!1,this.showSecurity=!0},e.prototype.onClear=function(){this.currentSecurityItem={}},d([O(De)],e.prototype,"service",void 0),d([Object(y["config"])({default:function(){return new ze}})],e.prototype,"interfaceModel",void 0),d([Object(y["config"])({type:String,default:""})],e.prototype,"projectID",void 0),d([Object(y["config"])({type:String,default:""})],e.prototype,"currentSecurityID",void 0),e=d([Object(y["component"])({template:n("3de4"),components:{"u-tips-form-label":mn,"u-security-modal":vn}})],e),e}(y["Component"]),bn=gn,wn=(n("0a2e"),function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.columns=[{title:"次数",key:"header",width:"100"},{title:"5",key:"five"},{title:"6",key:"six"},{title:"7",key:"seven"},{title:"8",key:"eight"},{title:"9",key:"nine"},{title:"10",key:"ten"}],e.data=[{header:"覆盖范围",five:"1h",six:"2h",seven:"4h",eight:"8h",nine:"16h",ten:"32h"}],e}return p(e,t),d([Object(y["config"])({default:""})],e.prototype,"tips",void 0),d([Object(y["config"])({default:""})],e.prototype,"labelTitle",void 0),d([Object(y["config"])({default:520})],e.prototype,"width",void 0),d([Object(y["config"])({type:Boolean,default:!1})],e.prototype,"labelColon",void 0),e=d([Object(y["component"])({template:n("dc41")})],e),e}(y["Component"])),xn=wn;(function(t){t["Private"]="0",t["Public"]="1",t["Protected"]="2"})(fe||(fe={})),function(t){t["PlateForm"]="1",t["Email"]="2",t["CopyDisk"]="3",t["MediumExchange"]="4"}(me||(me={})),function(t){t["ElectronicFile"]="1",t["ElectronicExcel"]="2",t["Database"]="3",t["GraphicImage"]="4",t["StreamingMedia"]="5"}(ye||(ye={})),function(t){t["Realtime"]="1",t["Daily"]="2",t["Weekly"]="3",t["Monthly"]="4",t["Quarterly"]="5",t["Annually"]="6",t["Irregular"]="7",t["Other"]="8"}(ve||(ve={})),function(t){t["Unreleased"]="0",t["Released"]="1"}(ge||(ge={}));var Sn=[{value:0,name:"否"},{value:1,name:"是"}],In=[{value:0,name:"不记录"},{value:1,name:"记录全部"},{value:2,name:"记录失败"}];n("06a8");function kn(t){var e=Cn();return"".concat(e,"/api/exchange/").concat(t)}function Cn(){var t=window.commonSetting.baseUrl||"",e="";return e=t&&t.startsWith("https://")||t.startsWith("http://")?"".concat(t):t&&t.startsWith("/")?"".concat(window.location.origin).concat(t):t?"".concat(window.location.origin,"/").concat(t):"".concat(window.location.origin),e}var jn=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.egovaApiTree=[],e.projectList=[],e.model={name:"",code:"",categoryId:"",retryTimes:"",description:"",enableRetry:"false",authFlag:1,logSavingEnabled:2},e.apiModel={},e.apiTree=[],e.apiColumns=[{title:"参数名称",key:"name",align:"left",ellipsis:!0,tooltip:!0},{title:"参数值",key:"valueContent",align:"left",ellipsis:!0,tooltip:!0}],e.apiParamList=[],e.isRetryList=[{name:"是",value:"true"},{name:"否",value:"false"}],e.statusCodeList=[{name:"默认(502,504)",value:"1"},{name:"自定义",value:"2"}],e.statusCode="1",e.authFlag=Sn,e.loginLevelFlag=In,e.isResourceCodeEnabled=!1,e.rulesValidate={},e.isNameValid=!1,e.isCategoryIdValid=!1,e.isCodeValid=!1,e.isDesValid=!1,e.isRetryTimesValid=!1,e.isRetryCodeValid=!1,e.isRetryTimesReadonly=!1,e.isDeatilPage=!1,e.readonly=!1,e.formTitle="流程配置详情",e.categoryList=[],e.isAdding=!1,e.proxyName="",e.proxyList=[],e}return p(e,t),e.prototype.onStatusCodeChange=function(t){var e=this;"2"!==t&&(this.model.retryCode="",this.isRetryCodeValid=!0,this.$nextTick((function(){e.$refs.configform&&e.$refs.configform.validateField("retryCode",(function(){}))}))),"2"===t&&this.$nextTick((function(){e.$refs.configform&&e.$refs.configform.validateField("retryCode")}))},e.prototype.changeInputStatus=function(){this.isResourceCodeEnabled=Boolean(this.model.authFlag)},Object.defineProperty(e.prototype,"url",{get:function(){return kn(this.model.code||"")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"show",{get:function(){return this.value},set:function(t){this.$emit("input",t)},enumerable:!1,configurable:!0}),e.prototype.onSave=function(){var t,e=this;this.model.logSavingEnabled&&"false"!==this.model.enableRetry||(this.isRetryTimesValid=!0),null===(t=this.$refs.configform)||void 0===t||t.validate((function(t){return h(e,void 0,void 0,(function(){var e;return f(this,(function(n){return t?(e=u(u({},this.model),this.apiModel),this.$emit("on-save",e),[2]):[2,this.$message.warning("请完善配置信息")]}))}))}))},e.prototype.onCancel=function(){this.show=!1},e.prototype.mounted=function(){return h(this,void 0,void 0,(function(){return f(this,(function(t){return this.getEgovaApiTree(),this.getProjectList(),this.getCategoryList(),this.apiModel.projectId=this.info.projectId,this.apiModel.type="API",this.rulesValidate={categoryId:[{validator:this.validateCategoryId,trigger:"blur,change"}],name:[{validator:this.validateName,required:!1,trigger:"blur,change"}],code:[{validator:this.validateCode,required:!1,trigger:"blur,change"}],description:[{validator:this.validateDescription,required:!1,trigger:"blur,change"}],retryTimes:[{validator:this.validateRetryTimes,trigger:"blur,change"}],retryCode:[{validator:this.validateRetryCode,trigger:"blur,change"}]},[2]}))}))},e.prototype.validateCategoryId=function(t,e,n){e?(this.isCategoryIdValid=!0,n()):(this.isCategoryIdValid=!1,n(new Error("请选择所属分类")))},e.prototype.validateName=function(t,e,n){var i=String(e||"").trim();i?i.length>50?(this.isNameValid=!1,n(new Error("代理名称长度不能超过50"))):(this.isNameValid=!0,n()):(this.isNameValid=!1,n(new Error("请填写代理名称,不能为空")))},e.prototype.validateCode=function(t,e,n){var i=String(e||"").trim();i?i.length>80?(this.isCodeValid=!1,n(new Error("接口编码长度不能超过80"))):(this.isCodeValid=!0,n()):(this.isCodeValid=!1,n(new Error("请填写接口编码,不能为空")))},e.prototype.validateDescription=function(t,e,n){e&&e.length>150?(this.isDesValid=!1,n(new Error("描述长度不能超过150"))):(this.isDesValid=!0,n())},e.prototype.validateRetryTimes=function(t,e,n){if("false"===this.model.enableRetry)return this.isRetryTimesValid=!0,void n();var i=/(^[1-9]\d*$)/;i.test(e)?(this.isRetryTimesValid=!0,n()):(this.isRetryTimesValid=!1,n(new Error("请输入正整数")))},e.prototype.validateRetryCode=function(t,e,n){if("2"===this.statusCode)if(e&&""!==e.trim()){var i=e.split(",").map((function(t){return t.trim()})),r=i.every((function(t){return/^\d+$/.test(t)}));r?(this.isRetryCodeValid=!0,n()):(this.isRetryCodeValid=!1,n(new Error("格式不正确,为数字或英文逗号分隔的数字")))}else this.isRetryCodeValid=!1,n(new Error("请输入状态码"));else this.isRetryCodeValid=!0,n()},e.prototype.onLogSavingEnabledChange=function(t){this.model.logSavingEnabled=t},e.prototype.getCategoryList=function(){return h(this,void 0,void 0,(function(){var t,e;return f(this,(function(n){switch(n.label){case 0:return[4,this.service.getCategoryList()];case 1:return t=n.sent(),t&&!t.hasError&&(e=(null===t||void 0===t?void 0:t.result)||[],e.length>0?(e.forEach((function(t){t.parentId||(t.parentId="virtual_root_directory")})),this.categoryList=[u(u({},e[0]),{id:"virtual_root_directory",children:e,name:"全部",expand:!0,parentId:null,parentName:null})]):this.categoryList=[{id:"virtual_root_directory",children:e,name:"全部",expand:!0,parentId:null,parentName:null}]),[2]}}))}))},e.prototype.getEgovaApiTree=function(){return h(this,void 0,void 0,(function(){var t;return f(this,(function(e){switch(e.label){case 0:return[4,this.service.getEgovaApiTree()];case 1:return t=e.sent(),this.egovaApiTree=(null===t||void 0===t?void 0:t.result)||[],[2]}}))}))},e.prototype.getProjectList=function(){return h(this,void 0,void 0,(function(){var t;return f(this,(function(e){switch(e.label){case 0:return[4,this.service.getProjectList()];case 1:return t=e.sent(),this.projectList=(null===t||void 0===t?void 0:t.result)||[],[2]}}))}))},e.prototype.freshApiTree=function(){var t,e;return h(this,void 0,void 0,(function(){var n,i;return f(this,(function(r){switch(r.label){case 0:if(!this.proxyName){try{null===(e=null===(t=this.$refs.configform)||void 0===t?void 0:t.resetFields)||void 0===e||e.call(t)}catch(o){console.warn("resetFields 执行失败:",o)}this.resetForm()}return this.show?this.apiModel.projectId&&this.show?(this.apiTree=this.projectTree||[],this.apiModel.typeId=this.info.id,this.onApiTreeSelect(this.info),[4,this.service.getApiRequestParams(this.apiModel.typeId)]):[2]:(this.readonly=!1,this.isAdding=!1,this.formTitle="流程配置详情",this.proxyName="",[2]);case 1:return n=r.sent(),this.apiParamList=(null===n||void 0===n?void 0:n.result.filter((function(t){return!t.disabled})))||[],[4,this.service.getProxyNameList(this.info.id)];case 2:return i=r.sent(),this.proxyList=(null===i||void 0===i?void 0:i.result)||[],[2]}}))}))},e.prototype.enableRetryChange=function(t,e){var n,i;"false"===t?(null===(n=this.$refs.configform)||void 0===n||n.validateField("retryTimes"),this.isRetryTimesReadonly=!0,this.model.retryTimes=void 0):"null"===t?(this.model.enableRetry="false",this.model.retryTimes=void 0,null===(i=this.$refs.configform)||void 0===i||i.validateField("retryTimes"),this.isRetryTimesReadonly=!0):this.isRetryTimesReadonly=!1},e.prototype.resetFields=function(){var t,e;if(this.proxyName||this.isAdding){try{null===(e=null===(t=this.$refs.configform)||void 0===t?void 0:t.resetFields)||void 0===e||e.call(t)}catch(n){}this.isAdding&&this.resetForm()}},e.prototype.onApiTreeSelect=function(t){var e;this.apiModel.path=(null!==(e=null===t||void 0===t?void 0:t.path)&&void 0!==e?e:null===t||void 0===t?void 0:t.url)||""},e.prototype.selectProxyName=function(t){this.formTitle="流程配置详情";var e=this.proxyList.filter((function(e){return e.id===t.id}))[0];this.model=u({},e),this.statusCode=this.model.retryCode?"2":"1",!0===this.model.enableRetry?this.model.enableRetry="true":!1===this.model.enableRetry&&(this.model.enableRetry="false"),this.isAdding=!1},e.prototype.selectCategory=function(t){this.model.categoryId=t.id},e.prototype.onCopy=function(t){var e=document.createElement("textarea");try{e.value=t,document.body.appendChild(e),e.select(),document.execCommand("Copy"),this.$message.success("复制成功")}catch(n){}finally{e.remove()}},e.prototype.resetForm=function(){this.model={name:"",code:"",categoryId:"",description:"",retryTimes:"",enableRetry:"false",authFlag:1,logSavingEnabled:2}},e.prototype.onAdd=function(){this.isAdding=!0,this.statusCode="1",this.proxyName="",this.formTitle="新增流程配置"},d([Object(y["config"])({type:Boolean,default:!1})],e.prototype,"value",void 0),d([Object(y["autowired"])(De)],e.prototype,"service",void 0),d([Object(y["config"])({type:Boolean,default:!1})],e.prototype,"loading",void 0),d([Object(y["config"])({type:Object,default:{}})],e.prototype,"info",void 0),d([Object(y["config"])({type:Array,default:[]})],e.prototype,"projectTree",void 0),d([Object(y["watch"])("statusCode",{immediate:!0})],e.prototype,"onStatusCodeChange",null),d([Object(y["watch"])("model.authFlag",{immediate:!0})],e.prototype,"changeInputStatus",null),d([Object(y["watch"])("show")],e.prototype,"freshApiTree",null),d([Object(y["watch"])("model.enableRetry",{immediate:!0})],e.prototype,"enableRetryChange",null),d([Object(y["watch"])("proxyName",{immediate:!0}),Object(y["watch"])("isAdding",{immediate:!0})],e.prototype,"resetFields",null),e=d([Object(y["component"])({template:n("40aa"),components:{"u-tree-selector":J,"tips-table-label":xn}})],e),e}(y["Component"]),Dn=jn,On=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.response=new nn,e.responseCache=new Map,e.loading=!1,e.showEnvironmentModal=!1,e.currentId="",e.paramList=[],e.errorLine=null,e.scriptView=!1,e.originId="",e.apiForm={envName:null,authName:null},e.showImportModal=!1,e.importObj={},e.showDrawer=!1,e.typeList=[{value:"GET",text:"GET"},{value:"POST",text:"POST"},{value:"PUT",text:"PUT"},{value:"DELETE",text:"DELETE"}],e.requertSettingTypeList=[{title:"参数",name:"params"},{title:"Headers",name:"headers"},{title:"授权管理",name:"v2security"},{title:"前置脚本",name:"pre-execution"},{title:"后置转换",name:"after-execution-transfer"},{title:"后置脚本",name:"after-execution-script"}],e.rules={envName:[{required:!1,validator:e.validateEnvName,trigger:"blur"}],authName:[{required:!1,validator:e.validateAuthName,trigger:"blur"}]},e.currentRequestSettingType=e.requertSettingTypeList[0],e.formData=new FormData,e}return p(e,t),e.prototype.mounted=function(){this.getEnvironmentParamList()},e.prototype.onClickRequertSettingTpye=function(t){this.currentRequestSettingType=t},e.prototype.onClickRequertSettingSubTpye=function(t,e){this.currentRequestSettingType=t.children.find((function(t){return t.name===e}))},e.prototype.onRun=function(){var t,e,n,i,r,o;return h(this,void 0,void 0,(function(){var a,s,c,l,p,d,h,m=this;return f(this,(function(f){switch(f.label){case 0:return this.loading=!0,a=[],s=[],(null===(t=this.interfaceModel.formParams)||void 0===t?void 0:t.length)>0&&(a=this.interfaceModel.formParams.filter((function(t){return!t.disabled}))),(null===(e=this.interfaceModel.requestHeaders)||void 0===e?void 0:e.length)>0&&(s=this.interfaceModel.requestHeaders.filter((function(t){return!t.disabled}))),(null===(n=this.interfaceModel.environmentParam)||void 0===n?void 0:n.length)||(c=this.paramList.findIndex((function(t){return t.id===m.interfaceModel.info.envId})),this.interfaceModel.environmentParam=c>-1?this.paramList[c]:null),l=null,p=a.filter((function(t){return"FILE"===t.valueType})),p.length?(d=u(u({},this.interfaceModel),{formParams:a,requestHeaders:s}),h=new FormData,p.forEach((function(t){h.append(t.name,m.formData.get(t.indexFlag))})),h.append("_model",JSON.stringify(d)),[4,this.service.runWithFile(this.interfaceModel.info.id,h)]):[3,2];case 1:return l=f.sent(),[3,4];case 2:return[4,this.service.run(this.interfaceModel.info.id,u(u({},this.interfaceModel),{formParams:a,requestHeaders:s}))];case 3:l=f.sent(),f.label=4;case 4:return this.loading=!1,this.response=(null===l||void 0===l?void 0:l.result)||new nn,l.hasError&&(this.response.code=400,this.response.errorMessage=l.message),this.responseCache.set(this.interfaceModel.info.id,this.response),(null===(i=this.response.errorLineNumbers)||void 0===i?void 0:i.length)?this.errorLine=this.response.errorLineNumbers:this.errorLine=null,this.originId=(null===(o=null===(r=this.interfaceModel)||void 0===r?void 0:r.info)||void 0===o?void 0:o.id)||"",[2]}}))}))},e.prototype.onProcessSave=function(t){return h(this,void 0,void 0,(function(){return f(this,(function(e){switch(e.label){case 0:return this.loading=!0,[4,this.service.save(t)];case 1:return e.sent(),this.loading=!1,this.showDrawer=!1,[2]}}))}))},e.prototype.onSave=function(){return h(this,void 0,void 0,(function(){var t;return f(this,(function(e){switch(e.label){case 0:return this.loading=!0,t=this.interfaceModel.$clone(),t.name&&t.name!==t.info.name&&(t.info.name=t.name),[4,this.service.saveApiInfo(t)];case 1:return e.sent(),this.$publish("api://project-detail-save"),this.loading=!1,[2]}}))}))},e.prototype.interfaceModelChange=function(){this.response=this.responseCache.get(this.interfaceModel.info.id)||new nn},e.prototype.showImportModalChange=function(t){t||this.$refs.import.resetFields()},e.prototype.onImport=function(t){return h(this,void 0,void 0,(function(){var e,n=this;return f(this,(function(i){return e=new FileReader,e.readAsText(t,"UTF-8"),e.onload=function(t){return h(n,void 0,void 0,(function(){var e,n,i,r,o,a,s,c;return f(this,(function(l){e=t.target.result,n=null;try{n=JSON.parse(e),this.importObj=n}catch(p){return this.$message.error("JSON格式有误"),[2,!1]}return(null===(i=null===n||void 0===n?void 0:n.authentication)||void 0===i?void 0:i.name)||(null===(r=null===n||void 0===n?void 0:n.environmentParam)||void 0===r?void 0:r.name)?(this.apiForm.envName=(null===(o=null===n||void 0===n?void 0:n.environmentParam)||void 0===o?void 0:o.name)?null===(a=null===n||void 0===n?void 0:n.environmentParam)||void 0===a?void 0:a.name:null,this.apiForm.authName=(null===(s=null===n||void 0===n?void 0:n.authentication)||void 0===s?void 0:s.name)?null===(c=null===n||void 0===n?void 0:n.authentication)||void 0===c?void 0:c.name:null,this.showImportModal=!0):this.saveImportData(n),[2]}))}))},[2,!1]}))}))},e.prototype.saveImportData=function(t){var e,n;return h(this,void 0,void 0,(function(){var i,r,o;return f(this,(function(a){switch(a.label){case 0:return(null===(e=null===t||void 0===t?void 0:t.authentication)||void 0===e?void 0:e.name)||(null===(n=null===t||void 0===t?void 0:t.environmentParam)||void 0===n?void 0:n.name)?[4,this.$refs.import.validate()]:[3,2];case 1:if(i=a.sent(),!i)return this.$message.warning("验证不通过"),[2];a.label=2;case 2:return r=this.interfaceModel.info.id,t.id=r,t.info.id=r,t.info.name=this.interfaceModel.info.name,t.info.projectId=this.projectId,t.info.categoryId=this.interfaceModel.info.categoryId,t.authentication&&(t.authentication.projectId=this.projectId),t.authentication&&(t.authentication.name=this.apiForm.authName),t.environmentParam&&(t.environmentParam.projectId=this.projectId),t.environmentParam&&(t.environmentParam.name=this.apiForm.envName),t.convertConfig&&(t.convertConfig.apiId=r),["fieldMappings","postScripts","preScripts","queryParams","formParams"].forEach((function(e){null===t||void 0===t||t[e].forEach((function(t){t.apiId=r}))})),null===t||void 0===t||t.requestHeaders.forEach((function(t){t.belongId=r})),[4,this.service.onImportAvr(t)];case 3:return o=a.sent(),(null===o||void 0===o?void 0:o.hasError)?[2]:(this.showImportModal=!1,this.getEnvironmentParamList(),this.$publish("api://project-detail-save-import"),[2])}}))}))},e.prototype.onExport=function(){var t=JSON.stringify(this.interfaceModel,null,4),e=window.URL||window.webkitURL||window,n=new Blob([t]),i=document.createElement("a");i.href=e.createObjectURL(n),i.download=this.interfaceModel.info.name,i.click()},e.prototype.validateEnvName=function(t,e,n){var i,r,o,a,s;return h(this,void 0,void 0,(function(){var t;return f(this,(function(e){switch(e.label){case 0:return[4,this.service.onValidateImport({projectId:this.projectId,envName:(null===(i=this.apiForm)||void 0===i?void 0:i.envName)?null===(r=this.apiForm)||void 0===r?void 0:r.envName:null,authName:(null===(o=this.apiForm)||void 0===o?void 0:o.authName)?null===(a=this.apiForm)||void 0===a?void 0:a.authName:null})];case 1:return t=e.sent(),(null===t||void 0===t?void 0:t.hasError)||(null===(s=null===t||void 0===t?void 0:t.result)||void 0===s?void 0:s.envNameRepeat)?n(new Error("环境变量名重复")):n(),[2]}}))}))},e.prototype.validateAuthName=function(t,e,n){var i,r,o,a,s;return h(this,void 0,void 0,(function(){var t;return f(this,(function(e){switch(e.label){case 0:return[4,this.service.onValidateImport({projectId:this.projectId,envName:(null===(i=this.apiForm)||void 0===i?void 0:i.envName)?null===(r=this.apiForm)||void 0===r?void 0:r.envName:null,authName:(null===(o=this.apiForm)||void 0===o?void 0:o.authName)?null===(a=this.apiForm)||void 0===a?void 0:a.authName:null})];case 1:return t=e.sent(),(null===t||void 0===t?void 0:t.hasError)||(null===(s=null===t||void 0===t?void 0:t.result)||void 0===s?void 0:s.authNameRepeat)?n(new Error("授权名重复")):n(),[2]}}))}))},e.prototype.cancleModify=function(){this.$refs.import.resetFields(),this.showImportModal=!1},e.prototype.onVersion=function(){var t=(this.interfaceModel.info||{}).id;t?this.$router.push({name:"project-version",query:{id:t}}):this.$message.info("尚未保存,无历史版本")},e.prototype.onCurrentId=function(t){this.currentId=t},e.prototype.getEnvironmentParamList=function(){return h(this,void 0,void 0,(function(){var t;return f(this,(function(e){switch(e.label){case 0:return[4,this.service.getVariableList({projectId:this.projectId})];case 1:return t=e.sent(),(null===t||void 0===t?void 0:t.hasError)||(this.paramList=t.result),[2]}}))}))},e.prototype.onAddEnvParam=function(){this.$refs.addEnvParamSelect.visible=!1,this.showEnvironmentModal=!0},e.prototype.onScriptRun=function(){return h(this,void 0,void 0,(function(){return f(this,(function(t){switch(t.label){case 0:return[4,this.onRun()];case 1:return t.sent(),[2]}}))}))},e.prototype.onScriptMax=function(t){this.scriptView=t},e.prototype.onProcess=function(){this.showDrawer=!0},d([O(De)],e.prototype,"service",void 0),d([Object(y["config"])({default:function(){return new ze}})],e.prototype,"interfaceModel",void 0),d([Object(y["config"])({default:!0})],e.prototype,"lengthwise",void 0),d([Object(y["config"])({default:""})],e.prototype,"projectId",void 0),d([Object(y["config"])({default:{}})],e.prototype,"projectTree",void 0),d([Object(y["watch"])("interfaceModel",{immediate:!0})],e.prototype,"interfaceModelChange",null),d([Object(y["watch"])("showImportModal")],e.prototype,"showImportModalChange",null),e=d([Object(y["component"])({template:n("f40e"),components:{response:on,params:hn,headers:ln,"pre-execution":Ye,"after-execution-transfer":sn,"after-execution-script":Ze,v2security:bn,"u-environment-modal":Be,"u-process-drawer":Dn}})],e),e}(y["Component"]),Tn=On,En=(n("948e"),function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.visible=!1,e}return p(e,t),e.prototype.onSelect=function(t,e){this.$emit("on-select",e),this.visible=!1},e.prototype.onClear=function(){this.onSelect([],{})},e.prototype.renderContent=function(t,e){e.root,e.node;var n=e.data;return t("div",{class:"group-select-tree-node"},[t("i",{attrs:{class:"api-icon icon-interface"}}),t("p",{attrs:{title:n.title,class:"api-group-select-tree-node-title"}},n.title)])},d([Object(y["config"])({default:function(){return[]}})],e.prototype,"data",void 0),d([Object(y["config"])({default:function(){return new Object}})],e.prototype,"current",void 0),d([Object(y["config"])({type:Boolean,default:!1})],e.prototype,"isSelector",void 0),e=d([Object(y["component"])({template:n("c01f"),components:{}})],e),e}(y["Component"])),Pn=En,Mn=(n("8ea2"),function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.keyword="",e.apiList=[],e.isEmpty=!0,e.allSelect=!1,e.variableList=[],e.securityList=[],e.set=new Set,e.type="env",e.formData={envId:"",authId:""},e}return p(e,t),Object.defineProperty(e.prototype,"rules",{get:function(){return"env"===this.type?{envId:[{required:!0,message:"请选择",trigger:"change"}]}:"auth"===this.type?{authId:[{required:!0,message:"请选择",trigger:"change"}]}:{envId:[{required:!0,message:"请选择",trigger:"change"}],authId:[{required:!0,message:"请选择",trigger:"change"}]}},enumerable:!1,configurable:!0}),e.prototype.onFilter=function(t){var e=this;this.apiList=this.data.$clone().filter((function(t){if(t.name.indexOf(e.keyword)>-1)return t})),this.apiList.forEach((function(t){e.set.has(t.id)&&(t.selected=!0)}))},e.prototype.onShowChange=function(t){return h(this,void 0,void 0,(function(){return f(this,(function(e){return t?(this.getVariableList(),this.apiList=this.data.$clone()):(this.allSelect=!1,this.set.clear(),this.$refs["batch-api-form"].resetFields()),[2]}))}))},e.prototype.onEmpty=function(t){this.isEmpty=!!t},e.prototype.getVariableList=function(){return h(this,void 0,void 0,(function(){var t,e;return f(this,(function(n){switch(n.label){case 0:return[4,this.service.getVariableList({projectId:this.projectId})];case 1:return t=n.sent(),[4,this.service.getSecurityList({projectId:this.projectId})];case 2:return e=n.sent(),(null===t||void 0===t?void 0:t.hasError)||(this.variableList=t.result||[]),(null===e||void 0===e?void 0:e.hasError)||(this.securityList=e.result||[]),[2]}}))}))},e.prototype.onSelect=function(t,e){t?this.set.add(e.id):this.set.delete(e.id)},e.prototype.onAllSelect=function(t){var e=this;t?this.apiList.forEach((function(t){t.selected=!0,e.set.add(t.id)})):this.apiList.forEach((function(t){t.selected=!1,e.set.delete(t.id)}))},e.prototype.onCancel=function(){this.keyword="",this.value=!1},e.prototype.onSave=function(){return h(this,void 0,void 0,(function(){var t,e,n,i;return f(this,(function(r){switch(r.label){case 0:return this.set.size?[4,this.$refs["batch-api-form"].validate()]:[2,this.$message.warning("请选择api")];case 1:return t=r.sent(),t?(e={ids:Array.from(this.set)},"env"!==this.type?[3,3]:(e.envId="empty"===this.formData.envId?"":this.formData.envId,[4,this.service.onBatchEnv(e)])):[2];case 2:return n=r.sent(),n&&!n.hasError&&(this.$message.success("保存成功!"),this.$emit("on-success",!0),this.$publish("api://batch-api-refresh",e),this.onCancel()),[2];case 3:return"auth"!==this.type?[3,5]:(e.authId="empty"===this.formData.authId?"":this.formData.authId,[4,this.service.onBatchAuth(e)]);case 4:return n=r.sent(),n&&!n.hasError&&(this.$message.success("保存成功!"),this.$publish("api://batch-api-refresh",u(u({},e),{isEnvAndAuth:!0})),this.onCancel()),[2];case 5:return[4,this.service.onBatchEnv(u(u({},e),{envId:"empty"===this.formData.envId?"":this.formData.envId}))];case 6:return n=r.sent(),[4,this.service.onBatchAuth(u(u({},e),{authId:"empty"===this.formData.authId?"":this.formData.authId}))];case 7:return i=r.sent(),(null===n||void 0===n?void 0:n.hasError)||(null===i||void 0===i?void 0:i.hasError)||(this.$message.success("保存成功!"),this.$emit("on-success",!0),this.$publish("api://batch-api-refresh",u(u({},e),{isEnvAndAuth:!0})),this.onCancel()),[2]}}))}))},d([O(De)],e.prototype,"service",void 0),d([Object(ut["PropSync"])("visiable",{default:!1})],e.prototype,"value",void 0),d([Object(y["config"])({default:[]})],e.prototype,"data",void 0),d([Object(y["config"])({default:function(){return[]}})],e.prototype,"projectId",void 0),d([Object(y["watch"])("value")],e.prototype,"onShowChange",null),d([Object(y["watch"])("data.length",{immediate:!0})],e.prototype,"onEmpty",null),e=d([Object(y["component"])({template:n("88af"),components:{}})],e),e}(y["Component"])),Ln=Mn,An=(n("688a"),function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return p(e,t),e.prototype.onClick=function(){if(this.data.children)return this.data.expand=!this.data.expand;this.$emit("on-click-interface",this.data)},Object.defineProperty(e.prototype,"isLeaf",{get:function(){return!this.data.children},enumerable:!1,configurable:!0}),e.prototype.onClickAction=function(t){t&&this.$emit("on-"+t,this.data)},e.prototype.onDelete=function(t){this.$emit("on-"+t,this.data)},d([Object(y["config"])({default:function(){return new Object}})],e.prototype,"data",void 0),e=d([Object(y["component"])({template:n("d953"),components:{"u-confirm":Yt}})],e),e}(y["Component"])),Nn=An,qn=(n("9355"),function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.projectList=[],e.data=[],e.groupTree=[],e.parent={},e.renderData=[],e.keyword="",e.type="all",e.moveType="group",e.MOVE_RESULT={BIND_JOB:"更新失败,API已被任务绑定,不允许变更项目信息",BIND_ENV:"更新失败,API存在关联环境变量,请确认变更项目信息时是否复制环境变量",BIND_NONE:"API未被任务绑定,且API不存在关联环境变量,更新成功",NOT_UPDATED_PROJECT:"API项目信息未改变,更新成功"},e.typeList=[{value:"GET",text:"GET"},{value:"POST",text:"POST"},{value:"PUT",text:"PUT"},{value:"DELETE",text:"DELETE"}],e.showInterfaceModal=!1,e.showGroupModal=!1,e.showBatchModal=!1,e.categoryApiList=[],e.interfaceModel={method:"GET",authFlag:1},e.showCopyModal=!1,e.copyName="",e.group={},e.showMoveModal=!1,e}return p(e,t),e.prototype.mounted=function(){var t=this;this.loadProjectList(),this.$subscribe("api://project-detail-save",(function(){t.init()}))},e.prototype.renderContent=function(t,e){e.root,e.node;var n=e.data;return t(Nn,{props:{data:n},on:{"on-edit-interface":this.onEditInterface,"on-delete-interface":this.onDeleteClick,"on-edit-attribute":this.onBatchEdit,"on-copy-interface":this.onCopyInterface,"on-add-interface":this.onAddInterface,"on-delete-group":this.onDeleteGroup,"on-edit-group":this.onEditGroup,"on-click-interface":this.onCheckInterface}})},e.prototype.onCheckInterface=function(t){this.$emit("on-check-interface",t)},e.prototype.onEditInterface=function(t){this.parent={id:t.parentId,name:t.parentName},this.interfaceModel=t.$clone(),this.moveType="interface",this.showInterfaceModal=!0,this.onChangeProject(!1)},e.prototype.getApis=function(t){var e,n=this;if(null===(e=null===t||void 0===t?void 0:t.apis)||void 0===e||e.forEach((function(t){n.categoryApiList.push(t)})),null===t||void 0===t?void 0:t.children)for(var i=0,r=null===t||void 0===t?void 0:t.children;i<r.length;i++){var o=r[i];this.getApis(o)}},e.prototype.onBatchEdit=function(t){var e,n;if(this.categoryApiList=[],this.getApis(t.$clone()),!(null===(e=this.categoryApiList)||void 0===e?void 0:e.length))return this.$Message.warning("该文件夹下无接口信息,无法批量修改!");null===(n=this.categoryApiList)||void 0===n||n.map((function(t){return t.selected=!1,t})),this.showBatchModal=!0},e.prototype.onDeleteInterface=function(t){return h(this,void 0,void 0,(function(){var e;return f(this,(function(n){switch(n.label){case 0:return[4,this.service.deleteApi(t.id)];case 1:return e=n.sent(),e&&!e.hasError&&(this.init(),this.$emit("on-delete-interface",t)),[2]}}))}))},e.prototype.onDeleteClick=function(t){var e=this;this.$modal.confirm({title:"确定要删除【".concat(t.name,"】吗?"),onOk:function(){return h(e,void 0,void 0,(function(){return f(this,(function(e){return this.onDeleteInterface(t),[2]}))}))}})},e.prototype.onCopyInterface=function(t){this.parent={},this.interfaceModel=t,this.copyName=this.interfaceModel.name+"_copy",this.parent.id=this.interfaceModel.categoryId,this.parent.name=this.interfaceModel.parentName,this.showCopyModal=!0},e.prototype.onCopy=function(){return h(this,void 0,void 0,(function(){var t;return f(this,(function(e){switch(e.label){case 0:return this.copyName?this.parent.name?[4,this.service.copyApi(this.interfaceModel.id,this.copyName,this.interfaceModel.projectId,this.parent.id)]:[2,this.$message.warning("请选择分组")]:[2,this.$message.warning("请填写接口名称")];case 1:if(t=e.sent(),t&&!t.hasError)this.showCopyModal=!1,this.init();else if(t&&t.hasError&&t.message)return[2,this.$message.error(t.message)];return this.interfaceModel={},this.copyName="",this.parent={},[2]}}))}))},e.prototype.onCopyCancel=function(){this.interfaceModel={},this.copyName="",this.parent={},this.showCopyModal=!1},e.prototype.onMoveCancel=function(){this.parent={},this.interfaceModel={},this.group={},this.showMoveModal=!1},e.prototype.onAddInterface=function(t){this.interfaceModel={method:"GET",authFlag:1,categoryId:t.id,projectId:this.projectId},this.parent=t,this.showInterfaceModal=!0,this.onChangeProject(!1)},e.prototype.onSaveInterface=function(){return h(this,void 0,void 0,(function(){var t,e,n;return f(this,(function(i){switch(i.label){case 0:return this.interfaceModel.categoryId=this.parent.id,this.interfaceModel.name?this.interfaceModel.categoryId?this.interfaceModel.name&&this.interfaceModel.name.length>50?(this.$message.error("接口名称长度不能超过50"),this.showInterfaceModal=!0,[2]):this.interfaceModel.id?[4,this.service.checkApi(this.interfaceModel)]:[3,2]:(this.$message.error("接口位置不能为空"),[2]):(this.$message.error("接口名称不能为空"),[2]);case 1:return t=i.sent(),t&&!t.hasError&&(e=t.result,this.showInterfaceModal=!1,["BIND_NONE","NOT_UPDATED_PROJECT"].includes(e)?(this.$message.success("保存接口成功"),this.$emit("on-reset"),this.$publish("api://project-detail-save")):"BIND_JOB"===e?this.$message.error(this.MOVE_RESULT.BIND_JOB):"BIND_ENV"===e&&(this.showMoveModal=!0)),[3,4];case 2:return[4,this.service.saveApi(this.interfaceModel)];case 3:n=i.sent(),n&&!n.hasError&&(this.showInterfaceModal=!1,this.$emit("on-edit-interface-success",this.interfaceModel),this.init()),i.label=4;case 4:return[2]}}))}))},e.prototype.onGourpCancel=function(){this.showGroupModal=!1},e.prototype.onInterfaceCancel=function(){this.showInterfaceModal=!1},e.prototype.onDeleteGroup=function(t){return h(this,void 0,void 0,(function(){var e;return f(this,(function(n){switch(n.label){case 0:return[4,this.service.deleteCategory(t.id)];case 1:return e=n.sent(),e&&!e.hasError&&this.init(),[2]}}))}))},e.prototype.onEditGroup=function(t){this.parent={id:t.parentId,name:t.parentName},this.group=t.$clone(),this.moveType="group",this.showGroupModal=!0,this.onChangeProject(!0)},e.prototype.onAddGroup=function(){this.group={projectId:this.projectId},this.showGroupModal=!0,this.onChangeProject(!0)},e.prototype.onFilter=function(){this.keyword||"all"!==this.type?this.renderData=this.filterData(this.data.$clone()):this.renderData=this.data.$clone()},e.prototype.match=function(t){var e=this,n=-1!==(t.title||t.name).indexOf(this.keyword),i=!1;return!n&&t.children&&t.children.forEach((function(t){i=e.match(t).matched||e.match(t).childrenMatched||i})),{matched:n,childrenMatched:i}},e.prototype.filterData=function(t){var e=this;if(!t||!Array.isArray(t))return t;var n=t.filter((function(t){return e.match(t).childrenMatched}));return n=n.map((function(t){return t.children&&(t.expand=!0,t.children=e.filterData(t.children)),t})),n=n.concat(t.filter((function(t){return e.match(t).matched}))),n},e.prototype.onSelectParent=function(t){this.parent=t},e.prototype.onSaveGroup=function(){return h(this,void 0,void 0,(function(){var t,e,n,i;return f(this,(function(r){switch(r.label){case 0:return this.group.parentId=this.parent.id,this.group.parentName=this.parent.name,this.group.type="api",this.group.name?this.group.id&&this.group.id===this.group.parentId?(this.$message.warning("所属分组不能选中自身"),[2]):(t=this.isChildNode(this.group,this.group.parentId),t?(this.$message.warning("所属分组不能选中自身的子节点"),[2]):this.group.id?[4,this.service.checkCategory(this.group)]:[3,2]):(this.$message.warning("请填写分组名称"),[2]);case 1:return e=r.sent(),e&&!e.hasError&&(n=e.result,this.showGroupModal=!1,["BIND_NONE","NOT_UPDATED_PROJECT"].includes(n)?(this.$message.success("保存分组成功"),"BIND_NONE"===n&&this.$emit("on-reset"),this.$publish("api://project-detail-save")):"BIND_JOB"===n?this.$message.error(this.MOVE_RESULT.BIND_JOB):"BIND_ENV"===n&&(this.showMoveModal=!0)),[3,4];case 2:return[4,this.service.saveCategory(this.group)];case 3:i=r.sent(),i&&!i.hasError&&(this.showGroupModal=!1,this.init()),r.label=4;case 4:return[2]}}))}))},e.prototype.init=function(){return h(this,void 0,void 0,(function(){var t,e,n;return f(this,(function(i){switch(i.label){case 0:return this.projectId?[4,this.service.getApiTree(this.projectId)]:[2];case 1:return t=i.sent(),this.data=(null===t||void 0===t?void 0:t.result)||[],e=this.data.$clone(),this.$emit("tree-data",e),V.handlerTreeData2(e,"name"),this.groupTree=e,e=this.data.$clone(),n=this.renderData,V.handlerTreeData2(this.data,"name","apis"),n&&n.length>0&&this.data.forEach((function(t){n.forEach((function(e){if(t.id===e.id)return t.expand=e.expand}))})),this.renderData=this.data.$clone(),[2]}}))}))},e.prototype.onBatchSuccess=function(t){this.$emit("on-success",t)},e.prototype.isChildNode=function(t,e){if(!t.children||0===t.children.length)return!1;for(var n=0,i=t.children;n<i.length;n++){var r=i[n];if(r.id===e)return!0;if(this.isChildNode(r,e))return!0}return!1},e.prototype.loadProjectList=function(){return h(this,void 0,void 0,(function(){var t;return f(this,(function(e){switch(e.label){case 0:return[4,this.projectService.getProjectList({})];case 1:return t=e.sent(),this.projectList=(null===t||void 0===t?void 0:t.result)||[],[2]}}))}))},e.prototype.onChangeProject=function(t,e){return void 0===e&&(e=!1),h(this,void 0,void 0,(function(){var n,i;return f(this,(function(r){switch(r.label){case 0:return e&&(this.parent={id:null,name:null}),t?(this.group.parentId=null,this.group.parentName=null,[4,this.service.getApiTree(this.group.projectId)]):[3,2];case 1:return n=r.sent(),[3,4];case 2:return this.interfaceModel.categoryId=null,[4,this.service.getApiTree(this.interfaceModel.projectId)];case 3:n=r.sent(),r.label=4;case 4:return i=(null===n||void 0===n?void 0:n.result)||[],V.handlerTreeData2(i,"name"),this.groupTree=i,[2]}}))}))},e.prototype.onMoveOk=function(t){return h(this,void 0,void 0,(function(){var e;return f(this,(function(n){switch(n.label){case 0:return this.showMoveModal=!1,"group"!==this.moveType?[3,2]:[4,this.service.updateMoveCategory(this.group,t)];case 1:return e=n.sent(),[3,4];case 2:return"interface"!==this.moveType?[3,4]:[4,this.service.updateMoveApi(this.interfaceModel,t)];case 3:e=n.sent(),n.label=4;case 4:return e&&!e.hasError&&(this.$publish("api://project-detail-save"),this.$emit("on-reset")),[2]}}))}))},d([Object(y["config"])({default:function(){return[]}})],e.prototype,"projectId",void 0),d([O(De)],e.prototype,"service",void 0),d([O(ee)],e.prototype,"projectService",void 0),d([Object(y["watch"])("projectId",{immediate:!0})],e.prototype,"init",null),e=d([Object(y["component"])({template:n("193e"),components:{"u-group-select":Pn,"u-batch-modal":Ln}})],e),e}(y["Component"])),Rn=qn,$n=n("ed38"),_n=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.openInterfaceList=[],e.active={},e.lengthwise=!0,e.showGlobalModal=!1,e.showCurrentModal=!1,e.showSecurity=!1,e.showEnvironmentModal=!1,e.projectId="",e.projectName="",e.split="340px",e.loading=!1,e.swiperOption={slidesPerView:"auto",spaceBetween:0},e.current={},e.projectTree=[],e}return p(e,t),e.prototype.onClickSlide=function(t){this.swiper.slideTo(t,1e3,!1),this.onClickTag(this.openInterfaceList[t])},e.prototype.onSwiperReadied=function(t){this.swiper=t},e.prototype.getProjectInfo=function(){var t,e;return h(this,void 0,void 0,(function(){var n;return f(this,(function(i){switch(i.label){case 0:return this.projectId=null===(t=this.$route.params)||void 0===t?void 0:t.id,this.projectId?[4,this.service.projectInfo(this.projectId)]:[3,2];case 1:n=i.sent(),this.projectName=(null===(e=null===n||void 0===n?void 0:n.result)||void 0===e?void 0:e.name)||"",i.label=2;case 2:return[2]}}))}))},e.prototype.onCheckInterface=function(t,e){return h(this,void 0,void 0,(function(){var n,i,r,o,a,s,c=this;return f(this,(function(l){switch(l.label){case 0:if(this.current=t,n={},e){try{i=window.sessionStorage.getItem("api_project_".concat(t.id)),i&&(n=JSON.parse(i))}catch(p){}n=u(u({},n),{name:t.name,id:t.id}),!n.fieldMappings&&(n.fieldMappings=[]),!n.pathParams&&(n.pathParams=[]),!n.queryParams&&(n.queryParams=[]),!n.formParams&&(n.formParams=[]),!n.preScripts&&(n.preScripts=[]),!n.postScripts&&(n.postScripts=[]),!n.requestHeaders&&(n.requestHeaders=[]),!n.responseParams&&(n.responseParams=[])}return r=new Set(this.openInterfaceList.map((function(t){return t.id}))),r.has(t.id)?[3,4]:(this.loading=!0,o=void 0,e?(o=n,[3,3]):[3,1]);case 1:return[4,this.service.apiInfo(t.id)];case 2:a=l.sent(),o=u(u({},a.result||{}),{name:t.name,id:t.id}),l.label=3;case 3:this.openInterfaceList.push(o),this.loading=!1,l.label=4;case 4:return s=this.openInterfaceList.findIndex((function(e){return e.id===t.id})),e&&this.openInterfaceList.splice(s,1,n),this.active=this.openInterfaceList[s],this.$nextTick((function(){c.swiper.slideTo(s,1e3,!1)})),[2]}}))}))},e.prototype.onEditInterfaceSuccess=function(t){var e=this.openInterfaceList.findIndex((function(e){return e.id===t.id}));e>-1&&(this.openInterfaceList[e].name=t.name)},e.prototype.onDeleteInterface=function(t){var e=this.openInterfaceList.findIndex((function(e){return e.id===t.id}));e>-1&&this.onClose(e)},e.prototype.onClose=function(t){this.openInterfaceList.splice(t,1),0===this.openInterfaceList.length?this.active={}:t>0?(this.active=this.openInterfaceList[t-1],this.swiper.slideTo(t-1,1e3,!1)):(this.active=this.openInterfaceList[0],this.swiper.slideTo(0,1e3,!1))},e.prototype.onReset=function(){this.openInterfaceList.splice(0),this.active={}},e.prototype.onClickTag=function(t){this.active=t},e.prototype.onToggleLayout=function(){this.lengthwise=!this.lengthwise},e.prototype.onSecurity=function(){this.showSecurity=!0},e.prototype.onOpenGlobalModal=function(){this.showGlobalModal=!0},e.prototype.onOpenCurrentModal=function(){this.showCurrentModal=!0},e.prototype.onOpenEnvModal=function(){this.showEnvironmentModal=!0},e.prototype.mounted=function(){var t=this;this.getProjectInfo();var e=this.$route.query,n=e.apiId,i=e.apiName,r=e.resume;n&&this.onCheckInterface({id:n,name:i},"true"===r),this.$subscribe("api://project-detail-save-import",(function(){return h(t,void 0,void 0,(function(){var t,e,n=this;return f(this,(function(i){switch(i.label){case 0:return[4,this.service.apiInfo(this.current.id)];case 1:return t=i.sent(),e=u(u({},t.result||{}),{name:this.current.name,id:this.current.id}),this.active=e,this.openInterfaceList[this.openInterfaceList.findIndex((function(t){return t.id===n.current.id}))]=e,[2]}}))}))})),this.$subscribe("api://batch-api-refresh",(function(e){return h(t,void 0,void 0,(function(){var t,n,i,r,o,a,s,c,l=this;return f(this,(function(p){switch(p.label){case 0:if(t=e.get("ids"),n=e.get("isEnvAndAuth")||!1,i=[],this.openInterfaceList.forEach((function(e){t.includes(e.id)&&i.push({id:e.id,name:e.name})})),!i.length)return[3,5];r=function(t){var e,n,i;return f(this,(function(r){switch(r.label){case 0:return[4,o.service.apiInfo(t.id)];case 1:return e=r.sent(),n=u(u({},e.result||{}),{name:t.name,id:t.id}),i=o.openInterfaceList.findIndex((function(e){return e.id===t.id})),o.openInterfaceList.splice(i,1,n),[2]}}))},o=this,a=0,s=i,p.label=1;case 1:return a<s.length?(c=s[a],[5,r(c)]):[3,4];case 2:p.sent(),p.label=3;case 3:return a++,[3,1];case 4:this.active=this.openInterfaceList[this.openInterfaceList.findIndex((function(t){return t.id===l.current.id}))],n&&this.$publish("api://security-list-refresh",{isBatchRefresh:!0}),p.label=5;case 5:return[2]}}))}))}))},e.prototype.activated=function(){var t=this.$route.query,e=t.apiId,n=t.apiName,i=t.resume;"true"===i&&this.onCheckInterface({id:e,name:n},"true"===i)},e.prototype.onBack=function(){this.$router.push({name:"project-list"})},e.prototype.onBatchSuccess=function(t){t&&this.getProjectInfo()},e.prototype.onEnvironmentRefresh=function(){this.$refs["interface-settings"]&&this.$refs["interface-settings"].getEnvironmentParamList()},e.prototype.getTreeData=function(t){this.projectTree=t},d([O(De)],e.prototype,"service",void 0),e=d([Object(y["component"])({name:"ApiProjectDetail",template:n("d63e"),components:{"u-tree":Rn,"u-settings":Tn,"u-global-modal":Re,"u-current-modal":Ne,"u-environment-modal":Be,Swiper:$n["Swiper"],SwiperSlide:$n["SwiperSlide"],"u-security-modal":vn},directives:{swiper:$n["directive"]}})],e),e}(y["View"]),Fn=_n;a.a.use(c.a)},3117:function(t,e,n){"use strict";var i=n("720f"),r=n("d803"),o=n("485f"),a=n("cf8c").indexOf,s=n("929a"),c=i([].push);t.exports=function(t,e){var n,i=o(t),l=0,p=[];for(n in i)!r(s,n)&&r(i,n)&&c(p,n);while(e.length>l)r(i,n=e[l++])&&(~a(p,n)||c(p,n));return p}},"327c":function(t,e,n){"use strict";var i=n("ce97");t.exports=function(t,e){return void 0===t?arguments.length<2?"":e:i(t)}},3497:function(t,e,n){},"35e3":function(t,e){t.exports='<editor class="code-edit" v-model="code" :options="option" @init="editorInit" :lang="lang" width="100%" height="100%"></editor>\r\n'},"37f5":function(t,e){t.exports='<article class="catalog-params">\r\n <header>\r\n 请求体为 JSON 数组,每一个 JSON 对象应符合如下的格式:\r\n </header>\r\n <i-table height="200" class="diy-table" :columns="columns" :data="dataList">\r\n <template slot-scope="{ row,index }" slot="type">\r\n {{(row.typeDict || {}).text}}\r\n </template>\r\n <template slot-scope="{ row,index }" slot="required">\r\n {{row.required ? "是": "否"}}\r\n </template>\r\n </i-table>\r\n</article>\r\n'},3955:function(t,e,n){"use strict";var i=n("d803"),r=n("842d"),o=n("a564"),a=n("585e");t.exports=function(t,e,n){for(var s=r(e),c=a.f,l=o.f,p=0;p<s.length;p++){var u=s[p];i(t,u)||n&&i(n,u)||c(t,u,l(e,u))}}},"39d5":function(t,e,n){"use strict";var i=n("b699"),r=n("6a10"),o=n("9195"),a=n("9b7f"),s=n("a68e"),c=r.aTypedArray,l=r.getTypedArrayConstructor,p=r.exportTypedArrayMethod,u=!!function(){try{new Int8Array(1)["with"](2,{valueOf:function(){throw 8}})}catch(t){return 8===t}}();p("with",{with:function(t,e){var n=c(this),r=a(t),p=o(n)?s(e):+e;return i(n,l(n),r,p)}}["with"],!u)},"3a71":function(t,e){t.exports='<i-collapse v-model="value" simple class="api-params">\r\n <i-panel name="1">\r\n <span>Query参数</span>\r\n <span class="status">{{getExpand(\'1\') ? "收起" : "展开"}}</span>\r\n <div slot="content" class="setting-content">\r\n <main>\r\n <i-table\r\n height="200"\r\n class="diy-table"\r\n :columns="paramColumns"\r\n :data="queryDataList"\r\n >\r\n <template slot-scope="{ row,index }" slot="selection">\r\n <i-checkbox\r\n disabled\r\n :value="!queryDataList[index].disabled"\r\n >\r\n </i-checkbox>\r\n </template>\r\n </i-table>\r\n </main>\r\n </div>\r\n </i-panel>\r\n <i-panel name="2">\r\n <span>Body参数</span>\r\n <span class="status">{{getExpand(\'2\') ? "收起" : "展开"}}</span>\r\n <div slot="content" class="setting-content">\r\n <main>\r\n <i-table\r\n height="200"\r\n class="diy-table"\r\n :columns="paramColumns"\r\n :data="bodyDataList"\r\n v-if="isFormData"\r\n >\r\n <template slot-scope="{ row,index }" slot="selection">\r\n <i-checkbox\r\n disabled\r\n :value="!bodyDataList[index].disabled"\r\n >\r\n </i-checkbox>\r\n </template>\r\n </i-table>\r\n <json-viewer\r\n v-else\r\n :value="model.json"\r\n boxed\r\n :copyable="{copyText: \'复制\', copiedText: \'已复制\'}"\r\n :expanded="true"\r\n :expand-depth="5"\r\n >\r\n </json-viewer>\r\n </main>\r\n </div>\r\n </i-panel>\r\n</i-collapse>\r\n'},"3ad3":function(t,e,n){},"3b85":function(t,e){t.exports='<i-modal :mask-closable="false" draggable sticky reset-drag-position v-model="show" class="diy-modal">\r\n <header slot="header">\r\n {{isEdit ? "编辑分组" : "新增分组"}}\r\n </header>\r\n <main>\r\n <i-form ref="addForm" :model="data" :rules="rules">\r\n <i-form-item prop="name" label="分组名称">\r\n <i-input class="diy-input" v-model="data.name"></i-input>\r\n </i-form-item>\r\n <i-form-item v-if="isEdit" label="所属分组" class="update-category">\r\n <u-tree-selector :treeData="categories" leaf-name="task" :canChooseFolder="true" v-model="categoryData.id" @on-select="selectCategory">\r\n </u-tree-selector>\r\n </i-form-item>\r\n </i-form>\r\n </main>\r\n <footer slot="footer">\r\n <i-button class="diy-btn-primary" type="primary" @click.stop="onSave">确定</i-button>\r\n <i-button class="diy-btn-default" @click.stop="onCancel">取消</i-button>\r\n </footer>\r\n</i-modal>\r\n'},"3bdc":function(t,e,n){"use strict";var i=n("2ece"),r=n("5ee5"),o=n("e614"),a=n("d631"),s=function(t){var e=1===t;return function(n,s,c){var l,p,u=o(n),d=r(u),h=a(d),f=i(s,c);while(h-- >0)if(l=d[h],p=f(l,h,u),p)switch(t){case 0:return l;case 1:return h}return e?-1:void 0}};t.exports={findLast:s(0),findLastIndex:s(1)}},"3bf8":function(t,e){t.exports='<i-modal draggable sticky reset-drag-position :mask-closable="false" v-model="show" width="1000" class="u-security-modal diy-modal" transfer>\r\n <header slot="header">授权认证</header>\r\n <main class="security-content">\r\n <div class="left">\r\n <div class="left-title">\r\n <div class="left-title-text">授权列表</div>\r\n <i class="api-icon icon-add" @click="onAddItem"></i>\r\n </div>\r\n <div class="left-content">\r\n <i-input class="diy-input search-input" v-model="keyword" placeholder="输入关键字查询" @on-change="onFilter">\r\n <template #prefix>\r\n <i-icon type="ios-search"/>\r\n </template>\r\n </i-input>\r\n <div class="security-list">\r\n <div class="security-list-item"\r\n :class="currentSecurityItem.id === item.id ? \'security-list-item-active\' : \'\'"\r\n v-for="(item,index) in securityList"\r\n :key="item.id || index"\r\n @click="onSelectSecurityItem(item)"\r\n >\r\n <div class="security-list-item-name">\r\n <i class="iconfont icon-shouquan1"></i>\r\n <div class="security-list-item-text" :class="currentSecurityItem.id === item.id ? \'security-list-item-text-active\' : \'\'">{{ item.name || "新授权" }}</div>\r\n </div>\r\n <i-poptip confirm title="确认删除这条数据吗?" transfer placement="top-end" @on-ok="onDelete(item)">\r\n <i class="iconfont icon-delete"></i>\r\n </i-poptip>\r\n\x3c!-- <i class="iconfont icon-delete" @click.stop="onDelete(item)"></i>--\x3e\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class="right">\r\n <div class="right-title">授权内容</div>\r\n <div class="right-content">\r\n <i-form class="security-content-form" label-colon v-if="isEmpty" :model="currentSecurityItem">\r\n <template v-if="currentSecurityItem.type">\r\n <i-form-item class="security-content-form-item" :class="currentSecurityItem.type === \'OAuth2\' ? \'oauth2-form-item\' : \'\'" label="授权名称" required>\r\n <i-input class="diy-input" placeholder="请输入" v-model="currentSecurityItem.name"></i-input>\r\n </i-form-item>\r\n <i-form-item class="security-content-form-item" :class="currentSecurityItem.type === \'OAuth2\' ? \'oauth2-form-item\' : \'\'" label="授权类型" required>\r\n <i-select class="diy-select" v-model="currentSecurityItem.type">\r\n <i-option v-for="(item,index) in securityTypeList" :value="item.name" :key="index">{{ item.text }}</i-option>\r\n </i-select>\r\n </i-form-item>\r\n </template>\r\n <template v-if="currentSecurityItem.type && currentSecurityItem.type !== \'GROOVY_SCRIPT\'">\r\n <i-form-item class="security-content-form-item" :class="currentSecurityItem.type === \'OAuth2\' ? \'oauth2-form-item\' : \'\'" label="存储位置">\r\n <i-select class="diy-select" v-model="currentSecurityItem.location">\r\n <i-option v-for="(item,index) in tokenLocationTypeList" :value="item.name" :key="item.name">{{ item.text }}</i-option>\r\n </i-select>\r\n </i-form-item>\r\n <i-form-item class="security-content-form-item" :class="currentSecurityItem.type === \'OAuth2\' ? \'oauth2-form-item\' : \'\'" label="存储键值">\r\n <i-input class="diy-input" placeholder="请输入" v-model="currentSecurityItem.locationKey"></i-input>\r\n </i-form-item>\r\n </template>\r\n <template v-if="currentSecurityItem.type === \'Api_Key\'">\r\n <i-form-item class="security-content-form-item" label="key">\r\n <i-input class="diy-input" placeholder="请输入" v-model="currentSecurityItem.content.key"></i-input>\r\n </i-form-item>\r\n </template>\r\n <template v-if="currentSecurityItem.type === \'Base_Auth\'">\r\n <i-form-item class="security-content-form-item" label="username">\r\n <i-input class="diy-input" placeholder="请输入" v-model="currentSecurityItem.content.username"></i-input>\r\n </i-form-item>\r\n <i-form-item class="security-content-form-item" label="password">\r\n <i-input class="diy-password-input diy-input" placeholder="请输入" v-model="currentSecurityItem.content.password" type="password" password></i-input>\r\n </i-form-item>\r\n </template>\r\n <template v-if="currentSecurityItem.type === \'OAuth2\'">\r\n <i-form-item class="security-content-form-item oauth2-form-item">\r\n <u-tips-form-label slot="label" :labelTitle="\'Header Prefix\'" tips="token前缀 例如 Bearer" label-colon></u-tips-form-label>\r\n <i-input class="diy-input" placeholder="请输入" v-model="currentSecurityItem.content.headerPrefix"></i-input>\r\n </i-form-item>\r\n <i-form-item class="security-content-form-item oauth2-form-item grant-type-item">\r\n <u-tips-form-label slot="label" :labelTitle="\'Grant Type\'" tips="认证类型" label-colon></u-tips-form-label>\r\n <i-select v-model="currentSecurityItem.content.grantType" class="diy-select">\r\n <i-option v-for="item in grantTypeList" :key="item.name" :value="item.name"> {{item.text}} </i-option>\r\n </i-select>\r\n </i-form-item>\r\n <i-form-item class="security-content-form-item oauth2-form-item">\r\n <u-tips-form-label slot="label" :labelTitle="\'Access Token Url\'" tips="获取token的httpurl" label-colon></u-tips-form-label>\r\n <i-input class="diy-input" placeholder="请输入" v-model="currentSecurityItem.content.tokenUrl"></i-input>\r\n </i-form-item>\r\n <i-form-item class="security-content-form-item oauth2-form-item">\r\n <u-tips-form-label slot="label" :labelTitle="\'TokenPath\'" tips="获取响应结果的token路径" label-colon></u-tips-form-label>\r\n <i-input class="diy-input" placeholder="请输入" v-model="currentSecurityItem.content.tokenPath"></i-input>\r\n </i-form-item>\r\n <i-form-item class="security-content-form-item oauth2-form-item" label="Client ID">\r\n <i-input class="diy-input" placeholder="请输入" v-model="currentSecurityItem.content.clientId"></i-input>\r\n </i-form-item>\r\n <i-form-item class="security-content-form-item oauth2-form-item" label="Client Secret">\r\n <i-input class="diy-input" placeholder="请输入" v-model="currentSecurityItem.content.clientSecret"></i-input>\r\n </i-form-item>\r\n <template v-if="currentSecurityItem.content.grantType === \'password\'">\r\n <i-form-item class="security-content-form-item oauth2-form-item" label="username">\r\n <i-input class="diy-input" placeholder="请输入" v-model="currentSecurityItem.content.username"></i-input>\r\n </i-form-item>\r\n <i-form-item class="security-content-form-item oauth2-form-item" label="password">\r\n <i-input class="diy-input" placeholder="请输入" v-model="currentSecurityItem.content.password" type="password" password></i-input>\r\n </i-form-item>\r\n </template>\r\n <i-form-item class="security-content-form-item oauth2-form-item">\r\n <u-tips-form-label slot="label" :labelTitle="\'Scope\'" tips="访问请求的范围,它可能有多个空格分隔的值" label-colon></u-tips-form-label>\r\n <i-input class="diy-input" placeholder="请输入" v-model="currentSecurityItem.content.scope"></i-input>\r\n </i-form-item>\r\n </template>\r\n <template v-if="currentSecurityItem.type === \'GROOVY_SCRIPT\'">\r\n <i-form-item class="security-content-form-item script-area-item" label="授权脚本">\r\n <div class="script-label" slot="label">\r\n <i-icon class="help-icon" type="md-alert" @click="showScriptDoc" title="帮助文档"> </i-icon>\r\n <span>授权脚本:</span>\r\n </div>\r\n <u-editor\r\n class="editor"\r\n :model.sync="currentSecurityItem.scriptContent"\r\n :diyKeywordList="diyKeywordList"\r\n lang="groovy"\r\n >\r\n </u-editor>\r\n </i-form-item>\r\n </template>\r\n </i-form>\r\n </div>\r\n </div>\r\n </main>\r\n\r\n <footer slot="footer">\r\n <template>\r\n <i-button class="diy-btn-default" @click="onCancel">取消</i-button>\r\n <i-button type="primary" class="diy-btn-primary" @click="onSave">保存</i-button>\r\n </template>\r\n </footer>\r\n <u-doc-modal class="script-doc-modal" v-model="scriptDocShow" :doc="scriptDoc"></u-doc-modal>\r\n</i-modal>\r\n'},"3d77":function(t,e,n){"use strict";var i=n("2385"),r=n("a047"),o=i("keys");t.exports=function(t){return o[t]||(o[t]=r(t))}},"3de4":function(t,e){t.exports='<article class="security-setting-v2">\r\n <div class="left">\r\n <i-form class="type-form diy-form" label-colon>\r\n <i-form-item label="选择授权">\r\n <i-select ref="addSecuritySelect" class="diy-select add-security-select" v-model="currentSecurityItemId" @on-change="onChangeSecurityItem($event)" @on-clear="onClear" clearable>\r\n <i-option v-for="item in securityList" :key="item.id" :value="item.id">{{ item.name }}</i-option>\r\n <i-option class="add-security-item" value="\'\'">\r\n <div class="add-security-item-content" @click.stop="onAddSecurityItem">\r\n <i class="api-icon icon-add"></i>\r\n <span>新建授权</span>\r\n </div>\r\n </i-option>\r\n </i-select>\r\n </i-form-item>\r\n <i-form-item label="授权类型">\r\n <span class="security-type">{{ currentSecurityItem._type? currentSecurityItem._type.text : "暂无" }}</span>\r\n </i-form-item>\r\n </i-form>\r\n </div>\r\n <div class="right">\r\n <div class="right-title">授权详情</div>\r\n <div class="right-content">\r\n <div class="no-data" v-if="!currentSecurityItem.type">\r\n <div class="no-data-bg"></div>\r\n <div class="no-data-text">请在左侧下拉框中选择已建立授权</div>\r\n </div>\r\n <div class="script" v-if="currentSecurityItem.type === \'GROOVY_SCRIPT\'">\r\n <i-input class="diy-input script-area" type="textarea" v-model="currentSecurityItem.scriptContent" :readonly="true"></i-input>\r\n </div>\r\n <div class="api-key" v-if="currentSecurityItem.type === \'Api_Key\'">\r\n <i-form class="oauth-2-form diy-form" label-colon>\r\n <i-form-item label="存储位置">\r\n <span class="form-item-text">{{ currentSecurityItem._location ? currentSecurityItem._location.text : ""}}</span>\r\n </i-form-item>\r\n <i-form-item label="存储键值">\r\n <span class="form-item-text">{{ currentSecurityItem.locationKey }}</span>\r\n </i-form-item>\r\n <i-form-item label="key">\r\n <span class="form-item-text">{{ currentSecurityItem.content.key }}</span>\r\n </i-form-item>\r\n </i-form>\r\n </div>\r\n <div class="base-auth" v-if="currentSecurityItem.type === \'Base_Auth\'">\r\n <i-form class="oauth-2-form diy-form" label-colon>\r\n <i-form-item label="存储位置">\r\n <span class="form-item-text">{{ currentSecurityItem._location ? currentSecurityItem._location.text : "" }}</span>\r\n </i-form-item>\r\n <i-form-item label="存储键值">\r\n <span class="form-item-text">{{ currentSecurityItem.locationKey }}</span>\r\n </i-form-item>\r\n <i-form-item label="username">\r\n <span class="form-item-text">{{ currentSecurityItem.content.username }}</span>\r\n </i-form-item>\r\n <i-form-item label="password">\r\n \x3c!-- <span class="form-item-text">{{ "·" }}</span>--\x3e\r\n \x3c!-- <i-input class="diy-input" v-model="model.password" type="password" password placeholder="请输入"> </i-input>--\x3e\r\n <i-input class="diy-password-input diy-input" :value="currentSecurityItem.content.password" type="password"></i-input>\r\n </i-form-item>\r\n </i-form>\r\n </div>\r\n <div class="oauth-2" v-if="currentSecurityItem.type === \'OAuth2\'">\r\n <i-form class="oauth-2-form diy-form" label-colon>\r\n <i-form-item label="存储位置">\r\n <span class="form-item-text">{{ currentSecurityItem._location ? currentSecurityItem._location.text : "" }}</span>\r\n </i-form-item>\r\n <i-form-item label="存储键值">\r\n <span class="form-item-text">{{ currentSecurityItem.locationKey }}</span>\r\n </i-form-item>\r\n <i-form-item>\r\n <u-tips-form-label slot="label" :labelTitle="\'Header Prefix\'" tips="token前缀 例如 Bearer" label-colon></u-tips-form-label>\r\n <span class="form-item-text">{{ currentSecurityItem.content.headerPrefix }}</span>\r\n </i-form-item>\r\n <i-form-item class="grant-type-item">\r\n <u-tips-form-label slot="label" :labelTitle="\'Grant Type\'" tips="认证类型" label-colon></u-tips-form-label>\r\n <span class="form-item-text">{{ findGrantTypeText(currentSecurityItem.content.grantType) }}</span>\r\n </i-form-item>\r\n <i-form-item>\r\n <u-tips-form-label slot="label" :labelTitle="\'Access Token Url\'" tips="获取token的httpUrl" label-colon></u-tips-form-label>\r\n <span class="form-item-text">{{ currentSecurityItem.content.tokenUrl }}</span>\r\n </i-form-item>\r\n <i-form-item>\r\n <u-tips-form-label slot="label" :labelTitle="\'TokenPath\'" tips="获取响应结果的token路径" label-colon></u-tips-form-label>\r\n <span class="form-item-text">{{ currentSecurityItem.content.tokenPath }}</span>\r\n </i-form-item>\r\n <i-form-item label="Client ID">\r\n <span class="form-item-text">{{ currentSecurityItem.content.clientId }}</span>\r\n </i-form-item>\r\n <i-form-item label="Client Secret">\r\n <span class="form-item-text">{{ currentSecurityItem.content.clientSecret }}</span>\r\n </i-form-item>\r\n <template v-if="currentSecurityItem.content.grantType === \'password\'">\r\n <i-form-item class="security-content-form-item" label="username">\r\n <span class="form-item-text">{{ currentSecurityItem.content.username }}</span>\r\n </i-form-item>\r\n <i-form-item class="security-content-form-item" label="password">\r\n <i-input class="diy-password-input diy-input" :value="currentSecurityItem.content.password" type="password"></i-input>\r\n </i-form-item>\r\n </template>\r\n <i-form-item label="Scope">\r\n <u-tips-form-label slot="label" :labelTitle="\'Scope\'" tips="访问请求的范围,它可能有多个空格分隔的值" label-colon></u-tips-form-label>\r\n <span class="form-item-text">{{ currentSecurityItem.content.scope }}</span>\r\n </i-form-item>\r\n </i-form>\r\n </div>\r\n </div>\r\n </div>\r\n <u-security-modal v-model="showSecurity" :projectID="projectID" :isAdd="isAdd"></u-security-modal>\r\n</article>\r\n'},"3fb3":function(t,e){t.exports=o},"40aa":function(t,e){t.exports='<!DOCTYPE html>\r\n<i-drawer\r\n width="700"\r\n draggable\r\n sticky\r\n reset-drag-position\r\n v-model="show"\r\n class="interface-modal diy-modal"\r\n transfer\r\n title="已关联流程配置"\r\n :mask-closable="false"\r\n @on-cancel="onCancel"\r\n>\r\n <div class="header">\r\n <u-tree-selector\r\n :treeData="proxyList"\r\n leaf-name="apis"\r\n v-model="proxyName"\r\n @on-select="selectProxyName"\r\n :canChooseFolder="true"\r\n placeholder="请选择代理名称"\r\n ></u-tree-selector>\r\n <i-button class="diy-btn-primary" type="primary" @click="onAdd">新增配置</i-button>\r\n </div>\r\n\r\n <template > \r\n <i-form v-show="proxyName || isAdding " ref="configform" label-position="left" :label-width="125" label-colon :rules="rulesValidate"\r\n :model="model">\r\n <div class="form-title">{{formTitle}}</div>\r\n <i-form-item v-show="isAdding" label="所属分类" prop="categoryId" class="proxy-category-validate" required>\r\n <u-tree-selector :treeData="categoryList" :canChooseFolder="true" v-model="model.categoryId"\r\n @on-select="selectCategory" placeholder="请选择所属分类"></u-tree-selector>\r\n </i-form-item>\r\n <i-form-item label="代理名称" prop="name" class="proxy-name-validate" required>\r\n <i-input class="diy-input" v-model="model.name" placeholder="请输入代理名称"></i-input>\r\n </i-form-item>\r\n <i-form-item class="proxy-name-validate" prop="code" label="接口编码" required>\r\n <i-input class="diy-input" v-model="model.code" placeholder="请输入接口编码"></i-input>\r\n </i-form-item>\r\n <i-form-item class="un-required-item copy-item" label="接口地址">\r\n <i-input class="diy-input" disabled :value="url"></i-input>\r\n <div class="set-btn" @click="onCopy(url)">复制</div>\r\n </i-form-item>\r\n <i-form-item label="描述" prop="description" class="proxy-description-validate un-required-item">\r\n <i-input type="textarea" v-model="model.description" placeholder="请输入描述" :rows="2"></i-input>\r\n </i-form-item>\r\n <i-row class="retry-wrap" style="padding-top: 8px">\r\n <i-col span="11">\r\n <i-form-item class="un-required-item copy-item">\r\n <template #label>\r\n <i-poptip slot="label" trigger="hover"\r\n content="日志表会记录请求头、请求参数和响应体,如果内容较多时建议关闭,请求次数频繁比较占数据库资源。选项【失败】仅记录调用失败的日志" word-wrap\r\n transfer>\r\n <icon style="cursor: help; font-size: 0.16rem" type="ios-information-circle-outline" />\r\n </i-poptip>\r\n <span>记录日志:</span>\r\n </template>\r\n\r\n <i-select class="diy-select" v-model="model.logSavingEnabled"\r\n @on-change="onLogSavingEnabledChange">\r\n <i-option v-for="item in loginLevelFlag" :value="item.value" :key="item.value">{{ item.name\r\n }}</i-option>\r\n </i-select>\r\n </i-form-item>\r\n </i-col>\r\n </i-row>\r\n <template v-if="model.logSavingEnabled">\r\n <i-row class="retry-wrap">\r\n <i-col span="11">\r\n <i-form-item label="开启重推" required>\r\n <i-select class="diy-select" v-model="model.enableRetry">\r\n <i-option v-for="(item,index) in isRetryList" :value="item.value" :key="index">{{\r\n item.name }}</i-option>\r\n </i-select>\r\n </i-form-item>\r\n </i-col>\r\n <i-col span="11">\r\n <i-form-item class="un-required-item" label="重推次数" prop="retryTimes">\r\n <tips-table-label class="data-type-tips" slot="label" label-colon\r\n labelTitle="重推次数"></tips-table-label>\r\n <i-input class="diy-input" type="number"\r\n :disabled="isRetryTimesReadonly" v-model="model.retryTimes"\r\n placeholder="请输入重推次数"></i-input>\r\n </i-form-item>\r\n </i-col>\r\n </i-row>\r\n <i-row v-show="model.enableRetry === \'true\' ">\r\n <i-col span="11">\r\n <i-form-item class="un-required-item status-code">\r\n <template #label>\r\n <i-poptip slot="label" trigger="hover" content="当接口状态码和配置项相同时,才触发重推;多个自定义状态码以英文逗号分隔"\r\n word-wrap transfer>\r\n <icon style="cursor: help; font-size: 0.16rem"\r\n type="ios-information-circle-outline" />\r\n </i-poptip>\r\n <span>重推接口状态码:</span>\r\n </template>\r\n <i-form-item>\r\n <i-select v-model="statusCode" class="diy-select code-select"\r\n @on-change="onStatusCodeChange">\r\n <i-option v-for="item in statusCodeList" :value="item.value" :key="item.value">{{\r\n item.name }}</i-option>\r\n </i-select>\r\n </i-form-item>\r\n <i-form-item prop="retryCode">\r\n <i-input v-show="statusCode === \'2\'" class="diy-input" v-model="model.retryCode"\r\n placeholder="请输入状态码"></i-input>\r\n </i-form-item>\r\n </i-form-item>\r\n </i-col>\r\n </i-row>\r\n </template>\r\n\r\n <i-row class="retry-wrap">\r\n <i-col span="11">\r\n <i-form-item label="需要认证" class="un-required-item copy-item">\r\n <i-select class="diy-select" style="margin-top: 6px" v-model="model.authFlag">\r\n <i-option v-for="item in authFlag" :value="item.value" :key="item.value">{{ item.name\r\n }}</i-option>\r\n </i-select>\r\n </i-form-item>\r\n </i-col>\r\n <i-col span="11">\r\n <i-form-item class="un-required-item copy-item">\r\n <template #label>\r\n <i-poptip slot="label" trigger="hover" content="使用用户中心token访问该接口时,将校验登陆是否拥有该资源代码的权限"\r\n word-wrap transfer>\r\n <icon style="cursor: help; font-size: 0.16rem" type="ios-information-circle-outline" />\r\n </i-poptip>\r\n <span>用户中心资源代码:</span>\r\n </template>\r\n <i-input class="diy-input" style="margin-top: 6px" v-model="model.resourceCode"\r\n :disabled="!isResourceCodeEnabled" placeholder="请输入用户中心资源代码"></i-input>\r\n </i-form-item>\r\n </i-col>\r\n </i-row>\r\n <template>\r\n <i-row class="retry-wrap">\r\n <i-col span="11">\r\n <i-form-item label="代理类型">\r\n <i-input class="diy-input" value="外部接口" disabled></i-input>\r\n </i-form-item>\r\n </i-col>\r\n <i-col span="11">\r\n <i-form-item label="API项目">\r\n <i-select disabled class="diy-select" v-model="apiModel.projectId">\r\n <i-option v-for="(item,index) in projectList" :value="item.id" :key="item.id">{{ item.name }}</i-option>\r\n </i-select>\r\n </i-form-item>\r\n </i-col>\r\n </i-row>\r\n <i-form-item label="API接口">\r\n <u-tree-selector readonly :treeData="apiTree" leaf-name="apis" v-model="apiModel.typeId" placeholder="请选择API接口" @on-select="onApiTreeSelect"></u-tree-selector>\r\n </i-form-item>\r\n <i-form-item label="接口路径">\r\n <i-input class="diy-input" :readonly="true" v-model="apiModel.path" :rows="4"></i-input>\r\n </i-form-item>\r\n <i-table class="diy-table" height="200" :columns="apiColumns" :data="apiParamList"> </i-table>\r\n </template>\r\n </i-form>\r\n </template>\r\n <div v-show="!proxyName && !isAdding " class="no-data">暂无数据</div>\r\n <div class="footer">\r\n <i-button class="diy-btn-primary" type="primary" :loading="loading" @click.stop="onSave">保存</i-button>\r\n <i-button class="diy-btn-default" @click.stop="onCancel">取消</i-button>\r\n </div>\r\n</i-drawer>'},"42a3":function(t,e,n){"use strict";var i=n("9e90"),r=TypeError;t.exports=function(t){if(i(t))throw new r("Can't call method on "+t);return t}},4387:function(t,e){t.exports=a},"44c1":function(t,e,n){},"45bb":function(t,e){t.exports='<i-modal draggable sticky reset-drag-position :mask-closable="false" v-model="show" width="880" class="u-data-model-doc-modal diy-modal" transfer>\r\n <header slot="header">查看接口文档</header>\r\n <main>\r\n <div class="v-mavon-container">\r\n \x3c!-- startprint --\x3e\r\n <mavon-editor :subfield="false" :toolbars="toolbars" :value="doc" defaultOpen="preview" @change="onChange">\r\n <template slot="left-toolbar-before">\r\n <i-dropdown placement="right-start" @on-click="onMenuClick">\r\n <span class="op-icon fa fa-mavon-floppy-o"></span>\r\n <i-dropdown-menu slot="list">\r\n <i-dropdown-item name="pdf">保存为pdf</i-dropdown-item>\r\n <i-dropdown-item name="html">保存为html</i-dropdown-item>\r\n </i-dropdown-menu>\r\n </i-dropdown>\r\n </template>\r\n </mavon-editor>\r\n \x3c!-- endprint --\x3e\r\n <iframe id="printf" src="" width="0" height="0" frameborder="0"></iframe>\r\n </div>\r\n </main>\r\n <footer slot="footer">\r\n <i-button type="primary" class="diy-btn-primary" @click="onOk">关闭</i-button>\r\n </footer>\r\n</i-modal>\r\n'},"45e3":function(t,e,n){},"46d3":function(t,e){t.exports='<article class="u-common-tree u-type-tree">\r\n <slot name="header">\r\n <header slot="header" class="tree-header">\r\n <span>合并模型列表</span>\r\n <i-upload\r\n class="action-item"\r\n :action="uploadAction"\r\n accept=".json"\r\n :headers="headers"\r\n :show-upload-list="false"\r\n :format="[\'json\']"\r\n :on-success="onSuccess"\r\n :before-upload="onBeforeUpload"\r\n :on-format-error="onFormatError"\r\n >\r\n <i title="导入" class="iconfont icon-import"></i>\r\n </i-upload>\r\n <i\r\n @click="onModelExport(null)"\r\n :class="{\'disabled\': !data.length}"\r\n class="iconfont icon-export"\r\n title="导出"\r\n ></i>\r\n <i @click.stop="onAddTreeNode" title="新增分组" class="iconfont icon-add-folder"></i>\r\n </header>\r\n </slot>\r\n <section class="content">\r\n <i-input class="search-input diy-input" :placeholder="placeholder" @on-change="onFilter" v-model="keyword" >\r\n <i class="iconfont icon-chaxun" slot="prefix"></i>\r\n </i-input>\r\n <i-tree :data="renderData" :render="renderContent" @on-toggle-expand="onToggleExpand"></i-tree>\r\n </section>\r\n <u-add-node :data="tempNode" :categories="data" v-model="showAddTreeNodeModal" @on-refresh="queryTreeData"></u-add-node>\r\n <i-modal draggable sticky reset-drag-position v-model="showImportModal" class="diy-modal duplicate-import-modal" width="800" :mask-closable="false" title="导入已合并接口">\r\n <div class="import-title">上传成功</div>\r\n <div class="import-label">{{ `上传共${importResult.total}条合并接口数据,其中${importResult.total - importResult.duplicateNum}条可成功导入。` }}</div>\r\n <div class="import-label">{{ `发现以下${importResult.duplicateNum}条接口数据存在编码重复(编码已存在),将不会被导入。` }}</div>\r\n <i-table class="diy-table import-modal-table" :columns="columns" :data="importResult.items">\r\n </i-table>\r\n <footer slot="footer">\r\n <i-button class="diy-btn-primary" type="primary" @click="onImportConfirm">确定</i-button>\r\n <i-button class="diy-btn-default" @click="onImportCancel">取消</i-button>\r\n </footer>\r\n </i-modal>\r\n</article>\r\n'},"46df":function(t,e,n){"use strict";var i=n("9417"),r=n("6a10"),o=r.aTypedArray,a=r.exportTypedArrayMethod,s=r.getTypedArrayConstructor;a("toReversed",(function(){return i(o(this),s(this))}))},"470f":function(t,e){t.exports='<i-modal draggable sticky reset-drag-position v-model="value" class="diy-modal global-variable-modal" :mask-closable="false" title="全局参数设置">\r\n <header class="types">\r\n <div class="tag" @click="onCheckTpye(item)" :class="{\'active\': item.name === active.name}" v-for="(item,index) in typeList" :key="item.name">\r\n <span>{{item.title }}</span>\r\n </div>\r\n </header>\r\n <main class="content">\r\n <i-button type="primary" ghost class="diy-btn-primary"> <i class="api-icon icon-add"></i>新增参数</i-button>\r\n <i-table :columns="columns" :data="dataList" class="diy-table" height="400">\r\n <template slot-scope="{ row,index }" slot="name">\r\n <i-input class="diy-input" placeholder="输入参数名称" v-model="dataList[index].name"></i-input>\r\n </template>\r\n <template slot-scope="{ row,index }" slot="value">\r\n <i-input class="diy-input" placeholder="输入参数值" v-model="dataList[index].value"></i-input>\r\n </template>\r\n <template slot-scope="{ row,index }" slot="required">\r\n <i-switch v-model="dataList[index].required">\r\n <span slot="open">是</span>\r\n <span slot="close">否</span>\r\n </i-switch>\r\n </template>\r\n <template slot-scope="{ row,index }" slot="remark">\r\n <i-input class="diy-input" placeholder="输入备注" v-model="dataList[index].remark"></i-input>\r\n </template>\r\n <template slot-scope="{ row,index }" slot="action">\r\n <span class="action-btn delete" @click="onDelete(dataList,index)">删除</span>\r\n <span class="action-btn" @click="onUp(dataList,index)">上移</span>\r\n <span class="action-btn" @click="onDown(dataList,index)">下移</span>\r\n <span v-if="index !== 0" class="action-btn" @click="onTop(dataList,index)">置顶</span>\r\n <span v-if="index < dataList.length - 1" class="action-btn" @click="onBottom(dataList,index)">置底</span>\r\n </template>\r\n </i-table>\r\n </main>\r\n <slot slot="footer" name="footer"> </slot>\r\n</i-modal>\r\n'},"485f":function(t,e,n){"use strict";var i=n("5ee5"),r=n("42a3");t.exports=function(t){return i(r(t))}},4869:function(t,e,n){"use strict";var i=n("e900"),r=n("10a7"),o=n("815c");t.exports=!i&&!r((function(){return 7!==Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},4935:function(t,e){t.exports='<i-modal draggable sticky reset-drag-position :mask-closable="false" v-model="show" width="1280" class="u-data-model-modal diy-modal" transfer>\r\n <header slot="header">添加数据模型</header>\r\n <main>\r\n <i-split v-model="splitHorizontal">\r\n <section slot="left" class="card-panel card-panel-no-right-border">\r\n <div class="card-panel-header">\r\n <span>选择列表</span>\r\n </div>\r\n <div class="card-panel-main">\r\n <u-tree :commonTaskCategoryID="taskCategoryID" :initSelectItem="initNode" :prop-data="treeData" :isTreeList="true" @on-select="onSelect" />\r\n </div>\r\n </section>\r\n <section slot="right" class="right-content">\r\n <i-split v-model="splitVertical" mode="vertical" max="600">\r\n <section slot="top" class="card-panel card-panel-no-bottom-border">\r\n <div class="card-panel-header">\r\n <span>选择模型</span>\r\n </div>\r\n <div class="card-panel-main">\r\n <u-data-model-list\r\n :data="tableData"\r\n :paging.sync="paging"\r\n @on-search="onSearch"\r\n @on-page-index-change="onPageIndexChange"\r\n @on-page-size-change="onPageSizeChange"\r\n @on-selection-change="onSelectionChange"\r\n @on-delete-refresh="getTableData"\r\n @on-row-click="onRowClick"\r\n >\r\n </u-data-model-list>\r\n </div>\r\n </section>\r\n <section slot="bottom" :class="[\'card-panel\', collapse ? \'card-panel-no-bottom-border\' : \'\']">\r\n <div class="card-panel-header">\r\n <span>已选({{checkedLength}})</span>\r\n <span>\r\n <i-poptip confirm title="确定要清空已选中的数据吗?" transfer placement="top-end" @on-ok="onBatchDelete">\r\n <span class="action-text">\r\n <i class="iconfont icon-delete"></i>\r\n <span>清空</span>\r\n </span>\r\n </i-poptip>\r\n <span class="action-text collapse-text" @click="onClickCollapse">\r\n <span>{{collapse ? "展开" : "收起"}}</span>\r\n <i class="ivu-icon ivu-icon-ios-arrow-forward" :class="{\'icon-arrow-collapse\':collapse}"></i>\r\n </span>\r\n </span>\r\n </div>\r\n <div class="card-panel-main">\r\n <template v-if="checkedData&&checkedData.length">\r\n <i-table class="diy-table" :columns="columns" :data="checkedData">\r\n <template #operates="{row,index}">\r\n <div class="row-actions">\r\n <i-poptip confirm transfer title="确认要删除这条数据吗?" @on-ok="onDelete(row)">\r\n <i title="删除" class="iconfont icon-delete"></i>\r\n </i-poptip>\r\n </div>\r\n </template>\r\n </i-table>\r\n </template>\r\n <template v-else>\r\n <div class="table-no-data">\r\n <div class="table-no-data-bg"></div>\r\n <div class="table-no-data-text">暂无数据</div>\r\n </div>\r\n </template>\r\n </div>\r\n </section>\r\n </i-split>\r\n </section>\r\n </i-split>\r\n <i-spin fix v-if="isLoading">\r\n <i class="spin-icon-load ivu-icon"></i>\r\n </i-spin>\r\n </main>\r\n <footer slot="footer">\r\n <i-button type="primary" class="diy-btn-primary" @click="onSave">确定</i-button>\r\n <i-button class="diy-btn-default" @click="onCancel">取消</i-button>\r\n </footer>\r\n</i-modal>\r\n'},"4cad":function(t,e,n){"use strict";var i=n("720f");t.exports=i({}.isPrototypeOf)},5217:function(t,e){t.exports=s},"554d":function(t,e){t.exports=c},"575c":function(t,e,n){"use strict";var i=n("9b7f"),r=Math.max,o=Math.min;t.exports=function(t,e){var n=i(t);return n<0?r(n+e,0):o(n,e)}},"585e":function(t,e,n){"use strict";var i=n("e900"),r=n("4869"),o=n("ca33"),a=n("a079"),s=n("aee9"),c=TypeError,l=Object.defineProperty,p=Object.getOwnPropertyDescriptor,u="enumerable",d="configurable",h="writable";e.f=i?o?function(t,e,n){if(a(t),e=s(e),a(n),"function"===typeof t&&"prototype"===e&&"value"in n&&h in n&&!n[h]){var i=p(t,e);i&&i[h]&&(t[e]=n.value,n={configurable:d in n?n[d]:i[d],enumerable:u in n?n[u]:i[u],writable:!1})}return l(t,e,n)}:l:function(t,e,n){if(a(t),e=s(e),a(n),r)try{return l(t,e,n)}catch(i){}if("get"in n||"set"in n)throw new c("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},"58d2":function(t,e,n){},"5afa":function(t,e,n){"use strict";var i=n("3117"),r=n("e1e9"),o=r.concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return i(t,o)}},"5ee5":function(t,e,n){"use strict";var i=n("720f"),r=n("10a7"),o=n("0d9b"),a=Object,s=i("".split);t.exports=r((function(){return!a("z").propertyIsEnumerable(0)}))?function(t){return"String"===o(t)?s(t,""):a(t)}:a},"61ef":function(t,e,n){},6255:function(t,e){t.exports='<i-modal\r\n draggable\r\n sticky\r\n reset-drag-position\r\n v-model="value"\r\n class="diy-modal"\r\n :mask-closable="false"\r\n :title="data.id ? \'编辑项目\': \'新建项目\'"\r\n>\r\n <i-form :label-width="95" class="diy-form" label-colon>\r\n <i-form-item label="项目名称" required>\r\n <i-input\r\n v-model.trim="data.name"\r\n class="diy-input"\r\n placeholder="请输入项目名称"\r\n ></i-input>\r\n </i-form-item>\r\n <i-form-item label="项目描述">\r\n <i-input\r\n class="diy-input"\r\n type="textarea"\r\n :rows="4"\r\n v-model="data.description"\r\n placeholder="请输入项目描述"\r\n ></i-input>\r\n </i-form-item>\r\n </i-form>\r\n <slot slot="footer" name="footer"> </slot>\r\n</i-modal>\r\n'},6296:function(t,e,n){"use strict";var i=n("8785");t.exports=function(t){return i(t)||null===t}},6397:function(t,e){t.exports=l},"64d5":function(t,e){t.exports=p},"65e5":function(t,e,n){},"688a":function(t,e,n){},"68b7":function(t,e,n){"use strict";var i=n("92d6"),r=n("720f"),o=n("ce97"),a=n("96e5"),s=URLSearchParams,c=s.prototype,l=r(c.append),p=r(c["delete"]),u=r(c.forEach),d=r([].push),h=new s("a=1&a=2&b=3");h["delete"]("a",1),h["delete"]("b",void 0),h+""!=="a=2"&&i(c,"delete",(function(t){var e=arguments.length,n=e<2?void 0:arguments[1];if(e&&void 0===n)return p(this,t);var i=[];u(this,(function(t,e){d(i,{key:e,value:t})})),a(e,1);var r,s=o(t),c=o(n),h=0,f=0,m=!1,y=i.length;while(h<y)r=i[h++],m||r.key===s?(m=!0,p(this,r.key)):f++;while(f<y)r=i[f++],r.key===s&&r.value===c||l(this,r.key,r.value)}),{enumerable:!0,unsafe:!0})},"6a10":function(t,e,n){"use strict";var i,r,o,a=n("f764"),s=n("e900"),c=n("bc85"),l=n("ec2f"),p=n("8785"),u=n("d803"),d=n("aaa6"),h=n("1d6e"),f=n("9822"),m=n("92d6"),y=n("889b"),v=n("4cad"),g=n("a54a"),b=n("a2df"),w=n("fff8"),x=n("a047"),S=n("fcc0"),I=S.enforce,k=S.get,C=c.Int8Array,j=C&&C.prototype,D=c.Uint8ClampedArray,O=D&&D.prototype,T=C&&g(C),E=j&&g(j),P=Object.prototype,M=c.TypeError,L=w("toStringTag"),A=x("TYPED_ARRAY_TAG"),N="TypedArrayConstructor",q=a&&!!b&&"Opera"!==d(c.opera),R=!1,$={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},_={BigInt64Array:8,BigUint64Array:8},F=function(t){if(!p(t))return!1;var e=d(t);return"DataView"===e||u($,e)||u(_,e)},B=function(t){var e=g(t);if(p(e)){var n=k(e);return n&&u(n,N)?n[N]:B(e)}},z=function(t){if(!p(t))return!1;var e=d(t);return u($,e)||u(_,e)},V=function(t){if(z(t))return t;throw new M("Target is not a typed array")},U=function(t){if(l(t)&&(!b||v(T,t)))return t;throw new M(h(t)+" is not a typed array constructor")},H=function(t,e,n,i){if(s){if(n)for(var r in $){var o=c[r];if(o&&u(o.prototype,t))try{delete o.prototype[t]}catch(a){try{o.prototype[t]=e}catch(l){}}}E[t]&&!n||m(E,t,n?e:q&&j[t]||e,i)}},G=function(t,e,n){var i,r;if(s){if(b){if(n)for(i in $)if(r=c[i],r&&u(r,t))try{delete r[t]}catch(o){}if(T[t]&&!n)return;try{return m(T,t,n?e:q&&T[t]||e)}catch(o){}}for(i in $)r=c[i],!r||r[t]&&!n||m(r,t,e)}};for(i in $)r=c[i],o=r&&r.prototype,o?I(o)[N]=r:q=!1;for(i in _)r=c[i],o=r&&r.prototype,o&&(I(o)[N]=r);if((!q||!l(T)||T===Function.prototype)&&(T=function(){throw new M("Incorrect invocation")},q))for(i in $)c[i]&&b(c[i],T);if((!q||!E||E===P)&&(E=T.prototype,q))for(i in $)c[i]&&b(c[i].prototype,E);if(q&&g(O)!==E&&b(O,E),s&&!u(E,L))for(i in R=!0,y(E,L,{configurable:!0,get:function(){return p(this)?this[A]:void 0}}),$)c[i]&&f(c[i],A,i);t.exports={NATIVE_ARRAY_BUFFER_VIEWS:q,TYPED_ARRAY_TAG:R&&A,aTypedArray:V,aTypedArrayConstructor:U,exportTypedArrayMethod:H,exportTypedArrayStaticMethod:G,getTypedArrayConstructor:B,isView:F,isTypedArray:z,TypedArray:T,TypedArrayPrototype:E}},"6a6c":function(t,e,n){"use strict";var i=n("fff8"),r=i("toStringTag"),o={};o[r]="z",t.exports="[object z]"===String(o)},"6bf0":function(t,e,n){"use strict";var i=n("bc85"),r=n("a95a"),o=n("6a10"),a=n("d631"),s=n("16bf"),c=n("e614"),l=n("10a7"),p=i.RangeError,u=i.Int8Array,d=u&&u.prototype,h=d&&d.set,f=o.aTypedArray,m=o.exportTypedArrayMethod,y=!l((function(){var t=new Uint8ClampedArray(2);return r(h,t,{length:1,0:3},1),3!==t[1]})),v=y&&o.NATIVE_ARRAY_BUFFER_VIEWS&&l((function(){var t=new u(2);return t.set(1),t.set("2",1),0!==t[0]||2!==t[1]}));m("set",(function(t){f(this);var e=s(arguments.length>1?arguments[1]:void 0,1),n=c(t);if(y)return r(h,this,n,e);var i=this.length,o=a(n),l=0;if(o+e>i)throw new p("Wrong length");while(l<o)this[e+l]=n[l++]}),!y||v)},"6d46":function(t,e){t.exports='<article class="u-common-tree" :class="className.join(\' \')">\r\n <slot name="header"></slot>\r\n <section class="content">\r\n <i-input\r\n class="search-input"\r\n suffix="ios-search"\r\n :placeholder="placeholder"\r\n @on-change="onFilter"\r\n v-model="keyword"\r\n >\r\n <i class="iconfont icon-chaxun" slot="prefix"></i>\r\n </i-input>\r\n <i-tree\r\n :data="renderData"\r\n :render="renderContent"\r\n @on-toggle-expand="onToggleExpand"\r\n ></i-tree>\r\n </section>\r\n</article>\r\n'},"6d6e":function(t,e,n){"use strict";var i=n("bd74"),r=n("d803"),o=n("9822"),a=n("4cad"),s=n("a2df"),c=n("3955"),l=n("862c"),p=n("998d"),u=n("327c"),d=n("8c3a"),h=n("17f8"),f=n("e900"),m=n("7e75");t.exports=function(t,e,n,y){var v="stackTraceLimit",g=y?2:1,b=t.split("."),w=b[b.length-1],x=i.apply(null,b);if(x){var S=x.prototype;if(!m&&r(S,"cause")&&delete S.cause,!n)return x;var I=i("Error"),k=e((function(t,e){var n=u(y?e:t,void 0),i=y?new x(t):new x;return void 0!==n&&o(i,"message",n),h(i,k,i.stack,2),this&&a(S,this)&&p(i,this,k),arguments.length>g&&d(i,arguments[g]),i}));if(k.prototype=S,"Error"!==w?s?s(k,I):c(k,I,{name:!0}):f&&v in x&&(l(k,x,v),l(k,x,"prepareStackTrace")),c(k,x),!m)try{S.name!==w&&o(S,"name",w),S.constructor=k}catch(C){}return k}}},"713b":function(t,e,n){},"720f":function(t,e,n){"use strict";var i=n("12f2"),r=Function.prototype,o=r.call,a=i&&r.bind.bind(o,o);t.exports=i?a:function(t){return function(){return o.apply(t,arguments)}}},7359:function(t,e,n){},7640:function(t,e){t.exports='<article class="params-setting">\r\n <i-collapse v-model="value" simple>\r\n <i-panel name="1">\r\n <span>Query参数</span>\r\n <i-icon class="help-icon" type="md-alert" @click.stop="showScriptDoc" title="说明文档"> </i-icon>\r\n <span class="status">{{getExpand(\'1\') ? "收起" : "展开"}}</span>\r\n <div slot="content" class="setting-content">\r\n <header>\r\n <i-button type="primary" ghost class="diy-btn-primary" @click="onAddRequestParam"> <i class="api-icon icon-add"></i>新增参数 </i-button>\r\n </header>\r\n <main>\r\n <i-table height="200" width="1280" class="diy-table" @on-selection-change="onQuerySelectionChange" :columns="paramColumns" :data="queryDataList">\r\n <template slot-scope="{ row,index }" slot="selection">\r\n <i-switch size="large" :value="!queryDataList[index].disabled" @on-change="onChangeDisabled($event,queryDataList[index],\'query\')">\r\n <span slot="open">开启</span>\r\n <span slot="close">禁用</span>\r\n </i-switch>\r\n </template>\r\n <template slot-scope="{ row,index }" slot="name">\r\n <i-input class="diy-input" placeholder="输入参数名称" v-model="queryDataList[index].name"></i-input>\r\n </template>\r\n <template slot-scope="{ row,index }" slot="valueContent">\r\n <i-input class="diy-input" placeholder="输入参数值" v-model="queryDataList[index].valueContent"></i-input>\r\n </template>\r\n <template slot-scope="{ row,index }" slot="required">\r\n <i-switch v-model="queryDataList[index].requireFlag" :disabled="queryDataList[index].disabled" :true-value="1" :false-value="0">\r\n <span slot="open">是</span>\r\n <span slot="close">否</span>\r\n </i-switch>\r\n </template>\r\n <template slot-scope="{ row,index }" slot="text">\r\n <i-input class="diy-input" placeholder="输入备注" v-model="queryDataList[index].text"></i-input>\r\n </template>\r\n <template slot-scope="{ row,index }" slot="action">\r\n <i-poptip class="action-btn delete" title="确认删除这条数据吗?" confirm @on-ok="onDelete(queryDataList,row.indexFlag,\'query\')" transfer>\r\n <i class="iconfont icon-delete" title="删除"></i>\r\n </i-poptip>\r\n <span>\r\n <i v-if="index>0" class="iconfont icon-up" @click="onUp(queryDataList,index)" title="上移"></i>\r\n <i v-if="index>0" class="iconfont icon-top" title="置顶" @click="onTop(queryDataList,index)"></i>\r\n <i v-if="index < queryDataList.length - 1" @click="onDown(queryDataList,index)" class="iconfont icon-down" title="下移"></i>\r\n <i v-if="index < queryDataList.length - 1" @click="onBottom(queryDataList,index)" class="iconfont icon-bottom" title="置底"></i>\r\n </span>\r\n </template>\r\n </i-table>\r\n </main>\r\n </div>\r\n </i-panel>\r\n <i-panel name="2">\r\n <span>Body参数</span>\r\n <span class="status">{{getExpand(\'2\') ? "收起" : "展开"}}</span>\r\n <div slot="content" class="setting-content">\r\n <header>\r\n <i-button v-if="isFormData" type="primary" ghost class="diy-btn-primary" @click="onAddBodyParam"> <i class="api-icon icon-add"></i>新增参数 </i-button>\r\n <i-button v-else type="primary" ghost class="diy-btn-primary" @click="onBeautify"> <i class="api-icon icon-view"></i>格式化 </i-button>\r\n <i-select transfer v-model="interfaceModel.info.requestBodyType" class="diy-select">\r\n <i-option v-for="item in requestBodyTypeList" :value="item.name" :key="item.name">{{item.text}}</i-option>\r\n </i-select>\r\n </header>\r\n <main>\r\n <i-table\r\n height="200"\r\n width="1280"\r\n class="diy-table"\r\n @on-selection-change="onBodySelectionChange"\r\n :columns="bodyColumns"\r\n :data="bodyDataList"\r\n v-if="isFormData"\r\n >\r\n <template slot-scope="{ row,index }" slot="selection">\r\n <i-switch size="large" :value="!bodyDataList[index].disabled" @on-change="onChangeDisabled($event,bodyDataList[index],\'body\')">\r\n <span slot="open">开启</span>\r\n <span slot="close">禁用</span>\r\n </i-switch>\r\n </template>\r\n <template slot-scope="{ row,index }" slot="name">\r\n <div class="body-name-row">\r\n <i-input class="diy-input" placeholder="输入参数名称" v-model="bodyDataList[index].name"></i-input>\r\n <i-select class="diy-select" v-if="bodyType === \'Form\'" v-model="row.valueType" @on-change="onChangeFormParamType(index, row)" transfer>\r\n <i-option v-for="item in formParamTypeList" :value="item.name" :key="item.name">{{item.text}}</i-option>\r\n </i-select>\r\n </div>\r\n </template>\r\n <template slot-scope="{ row,index }" slot="valueContent">\r\n <i-input v-if="row.valueType !== \'FILE\'" class="diy-input" placeholder="输入参数值" v-model="bodyDataList[index].valueContent"></i-input>\r\n <i-upload v-if="row.valueType === \'FILE\' && !row.fileName" action="" :before-upload="onImport" :show-upload-list="false">\r\n <i-button class="file-btn" icon="ios-cloud-upload-outline" @click="onClickRow(row)">选择文件</i-button>\r\n </i-upload>\r\n <div class="file-wrap" v-if="row.valueType === \'FILE\' && row.fileName">\r\n <div class="file-name" :title="row.fileName">{{ row.fileName }}</div>\r\n <i-icon type="ios-close" @click="onClearFile(row)" />\r\n </div>\r\n </template>\r\n <template slot-scope="{ row,index }" slot="required">\r\n <i-switch v-model="bodyDataList[index].requireFlag" :disabled="bodyDataList[index].disabled" :true-value="1" :false-value="0">\r\n <span slot="open">是</span>\r\n <span slot="close">否</span>\r\n </i-switch>\r\n </template>\r\n <template slot-scope="{ row,index }" slot="text">\r\n <i-input class="diy-input" placeholder="输入备注" v-model="bodyDataList[index].remark"></i-input>\r\n </template>\r\n <template slot-scope="{ row,index }" slot="action">\r\n <i-poptip class="action-btn delete" title="确认删除这条数据吗?" confirm @on-ok="onDeleteBodyParam(interfaceModel.formParams,row.indexFlag,\'body\')" transfer>\r\n <i class="iconfont icon-delete" title="删除"></i>\r\n </i-poptip>\r\n <span>\r\n <i v-if="index > 0" class="iconfont icon-up" @click="onUpBodyParam(interfaceModel.formParams,row.id)" title="上移"></i>\r\n <i v-if="index > 0" class="iconfont icon-top" @click="onTopBodyParam(interfaceModel.formParams,row.id)" title="置顶"></i>\r\n <i v-if="index < bodyDataList.length - 1" @click="onDownBodyParam(interfaceModel.formParams,row.id)" class="iconfont icon-down" title="下移"></i>\r\n <i\r\n v-if="index < bodyDataList.length - 1"\r\n @click="onBottomBodyParam(interfaceModel.formParams,row.id)"\r\n class="iconfont icon-bottom"\r\n title="置底"\r\n ></i>\r\n </span>\r\n </template>\r\n </i-table>\r\n <u-editor v-else :value.sync="interfaceModel.json" lang="json" @inited="onEditorInited"></u-editor>\r\n </main>\r\n </div>\r\n </i-panel>\r\n </i-collapse>\r\n <u-doc-modal class="script-doc-modal" v-model="scriptDocShow" :doc="scriptDoc"></u-doc-modal>\r\n</article>\r\n'},"767a":function(t,e,n){"use strict";var i=n("ad8b"),r=n("10a7"),o=n("bc85"),a=o.String;t.exports=!!Object.getOwnPropertySymbols&&!r((function(){var t=Symbol("symbol detection");return!a(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&i&&i<41}))},7801:function(t,e,n){"use strict";var i=n("ec2f"),r=n("1d6e"),o=TypeError;t.exports=function(t){if(i(t))return t;throw new o(r(t)+" is not a function")}},"7af4":function(t,e,n){
1
+ (function(t,e){"object"===typeof exports&&"object"===typeof module?module.exports=e(require("vue-property-decorator"),require("brace/mode/json"),require("brace/mode/groovy"),require("brace/mode/xml"),require("vue-json-viewer"),require("brace/snippets/json"),require("lodash.debounce"),require("brace/ext/searchbox"),require("@egova/flagwind-core"),require("@egova/flagwind-web"),require("brace/theme/chrome"),require("brace/ext/language_tools"),require("vue2-ace-editor"),require("vue"),require("brace/snippets/javascript"),require("brace"),require("halo-math"),require("brace/snippets/groovy"),require("jsencrypt"),require("crypto-js"),require("mavon-editor"),require("js-cookie"),require("brace/mode/javascript"),require("@egova/flagwind-web/dist/flagwind-web.umd.js"),require("axios"),require("swiper")):"function"===typeof define&&define.amd?define(["vue-property-decorator","brace/mode/json","brace/mode/groovy","brace/mode/xml","vue-json-viewer","brace/snippets/json","lodash.debounce","brace/ext/searchbox","@egova/flagwind-core","@egova/flagwind-web","brace/theme/chrome","brace/ext/language_tools","vue2-ace-editor","vue","brace/snippets/javascript","brace","halo-math","brace/snippets/groovy","jsencrypt","crypto-js","mavon-editor","js-cookie","brace/mode/javascript","@egova/flagwind-web/dist/flagwind-web.umd.js","axios","swiper"],e):"object"===typeof exports?exports["index"]=e(require("vue-property-decorator"),require("brace/mode/json"),require("brace/mode/groovy"),require("brace/mode/xml"),require("vue-json-viewer"),require("brace/snippets/json"),require("lodash.debounce"),require("brace/ext/searchbox"),require("@egova/flagwind-core"),require("@egova/flagwind-web"),require("brace/theme/chrome"),require("brace/ext/language_tools"),require("vue2-ace-editor"),require("vue"),require("brace/snippets/javascript"),require("brace"),require("halo-math"),require("brace/snippets/groovy"),require("jsencrypt"),require("crypto-js"),require("mavon-editor"),require("js-cookie"),require("brace/mode/javascript"),require("@egova/flagwind-web/dist/flagwind-web.umd.js"),require("axios"),require("swiper")):t["index"]=e(t["vue-property-decorator"],t["brace/mode/json"],t["brace/mode/groovy"],t["brace/mode/xml"],t["vue-json-viewer"],t["brace/snippets/json"],t["lodash.debounce"],t["brace/ext/searchbox"],t["@egova/flagwind-core"],t["@egova/flagwind-web"],t["brace/theme/chrome"],t["brace/ext/language_tools"],t["vue2-ace-editor"],t["vue"],t["brace/snippets/javascript"],t["brace"],t["halo-math"],t["brace/snippets/groovy"],t["jsencrypt"],t["crypto-js"],t["mavon-editor"],t["js-cookie"],t["brace/mode/javascript"],t["@egova/flagwind-web/dist/flagwind-web.umd.js"],t["axios"],t["swiper"])})("undefined"!==typeof self?self:this,(function(t,e,n,i,r,o,a,s,c,l,p,u,d,h,f,m,y,v,g,b,w,x,S,I,k,C){return function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={i:i,l:!1,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(i,r,function(e){return t[e]}.bind(null,r));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s="3061")}({"00fe":function(t,e,n){"use strict";var i=n("d631");t.exports=function(t,e,n){var r=0,o=arguments.length>2?n:i(e),a=new t(o);while(o>r)a[r]=e[r++];return a}},"01a6":function(e,n){e.exports=t},"04ca":function(t,e,n){"use strict";var i=n("10a7"),r=n("ec2f"),o=/#|\.prototype\./,a=function(t,e){var n=c[s(t)];return n===p||n!==l&&(r(e)?i(e):!!e)},s=a.normalize=function(t){return String(t).replace(o,".").toLowerCase()},c=a.data={},l=a.NATIVE="N",p=a.POLYFILL="P";t.exports=a},"06a8":function(t,e,n){},"07ab":function(t,e){t.exports='<div class="u-tree-node">\r\n\x3c!-- <i class="iconfont" :class="data.expand? \'icon-expand\': \'icon-unexpand\'"></i>--\x3e\r\n <i class="iconfont icon-mulushu" @click="onClickNode"></i>\r\n <div class="name" @click="onClickNode">{{data.name}}</div>\r\n <i-dropdown @on-click="onClick" transfer transfer-class-name="node-oprate" v-if="data.id !== \'virtual_root_directory\'">\r\n <i-icon type="ios-more" />\r\n <i-dropdown-menu slot="list">\r\n <i-dropdown-item v-for="item in actions" :key="item.name" :name="item.name">\r\n <template v-if="item.name === \'import\'">\r\n <i-upload\r\n class="action-item"\r\n :action="uploadAction"\r\n :data="uploadParams"\r\n accept=".json"\r\n :headers="headers"\r\n :show-upload-list="false"\r\n :format="[\'json\']"\r\n :on-success="onSuccess"\r\n :before-upload="onBeforeUpload"\r\n :on-format-error="onFormatError"\r\n >\r\n <i title="导入" class="iconfont icon-import"></i>{{item.text}}\r\n </i-upload>\r\n </template>\r\n <template v-else> <i class="iconfont" :class="\'icon-\' + (item.icon || item.name)"></i>{{item.text}} </template>\r\n </i-dropdown-item>\r\n </i-dropdown-menu>\r\n </i-dropdown>\r\n</div>\r\n'},"086a":function(t,e){t.exports='<i-modal draggable sticky transfer reset-drag-position :mask-closable="false" v-model="show" width="1000" class="u-test-run-modal diy-modal">\r\n <header slot="header">运行结果</header>\r\n <main>\r\n <section class="u-test-run-content">\r\n <section class="title-g">参数</section>\r\n <section class="card-panel context-editor">\r\n <u-base-editor :data.sync="context"></u-base-editor>\r\n </section>\r\n <i-row justify="end">\r\n <i-button class="diy-btn-default" @click="onReset">重置</i-button>\r\n <i-button class="diy-btn-primary" type="primary" @click="onProcess">执行</i-button>\r\n </i-row>\r\n <section class="title-g">结果</section>\r\n <section class="card-panel">\r\n <i-tabs>\r\n <i-tab-pane label="响应" name="response">\r\n <u-base-editor :class="[\'editor\', error ? \'editor-error\' : \'\']" :data.sync="result" :readOnly="true"></u-base-editor>\r\n </i-tab-pane>\r\n <i-tab-pane label="输出" name="output">\r\n <u-base-editor :data.sync="output" :readOnly="true"></u-base-editor>\r\n </i-tab-pane>\r\n </i-tabs>\r\n </section>\r\n </section>\r\n </main>\r\n <footer slot="footer">\r\n <i-button type="primary" class="diy-btn-primary" @click="onOk">关闭</i-button>\r\n </footer>\r\n</i-modal>\r\n'},"0888":function(t,e,n){"use strict";var i=n("bc85"),r=n("9afe"),o="__core-js_shared__",a=i[o]||r(o,{});t.exports=a},"0941":function(t,e){t.exports='<i-modal draggable sticky transfer reset-drag-position :mask-closable="false" v-model="show" width="1280" class="u-api-project-modal diy-modal">\r\n <header slot="header">添加API</header>\r\n <main>\r\n <i-split v-model="splitHorizontal">\r\n <section slot="left" class="card-panel card-panel-no-right-border">\r\n <div class="card-panel-header">\r\n <span>选择列表</span>\r\n </div>\r\n <div class="card-panel-main">\r\n <u-tree :commonTaskCategoryID="taskCategoryID" :initSelectItem="initNode" :prop-data="treeData" :isTreeList="true" @on-select="onSelect" />\r\n </div>\r\n </section>\r\n <section slot="right" class="right-content">\r\n <i-split v-model="splitVertical" mode="vertical" max="600">\r\n <section slot="top" class="card-panel card-panel-no-bottom-border">\r\n <div class="card-panel-header">\r\n <span>选择模型</span>\r\n </div>\r\n <div class="card-panel-main">\r\n <u-api-project-list\r\n :data="tableData"\r\n :paging.sync="paging"\r\n @on-search="onSearch"\r\n @on-page-index-change="onPageIndexChange"\r\n @on-page-size-change="onPageSizeChange"\r\n @on-selection-change="onSelectionChange"\r\n @on-delete-refresh="getTableData"\r\n @on-row-click="onRowClick"\r\n >\r\n </u-api-project-list>\r\n </div>\r\n </section>\r\n <section slot="bottom" :class="[\'card-panel\', collapse ? \'card-panel-no-bottom-border\' : \'\']">\r\n <div class="card-panel-header">\r\n <span>已选({{checkedLength}})</span>\r\n <span>\r\n <i-poptip confirm title="您确定要清空已选中的数据吗?" transfer placement="top-end" @on-ok="onBatchDelete">\r\n <span class="action-text">\r\n <i class="iconfont icon-delete"></i>\r\n <span>清空</span>\r\n </span>\r\n </i-poptip>\r\n <span class="action-text collapse-text" @click="onClickCollapse">\r\n <span>{{collapse ? "展开" : "收起"}}</span>\r\n <i class="ivu-icon ivu-icon-ios-arrow-forward" :class="{\'icon-arrow-collapse\':collapse}"></i>\r\n </span>\r\n </span>\r\n </div>\r\n <div class="card-panel-main">\r\n <template v-if="checkedData&&checkedData.length">\r\n <i-table class="diy-table" :columns="columns" :data="checkedData">\r\n <template #operates="{row,index}">\r\n <div class="row-actions">\r\n <i-poptip confirm transfer title="确认要删除这条数据吗?" @on-ok="onDelete(row)">\r\n <i title="删除" class="iconfont icon-delete"></i>\r\n </i-poptip>\r\n </div>\r\n </template>\r\n </i-table>\r\n </template>\r\n <template v-else>\r\n <div class="table-no-data">\r\n <div class="table-no-data-bg"></div>\r\n <div class="table-no-data-text">暂无数据</div>\r\n </div>\r\n </template>\r\n </div>\r\n </section>\r\n </i-split>\r\n </section>\r\n </i-split>\r\n <i-spin fix v-if="isLoading">\r\n <i class="spin-icon-load ivu-icon"></i>\r\n </i-spin>\r\n </main>\r\n <footer slot="footer">\r\n <i-button type="primary" class="diy-btn-primary" @click="onSave">确定</i-button>\r\n <i-button class="diy-btn-default" @click="onCancel">取消</i-button>\r\n </footer>\r\n</i-modal>\r\n'},"0a2e":function(t,e,n){},"0d9b":function(t,e,n){"use strict";var i=n("720f"),r=i({}.toString),o=i("".slice);t.exports=function(t){return o(r(t),8,-1)}},"0ddb":function(t,e,n){"use strict";var i=n("82ef"),r=n("bc85"),o=n("ff99"),a=n("6d6e"),s="WebAssembly",c=r[s],l=7!==new Error("e",{cause:7}).cause,p=function(t,e){var n={};n[t]=a(t,e,l),i({global:!0,constructor:!0,arity:1,forced:l},n)},u=function(t,e){if(c&&c[t]){var n={};n[t]=a(s+"."+t,e,l),i({target:s,stat:!0,constructor:!0,arity:1,forced:l},n)}};p("Error",(function(t){return function(e){return o(t,this,arguments)}})),p("EvalError",(function(t){return function(e){return o(t,this,arguments)}})),p("RangeError",(function(t){return function(e){return o(t,this,arguments)}})),p("ReferenceError",(function(t){return function(e){return o(t,this,arguments)}})),p("SyntaxError",(function(t){return function(e){return o(t,this,arguments)}})),p("TypeError",(function(t){return function(e){return o(t,this,arguments)}})),p("URIError",(function(t){return function(e){return o(t,this,arguments)}})),u("CompileError",(function(t){return function(e){return o(t,this,arguments)}})),u("LinkError",(function(t){return function(e){return o(t,this,arguments)}})),u("RuntimeError",(function(t){return function(e){return o(t,this,arguments)}}))},"0e0c":function(t,n){t.exports=e},"10a7":function(t,e,n){"use strict";t.exports=function(t){try{return!!t()}catch(e){return!0}}},"10cf":function(t,e){t.exports='<i-modal\r\n draggable\r\n sticky\r\n reset-drag-position\r\n v-model="value"\r\n class="diy-modal current-variable-modal"\r\n :mask-closable="false"\r\n footer-hide\r\n title="查看当前变量"\r\n>\r\n <i-form\r\n :label-width="95"\r\n class="diy-form"\r\n label-colon\r\n label-position="left"\r\n >\r\n <i-form-item label="环境名称">\r\n <i-input class="diy-input" placeholder="请输入环境名称"></i-input>\r\n </i-form-item>\r\n <i-form-item label="环境域名" class="realm-name">\r\n <i-input class="diy-input" placeholder="请输入环境域名">\r\n <i-select slot="prepend" class="diy-select"> </i-select>\r\n </i-input>\r\n </i-form-item>\r\n <i-form-item label="Header" class="name-value-item">\r\n <i-input class="diy-input"></i-input>\r\n <i-input class="diy-input"></i-input>\r\n </i-form-item>\r\n <i-form-item label="Cookie" class="name-value-item">\r\n <i-input class="diy-input"></i-input>\r\n <i-input class="diy-input"></i-input>\r\n </i-form-item>\r\n <i-form-item label="Global" class="name-value-item">\r\n <i-input class="diy-input"></i-input>\r\n <i-input class="diy-input"></i-input>\r\n </i-form-item>\r\n </i-form>\r\n</i-modal>\r\n'},1215:function(t,e,n){"use strict";e.f=Object.getOwnPropertySymbols},"12f2":function(t,e,n){"use strict";var i=n("10a7");t.exports=!i((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},"16bf":function(t,e,n){"use strict";var i=n("ead7"),r=RangeError;t.exports=function(t,e){var n=i(t);if(n%e)throw new r("Wrong offset");return n}},"17f8":function(t,e,n){"use strict";var i=n("9822"),r=n("dd76"),o=n("d5e3"),a=Error.captureStackTrace;t.exports=function(t,e,n,s){o&&(a?a(t,e):i(t,"stack",r(n,s)))}},"17fe":function(t,e,n){},"193e":function(t,e){t.exports='<article class="project-tree">\r\n <header>\r\n <div class="tree-api">\r\n <div class="title-g">API列表</div>\r\n <div class="add" @click="onAddGroup">\r\n <i class="iconfont icon-xinjianwenjianjia" title="新增分组"></i>\r\n </div>\r\n </div>\r\n <div class="tree-search">\r\n <i-select class="diy-select" transfer v-model="type" @on-change="onFilter">\r\n <i-option v-for="item in typeList" :key="item.value" :value="item.value">{{item.text}}</i-option>\r\n </i-select>\r\n <i-input class="diy-input" v-model="keyword" @on-change="onFilter" placeholder="输入关键字查询">\r\n <i class="iconfont icon-chaxun" slot="prefix"></i>\r\n </i-input>\r\n </div>\r\n </header>\r\n <i-tree :data="renderData" :render="renderContent"></i-tree>\r\n <i-modal\r\n draggable\r\n sticky\r\n reset-drag-position\r\n v-model="showGroupModal"\r\n class="diy-modal"\r\n :mask-closable="false"\r\n transfer\r\n :title="group.id ? \'修改分组\': \'新增分组\'"\r\n >\r\n <i-form :label-width="100" class="diy-form" label-colon>\r\n <i-form-item label="分组名称" required>\r\n <i-input class="diy-input" v-model="group.name"></i-input>\r\n </i-form-item>\r\n <i-form-item v-if="group.id" label="所属项目" required>\r\n <i-select class="diy-select" v-model="group.projectId" transfer filterable @on-change="onChangeProject(true,true)">\r\n <i-option v-for="item in projectList" :value="item.id" :key="item.id">{{item.name}}</i-option>\r\n </i-select>\r\n </i-form-item>\r\n <i-form-item label="分组位置">\r\n <u-group-select :data="groupTree" :current="parent" @on-select="onSelectParent"></u-group-select>\r\n </i-form-item>\r\n </i-form>\r\n <footer slot="footer">\r\n <i-button class="diy-btn-primary" type="primary" @click.stop="onSaveGroup">确定</i-button>\r\n <i-button class="diy-btn-default" @click.stop="onGourpCancel">取消</i-button>\r\n </footer>\r\n </i-modal>\r\n <i-modal draggable sticky reset-drag-position v-model="showInterfaceModal" class="diy-modal" :mask-closable="false" :title="interfaceModel.id ? \'修改接口\': \'新增接口\'">\r\n <i-form :label-width="100" class="diy-form" label-colon>\r\n <i-form-item label="接口名称" required>\r\n <i-input class="diy-input" v-model="interfaceModel.name"></i-input>\r\n </i-form-item>\r\n\r\n <i-form-item v-if="interfaceModel.id" label="所属项目" required>\r\n <i-select class="diy-select" v-model="interfaceModel.projectId" transfer filterable @on-change="onChangeProject(false,true)">\r\n <i-option v-for="item in projectList" :value="item.id" :key="item.id">{{item.name}}</i-option>\r\n </i-select>\r\n </i-form-item>\r\n\r\n <i-form-item label="接口位置" required>\r\n <u-group-select :data="groupTree" :current="parent" @on-select="onSelectParent"></u-group-select>\r\n </i-form-item>\r\n <i-form-item label="接口类型" required>\r\n <i-select v-model="interfaceModel.method" class="diy-select" transfer>\r\n <i-option v-for="item in typeList" v-if="item.value" :key="item.value" :value="item.value">{{item.text}}</i-option>\r\n </i-select>\r\n </i-form-item>\r\n <i-form-item label="需要认证" required>\r\n <i-select v-model="interfaceModel.authFlag" class="diy-select" transfer>\r\n <i-option :key="0" :value="0">否</i-option>\r\n <i-option :key="1" :value="1">是</i-option>\r\n </i-select>\r\n </i-form-item>\r\n </i-form>\r\n <footer slot="footer">\r\n <i-button class="diy-btn-primary" type="primary" @click="onSaveInterface">确定</i-button>\r\n <i-button class="diy-btn-default" @click="onInterfaceCancel">取消</i-button>\r\n </footer>\r\n </i-modal>\r\n <i-modal draggable sticky reset-drag-position v-model="showCopyModal" class="diy-modal" :mask-closable="false" title="复制接口">\r\n <i-form :label-width="100" class="diy-form" label-colon>\r\n <i-form-item label="接口名称" required>\r\n <i-input class="diy-input" v-model="copyName"></i-input>\r\n </i-form-item>\r\n <i-form-item label="选择分组" required>\r\n <u-group-select :isSelector="true" :data="groupTree" :current="parent" @on-select="onSelectParent"></u-group-select>\r\n </i-form-item>\r\n </i-form>\r\n <footer slot="footer">\r\n <i-button class="diy-btn-primary" type="primary" @click="onCopy">确定</i-button>\r\n <i-button class="diy-btn-default" @click="onCopyCancel">取消</i-button>\r\n </footer>\r\n </i-modal>\r\n\r\n <i-modal width="730" draggable sticky reset-drag-position v-model="showMoveModal" class="diy-modal" :mask-closable="false" :title="moveType===\'group\' ? \'分组移动提示\': \'接口移动提示\'">\r\n <div class="api-move-project-body">\r\n <span class="warn-title">\r\n <i-icon type="ios-help-circle" />\r\n 检测到被移动{{moveType===\'group\'?"分组":"接口"}}中存在已关联的授权/环境变量,是否在新项目中新建?\r\n </span>\r\n <span class="second-title">新建授权/环境变量:将在目标项目中新建{{moveType===\'group\'?"分组":"接口"}}绑定的授权/环境变量</span>\r\n <span class="second-title">不新建:将原有的授权/环境变量置为空,仅移动接口</span>\r\n <span class="second-title">取消:取消本次操作</span>\r\n </div>\r\n <footer slot="footer">\r\n <i-button class="diy-btn-primary api-move-ok-btn" type="primary" @click="onMoveOk(true)">新建授权/环境变量</i-button>\r\n <i-button class="diy-btn-default" @click="onMoveOk(false)">不新建</i-button>\r\n <i-button class="diy-btn-default api-move-cancel-btn" @click="onMoveCancel">取消</i-button>\r\n </footer>\r\n </i-modal>\r\n <u-batch-modal :visiable.sync="showBatchModal" :data="categoryApiList" :projectId="projectId" @on-success="onBatchSuccess"></u-batch-modal>\r\n</article>\r\n'},"1a93":function(t,e,n){},"1aea":function(t,e,n){},"1b9a":function(t,e,n){"use strict";var i=TypeError,r=9007199254740991;t.exports=function(t){if(t>r)throw i("Maximum allowed index exceeded");return t}},"1cdf":function(t,e){t.exports=n},"1d6e":function(t,e,n){"use strict";var i=String;t.exports=function(t){try{return i(t)}catch(e){return"Object"}}},"1e82":function(t,e){t.exports=i},"22e8":function(t,e){t.exports='<article class="headers-setting">\r\n <header>\r\n <i-button type="primary" ghost class="diy-btn-primary" @click="onAdd">\r\n <i class="api-icon icon-add"></i>新增\r\n </i-button>\r\n \x3c!-- <i-button type="primary" ghost class="diy-btn-primary">\r\n <i class="api-icon icon-import"></i>导入参数\r\n </i-button>\r\n <i-button type="primary" ghost class="diy-btn-primary">\r\n <i class="api-icon icon-export"></i>导出参数\r\n </i-button> --\x3e\r\n </header>\r\n <i-table\r\n class="diy-table"\r\n :columns="columns"\r\n :data="interfaceModel.requestHeaders"\r\n >\r\n <template slot-scope="{ row,index }" slot="selection">\r\n <i-checkbox\r\n :value="!interfaceModel.requestHeaders[index].disabled"\r\n @on-change="onChangeDisabled($event,interfaceModel.requestHeaders[index])"\r\n >\r\n </i-checkbox>\r\n </template>\r\n <template slot-scope="{ row,index }" slot="name">\r\n <i-input\r\n class="diy-input"\r\n placeholder="输入参数名称"\r\n v-model="interfaceModel.requestHeaders[index].name"\r\n >\r\n </i-input>\r\n </template>\r\n <template slot-scope="{ row,index }" slot="value">\r\n <i-input\r\n class="diy-input"\r\n placeholder="输入参数值"\r\n v-model="interfaceModel.requestHeaders[index].value"\r\n >\r\n </i-input>\r\n </template>\r\n <template slot-scope="{ row,index }" slot="text">\r\n <i-input\r\n class="diy-input"\r\n placeholder="备注"\r\n v-model="interfaceModel.requestHeaders[index].text"\r\n >\r\n </i-input>\r\n </template>\r\n <template slot-scope="{ row,index }" slot="action">\r\n <i-poptip title="确认删除这条数据吗?" confirm @on-ok="onDelete(index)" transfer>\r\n <i class="iconfont icon-delete" title="删除"></i>\r\n </i-poptip>\r\n </template>\r\n </i-table>\r\n</article>\r\n'},"234b":function(t,e,n){"use strict";var i=n("0d9b");t.exports=Array.isArray||function(t){return"Array"===i(t)}},2364:function(t,e){t.exports=r},"236b":function(t,e){t.exports='<article class="after-execution-transfer">\r\n <i-form :label-width="112" class="diy-form" label-colon v-if="interfaceModel.convertConfig">\r\n <i-form-item label="状态字段位置">\r\n <i-input class="diy-input" v-model="interfaceModel.convertConfig.successCodePath"></i-input>\r\n </i-form-item>\r\n <i-form-item label="成功标识">\r\n <i-input class="diy-input" v-model="interfaceModel.convertConfig.successCode"></i-input>\r\n </i-form-item>\r\n <i-form-item label="数据字段位置">\r\n <i-input class="diy-input" v-model="interfaceModel.convertConfig.convertRoot"></i-input>\r\n </i-form-item>\r\n </i-form>\r\n <i-row class="transfer-actions" justify="space-between">\r\n <div class="transfer-actions-title">\r\n <span>配置输出字段</span>\r\n <i-poptip class="action" trigger="hover" content="当前页面的勾选框仅对批量删除有效,实际输出字段为下方列表内的所有内容。" width="300" word-wrap transfer>\r\n <i class="iconfont icon-xinxi"> </i>\r\n </i-poptip>\r\n </div>\r\n <div class="actions-wrapper">\r\n <i-poptip class="action" confirm title="将自动解析转换前结果json至配置输出字段,是否继续?" width="300" @on-ok="onParse" transfer>\r\n <div class="action-item action-text">\r\n <i class="iconfont icon-jiexi-copy"></i>\r\n 解析\r\n </div>\r\n </i-poptip>\r\n <i-poptip class="action" confirm title="将重置当前所有输出字段为上次保存内容,是否确认一键重置?" width="300" @on-ok="onReset" transfer>\r\n <div class="action-item action-text">\r\n <i class="iconfont icon-refresh"></i>\r\n 重置\r\n </div>\r\n </i-poptip>\r\n <div class="action-item action-text action" @click="onAdd">\r\n <i class="iconfont icon-add"></i>\r\n 新增\r\n </div>\r\n <i-poptip class="action" confirm title="将批量删除勾选字段,是否确认?" @on-ok="batchDelete" transfer>\r\n <div class="action-item action-text action-text-delete" :class="selections.length > 0 ? \'\' : \'icon-button-disabled\'">\r\n <i class="iconfont icon-delete"></i>\r\n 批量删除\r\n </div>\r\n </i-poptip>\r\n </div>\r\n </i-row>\r\n <i-table :columns="columns" :data="dataList" class="diy-table" @on-selection-change="onChangeChecked">\r\n <template slot-scope="{ row,index }" slot="path">\r\n <i-input class="diy-input" v-model="dataList[index].paramPath" @on-change="debounceUpdateFieldMappings"> </i-input>\r\n </template>\r\n <template slot-scope="{ row,index }" slot="name">\r\n <i-input class="diy-input half" placeholder="输入字段命名" v-model="dataList[index].name" @on-change="debounceUpdateFieldMappings"> </i-input>\r\n <i-select transfer class="half diy-select" v-model="dataList[index].valueType" placeholder="选择字段类型" @on-change="debounceUpdateFieldMappings">\r\n <i-option v-for="item in valueTypeList" :key="item.name" :value="item.name">{{item.text}} </i-option>\r\n </i-select>\r\n </template>\r\n <template slot-scope="{ row,index }" slot="action">\r\n <span @click="onDelete(index)">\r\n <i title="删除" class="iconfont icon-delete"></i>\r\n </span>\r\n </template>\r\n </i-table>\r\n <i-spin fix v-show="loading">\r\n <i class="spin-icon-load ivu-icon"></i>\r\n </i-spin>\r\n</article>\r\n'},2380:function(t,e,n){},2385:function(t,e,n){"use strict";var i=n("7e75"),r=n("0888");(t.exports=function(t,e){return r[t]||(r[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.35.0",mode:i?"pure":"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.35.0/LICENSE",source:"https://github.com/zloirock/core-js"})},"23c0":function(t,e,n){"use strict";var i={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,o=r&&!i.call({1:2},1);e.f=o?function(t){var e=r(this,t);return!!e&&e.enumerable}:i},2597:function(t,e,n){"use strict";var i=n("6a10"),r=n("d631"),o=n("9b7f"),a=i.aTypedArray,s=i.exportTypedArrayMethod;s("at",(function(t){var e=a(this),n=r(e),i=o(t),s=i>=0?i:n+i;return s<0||s>=n?void 0:e[s]}))},2606:function(t,e,n){"use strict";var i=n("e900"),r=n("d803"),o=Function.prototype,a=i&&Object.getOwnPropertyDescriptor,s=r(o,"name"),c=s&&"something"===function(){}.name,l=s&&(!i||i&&a(o,"name").configurable);t.exports={EXISTS:s,PROPER:c,CONFIGURABLE:l}},"270f":function(t,e,n){},2720:function(t,e,n){"use strict";var i=n("0d9b"),r=n("720f");t.exports=function(t){if("Function"===i(t))return r(t)}},"2a79":function(t,e,n){},"2c48":function(t,e){t.exports='<article class="response" :class="{\'response-expand\':expand}">\r\n <header :class="{\'status-success\': response.code === 200, \'status-fail\': response.code && response.code!==200}">\r\n <span class="title">响应</span>\r\n <span class="collapse-text" @click="onClickCollapse">\r\n <i class="ivu-icon ivu-icon-ios-arrow-forward" :class="{\'icon-arrow-collapse\':expand}"></i>\r\n <span>{{expand ? "收起" : "展开"}}</span>\r\n </span>\r\n <div class="items-div">\r\n <span class="item-name">响应码:</span>\r\n <span class="item-value">{{response.code}}</span>\r\n <span class="item-name">时间:</span>\r\n <span class="item-value">{{response.time}}ms</span>\r\n <span class="item-name">大小:</span>\r\n <span class="item-value">{{response.size}}B</span>\r\n </div>\r\n </header>\r\n <main v-show="expand">\r\n <div class="response-bar">\r\n <div\r\n class="tag"\r\n @click="onClickResponseSettingTpye(item)"\r\n :class="{\'active\': item.name === active.name}"\r\n v-for="(item,index) in responseSettingTypeList"\r\n :key="item.name"\r\n >\r\n <span>{{item.title + (item.num > 0 ? \'(\' + item.num + \')\': "")}}</span>\r\n </div>\r\n </div>\r\n <div class="response-content">\r\n <template v-if="active.name === \'content\'">\r\n <header>\r\n <i-radio-group type="button" class="diy-radio-group-button response-content-radio-group" v-model="contentType">\r\n <i-radio label="originalContent">转换前</i-radio>\r\n <i-radio label="content">转换后</i-radio>\r\n </i-radio-group>\r\n <i-dropdown class="diy-dropdown response-content-dropdown" @on-click="onChangeLang">\r\n <i-button ghost type="primary" class="diy-btn-primary">\r\n <span class="lang">{{lang.toUpperCase()}}</span>\r\n <i class="api-icon icon-select"></i>\r\n </i-button>\r\n <i-dropdown-menu slot="list">\r\n <i-dropdown-item name="json">JSON</i-dropdown-item>\r\n <i-dropdown-item name="xml">XML</i-dropdown-item>\r\n </i-dropdown-menu>\r\n </i-dropdown>\r\n </header>\r\n <u-editor :value="content" :lang="lang" @inited="onEditorInited"></u-editor>\r\n </template>\r\n <div v-if="active.name === \'responseHeaders\'">\r\n <i-table :columns="headerColumns" :data="responseHeaders" class="diy-table"> </i-table>\r\n </div>\r\n <template v-if="active.name === \'requestHeaders\'">\r\n <i-table :columns="headerColumns" :data="requestHeaders" class="diy-table"> </i-table>\r\n </template>\r\n <template v-if="active.name === \'cookies\'">\r\n <i-table :columns="headerColumns" :data="cookies" class="diy-table"> </i-table>\r\n </template>\r\n <template v-if="active.name===\'output\'">\r\n <span class="output">{{output}}</span>\r\n </template>\r\n </div>\r\n </main>\r\n</article>\r\n'},"2e28":function(t,e,n){},"2ece":function(t,e,n){"use strict";var i=n("2720"),r=n("7801"),o=n("12f2"),a=i(i.bind);t.exports=function(t,e){return r(t),void 0===e?t:o?a(t,e):function(){return t.apply(e,arguments)}}},"2f53":function(t,e){t.exports='<span class="wrap">\r\n <i-poptip trigger="hover" :content="tips">\r\n\x3c!-- <div class="diy-info-icon">i</div>--\x3e\r\n <i-icon type="ios-information-circle-outline"></i-icon>\r\n </i-poptip>\r\n <span class="title">{{labelTitle}}</span>\r\n <span v-if="labelColon">:</span>\r\n</span>\r\n'},3061:function(t,e,n){"use strict";if(n.r(e),n.d(e,"ProjectCombineManage",(function(){return lt})),n.d(e,"ProjectCombineModel",(function(){return Kt})),n.d(e,"ProjectComment",(function(){return Le})),n.d(e,"ProjectDetail",(function(){return Fn})),n.d(e,"ProjectList",(function(){return Ie})),n.d(e,"injectEnableUserCenterCookie",(function(){return k})),"undefined"!==typeof window){var i=window.document.currentScript,r=i&&i.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);r&&(n.p=r[1])}var o=n("8bbf"),a=n.n(o),s=n("9839"),c=n.n(s),l=(n("92d1"),n("e02e"),function(t,e){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},l(t,e)});function p(t,e){if("function"!==typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}l(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var u=function(){return u=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var r in e=arguments[n],e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},u.apply(this,arguments)};function d(t,e,n,i){var r,o=arguments.length,a=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(t,e,n,i);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(o<3?r(a):o>3?r(e,n,a):r(e,n))||a);return o>3&&a&&Object.defineProperty(e,n,a),a}function h(t,e,n,i){function r(t){return t instanceof n?t:new n((function(e){e(t)}))}return new(n||(n=Promise))((function(n,o){function a(t){try{c(i.next(t))}catch(e){o(e)}}function s(t){try{c(i["throw"](t))}catch(e){o(e)}}function c(t){t.done?n(t.value):r(t.value).then(a,s)}c((i=i.apply(t,e||[])).next())}))}function f(t,e){var n,i,r,o,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(t){return function(e){return c([t,e])}}function c(s){if(n)throw new TypeError("Generator is already executing.");while(o&&(o=0,s[0]&&(a=0)),a)try{if(n=1,i&&(r=2&s[0]?i["return"]:s[0]?i["throw"]||((r=i["return"])&&r.call(i),0):i.next)&&!(r=r.call(i,s[1])).done)return r;switch(i=0,r&&(s=[2&s[0],r.value]),s[0]){case 0:case 1:r=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,i=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(r=a.trys,!(r=r.length>0&&r[r.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!r||s[1]>r[0]&&s[1]<r[3])){a.label=s[1];break}if(6===s[0]&&a.label<r[1]){a.label=r[1],r=s;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(s);break}r[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(c){s=[6,c],i=0}finally{n=r=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}}Object.create;function m(t,e,n){if(n||2===arguments.length)for(var i,r=0,o=e.length;r<o;r++)!i&&r in e||(i||(i=Array.prototype.slice.call(e,0,r)),i[r]=e[r]);return t.concat(i||Array.prototype.slice.call(e))}Object.create;"function"===typeof SuppressedError&&SuppressedError;var y=n("6397"),v=n("be65"),g=n.n(v),b=["dex-web:access_token","bigdata-web:access_token","access_token"],w=["admin_sso_token"];function x(t){return g.a.get(t)||localStorage.getItem(t)||void 0}function S(){var t,e=w.map(x).find(Boolean),n=I()&&!!e,i=n?e:null!==(t=b.map(x).find(Boolean))&&void 0!==t?t:"",r=n?{"X-Authorization":"Bearer ".concat(i)}:{Authorization:"Bearer ".concat(i)};return{token:i,isUserCenter:n,headers:r}}var I=function(){return!1};function k(t){I=t}(function(){function t(){}t.isLogin=function(){return void 0!==S()},t.getRemeberLoginName=function(){var t=g.a.get("remember_login_name");return t},t.setRemeberLoginName=function(t){t?g.a.set("remember_login_name",t):g.a.remove("remember_login_name")}})();var C=n("554d"),j=n.n(C),D=function(){function t(){}return t.get=function(t){return this.maps.get(t)},t.set=function(t,e){this.maps.set(t,e)},t.has=function(t){return this.maps.has(t)},t.match=function(t){var e=new Array;return this.maps.forEach((function(n,i){i.startsWith(t)&&e.push(n)})),e},t.create=function(t){for(var e,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];return(e=j.a.Activator).createInstance.apply(e,m([t],n,!1))},t.maps=new Map,t}();function O(t){return function(e,n){var i=t;i&&!D.has(i)&&D.set(i,D.create(t)),Object.defineProperty(e,n,{get:function(){return D.get(i)}})}}function T(t,e){return function(n,i){var r=n[i],o="query"===t?E.queryHandler:E.saveHandler,a=n.constructor,s=D.has(a)?D.get(a):D.create(n.constructor);Object.defineProperty(s,i,{get:function(){return o(s,r,e)}}),D.set(a,s)}}var E=function(){function t(){}return t.queryHandler=function(e,n,i){var r=this;return function(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];return h(r,void 0,void 0,(function(){var r,a,s,c,l,p,u,d,h,m,y,v,g,b,w;return f(this,(function(f){switch(f.label){case 0:r=i,a=r.title,s=void 0===a?"":a,c=r.dataName,l=void 0===c?"":c,p=r.showTip,u=void 0!==p&&p,d=r.showErrorMsg,h=void 0===d||d,f.label=1;case 1:return f.trys.push([1,3,,4]),[4,n.apply(e,o)];case 2:return m=f.sent(),g=void 0,m.hasError?(g=s?"".concat(s,"出错!"):"请求服务失败",g=h?m.message:g,(u||h)&&t.message.error(g),console.error(g),[2,m]):(y=(l?m[l]:m)||"",(!y||y.$isObject()&&y.$isEmpty()||y.$isArray()&&y.$isEmpty()||""===l&&(m.result||[]).$isEmpty())&&(g="".concat(s,"无结果!"),u&&t.message.warning(g),console.warn(g)),[2,y]);case 3:return v=f.sent(),g=s?"".concat(s,"出错!"):"请求服务失败",g=h&&(null===(w=null===(b=v.response)||void 0===b?void 0:b.data)||void 0===w?void 0:w.message)||g,(u||h)&&t.message.error(g),console.error(g,v),[3,4];case 4:return[2]}}))}))}},t.saveHandler=function(e,n,i){var r=this,o=i,a=o.title,s=void 0===a?"":a,c=o.dataName,l=void 0===c?"":c,p=o.showTip,u=void 0!==p&&p,d=o.showErrorMsg,m=void 0===d||d;return function(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];return h(r,void 0,void 0,(function(){var r,o,a,c,p,d;return f(this,(function(h){switch(h.label){case 0:return h.trys.push([0,2,,3]),[4,n.apply(this||e,i)];case 1:return r=h.sent(),c=void 0,r.hasError?(c=s?"".concat(s,"出错!"):"请求服务失败",c=m?r.message:c,(u||m)&&t.message.error(c),console.error(c),[2,r]):(c=s?"".concat(s,"成功!"):"请求服务成功",u&&t.message.success(c),o=l?r[l]:r,[2,o]);case 2:return a=h.sent(),c=s?"".concat(s,"出错!"):"请求服务失败",c=m&&(null===(d=null===(p=a.response)||void 0===p?void 0:p.data)||void 0===d?void 0:d.message)||c,(u||m)&&t.message.error(c),console.error(c,a),[3,3];case 3:return[2]}}))}))}},Object.defineProperty(t,"message",{get:function(){return a.a.prototype.$Message},enumerable:!1,configurable:!0}),t}(),P=(n("68b7"),n("a4d2"),n("d371"),n("cebe")),M=n.n(P),L=window,A=u({},L.commonSetting),N=function(){function t(){this.securityServer=A.securityServer||"",this.adminServer=A.adminServer||""}return t.prototype.url=function(t){return A.baseUrl+t},Object.defineProperty(t.prototype,"applicationContext",{get:function(){return j.a.Application.context},enumerable:!1,configurable:!0}),t.prototype._post=function(t,e){return M.a.post(this.url(t),e).then((function(t){return t.data}))},t.prototype._get=function(t){return M.a.get(this.url(t)).then((function(t){return t.data}))},t.prototype._put=function(t,e){return M.a.put(this.url(t),e).then((function(t){return t.data}))},t.prototype._delete=function(t){return M.a.delete(this.url(t)).then((function(t){return t.data}))},t.prototype._export=function(t,e){return M.a.post(this.url(t),e,{headers:{"X-Requested-With":"XMLHttpRequest","Content-Type":"application/json; charset=UTF-8","Access-Control-Allow-Origin":"*"},responseType:"arraybuffer"}).then((function(t){var e=new Blob([t.data],{type:"application/vnd.ms-excel"}),n=URL.createObjectURL(e);window.location.href=n}))},t}(),q=N,$=n("98f0"),R=n.n($),_=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return p(e,t),e.prototype.getPublicKey=function(){return h(this,void 0,Promise,(function(){var t;return f(this,(function(e){switch(e.label){case 0:return[4,this._get("".concat(this.securityServer,"/oauth/extras/public-key"))];case 1:return t=e.sent(),g.a.set("public-key",t.result||"none"),[2,t]}}))}))},e.prototype.login=function(t,e){return h(this,void 0,Promise,(function(){return f(this,(function(n){return[2,this._post("".concat(this.securityServer,"/oauth/extras/token"),{client_id:"unity-client",client_secret:"unity",grant_type:"password",password:this.getEncryptPassword(e),username:t})]}))}))},e.prototype.getEncryptPassword=function(t){var e=g.a.get("public-key");if("none"===e||!e)return t;var n=new R.a;return n.setPublicKey(e),n.encrypt(t)},e.prototype.saveCategory=function(t){return t.id?this._put("/unity/api/category",t):this._post("/unity/api/category",t)},e.prototype.deleteCategory=function(t){return this._delete("/unity/api/category/".concat(t))},e.prototype.getCategoryTree=function(t){return this._get("/unity/category/tree?type=".concat(t))},e.prototype.getEnumByType=function(t){return this._get("/free/display/".concat(t))},e.prototype.getItemListByType=function(t){return this._get("/free/display/".concat(t))},d([T("query",{title:"获取加密需要的公钥"})],e.prototype,"getPublicKey",null),d([T("save",{title:"保存分组",showTip:!0,showErrorMsg:!0})],e.prototype,"saveCategory",null),d([T("save",{title:"删除分组",showTip:!0,showErrorMsg:!0})],e.prototype,"deleteCategory",null),d([T("query",{title:"查询分类树"})],e.prototype,"getCategoryTree",null),d([T("query",{title:"查询枚举数据",showTip:!0,showErrorMsg:!0})],e.prototype,"getEnumByType",null),d([T("query")],e.prototype,"getItemListByType",null),e}(q),F=_,B=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return p(e,t),e.prototype.page=function(t){return h(this,void 0,Promise,(function(){return f(this,(function(e){return[2,this._post("/unity/combine-info/page",t)]}))}))},e.prototype.getById=function(t){return h(this,void 0,Promise,(function(){return f(this,(function(e){return[2,this._get("/unity/combine-info/".concat(t))]}))}))},e.prototype.save=function(t){return h(this,void 0,Promise,(function(){return f(this,(function(e){return t.id?[2,this._put("/unity/combine-info",t)]:[2,this._post("/unity/combine-info",t)]}))}))},e.prototype.batchDelete=function(t){return h(this,void 0,Promise,(function(){return f(this,(function(e){return[2,this._post("/unity/combine-info/batch?@state=delete",t)]}))}))},e.prototype.dataModelParams=function(t){return h(this,void 0,Promise,(function(){return f(this,(function(e){return[2,this._post("/unity/data-model/list-request-params",t)]}))}))},e.prototype.apiProjectParams=function(t){return h(this,void 0,Promise,(function(){return f(this,(function(e){return[2,this._post("/unity/api/info/list-request-params",t)]}))}))},e.prototype.testRun=function(t){return h(this,void 0,Promise,(function(){return f(this,(function(e){return[2,this._post("/unity/combine-info/test",t)]}))}))},e.prototype.getDoc=function(t){return this._get("/unity/combine-info/".concat(t,"/doc"))},e.prototype.changeAuthFlag=function(t,e){return h(this,void 0,Promise,(function(){return f(this,(function(n){return[2,this._post("/unity/combine-info/requireauth/changestatus?id=".concat(t,"&authFlag=").concat(e))]}))}))},e.prototype.changeStatus=function(t,e){return h(this,void 0,Promise,(function(){return f(this,(function(n){return[2,this._put("/unity/combine-info/".concat(t,"/change-status?status=").concat(e))]}))}))},e.prototype.copyApi=function(t){return this._post("/unity/combine-info/copy",t)},e.prototype.geHelpDoc=function(){return this._get("/combine-api-help/help.md")},d([T("query",{title:"分页查询数据"})],e.prototype,"page",null),d([T("query",{title:"通过id获取数据详情"})],e.prototype,"getById",null),d([T("save",{title:"保存数据"})],e.prototype,"save",null),d([T("query",{title:"批量删除"})],e.prototype,"batchDelete",null),d([T("query",{title:"批量查询模型请求参数"})],e.prototype,"dataModelParams",null),d([T("query",{title:"批量查询API请求参数"})],e.prototype,"apiProjectParams",null),d([T("query",{title:"接口测试",showTip:!0})],e.prototype,"testRun",null),d([T("get",{title:"获取文档"})],e.prototype,"getDoc",null),d([T("save",{title:"保存数据"})],e.prototype,"changeAuthFlag",null),d([T("save",{title:"保存数据"})],e.prototype,"changeStatus",null),d([T("save",{title:"复制接口"})],e.prototype,"copyApi",null),e}(F),z=B,V=(n("98f4"),function(){function t(){}return t.handlerTreeData=function(e,n,i,r,o){void 0===e&&(e=[]),void 0===i&&(i=""),void 0===r&&(r=n),void 0===o&&(o=!1);var a=[];return e&&e.forEach((function(e){if(e.title=e[n],e.checked=!1,e.selected=!1,e.indeterminate=!1,e.expand=!1,e.children=t.handlerTreeData(e.children,n,i,r),i){var s=e[i];s&&(s=s.map((function(t){return t.title=t[r],t.checked=!1,t.selected=!1,t.indeterminate=!1,t.parentId=e.id,t.parentName=e.title,t})),e.children=(e.children||[]).concat(s))}o&&!e.children.length||a.push(e)})),a},t.handlerTreeData2=function(e,n,i,r,o,a,s){void 0===e&&(e=[]),void 0===i&&(i=""),void 0===r&&(r=n),void 0===o&&(o=!1),void 0===a&&(a=""),void 0===s&&(s="");var c=[];return e&&e.forEach((function(e){if(e.title=e[n],e.checked=!1,e.selected=!1,e.indeterminate=!1,e.expand=!1,e.parentId=e.parentId||a,e.parentName=e.parentName||s,e.children=t.handlerTreeData2(e.children,n,i,r,!1,e.id,e.title),i){var l=e[i];l&&(l=l.map((function(t){return t.title=t[r],t.checked=!1,t.selected=!1,t.indeterminate=!1,t.parentId=e.id,t.parentName=e.title,t})),e.children=(e.children||[]).concat(l))}o&&!e.children.length||c.push(e)})),c},t.treeNodeDirectory=function(e,n){void 0===e&&(e=[]);for(var i="",r=0,o=e;r<o.length;r++){var a=o[r];if(a.id===n)return i=a.name,i;if(a.children&&a.children.length&&(i=t.treeNodeDirectory(a.children,n),i))return a.name+"/"+i}return""},t.treeNodeFatherArray=function(e,n){void 0===e&&(e=[]);for(var i=[],r=0,o=e;r<o.length;r++){var a=o[r];if(a.id===n)return i.push(a),i;if(a.children&&a.children.length&&(i=t.treeNodeFatherArray(a.children,n),i.length>0))return i.unshift(a),i}return[]},t}()),U=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.data=[],e.className=[],e.placeholder="输入关键字查询",e.treeData=[],e.renderData=[],e.keyword="",e.selectItem={},e.expandNodeSet=new Set,e}return p(e,t),e.prototype.onFilter=function(){this.keyword?(this.renderData=this.filterData(this.treeData.$clone()),this.renderData=this.renderData.map((function(t){return t}))):this.renderData=this.treeData.map((function(t){return t}))},e.prototype.match=function(t){var e=this,n=-1!==(t.title||t.name).indexOf(this.keyword),i=!1;return!n&&t.children&&t.children.forEach((function(t){i=e.match(t).matched||e.match(t).childrenMatched||i})),{matched:n,childrenMatched:i}},e.prototype.filterData=function(t){var e=this;if(!t||!Array.isArray(t))return t;var n=t.filter((function(t){return e.match(t).childrenMatched}));return n=n.map((function(t){return t.children&&(t.children=e.filterData(t.children)),t})),n=n.concat(t.filter((function(t){return e.match(t).matched}))),n},e.prototype.clickLeafNode=function(t,e){this.selectItem=e,this.$emit("on-select",this.selectItem)},e.prototype.clickParentNode=function(t,e){this.$set(e,"expand",!e.expand),this.onToggleExpand(e),this.selectItem=e,this.$emit("on-select",this.selectItem)},e.prototype.onLocationSelect=function(t,e){void 0===e&&(e=!0),this.selectItem=t,this.$emit("on-select",this.selectItem,e)},e.prototype.initTreeData=function(t){t&&(this.treeData=t,this.treeData.length&&"virtual_root_directory"===this.treeData[0].id&&this.onToggleExpand(this.treeData[0]),this.renderData=this.treeData.map((function(t){return t})))},e.prototype.watchTaskID=function(t){if(t){var e=V.treeNodeFatherArray(this.treeData,t);if(e.length>0)for(var n=0;n<e.length;n++)n===e.length-1?this.onLocationSelect(e[n],!1):(e[n].expand=!0,this.onToggleExpand(e[n]));this.$nextTick((function(){for(var t=document.getElementsByClassName("ivu-tree-title-selected"),n=null,i=0;i<t.length;i++)if(e.length&&t[i].innerText===e[e.length-1].name){n=t[i];break}t.length&&setTimeout((function(){n.scrollIntoView({behavior:"smooth",block:"center"})}),200)}))}},e.prototype.renderContent=function(t,e){var n=this,i=(e.root,e.node,e.data),r=!!i.children;return this.$set(i,"selected",this.selectItem.id===i.id),t("div",{class:"common-tree-node"},[t("i",r?{class:this.isTreeList?"iconfont icon-mulushu":"iconfont icon-bumenkaohe",on:{click:function(t){r?n.clickParentNode(t,i):n.clickLeafNode(t,i)}}}:{class:"iconfont icon-file",on:{click:function(t){r?n.clickParentNode(t,i):n.clickLeafNode(t,i)}}}),t("p",{on:{click:function(t){r?n.clickParentNode(t,i):n.clickLeafNode(t,i)}}},i.title)])},e.prototype.onToggleExpand=function(t){t.expand?this.expandNodeSet.add(t.id):this.expandNodeSet.delete(t.id)},e.prototype.initSelectItemChange=function(){this.selectItem=this.initSelectItem,this.$forceUpdate()},d([Object(y["config"])({default:null})],e.prototype,"propData",void 0),d([Object(y["config"])({default:function(){return{}}})],e.prototype,"initSelectItem",void 0),d([Object(y["config"])({default:!1})],e.prototype,"isTreeList",void 0),d([Object(y["config"])({default:""})],e.prototype,"commonTaskCategoryID",void 0),d([Object(y["watch"])("data",{immediate:!0,deep:!1}),Object(y["watch"])("propData",{immediate:!0,deep:!1})],e.prototype,"initTreeData",null),d([Object(y["watch"])("commonTaskCategoryID",{immediate:!1})],e.prototype,"watchTaskID",null),d([Object(y["watch"])("initSelectItem")],e.prototype,"initSelectItemChange",null),e=d([Object(y["component"])({template:n("6d46"),components:{}})],e),e}(y["Component"]),H=U,G=(n("58d2"),n("b61c"),function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return p(e,t),e.prototype.onClickNode=function(t){this.data.children&&!this.canChooseFolder&&(this.$set(this.data,"expand",!this.data.expand),t.stopPropagation()),this.data.selected&&t.stopPropagation()},d([Object(y["config"])({default:function(){return{}}})],e.prototype,"data",void 0),d([Object(y["config"])({type:Boolean,default:!1})],e.prototype,"canChooseFolder",void 0),e=d([Object(y["component"])({template:n("d30a")})],e),e}(y["Component"])),K=G,Q=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.tree=[],e.inputValue="",e.visible=!1,e.current={},e}return p(e,t),e.prototype.onValueChange=function(t){if(!t)return this.inputValue="",void(this.current={});var e=this.getNodeById(this.value,this.tree)||{};this.current=e,this.inputValue=V.treeNodeDirectory(this.tree,this.value)||""},e.prototype.renderContent=function(t,e){e.root,e.node;var n=e.data;return this.$set(n,"selected",this.current.id===n.id),t(K,{props:{data:n,canChooseFolder:this.canChooseFolder}})},e.prototype.onTreeDataChange=function(){this.tree=V.handlerTreeData(this.treeData.$clone(),"name",this.leafName,void 0,this.filterEmpty),this.tree&&1===this.tree.length&&"virtual_root_directory"===this.tree[0].id&&(this.tree[0].expand=!0),this.onValueChange(this.value)},e.prototype.getNodeById=function(t,e){for(var n=void 0,i=0,r=e;i<r.length;i++){var o=r[i];if(o.id===t)return o;if(o.children&&o.children.length&&(n=this.getNodeById(t,o.children),n))return n}},e.prototype.onInputChange=function(){this.visible=!0},e.prototype.onSelectChange=function(t,e){this.$emit("input",e.id),this.$emit("on-select",e),this.visible=!1},e.prototype.onClear=function(){this.$emit("input",""),this.$emit("on-select",{})},d([Object(y["config"])({type:String,default:""})],e.prototype,"value",void 0),d([Object(y["config"])({type:Array,default:function(){return[]}})],e.prototype,"treeData",void 0),d([Object(y["config"])({default:"请输入"})],e.prototype,"placeholder",void 0),d([Object(y["config"])({default:"children"})],e.prototype,"leafName",void 0),d([Object(y["config"])({type:Boolean,default:!1})],e.prototype,"filterEmpty",void 0),d([Object(y["config"])({type:Boolean,default:!1})],e.prototype,"readonly",void 0),d([Object(y["config"])({type:Boolean,default:!1})],e.prototype,"canChooseFolder",void 0),d([Object(y["watch"])("value",{immediate:!0})],e.prototype,"onValueChange",null),d([Object(y["watch"])("treeData",{deep:!1,immediate:!0})],e.prototype,"onTreeDataChange",null),e=d([Object(y["component"])({template:n("a1f0"),components:{}})],e),e}(y["Component"]),J=Q,W=(n("9fb0"),function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return p(e,t),e.prototype.saveNode=function(t){return t.id?this._put("/unity/category",t):this._post("/unity/category",t)},e.prototype.deleteTreeNodeById=function(t){return this._delete("/unity/combine-info/category/".concat(t))},e.prototype.exportModel=function(t){return M.a.post(this.url("/unity/combine-info/export"),t,{headers:{"X-Requested-With":"XMLHttpRequest","Content-Type":"application/json; charset=UTF-8","Access-Control-Allow-Origin":"*"},responseType:"arraybuffer"}).then((function(t){var e=new Blob([t.data],{type:"application/json"}),n=URL.createObjectURL(e),i=document.createElement("a");i.href=n,i.download=decodeURI("data-model.json"),i.style.display="none",document.body.appendChild(i),i.target="_blank",i.click(),i.parentNode.removeChild(i),window.URL.revokeObjectURL(n)}))},e.prototype.isCanExportModel=function(t){return this._post("/unity/combine-info/export",t)},e.prototype.confirmImport=function(t){return this._post("/unity/combine-info/import/confirm?key=".concat(t))},e.prototype.cancelImport=function(t){return this._post("/unity/combine-info/import/cancel?key=".concat(t))},d([T("save",{title:"保存",showTip:!1})],e.prototype,"saveNode",null),d([T("delete",{title:"删除",showTip:!1})],e.prototype,"deleteTreeNodeById",null),d([T("save",{title:"导入接口数据",showTip:!0,showErrorMsg:!0})],e.prototype,"confirmImport",null),e}(F)),Y=W,X=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.categoryData={},e.rules={name:[{required:!0,message:"请输入分组名称",trigger:"blur,change"}]},e}return p(e,t),Object.defineProperty(e.prototype,"show",{get:function(){return this.value},set:function(t){this.$emit("input",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isEdit",{get:function(){return this.data.id},enumerable:!1,configurable:!0}),e.prototype.onValueChange=function(t){t||this.$refs.addForm.resetFields()},e.prototype.modalShow=function(t){!1===t?this.categoryData={}:this.categoryData.id=this.data.parentId},e.prototype.selectCategory=function(t){this.categoryData=t,this.data.parentId="virtual_root_directory"===this.categoryData.id?"":this.categoryData.id},e.prototype.onCancel=function(){this.show=!1},e.prototype.onSave=function(){var t=this;this.$refs.addForm.validate((function(e){e&&t.doSave()}))},e.prototype.doSave=function(){return h(this,void 0,void 0,(function(){var t;return f(this,(function(e){switch(e.label){case 0:return this.isEdit&&this.data.id===this.data.parentId?[2,this.$message.warning("所属分组不能选中自身")]:("virtual_root_directory"===this.data.parentId&&(this.data.parentId=""),[4,this.service.saveNode(this.data)]);case 1:return t=e.sent(),t&&!t.hasError&&(this.onCancel(),this.$emit("on-refresh")),[2]}}))}))},d([O(Y)],e.prototype,"service",void 0),d([Object(y["config"])({type:Boolean,default:!1})],e.prototype,"value",void 0),d([Object(y["config"])({type:Array,default:[]})],e.prototype,"categories",void 0),d([Object(y["config"])({default:function(){return{name:"",type:"api_combine",parentId:null}}})],e.prototype,"data",void 0),d([Object(y["watch"])("value")],e.prototype,"onValueChange",null),d([Object(y["watch"])("show")],e.prototype,"modalShow",null),e=d([Object(y["component"])({template:n("3b85"),components:{"u-tree-selector":J}})],e),e}(y["Component"]),Z=X,tt=(n("de03"),function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.actions=[{name:"add",text:"新增",icon:"add-folder"},{name:"edit",text:"编辑"},{name:"delete",text:"删除"},{name:"import",text:"导入",icon:"import"},{name:"export",text:"导出",icon:"export"}],e}return p(e,t),e.prototype.onClick=function(t){this.$emit("on-click",t,this.data)},e.prototype.onClickNode=function(t){this.$set(this.data,"expand",!this.data.expand),this.$emit("on-expand",this.data),this.$emit("on-select",this.data),this.data.selected&&t.stopPropagation()},Object.defineProperty(e.prototype,"uploadAction",{get:function(){return A.baseUrl+"/unity/combine-info/import"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"uploadParams",{get:function(){return{categoryId:this.data.id}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"headers",{get:function(){var t=S().headers;return t},enumerable:!1,configurable:!0}),e.prototype.onSuccess=function(t,e){this.$emit("on-import-success",t,e)},e.prototype.onBeforeUpload=function(t){return-1!==t.name.indexOf(" ")?(this.$Message.warning("文件名不能包含空格"),!1):-1===t.name.indexOf("%")||(this.$Message.warning("文件名不能包含符号%"),!1)},e.prototype.onFormatError=function(t){this.$Message.warning("文件".concat(t.name,"格式错误"))},d([Object(y["config"])({default:function(){return Object.create(null)}})],e.prototype,"data",void 0),d([Object(y["config"])({default:""})],e.prototype,"importUrl",void 0),e=d([Object(y["component"])({template:n("07ab")})],e),e}(y["Component"])),et=tt,nt=(n("44c1"),function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.childService=new z,e.showAddTreeNodeModal=!1,e.type="api_combine",e.tempNode={name:"",type:e.type,parentId:null},e.tempData=[],e.showImportModal=!1,e.importResult={},e.columns=[{type:"index",title:"序号",align:"left",width:80},{title:"名称",align:"left",key:"name",tooltip:!0},{title:"编码",align:"left",key:"code",tooltip:!0},{title:"说明",align:"left",key:"remark",tooltip:!0}],e}return p(e,t),Object.defineProperty(e.prototype,"uploadAction",{get:function(){return A.baseUrl+"/unity/combine-info/import"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"headers",{get:function(){var t=S().headers;return t},enumerable:!1,configurable:!0}),e.prototype.onImportConfirm=function(){return h(this,void 0,void 0,(function(){var t,e;return f(this,(function(n){switch(n.label){case 0:return this.importResult.total!==this.importResult.duplicateNum?[3,2]:[4,this.service.cancelImport(this.importResult.id)];case 1:return t=n.sent(),t&&!t.hasError?(this.$message.success("导入接口数据成功!"),this.showImportModal=!1,[2]):(this.$Message.error(t.message||"导入接口数据失败!"),[2]);case 2:return[4,this.service.confirmImport(this.importResult.id)];case 3:return e=n.sent(),e&&!e.hasError?(this.showImportModal=!1,this.queryTreeData(),[2]):[2]}}))}))},e.prototype.onImportCancel=function(){return h(this,void 0,void 0,(function(){var t;return f(this,(function(e){switch(e.label){case 0:return[4,this.service.cancelImport(this.importResult.id)];case 1:return t=e.sent(),t&&!t.hasError?(this.$message.success("取消成功"),this.showImportModal=!1,[2]):(this.$Message.error(t.message||"取消异常"),[2])}}))}))},e.prototype.onSuccess=function(t,e){if(t&&!t.hasError)return t.result?(this.showImportModal=!0,void(this.importResult=t.result)):(this.$Message.success("导入成功"),void this.queryTreeData());this.$Message.error(t.message||"导入出错,请稍后再试")},e.prototype.onBeforeUpload=function(t){return-1!==t.name.indexOf(" ")?(this.$Message.warning("文件名不能包含空格"),!1):-1===t.name.indexOf("%")||(this.$Message.warning("文件名不能包含符号%"),!1)},e.prototype.onFormatError=function(t){this.$Message.warning("文件".concat(t.name,"格式错误"))},e.prototype.onModelExport=function(t){return h(this,void 0,void 0,(function(){var e,n;return f(this,(function(i){switch(i.label){case 0:return 0===this.data.length?[2]:(e=Object.create(null),e={categoryId:t||null},[4,this.service.isCanExportModel(e)]);case 1:return n=i.sent(),!n||n.hasError?[3,3]:[4,this.service.exportModel(e)];case 2:return i.sent(),[3,4];case 3:n&&n.hasError&&this.$message.error(n.message),i.label=4;case 4:return[2]}}))}))},e.prototype.renderContent=function(t,e){var n=this,i=(e.root,e.node,e.data);return this.$set(i,"selected",this.selectItem.id===i.id),this.$set(i,"expand",this.expandNodeSet.has(i.id)),t(et,{props:{data:i},on:{"on-click":function(t,e){n.handleNodeOprate(t,e)},"on-select":function(t){n.onSelect(t)},"on-import-success":function(t,e){n.onSuccess(t,e)},"on-expand":function(t){n.onToggleExpand(t)}}})},e.prototype.handleNodeOprate=function(t,e){switch(t){case"add":this.onAddChildNode(e);break;case"edit":this.onEditNode(e);break;case"delete":this.onDeleteNode(e);break;case"export":this.onModelExport(e.id);break}},e.prototype.onSelect=function(t,e){void 0===e&&(e=!0),this.selectItem=t,this.$emit("on-select",this.selectItem,e)},e.prototype.initSelectItemChange=function(){this.selectItem=this.initSelectItem,this.selectItem.id&&this.onSelect(this.selectItem)},e.prototype.watchTaskID=function(t){if(t){var e=V.treeNodeFatherArray(this.data,t);if(e.length>0)for(var n=0;n<e.length;n++)n===e.length-1?this.onSelect(e[n],!1):(e[n].expand=!0,this.onToggleExpand(e[n]));this.$nextTick((function(){var t=document.getElementsByClassName("ivu-tree-title-selected");t.length&&setTimeout((function(){t[0].scrollIntoView({behavior:"smooth",block:"center"})}),200)}))}},e.prototype.onAddTreeNode=function(){this.tempNode={name:"",type:this.type},this.showAddTreeNodeModal=!0},e.prototype.onAddChildNode=function(t){this.tempNode={parentId:t.id,name:"",type:this.type},this.showAddTreeNodeModal=!0},e.prototype.onEditNode=function(t){this.tempNode=u({},t),this.showAddTreeNodeModal=!0},e.prototype.onDeleteNode=function(t){return h(this,void 0,void 0,(function(){var e,n=this;return f(this,(function(i){switch(i.label){case 0:return t.children&&t.children.length?[2,this.$message.warning("无法删除非空文件夹!")]:[4,this.getChildren(t)];case 1:return e=i.sent(),e?[2,this.$message.warning("无法删除非空文件夹!")]:(this.$Modal.confirm({title:"确定要删除【".concat(t.name,"】吗?"),onOk:function(){return h(n,void 0,void 0,(function(){return f(this,(function(e){switch(e.label){case 0:return[4,this.service.deleteTreeNodeById(t.id)];case 1:return e.sent(),this.queryTreeData(),[2]}}))}))}}),[2])}}))}))},e.prototype.getChildren=function(t){return h(this,void 0,void 0,(function(){var e,n;return f(this,(function(i){switch(i.label){case 0:return e={condition:{categoryId:t.id}},[4,this.childService.page(e)];case 1:return n=i.sent(),[2,Promise.resolve(n&&!n.hasError&&n.totalCount>0)]}}))}))},e.prototype.queryTreeData=function(){return h(this,void 0,void 0,(function(){var t;return f(this,(function(e){switch(e.label){case 0:return[4,this.service.getCategoryTree(this.type)];case 1:return t=e.sent(),t&&!t.hasError&&(this.tempData=t.result||[],this.tempData.length>0?(this.tempData.forEach((function(t){t.parentId||(t.parentId="virtual_root_directory")})),this.data=[u(u({},this.tempData[0]),{id:"virtual_root_directory",children:this.tempData,jobs:[],name:"全部",expand:!0,parentId:null,parentName:null})],this.onToggleExpand(this.data[0])):(this.data=[{id:"virtual_root_directory",children:this.tempData,jobs:[],name:"全部",expand:!0,parentId:null,parentName:null}],this.onToggleExpand(this.data[0])),this.$emit("on-tree-data",this.tempData)),!this.initSelectItem.id&&this.data.length&&(this.$set(this.data[0],"selected",!0),this.onSelect(this.data[0])),[2]}}))}))},e.prototype.mounted=function(){this.queryTreeData()},d([O(Y)],e.prototype,"service",void 0),d([Object(y["config"])({default:""})],e.prototype,"taskCategoryID",void 0),d([Object(y["watch"])("initSelectItem",{immediate:!0})],e.prototype,"initSelectItemChange",null),d([Object(y["watch"])("taskCategoryID",{immediate:!1})],e.prototype,"watchTaskID",null),e=d([Object(y["component"])({template:n("46d3"),components:{"u-add-node":Z}})],e),e}(H)),it=nt,rt=n("a93c"),ot=(n("3497"),n("9b65"),'<style>body { font-family: Arial, sans-serif; line-height: 1.6;margin: 20px;color: #333;background-color: #fff;} h1, h2, h3, h4,h5,h6 { font-weight: bold; margin-bottom: 20px; color: #333; border-bottom: 2px solid #ddd; padding-bottom: 10px;} h1 { font-size: 2.5em;} h2 { font-size: 2em; } h3 {font-size: 1.75em;} h4 {font-size: 1.5em;} h5 {font-size: 1.25em;} h6 {font-size: 1em;} p { margin-bottom: 1em;} ul, ol { margin-bottom: 1em; padding-left: 40px;} li {margin-bottom: 0.5em;} a { color: #0366d6; text-decoration: none;} a:hover {text-decoration: underline;} pre, code { background-color: #f0f0f0; padding: 5px; font-family: Consolas, "Courier New", monospace;} pre { padding: 10px; overflow-x: auto;} blockquote { border-left: 4px solid #dfe2e5; padding: 10px 20px; margin: 20px 0; background-color: #f9f9f9; color: #555;} table { width: 100%; border-collapse: collapse; margin-bottom: 20px;} th,td { border: 1px solid #ddd; padding: 8px; text-align: left;} th { background-color: #f3f3f3; font-weight: bold;} tr:nth-child(even) { background-color: #f9f9f9;} img { max-width: 100%; height: auto; display: block; margin: 20px 0;} @media print { body {font-size: 12pt;} table { border: 1px solid black;} th, td {border: 1px solid black; } pre,code { background-color: #f0f0f0;} a { color: black; text-decoration: none;} h1, h2, h3, h4, h5, h6 { color: black; border: none;} }</style>'),at=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.markdownOption={},e.render="",e.toolbars={},e}return p(e,t),Object.defineProperty(e.prototype,"show",{get:function(){return this.value},set:function(t){this.$emit("input",t)},enumerable:!1,configurable:!0}),e.prototype.onSave=function(t,e){var n=document.getElementById("printf");n.contentDocument.write(e),n.contentDocument.close(),n.contentWindow.print()},e.prototype.onChange=function(t,e){this.render=ot+e},e.prototype.onMenuClick=function(t){"pdf"===t?this.onSavePdf():this.onSaveHtml()},e.prototype.onSavePdf=function(){var t=document.getElementById("printf");t.contentDocument.write(this.render),t.contentDocument.close(),t.contentWindow.print()},e.prototype.onSaveHtml=function(){var t="接口文档";try{var e=this.doc.indexOf("#"),n=this.doc.indexOf("\n");t=this.doc.substring(e,n)}catch(o){}var i=document.createElement("a");i.download="".concat(t,".html"),i.style.display="none";var r=new Blob([this.render],{type:"text/html"});i.href=window.URL.createObjectURL(r),document.body.appendChild(i),i.click(),document.body.removeChild(i)},e.prototype.onOk=function(){this.show=!1},d([Object(y["config"])({type:Boolean,default:!1})],e.prototype,"value",void 0),d([Object(y["config"])({type:String})],e.prototype,"doc",void 0),e=d([Object(y["component"])({name:"data-model-doc",template:n("45bb"),components:{"mavon-editor":rt["mavonEditor"]}})],e),e}(y["View"]),st=at,ct=(n("da9a"),function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.split=.2,e.initNode={},e.currentNode=Object.create(null),e.treeData=[],e.showCopyModal=!1,e.copyData={},e.categoryData={},e.list=[],e.selection=[],e.isContainsPublished=!1,e.columns=[{type:"selection",align:"center",width:80*window.pageRatio},{title:"名称",key:"name",align:"left",class:"STRING",ellipsis:!0,tooltip:!0,width:225*window.pageRatio,resizable:!0},{title:"编码",key:"code",align:"left",class:"STRING",ellipsis:!0,tooltip:!0,width:225*window.pageRatio,resizable:!0},{title:"描述",key:"description",align:"left",class:"STRING",ellipsis:!0,tooltip:!0,width:225*window.pageRatio,resizable:!0},{title:"是否需要认证",align:"left",slot:"authFlag",width:160*window.pageRatio,resizable:!0},{title:"发布状态",align:"left",slot:"status",width:180*window.pageRatio,resizable:!0},{title:"接口文档",align:"left",slot:"doc",width:120*window.pageRatio,resizable:!0},{title:"操作",align:"left",slot:"operates",width:180*window.pageRatio}],e.paging={pageIndex:1,pageSize:10,totalCount:0},e.loading=!1,e.doc="",e.docShow=!1,e.formData={name:void 0,code:void 0},e.taskCategoryID="",e}return p(e,t),Object.defineProperty(e.prototype,"form",{get:function(){return this.$refs["searchForm"]},enumerable:!1,configurable:!0}),e.prototype.mounted=function(){var t=this.$route.query.categoryId;t&&(this.initNode={id:t})},e.prototype.onNodeSelect=function(t,e){e&&(this.taskCategoryID="",this.currentNode=t,this.onQuery())},e.prototype.onReset=function(){this.form.resetFields(),this.onQuery()},e.prototype.onQuery=function(){this.$set(this.paging,"pageIndex",1),this.doQuery()},e.prototype.doQuery=function(){var t,e,n,i;return h(this,void 0,void 0,(function(){var r,o;return f(this,(function(a){switch(a.label){case 0:if(!(null===(t=this.currentNode)||void 0===t?void 0:t.id))return[2];a.label=1;case 1:return a.trys.push([1,,3,4]),this.loading=!0,r=Object.create(null),r.condition=u(u({},this.formData),{categoryId:"virtual_root_directory"===(null===(e=this.currentNode)||void 0===e?void 0:e.id)?"":this.currentNode.id}),r.paging=this.paging,[4,this.service.page(r)];case 2:return o=a.sent(),((null===o||void 0===o?void 0:o.result)||[]).forEach((function(t){t._disabled="PUBLISHED"===t.status})),this.list=null!==(n=o&&o.result)&&void 0!==n?n:[],this.paging.totalCount=null!==(i=o&&o.totalCount)&&void 0!==i?i:0,[3,4];case 3:return this.loading=!1,[7];case 4:return[2]}}))}))},e.prototype.onPageIndexChange=function(t){this.$set(this.paging,"pageIndex",t),this.doQuery()},e.prototype.onPageSizeChange=function(t){this.$set(this.paging,"pageIndex",1),this.$set(this.paging,"pageSize",t),this.doQuery()},e.prototype.onDetail=function(t){var e=null!==t&&void 0!==t?t:{},n=e.id,i=e.categoryId;this.onAdd(n,i,!1)},e.prototype.onEdit=function(t){var e=null!==t&&void 0!==t?t:{},n=e.id,i=e.categoryId;this.onAdd(n,i,!0)},e.prototype.onAdd=function(t,e,n){var i;return void 0===n&&(n=!0),h(this,void 0,void 0,(function(){var r;return f(this,(function(o){return"virtual_root_directory"!==(null===(i=this.currentNode)||void 0===i?void 0:i.id)||t?(this.$router.push({replace:!0,name:"combine-add",query:(r={isEdit:n?"1":"0",id:null!==t&&void 0!==t?t:"",categoryId:e||this.currentNode.id},r["_".concat(t?"edit":"add")]=Date.now().toString(),r)}),[2]):[2]}))}))},e.prototype.onDelete=function(t){return h(this,void 0,void 0,(function(){var e,n;return f(this,(function(i){switch(i.label){case 0:return e=t.id,e?[4,this.service.batchDelete([e])]:[2];case 1:return n=i.sent(),n&&!n.hasError&&this.onQuery(),[2]}}))}))},e.prototype.onBatchDelete=function(){var t=this,e=this.selection.map((function(t){return t.id}));e.length&&!this.isContainsPublished&&this.$modal.confirm({title:"将批量删除所选内容,是否继续?",onOk:function(){return h(t,void 0,void 0,(function(){var t;return f(this,(function(n){switch(n.label){case 0:return[4,this.service.batchDelete(e)];case 1:return t=n.sent(),t&&!t.hasError&&(this.onQuery(),this.selection=[]),[2]}}))}))}})},e.prototype.onCopy=function(t){var e=t.$clone();this.copyData={id:e.id,code:e.code,name:e.name,categoryId:e.categoryId},this.categoryData.id=e.categoryId,this.copyData.name+="_copy",this.copyData.code+="_copy",this.showCopyModal=!0},e.prototype.onCopyConfirm=function(){return h(this,void 0,void 0,(function(){var t;return f(this,(function(e){switch(e.label){case 0:return this.copyData.name?this.copyData.code?this.copyData.categoryId?[4,this.service.copyApi(this.copyData)]:[2,this.$message.warning("请选择分组")]:[2,this.$message.warning("请填写接口编码")]:[2,this.$message.warning("请填写接口名称")];case 1:if(t=e.sent(),t&&!t.hasError)this.copyData={},this.categoryData={},this.showCopyModal=!1,this.doQuery();else if(t&&t.hasError&&t.message)return[2,this.$message.error(t.message)];return[2]}}))}))},e.prototype.onCopyCancel=function(){this.copyData={},this.categoryData={},this.showCopyModal=!1},e.prototype.onTreeData=function(t){this.treeData=t.$clone()},e.prototype.selectCategory=function(t){this.categoryData=t,this.copyData.categoryId=t.id},e.prototype.onAuthFlagChange=function(t,e,n){return h(this,void 0,void 0,(function(){var n,i;return f(this,(function(r){switch(r.label){case 0:return n=e.id,n?[4,this.service.changeAuthFlag(n,t?1:0)]:[2];case 1:return i=r.sent(),(null===i||void 0===i?void 0:i.hasError)||(e.authFlag=t?1:0),[2]}}))}))},e.prototype.onStatusChange=function(t,e,n){return h(this,void 0,void 0,(function(){var n,i;return f(this,(function(r){switch(r.label){case 0:return n=e.id,n?[4,this.service.changeStatus(n,t?1:0)]:[2];case 1:return i=r.sent(),(null===i||void 0===i?void 0:i.hasError)||(e.status=t?"PUBLISHED":"NOT_PUBLISHED"),[2]}}))}))},e.prototype.onSelectChange=function(t){this.selection=t,this.isContainsPublished=!!this.selection.find((function(t){return"PUBLISHED"===t.status}))},e.prototype.onOpenDoc=function(t){return h(this,void 0,void 0,(function(){var e;return f(this,(function(n){switch(n.label){case 0:return(null===t||void 0===t?void 0:t.id)?[4,this.service.getDoc(t.id)]:[3,2];case 1:e=n.sent(),(null===e||void 0===e?void 0:e.hasError)||(this.doc=e.result,this.docShow=!0),n.label=2;case 2:return[2]}}))}))},e.prototype.activated=function(){this.currentNode&&this.onQuery()},e.prototype.onRowClick=function(t,e){"virtual_root_directory"===this.currentNode.id&&(this.taskCategoryID=t.categoryId)},d([O(z)],e.prototype,"service",void 0),e=d([Object(y["component"])({name:"ProjectCombineManage",template:n("ccf6"),components:{"u-type-tree":it,"u-data-model-doc":st,"u-tree-selector":J}})],e),e}(y["View"])),lt=ct,pt=(n("2380"),n("ce8f")),ut=n("01a6"),dt=n("8380"),ht=n.n(dt),ft=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.option={showPrintMargin:!1,enableEmmet:!0,enableBasicAutocompletion:!0,enableSnippets:!0,enableLiveAutocompletion:!0,showFoldWidgets:!1,wrap:!0,fontSize:16,fixedWidthGutter:!0},e}return p(e,t),e.prototype.editorInit=function(t){n("1cdf"),n("9842"),n("5217"),n("8214"),n("64d5");var e=this,i=n("92ad"),r=i.acequire("ace/ext/language_tools");r.addCompleter({getCompletions:function(t,n,i,r,o){e.setCompletions(t,n,i,r,o)}}),this.$emit("inited",t)},e.prototype.setCompletions=function(t,e,n,i,r){return 0===i.length?r(null,[]):r(null,this.diyKeywordList)},d([Object(ut["PropSync"])("model",{default:""})],e.prototype,"code",void 0),d([Object(pt["config"])({default:"groovy"})],e.prototype,"lang",void 0),d([Object(pt["config"])({type:Array,default:function(){return[]}})],e.prototype,"diyKeywordList",void 0),e=d([Object(pt["component"])({template:n("9915"),components:{editor:ht.a}})],e),e}(pt["Component"]),mt=ft,yt=(n("ca1f"),function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.editor={},e}return p(e,t),e.prototype.onEditorInited=function(t){this.editor=t,this.editor.setReadOnly(this.readOnly)},e.prototype.onReadOnlyChange=function(){this.editor.setReadOnly(this.readOnly)},d([Object(y["propSync"])("data")],e.prototype,"script",void 0),d([Object(y["config"])({type:Boolean,default:!1})],e.prototype,"readOnly",void 0),d([Object(y["watch"])("readOnly")],e.prototype,"onReadOnlyChange",null),e=d([Object(y["component"])({template:n("e718"),components:{"u-editor":mt}})],e),e}(y["Component"])),vt=yt,gt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return p(e,t),e.prototype.dataModel=function(t){return this._post("/unity/data-model/page",t)},e.prototype.getMavonDoc=function(t){return this._get("/unity/data-model/".concat(t,"/render"))},e.prototype.getDataModelTree=function(){return this._get("/unity/data-model/tree")},d([T("post",{title:"分页查询数据模型"})],e.prototype,"dataModel",null),d([T("get",{title:"获取文档"})],e.prototype,"getMavonDoc",null),d([T("query",{title:"查询分类树"})],e.prototype,"getDataModelTree",null),e}(F),bt=gt,wt=(n("e6c9"),function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.condition={code:"",name:""},e.columns=[{type:"selection",title:"全选",align:"center",width:60},{title:"名称",align:"left",key:"name",tooltip:!0},{title:"编码",align:"left",key:"code",tooltip:!0},{title:"数据源",align:"left",key:"sourceName",tooltip:!0},{title:"是否开启缓存",align:"left",slot:"enableCache",width:135},{title:"过期时间(s)",align:"left",key:"expireSeconds",width:135},{title:"描述",align:"left",key:"description",tooltip:!0},{title:"接口文档",align:"left",slot:"doc",width:110}],e.doc="",e.docShow=!1,e}return p(e,t),e.prototype.mounted=function(){},e.prototype.init=function(){},e.prototype.onSearch=function(){this.$emit("on-search",this.condition)},e.prototype.onEmpty=function(){this.condition.code="",this.condition.name="",this.$emit("on-search",this.condition)},e.prototype.onSelected=function(t){this.$emit("on-selection-change",t)},e.prototype.onPageIndexChange=function(t){this.$emit("on-page-index-change",t)},e.prototype.onPageSizeChange=function(t){this.$emit("on-page-size-change",t)},e.prototype.onOpenDoc=function(t){return h(this,void 0,void 0,(function(){var e;return f(this,(function(n){switch(n.label){case 0:return(null===t||void 0===t?void 0:t.typeId)?[4,this.service.getMavonDoc(t.typeId)]:[3,2];case 1:e=n.sent(),(null===e||void 0===e?void 0:e.hasError)||(this.doc=e.result,this.docShow=!0),n.label=2;case 2:return[2]}}))}))},e.prototype.onRowClick=function(t,e){this.$emit("on-row-click",t.categoryId)},d([O(bt)],e.prototype,"service",void 0),d([Object(y["config"])({default:function(){return[]}})],e.prototype,"data",void 0),d([Object(ut["PropSync"])("paging",{default:function(){return null}})],e.prototype,"page",void 0),e=d([Object(y["component"])({template:n("82af"),components:{"u-data-model-doc":st}})],e),e}(y["View"])),xt=wt,St=(n("a121"),function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.splitHorizontal=.25,e.splitVertical=.6,e.isLoading=!1,e.taskCategoryID="",e.treeData=[],e.tempData=[],e.currentNode={},e.initNode={},e.condition={categoryId:"",code:"",name:""},e.paging={totalCount:0,pageIndex:1,pageSize:10},e.tableData=[],e.collapse=!1,e.checkedData=[],e.lastCheckedData=[],e.columns=[{title:"编码",align:"left",key:"code",class:"STRING",ellipsis:!0,tooltip:!0},{title:"名称",align:"left",key:"name",class:"STRING",ellipsis:!0,tooltip:!0},{title:"描述",align:"left",key:"description",class:"STRING",ellipsis:!0,tooltip:!0},{title:"操作",key:"operates",slot:"operates",align:"left",width:80}],e}return p(e,t),Object.defineProperty(e.prototype,"checkedLength",{get:function(){return this.checkedData.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"show",{get:function(){return this.value},set:function(t){this.$emit("input",t)},enumerable:!1,configurable:!0}),e.prototype.onShowChange=function(t){if(!this.show)return this.tableData=[],void(this.checkedData=[]);var e=this.data.$clone();this.checkedData=e.map((function(t){return u(u({},t),{code:t.typeCode,description:t.typeDescription})})),this.init()},e.prototype.init=function(){this.getTreeData()},e.prototype.getTreeData=function(){return h(this,void 0,void 0,(function(){var t;return f(this,(function(e){switch(e.label){case 0:return this.isLoading=!0,[4,this.service.getDataModelTree()];case 1:return t=e.sent(),this.isLoading=!1,t&&!t.hasError&&(this.tempData=V.handlerTreeData(t.result||[],"name"),this.tempData.length>0?(this.tempData.forEach((function(t){t.parentId||(t.parentId="virtual_root_directory")})),this.treeData=[u(u({},this.tempData[0]),{id:"virtual_root_directory",children:this.tempData,jobs:[],name:"全部",title:"全部",expand:!0,parentId:null,parentName:null})]):this.treeData=[{id:"virtual_root_directory",children:this.tempData,jobs:[],name:"全部",title:"全部",expand:!0,parentId:null,parentName:null}],this.treeData.length&&(this.initNode=this.treeData[0],this.onSelect(this.treeData[0]))),[2]}}))}))},e.prototype.onSelect=function(t,e){void 0===e&&(e=!0),e&&(this.taskCategoryID="",this.currentNode=t,this.condition.categoryId="virtual_root_directory"===this.currentNode.id?"":this.currentNode.id,this.getTableData())},e.prototype.onSearch=function(t){this.condition=t,this.condition.categoryId="virtual_root_directory"===this.currentNode.id?"":this.currentNode.id,this.paging.pageIndex=1,this.getTableData()},e.prototype.getTableData=function(){return h(this,void 0,void 0,(function(){var t,e,n=this;return f(this,(function(i){switch(i.label){case 0:return t=Object.create(null),t.condition=this.condition,t.paging=this.paging,[4,this.service.dataModel(t)];case 1:return e=i.sent(),e&&!e.hasError&&(this.tableData=(e.result||[]).map((function(t){return u(u({},t),{id:void 0,type:"MODEL",typeId:t.id,_checked:n.checkedData.findIndex((function(e){return e.typeId===t.id}))>-1})})),this.lastCheckedData=this.checkedData.filter((function(t){return-1===n.tableData.findIndex((function(e){return e.typeId===t.typeId}))})),this.paging.totalCount=e.totalCount),[2]}}))}))},e.prototype.onPageIndexChange=function(t){this.paging.pageIndex=t,this.getTableData()},e.prototype.onPageSizeChange=function(t){this.paging.pageSize=t,this.getTableData()},e.prototype.onSelectionChange=function(t){t.forEach((function(t){return t._checked=!0})),this.tableData.forEach((function(e){for(var n=0,i=t;n<i.length;n++){var r=i[n];if(e.typeId===r.typeId)return e._checked=!0}return e._checked=!1})),this.checkedData=m(m([],this.lastCheckedData,!0),t,!0)},e.prototype.onBatchDelete=function(){this.checkedData=[],this.lastCheckedData=[],this.tableData=this.tableData.map((function(t){return u(u({},t),{_checked:!1})}))},e.prototype.onDelete=function(t){this.checkedData=this.checkedData.filter((function(e){return e.typeId!==t.typeId})),this.lastCheckedData=this.lastCheckedData.filter((function(e){return e.typeId!==t.typeId})),this.tableData.forEach((function(e){e.typeId===t.typeId&&(e._checked=!1)}))},e.prototype.onClickCollapse=function(){this.collapse=!this.collapse,this.splitVertical=this.collapse?"".concat(.7*window.innerHeight-40*window.pageRatio-1,"px"):.6},e.prototype.onCancel=function(){this.show=!1},e.prototype.onSave=function(){var t=this,e=this.checkedData.filter((function(e){return-1===t.data.findIndex((function(t){return t.typeId===e.typeId}))})),n=this.data.filter((function(e){return-1===t.checkedData.findIndex((function(t){return t.typeId===e.typeId}))}));this.$emit("save","MODEL",e,n)},e.prototype.onRowClick=function(t){"virtual_root_directory"===this.currentNode.id&&(this.taskCategoryID=t)},d([O(bt)],e.prototype,"service",void 0),d([Object(y["config"])({type:Boolean,default:!1})],e.prototype,"value",void 0),d([Object(y["config"])({type:Array,default:[]})],e.prototype,"data",void 0),d([Object(y["watch"])("show")],e.prototype,"onShowChange",null),e=d([Object(y["component"])({template:n("4935"),components:{"u-tree":H,"u-data-model-list":xt}})],e),e}(y["View"])),It=St,kt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return p(e,t),e.prototype.getCategoryTree=function(t){return this._get("/unity/api/category/project/tree?type=".concat(t))},e.prototype.apiProject=function(t){return this._post("/unity/api/info/page",t)},e.prototype.getApiDetail=function(t){return this._get("/unity/api-market/".concat(t,"/detail"))},d([T("query",{title:"查询分类树"})],e.prototype,"getCategoryTree",null),d([T("post",{title:"分页查询数据模型"})],e.prototype,"apiProject",null),d([T("query",{title:"查询详情"})],e.prototype,"getApiDetail",null),e}(F),Ct=kt,jt=(n("7359"),n("2364")),Dt=n.n(jt),Ot=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.value=[],e.paramColumns=[{slot:"selection",width:60,align:"center",title:" "},{title:"参数名",key:"name",align:"left"},{title:"参数值",key:"valueContent",align:"left"},{title:"备注",key:"text",align:"left"}],e.queryDataList=[],e.typeMap={Form:"FormData",X_www_form_urlencoded:"FormUrlEncoded"},e}return p(e,t),e.prototype.getExpand=function(t){return this.value.includes(t)},e.prototype.init=function(){var t,e;(null===(e=null===(t=this.model)||void 0===t?void 0:t.info)||void 0===e?void 0:e.id)&&(this.queryDataList=this.model.queryParams)},Object.defineProperty(e.prototype,"bodyDataList",{get:function(){var t=this.typeMap[this.bodyType];return this.model.formParams.filter((function(e){return e.type===t}))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bodyType",{get:function(){var t,e;return(null===(e=null===(t=this.model)||void 0===t?void 0:t.info)||void 0===e?void 0:e.requestBodyType)||"Form"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isFormData",{get:function(){return"Form"===this.bodyType||"X_www_form_urlencoded"===this.bodyType},enumerable:!1,configurable:!0}),d([Object(y["config"])({default:function(){return{}}})],e.prototype,"model",void 0),d([O(z)],e.prototype,"service",void 0),d([Object(y["watch"])("model",{immediate:!0})],e.prototype,"init",null),e=d([Object(y["component"])({template:n("3a71"),components:{"json-viewer":Dt.a}})],e),e}(y["Component"]),Tt=Ot,Et=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.columns=[{title:"参数名称",key:"name"},{title:"参数类型",slot:"type"},{title:"是否必须",slot:"required"},{title:"参数说明",key:"description"}],e}return p(e,t),Object.defineProperty(e.prototype,"dataList",{get:function(){return this.model.items},enumerable:!1,configurable:!0}),d([Object(y["config"])({default:function(){return{}}})],e.prototype,"model",void 0),e=d([Object(y["component"])({template:n("37f5"),components:{}})],e),e}(y["Component"]),Pt=Et,Mt=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.columns=[{title:"参数名称",key:"name"},{title:"参数类型",slot:"type"},{title:"是否必须",slot:"required"},{title:"默认值",key:"defaultValue"},{title:"参数说明",key:"description"}],e}return p(e,t),Object.defineProperty(e.prototype,"dataList",{get:function(){return this.model.requestParams},enumerable:!1,configurable:!0}),d([Object(y["config"])({default:function(){return{}}})],e.prototype,"model",void 0),e=d([Object(y["component"])({template:n("a0f2"),components:{}})],e),e}(y["Component"]),Lt=Mt,At=(n("45e3"),function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return p(e,t),Object.defineProperty(e.prototype,"params",{get:function(){var t,e;return null===(e=null===(t=this.model)||void 0===t?void 0:t.type)||void 0===e?void 0:e.toLowerCase()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"action",{get:function(){return this.model.action||{}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"detail",{get:function(){return this.model.detail||{}},enumerable:!1,configurable:!0}),e.prototype.onClose=function(){this.show=!1},d([Object(ut["PropSync"])("visiable",{default:!1})],e.prototype,"show",void 0),d([Object(y["config"])({default:function(){return{}}})],e.prototype,"model",void 0),e=d([Object(y["component"])({template:n("ab68"),components:{api:Tt,catalog:Pt,ddcat:Lt}})],e),e}(y["Component"])),Nt=At,qt=(n("bcb8"),function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.condition={name:"",url:""},e.columns=[{type:"selection",title:"全选",align:"center",width:60},{title:"名称",align:"left",key:"name",class:"STRING",ellipsis:!0,tooltip:!0,width:300},{title:"地址",align:"left",key:"url",class:"STRING",ellipsis:!0,tooltip:!0},{title:"查看详情",align:"left",slot:"detail",width:105}],e.detail="",e.detailShow=!1,e}return p(e,t),e.prototype.mounted=function(){},e.prototype.init=function(){},e.prototype.onSearch=function(){this.$emit("on-search",this.condition)},e.prototype.onEmpty=function(){this.condition.name="",this.condition.url="",this.$emit("on-search",this.condition)},e.prototype.onSelected=function(t){this.$emit("on-selection-change",t)},e.prototype.onPageIndexChange=function(t){this.$emit("on-page-index-change",t)},e.prototype.onPageSizeChange=function(t){this.$emit("on-page-size-change",t)},e.prototype.onDetail=function(t){return h(this,void 0,void 0,(function(){var e;return f(this,(function(n){switch(n.label){case 0:return(null===t||void 0===t?void 0:t.typeId)?[4,this.service.getApiDetail(t.typeId)]:[3,2];case 1:e=n.sent(),(null===e||void 0===e?void 0:e.hasError)||(this.detail=e.result||{},this.detailShow=!0),n.label=2;case 2:return[2]}}))}))},e.prototype.onRowClick=function(t,e){this.$emit("on-row-click",t.categoryId)},d([O(Ct)],e.prototype,"service",void 0),d([Object(y["config"])({default:function(){return[]}})],e.prototype,"data",void 0),d([Object(ut["PropSync"])("paging",{default:function(){return null}})],e.prototype,"page",void 0),e=d([Object(y["component"])({template:n("981a"),components:{"u-api-project-detail":Nt}})],e),e}(y["View"])),$t=qt,Rt=(n("eb57"),function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.splitHorizontal=.25,e.splitVertical=.6,e.isLoading=!1,e.taskCategoryID="",e.treeData=[],e.tempData=[],e.currentNode={},e.initNode={},e.condition={categoryId:"",code:"",name:""},e.paging={totalCount:0,pageIndex:1,pageSize:10},e.tableData=[],e.collapse=!1,e.checkedData=[],e.lastCheckedData=[],e.columns=[{title:"名称",align:"left",key:"name",class:"STRING",ellipsis:!0,tooltip:!0,width:300},{title:"地址",align:"left",key:"url",class:"STRING",ellipsis:!0,tooltip:!0},{title:"操作",key:"operates",slot:"operates",align:"left",width:80}],e}return p(e,t),Object.defineProperty(e.prototype,"checkedLength",{get:function(){return this.checkedData.length},enumerable:!1,configurable:!0}),e.prototype.onDataChange=function(t){this.checkedData=t},Object.defineProperty(e.prototype,"show",{get:function(){return this.value},set:function(t){this.$emit("input",t)},enumerable:!1,configurable:!0}),e.prototype.onShowChange=function(t){if(!this.show)return this.tableData=[],void(this.checkedData=[]);var e=this.data.$clone();this.checkedData=e.map((function(t){return u(u({},t),{url:t.typeCode})})),this.init()},e.prototype.init=function(){this.getTreeData()},e.prototype.getTreeData=function(){return h(this,void 0,void 0,(function(){var t;return f(this,(function(e){switch(e.label){case 0:return this.isLoading=!0,[4,this.service.getCategoryTree("api")];case 1:return t=e.sent(),this.isLoading=!1,t&&!t.hasError&&(this.tempData=V.handlerTreeData(t.result||[],"name"),this.tempData.length>0?(this.tempData.forEach((function(t){t.parentId||(t.parentId="virtual_root_directory")})),this.treeData=[u(u({},this.tempData[0]),{id:"virtual_root_directory",children:this.tempData,jobs:[],name:"全部",title:"全部",expand:!0,parentId:null,parentName:null})]):this.treeData=[{id:"virtual_root_directory",children:this.tempData,jobs:[],name:"全部",title:"全部",expand:!0,parentId:null,parentName:null}],this.treeData.length&&(this.initNode=this.treeData[0],this.onSelect(this.treeData[0]))),[2]}}))}))},e.prototype.onSelect=function(t,e){void 0===e&&(e=!0),e&&(this.taskCategoryID="",this.currentNode=t,this.condition.categoryId="virtual_root_directory"===this.currentNode.id?"":this.currentNode.id,this.getTableData())},e.prototype.onSearch=function(t){this.condition=t,this.condition.categoryId="virtual_root_directory"===this.currentNode.id?"":this.currentNode.id,this.paging.pageIndex=1,this.getTableData()},e.prototype.getTableData=function(){return h(this,void 0,void 0,(function(){var t,e,n=this;return f(this,(function(i){switch(i.label){case 0:return t=Object.create(null),t.condition=this.condition,t.paging=this.paging,[4,this.service.apiProject(t)];case 1:return e=i.sent(),e&&!e.hasError&&(this.tableData=(e.result||[]).map((function(t){return u(u({},t),{id:void 0,type:"API",typeId:t.id,_checked:n.checkedData.findIndex((function(e){return e.typeId===t.id}))>-1})})),this.lastCheckedData=this.checkedData.filter((function(t){return-1===n.tableData.findIndex((function(e){return e.typeId===t.typeId}))})),this.paging.totalCount=e.totalCount),[2]}}))}))},e.prototype.onPageIndexChange=function(t){this.paging.pageIndex=t,this.getTableData()},e.prototype.onPageSizeChange=function(t){this.paging.pageSize=t,this.getTableData()},e.prototype.onSelectionChange=function(t){t.forEach((function(t){return t._checked=!0})),this.tableData.forEach((function(e){for(var n=0,i=t;n<i.length;n++){var r=i[n];if(e.typeId===r.typeId)return e._checked=!0}return e._checked=!1})),this.checkedData=m(m([],this.lastCheckedData,!0),t,!0)},e.prototype.onBatchDelete=function(){this.checkedData=[],this.lastCheckedData=[],this.tableData=this.tableData.map((function(t){return u(u({},t),{_checked:!1})}))},e.prototype.onDelete=function(t){this.checkedData=this.checkedData.filter((function(e){return e.typeId!==t.typeId})),this.lastCheckedData=this.lastCheckedData.filter((function(e){return e.typeId!==t.typeId})),this.tableData.forEach((function(e){e.typeId===t.typeId&&(e._checked=!1)}))},e.prototype.onClickCollapse=function(){this.collapse=!this.collapse,this.splitVertical=this.collapse?"".concat(.7*window.innerHeight-40*window.pageRatio-1,"px"):.6},e.prototype.onCancel=function(){this.show=!1},e.prototype.onSave=function(){var t=this,e=this.checkedData.filter((function(e){return-1===t.data.findIndex((function(t){return t.typeId===e.typeId}))})),n=this.data.filter((function(e){return-1===t.checkedData.findIndex((function(t){return t.typeId===e.typeId}))}));this.$emit("save","API",e,n)},e.prototype.onRowClick=function(t){"virtual_root_directory"===this.currentNode.id&&(this.taskCategoryID=t)},d([O(Ct)],e.prototype,"service",void 0),d([Object(y["config"])({type:Boolean,default:!1})],e.prototype,"value",void 0),d([Object(y["config"])({type:Array,default:[]})],e.prototype,"data",void 0),d([Object(y["watch"])("data")],e.prototype,"onDataChange",null),d([Object(y["watch"])("show")],e.prototype,"onShowChange",null),e=d([Object(y["component"])({template:n("0941"),components:{"u-tree":H,"u-api-project-list":$t}})],e),e}(y["View"])),_t=Rt,Ft=(n("9e10"),function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.columns=[{type:"selection",align:"center",width:60},{title:"参数名",align:"left",slot:"name",class:"STRING",ellipsis:!0,tooltip:!0},{title:"类型",align:"left",slot:"type",width:130,class:"STRING",ellipsis:!0,tooltip:!0},{title:"是否必传",align:"left",slot:"required",width:120},{title:"默认值",align:"left",slot:"defaultValue",class:"STRING",ellipsis:!0,tooltip:!0},{title:"描述",align:"left",slot:"description",class:"STRING",ellipsis:!0,tooltip:!0},{title:"操作",align:"left",slot:"actions"}],e.typeList=[],e.selections=[],e.booleanObj={false:0,true:1},e}return p(e,t),e.prototype.mounted=function(){this.getTypeList()},e.prototype.onEdit=function(t){this.$set(t,"isEdit",!0)},e.prototype.onCancel=function(t){this.data.splice(t,1)},e.prototype.onDelete=function(t,e){this.data.splice(e,1)},e.prototype.onBatchDelete=function(){var t=this;this.selections.length&&this.$modal.confirm({title:"将批量删除所选内容,是否继续?",onOk:function(){t.selections.forEach((function(e){var n=t.data.findIndex((function(t){return t.id===e.id}));n>-1&&t.data.splice(n,1)})),t.selections=[]}})},e.prototype.onAdd=function(){this.data.push({isEdit:!0,id:Math.random().toString(36).slice(-8).toString(),required:!1,type:"STRING"})},e.prototype.onConfirm=function(t,e){""===t.name&&this.$message.warning("请输入参数名"),""===t.type&&this.$message.warning("请选择类型"),""!==t.name&&""!==t.type&&(t.isEdit=!1,this.data.splice(e,1,t))},e.prototype.getTypeList=function(){return h(this,void 0,void 0,(function(){var t;return f(this,(function(e){switch(e.label){case 0:return[4,this.service.getItemListByType("param-type")];case 1:return t=e.sent(),this.typeList=t.result||[],[2]}}))}))},e.prototype.getTypeText=function(t){return(this.typeList.find((function(e){return e.name===t}))||{text:""}).text},e.prototype.onChangeRequired=function(t,e){e.required=!!t},e.prototype.onSelectionChange=function(t){this.selections=t},d([Object(y["config"])({default:function(){return[]}})],e.prototype,"data",void 0),d([Object(y["config"])({default:!0})],e.prototype,"isEdit",void 0),d([O(z)],e.prototype,"service",void 0),e=d([Object(y["component"])({template:n("d8b4")})],e),e}(y["View"])),Bt=Ft,zt=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.columns=[{type:"selection",align:"center",width:60},{title:"参数名",align:"left",slot:"name",class:"STRING",ellipsis:!0,tooltip:!0},{title:"类型",align:"left",slot:"type",class:"STRING",ellipsis:!0,tooltip:!0},{title:"操作",align:"left",slot:"actions"}],e}return p(e,t),e}(Bt),Vt=zt,Ut=(n("cfde"),function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.context="",e.error=!1,e.result="",e.output="",e}return p(e,t),e.prototype.onShowChange=function(){this.show||(this.context="",this.error=!1,this.result="",this.output=""),this.context=this.defalutContext},e.prototype.onDataChange=function(){var t,e,n,i;(null===(t=this.data)||void 0===t?void 0:t.error)?(this.error=!0,this.result=this.getJsonString(null===(e=this.data)||void 0===e?void 0:e.error)):this.result=this.getJsonString(null===(n=this.data)||void 0===n?void 0:n.result),this.output=this.getJsonString(null===(i=this.data)||void 0===i?void 0:i.output)},e.prototype.getJsonString=function(t){var e="";try{e="object"===typeof t?JSON.stringify(t,null,4):t.toString()}catch(n){}return e},Object.defineProperty(e.prototype,"defalutContext",{get:function(){var t={};return this.params.forEach((function(e){t[e.name]=""})),this.getJsonString(t)},enumerable:!1,configurable:!0}),e.prototype.onProcess=function(){try{var t=JSON.parse(this.context);this.$emit("on-run",t)}catch(e){this.$message.error("请输入正确的 Json 脚本")}},e.prototype.onReset=function(){this.context=this.defalutContext},e.prototype.onOk=function(){this.show=!1},e.prototype.onCancel=function(){this.show=!1},d([Object(y["config"])({default:function(){return[]}})],e.prototype,"params",void 0),d([Object(y["config"])({default:{}})],e.prototype,"data",void 0),d([Object(ut["PropSync"])("visible",{default:!1})],e.prototype,"show",void 0),d([Object(y["watch"])("show")],e.prototype,"onShowChange",null),d([Object(y["watch"])("data")],e.prototype,"onDataChange",null),e=d([Object(y["component"])({template:n("086a"),components:{"u-base-editor":vt}})],e),e}(y["View"])),Ht=Ut,Gt=(n("2e28"),function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.model={authFlag:1,type:"SCRIPT",status:"NOT_PUBLISHED",relations:[],reqParams:[],respParams:[]},e.title="合并模型",e.id="",e.categoryId="",e.saveing=!1,e.isEdit=!1,e.isAdd=!1,e.rules={name:[{required:!0,message:"请输入名称",trigger:"blur"}],code:[{required:!0,message:"请输入编码",trigger:"blur"}]},e.relationColumns=[{title:"类型",align:"left",key:"type",slot:"type",width:280},{title:"名称",align:"left",key:"name",class:"STRING",ellipsis:!0,tooltip:!0},{title:"编码或地址",align:"left",key:"typeCode",class:"STRING",ellipsis:!0,tooltip:!0},{title:"操作",key:"operates",slot:"operates",align:"left",width:100}],e.testShow=!1,e.testResult={},e.dataModelShow=!1,e.apiProjectShow=!1,e.dataModelDoc="",e.dataModelDocShow=!1,e.apiProjectDetail="",e.apiProjectDetailShow=!1,e.doc="",e.docShow=!1,e}return p(e,t),Object.defineProperty(e.prototype,"dataModelRelations",{get:function(){var t,e;return null!==(e=null===(t=this.model.relations)||void 0===t?void 0:t.filter((function(t){return"MODEL"===t.type})))&&void 0!==e?e:[]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"apiProjectRelations",{get:function(){var t,e;return null!==(e=null===(t=this.model.relations)||void 0===t?void 0:t.filter((function(t){return"API"===t.type})))&&void 0!==e?e:[]},enumerable:!1,configurable:!0}),e.prototype.onBack=function(){this.$router.push({name:"combine"}),this.$store.commit("tag/closeCurrent",this.$route)},e.prototype.mounted=function(){this.init()},e.prototype.activated=function(){this.init()},e.prototype.init=function(){var t=this.$route.query||{},e=t.isEdit,n=t.id,i=void 0===n?"":n,r=t.categoryId,o=void 0===r?"":r;this.isEdit=1===Number(e),this.isAdd=this.isEdit&&!i,this.categoryId=o,this.title=this.isEdit?this.isAdd?"新增合并模型":"编辑合并模型":"合并模型详情",i!==this.id&&(this.id=i,this.getById())},e.prototype.getById=function(){return h(this,void 0,void 0,(function(){var t;return f(this,(function(e){switch(e.label){case 0:return this.id?[4,this.service.getById(this.id)]:[3,2];case 1:t=e.sent(),(null===t||void 0===t?void 0:t.hasError)||(this.model=t.result,this.model.authFlag||(this.model.authFlag=0)),e.label=2;case 2:return[2,Promise.resolve()]}}))}))},e.prototype.onValidate=function(){var t=this;return new Promise((function(e,n){for(var i,r,o,a,s=new Set,c=0;c<(null===(i=t.model.reqParams)||void 0===i?void 0:i.length);c++){var l=t.model.reqParams[c];if(!(null===(r=l.name)||void 0===r?void 0:r.length))return t.$message.error("请求参数名称不能为空!"),n();if(s.has(l.name))return t.$message.error("请求参数有重名!"),n();s.add(l.name)}if(!(null===(o=t.model.relations)||void 0===o?void 0:o.length))return t.$message.error("合并列表不能为空!"),n();if(!(null===(a=t.model.content)||void 0===a?void 0:a.length))return t.$message.error("执行脚本不能为空!"),n();var p=t.$refs.form;null===p||void 0===p||p.validate((function(t){return e(t)}))}))},e.prototype.onSave=function(t){var e=this;return new Promise((function(n,i){return h(e,void 0,void 0,(function(){var e;return f(this,(function(r){switch(r.label){case 0:if(this.saveing)return[2,i()];this.saveing=!0,r.label=1;case 1:return r.trys.push([1,7,8,9]),[4,this.onValidate()];case 2:return r.sent(),this.$set(this.model,"categoryId",this.categoryId),[4,this.service.save(this.model)];case 3:return e=r.sent(),(null===e||void 0===e?void 0:e.hasError)?[3,6]:e.result?(this.id=e.result,[4,this.getById()]):[3,5];case 4:r.sent(),r.label=5;case 5:t&&(this.$message.success("保存数据成功!"),this.onBack()),r.label=6;case 6:return[2,n(!0)];case 7:return r.sent(),[3,9];case 8:return this.saveing=!1,[7];case 9:return[2]}}))}))}))},e.prototype.onAddDataModel=function(){this.dataModelShow=!0},e.prototype.onAddApiProject=function(){this.apiProjectShow=!0},e.prototype.onRelationsSave=function(t,e,n){return h(this,void 0,void 0,(function(){var i,r,o,a,s;return f(this,(function(c){switch(c.label){case 0:return"MODEL"===t?this.dataModelShow=!1:"API"===t&&(this.apiProjectShow=!1),i=n.map((function(t){return t.typeId})),i.length>0&&(this.model.relations=this.model.relations.filter((function(t){return!i.includes(t.typeId)})),this.model.reqParams=this.model.reqParams.filter((function(t){return!i.includes(t.relationTypeId)}))),r=e.map((function(t){return t.typeId})),r.length>0?(o=[],a=[],"MODEL"!==t?[3,2]:(o=e.map((function(e){return u(u({},e),{type:t,typeCode:e.code})})),[4,this.service.dataModelParams(r)])):[3,5];case 1:return s=c.sent(),a=((null===s||void 0===s?void 0:s.result)||[]).map((function(e){return u(u({},e),{relationType:t,relationTypeId:e.modelId})})),[3,4];case 2:return"API"!==t?[3,4]:(o=e.map((function(e){return u(u({},e),{type:t,typeCode:e.url})})),[4,this.service.apiProjectParams(r)]);case 3:s=c.sent(),a=((null===s||void 0===s?void 0:s.result)||[]).map((function(e){return u(u({},e),{relationType:t,relationTypeId:e.apiId,required:!1,type:"STRING"})})),c.label=4;case 4:this.model.relations=m(m([],this.model.relations,!0),o,!0),this.model.reqParams=m(m([],this.model.reqParams,!0),a,!0),c.label=5;case 5:return[2]}}))}))},e.prototype.onRelationDelete=function(t){this.model.relations=this.model.relations.filter((function(e){return e.typeId!==t.typeId})),this.model.reqParams=this.model.reqParams.filter((function(e){return e.relationTypeId!==t.typeId}))},e.prototype.onDetail=function(t){return h(this,void 0,void 0,(function(){var e;return f(this,(function(n){switch(n.label){case 0:return"MODEL"!==(null===t||void 0===t?void 0:t.type)?[3,3]:(null===t||void 0===t?void 0:t.typeId)?[4,this.dataModelService.getMavonDoc(t.typeId)]:[3,2];case 1:e=n.sent(),(null===e||void 0===e?void 0:e.hasError)||(this.dataModelDoc=e.result,this.dataModelDocShow=!0),n.label=2;case 2:return[3,5];case 3:return"API"!==(null===t||void 0===t?void 0:t.type)?[3,5]:(null===t||void 0===t?void 0:t.typeId)?[4,this.apiProjectService.getApiDetail(t.typeId)]:[3,5];case 4:e=n.sent(),(null===e||void 0===e?void 0:e.hasError)||(this.apiProjectDetail=e.result||{},this.apiProjectDetailShow=!0),n.label=5;case 5:return[2]}}))}))},e.prototype.onOpenTest=function(){return h(this,void 0,void 0,(function(){return f(this,(function(t){switch(t.label){case 0:return t.trys.push([0,3,,4]),this.isEdit?[4,this.onSave(!1)]:[3,2];case 1:t.sent(),t.label=2;case 2:return this.testShow=!0,[3,4];case 3:return t.sent(),[3,4];case 4:return[2]}}))}))},e.prototype.onTestRun=function(t){var e,n;return h(this,void 0,void 0,(function(){var i;return f(this,(function(r){switch(r.label){case 0:return[4,this.service.testRun(u(u({},this.model),{context:t}))];case 1:return i=r.sent(),(null===i||void 0===i?void 0:i.hasError)||(this.$message.success("运行成功"),this.testResult=null!==(e=i.result)&&void 0!==e?e:{},this.model.respParams=null!==(n=i.result.respParams)&&void 0!==n?n:[]),[2]}}))}))},e.prototype.onOpenDoc=function(){return h(this,void 0,void 0,(function(){var t;return f(this,(function(e){switch(e.label){case 0:return[4,this.service.geHelpDoc()];case 1:return t=e.sent(),t?(this.doc=t,this.docShow=!0):this.$message.error("获取帮助文档失败"),[2]}}))}))},d([O(z)],e.prototype,"service",void 0),d([O(bt)],e.prototype,"dataModelService",void 0),d([O(Ct)],e.prototype,"apiProjectService",void 0),e=d([Object(y["component"])({name:"ProjectCombineModel",template:n("d8e7"),components:{"u-base-editor":vt,"u-data-model-modal":It,"u-data-model-doc-modal":st,"u-api-project-modal":_t,"u-api-project-detail-modal":Nt,"u-request-parameter-list":Bt,"u-response-parameter-list":Vt,"u-test-run-modal":Ht,"u-data-model-doc":st}})],e),e}(y["View"])),Kt=Gt,Qt=(n("1aea"),function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return p(e,t),d([Object(ut["PropSync"])("visiable",{default:!1})],e.prototype,"value",void 0),d([Object(y["config"])({default:function(){return new Object}})],e.prototype,"data",void 0),e=d([Object(y["component"])({template:n("6255")})],e),e}(y["Component"])),Jt=Qt,Wt=(n("e9fa"),function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.value=!1,e}return p(e,t),e.prototype.onOpenConfirm=function(){this.value=!0},e.prototype.onCancel=function(){this.value=!1,this.$emit("on-cancel")},e.prototype.onOk=function(){this.value=!1,this.$emit("on-ok")},d([Object(y["config"])({default:"系统提示"})],e.prototype,"title",void 0),d([Object(y["config"])({default:""})],e.prototype,"message",void 0),e=d([Object(y["component"])({template:n("bc13")})],e),e}(y["Component"])),Yt=Wt,Xt=(n("270f"),function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return p(e,t),e.prototype.onDelete=function(){this.$emit("on-delete",this.data)},e.prototype.onDetail=function(){this.$emit("on-detail",this.data)},e.prototype.onEdit=function(){this.$emit("on-edit",this.data)},e.prototype.onClick=function(t){this.$emit("on-"+t,this.data)},d([Object(y["config"])({default:function(){return new Object}})],e.prototype,"data",void 0),e=d([Object(y["component"])({template:n("ef27"),components:{"u-confirm":Yt}})],e),e}(y["Component"])),Zt=Xt,te=(n("17fe"),function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return p(e,t),e.prototype.getProjectList=function(t){return void 0===t&&(t={}),this._post("/unity/api/project/list",t)},e.prototype.saveProject=function(t){return t.id?this._put("/unity/api/project",t):this._post("/unity/api/project",t)},e.prototype.deleteProject=function(t){return this._delete("/unity/api/project/".concat(t))},e.prototype.exportProject=function(t){return M.a.post(this.url("/unity/api/info/export"),t,{headers:{"X-Requested-With":"XMLHttpRequest","Content-Type":"application/json; charset=UTF-8","Access-Control-Allow-Origin":"*"},responseType:"arraybuffer"}).then((function(t){var e=new Blob([t.data],{type:"application/json"}),n=URL.createObjectURL(e),i=document.createElement("a");i.href=n,i.download=decodeURI("data-model.json"),i.style.display="none",document.body.appendChild(i),i.target="_blank",i.click(),i.parentNode.removeChild(i),window.URL.revokeObjectURL(n)}))},d([T("query",{title:"获取所有项目"})],e.prototype,"getProjectList",null),d([T("save",{title:"保存项目",showTip:!0,showErrorMsg:!0})],e.prototype,"saveProject",null),d([T("save",{title:"删除项目",showTip:!0,showErrorMsg:!0})],e.prototype,"deleteProject",null),e}(F)),ee=te,ne=n("a2c5"),ie=n.n(ne);function re(t){return t instanceof Element?"element":Object.prototype.toString.call(t).slice(8,-1).toLowerCase()}function oe(t){return t.replace(/([^:]|^)\/{2,}/g,"$1/")}n("2597"),n("e459"),n("eab2"),n("6bf0"),n("46df"),n("e40c"),n("39d5");var ae=function(){function t(){}return t.prototype.random=function(){return.001*window.crypto.getRandomValues(new Uint8Array(1))[0]},t.prototype.randomStr=function(t){var e=Math.ceil(t/2),n=new Uint8Array(e);window.crypto.getRandomValues(n);var i=Array.from(n).map((function(t){return t.toString(16).padStart(2,"0")})),r=i.join("").substr(0,t);return r},t.prototype.randomNumberStr=function(t){var e=Math.ceil(t/2),n=new Uint8Array(e);window.crypto.getRandomValues(n);for(var i="",r=0;r<e;r++)i+=n[r].toString().padStart(2,"0");return i.slice(0,t)},t}(),se=new ae,ce=se;function le(t){return null===t||void 0===t}function pe(t){for(var e,n,i=[],r=1;r<arguments.length;r++)i[r-1]=arguments[r];if(!i.length)return t;var o=i.shift();if(ue(t)&&ue(o))for(var a in o)ue(o[a])?(t[a]||Object.assign(t,(e={},e[a]={},e)),pe(t[a],o[a])):Object.assign(t,(n={},n[a]=o[a],n));return pe.apply(void 0,m([t],i,!1))}function ue(t){return t&&"object"===typeof t&&!Array.isArray(t)}function de(t){var e=new URLSearchParams;for(var n in t)t.hasOwnProperty(n)&&e.append(n,t[n]);return e.toString()}function he(t){var e=new URLSearchParams(t),n={};return e.forEach((function(t,e){n[e]=t})),n}var fe,me,ye,ve,ge,be=function(){function t(t){this._appIdCode=t,this.noncePrefix=this.generateRandomString()}return Object.defineProperty(t.prototype,"appIdCode",{get:function(){return this._appIdCode},enumerable:!1,configurable:!0}),t.prototype.generateRandomString=function(){return ce.randomStr(8)},t.prototype.generateSignatureOption=function(){return{nonce:"".concat(this.noncePrefix,"_").concat(this.generateRandomString()),timestamp:Date.now().toString().substring(0,10)}},t.prototype.stringToUTF8ByteSize=function(t){var e=(new TextEncoder).encode(t);return e.length},t.prototype.isStringOverKB=function(t,e){var n=this.stringToUTF8ByteSize(t);return n>1024*e},t.prototype.removeNilValue=function(t){if("object"===re(t))for(var e in t)if(Object.prototype.hasOwnProperty.call(t,e)){var n=t[e],i=re(n);"object"===i?this.removeNilValue(n):"null"!==i&&"undefined"!==i&&"function"!==i||delete t[e]}},t.prototype.formatEncodeValue=function(t){var e=re(t),n="null"===e||"undefined"===e||"function"===e,i=n?"":t;return encodeURIComponent(i).replace(/%2B/g,"+").replace(/%20/g,"+").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/'/g,"%27").replace(/!/g,"%21").replace(/~/g,"%7E")},t.prototype.formatEncodeParam=function(t,e,n){var i=this,r=re(n);if("object"===r){var o=Object.keys(n).sort();0===o.length?t.push("".concat(e,"={}")):o.forEach((function(r){i.formatEncodeParam(t,""===e?"".concat(r):"".concat(e,"[").concat(r,"]"),n[r])}))}else"array"===r?0===n.length?t.push("".concat(e,"=[]")):n.forEach((function(n){i.formatEncodeParam(t,"".concat(e,"[]"),n)})):t.push("".concat(e,"=").concat(this.formatEncodeValue(n)))},t.prototype.sortParamByKey=function(t){void 0===t&&(t={});var e=[];return this.formatEncodeParam(e,"",t),e.join("&")},t.prototype.cryptoHash=function(t){return"Base64"===window.commonSetting.signatureEncodeType?ie.a.HmacSHA1(t,this._appIdCode.code).toString(ie.a.enc.Base64):ie.a.HmacSHA1(t,this._appIdCode.code).toString(ie.a.enc.Hex).toUpperCase()},t.prototype.urlSearchParams=function(t){var e;return t&&t.indexOf("?")>-1?he(null!==(e=t.split("?").pop())&&void 0!==e?e:""):{}},t.prototype.signatureHref=function(t){try{var e=new URL(t,window.location.origin).pathname,n=this.urlSearchParams(t),i=this.generateSignatureOption();pe(n,i);var r=this.sortParamByKey(n),o=oe("/".concat(e)),a="".concat(o,"?").concat(r),s=this.cryptoHash(a);t="".concat(a,"&signature=").concat(s)}catch(c){console.error("签名失败,请使用有效的链接",t)}return t},t.prototype.signatureConfig=function(t){var e,n,i,r,a;try{var s=null===(e=t.method)||void 0===e?void 0:e.toUpperCase(),c="GET"===s,l=Object(o["toRaw"])(t.data),p=null!==l&&"object"===typeof l,u=(null===(i=null===(n=t.headers)||void 0===n?void 0:n["Content-Type"])||void 0===i?void 0:i.toString())||"",d=u.includes("multipart/form-data"),h=u.includes("application/json");c||u||!p||(h=!0),pe(t,{headers:{"App-Id":this._appIdCode.id}});var f={},m=this.urlSearchParams(t.url);if(pe(f,m),!le(t.params)){var y=Object(o["toRaw"])(t.params);this.removeNilValue(y),t.params=y,pe(f,he(de(y)))}!le(l)&&p&&(d||h||pe(f,l));var v=this.generateSignatureOption();pe(f,v);var g=this.sortParamByKey(f);if(h){var b=JSON.stringify(l),w=this.isStringOverKB(b,128);w||(g+=p?this.formatEncodeValue(b):this.formatEncodeValue(l))}var x="";x=(null===(r=t.url)||void 0===r?void 0:r.startsWith("http"))?t.url:(null===(a=t.url)||void 0===a?void 0:a.startsWith("/"))?"".concat(t.baseURL||"").concat(t.url||""):"".concat(t.baseURL||"","/").concat(t.url||"");var S=new URL(x,window.location.origin).pathname,I=oe("/".concat(S)),k="".concat(I,"?").concat(g);v.signature=this.cryptoHash(k),t.params=pe({},t.params,v)}catch(C){console.error("签名失败",C)}},t}(),we={id:"dex",code:"bb0a92a340ae4f5d936a9e6b010cb127"},xe=new be(we),Se=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="card",e.condition={},e.dataList=[],e.showAddModal=!1,e.loading=!1,e.columns=[{title:"项目名称",key:"name",align:"left",tooltip:!0},{title:"项目描述",key:"description",align:"left",tooltip:!0},{title:"创建时间",key:"createTime",align:"left",tooltip:!0},{title:"操作",slot:"action",align:"left"}],e.current={},e}return p(e,t),Object.defineProperty(e.prototype,"uploadAction",{get:function(){return xe.signatureHref(A.baseUrl+"/unity/api/info/import")},enumerable:!1,configurable:!0}),e.prototype.onCheckType=function(t){this.type=t},e.prototype.onAdd=function(){this.current={},this.showAddModal=!0},e.prototype.onDelete=function(t){return h(this,void 0,void 0,(function(){var e;return f(this,(function(n){switch(n.label){case 0:return[4,this.service.deleteProject(t.id)];case 1:return e=n.sent(),e&&!e.hasError&&this.onQuery(),[2]}}))}))},e.prototype.onDetail=function(t){this.$router.push({name:"project-detail",params:{id:t.id},query:{name:t.name}})},e.prototype.onEdit=function(t){this.current=t,this.showAddModal=!0},e.prototype.onExport=function(t){return h(this,void 0,void 0,(function(){var e;return f(this,(function(n){switch(n.label){case 0:return e=Object.create(null),e={projectId:t.id},this.loading=!0,[4,this.service.exportProject(e)];case 1:return n.sent(),this.loading=!1,[2]}}))}))},e.prototype.onComment=function(){this.$router.push({name:"project-comment"})},e.prototype.onQuery=function(){return h(this,void 0,void 0,(function(){var t;return f(this,(function(e){switch(e.label){case 0:return this.loading=!0,[4,this.service.getProjectList(this.condition)];case 1:return t=e.sent(),this.dataList=(null===t||void 0===t?void 0:t.result)||[],this.loading=!1,[2]}}))}))},e.prototype.mounted=function(){this.onQuery()},e.prototype.onSave=function(){return h(this,void 0,void 0,(function(){var t;return f(this,(function(e){switch(e.label){case 0:return[4,this.service.saveProject(this.current)];case 1:return t=e.sent(),t&&!t.hasError&&(this.showAddModal=!1,this.onQuery()),[2]}}))}))},Object.defineProperty(e.prototype,"headers",{get:function(){var t=S().headers;return u(u({},t),{"App-Id":xe.appIdCode.id})},enumerable:!1,configurable:!0}),e.prototype.onSuccess=function(t,e){if(t&&!t.hasError)return this.$Message.success("导入成功"),this.onQuery(),void(this.loading=!1);this.loading=!1,this.$Message.error(t.message||"导入出错,请稍后再试")},e.prototype.onBeforeUpload=function(t){return this.loading=!0,-1!==t.name.indexOf(" ")?(this.$Message.warning("文件名不能包含空格"),this.loading=!1,!1):-1===t.name.indexOf("%")||(this.$Message.warning("文件名不能包含符号%"),this.loading=!1,!1)},e.prototype.onFormatError=function(t){this.loading=!1,this.$Message.warning("文件".concat(t.name,"格式错误"))},d([O(ee)],e.prototype,"service",void 0),e=d([Object(y["component"])({name:"ApiProjectList",template:n("cfb3"),components:{"u-card":Zt,"u-add-modal":Jt,"u-confirm":Yt}})],e),e}(y["View"]),Ie=Se,ke=(n("65e5"),n("7af4")),Ce=n.n(ke),je=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return p(e,t),e.prototype.getApiTree=function(t){return this._get("/unity/api/info/tree/".concat(t))},e.prototype.deleteApi=function(t){return this._delete("/unity/api/info/".concat(t))},e.prototype.deleteCategory=function(t){return this._delete("/unity/api/category/".concat(t))},e.prototype.saveCategory=function(t){return t.id?this._put("/unity/api/category",t):this._post("/unity/api/category",t)},e.prototype.checkCategory=function(t){return this._post("/unity/api/category/update/check",t)},e.prototype.updateMoveCategory=function(t,e){return this._post("/unity/api/category/updateWithEnv?copyEnvFlag=".concat(e),t)},e.prototype.saveApi=function(t){return t.id?this._put("/unity/api/info",t):this._post("/unity/api/info",t)},e.prototype.checkApi=function(t){return this._post("/unity/api/info/update/check",t)},e.prototype.updateMoveApi=function(t,e){return this._post("/unity/api/info/updateWithEnv?copyEnvFlag=".concat(e),t)},e.prototype.copyApi=function(t,e,n,i){return this._post("/unity/api/info/copy?id=".concat(t,"&name=").concat(e,"&projectId=").concat(n,"&categoryId=").concat(i))},e.prototype.apiInfo=function(t){return this._get("/unity/api/info/".concat(t,"/whole"))},e.prototype.run=function(t,e){return this._post("/unity/api/run/".concat(t,"/web"),e)},e.prototype.runWithFile=function(t,e){return this._post("/unity/api/run/".concat(t,"/exec"),e)},e.prototype.saveApiInfo=function(t){return this._post("/unity/api/info/save/whole",t)},e.prototype.parseResponse2Fields=function(t,e,n){return void 0===e&&(e=""),void 0===n&&(n=!0),this._post("/unity/api/field-mapping/parse/model",{originalJson:t,convertRoot:e,collapse:n})},e.prototype.preScript=function(){return this._get("/api-help/preScript.json")},e.prototype.postScript=function(){return this._get("/api-help/postScript.json")},e.prototype.projectInfo=function(t){return this._get("/unity/api/project/".concat(t))},e.prototype.getSecurityList=function(t){return this._post("/unity/api/authentication/list",t)},e.prototype.deleteSecurityItem=function(t){return this._delete("/unity/api/authentication/".concat(t))},e.prototype.addSecurityItem=function(t){return this._post("/unity/api/authentication",t)},e.prototype.updateSecurityItem=function(t){return this._put("/unity/api/authentication",t)},e.prototype.getVariableList=function(t){return this._post("/unity/api/environment-param/list",t)},e.prototype.saveVariable=function(t){return(null===t||void 0===t?void 0:t.id)?this._put("/unity/api/environment-param",t):this._post("/unity/api/environment-param",t)},e.prototype.deleteVariable=function(t){return this._delete("/unity/api/environment-param/".concat(t))},e.prototype.onBatchEnv=function(t){return this._post("/unity/api/info/env",t)},e.prototype.onBatchAuth=function(t){return this._post("/unity/api/info/auth",t)},e.prototype.getScriptDoc1=function(){return this._get("/api-help/apiParam.md")},e.prototype.getScriptDoc=function(){return this._get("/api-help/authScript.md")},e.prototype.onImportAvr=function(t){return this._post("/unity/api/info/import-model",t)},e.prototype.onValidateImport=function(t){return this._post("/unity/api/info/check-name",t)},e.prototype.getEgovaApiTree=function(){return this._get("/unity/wizdom-api/tree")},e.prototype.getProjectList=function(t){return void 0===t&&(t={}),this._post("/unity/api/project/list",t)},e.prototype.getApiRequestParams=function(t){return this._get("/unity/api/request-param/apiId/".concat(t))},e.prototype.getCategoryList=function(){return this._get("/unity/proxy/tree")},e.prototype.getProxyNameList=function(t){return this._get("/unity/proxy/getbyapi?apiId=".concat(t))},e.prototype.save=function(t){return t.id?this._put("/unity/proxy",t):this._post("/unity/proxy",t)},d([T("query",{title:"获取接口树"})],e.prototype,"getApiTree",null),d([T("save",{title:"删除接口",showErrorMsg:!0,showTip:!0})],e.prototype,"deleteApi",null),d([T("save",{title:"删除分组",showTip:!0,showErrorMsg:!0})],e.prototype,"deleteCategory",null),d([T("save",{title:"保存分组",showTip:!0,showErrorMsg:!0})],e.prototype,"saveCategory",null),d([T("save",{title:"保存分组",showTip:!1,showErrorMsg:!0})],e.prototype,"checkCategory",null),d([T("save",{title:"保存分组",showTip:!0,showErrorMsg:!0})],e.prototype,"updateMoveCategory",null),d([T("save",{title:"保存接口",showErrorMsg:!0,showTip:!0})],e.prototype,"saveApi",null),d([T("save",{title:"保存接口",showErrorMsg:!0,showTip:!1})],e.prototype,"checkApi",null),d([T("save",{title:"保存接口",showTip:!0,showErrorMsg:!0})],e.prototype,"updateMoveApi",null),d([T("save",{title:"复制接口",showErrorMsg:!1,showTip:!1})],e.prototype,"copyApi",null),d([T("query",{title:"接口详情"})],e.prototype,"apiInfo",null),d([T("query",{title:"在线测试"})],e.prototype,"run",null),d([T("query",{title:"在线测试"})],e.prototype,"runWithFile",null),d([T("save",{title:"保存接口详情",showErrorMsg:!0,showTip:!0})],e.prototype,"saveApiInfo",null),d([T("query",{title:"提取json的节点数据"})],e.prototype,"parseResponse2Fields",null),d([T("query",{title:"前置脚本"})],e.prototype,"preScript",null),d([T("query",{title:"后置脚本"})],e.prototype,"postScript",null),d([T("query",{title:"项目详情"})],e.prototype,"projectInfo",null),d([T("query",{title:"授权认证列表查询"})],e.prototype,"getSecurityList",null),d([T("save",{title:"删除授权认证",showTip:!0,showErrorMsg:!0})],e.prototype,"deleteSecurityItem",null),d([T("save",{title:"新增授权认证",showTip:!0,showErrorMsg:!0})],e.prototype,"addSecurityItem",null),d([T("save",{title:"更新授权认证",showTip:!0,showErrorMsg:!0})],e.prototype,"updateSecurityItem",null),d([T("query",{title:"环境变量详情",showErrorMsg:!0})],e.prototype,"getVariableList",null),d([T("save",{title:"保存环境变量",showErrorMsg:!0})],e.prototype,"saveVariable",null),d([T("query",{title:"删除环境变量",showErrorMsg:!0})],e.prototype,"deleteVariable",null),d([T("query",{title:"批量修改环境变量",showErrorMsg:!0})],e.prototype,"onBatchEnv",null),d([T("query",{title:"批量修改授权设置",showErrorMsg:!0})],e.prototype,"onBatchAuth",null),d([T("query",{title:"单接口详情导入",showErrorMsg:!0})],e.prototype,"onImportAvr",null),d([T("query",{title:"单接口详情导入",showErrorMsg:!0})],e.prototype,"onValidateImport",null),d([T("query",{title:"获取egova接口树"})],e.prototype,"getEgovaApiTree",null),d([T("query",{title:"获取API项目列表"})],e.prototype,"getProjectList",null),d([T("query",{title:"获取API参数列表"})],e.prototype,"getApiRequestParams",null),d([T("query",{title:"查询分类树"})],e.prototype,"getCategoryList",null),d([T("query",{title:"查询代理详情"})],e.prototype,"getProxyNameList",null),d([T("save",{title:"保存接口配置",showTip:!0,showErrorMsg:!0})],e.prototype,"save",null),e}(F),De=je,Oe=(n("ca38"),function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return p(e,t),e.prototype.onMore=function(){this.source.func&&this.source.func()},e.prototype.onToApi=function(){return h(this,void 0,void 0,(function(){var t;return f(this,(function(e){switch(e.label){case 0:return[4,this.service.apiInfo(this.source.apiId)];case 1:return t=e.sent(),t.hasError?[2,this.$message.error("接口不存在")]:(this.$router.push({name:"project-detail",params:{id:this.source.projectId},query:{apiId:this.source.apiId,apiName:this.source.apiName}}),[2])}}))}))},d([Object(y["config"])({type:Object,default:function(){return Object.create(null)}})],e.prototype,"source",void 0),d([Object(y["config"])({type:Number,default:function(){return 0}})],e.prototype,"index",void 0),d([O(De)],e.prototype,"service",void 0),e=d([Object(y["component"])({template:n("9b44"),components:{}})],e),e}(y["Component"])),Te=Oe,Ee=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return p(e,t),e.prototype.page=function(t){return this._post("/unity/api/trends/page",t)},d([T("query",{title:"分页查询表单动态"})],e.prototype,"page",null),e}(F),Pe=Ee,Me=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.list=[],e.itemComponent=Te,e.condition={endCreateTime:new Date},e.paging={pageIndex:0,pageSize:10,totalCount:0},e}return p(e,t),e.prototype.mounted=function(){this.onQuery()},e.prototype.onMore=function(){return h(this,void 0,void 0,(function(){var t;return f(this,(function(e){switch(e.label){case 0:return this.paging.pageIndex++,this.list.length>0&&this.list.pop(),[4,this.query()];case 1:return t=e.sent(),this.list=this.list.concat(t),this.paging.pageIndex*this.paging.pageSize<this.paging.totalCount&&this.list.push({id:this.paging.pageIndex,type:"more",func:this.onMore}),[2]}}))}))},e.prototype.query=function(){return h(this,void 0,void 0,(function(){var t;return f(this,(function(e){switch(e.label){case 0:return[4,this.service.page({condition:this.condition,paging:this.paging})];case 1:return t=e.sent(),this.paging.totalCount=t.totalCount,[2,Promise.resolve(t.result||[])]}}))}))},e.prototype.onQuery=function(){this.paging.pageIndex=0,this.list=[],this.onMore()},d([O(Pe)],e.prototype,"service",void 0),e=d([Object(y["component"])({name:"ApiProjectComment",template:n("b769"),components:{VirtualList:Ce.a}})],e),e}(y["View"]),Le=Me,Ae=(n("8b9b"),function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return p(e,t),d([Object(ut["PropSync"])("visiable",{default:!1})],e.prototype,"value",void 0),e=d([Object(y["component"])({template:n("10cf")})],e),e}(y["Component"])),Ne=Ae,qe=(n("713b"),function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.typeList=[{title:"Body参数",name:"body"},{title:"Query参数",name:"query"},{title:"Header参数",name:"header"}],e.active=e.typeList[0],e.columns=[{title:"参数名",slot:"name",align:"left"},{title:"参数值",slot:"value",align:"left"},{title:"备注",slot:"remark",align:"left"},{title:"操作",slot:"action",align:"left",width:300}],e.dataList=new Array(20).fill({}),e}return p(e,t),e.prototype.onCheckTpye=function(t){this.active=t},e.prototype.onDelete=function(t,e){t.splice(e,1)},e.prototype.onUp=function(t,e){if(0!==e){var n=t.splice(e,1);t.splice(e-1,0,n[0])}},e.prototype.onDown=function(t,e){if(e!==t.length-1){var n=t.splice(e,1);t.splice(e+1,0,n[0])}},e.prototype.onTop=function(t,e){var n=t.splice(e,1);t.unshift(n[0])},e.prototype.onBottom=function(t,e){var n=t.splice(e,1);t.push(n[0])},d([Object(ut["PropSync"])("visiable",{default:!1})],e.prototype,"value",void 0),e=d([Object(y["component"])({template:n("470f")})],e),e}(y["Component"])),$e=qe,Re=(n("eaed"),n("4387")),_e=n.n(Re),Fe=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.isAddOnce=!1,e.exitAddItem=!1,e.varList=[],e.keyword="",e.currentItem={},e.isEmpty=!0,e.formData={name:"",remark:"",type:"http",address:""},e.rules={name:[{required:!0,message:"请输入环境名称",trigger:"blur"}],address:[{required:!0,message:"请输入域名",trigger:"blur"}]},e.onFilter=_e()((function(){e.getVariableList()}),300),e}return p(e,t),e.prototype.onShowChange=function(t){return h(this,void 0,void 0,(function(){return f(this,(function(e){return t&&(this.isAddOnce=this.isAdd,this.getVariableList()),[2]}))}))},e.prototype.onEmpty=function(t){this.isEmpty=!!t},e.prototype.getVariableList=function(){return h(this,void 0,void 0,(function(){var t,e,n=this;return f(this,(function(i){switch(i.label){case 0:return[4,this.service.getVariableList({name:this.keyword,projectId:this.projectId})];case 1:return t=i.sent(),(null===t||void 0===t?void 0:t.hasError)||(this.varList=t.result||[],(this.isAddOnce||this.exitAddItem)&&(this.onAddItem(),this.isAddOnce=!1,this.exitAddItem=!1),this.currentItem&&this.currentItem.id?(e=this.varList.filter((function(t){return t.id===n.currentItem.id})),this.onSelectItem(e[0]||this.varList[0])):this.varList.length&&this.onSelectItem(this.varList[0])),[2]}}))}))},e.prototype.onSelectItem=function(t){this.currentItem=t.$clone(),this.formData.name=this.currentItem.name,this.currentItem.value.indexOf("https")>-1?(this.formData.type="https",this.formData.address=this.currentItem.value.replace("https://","")):(this.formData.type="http",this.formData.address=this.currentItem.value.replace("http://","")),this.formData.remark=this.currentItem.remark},e.prototype.onDelete=function(t){return h(this,void 0,void 0,(function(){var e;return f(this,(function(n){switch(n.label){case 0:return t.id?(this.varList.find((function(t){return!t.id}))&&(this.exitAddItem=!0),[4,this.service.deleteVariable(t.id)]):[3,2];case 1:return e=n.sent(),(null===e||void 0===e?void 0:e.hasError)||(this.getVariableList(),this.$emit("on-refresh")),[3,3];case 2:this.varList.shift(),this.varList.length&&this.onSelectItem(this.varList[0]),n.label=3;case 3:return[2]}}))}))},e.prototype.onAddItem=function(){if(!(this.varList.length>0)||this.varList[0].id){var t={name:"",value:"",remark:"",projectId:this.projectId};this.varList.unshift(t),this.onSelectItem(this.varList[0])}},e.prototype.onCancel=function(){this.value=!1,this.keyword="",this.currentItem={}},e.prototype.onSave=function(){var t,e;return h(this,void 0,void 0,(function(){var n,i,r;return f(this,(function(o){switch(o.label){case 0:return[4,this.$refs["variable-content-form"].validate()];case 1:return n=o.sent(),n?(i={name:this.formData.name,value:"".concat(this.formData.type,"://").concat(this.formData.address),remark:this.formData.remark,projectId:this.projectId},(null===(t=this.currentItem)||void 0===t?void 0:t.id)&&(i.id=null===(e=this.currentItem)||void 0===e?void 0:e.id,i.createTime=this.currentItem.createTime),[4,this.service.saveVariable(i)]):[2];case 2:return r=o.sent(),r&&!r.hasError&&(this.$message.success("保存成功!"),this.getVariableList(),this.$emit("on-refresh")),[2]}}))}))},d([O(De)],e.prototype,"service",void 0),d([Object(ut["PropSync"])("visiable",{default:!1})],e.prototype,"value",void 0),d([Object(y["config"])({type:String,default:""})],e.prototype,"projectId",void 0),d([Object(y["config"])({type:Boolean,default:!1})],e.prototype,"isAdd",void 0),d([Object(y["watch"])("value")],e.prototype,"onShowChange",null),d([Object(y["watch"])("varList.length",{immediate:!0})],e.prototype,"onEmpty",null),e=d([Object(y["component"])({template:n("8962"),components:{}})],e),e}(y["Component"]),Be=Fe,ze=(n("fe54"),n("0ddb"),function(){function t(){this.info={},this.json="",this.queryParams=[],this.formParams=[],this.requestHeaders=[],this.preScripts=[],this.postScripts=[],this.eventScripts=[],this.convertConfig=new Ue,this.fieldMappings=[],this.authentication=new Ve}return t}()),Ve=function(){function t(){this.type="OAuth2",this.content="",this.location="",this.locationKey="",this.id=""}return t}(),Ue=function(){function t(){this.convertRoot="",this.successCodePath="",this.successCode=""}return t}(),He=function(){function t(){this.id="",this.paramPath="",this.originalParamPath="",this.name="",this.valueType="",this.checked=!1}return t}(),Ge=function(){function t(){this.id="",this.projectId="",this.apiId="",this.eventType="Previous",this.type="Groovy",this.content=""}return t}(),Ke=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.eventType="Post",e}return p(e,t),e}(Ge),Qe=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.editor={},e}return p(e,t),e.prototype.onEditorInited=function(t){this.editor=t},e.prototype.resizeEditor=function(){this.editor.resize&&this.editor.resize()},d([Object(y["config"])({default:!0})],e.prototype,"lengthwise",void 0),d([Object(y["watch"])("lengthwise")],e.prototype,"resizeEditor",null),e=d([Object(y["component"])({})],e),e}(y["Component"]),Je=Qe,We=(n("d928"),function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.scriptData={},e.tempScriptData={},e.viewMax=!1,e.model=new Ge,e.key="preScripts",e.diyKeywordList=[],e.refreshEditor=!0,e.keyword="",e.errorMap=new Map,e.onFilter=_e()((function(){e.filterTypeList()}),300),e}return p(e,t),e.prototype.mounted=function(){var t=this;this.getScript(),this.$subscribe("api://project-detail-max",(function(){t.refreshEditor=!t.refreshEditor,t.refreshEditor&&setTimeout((function(){t.displayError(t.errorLine)}),5)}));var e=document.getElementsByClassName("ace_scrollbar")[0];e.addEventListener("scroll",(function(){t.displayError(t.errorLine)}))},e.prototype.handleError=function(t){var e=this;setTimeout((function(){e.displayError(t)}),5)},e.prototype.displayError=function(t){var e=this,n=document.getElementsByClassName("ace_gutter-cell");this.errorMap.forEach((function(t,e){var i,r=null===(i=n[t])||void 0===i?void 0:i.firstElementChild;r&&n[t].removeChild(r)})),this.errorMap.clear(),(null===t||void 0===t?void 0:t.length)&&t.forEach((function(t){null===n||void 0===n||n.forEach((function(n,i){if((null===n||void 0===n?void 0:n.innerHTML)===t+""){var r=n,o=document.createElement("i");o.className="iconfont icon-a-cuowutishi1",r.insertBefore(o,r.firstChild),e.errorMap.set(t,i)}}))}))},e.prototype.getScript=function(){var t,e;return h(this,void 0,void 0,(function(){var n,i;return f(this,(function(r){switch(r.label){case 0:return[4,this.service.preScript()];case 1:return n=r.sent(),this.scriptData=n||{},this.scriptData.group=null===(t=this.scriptData.group)||void 0===t?void 0:t.map((function(t){return u(u({},t),{expand:!0})})),this.tempScriptData=this.scriptData.$clone(),i=[],null===(e=this.scriptData)||void 0===e||e.group.forEach((function(t){"业务案例"!==t.name&&t.list.forEach((function(e){i.push({meta:t.name,caption:e.code,value:e.code,score:1})}))})),this.diyKeywordList=i,[2]}}))}))},e.prototype.onClickItem=function(t){this.editor.insert(t.code),this.editor.focus()},Object.defineProperty(e.prototype,"script",{get:function(){return this.interfaceModel[this.key][0]||this.interfaceModel[this.key].push(this.model),this.interfaceModel[this.key][0].content},set:function(t){this.interfaceModel[this.key][0].content=t},enumerable:!1,configurable:!0}),e.prototype.filterTypeList=function(){var t=this;if(this.keyword){var e=this.scriptData.group.map((function(e){return u(u({},e),{list:e.list.filter((function(e){return-1!==e.name.indexOf(t.keyword)}))})}));this.tempScriptData.group=e.filter((function(t){return t.list.length}))}else this.tempScriptData=this.scriptData.$clone()},e.prototype.onQuickGroupClick=function(t){var e,n;null===(e=this.scriptData.group)||void 0===e||e.forEach((function(e){t.name===e.name&&(e.expand=!e.expand)})),null===(n=this.tempScriptData.group)||void 0===n||n.forEach((function(e){t.name===e.name&&(e.expand=!e.expand)}))},e.prototype.onRun=function(){this.$emit("on-script-run")},e.prototype.onSearch=function(){this.editor&&this.editor.execCommand("find")},e.prototype.onSave=function(){this.$emit("on-script-save")},e.prototype.onViewMax=function(){this.viewMax=!this.viewMax,this.$emit("on-script-max",this.viewMax)},d([Object(y["config"])({default:function(){return new ze}})],e.prototype,"interfaceModel",void 0),d([O(De)],e.prototype,"service",void 0),d([Object(y["config"])({default:null})],e.prototype,"errorLine",void 0),d([Object(y["watch"])("errorLine",{immediate:!0})],e.prototype,"handleError",null),e=d([Object(y["component"])({template:n("8ab8"),components:{"u-editor":mt}})],e),e}(Je)),Ye=We,Xe=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.key="postScripts",e.model=new Ke,e}return p(e,t),e.prototype.getScript=function(){var t;return h(this,void 0,void 0,(function(){var e;return f(this,(function(n){switch(n.label){case 0:return[4,this.service.postScript()];case 1:return e=n.sent(),this.scriptData=e||{},this.scriptData.group=null===(t=this.scriptData.group)||void 0===t?void 0:t.map((function(t){return u(u({},t),{expand:!0})})),this.tempScriptData=this.scriptData.$clone(),[2]}}))}))},e=d([Object(y["component"])({})],e),e}(Ye),Ze=Xe,tn=(n("a6c3"),function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.option={showPrintMargin:!1,wrap:"free",fontSize:15},e}return p(e,t),e.prototype.editorInit=function(t){n("1cdf"),n("9842"),n("0e0c"),n("1e82"),n("c889"),n("64d5"),n("91e1"),n("3fb3"),n("8214"),this.$emit("inited",t)},d([Object(ut["PropSync"])("value")],e.prototype,"code",void 0),d([Object(pt["config"])({default:"json"})],e.prototype,"lang",void 0),e=d([Object(pt["component"])({template:n("35e3"),components:{editor:ht.a}})],e),e}(pt["Component"])),en=tn,nn=(n("aba0"),function(){function t(){this.content="",this.originalContent="",this.requestHeaders={},this.responseHeaders={},this.cookies={},this.errorMessage="",this.output=""}return t}()),rn=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.responseSettingTypeList=[{name:"content",title:"响应"},{name:"responseHeaders",title:"响应头",num:0},{name:"requestHeaders",title:"请求头",num:0},{name:"cookies",title:"Cookies",num:0},{name:"output",title:"输出",num:0}],e.lang="json",e.contentType="originalContent",e.expand=!0,e.headerColumns=[{title:"Key(键名)",key:"key"},{title:"Value(键值)",key:"value"}],e.active=e.responseSettingTypeList[0],e}return p(e,t),e.prototype.onClickResponseSettingTpye=function(t){this.active=t},Object.defineProperty(e.prototype,"content",{get:function(){if(this.response.errorMessage)return this.response.errorMessage;if(!this.response.originalContent)return"";var t="";try{t=JSON.stringify(JSON.parse(this.response[this.contentType]),null,4)}catch(e){return console.log(e),this.response[this.contentType]}return t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"output",{get:function(){return this.response.output||""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"responseHeaders",{get:function(){var t=this;return Object.keys(this.response.responseHeaders).map((function(e){return{key:e,value:t.response.responseHeaders[e]}}))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"requestHeaders",{get:function(){var t=this;return Object.keys(this.response.requestHeaders).map((function(e){return{key:e,value:t.response.requestHeaders[e]}}))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"cookies",{get:function(){var t=this.response.responseHeaders["Set-Cookie"]||"";return t.$isArray()?t.map((function(t,e){return{key:e,value:t}})):(null===t||void 0===t?void 0:t.length)>0?t.split(";").map((function(t){var e=t.split("="),n=e[0],i=e[1];return{key:n,value:i}})):void 0},enumerable:!1,configurable:!0}),e.prototype.onChangeLang=function(t){this.lang=t},e.prototype.init=function(){var t=this;this.expand=!0,this.responseSettingTypeList.forEach((function(e){var n;if("content"!==e.name){var i=t.response[e.name]||{};e.num=i.$isArray()?i.length:Object.keys(i).length,"cookies"===e.name&&(e.num=null===(n=t.cookies)||void 0===n?void 0:n.length)}})),this.response.code&&200!==this.response.code&&(this.active=this.responseSettingTypeList[4]),this.response.code&&200===this.response.code&&(this.active=this.responseSettingTypeList[0])},e.prototype.onClickCollapse=function(){var t=this;this.$publish("api://project-detail-max"),this.expand=!this.expand,setTimeout((function(){t.$publish("api://project-detail-max")}),5)},d([Object(y["config"])({default:function(){return new nn}})],e.prototype,"response",void 0),d([Object(y["watch"])("response",{immediate:!0,deep:!1})],e.prototype,"init",null),e=d([Object(y["component"])({template:n("2c48"),components:{"u-editor":en}})],e),e}(Je),on=rn,an=(n("8a77"),function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.loading=!1,e.selections=[],e.debounceUpdateFieldMappings=_e()(e.updateFieldMappings,500),e.columns=[{type:"selection",width:60,align:"center"},{title:"读取字段的JSON路径",maxWidth:350,minWidth:120,align:"left",slot:"path"},{title:"输出字段命名和类型",minWidth:300,align:"left",slot:"name"},{title:"操作",width:80,align:"left",slot:"action"}],e.valueTypeList=[],e.dataList=[],e.lastDataList=[],e}return p(e,t),e.prototype.mounted=function(){return h(this,void 0,void 0,(function(){return f(this,(function(t){return this.interfaceModel.convertConfig=this.interfaceModel.convertConfig||new Ue,this.getValueTypeList(),this.initDataList(),[2]}))}))},e.prototype.getValueTypeList=function(){return h(this,void 0,void 0,(function(){var t;return f(this,(function(e){switch(e.label){case 0:return[4,this.service.getEnumByType("dataType")];case 1:return t=e.sent(),this.valueTypeList=(null===t||void 0===t?void 0:t.result)||[],[2]}}))}))},e.prototype.initDataList=function(){var t,e=this;(null===(t=this.interfaceModel.fieldMappings)||void 0===t?void 0:t.length)&&(this.dataList=this.interfaceModel.fieldMappings.sort((function(t,e){var n;return null===(n=t.paramPath)||void 0===n?void 0:n.localeCompare(e.paramPath)})),this.lastDataList=this.dataList.$clone()),this.$subscribe("api://project-detail-save",(function(){e.lastDataList=e.dataList.$clone()}))},e.prototype.onParse=function(){var t,e;return h(this,void 0,void 0,(function(){var n,i,r,o;return f(this,(function(a){switch(a.label){case 0:return this.response.originalContent?(this.loading=!0,[4,this.service.parseResponse2Fields(this.response.originalContent,null===(t=this.interfaceModel.convertConfig)||void 0===t?void 0:t.convertRoot)]):(this.$Message.error("请先获取转换前参数!"),[2]);case 1:return n=a.sent(),(null===n||void 0===n?void 0:n.hasError)?[2]:(i=(null===(e=null===n||void 0===n?void 0:n.result)||void 0===e?void 0:e.fieldMappings)||[],r=this.interfaceModel.fieldMappings,o=new Set(r.map((function(t){return t.originalParamPath}))),i.forEach((function(t){if(o.has(t.originalParamPath)){var e=r.find((function(e){return e.originalParamPath===t.originalParamPath}));Object.assign(t,e)}})),this.dataList=i,this.debounceUpdateFieldMappings(),this.loading=!1,[2])}}))}))},e.prototype.onChangeChecked=function(t){this.selections=t,this.debounceUpdateFieldMappings()},e.prototype.batchDelete=function(){var t=this;this.selections.length&&(this.selections.map((function(e){var n=t.dataList.findIndex((function(t){return t.name===e.name}));n>-1&&t.dataList.splice(n,1)})),this.selections=[],this.debounceUpdateFieldMappings())},e.prototype.onAdd=function(){this.dataList.unshift(new He),this.debounceUpdateFieldMappings()},e.prototype.onDelete=function(t){this.dataList.splice(t,1),this.debounceUpdateFieldMappings()},e.prototype.onReset=function(){this.dataList=this.lastDataList.$clone(),this.debounceUpdateFieldMappings()},e.prototype.updateFieldMappings=function(){this.interfaceModel.fieldMappings=this.dataList},d([O(De)],e.prototype,"service",void 0),d([Object(y["config"])({default:function(){return new ze}})],e.prototype,"interfaceModel",void 0),d([Object(y["config"])({default:function(){return new nn}})],e.prototype,"response",void 0),e=d([Object(y["component"])({template:n("236b"),components:{}})],e),e}(y["Component"])),sn=an,cn=(n("bff7"),function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.columns=[{title:" ",slot:"selection",width:60,align:"center"},{title:"参数名",align:"left",slot:"name"},{title:"参数值",align:"left",slot:"value"},{title:"备注",align:"left",slot:"text"},{title:"操作",align:"left",slot:"action"}],e}return p(e,t),e.prototype.onDelete=function(t){this.interfaceModel.requestHeaders.splice(t,1)},e.prototype.onAdd=function(){this.interfaceModel.requestHeaders.push({name:"",value:"",text:"",disabled:!1})},e.prototype.onChangeDisabled=function(t,e){e.disabled=!t},d([Object(y["config"])({default:function(){return new ze}})],e.prototype,"interfaceModel",void 0),e=d([Object(y["component"])({template:n("22e8"),components:{}})],e),e}(y["Component"])),ln=cn,pn=(n("3ad3"),function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.showValue=0,e}return p(e,t),e.prototype.watchValue=function(){this.showValue=this.value||this.midState?1:0},e.prototype.onChange=function(){this.$emit("onChange")},d([Object(y["config"])({type:Boolean,default:!1})],e.prototype,"value",void 0),d([Object(y["config"])({type:Boolean,default:!1})],e.prototype,"midState",void 0),d([Object(y["watch"])("value",{immediate:!0}),Object(y["watch"])("midState",{immediate:!0})],e.prototype,"watchValue",null),e=d([Object(y["component"])({template:n("f9a4"),components:{}})],e),e}(y["Component"])),un=pn,dn=(n("8137"),function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.value=[],e.scriptDocShow=!1,e.scriptDoc="",e.commonColuns=[{title:"参数名",slot:"name",align:"left"},{title:"参数值",slot:"valueContent",align:"left"},{title:"必填",slot:"required",width:95,align:"left",renderHeader:function(t,e){return t("div",{class:"th-tip"},[t("i-poptip",{props:{trigger:"hover",content:"参数启用同时非必填时,若调用方未传具体参数值,将使用当前定义的参数值。",placement:"top",transfer:!0,"word-wrap":!0}},[t("i-icon",{props:{type:"ios-information-circle-outline"}})]),t("span","必填")])}},{title:"备注",slot:"text",align:"left"},{title:"操作",slot:"action",align:"left",width:300}],e.queryDataList=[],e.requestBodyTypeList=[],e.hasQueryChecked=!1,e.hasQueryMidChecked=!1,e.hasBodyChecked=!1,e.hasBodyMidChecked=!1,e.typeMap={Form:"FormData",X_www_form_urlencoded:"FormUrlEncoded"},e.formParamTypeList=[{name:"String",text:"Text"},{name:"FILE",text:"File"}],e.formParamsIndex=0,e.currentFormParamRow={},e}return p(e,t),Object.defineProperty(e.prototype,"paramColumns",{get:function(){var t=this;return m([{slot:"selection",width:100,align:"center",title:"启用",renderHeader:function(e,n){return e(un,{props:{value:t.hasQueryChecked,midState:t.hasQueryMidChecked},on:{onChange:t.onQueryChange}})}}],this.commonColuns,!0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bodyColumns",{get:function(){var t=this;return m([{slot:"selection",width:100,align:"center",title:"启用",renderHeader:function(e,n){return e(un,{props:{value:t.hasBodyChecked,midState:t.hasBodyMidChecked},on:{onChange:t.onBodyChange}})}}],this.commonColuns,!0)},enumerable:!1,configurable:!0}),e.prototype.getExpand=function(t){return this.value.includes(t)},e.prototype.onDelete=function(t,e){var n=t.findIndex((function(t){return t.indexFlag===e}));t.splice(n,1),this.buildQueryCheckedState()},e.prototype.buildQueryCheckedState=function(){for(var t=0,e=0,n=this.queryDataList;e<n.length;e++){var i=n[e];i.disabled||(t+=1)}t>0&&t!==this.queryDataList.length?(this.hasQueryChecked=!0,this.hasQueryMidChecked=!0):(this.hasQueryChecked=t>0,this.hasQueryMidChecked=!1)},e.prototype.buildBodyCheckedState=function(){for(var t=0,e=0,n=this.bodyDataList;e<n.length;e++){var i=n[e];i.disabled||(t+=1)}t>0&&t!==this.bodyDataList.length?(this.hasBodyChecked=!0,this.hasBodyMidChecked=!0):(this.hasBodyChecked=t>0,this.hasBodyMidChecked=!1)},e.prototype.onUp=function(t,e){if(0!==e){var n=t.splice(e,1);t.splice(e-1,0,n[0])}},e.prototype.onDown=function(t,e){if(e!==t.length-1){var n=t.splice(e,1);t.splice(e+1,0,n[0])}},e.prototype.onTop=function(t,e){var n=t.splice(e,1);t.unshift(n[0])},e.prototype.onBottom=function(t,e){var n=t.splice(e,1);t.push(n[0])},e.prototype.onDeleteBodyParam=function(t,e){var n=t.findIndex((function(t){return t.indexFlag===e}));t.splice(n,1),this.buildBodyCheckedState()},e.prototype.onUpBodyParam=function(t,e){var n=t.findIndex((function(t){return t.id===e}));if(0!==n){var i=t.splice(n,1);t.splice(n-1,0,i[0])}},e.prototype.onDownBodyParam=function(t,e){var n=t.findIndex((function(t){return t.id===e}));if(n!==t.length-1){var i=t.splice(n,1);t.splice(n+1,0,i[0])}},e.prototype.onTopBodyParam=function(t,e){var n=t.findIndex((function(t){return t.id===e})),i=t.splice(n,1);t.unshift(i[0])},e.prototype.onBottomBodyParam=function(t,e){var n=t.findIndex((function(t){return t.id===e})),i=t.splice(n,1);t.push(i[0])},e.prototype.onChangeDisabled=function(t,e,n){e.disabled=!t,"query"===n?this.buildQueryCheckedState():this.buildBodyCheckedState()},e.prototype.init=function(){var t,e,n=this;(null===(e=null===(t=this.interfaceModel)||void 0===t?void 0:t.info)||void 0===e?void 0:e.id)&&(this.interfaceModel.queryParams.forEach((function(t){t.indexFlag||(t.indexFlag=n.formParamsIndex+++"_"+n.interfaceModel.info.id),t._checked=!t.disabled})),this.queryDataList=this.interfaceModel.queryParams,this.interfaceModel.formParams.forEach((function(t){t.indexFlag||(t.indexFlag=n.formParamsIndex+++"_"+n.interfaceModel.info.id),t._checked=!t.disabled})),this.buildQueryCheckedState(),this.buildBodyCheckedState())},Object.defineProperty(e.prototype,"bodyDataList",{get:function(){var t=this.typeMap[this.bodyType];return this.interfaceModel.formParams.filter((function(e){return e.type===t}))},set:function(t){this.interfaceModel.formParams=t},enumerable:!1,configurable:!0}),e.prototype.onAddRequestParam=function(){this.queryDataList.push({indexFlag:this.formParamsIndex+++"_"+this.interfaceModel.info.id,name:"",text:"",type:"QueryString",valueContent:"",requireFlag:0,disabled:!1,_checked:!0}),this.buildQueryCheckedState()},e.prototype.onAddBodyParam=function(){this.interfaceModel.formParams.push({indexFlag:this.formParamsIndex+++"_"+this.interfaceModel.info.id,fileName:"",name:"",text:"",type:this.typeMap[this.bodyType],valueContent:"",requireFlag:0,_checked:!0,disabled:!1,valueType:"String"}),this.buildBodyCheckedState()},Object.defineProperty(e.prototype,"bodyType",{get:function(){var t,e;return(null===(e=null===(t=this.interfaceModel)||void 0===t?void 0:t.info)||void 0===e?void 0:e.requestBodyType)||"Form"},set:function(t){this.interfaceModel.info.requestBodyType=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isFormData",{get:function(){return"Form"===this.bodyType||"X_www_form_urlencoded"===this.bodyType},enumerable:!1,configurable:!0}),e.prototype.onBeautify=function(){this.interfaceModel.json&&(this.interfaceModel.json=JSON.stringify(JSON.parse(this.interfaceModel.json),null,4))},e.prototype.mounted=function(){return h(this,void 0,void 0,(function(){var t;return f(this,(function(e){switch(e.label){case 0:return[4,this.service.getEnumByType("requestBodyType")];case 1:return t=e.sent(),this.requestBodyTypeList=(null===t||void 0===t?void 0:t.result)||[],this.interfaceModel&&this.interfaceModel.info&&(this.interfaceModel.info.requestBodyType=this.interfaceModel.info.requestBodyType||(this.requestBodyTypeList.length?this.requestBodyTypeList[0].name:"Form")),[2]}}))}))},e.prototype.onChangeFormParamType=function(t,e){this.interfaceModel.formParams.forEach((function(t){if(t.indexFlag===e.indexFlag)return t.valueType=e.valueType}))},e.prototype.onClickRow=function(t){this.currentFormParamRow=t},e.prototype.onImport=function(t){return h(this,void 0,void 0,(function(){var e=this;return f(this,(function(n){return this.formData.append(this.currentFormParamRow.indexFlag,t),this.bodyDataList=this.interfaceModel.formParams.map((function(n){return n.indexFlag===e.currentFormParamRow.indexFlag&&(n.fileName=t.name,n.valueContent=null),u({},n)})),[2,Promise.reject(!1)]}))}))},e.prototype.onClearFile=function(t){this.formData.delete(t.indexFlag),this.bodyDataList=this.interfaceModel.formParams.map((function(e){return e.indexFlag===t.indexFlag&&(e.fileName=""),u({},e)}))},e.prototype.onQuerySelectionChange=function(t){var e=this;this.queryDataList.forEach((function(n){e.isInArray(t,n.indexFlag)?(e.$set(n,"disabled",!1),e.$set(n,"_checked",!0)):(e.$set(n,"disabled",!0),e.$set(n,"_checked",!1))}))},e.prototype.onQueryChange=function(){var t=this;this.hasQueryMidChecked||this.hasQueryChecked?this.queryDataList.forEach((function(e){t.$set(e,"disabled",!0),t.$set(e,"_checked",!1)})):this.queryDataList.forEach((function(e){t.$set(e,"disabled",!1),t.$set(e,"_checked",!0)})),this.buildQueryCheckedState()},e.prototype.onBodyChange=function(){var t=this;this.hasBodyMidChecked||this.hasBodyChecked?this.bodyDataList.forEach((function(e){t.$set(e,"disabled",!0),t.$set(e,"_checked",!1)})):this.bodyDataList.forEach((function(e){t.$set(e,"disabled",!1),t.$set(e,"_checked",!0)})),this.buildBodyCheckedState()},e.prototype.onBodySelectionChange=function(t){var e=this;this.bodyDataList.forEach((function(n){e.isInArray(t,n.indexFlag)?(e.$set(n,"disabled",!1),e.$set(n,"_checked",!0)):(e.$set(n,"disabled",!0),e.$set(n,"_checked",!1))}))},e.prototype.isInArray=function(t,e){for(var n=!1,i=0,r=t;i<r.length;i++){var o=r[i];if(o.indexFlag===e){n=!0;break}}return n},e.prototype.showScriptDoc=function(){return h(this,void 0,void 0,(function(){var t;return f(this,(function(e){switch(e.label){case 0:return[4,this.service.getScriptDoc1()];case 1:return t=e.sent(),t?(this.scriptDoc=t,this.scriptDocShow=!0):this.$message.error("获取说明文档失败"),[2]}}))}))},d([Object(y["config"])({default:function(){return new ze}})],e.prototype,"interfaceModel",void 0),d([Object(y["config"])({default:function(){return new FormData}})],e.prototype,"formData",void 0),d([O(De)],e.prototype,"service",void 0),d([Object(y["watch"])("interfaceModel",{immediate:!0})],e.prototype,"init",null),e=d([Object(y["component"])({template:n("7640"),components:{"u-editor":en,"u-doc-modal":st}})],e),e}(Je)),hn=dn,fn=(n("2a79"),n("b156"),n("61ef"),function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return p(e,t),d([Object(y["config"])({default:""})],e.prototype,"tips",void 0),d([Object(y["config"])({default:""})],e.prototype,"labelTitle",void 0),d([Object(y["config"])({type:Boolean,default:!1})],e.prototype,"labelColon",void 0),e=d([Object(y["component"])({template:n("2f53")})],e),e}(y["Component"])),mn=fn,yn=(n("1a93"),function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.securityList=[],e.keyword="",e.currentSecurityItem={},e.securityTypeList=[],e.grantTypeList=[],e.tokenLocationTypeList=[],e.isAddOnce=!1,e.exitAddItem=!1,e.scriptDocShow=!1,e.scriptDoc="",e.diyKeywordList=[],e.isEmpty=!0,e.onFilter=_e()((function(){e.getSecurityList()}),300),e}return p(e,t),Object.defineProperty(e.prototype,"show",{get:function(){return this.value},set:function(t){this.$emit("input",t)},enumerable:!1,configurable:!0}),e.prototype.onShowChange=function(t){return h(this,void 0,void 0,(function(){return f(this,(function(e){return t?(this.isAddOnce=this.isAdd,this.getSecurityTypeList(),this.getSecurityList(),this.getTokenLocationTypeList(),this.getGrantTypeList(),this.queryDiyKeyword()):(this.keyword="",this.currentSecurityItem={}),[2]}))}))},e.prototype.queryDiyKeyword=function(){return h(this,void 0,void 0,(function(){var t,e,n;return f(this,(function(i){switch(i.label){case 0:return[4,this.service.preScript()];case 1:return t=i.sent(),e=t||{},n=[],null===e||void 0===e||e.group.forEach((function(t){"业务案例"!==t.name&&t.list.forEach((function(e){n.push({meta:t.name,caption:e.code,value:e.code,score:1})}))})),this.diyKeywordList=n,[2]}}))}))},e.prototype.getSecurityTypeList=function(){return h(this,void 0,void 0,(function(){var t,e;return f(this,(function(n){switch(n.label){case 0:return[4,this.service.getEnumByType("authenticationType")];case 1:return t=n.sent(),e=(null===t||void 0===t?void 0:t.result)||[],this.securityTypeList=e.filter((function(t){return"None"!==t.name})),[2]}}))}))},e.prototype.getTokenLocationTypeList=function(){return h(this,void 0,void 0,(function(){var t;return f(this,(function(e){switch(e.label){case 0:return[4,this.service.getEnumByType("tokenLocationType")];case 1:return t=e.sent(),this.tokenLocationTypeList=(null===t||void 0===t?void 0:t.result)||[],[2]}}))}))},e.prototype.getGrantTypeList=function(){return h(this,void 0,void 0,(function(){var t;return f(this,(function(e){switch(e.label){case 0:return[4,this.service.getEnumByType("grantType")];case 1:return t=e.sent(),this.grantTypeList=(null===t||void 0===t?void 0:t.result)||[],[2]}}))}))},e.prototype.getSecurityList=function(){return h(this,void 0,void 0,(function(){var t,e,n,i=this;return f(this,(function(r){switch(r.label){case 0:return[4,this.service.getSecurityList({name:this.keyword,projectId:this.projectID})];case 1:return t=r.sent(),(null===t||void 0===t?void 0:t.hasError)||(e=t.result||[],this.securityList=e.map((function(t){return"GROOVY_SCRIPT"!==t.type?t.content=JSON.parse(t.content):(t.scriptContent=t.content,t.content={}),t})),(this.isAddOnce||this.exitAddItem)&&(this.onAddItem(),this.isAddOnce=!1,this.exitAddItem=!1),this.currentSecurityItem&&this.currentSecurityItem.id?(n=this.securityList.filter((function(t){return t.id===i.currentSecurityItem.id})),this.onSelectSecurityItem(n[0]||this.securityList[0])):this.securityList.length&&this.onSelectSecurityItem(this.securityList[0])),[2]}}))}))},e.prototype.onSelectSecurityItem=function(t){this.currentSecurityItem=t.$clone()},e.prototype.onEmpty=function(t){this.isEmpty=!!t},e.prototype.onDelete=function(t){return h(this,void 0,void 0,(function(){var e;return f(this,(function(n){switch(n.label){case 0:return t.id?(this.securityList.find((function(t){return!t.id}))&&(this.exitAddItem=!0),[4,this.service.deleteSecurityItem(t.id)]):[3,2];case 1:return e=n.sent(),(null===e||void 0===e?void 0:e.hasError)||this.getSecurityList(),[3,3];case 2:this.securityList.shift(),n.label=3;case 3:return this.securityList.length&&this.onSelectSecurityItem(this.securityList[0]),this.$publish("api://security-list-refresh"),[2]}}))}))},e.prototype.onAddItem=function(){if(!(this.securityList.length>0)||this.securityList[0].id){var t={name:"",type:"GROOVY_SCRIPT",content:{},scriptContent:""};this.securityList.unshift(t),this.currentSecurityItem=this.securityList[0].$clone()}},e.prototype.onCancel=function(){this.show=!1,this.keyword="",this.currentSecurityItem={}},e.prototype.onSave=function(){return h(this,void 0,void 0,(function(){var t,e;return f(this,(function(n){switch(n.label){case 0:return t={projectId:this.projectID,name:this.currentSecurityItem.name,type:this.currentSecurityItem.type},"GROOVY_SCRIPT"===this.currentSecurityItem.type?(t.location=null,t.locationKey=null,t.content=this.currentSecurityItem.scriptContent):(t.location=this.currentSecurityItem.location,t.locationKey=this.currentSecurityItem.locationKey,t.content={},"Api_Key"===this.currentSecurityItem.type?t.content.key=this.currentSecurityItem.content.key:"Base_Auth"===this.currentSecurityItem.type?(t.content.username=this.currentSecurityItem.content.username,t.content.password=this.currentSecurityItem.content.password):"OAuth2"===this.currentSecurityItem.type&&(t=u(u({},t),this.currentSecurityItem),"password"!==this.currentSecurityItem.content.grantType&&(delete t.content.password,delete t.content.username)),t.content=JSON.stringify(t.content)),t.name?t.type?(e=null,this.currentSecurityItem.id?(t.id=this.currentSecurityItem.id,t.createTime=this.currentSecurityItem.createTime,[4,this.service.updateSecurityItem(t)]):[3,2]):[2,this.$message.warning("请选择授权类型!")]:[2,this.$message.warning("请填写授权名称!")];case 1:return e=n.sent(),[3,4];case 2:return[4,this.service.addSecurityItem(t)];case 3:e=n.sent(),n.label=4;case 4:return(null===e||void 0===e?void 0:e.hasError)||(this.getSecurityList(),this.$publish("api://security-list-refresh")),[2]}}))}))},e.prototype.showScriptDoc=function(){return h(this,void 0,void 0,(function(){var t;return f(this,(function(e){switch(e.label){case 0:return[4,this.service.getScriptDoc()];case 1:return t=e.sent(),t?(this.scriptDoc=t,this.scriptDocShow=!0):this.$message.error("获取帮助文档失败"),[2]}}))}))},d([O(De)],e.prototype,"service",void 0),d([Object(y["config"])({type:Boolean,default:!0})],e.prototype,"value",void 0),d([Object(y["config"])({type:String,default:""})],e.prototype,"projectID",void 0),d([Object(y["config"])({type:Boolean,default:!1})],e.prototype,"isAdd",void 0),d([Object(y["watch"])("show")],e.prototype,"onShowChange",null),d([Object(y["watch"])("securityList.length",{immediate:!0})],e.prototype,"onEmpty",null),e=d([Object(y["component"])({template:n("3bf8"),components:{"u-tips-form-label":mn,"u-doc-modal":st,"u-editor":mt}})],e),e}(y["Component"])),vn=yn,gn=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.securityList=[],e.currentSecurityItem={},e.currentSecurityItemId="",e.showSecurity=!1,e.isAdd=!0,e.grantTypeList=[],e}return p(e,t),e.prototype.mounted=function(){var t;return h(this,void 0,void 0,(function(){var e=this;return f(this,(function(n){switch(n.label){case 0:return this.getGrantTypeList(),[4,this.getSecurityList()];case 1:return n.sent(),this.currentSecurityID?this.currentSecurityItemId=this.currentSecurityID:(null===(t=this.interfaceModel.authentication)||void 0===t?void 0:t.id)&&(this.currentSecurityItemId=this.interfaceModel.authentication.id),this.currentSecurityItem=this.securityList.find((function(t){return t.id===e.currentSecurityItemId}))||{},[2]}}))}))},e.prototype.getGrantTypeList=function(){return h(this,void 0,void 0,(function(){var t,e=this;return f(this,(function(n){switch(n.label){case 0:return[4,this.service.getEnumByType("grantType")];case 1:return t=n.sent(),this.grantTypeList=(null===t||void 0===t?void 0:t.result)||[],this.$subscribe("api://security-list-refresh",(function(t){return h(e,void 0,void 0,(function(){var e,n,i,r=this;return f(this,(function(o){switch(o.label){case 0:return e=t.get("isBatchRefresh")||!1,[4,this.getSecurityList()];case 1:return o.sent(),this.currentSecurityID?this.currentSecurityItemId=this.currentSecurityID:(null===(n=this.interfaceModel.authentication)||void 0===n?void 0:n.id)&&(this.currentSecurityItemId=this.interfaceModel.authentication.id),(null===(i=this.interfaceModel.authentication)||void 0===i?void 0:i.id)&&e&&(this.currentSecurityItemId=this.interfaceModel.authentication.id),this.currentSecurityItem=this.securityList.find((function(t){return t.id===r.currentSecurityItemId}))||{},this.onChangeSecurityItem(this.currentSecurityItemId),[2]}}))}))})),[2]}}))}))},e.prototype.findGrantTypeText=function(t){var e=this.grantTypeList.find((function(e){return e.name===t}));return e?e.text:""},e.prototype.getSecurityList=function(){return h(this,void 0,void 0,(function(){var t,e;return f(this,(function(n){switch(n.label){case 0:return[4,this.service.getSecurityList({projectId:this.projectID})];case 1:return t=n.sent(),(null===t||void 0===t?void 0:t.hasError)||(e=t.result||[],this.securityList=e.map((function(t){return"GROOVY_SCRIPT"!==t.type?t.content=JSON.parse(t.content):(t.scriptContent=t.content,t.content={}),t}))),[2]}}))}))},e.prototype.onChangeSecurityItem=function(t){this.$emit("on-current-id",t),t?(this.currentSecurityItem=this.securityList.find((function(e){return e.id===t})),this.interfaceModel.authentication=this.interfaceModel.authentication||new Ve,this.interfaceModel.authentication.type=this.currentSecurityItem.type,this.interfaceModel.authentication.location=this.currentSecurityItem.location,this.interfaceModel.authentication.locationKey=this.currentSecurityItem.locationKey,"GROOVY_SCRIPT"===this.currentSecurityItem.type?this.interfaceModel.authentication.content=this.currentSecurityItem.scriptContent:this.interfaceModel.authentication.content=JSON.stringify(this.currentSecurityItem.content)):this.interfaceModel.authentication={type:"",location:"",locationKey:"",content:"",id:""},this.interfaceModel.info.authId=this.currentSecurityItem.id},e.prototype.onAddSecurityItem=function(){this.$refs.addSecuritySelect.visible=!1,this.showSecurity=!0},e.prototype.onClear=function(){this.currentSecurityItem={}},d([O(De)],e.prototype,"service",void 0),d([Object(y["config"])({default:function(){return new ze}})],e.prototype,"interfaceModel",void 0),d([Object(y["config"])({type:String,default:""})],e.prototype,"projectID",void 0),d([Object(y["config"])({type:String,default:""})],e.prototype,"currentSecurityID",void 0),e=d([Object(y["component"])({template:n("3de4"),components:{"u-tips-form-label":mn,"u-security-modal":vn}})],e),e}(y["Component"]),bn=gn,wn=(n("0a2e"),function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.columns=[{title:"次数",key:"header",width:"100"},{title:"5",key:"five"},{title:"6",key:"six"},{title:"7",key:"seven"},{title:"8",key:"eight"},{title:"9",key:"nine"},{title:"10",key:"ten"}],e.data=[{header:"覆盖范围",five:"1h",six:"2h",seven:"4h",eight:"8h",nine:"16h",ten:"32h"}],e}return p(e,t),d([Object(y["config"])({default:""})],e.prototype,"tips",void 0),d([Object(y["config"])({default:""})],e.prototype,"labelTitle",void 0),d([Object(y["config"])({default:520})],e.prototype,"width",void 0),d([Object(y["config"])({type:Boolean,default:!1})],e.prototype,"labelColon",void 0),e=d([Object(y["component"])({template:n("dc41")})],e),e}(y["Component"])),xn=wn;(function(t){t["Private"]="0",t["Public"]="1",t["Protected"]="2"})(fe||(fe={})),function(t){t["PlateForm"]="1",t["Email"]="2",t["CopyDisk"]="3",t["MediumExchange"]="4"}(me||(me={})),function(t){t["ElectronicFile"]="1",t["ElectronicExcel"]="2",t["Database"]="3",t["GraphicImage"]="4",t["StreamingMedia"]="5"}(ye||(ye={})),function(t){t["Realtime"]="1",t["Daily"]="2",t["Weekly"]="3",t["Monthly"]="4",t["Quarterly"]="5",t["Annually"]="6",t["Irregular"]="7",t["Other"]="8"}(ve||(ve={})),function(t){t["Unreleased"]="0",t["Released"]="1"}(ge||(ge={}));var Sn=[{value:0,name:"否"},{value:1,name:"是"}],In=[{value:0,name:"不记录"},{value:1,name:"记录全部"},{value:2,name:"记录失败"}];n("06a8");function kn(t){var e=Cn();return"".concat(e,"/api/exchange/").concat(t)}function Cn(){var t=window.commonSetting.baseUrl||"",e="";return e=t&&t.startsWith("https://")||t.startsWith("http://")?"".concat(t):t&&t.startsWith("/")?"".concat(window.location.origin).concat(t):t?"".concat(window.location.origin,"/").concat(t):"".concat(window.location.origin),e}var jn=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.egovaApiTree=[],e.projectList=[],e.model={name:"",code:"",categoryId:"",retryTimes:"",description:"",enableRetry:"false",authFlag:1,logSavingEnabled:2},e.apiModel={},e.apiTree=[],e.apiColumns=[{title:"参数名称",key:"name",align:"left",ellipsis:!0,tooltip:!0},{title:"参数值",key:"valueContent",align:"left",ellipsis:!0,tooltip:!0}],e.apiParamList=[],e.isRetryList=[{name:"是",value:"true"},{name:"否",value:"false"}],e.statusCodeList=[{name:"默认(502,504)",value:"1"},{name:"自定义",value:"2"}],e.statusCode="1",e.authFlag=Sn,e.loginLevelFlag=In,e.isResourceCodeEnabled=!1,e.rulesValidate={},e.isNameValid=!1,e.isCategoryIdValid=!1,e.isCodeValid=!1,e.isDesValid=!1,e.isRetryTimesValid=!1,e.isRetryCodeValid=!1,e.isRetryTimesReadonly=!1,e.isDeatilPage=!1,e.readonly=!1,e.formTitle="流程配置详情",e.categoryList=[],e.isAdding=!1,e.proxyName="",e.proxyList=[],e}return p(e,t),e.prototype.onStatusCodeChange=function(t){var e=this;"2"!==t&&(this.model.retryCode="",this.isRetryCodeValid=!0,this.$nextTick((function(){e.$refs.configform&&e.$refs.configform.validateField("retryCode",(function(){}))}))),"2"===t&&this.$nextTick((function(){e.$refs.configform&&e.$refs.configform.validateField("retryCode")}))},e.prototype.changeInputStatus=function(){this.isResourceCodeEnabled=Boolean(this.model.authFlag)},Object.defineProperty(e.prototype,"url",{get:function(){return kn(this.model.code||"")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"show",{get:function(){return this.value},set:function(t){this.$emit("input",t)},enumerable:!1,configurable:!0}),e.prototype.onSave=function(){var t,e=this;this.model.logSavingEnabled&&"false"!==this.model.enableRetry||(this.isRetryTimesValid=!0),null===(t=this.$refs.configform)||void 0===t||t.validate((function(t){return h(e,void 0,void 0,(function(){var e;return f(this,(function(n){return t?(e=u(u({},this.model),this.apiModel),this.$emit("on-save",e),[2]):[2,this.$message.warning("请完善配置信息")]}))}))}))},e.prototype.onCancel=function(){this.show=!1},e.prototype.mounted=function(){return h(this,void 0,void 0,(function(){return f(this,(function(t){return this.getEgovaApiTree(),this.getProjectList(),this.getCategoryList(),this.apiModel.projectId=this.info.projectId,this.apiModel.type="API",this.rulesValidate={categoryId:[{validator:this.validateCategoryId,trigger:"blur,change"}],name:[{validator:this.validateName,required:!1,trigger:"blur,change"}],code:[{validator:this.validateCode,required:!1,trigger:"blur,change"}],description:[{validator:this.validateDescription,required:!1,trigger:"blur,change"}],retryTimes:[{validator:this.validateRetryTimes,trigger:"blur,change"}],retryCode:[{validator:this.validateRetryCode,trigger:"blur,change"}]},[2]}))}))},e.prototype.validateCategoryId=function(t,e,n){e?(this.isCategoryIdValid=!0,n()):(this.isCategoryIdValid=!1,n(new Error("请选择所属分类")))},e.prototype.validateName=function(t,e,n){var i=String(e||"").trim();i?i.length>50?(this.isNameValid=!1,n(new Error("代理名称长度不能超过50"))):(this.isNameValid=!0,n()):(this.isNameValid=!1,n(new Error("请填写代理名称,不能为空")))},e.prototype.validateCode=function(t,e,n){var i=String(e||"").trim();i?i.length>80?(this.isCodeValid=!1,n(new Error("接口编码长度不能超过80"))):(this.isCodeValid=!0,n()):(this.isCodeValid=!1,n(new Error("请填写接口编码,不能为空")))},e.prototype.validateDescription=function(t,e,n){e&&e.length>150?(this.isDesValid=!1,n(new Error("描述长度不能超过150"))):(this.isDesValid=!0,n())},e.prototype.validateRetryTimes=function(t,e,n){if("false"===this.model.enableRetry)return this.isRetryTimesValid=!0,void n();var i=/(^[1-9]\d*$)/;i.test(e)?(this.isRetryTimesValid=!0,n()):(this.isRetryTimesValid=!1,n(new Error("请输入正整数")))},e.prototype.validateRetryCode=function(t,e,n){if("2"===this.statusCode)if(e&&""!==e.trim()){var i=e.split(",").map((function(t){return t.trim()})),r=i.every((function(t){return/^\d+$/.test(t)}));r?(this.isRetryCodeValid=!0,n()):(this.isRetryCodeValid=!1,n(new Error("格式不正确,为数字或英文逗号分隔的数字")))}else this.isRetryCodeValid=!1,n(new Error("请输入状态码"));else this.isRetryCodeValid=!0,n()},e.prototype.onLogSavingEnabledChange=function(t){this.model.logSavingEnabled=t},e.prototype.getCategoryList=function(){return h(this,void 0,void 0,(function(){var t,e;return f(this,(function(n){switch(n.label){case 0:return[4,this.service.getCategoryList()];case 1:return t=n.sent(),t&&!t.hasError&&(e=(null===t||void 0===t?void 0:t.result)||[],e.length>0?(e.forEach((function(t){t.parentId||(t.parentId="virtual_root_directory")})),this.categoryList=[u(u({},e[0]),{id:"virtual_root_directory",children:e,name:"全部",expand:!0,parentId:null,parentName:null})]):this.categoryList=[{id:"virtual_root_directory",children:e,name:"全部",expand:!0,parentId:null,parentName:null}]),[2]}}))}))},e.prototype.getEgovaApiTree=function(){return h(this,void 0,void 0,(function(){var t;return f(this,(function(e){switch(e.label){case 0:return[4,this.service.getEgovaApiTree()];case 1:return t=e.sent(),this.egovaApiTree=(null===t||void 0===t?void 0:t.result)||[],[2]}}))}))},e.prototype.getProjectList=function(){return h(this,void 0,void 0,(function(){var t;return f(this,(function(e){switch(e.label){case 0:return[4,this.service.getProjectList()];case 1:return t=e.sent(),this.projectList=(null===t||void 0===t?void 0:t.result)||[],[2]}}))}))},e.prototype.freshApiTree=function(){var t,e;return h(this,void 0,void 0,(function(){var n,i;return f(this,(function(r){switch(r.label){case 0:if(!this.proxyName){try{null===(e=null===(t=this.$refs.configform)||void 0===t?void 0:t.resetFields)||void 0===e||e.call(t)}catch(o){console.warn("resetFields 执行失败:",o)}this.resetForm()}return this.show?this.apiModel.projectId&&this.show?(this.apiTree=this.projectTree||[],this.apiModel.typeId=this.info.id,this.onApiTreeSelect(this.info),[4,this.service.getApiRequestParams(this.apiModel.typeId)]):[2]:(this.readonly=!1,this.isAdding=!1,this.formTitle="流程配置详情",this.proxyName="",[2]);case 1:return n=r.sent(),this.apiParamList=(null===n||void 0===n?void 0:n.result.filter((function(t){return!t.disabled})))||[],[4,this.service.getProxyNameList(this.info.id)];case 2:return i=r.sent(),this.proxyList=(null===i||void 0===i?void 0:i.result)||[],[2]}}))}))},e.prototype.enableRetryChange=function(t,e){var n,i;"false"===t?(null===(n=this.$refs.configform)||void 0===n||n.validateField("retryTimes"),this.isRetryTimesReadonly=!0,this.model.retryTimes=void 0):"null"===t?(this.model.enableRetry="false",this.model.retryTimes=void 0,null===(i=this.$refs.configform)||void 0===i||i.validateField("retryTimes"),this.isRetryTimesReadonly=!0):this.isRetryTimesReadonly=!1},e.prototype.resetFields=function(){var t,e;if(this.proxyName||this.isAdding){try{null===(e=null===(t=this.$refs.configform)||void 0===t?void 0:t.resetFields)||void 0===e||e.call(t)}catch(n){}this.isAdding&&this.resetForm()}},e.prototype.onApiTreeSelect=function(t){var e;this.apiModel.path=(null!==(e=null===t||void 0===t?void 0:t.path)&&void 0!==e?e:null===t||void 0===t?void 0:t.url)||""},e.prototype.selectProxyName=function(t){this.formTitle="流程配置详情";var e=this.proxyList.filter((function(e){return e.id===t.value}))[0];this.model=u({},e),this.statusCode=this.model.retryCode?"2":"1",!0===this.model.enableRetry?this.model.enableRetry="true":!1===this.model.enableRetry&&(this.model.enableRetry="false"),this.isAdding=!1},e.prototype.selectCategory=function(t){this.model.categoryId=t.id},e.prototype.onCopy=function(t){var e=document.createElement("textarea");try{e.value=t,document.body.appendChild(e),e.select(),document.execCommand("Copy"),this.$message.success("复制成功")}catch(n){}finally{e.remove()}},e.prototype.resetForm=function(){this.model={name:this.info.name,code:"",categoryId:"",description:"",retryTimes:"",enableRetry:"false",authFlag:1,logSavingEnabled:2}},e.prototype.onAdd=function(){this.isAdding=!0,this.statusCode="1",this.proxyName="",this.formTitle="新增流程配置"},d([Object(y["config"])({type:Boolean,default:!1})],e.prototype,"value",void 0),d([Object(y["autowired"])(De)],e.prototype,"service",void 0),d([Object(y["config"])({type:Boolean,default:!1})],e.prototype,"loading",void 0),d([Object(y["config"])({type:Object,default:{}})],e.prototype,"info",void 0),d([Object(y["config"])({type:Array,default:[]})],e.prototype,"projectTree",void 0),d([Object(y["watch"])("statusCode",{immediate:!0})],e.prototype,"onStatusCodeChange",null),d([Object(y["watch"])("model.authFlag",{immediate:!0})],e.prototype,"changeInputStatus",null),d([Object(y["watch"])("show")],e.prototype,"freshApiTree",null),d([Object(y["watch"])("model.enableRetry",{immediate:!0})],e.prototype,"enableRetryChange",null),d([Object(y["watch"])("isAdding",{immediate:!0})],e.prototype,"resetFields",null),e=d([Object(y["component"])({template:n("40aa"),components:{"u-tree-selector":J,"tips-table-label":xn}})],e),e}(y["Component"]),Dn=jn,On=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.response=new nn,e.responseCache=new Map,e.loading=!1,e.showEnvironmentModal=!1,e.currentId="",e.paramList=[],e.errorLine=null,e.scriptView=!1,e.originId="",e.apiForm={envName:null,authName:null},e.showImportModal=!1,e.importObj={},e.showDrawer=!1,e.typeList=[{value:"GET",text:"GET"},{value:"POST",text:"POST"},{value:"PUT",text:"PUT"},{value:"DELETE",text:"DELETE"}],e.requertSettingTypeList=[{title:"参数",name:"params"},{title:"Headers",name:"headers"},{title:"授权管理",name:"v2security"},{title:"前置脚本",name:"pre-execution"},{title:"后置转换",name:"after-execution-transfer"},{title:"后置脚本",name:"after-execution-script"}],e.rules={envName:[{required:!1,validator:e.validateEnvName,trigger:"blur"}],authName:[{required:!1,validator:e.validateAuthName,trigger:"blur"}]},e.currentRequestSettingType=e.requertSettingTypeList[0],e.formData=new FormData,e}return p(e,t),e.prototype.mounted=function(){this.getEnvironmentParamList()},e.prototype.onClickRequertSettingTpye=function(t){this.currentRequestSettingType=t},e.prototype.onClickRequertSettingSubTpye=function(t,e){this.currentRequestSettingType=t.children.find((function(t){return t.name===e}))},e.prototype.onRun=function(){var t,e,n,i,r,o;return h(this,void 0,void 0,(function(){var a,s,c,l,p,d,h,m=this;return f(this,(function(f){switch(f.label){case 0:return this.loading=!0,a=[],s=[],(null===(t=this.interfaceModel.formParams)||void 0===t?void 0:t.length)>0&&(a=this.interfaceModel.formParams.filter((function(t){return!t.disabled}))),(null===(e=this.interfaceModel.requestHeaders)||void 0===e?void 0:e.length)>0&&(s=this.interfaceModel.requestHeaders.filter((function(t){return!t.disabled}))),(null===(n=this.interfaceModel.environmentParam)||void 0===n?void 0:n.length)||(c=this.paramList.findIndex((function(t){return t.id===m.interfaceModel.info.envId})),this.interfaceModel.environmentParam=c>-1?this.paramList[c]:null),l=null,p=a.filter((function(t){return"FILE"===t.valueType})),p.length?(d=u(u({},this.interfaceModel),{formParams:a,requestHeaders:s}),h=new FormData,p.forEach((function(t){h.append(t.name,m.formData.get(t.indexFlag))})),h.append("_model",JSON.stringify(d)),[4,this.service.runWithFile(this.interfaceModel.info.id,h)]):[3,2];case 1:return l=f.sent(),[3,4];case 2:return[4,this.service.run(this.interfaceModel.info.id,u(u({},this.interfaceModel),{formParams:a,requestHeaders:s}))];case 3:l=f.sent(),f.label=4;case 4:return this.loading=!1,this.response=(null===l||void 0===l?void 0:l.result)||new nn,l.hasError&&(this.response.code=400,this.response.errorMessage=l.message),this.responseCache.set(this.interfaceModel.info.id,this.response),(null===(i=this.response.errorLineNumbers)||void 0===i?void 0:i.length)?this.errorLine=this.response.errorLineNumbers:this.errorLine=null,this.originId=(null===(o=null===(r=this.interfaceModel)||void 0===r?void 0:r.info)||void 0===o?void 0:o.id)||"",[2]}}))}))},e.prototype.onProcessSave=function(t){return h(this,void 0,void 0,(function(){return f(this,(function(e){switch(e.label){case 0:return this.loading=!0,[4,this.service.save(t)];case 1:return e.sent(),this.loading=!1,this.showDrawer=!1,[2]}}))}))},e.prototype.onSave=function(){return h(this,void 0,void 0,(function(){var t;return f(this,(function(e){switch(e.label){case 0:return this.loading=!0,t=this.interfaceModel.$clone(),t.name&&t.name!==t.info.name&&(t.info.name=t.name),[4,this.service.saveApiInfo(t)];case 1:return e.sent(),this.$publish("api://project-detail-save"),this.loading=!1,[2]}}))}))},e.prototype.interfaceModelChange=function(){this.response=this.responseCache.get(this.interfaceModel.info.id)||new nn},e.prototype.showImportModalChange=function(t){t||this.$refs.import.resetFields()},e.prototype.onImport=function(t){return h(this,void 0,void 0,(function(){var e,n=this;return f(this,(function(i){return e=new FileReader,e.readAsText(t,"UTF-8"),e.onload=function(t){return h(n,void 0,void 0,(function(){var e,n,i,r,o,a,s,c;return f(this,(function(l){e=t.target.result,n=null;try{n=JSON.parse(e),this.importObj=n}catch(p){return this.$message.error("JSON格式有误"),[2,!1]}return(null===(i=null===n||void 0===n?void 0:n.authentication)||void 0===i?void 0:i.name)||(null===(r=null===n||void 0===n?void 0:n.environmentParam)||void 0===r?void 0:r.name)?(this.apiForm.envName=(null===(o=null===n||void 0===n?void 0:n.environmentParam)||void 0===o?void 0:o.name)?null===(a=null===n||void 0===n?void 0:n.environmentParam)||void 0===a?void 0:a.name:null,this.apiForm.authName=(null===(s=null===n||void 0===n?void 0:n.authentication)||void 0===s?void 0:s.name)?null===(c=null===n||void 0===n?void 0:n.authentication)||void 0===c?void 0:c.name:null,this.showImportModal=!0):this.saveImportData(n),[2]}))}))},[2,!1]}))}))},e.prototype.saveImportData=function(t){var e,n;return h(this,void 0,void 0,(function(){var i,r,o;return f(this,(function(a){switch(a.label){case 0:return(null===(e=null===t||void 0===t?void 0:t.authentication)||void 0===e?void 0:e.name)||(null===(n=null===t||void 0===t?void 0:t.environmentParam)||void 0===n?void 0:n.name)?[4,this.$refs.import.validate()]:[3,2];case 1:if(i=a.sent(),!i)return this.$message.warning("验证不通过"),[2];a.label=2;case 2:return r=this.interfaceModel.info.id,t.id=r,t.info.id=r,t.info.name=this.interfaceModel.info.name,t.info.projectId=this.projectId,t.info.categoryId=this.interfaceModel.info.categoryId,t.authentication&&(t.authentication.projectId=this.projectId),t.authentication&&(t.authentication.name=this.apiForm.authName),t.environmentParam&&(t.environmentParam.projectId=this.projectId),t.environmentParam&&(t.environmentParam.name=this.apiForm.envName),t.convertConfig&&(t.convertConfig.apiId=r),["fieldMappings","postScripts","preScripts","queryParams","formParams"].forEach((function(e){null===t||void 0===t||t[e].forEach((function(t){t.apiId=r}))})),null===t||void 0===t||t.requestHeaders.forEach((function(t){t.belongId=r})),[4,this.service.onImportAvr(t)];case 3:return o=a.sent(),(null===o||void 0===o?void 0:o.hasError)?[2]:(this.showImportModal=!1,this.getEnvironmentParamList(),this.$publish("api://project-detail-save-import"),[2])}}))}))},e.prototype.onExport=function(){var t=JSON.stringify(this.interfaceModel,null,4),e=window.URL||window.webkitURL||window,n=new Blob([t]),i=document.createElement("a");i.href=e.createObjectURL(n),i.download=this.interfaceModel.info.name,i.click()},e.prototype.validateEnvName=function(t,e,n){var i,r,o,a,s;return h(this,void 0,void 0,(function(){var t;return f(this,(function(e){switch(e.label){case 0:return[4,this.service.onValidateImport({projectId:this.projectId,envName:(null===(i=this.apiForm)||void 0===i?void 0:i.envName)?null===(r=this.apiForm)||void 0===r?void 0:r.envName:null,authName:(null===(o=this.apiForm)||void 0===o?void 0:o.authName)?null===(a=this.apiForm)||void 0===a?void 0:a.authName:null})];case 1:return t=e.sent(),(null===t||void 0===t?void 0:t.hasError)||(null===(s=null===t||void 0===t?void 0:t.result)||void 0===s?void 0:s.envNameRepeat)?n(new Error("环境变量名重复")):n(),[2]}}))}))},e.prototype.validateAuthName=function(t,e,n){var i,r,o,a,s;return h(this,void 0,void 0,(function(){var t;return f(this,(function(e){switch(e.label){case 0:return[4,this.service.onValidateImport({projectId:this.projectId,envName:(null===(i=this.apiForm)||void 0===i?void 0:i.envName)?null===(r=this.apiForm)||void 0===r?void 0:r.envName:null,authName:(null===(o=this.apiForm)||void 0===o?void 0:o.authName)?null===(a=this.apiForm)||void 0===a?void 0:a.authName:null})];case 1:return t=e.sent(),(null===t||void 0===t?void 0:t.hasError)||(null===(s=null===t||void 0===t?void 0:t.result)||void 0===s?void 0:s.authNameRepeat)?n(new Error("授权名重复")):n(),[2]}}))}))},e.prototype.cancleModify=function(){this.$refs.import.resetFields(),this.showImportModal=!1},e.prototype.onVersion=function(){var t=(this.interfaceModel.info||{}).id;t?this.$router.push({name:"project-version",query:{id:t}}):this.$message.info("尚未保存,无历史版本")},e.prototype.onCurrentId=function(t){this.currentId=t},e.prototype.getEnvironmentParamList=function(){return h(this,void 0,void 0,(function(){var t;return f(this,(function(e){switch(e.label){case 0:return[4,this.service.getVariableList({projectId:this.projectId})];case 1:return t=e.sent(),(null===t||void 0===t?void 0:t.hasError)||(this.paramList=t.result),[2]}}))}))},e.prototype.onAddEnvParam=function(){this.$refs.addEnvParamSelect.visible=!1,this.showEnvironmentModal=!0},e.prototype.onScriptRun=function(){return h(this,void 0,void 0,(function(){return f(this,(function(t){switch(t.label){case 0:return[4,this.onRun()];case 1:return t.sent(),[2]}}))}))},e.prototype.onScriptMax=function(t){this.scriptView=t},e.prototype.onProcess=function(){this.showDrawer=!0},d([O(De)],e.prototype,"service",void 0),d([Object(y["config"])({default:function(){return new ze}})],e.prototype,"interfaceModel",void 0),d([Object(y["config"])({default:!0})],e.prototype,"lengthwise",void 0),d([Object(y["config"])({default:""})],e.prototype,"projectId",void 0),d([Object(y["config"])({default:{}})],e.prototype,"projectTree",void 0),d([Object(y["watch"])("interfaceModel",{immediate:!0})],e.prototype,"interfaceModelChange",null),d([Object(y["watch"])("showImportModal")],e.prototype,"showImportModalChange",null),e=d([Object(y["component"])({template:n("f40e"),components:{response:on,params:hn,headers:ln,"pre-execution":Ye,"after-execution-transfer":sn,"after-execution-script":Ze,v2security:bn,"u-environment-modal":Be,"u-process-drawer":Dn}})],e),e}(y["Component"]),Tn=On,En=(n("948e"),function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.visible=!1,e}return p(e,t),e.prototype.onSelect=function(t,e){this.$emit("on-select",e),this.visible=!1},e.prototype.onClear=function(){this.onSelect([],{})},e.prototype.renderContent=function(t,e){e.root,e.node;var n=e.data;return t("div",{class:"group-select-tree-node"},[t("i",{attrs:{class:"api-icon icon-interface"}}),t("p",{attrs:{title:n.title,class:"api-group-select-tree-node-title"}},n.title)])},d([Object(y["config"])({default:function(){return[]}})],e.prototype,"data",void 0),d([Object(y["config"])({default:function(){return new Object}})],e.prototype,"current",void 0),d([Object(y["config"])({type:Boolean,default:!1})],e.prototype,"isSelector",void 0),e=d([Object(y["component"])({template:n("c01f"),components:{}})],e),e}(y["Component"])),Pn=En,Mn=(n("8ea2"),function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.keyword="",e.apiList=[],e.isEmpty=!0,e.allSelect=!1,e.variableList=[],e.securityList=[],e.set=new Set,e.type="env",e.formData={envId:"",authId:""},e}return p(e,t),Object.defineProperty(e.prototype,"rules",{get:function(){return"env"===this.type?{envId:[{required:!0,message:"请选择",trigger:"change"}]}:"auth"===this.type?{authId:[{required:!0,message:"请选择",trigger:"change"}]}:{envId:[{required:!0,message:"请选择",trigger:"change"}],authId:[{required:!0,message:"请选择",trigger:"change"}]}},enumerable:!1,configurable:!0}),e.prototype.onFilter=function(t){var e=this;this.apiList=this.data.$clone().filter((function(t){if(t.name.indexOf(e.keyword)>-1)return t})),this.apiList.forEach((function(t){e.set.has(t.id)&&(t.selected=!0)}))},e.prototype.onShowChange=function(t){return h(this,void 0,void 0,(function(){return f(this,(function(e){return t?(this.getVariableList(),this.apiList=this.data.$clone()):(this.allSelect=!1,this.set.clear(),this.$refs["batch-api-form"].resetFields()),[2]}))}))},e.prototype.onEmpty=function(t){this.isEmpty=!!t},e.prototype.getVariableList=function(){return h(this,void 0,void 0,(function(){var t,e;return f(this,(function(n){switch(n.label){case 0:return[4,this.service.getVariableList({projectId:this.projectId})];case 1:return t=n.sent(),[4,this.service.getSecurityList({projectId:this.projectId})];case 2:return e=n.sent(),(null===t||void 0===t?void 0:t.hasError)||(this.variableList=t.result||[]),(null===e||void 0===e?void 0:e.hasError)||(this.securityList=e.result||[]),[2]}}))}))},e.prototype.onSelect=function(t,e){t?this.set.add(e.id):this.set.delete(e.id)},e.prototype.onAllSelect=function(t){var e=this;t?this.apiList.forEach((function(t){t.selected=!0,e.set.add(t.id)})):this.apiList.forEach((function(t){t.selected=!1,e.set.delete(t.id)}))},e.prototype.onCancel=function(){this.keyword="",this.value=!1},e.prototype.onSave=function(){return h(this,void 0,void 0,(function(){var t,e,n,i;return f(this,(function(r){switch(r.label){case 0:return this.set.size?[4,this.$refs["batch-api-form"].validate()]:[2,this.$message.warning("请选择api")];case 1:return t=r.sent(),t?(e={ids:Array.from(this.set)},"env"!==this.type?[3,3]:(e.envId="empty"===this.formData.envId?"":this.formData.envId,[4,this.service.onBatchEnv(e)])):[2];case 2:return n=r.sent(),n&&!n.hasError&&(this.$message.success("保存成功!"),this.$emit("on-success",!0),this.$publish("api://batch-api-refresh",e),this.onCancel()),[2];case 3:return"auth"!==this.type?[3,5]:(e.authId="empty"===this.formData.authId?"":this.formData.authId,[4,this.service.onBatchAuth(e)]);case 4:return n=r.sent(),n&&!n.hasError&&(this.$message.success("保存成功!"),this.$publish("api://batch-api-refresh",u(u({},e),{isEnvAndAuth:!0})),this.onCancel()),[2];case 5:return[4,this.service.onBatchEnv(u(u({},e),{envId:"empty"===this.formData.envId?"":this.formData.envId}))];case 6:return n=r.sent(),[4,this.service.onBatchAuth(u(u({},e),{authId:"empty"===this.formData.authId?"":this.formData.authId}))];case 7:return i=r.sent(),(null===n||void 0===n?void 0:n.hasError)||(null===i||void 0===i?void 0:i.hasError)||(this.$message.success("保存成功!"),this.$emit("on-success",!0),this.$publish("api://batch-api-refresh",u(u({},e),{isEnvAndAuth:!0})),this.onCancel()),[2]}}))}))},d([O(De)],e.prototype,"service",void 0),d([Object(ut["PropSync"])("visiable",{default:!1})],e.prototype,"value",void 0),d([Object(y["config"])({default:[]})],e.prototype,"data",void 0),d([Object(y["config"])({default:function(){return[]}})],e.prototype,"projectId",void 0),d([Object(y["watch"])("value")],e.prototype,"onShowChange",null),d([Object(y["watch"])("data.length",{immediate:!0})],e.prototype,"onEmpty",null),e=d([Object(y["component"])({template:n("88af"),components:{}})],e),e}(y["Component"])),Ln=Mn,An=(n("688a"),function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return p(e,t),e.prototype.onClick=function(){if(this.data.children)return this.data.expand=!this.data.expand;this.$emit("on-click-interface",this.data)},Object.defineProperty(e.prototype,"isLeaf",{get:function(){return!this.data.children},enumerable:!1,configurable:!0}),e.prototype.onClickAction=function(t){t&&this.$emit("on-"+t,this.data)},e.prototype.onDelete=function(t){this.$emit("on-"+t,this.data)},d([Object(y["config"])({default:function(){return new Object}})],e.prototype,"data",void 0),e=d([Object(y["component"])({template:n("d953"),components:{"u-confirm":Yt}})],e),e}(y["Component"])),Nn=An,qn=(n("9355"),function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.projectList=[],e.data=[],e.groupTree=[],e.parent={},e.renderData=[],e.keyword="",e.type="all",e.moveType="group",e.MOVE_RESULT={BIND_JOB:"更新失败,API已被任务绑定,不允许变更项目信息",BIND_ENV:"更新失败,API存在关联环境变量,请确认变更项目信息时是否复制环境变量",BIND_NONE:"API未被任务绑定,且API不存在关联环境变量,更新成功",NOT_UPDATED_PROJECT:"API项目信息未改变,更新成功"},e.typeList=[{value:"GET",text:"GET"},{value:"POST",text:"POST"},{value:"PUT",text:"PUT"},{value:"DELETE",text:"DELETE"}],e.showInterfaceModal=!1,e.showGroupModal=!1,e.showBatchModal=!1,e.categoryApiList=[],e.interfaceModel={method:"GET",authFlag:1},e.showCopyModal=!1,e.copyName="",e.group={},e.showMoveModal=!1,e}return p(e,t),e.prototype.mounted=function(){var t=this;this.loadProjectList(),this.$subscribe("api://project-detail-save",(function(){t.init()}))},e.prototype.renderContent=function(t,e){e.root,e.node;var n=e.data;return t(Nn,{props:{data:n},on:{"on-edit-interface":this.onEditInterface,"on-delete-interface":this.onDeleteClick,"on-edit-attribute":this.onBatchEdit,"on-copy-interface":this.onCopyInterface,"on-add-interface":this.onAddInterface,"on-delete-group":this.onDeleteGroup,"on-edit-group":this.onEditGroup,"on-click-interface":this.onCheckInterface}})},e.prototype.onCheckInterface=function(t){this.$emit("on-check-interface",t)},e.prototype.onEditInterface=function(t){this.parent={id:t.parentId,name:t.parentName},this.interfaceModel=t.$clone(),this.moveType="interface",this.showInterfaceModal=!0,this.onChangeProject(!1)},e.prototype.getApis=function(t){var e,n=this;if(null===(e=null===t||void 0===t?void 0:t.apis)||void 0===e||e.forEach((function(t){n.categoryApiList.push(t)})),null===t||void 0===t?void 0:t.children)for(var i=0,r=null===t||void 0===t?void 0:t.children;i<r.length;i++){var o=r[i];this.getApis(o)}},e.prototype.onBatchEdit=function(t){var e,n;if(this.categoryApiList=[],this.getApis(t.$clone()),!(null===(e=this.categoryApiList)||void 0===e?void 0:e.length))return this.$Message.warning("该文件夹下无接口信息,无法批量修改!");null===(n=this.categoryApiList)||void 0===n||n.map((function(t){return t.selected=!1,t})),this.showBatchModal=!0},e.prototype.onDeleteInterface=function(t){return h(this,void 0,void 0,(function(){var e;return f(this,(function(n){switch(n.label){case 0:return[4,this.service.deleteApi(t.id)];case 1:return e=n.sent(),e&&!e.hasError&&(this.init(),this.$emit("on-delete-interface",t)),[2]}}))}))},e.prototype.onDeleteClick=function(t){var e=this;this.$modal.confirm({title:"确定要删除【".concat(t.name,"】吗?"),onOk:function(){return h(e,void 0,void 0,(function(){return f(this,(function(e){return this.onDeleteInterface(t),[2]}))}))}})},e.prototype.onCopyInterface=function(t){this.parent={},this.interfaceModel=t,this.copyName=this.interfaceModel.name+"_copy",this.parent.id=this.interfaceModel.categoryId,this.parent.name=this.interfaceModel.parentName,this.showCopyModal=!0},e.prototype.onCopy=function(){return h(this,void 0,void 0,(function(){var t;return f(this,(function(e){switch(e.label){case 0:return this.copyName?this.parent.name?[4,this.service.copyApi(this.interfaceModel.id,this.copyName,this.interfaceModel.projectId,this.parent.id)]:[2,this.$message.warning("请选择分组")]:[2,this.$message.warning("请填写接口名称")];case 1:if(t=e.sent(),t&&!t.hasError)this.showCopyModal=!1,this.init();else if(t&&t.hasError&&t.message)return[2,this.$message.error(t.message)];return this.interfaceModel={},this.copyName="",this.parent={},[2]}}))}))},e.prototype.onCopyCancel=function(){this.interfaceModel={},this.copyName="",this.parent={},this.showCopyModal=!1},e.prototype.onMoveCancel=function(){this.parent={},this.interfaceModel={},this.group={},this.showMoveModal=!1},e.prototype.onAddInterface=function(t){this.interfaceModel={method:"GET",authFlag:1,categoryId:t.id,projectId:this.projectId},this.parent=t,this.showInterfaceModal=!0,this.onChangeProject(!1)},e.prototype.onSaveInterface=function(){return h(this,void 0,void 0,(function(){var t,e,n;return f(this,(function(i){switch(i.label){case 0:return this.interfaceModel.categoryId=this.parent.id,this.interfaceModel.name?this.interfaceModel.categoryId?this.interfaceModel.name&&this.interfaceModel.name.length>50?(this.$message.error("接口名称长度不能超过50"),this.showInterfaceModal=!0,[2]):this.interfaceModel.id?[4,this.service.checkApi(this.interfaceModel)]:[3,2]:(this.$message.error("接口位置不能为空"),[2]):(this.$message.error("接口名称不能为空"),[2]);case 1:return t=i.sent(),t&&!t.hasError&&(e=t.result,this.showInterfaceModal=!1,["BIND_NONE","NOT_UPDATED_PROJECT"].includes(e)?(this.$message.success("保存接口成功"),this.$emit("on-reset"),this.$publish("api://project-detail-save")):"BIND_JOB"===e?this.$message.error(this.MOVE_RESULT.BIND_JOB):"BIND_ENV"===e&&(this.showMoveModal=!0)),[3,4];case 2:return[4,this.service.saveApi(this.interfaceModel)];case 3:n=i.sent(),n&&!n.hasError&&(this.showInterfaceModal=!1,this.$emit("on-edit-interface-success",this.interfaceModel),this.init()),i.label=4;case 4:return[2]}}))}))},e.prototype.onGourpCancel=function(){this.showGroupModal=!1},e.prototype.onInterfaceCancel=function(){this.showInterfaceModal=!1},e.prototype.onDeleteGroup=function(t){return h(this,void 0,void 0,(function(){var e;return f(this,(function(n){switch(n.label){case 0:return[4,this.service.deleteCategory(t.id)];case 1:return e=n.sent(),e&&!e.hasError&&this.init(),[2]}}))}))},e.prototype.onEditGroup=function(t){this.parent={id:t.parentId,name:t.parentName},this.group=t.$clone(),this.moveType="group",this.showGroupModal=!0,this.onChangeProject(!0)},e.prototype.onAddGroup=function(){this.group={projectId:this.projectId},this.showGroupModal=!0,this.onChangeProject(!0)},e.prototype.onFilter=function(){this.keyword||"all"!==this.type?this.renderData=this.filterData(this.data.$clone()):this.renderData=this.data.$clone()},e.prototype.match=function(t){var e=this,n=-1!==(t.title||t.name).indexOf(this.keyword),i=!1;return!n&&t.children&&t.children.forEach((function(t){i=e.match(t).matched||e.match(t).childrenMatched||i})),{matched:n,childrenMatched:i}},e.prototype.filterData=function(t){var e=this;if(!t||!Array.isArray(t))return t;var n=t.filter((function(t){return e.match(t).childrenMatched}));return n=n.map((function(t){return t.children&&(t.expand=!0,t.children=e.filterData(t.children)),t})),n=n.concat(t.filter((function(t){return e.match(t).matched}))),n},e.prototype.onSelectParent=function(t){this.parent=t},e.prototype.onSaveGroup=function(){return h(this,void 0,void 0,(function(){var t,e,n,i;return f(this,(function(r){switch(r.label){case 0:return this.group.parentId=this.parent.id,this.group.parentName=this.parent.name,this.group.type="api",this.group.name?this.group.id&&this.group.id===this.group.parentId?(this.$message.warning("所属分组不能选中自身"),[2]):(t=this.isChildNode(this.group,this.group.parentId),t?(this.$message.warning("所属分组不能选中自身的子节点"),[2]):this.group.id?[4,this.service.checkCategory(this.group)]:[3,2]):(this.$message.warning("请填写分组名称"),[2]);case 1:return e=r.sent(),e&&!e.hasError&&(n=e.result,this.showGroupModal=!1,["BIND_NONE","NOT_UPDATED_PROJECT"].includes(n)?(this.$message.success("保存分组成功"),"BIND_NONE"===n&&this.$emit("on-reset"),this.$publish("api://project-detail-save")):"BIND_JOB"===n?this.$message.error(this.MOVE_RESULT.BIND_JOB):"BIND_ENV"===n&&(this.showMoveModal=!0)),[3,4];case 2:return[4,this.service.saveCategory(this.group)];case 3:i=r.sent(),i&&!i.hasError&&(this.showGroupModal=!1,this.init()),r.label=4;case 4:return[2]}}))}))},e.prototype.init=function(){return h(this,void 0,void 0,(function(){var t,e,n;return f(this,(function(i){switch(i.label){case 0:return this.projectId?[4,this.service.getApiTree(this.projectId)]:[2];case 1:return t=i.sent(),this.data=(null===t||void 0===t?void 0:t.result)||[],e=this.data.$clone(),this.$emit("tree-data",e),V.handlerTreeData2(e,"name"),this.groupTree=e,e=this.data.$clone(),n=this.renderData,V.handlerTreeData2(this.data,"name","apis"),n&&n.length>0&&this.data.forEach((function(t){n.forEach((function(e){if(t.id===e.id)return t.expand=e.expand}))})),this.renderData=this.data.$clone(),[2]}}))}))},e.prototype.onBatchSuccess=function(t){this.$emit("on-success",t)},e.prototype.isChildNode=function(t,e){if(!t.children||0===t.children.length)return!1;for(var n=0,i=t.children;n<i.length;n++){var r=i[n];if(r.id===e)return!0;if(this.isChildNode(r,e))return!0}return!1},e.prototype.loadProjectList=function(){return h(this,void 0,void 0,(function(){var t;return f(this,(function(e){switch(e.label){case 0:return[4,this.projectService.getProjectList({})];case 1:return t=e.sent(),this.projectList=(null===t||void 0===t?void 0:t.result)||[],[2]}}))}))},e.prototype.onChangeProject=function(t,e){return void 0===e&&(e=!1),h(this,void 0,void 0,(function(){var n,i;return f(this,(function(r){switch(r.label){case 0:return e&&(this.parent={id:null,name:null}),t?(this.group.parentId=null,this.group.parentName=null,[4,this.service.getApiTree(this.group.projectId)]):[3,2];case 1:return n=r.sent(),[3,4];case 2:return this.interfaceModel.categoryId=null,[4,this.service.getApiTree(this.interfaceModel.projectId)];case 3:n=r.sent(),r.label=4;case 4:return i=(null===n||void 0===n?void 0:n.result)||[],V.handlerTreeData2(i,"name"),this.groupTree=i,[2]}}))}))},e.prototype.onMoveOk=function(t){return h(this,void 0,void 0,(function(){var e;return f(this,(function(n){switch(n.label){case 0:return this.showMoveModal=!1,"group"!==this.moveType?[3,2]:[4,this.service.updateMoveCategory(this.group,t)];case 1:return e=n.sent(),[3,4];case 2:return"interface"!==this.moveType?[3,4]:[4,this.service.updateMoveApi(this.interfaceModel,t)];case 3:e=n.sent(),n.label=4;case 4:return e&&!e.hasError&&(this.$publish("api://project-detail-save"),this.$emit("on-reset")),[2]}}))}))},d([Object(y["config"])({default:function(){return[]}})],e.prototype,"projectId",void 0),d([O(De)],e.prototype,"service",void 0),d([O(ee)],e.prototype,"projectService",void 0),d([Object(y["watch"])("projectId",{immediate:!0})],e.prototype,"init",null),e=d([Object(y["component"])({template:n("193e"),components:{"u-group-select":Pn,"u-batch-modal":Ln}})],e),e}(y["Component"])),$n=qn,Rn=n("ed38"),_n=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.openInterfaceList=[],e.active={},e.lengthwise=!0,e.showGlobalModal=!1,e.showCurrentModal=!1,e.showSecurity=!1,e.showEnvironmentModal=!1,e.projectId="",e.projectName="",e.split="340px",e.loading=!1,e.swiperOption={slidesPerView:"auto",spaceBetween:0},e.current={},e.projectTree=[],e}return p(e,t),e.prototype.onClickSlide=function(t){this.swiper.slideTo(t,1e3,!1),this.onClickTag(this.openInterfaceList[t])},e.prototype.onSwiperReadied=function(t){this.swiper=t},e.prototype.getProjectInfo=function(){var t,e;return h(this,void 0,void 0,(function(){var n;return f(this,(function(i){switch(i.label){case 0:return this.projectId=null===(t=this.$route.params)||void 0===t?void 0:t.id,this.projectId?[4,this.service.projectInfo(this.projectId)]:[3,2];case 1:n=i.sent(),this.projectName=(null===(e=null===n||void 0===n?void 0:n.result)||void 0===e?void 0:e.name)||"",i.label=2;case 2:return[2]}}))}))},e.prototype.onCheckInterface=function(t,e){return h(this,void 0,void 0,(function(){var n,i,r,o,a,s,c=this;return f(this,(function(l){switch(l.label){case 0:if(this.current=t,n={},e){try{i=window.sessionStorage.getItem("api_project_".concat(t.id)),i&&(n=JSON.parse(i))}catch(p){}n=u(u({},n),{name:t.name,id:t.id}),!n.fieldMappings&&(n.fieldMappings=[]),!n.pathParams&&(n.pathParams=[]),!n.queryParams&&(n.queryParams=[]),!n.formParams&&(n.formParams=[]),!n.preScripts&&(n.preScripts=[]),!n.postScripts&&(n.postScripts=[]),!n.requestHeaders&&(n.requestHeaders=[]),!n.responseParams&&(n.responseParams=[])}return r=new Set(this.openInterfaceList.map((function(t){return t.id}))),r.has(t.id)?[3,4]:(this.loading=!0,o=void 0,e?(o=n,[3,3]):[3,1]);case 1:return[4,this.service.apiInfo(t.id)];case 2:a=l.sent(),o=u(u({},a.result||{}),{name:t.name,id:t.id}),l.label=3;case 3:this.openInterfaceList.push(o),this.loading=!1,l.label=4;case 4:return s=this.openInterfaceList.findIndex((function(e){return e.id===t.id})),e&&this.openInterfaceList.splice(s,1,n),this.active=this.openInterfaceList[s],this.$nextTick((function(){c.swiper.slideTo(s,1e3,!1)})),[2]}}))}))},e.prototype.onEditInterfaceSuccess=function(t){var e=this.openInterfaceList.findIndex((function(e){return e.id===t.id}));e>-1&&(this.openInterfaceList[e].name=t.name)},e.prototype.onDeleteInterface=function(t){var e=this.openInterfaceList.findIndex((function(e){return e.id===t.id}));e>-1&&this.onClose(e)},e.prototype.onClose=function(t){this.openInterfaceList.splice(t,1),0===this.openInterfaceList.length?this.active={}:t>0?(this.active=this.openInterfaceList[t-1],this.swiper.slideTo(t-1,1e3,!1)):(this.active=this.openInterfaceList[0],this.swiper.slideTo(0,1e3,!1))},e.prototype.onReset=function(){this.openInterfaceList.splice(0),this.active={}},e.prototype.onClickTag=function(t){this.active=t},e.prototype.onToggleLayout=function(){this.lengthwise=!this.lengthwise},e.prototype.onSecurity=function(){this.showSecurity=!0},e.prototype.onOpenGlobalModal=function(){this.showGlobalModal=!0},e.prototype.onOpenCurrentModal=function(){this.showCurrentModal=!0},e.prototype.onOpenEnvModal=function(){this.showEnvironmentModal=!0},e.prototype.mounted=function(){var t=this;this.getProjectInfo();var e=this.$route.query,n=e.apiId,i=e.apiName,r=e.resume;n&&this.onCheckInterface({id:n,name:i},"true"===r),this.$subscribe("api://project-detail-save-import",(function(){return h(t,void 0,void 0,(function(){var t,e,n=this;return f(this,(function(i){switch(i.label){case 0:return[4,this.service.apiInfo(this.current.id)];case 1:return t=i.sent(),e=u(u({},t.result||{}),{name:this.current.name,id:this.current.id}),this.active=e,this.openInterfaceList[this.openInterfaceList.findIndex((function(t){return t.id===n.current.id}))]=e,[2]}}))}))})),this.$subscribe("api://batch-api-refresh",(function(e){return h(t,void 0,void 0,(function(){var t,n,i,r,o,a,s,c,l=this;return f(this,(function(p){switch(p.label){case 0:if(t=e.get("ids"),n=e.get("isEnvAndAuth")||!1,i=[],this.openInterfaceList.forEach((function(e){t.includes(e.id)&&i.push({id:e.id,name:e.name})})),!i.length)return[3,5];r=function(t){var e,n,i;return f(this,(function(r){switch(r.label){case 0:return[4,o.service.apiInfo(t.id)];case 1:return e=r.sent(),n=u(u({},e.result||{}),{name:t.name,id:t.id}),i=o.openInterfaceList.findIndex((function(e){return e.id===t.id})),o.openInterfaceList.splice(i,1,n),[2]}}))},o=this,a=0,s=i,p.label=1;case 1:return a<s.length?(c=s[a],[5,r(c)]):[3,4];case 2:p.sent(),p.label=3;case 3:return a++,[3,1];case 4:this.active=this.openInterfaceList[this.openInterfaceList.findIndex((function(t){return t.id===l.current.id}))],n&&this.$publish("api://security-list-refresh",{isBatchRefresh:!0}),p.label=5;case 5:return[2]}}))}))}))},e.prototype.activated=function(){var t=this.$route.query,e=t.apiId,n=t.apiName,i=t.resume;"true"===i&&this.onCheckInterface({id:e,name:n},"true"===i)},e.prototype.onBack=function(){this.$router.push({name:"project-list"})},e.prototype.onBatchSuccess=function(t){t&&this.getProjectInfo()},e.prototype.onEnvironmentRefresh=function(){this.$refs["interface-settings"]&&this.$refs["interface-settings"].getEnvironmentParamList()},e.prototype.getTreeData=function(t){this.projectTree=t},d([O(De)],e.prototype,"service",void 0),e=d([Object(y["component"])({name:"ApiProjectDetail",template:n("d63e"),components:{"u-tree":$n,"u-settings":Tn,"u-global-modal":$e,"u-current-modal":Ne,"u-environment-modal":Be,Swiper:Rn["Swiper"],SwiperSlide:Rn["SwiperSlide"],"u-security-modal":vn},directives:{swiper:Rn["directive"]}})],e),e}(y["View"]),Fn=_n;a.a.use(c.a)},3117:function(t,e,n){"use strict";var i=n("720f"),r=n("d803"),o=n("485f"),a=n("cf8c").indexOf,s=n("929a"),c=i([].push);t.exports=function(t,e){var n,i=o(t),l=0,p=[];for(n in i)!r(s,n)&&r(i,n)&&c(p,n);while(e.length>l)r(i,n=e[l++])&&(~a(p,n)||c(p,n));return p}},"327c":function(t,e,n){"use strict";var i=n("ce97");t.exports=function(t,e){return void 0===t?arguments.length<2?"":e:i(t)}},3497:function(t,e,n){},"35e3":function(t,e){t.exports='<editor class="code-edit" v-model="code" :options="option" @init="editorInit" :lang="lang" width="100%" height="100%"></editor>\r\n'},"37f5":function(t,e){t.exports='<article class="catalog-params">\r\n <header>\r\n 请求体为 JSON 数组,每一个 JSON 对象应符合如下的格式:\r\n </header>\r\n <i-table height="200" class="diy-table" :columns="columns" :data="dataList">\r\n <template slot-scope="{ row,index }" slot="type">\r\n {{(row.typeDict || {}).text}}\r\n </template>\r\n <template slot-scope="{ row,index }" slot="required">\r\n {{row.required ? "是": "否"}}\r\n </template>\r\n </i-table>\r\n</article>\r\n'},3955:function(t,e,n){"use strict";var i=n("d803"),r=n("842d"),o=n("a564"),a=n("585e");t.exports=function(t,e,n){for(var s=r(e),c=a.f,l=o.f,p=0;p<s.length;p++){var u=s[p];i(t,u)||n&&i(n,u)||c(t,u,l(e,u))}}},"39d5":function(t,e,n){"use strict";var i=n("b699"),r=n("6a10"),o=n("9195"),a=n("9b7f"),s=n("a68e"),c=r.aTypedArray,l=r.getTypedArrayConstructor,p=r.exportTypedArrayMethod,u=!!function(){try{new Int8Array(1)["with"](2,{valueOf:function(){throw 8}})}catch(t){return 8===t}}();p("with",{with:function(t,e){var n=c(this),r=a(t),p=o(n)?s(e):+e;return i(n,l(n),r,p)}}["with"],!u)},"3a71":function(t,e){t.exports='<i-collapse v-model="value" simple class="api-params">\r\n <i-panel name="1">\r\n <span>Query参数</span>\r\n <span class="status">{{getExpand(\'1\') ? "收起" : "展开"}}</span>\r\n <div slot="content" class="setting-content">\r\n <main>\r\n <i-table\r\n height="200"\r\n class="diy-table"\r\n :columns="paramColumns"\r\n :data="queryDataList"\r\n >\r\n <template slot-scope="{ row,index }" slot="selection">\r\n <i-checkbox\r\n disabled\r\n :value="!queryDataList[index].disabled"\r\n >\r\n </i-checkbox>\r\n </template>\r\n </i-table>\r\n </main>\r\n </div>\r\n </i-panel>\r\n <i-panel name="2">\r\n <span>Body参数</span>\r\n <span class="status">{{getExpand(\'2\') ? "收起" : "展开"}}</span>\r\n <div slot="content" class="setting-content">\r\n <main>\r\n <i-table\r\n height="200"\r\n class="diy-table"\r\n :columns="paramColumns"\r\n :data="bodyDataList"\r\n v-if="isFormData"\r\n >\r\n <template slot-scope="{ row,index }" slot="selection">\r\n <i-checkbox\r\n disabled\r\n :value="!bodyDataList[index].disabled"\r\n >\r\n </i-checkbox>\r\n </template>\r\n </i-table>\r\n <json-viewer\r\n v-else\r\n :value="model.json"\r\n boxed\r\n :copyable="{copyText: \'复制\', copiedText: \'已复制\'}"\r\n :expanded="true"\r\n :expand-depth="5"\r\n >\r\n </json-viewer>\r\n </main>\r\n </div>\r\n </i-panel>\r\n</i-collapse>\r\n'},"3ad3":function(t,e,n){},"3b85":function(t,e){t.exports='<i-modal :mask-closable="false" draggable sticky reset-drag-position v-model="show" class="diy-modal">\r\n <header slot="header">\r\n {{isEdit ? "编辑分组" : "新增分组"}}\r\n </header>\r\n <main>\r\n <i-form ref="addForm" :model="data" :rules="rules">\r\n <i-form-item prop="name" label="分组名称">\r\n <i-input class="diy-input" v-model="data.name"></i-input>\r\n </i-form-item>\r\n <i-form-item v-if="isEdit" label="所属分组" class="update-category">\r\n <u-tree-selector :treeData="categories" leaf-name="task" :canChooseFolder="true" v-model="categoryData.id" @on-select="selectCategory">\r\n </u-tree-selector>\r\n </i-form-item>\r\n </i-form>\r\n </main>\r\n <footer slot="footer">\r\n <i-button class="diy-btn-primary" type="primary" @click.stop="onSave">确定</i-button>\r\n <i-button class="diy-btn-default" @click.stop="onCancel">取消</i-button>\r\n </footer>\r\n</i-modal>\r\n'},"3bdc":function(t,e,n){"use strict";var i=n("2ece"),r=n("5ee5"),o=n("e614"),a=n("d631"),s=function(t){var e=1===t;return function(n,s,c){var l,p,u=o(n),d=r(u),h=a(d),f=i(s,c);while(h-- >0)if(l=d[h],p=f(l,h,u),p)switch(t){case 0:return l;case 1:return h}return e?-1:void 0}};t.exports={findLast:s(0),findLastIndex:s(1)}},"3bf8":function(t,e){t.exports='<i-modal draggable sticky reset-drag-position :mask-closable="false" v-model="show" width="1000" class="u-security-modal diy-modal" transfer>\r\n <header slot="header">授权认证</header>\r\n <main class="security-content">\r\n <div class="left">\r\n <div class="left-title">\r\n <div class="left-title-text">授权列表</div>\r\n <i class="api-icon icon-add" @click="onAddItem"></i>\r\n </div>\r\n <div class="left-content">\r\n <i-input class="diy-input search-input" v-model="keyword" placeholder="输入关键字查询" @on-change="onFilter">\r\n <template #prefix>\r\n <i-icon type="ios-search"/>\r\n </template>\r\n </i-input>\r\n <div class="security-list">\r\n <div class="security-list-item"\r\n :class="currentSecurityItem.id === item.id ? \'security-list-item-active\' : \'\'"\r\n v-for="(item,index) in securityList"\r\n :key="item.id || index"\r\n @click="onSelectSecurityItem(item)"\r\n >\r\n <div class="security-list-item-name">\r\n <i class="iconfont icon-shouquan1"></i>\r\n <div class="security-list-item-text" :class="currentSecurityItem.id === item.id ? \'security-list-item-text-active\' : \'\'">{{ item.name || "新授权" }}</div>\r\n </div>\r\n <i-poptip confirm title="确认删除这条数据吗?" transfer placement="top-end" @on-ok="onDelete(item)">\r\n <i class="iconfont icon-delete"></i>\r\n </i-poptip>\r\n\x3c!-- <i class="iconfont icon-delete" @click.stop="onDelete(item)"></i>--\x3e\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class="right">\r\n <div class="right-title">授权内容</div>\r\n <div class="right-content">\r\n <i-form class="security-content-form" label-colon v-if="isEmpty" :model="currentSecurityItem">\r\n <template v-if="currentSecurityItem.type">\r\n <i-form-item class="security-content-form-item" :class="currentSecurityItem.type === \'OAuth2\' ? \'oauth2-form-item\' : \'\'" label="授权名称" required>\r\n <i-input class="diy-input" placeholder="请输入" v-model="currentSecurityItem.name"></i-input>\r\n </i-form-item>\r\n <i-form-item class="security-content-form-item" :class="currentSecurityItem.type === \'OAuth2\' ? \'oauth2-form-item\' : \'\'" label="授权类型" required>\r\n <i-select class="diy-select" v-model="currentSecurityItem.type">\r\n <i-option v-for="(item,index) in securityTypeList" :value="item.name" :key="index">{{ item.text }}</i-option>\r\n </i-select>\r\n </i-form-item>\r\n </template>\r\n <template v-if="currentSecurityItem.type && currentSecurityItem.type !== \'GROOVY_SCRIPT\'">\r\n <i-form-item class="security-content-form-item" :class="currentSecurityItem.type === \'OAuth2\' ? \'oauth2-form-item\' : \'\'" label="存储位置">\r\n <i-select class="diy-select" v-model="currentSecurityItem.location">\r\n <i-option v-for="(item,index) in tokenLocationTypeList" :value="item.name" :key="item.name">{{ item.text }}</i-option>\r\n </i-select>\r\n </i-form-item>\r\n <i-form-item class="security-content-form-item" :class="currentSecurityItem.type === \'OAuth2\' ? \'oauth2-form-item\' : \'\'" label="存储键值">\r\n <i-input class="diy-input" placeholder="请输入" v-model="currentSecurityItem.locationKey"></i-input>\r\n </i-form-item>\r\n </template>\r\n <template v-if="currentSecurityItem.type === \'Api_Key\'">\r\n <i-form-item class="security-content-form-item" label="key">\r\n <i-input class="diy-input" placeholder="请输入" v-model="currentSecurityItem.content.key"></i-input>\r\n </i-form-item>\r\n </template>\r\n <template v-if="currentSecurityItem.type === \'Base_Auth\'">\r\n <i-form-item class="security-content-form-item" label="username">\r\n <i-input class="diy-input" placeholder="请输入" v-model="currentSecurityItem.content.username"></i-input>\r\n </i-form-item>\r\n <i-form-item class="security-content-form-item" label="password">\r\n <i-input class="diy-password-input diy-input" placeholder="请输入" v-model="currentSecurityItem.content.password" type="password" password></i-input>\r\n </i-form-item>\r\n </template>\r\n <template v-if="currentSecurityItem.type === \'OAuth2\'">\r\n <i-form-item class="security-content-form-item oauth2-form-item">\r\n <u-tips-form-label slot="label" :labelTitle="\'Header Prefix\'" tips="token前缀 例如 Bearer" label-colon></u-tips-form-label>\r\n <i-input class="diy-input" placeholder="请输入" v-model="currentSecurityItem.content.headerPrefix"></i-input>\r\n </i-form-item>\r\n <i-form-item class="security-content-form-item oauth2-form-item grant-type-item">\r\n <u-tips-form-label slot="label" :labelTitle="\'Grant Type\'" tips="认证类型" label-colon></u-tips-form-label>\r\n <i-select v-model="currentSecurityItem.content.grantType" class="diy-select">\r\n <i-option v-for="item in grantTypeList" :key="item.name" :value="item.name"> {{item.text}} </i-option>\r\n </i-select>\r\n </i-form-item>\r\n <i-form-item class="security-content-form-item oauth2-form-item">\r\n <u-tips-form-label slot="label" :labelTitle="\'Access Token Url\'" tips="获取token的httpurl" label-colon></u-tips-form-label>\r\n <i-input class="diy-input" placeholder="请输入" v-model="currentSecurityItem.content.tokenUrl"></i-input>\r\n </i-form-item>\r\n <i-form-item class="security-content-form-item oauth2-form-item">\r\n <u-tips-form-label slot="label" :labelTitle="\'TokenPath\'" tips="获取响应结果的token路径" label-colon></u-tips-form-label>\r\n <i-input class="diy-input" placeholder="请输入" v-model="currentSecurityItem.content.tokenPath"></i-input>\r\n </i-form-item>\r\n <i-form-item class="security-content-form-item oauth2-form-item" label="Client ID">\r\n <i-input class="diy-input" placeholder="请输入" v-model="currentSecurityItem.content.clientId"></i-input>\r\n </i-form-item>\r\n <i-form-item class="security-content-form-item oauth2-form-item" label="Client Secret">\r\n <i-input class="diy-input" placeholder="请输入" v-model="currentSecurityItem.content.clientSecret"></i-input>\r\n </i-form-item>\r\n <template v-if="currentSecurityItem.content.grantType === \'password\'">\r\n <i-form-item class="security-content-form-item oauth2-form-item" label="username">\r\n <i-input class="diy-input" placeholder="请输入" v-model="currentSecurityItem.content.username"></i-input>\r\n </i-form-item>\r\n <i-form-item class="security-content-form-item oauth2-form-item" label="password">\r\n <i-input class="diy-input" placeholder="请输入" v-model="currentSecurityItem.content.password" type="password" password></i-input>\r\n </i-form-item>\r\n </template>\r\n <i-form-item class="security-content-form-item oauth2-form-item">\r\n <u-tips-form-label slot="label" :labelTitle="\'Scope\'" tips="访问请求的范围,它可能有多个空格分隔的值" label-colon></u-tips-form-label>\r\n <i-input class="diy-input" placeholder="请输入" v-model="currentSecurityItem.content.scope"></i-input>\r\n </i-form-item>\r\n </template>\r\n <template v-if="currentSecurityItem.type === \'GROOVY_SCRIPT\'">\r\n <i-form-item class="security-content-form-item script-area-item" label="授权脚本">\r\n <div class="script-label" slot="label">\r\n <i-icon class="help-icon" type="md-alert" @click="showScriptDoc" title="帮助文档"> </i-icon>\r\n <span>授权脚本:</span>\r\n </div>\r\n <u-editor\r\n class="editor"\r\n :model.sync="currentSecurityItem.scriptContent"\r\n :diyKeywordList="diyKeywordList"\r\n lang="groovy"\r\n >\r\n </u-editor>\r\n </i-form-item>\r\n </template>\r\n </i-form>\r\n </div>\r\n </div>\r\n </main>\r\n\r\n <footer slot="footer">\r\n <template>\r\n <i-button class="diy-btn-default" @click="onCancel">取消</i-button>\r\n <i-button type="primary" class="diy-btn-primary" @click="onSave">保存</i-button>\r\n </template>\r\n </footer>\r\n <u-doc-modal class="script-doc-modal" v-model="scriptDocShow" :doc="scriptDoc"></u-doc-modal>\r\n</i-modal>\r\n'},"3d77":function(t,e,n){"use strict";var i=n("2385"),r=n("a047"),o=i("keys");t.exports=function(t){return o[t]||(o[t]=r(t))}},"3de4":function(t,e){t.exports='<article class="security-setting-v2">\r\n <div class="left">\r\n <i-form class="type-form diy-form" label-colon>\r\n <i-form-item label="选择授权">\r\n <i-select ref="addSecuritySelect" class="diy-select add-security-select" v-model="currentSecurityItemId" @on-change="onChangeSecurityItem($event)" @on-clear="onClear" clearable>\r\n <i-option v-for="item in securityList" :key="item.id" :value="item.id">{{ item.name }}</i-option>\r\n <i-option class="add-security-item" value="\'\'">\r\n <div class="add-security-item-content" @click.stop="onAddSecurityItem">\r\n <i class="api-icon icon-add"></i>\r\n <span>新建授权</span>\r\n </div>\r\n </i-option>\r\n </i-select>\r\n </i-form-item>\r\n <i-form-item label="授权类型">\r\n <span class="security-type">{{ currentSecurityItem._type? currentSecurityItem._type.text : "暂无" }}</span>\r\n </i-form-item>\r\n </i-form>\r\n </div>\r\n <div class="right">\r\n <div class="right-title">授权详情</div>\r\n <div class="right-content">\r\n <div class="no-data" v-if="!currentSecurityItem.type">\r\n <div class="no-data-bg"></div>\r\n <div class="no-data-text">请在左侧下拉框中选择已建立授权</div>\r\n </div>\r\n <div class="script" v-if="currentSecurityItem.type === \'GROOVY_SCRIPT\'">\r\n <i-input class="diy-input script-area" type="textarea" v-model="currentSecurityItem.scriptContent" :readonly="true"></i-input>\r\n </div>\r\n <div class="api-key" v-if="currentSecurityItem.type === \'Api_Key\'">\r\n <i-form class="oauth-2-form diy-form" label-colon>\r\n <i-form-item label="存储位置">\r\n <span class="form-item-text">{{ currentSecurityItem._location ? currentSecurityItem._location.text : ""}}</span>\r\n </i-form-item>\r\n <i-form-item label="存储键值">\r\n <span class="form-item-text">{{ currentSecurityItem.locationKey }}</span>\r\n </i-form-item>\r\n <i-form-item label="key">\r\n <span class="form-item-text">{{ currentSecurityItem.content.key }}</span>\r\n </i-form-item>\r\n </i-form>\r\n </div>\r\n <div class="base-auth" v-if="currentSecurityItem.type === \'Base_Auth\'">\r\n <i-form class="oauth-2-form diy-form" label-colon>\r\n <i-form-item label="存储位置">\r\n <span class="form-item-text">{{ currentSecurityItem._location ? currentSecurityItem._location.text : "" }}</span>\r\n </i-form-item>\r\n <i-form-item label="存储键值">\r\n <span class="form-item-text">{{ currentSecurityItem.locationKey }}</span>\r\n </i-form-item>\r\n <i-form-item label="username">\r\n <span class="form-item-text">{{ currentSecurityItem.content.username }}</span>\r\n </i-form-item>\r\n <i-form-item label="password">\r\n \x3c!-- <span class="form-item-text">{{ "·" }}</span>--\x3e\r\n \x3c!-- <i-input class="diy-input" v-model="model.password" type="password" password placeholder="请输入"> </i-input>--\x3e\r\n <i-input class="diy-password-input diy-input" :value="currentSecurityItem.content.password" type="password"></i-input>\r\n </i-form-item>\r\n </i-form>\r\n </div>\r\n <div class="oauth-2" v-if="currentSecurityItem.type === \'OAuth2\'">\r\n <i-form class="oauth-2-form diy-form" label-colon>\r\n <i-form-item label="存储位置">\r\n <span class="form-item-text">{{ currentSecurityItem._location ? currentSecurityItem._location.text : "" }}</span>\r\n </i-form-item>\r\n <i-form-item label="存储键值">\r\n <span class="form-item-text">{{ currentSecurityItem.locationKey }}</span>\r\n </i-form-item>\r\n <i-form-item>\r\n <u-tips-form-label slot="label" :labelTitle="\'Header Prefix\'" tips="token前缀 例如 Bearer" label-colon></u-tips-form-label>\r\n <span class="form-item-text">{{ currentSecurityItem.content.headerPrefix }}</span>\r\n </i-form-item>\r\n <i-form-item class="grant-type-item">\r\n <u-tips-form-label slot="label" :labelTitle="\'Grant Type\'" tips="认证类型" label-colon></u-tips-form-label>\r\n <span class="form-item-text">{{ findGrantTypeText(currentSecurityItem.content.grantType) }}</span>\r\n </i-form-item>\r\n <i-form-item>\r\n <u-tips-form-label slot="label" :labelTitle="\'Access Token Url\'" tips="获取token的httpUrl" label-colon></u-tips-form-label>\r\n <span class="form-item-text">{{ currentSecurityItem.content.tokenUrl }}</span>\r\n </i-form-item>\r\n <i-form-item>\r\n <u-tips-form-label slot="label" :labelTitle="\'TokenPath\'" tips="获取响应结果的token路径" label-colon></u-tips-form-label>\r\n <span class="form-item-text">{{ currentSecurityItem.content.tokenPath }}</span>\r\n </i-form-item>\r\n <i-form-item label="Client ID">\r\n <span class="form-item-text">{{ currentSecurityItem.content.clientId }}</span>\r\n </i-form-item>\r\n <i-form-item label="Client Secret">\r\n <span class="form-item-text">{{ currentSecurityItem.content.clientSecret }}</span>\r\n </i-form-item>\r\n <template v-if="currentSecurityItem.content.grantType === \'password\'">\r\n <i-form-item class="security-content-form-item" label="username">\r\n <span class="form-item-text">{{ currentSecurityItem.content.username }}</span>\r\n </i-form-item>\r\n <i-form-item class="security-content-form-item" label="password">\r\n <i-input class="diy-password-input diy-input" :value="currentSecurityItem.content.password" type="password"></i-input>\r\n </i-form-item>\r\n </template>\r\n <i-form-item label="Scope">\r\n <u-tips-form-label slot="label" :labelTitle="\'Scope\'" tips="访问请求的范围,它可能有多个空格分隔的值" label-colon></u-tips-form-label>\r\n <span class="form-item-text">{{ currentSecurityItem.content.scope }}</span>\r\n </i-form-item>\r\n </i-form>\r\n </div>\r\n </div>\r\n </div>\r\n <u-security-modal v-model="showSecurity" :projectID="projectID" :isAdd="isAdd"></u-security-modal>\r\n</article>\r\n'},"3fb3":function(t,e){t.exports=o},"40aa":function(t,e){t.exports='<!DOCTYPE html>\r\n<i-drawer\r\n width="700"\r\n draggable\r\n sticky\r\n reset-drag-position\r\n v-model="show"\r\n class="interface-modal diy-modal"\r\n transfer\r\n title="已关联流程配置"\r\n :mask-closable="false"\r\n @on-cancel="onCancel"\r\n>\r\n <div class="header">\r\n <i-select v-model="proxyName" :placeholder="proxyList?.length ? `已有${proxyList?.length}个代理服务`:\'暂无数据\'" @on-select="selectProxyName"> \r\n <i-option v-for="item in proxyList" :value="item.id" :key="item.id">\r\n {{item.name}}\r\n </i-option>\r\n </i-select>\r\n <i-button class="diy-btn-primary" type="primary" @click="onAdd">新增配置</i-button>\r\n </div>\r\n\r\n <template>\r\n <i-form v-show="proxyName || isAdding " ref="configform" label-position="left" :label-width="125" label-colon :rules="rulesValidate" :model="model">\r\n <div class="form-title">{{formTitle}}</div>\r\n <i-form-item v-show="isAdding" label="所属分类" prop="categoryId" class="proxy-category-validate" required>\r\n <u-tree-selector\r\n :treeData="categoryList"\r\n :canChooseFolder="true"\r\n v-model="model.categoryId"\r\n @on-select="selectCategory"\r\n placeholder="请选择所属分类"\r\n ></u-tree-selector>\r\n </i-form-item>\r\n <i-form-item label="代理名称" prop="name" class="proxy-name-validate" required>\r\n <i-input class="diy-input" v-model="model.name" placeholder="请输入代理名称"></i-input>\r\n </i-form-item>\r\n <i-form-item class="proxy-name-validate" prop="code" label="接口编码" required>\r\n <i-input class="diy-input" v-model="model.code" placeholder="请输入接口编码"></i-input>\r\n </i-form-item>\r\n <i-form-item class="un-required-item copy-item" label="接口地址">\r\n <i-input class="diy-input" disabled :value="url"></i-input>\r\n <div class="set-btn" @click="onCopy(url)">复制</div>\r\n </i-form-item>\r\n <i-form-item label="描述" prop="description" class="proxy-description-validate un-required-item">\r\n <i-input type="textarea" v-model="model.description" placeholder="请输入描述" :rows="2"></i-input>\r\n </i-form-item>\r\n <i-row class="retry-wrap" style="padding-top: 8px">\r\n <i-col span="11">\r\n <i-form-item class="un-required-item copy-item">\r\n <template #label>\r\n <i-poptip\r\n slot="label"\r\n trigger="hover"\r\n content="日志表会记录请求头、请求参数和响应体,如果内容较多时建议关闭,请求次数频繁比较占数据库资源。选项【失败】仅记录调用失败的日志"\r\n word-wrap\r\n transfer\r\n >\r\n <icon style="cursor: help; font-size: 0.16rem" type="ios-information-circle-outline" />\r\n </i-poptip>\r\n <span>记录日志:</span>\r\n </template>\r\n\r\n <i-select class="diy-select" v-model="model.logSavingEnabled" @on-change="onLogSavingEnabledChange">\r\n <i-option v-for="item in loginLevelFlag" :value="item.value" :key="item.value">{{ item.name }}</i-option>\r\n </i-select>\r\n </i-form-item>\r\n </i-col>\r\n </i-row>\r\n <template v-if="model.logSavingEnabled">\r\n <i-row class="retry-wrap">\r\n <i-col span="11">\r\n <i-form-item label="开启重推" required>\r\n <i-select class="diy-select" v-model="model.enableRetry">\r\n <i-option v-for="(item,index) in isRetryList" :value="item.value" :key="index">{{ item.name }}</i-option>\r\n </i-select>\r\n </i-form-item>\r\n </i-col>\r\n <i-col span="11">\r\n <i-form-item class="un-required-item" label="重推次数" prop="retryTimes">\r\n <tips-table-label class="data-type-tips" slot="label" label-colon labelTitle="重推次数"></tips-table-label>\r\n <i-input class="diy-input" type="number" :disabled="isRetryTimesReadonly" v-model="model.retryTimes" placeholder="请输入重推次数"></i-input>\r\n </i-form-item>\r\n </i-col>\r\n </i-row>\r\n <i-row v-show="model.enableRetry === \'true\' ">\r\n <i-col span="11">\r\n <i-form-item class="un-required-item status-code">\r\n <template #label>\r\n <i-poptip slot="label" trigger="hover" content="当接口状态码和配置项相同时,才触发重推;多个自定义状态码以英文逗号分隔" word-wrap transfer>\r\n <icon style="cursor: help; font-size: 0.16rem" type="ios-information-circle-outline" />\r\n </i-poptip>\r\n <span>重推接口状态码:</span>\r\n </template>\r\n <i-form-item>\r\n <i-select v-model="statusCode" class="diy-select code-select" @on-change="onStatusCodeChange">\r\n <i-option v-for="item in statusCodeList" :value="item.value" :key="item.value">{{ item.name }}</i-option>\r\n </i-select>\r\n </i-form-item>\r\n <i-form-item prop="retryCode">\r\n <i-input v-show="statusCode === \'2\'" class="diy-input" v-model="model.retryCode" placeholder="请输入状态码"></i-input>\r\n </i-form-item>\r\n </i-form-item>\r\n </i-col>\r\n </i-row>\r\n </template>\r\n\r\n <i-row class="retry-wrap">\r\n <i-col span="11">\r\n <i-form-item label="需要认证" class="un-required-item copy-item">\r\n <i-select class="diy-select" style="margin-top: 6px" v-model="model.authFlag">\r\n <i-option v-for="item in authFlag" :value="item.value" :key="item.value">{{ item.name }}</i-option>\r\n </i-select>\r\n </i-form-item>\r\n </i-col>\r\n <i-col span="11">\r\n <i-form-item class="un-required-item copy-item">\r\n <template #label>\r\n <i-poptip slot="label" trigger="hover" content="使用用户中心token访问该接口时,将校验登陆是否拥有该资源代码的权限" word-wrap transfer>\r\n <icon style="cursor: help; font-size: 0.16rem" type="ios-information-circle-outline" />\r\n </i-poptip>\r\n <span>用户中心资源代码:</span>\r\n </template>\r\n <i-input\r\n class="diy-input"\r\n style="margin-top: 6px"\r\n v-model="model.resourceCode"\r\n :disabled="!isResourceCodeEnabled"\r\n placeholder="请输入用户中心资源代码"\r\n ></i-input>\r\n </i-form-item>\r\n </i-col>\r\n </i-row>\r\n <template>\r\n <i-row class="retry-wrap">\r\n <i-col span="11">\r\n <i-form-item label="代理类型">\r\n <i-input class="diy-input" value="外部接口" disabled></i-input>\r\n </i-form-item>\r\n </i-col>\r\n <i-col span="11">\r\n <i-form-item label="API项目">\r\n <i-select disabled class="diy-select" v-model="apiModel.projectId">\r\n <i-option v-for="(item,index) in projectList" :value="item.id" :key="item.id">{{ item.name }}</i-option>\r\n </i-select>\r\n </i-form-item>\r\n </i-col>\r\n </i-row>\r\n <i-form-item label="API接口">\r\n <u-tree-selector\r\n readonly\r\n :treeData="apiTree"\r\n leaf-name="apis"\r\n v-model="apiModel.typeId"\r\n placeholder="请选择API接口"\r\n @on-select="onApiTreeSelect"\r\n ></u-tree-selector>\r\n </i-form-item>\r\n <i-form-item label="接口路径">\r\n <i-input class="diy-input" :readonly="true" v-model="apiModel.path" :rows="4"></i-input>\r\n </i-form-item>\r\n </template>\r\n </i-form>\r\n </template>\r\n <i-table v-if="proxyName || isAdding" class="diy-table" height="200" :columns="apiColumns" :data="apiParamList"> </i-table>\r\n <div v-if="!proxyName && !isAdding " class="no-data">暂无数据</div>\r\n <div class="footer">\r\n <i-button class="diy-btn-primary" type="primary" :loading="loading" @click.stop="onSave">保存</i-button>\r\n <i-button class="diy-btn-default" @click.stop="onCancel">取消</i-button>\r\n </div>\r\n</i-drawer>\r\n'},"42a3":function(t,e,n){"use strict";var i=n("9e90"),r=TypeError;t.exports=function(t){if(i(t))throw new r("Can't call method on "+t);return t}},4387:function(t,e){t.exports=a},"44c1":function(t,e,n){},"45bb":function(t,e){t.exports='<i-modal draggable sticky reset-drag-position :mask-closable="false" v-model="show" width="880" class="u-data-model-doc-modal diy-modal" transfer>\r\n <header slot="header">查看接口文档</header>\r\n <main>\r\n <div class="v-mavon-container">\r\n \x3c!-- startprint --\x3e\r\n <mavon-editor :subfield="false" :toolbars="toolbars" :value="doc" defaultOpen="preview" @change="onChange">\r\n <template slot="left-toolbar-before">\r\n <i-dropdown placement="right-start" @on-click="onMenuClick">\r\n <span class="op-icon fa fa-mavon-floppy-o"></span>\r\n <i-dropdown-menu slot="list">\r\n <i-dropdown-item name="pdf">保存为pdf</i-dropdown-item>\r\n <i-dropdown-item name="html">保存为html</i-dropdown-item>\r\n </i-dropdown-menu>\r\n </i-dropdown>\r\n </template>\r\n </mavon-editor>\r\n \x3c!-- endprint --\x3e\r\n <iframe id="printf" src="" width="0" height="0" frameborder="0"></iframe>\r\n </div>\r\n </main>\r\n <footer slot="footer">\r\n <i-button type="primary" class="diy-btn-primary" @click="onOk">关闭</i-button>\r\n </footer>\r\n</i-modal>\r\n'},"45e3":function(t,e,n){},"46d3":function(t,e){t.exports='<article class="u-common-tree u-type-tree">\r\n <slot name="header">\r\n <header slot="header" class="tree-header">\r\n <span>合并模型列表</span>\r\n <i-upload\r\n class="action-item"\r\n :action="uploadAction"\r\n accept=".json"\r\n :headers="headers"\r\n :show-upload-list="false"\r\n :format="[\'json\']"\r\n :on-success="onSuccess"\r\n :before-upload="onBeforeUpload"\r\n :on-format-error="onFormatError"\r\n >\r\n <i title="导入" class="iconfont icon-import"></i>\r\n </i-upload>\r\n <i\r\n @click="onModelExport(null)"\r\n :class="{\'disabled\': !data.length}"\r\n class="iconfont icon-export"\r\n title="导出"\r\n ></i>\r\n <i @click.stop="onAddTreeNode" title="新增分组" class="iconfont icon-add-folder"></i>\r\n </header>\r\n </slot>\r\n <section class="content">\r\n <i-input class="search-input diy-input" :placeholder="placeholder" @on-change="onFilter" v-model="keyword" >\r\n <i class="iconfont icon-chaxun" slot="prefix"></i>\r\n </i-input>\r\n <i-tree :data="renderData" :render="renderContent" @on-toggle-expand="onToggleExpand"></i-tree>\r\n </section>\r\n <u-add-node :data="tempNode" :categories="data" v-model="showAddTreeNodeModal" @on-refresh="queryTreeData"></u-add-node>\r\n <i-modal draggable sticky reset-drag-position v-model="showImportModal" class="diy-modal duplicate-import-modal" width="800" :mask-closable="false" title="导入已合并接口">\r\n <div class="import-title">上传成功</div>\r\n <div class="import-label">{{ `上传共${importResult.total}条合并接口数据,其中${importResult.total - importResult.duplicateNum}条可成功导入。` }}</div>\r\n <div class="import-label">{{ `发现以下${importResult.duplicateNum}条接口数据存在编码重复(编码已存在),将不会被导入。` }}</div>\r\n <i-table class="diy-table import-modal-table" :columns="columns" :data="importResult.items">\r\n </i-table>\r\n <footer slot="footer">\r\n <i-button class="diy-btn-primary" type="primary" @click="onImportConfirm">确定</i-button>\r\n <i-button class="diy-btn-default" @click="onImportCancel">取消</i-button>\r\n </footer>\r\n </i-modal>\r\n</article>\r\n'},"46df":function(t,e,n){"use strict";var i=n("9417"),r=n("6a10"),o=r.aTypedArray,a=r.exportTypedArrayMethod,s=r.getTypedArrayConstructor;a("toReversed",(function(){return i(o(this),s(this))}))},"470f":function(t,e){t.exports='<i-modal draggable sticky reset-drag-position v-model="value" class="diy-modal global-variable-modal" :mask-closable="false" title="全局参数设置">\r\n <header class="types">\r\n <div class="tag" @click="onCheckTpye(item)" :class="{\'active\': item.name === active.name}" v-for="(item,index) in typeList" :key="item.name">\r\n <span>{{item.title }}</span>\r\n </div>\r\n </header>\r\n <main class="content">\r\n <i-button type="primary" ghost class="diy-btn-primary"> <i class="api-icon icon-add"></i>新增参数</i-button>\r\n <i-table :columns="columns" :data="dataList" class="diy-table" height="400">\r\n <template slot-scope="{ row,index }" slot="name">\r\n <i-input class="diy-input" placeholder="输入参数名称" v-model="dataList[index].name"></i-input>\r\n </template>\r\n <template slot-scope="{ row,index }" slot="value">\r\n <i-input class="diy-input" placeholder="输入参数值" v-model="dataList[index].value"></i-input>\r\n </template>\r\n <template slot-scope="{ row,index }" slot="required">\r\n <i-switch v-model="dataList[index].required">\r\n <span slot="open">是</span>\r\n <span slot="close">否</span>\r\n </i-switch>\r\n </template>\r\n <template slot-scope="{ row,index }" slot="remark">\r\n <i-input class="diy-input" placeholder="输入备注" v-model="dataList[index].remark"></i-input>\r\n </template>\r\n <template slot-scope="{ row,index }" slot="action">\r\n <span class="action-btn delete" @click="onDelete(dataList,index)">删除</span>\r\n <span class="action-btn" @click="onUp(dataList,index)">上移</span>\r\n <span class="action-btn" @click="onDown(dataList,index)">下移</span>\r\n <span v-if="index !== 0" class="action-btn" @click="onTop(dataList,index)">置顶</span>\r\n <span v-if="index < dataList.length - 1" class="action-btn" @click="onBottom(dataList,index)">置底</span>\r\n </template>\r\n </i-table>\r\n </main>\r\n <slot slot="footer" name="footer"> </slot>\r\n</i-modal>\r\n'},"485f":function(t,e,n){"use strict";var i=n("5ee5"),r=n("42a3");t.exports=function(t){return i(r(t))}},4869:function(t,e,n){"use strict";var i=n("e900"),r=n("10a7"),o=n("815c");t.exports=!i&&!r((function(){return 7!==Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},4935:function(t,e){t.exports='<i-modal draggable sticky reset-drag-position :mask-closable="false" v-model="show" width="1280" class="u-data-model-modal diy-modal" transfer>\r\n <header slot="header">添加数据模型</header>\r\n <main>\r\n <i-split v-model="splitHorizontal">\r\n <section slot="left" class="card-panel card-panel-no-right-border">\r\n <div class="card-panel-header">\r\n <span>选择列表</span>\r\n </div>\r\n <div class="card-panel-main">\r\n <u-tree :commonTaskCategoryID="taskCategoryID" :initSelectItem="initNode" :prop-data="treeData" :isTreeList="true" @on-select="onSelect" />\r\n </div>\r\n </section>\r\n <section slot="right" class="right-content">\r\n <i-split v-model="splitVertical" mode="vertical" max="600">\r\n <section slot="top" class="card-panel card-panel-no-bottom-border">\r\n <div class="card-panel-header">\r\n <span>选择模型</span>\r\n </div>\r\n <div class="card-panel-main">\r\n <u-data-model-list\r\n :data="tableData"\r\n :paging.sync="paging"\r\n @on-search="onSearch"\r\n @on-page-index-change="onPageIndexChange"\r\n @on-page-size-change="onPageSizeChange"\r\n @on-selection-change="onSelectionChange"\r\n @on-delete-refresh="getTableData"\r\n @on-row-click="onRowClick"\r\n >\r\n </u-data-model-list>\r\n </div>\r\n </section>\r\n <section slot="bottom" :class="[\'card-panel\', collapse ? \'card-panel-no-bottom-border\' : \'\']">\r\n <div class="card-panel-header">\r\n <span>已选({{checkedLength}})</span>\r\n <span>\r\n <i-poptip confirm title="确定要清空已选中的数据吗?" transfer placement="top-end" @on-ok="onBatchDelete">\r\n <span class="action-text">\r\n <i class="iconfont icon-delete"></i>\r\n <span>清空</span>\r\n </span>\r\n </i-poptip>\r\n <span class="action-text collapse-text" @click="onClickCollapse">\r\n <span>{{collapse ? "展开" : "收起"}}</span>\r\n <i class="ivu-icon ivu-icon-ios-arrow-forward" :class="{\'icon-arrow-collapse\':collapse}"></i>\r\n </span>\r\n </span>\r\n </div>\r\n <div class="card-panel-main">\r\n <template v-if="checkedData&&checkedData.length">\r\n <i-table class="diy-table" :columns="columns" :data="checkedData">\r\n <template #operates="{row,index}">\r\n <div class="row-actions">\r\n <i-poptip confirm transfer title="确认要删除这条数据吗?" @on-ok="onDelete(row)">\r\n <i title="删除" class="iconfont icon-delete"></i>\r\n </i-poptip>\r\n </div>\r\n </template>\r\n </i-table>\r\n </template>\r\n <template v-else>\r\n <div class="table-no-data">\r\n <div class="table-no-data-bg"></div>\r\n <div class="table-no-data-text">暂无数据</div>\r\n </div>\r\n </template>\r\n </div>\r\n </section>\r\n </i-split>\r\n </section>\r\n </i-split>\r\n <i-spin fix v-if="isLoading">\r\n <i class="spin-icon-load ivu-icon"></i>\r\n </i-spin>\r\n </main>\r\n <footer slot="footer">\r\n <i-button type="primary" class="diy-btn-primary" @click="onSave">确定</i-button>\r\n <i-button class="diy-btn-default" @click="onCancel">取消</i-button>\r\n </footer>\r\n</i-modal>\r\n'},"4cad":function(t,e,n){"use strict";var i=n("720f");t.exports=i({}.isPrototypeOf)},5217:function(t,e){t.exports=s},"554d":function(t,e){t.exports=c},"575c":function(t,e,n){"use strict";var i=n("9b7f"),r=Math.max,o=Math.min;t.exports=function(t,e){var n=i(t);return n<0?r(n+e,0):o(n,e)}},"585e":function(t,e,n){"use strict";var i=n("e900"),r=n("4869"),o=n("ca33"),a=n("a079"),s=n("aee9"),c=TypeError,l=Object.defineProperty,p=Object.getOwnPropertyDescriptor,u="enumerable",d="configurable",h="writable";e.f=i?o?function(t,e,n){if(a(t),e=s(e),a(n),"function"===typeof t&&"prototype"===e&&"value"in n&&h in n&&!n[h]){var i=p(t,e);i&&i[h]&&(t[e]=n.value,n={configurable:d in n?n[d]:i[d],enumerable:u in n?n[u]:i[u],writable:!1})}return l(t,e,n)}:l:function(t,e,n){if(a(t),e=s(e),a(n),r)try{return l(t,e,n)}catch(i){}if("get"in n||"set"in n)throw new c("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},"58d2":function(t,e,n){},"5afa":function(t,e,n){"use strict";var i=n("3117"),r=n("e1e9"),o=r.concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return i(t,o)}},"5ee5":function(t,e,n){"use strict";var i=n("720f"),r=n("10a7"),o=n("0d9b"),a=Object,s=i("".split);t.exports=r((function(){return!a("z").propertyIsEnumerable(0)}))?function(t){return"String"===o(t)?s(t,""):a(t)}:a},"61ef":function(t,e,n){},6255:function(t,e){t.exports='<i-modal\r\n draggable\r\n sticky\r\n reset-drag-position\r\n v-model="value"\r\n class="diy-modal"\r\n :mask-closable="false"\r\n :title="data.id ? \'编辑项目\': \'新建项目\'"\r\n>\r\n <i-form :label-width="95" class="diy-form" label-colon>\r\n <i-form-item label="项目名称" required>\r\n <i-input\r\n v-model.trim="data.name"\r\n class="diy-input"\r\n placeholder="请输入项目名称"\r\n ></i-input>\r\n </i-form-item>\r\n <i-form-item label="项目描述">\r\n <i-input\r\n class="diy-input"\r\n type="textarea"\r\n :rows="4"\r\n v-model="data.description"\r\n placeholder="请输入项目描述"\r\n ></i-input>\r\n </i-form-item>\r\n </i-form>\r\n <slot slot="footer" name="footer"> </slot>\r\n</i-modal>\r\n'},6296:function(t,e,n){"use strict";var i=n("8785");t.exports=function(t){return i(t)||null===t}},6397:function(t,e){t.exports=l},"64d5":function(t,e){t.exports=p},"65e5":function(t,e,n){},"688a":function(t,e,n){},"68b7":function(t,e,n){"use strict";var i=n("92d6"),r=n("720f"),o=n("ce97"),a=n("96e5"),s=URLSearchParams,c=s.prototype,l=r(c.append),p=r(c["delete"]),u=r(c.forEach),d=r([].push),h=new s("a=1&a=2&b=3");h["delete"]("a",1),h["delete"]("b",void 0),h+""!=="a=2"&&i(c,"delete",(function(t){var e=arguments.length,n=e<2?void 0:arguments[1];if(e&&void 0===n)return p(this,t);var i=[];u(this,(function(t,e){d(i,{key:e,value:t})})),a(e,1);var r,s=o(t),c=o(n),h=0,f=0,m=!1,y=i.length;while(h<y)r=i[h++],m||r.key===s?(m=!0,p(this,r.key)):f++;while(f<y)r=i[f++],r.key===s&&r.value===c||l(this,r.key,r.value)}),{enumerable:!0,unsafe:!0})},"6a10":function(t,e,n){"use strict";var i,r,o,a=n("f764"),s=n("e900"),c=n("bc85"),l=n("ec2f"),p=n("8785"),u=n("d803"),d=n("aaa6"),h=n("1d6e"),f=n("9822"),m=n("92d6"),y=n("889b"),v=n("4cad"),g=n("a54a"),b=n("a2df"),w=n("fff8"),x=n("a047"),S=n("fcc0"),I=S.enforce,k=S.get,C=c.Int8Array,j=C&&C.prototype,D=c.Uint8ClampedArray,O=D&&D.prototype,T=C&&g(C),E=j&&g(j),P=Object.prototype,M=c.TypeError,L=w("toStringTag"),A=x("TYPED_ARRAY_TAG"),N="TypedArrayConstructor",q=a&&!!b&&"Opera"!==d(c.opera),$=!1,R={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},_={BigInt64Array:8,BigUint64Array:8},F=function(t){if(!p(t))return!1;var e=d(t);return"DataView"===e||u(R,e)||u(_,e)},B=function(t){var e=g(t);if(p(e)){var n=k(e);return n&&u(n,N)?n[N]:B(e)}},z=function(t){if(!p(t))return!1;var e=d(t);return u(R,e)||u(_,e)},V=function(t){if(z(t))return t;throw new M("Target is not a typed array")},U=function(t){if(l(t)&&(!b||v(T,t)))return t;throw new M(h(t)+" is not a typed array constructor")},H=function(t,e,n,i){if(s){if(n)for(var r in R){var o=c[r];if(o&&u(o.prototype,t))try{delete o.prototype[t]}catch(a){try{o.prototype[t]=e}catch(l){}}}E[t]&&!n||m(E,t,n?e:q&&j[t]||e,i)}},G=function(t,e,n){var i,r;if(s){if(b){if(n)for(i in R)if(r=c[i],r&&u(r,t))try{delete r[t]}catch(o){}if(T[t]&&!n)return;try{return m(T,t,n?e:q&&T[t]||e)}catch(o){}}for(i in R)r=c[i],!r||r[t]&&!n||m(r,t,e)}};for(i in R)r=c[i],o=r&&r.prototype,o?I(o)[N]=r:q=!1;for(i in _)r=c[i],o=r&&r.prototype,o&&(I(o)[N]=r);if((!q||!l(T)||T===Function.prototype)&&(T=function(){throw new M("Incorrect invocation")},q))for(i in R)c[i]&&b(c[i],T);if((!q||!E||E===P)&&(E=T.prototype,q))for(i in R)c[i]&&b(c[i].prototype,E);if(q&&g(O)!==E&&b(O,E),s&&!u(E,L))for(i in $=!0,y(E,L,{configurable:!0,get:function(){return p(this)?this[A]:void 0}}),R)c[i]&&f(c[i],A,i);t.exports={NATIVE_ARRAY_BUFFER_VIEWS:q,TYPED_ARRAY_TAG:$&&A,aTypedArray:V,aTypedArrayConstructor:U,exportTypedArrayMethod:H,exportTypedArrayStaticMethod:G,getTypedArrayConstructor:B,isView:F,isTypedArray:z,TypedArray:T,TypedArrayPrototype:E}},"6a6c":function(t,e,n){"use strict";var i=n("fff8"),r=i("toStringTag"),o={};o[r]="z",t.exports="[object z]"===String(o)},"6bf0":function(t,e,n){"use strict";var i=n("bc85"),r=n("a95a"),o=n("6a10"),a=n("d631"),s=n("16bf"),c=n("e614"),l=n("10a7"),p=i.RangeError,u=i.Int8Array,d=u&&u.prototype,h=d&&d.set,f=o.aTypedArray,m=o.exportTypedArrayMethod,y=!l((function(){var t=new Uint8ClampedArray(2);return r(h,t,{length:1,0:3},1),3!==t[1]})),v=y&&o.NATIVE_ARRAY_BUFFER_VIEWS&&l((function(){var t=new u(2);return t.set(1),t.set("2",1),0!==t[0]||2!==t[1]}));m("set",(function(t){f(this);var e=s(arguments.length>1?arguments[1]:void 0,1),n=c(t);if(y)return r(h,this,n,e);var i=this.length,o=a(n),l=0;if(o+e>i)throw new p("Wrong length");while(l<o)this[e+l]=n[l++]}),!y||v)},"6d46":function(t,e){t.exports='<article class="u-common-tree" :class="className.join(\' \')">\r\n <slot name="header"></slot>\r\n <section class="content">\r\n <i-input\r\n class="search-input"\r\n suffix="ios-search"\r\n :placeholder="placeholder"\r\n @on-change="onFilter"\r\n v-model="keyword"\r\n >\r\n <i class="iconfont icon-chaxun" slot="prefix"></i>\r\n </i-input>\r\n <i-tree\r\n :data="renderData"\r\n :render="renderContent"\r\n @on-toggle-expand="onToggleExpand"\r\n ></i-tree>\r\n </section>\r\n</article>\r\n'},"6d6e":function(t,e,n){"use strict";var i=n("bd74"),r=n("d803"),o=n("9822"),a=n("4cad"),s=n("a2df"),c=n("3955"),l=n("862c"),p=n("998d"),u=n("327c"),d=n("8c3a"),h=n("17f8"),f=n("e900"),m=n("7e75");t.exports=function(t,e,n,y){var v="stackTraceLimit",g=y?2:1,b=t.split("."),w=b[b.length-1],x=i.apply(null,b);if(x){var S=x.prototype;if(!m&&r(S,"cause")&&delete S.cause,!n)return x;var I=i("Error"),k=e((function(t,e){var n=u(y?e:t,void 0),i=y?new x(t):new x;return void 0!==n&&o(i,"message",n),h(i,k,i.stack,2),this&&a(S,this)&&p(i,this,k),arguments.length>g&&d(i,arguments[g]),i}));if(k.prototype=S,"Error"!==w?s?s(k,I):c(k,I,{name:!0}):f&&v in x&&(l(k,x,v),l(k,x,"prepareStackTrace")),c(k,x),!m)try{S.name!==w&&o(S,"name",w),S.constructor=k}catch(C){}return k}}},"713b":function(t,e,n){},"720f":function(t,e,n){"use strict";var i=n("12f2"),r=Function.prototype,o=r.call,a=i&&r.bind.bind(o,o);t.exports=i?a:function(t){return function(){return o.apply(t,arguments)}}},7359:function(t,e,n){},7640:function(t,e){t.exports='<article class="params-setting">\r\n <i-collapse v-model="value" simple>\r\n <i-panel name="1">\r\n <span>Query参数</span>\r\n <i-icon class="help-icon" type="md-alert" @click.stop="showScriptDoc" title="说明文档"> </i-icon>\r\n <span class="status">{{getExpand(\'1\') ? "收起" : "展开"}}</span>\r\n <div slot="content" class="setting-content">\r\n <header>\r\n <i-button type="primary" ghost class="diy-btn-primary" @click="onAddRequestParam"> <i class="api-icon icon-add"></i>新增参数 </i-button>\r\n </header>\r\n <main>\r\n <i-table height="200" width="1280" class="diy-table" @on-selection-change="onQuerySelectionChange" :columns="paramColumns" :data="queryDataList">\r\n <template slot-scope="{ row,index }" slot="selection">\r\n <i-switch size="large" :value="!queryDataList[index].disabled" @on-change="onChangeDisabled($event,queryDataList[index],\'query\')">\r\n <span slot="open">开启</span>\r\n <span slot="close">禁用</span>\r\n </i-switch>\r\n </template>\r\n <template slot-scope="{ row,index }" slot="name">\r\n <i-input class="diy-input" placeholder="输入参数名称" v-model="queryDataList[index].name"></i-input>\r\n </template>\r\n <template slot-scope="{ row,index }" slot="valueContent">\r\n <i-input class="diy-input" placeholder="输入参数值" v-model="queryDataList[index].valueContent"></i-input>\r\n </template>\r\n <template slot-scope="{ row,index }" slot="required">\r\n <i-switch v-model="queryDataList[index].requireFlag" :disabled="queryDataList[index].disabled" :true-value="1" :false-value="0">\r\n <span slot="open">是</span>\r\n <span slot="close">否</span>\r\n </i-switch>\r\n </template>\r\n <template slot-scope="{ row,index }" slot="text">\r\n <i-input class="diy-input" placeholder="输入备注" v-model="queryDataList[index].text"></i-input>\r\n </template>\r\n <template slot-scope="{ row,index }" slot="action">\r\n <i-poptip class="action-btn delete" title="确认删除这条数据吗?" confirm @on-ok="onDelete(queryDataList,row.indexFlag,\'query\')" transfer>\r\n <i class="iconfont icon-delete" title="删除"></i>\r\n </i-poptip>\r\n <span>\r\n <i v-if="index>0" class="iconfont icon-up" @click="onUp(queryDataList,index)" title="上移"></i>\r\n <i v-if="index>0" class="iconfont icon-top" title="置顶" @click="onTop(queryDataList,index)"></i>\r\n <i v-if="index < queryDataList.length - 1" @click="onDown(queryDataList,index)" class="iconfont icon-down" title="下移"></i>\r\n <i v-if="index < queryDataList.length - 1" @click="onBottom(queryDataList,index)" class="iconfont icon-bottom" title="置底"></i>\r\n </span>\r\n </template>\r\n </i-table>\r\n </main>\r\n </div>\r\n </i-panel>\r\n <i-panel name="2">\r\n <span>Body参数</span>\r\n <span class="status">{{getExpand(\'2\') ? "收起" : "展开"}}</span>\r\n <div slot="content" class="setting-content">\r\n <header>\r\n <i-button v-if="isFormData" type="primary" ghost class="diy-btn-primary" @click="onAddBodyParam"> <i class="api-icon icon-add"></i>新增参数 </i-button>\r\n <i-button v-else type="primary" ghost class="diy-btn-primary" @click="onBeautify"> <i class="api-icon icon-view"></i>格式化 </i-button>\r\n <i-select transfer v-model="interfaceModel.info.requestBodyType" class="diy-select">\r\n <i-option v-for="item in requestBodyTypeList" :value="item.name" :key="item.name">{{item.text}}</i-option>\r\n </i-select>\r\n </header>\r\n <main>\r\n <i-table\r\n height="200"\r\n width="1280"\r\n class="diy-table"\r\n @on-selection-change="onBodySelectionChange"\r\n :columns="bodyColumns"\r\n :data="bodyDataList"\r\n v-if="isFormData"\r\n >\r\n <template slot-scope="{ row,index }" slot="selection">\r\n <i-switch size="large" :value="!bodyDataList[index].disabled" @on-change="onChangeDisabled($event,bodyDataList[index],\'body\')">\r\n <span slot="open">开启</span>\r\n <span slot="close">禁用</span>\r\n </i-switch>\r\n </template>\r\n <template slot-scope="{ row,index }" slot="name">\r\n <div class="body-name-row">\r\n <i-input class="diy-input" placeholder="输入参数名称" v-model="bodyDataList[index].name"></i-input>\r\n <i-select class="diy-select" v-if="bodyType === \'Form\'" v-model="row.valueType" @on-change="onChangeFormParamType(index, row)" transfer>\r\n <i-option v-for="item in formParamTypeList" :value="item.name" :key="item.name">{{item.text}}</i-option>\r\n </i-select>\r\n </div>\r\n </template>\r\n <template slot-scope="{ row,index }" slot="valueContent">\r\n <i-input v-if="row.valueType !== \'FILE\'" class="diy-input" placeholder="输入参数值" v-model="bodyDataList[index].valueContent"></i-input>\r\n <i-upload v-if="row.valueType === \'FILE\' && !row.fileName" action="" :before-upload="onImport" :show-upload-list="false">\r\n <i-button class="file-btn" icon="ios-cloud-upload-outline" @click="onClickRow(row)">选择文件</i-button>\r\n </i-upload>\r\n <div class="file-wrap" v-if="row.valueType === \'FILE\' && row.fileName">\r\n <div class="file-name" :title="row.fileName">{{ row.fileName }}</div>\r\n <i-icon type="ios-close" @click="onClearFile(row)" />\r\n </div>\r\n </template>\r\n <template slot-scope="{ row,index }" slot="required">\r\n <i-switch v-model="bodyDataList[index].requireFlag" :disabled="bodyDataList[index].disabled" :true-value="1" :false-value="0">\r\n <span slot="open">是</span>\r\n <span slot="close">否</span>\r\n </i-switch>\r\n </template>\r\n <template slot-scope="{ row,index }" slot="text">\r\n <i-input class="diy-input" placeholder="输入备注" v-model="bodyDataList[index].remark"></i-input>\r\n </template>\r\n <template slot-scope="{ row,index }" slot="action">\r\n <i-poptip class="action-btn delete" title="确认删除这条数据吗?" confirm @on-ok="onDeleteBodyParam(interfaceModel.formParams,row.indexFlag,\'body\')" transfer>\r\n <i class="iconfont icon-delete" title="删除"></i>\r\n </i-poptip>\r\n <span>\r\n <i v-if="index > 0" class="iconfont icon-up" @click="onUpBodyParam(interfaceModel.formParams,row.id)" title="上移"></i>\r\n <i v-if="index > 0" class="iconfont icon-top" @click="onTopBodyParam(interfaceModel.formParams,row.id)" title="置顶"></i>\r\n <i v-if="index < bodyDataList.length - 1" @click="onDownBodyParam(interfaceModel.formParams,row.id)" class="iconfont icon-down" title="下移"></i>\r\n <i\r\n v-if="index < bodyDataList.length - 1"\r\n @click="onBottomBodyParam(interfaceModel.formParams,row.id)"\r\n class="iconfont icon-bottom"\r\n title="置底"\r\n ></i>\r\n </span>\r\n </template>\r\n </i-table>\r\n <u-editor v-else :value.sync="interfaceModel.json" lang="json" @inited="onEditorInited"></u-editor>\r\n </main>\r\n </div>\r\n </i-panel>\r\n </i-collapse>\r\n <u-doc-modal class="script-doc-modal" v-model="scriptDocShow" :doc="scriptDoc"></u-doc-modal>\r\n</article>\r\n'},"767a":function(t,e,n){"use strict";var i=n("ad8b"),r=n("10a7"),o=n("bc85"),a=o.String;t.exports=!!Object.getOwnPropertySymbols&&!r((function(){var t=Symbol("symbol detection");return!a(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&i&&i<41}))},7801:function(t,e,n){"use strict";var i=n("ec2f"),r=n("1d6e"),o=TypeError;t.exports=function(t){if(i(t))return t;throw new o(r(t)+" is not a function")}},"7af4":function(t,e,n){
2
2
  /*!
3
3
  * vue-virtual-scroll-list v2.3.4
4
4
  * open source under the MIT license