@zhijiancloud/bpm 1.0.23 → 1.0.25
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.
- package/dist/bpmAudit.umd.js +1 -1
- package/dist/bpmField.umd.js +5 -5
- package/dist/bpmFormField.umd.js +5 -5
- package/dist/bpmMapLocation.umd.js +1 -1
- package/dist/bpmMulImage.umd.js +1 -1
- package/dist/bpmSelectCheckItem.umd.js +1 -1
- package/dist/bpmSelectEntranceForm.umd.js +1 -1
- package/dist/bpmSelectFromField.umd.js +1 -1
- package/dist/bpmSelectFromMulForm.umd.js +1 -1
- package/dist/bpmSelectUser.umd.js +1 -1
- package/dist/bpmSignature.umd.js +1 -1
- package/dist/bpmSubForm.umd.js +1 -1
- package/dist/bpmSubFormField.umd.js +5 -5
- package/dist/index.umd.js +5 -5
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("lodash"),require("qs")):"function"==typeof define&&define.amd?define(["lodash","qs"],t):"object"==typeof exports?exports.bpm2=t(require("lodash"),require("qs")):e.bpm2=t(e.lodash,e.qs)}(self,(function(e,t){return function(){var r={5281:function(e,t,r){"use strict";r.d(t,{A:function(){return c}});var n=r(9795),a=r(6773),i=r.n(a),o=class{constructor(e,t={}){this._fnBatchLoad=e,this._options=t,this._queue=[]}async load(e){let t=await this.loads(e);return i().get(t,"0")}loads(...e){return new Promise(((t,r)=>{this._queue.push({keys:e,resolve:t,reject:r}),1==this._queue.length&&this.nextTick((()=>{this.process()}))}))}nextTick(e){setTimeout(e,0)}process(){let e=this._queue;this._queue=[];let t={};i().each(e,(e=>{i().each(e.keys,(e=>t[e]=null))}));let r=i().keys(t);this._fnBatchLoad(r).then((n=>{i().each(r,((e,r)=>{t[e]=n[r]})),i().each(e,(({keys:e,resolve:r})=>{r(i().map(e,(e=>t[e])))}))})).catch((t=>{i().each(e,(({reject:e})=>e(t)))}))}};const s=async(e,t,r)=>{if(t.networking=!0,t.netHeader&&(e.headers={common:t.netHeader}),e.params=_.merge({},e.params,r),t.env.ignore_levels&&_.set(e.params,"ignore_levels",!0),(0,n.Fr)()){let t=zj.utils.pageParam().token;e.params=_.merge({token:t,platform:"phone"},e.params)}e.isSilentOnErr=e=>{let t=_.get(e,"data.result");return t>=19e6||t<=19999999};let a=_.cloneDeep(e);if(a.can_custom_org_params){let e=_.cloneDeep(_.get(t,"orgInfo",{}));console.log("bpm3_orgInfo",e),e.custom_page_level&&(a.params.page_level=e.custom_page_level),e.custom_group_id&&(a.params.group_id=e.custom_group_id),e.custom_team_id&&(a.params.team_id=e.custom_team_id),e.custom_project_id&&(a.params.project_id=e.custom_project_id)}console.log("bpm3_orgInfo_reqArgs",a);let i=await zj.net.request(a);return t.networking=!1,i},l={},u={};var c={assistSelectEntranceForm:{getListDefinition(e,{formDefId:t,fieldDefId:r,orgInfo:n,isDm:a}){return s({url:`/app_flow/v1/papi/assist_select_entrance_form/${t}/${r}/list_definition/`,method:"GET"},e,n)},getOptions(e,{formDefId:t,fieldDefId:r,orgInfo:n,isDm:a},i){return s({url:`/app_flow/v1/papi/assist_select_entrance_form/${t}/${r}/list_search/`,method:"GET",params:i},e,n)},getListSelected(e,{formDefId:t,fieldDefId:r,orgInfo:n,isDm:a},i){return s({url:`/app_flow/v1/papi/assist_select_entrance_form/${t}/${r}/list_selected/`,method:"GET",params:i},e,n)}},assistField:{getBatchLoader(e,{formDefId:t,fieldDefId:r,orgInfo:n,uniqueId:a}){const i=`${t}/${r}`,u=l[i]||new o((async i=>{let o=`/app_flow/v1/papi/assist_field/${t}/${r}/list_title/`;const l=await s({url:o,method:"GET",params:{values:JSON.stringify(i)}},e,n),u=_.get(l,"data.data.data",{});let c=[];return _.map(i,(e=>{a?(e=JSON.parse(e),e=_.get(e,`${a}`),c=_.concat(c,u[e])):c=_.concat(c,u[e])})),c}));return l[i]=u,u},getTitle(e,{formDefId:t,fieldDefId:r,orgInfo:n,isDm:a},i){return s({url:`/app_flow/v1/papi/assist_field/${t}/${r}/list_title/`,method:"GET",params:{values:JSON.stringify(i)}},e,n)},async searchSelectOpts(e,{formDefId:t,fieldDefId:r,orgInfo:n,isDm:a},i={},o=""){o&&(i.q=o);let l=a?`/app_flow/v1/papi/dm/assist_field/${t}/${r}/search_title/`:`/app_flow/v1/papi/assist_field/${t}/${r}/search_title/`,c=`${t}/${r}/${o}/${JSON.stringify(n)}/${JSON.stringify(i)}`,f={};return u[c]&&"loading"==u[c]?(console.log("有缓存,返回"),await this.waitCacheMapData(c)):(!u[c]||(new Date).getTime()-u[c].last_time>6e4?(u[c]="loading",f=await s({url:l,method:a?"GET":"POST",data:i,can_custom_org_params:!0},e,n),u[c]={last_time:(new Date).getTime(),result:f}):(console.log("有缓存"),u[c].result&&(f=u[c].result)),f)},waitCacheMapData(e){return new Promise((t=>{let r=setInterval((()=>{u[e]&&"loading"!=u[e]&&u[e].result&&(clearInterval(r),t(u[e].result))}),100)}))},selectFromMulFormSearchOpts(e,{formDefId:t,fieldDefId:r,orgInfo:n,isDm:a},i={},o=""){return o&&(i.q=o),s({url:a?`/app_flow/v1/papi/dm/assist_field/select_form_mul_form/${t}/${r}/search_title/`:`/app_flow/v1/papi/assist_field/select_form_mul_form/${t}/${r}/search_title/`,method:"GET",params:i},e,n)},selectFromMulFormListTitleLoader(e,{formDefId:t,fieldDefId:r,orgInfo:n,isDm:a}){const i=`${t}/${r}`,u=l[i]||new o((async i=>{let o=a?`/app_flow/v1/papi/dm/assist_field/select_form_mul_form/${t}/${r}/list_title/`:`/app_flow/v1/papi/assist_field/select_form_mul_form/${t}/${r}/list_title/`;const l=await s({url:o,method:"GET",params:{values:JSON.stringify(i)}},e,n),u=_.get(l.data,"data.items",[]),c={};u.forEach((e=>{Object.keys(e.data).forEach((t=>{let r=e.data[t];c[t]={form_def_id:_.get(e,"definition.form.id"),form_title:_.get(e,"definition.form.name"),label:r}}))}));let f=[];return i.forEach((e=>{f.push(c[e])})),f}));return l[i]=u,u},selectFromMulFormListTitle(e,{formDefId:t,fieldDefId:r,orgInfo:n,isDm:a},i){return s({url:a?`/app_flow/v1/papi/dm/assist_field/select_form_mul_form/${t}/${r}/list_title/`:`/app_flow/v1/papi/assist_field/select_form_mul_form/${t}/${r}/list_title/`,method:"GET",params:{values:JSON.stringify(i)}},e,n)}},assistTreeField:{searchSelectOpts(e,{formDefId:t,fieldDefId:r,orgInfo:n,isDm:a},i={},o=""){return o&&(i.q=o),s({url:a?`/app_flow/v1/papi/dm/assist_tree_field/${t}/${r}/search_title/`:`/app_flow/v1/papi/assist_tree_field/${t}/${r}/search_title/`,method:"GET",params:i,can_custom_org_params:!0},e,n)}},assistUserTaskCC:{searchSelectOpts(e,{formDefId:t,node:r,orgInfo:n,isDm:a},i={},o=""){return o&&(i.q=o),s({url:`/app_flow/v1/papi/assist_user_task_cc/${t}/${r}/search_title/`,method:"GET",params:i},e,n)}}}},9795:function(e,t,r){"use strict";function n(){for(var e=["iphone","ipod","ipad","android","mobile","blackberry","webos","incognito","webmate","bada","nokia","lg","ucweb","skyfire"],t=navigator.userAgent.toLowerCase(),r=!1,n=0,a=e.length;n<a;n++)-1!=t.indexOf(e[n])&&(r=!0);return r}r.d(t,{Fr:function(){return n}}),r(6773),r(5360)},6509:function(e,t,r){"use strict";var n=r(1601),a=r.n(n),i=r(6314),o=r.n(i)()(a());o.push([e.id,".bpm-select-tree {\n .el-select-dropdown__item.hover {\n background: none!important;\n }\n .tree-options.el-select-dropdown__item {\n padding: 0 0;\n }\n}\n",""]),t.A=o},347:function(e,t,r){"use strict";var n=r(1601),a=r.n(n),i=r(6314),o=r.n(i),s=r(6509),l=o()(a());l.i(s.A),l.push([e.id,"\n",""]),t.A=l},6314:function(e){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var r="",n=void 0!==t[5];return t[4]&&(r+="@supports (".concat(t[4],") {")),t[2]&&(r+="@media ".concat(t[2]," {")),n&&(r+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),r+=e(t),n&&(r+="}"),t[2]&&(r+="}"),t[4]&&(r+="}"),r})).join("")},t.i=function(e,r,n,a,i){"string"==typeof e&&(e=[[null,e,void 0]]);var o={};if(n)for(var s=0;s<this.length;s++){var l=this[s][0];null!=l&&(o[l]=!0)}for(var u=0;u<e.length;u++){var c=[].concat(e[u]);n&&o[c[0]]||(void 0!==i&&(void 0===c[5]||(c[1]="@layer".concat(c[5].length>0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=i),r&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=r):c[2]=r),a&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=a):c[4]="".concat(a)),t.push(c))}},t}},1601:function(e){"use strict";e.exports=function(e){return e[1]}},5072:function(e){"use strict";var t=[];function r(e){for(var r=-1,n=0;n<t.length;n++)if(t[n].identifier===e){r=n;break}return r}function n(e,n){for(var i={},o=[],s=0;s<e.length;s++){var l=e[s],u=n.base?l[0]+n.base:l[0],c=i[u]||0,f="".concat(u," ").concat(c);i[u]=c+1;var d=r(f),p={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==d)t[d].references++,t[d].updater(p);else{var m=a(p,n);n.byIndex=s,t.splice(s,0,{identifier:f,updater:m,references:1})}o.push(f)}return o}function a(e,t){var r=t.domAPI(t);return r.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;r.update(e=t)}else r.remove()}}e.exports=function(e,a){var i=n(e=e||[],a=a||{});return function(e){e=e||[];for(var o=0;o<i.length;o++){var s=r(i[o]);t[s].references--}for(var l=n(e,a),u=0;u<i.length;u++){var c=r(i[u]);0===t[c].references&&(t[c].updater(),t.splice(c,1))}i=l}}},7659:function(e){"use strict";var t={};e.exports=function(e,r){var n=function(e){if(void 0===t[e]){var r=document.querySelector(e);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}t[e]=r}return t[e]}(e);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(r)}},540:function(e){"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},5056:function(e,t,r){"use strict";e.exports=function(e){var t=r.nc;t&&e.setAttribute("nonce",t)}},7825:function(e){"use strict";e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(r){!function(e,t,r){var n="";r.supports&&(n+="@supports (".concat(r.supports,") {")),r.media&&(n+="@media ".concat(r.media," {"));var a=void 0!==r.layer;a&&(n+="@layer".concat(r.layer.length>0?" ".concat(r.layer):""," {")),n+=r.css,a&&(n+="}"),r.media&&(n+="}"),r.supports&&(n+="}");var i=r.sourceMap;i&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),t.styleTagTransform(n,e,t.options)}(t,e,r)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},1113:function(e){"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},7348:function(e,t,r){"use strict";r.d(t,{A:function(){return l}});var n=function(){var e=this,t=e.$createElement;return(e._self._c||t)("span",{attrs:{title:e.label}},[e._v(e._s(e.label))])};n._withStripped=!0;var a=r(6773),i=r.n(a),o={props:["value","fieldConf","row","formName","orgInfo"],data(){return{label:""}},watch:{value(){this.loadRemoteLabel()}},mounted(){this.loadRemoteLabel()},methods:{async loadRemoteLabel(){let e=this.value;if(i().isNil(e)||!e)return this.label=zj.z("未选择","c.not_selected");try{if(i().isObject(e))try{e=JSON.parse(e)}catch(e){console.log("error",e)}let t=i().isArray(e)?e:[e],r=i().get(this.fieldConf,"id");i().isEmpty(t)?this.label=zj.z("未选择","c.not_selected"):(t=i().isArray(t)?t:[t],this.label=await this.$bpm.fetchLabelByValues(t,r,this.formName,this.row))}finally{console.log("finally")}}}},s=(0,r(4486).A)(o,n,[],!1,null,null,null);s.options.__file="components/lib/mixins/RemoteSelectReader.vue";var l=s.exports},4486:function(e,t,r){"use strict";function n(e,t,r,n,a,i,o,s){var l,u="function"==typeof e?e.options:e;if(t&&(u.render=t,u.staticRenderFns=r,u._compiled=!0),n&&(u.functional=!0),i&&(u._scopeId="data-v-"+i),o?(l=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),a&&a.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(o)},u._ssrRegister=l):a&&(l=s?function(){a.call(this,(u.functional?this.parent:this).$root.$options.shadowRoot)}:a),l)if(u.functional){u._injectStyles=l;var c=u.render;u.render=function(e,t){return l.call(t),c(e,t)}}else{var f=u.beforeCreate;u.beforeCreate=f?[].concat(f,l):[l]}return{exports:e,options:u}}r.d(t,{A:function(){return n}})},7642:function(e){e.exports=function(){return this.ELEMENT}()},5554:function(e){e.exports=function(){return this.Vue}()},6773:function(t){"use strict";t.exports=e},5360:function(e){"use strict";e.exports=t}},n={};function a(e){var t=n[e];if(void 0!==t)return t.exports;var i=n[e]={id:e,exports:{}};return r[e](i,i.exports,a),i.exports}a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,{a:t}),t},a.d=function(e,t){for(var r in t)a.o(t,r)&&!a.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.nc=void 0;var i={};return function(){"use strict";a.r(i),a.d(i,{default:function(){return V}});var e=function(){var e=this,t=e.$createElement;return(e._self._c||t)(e.curComponent,e._g(e._b({tag:"component",staticClass:"bpm-select-check-item",attrs:{fieldConf:e.fieldConf,row:e.row,orgInfo:e.orgInfo,formName:e.formName,mode:e.mode,isMultiple:e.multiple,uiType:e.uiType},on:{change:e.handleChange},model:{value:e.curVal,callback:function(t){e.curVal=t},expression:"curVal"}},"component",e.$attrs,!1),e.$listeners))};e._withStripped=!0;var t=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[r("el-select",{staticStyle:{width:"100%"},attrs:{"popper-class":"bpm-select-tree",multiple:e.isMultiple,placeholder:e.placeholder,"multiple-limit":e.maxCount},on:{change:e.onChange},model:{value:e.curVal,callback:function(t){e.curVal=t},expression:"curVal"}},[e._l(e.defaultOptions,(function(e){return r("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),e._v(" "),r("el-tree",{attrs:{lazy:"",load:e.loadNode,"node-key":"value",props:{label:"treeLabel",children:"children",disabled:"disabled",isLeaf:"isLeaf"},indent:16},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.node;return n.data.disabled?r("span",{},[e._v("\n "+e._s(n.label)+"\n ")]):r("el-option",{staticClass:"tree-options",attrs:{value:n.data.value,label:n.data.label}},[r("span",{staticStyle:{"padding-right":"30px","max-width":"500px",overflow:"hidden"}},[e._v("\n "+e._s(n.label)+"\n ")])])}}],null,!0)})],2)],1)};t._withStripped=!0;var r=a(5281),n=a(5554),o=a.n(n),s=a(6773),l=a.n(s),u=a(7642);o().use(u.Tree),o().use(u.Select),o().use(u.Option);var c={props:["value","fieldConf","row","formName","formDefId","orgInfo","dm","isMultiple"],data(){return{curVal:"",defaultOptions:[]}},watch:{value(){this.curVal=this.value?this.value:this.isMultiple?[]:"",this.getDefaultOptions()}},computed:{placeholder(){return this.fieldConf.desc||this.fieldConf.name},maxCount(){return l().get(this.fieldConf,"check.max_count")},tickStrategy(){return"leaf_only"==l().get(this.fieldConf,"tree_select","all")?"leaf-filtered":"strict"},leafOnly(){return"leaf_only"===this.fieldConf.tree_select}},created(){this.curVal=this.isMultiple?[]:""},mounted(){this.curVal=this.value?this.value:this.isMultiple?[]:""},methods:{async loadNode(e,t){let n=l().get(this.fieldConf,"id"),a={father:0===e.level?"":e.data.value||""},i=await r.A.assistTreeField.searchSelectOpts(this.$bpm,{formDefId:this.formDefId,fieldDefId:n,orgInfo:this.orgInfo,isDm:this.dm},a),o=l().get(i.data,"data.data",[]);console.log("list_result",o);let s=this.transformResultToTree(o,e);console.log("list",s),t(s)},transformResultToTree(e,t){let r=l().get(this.fieldConf,"type");return"SelectCheckItem"==r||"MulSelectCheckItem"==r?l().map(e,(e=>{this.isMultiple||e[0]!==this.curVal||(this.defaultOptions=[]),this.isMultiple&&this.curVal.includes(e[0])&&(this.defaultOptions=l().filter(this.defaultOptions,(t=>t.value!==e[0])));let r=0===t.level?e[1]:t.data.label+" - "+e[1],n=!e[2];return{value:e[0],lazy:e[2],label:r,treeLabel:e[1],isLeaf:n,disabled:this.leafOnly&&!n}})):"SelectSort"==r||"MulSelectSort"==r?l().map(e,(e=>{this.isMultiple||e.value!==this.curVal||(this.defaultOptions=[]),this.isMultiple&&this.curVal.includes(e.value)&&(this.defaultOptions=l().filter(this.defaultOptions,(t=>t.value!==e.value)));let r=0===t.level?e.label:t.data.label+" - "+e.label,n=!e.lazy;return{value:e.value,lazy:e.lazy,label:r,treeLabel:e.label,isLeaf:n,disabled:this.leafOnly&&!n}})):void 0},async getDefaultOptions(){let e=l().isArray(this.curVal)?this.curVal:this.curVal?[this.curVal]:[];if(!e.length)return;const t=await r.A.assistField.getTitle(this.$bpm,{formDefId:this.formDefId,fieldDefId:this.fieldConf.id,orgInfo:this.orgInfo,isDm:this.dm},e);console.log(t);const n=l().get(t.data,"data.data",{});let a=l().map(n,((e,t)=>({value:t,label:e})));console.log("default options: ",a),this.defaultOptions=a},onChange(e){this.$emit("input",e),this.$emit("change",e)}}},f=a(4486),d=(0,f.A)(c,t,[],!1,null,null,null);d.options.__file="components/lib/bpmSelectCheckItem/src/part/editor.vue";var p=d.exports,m={mixins:[a(7348).A]},h=(0,f.A)(m,void 0,void 0,!1,null,null,null);h.options.__file="components/lib/bpmSelectCheckItem/src/part/reader.vue";var _=h.exports,v={name:"BpmSelectCheckItem",components:{editorComponent:p,readerComponent:_},props:{value:{type:[String,Array]},type:{type:String,default:"SelectCheckItem"},fieldConf:{type:Object,default(){return{}}},row:{type:Object,default(){return{}}},mode:{type:String,default(){return"view"}},uiType:{type:String,default(){return"default"}},orgInfo:{type:Object},formName:{type:String},isMultiple:{type:Boolean,default(){return!1}}},data(){return{curVal:""}},computed:{curComponent(){return"view"==this.mode?_:p},multiple(){return this.isMultiple||0===this.type.indexOf("Mul")}},watch:{value(){this.curVal=this.value}},mounted(){this.curVal=this.value},methods:{handleChange(e){this.$emit("input",e),this.$emit("change",e)}}},g=a(5072),y=a.n(g),b=a(7825),I=a.n(b),w=a(7659),$=a.n(w),S=a(5056),C=a.n(S),D=a(540),T=a.n(D),O=a(1113),x=a.n(O),k=a(347),E={};E.styleTagTransform=x(),E.setAttributes=C(),E.insert=$().bind(null,"head"),E.domAPI=I(),E.insertStyleElement=T(),y()(k.A,E),k.A&&k.A.locals&&k.A.locals;var M=(0,f.A)(v,e,[],!1,null,null,null);M.options.__file="components/lib/bpmSelectCheckItem/src/main.vue";var A=M.exports;A.install=function(e){e.component(A.name,A)};var V=A}(),i}()}));
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("lodash"),require("qs")):"function"==typeof define&&define.amd?define(["lodash","qs"],t):"object"==typeof exports?exports.bpm2=t(require("lodash"),require("qs")):e.bpm2=t(e.lodash,e.qs)}(self,(function(e,t){return function(){var r={5281:function(e,t,r){"use strict";r.d(t,{A:function(){return c}});var n=r(9795),a=r(6773),i=r.n(a),o=class{constructor(e,t={}){this._fnBatchLoad=e,this._options=t,this._queue=[]}async load(e){let t=await this.loads(e);return i().get(t,"0")}loads(...e){return new Promise(((t,r)=>{this._queue.push({keys:e,resolve:t,reject:r}),1==this._queue.length&&this.nextTick((()=>{this.process()}))}))}nextTick(e){setTimeout(e,0)}process(){let e=this._queue;this._queue=[];let t={};i().each(e,(e=>{i().each(e.keys,(e=>t[e]=null))}));let r=i().keys(t);this._fnBatchLoad(r).then((n=>{i().each(r,((e,r)=>{t[e]=n[r]})),i().each(e,(({keys:e,resolve:r})=>{r(i().map(e,(e=>t[e])))}))})).catch((t=>{i().each(e,(({reject:e})=>e(t)))}))}};const s=async(e,t,r)=>{if(t.setNetworking(!0),t.netHeader&&(e.headers={common:t.netHeader}),e.params=_.merge({},e.params,r),t.env.ignore_levels&&_.set(e.params,"ignore_levels",!0),(0,n.Fr)()){let t=zj.utils.pageParam().token;e.params=_.merge({token:t,platform:"phone"},e.params)}e.isSilentOnErr=e=>{let t=_.get(e,"data.result");return t>=19e6||t<=19999999};let a=_.cloneDeep(e);if(a.can_custom_org_params){let e=_.cloneDeep(_.get(t,"orgInfo",{}));console.log("bpm3_orgInfo",e),e.custom_page_level&&(a.params.page_level=e.custom_page_level),e.custom_group_id&&(a.params.group_id=e.custom_group_id),e.custom_team_id&&(a.params.team_id=e.custom_team_id),e.custom_project_id&&(a.params.project_id=e.custom_project_id)}console.log("bpm3_orgInfo_reqArgs",a);let i=await zj.net.request(a);return t.setNetworking(!1),i},l={},u={};var c={assistSelectEntranceForm:{getListDefinition(e,{formDefId:t,fieldDefId:r,orgInfo:n,isDm:a}){return s({url:`/app_flow/v1/papi/assist_select_entrance_form/${t}/${r}/list_definition/`,method:"GET"},e,n)},getOptions(e,{formDefId:t,fieldDefId:r,orgInfo:n,isDm:a},i){return s({url:`/app_flow/v1/papi/assist_select_entrance_form/${t}/${r}/list_search/`,method:"GET",params:i},e,n)},getListSelected(e,{formDefId:t,fieldDefId:r,orgInfo:n,isDm:a},i){return s({url:`/app_flow/v1/papi/assist_select_entrance_form/${t}/${r}/list_selected/`,method:"GET",params:i},e,n)}},assistField:{getBatchLoader(e,{formDefId:t,fieldDefId:r,orgInfo:n,uniqueId:a}){const i=`${t}/${r}`,u=l[i]||new o((async i=>{let o=`/app_flow/v1/papi/assist_field/${t}/${r}/list_title/`;const l=await s({url:o,method:"GET",params:{values:JSON.stringify(i)}},e,n),u=_.get(l,"data.data.data",{});let c=[];return _.map(i,(e=>{a?(e=JSON.parse(e),e=_.get(e,`${a}`),c=_.concat(c,u[e])):c=_.concat(c,u[e])})),c}));return l[i]=u,u},getTitle(e,{formDefId:t,fieldDefId:r,orgInfo:n,isDm:a},i){return s({url:`/app_flow/v1/papi/assist_field/${t}/${r}/list_title/`,method:"GET",params:{values:JSON.stringify(i)}},e,n)},async searchSelectOpts(e,{formDefId:t,fieldDefId:r,orgInfo:n,isDm:a},i={},o=""){o&&(i.q=o);let l=a?`/app_flow/v1/papi/dm/assist_field/${t}/${r}/search_title/`:`/app_flow/v1/papi/assist_field/${t}/${r}/search_title/`,c=`${t}/${r}/${o}/${JSON.stringify(n)}/${JSON.stringify(i)}`,f={};return u[c]&&"loading"==u[c]?(console.log("有缓存,返回"),await this.waitCacheMapData(c)):(!u[c]||(new Date).getTime()-u[c].last_time>6e4?(u[c]="loading",f=await s({url:l,method:a?"GET":"POST",data:i,can_custom_org_params:!0},e,n),u[c]={last_time:(new Date).getTime(),result:f}):(console.log("有缓存"),u[c].result&&(f=u[c].result)),f)},waitCacheMapData(e){return new Promise((t=>{let r=setInterval((()=>{u[e]&&"loading"!=u[e]&&u[e].result&&(clearInterval(r),t(u[e].result))}),100)}))},selectFromMulFormSearchOpts(e,{formDefId:t,fieldDefId:r,orgInfo:n,isDm:a},i={},o=""){return o&&(i.q=o),s({url:a?`/app_flow/v1/papi/dm/assist_field/select_form_mul_form/${t}/${r}/search_title/`:`/app_flow/v1/papi/assist_field/select_form_mul_form/${t}/${r}/search_title/`,method:"GET",params:i},e,n)},selectFromMulFormListTitleLoader(e,{formDefId:t,fieldDefId:r,orgInfo:n,isDm:a}){const i=`${t}/${r}`,u=l[i]||new o((async i=>{let o=a?`/app_flow/v1/papi/dm/assist_field/select_form_mul_form/${t}/${r}/list_title/`:`/app_flow/v1/papi/assist_field/select_form_mul_form/${t}/${r}/list_title/`;const l=await s({url:o,method:"GET",params:{values:JSON.stringify(i)}},e,n),u=_.get(l.data,"data.items",[]),c={};u.forEach((e=>{Object.keys(e.data).forEach((t=>{let r=e.data[t];c[t]={form_def_id:_.get(e,"definition.form.id"),form_title:_.get(e,"definition.form.name"),label:r}}))}));let f=[];return i.forEach((e=>{f.push(c[e])})),f}));return l[i]=u,u},selectFromMulFormListTitle(e,{formDefId:t,fieldDefId:r,orgInfo:n,isDm:a},i){return s({url:a?`/app_flow/v1/papi/dm/assist_field/select_form_mul_form/${t}/${r}/list_title/`:`/app_flow/v1/papi/assist_field/select_form_mul_form/${t}/${r}/list_title/`,method:"GET",params:{values:JSON.stringify(i)}},e,n)}},assistTreeField:{searchSelectOpts(e,{formDefId:t,fieldDefId:r,orgInfo:n,isDm:a},i={},o=""){return o&&(i.q=o),s({url:a?`/app_flow/v1/papi/dm/assist_tree_field/${t}/${r}/search_title/`:`/app_flow/v1/papi/assist_tree_field/${t}/${r}/search_title/`,method:"GET",params:i,can_custom_org_params:!0},e,n)}},assistUserTaskCC:{searchSelectOpts(e,{formDefId:t,node:r,orgInfo:n,isDm:a},i={},o=""){return o&&(i.q=o),s({url:`/app_flow/v1/papi/assist_user_task_cc/${t}/${r}/search_title/`,method:"GET",params:i},e,n)}}}},9795:function(e,t,r){"use strict";function n(){for(var e=["iphone","ipod","ipad","android","mobile","blackberry","webos","incognito","webmate","bada","nokia","lg","ucweb","skyfire"],t=navigator.userAgent.toLowerCase(),r=!1,n=0,a=e.length;n<a;n++)-1!=t.indexOf(e[n])&&(r=!0);return r}r.d(t,{Fr:function(){return n}}),r(6773),r(5360)},6509:function(e,t,r){"use strict";var n=r(1601),a=r.n(n),i=r(6314),o=r.n(i)()(a());o.push([e.id,".bpm-select-tree {\n .el-select-dropdown__item.hover {\n background: none!important;\n }\n .tree-options.el-select-dropdown__item {\n padding: 0 0;\n }\n}\n",""]),t.A=o},347:function(e,t,r){"use strict";var n=r(1601),a=r.n(n),i=r(6314),o=r.n(i),s=r(6509),l=o()(a());l.i(s.A),l.push([e.id,"\n",""]),t.A=l},6314:function(e){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var r="",n=void 0!==t[5];return t[4]&&(r+="@supports (".concat(t[4],") {")),t[2]&&(r+="@media ".concat(t[2]," {")),n&&(r+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),r+=e(t),n&&(r+="}"),t[2]&&(r+="}"),t[4]&&(r+="}"),r})).join("")},t.i=function(e,r,n,a,i){"string"==typeof e&&(e=[[null,e,void 0]]);var o={};if(n)for(var s=0;s<this.length;s++){var l=this[s][0];null!=l&&(o[l]=!0)}for(var u=0;u<e.length;u++){var c=[].concat(e[u]);n&&o[c[0]]||(void 0!==i&&(void 0===c[5]||(c[1]="@layer".concat(c[5].length>0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=i),r&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=r):c[2]=r),a&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=a):c[4]="".concat(a)),t.push(c))}},t}},1601:function(e){"use strict";e.exports=function(e){return e[1]}},5072:function(e){"use strict";var t=[];function r(e){for(var r=-1,n=0;n<t.length;n++)if(t[n].identifier===e){r=n;break}return r}function n(e,n){for(var i={},o=[],s=0;s<e.length;s++){var l=e[s],u=n.base?l[0]+n.base:l[0],c=i[u]||0,f="".concat(u," ").concat(c);i[u]=c+1;var d=r(f),p={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==d)t[d].references++,t[d].updater(p);else{var m=a(p,n);n.byIndex=s,t.splice(s,0,{identifier:f,updater:m,references:1})}o.push(f)}return o}function a(e,t){var r=t.domAPI(t);return r.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;r.update(e=t)}else r.remove()}}e.exports=function(e,a){var i=n(e=e||[],a=a||{});return function(e){e=e||[];for(var o=0;o<i.length;o++){var s=r(i[o]);t[s].references--}for(var l=n(e,a),u=0;u<i.length;u++){var c=r(i[u]);0===t[c].references&&(t[c].updater(),t.splice(c,1))}i=l}}},7659:function(e){"use strict";var t={};e.exports=function(e,r){var n=function(e){if(void 0===t[e]){var r=document.querySelector(e);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}t[e]=r}return t[e]}(e);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(r)}},540:function(e){"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},5056:function(e,t,r){"use strict";e.exports=function(e){var t=r.nc;t&&e.setAttribute("nonce",t)}},7825:function(e){"use strict";e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(r){!function(e,t,r){var n="";r.supports&&(n+="@supports (".concat(r.supports,") {")),r.media&&(n+="@media ".concat(r.media," {"));var a=void 0!==r.layer;a&&(n+="@layer".concat(r.layer.length>0?" ".concat(r.layer):""," {")),n+=r.css,a&&(n+="}"),r.media&&(n+="}"),r.supports&&(n+="}");var i=r.sourceMap;i&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),t.styleTagTransform(n,e,t.options)}(t,e,r)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},1113:function(e){"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},7348:function(e,t,r){"use strict";r.d(t,{A:function(){return l}});var n=function(){var e=this,t=e.$createElement;return(e._self._c||t)("span",{attrs:{title:e.label}},[e._v(e._s(e.label))])};n._withStripped=!0;var a=r(6773),i=r.n(a),o={props:["value","fieldConf","row","formName","orgInfo"],data(){return{label:""}},watch:{value(){this.loadRemoteLabel()}},mounted(){this.loadRemoteLabel()},methods:{async loadRemoteLabel(){let e=this.value;if(i().isNil(e)||!e)return this.label=zj.z("未选择","c.not_selected");try{if(i().isObject(e))try{e=JSON.parse(e)}catch(e){console.log("error",e)}let t=i().isArray(e)?e:[e],r=i().get(this.fieldConf,"id");i().isEmpty(t)?this.label=zj.z("未选择","c.not_selected"):(t=i().isArray(t)?t:[t],this.label=await this.$bpm.fetchLabelByValues(t,r,this.formName,this.row))}finally{console.log("finally")}}}},s=(0,r(4486).A)(o,n,[],!1,null,null,null);s.options.__file="components/lib/mixins/RemoteSelectReader.vue";var l=s.exports},4486:function(e,t,r){"use strict";function n(e,t,r,n,a,i,o,s){var l,u="function"==typeof e?e.options:e;if(t&&(u.render=t,u.staticRenderFns=r,u._compiled=!0),n&&(u.functional=!0),i&&(u._scopeId="data-v-"+i),o?(l=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),a&&a.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(o)},u._ssrRegister=l):a&&(l=s?function(){a.call(this,(u.functional?this.parent:this).$root.$options.shadowRoot)}:a),l)if(u.functional){u._injectStyles=l;var c=u.render;u.render=function(e,t){return l.call(t),c(e,t)}}else{var f=u.beforeCreate;u.beforeCreate=f?[].concat(f,l):[l]}return{exports:e,options:u}}r.d(t,{A:function(){return n}})},7642:function(e){e.exports=function(){return this.ELEMENT}()},5554:function(e){e.exports=function(){return this.Vue}()},6773:function(t){"use strict";t.exports=e},5360:function(e){"use strict";e.exports=t}},n={};function a(e){var t=n[e];if(void 0!==t)return t.exports;var i=n[e]={id:e,exports:{}};return r[e](i,i.exports,a),i.exports}a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,{a:t}),t},a.d=function(e,t){for(var r in t)a.o(t,r)&&!a.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.nc=void 0;var i={};return function(){"use strict";a.r(i),a.d(i,{default:function(){return N}});var e=function(){var e=this,t=e.$createElement;return(e._self._c||t)(e.curComponent,e._g(e._b({tag:"component",staticClass:"bpm-select-check-item",attrs:{fieldConf:e.fieldConf,row:e.row,orgInfo:e.orgInfo,formName:e.formName,mode:e.mode,isMultiple:e.multiple,uiType:e.uiType},on:{change:e.handleChange},model:{value:e.curVal,callback:function(t){e.curVal=t},expression:"curVal"}},"component",e.$attrs,!1),e.$listeners))};e._withStripped=!0;var t=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[r("el-select",{staticStyle:{width:"100%"},attrs:{"popper-class":"bpm-select-tree",multiple:e.isMultiple,placeholder:e.placeholder,"multiple-limit":e.maxCount},on:{change:e.onChange},model:{value:e.curVal,callback:function(t){e.curVal=t},expression:"curVal"}},[e._l(e.defaultOptions,(function(e){return r("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),e._v(" "),r("el-tree",{attrs:{lazy:"",load:e.loadNode,"node-key":"value",props:{label:"treeLabel",children:"children",disabled:"disabled",isLeaf:"isLeaf"},indent:16},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.node;return n.data.disabled?r("span",{},[e._v("\n "+e._s(n.label)+"\n ")]):r("el-option",{staticClass:"tree-options",attrs:{value:n.data.value,label:n.data.label}},[r("span",{staticStyle:{"padding-right":"30px","max-width":"500px",overflow:"hidden"}},[e._v("\n "+e._s(n.label)+"\n ")])])}}],null,!0)})],2)],1)};t._withStripped=!0;var r=a(5281),n=a(5554),o=a.n(n),s=a(6773),l=a.n(s),u=a(7642);o().use(u.Tree),o().use(u.Select),o().use(u.Option);var c={props:["value","fieldConf","row","formName","formDefId","orgInfo","dm","isMultiple"],data(){return{curVal:"",defaultOptions:[]}},watch:{value(){this.curVal=this.value?this.value:this.isMultiple?[]:"",this.getDefaultOptions()}},computed:{placeholder(){return this.fieldConf.desc||this.fieldConf.name},maxCount(){return l().get(this.fieldConf,"check.max_count")},tickStrategy(){return"leaf_only"==l().get(this.fieldConf,"tree_select","all")?"leaf-filtered":"strict"},leafOnly(){return"leaf_only"===this.fieldConf.tree_select}},created(){this.curVal=this.isMultiple?[]:""},mounted(){this.curVal=this.value?this.value:this.isMultiple?[]:""},methods:{async loadNode(e,t){let n=l().get(this.fieldConf,"id"),a={father:0===e.level?"":e.data.value||""},i=await r.A.assistTreeField.searchSelectOpts(this.$bpm,{formDefId:this.formDefId,fieldDefId:n,orgInfo:this.orgInfo,isDm:this.dm},a),o=l().get(i.data,"data.data",[]);console.log("list_result",o);let s=this.transformResultToTree(o,e);console.log("list",s),t(s)},transformResultToTree(e,t){let r=l().get(this.fieldConf,"type");return"SelectCheckItem"==r||"MulSelectCheckItem"==r?l().map(e,(e=>{this.isMultiple||e[0]!==this.curVal||(this.defaultOptions=[]),this.isMultiple&&this.curVal.includes(e[0])&&(this.defaultOptions=l().filter(this.defaultOptions,(t=>t.value!==e[0])));let r=0===t.level?e[1]:t.data.label+" - "+e[1],n=!e[2];return{value:e[0],lazy:e[2],label:r,treeLabel:e[1],isLeaf:n,disabled:this.leafOnly&&!n}})):"SelectSort"==r||"MulSelectSort"==r?l().map(e,(e=>{this.isMultiple||e.value!==this.curVal||(this.defaultOptions=[]),this.isMultiple&&this.curVal.includes(e.value)&&(this.defaultOptions=l().filter(this.defaultOptions,(t=>t.value!==e.value)));let r=0===t.level?e.label:t.data.label+" - "+e.label,n=!e.lazy;return{value:e.value,lazy:e.lazy,label:r,treeLabel:e.label,isLeaf:n,disabled:this.leafOnly&&!n}})):void 0},async getDefaultOptions(){let e=l().isArray(this.curVal)?this.curVal:this.curVal?[this.curVal]:[];if(!e.length)return;const t=await r.A.assistField.getTitle(this.$bpm,{formDefId:this.formDefId,fieldDefId:this.fieldConf.id,orgInfo:this.orgInfo,isDm:this.dm},e);console.log(t);const n=l().get(t.data,"data.data",{});let a=l().map(n,((e,t)=>({value:t,label:e})));console.log("default options: ",a),this.defaultOptions=a},onChange(e){this.$emit("input",e),this.$emit("change",e)}}},f=a(4486),d=(0,f.A)(c,t,[],!1,null,null,null);d.options.__file="components/lib/bpmSelectCheckItem/src/part/editor.vue";var p=d.exports,m={mixins:[a(7348).A]},h=(0,f.A)(m,void 0,void 0,!1,null,null,null);h.options.__file="components/lib/bpmSelectCheckItem/src/part/reader.vue";var _=h.exports,v={name:"BpmSelectCheckItem",components:{editorComponent:p,readerComponent:_},props:{value:{type:[String,Array]},type:{type:String,default:"SelectCheckItem"},fieldConf:{type:Object,default(){return{}}},row:{type:Object,default(){return{}}},mode:{type:String,default(){return"view"}},uiType:{type:String,default(){return"default"}},orgInfo:{type:Object},formName:{type:String},isMultiple:{type:Boolean,default(){return!1}}},data(){return{curVal:""}},computed:{curComponent(){return"view"==this.mode?_:p},multiple(){return this.isMultiple||0===this.type.indexOf("Mul")}},watch:{value(){this.curVal=this.value}},mounted(){this.curVal=this.value},methods:{handleChange(e){this.$emit("input",e),this.$emit("change",e)}}},g=a(5072),y=a.n(g),b=a(7825),I=a.n(b),w=a(7659),$=a.n(w),S=a(5056),C=a.n(S),D=a(540),T=a.n(D),O=a(1113),x=a.n(O),k=a(347),E={};E.styleTagTransform=x(),E.setAttributes=C(),E.insert=$().bind(null,"head"),E.domAPI=I(),E.insertStyleElement=T(),y()(k.A,E),k.A&&k.A.locals&&k.A.locals;var M=(0,f.A)(v,e,[],!1,null,null,null);M.options.__file="components/lib/bpmSelectCheckItem/src/main.vue";var A=M.exports;A.install=function(e){e.component(A.name,A)};var N=A}(),i}()}));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("lodash"),require("qs"),require("@antv/g6")):"function"==typeof define&&define.amd?define(["lodash","qs","@antv/g6"],t):"object"==typeof exports?exports.bpm2=t(require("lodash"),require("qs"),require("@antv/g6")):e.bpm2=t(e.lodash,e.qs,e["@antv/g6"])}(self,(function(e,t,r){return function(){"use strict";var s={5281:function(e,t,r){r.d(t,{A:function(){return d}});var s=r(9795),a=r(6773),o=r.n(a),n=class{constructor(e,t={}){this._fnBatchLoad=e,this._options=t,this._queue=[]}async load(e){let t=await this.loads(e);return o().get(t,"0")}loads(...e){return new Promise(((t,r)=>{this._queue.push({keys:e,resolve:t,reject:r}),1==this._queue.length&&this.nextTick((()=>{this.process()}))}))}nextTick(e){setTimeout(e,0)}process(){let e=this._queue;this._queue=[];let t={};o().each(e,(e=>{o().each(e.keys,(e=>t[e]=null))}));let r=o().keys(t);this._fnBatchLoad(r).then((s=>{o().each(r,((e,r)=>{t[e]=s[r]})),o().each(e,(({keys:e,resolve:r})=>{r(o().map(e,(e=>t[e])))}))})).catch((t=>{o().each(e,(({reject:e})=>e(t)))}))}};const i=async(e,t,r)=>{if(t.networking=!0,t.netHeader&&(e.headers={common:t.netHeader}),e.params=_.merge({},e.params,r),t.env.ignore_levels&&_.set(e.params,"ignore_levels",!0),(0,s.Fr)()){let t=zj.utils.pageParam().token;e.params=_.merge({token:t,platform:"phone"},e.params)}e.isSilentOnErr=e=>{let t=_.get(e,"data.result");return t>=19e6||t<=19999999};let a=_.cloneDeep(e);if(a.can_custom_org_params){let e=_.cloneDeep(_.get(t,"orgInfo",{}));console.log("bpm3_orgInfo",e),e.custom_page_level&&(a.params.page_level=e.custom_page_level),e.custom_group_id&&(a.params.group_id=e.custom_group_id),e.custom_team_id&&(a.params.team_id=e.custom_team_id),e.custom_project_id&&(a.params.project_id=e.custom_project_id)}console.log("bpm3_orgInfo_reqArgs",a);let o=await zj.net.request(a);return t.networking=!1,o},c={},l={};var d={assistSelectEntranceForm:{getListDefinition(e,{formDefId:t,fieldDefId:r,orgInfo:s,isDm:a}){return i({url:`/app_flow/v1/papi/assist_select_entrance_form/${t}/${r}/list_definition/`,method:"GET"},e,s)},getOptions(e,{formDefId:t,fieldDefId:r,orgInfo:s,isDm:a},o){return i({url:`/app_flow/v1/papi/assist_select_entrance_form/${t}/${r}/list_search/`,method:"GET",params:o},e,s)},getListSelected(e,{formDefId:t,fieldDefId:r,orgInfo:s,isDm:a},o){return i({url:`/app_flow/v1/papi/assist_select_entrance_form/${t}/${r}/list_selected/`,method:"GET",params:o},e,s)}},assistField:{getBatchLoader(e,{formDefId:t,fieldDefId:r,orgInfo:s,uniqueId:a}){const o=`${t}/${r}`,l=c[o]||new n((async o=>{let n=`/app_flow/v1/papi/assist_field/${t}/${r}/list_title/`;const c=await i({url:n,method:"GET",params:{values:JSON.stringify(o)}},e,s),l=_.get(c,"data.data.data",{});let d=[];return _.map(o,(e=>{a?(e=JSON.parse(e),e=_.get(e,`${a}`),d=_.concat(d,l[e])):d=_.concat(d,l[e])})),d}));return c[o]=l,l},getTitle(e,{formDefId:t,fieldDefId:r,orgInfo:s,isDm:a},o){return i({url:`/app_flow/v1/papi/assist_field/${t}/${r}/list_title/`,method:"GET",params:{values:JSON.stringify(o)}},e,s)},async searchSelectOpts(e,{formDefId:t,fieldDefId:r,orgInfo:s,isDm:a},o={},n=""){n&&(o.q=n);let c=a?`/app_flow/v1/papi/dm/assist_field/${t}/${r}/search_title/`:`/app_flow/v1/papi/assist_field/${t}/${r}/search_title/`,d=`${t}/${r}/${n}/${JSON.stringify(s)}/${JSON.stringify(o)}`,u={};return l[d]&&"loading"==l[d]?(console.log("有缓存,返回"),await this.waitCacheMapData(d)):(!l[d]||(new Date).getTime()-l[d].last_time>6e4?(l[d]="loading",u=await i({url:c,method:a?"GET":"POST",data:o,can_custom_org_params:!0},e,s),l[d]={last_time:(new Date).getTime(),result:u}):(console.log("有缓存"),l[d].result&&(u=l[d].result)),u)},waitCacheMapData(e){return new Promise((t=>{let r=setInterval((()=>{l[e]&&"loading"!=l[e]&&l[e].result&&(clearInterval(r),t(l[e].result))}),100)}))},selectFromMulFormSearchOpts(e,{formDefId:t,fieldDefId:r,orgInfo:s,isDm:a},o={},n=""){return n&&(o.q=n),i({url:a?`/app_flow/v1/papi/dm/assist_field/select_form_mul_form/${t}/${r}/search_title/`:`/app_flow/v1/papi/assist_field/select_form_mul_form/${t}/${r}/search_title/`,method:"GET",params:o},e,s)},selectFromMulFormListTitleLoader(e,{formDefId:t,fieldDefId:r,orgInfo:s,isDm:a}){const o=`${t}/${r}`,l=c[o]||new n((async o=>{let n=a?`/app_flow/v1/papi/dm/assist_field/select_form_mul_form/${t}/${r}/list_title/`:`/app_flow/v1/papi/assist_field/select_form_mul_form/${t}/${r}/list_title/`;const c=await i({url:n,method:"GET",params:{values:JSON.stringify(o)}},e,s),l=_.get(c.data,"data.items",[]),d={};l.forEach((e=>{Object.keys(e.data).forEach((t=>{let r=e.data[t];d[t]={form_def_id:_.get(e,"definition.form.id"),form_title:_.get(e,"definition.form.name"),label:r}}))}));let u=[];return o.forEach((e=>{u.push(d[e])})),u}));return c[o]=l,l},selectFromMulFormListTitle(e,{formDefId:t,fieldDefId:r,orgInfo:s,isDm:a},o){return i({url:a?`/app_flow/v1/papi/dm/assist_field/select_form_mul_form/${t}/${r}/list_title/`:`/app_flow/v1/papi/assist_field/select_form_mul_form/${t}/${r}/list_title/`,method:"GET",params:{values:JSON.stringify(o)}},e,s)}},assistTreeField:{searchSelectOpts(e,{formDefId:t,fieldDefId:r,orgInfo:s,isDm:a},o={},n=""){return n&&(o.q=n),i({url:a?`/app_flow/v1/papi/dm/assist_tree_field/${t}/${r}/search_title/`:`/app_flow/v1/papi/assist_tree_field/${t}/${r}/search_title/`,method:"GET",params:o,can_custom_org_params:!0},e,s)}},assistUserTaskCC:{searchSelectOpts(e,{formDefId:t,node:r,orgInfo:s,isDm:a},o={},n=""){return n&&(o.q=n),i({url:`/app_flow/v1/papi/assist_user_task_cc/${t}/${r}/search_title/`,method:"GET",params:o},e,s)}}}},9795:function(e,t,r){function s(){for(var e=["iphone","ipod","ipad","android","mobile","blackberry","webos","incognito","webmate","bada","nokia","lg","ucweb","skyfire"],t=navigator.userAgent.toLowerCase(),r=!1,s=0,a=e.length;s<a;s++)-1!=t.indexOf(e[s])&&(r=!0);return r}r.d(t,{Fr:function(){return s}}),r(6773),r(5360)},3282:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv=void 0;const s=r(4042),a=r(6144),o=r(6653),n=r(2079),i=["/properties"],c="http://json-schema.org/draft-07/schema";class l extends s.default{_addVocabularies(){super._addVocabularies(),a.default.forEach((e=>this.addVocabulary(e))),this.opts.discriminator&&this.addKeyword(o.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const e=this.opts.$data?this.$dataMetaSchema(n,i):n;this.addMetaSchema(e,c,!1),this.refs["http://json-schema.org/schema"]=c}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(c)?c:void 0)}}t.Ajv=l,e.exports=t=l,e.exports.Ajv=l,Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var d=r(2586);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return d.KeywordCxt}});var u=r(9029);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return u._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return u.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return u.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return u.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return u.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return u.CodeGen}});var f=r(3558);Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return f.default}});var h=r(4551);Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return h.default}})},1520:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.regexpCode=t.getEsmExportName=t.getProperty=t.safeStringify=t.stringify=t.strConcat=t.addCodeArg=t.str=t._=t.nil=t._Code=t.Name=t.IDENTIFIER=t._CodeOrName=void 0;class r{}t._CodeOrName=r,t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class s extends r{constructor(e){if(super(),!t.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}t.Name=s;class a extends r{constructor(e){super(),this._items="string"==typeof e?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const e=this._items[0];return""===e||'""'===e}get str(){var e;return null!==(e=this._str)&&void 0!==e?e:this._str=this._items.reduce(((e,t)=>`${e}${t}`),"")}get names(){var e;return null!==(e=this._names)&&void 0!==e?e:this._names=this._items.reduce(((e,t)=>(t instanceof s&&(e[t.str]=(e[t.str]||0)+1),e)),{})}}function o(e,...t){const r=[e[0]];let s=0;for(;s<t.length;)c(r,t[s]),r.push(e[++s]);return new a(r)}t._Code=a,t.nil=new a(""),t._=o;const n=new a("+");function i(e,...t){const r=[d(e[0])];let s=0;for(;s<t.length;)r.push(n),c(r,t[s]),r.push(n,d(e[++s]));return function(e){let t=1;for(;t<e.length-1;){if(e[t]===n){const r=l(e[t-1],e[t+1]);if(void 0!==r){e.splice(t-1,3,r);continue}e[t++]="+"}t++}}(r),new a(r)}function c(e,t){var r;t instanceof a?e.push(...t._items):t instanceof s?e.push(t):e.push("number"==typeof(r=t)||"boolean"==typeof r||null===r?r:d(Array.isArray(r)?r.join(","):r))}function l(e,t){if('""'===t)return e;if('""'===e)return t;if("string"==typeof e){if(t instanceof s||'"'!==e[e.length-1])return;return"string"!=typeof t?`${e.slice(0,-1)}${t}"`:'"'===t[0]?e.slice(0,-1)+t.slice(1):void 0}return"string"!=typeof t||'"'!==t[0]||e instanceof s?void 0:`"${e}${t.slice(1)}`}function d(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}t.str=i,t.addCodeArg=c,t.strConcat=function(e,t){return t.emptyStr()?e:e.emptyStr()?t:i`${e}${t}`},t.stringify=function(e){return new a(d(e))},t.safeStringify=d,t.getProperty=function(e){return"string"==typeof e&&t.IDENTIFIER.test(e)?new a(`.${e}`):o`[${e}]`},t.getEsmExportName=function(e){if("string"==typeof e&&t.IDENTIFIER.test(e))return new a(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)},t.regexpCode=function(e){return new a(e.toString())}},9029:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;const s=r(1520),a=r(7845);var o=r(1520);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return o._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return o.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return o.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return o.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return o.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return o.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return o.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return o.Name}});var n=r(7845);Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return n.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return n.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return n.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return n.varKinds}}),t.operators={GT:new s._Code(">"),GTE:new s._Code(">="),LT:new s._Code("<"),LTE:new s._Code("<="),EQ:new s._Code("==="),NEQ:new s._Code("!=="),NOT:new s._Code("!"),OR:new s._Code("||"),AND:new s._Code("&&"),ADD:new s._Code("+")};class i{optimizeNodes(){return this}optimizeNames(e,t){return this}}class c extends i{constructor(e,t,r){super(),this.varKind=e,this.name=t,this.rhs=r}render({es5:e,_n:t}){const r=e?a.varKinds.var:this.varKind,s=void 0===this.rhs?"":` = ${this.rhs}`;return`${r} ${this.name}${s};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&(this.rhs=C(this.rhs,e,t)),this}get names(){return this.rhs instanceof s._CodeOrName?this.rhs.names:{}}}class l extends i{constructor(e,t,r){super(),this.lhs=e,this.rhs=t,this.sideEffects=r}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,t){if(!(this.lhs instanceof s.Name)||e[this.lhs.str]||this.sideEffects)return this.rhs=C(this.rhs,e,t),this}get names(){return x(this.lhs instanceof s.Name?{}:{...this.lhs.names},this.rhs)}}class d extends l{constructor(e,t,r,s){super(e,r,s),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}}class u extends i{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}}class f extends i{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}}class h extends i{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}}class m extends i{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=C(this.code,e,t),this}get names(){return this.code instanceof s._CodeOrName?this.code.names:{}}}class p extends i{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce(((t,r)=>t+r.render(e)),"")}optimizeNodes(){const{nodes:e}=this;let t=e.length;for(;t--;){const r=e[t].optimizeNodes();Array.isArray(r)?e.splice(t,1,...r):r?e[t]=r:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){const{nodes:r}=this;let s=r.length;for(;s--;){const a=r[s];a.optimizeNames(e,t)||(O(e,a.names),r.splice(s,1))}return r.length>0?this:void 0}get names(){return this.nodes.reduce(((e,t)=>j(e,t.names)),{})}}class y extends p{render(e){return"{"+e._n+super.render(e)+"}"+e._n}}class g extends p{}class v extends y{}v.kind="else";class _ extends y{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+="else "+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();const e=this.condition;if(!0===e)return this.nodes;let t=this.else;if(t){const e=t.optimizeNodes();t=this.else=Array.isArray(e)?new v(e):e}return t?!1===e?t instanceof _?t:t.nodes:this.nodes.length?this:new _(T(e),t instanceof _?[t]:t.nodes):!1!==e&&this.nodes.length?this:void 0}optimizeNames(e,t){var r;if(this.else=null===(r=this.else)||void 0===r?void 0:r.optimizeNames(e,t),super.optimizeNames(e,t)||this.else)return this.condition=C(this.condition,e,t),this}get names(){const e=super.names;return x(e,this.condition),this.else&&j(e,this.else.names),e}}_.kind="if";class $ extends y{}$.kind="for";class w extends ${constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iteration=C(this.iteration,e,t),this}get names(){return j(super.names,this.iteration.names)}}class b extends ${constructor(e,t,r,s){super(),this.varKind=e,this.name=t,this.from=r,this.to=s}render(e){const t=e.es5?a.varKinds.var:this.varKind,{name:r,from:s,to:o}=this;return`for(${t} ${r}=${s}; ${r}<${o}; ${r}++)`+super.render(e)}get names(){const e=x(super.names,this.from);return x(e,this.to)}}class S extends ${constructor(e,t,r,s){super(),this.loop=e,this.varKind=t,this.name=r,this.iterable=s}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iterable=C(this.iterable,e,t),this}get names(){return j(super.names,this.iterable.names)}}class P extends y{constructor(e,t,r){super(),this.name=e,this.args=t,this.async=r}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}}P.kind="func";class E extends p{render(e){return"return "+super.render(e)}}E.kind="return";class k extends y{render(e){let t="try"+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),null===(e=this.catch)||void 0===e||e.optimizeNodes(),null===(t=this.finally)||void 0===t||t.optimizeNodes(),this}optimizeNames(e,t){var r,s;return super.optimizeNames(e,t),null===(r=this.catch)||void 0===r||r.optimizeNames(e,t),null===(s=this.finally)||void 0===s||s.optimizeNames(e,t),this}get names(){const e=super.names;return this.catch&&j(e,this.catch.names),this.finally&&j(e,this.finally.names),e}}class I extends y{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}}I.kind="catch";class N extends y{render(e){return"finally"+super.render(e)}}function j(e,t){for(const r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function x(e,t){return t instanceof s._CodeOrName?j(e,t.names):e}function C(e,t,r){return e instanceof s.Name?o(e):(a=e)instanceof s._Code&&a._items.some((e=>e instanceof s.Name&&1===t[e.str]&&void 0!==r[e.str]))?new s._Code(e._items.reduce(((e,t)=>(t instanceof s.Name&&(t=o(t)),t instanceof s._Code?e.push(...t._items):e.push(t),e)),[])):e;var a;function o(e){const s=r[e.str];return void 0===s||1!==t[e.str]?e:(delete t[e.str],s)}}function O(e,t){for(const r in t)e[r]=(e[r]||0)-(t[r]||0)}function T(e){return"boolean"==typeof e||"number"==typeof e||null===e?!e:s._`!${M(e)}`}N.kind="finally",t.CodeGen=class{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?"\n":""},this._extScope=e,this._scope=new a.Scope({parent:e}),this._nodes=[new g]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){const r=this._extScope.value(e,t);return(this._values[r.prefix]||(this._values[r.prefix]=new Set)).add(r),r}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,r,s){const a=this._scope.toName(t);return void 0!==r&&s&&(this._constants[a.str]=r),this._leafNode(new c(e,a,r)),a}const(e,t,r){return this._def(a.varKinds.const,e,t,r)}let(e,t,r){return this._def(a.varKinds.let,e,t,r)}var(e,t,r){return this._def(a.varKinds.var,e,t,r)}assign(e,t,r){return this._leafNode(new l(e,t,r))}add(e,r){return this._leafNode(new d(e,t.operators.ADD,r))}code(e){return"function"==typeof e?e():e!==s.nil&&this._leafNode(new m(e)),this}object(...e){const t=["{"];for(const[r,a]of e)t.length>1&&t.push(","),t.push(r),(r!==a||this.opts.es5)&&(t.push(":"),(0,s.addCodeArg)(t,a));return t.push("}"),new s._Code(t)}if(e,t,r){if(this._blockNode(new _(e)),t&&r)this.code(t).else().code(r).endIf();else if(t)this.code(t).endIf();else if(r)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new _(e))}else(){return this._elseNode(new v)}endIf(){return this._endBlockNode(_,v)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new w(e),t)}forRange(e,t,r,s,o=(this.opts.es5?a.varKinds.var:a.varKinds.let)){const n=this._scope.toName(e);return this._for(new b(o,n,t,r),(()=>s(n)))}forOf(e,t,r,o=a.varKinds.const){const n=this._scope.toName(e);if(this.opts.es5){const e=t instanceof s.Name?t:this.var("_arr",t);return this.forRange("_i",0,s._`${e}.length`,(t=>{this.var(n,s._`${e}[${t}]`),r(n)}))}return this._for(new S("of",o,n,t),(()=>r(n)))}forIn(e,t,r,o=(this.opts.es5?a.varKinds.var:a.varKinds.const)){if(this.opts.ownProperties)return this.forOf(e,s._`Object.keys(${t})`,r);const n=this._scope.toName(e);return this._for(new S("in",o,n,t),(()=>r(n)))}endFor(){return this._endBlockNode($)}label(e){return this._leafNode(new u(e))}break(e){return this._leafNode(new f(e))}return(e){const t=new E;if(this._blockNode(t),this.code(e),1!==t.nodes.length)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(E)}try(e,t,r){if(!t&&!r)throw new Error('CodeGen: "try" without "catch" and "finally"');const s=new k;if(this._blockNode(s),this.code(e),t){const e=this.name("e");this._currNode=s.catch=new I(e),t(e)}return r&&(this._currNode=s.finally=new N,this.code(r)),this._endBlockNode(I,N)}throw(e){return this._leafNode(new h(e))}block(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}endBlock(e){const t=this._blockStarts.pop();if(void 0===t)throw new Error("CodeGen: not in self-balancing block");const r=this._nodes.length-t;if(r<0||void 0!==e&&r!==e)throw new Error(`CodeGen: wrong number of nodes: ${r} vs ${e} expected`);return this._nodes.length=t,this}func(e,t=s.nil,r,a){return this._blockNode(new P(e,t,r)),a&&this.code(a).endFunc(),this}endFunc(){return this._endBlockNode(P)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){const r=this._currNode;if(r instanceof e||t&&r instanceof t)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){const t=this._currNode;if(!(t instanceof _))throw new Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){const e=this._nodes;return e[e.length-1]}set _currNode(e){const t=this._nodes;t[t.length-1]=e}},t.not=T;const D=A(t.operators.AND);t.and=function(...e){return e.reduce(D)};const R=A(t.operators.OR);function A(e){return(t,r)=>t===s.nil?r:r===s.nil?t:s._`${M(t)} ${e} ${M(r)}`}function M(e){return e instanceof s.Name?e:s._`(${e})`}t.or=function(...e){return e.reduce(R)}},7845:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;const s=r(1520);class a extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}}var o;!function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"}(o||(t.UsedValueState=o={})),t.varKinds={const:new s.Name("const"),let:new s.Name("let"),var:new s.Name("var")};class n{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof s.Name?e:this.name(e)}name(e){return new s.Name(this._newName(e))}_newName(e){return`${e}${(this._names[e]||this._nameGroup(e)).index++}`}_nameGroup(e){var t,r;if((null===(r=null===(t=this._parent)||void 0===t?void 0:t._prefixes)||void 0===r?void 0:r.has(e))||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}}t.Scope=n;class i extends s.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:t,itemIndex:r}){this.value=e,this.scopePath=s._`.${new s.Name(t)}[${r}]`}}t.ValueScopeName=i;const c=s._`\n`;t.ValueScope=class extends n{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?c:s.nil}}get(){return this._scope}name(e){return new i(e,this._newName(e))}value(e,t){var r;if(void 0===t.ref)throw new Error("CodeGen: ref must be passed in value");const s=this.toName(e),{prefix:a}=s,o=null!==(r=t.key)&&void 0!==r?r:t.ref;let n=this._values[a];if(n){const e=n.get(o);if(e)return e}else n=this._values[a]=new Map;n.set(o,s);const i=this._scope[a]||(this._scope[a]=[]),c=i.length;return i[c]=t.ref,s.setValue(t,{property:a,itemIndex:c}),s}getValue(e,t){const r=this._values[e];if(r)return r.get(t)}scopeRefs(e,t=this._values){return this._reduceValues(t,(t=>{if(void 0===t.scopePath)throw new Error(`CodeGen: name "${t}" has no value`);return s._`${e}${t.scopePath}`}))}scopeCode(e=this._values,t,r){return this._reduceValues(e,(e=>{if(void 0===e.value)throw new Error(`CodeGen: name "${e}" has no value`);return e.value.code}),t,r)}_reduceValues(e,r,n={},i){let c=s.nil;for(const l in e){const d=e[l];if(!d)continue;const u=n[l]=n[l]||new Map;d.forEach((e=>{if(u.has(e))return;u.set(e,o.Started);let n=r(e);if(n){const r=this.opts.es5?t.varKinds.var:t.varKinds.const;c=s._`${c}${r} ${e} = ${n};${this.opts._n}`}else{if(!(n=null==i?void 0:i(e)))throw new a(e);c=s._`${c}${n}${this.opts._n}`}u.set(e,o.Completed)}))}return c}}},8708:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;const s=r(9029),a=r(4227),o=r(2023);function n(e,t){const r=e.const("err",t);e.if(s._`${o.default.vErrors} === null`,(()=>e.assign(o.default.vErrors,s._`[${r}]`)),s._`${o.default.vErrors}.push(${r})`),e.code(s._`${o.default.errors}++`)}function i(e,t){const{gen:r,validateName:a,schemaEnv:o}=e;o.$async?r.throw(s._`new ${e.ValidationError}(${t})`):(r.assign(s._`${a}.errors`,t),r.return(!1))}t.keywordError={message:({keyword:e})=>s.str`must pass "${e}" keyword validation`},t.keyword$DataError={message:({keyword:e,schemaType:t})=>t?s.str`"${e}" keyword must be ${t} ($data)`:s.str`"${e}" keyword is invalid ($data)`},t.reportError=function(e,r=t.keywordError,a,o){const{it:c}=e,{gen:d,compositeRule:u,allErrors:f}=c,h=l(e,r,a);(null!=o?o:u||f)?n(d,h):i(c,s._`[${h}]`)},t.reportExtraError=function(e,r=t.keywordError,s){const{it:a}=e,{gen:c,compositeRule:d,allErrors:u}=a;n(c,l(e,r,s)),d||u||i(a,o.default.vErrors)},t.resetErrorsCount=function(e,t){e.assign(o.default.errors,t),e.if(s._`${o.default.vErrors} !== null`,(()=>e.if(t,(()=>e.assign(s._`${o.default.vErrors}.length`,t)),(()=>e.assign(o.default.vErrors,null)))))},t.extendErrors=function({gen:e,keyword:t,schemaValue:r,data:a,errsCount:n,it:i}){if(void 0===n)throw new Error("ajv implementation error");const c=e.name("err");e.forRange("i",n,o.default.errors,(n=>{e.const(c,s._`${o.default.vErrors}[${n}]`),e.if(s._`${c}.instancePath === undefined`,(()=>e.assign(s._`${c}.instancePath`,(0,s.strConcat)(o.default.instancePath,i.errorPath)))),e.assign(s._`${c}.schemaPath`,s.str`${i.errSchemaPath}/${t}`),i.opts.verbose&&(e.assign(s._`${c}.schema`,r),e.assign(s._`${c}.data`,a))}))};const c={keyword:new s.Name("keyword"),schemaPath:new s.Name("schemaPath"),params:new s.Name("params"),propertyName:new s.Name("propertyName"),message:new s.Name("message"),schema:new s.Name("schema"),parentSchema:new s.Name("parentSchema")};function l(e,t,r){const{createErrors:a}=e.it;return!1===a?s._`{}`:function(e,t,r={}){const{gen:a,it:n}=e,i=[d(n,r),u(e,r)];return function(e,{params:t,message:r},a){const{keyword:n,data:i,schemaValue:l,it:d}=e,{opts:u,propertyName:f,topSchemaRef:h,schemaPath:m}=d;a.push([c.keyword,n],[c.params,"function"==typeof t?t(e):t||s._`{}`]),u.messages&&a.push([c.message,"function"==typeof r?r(e):r]),u.verbose&&a.push([c.schema,l],[c.parentSchema,s._`${h}${m}`],[o.default.data,i]),f&&a.push([c.propertyName,f])}(e,t,i),a.object(...i)}(e,t,r)}function d({errorPath:e},{instancePath:t}){const r=t?s.str`${e}${(0,a.getErrorPath)(t,a.Type.Str)}`:e;return[o.default.instancePath,(0,s.strConcat)(o.default.instancePath,r)]}function u({keyword:e,it:{errSchemaPath:t}},{schemaPath:r,parentSchema:o}){let n=o?t:s.str`${t}/${e}`;return r&&(n=s.str`${n}${(0,a.getErrorPath)(r,a.Type.Str)}`),[c.schemaPath,n]}},3835:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.resolveSchema=t.getCompilingSchema=t.resolveRef=t.compileSchema=t.SchemaEnv=void 0;const s=r(9029),a=r(3558),o=r(2023),n=r(6939),i=r(4227),c=r(2586);class l{constructor(e){var t;let r;this.refs={},this.dynamicAnchors={},"object"==typeof e.schema&&(r=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=null!==(t=e.baseId)&&void 0!==t?t:(0,n.normalizeId)(null==r?void 0:r[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=null==r?void 0:r.$async,this.refs={}}}function d(e){const t=f.call(this,e);if(t)return t;const r=(0,n.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:i,lines:l}=this.opts.code,{ownProperties:d}=this.opts,u=new s.CodeGen(this.scope,{es5:i,lines:l,ownProperties:d});let h;e.$async&&(h=u.scopeValue("Error",{ref:a.default,code:s._`require("ajv/dist/runtime/validation_error").default`}));const m=u.scopeName("validate");e.validateName=m;const p={gen:u,allErrors:this.opts.allErrors,data:o.default.data,parentData:o.default.parentData,parentDataProperty:o.default.parentDataProperty,dataNames:[o.default.data],dataPathArr:[s.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:u.scopeValue("schema",!0===this.opts.code.source?{ref:e.schema,code:(0,s.stringify)(e.schema)}:{ref:e.schema}),validateName:m,ValidationError:h,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:s.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:s._`""`,opts:this.opts,self:this};let y;try{this._compilations.add(e),(0,c.validateFunctionCode)(p),u.optimize(this.opts.code.optimize);const t=u.toString();y=`${u.scopeRefs(o.default.scope)}return ${t}`,this.opts.code.process&&(y=this.opts.code.process(y,e));const r=new Function(`${o.default.self}`,`${o.default.scope}`,y)(this,this.scope.get());if(this.scope.value(m,{ref:r}),r.errors=null,r.schema=e.schema,r.schemaEnv=e,e.$async&&(r.$async=!0),!0===this.opts.code.source&&(r.source={validateName:m,validateCode:t,scopeValues:u._values}),this.opts.unevaluated){const{props:e,items:t}=p;r.evaluated={props:e instanceof s.Name?void 0:e,items:t instanceof s.Name?void 0:t,dynamicProps:e instanceof s.Name,dynamicItems:t instanceof s.Name},r.source&&(r.source.evaluated=(0,s.stringify)(r.evaluated))}return e.validate=r,e}catch(t){throw delete e.validate,delete e.validateName,y&&this.logger.error("Error compiling schema, function code:",y),t}finally{this._compilations.delete(e)}}function u(e){return(0,n.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:d.call(this,e)}function f(e){for(const s of this._compilations)if(r=e,(t=s).schema===r.schema&&t.root===r.root&&t.baseId===r.baseId)return s;var t,r}function h(e,t){let r;for(;"string"==typeof(r=this.refs[t]);)t=r;return r||this.schemas[t]||m.call(this,e,t)}function m(e,t){const r=this.opts.uriResolver.parse(t),s=(0,n._getFullPath)(this.opts.uriResolver,r);let a=(0,n.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&s===a)return y.call(this,r,e);const o=(0,n.normalizeId)(s),i=this.refs[o]||this.schemas[o];if("string"==typeof i){const t=m.call(this,e,i);if("object"!=typeof(null==t?void 0:t.schema))return;return y.call(this,r,t)}if("object"==typeof(null==i?void 0:i.schema)){if(i.validate||d.call(this,i),o===(0,n.normalizeId)(t)){const{schema:t}=i,{schemaId:r}=this.opts,s=t[r];return s&&(a=(0,n.resolveUrl)(this.opts.uriResolver,a,s)),new l({schema:t,schemaId:r,root:e,baseId:a})}return y.call(this,r,i)}}t.SchemaEnv=l,t.compileSchema=d,t.resolveRef=function(e,t,r){var s;r=(0,n.resolveUrl)(this.opts.uriResolver,t,r);const a=e.refs[r];if(a)return a;let o=h.call(this,e,r);if(void 0===o){const a=null===(s=e.localRefs)||void 0===s?void 0:s[r],{schemaId:n}=this.opts;a&&(o=new l({schema:a,schemaId:n,root:e,baseId:t}))}return void 0!==o?e.refs[r]=u.call(this,o):void 0},t.getCompilingSchema=f,t.resolveSchema=m;const p=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function y(e,{baseId:t,schema:r,root:s}){var a;if("/"!==(null===(a=e.fragment)||void 0===a?void 0:a[0]))return;for(const s of e.fragment.slice(1).split("/")){if("boolean"==typeof r)return;const e=r[(0,i.unescapeFragment)(s)];if(void 0===e)return;const a="object"==typeof(r=e)&&r[this.opts.schemaId];!p.has(s)&&a&&(t=(0,n.resolveUrl)(this.opts.uriResolver,t,a))}let o;if("boolean"!=typeof r&&r.$ref&&!(0,i.schemaHasRulesButRef)(r,this.RULES)){const e=(0,n.resolveUrl)(this.opts.uriResolver,t,r.$ref);o=m.call(this,s,e)}const{schemaId:c}=this.opts;return o=o||new l({schema:r,schemaId:c,root:s,baseId:t}),o.schema!==o.root.schema?o:void 0}},2023:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});const s=r(9029),a={data:new s.Name("data"),valCxt:new s.Name("valCxt"),instancePath:new s.Name("instancePath"),parentData:new s.Name("parentData"),parentDataProperty:new s.Name("parentDataProperty"),rootData:new s.Name("rootData"),dynamicAnchors:new s.Name("dynamicAnchors"),vErrors:new s.Name("vErrors"),errors:new s.Name("errors"),this:new s.Name("this"),self:new s.Name("self"),scope:new s.Name("scope"),json:new s.Name("json"),jsonPos:new s.Name("jsonPos"),jsonLen:new s.Name("jsonLen"),jsonPart:new s.Name("jsonPart")};t.default=a},4551:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});const s=r(6939);class a extends Error{constructor(e,t,r,a){super(a||`can't resolve reference ${r} from id ${t}`),this.missingRef=(0,s.resolveUrl)(e,t,r),this.missingSchema=(0,s.normalizeId)((0,s.getFullPath)(e,this.missingRef))}}t.default=a},6939:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.getSchemaRefs=t.resolveUrl=t.normalizeId=t._getFullPath=t.getFullPath=t.inlineRef=void 0;const s=r(4227),a=r(2017),o=r(7106),n=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);t.inlineRef=function(e,t=!0){return"boolean"==typeof e||(!0===t?!c(e):!!t&&l(e)<=t)};const i=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function c(e){for(const t in e){if(i.has(t))return!0;const r=e[t];if(Array.isArray(r)&&r.some(c))return!0;if("object"==typeof r&&c(r))return!0}return!1}function l(e){let t=0;for(const r in e){if("$ref"===r)return 1/0;if(t++,!n.has(r)&&("object"==typeof e[r]&&(0,s.eachItem)(e[r],(e=>t+=l(e))),t===1/0))return 1/0}return t}function d(e,t="",r){!1!==r&&(t=h(t));const s=e.parse(t);return u(e,s)}function u(e,t){return e.serialize(t).split("#")[0]+"#"}t.getFullPath=d,t._getFullPath=u;const f=/#\/?$/;function h(e){return e?e.replace(f,""):""}t.normalizeId=h,t.resolveUrl=function(e,t,r){return r=h(r),e.resolve(t,r)};const m=/^[a-z_][-a-z0-9._]*$/i;t.getSchemaRefs=function(e,t){if("boolean"==typeof e)return{};const{schemaId:r,uriResolver:s}=this.opts,n=h(e[r]||t),i={"":n},c=d(s,n,!1),l={},u=new Set;return o(e,{allKeys:!0},((e,t,s,a)=>{if(void 0===a)return;const o=c+t;let n=i[a];function d(t){const r=this.opts.uriResolver.resolve;if(t=h(n?r(n,t):t),u.has(t))throw p(t);u.add(t);let s=this.refs[t];return"string"==typeof s&&(s=this.refs[s]),"object"==typeof s?f(e,s.schema,t):t!==h(o)&&("#"===t[0]?(f(e,l[t],t),l[t]=e):this.refs[t]=o),t}function y(e){if("string"==typeof e){if(!m.test(e))throw new Error(`invalid anchor "${e}"`);d.call(this,`#${e}`)}}"string"==typeof e[r]&&(n=d.call(this,e[r])),y.call(this,e.$anchor),y.call(this,e.$dynamicAnchor),i[t]=n})),l;function f(e,t,r){if(void 0!==t&&!a(e,t))throw p(r)}function p(e){return new Error(`reference "${e}" resolves to more than one schema`)}}},396:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.getRules=t.isJSONType=void 0;const r=new Set(["string","number","integer","boolean","null","object","array"]);t.isJSONType=function(e){return"string"==typeof e&&r.has(e)},t.getRules=function(){const e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}},4227:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.checkStrictMode=t.getErrorPath=t.Type=t.useFunc=t.setEvaluated=t.evaluatedPropsToName=t.mergeEvaluated=t.eachItem=t.unescapeJsonPointer=t.escapeJsonPointer=t.escapeFragment=t.unescapeFragment=t.schemaRefOrVal=t.schemaHasRulesButRef=t.schemaHasRules=t.checkUnknownRules=t.alwaysValidSchema=t.toHash=void 0;const s=r(9029),a=r(1520);function o(e,t=e.schema){const{opts:r,self:s}=e;if(!r.strictSchema)return;if("boolean"==typeof t)return;const a=s.RULES.keywords;for(const r in t)a[r]||m(e,`unknown keyword: "${r}"`)}function n(e,t){if("boolean"==typeof e)return!e;for(const r in e)if(t[r])return!0;return!1}function i(e){return"number"==typeof e?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}function c(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function l({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:a}){return(o,n,i,c)=>{const l=void 0===i?n:i instanceof s.Name?(n instanceof s.Name?e(o,n,i):t(o,n,i),i):n instanceof s.Name?(t(o,i,n),n):r(n,i);return c!==s.Name||l instanceof s.Name?l:a(o,l)}}function d(e,t){if(!0===t)return e.var("props",!0);const r=e.var("props",s._`{}`);return void 0!==t&&u(e,r,t),r}function u(e,t,r){Object.keys(r).forEach((r=>e.assign(s._`${t}${(0,s.getProperty)(r)}`,!0)))}t.toHash=function(e){const t={};for(const r of e)t[r]=!0;return t},t.alwaysValidSchema=function(e,t){return"boolean"==typeof t?t:0===Object.keys(t).length||(o(e,t),!n(t,e.self.RULES.all))},t.checkUnknownRules=o,t.schemaHasRules=n,t.schemaHasRulesButRef=function(e,t){if("boolean"==typeof e)return!e;for(const r in e)if("$ref"!==r&&t.all[r])return!0;return!1},t.schemaRefOrVal=function({topSchemaRef:e,schemaPath:t},r,a,o){if(!o){if("number"==typeof r||"boolean"==typeof r)return r;if("string"==typeof r)return s._`${r}`}return s._`${e}${t}${(0,s.getProperty)(a)}`},t.unescapeFragment=function(e){return c(decodeURIComponent(e))},t.escapeFragment=function(e){return encodeURIComponent(i(e))},t.escapeJsonPointer=i,t.unescapeJsonPointer=c,t.eachItem=function(e,t){if(Array.isArray(e))for(const r of e)t(r);else t(e)},t.mergeEvaluated={props:l({mergeNames:(e,t,r)=>e.if(s._`${r} !== true && ${t} !== undefined`,(()=>{e.if(s._`${t} === true`,(()=>e.assign(r,!0)),(()=>e.assign(r,s._`${r} || {}`).code(s._`Object.assign(${r}, ${t})`)))})),mergeToName:(e,t,r)=>e.if(s._`${r} !== true`,(()=>{!0===t?e.assign(r,!0):(e.assign(r,s._`${r} || {}`),u(e,r,t))})),mergeValues:(e,t)=>!0===e||{...e,...t},resultToName:d}),items:l({mergeNames:(e,t,r)=>e.if(s._`${r} !== true && ${t} !== undefined`,(()=>e.assign(r,s._`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`))),mergeToName:(e,t,r)=>e.if(s._`${r} !== true`,(()=>e.assign(r,!0===t||s._`${r} > ${t} ? ${r} : ${t}`))),mergeValues:(e,t)=>!0===e||Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})},t.evaluatedPropsToName=d,t.setEvaluated=u;const f={};var h;function m(e,t,r=e.opts.strictSchema){if(r){if(t=`strict mode: ${t}`,!0===r)throw new Error(t);e.self.logger.warn(t)}}t.useFunc=function(e,t){return e.scopeValue("func",{ref:t,code:f[t.code]||(f[t.code]=new a._Code(t.code))})},function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"}(h||(t.Type=h={})),t.getErrorPath=function(e,t,r){if(e instanceof s.Name){const a=t===h.Num;return r?a?s._`"[" + ${e} + "]"`:s._`"['" + ${e} + "']"`:a?s._`"/" + ${e}`:s._`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,s.getProperty)(e).toString():"/"+i(e)},t.checkStrictMode=m},7887:function(e,t){function r(e,t){return t.rules.some((t=>s(e,t)))}function s(e,t){var r;return void 0!==e[t.keyword]||(null===(r=t.definition.implements)||void 0===r?void 0:r.some((t=>void 0!==e[t])))}Object.defineProperty(t,"__esModule",{value:!0}),t.shouldUseRule=t.shouldUseGroup=t.schemaHasRulesForType=void 0,t.schemaHasRulesForType=function({schema:e,self:t},s){const a=t.RULES.types[s];return a&&!0!==a&&r(e,a)},t.shouldUseGroup=r,t.shouldUseRule=s},8727:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.boolOrEmptySchema=t.topBoolOrEmptySchema=void 0;const s=r(8708),a=r(9029),o=r(2023),n={message:"boolean schema is false"};function i(e,t){const{gen:r,data:a}=e,o={gen:r,keyword:"false schema",data:a,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,s.reportError)(o,n,void 0,t)}t.topBoolOrEmptySchema=function(e){const{gen:t,schema:r,validateName:s}=e;!1===r?i(e,!1):"object"==typeof r&&!0===r.$async?t.return(o.default.data):(t.assign(a._`${s}.errors`,null),t.return(!0))},t.boolOrEmptySchema=function(e,t){const{gen:r,schema:s}=e;!1===s?(r.var(t,!1),i(e)):r.var(t,!0)}},208:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.reportTypeError=t.checkDataTypes=t.checkDataType=t.coerceAndCheckDataType=t.getJSONTypes=t.getSchemaTypes=t.DataType=void 0;const s=r(396),a=r(7887),o=r(8708),n=r(9029),i=r(4227);var c;function l(e){const t=Array.isArray(e)?e:e?[e]:[];if(t.every(s.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}!function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"}(c||(t.DataType=c={})),t.getSchemaTypes=function(e){const t=l(e.type);if(t.includes("null")){if(!1===e.nullable)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&void 0!==e.nullable)throw new Error('"nullable" cannot be used without "type"');!0===e.nullable&&t.push("null")}return t},t.getJSONTypes=l,t.coerceAndCheckDataType=function(e,t){const{gen:r,data:s,opts:o}=e,i=function(e,t){return t?e.filter((e=>d.has(e)||"array"===t&&"array"===e)):[]}(t,o.coerceTypes),l=t.length>0&&!(0===i.length&&1===t.length&&(0,a.schemaHasRulesForType)(e,t[0]));if(l){const a=f(t,s,o.strictNumbers,c.Wrong);r.if(a,(()=>{i.length?function(e,t,r){const{gen:s,data:a,opts:o}=e,i=s.let("dataType",n._`typeof ${a}`),c=s.let("coerced",n._`undefined`);"array"===o.coerceTypes&&s.if(n._`${i} == 'object' && Array.isArray(${a}) && ${a}.length == 1`,(()=>s.assign(a,n._`${a}[0]`).assign(i,n._`typeof ${a}`).if(f(t,a,o.strictNumbers),(()=>s.assign(c,a))))),s.if(n._`${c} !== undefined`);for(const e of r)(d.has(e)||"array"===e&&"array"===o.coerceTypes)&&l(e);function l(e){switch(e){case"string":return void s.elseIf(n._`${i} == "number" || ${i} == "boolean"`).assign(c,n._`"" + ${a}`).elseIf(n._`${a} === null`).assign(c,n._`""`);case"number":return void s.elseIf(n._`${i} == "boolean" || ${a} === null
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("lodash"),require("qs"),require("@antv/g6")):"function"==typeof define&&define.amd?define(["lodash","qs","@antv/g6"],t):"object"==typeof exports?exports.bpm2=t(require("lodash"),require("qs"),require("@antv/g6")):e.bpm2=t(e.lodash,e.qs,e["@antv/g6"])}(self,(function(e,t,r){return function(){"use strict";var s={5281:function(e,t,r){r.d(t,{A:function(){return d}});var s=r(9795),a=r(6773),o=r.n(a),n=class{constructor(e,t={}){this._fnBatchLoad=e,this._options=t,this._queue=[]}async load(e){let t=await this.loads(e);return o().get(t,"0")}loads(...e){return new Promise(((t,r)=>{this._queue.push({keys:e,resolve:t,reject:r}),1==this._queue.length&&this.nextTick((()=>{this.process()}))}))}nextTick(e){setTimeout(e,0)}process(){let e=this._queue;this._queue=[];let t={};o().each(e,(e=>{o().each(e.keys,(e=>t[e]=null))}));let r=o().keys(t);this._fnBatchLoad(r).then((s=>{o().each(r,((e,r)=>{t[e]=s[r]})),o().each(e,(({keys:e,resolve:r})=>{r(o().map(e,(e=>t[e])))}))})).catch((t=>{o().each(e,(({reject:e})=>e(t)))}))}};const i=async(e,t,r)=>{if(t.setNetworking(!0),t.netHeader&&(e.headers={common:t.netHeader}),e.params=_.merge({},e.params,r),t.env.ignore_levels&&_.set(e.params,"ignore_levels",!0),(0,s.Fr)()){let t=zj.utils.pageParam().token;e.params=_.merge({token:t,platform:"phone"},e.params)}e.isSilentOnErr=e=>{let t=_.get(e,"data.result");return t>=19e6||t<=19999999};let a=_.cloneDeep(e);if(a.can_custom_org_params){let e=_.cloneDeep(_.get(t,"orgInfo",{}));console.log("bpm3_orgInfo",e),e.custom_page_level&&(a.params.page_level=e.custom_page_level),e.custom_group_id&&(a.params.group_id=e.custom_group_id),e.custom_team_id&&(a.params.team_id=e.custom_team_id),e.custom_project_id&&(a.params.project_id=e.custom_project_id)}console.log("bpm3_orgInfo_reqArgs",a);let o=await zj.net.request(a);return t.setNetworking(!1),o},c={},l={};var d={assistSelectEntranceForm:{getListDefinition(e,{formDefId:t,fieldDefId:r,orgInfo:s,isDm:a}){return i({url:`/app_flow/v1/papi/assist_select_entrance_form/${t}/${r}/list_definition/`,method:"GET"},e,s)},getOptions(e,{formDefId:t,fieldDefId:r,orgInfo:s,isDm:a},o){return i({url:`/app_flow/v1/papi/assist_select_entrance_form/${t}/${r}/list_search/`,method:"GET",params:o},e,s)},getListSelected(e,{formDefId:t,fieldDefId:r,orgInfo:s,isDm:a},o){return i({url:`/app_flow/v1/papi/assist_select_entrance_form/${t}/${r}/list_selected/`,method:"GET",params:o},e,s)}},assistField:{getBatchLoader(e,{formDefId:t,fieldDefId:r,orgInfo:s,uniqueId:a}){const o=`${t}/${r}`,l=c[o]||new n((async o=>{let n=`/app_flow/v1/papi/assist_field/${t}/${r}/list_title/`;const c=await i({url:n,method:"GET",params:{values:JSON.stringify(o)}},e,s),l=_.get(c,"data.data.data",{});let d=[];return _.map(o,(e=>{a?(e=JSON.parse(e),e=_.get(e,`${a}`),d=_.concat(d,l[e])):d=_.concat(d,l[e])})),d}));return c[o]=l,l},getTitle(e,{formDefId:t,fieldDefId:r,orgInfo:s,isDm:a},o){return i({url:`/app_flow/v1/papi/assist_field/${t}/${r}/list_title/`,method:"GET",params:{values:JSON.stringify(o)}},e,s)},async searchSelectOpts(e,{formDefId:t,fieldDefId:r,orgInfo:s,isDm:a},o={},n=""){n&&(o.q=n);let c=a?`/app_flow/v1/papi/dm/assist_field/${t}/${r}/search_title/`:`/app_flow/v1/papi/assist_field/${t}/${r}/search_title/`,d=`${t}/${r}/${n}/${JSON.stringify(s)}/${JSON.stringify(o)}`,u={};return l[d]&&"loading"==l[d]?(console.log("有缓存,返回"),await this.waitCacheMapData(d)):(!l[d]||(new Date).getTime()-l[d].last_time>6e4?(l[d]="loading",u=await i({url:c,method:a?"GET":"POST",data:o,can_custom_org_params:!0},e,s),l[d]={last_time:(new Date).getTime(),result:u}):(console.log("有缓存"),l[d].result&&(u=l[d].result)),u)},waitCacheMapData(e){return new Promise((t=>{let r=setInterval((()=>{l[e]&&"loading"!=l[e]&&l[e].result&&(clearInterval(r),t(l[e].result))}),100)}))},selectFromMulFormSearchOpts(e,{formDefId:t,fieldDefId:r,orgInfo:s,isDm:a},o={},n=""){return n&&(o.q=n),i({url:a?`/app_flow/v1/papi/dm/assist_field/select_form_mul_form/${t}/${r}/search_title/`:`/app_flow/v1/papi/assist_field/select_form_mul_form/${t}/${r}/search_title/`,method:"GET",params:o},e,s)},selectFromMulFormListTitleLoader(e,{formDefId:t,fieldDefId:r,orgInfo:s,isDm:a}){const o=`${t}/${r}`,l=c[o]||new n((async o=>{let n=a?`/app_flow/v1/papi/dm/assist_field/select_form_mul_form/${t}/${r}/list_title/`:`/app_flow/v1/papi/assist_field/select_form_mul_form/${t}/${r}/list_title/`;const c=await i({url:n,method:"GET",params:{values:JSON.stringify(o)}},e,s),l=_.get(c.data,"data.items",[]),d={};l.forEach((e=>{Object.keys(e.data).forEach((t=>{let r=e.data[t];d[t]={form_def_id:_.get(e,"definition.form.id"),form_title:_.get(e,"definition.form.name"),label:r}}))}));let u=[];return o.forEach((e=>{u.push(d[e])})),u}));return c[o]=l,l},selectFromMulFormListTitle(e,{formDefId:t,fieldDefId:r,orgInfo:s,isDm:a},o){return i({url:a?`/app_flow/v1/papi/dm/assist_field/select_form_mul_form/${t}/${r}/list_title/`:`/app_flow/v1/papi/assist_field/select_form_mul_form/${t}/${r}/list_title/`,method:"GET",params:{values:JSON.stringify(o)}},e,s)}},assistTreeField:{searchSelectOpts(e,{formDefId:t,fieldDefId:r,orgInfo:s,isDm:a},o={},n=""){return n&&(o.q=n),i({url:a?`/app_flow/v1/papi/dm/assist_tree_field/${t}/${r}/search_title/`:`/app_flow/v1/papi/assist_tree_field/${t}/${r}/search_title/`,method:"GET",params:o,can_custom_org_params:!0},e,s)}},assistUserTaskCC:{searchSelectOpts(e,{formDefId:t,node:r,orgInfo:s,isDm:a},o={},n=""){return n&&(o.q=n),i({url:`/app_flow/v1/papi/assist_user_task_cc/${t}/${r}/search_title/`,method:"GET",params:o},e,s)}}}},9795:function(e,t,r){function s(){for(var e=["iphone","ipod","ipad","android","mobile","blackberry","webos","incognito","webmate","bada","nokia","lg","ucweb","skyfire"],t=navigator.userAgent.toLowerCase(),r=!1,s=0,a=e.length;s<a;s++)-1!=t.indexOf(e[s])&&(r=!0);return r}r.d(t,{Fr:function(){return s}}),r(6773),r(5360)},3282:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv=void 0;const s=r(4042),a=r(6144),o=r(6653),n=r(2079),i=["/properties"],c="http://json-schema.org/draft-07/schema";class l extends s.default{_addVocabularies(){super._addVocabularies(),a.default.forEach((e=>this.addVocabulary(e))),this.opts.discriminator&&this.addKeyword(o.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const e=this.opts.$data?this.$dataMetaSchema(n,i):n;this.addMetaSchema(e,c,!1),this.refs["http://json-schema.org/schema"]=c}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(c)?c:void 0)}}t.Ajv=l,e.exports=t=l,e.exports.Ajv=l,Object.defineProperty(t,"__esModule",{value:!0}),t.default=l;var d=r(2586);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return d.KeywordCxt}});var u=r(9029);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return u._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return u.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return u.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return u.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return u.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return u.CodeGen}});var f=r(3558);Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return f.default}});var h=r(4551);Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return h.default}})},1520:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.regexpCode=t.getEsmExportName=t.getProperty=t.safeStringify=t.stringify=t.strConcat=t.addCodeArg=t.str=t._=t.nil=t._Code=t.Name=t.IDENTIFIER=t._CodeOrName=void 0;class r{}t._CodeOrName=r,t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class s extends r{constructor(e){if(super(),!t.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}t.Name=s;class a extends r{constructor(e){super(),this._items="string"==typeof e?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const e=this._items[0];return""===e||'""'===e}get str(){var e;return null!==(e=this._str)&&void 0!==e?e:this._str=this._items.reduce(((e,t)=>`${e}${t}`),"")}get names(){var e;return null!==(e=this._names)&&void 0!==e?e:this._names=this._items.reduce(((e,t)=>(t instanceof s&&(e[t.str]=(e[t.str]||0)+1),e)),{})}}function o(e,...t){const r=[e[0]];let s=0;for(;s<t.length;)c(r,t[s]),r.push(e[++s]);return new a(r)}t._Code=a,t.nil=new a(""),t._=o;const n=new a("+");function i(e,...t){const r=[d(e[0])];let s=0;for(;s<t.length;)r.push(n),c(r,t[s]),r.push(n,d(e[++s]));return function(e){let t=1;for(;t<e.length-1;){if(e[t]===n){const r=l(e[t-1],e[t+1]);if(void 0!==r){e.splice(t-1,3,r);continue}e[t++]="+"}t++}}(r),new a(r)}function c(e,t){var r;t instanceof a?e.push(...t._items):t instanceof s?e.push(t):e.push("number"==typeof(r=t)||"boolean"==typeof r||null===r?r:d(Array.isArray(r)?r.join(","):r))}function l(e,t){if('""'===t)return e;if('""'===e)return t;if("string"==typeof e){if(t instanceof s||'"'!==e[e.length-1])return;return"string"!=typeof t?`${e.slice(0,-1)}${t}"`:'"'===t[0]?e.slice(0,-1)+t.slice(1):void 0}return"string"!=typeof t||'"'!==t[0]||e instanceof s?void 0:`"${e}${t.slice(1)}`}function d(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}t.str=i,t.addCodeArg=c,t.strConcat=function(e,t){return t.emptyStr()?e:e.emptyStr()?t:i`${e}${t}`},t.stringify=function(e){return new a(d(e))},t.safeStringify=d,t.getProperty=function(e){return"string"==typeof e&&t.IDENTIFIER.test(e)?new a(`.${e}`):o`[${e}]`},t.getEsmExportName=function(e){if("string"==typeof e&&t.IDENTIFIER.test(e))return new a(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)},t.regexpCode=function(e){return new a(e.toString())}},9029:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;const s=r(1520),a=r(7845);var o=r(1520);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return o._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return o.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return o.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return o.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return o.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return o.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return o.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return o.Name}});var n=r(7845);Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return n.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return n.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return n.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return n.varKinds}}),t.operators={GT:new s._Code(">"),GTE:new s._Code(">="),LT:new s._Code("<"),LTE:new s._Code("<="),EQ:new s._Code("==="),NEQ:new s._Code("!=="),NOT:new s._Code("!"),OR:new s._Code("||"),AND:new s._Code("&&"),ADD:new s._Code("+")};class i{optimizeNodes(){return this}optimizeNames(e,t){return this}}class c extends i{constructor(e,t,r){super(),this.varKind=e,this.name=t,this.rhs=r}render({es5:e,_n:t}){const r=e?a.varKinds.var:this.varKind,s=void 0===this.rhs?"":` = ${this.rhs}`;return`${r} ${this.name}${s};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&(this.rhs=C(this.rhs,e,t)),this}get names(){return this.rhs instanceof s._CodeOrName?this.rhs.names:{}}}class l extends i{constructor(e,t,r){super(),this.lhs=e,this.rhs=t,this.sideEffects=r}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,t){if(!(this.lhs instanceof s.Name)||e[this.lhs.str]||this.sideEffects)return this.rhs=C(this.rhs,e,t),this}get names(){return x(this.lhs instanceof s.Name?{}:{...this.lhs.names},this.rhs)}}class d extends l{constructor(e,t,r,s){super(e,r,s),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}}class u extends i{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}}class f extends i{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}}class h extends i{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}}class m extends i{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=C(this.code,e,t),this}get names(){return this.code instanceof s._CodeOrName?this.code.names:{}}}class p extends i{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce(((t,r)=>t+r.render(e)),"")}optimizeNodes(){const{nodes:e}=this;let t=e.length;for(;t--;){const r=e[t].optimizeNodes();Array.isArray(r)?e.splice(t,1,...r):r?e[t]=r:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){const{nodes:r}=this;let s=r.length;for(;s--;){const a=r[s];a.optimizeNames(e,t)||(O(e,a.names),r.splice(s,1))}return r.length>0?this:void 0}get names(){return this.nodes.reduce(((e,t)=>j(e,t.names)),{})}}class y extends p{render(e){return"{"+e._n+super.render(e)+"}"+e._n}}class g extends p{}class v extends y{}v.kind="else";class _ extends y{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+="else "+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();const e=this.condition;if(!0===e)return this.nodes;let t=this.else;if(t){const e=t.optimizeNodes();t=this.else=Array.isArray(e)?new v(e):e}return t?!1===e?t instanceof _?t:t.nodes:this.nodes.length?this:new _(T(e),t instanceof _?[t]:t.nodes):!1!==e&&this.nodes.length?this:void 0}optimizeNames(e,t){var r;if(this.else=null===(r=this.else)||void 0===r?void 0:r.optimizeNames(e,t),super.optimizeNames(e,t)||this.else)return this.condition=C(this.condition,e,t),this}get names(){const e=super.names;return x(e,this.condition),this.else&&j(e,this.else.names),e}}_.kind="if";class $ extends y{}$.kind="for";class w extends ${constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iteration=C(this.iteration,e,t),this}get names(){return j(super.names,this.iteration.names)}}class b extends ${constructor(e,t,r,s){super(),this.varKind=e,this.name=t,this.from=r,this.to=s}render(e){const t=e.es5?a.varKinds.var:this.varKind,{name:r,from:s,to:o}=this;return`for(${t} ${r}=${s}; ${r}<${o}; ${r}++)`+super.render(e)}get names(){const e=x(super.names,this.from);return x(e,this.to)}}class S extends ${constructor(e,t,r,s){super(),this.loop=e,this.varKind=t,this.name=r,this.iterable=s}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iterable=C(this.iterable,e,t),this}get names(){return j(super.names,this.iterable.names)}}class P extends y{constructor(e,t,r){super(),this.name=e,this.args=t,this.async=r}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}}P.kind="func";class E extends p{render(e){return"return "+super.render(e)}}E.kind="return";class k extends y{render(e){let t="try"+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),null===(e=this.catch)||void 0===e||e.optimizeNodes(),null===(t=this.finally)||void 0===t||t.optimizeNodes(),this}optimizeNames(e,t){var r,s;return super.optimizeNames(e,t),null===(r=this.catch)||void 0===r||r.optimizeNames(e,t),null===(s=this.finally)||void 0===s||s.optimizeNames(e,t),this}get names(){const e=super.names;return this.catch&&j(e,this.catch.names),this.finally&&j(e,this.finally.names),e}}class I extends y{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}}I.kind="catch";class N extends y{render(e){return"finally"+super.render(e)}}function j(e,t){for(const r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function x(e,t){return t instanceof s._CodeOrName?j(e,t.names):e}function C(e,t,r){return e instanceof s.Name?o(e):(a=e)instanceof s._Code&&a._items.some((e=>e instanceof s.Name&&1===t[e.str]&&void 0!==r[e.str]))?new s._Code(e._items.reduce(((e,t)=>(t instanceof s.Name&&(t=o(t)),t instanceof s._Code?e.push(...t._items):e.push(t),e)),[])):e;var a;function o(e){const s=r[e.str];return void 0===s||1!==t[e.str]?e:(delete t[e.str],s)}}function O(e,t){for(const r in t)e[r]=(e[r]||0)-(t[r]||0)}function T(e){return"boolean"==typeof e||"number"==typeof e||null===e?!e:s._`!${M(e)}`}N.kind="finally",t.CodeGen=class{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?"\n":""},this._extScope=e,this._scope=new a.Scope({parent:e}),this._nodes=[new g]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){const r=this._extScope.value(e,t);return(this._values[r.prefix]||(this._values[r.prefix]=new Set)).add(r),r}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,r,s){const a=this._scope.toName(t);return void 0!==r&&s&&(this._constants[a.str]=r),this._leafNode(new c(e,a,r)),a}const(e,t,r){return this._def(a.varKinds.const,e,t,r)}let(e,t,r){return this._def(a.varKinds.let,e,t,r)}var(e,t,r){return this._def(a.varKinds.var,e,t,r)}assign(e,t,r){return this._leafNode(new l(e,t,r))}add(e,r){return this._leafNode(new d(e,t.operators.ADD,r))}code(e){return"function"==typeof e?e():e!==s.nil&&this._leafNode(new m(e)),this}object(...e){const t=["{"];for(const[r,a]of e)t.length>1&&t.push(","),t.push(r),(r!==a||this.opts.es5)&&(t.push(":"),(0,s.addCodeArg)(t,a));return t.push("}"),new s._Code(t)}if(e,t,r){if(this._blockNode(new _(e)),t&&r)this.code(t).else().code(r).endIf();else if(t)this.code(t).endIf();else if(r)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new _(e))}else(){return this._elseNode(new v)}endIf(){return this._endBlockNode(_,v)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new w(e),t)}forRange(e,t,r,s,o=(this.opts.es5?a.varKinds.var:a.varKinds.let)){const n=this._scope.toName(e);return this._for(new b(o,n,t,r),(()=>s(n)))}forOf(e,t,r,o=a.varKinds.const){const n=this._scope.toName(e);if(this.opts.es5){const e=t instanceof s.Name?t:this.var("_arr",t);return this.forRange("_i",0,s._`${e}.length`,(t=>{this.var(n,s._`${e}[${t}]`),r(n)}))}return this._for(new S("of",o,n,t),(()=>r(n)))}forIn(e,t,r,o=(this.opts.es5?a.varKinds.var:a.varKinds.const)){if(this.opts.ownProperties)return this.forOf(e,s._`Object.keys(${t})`,r);const n=this._scope.toName(e);return this._for(new S("in",o,n,t),(()=>r(n)))}endFor(){return this._endBlockNode($)}label(e){return this._leafNode(new u(e))}break(e){return this._leafNode(new f(e))}return(e){const t=new E;if(this._blockNode(t),this.code(e),1!==t.nodes.length)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(E)}try(e,t,r){if(!t&&!r)throw new Error('CodeGen: "try" without "catch" and "finally"');const s=new k;if(this._blockNode(s),this.code(e),t){const e=this.name("e");this._currNode=s.catch=new I(e),t(e)}return r&&(this._currNode=s.finally=new N,this.code(r)),this._endBlockNode(I,N)}throw(e){return this._leafNode(new h(e))}block(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}endBlock(e){const t=this._blockStarts.pop();if(void 0===t)throw new Error("CodeGen: not in self-balancing block");const r=this._nodes.length-t;if(r<0||void 0!==e&&r!==e)throw new Error(`CodeGen: wrong number of nodes: ${r} vs ${e} expected`);return this._nodes.length=t,this}func(e,t=s.nil,r,a){return this._blockNode(new P(e,t,r)),a&&this.code(a).endFunc(),this}endFunc(){return this._endBlockNode(P)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){const r=this._currNode;if(r instanceof e||t&&r instanceof t)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){const t=this._currNode;if(!(t instanceof _))throw new Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){const e=this._nodes;return e[e.length-1]}set _currNode(e){const t=this._nodes;t[t.length-1]=e}},t.not=T;const D=A(t.operators.AND);t.and=function(...e){return e.reduce(D)};const R=A(t.operators.OR);function A(e){return(t,r)=>t===s.nil?r:r===s.nil?t:s._`${M(t)} ${e} ${M(r)}`}function M(e){return e instanceof s.Name?e:s._`(${e})`}t.or=function(...e){return e.reduce(R)}},7845:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;const s=r(1520);class a extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}}var o;!function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"}(o||(t.UsedValueState=o={})),t.varKinds={const:new s.Name("const"),let:new s.Name("let"),var:new s.Name("var")};class n{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof s.Name?e:this.name(e)}name(e){return new s.Name(this._newName(e))}_newName(e){return`${e}${(this._names[e]||this._nameGroup(e)).index++}`}_nameGroup(e){var t,r;if((null===(r=null===(t=this._parent)||void 0===t?void 0:t._prefixes)||void 0===r?void 0:r.has(e))||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}}t.Scope=n;class i extends s.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:t,itemIndex:r}){this.value=e,this.scopePath=s._`.${new s.Name(t)}[${r}]`}}t.ValueScopeName=i;const c=s._`\n`;t.ValueScope=class extends n{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?c:s.nil}}get(){return this._scope}name(e){return new i(e,this._newName(e))}value(e,t){var r;if(void 0===t.ref)throw new Error("CodeGen: ref must be passed in value");const s=this.toName(e),{prefix:a}=s,o=null!==(r=t.key)&&void 0!==r?r:t.ref;let n=this._values[a];if(n){const e=n.get(o);if(e)return e}else n=this._values[a]=new Map;n.set(o,s);const i=this._scope[a]||(this._scope[a]=[]),c=i.length;return i[c]=t.ref,s.setValue(t,{property:a,itemIndex:c}),s}getValue(e,t){const r=this._values[e];if(r)return r.get(t)}scopeRefs(e,t=this._values){return this._reduceValues(t,(t=>{if(void 0===t.scopePath)throw new Error(`CodeGen: name "${t}" has no value`);return s._`${e}${t.scopePath}`}))}scopeCode(e=this._values,t,r){return this._reduceValues(e,(e=>{if(void 0===e.value)throw new Error(`CodeGen: name "${e}" has no value`);return e.value.code}),t,r)}_reduceValues(e,r,n={},i){let c=s.nil;for(const l in e){const d=e[l];if(!d)continue;const u=n[l]=n[l]||new Map;d.forEach((e=>{if(u.has(e))return;u.set(e,o.Started);let n=r(e);if(n){const r=this.opts.es5?t.varKinds.var:t.varKinds.const;c=s._`${c}${r} ${e} = ${n};${this.opts._n}`}else{if(!(n=null==i?void 0:i(e)))throw new a(e);c=s._`${c}${n}${this.opts._n}`}u.set(e,o.Completed)}))}return c}}},8708:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;const s=r(9029),a=r(4227),o=r(2023);function n(e,t){const r=e.const("err",t);e.if(s._`${o.default.vErrors} === null`,(()=>e.assign(o.default.vErrors,s._`[${r}]`)),s._`${o.default.vErrors}.push(${r})`),e.code(s._`${o.default.errors}++`)}function i(e,t){const{gen:r,validateName:a,schemaEnv:o}=e;o.$async?r.throw(s._`new ${e.ValidationError}(${t})`):(r.assign(s._`${a}.errors`,t),r.return(!1))}t.keywordError={message:({keyword:e})=>s.str`must pass "${e}" keyword validation`},t.keyword$DataError={message:({keyword:e,schemaType:t})=>t?s.str`"${e}" keyword must be ${t} ($data)`:s.str`"${e}" keyword is invalid ($data)`},t.reportError=function(e,r=t.keywordError,a,o){const{it:c}=e,{gen:d,compositeRule:u,allErrors:f}=c,h=l(e,r,a);(null!=o?o:u||f)?n(d,h):i(c,s._`[${h}]`)},t.reportExtraError=function(e,r=t.keywordError,s){const{it:a}=e,{gen:c,compositeRule:d,allErrors:u}=a;n(c,l(e,r,s)),d||u||i(a,o.default.vErrors)},t.resetErrorsCount=function(e,t){e.assign(o.default.errors,t),e.if(s._`${o.default.vErrors} !== null`,(()=>e.if(t,(()=>e.assign(s._`${o.default.vErrors}.length`,t)),(()=>e.assign(o.default.vErrors,null)))))},t.extendErrors=function({gen:e,keyword:t,schemaValue:r,data:a,errsCount:n,it:i}){if(void 0===n)throw new Error("ajv implementation error");const c=e.name("err");e.forRange("i",n,o.default.errors,(n=>{e.const(c,s._`${o.default.vErrors}[${n}]`),e.if(s._`${c}.instancePath === undefined`,(()=>e.assign(s._`${c}.instancePath`,(0,s.strConcat)(o.default.instancePath,i.errorPath)))),e.assign(s._`${c}.schemaPath`,s.str`${i.errSchemaPath}/${t}`),i.opts.verbose&&(e.assign(s._`${c}.schema`,r),e.assign(s._`${c}.data`,a))}))};const c={keyword:new s.Name("keyword"),schemaPath:new s.Name("schemaPath"),params:new s.Name("params"),propertyName:new s.Name("propertyName"),message:new s.Name("message"),schema:new s.Name("schema"),parentSchema:new s.Name("parentSchema")};function l(e,t,r){const{createErrors:a}=e.it;return!1===a?s._`{}`:function(e,t,r={}){const{gen:a,it:n}=e,i=[d(n,r),u(e,r)];return function(e,{params:t,message:r},a){const{keyword:n,data:i,schemaValue:l,it:d}=e,{opts:u,propertyName:f,topSchemaRef:h,schemaPath:m}=d;a.push([c.keyword,n],[c.params,"function"==typeof t?t(e):t||s._`{}`]),u.messages&&a.push([c.message,"function"==typeof r?r(e):r]),u.verbose&&a.push([c.schema,l],[c.parentSchema,s._`${h}${m}`],[o.default.data,i]),f&&a.push([c.propertyName,f])}(e,t,i),a.object(...i)}(e,t,r)}function d({errorPath:e},{instancePath:t}){const r=t?s.str`${e}${(0,a.getErrorPath)(t,a.Type.Str)}`:e;return[o.default.instancePath,(0,s.strConcat)(o.default.instancePath,r)]}function u({keyword:e,it:{errSchemaPath:t}},{schemaPath:r,parentSchema:o}){let n=o?t:s.str`${t}/${e}`;return r&&(n=s.str`${n}${(0,a.getErrorPath)(r,a.Type.Str)}`),[c.schemaPath,n]}},3835:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.resolveSchema=t.getCompilingSchema=t.resolveRef=t.compileSchema=t.SchemaEnv=void 0;const s=r(9029),a=r(3558),o=r(2023),n=r(6939),i=r(4227),c=r(2586);class l{constructor(e){var t;let r;this.refs={},this.dynamicAnchors={},"object"==typeof e.schema&&(r=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=null!==(t=e.baseId)&&void 0!==t?t:(0,n.normalizeId)(null==r?void 0:r[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=null==r?void 0:r.$async,this.refs={}}}function d(e){const t=f.call(this,e);if(t)return t;const r=(0,n.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:i,lines:l}=this.opts.code,{ownProperties:d}=this.opts,u=new s.CodeGen(this.scope,{es5:i,lines:l,ownProperties:d});let h;e.$async&&(h=u.scopeValue("Error",{ref:a.default,code:s._`require("ajv/dist/runtime/validation_error").default`}));const m=u.scopeName("validate");e.validateName=m;const p={gen:u,allErrors:this.opts.allErrors,data:o.default.data,parentData:o.default.parentData,parentDataProperty:o.default.parentDataProperty,dataNames:[o.default.data],dataPathArr:[s.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:u.scopeValue("schema",!0===this.opts.code.source?{ref:e.schema,code:(0,s.stringify)(e.schema)}:{ref:e.schema}),validateName:m,ValidationError:h,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:s.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:s._`""`,opts:this.opts,self:this};let y;try{this._compilations.add(e),(0,c.validateFunctionCode)(p),u.optimize(this.opts.code.optimize);const t=u.toString();y=`${u.scopeRefs(o.default.scope)}return ${t}`,this.opts.code.process&&(y=this.opts.code.process(y,e));const r=new Function(`${o.default.self}`,`${o.default.scope}`,y)(this,this.scope.get());if(this.scope.value(m,{ref:r}),r.errors=null,r.schema=e.schema,r.schemaEnv=e,e.$async&&(r.$async=!0),!0===this.opts.code.source&&(r.source={validateName:m,validateCode:t,scopeValues:u._values}),this.opts.unevaluated){const{props:e,items:t}=p;r.evaluated={props:e instanceof s.Name?void 0:e,items:t instanceof s.Name?void 0:t,dynamicProps:e instanceof s.Name,dynamicItems:t instanceof s.Name},r.source&&(r.source.evaluated=(0,s.stringify)(r.evaluated))}return e.validate=r,e}catch(t){throw delete e.validate,delete e.validateName,y&&this.logger.error("Error compiling schema, function code:",y),t}finally{this._compilations.delete(e)}}function u(e){return(0,n.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:d.call(this,e)}function f(e){for(const s of this._compilations)if(r=e,(t=s).schema===r.schema&&t.root===r.root&&t.baseId===r.baseId)return s;var t,r}function h(e,t){let r;for(;"string"==typeof(r=this.refs[t]);)t=r;return r||this.schemas[t]||m.call(this,e,t)}function m(e,t){const r=this.opts.uriResolver.parse(t),s=(0,n._getFullPath)(this.opts.uriResolver,r);let a=(0,n.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&s===a)return y.call(this,r,e);const o=(0,n.normalizeId)(s),i=this.refs[o]||this.schemas[o];if("string"==typeof i){const t=m.call(this,e,i);if("object"!=typeof(null==t?void 0:t.schema))return;return y.call(this,r,t)}if("object"==typeof(null==i?void 0:i.schema)){if(i.validate||d.call(this,i),o===(0,n.normalizeId)(t)){const{schema:t}=i,{schemaId:r}=this.opts,s=t[r];return s&&(a=(0,n.resolveUrl)(this.opts.uriResolver,a,s)),new l({schema:t,schemaId:r,root:e,baseId:a})}return y.call(this,r,i)}}t.SchemaEnv=l,t.compileSchema=d,t.resolveRef=function(e,t,r){var s;r=(0,n.resolveUrl)(this.opts.uriResolver,t,r);const a=e.refs[r];if(a)return a;let o=h.call(this,e,r);if(void 0===o){const a=null===(s=e.localRefs)||void 0===s?void 0:s[r],{schemaId:n}=this.opts;a&&(o=new l({schema:a,schemaId:n,root:e,baseId:t}))}return void 0!==o?e.refs[r]=u.call(this,o):void 0},t.getCompilingSchema=f,t.resolveSchema=m;const p=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function y(e,{baseId:t,schema:r,root:s}){var a;if("/"!==(null===(a=e.fragment)||void 0===a?void 0:a[0]))return;for(const s of e.fragment.slice(1).split("/")){if("boolean"==typeof r)return;const e=r[(0,i.unescapeFragment)(s)];if(void 0===e)return;const a="object"==typeof(r=e)&&r[this.opts.schemaId];!p.has(s)&&a&&(t=(0,n.resolveUrl)(this.opts.uriResolver,t,a))}let o;if("boolean"!=typeof r&&r.$ref&&!(0,i.schemaHasRulesButRef)(r,this.RULES)){const e=(0,n.resolveUrl)(this.opts.uriResolver,t,r.$ref);o=m.call(this,s,e)}const{schemaId:c}=this.opts;return o=o||new l({schema:r,schemaId:c,root:s,baseId:t}),o.schema!==o.root.schema?o:void 0}},2023:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});const s=r(9029),a={data:new s.Name("data"),valCxt:new s.Name("valCxt"),instancePath:new s.Name("instancePath"),parentData:new s.Name("parentData"),parentDataProperty:new s.Name("parentDataProperty"),rootData:new s.Name("rootData"),dynamicAnchors:new s.Name("dynamicAnchors"),vErrors:new s.Name("vErrors"),errors:new s.Name("errors"),this:new s.Name("this"),self:new s.Name("self"),scope:new s.Name("scope"),json:new s.Name("json"),jsonPos:new s.Name("jsonPos"),jsonLen:new s.Name("jsonLen"),jsonPart:new s.Name("jsonPart")};t.default=a},4551:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});const s=r(6939);class a extends Error{constructor(e,t,r,a){super(a||`can't resolve reference ${r} from id ${t}`),this.missingRef=(0,s.resolveUrl)(e,t,r),this.missingSchema=(0,s.normalizeId)((0,s.getFullPath)(e,this.missingRef))}}t.default=a},6939:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.getSchemaRefs=t.resolveUrl=t.normalizeId=t._getFullPath=t.getFullPath=t.inlineRef=void 0;const s=r(4227),a=r(2017),o=r(7106),n=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);t.inlineRef=function(e,t=!0){return"boolean"==typeof e||(!0===t?!c(e):!!t&&l(e)<=t)};const i=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function c(e){for(const t in e){if(i.has(t))return!0;const r=e[t];if(Array.isArray(r)&&r.some(c))return!0;if("object"==typeof r&&c(r))return!0}return!1}function l(e){let t=0;for(const r in e){if("$ref"===r)return 1/0;if(t++,!n.has(r)&&("object"==typeof e[r]&&(0,s.eachItem)(e[r],(e=>t+=l(e))),t===1/0))return 1/0}return t}function d(e,t="",r){!1!==r&&(t=h(t));const s=e.parse(t);return u(e,s)}function u(e,t){return e.serialize(t).split("#")[0]+"#"}t.getFullPath=d,t._getFullPath=u;const f=/#\/?$/;function h(e){return e?e.replace(f,""):""}t.normalizeId=h,t.resolveUrl=function(e,t,r){return r=h(r),e.resolve(t,r)};const m=/^[a-z_][-a-z0-9._]*$/i;t.getSchemaRefs=function(e,t){if("boolean"==typeof e)return{};const{schemaId:r,uriResolver:s}=this.opts,n=h(e[r]||t),i={"":n},c=d(s,n,!1),l={},u=new Set;return o(e,{allKeys:!0},((e,t,s,a)=>{if(void 0===a)return;const o=c+t;let n=i[a];function d(t){const r=this.opts.uriResolver.resolve;if(t=h(n?r(n,t):t),u.has(t))throw p(t);u.add(t);let s=this.refs[t];return"string"==typeof s&&(s=this.refs[s]),"object"==typeof s?f(e,s.schema,t):t!==h(o)&&("#"===t[0]?(f(e,l[t],t),l[t]=e):this.refs[t]=o),t}function y(e){if("string"==typeof e){if(!m.test(e))throw new Error(`invalid anchor "${e}"`);d.call(this,`#${e}`)}}"string"==typeof e[r]&&(n=d.call(this,e[r])),y.call(this,e.$anchor),y.call(this,e.$dynamicAnchor),i[t]=n})),l;function f(e,t,r){if(void 0!==t&&!a(e,t))throw p(r)}function p(e){return new Error(`reference "${e}" resolves to more than one schema`)}}},396:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.getRules=t.isJSONType=void 0;const r=new Set(["string","number","integer","boolean","null","object","array"]);t.isJSONType=function(e){return"string"==typeof e&&r.has(e)},t.getRules=function(){const e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}},4227:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.checkStrictMode=t.getErrorPath=t.Type=t.useFunc=t.setEvaluated=t.evaluatedPropsToName=t.mergeEvaluated=t.eachItem=t.unescapeJsonPointer=t.escapeJsonPointer=t.escapeFragment=t.unescapeFragment=t.schemaRefOrVal=t.schemaHasRulesButRef=t.schemaHasRules=t.checkUnknownRules=t.alwaysValidSchema=t.toHash=void 0;const s=r(9029),a=r(1520);function o(e,t=e.schema){const{opts:r,self:s}=e;if(!r.strictSchema)return;if("boolean"==typeof t)return;const a=s.RULES.keywords;for(const r in t)a[r]||m(e,`unknown keyword: "${r}"`)}function n(e,t){if("boolean"==typeof e)return!e;for(const r in e)if(t[r])return!0;return!1}function i(e){return"number"==typeof e?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}function c(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function l({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:a}){return(o,n,i,c)=>{const l=void 0===i?n:i instanceof s.Name?(n instanceof s.Name?e(o,n,i):t(o,n,i),i):n instanceof s.Name?(t(o,i,n),n):r(n,i);return c!==s.Name||l instanceof s.Name?l:a(o,l)}}function d(e,t){if(!0===t)return e.var("props",!0);const r=e.var("props",s._`{}`);return void 0!==t&&u(e,r,t),r}function u(e,t,r){Object.keys(r).forEach((r=>e.assign(s._`${t}${(0,s.getProperty)(r)}`,!0)))}t.toHash=function(e){const t={};for(const r of e)t[r]=!0;return t},t.alwaysValidSchema=function(e,t){return"boolean"==typeof t?t:0===Object.keys(t).length||(o(e,t),!n(t,e.self.RULES.all))},t.checkUnknownRules=o,t.schemaHasRules=n,t.schemaHasRulesButRef=function(e,t){if("boolean"==typeof e)return!e;for(const r in e)if("$ref"!==r&&t.all[r])return!0;return!1},t.schemaRefOrVal=function({topSchemaRef:e,schemaPath:t},r,a,o){if(!o){if("number"==typeof r||"boolean"==typeof r)return r;if("string"==typeof r)return s._`${r}`}return s._`${e}${t}${(0,s.getProperty)(a)}`},t.unescapeFragment=function(e){return c(decodeURIComponent(e))},t.escapeFragment=function(e){return encodeURIComponent(i(e))},t.escapeJsonPointer=i,t.unescapeJsonPointer=c,t.eachItem=function(e,t){if(Array.isArray(e))for(const r of e)t(r);else t(e)},t.mergeEvaluated={props:l({mergeNames:(e,t,r)=>e.if(s._`${r} !== true && ${t} !== undefined`,(()=>{e.if(s._`${t} === true`,(()=>e.assign(r,!0)),(()=>e.assign(r,s._`${r} || {}`).code(s._`Object.assign(${r}, ${t})`)))})),mergeToName:(e,t,r)=>e.if(s._`${r} !== true`,(()=>{!0===t?e.assign(r,!0):(e.assign(r,s._`${r} || {}`),u(e,r,t))})),mergeValues:(e,t)=>!0===e||{...e,...t},resultToName:d}),items:l({mergeNames:(e,t,r)=>e.if(s._`${r} !== true && ${t} !== undefined`,(()=>e.assign(r,s._`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`))),mergeToName:(e,t,r)=>e.if(s._`${r} !== true`,(()=>e.assign(r,!0===t||s._`${r} > ${t} ? ${r} : ${t}`))),mergeValues:(e,t)=>!0===e||Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})},t.evaluatedPropsToName=d,t.setEvaluated=u;const f={};var h;function m(e,t,r=e.opts.strictSchema){if(r){if(t=`strict mode: ${t}`,!0===r)throw new Error(t);e.self.logger.warn(t)}}t.useFunc=function(e,t){return e.scopeValue("func",{ref:t,code:f[t.code]||(f[t.code]=new a._Code(t.code))})},function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"}(h||(t.Type=h={})),t.getErrorPath=function(e,t,r){if(e instanceof s.Name){const a=t===h.Num;return r?a?s._`"[" + ${e} + "]"`:s._`"['" + ${e} + "']"`:a?s._`"/" + ${e}`:s._`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,s.getProperty)(e).toString():"/"+i(e)},t.checkStrictMode=m},7887:function(e,t){function r(e,t){return t.rules.some((t=>s(e,t)))}function s(e,t){var r;return void 0!==e[t.keyword]||(null===(r=t.definition.implements)||void 0===r?void 0:r.some((t=>void 0!==e[t])))}Object.defineProperty(t,"__esModule",{value:!0}),t.shouldUseRule=t.shouldUseGroup=t.schemaHasRulesForType=void 0,t.schemaHasRulesForType=function({schema:e,self:t},s){const a=t.RULES.types[s];return a&&!0!==a&&r(e,a)},t.shouldUseGroup=r,t.shouldUseRule=s},8727:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.boolOrEmptySchema=t.topBoolOrEmptySchema=void 0;const s=r(8708),a=r(9029),o=r(2023),n={message:"boolean schema is false"};function i(e,t){const{gen:r,data:a}=e,o={gen:r,keyword:"false schema",data:a,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,s.reportError)(o,n,void 0,t)}t.topBoolOrEmptySchema=function(e){const{gen:t,schema:r,validateName:s}=e;!1===r?i(e,!1):"object"==typeof r&&!0===r.$async?t.return(o.default.data):(t.assign(a._`${s}.errors`,null),t.return(!0))},t.boolOrEmptySchema=function(e,t){const{gen:r,schema:s}=e;!1===s?(r.var(t,!1),i(e)):r.var(t,!0)}},208:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.reportTypeError=t.checkDataTypes=t.checkDataType=t.coerceAndCheckDataType=t.getJSONTypes=t.getSchemaTypes=t.DataType=void 0;const s=r(396),a=r(7887),o=r(8708),n=r(9029),i=r(4227);var c;function l(e){const t=Array.isArray(e)?e:e?[e]:[];if(t.every(s.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}!function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"}(c||(t.DataType=c={})),t.getSchemaTypes=function(e){const t=l(e.type);if(t.includes("null")){if(!1===e.nullable)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&void 0!==e.nullable)throw new Error('"nullable" cannot be used without "type"');!0===e.nullable&&t.push("null")}return t},t.getJSONTypes=l,t.coerceAndCheckDataType=function(e,t){const{gen:r,data:s,opts:o}=e,i=function(e,t){return t?e.filter((e=>d.has(e)||"array"===t&&"array"===e)):[]}(t,o.coerceTypes),l=t.length>0&&!(0===i.length&&1===t.length&&(0,a.schemaHasRulesForType)(e,t[0]));if(l){const a=f(t,s,o.strictNumbers,c.Wrong);r.if(a,(()=>{i.length?function(e,t,r){const{gen:s,data:a,opts:o}=e,i=s.let("dataType",n._`typeof ${a}`),c=s.let("coerced",n._`undefined`);"array"===o.coerceTypes&&s.if(n._`${i} == 'object' && Array.isArray(${a}) && ${a}.length == 1`,(()=>s.assign(a,n._`${a}[0]`).assign(i,n._`typeof ${a}`).if(f(t,a,o.strictNumbers),(()=>s.assign(c,a))))),s.if(n._`${c} !== undefined`);for(const e of r)(d.has(e)||"array"===e&&"array"===o.coerceTypes)&&l(e);function l(e){switch(e){case"string":return void s.elseIf(n._`${i} == "number" || ${i} == "boolean"`).assign(c,n._`"" + ${a}`).elseIf(n._`${a} === null`).assign(c,n._`""`);case"number":return void s.elseIf(n._`${i} == "boolean" || ${a} === null
|
|
2
2
|
|| (${i} == "string" && ${a} && ${a} == +${a})`).assign(c,n._`+${a}`);case"integer":return void s.elseIf(n._`${i} === "boolean" || ${a} === null
|
|
3
3
|
|| (${i} === "string" && ${a} && ${a} == +${a} && !(${a} % 1))`).assign(c,n._`+${a}`);case"boolean":return void s.elseIf(n._`${a} === "false" || ${a} === 0 || ${a} === null`).assign(c,!1).elseIf(n._`${a} === "true" || ${a} === 1`).assign(c,!0);case"null":return s.elseIf(n._`${a} === "" || ${a} === 0 || ${a} === false`),void s.assign(c,null);case"array":s.elseIf(n._`${i} === "string" || ${i} === "number"
|
|
4
4
|
|| ${i} === "boolean" || ${a} === null`).assign(c,n._`[${a}]`)}}s.else(),m(e),s.endIf(),s.if(n._`${c} !== undefined`,(()=>{s.assign(a,c),function({gen:e,parentData:t,parentDataProperty:r},s){e.if(n._`${t} !== undefined`,(()=>e.assign(n._`${t}[${r}]`,s)))}(e,c)}))}(e,t,i):m(e)}))}return l};const d=new Set(["string","number","integer","boolean","null"]);function u(e,t,r,s=c.Correct){const a=s===c.Correct?n.operators.EQ:n.operators.NEQ;let o;switch(e){case"null":return n._`${t} ${a} null`;case"array":o=n._`Array.isArray(${t})`;break;case"object":o=n._`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":o=i(n._`!(${t} % 1) && !isNaN(${t})`);break;case"number":o=i();break;default:return n._`typeof ${t} ${a} ${e}`}return s===c.Correct?o:(0,n.not)(o);function i(e=n.nil){return(0,n.and)(n._`typeof ${t} == "number"`,e,r?n._`isFinite(${t})`:n.nil)}}function f(e,t,r,s){if(1===e.length)return u(e[0],t,r,s);let a;const o=(0,i.toHash)(e);if(o.array&&o.object){const e=n._`typeof ${t} != "object"`;a=o.null?e:n._`!${t} || ${e}`,delete o.null,delete o.array,delete o.object}else a=n.nil;o.number&&delete o.integer;for(const e in o)a=(0,n.and)(a,u(e,t,r,s));return a}t.checkDataType=u,t.checkDataTypes=f;const h={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>"string"==typeof e?n._`{type: ${e}}`:n._`{type: ${t}}`};function m(e){const t=function(e){const{gen:t,data:r,schema:s}=e,a=(0,i.schemaRefOrVal)(e,s,"type");return{gen:t,keyword:"type",data:r,schema:s.type,schemaCode:a,schemaValue:a,parentSchema:s,params:{},it:e}}(e);(0,o.reportError)(t,h)}t.reportTypeError=m},7870:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.assignDefaults=void 0;const s=r(9029),a=r(4227);function o(e,t,r){const{gen:o,compositeRule:n,data:i,opts:c}=e;if(void 0===r)return;const l=s._`${i}${(0,s.getProperty)(t)}`;if(n)return void(0,a.checkStrictMode)(e,`default is ignored for: ${l}`);let d=s._`${l} === undefined`;"empty"===c.useDefaults&&(d=s._`${d} || ${l} === null || ${l} === ""`),o.if(d,s._`${l} = ${(0,s.stringify)(r)}`)}t.assignDefaults=function(e,t){const{properties:r,items:s}=e.schema;if("object"===t&&r)for(const t in r)o(e,t,r[t].default);else"array"===t&&Array.isArray(s)&&s.forEach(((t,r)=>o(e,r,t.default)))}},2586:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.getData=t.KeywordCxt=t.validateFunctionCode=void 0;const s=r(8727),a=r(208),o=r(7887),n=r(208),i=r(7870),c=r(3673),l=r(4495),d=r(9029),u=r(2023),f=r(6939),h=r(4227),m=r(8708);function p({gen:e,validateName:t,schema:r,schemaEnv:s,opts:a},o){a.code.es5?e.func(t,d._`${u.default.data}, ${u.default.valCxt}`,s.$async,(()=>{e.code(d._`"use strict"; ${y(r,a)}`),function(e,t){e.if(u.default.valCxt,(()=>{e.var(u.default.instancePath,d._`${u.default.valCxt}.${u.default.instancePath}`),e.var(u.default.parentData,d._`${u.default.valCxt}.${u.default.parentData}`),e.var(u.default.parentDataProperty,d._`${u.default.valCxt}.${u.default.parentDataProperty}`),e.var(u.default.rootData,d._`${u.default.valCxt}.${u.default.rootData}`),t.dynamicRef&&e.var(u.default.dynamicAnchors,d._`${u.default.valCxt}.${u.default.dynamicAnchors}`)}),(()=>{e.var(u.default.instancePath,d._`""`),e.var(u.default.parentData,d._`undefined`),e.var(u.default.parentDataProperty,d._`undefined`),e.var(u.default.rootData,u.default.data),t.dynamicRef&&e.var(u.default.dynamicAnchors,d._`{}`)}))}(e,a),e.code(o)})):e.func(t,d._`${u.default.data}, ${function(e){return d._`{${u.default.instancePath}="", ${u.default.parentData}, ${u.default.parentDataProperty}, ${u.default.rootData}=${u.default.data}${e.dynamicRef?d._`, ${u.default.dynamicAnchors}={}`:d.nil}}={}`}(a)}`,s.$async,(()=>e.code(y(r,a)).code(o)))}function y(e,t){const r="object"==typeof e&&e[t.schemaId];return r&&(t.code.source||t.code.process)?d._`/*# sourceURL=${r} */`:d.nil}function g({schema:e,self:t}){if("boolean"==typeof e)return!e;for(const r in e)if(t.RULES.all[r])return!0;return!1}function v(e){return"boolean"!=typeof e.schema}function _(e){(0,h.checkUnknownRules)(e),function(e){const{schema:t,errSchemaPath:r,opts:s,self:a}=e;t.$ref&&s.ignoreKeywordsWithRef&&(0,h.schemaHasRulesButRef)(t,a.RULES)&&a.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}(e)}function $(e,t){if(e.opts.jtd)return b(e,[],!1,t);const r=(0,a.getSchemaTypes)(e.schema);b(e,r,!(0,a.coerceAndCheckDataType)(e,r),t)}function w({gen:e,schemaEnv:t,schema:r,errSchemaPath:s,opts:a}){const o=r.$comment;if(!0===a.$comment)e.code(d._`${u.default.self}.logger.log(${o})`);else if("function"==typeof a.$comment){const r=d.str`${s}/$comment`,a=e.scopeValue("root",{ref:t.root});e.code(d._`${u.default.self}.opts.$comment(${o}, ${r}, ${a}.schema)`)}}function b(e,t,r,s){const{gen:a,schema:i,data:c,allErrors:l,opts:f,self:m}=e,{RULES:p}=m;function y(h){(0,o.shouldUseGroup)(i,h)&&(h.type?(a.if((0,n.checkDataType)(h.type,c,f.strictNumbers)),S(e,h),1===t.length&&t[0]===h.type&&r&&(a.else(),(0,n.reportTypeError)(e)),a.endIf()):S(e,h),l||a.if(d._`${u.default.errors} === ${s||0}`))}!i.$ref||!f.ignoreKeywordsWithRef&&(0,h.schemaHasRulesButRef)(i,p)?(f.jtd||function(e,t){!e.schemaEnv.meta&&e.opts.strictTypes&&(function(e,t){t.length&&(e.dataTypes.length?(t.forEach((t=>{P(e.dataTypes,t)||E(e,`type "${t}" not allowed by context "${e.dataTypes.join(",")}"`)})),function(e,t){const r=[];for(const s of e.dataTypes)P(t,s)?r.push(s):t.includes("integer")&&"number"===s&&r.push("integer");e.dataTypes=r}(e,t)):e.dataTypes=t)}(e,t),e.opts.allowUnionTypes||function(e,t){t.length>1&&(2!==t.length||!t.includes("null"))&&E(e,"use allowUnionTypes to allow union type keyword")}(e,t),function(e,t){const r=e.self.RULES.all;for(const s in r){const a=r[s];if("object"==typeof a&&(0,o.shouldUseRule)(e.schema,a)){const{type:r}=a.definition;r.length&&!r.some((e=>{return s=e,(r=t).includes(s)||"number"===s&&r.includes("integer");var r,s}))&&E(e,`missing type "${r.join(",")}" for keyword "${s}"`)}}}(e,e.dataTypes))}(e,t),a.block((()=>{for(const e of p.rules)y(e);y(p.post)}))):a.block((()=>I(e,"$ref",p.all.$ref.definition)))}function S(e,t){const{gen:r,schema:s,opts:{useDefaults:a}}=e;a&&(0,i.assignDefaults)(e,t.type),r.block((()=>{for(const r of t.rules)(0,o.shouldUseRule)(s,r)&&I(e,r.keyword,r.definition,t.type)}))}function P(e,t){return e.includes(t)||"integer"===t&&e.includes("number")}function E(e,t){t+=` at "${e.schemaEnv.baseId+e.errSchemaPath}" (strictTypes)`,(0,h.checkStrictMode)(e,t,e.opts.strictTypes)}t.validateFunctionCode=function(e){v(e)&&(_(e),g(e))?function(e){const{schema:t,opts:r,gen:s}=e;p(e,(()=>{r.$comment&&t.$comment&&w(e),function(e){const{schema:t,opts:r}=e;void 0!==t.default&&r.useDefaults&&r.strictSchema&&(0,h.checkStrictMode)(e,"default is ignored in the schema root")}(e),s.let(u.default.vErrors,null),s.let(u.default.errors,0),r.unevaluated&&function(e){const{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",d._`${r}.evaluated`),t.if(d._`${e.evaluated}.dynamicProps`,(()=>t.assign(d._`${e.evaluated}.props`,d._`undefined`))),t.if(d._`${e.evaluated}.dynamicItems`,(()=>t.assign(d._`${e.evaluated}.items`,d._`undefined`)))}(e),$(e),function(e){const{gen:t,schemaEnv:r,validateName:s,ValidationError:a,opts:o}=e;r.$async?t.if(d._`${u.default.errors} === 0`,(()=>t.return(u.default.data)),(()=>t.throw(d._`new ${a}(${u.default.vErrors})`))):(t.assign(d._`${s}.errors`,u.default.vErrors),o.unevaluated&&function({gen:e,evaluated:t,props:r,items:s}){r instanceof d.Name&&e.assign(d._`${t}.props`,r),s instanceof d.Name&&e.assign(d._`${t}.items`,s)}(e),t.return(d._`${u.default.errors} === 0`))}(e)}))}(e):p(e,(()=>(0,s.topBoolOrEmptySchema)(e)))};class k{constructor(e,t,r){if((0,c.validateKeywordUsage)(e,t,r),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=r,this.data=e.data,this.schema=e.schema[r],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,h.schemaRefOrVal)(e,this.schema,r,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const("vSchema",x(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,c.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw new Error(`${r} value must be ${JSON.stringify(t.schemaType)}`);("code"in t?t.trackErrors:!1!==t.errors)&&(this.errsCount=e.gen.const("_errs",u.default.errors))}result(e,t,r){this.failResult((0,d.not)(e),t,r)}failResult(e,t,r){this.gen.if(e),r?r():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,t){this.failResult((0,d.not)(e),void 0,t)}fail(e){if(void 0===e)return this.error(),void(this.allErrors||this.gen.if(!1));this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);const{schemaCode:t}=this;this.fail(d._`${t} !== undefined && (${(0,d.or)(this.invalid$data(),e)})`)}error(e,t,r){if(t)return this.setParams(t),this._error(e,r),void this.setParams({});this._error(e,r)}_error(e,t){(e?m.reportExtraError:m.reportError)(this,this.def.error,t)}$dataError(){(0,m.reportError)(this,this.def.$dataError||m.keyword$DataError)}reset(){if(void 0===this.errsCount)throw new Error('add "trackErrors" to keyword definition');(0,m.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,t){t?Object.assign(this.params,e):this.params=e}block$data(e,t,r=d.nil){this.gen.block((()=>{this.check$data(e,r),t()}))}check$data(e=d.nil,t=d.nil){if(!this.$data)return;const{gen:r,schemaCode:s,schemaType:a,def:o}=this;r.if((0,d.or)(d._`${s} === undefined`,t)),e!==d.nil&&r.assign(e,!0),(a.length||o.validateSchema)&&(r.elseIf(this.invalid$data()),this.$dataError(),e!==d.nil&&r.assign(e,!1)),r.else()}invalid$data(){const{gen:e,schemaCode:t,schemaType:r,def:s,it:a}=this;return(0,d.or)(function(){if(r.length){if(!(t instanceof d.Name))throw new Error("ajv implementation error");const e=Array.isArray(r)?r:[r];return d._`${(0,n.checkDataTypes)(e,t,a.opts.strictNumbers,n.DataType.Wrong)}`}return d.nil}(),function(){if(s.validateSchema){const r=e.scopeValue("validate$data",{ref:s.validateSchema});return d._`!${r}(${t})`}return d.nil}())}subschema(e,t){const r=(0,l.getSubschema)(this.it,e);(0,l.extendSubschemaData)(r,this.it,e),(0,l.extendSubschemaMode)(r,e);const a={...this.it,...r,items:void 0,props:void 0};return function(e,t){v(e)&&(_(e),g(e))?function(e,t){const{schema:r,gen:s,opts:a}=e;a.$comment&&r.$comment&&w(e),function(e){const t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,f.resolveUrl)(e.opts.uriResolver,e.baseId,t))}(e),function(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}(e);const o=s.const("_errs",u.default.errors);$(e,o),s.var(t,d._`${o} === ${u.default.errors}`)}(e,t):(0,s.boolOrEmptySchema)(e,t)}(a,t),a}mergeEvaluated(e,t){const{it:r,gen:s}=this;r.opts.unevaluated&&(!0!==r.props&&void 0!==e.props&&(r.props=h.mergeEvaluated.props(s,e.props,r.props,t)),!0!==r.items&&void 0!==e.items&&(r.items=h.mergeEvaluated.items(s,e.items,r.items,t)))}mergeValidEvaluated(e,t){const{it:r,gen:s}=this;if(r.opts.unevaluated&&(!0!==r.props||!0!==r.items))return s.if(t,(()=>this.mergeEvaluated(e,d.Name))),!0}}function I(e,t,r,s){const a=new k(e,r,t);"code"in r?r.code(a,s):a.$data&&r.validate?(0,c.funcKeywordCode)(a,r):"macro"in r?(0,c.macroKeywordCode)(a,r):(r.compile||r.validate)&&(0,c.funcKeywordCode)(a,r)}t.KeywordCxt=k;const N=/^\/(?:[^~]|~0|~1)*$/,j=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function x(e,{dataLevel:t,dataNames:r,dataPathArr:s}){let a,o;if(""===e)return u.default.rootData;if("/"===e[0]){if(!N.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);a=e,o=u.default.rootData}else{const n=j.exec(e);if(!n)throw new Error(`Invalid JSON-pointer: ${e}`);const i=+n[1];if(a=n[2],"#"===a){if(i>=t)throw new Error(c("property/index",i));return s[t-i]}if(i>t)throw new Error(c("data",i));if(o=r[t-i],!a)return o}let n=o;const i=a.split("/");for(const e of i)e&&(o=d._`${o}${(0,d.getProperty)((0,h.unescapeJsonPointer)(e))}`,n=d._`${n} && ${o}`);return n;function c(e,r){return`Cannot access ${e} ${r} levels up, current level is ${t}`}}t.getData=x},3673:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.validateKeywordUsage=t.validSchemaType=t.funcKeywordCode=t.macroKeywordCode=void 0;const s=r(9029),a=r(2023),o=r(5765),n=r(8708);function i(e){const{gen:t,data:r,it:a}=e;t.if(a.parentData,(()=>t.assign(r,s._`${a.parentData}[${a.parentDataProperty}]`)))}function c(e,t,r){if(void 0===r)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword","function"==typeof r?{ref:r}:{ref:r,code:(0,s.stringify)(r)})}t.macroKeywordCode=function(e,t){const{gen:r,keyword:a,schema:o,parentSchema:n,it:i}=e,l=t.macro.call(i.self,o,n,i),d=c(r,a,l);!1!==i.opts.validateSchema&&i.self.validateSchema(l,!0);const u=r.name("valid");e.subschema({schema:l,schemaPath:s.nil,errSchemaPath:`${i.errSchemaPath}/${a}`,topSchemaRef:d,compositeRule:!0},u),e.pass(u,(()=>e.error(!0)))},t.funcKeywordCode=function(e,t){var r;const{gen:l,keyword:d,schema:u,parentSchema:f,$data:h,it:m}=e;!function({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}(m,t);const p=!h&&t.compile?t.compile.call(m.self,u,f,m):t.validate,y=c(l,d,p),g=l.let("valid");function v(r=(t.async?s._`await `:s.nil)){const n=m.opts.passContext?a.default.this:a.default.self,i=!("compile"in t&&!h||!1===t.schema);l.assign(g,s._`${r}${(0,o.callValidateCode)(e,y,n,i)}`,t.modifying)}function _(e){var r;l.if((0,s.not)(null!==(r=t.valid)&&void 0!==r?r:g),e)}e.block$data(g,(function(){if(!1===t.errors)v(),t.modifying&&i(e),_((()=>e.error()));else{const r=t.async?function(){const e=l.let("ruleErrs",null);return l.try((()=>v(s._`await `)),(t=>l.assign(g,!1).if(s._`${t} instanceof ${m.ValidationError}`,(()=>l.assign(e,s._`${t}.errors`)),(()=>l.throw(t))))),e}():function(){const e=s._`${y}.errors`;return l.assign(e,null),v(s.nil),e}();t.modifying&&i(e),_((()=>function(e,t){const{gen:r}=e;r.if(s._`Array.isArray(${t})`,(()=>{r.assign(a.default.vErrors,s._`${a.default.vErrors} === null ? ${t} : ${a.default.vErrors}.concat(${t})`).assign(a.default.errors,s._`${a.default.vErrors}.length`),(0,n.extendErrors)(e)}),(()=>e.error()))}(e,r)))}})),e.ok(null!==(r=t.valid)&&void 0!==r?r:g)},t.validSchemaType=function(e,t,r=!1){return!t.length||t.some((t=>"array"===t?Array.isArray(e):"object"===t?e&&"object"==typeof e&&!Array.isArray(e):typeof e==t||r&&void 0===e))},t.validateKeywordUsage=function({schema:e,opts:t,self:r,errSchemaPath:s},a,o){if(Array.isArray(a.keyword)?!a.keyword.includes(o):a.keyword!==o)throw new Error("ajv implementation error");const n=a.dependencies;if(null==n?void 0:n.some((t=>!Object.prototype.hasOwnProperty.call(e,t))))throw new Error(`parent schema must have dependencies of ${o}: ${n.join(",")}`);if(a.validateSchema&&!a.validateSchema(e[o])){const e=`keyword "${o}" value is invalid at path "${s}": `+r.errorsText(a.validateSchema.errors);if("log"!==t.validateSchema)throw new Error(e);r.logger.error(e)}}},4495:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.extendSubschemaMode=t.extendSubschemaData=t.getSubschema=void 0;const s=r(9029),a=r(4227);t.getSubschema=function(e,{keyword:t,schemaProp:r,schema:o,schemaPath:n,errSchemaPath:i,topSchemaRef:c}){if(void 0!==t&&void 0!==o)throw new Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==t){const o=e.schema[t];return void 0===r?{schema:o,schemaPath:s._`${e.schemaPath}${(0,s.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:o[r],schemaPath:s._`${e.schemaPath}${(0,s.getProperty)(t)}${(0,s.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,a.escapeFragment)(r)}`}}if(void 0!==o){if(void 0===n||void 0===i||void 0===c)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:o,schemaPath:n,topSchemaRef:c,errSchemaPath:i}}throw new Error('either "keyword" or "schema" must be passed')},t.extendSubschemaData=function(e,t,{dataProp:r,dataPropType:o,data:n,dataTypes:i,propertyName:c}){if(void 0!==n&&void 0!==r)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:l}=t;if(void 0!==r){const{errorPath:n,dataPathArr:i,opts:c}=t;d(l.let("data",s._`${t.data}${(0,s.getProperty)(r)}`,!0)),e.errorPath=s.str`${n}${(0,a.getErrorPath)(r,o,c.jsPropertySyntax)}`,e.parentDataProperty=s._`${r}`,e.dataPathArr=[...i,e.parentDataProperty]}function d(r){e.data=r,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,r]}void 0!==n&&(d(n instanceof s.Name?n:l.let("data",n,!0)),void 0!==c&&(e.propertyName=c)),i&&(e.dataTypes=i)},t.extendSubschemaMode=function(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:s,createErrors:a,allErrors:o}){void 0!==s&&(e.compositeRule=s),void 0!==a&&(e.createErrors=a),void 0!==o&&(e.allErrors=o),e.jtdDiscriminator=t,e.jtdMetadata=r}},4042:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var s=r(2586);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return s.KeywordCxt}});var a=r(9029);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return a._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return a.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return a.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return a.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return a.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return a.CodeGen}});const o=r(3558),n=r(4551),i=r(396),c=r(3835),l=r(9029),d=r(6939),u=r(208),f=r(4227),h=r(3837),m=r(5944),p=(e,t)=>new RegExp(e,t);p.code="new RegExp";const y=["removeAdditional","useDefaults","coerceTypes"],g=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),v={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},_={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'};function $(e){var t,r,s,a,o,n,i,c,l,d,u,f,h,y,g,v,_,$,w,b,S,P,E,k,I;const N=e.strict,j=null===(t=e.code)||void 0===t?void 0:t.optimize,x=!0===j||void 0===j?1:j||0,C=null!==(s=null===(r=e.code)||void 0===r?void 0:r.regExp)&&void 0!==s?s:p,O=null!==(a=e.uriResolver)&&void 0!==a?a:m.default;return{strictSchema:null===(n=null!==(o=e.strictSchema)&&void 0!==o?o:N)||void 0===n||n,strictNumbers:null===(c=null!==(i=e.strictNumbers)&&void 0!==i?i:N)||void 0===c||c,strictTypes:null!==(d=null!==(l=e.strictTypes)&&void 0!==l?l:N)&&void 0!==d?d:"log",strictTuples:null!==(f=null!==(u=e.strictTuples)&&void 0!==u?u:N)&&void 0!==f?f:"log",strictRequired:null!==(y=null!==(h=e.strictRequired)&&void 0!==h?h:N)&&void 0!==y&&y,code:e.code?{...e.code,optimize:x,regExp:C}:{optimize:x,regExp:C},loopRequired:null!==(g=e.loopRequired)&&void 0!==g?g:200,loopEnum:null!==(v=e.loopEnum)&&void 0!==v?v:200,meta:null===(_=e.meta)||void 0===_||_,messages:null===($=e.messages)||void 0===$||$,inlineRefs:null===(w=e.inlineRefs)||void 0===w||w,schemaId:null!==(b=e.schemaId)&&void 0!==b?b:"$id",addUsedSchema:null===(S=e.addUsedSchema)||void 0===S||S,validateSchema:null===(P=e.validateSchema)||void 0===P||P,validateFormats:null===(E=e.validateFormats)||void 0===E||E,unicodeRegExp:null===(k=e.unicodeRegExp)||void 0===k||k,int32range:null===(I=e.int32range)||void 0===I||I,uriResolver:O}}class w{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...$(e)};const{es5:t,lines:r}=this.opts.code;this.scope=new l.ValueScope({scope:{},prefixes:g,es5:t,lines:r}),this.logger=function(e){if(!1===e)return N;if(void 0===e)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}(e.logger);const s=e.validateFormats;e.validateFormats=!1,this.RULES=(0,i.getRules)(),b.call(this,v,e,"NOT SUPPORTED"),b.call(this,_,e,"DEPRECATED","warn"),this._metaOpts=I.call(this),e.formats&&E.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&k.call(this,e.keywords),"object"==typeof e.meta&&this.addMetaSchema(e.meta),P.call(this),e.validateFormats=s}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:e,meta:t,schemaId:r}=this.opts;let s=h;"id"===r&&(s={...h},s.id=s.$id,delete s.$id),t&&e&&this.addMetaSchema(s,s[r],!1)}defaultMeta(){const{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta="object"==typeof e?e[t]||e:void 0}validate(e,t){let r;if("string"==typeof e){if(r=this.getSchema(e),!r)throw new Error(`no schema with key or ref "${e}"`)}else r=this.compile(e);const s=r(t);return"$async"in r||(this.errors=r.errors),s}compile(e,t){const r=this._addSchema(e,t);return r.validate||this._compileSchemaEnv(r)}compileAsync(e,t){if("function"!=typeof this.opts.loadSchema)throw new Error("options.loadSchema should be a function");const{loadSchema:r}=this.opts;return s.call(this,e,t);async function s(e,t){await a.call(this,e.$schema);const r=this._addSchema(e,t);return r.validate||o.call(this,r)}async function a(e){e&&!this.getSchema(e)&&await s.call(this,{$ref:e},!0)}async function o(e){try{return this._compileSchemaEnv(e)}catch(t){if(!(t instanceof n.default))throw t;return i.call(this,t),await c.call(this,t.missingSchema),o.call(this,e)}}function i({missingSchema:e,missingRef:t}){if(this.refs[e])throw new Error(`AnySchema ${e} is loaded but ${t} cannot be resolved`)}async function c(e){const r=await l.call(this,e);this.refs[e]||await a.call(this,r.$schema),this.refs[e]||this.addSchema(r,e,t)}async function l(e){const t=this._loading[e];if(t)return t;try{return await(this._loading[e]=r(e))}finally{delete this._loading[e]}}}addSchema(e,t,r,s=this.opts.validateSchema){if(Array.isArray(e)){for(const t of e)this.addSchema(t,void 0,r,s);return this}let a;if("object"==typeof e){const{schemaId:t}=this.opts;if(a=e[t],void 0!==a&&"string"!=typeof a)throw new Error(`schema ${t} must be string`)}return t=(0,d.normalizeId)(t||a),this._checkUnique(t),this.schemas[t]=this._addSchema(e,r,t,s,!0),this}addMetaSchema(e,t,r=this.opts.validateSchema){return this.addSchema(e,t,!0,r),this}validateSchema(e,t){if("boolean"==typeof e)return!0;let r;if(r=e.$schema,void 0!==r&&"string"!=typeof r)throw new Error("$schema must be a string");if(r=r||this.opts.defaultMeta||this.defaultMeta(),!r)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const s=this.validate(r,e);if(!s&&t){const e="schema is invalid: "+this.errorsText();if("log"!==this.opts.validateSchema)throw new Error(e);this.logger.error(e)}return s}getSchema(e){let t;for(;"string"==typeof(t=S.call(this,e));)e=t;if(void 0===t){const{schemaId:r}=this.opts,s=new c.SchemaEnv({schema:{},schemaId:r});if(t=c.resolveSchema.call(this,s,e),!t)return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const t=S.call(this,e);return"object"==typeof t&&this._cache.delete(t.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{const t=e;this._cache.delete(t);let r=e[this.opts.schemaId];return r&&(r=(0,d.normalizeId)(r),delete this.schemas[r],delete this.refs[r]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(const t of e)this.addKeyword(t);return this}addKeyword(e,t){let r;if("string"==typeof e)r=e,"object"==typeof t&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),t.keyword=r);else{if("object"!=typeof e||void 0!==t)throw new Error("invalid addKeywords parameters");if(r=(t=e).keyword,Array.isArray(r)&&!r.length)throw new Error("addKeywords: keyword must be string or non-empty array")}if(x.call(this,r,t),!t)return(0,f.eachItem)(r,(e=>C.call(this,e))),this;T.call(this,t);const s={...t,type:(0,u.getJSONTypes)(t.type),schemaType:(0,u.getJSONTypes)(t.schemaType)};return(0,f.eachItem)(r,0===s.type.length?e=>C.call(this,e,s):e=>s.type.forEach((t=>C.call(this,e,s,t)))),this}getKeyword(e){const t=this.RULES.all[e];return"object"==typeof t?t.definition:!!t}removeKeyword(e){const{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(const r of t.rules){const t=r.rules.findIndex((t=>t.keyword===e));t>=0&&r.rules.splice(t,1)}return this}addFormat(e,t){return"string"==typeof t&&(t=new RegExp(t)),this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=", ",dataVar:r="data"}={}){return e&&0!==e.length?e.map((e=>`${r}${e.instancePath} ${e.message}`)).reduce(((e,r)=>e+t+r)):"No errors"}$dataMetaSchema(e,t){const r=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(const s of t){const t=s.split("/").slice(1);let a=e;for(const e of t)a=a[e];for(const e in r){const t=r[e];if("object"!=typeof t)continue;const{$data:s}=t.definition,o=a[e];s&&o&&(a[e]=R(o))}}return e}_removeAllSchemas(e,t){for(const r in e){const s=e[r];t&&!t.test(r)||("string"==typeof s?delete e[r]:s&&!s.meta&&(this._cache.delete(s.schema),delete e[r]))}}_addSchema(e,t,r,s=this.opts.validateSchema,a=this.opts.addUsedSchema){let o;const{schemaId:n}=this.opts;if("object"==typeof e)o=e[n];else{if(this.opts.jtd)throw new Error("schema must be object");if("boolean"!=typeof e)throw new Error("schema must be object or boolean")}let i=this._cache.get(e);if(void 0!==i)return i;r=(0,d.normalizeId)(o||r);const l=d.getSchemaRefs.call(this,e,r);return i=new c.SchemaEnv({schema:e,schemaId:n,meta:t,baseId:r,localRefs:l}),this._cache.set(i.schema,i),a&&!r.startsWith("#")&&(r&&this._checkUnique(r),this.refs[r]=i),s&&this.validateSchema(e,!0),i}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw new Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):c.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){const t=this.opts;this.opts=this._metaOpts;try{c.compileSchema.call(this,e)}finally{this.opts=t}}}function b(e,t,r,s="error"){for(const a in e){const o=a;o in t&&this.logger[s](`${r}: option ${a}. ${e[o]}`)}}function S(e){return e=(0,d.normalizeId)(e),this.schemas[e]||this.refs[e]}function P(){const e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(const t in e)this.addSchema(e[t],t)}function E(){for(const e in this.opts.formats){const t=this.opts.formats[e];t&&this.addFormat(e,t)}}function k(e){if(Array.isArray(e))this.addVocabulary(e);else{this.logger.warn("keywords option as map is deprecated, pass array");for(const t in e){const r=e[t];r.keyword||(r.keyword=t),this.addKeyword(r)}}}function I(){const e={...this.opts};for(const t of y)delete e[t];return e}w.ValidationError=o.default,w.MissingRefError=n.default,t.default=w;const N={log(){},warn(){},error(){}},j=/^[a-z_$][a-z0-9_$:-]*$/i;function x(e,t){const{RULES:r}=this;if((0,f.eachItem)(e,(e=>{if(r.keywords[e])throw new Error(`Keyword ${e} is already defined`);if(!j.test(e))throw new Error(`Keyword ${e} has invalid name`)})),t&&t.$data&&!("code"in t)&&!("validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}function C(e,t,r){var s;const a=null==t?void 0:t.post;if(r&&a)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:o}=this;let n=a?o.post:o.rules.find((({type:e})=>e===r));if(n||(n={type:r,rules:[]},o.rules.push(n)),o.keywords[e]=!0,!t)return;const i={keyword:e,definition:{...t,type:(0,u.getJSONTypes)(t.type),schemaType:(0,u.getJSONTypes)(t.schemaType)}};t.before?O.call(this,n,i,t.before):n.rules.push(i),o.all[e]=i,null===(s=t.implements)||void 0===s||s.forEach((e=>this.addKeyword(e)))}function O(e,t,r){const s=e.rules.findIndex((e=>e.keyword===r));s>=0?e.rules.splice(s,0,t):(e.rules.push(t),this.logger.warn(`rule ${r} is not defined`))}function T(e){let{metaSchema:t}=e;void 0!==t&&(e.$data&&this.opts.$data&&(t=R(t)),e.validateSchema=this.compile(t,!0))}const D={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function R(e){return{anyOf:[e,D]}}},6250:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});const s=r(2017);s.code='require("ajv/dist/runtime/equal").default',t.default=s},3853:function(e,t){function r(e){const t=e.length;let r,s=0,a=0;for(;a<t;)s++,r=e.charCodeAt(a++),r>=55296&&r<=56319&&a<t&&(r=e.charCodeAt(a),56320==(64512&r)&&a++);return s}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r,r.code='require("ajv/dist/runtime/ucs2length").default'},5944:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});const s=r(8343);s.code='require("ajv/dist/runtime/uri").default',t.default=s},3558:function(e,t){Object.defineProperty(t,"__esModule",{value:!0});class r extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}}t.default=r},5457:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.validateAdditionalItems=void 0;const s=r(9029),a=r(4227),o={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:e}})=>s.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>s._`{limit: ${e}}`},code(e){const{parentSchema:t,it:r}=e,{items:s}=t;Array.isArray(s)?n(e,s):(0,a.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas')}};function n(e,t){const{gen:r,schema:o,data:n,keyword:i,it:c}=e;c.items=!0;const l=r.const("len",s._`${n}.length`);if(!1===o)e.setParams({len:t.length}),e.pass(s._`${l} <= ${t.length}`);else if("object"==typeof o&&!(0,a.alwaysValidSchema)(c,o)){const o=r.var("valid",s._`${l} <= ${t.length}`);r.if((0,s.not)(o),(()=>function(o){r.forRange("i",t.length,l,(t=>{e.subschema({keyword:i,dataProp:t,dataPropType:a.Type.Num},o),c.allErrors||r.if((0,s.not)(o),(()=>r.break()))}))}(o))),e.ok(o)}}t.validateAdditionalItems=n,t.default=o},8660:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});const s=r(5765),a=r(9029),o=r(2023),n=r(4227),i={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:e})=>a._`{additionalProperty: ${e.additionalProperty}}`},code(e){const{gen:t,schema:r,parentSchema:i,data:c,errsCount:l,it:d}=e;if(!l)throw new Error("ajv implementation error");const{allErrors:u,opts:f}=d;if(d.props=!0,"all"!==f.removeAdditional&&(0,n.alwaysValidSchema)(d,r))return;const h=(0,s.allSchemaProperties)(i.properties),m=(0,s.allSchemaProperties)(i.patternProperties);function p(e){t.code(a._`delete ${c}[${e}]`)}function y(s){if("all"===f.removeAdditional||f.removeAdditional&&!1===r)p(s);else{if(!1===r)return e.setParams({additionalProperty:s}),e.error(),void(u||t.break());if("object"==typeof r&&!(0,n.alwaysValidSchema)(d,r)){const r=t.name("valid");"failing"===f.removeAdditional?(g(s,r,!1),t.if((0,a.not)(r),(()=>{e.reset(),p(s)}))):(g(s,r),u||t.if((0,a.not)(r),(()=>t.break())))}}}function g(t,r,s){const a={keyword:"additionalProperties",dataProp:t,dataPropType:n.Type.Str};!1===s&&Object.assign(a,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(a,r)}t.forIn("key",c,(r=>{h.length||m.length?t.if(function(r){let o;if(h.length>8){const e=(0,n.schemaRefOrVal)(d,i.properties,"properties");o=(0,s.isOwnProperty)(t,e,r)}else o=h.length?(0,a.or)(...h.map((e=>a._`${r} === ${e}`))):a.nil;return m.length&&(o=(0,a.or)(o,...m.map((t=>a._`${(0,s.usePattern)(e,t)}.test(${r})`)))),(0,a.not)(o)}(r),(()=>y(r))):y(r)})),e.ok(a._`${l} === ${o.default.errors}`)}};t.default=i},5844:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});const s=r(4227),a={keyword:"allOf",schemaType:"array",code(e){const{gen:t,schema:r,it:a}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");const o=t.name("valid");r.forEach(((t,r)=>{if((0,s.alwaysValidSchema)(a,t))return;const n=e.subschema({keyword:"allOf",schemaProp:r},o);e.ok(o),e.mergeEvaluated(n)}))}};t.default=a},6505:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});const s={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:r(5765).validateUnion,error:{message:"must match a schema in anyOf"}};t.default=s},2661:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});const s=r(9029),a=r(4227),o={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:e,max:t}})=>void 0===t?s.str`must contain at least ${e} valid item(s)`:s.str`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>void 0===t?s._`{minContains: ${e}}`:s._`{minContains: ${e}, maxContains: ${t}}`},code(e){const{gen:t,schema:r,parentSchema:o,data:n,it:i}=e;let c,l;const{minContains:d,maxContains:u}=o;i.opts.next?(c=void 0===d?1:d,l=u):c=1;const f=t.const("len",s._`${n}.length`);if(e.setParams({min:c,max:l}),void 0===l&&0===c)return void(0,a.checkStrictMode)(i,'"minContains" == 0 without "maxContains": "contains" keyword ignored');if(void 0!==l&&c>l)return(0,a.checkStrictMode)(i,'"minContains" > "maxContains" is always invalid'),void e.fail();if((0,a.alwaysValidSchema)(i,r)){let t=s._`${f} >= ${c}`;return void 0!==l&&(t=s._`${t} && ${f} <= ${l}`),void e.pass(t)}i.items=!0;const h=t.name("valid");function m(){const e=t.name("_valid"),r=t.let("count",0);p(e,(()=>t.if(e,(()=>function(e){t.code(s._`${e}++`),void 0===l?t.if(s._`${e} >= ${c}`,(()=>t.assign(h,!0).break())):(t.if(s._`${e} > ${l}`,(()=>t.assign(h,!1).break())),1===c?t.assign(h,!0):t.if(s._`${e} >= ${c}`,(()=>t.assign(h,!0))))}(r)))))}function p(r,s){t.forRange("i",0,f,(t=>{e.subschema({keyword:"contains",dataProp:t,dataPropType:a.Type.Num,compositeRule:!0},r),s()}))}void 0===l&&1===c?p(h,(()=>t.if(h,(()=>t.break())))):0===c?(t.let(h,!0),void 0!==l&&t.if(s._`${n}.length > 0`,m)):(t.let(h,!1),m()),e.result(h,(()=>e.reset()))}};t.default=o},3025:function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;const s=r(9029),a=r(4227),o=r(5765);t.error={message:({params:{property:e,depsCount:t,deps:r}})=>{const a=1===t?"property":"properties";return s.str`must have ${a} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:r,missingProperty:a}})=>s._`{property: ${e},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("lodash"),require("qs")):"function"==typeof define&&define.amd?define(["lodash","qs"],t):"object"==typeof exports?exports.bpm2=t(require("lodash"),require("qs")):e.bpm2=t(e.lodash,e.qs)}(self,(function(e,t){return function(){var l={5281:function(e,t,l){"use strict";l.d(t,{A:function(){return u}});var o=l(9795),i=l(6773),s=l.n(i),a=class{constructor(e,t={}){this._fnBatchLoad=e,this._options=t,this._queue=[]}async load(e){let t=await this.loads(e);return s().get(t,"0")}loads(...e){return new Promise(((t,l)=>{this._queue.push({keys:e,resolve:t,reject:l}),1==this._queue.length&&this.nextTick((()=>{this.process()}))}))}nextTick(e){setTimeout(e,0)}process(){let e=this._queue;this._queue=[];let t={};s().each(e,(e=>{s().each(e.keys,(e=>t[e]=null))}));let l=s().keys(t);this._fnBatchLoad(l).then((o=>{s().each(l,((e,l)=>{t[e]=o[l]})),s().each(e,(({keys:e,resolve:l})=>{l(s().map(e,(e=>t[e])))}))})).catch((t=>{s().each(e,(({reject:e})=>e(t)))}))}};const r=async(e,t,l)=>{if(t.networking=!0,t.netHeader&&(e.headers={common:t.netHeader}),e.params=_.merge({},e.params,l),t.env.ignore_levels&&_.set(e.params,"ignore_levels",!0),(0,o.Fr)()){let t=zj.utils.pageParam().token;e.params=_.merge({token:t,platform:"phone"},e.params)}e.isSilentOnErr=e=>{let t=_.get(e,"data.result");return t>=19e6||t<=19999999};let i=_.cloneDeep(e);if(i.can_custom_org_params){let e=_.cloneDeep(_.get(t,"orgInfo",{}));console.log("bpm3_orgInfo",e),e.custom_page_level&&(i.params.page_level=e.custom_page_level),e.custom_group_id&&(i.params.group_id=e.custom_group_id),e.custom_team_id&&(i.params.team_id=e.custom_team_id),e.custom_project_id&&(i.params.project_id=e.custom_project_id)}console.log("bpm3_orgInfo_reqArgs",i);let s=await zj.net.request(i);return t.networking=!1,s},n={},c={};var u={assistSelectEntranceForm:{getListDefinition(e,{formDefId:t,fieldDefId:l,orgInfo:o,isDm:i}){return r({url:`/app_flow/v1/papi/assist_select_entrance_form/${t}/${l}/list_definition/`,method:"GET"},e,o)},getOptions(e,{formDefId:t,fieldDefId:l,orgInfo:o,isDm:i},s){return r({url:`/app_flow/v1/papi/assist_select_entrance_form/${t}/${l}/list_search/`,method:"GET",params:s},e,o)},getListSelected(e,{formDefId:t,fieldDefId:l,orgInfo:o,isDm:i},s){return r({url:`/app_flow/v1/papi/assist_select_entrance_form/${t}/${l}/list_selected/`,method:"GET",params:s},e,o)}},assistField:{getBatchLoader(e,{formDefId:t,fieldDefId:l,orgInfo:o,uniqueId:i}){const s=`${t}/${l}`,c=n[s]||new a((async s=>{let a=`/app_flow/v1/papi/assist_field/${t}/${l}/list_title/`;const n=await r({url:a,method:"GET",params:{values:JSON.stringify(s)}},e,o),c=_.get(n,"data.data.data",{});let u=[];return _.map(s,(e=>{i?(e=JSON.parse(e),e=_.get(e,`${i}`),u=_.concat(u,c[e])):u=_.concat(u,c[e])})),u}));return n[s]=c,c},getTitle(e,{formDefId:t,fieldDefId:l,orgInfo:o,isDm:i},s){return r({url:`/app_flow/v1/papi/assist_field/${t}/${l}/list_title/`,method:"GET",params:{values:JSON.stringify(s)}},e,o)},async searchSelectOpts(e,{formDefId:t,fieldDefId:l,orgInfo:o,isDm:i},s={},a=""){a&&(s.q=a);let n=i?`/app_flow/v1/papi/dm/assist_field/${t}/${l}/search_title/`:`/app_flow/v1/papi/assist_field/${t}/${l}/search_title/`,u=`${t}/${l}/${a}/${JSON.stringify(o)}/${JSON.stringify(s)}`,f={};return c[u]&&"loading"==c[u]?(console.log("有缓存,返回"),await this.waitCacheMapData(u)):(!c[u]||(new Date).getTime()-c[u].last_time>6e4?(c[u]="loading",f=await r({url:n,method:i?"GET":"POST",data:s,can_custom_org_params:!0},e,o),c[u]={last_time:(new Date).getTime(),result:f}):(console.log("有缓存"),c[u].result&&(f=c[u].result)),f)},waitCacheMapData(e){return new Promise((t=>{let l=setInterval((()=>{c[e]&&"loading"!=c[e]&&c[e].result&&(clearInterval(l),t(c[e].result))}),100)}))},selectFromMulFormSearchOpts(e,{formDefId:t,fieldDefId:l,orgInfo:o,isDm:i},s={},a=""){return a&&(s.q=a),r({url:i?`/app_flow/v1/papi/dm/assist_field/select_form_mul_form/${t}/${l}/search_title/`:`/app_flow/v1/papi/assist_field/select_form_mul_form/${t}/${l}/search_title/`,method:"GET",params:s},e,o)},selectFromMulFormListTitleLoader(e,{formDefId:t,fieldDefId:l,orgInfo:o,isDm:i}){const s=`${t}/${l}`,c=n[s]||new a((async s=>{let a=i?`/app_flow/v1/papi/dm/assist_field/select_form_mul_form/${t}/${l}/list_title/`:`/app_flow/v1/papi/assist_field/select_form_mul_form/${t}/${l}/list_title/`;const n=await r({url:a,method:"GET",params:{values:JSON.stringify(s)}},e,o),c=_.get(n.data,"data.items",[]),u={};c.forEach((e=>{Object.keys(e.data).forEach((t=>{let l=e.data[t];u[t]={form_def_id:_.get(e,"definition.form.id"),form_title:_.get(e,"definition.form.name"),label:l}}))}));let f=[];return s.forEach((e=>{f.push(u[e])})),f}));return n[s]=c,c},selectFromMulFormListTitle(e,{formDefId:t,fieldDefId:l,orgInfo:o,isDm:i},s){return r({url:i?`/app_flow/v1/papi/dm/assist_field/select_form_mul_form/${t}/${l}/list_title/`:`/app_flow/v1/papi/assist_field/select_form_mul_form/${t}/${l}/list_title/`,method:"GET",params:{values:JSON.stringify(s)}},e,o)}},assistTreeField:{searchSelectOpts(e,{formDefId:t,fieldDefId:l,orgInfo:o,isDm:i},s={},a=""){return a&&(s.q=a),r({url:i?`/app_flow/v1/papi/dm/assist_tree_field/${t}/${l}/search_title/`:`/app_flow/v1/papi/assist_tree_field/${t}/${l}/search_title/`,method:"GET",params:s,can_custom_org_params:!0},e,o)}},assistUserTaskCC:{searchSelectOpts(e,{formDefId:t,node:l,orgInfo:o,isDm:i},s={},a=""){return a&&(s.q=a),r({url:`/app_flow/v1/papi/assist_user_task_cc/${t}/${l}/search_title/`,method:"GET",params:s},e,o)}}}},9795:function(e,t,l){"use strict";function o(){for(var e=["iphone","ipod","ipad","android","mobile","blackberry","webos","incognito","webmate","bada","nokia","lg","ucweb","skyfire"],t=navigator.userAgent.toLowerCase(),l=!1,o=0,i=e.length;o<i;o++)-1!=t.indexOf(e[o])&&(l=!0);return l}l.d(t,{Fr:function(){return o}}),l(6773),l(5360)},7348:function(e,t,l){"use strict";l.d(t,{A:function(){return n}});var o=function(){var e=this,t=e.$createElement;return(e._self._c||t)("span",{attrs:{title:e.label}},[e._v(e._s(e.label))])};o._withStripped=!0;var i=l(6773),s=l.n(i),a={props:["value","fieldConf","row","formName","orgInfo"],data(){return{label:""}},watch:{value(){this.loadRemoteLabel()}},mounted(){this.loadRemoteLabel()},methods:{async loadRemoteLabel(){let e=this.value;if(s().isNil(e)||!e)return this.label=zj.z("未选择","c.not_selected");try{if(s().isObject(e))try{e=JSON.parse(e)}catch(e){console.log("error",e)}let t=s().isArray(e)?e:[e],l=s().get(this.fieldConf,"id");s().isEmpty(t)?this.label=zj.z("未选择","c.not_selected"):(t=s().isArray(t)?t:[t],this.label=await this.$bpm.fetchLabelByValues(t,l,this.formName,this.row))}finally{console.log("finally")}}}},r=(0,l(4486).A)(a,o,[],!1,null,null,null);r.options.__file="components/lib/mixins/RemoteSelectReader.vue";var n=r.exports},4486:function(e,t,l){"use strict";function o(e,t,l,o,i,s,a,r){var n,c="function"==typeof e?e.options:e;if(t&&(c.render=t,c.staticRenderFns=l,c._compiled=!0),o&&(c.functional=!0),s&&(c._scopeId="data-v-"+s),a?(n=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),i&&i.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(a)},c._ssrRegister=n):i&&(n=r?function(){i.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:i),n)if(c.functional){c._injectStyles=n;var u=c.render;c.render=function(e,t){return n.call(t),u(e,t)}}else{var f=c.beforeCreate;c.beforeCreate=f?[].concat(f,n):[n]}return{exports:e,options:c}}l.d(t,{A:function(){return o}})},7642:function(e){e.exports=function(){return this.ELEMENT}()},5554:function(e){e.exports=function(){return this.Vue}()},6773:function(t){"use strict";t.exports=e},5360:function(e){"use strict";e.exports=t}},o={};function i(e){var t=o[e];if(void 0!==t)return t.exports;var s=o[e]={exports:{}};return l[e](s,s.exports,i),s.exports}i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,{a:t}),t},i.d=function(e,t){for(var l in t)i.o(t,l)&&!i.o(e,l)&&Object.defineProperty(e,l,{enumerable:!0,get:t[l]})},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var s={};return function(){"use strict";i.r(s),i.d(s,{default:function(){return V}});var e=function(){var e=this,t=e.$createElement;return(e._self._c||t)(e.curComponent,e._g(e._b({ref:"inner-component",tag:"component",staticClass:"bpm-select-form-field",attrs:{type:e.type,fieldConf:e.fieldConf,row:e.row,mode:e.mode,orgInfo:e.orgInfo,formName:e.formName,uiType:e.uiType,isMultiple:e.multiple,allowCreate:e.allowCreate,allowRemote:e.allowRemote},on:{change:e.handleChange,setAllValue:e.setAllValue,setDefaultValue:e.setDefaultValue},model:{value:e.curVal,callback:function(t){e.curVal=t},expression:"curVal"}},"component",e.$attrs,!1),e.$listeners))};e._withStripped=!0;var t=function(){var e=this,t=e.$createElement,l=e._self._c||t;return l("div",{staticClass:"bpm-select-edit",staticStyle:{display:"flex"}},[e.isCheckbox||e.isButton?[e.isMultiple?l("el-checkbox-group",{on:{change:e.onCheckboxChange},model:{value:e.curCheckBoxVal,callback:function(t){e.curCheckBoxVal=t},expression:"curCheckBoxVal"}},[e.isCheckbox?e._l(e.options,(function(t){return l("el-checkbox",{key:t.value,attrs:{label:t.value}},[e._v(e._s(t.label))])})):e._e(),e._v(" "),e.isButton?e._l(e.options,(function(t){return l("el-checkbox-button",{key:t.value,attrs:{label:t.value}},[e._v(e._s(t.label))])})):e._e()],2):l("el-radio-group",{on:{change:e.onRadioChange},model:{value:e.curRadioVal,callback:function(t){e.curRadioVal=t},expression:"curRadioVal"}},[e.isCheckbox?e._l(e.options,(function(t){return l("el-radio",{key:t.value,attrs:{label:t.value},model:{value:e.radio,callback:function(t){e.radio=t},expression:"radio"}},[e._v(e._s(t.label))])})):e._e(),e._v(" "),e.isButton?e._l(e.options,(function(t){return l("el-radio-button",{key:t.value,attrs:{label:t.value}},[e._v(e._s(t.label))])})):e._e()],2)]:[e.showUnit?l("select-unit",{attrs:{fieldConf:e.fieldConf,formDefId:e.formDefId,orgInfo:e.orgInfo},on:{change:e.handleUnitChange}}):e._e(),e._v(" "),l("el-select",e._g(e._b({key:e.isMultiple?"two":"one",staticStyle:{flex:"1"},attrs:{placeholder:e.placeholder,multiple:e.isMultiple,clearable:"",filterable:"",remote:!!(e.allowRemote&&e.options_max_count>99),"allow-create":e.allowCreate,"remote-method":!!(e.allowRemote&&e.options_max_count>99)&&e.remoteMethod},on:{change:e.onChange},model:{value:e.curVal,callback:function(t){e.curVal=t},expression:"curVal"}},"el-select",e.$attrs,!1),e.$listeners),e._l(e.options,(function(t){return l("el-option",{key:t.value,attrs:{label:t.label,value:t.value}},[t.label&&t.label.length>60?l("el-tooltip",{staticClass:"item",attrs:{"popper-class":"bpm-select-edit-option-tooltip",effect:"light",content:t.value,placement:"bottom-start","open-delay":100}},[l("span",[e._v(e._s(t.label))])]):l("span",[e._v(e._s(t.label))])],1)})),1)]],2)};t._withStripped=!0;var l=i(5554),o=i.n(l),a=i(7642),r=i(5281),n=function(){var e=this,t=e.$createElement,l=e._self._c||t;return l("el-select",{attrs:{placeholder:e.$z("单位选择","b2.common.unit_selection"),filterable:"",remote:""},on:{"remote-method":e.remoteMethod,change:e.handleUnitChange},model:{value:e.selectedTeam,callback:function(t){e.selectedTeam=t},expression:"selectedTeam"}},e._l(e.teams,(function(e){return l("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)};n._withStripped=!0;var c={name:"SelectUnit",props:["fieldConf","orgInfo","formDefId"],data(){return{selectedTeam:"",teams:[],teamMap:{},teamKeyword:"",debounceSearchTeams:_.debounce(_.bind(this.loadTeams,this),150,{trailing:!0,leading:!1})}},mounted(){this.loadTeams()},methods:{handleUnitChange(){this.$emit("change",this.selectedTeam)},async loadTeams(){let e=_.get(this.orgInfo,"page_level"),t=_.get(this.orgInfo,`${e}_id`);this.teams=await this.$bpm.searchTeamSelectOpts(this.fieldConf.id,{keyword:this.teamKeyword,[`${e}_id`]:t},this.formDefId),this.teamMap=_.keyBy(this.teams,"value")},remoteMethod(e){this.teamKeyword=e||"",this.debounceSearchTeams()}}},u=i(4486),f=(0,u.A)(c,n,[],!1,null,null,null);f.options.__file="components/lib/bpmSelectFromField/src/part/select-unit.vue";var p=f.exports;o().use(a.Select),o().use(a.Option),o().use(a.Tooltip);var d={props:["type","value","fieldConf","row","formName","formDefId","orgInfo","dm","isMultiple","allowCreate","allowRemote"],components:{SelectUnit:p},data(){return{curVal:[],curCheckBoxVal:[],curRadioVal:"",options:[],all_options:[],options_max_count:0,keyword:"",unit:{search_type:"",org_id:""}}},watch:{curVal(e){console.log("----项目设置----",e),console.log("----项目设置----",this.fieldConf),"SelectProject"!=this.fieldConf.type||"project_id"==zj.pageParam().form_name||"SelectProject"!=this.fieldConf.type||this.isMultiple||(this.$bpm.orgInfo.custom_project_id=e,this.$bpm.orgInfo.custom_page_level="project",e||(this.$bpm.orgInfo.custom_page_level=null))},value(){this.setOptionsByVal(),this.curVal=this.value,this.isMultiple?this.curVal?this.curCheckBoxVal=this.curVal:this.curCheckBoxVal=[]:this.curRadioVal=this.curVal},getSelectOptions:function(e){console.log("----selectOptions----",e),this.transformOptions(e,!0)}},inject:["selectOptions"],computed:{isCheckbox(){return"default"==_.get(this.fieldConf,"style")},isButton(){return"button"==_.get(this.fieldConf,"style")},placeholder(){return this.fieldConf.desc||this.fieldConf.name},getSelectOptions(){return this.selectOptions?this.selectOptions():[]},showUnit(){return"SelectURUser"===this.type||"MulSelectURUser"===this.type}},created(){this.curVal=this.isMultiple?[]:""},mounted(){(this.fieldConf.perm||{visible:!0}).visible&&(console.log("mounted getting options"),this.loadSelectOpts()),this.curVal=this.value,_.isArray(this.curVal)?this.curCheckBoxVal=this.value:this.curRadioVal=this.value,this.setOptionsByVal()},destroyed(){"project"!=this.$bpm.orgInfo.page_level&&(delete this.$bpm.orgInfo.custom_project_id,delete this.$bpm.orgInfo.custom_page_level)},methods:{onCheckboxChange(e){console.log("this.curCheckBoxVal",this.curCheckBoxVal),this.curVal=this.curCheckBoxVal,this.$emit("input",this.curVal),this.$emit("change",this.curVal)},onRadioChange(e){console.log("this.curRadioVal",this.curRadioVal),this.curVal=this.curRadioVal,this.$emit("input",this.curVal),this.$emit("change",this.curVal)},setOptionsByVal(){let e=_.cloneDeep(this.all_options);_.isArray(this.value)?_.each(this.value,(t=>{_.find(e,{value:t})||e.push({value:t,label:t})})):this.value&&!_.find(e,{value:this.value})&&e.push({value:this.value,label:this.value}),0==this.all_options.length&&(this.all_options=_.cloneDeep(e)),this.options=_.cloneDeep(e)},handleUnitChange(e){let t=_.split(e,"$"),l=_.get(t,"0"),o=_.get(t,"1");this.unit={search_type:l,org_id:o},this.loadSelectOpts("",JSON.stringify(this.unit))},remoteMethod(e){let t="";this.showUnit&&this.unit.search_type&&(t=JSON.stringify(this.unit)),e?this.loadSelectOpts(e,t):this.options=_.cloneDeep(this.all_options)},_setSelectItem(e){if(console.log("this.fieldConf",this.fieldConf),this.fieldConf.default&&"Default"==this.fieldConf.default.type&&"EVCFirstElem"==this.fieldConf.default.value.type&&(e&&e.length?(console.log("_setSelectItem_options",e),this.isMultiple?(this.curVal=[e[0].value],this.curCheckBoxVal=[e[0].value]):(this.curVal=e[0].value,this.curRadioVal=e[0].value)):this.isMultiple?(this.curVal=[],this.curCheckBoxVal=[]):(this.curVal="",this.curRadioVal=""),this.$emit("setDefaultValue",this.curVal),console.log("this.curVal",this.curVal),this.$emit("input",this.curVal),this.$emit("change",this.curVal)),this.isMultiple&&this.fieldConf.default&&"Default"==this.fieldConf.default.type&&"EVCAllElem"==this.fieldConf.default.value.type){let t=[];_.each(e,(e=>{t.push(e.value)})),console.log("parent_field",this),this.$emit("setAllValue",t),this.$emit("setDefaultValue",t),this.curVal=t,this.curCheckBoxVal=t,console.log("_setSelectItem_this.curVal",this.curVal),this.$emit("input",this.curVal),this.$emit("change",this.curVal)}},async loadSelectOpts(e="",t=""){let l,o=this.fieldConf.id,i={q:e,spec:t};if("UserTaskCC"===this.fieldConf.type){console.log("UserTaskCC is getting options");const e=this.fieldConf.node;l=await r.A.assistUserTaskCC.searchSelectOpts(this.$bpm,{formDefId:this.formDefId,node:e,orgInfo:this.orgInfo,isDm:this.dm},i)}else l=await r.A.assistField.searchSelectOpts(this.$bpm,{formDefId:this.formDefId,fieldDefId:o,orgInfo:this.orgInfo,isDm:this.dm},i);const s=_.get(l.data,"data.data",[]);return this.transformOptions(s,!1)},transformOptions(e,t=!0){console.log("transformOptions origin: ",e);let l=_.map(e,(e=>({value:e[0],label:e[1]})));return l=_.sortBy(l,["label"]),this.options_max_count<l.length&&(this.options_max_count=l.length),l.length&&(this.all_options=_.cloneDeep(l)),this.value&&!_.isArray(this.value)||_.isArray(this.value)&&0!=this.value.length?0!=l.length&&(this.options=l):this.options=l,(this.options.length>0||t)&&this._setSelectItem(this.options),console.log("options: ",l),l},onChange(e){"SelectProject"!=this.fieldConf.type||"project_id"==zj.pageParam().form_name||"SelectProject"!=this.fieldConf.type||this.isMultiple||this.$emit("reload",{id:this.fieldConf.id,value:e})}}},h=(0,u.A)(d,t,[],!1,null,null,null);h.options.__file="components/lib/bpmSelectFromField/src/part/editor.vue";var m=h.exports,g={mixins:[i(7348).A]},v=(0,u.A)(g,void 0,void 0,!1,null,null,null);v.options.__file="components/lib/bpmSelectFromField/src/part/reader.vue";var b=v.exports,y={name:"BpmSelectFromField",components:{editorComponent:m,readerComponent:b},props:{value:{type:[Array,Number,String]},type:{type:String,default:"SelectFromField"},fieldConf:{type:Object,default(){return{}}},row:{type:Object,default(){return{}}},mode:{type:String,default(){return"view"}},uiType:{type:String,default(){return"default"}},orgInfo:{type:Object},formName:{type:String},isMultiple:{type:Boolean,default(){return!1}}},data(){return{curVal:""}},computed:{curComponent(){return"view"==this.mode?b:m},multiple(){let e=this.isMultiple||0===this.type.indexOf("Mul");return"UserTaskCC"===this.type&&this.fieldConf.selecter&&(e=0===(this.fieldConf.selecter.type||"MulSelectUser4CC").indexOf("Mul")),e},allowCreate(){return!(!this.fieldConf.range_remote||"add"!=this.fieldConf.range_remote.enable_add_item)},allowRemote(){return!(!this.fieldConf.range_remote||!this.fieldConf.range_remote.enable_remote_search)}},watch:{value(){this.curVal=this.value}},mounted(){this.curVal=this.value},methods:{setAllValue(e){this.$emit("setAllValue",e)},setDefaultValue(e){this.$emit("setDefaultValue",e)},handleChange(e){}}},C=(0,u.A)(y,e,[],!1,null,null,null);C.options.__file="components/lib/bpmSelectFromField/src/main.vue";var $=C.exports;$.install=function(e){e.component($.name,$)};var V=$}(),s}()}));
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("lodash"),require("qs")):"function"==typeof define&&define.amd?define(["lodash","qs"],t):"object"==typeof exports?exports.bpm2=t(require("lodash"),require("qs")):e.bpm2=t(e.lodash,e.qs)}(self,(function(e,t){return function(){var l={5281:function(e,t,l){"use strict";l.d(t,{A:function(){return u}});var o=l(9795),i=l(6773),s=l.n(i),a=class{constructor(e,t={}){this._fnBatchLoad=e,this._options=t,this._queue=[]}async load(e){let t=await this.loads(e);return s().get(t,"0")}loads(...e){return new Promise(((t,l)=>{this._queue.push({keys:e,resolve:t,reject:l}),1==this._queue.length&&this.nextTick((()=>{this.process()}))}))}nextTick(e){setTimeout(e,0)}process(){let e=this._queue;this._queue=[];let t={};s().each(e,(e=>{s().each(e.keys,(e=>t[e]=null))}));let l=s().keys(t);this._fnBatchLoad(l).then((o=>{s().each(l,((e,l)=>{t[e]=o[l]})),s().each(e,(({keys:e,resolve:l})=>{l(s().map(e,(e=>t[e])))}))})).catch((t=>{s().each(e,(({reject:e})=>e(t)))}))}};const r=async(e,t,l)=>{if(t.setNetworking(!0),t.netHeader&&(e.headers={common:t.netHeader}),e.params=_.merge({},e.params,l),t.env.ignore_levels&&_.set(e.params,"ignore_levels",!0),(0,o.Fr)()){let t=zj.utils.pageParam().token;e.params=_.merge({token:t,platform:"phone"},e.params)}e.isSilentOnErr=e=>{let t=_.get(e,"data.result");return t>=19e6||t<=19999999};let i=_.cloneDeep(e);if(i.can_custom_org_params){let e=_.cloneDeep(_.get(t,"orgInfo",{}));console.log("bpm3_orgInfo",e),e.custom_page_level&&(i.params.page_level=e.custom_page_level),e.custom_group_id&&(i.params.group_id=e.custom_group_id),e.custom_team_id&&(i.params.team_id=e.custom_team_id),e.custom_project_id&&(i.params.project_id=e.custom_project_id)}console.log("bpm3_orgInfo_reqArgs",i);let s=await zj.net.request(i);return t.setNetworking(!1),s},n={},c={};var u={assistSelectEntranceForm:{getListDefinition(e,{formDefId:t,fieldDefId:l,orgInfo:o,isDm:i}){return r({url:`/app_flow/v1/papi/assist_select_entrance_form/${t}/${l}/list_definition/`,method:"GET"},e,o)},getOptions(e,{formDefId:t,fieldDefId:l,orgInfo:o,isDm:i},s){return r({url:`/app_flow/v1/papi/assist_select_entrance_form/${t}/${l}/list_search/`,method:"GET",params:s},e,o)},getListSelected(e,{formDefId:t,fieldDefId:l,orgInfo:o,isDm:i},s){return r({url:`/app_flow/v1/papi/assist_select_entrance_form/${t}/${l}/list_selected/`,method:"GET",params:s},e,o)}},assistField:{getBatchLoader(e,{formDefId:t,fieldDefId:l,orgInfo:o,uniqueId:i}){const s=`${t}/${l}`,c=n[s]||new a((async s=>{let a=`/app_flow/v1/papi/assist_field/${t}/${l}/list_title/`;const n=await r({url:a,method:"GET",params:{values:JSON.stringify(s)}},e,o),c=_.get(n,"data.data.data",{});let u=[];return _.map(s,(e=>{i?(e=JSON.parse(e),e=_.get(e,`${i}`),u=_.concat(u,c[e])):u=_.concat(u,c[e])})),u}));return n[s]=c,c},getTitle(e,{formDefId:t,fieldDefId:l,orgInfo:o,isDm:i},s){return r({url:`/app_flow/v1/papi/assist_field/${t}/${l}/list_title/`,method:"GET",params:{values:JSON.stringify(s)}},e,o)},async searchSelectOpts(e,{formDefId:t,fieldDefId:l,orgInfo:o,isDm:i},s={},a=""){a&&(s.q=a);let n=i?`/app_flow/v1/papi/dm/assist_field/${t}/${l}/search_title/`:`/app_flow/v1/papi/assist_field/${t}/${l}/search_title/`,u=`${t}/${l}/${a}/${JSON.stringify(o)}/${JSON.stringify(s)}`,f={};return c[u]&&"loading"==c[u]?(console.log("有缓存,返回"),await this.waitCacheMapData(u)):(!c[u]||(new Date).getTime()-c[u].last_time>6e4?(c[u]="loading",f=await r({url:n,method:i?"GET":"POST",data:s,can_custom_org_params:!0},e,o),c[u]={last_time:(new Date).getTime(),result:f}):(console.log("有缓存"),c[u].result&&(f=c[u].result)),f)},waitCacheMapData(e){return new Promise((t=>{let l=setInterval((()=>{c[e]&&"loading"!=c[e]&&c[e].result&&(clearInterval(l),t(c[e].result))}),100)}))},selectFromMulFormSearchOpts(e,{formDefId:t,fieldDefId:l,orgInfo:o,isDm:i},s={},a=""){return a&&(s.q=a),r({url:i?`/app_flow/v1/papi/dm/assist_field/select_form_mul_form/${t}/${l}/search_title/`:`/app_flow/v1/papi/assist_field/select_form_mul_form/${t}/${l}/search_title/`,method:"GET",params:s},e,o)},selectFromMulFormListTitleLoader(e,{formDefId:t,fieldDefId:l,orgInfo:o,isDm:i}){const s=`${t}/${l}`,c=n[s]||new a((async s=>{let a=i?`/app_flow/v1/papi/dm/assist_field/select_form_mul_form/${t}/${l}/list_title/`:`/app_flow/v1/papi/assist_field/select_form_mul_form/${t}/${l}/list_title/`;const n=await r({url:a,method:"GET",params:{values:JSON.stringify(s)}},e,o),c=_.get(n.data,"data.items",[]),u={};c.forEach((e=>{Object.keys(e.data).forEach((t=>{let l=e.data[t];u[t]={form_def_id:_.get(e,"definition.form.id"),form_title:_.get(e,"definition.form.name"),label:l}}))}));let f=[];return s.forEach((e=>{f.push(u[e])})),f}));return n[s]=c,c},selectFromMulFormListTitle(e,{formDefId:t,fieldDefId:l,orgInfo:o,isDm:i},s){return r({url:i?`/app_flow/v1/papi/dm/assist_field/select_form_mul_form/${t}/${l}/list_title/`:`/app_flow/v1/papi/assist_field/select_form_mul_form/${t}/${l}/list_title/`,method:"GET",params:{values:JSON.stringify(s)}},e,o)}},assistTreeField:{searchSelectOpts(e,{formDefId:t,fieldDefId:l,orgInfo:o,isDm:i},s={},a=""){return a&&(s.q=a),r({url:i?`/app_flow/v1/papi/dm/assist_tree_field/${t}/${l}/search_title/`:`/app_flow/v1/papi/assist_tree_field/${t}/${l}/search_title/`,method:"GET",params:s,can_custom_org_params:!0},e,o)}},assistUserTaskCC:{searchSelectOpts(e,{formDefId:t,node:l,orgInfo:o,isDm:i},s={},a=""){return a&&(s.q=a),r({url:`/app_flow/v1/papi/assist_user_task_cc/${t}/${l}/search_title/`,method:"GET",params:s},e,o)}}}},9795:function(e,t,l){"use strict";function o(){for(var e=["iphone","ipod","ipad","android","mobile","blackberry","webos","incognito","webmate","bada","nokia","lg","ucweb","skyfire"],t=navigator.userAgent.toLowerCase(),l=!1,o=0,i=e.length;o<i;o++)-1!=t.indexOf(e[o])&&(l=!0);return l}l.d(t,{Fr:function(){return o}}),l(6773),l(5360)},7348:function(e,t,l){"use strict";l.d(t,{A:function(){return n}});var o=function(){var e=this,t=e.$createElement;return(e._self._c||t)("span",{attrs:{title:e.label}},[e._v(e._s(e.label))])};o._withStripped=!0;var i=l(6773),s=l.n(i),a={props:["value","fieldConf","row","formName","orgInfo"],data(){return{label:""}},watch:{value(){this.loadRemoteLabel()}},mounted(){this.loadRemoteLabel()},methods:{async loadRemoteLabel(){let e=this.value;if(s().isNil(e)||!e)return this.label=zj.z("未选择","c.not_selected");try{if(s().isObject(e))try{e=JSON.parse(e)}catch(e){console.log("error",e)}let t=s().isArray(e)?e:[e],l=s().get(this.fieldConf,"id");s().isEmpty(t)?this.label=zj.z("未选择","c.not_selected"):(t=s().isArray(t)?t:[t],this.label=await this.$bpm.fetchLabelByValues(t,l,this.formName,this.row))}finally{console.log("finally")}}}},r=(0,l(4486).A)(a,o,[],!1,null,null,null);r.options.__file="components/lib/mixins/RemoteSelectReader.vue";var n=r.exports},4486:function(e,t,l){"use strict";function o(e,t,l,o,i,s,a,r){var n,c="function"==typeof e?e.options:e;if(t&&(c.render=t,c.staticRenderFns=l,c._compiled=!0),o&&(c.functional=!0),s&&(c._scopeId="data-v-"+s),a?(n=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),i&&i.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(a)},c._ssrRegister=n):i&&(n=r?function(){i.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:i),n)if(c.functional){c._injectStyles=n;var u=c.render;c.render=function(e,t){return n.call(t),u(e,t)}}else{var f=c.beforeCreate;c.beforeCreate=f?[].concat(f,n):[n]}return{exports:e,options:c}}l.d(t,{A:function(){return o}})},7642:function(e){e.exports=function(){return this.ELEMENT}()},5554:function(e){e.exports=function(){return this.Vue}()},6773:function(t){"use strict";t.exports=e},5360:function(e){"use strict";e.exports=t}},o={};function i(e){var t=o[e];if(void 0!==t)return t.exports;var s=o[e]={exports:{}};return l[e](s,s.exports,i),s.exports}i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,{a:t}),t},i.d=function(e,t){for(var l in t)i.o(t,l)&&!i.o(e,l)&&Object.defineProperty(e,l,{enumerable:!0,get:t[l]})},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var s={};return function(){"use strict";i.r(s),i.d(s,{default:function(){return V}});var e=function(){var e=this,t=e.$createElement;return(e._self._c||t)(e.curComponent,e._g(e._b({ref:"inner-component",tag:"component",staticClass:"bpm-select-form-field",attrs:{type:e.type,fieldConf:e.fieldConf,row:e.row,mode:e.mode,orgInfo:e.orgInfo,formName:e.formName,uiType:e.uiType,isMultiple:e.multiple,allowCreate:e.allowCreate,allowRemote:e.allowRemote},on:{change:e.handleChange,setAllValue:e.setAllValue,setDefaultValue:e.setDefaultValue},model:{value:e.curVal,callback:function(t){e.curVal=t},expression:"curVal"}},"component",e.$attrs,!1),e.$listeners))};e._withStripped=!0;var t=function(){var e=this,t=e.$createElement,l=e._self._c||t;return l("div",{staticClass:"bpm-select-edit",staticStyle:{display:"flex"}},[e.isCheckbox||e.isButton?[e.isMultiple?l("el-checkbox-group",{on:{change:e.onCheckboxChange},model:{value:e.curCheckBoxVal,callback:function(t){e.curCheckBoxVal=t},expression:"curCheckBoxVal"}},[e.isCheckbox?e._l(e.options,(function(t){return l("el-checkbox",{key:t.value,attrs:{label:t.value}},[e._v(e._s(t.label))])})):e._e(),e._v(" "),e.isButton?e._l(e.options,(function(t){return l("el-checkbox-button",{key:t.value,attrs:{label:t.value}},[e._v(e._s(t.label))])})):e._e()],2):l("el-radio-group",{on:{change:e.onRadioChange},model:{value:e.curRadioVal,callback:function(t){e.curRadioVal=t},expression:"curRadioVal"}},[e.isCheckbox?e._l(e.options,(function(t){return l("el-radio",{key:t.value,attrs:{label:t.value},model:{value:e.radio,callback:function(t){e.radio=t},expression:"radio"}},[e._v(e._s(t.label))])})):e._e(),e._v(" "),e.isButton?e._l(e.options,(function(t){return l("el-radio-button",{key:t.value,attrs:{label:t.value}},[e._v(e._s(t.label))])})):e._e()],2)]:[e.showUnit?l("select-unit",{attrs:{fieldConf:e.fieldConf,formDefId:e.formDefId,orgInfo:e.orgInfo},on:{change:e.handleUnitChange}}):e._e(),e._v(" "),l("el-select",e._g(e._b({key:e.isMultiple?"two":"one",staticStyle:{flex:"1"},attrs:{placeholder:e.placeholder,multiple:e.isMultiple,clearable:"",filterable:"",remote:!!(e.allowRemote&&e.options_max_count>99),"allow-create":e.allowCreate,"remote-method":!!(e.allowRemote&&e.options_max_count>99)&&e.remoteMethod},on:{change:e.onChange},model:{value:e.curVal,callback:function(t){e.curVal=t},expression:"curVal"}},"el-select",e.$attrs,!1),e.$listeners),e._l(e.options,(function(t){return l("el-option",{key:t.value,attrs:{label:t.label,value:t.value}},[t.label&&t.label.length>60?l("el-tooltip",{staticClass:"item",attrs:{"popper-class":"bpm-select-edit-option-tooltip",effect:"light",content:t.value,placement:"bottom-start","open-delay":100}},[l("span",[e._v(e._s(t.label))])]):l("span",[e._v(e._s(t.label))])],1)})),1)]],2)};t._withStripped=!0;var l=i(5554),o=i.n(l),a=i(7642),r=i(5281),n=function(){var e=this,t=e.$createElement,l=e._self._c||t;return l("el-select",{attrs:{placeholder:e.$z("单位选择","b2.common.unit_selection"),filterable:"",remote:""},on:{"remote-method":e.remoteMethod,change:e.handleUnitChange},model:{value:e.selectedTeam,callback:function(t){e.selectedTeam=t},expression:"selectedTeam"}},e._l(e.teams,(function(e){return l("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})})),1)};n._withStripped=!0;var c={name:"SelectUnit",props:["fieldConf","orgInfo","formDefId"],data(){return{selectedTeam:"",teams:[],teamMap:{},teamKeyword:"",debounceSearchTeams:_.debounce(_.bind(this.loadTeams,this),150,{trailing:!0,leading:!1})}},mounted(){this.loadTeams()},methods:{handleUnitChange(){this.$emit("change",this.selectedTeam)},async loadTeams(){let e=_.get(this.orgInfo,"page_level"),t=_.get(this.orgInfo,`${e}_id`);this.teams=await this.$bpm.searchTeamSelectOpts(this.fieldConf.id,{keyword:this.teamKeyword,[`${e}_id`]:t},this.formDefId),this.teamMap=_.keyBy(this.teams,"value")},remoteMethod(e){this.teamKeyword=e||"",this.debounceSearchTeams()}}},u=i(4486),f=(0,u.A)(c,n,[],!1,null,null,null);f.options.__file="components/lib/bpmSelectFromField/src/part/select-unit.vue";var p=f.exports;o().use(a.Select),o().use(a.Option),o().use(a.Tooltip);var d={props:["type","value","fieldConf","row","formName","formDefId","orgInfo","dm","isMultiple","allowCreate","allowRemote"],components:{SelectUnit:p},data(){return{curVal:[],curCheckBoxVal:[],curRadioVal:"",options:[],all_options:[],options_max_count:0,keyword:"",unit:{search_type:"",org_id:""}}},watch:{curVal(e){console.log("----项目设置----",e),console.log("----项目设置----",this.fieldConf),"SelectProject"!=this.fieldConf.type||"project_id"==zj.pageParam().form_name||"SelectProject"!=this.fieldConf.type||this.isMultiple||(this.$bpm.orgInfo.custom_project_id=e,this.$bpm.orgInfo.custom_page_level="project",e||(this.$bpm.orgInfo.custom_page_level=null))},value(){this.setOptionsByVal(),this.curVal=this.value,this.isMultiple?this.curVal?this.curCheckBoxVal=this.curVal:this.curCheckBoxVal=[]:this.curRadioVal=this.curVal},getSelectOptions:function(e){console.log("----selectOptions----",e),this.transformOptions(e,!0)}},inject:["selectOptions"],computed:{isCheckbox(){return"default"==_.get(this.fieldConf,"style")},isButton(){return"button"==_.get(this.fieldConf,"style")},placeholder(){return this.fieldConf.desc||this.fieldConf.name},getSelectOptions(){return this.selectOptions?this.selectOptions():[]},showUnit(){return"SelectURUser"===this.type||"MulSelectURUser"===this.type}},created(){this.curVal=this.isMultiple?[]:""},mounted(){(this.fieldConf.perm||{visible:!0}).visible&&(console.log("mounted getting options"),this.loadSelectOpts()),this.curVal=this.value,_.isArray(this.curVal)?this.curCheckBoxVal=this.value:this.curRadioVal=this.value,this.setOptionsByVal()},destroyed(){"project"!=this.$bpm.orgInfo.page_level&&(delete this.$bpm.orgInfo.custom_project_id,delete this.$bpm.orgInfo.custom_page_level)},methods:{onCheckboxChange(e){console.log("this.curCheckBoxVal",this.curCheckBoxVal),this.curVal=this.curCheckBoxVal,this.$emit("input",this.curVal),this.$emit("change",this.curVal)},onRadioChange(e){console.log("this.curRadioVal",this.curRadioVal),this.curVal=this.curRadioVal,this.$emit("input",this.curVal),this.$emit("change",this.curVal)},setOptionsByVal(){let e=_.cloneDeep(this.all_options);_.isArray(this.value)?_.each(this.value,(t=>{_.find(e,{value:t})||e.push({value:t,label:t})})):this.value&&!_.find(e,{value:this.value})&&e.push({value:this.value,label:this.value}),0==this.all_options.length&&(this.all_options=_.cloneDeep(e)),this.options=_.cloneDeep(e)},handleUnitChange(e){let t=_.split(e,"$"),l=_.get(t,"0"),o=_.get(t,"1");this.unit={search_type:l,org_id:o},this.loadSelectOpts("",JSON.stringify(this.unit))},remoteMethod(e){let t="";this.showUnit&&this.unit.search_type&&(t=JSON.stringify(this.unit)),e?this.loadSelectOpts(e,t):this.options=_.cloneDeep(this.all_options)},_setSelectItem(e){if(console.log("this.fieldConf",this.fieldConf),this.fieldConf.default&&"Default"==this.fieldConf.default.type&&"EVCFirstElem"==this.fieldConf.default.value.type&&(e&&e.length?(console.log("_setSelectItem_options",e),this.isMultiple?(this.curVal=[e[0].value],this.curCheckBoxVal=[e[0].value]):(this.curVal=e[0].value,this.curRadioVal=e[0].value)):this.isMultiple?(this.curVal=[],this.curCheckBoxVal=[]):(this.curVal="",this.curRadioVal=""),this.$emit("setDefaultValue",this.curVal),console.log("this.curVal",this.curVal),this.$emit("input",this.curVal),this.$emit("change",this.curVal)),this.isMultiple&&this.fieldConf.default&&"Default"==this.fieldConf.default.type&&"EVCAllElem"==this.fieldConf.default.value.type){let t=[];_.each(e,(e=>{t.push(e.value)})),console.log("parent_field",this),this.$emit("setAllValue",t),this.$emit("setDefaultValue",t),this.curVal=t,this.curCheckBoxVal=t,console.log("_setSelectItem_this.curVal",this.curVal),this.$emit("input",this.curVal),this.$emit("change",this.curVal)}},async loadSelectOpts(e="",t=""){let l,o=this.fieldConf.id,i={q:e,spec:t};if("UserTaskCC"===this.fieldConf.type){console.log("UserTaskCC is getting options");const e=this.fieldConf.node;l=await r.A.assistUserTaskCC.searchSelectOpts(this.$bpm,{formDefId:this.formDefId,node:e,orgInfo:this.orgInfo,isDm:this.dm},i)}else l=await r.A.assistField.searchSelectOpts(this.$bpm,{formDefId:this.formDefId,fieldDefId:o,orgInfo:this.orgInfo,isDm:this.dm},i);const s=_.get(l.data,"data.data",[]);return this.transformOptions(s,!1)},transformOptions(e,t=!0){console.log("transformOptions origin: ",e);let l=_.map(e,(e=>({value:e[0],label:e[1]})));return l=_.sortBy(l,["label"]),this.options_max_count<l.length&&(this.options_max_count=l.length),l.length&&(this.all_options=_.cloneDeep(l)),this.value&&!_.isArray(this.value)||_.isArray(this.value)&&0!=this.value.length?0!=l.length&&(this.options=l):this.options=l,(this.options.length>0||t)&&this._setSelectItem(this.options),console.log("options: ",l),l},onChange(e){"SelectProject"!=this.fieldConf.type||"project_id"==zj.pageParam().form_name||"SelectProject"!=this.fieldConf.type||this.isMultiple||this.$emit("reload",{id:this.fieldConf.id,value:e})}}},h=(0,u.A)(d,t,[],!1,null,null,null);h.options.__file="components/lib/bpmSelectFromField/src/part/editor.vue";var m=h.exports,g={mixins:[i(7348).A]},v=(0,u.A)(g,void 0,void 0,!1,null,null,null);v.options.__file="components/lib/bpmSelectFromField/src/part/reader.vue";var b=v.exports,y={name:"BpmSelectFromField",components:{editorComponent:m,readerComponent:b},props:{value:{type:[Array,Number,String]},type:{type:String,default:"SelectFromField"},fieldConf:{type:Object,default(){return{}}},row:{type:Object,default(){return{}}},mode:{type:String,default(){return"view"}},uiType:{type:String,default(){return"default"}},orgInfo:{type:Object},formName:{type:String},isMultiple:{type:Boolean,default(){return!1}}},data(){return{curVal:""}},computed:{curComponent(){return"view"==this.mode?b:m},multiple(){let e=this.isMultiple||0===this.type.indexOf("Mul");return"UserTaskCC"===this.type&&this.fieldConf.selecter&&(e=0===(this.fieldConf.selecter.type||"MulSelectUser4CC").indexOf("Mul")),e},allowCreate(){return!(!this.fieldConf.range_remote||"add"!=this.fieldConf.range_remote.enable_add_item)},allowRemote(){return!(!this.fieldConf.range_remote||!this.fieldConf.range_remote.enable_remote_search)}},watch:{value(){this.curVal=this.value}},mounted(){this.curVal=this.value},methods:{setAllValue(e){this.$emit("setAllValue",e)},setDefaultValue(e){this.$emit("setDefaultValue",e)},handleChange(e){}}},C=(0,u.A)(y,e,[],!1,null,null,null);C.options.__file="components/lib/bpmSelectFromField/src/main.vue";var $=C.exports;$.install=function(e){e.component($.name,$)};var V=$}(),s}()}));
|