!function(){functiont(e){returnt="function"==typeofSymbol&&"symbol"==typeofSymbol.iterator?function(t){returntypeoft}:function(t){returnt&&"function"==typeofSymbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeoft},t(e)}functione(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */vart,n,o="function"==typeofSymbol?Symbol:{},i=o.iterator||"@@iterator",a=o.toStringTag||"@@toStringTag";functionu(e,o,i,a){varu=o&&o.prototypeinstanceofs?o:s,l=Object.create(u.prototype);returnr(l,"_invoke",function(e,r,o){vari,a,u,s=0,l=o||[],f=!1,p={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,r){returni=e,a=0,u=t,p.n=r,c}};functionh(e,r){for(a=e,u=r,n=0;!f&&s&&!o&&n<l.length;n++){varo,i=l[n],h=p.p,v=i[2];e>3?(o=v===r)&&(u=i[(a=i[4])?5:(a=3,3)],i[4]=i[5]=t):i[0]<=h&&((o=e<2&&h<i[1])?(a=0,p.v=r,p.n=i[1]):h<v&&(o=e<3||i[0]>r||r>v)&&(i[4]=e,i[5]=r,p.n=v,a=0))}if(o||e>1)returnc;throwf=!0,r}returnfunction(o,l,v){if(s>1)throwTypeError("Generator is already running");for(f&&1===l&&h(l,v),a=l,u=v;(n=a<2?t:u)||!f;){i||(a?a<3?(a>1&&(p.n=-1),h(a,u)):p.n=u:p.v=u);try{if(s=2,i){if(a||(o="next"),n=i[o]){if(!(n=n.call(i,u)))throwTypeError("iterator result is not an object");if(!n.done)returnn;u=n.value,a<2&&(a=0)}else1===a&&(n=i.return)&&n.call(i),a<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),a=1);i=t}elseif((n=(f=p.n<0)?u:e.call(r,p))!==c)break}catch(n){i=t,a=1,u=n}finally{s=1}}return{value:n,done:f}}}(e,i,a),!0),l}varc={};functions(){}functionl(){}functionf(){}n=Object.getPrototypeOf;varp=[][i]?n(n([][i]())):(r(n={},i,(function(){returnthis})),n),h=f.prototype=s.prototype=Object.create(p);functionv(t){returnObject.setPrototypeOf?Object.setPrototypeOf(t,f):(t.__proto__=f,r(t,a,"GeneratorFunction")),t.prototype=Object.create(h),t}returnl.prototype=f,r(h,"constructor",f),r(f,"constructor",l),l.displayName="GeneratorFunction",r(f,a,"GeneratorFunction"),r(h),r(h,a,"Generator"),r(h,i,(function(){returnthis})),r(h,"toString",(function(){return"[object Generator]"})),(e=function(){return{w:u,m:v}})()}functionr(t,e,n,o){vari=Object.defineProperty;try{i({},"",{})}catch(t){i=0}r=function(t,e,n,o){if(e)i?i(t,e,{value:n,enumerable:!o,configurable:!o,writable:!o}):t[e]=n;else{functiona(e,n){r(t,e,(function(t){returnthis._invoke(e,n,t)}))}a("next",0),a("throw",1),a("return",2)}},r(t,e,n,o)}functionn(t,e,r,n,o,i,a){try{varu=t[i](a),c=u.value}catch(t){returnvoidr(t)}u.done?e(c):Promise.resolve(c).then(n,o)}functiono(t){returnfunction(){vare=this,r=arguments;returnnewPromise((function(o,i){vara=t.apply(e,r);functionu(t){n(a,o,i,u,c,"next",t)}functionc(t){n(a,o,i,u,c,"throw",t)}u(void0)}))}}functioni(t,e){if(!(tinstanceofe))thrownewTypeError("Cannot call a class as a function")}functiona(t,e){for(varr=0;r<e.length;r++){varn=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"inn&&(n.writable=!0),Object.defineProperty(t,O(n.key),n)}}functionu(t,e,r){returne&&a(t.prototype,e),r&&a(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}functionc(e,r,n){returnr=h(r),function(e,r){if(r&&("object"==t(r)||"function"==typeofr))returnr;if(void0!==r)thrownewTypeError("Derived constructors may only return object or undefined");returnfunction(t){if(void0===t)thrownewReferenceError("this hasn't been initialised - super() hasn't been called");returnt}(e)}(e,s()?Reflect.construct(r,n||[],h(e).constructor):r.apply(e,n))}functions(){try{vart=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(s=function(){return!!t})()}functionl(t,e,r,n){varo=f(h(1&n?t.prototype:t),e,r);return2&n&&"function"==typeofo?function(t){returno.apply(r,t)}:o}functionf(){returnf="undefined"!=typeofReflect&&Reflect.get?Reflect.get.bind():function(t,e,r){varn=p(t,e);if(n){varo=Object.getOwnPropertyDescriptor(n,e);returno.get?o.get.call(arguments.length<3?t:r):o.value}},f.apply(null,arguments)}functionp(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=h(t)););returnt}functionh(t){returnh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){returnt.__proto__||Object.getPrototypeOf(t)},h(t)}functionv(t,e){if("function"!=typeofe&&null!==e)thrownewTypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&y(t,e)}functiony(t,e){returny=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){returnt.__proto__=e,t},y(t,e)}functionb(t,e){varr=Object.keys(t);if(Object.getOwnPropertySymbols){varn=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){returnObject.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}returnr}functionm(t){for(vare=1;e<arguments.length;e++){varr=null!=arguments[e]?arguments[e]:{};e%2?b(Object(r),!0).forEach((function(e){d(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):b(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}returnt}functiond(t,e,r){return(e=O(e))int?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}functionO(e){varr=function(e,r){if("object"!=t(e)||!e)returne;varn=e[Symbol.toPrimitive];if(void0!==n){varo=n.call(e,r||"default");if("object"!=t(o))returno;thrownewTypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}(e,"string");return"symbol"==t(r)?r:r+""}System.register(["@ibiz-template/runtime","vue","@ibiz-template/vue-util","ramda","@ibiz-template/controller","@ibiz-template/model"],(function(t,r){"use strict";varn,a,s,f,p,h,y,b,O,g,w,j,S,P,E,C;return{setters:[function(t){n=t.PluginStaticResource},function(t){a=t.defineComponent,s=t.ref,f=t.watch,p=t.computed,h=t.getCurrentInstance,y=t.h},function(t){b=t.getCheckboxProps,O=t.getEditorEmits,g=t.useNamespace,w=t.useControlController},function(t){j=t.isNil},function(t){S=t.CheckBoxListEditorController,P=t.SearchFormController,E=t.FormNotifyState},function(t){C=t.SearchFormModel}],execute:function(){varx=newn(r.meta.url),D=a({name:"CustomCheckboxList",props:b(),emits:O(),setup:function(t,e){varr=e.emit,n=g("checkbox"),o=t.controller,i=o.model.codeList,a=s([]);f((function(){returnt.data}),(function(t){o.loadCodeList(t).then((function(t){a.value=t}))}),{immediate:!0,deep:!0});varu=p((function(){returni&&i.orMode?i.orMode.toLowerCase():"str"})),c=",";i&&i.valueSeparator&&(c=i.valueSeparator);varl=p({get:function(){if(!j(t.value)){if(Object.is(u.value,"num")&&a){vare=[],r="string"==typeoft.value?parseInt(t.value,10):t.value;returna.value.forEach((function(t){(r&t.value)===t.value&&e.push(t.value)})),e}if(Object.is(u.value,"str")){varn=t.value;if(""!==n){if(i){varo=n.split(c);if(i.codeItemValueNumber)for(vars=0,l=o.length;s<l;s++)o[s]=Number(o[s]);returno}returnn.split(",")}}}return[]},set:function(t){vare=null;if(Object.is(u.value,"num")){varn=0;t.forEach((function(t){vare="string"==typeoft?parseInt(t,10):t;n|=e})),e=n}elseif(Object.is(u.value,"str")){varo=[];a.value.length>0&&(a.value.forEach((function(e){-1!==t.findIndex((function(t){returnObject.is(e.value,t)}))&&o.push(e.value)})),e=o.join(c))}r("change",e)}}),h=p((function(){vart=Array.isArray(l.value)?l.value:[l.value];returna.value.filter((function(e){returnt.includes(e.value)})).map((function(t){returnt.text})).join("、")}));return{ns:n,items:a,selectArray:l,valueText:h,onSelectArrayChange:function(t){l.value=t},c:o}},render:function(t){vare=this;returnt("div",{class:[this.ns.b(),this.disabled?this.ns.m("disabled"):"",this.readonly?this.ns.m("readonly"):""]},[[this.readonly&&this.valueText,!this.readonly&&t("ICheckboxGroup",{props:m(m({},this.c.customProps),{},{value:this.selectArray}),on:{"on-change":this.onSelectArrayChange}},[this.items.map((function(r,n){returnt("i-checkbox",{key:n,attrs:{label:r.value,disabled:e.disabled||e.c.disabledList.includes(r.value)}},[t("span",{class:e.ns.e("text")},[r.text])])}))])]])}}),k=function(t){functionr(){vart;i(this,r);for(vare=arguments.length,n=newArray(e),o=0;o<e;o++)n[o]=arguments[o];returnd(t=c(this,r,[].concat(n)),"disabledList",[]),t}returnv(r,t),u(r,[{key:"onInit",value:(n=o(e().m((functiont(){varn,o;returne().w((function(t){for(;;)switch(t.n){case0:returnt.n=1,l(r,"onInit",this,3)([]);case1:if(null!==(n=this.editorParams)&&void0!==n&&n.DEFAULTDISABLEDLIST)try{this.disabledList=JSON.parse(null===(o=this.editorParams)||void0===o?void0:o.DEFAULTDISABLEDLIST)}catch(e){this.disabledList=[]}case2:returnt.a(2)}}),t,this)}))),function(){returnn.apply(this,arguments)})}]);varn}(S),L=function(t){functionr(){vart;i(this,r);for(vare=arguments.length,n=newArray(e),o=0;o<e;o++)n[o]=arguments[o];returnd(t=c(this,r,[].concat(n)),"filterParams",[]),t}returnv(r,t),u(r,[{key:"onInit",value:(a=o(e().m((functiont(){varn;returne().w((function(t){for(;;)switch(t.n){case0:returnt.n=1,l(r,"onInit",this,3)([]);case1:if(n=this.controlParams.FILTERPARAMS)try{this.filterParams=JSON.parse(n)}catch(e){this.filterParams=[]}case2:returnt.a(2)}}),t,this)}))),function(){returna.apply(this,arguments)})},{key:"getParams",value:function(){vart=m({},this.data.getRequestData());if(this.filterParams){vare={};returnthis.filterParams.forEach((function(r){Object.assign(e,d({},r,t[r]))})),e}returnt}},{key:"reset",value:(n=o(e().m((functiont(){varr,n=this;returne().w((function(t){for(;;)switch(t.n){case0:returnt.n=1,this.service.getDraft(this.context,this.params);case1:returnr=t.v,this.filterParams.forEach((function(t){Object.assign(n.data,d({},t,r.data[t]))})),this.isLoaded=!0,Object.values(this.details).forEach((function(t){n.filterParams.includes(t.model.codeName)&&t.formStateNotify(E.DRAFT)})),this.force(),t.n=2,this.nerve.self.evt.asyncEmit("search");case2:returnt.a(2)}}),t,this)}))),function(){returnn.apply(this,arguments)})}]);varn,a}(P),T=a({name:"SearchFormDynamic",props:{controller:{type:Object,required:!0},modelData:{type:C,required:!0},context:{type:Object,required:!0},params:{type:Object,default:function(){return{}}}},setup:function(t){vare=h().proxy;return{c:w(e,(function(){returnnewL(t.modelData,t.context,t.params)})),ns:g("search-form"),btntype:t.modelData.source.searchButtonStyle}},render:function(){vart=this;if(this.c.complete)returny("div",{class:[this.ns.b(),this.ns.m(this.btntype).toLowerCase()]},[y("form-control",{attrs:{"model-data":this.modelData,context:this.context,controller:this.c},nativeOn:{keyup:function(e){returnt.c.onKeyUp(e)}}}),"NONE"===this.c.model.source.searchButtonStyle?null:y("div",{class:this.ns.b("buttons")},[y("i-button",{class:this.ns.be("buttons","search"),on:{click:function(){returnt.c.onSearchButtonClick()}}},["查询"]),y("i-button",{class:this.ns.be("buttons","reset"),on:{click:function(){returnt.c.reset()}}},["重置"])])])}}),_=function(){returnu((functiont(){i(this,t),d(this,"formEditor","CustomCheckboxList"),d(this,"gridEditor","CustomCheckboxList")}),[{key:"createController",value:(t=o(e().m((functiont(r,n){varo;returne().w((function(t){for(;;)switch(t.n){case0:returno=newk(r,n),t.n=1,o.init();case1:returnt.a(2,o)}}),t)}))),function(e,r){returnt.apply(this,arguments)})}]);vart}(),I=u((functiont(){i(this,t),d(this,"component","SearchFormDynamic")}));t("default",{mateUrl:r.meta.url,install:function(t){x.loadStyle(["/style.css"]),t.component("CustomCheckboxList",D),ibiz.register.editor.register("EDITOR_CUSTOMSTYLE_CUSTOM_CHECKBOX_LIST",new_),t.component("SearchFormDynamic",T),ibiz.register.control.register("SEARCHFORM_RENDER_DYNAMIC",newI)}})}}}))}();