export const __webpack_esm_id__=82551;export const __webpack_esm_ids__=[20575,56712,67628,82551,89209];export const __webpack_esm_modules__={20575(e,t,s){s.d(t,{w:()=>i});const i={STRING:"string",TEXT:"text",BOOLEAN:"boolean",JSON:"json",SELECT:"select",MULTI_SELECT:"multi_select"}},89209(e,t,s){s.d(t,{C:()=>i});class i{_key="";_label="";_type="";_collection=!1;_value;_values;_regex;_required=!1;_group;hidden=!1;constructor(e){this._key=e.key,this._label=e.label,this._type=e.type,this._collection=e.collection,this._value=e.value,this._values=e.values,this._regex="string"==typeof e.regex?new RegExp(e.regex):e.regex,this._required=e.required,this._group=e.group,this.hidden=e.hidden}get key(){return this._key}set key(e){this._key=e}get label(){return this._label}set label(e){this._label=e}get type(){return this._type}set type(e){this._type=e}get collection(){return this._collection}set collection(e){this._collection=e}get value(){return this._value}set value(e){this._value=e}get values(){return this._values}set values(e){this._values=e}get regex(){return this._regex}set regex(e){this._regex="string"==typeof e?new RegExp(e):e}get required(){return this._required}set required(e){this._required=e}get group(){return this._group}set group(e){this._group=e}get hidden(){return this._hidden}set hidden(e){this._hidden=e}}},67628(e,t,s){s.d(t,{D:()=>r,t:()=>i});class i{_models=[];constructor(e){this._models=e||[]}get models(){return this._models}set models(e){this._models=e}}class r{_groupId="";_fields=[];_hiddenFields=[];constructor(e){this._fields=e.fields||[],this._hiddenFields=e.hiddenFields||[],this._groupId=e.groupId||""}get fields(){return this._fields}set fields(e){this._fields=e}get hiddenFields(){return this._hiddenFields}set hiddenFields(e){this._hiddenFields=e}get groupId(){return this._groupId}set groupId(e){this._groupId=e}}},56712(e,t,s){s.d(t,{O:()=>r,y:()=>l});var i=s(89209);const r={STRING:"string",TEXT:"text",BOOLEAN:"boolean",JSON:"json"};class l{_settings;_hasSettings;constructor(e){this._settings=e,this._hasSettings=!!this._settings&&this._settings.models.length>0}toFlatJSON(){const e={},t=t=>{t.collection?e[t.key]=t.value:"select"===t.type?e[t.key]=t.value.value:e[t.key]=t.value};return this._settings.models.forEach(e=>{e instanceof i.C?t(e):[...e.fields,...e.hiddenFields].forEach(t)}),e}get hasSettings(){return this._hasSettings}get settings(){return this._settings}set settings(e){this._settings=e,this._hasSettings=this._settings.models.length>0}}},82551(e,t,s){s.d(t,{O:()=>u});var i=s(79069),r=s(89209),l=s(56712),n=s(67628),d=s(20575);const u=e=>{if(!e||!e.configs)return new n.t;const t=_(e.configs);return o(t)},o=e=>{const t=[];return e.forEach(e=>{if(!e.group)return void t.push(e);let s=t.find(t=>t.groupId===e.group);s||(s=new n.D({groupId:e.group}),t.push(s)),(e.hidden?s.hiddenFields:s.fields).push(e)}),new n.t(t)},_=e=>e.map(e=>{let t=g(e),s=e.values,r=[];return t!==d.w.MULTI_SELECT&&t!==d.w.SELECT||(s=s.map(t=>{const s=Array.isArray(e.value)&&e.value.indexOf(t)>-1||"string"==typeof e.value&&e.value===t,l=new i.rx({label:t,value:t,selected:s});return s&&r.push(l),l}),t===d.w.SELECT?e.value=r[0]?r[0]:[]:t===d.w.MULTI_SELECT&&(e.value=r)),h(e,t,s)}),h=(e,t,s)=>new r.C({key:e.key,label:e.label,description:e.description,type:t,collection:e.collection||!1,value:e.value,values:s,regex:e.regex,required:e.required||!1,group:e.group,hidden:e.hidden}),g=e=>{let t;return e.type===l.O.TEXT?t=d.w.TEXT:e.type===l.O.BOOLEAN?t=d.w.BOOLEAN:e.type===l.O.JSON?t=d.w.JSON:e.type===l.O.STRING&&(t=e.values&&e.values.length>0?e.collection?d.w.MULTI_SELECT:d.w.SELECT:d.w.STRING),t}}};
//# sourceMappingURL=82551.d424c7bd8175b2c103ec.bundle.js.map